From 77ad6c66fe344b93bff76e79461555216679c45f Mon Sep 17 00:00:00 2001 From: samme Date: Sun, 8 Dec 2019 15:23:15 -0800 Subject: [PATCH 001/189] Correct type for Phaser.Tilemaps.LayerData#data Fixes #4904 ? --- src/tilemaps/mapdata/LayerData.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tilemaps/mapdata/LayerData.js b/src/tilemaps/mapdata/LayerData.js index 15ebbe5b2..1e96ef034 100644 --- a/src/tilemaps/mapdata/LayerData.js +++ b/src/tilemaps/mapdata/LayerData.js @@ -194,7 +194,7 @@ var LayerData = new Class({ * An array of the tile indexes * * @name Phaser.Tilemaps.LayerData#data - * @type {(number[])} + * @type {Array.>} * @since 3.0.0 */ this.data = GetFastValue(config, 'data', []); From 64690cf987937662f23aaa1fe536f1b166093b6e Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 21 Dec 2019 08:29:57 +0000 Subject: [PATCH 002/189] `Body.gravityScale` is a new vector property that allows you to scale the effect of world gravity on a specific Body. --- CHANGELOG.md | 1 + src/physics/matter-js/lib/body/Body.js | 9 +++++++++ src/physics/matter-js/lib/core/Engine.js | 4 ++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5cbde73cc..d31ac8862 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -117,6 +117,7 @@ * `MatterGameObject.setOnCollideEnd` is a new method available on any Matter Game Object, that sets a callback that is invoked when the body stops colliding. * `MatterGameObject.setOnCollideActive` is a new method available on any Matter Game Object, that sets a callback which is invoked for the duration of the bodies collision with another. * `MatterGameObject.setOnCollideWith` is a new method available on any Matter Game Object, that allows you to set a callback to be invoked whenever the body collides with another specific body, or array of bodies. +* `Body.gravityScale` is a new vector property that allows you to scale the effect of world gravity on a specific Body. ### New Features diff --git a/src/physics/matter-js/lib/body/Body.js b/src/physics/matter-js/lib/body/Body.js index 89a10044b..e8d0c9a1d 100644 --- a/src/physics/matter-js/lib/body/Body.js +++ b/src/physics/matter-js/lib/body/Body.js @@ -100,6 +100,7 @@ var Axes = require('../geometry/Axes'); gameObject: null, // custom Phaser property scale: { x: 1, y: 1 }, // custom Phaser property centerOfMass: { x: 0, y: 0 }, // custom Phaser property + gravityScale: { x: 1, y: 1 }, // custom Phaser property ignoreGravity: false, // custom Phaser property ignorePointer: false, // custom Phaser property onCollideCallback: null, // custom Phaser property @@ -1293,6 +1294,14 @@ var Axes = require('../geometry/Axes'); */ /** + * Scale the influence of World gravity when applied to this body. + * + * @property gravityScale + * @type vector + * @default { x: 1, y: 1 } + */ + + /** * Will this Body ignore Phaser Pointer input events? * * @property ignorePointer diff --git a/src/physics/matter-js/lib/core/Engine.js b/src/physics/matter-js/lib/core/Engine.js index 426dc6fad..e95732f83 100644 --- a/src/physics/matter-js/lib/core/Engine.js +++ b/src/physics/matter-js/lib/core/Engine.js @@ -291,8 +291,8 @@ var Body = require('../body/Body'); continue; // apply gravity - body.force.y += body.mass * gravity.y * gravityScale; - body.force.x += body.mass * gravity.x * gravityScale; + body.force.x += (body.mass * gravity.x * gravityScale) * body.gravityScale.x; + body.force.y += (body.mass * gravity.y * gravityScale) * body.gravityScale.y; } }; From 559c89eaf2e352496837dd637710a14c4c9f376d Mon Sep 17 00:00:00 2001 From: samme Date: Sun, 22 Dec 2019 17:00:51 -0800 Subject: [PATCH 003/189] Add ParticleEmitter#setTint() --- src/gameobjects/particles/ParticleEmitter.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/gameobjects/particles/ParticleEmitter.js b/src/gameobjects/particles/ParticleEmitter.js index e314595a9..2b74b7cb8 100644 --- a/src/gameobjects/particles/ParticleEmitter.js +++ b/src/gameobjects/particles/ParticleEmitter.js @@ -1323,6 +1323,23 @@ var ParticleEmitter = new Class({ return this; }, + /** + * Sets the color tint of emitted particles. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#setTint + * @since 3.22.0 + * + * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - A value between 0 and 0xffffff. + * + * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + */ + setTint: function (value) + { + this.tint.onChange(value); + + return this; + }, + /** * Sets the angle of a {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle stream. * From 56cd59c537078197a9e73c9d85f1303e7483de41 Mon Sep 17 00:00:00 2001 From: samme Date: Mon, 23 Dec 2019 09:46:45 -0800 Subject: [PATCH 004/189] Throw error for a bad audio asset key --- src/sound/html5/HTML5AudioSound.js | 4 +--- src/sound/webaudio/WebAudioSound.js | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/sound/html5/HTML5AudioSound.js b/src/sound/html5/HTML5AudioSound.js index 0312b2121..97d06f1bb 100644 --- a/src/sound/html5/HTML5AudioSound.js +++ b/src/sound/html5/HTML5AudioSound.js @@ -47,9 +47,7 @@ var HTML5AudioSound = new Class({ if (!this.tags) { - // eslint-disable-next-line no-console - console.warn('Audio cache entry missing: ' + key); - return; + throw new Error('There is no audio asset with key "' + key + '" in the audio cache'); } /** diff --git a/src/sound/webaudio/WebAudioSound.js b/src/sound/webaudio/WebAudioSound.js index 87323c6ef..e149eeec1 100644 --- a/src/sound/webaudio/WebAudioSound.js +++ b/src/sound/webaudio/WebAudioSound.js @@ -45,9 +45,7 @@ var WebAudioSound = new Class({ if (!this.audioBuffer) { - // eslint-disable-next-line no-console - console.warn('Audio cache entry missing: ' + key); - return; + throw new Error('There is no audio asset with key "' + key + '" in the audio cache'); } /** From 15506e0faf296f63337d01b7ca6991f899f183e3 Mon Sep 17 00:00:00 2001 From: samme Date: Mon, 23 Dec 2019 10:36:35 -0800 Subject: [PATCH 005/189] Add ParticleEmitter.remove() and ParticleEmitterManager#removeEmitter() --- src/gameobjects/particles/ParticleEmitter.js | 15 +++++++++++++++ .../particles/ParticleEmitterManager.js | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/src/gameobjects/particles/ParticleEmitter.js b/src/gameobjects/particles/ParticleEmitter.js index e314595a9..7d57c0310 100644 --- a/src/gameobjects/particles/ParticleEmitter.js +++ b/src/gameobjects/particles/ParticleEmitter.js @@ -1782,6 +1782,21 @@ var ParticleEmitter = new Class({ return this; }, + /** + * Removes the emitter from its manager and the scene. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#remove + * @since 3.22.0 + * + * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + */ + remove: function () + { + this.manager.removeEmitter(this); + + return this; + }, + /** * Sorts active particles with {@link Phaser.GameObjects.Particles.ParticleEmitter#depthSortCallback}. * diff --git a/src/gameobjects/particles/ParticleEmitterManager.js b/src/gameobjects/particles/ParticleEmitterManager.js index 356e50ce1..db3919301 100644 --- a/src/gameobjects/particles/ParticleEmitterManager.js +++ b/src/gameobjects/particles/ParticleEmitterManager.js @@ -277,6 +277,21 @@ var ParticleEmitterManager = new Class({ return this.addEmitter(new ParticleEmitter(this, config)); }, + /** + * Removes a Particle Emitter from this Emitter Manager, if the Emitter belongs to this Manager. + * + * @method Phaser.GameObjects.Particles.ParticleEmitterManager#removeEmitter + * @since 3.22.0 + * + * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter + * + * @return {?Phaser.GameObjects.Particles.ParticleEmitter} The Particle Emitter if it was removed or null if it was not. + */ + removeEmitter: function (emitter) + { + return this.emitters.remove(emitter, true); + }, + /** * Adds an existing Gravity Well object to this Emitter Manager. * From f1001578c532981572c3e626aeb50a6ba5df1e19 Mon Sep 17 00:00:00 2001 From: samme Date: Mon, 23 Dec 2019 12:57:58 -0800 Subject: [PATCH 006/189] Bracket notation for type Phaser.Tilemaps.LayerData#data --- src/tilemaps/mapdata/LayerData.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tilemaps/mapdata/LayerData.js b/src/tilemaps/mapdata/LayerData.js index 1e96ef034..8425fbb72 100644 --- a/src/tilemaps/mapdata/LayerData.js +++ b/src/tilemaps/mapdata/LayerData.js @@ -194,7 +194,7 @@ var LayerData = new Class({ * An array of the tile indexes * * @name Phaser.Tilemaps.LayerData#data - * @type {Array.>} + * @type {Phaser.Tilemaps.Tile[][]} * @since 3.0.0 */ this.data = GetFastValue(config, 'data', []); From e752b5dc925b1f79d09897d1ec2e9c2507136566 Mon Sep 17 00:00:00 2001 From: samme Date: Sun, 22 Dec 2019 16:51:59 -0800 Subject: [PATCH 007/189] Add Phaser.Actions.AlignTo() and Phaser.Display.Align.To.QuickSet() --- src/actions/AlignTo.js | 42 +++++++++++++++++++++++++++++ src/actions/index.js | 1 + src/display/align/to/QuickSet.js | 46 ++++++++++++++++++++++++++++++++ src/display/align/to/index.js | 1 + 4 files changed, 90 insertions(+) create mode 100644 src/actions/AlignTo.js create mode 100644 src/display/align/to/QuickSet.js diff --git a/src/actions/AlignTo.js b/src/actions/AlignTo.js new file mode 100644 index 000000000..e71fa8c1d --- /dev/null +++ b/src/actions/AlignTo.js @@ -0,0 +1,42 @@ +/** + * @author samme + * @copyright 2019 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var QuickSet = require('../display/align/to/QuickSet'); + +/** + * Takes an array of Game Objects, or any objects that have public `x` and `y` properties, and aligns them next to each other. + * + * The first item isn't moved. The second item is aligned next to the first, then the third next to the second, and so on. + * + * @function Phaser.Actions.AlignTo + * @since 3.22.0 + * + * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return] + * + * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action. + * @param {integer} position - The position to align the items with. This is an align constant, such as `Phaser.Display.Align.LEFT_CENTER`. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action. + */ +var AlignTo = function (items, position, offsetX, offsetY) +{ + var target = items[0]; + + for (var i = 1; i < items.length; i++) + { + var item = items[i]; + + QuickSet(item, target, position, offsetX, offsetY); + + target = item; + } + + return items; +}; + +module.exports = AlignTo; diff --git a/src/actions/index.js b/src/actions/index.js index b90eb70fc..16fcbaf92 100644 --- a/src/actions/index.js +++ b/src/actions/index.js @@ -10,6 +10,7 @@ module.exports = { + AlignTo: require('./AlignTo'), Angle: require('./Angle'), Call: require('./Call'), GetFirst: require('./GetFirst'), diff --git a/src/display/align/to/QuickSet.js b/src/display/align/to/QuickSet.js new file mode 100644 index 000000000..12a0c4ccb --- /dev/null +++ b/src/display/align/to/QuickSet.js @@ -0,0 +1,46 @@ +/** + * @author samme + * @copyright 2019 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var ALIGN_CONST = require('../const'); + +var AlignToMap = []; + +AlignToMap[ALIGN_CONST.BOTTOM_CENTER] = require('./BottomCenter'); +AlignToMap[ALIGN_CONST.BOTTOM_LEFT] = require('./BottomLeft'); +AlignToMap[ALIGN_CONST.BOTTOM_RIGHT] = require('./BottomRight'); +AlignToMap[ALIGN_CONST.LEFT_BOTTOM] = require('./LeftBottom'); +AlignToMap[ALIGN_CONST.LEFT_CENTER] = require('./LeftCenter'); +AlignToMap[ALIGN_CONST.LEFT_TOP] = require('./LeftTop'); +AlignToMap[ALIGN_CONST.RIGHT_BOTTOM] = require('./RightBottom'); +AlignToMap[ALIGN_CONST.RIGHT_CENTER] = require('./RightCenter'); +AlignToMap[ALIGN_CONST.RIGHT_TOP] = require('./RightTop'); +AlignToMap[ALIGN_CONST.TOP_CENTER] = require('./TopCenter'); +AlignToMap[ALIGN_CONST.TOP_LEFT] = require('./TopLeft'); +AlignToMap[ALIGN_CONST.TOP_RIGHT] = require('./TopRight'); + +/** + * Takes a Game Object and aligns it next to another, at the given position. + * The alignment used is based on the `position` argument, which is a `Phaser.Display.Align` property such as `LEFT_CENTER` or `TOP_RIGHT`. + * + * @function Phaser.Display.Align.To.QuickSet + * @since 3.22.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [child,$return] + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {integer} position - The position to align the Game Object with. This is an align constant, such as `Phaser.Display.Align.LEFT_CENTER`. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var QuickSet = function (child, alignTo, position, offsetX, offsetY) +{ + return AlignToMap[position](child, alignTo, offsetX, offsetY); +}; + +module.exports = QuickSet; diff --git a/src/display/align/to/index.js b/src/display/align/to/index.js index 02dc420c9..1fe488b5b 100644 --- a/src/display/align/to/index.js +++ b/src/display/align/to/index.js @@ -16,6 +16,7 @@ module.exports = { LeftBottom: require('./LeftBottom'), LeftCenter: require('./LeftCenter'), LeftTop: require('./LeftTop'), + QuickSet: require('./QuickSet'), RightBottom: require('./RightBottom'), RightCenter: require('./RightCenter'), RightTop: require('./RightTop'), From 148e907b715069b0090769c85c347bbce83395fc Mon Sep 17 00:00:00 2001 From: samme Date: Tue, 19 Nov 2019 15:24:16 -0800 Subject: [PATCH 008/189] Add Math.Distance methods - BetweenPoints() - BetweenPointsSquared() - Chebyshev() - Snake() --- src/math/distance/DistanceBetweenPoints.js | 26 +++++++++++++++++ .../distance/DistanceBetweenPointsSquared.js | 26 +++++++++++++++++ src/math/distance/DistanceChebyshev.js | 28 +++++++++++++++++++ src/math/distance/DistanceSnake.js | 28 +++++++++++++++++++ src/math/distance/index.js | 4 +++ 5 files changed, 112 insertions(+) create mode 100644 src/math/distance/DistanceBetweenPoints.js create mode 100644 src/math/distance/DistanceBetweenPointsSquared.js create mode 100644 src/math/distance/DistanceChebyshev.js create mode 100644 src/math/distance/DistanceSnake.js diff --git a/src/math/distance/DistanceBetweenPoints.js b/src/math/distance/DistanceBetweenPoints.js new file mode 100644 index 000000000..3eb866350 --- /dev/null +++ b/src/math/distance/DistanceBetweenPoints.js @@ -0,0 +1,26 @@ +/** + * @author samme + * @copyright 2019 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the distance between two points. + * + * @function Phaser.Math.Distance.BetweenPoints + * @since 3.22.0 + * + * @param {Phaser.Types.Math.Vector2Like} a - The first point. + * @param {Phaser.Types.Math.Vector2Like} b - The second point. + * + * @return {number} The distance between the points. + */ +var DistanceBetweenPoints = function (a, b) +{ + var dx = a.x - b.x; + var dy = a.y - b.y; + + return Math.sqrt(dx * dx + dy * dy); +}; + +module.exports = DistanceBetweenPoints; diff --git a/src/math/distance/DistanceBetweenPointsSquared.js b/src/math/distance/DistanceBetweenPointsSquared.js new file mode 100644 index 000000000..8c6526fc8 --- /dev/null +++ b/src/math/distance/DistanceBetweenPointsSquared.js @@ -0,0 +1,26 @@ +/** + * @author samme + * @copyright 2019 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the squared distance between two points. + * + * @function Phaser.Math.Distance.BetweenPointsSquared + * @since 3.22.0 + * + * @param {Phaser.Types.Math.Vector2Like} a - The first point. + * @param {Phaser.Types.Math.Vector2Like} b - The second point. + * + * @return {number} The squared distance between the points. + */ +var DistanceBetweenPointsSquared = function (a, b) +{ + var dx = a.x - b.x; + var dy = a.y - b.y; + + return dx * dx + dy * dy; +}; + +module.exports = DistanceBetweenPointsSquared; diff --git a/src/math/distance/DistanceChebyshev.js b/src/math/distance/DistanceChebyshev.js new file mode 100644 index 000000000..5d70129ff --- /dev/null +++ b/src/math/distance/DistanceChebyshev.js @@ -0,0 +1,28 @@ +/** + * @author samme + * @copyright 2019 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the Chebyshev distance between two sets of coordinates (points). + * + * Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances. + * It's the effective distance when movement can be horizontal, vertical, or diagonal. + * + * @function Phaser.Math.Distance.Chebyshev + * @since 3.22.0 + * + * @param {number} x1 - The x coordinate of the first point. + * @param {number} y1 - The y coordinate of the first point. + * @param {number} x2 - The x coordinate of the second point. + * @param {number} y2 - The y coordinate of the second point. + * + * @return {number} The distance between each point. + */ +var ChebyshevDistance = function (x1, y1, x2, y2) +{ + return Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2)); +}; + +module.exports = ChebyshevDistance; diff --git a/src/math/distance/DistanceSnake.js b/src/math/distance/DistanceSnake.js new file mode 100644 index 000000000..538dcc039 --- /dev/null +++ b/src/math/distance/DistanceSnake.js @@ -0,0 +1,28 @@ +/** + * @author samme + * @copyright 2019 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the snake distance between two sets of coordinates (points). + * + * Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances. + * It's the effective distance when movement is allowed only horizontally or vertically (but not both). + * + * @function Phaser.Math.Distance.Snake + * @since 3.22.0 + * + * @param {number} x1 - The x coordinate of the first point. + * @param {number} y1 - The y coordinate of the first point. + * @param {number} x2 - The x coordinate of the second point. + * @param {number} y2 - The y coordinate of the second point. + * + * @return {number} The distance between each point. + */ +var SnakeDistance = function (x1, y1, x2, y2) +{ + return Math.abs(x1 - x2) + Math.abs(y1 - y2); +}; + +module.exports = SnakeDistance; diff --git a/src/math/distance/index.js b/src/math/distance/index.js index c31199005..c23baa313 100644 --- a/src/math/distance/index.js +++ b/src/math/distance/index.js @@ -11,7 +11,11 @@ module.exports = { Between: require('./DistanceBetween'), + BetweenPoints: require('./DistanceBetweenPoints'), + BetweenPointsSquared: require('./DistanceBetweenPointsSquared'), + Chebyshev: require('./DistanceChebyshev'), Power: require('./DistancePower'), + Snake: require('./DistanceSnake'), Squared: require('./DistanceSquared') }; From 936563df11de530de9c7a0e3fa62095789ac7437 Mon Sep 17 00:00:00 2001 From: "J.C" <1571995@qq.com> Date: Fri, 27 Dec 2019 17:01:14 +0800 Subject: [PATCH 009/189] Crop component is missing from `RenderTexture` class --- src/gameobjects/rendertexture/RenderTexture.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gameobjects/rendertexture/RenderTexture.js b/src/gameobjects/rendertexture/RenderTexture.js index 58d7af83b..31e3c9c18 100644 --- a/src/gameobjects/rendertexture/RenderTexture.js +++ b/src/gameobjects/rendertexture/RenderTexture.js @@ -38,6 +38,7 @@ var UUID = require('../../utils/string/UUID'); * @extends Phaser.GameObjects.Components.Alpha * @extends Phaser.GameObjects.Components.BlendMode * @extends Phaser.GameObjects.Components.ComputedSize + * @extends Phaser.GameObjects.Components.Crop * @extends Phaser.GameObjects.Components.Depth * @extends Phaser.GameObjects.Components.Flip * @extends Phaser.GameObjects.Components.GetBounds From 695cb7e4e29b77f6b981f9a6080afe36869618ad Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 28 Dec 2019 17:27:01 +0000 Subject: [PATCH 010/189] `AlphaSingle` is a new Game Object Component that allows a Game Object to set its alpha values, but only as a single uniform value, not on a per-quad basis. --- src/gameobjects/components/AlphaSingle.js | 104 ++++++++++++++++++++++ src/gameobjects/components/index.js | 1 + 2 files changed, 105 insertions(+) create mode 100644 src/gameobjects/components/AlphaSingle.js diff --git a/src/gameobjects/components/AlphaSingle.js b/src/gameobjects/components/AlphaSingle.js new file mode 100644 index 000000000..7c45928ce --- /dev/null +++ b/src/gameobjects/components/AlphaSingle.js @@ -0,0 +1,104 @@ +/** + * @author Richard Davey + * @copyright 2019 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = require('../../math/Clamp'); + +// bitmask flag for GameObject.renderMask +var _FLAG = 2; // 0010 + +/** + * Provides methods used for setting the alpha property of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.AlphaSingle + * @since 3.22.0 + */ + +var AlphaSingle = { + + /** + * Private internal value. Holds the global alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alpha + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alpha: 1, + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + * + * @method Phaser.GameObjects.Components.Alpha#clearAlpha + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + clearAlpha: function () + { + return this.setAlpha(1); + }, + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * @method Phaser.GameObjects.Components.Alpha#setAlpha + * @since 3.0.0 + * + * @param {number} [value=1] - The alpha value applied across the whole Game Object. + * + * @return {this} This Game Object instance. + */ + setAlpha: function (value) + { + if (value === undefined) { value = 1; } + + this.alpha = value; + + return this; + }, + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + * + * @name Phaser.GameObjects.Components.Alpha#alpha + * @type {number} + * @since 3.0.0 + */ + alpha: { + + get: function () + { + return this._alpha; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alpha = v; + + if (v === 0) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + } + + } + +}; + +module.exports = AlphaSingle; diff --git a/src/gameobjects/components/index.js b/src/gameobjects/components/index.js index dcc731a0c..0ce1f32bc 100644 --- a/src/gameobjects/components/index.js +++ b/src/gameobjects/components/index.js @@ -11,6 +11,7 @@ module.exports = { Alpha: require('./Alpha'), + AlphaSingle: require('./AlphaSingle'), Animation: require('./Animation'), BlendMode: require('./BlendMode'), ComputedSize: require('./ComputedSize'), From 949d8827887f170f743d5f17f1b8b08c10d14496 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 28 Dec 2019 17:27:15 +0000 Subject: [PATCH 011/189] The `Shape` Game Object now uses the AlphaSingle component, allowing you to uniformly set the alpha of the shape, rather than a quad alpha, which never worked for Shape objects. --- src/gameobjects/shape/Shape.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gameobjects/shape/Shape.js b/src/gameobjects/shape/Shape.js index b81f52263..6db575b08 100644 --- a/src/gameobjects/shape/Shape.js +++ b/src/gameobjects/shape/Shape.js @@ -20,7 +20,7 @@ var Line = require('../../geom/line/Line'); * @constructor * @since 3.13.0 * - * @extends Phaser.GameObjects.Components.Alpha + * @extends Phaser.GameObjects.Components.AlphaSingle * @extends Phaser.GameObjects.Components.BlendMode * @extends Phaser.GameObjects.Components.ComputedSize * @extends Phaser.GameObjects.Components.Depth @@ -41,7 +41,7 @@ var Shape = new Class({ Extends: GameObject, Mixins: [ - Components.Alpha, + Components.AlphaSingle, Components.BlendMode, Components.ComputedSize, Components.Depth, From f0e7a9bcf905f1bdfa476689290c34dbf25ff3d9 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 28 Dec 2019 17:27:31 +0000 Subject: [PATCH 012/189] The `Container` Game Object now uses the AlphaSingle component, allowing you to uniformly set the alpha of the container, rather than a quad alpha, which never worked consistently across Container children. Fix #4916 --- src/gameobjects/container/Container.js | 4 ++-- src/gameobjects/container/ContainerWebGLRenderer.js | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/gameobjects/container/Container.js b/src/gameobjects/container/Container.js index 02a879694..14d929ad1 100644 --- a/src/gameobjects/container/Container.js +++ b/src/gameobjects/container/Container.js @@ -58,7 +58,7 @@ var Vector2 = require('../../math/Vector2'); * @constructor * @since 3.4.0 * - * @extends Phaser.GameObjects.Components.Alpha + * @extends Phaser.GameObjects.Components.AlphaSingle * @extends Phaser.GameObjects.Components.BlendMode * @extends Phaser.GameObjects.Components.ComputedSize * @extends Phaser.GameObjects.Components.Depth @@ -76,7 +76,7 @@ var Container = new Class({ Extends: GameObject, Mixins: [ - Components.Alpha, + Components.AlphaSingle, Components.BlendMode, Components.ComputedSize, Components.Depth, diff --git a/src/gameobjects/container/ContainerWebGLRenderer.js b/src/gameobjects/container/ContainerWebGLRenderer.js index fb0a4b60e..258224373 100644 --- a/src/gameobjects/container/ContainerWebGLRenderer.js +++ b/src/gameobjects/container/ContainerWebGLRenderer.js @@ -52,10 +52,7 @@ var ContainerWebGLRenderer = function (renderer, container, interpolationPercent renderer.setBlendMode(0); } - var alphaTopLeft = container.alphaTopLeft; - var alphaTopRight = container.alphaTopRight; - var alphaBottomLeft = container.alphaBottomLeft; - var alphaBottomRight = container.alphaBottomRight; + var alpha = container.alpha; var scrollFactorX = container.scrollFactorX; var scrollFactorY = container.scrollFactorY; @@ -123,7 +120,7 @@ var ContainerWebGLRenderer = function (renderer, container, interpolationPercent // Set parent values child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY); - child.setAlpha(childAlphaTopLeft * alphaTopLeft, childAlphaTopRight * alphaTopRight, childAlphaBottomLeft * alphaBottomLeft, childAlphaBottomRight * alphaBottomRight); + child.setAlpha(childAlphaTopLeft * alpha, childAlphaTopRight * alpha, childAlphaBottomLeft * alpha, childAlphaBottomRight * alpha); // Render child.renderWebGL(renderer, child, interpolationPercentage, camera, transformMatrix); From c5c50dcfd0eed624dec6bacad089542112865ed3 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 28 Dec 2019 17:27:35 +0000 Subject: [PATCH 013/189] Update CHANGELOG.md --- CHANGELOG.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d31ac8862..1a04c91d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -122,6 +122,14 @@ ### New Features * `TimeStep.smoothStep` is a new boolean property that controls if any delta smoothing takes place during the game step. Delta smoothing has been enabled in Phaser since the first version and helps avoid delta spikes and dips, especially after loss of focus. However, you can now easily toggle if this happens via this property and the corresponding `FPSConfig` property. +* `Phaser.Math.Distance.BetweenPoints` is a new function that will return the distance between two Vector2-like objects (thanks @samme) +* `Phaser.Math.Distance.BetweenPointsSquared` is a new function that will return the squared distance between two Vector2-like objects (thanks @samme) +* `Phaser.Math.Distance.Chebyshev` is a new function that will return the Chebyshev (or chessboard) distance between two Vector2-like objects (thanks @samme) +* `Phaser.Math.Distance.Snake` is a new function that will return the rectilinear distance between two Vector2-like objects (thanks @samme) +* `ParticleEmitter.setTint` is a new method that will set the tint of emitted particles for the given Emitter only (thanks @samme) +* `ParticleEmitter.remove` is a new method that will remove the Emitter from its Emitter Manager (thanks @samme) +* `ParticleEmitterManager.removeEmitter` is a new method that will remove the given emitter from the manager, if the emitter belongs to it (thanks @samme) +* `AlphaSingle` is a new Game Object Component that allows a Game Object to set its alpha values, but only as a single uniform value, not on a per-quad basis. ### Updates @@ -131,6 +139,9 @@ * `Body._ty` is a new internal private var, holding the Arcade Physics Body combined total delta y value. * `LineCurve.getUtoTmapping` has been updated to return `u` directly to avoid calculations as it's identical to `t` in a Line (thanks @rexrainbow) * `Curve.getSpacedPoints` will now take an optional array as the 3rd parameter to store the points results in (thanks @rexrainbow) +* Trying to play or resume an audio file with an incorrect key will now throw a runtime error, instead of a console warning (thanks @samme) +* The `Shape` Game Object now uses the AlphaSingle component, allowing you to uniformly set the alpha of the shape, rather than a quad alpha, which never worked for Shape objects. +* The `Container` Game Object now uses the AlphaSingle component, allowing you to uniformly set the alpha of the container, rather than a quad alpha, which never worked consistently across Container children. Fix #4916 (thanks @laineus) ### Bug Fixes @@ -144,7 +155,7 @@ My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs: -@fselcukcan Bambosh @louisth @hexus @javigaralva @samme @BeLi4L +@fselcukcan Bambosh @louisth @hexus @javigaralva @samme @BeLi4L @jcyuan ## Version 3.21.0 - Senku - 22nd November 2019 From 5a3d124583c48c69e54ef5f961a1e2182f050570 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 28 Dec 2019 17:28:50 +0000 Subject: [PATCH 014/189] lint fix --- src/curves/LineCurve.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/curves/LineCurve.js b/src/curves/LineCurve.js index 8767553d4..fb9dea4c1 100644 --- a/src/curves/LineCurve.js +++ b/src/curves/LineCurve.js @@ -216,6 +216,7 @@ var LineCurve = new Class({ { var arcLengths = this.getLengths(divisions); var lineLength = arcLengths[arcLengths.length - 1]; + // Cannot overshoot the curve var targetLineLength = Math.min(distance, lineLength); @@ -224,7 +225,7 @@ var LineCurve = new Class({ else { t = u; - } + } return t; }, From 6ffdacc959b88513d74c06a8a7d9d62db5fd146a Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 28 Dec 2019 17:37:04 +0000 Subject: [PATCH 015/189] The `DOMElement` Game Object now uses the AlphaSingle component, allowing you to uniformly set the alpha of the element, rather than a quad alpha, which never worked for these objects. --- src/gameobjects/domelement/DOMElement.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gameobjects/domelement/DOMElement.js b/src/gameobjects/domelement/DOMElement.js index af30a72fb..0371b8a13 100644 --- a/src/gameobjects/domelement/DOMElement.js +++ b/src/gameobjects/domelement/DOMElement.js @@ -72,7 +72,7 @@ var Vector4 = require('../../math/Vector4'); * @constructor * @since 3.17.0 * - * @extends Phaser.GameObjects.Components.Alpha + * @extends Phaser.GameObjects.Components.AlphaSingle * @extends Phaser.GameObjects.Components.BlendMode * @extends Phaser.GameObjects.Components.Depth * @extends Phaser.GameObjects.Components.Origin @@ -92,7 +92,7 @@ var DOMElement = new Class({ Extends: GameObject, Mixins: [ - Components.Alpha, + Components.AlphaSingle, Components.BlendMode, Components.Depth, Components.Origin, From 4892cc7feb6e718031cc177f1cf98b5821b6e6bf Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 28 Dec 2019 17:37:13 +0000 Subject: [PATCH 016/189] The `Graphics` Game Object now uses the AlphaSingle component, allowing you to uniformly set the alpha of the element, rather than a quad alpha, which never worked for these objects. --- src/gameobjects/graphics/Graphics.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gameobjects/graphics/Graphics.js b/src/gameobjects/graphics/Graphics.js index 65f5c0b43..deb8c98c9 100644 --- a/src/gameobjects/graphics/Graphics.js +++ b/src/gameobjects/graphics/Graphics.js @@ -7,7 +7,7 @@ var BaseCamera = require('../../cameras/2d/BaseCamera.js'); var Class = require('../../utils/Class'); var Commands = require('./Commands'); -var ComponentsAlpha = require('../components/Alpha'); +var ComponentsAlpha = require('../components/AlphaSingle'); var ComponentsBlendMode = require('../components/BlendMode'); var ComponentsDepth = require('../components/Depth'); var ComponentsMask = require('../components/Mask'); @@ -72,7 +72,7 @@ var Render = require('./GraphicsRender'); * @constructor * @since 3.0.0 * - * @extends Phaser.GameObjects.Components.Alpha + * @extends Phaser.GameObjects.Components.AlphaSingle * @extends Phaser.GameObjects.Components.BlendMode * @extends Phaser.GameObjects.Components.Depth * @extends Phaser.GameObjects.Components.Mask From e270d3afd898a131d90f639845cff8951364a211 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 28 Dec 2019 17:37:17 +0000 Subject: [PATCH 017/189] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a04c91d0..048109fd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -142,6 +142,8 @@ * Trying to play or resume an audio file with an incorrect key will now throw a runtime error, instead of a console warning (thanks @samme) * The `Shape` Game Object now uses the AlphaSingle component, allowing you to uniformly set the alpha of the shape, rather than a quad alpha, which never worked for Shape objects. * The `Container` Game Object now uses the AlphaSingle component, allowing you to uniformly set the alpha of the container, rather than a quad alpha, which never worked consistently across Container children. Fix #4916 (thanks @laineus) +* The `DOMElement` Game Object now uses the AlphaSingle component, allowing you to uniformly set the alpha of the element, rather than a quad alpha, which never worked for these objects. +* The `Graphics` Game Object now uses the AlphaSingle component, allowing you to uniformly set the alpha of the element, rather than a quad alpha, which never worked for these objects. ### Bug Fixes From 77dc14ee2fb810c4ee4d6da87741fb3ca2f80571 Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 29 Dec 2019 21:46:50 -0500 Subject: [PATCH 018/189] Changed tile getTint function to use getTintAppendFloatAlphaAndSwap --- src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js b/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js index 0ee77dfba..1855afbd6 100644 --- a/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js +++ b/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js @@ -36,7 +36,7 @@ var DynamicTilemapLayerWebGLRenderer = function (renderer, src, interpolationPer var gidMap = src.gidMap; var pipeline = src.pipeline; - var getTint = Utils.getTintAppendFloatAlpha; + var getTint = Utils.getTintAppendFloatAlphaAndSwap; var scrollFactorX = src.scrollFactorX; var scrollFactorY = src.scrollFactorY; From cf4a4e2107fae056bff95a9ce29512daab8118de Mon Sep 17 00:00:00 2001 From: Adam Beswick Date: Mon, 30 Dec 2019 10:34:43 +0000 Subject: [PATCH 019/189] Remove requestedFullscreenChange and replace with checking the document's fullscreen element --- src/scale/ScaleManager.js | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/scale/ScaleManager.js b/src/scale/ScaleManager.js index df19c108f..6105e5690 100644 --- a/src/scale/ScaleManager.js +++ b/src/scale/ScaleManager.js @@ -346,16 +346,6 @@ var ScaleManager = new Class({ */ this._createdFullscreenTarget = false; - /** - * Internal var that keeps track of the user, or the browser, requesting fullscreen changes. - * - * @name Phaser.Scale.ScaleManager#_requestedFullscreenChange - * @type {boolean} - * @private - * @since 3.16.2 - */ - this._requestedFullscreenChange = false; - /** * The dirty state of the Scale Manager. * Set if there is a change between the parent size and the current size. @@ -1238,8 +1228,6 @@ var ScaleManager = new Class({ { var fsTarget = this.getFullscreenTarget(); - this._requestedFullscreenChange = true; - var fsPromise; if (fullscreen.keyboard) @@ -1382,8 +1370,6 @@ var ScaleManager = new Class({ if (fullscreen.active) { - this._requestedFullscreenChange = true; - document[fullscreen.cancel](); } @@ -1490,12 +1476,10 @@ var ScaleManager = new Class({ onFullScreenChange: function () { // They pressed ESC while in fullscreen mode - if (!this._requestedFullscreenChange) + if (!(document.fullscreenElement || document.webkitFullscreenElement || document.msFullscreenElement || document.mozFullScreenElement)) { this.stopFullscreen(); } - - this._requestedFullscreenChange = false; }, /** From 58c8efc2e526d61b54077998bcbe6a7dc51595f2 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 1 Jan 2020 17:33:45 +0000 Subject: [PATCH 020/189] Added jsdocs --- src/physics/matter-js/components/Static.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/physics/matter-js/components/Static.js b/src/physics/matter-js/components/Static.js index e6f35534c..34450150e 100644 --- a/src/physics/matter-js/components/Static.js +++ b/src/physics/matter-js/components/Static.js @@ -7,7 +7,7 @@ var Body = require('../lib/body/Body'); /** - * [description] + * Provides methods used for getting and setting the static state of a physics body. * * @namespace Phaser.Physics.Matter.Components.Static * @since 3.0.0 @@ -15,12 +15,12 @@ var Body = require('../lib/body/Body'); var Static = { /** - * [description] + * Changes the physics body to be either static `true` or dynamic `false`. * * @method Phaser.Physics.Matter.Components.Static#setStatic * @since 3.0.0 * - * @param {boolean} value - [description] + * @param {boolean} value - `true` to set the body as being static, or `false` to make it dynamic. * * @return {Phaser.GameObjects.GameObject} This Game Object. */ @@ -32,12 +32,12 @@ var Static = { }, /** - * [description] + * Returns `true` if the body is static, otherwise `false` for a dynamic body. * * @method Phaser.Physics.Matter.Components.Static#isStatic * @since 3.0.0 * - * @return {boolean} [description] + * @return {boolean} `true` if the body is static, otherwise `false`. */ isStatic: function () { From 7fdcfd540c6eb090705c413f40072fe1edfb45a5 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 1 Jan 2020 20:02:15 +0000 Subject: [PATCH 021/189] Remove render.opacity as it's not valid for constraints --- src/physics/matter-js/World.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/physics/matter-js/World.js b/src/physics/matter-js/World.js index 4a4fcb67a..6be6dea4d 100644 --- a/src/physics/matter-js/World.js +++ b/src/physics/matter-js/World.js @@ -1617,7 +1617,7 @@ var World = new Class({ return this; } - graphics.lineStyle(lineThickness, lineColor, lineOpacity * render.opacity); + graphics.lineStyle(lineThickness, lineColor, lineOpacity); var bodyA = constraint.bodyA; var bodyB = constraint.bodyB; From 1e6e350f7f4a4093c4d1bfe0f3fb411e492c7d37 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 2 Jan 2020 01:57:26 +0000 Subject: [PATCH 022/189] Typo fix --- src/physics/matter-js/MatterPhysics.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/physics/matter-js/MatterPhysics.js b/src/physics/matter-js/MatterPhysics.js index fab52b58f..7277f72ea 100644 --- a/src/physics/matter-js/MatterPhysics.js +++ b/src/physics/matter-js/MatterPhysics.js @@ -1018,7 +1018,7 @@ var MatterPhysics = new Class({ * @method Phaser.Physics.Matter.MatterPhysics#getMatterBodies * @since 3.22.0 * - * @param {array} [bodies] - An array of objects to extract the bodies from. If falsey, it will return all bodis in the world. + * @param {array} [bodies] - An array of objects to extract the bodies from. If falsey, it will return all bodies in the world. * * @return {MatterJS.Body[]} An array of native Matter Body objects. */ From 5e027f7031cbf5ab8502d0cef3cc509238ac298e Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 2 Jan 2020 16:45:28 +0000 Subject: [PATCH 023/189] Added JSDocs --- src/gameobjects/GameObject.js | 2 +- src/physics/matter-js/MatterImage.js | 6 ++--- src/physics/matter-js/MatterSprite.js | 6 ++--- src/physics/matter-js/components/Transform.js | 23 ++++++++++++------- 4 files changed, 22 insertions(+), 15 deletions(-) diff --git a/src/gameobjects/GameObject.js b/src/gameobjects/GameObject.js index e551afc09..fb07ac67d 100644 --- a/src/gameobjects/GameObject.js +++ b/src/gameobjects/GameObject.js @@ -61,7 +61,7 @@ var GameObject = new Class({ * * Phaser itself will never modify this value, although plugins may do so. * - * Use this property to track the state of a Game Object during its lifetime. For example, it could move from + * Use this property to track the state of a Game Object during its lifetime. For example, it could change from * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons. * If you need to store complex data about your Game Object, look at using the Data Component instead. diff --git a/src/physics/matter-js/MatterImage.js b/src/physics/matter-js/MatterImage.js index a628563ab..0692c0077 100644 --- a/src/physics/matter-js/MatterImage.js +++ b/src/physics/matter-js/MatterImage.js @@ -53,7 +53,7 @@ var Vector2 = require('../../math/Vector2'); * @extends Phaser.GameObjects.Components.Transform * @extends Phaser.GameObjects.Components.Visible * - * @param {Phaser.Physics.Matter.World} world - [description] + * @param {Phaser.Physics.Matter.World} world - A reference to the Matter.World instance that this body belongs to. * @param {number} x - The horizontal position of this Game Object in the world. * @param {number} y - The vertical position of this Game Object in the world. * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. @@ -91,7 +91,7 @@ var MatterImage = new Class({ this.setOrigin(); /** - * [description] + * A reference to the Matter.World instance that this body belongs to. * * @name Phaser.Physics.Matter.Image#world * @type {Phaser.Physics.Matter.World} @@ -100,7 +100,7 @@ var MatterImage = new Class({ this.world = world; /** - * [description] + * An internal temp vector used for velocity and force calculations. * * @name Phaser.Physics.Matter.Image#_tempVec2 * @type {Phaser.Math.Vector2} diff --git a/src/physics/matter-js/MatterSprite.js b/src/physics/matter-js/MatterSprite.js index 32f3e0df8..400e7fe3e 100644 --- a/src/physics/matter-js/MatterSprite.js +++ b/src/physics/matter-js/MatterSprite.js @@ -57,7 +57,7 @@ var Vector2 = require('../../math/Vector2'); * @extends Phaser.GameObjects.Components.Transform * @extends Phaser.GameObjects.Components.Visible * - * @param {Phaser.Physics.Matter.World} world - [description] + * @param {Phaser.Physics.Matter.World} world - A reference to the Matter.World instance that this body belongs to. * @param {number} x - The horizontal position of this Game Object in the world. * @param {number} y - The vertical position of this Game Object in the world. * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. @@ -97,7 +97,7 @@ var MatterSprite = new Class({ this.setOrigin(); /** - * [description] + * A reference to the Matter.World instance that this body belongs to. * * @name Phaser.Physics.Matter.Sprite#world * @type {Phaser.Physics.Matter.World} @@ -106,7 +106,7 @@ var MatterSprite = new Class({ this.world = world; /** - * [description] + * An internal temp vector used for velocity and force calculations. * * @name Phaser.Physics.Matter.Sprite#_tempVec2 * @type {Phaser.Math.Vector2} diff --git a/src/physics/matter-js/components/Transform.js b/src/physics/matter-js/components/Transform.js index a5acf3500..3d6ea82c8 100644 --- a/src/physics/matter-js/components/Transform.js +++ b/src/physics/matter-js/components/Transform.js @@ -144,7 +144,8 @@ var Transform = { }, /** - * Use `angle` to set or get rotation of the physics body associated to this GameObject. Unlike rotation, when using set the value can be in degrees, which will be converted to radians internally. + * Use `angle` to set or get rotation of the physics body associated to this GameObject. + * Unlike rotation, when using set the value can be in degrees, which will be converted to radians internally. * * @name Phaser.Physics.Matter.Components.Transform#angle * @type {number} @@ -165,7 +166,8 @@ var Transform = { }, /** - * Use `rotation` to set or get the rotation of the physics body associated with this GameObject. The value when set must be in radians. + * Use `rotation` to set or get the rotation of the physics body associated with this GameObject. + * The value when set must be in radians. * * @name Phaser.Physics.Matter.Components.Transform#rotation * @type {number} @@ -240,7 +242,9 @@ var Transform = { }, /** - * Sets the position of the physics body along x and y axes. Both the parameters to this function are optional and if not passed any they default to 0. + * Sets the position of the physics body along x and y axes. + * Both the parameters to this function are optional and if not passed any they default to 0. + * Velocity, angle, force etc. are unchanged. * * @method Phaser.Physics.Matter.Components.Transform#setPosition * @since 3.0.0 @@ -263,12 +267,13 @@ var Transform = { }, /** - * [description] + * Immediately sets the angle of the Body. + * Angular velocity, position, force etc. are unchanged. * * @method Phaser.Physics.Matter.Components.Transform#setRotation * @since 3.0.0 * - * @param {number} [radians=0] - [description] + * @param {number} [radians=0] - The angle of the body, in radians. * * @return {this} This Game Object. */ @@ -284,7 +289,8 @@ var Transform = { }, /** - * [description] + * Setting fixed rotation sets the Body inertia to Infinity, which stops it + * from being able to rotate when forces are applied to it. * * @method Phaser.Physics.Matter.Components.Transform#setFixedRotation * @since 3.0.0 @@ -299,12 +305,13 @@ var Transform = { }, /** - * [description] + * Immediately sets the angle of the Body. + * Angular velocity, position, force etc. are unchanged. * * @method Phaser.Physics.Matter.Components.Transform#setAngle * @since 3.0.0 * - * @param {number} [degrees=0] - [description] + * @param {number} [degrees=0] - The angle to set, in degrees. * * @return {this} This Game Object. */ From 3dfec6fbc390674b6a8c58f4ba1018796e5c2085 Mon Sep 17 00:00:00 2001 From: Chnapy Date: Thu, 2 Jan 2020 20:18:14 +0100 Subject: [PATCH 024/189] improve typings: BresenhamPoints function --- src/geom/line/BresenhamPoints.js | 4 +- types/phaser.d.ts | 26802 +++++++++++++++-------------- 2 files changed, 13751 insertions(+), 13055 deletions(-) diff --git a/src/geom/line/BresenhamPoints.js b/src/geom/line/BresenhamPoints.js index 9e02b0a71..6070f3182 100644 --- a/src/geom/line/BresenhamPoints.js +++ b/src/geom/line/BresenhamPoints.js @@ -14,9 +14,9 @@ * * @param {Phaser.Geom.Line} line - The line. * @param {integer} [stepRate=1] - The optional step rate for the points on the line. - * @param {array} [results] - An optional array to push the resulting coordinates into. + * @param {Phaser.Types.Math.Vector2Like[]} [results] - An optional array to push the resulting coordinates into. * - * @return {object[]} The array of coordinates on the line. + * @return {Phaser.Types.Math.Vector2Like[]} The array of coordinates on the line. */ var BresenhamPoints = function (line, stepRate, results) { diff --git a/types/phaser.d.ts b/types/phaser.d.ts index 39c37aae1..0eb28ba81 100644 --- a/types/phaser.d.ts +++ b/types/phaser.d.ts @@ -614,18 +614,6 @@ declare namespace Phaser { */ function Shuffle(items: G): G; - /** - * Smootherstep is a sigmoid-like interpolation and clamping function. - * - * The function depends on three parameters, the input x, the "left edge" and the "right edge", with the left edge being assumed smaller than the right edge. The function receives a real number x as an argument and returns 0 if x is less than or equal to the left edge, 1 if x is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial, between 0 and 1 otherwise. The slope of the smoothstep function is zero at both edges. This is convenient for creating a sequence of transitions using smoothstep to interpolate each segment as an alternative to using more sophisticated or expensive interpolation techniques. - * @param items An array of Game Objects. The contents of this array are updated by this Action. - * @param property The property of the Game Object to interpolate. - * @param min The minimum interpolation value. - * @param max The maximum interpolation value. - * @param inc Should the values be incremented? `true` or set (`false`) Default false. - */ - function SmootherStep(items: G, property: string, min: number, max: number, inc?: boolean): G; - /** * Smoothstep is a sigmoid-like interpolation and clamping function. * @@ -638,6 +626,18 @@ declare namespace Phaser { */ function SmoothStep(items: G, property: string, min: number, max: number, inc?: boolean): G; + /** + * Smootherstep is a sigmoid-like interpolation and clamping function. + * + * The function depends on three parameters, the input x, the "left edge" and the "right edge", with the left edge being assumed smaller than the right edge. The function receives a real number x as an argument and returns 0 if x is less than or equal to the left edge, 1 if x is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial, between 0 and 1 otherwise. The slope of the smoothstep function is zero at both edges. This is convenient for creating a sequence of transitions using smoothstep to interpolate each segment as an alternative to using more sophisticated or expensive interpolation techniques. + * @param items An array of Game Objects. The contents of this array are updated by this Action. + * @param property The property of the Game Object to interpolate. + * @param min The minimum interpolation value. + * @param max The maximum interpolation value. + * @param inc Should the values be incremented? `true` or set (`false`) Default false. + */ + function SmootherStep(items: G, property: string, min: number, max: number, inc?: boolean): G; + /** * Takes an array of Game Objects and then modifies their `property` so the value equals, or is incremented, by the * calculated spread value. @@ -4568,6 +4568,263 @@ declare namespace Phaser { */ function DebugHeader(game: Phaser.Game): void; + /** + * The core runner class that Phaser uses to handle the game loop. It can use either Request Animation Frame, + * or SetTimeout, based on browser support and config settings, to create a continuous loop within the browser. + * + * Each time the loop fires, `TimeStep.step` is called and this is then passed onto the core Game update loop, + * it is the core heartbeat of your game. It will fire as often as Request Animation Frame is capable of handling + * on the target device. + * + * Note that there are lots of situations where a browser will stop updating your game. Such as if the player + * switches tabs, or covers up the browser window with another application. In these cases, the 'heartbeat' + * of your game will pause, and only resume when focus is returned to it by the player. There is no way to avoid + * this situation, all you can do is use the visibility events the browser, and Phaser, provide to detect when + * it has happened and then gracefully recover. + */ + class TimeStep { + /** + * + * @param game A reference to the Phaser.Game instance that owns this Time Step. + */ + constructor(game: Phaser.Game, config: Phaser.Types.Core.FPSConfig); + + /** + * A reference to the Phaser.Game instance. + */ + readonly game: Phaser.Game; + + /** + * The Request Animation Frame DOM Event handler. + */ + readonly raf: Phaser.DOM.RequestAnimationFrame; + + /** + * A flag that is set once the TimeStep has started running and toggled when it stops. + */ + readonly started: boolean; + + /** + * A flag that is set once the TimeStep has started running and toggled when it stops. + * The difference between this value and `started` is that `running` is toggled when + * the TimeStep is sent to sleep, where-as `started` remains `true`, only changing if + * the TimeStep is actually stopped, not just paused. + */ + readonly running: boolean; + + /** + * The minimum fps rate you want the Time Step to run at. + */ + minFps: integer; + + /** + * The target fps rate for the Time Step to run at. + * + * Setting this value will not actually change the speed at which the browser runs, that is beyond + * the control of Phaser. Instead, it allows you to determine performance issues and if the Time Step + * is spiraling out of control. + */ + targetFps: integer; + + /** + * An exponential moving average of the frames per second. + */ + readonly actualFps: integer; + + /** + * The time at which the next fps rate update will take place. + * When an fps update happens, the `framesThisSecond` value is reset. + */ + readonly nextFpsUpdate: integer; + + /** + * The number of frames processed this second. + */ + readonly framesThisSecond: integer; + + /** + * A callback to be invoked each time the Time Step steps. + */ + callback: Phaser.Types.Core.TimeStepCallback; + + /** + * You can force the Time Step to use Set Timeout instead of Request Animation Frame by setting + * the `forceSetTimeOut` property to `true` in the Game Configuration object. It cannot be changed at run-time. + */ + readonly forceSetTimeOut: boolean; + + /** + * The time, calculated at the start of the current step, as smoothed by the delta value. + */ + time: number; + + /** + * The time at which the game started running. This value is adjusted if the game is then + * paused and resumes. + */ + startTime: number; + + /** + * The time, as returned by `performance.now` of the previous step. + */ + lastTime: number; + + /** + * The current frame the game is on. This counter is incremented once every game step, regardless of how much + * time has passed and is unaffected by delta smoothing. + */ + readonly frame: integer; + + /** + * Is the browser currently considered in focus by the Page Visibility API? + * This value is set in the `blur` method, which is called automatically by the Game instance. + */ + readonly inFocus: boolean; + + /** + * The delta time, in ms, since the last game step. This is a clamped and smoothed average value. + */ + delta: integer; + + /** + * Internal index of the delta history position. + */ + deltaIndex: integer; + + /** + * Internal array holding the previous delta values, used for delta smoothing. + */ + deltaHistory: integer[]; + + /** + * The maximum number of delta values that are retained in order to calculate a smoothed moving average. + * + * This can be changed in the Game Config via the `fps.deltaHistory` property. The default is 10. + */ + deltaSmoothingMax: integer; + + /** + * The number of frames that the cooldown is set to after the browser panics over the FPS rate, usually + * as a result of switching tabs and regaining focus. + * + * This can be changed in the Game Config via the `fps.panicMax` property. The default is 120. + */ + panicMax: integer; + + /** + * The actual elapsed time in ms between one update and the next. + * + * Unlike with `delta`, no smoothing, capping, or averaging is applied to this value. + * So please be careful when using this value in math calculations. + */ + rawDelta: number; + + /** + * The time, as returned by `performance.now` at the very start of the current step. + * This can differ from the `time` value in that it isn't calculated based on the delta value. + */ + now: number; + + /** + * Apply smoothing to the delta value used within Phasers internal calculations? + * + * This can be changed in the Game Config via the `fps.smoothStep` property. The default is `true`. + * + * Smoothing helps settle down the delta values after browser tab switches, or other situations + * which could cause significant delta spikes or dips. By default it has been enabled in Phaser 3 + * since the first version, but is now exposed under this property (and the corresponding game config + * `smoothStep` value), to allow you to easily disable it, should you require. + */ + smoothStep: boolean; + + /** + * Called by the Game instance when the DOM window.onBlur event triggers. + */ + blur(): void; + + /** + * Called by the Game instance when the DOM window.onFocus event triggers. + */ + focus(): void; + + /** + * Called when the visibility API says the game is 'hidden' (tab switch out of view, etc) + */ + pause(): void; + + /** + * Called when the visibility API says the game is 'visible' again (tab switch back into view, etc) + */ + resume(): void; + + /** + * Resets the time, lastTime, fps averages and delta history. + * Called automatically when a browser sleeps them resumes. + */ + resetDelta(): void; + + /** + * Starts the Time Step running, if it is not already doing so. + * Called automatically by the Game Boot process. + * @param callback The callback to be invoked each time the Time Step steps. + */ + start(callback: Phaser.Types.Core.TimeStepCallback): void; + + /** + * The main step method. This is called each time the browser updates, either by Request Animation Frame, + * or by Set Timeout. It is responsible for calculating the delta values, frame totals, cool down history and more. + * You generally should never call this method directly. + */ + step(): void; + + /** + * Manually calls `TimeStep.step`. + */ + tick(): void; + + /** + * Sends the TimeStep to sleep, stopping Request Animation Frame (or SetTimeout) and toggling the `running` flag to false. + */ + sleep(): void; + + /** + * Wakes-up the TimeStep, restarting Request Animation Frame (or SetTimeout) and toggling the `running` flag to true. + * The `seamless` argument controls if the wake-up should adjust the start time or not. + * @param seamless Adjust the startTime based on the lastTime values. Default false. + */ + wake(seamless?: boolean): void; + + /** + * Gets the duration which the game has been running, in seconds. + */ + getDuration(): number; + + /** + * Gets the duration which the game has been running, in ms. + */ + getDurationMS(): number; + + /** + * Stops the TimeStep running. + */ + stop(): this; + + /** + * Destroys the TimeStep. This will stop Request Animation Frame, stop the step, clear the callbacks and null + * any objects. + */ + destroy(): void; + + } + + /** + * The Visibility Handler is responsible for listening out for document level visibility change events. + * This includes `visibilitychange` if the browser supports it, and blur and focus events. It then uses + * the provided Event Emitter and fires the related events. + * @param game The Game instance this Visibility Handler is working on. + */ + function VisibilityHandler(game: Phaser.Game): void; + namespace Events { /** * The Game Blur Event. @@ -4710,239 +4967,6 @@ declare namespace Phaser { } - /** - * [description] - */ - class TimeStep { - /** - * - * @param game A reference to the Phaser.Game instance that owns this Time Step. - */ - constructor(game: Phaser.Game, config: Phaser.Types.Core.FPSConfig); - - /** - * A reference to the Phaser.Game instance. - */ - readonly game: Phaser.Game; - - /** - * [description] - */ - readonly raf: Phaser.DOM.RequestAnimationFrame; - - /** - * A flag that is set once the TimeStep has started running and toggled when it stops. - */ - readonly started: boolean; - - /** - * A flag that is set once the TimeStep has started running and toggled when it stops. - * The difference between this value and `started` is that `running` is toggled when - * the TimeStep is sent to sleep, where-as `started` remains `true`, only changing if - * the TimeStep is actually stopped, not just paused. - */ - readonly running: boolean; - - /** - * The minimum fps rate you want the Time Step to run at. - */ - minFps: integer; - - /** - * The target fps rate for the Time Step to run at. - * - * Setting this value will not actually change the speed at which the browser runs, that is beyond - * the control of Phaser. Instead, it allows you to determine performance issues and if the Time Step - * is spiraling out of control. - */ - targetFps: integer; - - /** - * An exponential moving average of the frames per second. - */ - readonly actualFps: integer; - - /** - * [description] - */ - readonly nextFpsUpdate: integer; - - /** - * The number of frames processed this second. - */ - readonly framesThisSecond: integer; - - /** - * A callback to be invoked each time the Time Step steps. - */ - callback: Phaser.Types.Core.TimeStepCallback; - - /** - * You can force the Time Step to use Set Timeout instead of Request Animation Frame by setting - * the `forceSetTimeOut` property to `true` in the Game Configuration object. It cannot be changed at run-time. - */ - readonly forceSetTimeOut: boolean; - - /** - * The time, calculated at the start of the current step, as smoothed by the delta value. - */ - time: number; - - /** - * The time at which the game started running. This value is adjusted if the game is then - * paused and resumes. - */ - startTime: number; - - /** - * The time, as returned by `performance.now` of the previous step. - */ - lastTime: number; - - /** - * The current frame the game is on. This counter is incremented once every game step, regardless of how much - * time has passed and is unaffected by delta smoothing. - */ - readonly frame: integer; - - /** - * Is the browser currently considered in focus by the Page Visibility API? - * This value is set in the `blur` method, which is called automatically by the Game instance. - */ - readonly inFocus: boolean; - - /** - * The delta time, in ms, since the last game step. This is a clamped and smoothed average value. - */ - delta: integer; - - /** - * Internal index of the delta history position. - */ - deltaIndex: integer; - - /** - * Internal array holding the previous delta values, used for delta smoothing. - */ - deltaHistory: integer[]; - - /** - * The maximum number of delta values that are retained in order to calculate a smoothed moving average. - * - * This can be changed in the Game Config via the `fps.deltaHistory` property. The default is 10. - */ - deltaSmoothingMax: integer; - - /** - * The number of frames that the cooldown is set to after the browser panics over the FPS rate, usually - * as a result of switching tabs and regaining focus. - * - * This can be changed in the Game Config via the `fps.panicMax` property. The default is 120. - */ - panicMax: integer; - - /** - * The actual elapsed time in ms between one update and the next. - * - * Unlike with `delta`, no smoothing, capping, or averaging is applied to this value. - * So please be careful when using this value in math calculations. - */ - rawDelta: number; - - /** - * The time, as returned by `performance.now` at the very start of the current step. - * This can differ from the `time` value in that it isn't calculated based on the delta value. - */ - now: number; - - /** - * Called by the Game instance when the DOM window.onBlur event triggers. - */ - blur(): void; - - /** - * Called by the Game instance when the DOM window.onFocus event triggers. - */ - focus(): void; - - /** - * Called when the visibility API says the game is 'hidden' (tab switch out of view, etc) - */ - pause(): void; - - /** - * Called when the visibility API says the game is 'visible' again (tab switch back into view, etc) - */ - resume(): void; - - /** - * Resets the time, lastTime, fps averages and delta history. - * Called automatically when a browser sleeps them resumes. - */ - resetDelta(): void; - - /** - * Starts the Time Step running, if it is not already doing so. - * Called automatically by the Game Boot process. - * @param callback The callback to be invoked each time the Time Step steps. - */ - start(callback: Phaser.Types.Core.TimeStepCallback): void; - - /** - * The main step method. This is called each time the browser updates, either by Request Animation Frame, - * or by Set Timeout. It is responsible for calculating the delta values, frame totals, cool down history and more. - * You generally should never call this method directly. - */ - step(): void; - - /** - * Manually calls `TimeStep.step`. - */ - tick(): void; - - /** - * Sends the TimeStep to sleep, stopping Request Animation Frame (or SetTimeout) and toggling the `running` flag to false. - */ - sleep(): void; - - /** - * Wakes-up the TimeStep, restarting Request Animation Frame (or SetTimeout) and toggling the `running` flag to true. - * The `seamless` argument controls if the wake-up should adjust the start time or not. - * @param seamless Adjust the startTime based on the lastTime values. Default false. - */ - wake(seamless?: boolean): void; - - /** - * Gets the duration which the game has been running, in seconds. - */ - getDuration(): number; - - /** - * Gets the duration which the game has been running, in ms. - */ - getDurationMS(): number; - - /** - * Stops the TimeStep running. - */ - stop(): Phaser.Core.TimeStep; - - /** - * Destroys the TimeStep. This will stop Request Animation Frame, stop the step, clear the callbacks and null - * any objects. - */ - destroy(): void; - - } - - /** - * The Visibility Handler is responsible for listening out for document level visibility change events. - * This includes `visibilitychange` if the browser supports it, and blur and focus events. It then uses - * the provided Event Emitter and fires the related events. - * @param game The Game instance this Visibility Handler is working on. - */ - function VisibilityHandler(game: Phaser.Game): void; - } namespace Create { @@ -5164,9 +5188,11 @@ declare namespace Phaser { /** * [description] - * @param divisions [description] + * @param divisions The number of evenly spaced points from the curve to return. If falsy, step param will be used to calculate the number of points. + * @param step Step between points. Used to calculate the number of points to return when divisions is falsy. Ignored if divisions is positive. + * @param out An optional array to store the points in. */ - getSpacedPoints(divisions?: integer): Phaser.Math.Vector2[]; + getSpacedPoints(divisions?: integer, step?: number, out?: any[] | Phaser.Math.Vector2[]): Phaser.Math.Vector2[]; /** * [description] @@ -5425,6 +5451,14 @@ declare namespace Phaser { */ getTangent(): O; + /** + * [description] + * @param u [description] + * @param distance [description] + * @param divisions [description] + */ + getUtoTmapping(u: number, distance: integer, divisions?: integer): number; + /** * Draws this curve on the given Graphics object. * @@ -5447,6 +5481,132 @@ declare namespace Phaser { } + /** + * [description] + */ + class QuadraticBezier extends Phaser.Curves.Curve { + /** + * + * @param p0 Start point, or an array of point pairs. + * @param p1 Control Point 1. + * @param p2 Control Point 2. + */ + constructor(p0: Phaser.Math.Vector2 | number[], p1: Phaser.Math.Vector2, p2: Phaser.Math.Vector2); + + /** + * [description] + */ + p0: Phaser.Math.Vector2; + + /** + * [description] + */ + p1: Phaser.Math.Vector2; + + /** + * [description] + */ + p2: Phaser.Math.Vector2; + + /** + * Gets the starting point on the curve. + * @param out A Vector2 object to store the result in. If not given will be created. + */ + getStartPoint(out?: O): O; + + /** + * [description] + * @param divisions [description] + */ + getResolution(divisions: number): number; + + /** + * Get point at relative position in curve according to length. + * @param t The position along the curve to return. Where 0 is the start and 1 is the end. + * @param out A Vector2 object to store the result in. If not given will be created. + */ + getPoint(t: number, out?: O): O; + + /** + * [description] + * @param graphics `Graphics` object to draw onto. + * @param pointsTotal Number of points to be used for drawing the curve. Higher numbers result in smoother curve but require more processing. Default 32. + */ + draw(graphics: G, pointsTotal?: integer): G; + + /** + * Converts the curve into a JSON compatible object. + */ + toJSON(): Phaser.Types.Curves.JSONCurve; + + /** + * Creates a curve from a JSON object, e. g. created by `toJSON`. + * @param data The JSON object containing this curve data. + */ + static fromJSON(data: Phaser.Types.Curves.JSONCurve): Phaser.Curves.QuadraticBezier; + + } + + /** + * [description] + */ + class Spline extends Phaser.Curves.Curve { + /** + * + * @param points [description] + */ + constructor(points?: Phaser.Math.Vector2[]); + + /** + * [description] + */ + points: Phaser.Math.Vector2[]; + + /** + * [description] + * @param points [description] + */ + addPoints(points: Phaser.Math.Vector2[] | number[] | number[][]): Phaser.Curves.Spline; + + /** + * [description] + * @param x [description] + * @param y [description] + */ + addPoint(x: number, y: number): Phaser.Math.Vector2; + + /** + * Gets the starting point on the curve. + * @param out A Vector2 object to store the result in. If not given will be created. + */ + getStartPoint(out?: O): O; + + /** + * [description] + * @param divisions [description] + */ + getResolution(divisions: number): number; + + /** + * Get point at relative position in curve according to length. + * @param t The position along the curve to return. Where 0 is the start and 1 is the end. + * @param out A Vector2 object to store the result in. If not given will be created. + */ + getPoint(t: number, out?: O): O; + + /** + * [description] + */ + toJSON(): Phaser.Types.Curves.JSONCurve; + + /** + * [description] + * @param data The JSON object containing this curve data. + */ + static fromJSON(data: Phaser.Types.Curves.JSONCurve): Phaser.Curves.Spline; + + } + /** * A MoveTo Curve is a very simple curve consisting of only a single point. Its intended use is to move the ending point in a Path. */ @@ -5720,132 +5880,6 @@ declare namespace Phaser { } - /** - * [description] - */ - class QuadraticBezier extends Phaser.Curves.Curve { - /** - * - * @param p0 Start point, or an array of point pairs. - * @param p1 Control Point 1. - * @param p2 Control Point 2. - */ - constructor(p0: Phaser.Math.Vector2 | number[], p1: Phaser.Math.Vector2, p2: Phaser.Math.Vector2); - - /** - * [description] - */ - p0: Phaser.Math.Vector2; - - /** - * [description] - */ - p1: Phaser.Math.Vector2; - - /** - * [description] - */ - p2: Phaser.Math.Vector2; - - /** - * Gets the starting point on the curve. - * @param out A Vector2 object to store the result in. If not given will be created. - */ - getStartPoint(out?: O): O; - - /** - * [description] - * @param divisions [description] - */ - getResolution(divisions: number): number; - - /** - * Get point at relative position in curve according to length. - * @param t The position along the curve to return. Where 0 is the start and 1 is the end. - * @param out A Vector2 object to store the result in. If not given will be created. - */ - getPoint(t: number, out?: O): O; - - /** - * [description] - * @param graphics `Graphics` object to draw onto. - * @param pointsTotal Number of points to be used for drawing the curve. Higher numbers result in smoother curve but require more processing. Default 32. - */ - draw(graphics: G, pointsTotal?: integer): G; - - /** - * Converts the curve into a JSON compatible object. - */ - toJSON(): Phaser.Types.Curves.JSONCurve; - - /** - * Creates a curve from a JSON object, e. g. created by `toJSON`. - * @param data The JSON object containing this curve data. - */ - static fromJSON(data: Phaser.Types.Curves.JSONCurve): Phaser.Curves.QuadraticBezier; - - } - - /** - * [description] - */ - class Spline extends Phaser.Curves.Curve { - /** - * - * @param points [description] - */ - constructor(points?: Phaser.Math.Vector2[]); - - /** - * [description] - */ - points: Phaser.Math.Vector2[]; - - /** - * [description] - * @param points [description] - */ - addPoints(points: Phaser.Math.Vector2[] | number[] | number[][]): Phaser.Curves.Spline; - - /** - * [description] - * @param x [description] - * @param y [description] - */ - addPoint(x: number, y: number): Phaser.Math.Vector2; - - /** - * Gets the starting point on the curve. - * @param out A Vector2 object to store the result in. If not given will be created. - */ - getStartPoint(out?: O): O; - - /** - * [description] - * @param divisions [description] - */ - getResolution(divisions: number): number; - - /** - * Get point at relative position in curve according to length. - * @param t The position along the curve to return. Where 0 is the start and 1 is the end. - * @param out A Vector2 object to store the result in. If not given will be created. - */ - getPoint(t: number, out?: O): O; - - /** - * [description] - */ - toJSON(): Phaser.Types.Curves.JSONCurve; - - /** - * [description] - * @param data The JSON object containing this curve data. - */ - static fromJSON(data: Phaser.Types.Curves.JSONCurve): Phaser.Curves.Spline; - - } - } namespace Data { @@ -7300,16 +7334,6 @@ declare namespace Phaser { */ static GetColor32(red: integer, green: integer, blue: integer, alpha: integer): number; - /** - * Converts a hex string into a Phaser Color object. - * - * The hex string can supplied as `'#0033ff'` or the short-hand format of `'#03f'`; it can begin with an optional "#" or "0x", or be unprefixed. - * - * An alpha channel is _not_ supported. - * @param hex The hex color value to convert, such as `#0033ff` or the short-hand format: `#03f`. - */ - static HexStringToColor(hex: string): Phaser.Display.Color; - /** * Converts HSL (hue, saturation and lightness) values to a Phaser Color object. * @param h The hue value in the range 0 to 1. @@ -7337,6 +7361,16 @@ declare namespace Phaser { */ static HSVToRGB(h: number, s: number, v: number, out?: Phaser.Types.Display.ColorObject | Phaser.Display.Color): Phaser.Types.Display.ColorObject | Phaser.Display.Color; + /** + * Converts a hex string into a Phaser Color object. + * + * The hex string can supplied as `'#0033ff'` or the short-hand format of `'#03f'`; it can begin with an optional "#" or "0x", or be unprefixed. + * + * An alpha channel is _not_ supported. + * @param hex The hex color value to convert, such as `#0033ff` or the short-hand format: `#03f`. + */ + static HexStringToColor(hex: string): Phaser.Display.Color; + /** * Converts a hue to an RGB color. * Based on code by Michael Jackson (https://github.com/mjijackson) @@ -7363,14 +7397,6 @@ declare namespace Phaser { */ static ObjectToColor(input: Phaser.Types.Display.InputColorObject): Phaser.Display.Color; - /** - * Creates a new Color object where the r, g, and b values have been set to random values - * based on the given min max values. - * @param min The minimum value to set the random range from (between 0 and 255) Default 0. - * @param max The maximum value to set the random range from (between 0 and 255) Default 255. - */ - static RandomRGB(min?: integer, max?: integer): Phaser.Display.Color; - /** * Converts a CSS 'web' string into a Phaser Color object. * @@ -7401,6 +7427,14 @@ declare namespace Phaser { */ static RGBToString(r: integer, g: integer, b: integer, a?: integer, prefix?: string): string; + /** + * Creates a new Color object where the r, g, and b values have been set to random values + * based on the given min max values. + * @param min The minimum value to set the random range from (between 0 and 255) Default 0. + * @param max The maximum value to set the random range from (between 0 and 255) Default 255. + */ + static RandomRGB(min?: integer, max?: integer): Phaser.Display.Color; + /** * Converts the given source color value into an instance of a Color class. * The value can be either a string, prefixed with `rgb` or a hex string, a number or an Object. @@ -7922,6 +7956,1472 @@ declare namespace Phaser { } namespace GameObjects { + /** + * Builds a Game Object using the provided configuration object. + * @param scene A reference to the Scene. + * @param gameObject The initial GameObject. + * @param config The config to build the GameObject with. + */ + function BuildGameObject(scene: Phaser.Scene, gameObject: Phaser.GameObjects.GameObject, config: Phaser.Types.GameObjects.GameObjectConfig): Phaser.GameObjects.GameObject; + + /** + * Adds an Animation component to a Sprite and populates it based on the given config. + * @param sprite The sprite to add an Animation component to. + * @param config The animation config. + */ + function BuildGameObjectAnimation(sprite: Phaser.GameObjects.Sprite, config: object): Phaser.GameObjects.Sprite; + + /** + * The Display List plugin. + * + * Display Lists belong to a Scene and maintain the list of Game Objects to render every frame. + * + * Some of these Game Objects may also be part of the Scene's [Update List]{@link Phaser.GameObjects.UpdateList}, for updating. + */ + class DisplayList extends Phaser.Structs.List { + /** + * + * @param scene The Scene that this Display List belongs to. + */ + constructor(scene: Phaser.Scene); + + /** + * The flag the determines whether Game Objects should be sorted when `depthSort()` is called. + */ + sortChildrenFlag: boolean; + + /** + * The Scene that this Display List belongs to. + */ + scene: Phaser.Scene; + + /** + * The Scene's Systems. + */ + systems: Phaser.Scenes.Systems; + + /** + * Force a sort of the display list on the next call to depthSort. + */ + queueDepthSort(): void; + + /** + * Immediately sorts the display list if the flag is set. + */ + depthSort(): void; + + /** + * Compare the depth of two Game Objects. + * @param childA The first Game Object. + * @param childB The second Game Object. + */ + sortByDepth(childA: Phaser.GameObjects.GameObject, childB: Phaser.GameObjects.GameObject): integer; + + /** + * Returns an array which contains all objects currently on the Display List. + * This is a reference to the main list array, not a copy of it, so be careful not to modify it. + */ + getChildren(): Phaser.GameObjects.GameObject[]; + + } + + /** + * The base class that all Game Objects extend. + * You don't create GameObjects directly and they cannot be added to the display list. + * Instead, use them as the base for your own custom classes. + */ + class GameObject extends Phaser.Events.EventEmitter { + /** + * + * @param scene The Scene to which this Game Object belongs. + * @param type A textual representation of the type of Game Object, i.e. `sprite`. + */ + constructor(scene: Phaser.Scene, type: string); + + /** + * The Scene to which this Game Object belongs. + * Game Objects can only belong to one Scene. + */ + protected scene: Phaser.Scene; + + /** + * A textual representation of this Game Object, i.e. `sprite`. + * Used internally by Phaser but is available for your own custom classes to populate. + */ + type: string; + + /** + * The current state of this Game Object. + * + * Phaser itself will never modify this value, although plugins may do so. + * + * Use this property to track the state of a Game Object during its lifetime. For example, it could change from + * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant + * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons. + * If you need to store complex data about your Game Object, look at using the Data Component instead. + */ + state: integer | string; + + /** + * The parent Container of this Game Object, if it has one. + */ + parentContainer: Phaser.GameObjects.Container; + + /** + * The name of this Game Object. + * Empty by default and never populated by Phaser, this is left for developers to use. + */ + name: string; + + /** + * The active state of this Game Object. + * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it. + * An active object is one which is having its logic and internal systems updated. + */ + active: boolean; + + /** + * The Tab Index of the Game Object. + * Reserved for future use by plugins and the Input Manager. + */ + tabIndex: integer; + + /** + * A Data Manager. + * It allows you to store, query and get key/value paired information specific to this Game Object. + * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`. + */ + data: Phaser.Data.DataManager; + + /** + * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not. + * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively. + * If those components are not used by your custom class then you can use this bitmask as you wish. + */ + renderFlags: integer; + + /** + * A bitmask that controls if this Game Object is drawn by a Camera or not. + * Not usually set directly, instead call `Camera.ignore`, however you can + * set this property directly using the Camera.id property: + */ + cameraFilter: number; + + /** + * If this Game Object is enabled for input then this property will contain an InteractiveObject instance. + * Not usually set directly. Instead call `GameObject.setInteractive()`. + */ + input: Phaser.Types.Input.InteractiveObject; + + /** + * If this Game Object is enabled for physics then this property will contain a reference to a Physics Body. + */ + body: object | Phaser.Physics.Arcade.Body | Phaser.Physics.Impact.Body; + + /** + * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`. + * This includes calls that may come from a Group, Container or the Scene itself. + * While it allows you to persist a Game Object across Scenes, please understand you are entirely + * responsible for managing references to and from this Game Object. + */ + ignoreDestroy: boolean; + + /** + * Sets the `active` property of this Game Object and returns this Game Object for further chaining. + * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList. + * @param value True if this Game Object should be set as active, false if not. + */ + setActive(value: boolean): this; + + /** + * Sets the `name` property of this Game Object and returns this Game Object for further chaining. + * The `name` property is not populated by Phaser and is presented for your own use. + * @param value The name to be given to this Game Object. + */ + setName(value: string): this; + + /** + * Sets the current state of this Game Object. + * + * Phaser itself will never modify the State of a Game Object, although plugins may do so. + * + * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'. + * The state value should typically be an integer (ideally mapped to a constant + * in your game code), but could also be a string. It is recommended to keep it light and simple. + * If you need to store complex data about your Game Object, look at using the Data Component instead. + * @param value The state of the Game Object. + */ + setState(value: integer | string): this; + + /** + * Adds a Data Manager component to this Game Object. + */ + setDataEnabled(): this; + + /** + * Allows you to store a key value pair within this Game Objects Data Manager. + * + * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled + * before setting the value. + * + * If the key doesn't already exist in the Data Manager then it is created. + * + * ```javascript + * sprite.setData('name', 'Red Gem Stone'); + * ``` + * + * You can also pass in an object of key value pairs as the first argument: + * + * ```javascript + * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 }); + * ``` + * + * To get a value back again you can call `getData`: + * + * ```javascript + * sprite.getData('gold'); + * ``` + * + * Or you can access the value directly via the `values` property, where it works like any other variable: + * + * ```javascript + * sprite.data.values.gold += 50; + * ``` + * + * When the value is first set, a `setdata` event is emitted from this Game Object. + * + * If the key already exists, a `changedata` event is emitted instead, along an event named after the key. + * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`. + * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter. + * + * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings. + * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager. + * @param key The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored. + * @param data The value to set for the given key. If an object is provided as the key this argument is ignored. + */ + setData(key: string | object, data?: any): this; + + /** + * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist. + * + * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either: + * + * ```javascript + * sprite.getData('gold'); + * ``` + * + * Or access the value directly: + * + * ```javascript + * sprite.data.values.gold; + * ``` + * + * You can also pass in an array of keys, in which case an array of values will be returned: + * + * ```javascript + * sprite.getData([ 'gold', 'armor', 'health' ]); + * ``` + * + * This approach is useful for destructuring arrays in ES6. + * @param key The key of the value to retrieve, or an array of keys. + */ + getData(key: string | string[]): any; + + /** + * Pass this Game Object to the Input Manager to enable it for Input. + * + * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area + * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced + * input detection. + * + * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If + * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific + * shape for it to use. + * + * You can also provide an Input Configuration Object as the only argument to this method. + * @param shape Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used. + * @param callback A callback to be invoked when the Game Object is interacted with. If you provide a shape you must also provide a callback. + * @param dropZone Should this Game Object be treated as a drop zone target? Default false. + */ + setInteractive(shape?: Phaser.Types.Input.InputConfiguration | any, callback?: Phaser.Types.Input.HitAreaCallback, dropZone?: boolean): this; + + /** + * If this Game Object has previously been enabled for input, this will disable it. + * + * An object that is disabled for input stops processing or being considered for + * input events, but can be turned back on again at any time by simply calling + * `setInteractive()` with no arguments provided. + * + * If want to completely remove interaction from this Game Object then use `removeInteractive` instead. + */ + disableInteractive(): this; + + /** + * If this Game Object has previously been enabled for input, this will queue it + * for removal, causing it to no longer be interactive. The removal happens on + * the next game step, it is not immediate. + * + * The Interactive Object that was assigned to this Game Object will be destroyed, + * removed from the Input Manager and cleared from this Game Object. + * + * If you wish to re-enable this Game Object at a later date you will need to + * re-create its InteractiveObject by calling `setInteractive` again. + * + * If you wish to only temporarily stop an object from receiving input then use + * `disableInteractive` instead, as that toggles the interactive state, where-as + * this erases it completely. + * + * If you wish to resize a hit area, don't remove and then set it as being + * interactive. Instead, access the hitarea object directly and resize the shape + * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the + * shape is a Rectangle, which it is by default.) + */ + removeInteractive(): this; + + /** + * To be overridden by custom GameObjects. Allows base objects to be used in a Pool. + * @param args args + */ + update(...args: any[]): void; + + /** + * Returns a JSON representation of the Game Object. + */ + toJSON(): Phaser.Types.GameObjects.JSONGameObject; + + /** + * Compares the renderMask with the renderFlags to see if this Game Object will render or not. + * Also checks the Game Object against the given Cameras exclusion list. + * @param camera The Camera to check against this Game Object. + */ + willRender(camera: Phaser.Cameras.Scene2D.Camera): boolean; + + /** + * Returns an array containing the display list index of either this Game Object, or if it has one, + * its parent Container. It then iterates up through all of the parent containers until it hits the + * root of the display list (which is index 0 in the returned array). + * + * Used internally by the InputPlugin but also useful if you wish to find out the display depth of + * this Game Object and all of its ancestors. + */ + getIndexList(): integer[]; + + /** + * Destroys this Game Object removing it from the Display List and Update List and + * severing all ties to parent resources. + * + * Also removes itself from the Input Manager and Physics Manager if previously enabled. + * + * Use this to remove a Game Object from your game if you don't ever plan to use it again. + * As long as no reference to it exists within your own code it should become free for + * garbage collection by the browser. + * + * If you just want to temporarily disable an object then look at using the + * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected. + * @param fromScene Is this Game Object being destroyed as the result of a Scene shutdown? Default false. + */ + destroy(fromScene?: boolean): void; + + /** + * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not. + */ + static readonly RENDER_MASK: integer; + + } + + /** + * The Game Object Creator is a Scene plugin that allows you to quickly create many common + * types of Game Objects and return them. Unlike the Game Object Factory, they are not automatically + * added to the Scene. + * + * Game Objects directly register themselves with the Creator and inject their own creation + * methods into the class. + */ + class GameObjectCreator { + /** + * + * @param scene The Scene to which this Game Object Factory belongs. + */ + constructor(scene: Phaser.Scene); + + /** + * The Scene to which this Game Object Creator belongs. + */ + protected scene: Phaser.Scene; + + /** + * A reference to the Scene.Systems. + */ + protected systems: Phaser.Scenes.Systems; + + /** + * A reference to the Scene Display List. + */ + protected displayList: Phaser.GameObjects.DisplayList; + + /** + * A reference to the Scene Update List. + */ + protected updateList: Phaser.GameObjects.UpdateList; + + /** + * Creates a new Dynamic Bitmap Text Game Object and returns it. + * + * Note: This method will only be available if the Dynamic Bitmap Text Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + dynamicBitmapText(config: Phaser.Types.GameObjects.BitmapText.BitmapTextConfig, addToScene?: boolean): Phaser.GameObjects.DynamicBitmapText; + + /** + * Creates a new Bitmap Text Game Object and returns it. + * + * Note: This method will only be available if the Bitmap Text Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + bitmapText(config: Phaser.Types.GameObjects.BitmapText.BitmapTextConfig, addToScene?: boolean): Phaser.GameObjects.BitmapText; + + /** + * Creates a new Blitter Game Object and returns it. + * + * Note: This method will only be available if the Blitter Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + blitter(config: object, addToScene?: boolean): Phaser.GameObjects.Blitter; + + /** + * Creates a new Container Game Object and returns it. + * + * Note: This method will only be available if the Container Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + container(config: object, addToScene?: boolean): Phaser.GameObjects.Container; + + /** + * Creates a new Graphics Game Object and returns it. + * + * Note: This method will only be available if the Graphics Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + graphics(config: object, addToScene?: boolean): Phaser.GameObjects.Graphics; + + /** + * Creates a new Group Game Object and returns it. + * + * Note: This method will only be available if the Group Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + */ + group(config: Phaser.Types.GameObjects.Group.GroupConfig | Phaser.Types.GameObjects.Group.GroupCreateConfig): Phaser.GameObjects.Group; + + /** + * Creates a new Image Game Object and returns it. + * + * Note: This method will only be available if the Image Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + image(config: object, addToScene?: boolean): Phaser.GameObjects.Image; + + /** + * Creates a new Mesh Game Object and returns it. + * + * Note: This method will only be available if the Mesh Game Object and WebGL support have been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + mesh(config: object, addToScene?: boolean): Phaser.GameObjects.Mesh; + + /** + * Creates a new Particle Emitter Manager Game Object and returns it. + * + * Note: This method will only be available if the Particles Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + particles(config: object, addToScene?: boolean): Phaser.GameObjects.Particles.ParticleEmitterManager; + + /** + * Creates a new Quad Game Object and returns it. + * + * Note: This method will only be available if the Quad Game Object and WebGL support have been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + quad(config: object, addToScene?: boolean): Phaser.GameObjects.Quad; + + /** + * Creates a new Render Texture Game Object and returns it. + * + * Note: This method will only be available if the Render Texture Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + renderTexture(config: Phaser.Types.GameObjects.RenderTexture.RenderTextureConfig, addToScene?: boolean): Phaser.GameObjects.RenderTexture; + + /** + * Creates a new Shader Game Object and returns it. + * + * Note: This method will only be available if the Shader Game Object and WebGL support have been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + shader(config: object, addToScene?: boolean): Phaser.GameObjects.Shader; + + /** + * Creates a new Sprite Game Object and returns it. + * + * Note: This method will only be available if the Sprite Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + sprite(config: Phaser.Types.GameObjects.Sprite.SpriteConfig, addToScene?: boolean): Phaser.GameObjects.Sprite; + + /** + * Creates a new Text Game Object and returns it. + * + * Note: This method will only be available if the Text Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + text(config: object, addToScene?: boolean): Phaser.GameObjects.Text; + + /** + * Creates a new TileSprite Game Object and returns it. + * + * Note: This method will only be available if the TileSprite Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + tileSprite(config: Phaser.Types.GameObjects.TileSprite.TileSpriteConfig, addToScene?: boolean): Phaser.GameObjects.TileSprite; + + /** + * Creates a new Video Game Object and returns it. + * + * Note: This method will only be available if the Video Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + video(config: object, addToScene?: boolean): Phaser.GameObjects.Video; + + /** + * Creates a new Zone Game Object and returns it. + * + * Note: This method will only be available if the Zone Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + */ + zone(config: object): Phaser.GameObjects.Zone; + + /** + * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. + * When loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing + * from a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the map + * data. For an empty map, you should specify tileWidth, tileHeight, width & height. + * @param config The config options for the Tilemap. + */ + tilemap(config?: Phaser.Types.Tilemaps.TilemapConfig): Phaser.Tilemaps.Tilemap; + + /** + * Creates a new Tween object and returns it. + * + * Note: This method will only be available if Tweens have been built into Phaser. + * @param config The Tween configuration. + */ + tween(config: Phaser.Types.Tweens.TweenBuilderConfig | object): Phaser.Tweens.Tween; + + } + + /** + * The Game Object Factory is a Scene plugin that allows you to quickly create many common + * types of Game Objects and have them automatically registered with the Scene. + * + * Game Objects directly register themselves with the Factory and inject their own creation + * methods into the class. + */ + class GameObjectFactory { + /** + * + * @param scene The Scene to which this Game Object Factory belongs. + */ + constructor(scene: Phaser.Scene); + + /** + * Creates a new Path Object. + * @param x The horizontal position of this Path. + * @param y The vertical position of this Path. + */ + path(x: number, y: number): Phaser.Curves.Path; + + /** + * The Scene to which this Game Object Factory belongs. + */ + protected scene: Phaser.Scene; + + /** + * A reference to the Scene.Systems. + */ + protected systems: Phaser.Scenes.Systems; + + /** + * A reference to the Scene Display List. + */ + protected displayList: Phaser.GameObjects.DisplayList; + + /** + * A reference to the Scene Update List. + */ + protected updateList: Phaser.GameObjects.UpdateList; + + /** + * Adds an existing Game Object to this Scene. + * + * If the Game Object renders, it will be added to the Display List. + * If it has a `preUpdate` method, it will be added to the Update List. + * @param child The child to be added to this Scene. + */ + existing(child: Phaser.GameObjects.GameObject): Phaser.GameObjects.GameObject; + + /** + * Static method called directly by the Game Object factory functions. + * With this method you can register a custom GameObject factory in the GameObjectFactory, + * providing a name (`factoryType`) and the constructor (`factoryFunction`) in order + * to be called when you call to Phaser.Scene.add[ factoryType ] method. + * @param factoryType The key of the factory that you will use to call to Phaser.Scene.add[ factoryType ] method. + * @param factoryFunction The constructor function to be called when you invoke to the Phaser.Scene.add method. + */ + static register(factoryType: string, factoryFunction: Function): void; + + /** + * Static method called directly by the Game Object factory functions. + * With this method you can remove a custom GameObject factory registered in the GameObjectFactory, + * providing a its `factoryType`. + * @param factoryType The key of the factory that you want to remove from the GameObjectFactory. + */ + static remove(factoryType: string): void; + + /** + * Creates a new Dynamic Bitmap Text Game Object and adds it to the Scene. + * + * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure. + * + * During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to + * match the font structure. + * + * Dynamic Bitmap Text objects are different from Static Bitmap Text in that they invoke a callback for each + * letter being rendered during the render pass. This callback allows you to manipulate the properties of + * each letter being rendered, such as its position, scale or tint, allowing you to create interesting effects + * like jiggling text, which can't be done with Static text. This means that Dynamic Text takes more processing + * time, so only use them if you require the callback ability they have. + * + * BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability + * to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by + * processing the font texture in an image editor, applying fills and any other effects required. + * + * To create multi-line text insert \r, \n or \r\n escape codes into the text string. + * + * To create a BitmapText data files you need a 3rd party app such as: + * + * BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ + * Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner + * Littera (Web-based, free): http://kvazars.com/littera/ + * + * For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of + * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson + * + * Note: This method will only be available if the Dynamic Bitmap Text Game Object has been built into Phaser. + * @param x The x position of the Game Object. + * @param y The y position of the Game Object. + * @param font The key of the font to use from the BitmapFont cache. + * @param text The string, or array of strings, to be set as the content of this Bitmap Text. + * @param size The font size to set. + */ + dynamicBitmapText(x: number, y: number, font: string, text?: string | string[], size?: number): Phaser.GameObjects.DynamicBitmapText; + + /** + * Creates a new Bitmap Text Game Object and adds it to the Scene. + * + * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure. + * + * During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to + * match the font structure. + * + * BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability + * to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by + * processing the font texture in an image editor, applying fills and any other effects required. + * + * To create multi-line text insert \r, \n or \r\n escape codes into the text string. + * + * To create a BitmapText data files you need a 3rd party app such as: + * + * BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ + * Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner + * Littera (Web-based, free): http://kvazars.com/littera/ + * + * For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of + * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson + * + * Note: This method will only be available if the Bitmap Text Game Object has been built into Phaser. + * @param x The x position of the Game Object. + * @param y The y position of the Game Object. + * @param font The key of the font to use from the BitmapFont cache. + * @param text The string, or array of strings, to be set as the content of this Bitmap Text. + * @param size The font size to set. + * @param align The alignment of the text in a multi-line BitmapText object. Default 0. + */ + bitmapText(x: number, y: number, font: string, text?: string | string[], size?: number, align?: integer): Phaser.GameObjects.BitmapText; + + /** + * Creates a new Blitter Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Blitter Game Object has been built into Phaser. + * @param x The x position of the Game Object. + * @param y The y position of the Game Object. + * @param key The key of the Texture the Blitter object will use. + * @param frame The default Frame children of the Blitter will use. + */ + blitter(x: number, y: number, key: string, frame?: string | integer): Phaser.GameObjects.Blitter; + + /** + * Creates a new Container Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Container Game Object has been built into Phaser. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param children An optional array of Game Objects to add to this Container. + */ + container(x: number, y: number, children?: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[]): Phaser.GameObjects.Container; + + /** + * DOM Element Game Objects are a way to control and manipulate HTML Elements over the top of your game. + * + * In order for DOM Elements to display you have to enable them by adding the following to your game + * configuration object: + * + * ```javascript + * dom { + * createContainer: true + * } + * ``` + * + * When this is added, Phaser will automatically create a DOM Container div that is positioned over the top + * of the game canvas. This div is sized to match the canvas, and if the canvas size changes, as a result of + * settings within the Scale Manager, the dom container is resized accordingly. + * + * You can create a DOM Element by either passing in DOMStrings, or by passing in a reference to an existing + * Element that you wish to be placed under the control of Phaser. For example: + * + * ```javascript + * this.add.dom(x, y, 'div', 'background-color: lime; width: 220px; height: 100px; font: 48px Arial', 'Phaser'); + * ``` + * + * The above code will insert a div element into the DOM Container at the given x/y coordinate. The DOMString in + * the 4th argument sets the initial CSS style of the div and the final argument is the inner text. In this case, + * it will create a lime colored div that is 220px by 100px in size with the text Phaser in it, in an Arial font. + * + * You should nearly always, without exception, use explicitly sized HTML Elements, in order to fully control + * alignment and positioning of the elements next to regular game content. + * + * Rather than specify the CSS and HTML directly you can use the `load.html` File Loader to load it into the + * cache and then use the `createFromCache` method instead. You can also use `createFromHTML` and various other + * methods available in this class to help construct your elements. + * + * Once the element has been created you can then control it like you would any other Game Object. You can set its + * position, scale, rotation, alpha and other properties. It will move as the main Scene Camera moves and be clipped + * at the edge of the canvas. It's important to remember some limitations of DOM Elements: The obvious one is that + * they appear above or below your game canvas. You cannot blend them into the display list, meaning you cannot have + * a DOM Element, then a Sprite, then another DOM Element behind it. + * + * They also cannot be enabled for input. To do that, you have to use the `addListener` method to add native event + * listeners directly. The final limitation is to do with cameras. The DOM Container is sized to match the game canvas + * entirely and clipped accordingly. DOM Elements respect camera scrolling and scrollFactor settings, but if you + * change the size of the camera so it no longer matches the size of the canvas, they won't be clipped accordingly. + * + * Also, all DOM Elements are inserted into the same DOM Container, regardless of which Scene they are created in. + * + * DOM Elements are a powerful way to align native HTML with your Phaser Game Objects. For example, you can insert + * a login form for a multiplayer game directly into your title screen. Or a text input box for a highscore table. + * Or a banner ad from a 3rd party service. Or perhaps you'd like to use them for high resolution text display and + * UI. The choice is up to you, just remember that you're dealing with standard HTML and CSS floating over the top + * of your game, and should treat it accordingly. + * + * Note: This method will only be available if the DOM Element Game Object has been built into Phaser. + * @param x The horizontal position of this DOM Element in the world. + * @param y The vertical position of this DOM Element in the world. + * @param element An existing DOM element, or a string. If a string starting with a # it will do a `getElementById` look-up on the string (minus the hash). Without a hash, it represents the type of element to create, i.e. 'div'. + * @param style If a string, will be set directly as the elements `style` property value. If a plain object, will be iterated and the values transferred. In both cases the values replacing whatever CSS styles may have been previously set. + * @param innerText If given, will be set directly as the elements `innerText` property value, replacing whatever was there before. + */ + dom(x: number, y: number, element?: HTMLElement | string, style?: string | any, innerText?: string): Phaser.GameObjects.DOMElement; + + /** + * Creates a new Extern Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Extern Game Object has been built into Phaser. + */ + extern(): Phaser.GameObjects.Extern; + + /** + * Creates a new Graphics Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Graphics Game Object has been built into Phaser. + * @param config The Graphics configuration. + */ + graphics(config?: Phaser.Types.GameObjects.Graphics.Options): Phaser.GameObjects.Graphics; + + /** + * Creates a new Group Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Group Game Object has been built into Phaser. + * @param children Game Objects to add to this Group; or the `config` argument. + * @param config A Group Configuration object. + */ + group(children?: Phaser.GameObjects.GameObject[] | Phaser.Types.GameObjects.Group.GroupConfig | Phaser.Types.GameObjects.Group.GroupConfig[], config?: Phaser.Types.GameObjects.Group.GroupConfig | Phaser.Types.GameObjects.Group.GroupCreateConfig): Phaser.GameObjects.Group; + + /** + * Creates a new Image Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Image Game Object has been built into Phaser. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + image(x: number, y: number, texture: string, frame?: string | integer): Phaser.GameObjects.Image; + + /** + * Creates a new Mesh Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Mesh Game Object and WebGL support have been built into Phaser. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param vertices An array containing the vertices data for this Mesh. + * @param uv An array containing the uv data for this Mesh. + * @param colors An array containing the color data for this Mesh. + * @param alphas An array containing the alpha data for this Mesh. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + mesh(x: number, y: number, vertices: number[], uv: number[], colors: number[], alphas: number[], texture: string, frame?: string | integer): Phaser.GameObjects.Mesh; + + /** + * Creates a new Particle Emitter Manager Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Particles Game Object has been built into Phaser. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + * @param emitters Configuration settings for one or more emitters to create. + */ + particles(texture: string, frame?: string | integer | object, emitters?: Phaser.Types.GameObjects.Particles.ParticleEmitterConfig | Phaser.Types.GameObjects.Particles.ParticleEmitterConfig[]): Phaser.GameObjects.Particles.ParticleEmitterManager; + + /** + * Creates a new PathFollower Game Object and adds it to the Scene. + * + * Note: This method will only be available if the PathFollower Game Object has been built into Phaser. + * @param path The Path this PathFollower is connected to. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + follower(path: Phaser.Curves.Path, x: number, y: number, texture: string, frame?: string | integer): Phaser.GameObjects.PathFollower; + + /** + * Creates a new Quad Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Quad Game Object and WebGL support have been built into Phaser. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + quad(x: number, y: number, texture: string, frame?: string | integer): Phaser.GameObjects.Quad; + + /** + * Creates a new Render Texture Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Render Texture Game Object has been built into Phaser. + * + * A Render Texture is a special texture that allows any number of Game Objects to be drawn to it. You can take many complex objects and + * draw them all to this one texture, which can they be used as the texture for other Game Object's. It's a way to generate dynamic + * textures at run-time that are WebGL friendly and don't invoke expensive GPU uploads. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param width The width of the Render Texture. Default 32. + * @param height The height of the Render Texture. Default 32. + */ + renderTexture(x: number, y: number, width?: integer, height?: integer): Phaser.GameObjects.RenderTexture; + + /** + * Creates a new Shader Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Shader Game Object and WebGL support have been built into Phaser. + * @param key The key of the shader to use from the shader cache, or a BaseShader instance. + * @param x The horizontal position of this Game Object in the world. Default 0. + * @param y The vertical position of this Game Object in the world. Default 0. + * @param width The width of the Game Object. Default 128. + * @param height The height of the Game Object. Default 128. + * @param textures Optional array of texture keys to bind to the iChannel0...3 uniforms. The textures must already exist in the Texture Manager. + * @param textureData Optional additional texture data. + */ + shader(key: string | Phaser.Display.BaseShader, x?: number, y?: number, width?: number, height?: number, textures?: string[], textureData?: object): Phaser.GameObjects.Shader; + + /** + * Creates a new Arc Shape Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Arc Game Object has been built into Phaser. + * + * The Arc Shape is a Game Object that can be added to a Scene, Group or Container. You can + * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling + * it for input or physics. It provides a quick and easy way for you to render this shape in your + * game without using a texture, while still taking advantage of being fully batched in WebGL. + * + * This shape supports both fill and stroke colors. + * + * When it renders it displays an arc shape. You can control the start and end angles of the arc, + * as well as if the angles are winding clockwise or anti-clockwise. With the default settings + * it renders as a complete circle. By changing the angles you can create other arc shapes, + * such as half-circles. + * @param x The horizontal position of this Game Object in the world. Default 0. + * @param y The vertical position of this Game Object in the world. Default 0. + * @param radius The radius of the arc. Default 128. + * @param startAngle The start angle of the arc, in degrees. Default 0. + * @param endAngle The end angle of the arc, in degrees. Default 360. + * @param anticlockwise The winding order of the start and end angles. Default false. + * @param fillColor The color the arc will be filled with, i.e. 0xff0000 for red. + * @param fillAlpha The alpha the arc will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. + */ + arc(x?: number, y?: number, radius?: number, startAngle?: integer, endAngle?: integer, anticlockwise?: boolean, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Arc; + + /** + * Creates a new Circle Shape Game Object and adds it to the Scene. + * + * A Circle is an Arc with no defined start and end angle, making it render as a complete circle. + * + * Note: This method will only be available if the Arc Game Object has been built into Phaser. + * @param x The horizontal position of this Game Object in the world. Default 0. + * @param y The vertical position of this Game Object in the world. Default 0. + * @param radius The radius of the circle. Default 128. + * @param fillColor The color the circle will be filled with, i.e. 0xff0000 for red. + * @param fillAlpha The alpha the circle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. + */ + circle(x?: number, y?: number, radius?: number, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Arc; + + /** + * Creates a new Curve Shape Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Curve Game Object has been built into Phaser. + * + * The Curve Shape is a Game Object that can be added to a Scene, Group or Container. You can + * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling + * it for input or physics. It provides a quick and easy way for you to render this shape in your + * game without using a texture, while still taking advantage of being fully batched in WebGL. + * + * This shape supports both fill and stroke colors. + * + * To render a Curve Shape you must first create a `Phaser.Curves.Curve` object, then pass it to + * the Curve Shape in the constructor. + * + * The Curve shape also has a `smoothness` property and corresponding `setSmoothness` method. + * This allows you to control how smooth the shape renders in WebGL, by controlling the number of iterations + * that take place during construction. Increase and decrease the default value for smoother, or more + * jagged, shapes. + * @param x The horizontal position of this Game Object in the world. Default 0. + * @param y The vertical position of this Game Object in the world. Default 0. + * @param curve The Curve object to use to create the Shape. + * @param fillColor The color the curve will be filled with, i.e. 0xff0000 for red. + * @param fillAlpha The alpha the curve will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. + */ + curve(x?: number, y?: number, curve?: Phaser.Curves.Curve, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Curve; + + /** + * Creates a new Ellipse Shape Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Ellipse Game Object has been built into Phaser. + * + * The Ellipse Shape is a Game Object that can be added to a Scene, Group or Container. You can + * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling + * it for input or physics. It provides a quick and easy way for you to render this shape in your + * game without using a texture, while still taking advantage of being fully batched in WebGL. + * + * This shape supports both fill and stroke colors. + * + * When it renders it displays an ellipse shape. You can control the width and height of the ellipse. + * If the width and height match it will render as a circle. If the width is less than the height, + * it will look more like an egg shape. + * + * The Ellipse shape also has a `smoothness` property and corresponding `setSmoothness` method. + * This allows you to control how smooth the shape renders in WebGL, by controlling the number of iterations + * that take place during construction. Increase and decrease the default value for smoother, or more + * jagged, shapes. + * @param x The horizontal position of this Game Object in the world. Default 0. + * @param y The vertical position of this Game Object in the world. Default 0. + * @param width The width of the ellipse. An ellipse with equal width and height renders as a circle. Default 128. + * @param height The height of the ellipse. An ellipse with equal width and height renders as a circle. Default 128. + * @param fillColor The color the ellipse will be filled with, i.e. 0xff0000 for red. + * @param fillAlpha The alpha the ellipse will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. + */ + ellipse(x?: number, y?: number, width?: number, height?: number, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Ellipse; + + /** + * Creates a new Grid Shape Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Grid Game Object has been built into Phaser. + * + * The Grid Shape is a Game Object that can be added to a Scene, Group or Container. You can + * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling + * it for input or physics. It provides a quick and easy way for you to render this shape in your + * game without using a texture, while still taking advantage of being fully batched in WebGL. + * + * This shape supports only fill colors and cannot be stroked. + * + * A Grid Shape allows you to display a grid in your game, where you can control the size of the + * grid as well as the width and height of the grid cells. You can set a fill color for each grid + * cell as well as an alternate fill color. When the alternate fill color is set then the grid + * cells will alternate the fill colors as they render, creating a chess-board effect. You can + * also optionally have an outline fill color. If set, this draws lines between the grid cells + * in the given color. If you specify an outline color with an alpha of zero, then it will draw + * the cells spaced out, but without the lines between them. + * @param x The horizontal position of this Game Object in the world. Default 0. + * @param y The vertical position of this Game Object in the world. Default 0. + * @param width The width of the grid. Default 128. + * @param height The height of the grid. Default 128. + * @param cellWidth The width of one cell in the grid. Default 32. + * @param cellHeight The height of one cell in the grid. Default 32. + * @param fillColor The color the grid cells will be filled with, i.e. 0xff0000 for red. + * @param fillAlpha The alpha the grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. + * @param outlineFillColor The color of the lines between the grid cells. + * @param outlineFillAlpha The alpha of the lines between the grid cells. + */ + grid(x?: number, y?: number, width?: number, height?: number, cellWidth?: number, cellHeight?: number, fillColor?: number, fillAlpha?: number, outlineFillColor?: number, outlineFillAlpha?: number): Phaser.GameObjects.Grid; + + /** + * Creates a new IsoBox Shape Game Object and adds it to the Scene. + * + * Note: This method will only be available if the IsoBox Game Object has been built into Phaser. + * + * The IsoBox Shape is a Game Object that can be added to a Scene, Group or Container. You can + * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling + * it for input or physics. It provides a quick and easy way for you to render this shape in your + * game without using a texture, while still taking advantage of being fully batched in WebGL. + * + * This shape supports only fill colors and cannot be stroked. + * + * An IsoBox is an 'isometric' rectangle. Each face of it has a different fill color. You can set + * the color of the top, left and right faces of the rectangle respectively. You can also choose + * which of the faces are rendered via the `showTop`, `showLeft` and `showRight` properties. + * + * You cannot view an IsoBox from under-neath, however you can change the 'angle' by setting + * the `projection` property. + * @param x The horizontal position of this Game Object in the world. Default 0. + * @param y The vertical position of this Game Object in the world. Default 0. + * @param size The width of the iso box in pixels. The left and right faces will be exactly half this value. Default 48. + * @param height The height of the iso box. The left and right faces will be this tall. The overall height of the isobox will be this value plus half the `size` value. Default 32. + * @param fillTop The fill color of the top face of the iso box. Default 0xeeeeee. + * @param fillLeft The fill color of the left face of the iso box. Default 0x999999. + * @param fillRight The fill color of the right face of the iso box. Default 0xcccccc. + */ + isobox(x?: number, y?: number, size?: number, height?: number, fillTop?: number, fillLeft?: number, fillRight?: number): Phaser.GameObjects.IsoBox; + + /** + * Creates a new IsoTriangle Shape Game Object and adds it to the Scene. + * + * Note: This method will only be available if the IsoTriangle Game Object has been built into Phaser. + * + * The IsoTriangle Shape is a Game Object that can be added to a Scene, Group or Container. You can + * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling + * it for input or physics. It provides a quick and easy way for you to render this shape in your + * game without using a texture, while still taking advantage of being fully batched in WebGL. + * + * This shape supports only fill colors and cannot be stroked. + * + * An IsoTriangle is an 'isometric' triangle. Think of it like a pyramid. Each face has a different + * fill color. You can set the color of the top, left and right faces of the triangle respectively + * You can also choose which of the faces are rendered via the `showTop`, `showLeft` and `showRight` properties. + * + * You cannot view an IsoTriangle from under-neath, however you can change the 'angle' by setting + * the `projection` property. The `reversed` property controls if the IsoTriangle is rendered upside + * down or not. + * @param x The horizontal position of this Game Object in the world. Default 0. + * @param y The vertical position of this Game Object in the world. Default 0. + * @param size The width of the iso triangle in pixels. The left and right faces will be exactly half this value. Default 48. + * @param height The height of the iso triangle. The left and right faces will be this tall. The overall height of the iso triangle will be this value plus half the `size` value. Default 32. + * @param reversed Is the iso triangle upside down? Default false. + * @param fillTop The fill color of the top face of the iso triangle. Default 0xeeeeee. + * @param fillLeft The fill color of the left face of the iso triangle. Default 0x999999. + * @param fillRight The fill color of the right face of the iso triangle. Default 0xcccccc. + */ + isotriangle(x?: number, y?: number, size?: number, height?: number, reversed?: boolean, fillTop?: number, fillLeft?: number, fillRight?: number): Phaser.GameObjects.IsoTriangle; + + /** + * Creates a new Line Shape Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Line Game Object has been built into Phaser. + * + * The Line Shape is a Game Object that can be added to a Scene, Group or Container. You can + * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling + * it for input or physics. It provides a quick and easy way for you to render this shape in your + * game without using a texture, while still taking advantage of being fully batched in WebGL. + * + * This shape supports only stroke colors and cannot be filled. + * + * A Line Shape allows you to draw a line between two points in your game. You can control the + * stroke color and thickness of the line. In WebGL only you can also specify a different + * thickness for the start and end of the line, allowing you to render lines that taper-off. + * + * If you need to draw multiple lines in a sequence you may wish to use the Polygon Shape instead. + * @param x The horizontal position of this Game Object in the world. Default 0. + * @param y The vertical position of this Game Object in the world. Default 0. + * @param x1 The horizontal position of the start of the line. Default 0. + * @param y1 The vertical position of the start of the line. Default 0. + * @param x2 The horizontal position of the end of the line. Default 128. + * @param y2 The vertical position of the end of the line. Default 0. + * @param strokeColor The color the line will be drawn in, i.e. 0xff0000 for red. + * @param strokeAlpha The alpha the line will be drawn in. You can also set the alpha of the overall Shape using its `alpha` property. + */ + line(x?: number, y?: number, x1?: number, y1?: number, x2?: number, y2?: number, strokeColor?: number, strokeAlpha?: number): Phaser.GameObjects.Line; + + /** + * Creates a new Polygon Shape Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Polygon Game Object has been built into Phaser. + * + * The Polygon Shape is a Game Object that can be added to a Scene, Group or Container. You can + * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling + * it for input or physics. It provides a quick and easy way for you to render this shape in your + * game without using a texture, while still taking advantage of being fully batched in WebGL. + * + * This shape supports both fill and stroke colors. + * + * The Polygon Shape is created by providing a list of points, which are then used to create an + * internal Polygon geometry object. The points can be set from a variety of formats: + * + * - An array of Point or Vector2 objects: `[new Phaser.Math.Vec2(x1, y1), ...]` + * - An array of objects with public x/y properties: `[obj1, obj2, ...]` + * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]` + * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]` + * + * By default the `x` and `y` coordinates of this Shape refer to the center of it. However, depending + * on the coordinates of the points provided, the final shape may be rendered offset from its origin. + * @param x The horizontal position of this Game Object in the world. Default 0. + * @param y The vertical position of this Game Object in the world. Default 0. + * @param points The points that make up the polygon. + * @param fillColor The color the polygon will be filled with, i.e. 0xff0000 for red. + * @param fillAlpha The alpha the polygon will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. + */ + polygon(x?: number, y?: number, points?: any, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Polygon; + + /** + * Creates a new Rectangle Shape Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Rectangle Game Object has been built into Phaser. + * + * The Rectangle Shape is a Game Object that can be added to a Scene, Group or Container. You can + * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling + * it for input or physics. It provides a quick and easy way for you to render this shape in your + * game without using a texture, while still taking advantage of being fully batched in WebGL. + * + * This shape supports both fill and stroke colors. + * + * You can change the size of the rectangle by changing the `width` and `height` properties. + * @param x The horizontal position of this Game Object in the world. Default 0. + * @param y The vertical position of this Game Object in the world. Default 0. + * @param width The width of the rectangle. Default 128. + * @param height The height of the rectangle. Default 128. + * @param fillColor The color the rectangle will be filled with, i.e. 0xff0000 for red. + * @param fillAlpha The alpha the rectangle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. + */ + rectangle(x?: number, y?: number, width?: number, height?: number, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Rectangle; + + /** + * Creates a new Star Shape Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Star Game Object has been built into Phaser. + * + * The Star Shape is a Game Object that can be added to a Scene, Group or Container. You can + * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling + * it for input or physics. It provides a quick and easy way for you to render this shape in your + * game without using a texture, while still taking advantage of being fully batched in WebGL. + * + * This shape supports both fill and stroke colors. + * + * As the name implies, the Star shape will display a star in your game. You can control several + * aspects of it including the number of points that constitute the star. The default is 5. If + * you change it to 4 it will render as a diamond. If you increase them, you'll get a more spiky + * star shape. + * + * You can also control the inner and outer radius, which is how 'long' each point of the star is. + * Modify these values to create more interesting shapes. + * @param x The horizontal position of this Game Object in the world. Default 0. + * @param y The vertical position of this Game Object in the world. Default 0. + * @param points The number of points on the star. Default 5. + * @param innerRadius The inner radius of the star. Default 32. + * @param outerRadius The outer radius of the star. Default 64. + * @param fillColor The color the star will be filled with, i.e. 0xff0000 for red. + * @param fillAlpha The alpha the star will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. + */ + star(x?: number, y?: number, points?: number, innerRadius?: number, outerRadius?: number, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Star; + + /** + * Creates a new Triangle Shape Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Triangle Game Object has been built into Phaser. + * + * The Triangle Shape is a Game Object that can be added to a Scene, Group or Container. You can + * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling + * it for input or physics. It provides a quick and easy way for you to render this shape in your + * game without using a texture, while still taking advantage of being fully batched in WebGL. + * + * This shape supports both fill and stroke colors. + * + * The Triangle consists of 3 lines, joining up to form a triangular shape. You can control the + * position of each point of these lines. The triangle is always closed and cannot have an open + * face. If you require that, consider using a Polygon instead. + * @param x The horizontal position of this Game Object in the world. Default 0. + * @param y The vertical position of this Game Object in the world. Default 0. + * @param x1 The horizontal position of the first point in the triangle. Default 0. + * @param y1 The vertical position of the first point in the triangle. Default 128. + * @param x2 The horizontal position of the second point in the triangle. Default 64. + * @param y2 The vertical position of the second point in the triangle. Default 0. + * @param x3 The horizontal position of the third point in the triangle. Default 128. + * @param y3 The vertical position of the third point in the triangle. Default 128. + * @param fillColor The color the triangle will be filled with, i.e. 0xff0000 for red. + * @param fillAlpha The alpha the triangle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. + */ + triangle(x?: number, y?: number, x1?: number, y1?: number, x2?: number, y2?: number, x3?: number, y3?: number, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Triangle; + + /** + * Creates a new Sprite Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Sprite Game Object has been built into Phaser. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + sprite(x: number, y: number, texture: string, frame?: string | integer): Phaser.GameObjects.Sprite; + + /** + * Creates a new Text Game Object and adds it to the Scene. + * + * A Text Game Object. + * + * Text objects work by creating their own internal hidden Canvas and then renders text to it using + * the standard Canvas `fillText` API. It then creates a texture from this canvas which is rendered + * to your game during the render pass. + * + * Because it uses the Canvas API you can take advantage of all the features this offers, such as + * applying gradient fills to the text, or strokes, shadows and more. You can also use custom fonts + * loaded externally, such as Google or TypeKit Web fonts. + * + * You can only display fonts that are currently loaded and available to the browser: therefore fonts must + * be pre-loaded. Phaser does not do ths for you, so you will require the use of a 3rd party font loader, + * or have the fonts ready available in the CSS on the page in which your Phaser game resides. + * + * See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts + * across mobile browsers. + * + * A note on performance: Every time the contents of a Text object changes, i.e. changing the text being + * displayed, or the style of the text, it needs to remake the Text canvas, and if on WebGL, re-upload the + * new texture to the GPU. This can be an expensive operation if used often, or with large quantities of + * Text objects in your game. If you run into performance issues you would be better off using Bitmap Text + * instead, as it benefits from batching and avoids expensive Canvas API calls. + * + * Note: This method will only be available if the Text Game Object has been built into Phaser. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param text The text this Text object will display. + * @param style The Text style configuration object. + */ + text(x: number, y: number, text: string | string[], style?: object): Phaser.GameObjects.Text; + + /** + * Creates a new TileSprite Game Object and adds it to the Scene. + * + * Note: This method will only be available if the TileSprite Game Object has been built into Phaser. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param width The width of the Game Object. If zero it will use the size of the texture frame. + * @param height The height of the Game Object. If zero it will use the size of the texture frame. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + tileSprite(x: number, y: number, width: integer, height: integer, texture: string, frame?: string | integer): Phaser.GameObjects.TileSprite; + + /** + * Creates a new Image Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Image Game Object has been built into Phaser. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + video(x: number, y: number, texture: string, frame?: string | integer): Phaser.GameObjects.Image; + + /** + * Creates a new Zone Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Zone Game Object has been built into Phaser. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param width The width of the Game Object. + * @param height The height of the Game Object. + */ + zone(x: number, y: number, width: number, height: number): Phaser.GameObjects.Zone; + + /** + * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. + * When loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing + * from a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the map + * data. For an empty map, you should specify tileWidth, tileHeight, width & height. + * @param key The key in the Phaser cache that corresponds to the loaded tilemap data. + * @param tileWidth The width of a tile in pixels. Pass in `null` to leave as the + * default. Default 32. + * @param tileHeight The height of a tile in pixels. Pass in `null` to leave as the + * default. Default 32. + * @param width The width of the map in tiles. Pass in `null` to leave as the + * default. Default 10. + * @param height The height of the map in tiles. Pass in `null` to leave as the + * default. Default 10. + * @param data Instead of loading from the cache, you can also load directly from + * a 2D array of tile indexes. Pass in `null` for no data. + * @param insertNull Controls how empty tiles, tiles with an index of -1, in the + * map data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty + * location will get a Tile object with an index of -1. If you've a large sparsely populated map and + * the tile data doesn't need to change then setting this value to `true` will help with memory + * consumption. However if your map is small or you need to update the tiles dynamically, then leave + * the default value set. Default false. + */ + tilemap(key?: string, tileWidth?: integer, tileHeight?: integer, width?: integer, height?: integer, data?: integer[][], insertNull?: boolean): Phaser.Tilemaps.Tilemap; + + /** + * Creates a new Tween object. + * + * Note: This method will only be available if Tweens have been built into Phaser. + * @param config The Tween configuration. + */ + tween(config: Phaser.Types.Tweens.TweenBuilderConfig | object): Phaser.Tweens.Tween; + + } + + /** + * The Update List plugin. + * + * Update Lists belong to a Scene and maintain the list Game Objects to be updated every frame. + * + * Some or all of these Game Objects may also be part of the Scene's [Display List]{@link Phaser.GameObjects.DisplayList}, for Rendering. + */ + class UpdateList extends Phaser.Structs.ProcessQueue { + /** + * + * @param scene The Scene that the Update List belongs to. + */ + constructor(scene: Phaser.Scene); + + /** + * The Scene that the Update List belongs to. + */ + scene: Phaser.Scene; + + /** + * The Scene's Systems. + */ + systems: Phaser.Scenes.Systems; + + /** + * The update step. + * + * Pre-updates every active Game Object in the list. + * @param time The current timestamp. + * @param delta The delta time elapsed since the last frame. + */ + sceneUpdate(time: number, delta: number): void; + + /** + * The Scene that owns this plugin is shutting down. + * + * We need to kill and reset all internal properties as well as stop listening to Scene events. + */ + shutdown(): void; + + /** + * The Scene that owns this plugin is being destroyed. + * + * We need to shutdown and then kill off all external references. + */ + destroy(): void; + + } + + namespace RetroFont { + /** + * Parses a Retro Font configuration object so you can pass it to the BitmapText constructor + * and create a BitmapText object using a fixed-width retro font. + * @param scene A reference to the Phaser Scene. + * @param config The font configuration object. + */ + function Parse(scene: Phaser.Scene, config: Phaser.Types.GameObjects.BitmapText.RetroFontConfig): object; + + /** + * Text Set 1 = !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ + */ + var TEXT_SET1: string; + + /** + * Text Set 2 = !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ + */ + var TEXT_SET2: string; + + /** + * Text Set 3 = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 + */ + var TEXT_SET3: string; + + /** + * Text Set 4 = ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 + */ + var TEXT_SET4: string; + + /** + * Text Set 5 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789 + */ + var TEXT_SET5: string; + + /** + * Text Set 6 = ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.' + */ + var TEXT_SET6: string; + + /** + * Text Set 7 = AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39 + */ + var TEXT_SET7: string; + + /** + * Text Set 8 = 0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ + */ + var TEXT_SET8: string; + + /** + * Text Set 9 = ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?! + */ + var TEXT_SET9: string; + + /** + * Text Set 10 = ABCDEFGHIJKLMNOPQRSTUVWXYZ + */ + var TEXT_SET10: string; + + /** + * Text Set 11 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789 + */ + var TEXT_SET11: string; + + } + /** * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure. * @@ -8499,7 +9999,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -8604,6 +10106,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -8651,72 +10156,6 @@ declare namespace Phaser { } - namespace RetroFont { - /** - * Text Set 1 = !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ - */ - var TEXT_SET1: string; - - /** - * Text Set 2 = !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ - */ - var TEXT_SET2: string; - - /** - * Text Set 3 = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 - */ - var TEXT_SET3: string; - - /** - * Text Set 4 = ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 - */ - var TEXT_SET4: string; - - /** - * Text Set 5 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789 - */ - var TEXT_SET5: string; - - /** - * Text Set 6 = ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.' - */ - var TEXT_SET6: string; - - /** - * Text Set 7 = AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39 - */ - var TEXT_SET7: string; - - /** - * Text Set 8 = 0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ - */ - var TEXT_SET8: string; - - /** - * Text Set 9 = ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?! - */ - var TEXT_SET9: string; - - /** - * Text Set 10 = ABCDEFGHIJKLMNOPQRSTUVWXYZ - */ - var TEXT_SET10: string; - - /** - * Text Set 11 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789 - */ - var TEXT_SET11: string; - - /** - * Parses a Retro Font configuration object so you can pass it to the BitmapText constructor - * and create a BitmapText object using a fixed-width retro font. - * @param scene A reference to the Phaser Scene. - * @param config The font configuration object. - */ - function Parse(scene: Phaser.Scene, config: Phaser.Types.GameObjects.BitmapText.RetroFontConfig): object; - - } - /** * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure. * @@ -8935,13 +10374,24 @@ declare namespace Phaser { * Parse an XML Bitmap Font from an Atlas. * * Adds the parsed Bitmap Font data to the cache with the `fontName` key. + * @param scene The Scene to parse the Bitmap Font for. + * @param fontName The key of the font to add to the Bitmap Font cache. + * @param textureKey The key of the BitmapFont's texture. + * @param frameKey The key of the BitmapFont texture's frame. + * @param xmlKey The key of the XML data of the font to parse. + * @param xSpacing The x-axis spacing to add between each letter. + * @param ySpacing The y-axis spacing to add to the line height. */ - static ParseFromAtlas: Function; + static ParseFromAtlas(scene: Phaser.Scene, fontName: string, textureKey: string, frameKey: string, xmlKey: string, xSpacing?: integer, ySpacing?: integer): boolean; /** * Parse an XML font to Bitmap Font data for the Bitmap Font cache. + * @param xml The XML Document to parse the font from. + * @param xSpacing The x-axis spacing to add between each letter. Default 0. + * @param ySpacing The y-axis spacing to add to the line height. Default 0. + * @param frame The texture frame to take into account while parsing. */ - static ParseXMLBitmapFont: Function; + static ParseXMLBitmapFont(xml: XMLDocument, xSpacing?: integer, ySpacing?: integer, frame?: Phaser.Textures.Frame): Phaser.Types.GameObjects.BitmapText.BitmapFontData; /** * Clears all alpha values associated with this Game Object. @@ -9414,7 +10864,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -9519,6 +10971,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -10055,7 +11510,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -10160,6 +11617,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -10374,21 +11834,6 @@ declare namespace Phaser { } - /** - * Builds a Game Object using the provided configuration object. - * @param scene A reference to the Scene. - * @param gameObject The initial GameObject. - * @param config The config to build the GameObject with. - */ - function BuildGameObject(scene: Phaser.Scene, gameObject: Phaser.GameObjects.GameObject, config: Phaser.Types.GameObjects.GameObjectConfig): Phaser.GameObjects.GameObject; - - /** - * Adds an Animation component to a Sprite and populates it based on the given config. - * @param sprite The sprite to add an Animation component to. - * @param config The animation config. - */ - function BuildGameObjectAnimation(sprite: Phaser.GameObjects.Sprite, config: object): Phaser.GameObjects.Sprite; - namespace Components { /** * Provides methods used for setting the alpha properties of a Game Object. @@ -10441,6 +11886,13 @@ declare namespace Phaser { alphaBottomRight: number; } + /** + * Provides methods used for setting the alpha property of a Game Object. + * Should be applied as a mixin and not used directly. + */ + namespace AlphaSingle { + } + interface Animation { /** * The Game Object to which this animation controller belongs. @@ -11619,7 +13071,9 @@ declare namespace Phaser { y: number; /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; /** @@ -11710,6 +13164,9 @@ declare namespace Phaser { setY(value?: number): this; /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -12063,7 +13520,7 @@ declare namespace Phaser { * flexible manner as those not within them. In short, don't use them for the sake of it. You pay a small cost * every time you create one, try to structure your game around avoiding that where possible. */ - class Container extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.ComputedSize, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { + class Container extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.ComputedSize, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { /** * * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. @@ -12538,57 +13995,6 @@ declare namespace Phaser { */ protected preDestroy(): void; - /** - * Clears all alpha values associated with this Game Object. - * - * Immediately sets the alpha levels back to 1 (fully opaque). - */ - clearAlpha(): this; - - /** - * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. - * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. - * - * If your game is running under WebGL you can optionally specify four different alpha values, each of which - * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. - * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. - * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. - * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. - * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. - */ - setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; - - /** - * The alpha value of the Game Object. - * - * This is a global value, impacting the entire Game Object, not just a region of it. - */ - alpha: number; - - /** - * The alpha value starting from the top-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopLeft: number; - - /** - * The alpha value starting from the top-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopRight: number; - - /** - * The alpha value starting from the bottom-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomLeft: number; - - /** - * The alpha value starting from the bottom-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomRight: number; - /** * Sets the Blend Mode being used by this Game Object. * @@ -12792,7 +14198,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -12897,6 +14305,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -12944,60 +14355,6 @@ declare namespace Phaser { } - /** - * The Display List plugin. - * - * Display Lists belong to a Scene and maintain the list of Game Objects to render every frame. - * - * Some of these Game Objects may also be part of the Scene's [Update List]{@link Phaser.GameObjects.UpdateList}, for updating. - */ - class DisplayList extends Phaser.Structs.List { - /** - * - * @param scene The Scene that this Display List belongs to. - */ - constructor(scene: Phaser.Scene); - - /** - * The flag the determines whether Game Objects should be sorted when `depthSort()` is called. - */ - sortChildrenFlag: boolean; - - /** - * The Scene that this Display List belongs to. - */ - scene: Phaser.Scene; - - /** - * The Scene's Systems. - */ - systems: Phaser.Scenes.Systems; - - /** - * Force a sort of the display list on the next call to depthSort. - */ - queueDepthSort(): void; - - /** - * Immediately sorts the display list if the flag is set. - */ - depthSort(): void; - - /** - * Compare the depth of two Game Objects. - * @param childA The first Game Object. - * @param childB The second Game Object. - */ - sortByDepth(childA: Phaser.GameObjects.GameObject, childB: Phaser.GameObjects.GameObject): integer; - - /** - * Returns an array which contains all objects currently on the Display List. - * This is a reference to the main list array, not a copy of it, so be careful not to modify it. - */ - getChildren(): Phaser.GameObjects.GameObject[]; - - } - /** * DOM Element Game Objects are a way to control and manipulate HTML Elements over the top of your game. * @@ -13051,7 +14408,7 @@ declare namespace Phaser { * UI. The choice is up to you, just remember that you're dealing with standard HTML and CSS floating over the top * of your game, and should treat it accordingly. */ - class DOMElement extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { + class DOMElement extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { /** * * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. @@ -13427,57 +14784,6 @@ declare namespace Phaser { */ willRender(): boolean; - /** - * Clears all alpha values associated with this Game Object. - * - * Immediately sets the alpha levels back to 1 (fully opaque). - */ - clearAlpha(): this; - - /** - * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. - * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. - * - * If your game is running under WebGL you can optionally specify four different alpha values, each of which - * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. - * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. - * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. - * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. - * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. - */ - setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; - - /** - * The alpha value of the Game Object. - * - * This is a global value, impacting the entire Game Object, not just a region of it. - */ - alpha: number; - - /** - * The alpha value starting from the top-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopLeft: number; - - /** - * The alpha value starting from the top-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopRight: number; - - /** - * The alpha value starting from the bottom-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomLeft: number; - - /** - * The alpha value starting from the bottom-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomRight: number; - /** * Sets the Blend Mode being used by this Game Object. * @@ -13681,7 +14987,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -13786,6 +15094,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -14501,7 +15812,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -14606,6 +15919,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -14653,1270 +15969,6 @@ declare namespace Phaser { } - /** - * The base class that all Game Objects extend. - * You don't create GameObjects directly and they cannot be added to the display list. - * Instead, use them as the base for your own custom classes. - */ - class GameObject extends Phaser.Events.EventEmitter { - /** - * - * @param scene The Scene to which this Game Object belongs. - * @param type A textual representation of the type of Game Object, i.e. `sprite`. - */ - constructor(scene: Phaser.Scene, type: string); - - /** - * The Scene to which this Game Object belongs. - * Game Objects can only belong to one Scene. - */ - protected scene: Phaser.Scene; - - /** - * A textual representation of this Game Object, i.e. `sprite`. - * Used internally by Phaser but is available for your own custom classes to populate. - */ - type: string; - - /** - * The current state of this Game Object. - * - * Phaser itself will never modify this value, although plugins may do so. - * - * Use this property to track the state of a Game Object during its lifetime. For example, it could move from - * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant - * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons. - * If you need to store complex data about your Game Object, look at using the Data Component instead. - */ - state: integer | string; - - /** - * The parent Container of this Game Object, if it has one. - */ - parentContainer: Phaser.GameObjects.Container; - - /** - * The name of this Game Object. - * Empty by default and never populated by Phaser, this is left for developers to use. - */ - name: string; - - /** - * The active state of this Game Object. - * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it. - * An active object is one which is having its logic and internal systems updated. - */ - active: boolean; - - /** - * The Tab Index of the Game Object. - * Reserved for future use by plugins and the Input Manager. - */ - tabIndex: integer; - - /** - * A Data Manager. - * It allows you to store, query and get key/value paired information specific to this Game Object. - * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`. - */ - data: Phaser.Data.DataManager; - - /** - * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not. - * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively. - * If those components are not used by your custom class then you can use this bitmask as you wish. - */ - renderFlags: integer; - - /** - * A bitmask that controls if this Game Object is drawn by a Camera or not. - * Not usually set directly, instead call `Camera.ignore`, however you can - * set this property directly using the Camera.id property: - */ - cameraFilter: number; - - /** - * If this Game Object is enabled for input then this property will contain an InteractiveObject instance. - * Not usually set directly. Instead call `GameObject.setInteractive()`. - */ - input: Phaser.Types.Input.InteractiveObject; - - /** - * If this Game Object is enabled for physics then this property will contain a reference to a Physics Body. - */ - body: object | Phaser.Physics.Arcade.Body | Phaser.Physics.Impact.Body; - - /** - * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`. - * This includes calls that may come from a Group, Container or the Scene itself. - * While it allows you to persist a Game Object across Scenes, please understand you are entirely - * responsible for managing references to and from this Game Object. - */ - ignoreDestroy: boolean; - - /** - * Sets the `active` property of this Game Object and returns this Game Object for further chaining. - * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList. - * @param value True if this Game Object should be set as active, false if not. - */ - setActive(value: boolean): this; - - /** - * Sets the `name` property of this Game Object and returns this Game Object for further chaining. - * The `name` property is not populated by Phaser and is presented for your own use. - * @param value The name to be given to this Game Object. - */ - setName(value: string): this; - - /** - * Sets the current state of this Game Object. - * - * Phaser itself will never modify the State of a Game Object, although plugins may do so. - * - * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'. - * The state value should typically be an integer (ideally mapped to a constant - * in your game code), but could also be a string. It is recommended to keep it light and simple. - * If you need to store complex data about your Game Object, look at using the Data Component instead. - * @param value The state of the Game Object. - */ - setState(value: integer | string): this; - - /** - * Adds a Data Manager component to this Game Object. - */ - setDataEnabled(): this; - - /** - * Allows you to store a key value pair within this Game Objects Data Manager. - * - * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled - * before setting the value. - * - * If the key doesn't already exist in the Data Manager then it is created. - * - * ```javascript - * sprite.setData('name', 'Red Gem Stone'); - * ``` - * - * You can also pass in an object of key value pairs as the first argument: - * - * ```javascript - * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 }); - * ``` - * - * To get a value back again you can call `getData`: - * - * ```javascript - * sprite.getData('gold'); - * ``` - * - * Or you can access the value directly via the `values` property, where it works like any other variable: - * - * ```javascript - * sprite.data.values.gold += 50; - * ``` - * - * When the value is first set, a `setdata` event is emitted from this Game Object. - * - * If the key already exists, a `changedata` event is emitted instead, along an event named after the key. - * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`. - * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter. - * - * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings. - * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager. - * @param key The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored. - * @param data The value to set for the given key. If an object is provided as the key this argument is ignored. - */ - setData(key: string | object, data?: any): this; - - /** - * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist. - * - * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either: - * - * ```javascript - * sprite.getData('gold'); - * ``` - * - * Or access the value directly: - * - * ```javascript - * sprite.data.values.gold; - * ``` - * - * You can also pass in an array of keys, in which case an array of values will be returned: - * - * ```javascript - * sprite.getData([ 'gold', 'armor', 'health' ]); - * ``` - * - * This approach is useful for destructuring arrays in ES6. - * @param key The key of the value to retrieve, or an array of keys. - */ - getData(key: string | string[]): any; - - /** - * Pass this Game Object to the Input Manager to enable it for Input. - * - * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area - * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced - * input detection. - * - * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If - * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific - * shape for it to use. - * - * You can also provide an Input Configuration Object as the only argument to this method. - * @param shape Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used. - * @param callback A callback to be invoked when the Game Object is interacted with. If you provide a shape you must also provide a callback. - * @param dropZone Should this Game Object be treated as a drop zone target? Default false. - */ - setInteractive(shape?: Phaser.Types.Input.InputConfiguration | any, callback?: Phaser.Types.Input.HitAreaCallback, dropZone?: boolean): this; - - /** - * If this Game Object has previously been enabled for input, this will disable it. - * - * An object that is disabled for input stops processing or being considered for - * input events, but can be turned back on again at any time by simply calling - * `setInteractive()` with no arguments provided. - * - * If want to completely remove interaction from this Game Object then use `removeInteractive` instead. - */ - disableInteractive(): this; - - /** - * If this Game Object has previously been enabled for input, this will queue it - * for removal, causing it to no longer be interactive. The removal happens on - * the next game step, it is not immediate. - * - * The Interactive Object that was assigned to this Game Object will be destroyed, - * removed from the Input Manager and cleared from this Game Object. - * - * If you wish to re-enable this Game Object at a later date you will need to - * re-create its InteractiveObject by calling `setInteractive` again. - * - * If you wish to only temporarily stop an object from receiving input then use - * `disableInteractive` instead, as that toggles the interactive state, where-as - * this erases it completely. - * - * If you wish to resize a hit area, don't remove and then set it as being - * interactive. Instead, access the hitarea object directly and resize the shape - * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the - * shape is a Rectangle, which it is by default.) - */ - removeInteractive(): this; - - /** - * To be overridden by custom GameObjects. Allows base objects to be used in a Pool. - * @param args args - */ - update(...args: any[]): void; - - /** - * Returns a JSON representation of the Game Object. - */ - toJSON(): Phaser.Types.GameObjects.JSONGameObject; - - /** - * Compares the renderMask with the renderFlags to see if this Game Object will render or not. - * Also checks the Game Object against the given Cameras exclusion list. - * @param camera The Camera to check against this Game Object. - */ - willRender(camera: Phaser.Cameras.Scene2D.Camera): boolean; - - /** - * Returns an array containing the display list index of either this Game Object, or if it has one, - * its parent Container. It then iterates up through all of the parent containers until it hits the - * root of the display list (which is index 0 in the returned array). - * - * Used internally by the InputPlugin but also useful if you wish to find out the display depth of - * this Game Object and all of its ancestors. - */ - getIndexList(): integer[]; - - /** - * Destroys this Game Object removing it from the Display List and Update List and - * severing all ties to parent resources. - * - * Also removes itself from the Input Manager and Physics Manager if previously enabled. - * - * Use this to remove a Game Object from your game if you don't ever plan to use it again. - * As long as no reference to it exists within your own code it should become free for - * garbage collection by the browser. - * - * If you just want to temporarily disable an object then look at using the - * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected. - * @param fromScene Is this Game Object being destroyed as the result of a Scene shutdown? Default false. - */ - destroy(fromScene?: boolean): void; - - /** - * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not. - */ - static readonly RENDER_MASK: integer; - - } - - /** - * The Game Object Creator is a Scene plugin that allows you to quickly create many common - * types of Game Objects and return them. Unlike the Game Object Factory, they are not automatically - * added to the Scene. - * - * Game Objects directly register themselves with the Creator and inject their own creation - * methods into the class. - */ - class GameObjectCreator { - /** - * - * @param scene The Scene to which this Game Object Factory belongs. - */ - constructor(scene: Phaser.Scene); - - /** - * Creates a new Dynamic Bitmap Text Game Object and returns it. - * - * Note: This method will only be available if the Dynamic Bitmap Text Game Object has been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - */ - dynamicBitmapText(config: Phaser.Types.GameObjects.BitmapText.BitmapTextConfig, addToScene?: boolean): Phaser.GameObjects.DynamicBitmapText; - - /** - * Creates a new Bitmap Text Game Object and returns it. - * - * Note: This method will only be available if the Bitmap Text Game Object has been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - */ - bitmapText(config: Phaser.Types.GameObjects.BitmapText.BitmapTextConfig, addToScene?: boolean): Phaser.GameObjects.BitmapText; - - /** - * Creates a new Blitter Game Object and returns it. - * - * Note: This method will only be available if the Blitter Game Object has been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - */ - blitter(config: object, addToScene?: boolean): Phaser.GameObjects.Blitter; - - /** - * Creates a new Container Game Object and returns it. - * - * Note: This method will only be available if the Container Game Object has been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - */ - container(config: object, addToScene?: boolean): Phaser.GameObjects.Container; - - /** - * The Scene to which this Game Object Creator belongs. - */ - protected scene: Phaser.Scene; - - /** - * A reference to the Scene.Systems. - */ - protected systems: Phaser.Scenes.Systems; - - /** - * A reference to the Scene Display List. - */ - protected displayList: Phaser.GameObjects.DisplayList; - - /** - * A reference to the Scene Update List. - */ - protected "updateList;": Phaser.GameObjects.UpdateList; - - /** - * Creates a new Graphics Game Object and returns it. - * - * Note: This method will only be available if the Graphics Game Object has been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - */ - graphics(config: object, addToScene?: boolean): Phaser.GameObjects.Graphics; - - /** - * Creates a new Group Game Object and returns it. - * - * Note: This method will only be available if the Group Game Object has been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - */ - group(config: Phaser.Types.GameObjects.Group.GroupConfig | Phaser.Types.GameObjects.Group.GroupCreateConfig): Phaser.GameObjects.Group; - - /** - * Creates a new Image Game Object and returns it. - * - * Note: This method will only be available if the Image Game Object has been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - */ - image(config: object, addToScene?: boolean): Phaser.GameObjects.Image; - - /** - * Creates a new Mesh Game Object and returns it. - * - * Note: This method will only be available if the Mesh Game Object and WebGL support have been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - */ - mesh(config: object, addToScene?: boolean): Phaser.GameObjects.Mesh; - - /** - * Creates a new Particle Emitter Manager Game Object and returns it. - * - * Note: This method will only be available if the Particles Game Object has been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - */ - particles(config: object, addToScene?: boolean): Phaser.GameObjects.Particles.ParticleEmitterManager; - - /** - * Creates a new Quad Game Object and returns it. - * - * Note: This method will only be available if the Quad Game Object and WebGL support have been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - */ - quad(config: object, addToScene?: boolean): Phaser.GameObjects.Quad; - - /** - * Creates a new Render Texture Game Object and returns it. - * - * Note: This method will only be available if the Render Texture Game Object has been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - */ - renderTexture(config: Phaser.Types.GameObjects.RenderTexture.RenderTextureConfig, addToScene?: boolean): Phaser.GameObjects.RenderTexture; - - /** - * Creates a new Shader Game Object and returns it. - * - * Note: This method will only be available if the Shader Game Object and WebGL support have been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - */ - shader(config: object, addToScene?: boolean): Phaser.GameObjects.Shader; - - /** - * Creates a new Sprite Game Object and returns it. - * - * Note: This method will only be available if the Sprite Game Object has been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - */ - sprite(config: Phaser.Types.GameObjects.Sprite.SpriteConfig, addToScene?: boolean): Phaser.GameObjects.Sprite; - - /** - * Creates a new Text Game Object and returns it. - * - * Note: This method will only be available if the Text Game Object has been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - */ - text(config: object, addToScene?: boolean): Phaser.GameObjects.Text; - - /** - * Creates a new TileSprite Game Object and returns it. - * - * Note: This method will only be available if the TileSprite Game Object has been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - */ - tileSprite(config: Phaser.Types.GameObjects.TileSprite.TileSpriteConfig, addToScene?: boolean): Phaser.GameObjects.TileSprite; - - /** - * Creates a new Video Game Object and returns it. - * - * Note: This method will only be available if the Video Game Object has been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - */ - video(config: object, addToScene?: boolean): Phaser.GameObjects.Video; - - /** - * Creates a new Zone Game Object and returns it. - * - * Note: This method will only be available if the Zone Game Object has been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - */ - zone(config: object): Phaser.GameObjects.Zone; - - /** - * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. - * When loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing - * from a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the map - * data. For an empty map, you should specify tileWidth, tileHeight, width & height. - * @param config The config options for the Tilemap. - */ - tilemap(config?: Phaser.Types.Tilemaps.TilemapConfig): Phaser.Tilemaps.Tilemap; - - /** - * Creates a new Tween object and returns it. - * - * Note: This method will only be available if Tweens have been built into Phaser. - * @param config The Tween configuration. - */ - tween(config: Phaser.Types.Tweens.TweenBuilderConfig | object): Phaser.Tweens.Tween; - - } - - /** - * The Game Object Factory is a Scene plugin that allows you to quickly create many common - * types of Game Objects and have them automatically registered with the Scene. - * - * Game Objects directly register themselves with the Factory and inject their own creation - * methods into the class. - */ - class GameObjectFactory { - /** - * - * @param scene The Scene to which this Game Object Factory belongs. - */ - constructor(scene: Phaser.Scene); - - /** - * Creates a new Path Object. - * @param x The horizontal position of this Path. - * @param y The vertical position of this Path. - */ - path(x: number, y: number): Phaser.Curves.Path; - - /** - * Creates a new Dynamic Bitmap Text Game Object and adds it to the Scene. - * - * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure. - * - * During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to - * match the font structure. - * - * Dynamic Bitmap Text objects are different from Static Bitmap Text in that they invoke a callback for each - * letter being rendered during the render pass. This callback allows you to manipulate the properties of - * each letter being rendered, such as its position, scale or tint, allowing you to create interesting effects - * like jiggling text, which can't be done with Static text. This means that Dynamic Text takes more processing - * time, so only use them if you require the callback ability they have. - * - * BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability - * to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by - * processing the font texture in an image editor, applying fills and any other effects required. - * - * To create multi-line text insert \r, \n or \r\n escape codes into the text string. - * - * To create a BitmapText data files you need a 3rd party app such as: - * - * BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ - * Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner - * Littera (Web-based, free): http://kvazars.com/littera/ - * - * For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of - * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson - * - * Note: This method will only be available if the Dynamic Bitmap Text Game Object has been built into Phaser. - * @param x The x position of the Game Object. - * @param y The y position of the Game Object. - * @param font The key of the font to use from the BitmapFont cache. - * @param text The string, or array of strings, to be set as the content of this Bitmap Text. - * @param size The font size to set. - */ - dynamicBitmapText(x: number, y: number, font: string, text?: string | string[], size?: number): Phaser.GameObjects.DynamicBitmapText; - - /** - * Creates a new Bitmap Text Game Object and adds it to the Scene. - * - * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure. - * - * During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to - * match the font structure. - * - * BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability - * to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by - * processing the font texture in an image editor, applying fills and any other effects required. - * - * To create multi-line text insert \r, \n or \r\n escape codes into the text string. - * - * To create a BitmapText data files you need a 3rd party app such as: - * - * BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ - * Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner - * Littera (Web-based, free): http://kvazars.com/littera/ - * - * For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of - * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson - * - * Note: This method will only be available if the Bitmap Text Game Object has been built into Phaser. - * @param x The x position of the Game Object. - * @param y The y position of the Game Object. - * @param font The key of the font to use from the BitmapFont cache. - * @param text The string, or array of strings, to be set as the content of this Bitmap Text. - * @param size The font size to set. - * @param align The alignment of the text in a multi-line BitmapText object. Default 0. - */ - bitmapText(x: number, y: number, font: string, text?: string | string[], size?: number, align?: integer): Phaser.GameObjects.BitmapText; - - /** - * Creates a new Blitter Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Blitter Game Object has been built into Phaser. - * @param x The x position of the Game Object. - * @param y The y position of the Game Object. - * @param key The key of the Texture the Blitter object will use. - * @param frame The default Frame children of the Blitter will use. - */ - blitter(x: number, y: number, key: string, frame?: string | integer): Phaser.GameObjects.Blitter; - - /** - * Creates a new Container Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Container Game Object has been built into Phaser. - * @param x The horizontal position of this Game Object in the world. - * @param y The vertical position of this Game Object in the world. - * @param children An optional array of Game Objects to add to this Container. - */ - container(x: number, y: number, children?: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[]): Phaser.GameObjects.Container; - - /** - * DOM Element Game Objects are a way to control and manipulate HTML Elements over the top of your game. - * - * In order for DOM Elements to display you have to enable them by adding the following to your game - * configuration object: - * - * ```javascript - * dom { - * createContainer: true - * } - * ``` - * - * When this is added, Phaser will automatically create a DOM Container div that is positioned over the top - * of the game canvas. This div is sized to match the canvas, and if the canvas size changes, as a result of - * settings within the Scale Manager, the dom container is resized accordingly. - * - * You can create a DOM Element by either passing in DOMStrings, or by passing in a reference to an existing - * Element that you wish to be placed under the control of Phaser. For example: - * - * ```javascript - * this.add.dom(x, y, 'div', 'background-color: lime; width: 220px; height: 100px; font: 48px Arial', 'Phaser'); - * ``` - * - * The above code will insert a div element into the DOM Container at the given x/y coordinate. The DOMString in - * the 4th argument sets the initial CSS style of the div and the final argument is the inner text. In this case, - * it will create a lime colored div that is 220px by 100px in size with the text Phaser in it, in an Arial font. - * - * You should nearly always, without exception, use explicitly sized HTML Elements, in order to fully control - * alignment and positioning of the elements next to regular game content. - * - * Rather than specify the CSS and HTML directly you can use the `load.html` File Loader to load it into the - * cache and then use the `createFromCache` method instead. You can also use `createFromHTML` and various other - * methods available in this class to help construct your elements. - * - * Once the element has been created you can then control it like you would any other Game Object. You can set its - * position, scale, rotation, alpha and other properties. It will move as the main Scene Camera moves and be clipped - * at the edge of the canvas. It's important to remember some limitations of DOM Elements: The obvious one is that - * they appear above or below your game canvas. You cannot blend them into the display list, meaning you cannot have - * a DOM Element, then a Sprite, then another DOM Element behind it. - * - * They also cannot be enabled for input. To do that, you have to use the `addListener` method to add native event - * listeners directly. The final limitation is to do with cameras. The DOM Container is sized to match the game canvas - * entirely and clipped accordingly. DOM Elements respect camera scrolling and scrollFactor settings, but if you - * change the size of the camera so it no longer matches the size of the canvas, they won't be clipped accordingly. - * - * Also, all DOM Elements are inserted into the same DOM Container, regardless of which Scene they are created in. - * - * DOM Elements are a powerful way to align native HTML with your Phaser Game Objects. For example, you can insert - * a login form for a multiplayer game directly into your title screen. Or a text input box for a highscore table. - * Or a banner ad from a 3rd party service. Or perhaps you'd like to use them for high resolution text display and - * UI. The choice is up to you, just remember that you're dealing with standard HTML and CSS floating over the top - * of your game, and should treat it accordingly. - * - * Note: This method will only be available if the DOM Element Game Object has been built into Phaser. - * @param x The horizontal position of this DOM Element in the world. - * @param y The vertical position of this DOM Element in the world. - * @param element An existing DOM element, or a string. If a string starting with a # it will do a `getElementById` look-up on the string (minus the hash). Without a hash, it represents the type of element to create, i.e. 'div'. - * @param style If a string, will be set directly as the elements `style` property value. If a plain object, will be iterated and the values transferred. In both cases the values replacing whatever CSS styles may have been previously set. - * @param innerText If given, will be set directly as the elements `innerText` property value, replacing whatever was there before. - */ - dom(x: number, y: number, element?: HTMLElement | string, style?: string | any, innerText?: string): Phaser.GameObjects.DOMElement; - - /** - * Creates a new Extern Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Extern Game Object has been built into Phaser. - */ - extern(): Phaser.GameObjects.Extern; - - /** - * The Scene to which this Game Object Factory belongs. - */ - protected scene: Phaser.Scene; - - /** - * A reference to the Scene.Systems. - */ - protected systems: Phaser.Scenes.Systems; - - /** - * A reference to the Scene Display List. - */ - protected displayList: Phaser.GameObjects.DisplayList; - - /** - * A reference to the Scene Update List. - */ - protected "updateList;": Phaser.GameObjects.UpdateList; - - /** - * Adds an existing Game Object to this Scene. - * - * If the Game Object renders, it will be added to the Display List. - * If it has a `preUpdate` method, it will be added to the Update List. - * @param child The child to be added to this Scene. - */ - existing(child: Phaser.GameObjects.GameObject): Phaser.GameObjects.GameObject; - - /** - * Creates a new Graphics Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Graphics Game Object has been built into Phaser. - * @param config The Graphics configuration. - */ - graphics(config?: Phaser.Types.GameObjects.Graphics.Options): Phaser.GameObjects.Graphics; - - /** - * Creates a new Group Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Group Game Object has been built into Phaser. - * @param children Game Objects to add to this Group; or the `config` argument. - * @param config A Group Configuration object. - */ - group(children?: Phaser.GameObjects.GameObject[] | Phaser.Types.GameObjects.Group.GroupConfig | Phaser.Types.GameObjects.Group.GroupConfig[], config?: Phaser.Types.GameObjects.Group.GroupConfig | Phaser.Types.GameObjects.Group.GroupCreateConfig): Phaser.GameObjects.Group; - - /** - * Creates a new Image Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Image Game Object has been built into Phaser. - * @param x The horizontal position of this Game Object in the world. - * @param y The vertical position of this Game Object in the world. - * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. - * @param frame An optional frame from the Texture this Game Object is rendering with. - */ - image(x: number, y: number, texture: string, frame?: string | integer): Phaser.GameObjects.Image; - - /** - * Creates a new Mesh Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Mesh Game Object and WebGL support have been built into Phaser. - * @param x The horizontal position of this Game Object in the world. - * @param y The vertical position of this Game Object in the world. - * @param vertices An array containing the vertices data for this Mesh. - * @param uv An array containing the uv data for this Mesh. - * @param colors An array containing the color data for this Mesh. - * @param alphas An array containing the alpha data for this Mesh. - * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. - * @param frame An optional frame from the Texture this Game Object is rendering with. - */ - mesh(x: number, y: number, vertices: number[], uv: number[], colors: number[], alphas: number[], texture: string, frame?: string | integer): Phaser.GameObjects.Mesh; - - /** - * Creates a new Particle Emitter Manager Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Particles Game Object has been built into Phaser. - * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. - * @param frame An optional frame from the Texture this Game Object is rendering with. - * @param emitters Configuration settings for one or more emitters to create. - */ - particles(texture: string, frame?: string | integer | object, emitters?: Phaser.Types.GameObjects.Particles.ParticleEmitterConfig | Phaser.Types.GameObjects.Particles.ParticleEmitterConfig[]): Phaser.GameObjects.Particles.ParticleEmitterManager; - - /** - * Creates a new PathFollower Game Object and adds it to the Scene. - * - * Note: This method will only be available if the PathFollower Game Object has been built into Phaser. - * @param path The Path this PathFollower is connected to. - * @param x The horizontal position of this Game Object in the world. - * @param y The vertical position of this Game Object in the world. - * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. - * @param frame An optional frame from the Texture this Game Object is rendering with. - */ - follower(path: Phaser.Curves.Path, x: number, y: number, texture: string, frame?: string | integer): Phaser.GameObjects.PathFollower; - - /** - * Creates a new Quad Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Quad Game Object and WebGL support have been built into Phaser. - * @param x The horizontal position of this Game Object in the world. - * @param y The vertical position of this Game Object in the world. - * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. - * @param frame An optional frame from the Texture this Game Object is rendering with. - */ - quad(x: number, y: number, texture: string, frame?: string | integer): Phaser.GameObjects.Quad; - - /** - * Creates a new Render Texture Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Render Texture Game Object has been built into Phaser. - * - * A Render Texture is a special texture that allows any number of Game Objects to be drawn to it. You can take many complex objects and - * draw them all to this one texture, which can they be used as the texture for other Game Object's. It's a way to generate dynamic - * textures at run-time that are WebGL friendly and don't invoke expensive GPU uploads. - * @param x The horizontal position of this Game Object in the world. - * @param y The vertical position of this Game Object in the world. - * @param width The width of the Render Texture. Default 32. - * @param height The height of the Render Texture. Default 32. - */ - renderTexture(x: number, y: number, width?: integer, height?: integer): Phaser.GameObjects.RenderTexture; - - /** - * Creates a new Shader Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Shader Game Object and WebGL support have been built into Phaser. - * @param key The key of the shader to use from the shader cache, or a BaseShader instance. - * @param x The horizontal position of this Game Object in the world. Default 0. - * @param y The vertical position of this Game Object in the world. Default 0. - * @param width The width of the Game Object. Default 128. - * @param height The height of the Game Object. Default 128. - * @param textures Optional array of texture keys to bind to the iChannel0...3 uniforms. The textures must already exist in the Texture Manager. - * @param textureData Optional additional texture data. - */ - shader(key: string | Phaser.Display.BaseShader, x?: number, y?: number, width?: number, height?: number, textures?: string[], textureData?: object): Phaser.GameObjects.Shader; - - /** - * Creates a new Arc Shape Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Arc Game Object has been built into Phaser. - * - * The Arc Shape is a Game Object that can be added to a Scene, Group or Container. You can - * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling - * it for input or physics. It provides a quick and easy way for you to render this shape in your - * game without using a texture, while still taking advantage of being fully batched in WebGL. - * - * This shape supports both fill and stroke colors. - * - * When it renders it displays an arc shape. You can control the start and end angles of the arc, - * as well as if the angles are winding clockwise or anti-clockwise. With the default settings - * it renders as a complete circle. By changing the angles you can create other arc shapes, - * such as half-circles. - * @param x The horizontal position of this Game Object in the world. Default 0. - * @param y The vertical position of this Game Object in the world. Default 0. - * @param radius The radius of the arc. Default 128. - * @param startAngle The start angle of the arc, in degrees. Default 0. - * @param endAngle The end angle of the arc, in degrees. Default 360. - * @param anticlockwise The winding order of the start and end angles. Default false. - * @param fillColor The color the arc will be filled with, i.e. 0xff0000 for red. - * @param fillAlpha The alpha the arc will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. - */ - arc(x?: number, y?: number, radius?: number, startAngle?: integer, endAngle?: integer, anticlockwise?: boolean, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Arc; - - /** - * Creates a new Circle Shape Game Object and adds it to the Scene. - * - * A Circle is an Arc with no defined start and end angle, making it render as a complete circle. - * - * Note: This method will only be available if the Arc Game Object has been built into Phaser. - * @param x The horizontal position of this Game Object in the world. Default 0. - * @param y The vertical position of this Game Object in the world. Default 0. - * @param radius The radius of the circle. Default 128. - * @param fillColor The color the circle will be filled with, i.e. 0xff0000 for red. - * @param fillAlpha The alpha the circle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. - */ - circle(x?: number, y?: number, radius?: number, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Arc; - - /** - * Creates a new Curve Shape Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Curve Game Object has been built into Phaser. - * - * The Curve Shape is a Game Object that can be added to a Scene, Group or Container. You can - * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling - * it for input or physics. It provides a quick and easy way for you to render this shape in your - * game without using a texture, while still taking advantage of being fully batched in WebGL. - * - * This shape supports both fill and stroke colors. - * - * To render a Curve Shape you must first create a `Phaser.Curves.Curve` object, then pass it to - * the Curve Shape in the constructor. - * - * The Curve shape also has a `smoothness` property and corresponding `setSmoothness` method. - * This allows you to control how smooth the shape renders in WebGL, by controlling the number of iterations - * that take place during construction. Increase and decrease the default value for smoother, or more - * jagged, shapes. - * @param x The horizontal position of this Game Object in the world. Default 0. - * @param y The vertical position of this Game Object in the world. Default 0. - * @param curve The Curve object to use to create the Shape. - * @param fillColor The color the curve will be filled with, i.e. 0xff0000 for red. - * @param fillAlpha The alpha the curve will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. - */ - curve(x?: number, y?: number, curve?: Phaser.Curves.Curve, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Curve; - - /** - * Creates a new Ellipse Shape Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Ellipse Game Object has been built into Phaser. - * - * The Ellipse Shape is a Game Object that can be added to a Scene, Group or Container. You can - * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling - * it for input or physics. It provides a quick and easy way for you to render this shape in your - * game without using a texture, while still taking advantage of being fully batched in WebGL. - * - * This shape supports both fill and stroke colors. - * - * When it renders it displays an ellipse shape. You can control the width and height of the ellipse. - * If the width and height match it will render as a circle. If the width is less than the height, - * it will look more like an egg shape. - * - * The Ellipse shape also has a `smoothness` property and corresponding `setSmoothness` method. - * This allows you to control how smooth the shape renders in WebGL, by controlling the number of iterations - * that take place during construction. Increase and decrease the default value for smoother, or more - * jagged, shapes. - * @param x The horizontal position of this Game Object in the world. Default 0. - * @param y The vertical position of this Game Object in the world. Default 0. - * @param width The width of the ellipse. An ellipse with equal width and height renders as a circle. Default 128. - * @param height The height of the ellipse. An ellipse with equal width and height renders as a circle. Default 128. - * @param fillColor The color the ellipse will be filled with, i.e. 0xff0000 for red. - * @param fillAlpha The alpha the ellipse will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. - */ - ellipse(x?: number, y?: number, width?: number, height?: number, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Ellipse; - - /** - * Creates a new Grid Shape Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Grid Game Object has been built into Phaser. - * - * The Grid Shape is a Game Object that can be added to a Scene, Group or Container. You can - * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling - * it for input or physics. It provides a quick and easy way for you to render this shape in your - * game without using a texture, while still taking advantage of being fully batched in WebGL. - * - * This shape supports only fill colors and cannot be stroked. - * - * A Grid Shape allows you to display a grid in your game, where you can control the size of the - * grid as well as the width and height of the grid cells. You can set a fill color for each grid - * cell as well as an alternate fill color. When the alternate fill color is set then the grid - * cells will alternate the fill colors as they render, creating a chess-board effect. You can - * also optionally have an outline fill color. If set, this draws lines between the grid cells - * in the given color. If you specify an outline color with an alpha of zero, then it will draw - * the cells spaced out, but without the lines between them. - * @param x The horizontal position of this Game Object in the world. Default 0. - * @param y The vertical position of this Game Object in the world. Default 0. - * @param width The width of the grid. Default 128. - * @param height The height of the grid. Default 128. - * @param cellWidth The width of one cell in the grid. Default 32. - * @param cellHeight The height of one cell in the grid. Default 32. - * @param fillColor The color the grid cells will be filled with, i.e. 0xff0000 for red. - * @param fillAlpha The alpha the grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. - * @param outlineFillColor The color of the lines between the grid cells. - * @param outlineFillAlpha The alpha of the lines between the grid cells. - */ - grid(x?: number, y?: number, width?: number, height?: number, cellWidth?: number, cellHeight?: number, fillColor?: number, fillAlpha?: number, outlineFillColor?: number, outlineFillAlpha?: number): Phaser.GameObjects.Grid; - - /** - * Creates a new IsoBox Shape Game Object and adds it to the Scene. - * - * Note: This method will only be available if the IsoBox Game Object has been built into Phaser. - * - * The IsoBox Shape is a Game Object that can be added to a Scene, Group or Container. You can - * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling - * it for input or physics. It provides a quick and easy way for you to render this shape in your - * game without using a texture, while still taking advantage of being fully batched in WebGL. - * - * This shape supports only fill colors and cannot be stroked. - * - * An IsoBox is an 'isometric' rectangle. Each face of it has a different fill color. You can set - * the color of the top, left and right faces of the rectangle respectively. You can also choose - * which of the faces are rendered via the `showTop`, `showLeft` and `showRight` properties. - * - * You cannot view an IsoBox from under-neath, however you can change the 'angle' by setting - * the `projection` property. - * @param x The horizontal position of this Game Object in the world. Default 0. - * @param y The vertical position of this Game Object in the world. Default 0. - * @param size The width of the iso box in pixels. The left and right faces will be exactly half this value. Default 48. - * @param height The height of the iso box. The left and right faces will be this tall. The overall height of the isobox will be this value plus half the `size` value. Default 32. - * @param fillTop The fill color of the top face of the iso box. Default 0xeeeeee. - * @param fillLeft The fill color of the left face of the iso box. Default 0x999999. - * @param fillRight The fill color of the right face of the iso box. Default 0xcccccc. - */ - isobox(x?: number, y?: number, size?: number, height?: number, fillTop?: number, fillLeft?: number, fillRight?: number): Phaser.GameObjects.IsoBox; - - /** - * Creates a new IsoTriangle Shape Game Object and adds it to the Scene. - * - * Note: This method will only be available if the IsoTriangle Game Object has been built into Phaser. - * - * The IsoTriangle Shape is a Game Object that can be added to a Scene, Group or Container. You can - * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling - * it for input or physics. It provides a quick and easy way for you to render this shape in your - * game without using a texture, while still taking advantage of being fully batched in WebGL. - * - * This shape supports only fill colors and cannot be stroked. - * - * An IsoTriangle is an 'isometric' triangle. Think of it like a pyramid. Each face has a different - * fill color. You can set the color of the top, left and right faces of the triangle respectively - * You can also choose which of the faces are rendered via the `showTop`, `showLeft` and `showRight` properties. - * - * You cannot view an IsoTriangle from under-neath, however you can change the 'angle' by setting - * the `projection` property. The `reversed` property controls if the IsoTriangle is rendered upside - * down or not. - * @param x The horizontal position of this Game Object in the world. Default 0. - * @param y The vertical position of this Game Object in the world. Default 0. - * @param size The width of the iso triangle in pixels. The left and right faces will be exactly half this value. Default 48. - * @param height The height of the iso triangle. The left and right faces will be this tall. The overall height of the iso triangle will be this value plus half the `size` value. Default 32. - * @param reversed Is the iso triangle upside down? Default false. - * @param fillTop The fill color of the top face of the iso triangle. Default 0xeeeeee. - * @param fillLeft The fill color of the left face of the iso triangle. Default 0x999999. - * @param fillRight The fill color of the right face of the iso triangle. Default 0xcccccc. - */ - isotriangle(x?: number, y?: number, size?: number, height?: number, reversed?: boolean, fillTop?: number, fillLeft?: number, fillRight?: number): Phaser.GameObjects.IsoTriangle; - - /** - * Creates a new Line Shape Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Line Game Object has been built into Phaser. - * - * The Line Shape is a Game Object that can be added to a Scene, Group or Container. You can - * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling - * it for input or physics. It provides a quick and easy way for you to render this shape in your - * game without using a texture, while still taking advantage of being fully batched in WebGL. - * - * This shape supports only stroke colors and cannot be filled. - * - * A Line Shape allows you to draw a line between two points in your game. You can control the - * stroke color and thickness of the line. In WebGL only you can also specify a different - * thickness for the start and end of the line, allowing you to render lines that taper-off. - * - * If you need to draw multiple lines in a sequence you may wish to use the Polygon Shape instead. - * @param x The horizontal position of this Game Object in the world. Default 0. - * @param y The vertical position of this Game Object in the world. Default 0. - * @param x1 The horizontal position of the start of the line. Default 0. - * @param y1 The vertical position of the start of the line. Default 0. - * @param x2 The horizontal position of the end of the line. Default 128. - * @param y2 The vertical position of the end of the line. Default 0. - * @param strokeColor The color the line will be drawn in, i.e. 0xff0000 for red. - * @param strokeAlpha The alpha the line will be drawn in. You can also set the alpha of the overall Shape using its `alpha` property. - */ - line(x?: number, y?: number, x1?: number, y1?: number, x2?: number, y2?: number, strokeColor?: number, strokeAlpha?: number): Phaser.GameObjects.Line; - - /** - * Creates a new Polygon Shape Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Polygon Game Object has been built into Phaser. - * - * The Polygon Shape is a Game Object that can be added to a Scene, Group or Container. You can - * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling - * it for input or physics. It provides a quick and easy way for you to render this shape in your - * game without using a texture, while still taking advantage of being fully batched in WebGL. - * - * This shape supports both fill and stroke colors. - * - * The Polygon Shape is created by providing a list of points, which are then used to create an - * internal Polygon geometry object. The points can be set from a variety of formats: - * - * - An array of Point or Vector2 objects: `[new Phaser.Math.Vec2(x1, y1), ...]` - * - An array of objects with public x/y properties: `[obj1, obj2, ...]` - * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]` - * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]` - * - * By default the `x` and `y` coordinates of this Shape refer to the center of it. However, depending - * on the coordinates of the points provided, the final shape may be rendered offset from its origin. - * @param x The horizontal position of this Game Object in the world. Default 0. - * @param y The vertical position of this Game Object in the world. Default 0. - * @param points The points that make up the polygon. - * @param fillColor The color the polygon will be filled with, i.e. 0xff0000 for red. - * @param fillAlpha The alpha the polygon will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. - */ - polygon(x?: number, y?: number, points?: any, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Polygon; - - /** - * Creates a new Rectangle Shape Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Rectangle Game Object has been built into Phaser. - * - * The Rectangle Shape is a Game Object that can be added to a Scene, Group or Container. You can - * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling - * it for input or physics. It provides a quick and easy way for you to render this shape in your - * game without using a texture, while still taking advantage of being fully batched in WebGL. - * - * This shape supports both fill and stroke colors. - * - * You can change the size of the rectangle by changing the `width` and `height` properties. - * @param x The horizontal position of this Game Object in the world. Default 0. - * @param y The vertical position of this Game Object in the world. Default 0. - * @param width The width of the rectangle. Default 128. - * @param height The height of the rectangle. Default 128. - * @param fillColor The color the rectangle will be filled with, i.e. 0xff0000 for red. - * @param fillAlpha The alpha the rectangle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. - */ - rectangle(x?: number, y?: number, width?: number, height?: number, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Rectangle; - - /** - * Creates a new Star Shape Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Star Game Object has been built into Phaser. - * - * The Star Shape is a Game Object that can be added to a Scene, Group or Container. You can - * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling - * it for input or physics. It provides a quick and easy way for you to render this shape in your - * game without using a texture, while still taking advantage of being fully batched in WebGL. - * - * This shape supports both fill and stroke colors. - * - * As the name implies, the Star shape will display a star in your game. You can control several - * aspects of it including the number of points that constitute the star. The default is 5. If - * you change it to 4 it will render as a diamond. If you increase them, you'll get a more spiky - * star shape. - * - * You can also control the inner and outer radius, which is how 'long' each point of the star is. - * Modify these values to create more interesting shapes. - * @param x The horizontal position of this Game Object in the world. Default 0. - * @param y The vertical position of this Game Object in the world. Default 0. - * @param points The number of points on the star. Default 5. - * @param innerRadius The inner radius of the star. Default 32. - * @param outerRadius The outer radius of the star. Default 64. - * @param fillColor The color the star will be filled with, i.e. 0xff0000 for red. - * @param fillAlpha The alpha the star will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. - */ - star(x?: number, y?: number, points?: number, innerRadius?: number, outerRadius?: number, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Star; - - /** - * Creates a new Triangle Shape Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Triangle Game Object has been built into Phaser. - * - * The Triangle Shape is a Game Object that can be added to a Scene, Group or Container. You can - * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling - * it for input or physics. It provides a quick and easy way for you to render this shape in your - * game without using a texture, while still taking advantage of being fully batched in WebGL. - * - * This shape supports both fill and stroke colors. - * - * The Triangle consists of 3 lines, joining up to form a triangular shape. You can control the - * position of each point of these lines. The triangle is always closed and cannot have an open - * face. If you require that, consider using a Polygon instead. - * @param x The horizontal position of this Game Object in the world. Default 0. - * @param y The vertical position of this Game Object in the world. Default 0. - * @param x1 The horizontal position of the first point in the triangle. Default 0. - * @param y1 The vertical position of the first point in the triangle. Default 128. - * @param x2 The horizontal position of the second point in the triangle. Default 64. - * @param y2 The vertical position of the second point in the triangle. Default 0. - * @param x3 The horizontal position of the third point in the triangle. Default 128. - * @param y3 The vertical position of the third point in the triangle. Default 128. - * @param fillColor The color the triangle will be filled with, i.e. 0xff0000 for red. - * @param fillAlpha The alpha the triangle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. - */ - triangle(x?: number, y?: number, x1?: number, y1?: number, x2?: number, y2?: number, x3?: number, y3?: number, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Triangle; - - /** - * Creates a new Sprite Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Sprite Game Object has been built into Phaser. - * @param x The horizontal position of this Game Object in the world. - * @param y The vertical position of this Game Object in the world. - * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. - * @param frame An optional frame from the Texture this Game Object is rendering with. - */ - sprite(x: number, y: number, texture: string, frame?: string | integer): Phaser.GameObjects.Sprite; - - /** - * Creates a new Text Game Object and adds it to the Scene. - * - * A Text Game Object. - * - * Text objects work by creating their own internal hidden Canvas and then renders text to it using - * the standard Canvas `fillText` API. It then creates a texture from this canvas which is rendered - * to your game during the render pass. - * - * Because it uses the Canvas API you can take advantage of all the features this offers, such as - * applying gradient fills to the text, or strokes, shadows and more. You can also use custom fonts - * loaded externally, such as Google or TypeKit Web fonts. - * - * You can only display fonts that are currently loaded and available to the browser: therefore fonts must - * be pre-loaded. Phaser does not do ths for you, so you will require the use of a 3rd party font loader, - * or have the fonts ready available in the CSS on the page in which your Phaser game resides. - * - * See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts - * across mobile browsers. - * - * A note on performance: Every time the contents of a Text object changes, i.e. changing the text being - * displayed, or the style of the text, it needs to remake the Text canvas, and if on WebGL, re-upload the - * new texture to the GPU. This can be an expensive operation if used often, or with large quantities of - * Text objects in your game. If you run into performance issues you would be better off using Bitmap Text - * instead, as it benefits from batching and avoids expensive Canvas API calls. - * - * Note: This method will only be available if the Text Game Object has been built into Phaser. - * @param x The horizontal position of this Game Object in the world. - * @param y The vertical position of this Game Object in the world. - * @param text The text this Text object will display. - * @param style The Text style configuration object. - */ - text(x: number, y: number, text: string | string[], style?: object): Phaser.GameObjects.Text; - - /** - * Creates a new TileSprite Game Object and adds it to the Scene. - * - * Note: This method will only be available if the TileSprite Game Object has been built into Phaser. - * @param x The horizontal position of this Game Object in the world. - * @param y The vertical position of this Game Object in the world. - * @param width The width of the Game Object. If zero it will use the size of the texture frame. - * @param height The height of the Game Object. If zero it will use the size of the texture frame. - * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. - * @param frame An optional frame from the Texture this Game Object is rendering with. - */ - tileSprite(x: number, y: number, width: integer, height: integer, texture: string, frame?: string | integer): Phaser.GameObjects.TileSprite; - - /** - * Creates a new Image Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Image Game Object has been built into Phaser. - * @param x The horizontal position of this Game Object in the world. - * @param y The vertical position of this Game Object in the world. - * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. - * @param frame An optional frame from the Texture this Game Object is rendering with. - */ - video(x: number, y: number, texture: string, frame?: string | integer): Phaser.GameObjects.Image; - - /** - * Creates a new Zone Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Zone Game Object has been built into Phaser. - * @param x The horizontal position of this Game Object in the world. - * @param y The vertical position of this Game Object in the world. - * @param width The width of the Game Object. - * @param height The height of the Game Object. - */ - zone(x: number, y: number, width: number, height: number): Phaser.GameObjects.Zone; - - /** - * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. - * When loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing - * from a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the map - * data. For an empty map, you should specify tileWidth, tileHeight, width & height. - * @param key The key in the Phaser cache that corresponds to the loaded tilemap data. - * @param tileWidth The width of a tile in pixels. Pass in `null` to leave as the - * default. Default 32. - * @param tileHeight The height of a tile in pixels. Pass in `null` to leave as the - * default. Default 32. - * @param width The width of the map in tiles. Pass in `null` to leave as the - * default. Default 10. - * @param height The height of the map in tiles. Pass in `null` to leave as the - * default. Default 10. - * @param data Instead of loading from the cache, you can also load directly from - * a 2D array of tile indexes. Pass in `null` for no data. - * @param insertNull Controls how empty tiles, tiles with an index of -1, in the - * map data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty - * location will get a Tile object with an index of -1. If you've a large sparsely populated map and - * the tile data doesn't need to change then setting this value to `true` will help with memory - * consumption. However if your map is small or you need to update the tiles dynamically, then leave - * the default value set. Default false. - */ - tilemap(key?: string, tileWidth?: integer, tileHeight?: integer, width?: integer, height?: integer, data?: integer[][], insertNull?: boolean): Phaser.Tilemaps.Tilemap; - - /** - * Creates a new Tween object. - * - * Note: This method will only be available if Tweens have been built into Phaser. - * @param config The Tween configuration. - */ - tween(config: Phaser.Types.Tweens.TweenBuilderConfig | object): Phaser.Tweens.Tween; - - } - /** * A Graphics object is a way to draw primitive shapes to your game. Primitives include forms of geometry, such as * Rectangles, Circles, and Polygons. They also include lines, arcs and curves. When you initially create a Graphics @@ -15957,7 +16009,7 @@ declare namespace Phaser { * As you can tell, Graphics objects are a bit of a trade-off. While they are extremely useful, you need to be careful * in their complexity and quantity of them in your game. */ - class Graphics extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible, Phaser.GameObjects.Components.ScrollFactor { + class Graphics extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible, Phaser.GameObjects.Components.ScrollFactor { /** * * @param scene The Scene to which this Graphics object belongs. @@ -16472,57 +16524,6 @@ declare namespace Phaser { */ static TargetCamera: Phaser.Cameras.Scene2D.Camera; - /** - * Clears all alpha values associated with this Game Object. - * - * Immediately sets the alpha levels back to 1 (fully opaque). - */ - clearAlpha(): this; - - /** - * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. - * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. - * - * If your game is running under WebGL you can optionally specify four different alpha values, each of which - * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. - * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. - * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. - * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. - * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. - */ - setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; - - /** - * The alpha value of the Game Object. - * - * This is a global value, impacting the entire Game Object, not just a region of it. - */ - alpha: number; - - /** - * The alpha value starting from the top-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopLeft: number; - - /** - * The alpha value starting from the top-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopRight: number; - - /** - * The alpha value starting from the bottom-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomLeft: number; - - /** - * The alpha value starting from the bottom-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomRight: number; - /** * Sets the Blend Mode being used by this Game Object. * @@ -16699,7 +16700,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -16804,6 +16807,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -18189,7 +18195,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -18294,6 +18302,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -18626,7 +18637,7 @@ declare namespace Phaser { /** * A Mesh Game Object. */ - class Mesh extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.Size, Phaser.GameObjects.Components.Texture, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible, Phaser.GameObjects.Components.ScrollFactor { + class Mesh extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.Size, Phaser.GameObjects.Components.Texture, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible, Phaser.GameObjects.Components.ScrollFactor { /** * * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. @@ -18746,84 +18757,6 @@ declare namespace Phaser { */ setDepth(value: integer): this; - /** - * Gets the center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - */ - getCenter(output?: O): O; - - /** - * Gets the top-left corner coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getTopLeft(output?: O, includeParent?: boolean): O; - - /** - * Gets the top-center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getTopCenter(output?: O, includeParent?: boolean): O; - - /** - * Gets the top-right corner coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getTopRight(output?: O, includeParent?: boolean): O; - - /** - * Gets the left-center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getLeftCenter(output?: O, includeParent?: boolean): O; - - /** - * Gets the right-center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getRightCenter(output?: O, includeParent?: boolean): O; - - /** - * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getBottomLeft(output?: O, includeParent?: boolean): O; - - /** - * Gets the bottom-center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getBottomCenter(output?: O, includeParent?: boolean): O; - - /** - * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getBottomRight(output?: O, includeParent?: boolean): O; - - /** - * Gets the bounds of this Game Object, regardless of origin. - * The values are stored and returned in a Rectangle, or Rectangle-like, object. - * @param output An object to store the values in. If not provided a new Rectangle will be created. - */ - getBounds(output?: O): O; - /** * The Mask this Game Object is using during render. */ @@ -19034,7 +18967,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -19139,6 +19074,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -20109,6 +20047,12 @@ declare namespace Phaser { */ setAlpha(value: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType): Phaser.GameObjects.Particles.ParticleEmitter; + /** + * Sets the color tint of emitted particles. + * @param value A value between 0 and 0xffffff. + */ + setTint(value: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType): Phaser.GameObjects.Particles.ParticleEmitter; + /** * Sets the angle of a {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle stream. * @param value The angle of the initial velocity of emitted particles. @@ -20241,6 +20185,11 @@ declare namespace Phaser { */ resume(): Phaser.GameObjects.Particles.ParticleEmitter; + /** + * Removes the emitter from its manager and the scene. + */ + remove(): Phaser.GameObjects.Particles.ParticleEmitter; + /** * Sorts active particles with {@link Phaser.GameObjects.Particles.ParticleEmitter#depthSortCallback}. */ @@ -20526,6 +20475,11 @@ declare namespace Phaser { */ createEmitter(config: Phaser.Types.GameObjects.Particles.ParticleEmitterConfig): Phaser.GameObjects.Particles.ParticleEmitter; + /** + * Removes a Particle Emitter from this Emitter Manager, if the Emitter belongs to this Manager. + */ + removeEmitter(emitter: Phaser.GameObjects.Particles.ParticleEmitter): Phaser.GameObjects.Particles.ParticleEmitter; + /** * Adds an existing Gravity Well object to this Emitter Manager. * @param well The Gravity Well to add to this Emitter Manager. @@ -20709,7 +20663,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -20814,6 +20770,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -21780,7 +21739,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -21885,6 +21846,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -22234,84 +22198,6 @@ declare namespace Phaser { */ setDepth(value: integer): this; - /** - * Gets the center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - */ - getCenter(output?: O): O; - - /** - * Gets the top-left corner coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getTopLeft(output?: O, includeParent?: boolean): O; - - /** - * Gets the top-center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getTopCenter(output?: O, includeParent?: boolean): O; - - /** - * Gets the top-right corner coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getTopRight(output?: O, includeParent?: boolean): O; - - /** - * Gets the left-center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getLeftCenter(output?: O, includeParent?: boolean): O; - - /** - * Gets the right-center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getRightCenter(output?: O, includeParent?: boolean): O; - - /** - * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getBottomLeft(output?: O, includeParent?: boolean): O; - - /** - * Gets the bottom-center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getBottomCenter(output?: O, includeParent?: boolean): O; - - /** - * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getBottomRight(output?: O, includeParent?: boolean): O; - - /** - * Gets the bounds of this Game Object, regardless of origin. - * The values are stored and returned in a Rectangle, or Rectangle-like, object. - * @param output An object to store the values in. If not provided a new Rectangle will be created. - */ - getBounds(output?: O): O; - /** * The Mask this Game Object is using during render. */ @@ -22507,7 +22393,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -22612,6 +22500,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -22730,7 +22621,7 @@ declare namespace Phaser { * is a technical limitation of WebGL. To get around it, create your shape as a texture in an art package, then draw that * to the Render Texture. */ - class RenderTexture extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.ComputedSize, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Tint, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { + class RenderTexture extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.ComputedSize, Phaser.GameObjects.Components.Crop, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Tint, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { /** * * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. @@ -23207,6 +23098,42 @@ declare namespace Phaser { */ setDisplaySize(width: number, height: number): this; + /** + * A boolean flag indicating if this Game Object is being cropped or not. + * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off. + * Equally, calling `setCrop` with no arguments will reset the crop and disable it. + */ + isCropped: boolean; + + /** + * Applies a crop to a texture based Game Object, such as a Sprite or Image. + * + * The crop is a rectangle that limits the area of the texture frame that is visible during rendering. + * + * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just + * changes what is shown when rendered. + * + * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left. + * + * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left + * half of it, you could call `setCrop(0, 0, 400, 600)`. + * + * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop + * an area of 200x100 when applied to a Game Object that had a scale factor of 2. + * + * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument. + * + * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`. + * + * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow + * the renderer to skip several internal calculations. + * @param x The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored. + * @param y The y coordinate to start the crop from. + * @param width The width of the crop rectangle in pixels. + * @param height The height of the crop rectangle in pixels. + */ + setCrop(x?: number | Phaser.Geom.Rectangle, y?: number, width?: number, height?: number): this; + /** * The depth of this Game Object within the Scene. * @@ -23688,7 +23615,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -23793,6 +23722,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -24548,7 +24480,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -24653,6 +24587,710 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. + * @param value The z position of this Game Object. Default 0. + */ + setZ(value?: number): this; + + /** + * Sets the w position of this Game Object. + * @param value The w position of this Game Object. Default 0. + */ + setW(value?: number): this; + + /** + * Gets the local transform matrix for this Game Object. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * @param tempMatrix The matrix to populate with the values from this Game Object. + * @param parentMatrix A temporary matrix to hold parent values during the calculations. + */ + getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Gets the sum total rotation of all of this Game Objects parent Containers. + * + * The returned value is in radians and will be zero if this Game Object has no parent container. + */ + getParentRotation(): number; + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + */ + visible: boolean; + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): this; + + } + + /** + * The Shape Game Object is a base class for the various different shapes, such as the Arc, Star or Polygon. + * You cannot add a Shape directly to your Scene, it is meant as a base for your own custom Shape classes. + */ + class Shape extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.ComputedSize, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { + /** + * + * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. + * @param type The internal type of the Shape. + * @param data The data of the source shape geometry, if any. + */ + constructor(scene: Phaser.Scene, type?: string, data?: any); + + /** + * The source Shape data. Typically a geometry object. + * You should not manipulate this directly. + */ + readonly data: any; + + /** + * Holds the polygon path data for filled rendering. + */ + readonly pathData: number[]; + + /** + * Holds the earcut polygon path index data for filled rendering. + */ + readonly pathIndexes: integer[]; + + /** + * The fill color used by this Shape. + */ + fillColor: number; + + /** + * The fill alpha value used by this Shape. + */ + fillAlpha: number; + + /** + * The stroke color used by this Shape. + */ + strokeColor: number; + + /** + * The stroke alpha value used by this Shape. + */ + strokeAlpha: number; + + /** + * The stroke line width used by this Shape. + */ + lineWidth: number; + + /** + * Controls if this Shape is filled or not. + * Note that some Shapes do not support being filled (such as Line shapes) + */ + isFilled: boolean; + + /** + * Controls if this Shape is stroked or not. + * Note that some Shapes do not support being stroked (such as Iso Box shapes) + */ + isStroked: boolean; + + /** + * Controls if this Shape path is closed during rendering when stroked. + * Note that some Shapes are always closed when stroked (such as Ellipse shapes) + */ + closePath: boolean; + + /** + * Sets the fill color and alpha for this Shape. + * + * If you wish for the Shape to not be filled then call this method with no arguments, or just set `isFilled` to `false`. + * + * Note that some Shapes do not support fill colors, such as the Line shape. + * + * This call can be chained. + * @param color The color used to fill this shape. If not provided the Shape will not be filled. + * @param alpha The alpha value used when filling this shape, if a fill color is given. Default 1. + */ + setFillStyle(color?: number, alpha?: number): this; + + /** + * Sets the stroke color and alpha for this Shape. + * + * If you wish for the Shape to not be stroked then call this method with no arguments, or just set `isStroked` to `false`. + * + * Note that some Shapes do not support being stroked, such as the Iso Box shape. + * + * This call can be chained. + * @param lineWidth The width of line to stroke with. If not provided or undefined the Shape will not be stroked. + * @param color The color used to stroke this shape. If not provided the Shape will not be stroked. + * @param alpha The alpha value used when stroking this shape, if a stroke color is given. Default 1. + */ + setStrokeStyle(lineWidth?: number, color?: number, alpha?: number): this; + + /** + * Sets if this Shape path is closed during rendering when stroked. + * Note that some Shapes are always closed when stroked (such as Ellipse shapes) + * + * This call can be chained. + * @param value Set to `true` if the Shape should be closed when stroked, otherwise `false`. + */ + setClosePath(value: boolean): this; + + /** + * Internal destroy handler, called as part of the destroy process. + */ + protected preDestroy(): void; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * * ERASE + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + */ + blendMode: Phaser.BlendModes | string; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * * ERASE (only works when rendering to a framebuffer, like a Render Texture) + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency in which blend modes + * are used. + * @param value The BlendMode value. Either a string or a CONST. + */ + setBlendMode(value: string | Phaser.BlendModes): this; + + /** + * The native (un-scaled) width of this Game Object. + * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayWidth` property. + */ + width: number; + + /** + * The native (un-scaled) height of this Game Object. + * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayHeight` property. + */ + height: number; + + /** + * The displayed width of this Game Object. + * + * This value takes into account the scale factor. + * + * Setting this value will adjust the Game Object's scale property. + */ + displayWidth: number; + + /** + * The displayed height of this Game Object. + * + * This value takes into account the scale factor. + * + * Setting this value will adjust the Game Object's scale property. + */ + displayHeight: number; + + /** + * Sets the internal size of this Game Object, as used for frame or physics body creation. + * + * This will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or call the + * `setDisplaySize` method, which is the same thing as changing the scale but allows you + * to do so by giving pixel values. + * + * If you have enabled this Game Object for input, changing the size will _not_ change the + * size of the hit area. To do this you should adjust the `input.hitArea` object directly. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setSize(width: number, height: number): this; + + /** + * Sets the display size of this Game Object. + * + * Calling this will adjust the scale. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setDisplaySize(width: number, height: number): this; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + */ + depth: number; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * @param value The depth of this Game Object. + */ + setDepth(value: integer): this; + + /** + * Gets the center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + */ + getCenter(output?: O): O; + + /** + * Gets the top-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the top-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopCenter(output?: O, includeParent?: boolean): O; + + /** + * Gets the top-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the left-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getLeftCenter(output?: O, includeParent?: boolean): O; + + /** + * Gets the right-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getRightCenter(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomCenter(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bounds of this Game Object, regardless of origin. + * The values are stored and returned in a Rectangle, or Rectangle-like, object. + * @param output An object to store the values in. If not provided a new Rectangle will be created. + */ + getBounds(output?: O): O; + + /** + * The Mask this Game Object is using during render. + */ + mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask; + + /** + * Sets the mask that this Game Object will use to render with. + * + * The mask must have been previously created and can be either a GeometryMask or a BitmapMask. + * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. + * + * If a mask is already set on this Game Object it will be immediately replaced. + * + * Masks are positioned in global space and are not relative to the Game Object to which they + * are applied. The reason for this is that multiple Game Objects can all share the same mask. + * + * Masks have no impact on physics or input detection. They are purely a rendering component + * that allows you to limit what is visible during the render pass. + * @param mask The mask this Game Object will use when rendering. + */ + setMask(mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask): this; + + /** + * Clears the mask that this Game Object was using. + * @param destroyMask Destroy the mask before clearing it? Default false. + */ + clearMask(destroyMask?: boolean): this; + + /** + * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a renderable Game Object. + * A renderable Game Object is one that uses a texture to render with, such as an + * Image, Sprite, Render Texture or BitmapText. + * + * If you do not provide a renderable object, and this Game Object has a texture, + * it will use itself as the object. This means you can call this method to create + * a Bitmap Mask from any renderable Game Object. + * @param renderable A renderable Game Object that uses a texture, such as a Sprite. + */ + createBitmapMask(renderable?: Phaser.GameObjects.GameObject): Phaser.Display.Masks.BitmapMask; + + /** + * Creates and returns a Geometry Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a Graphics Game Object. + * + * If you do not provide a graphics object, and this Game Object is an instance + * of a Graphics object, then it will use itself to create the mask. + * + * This means you can call this method to create a Geometry Mask from any Graphics Game Object. + * @param graphics A Graphics Game Object. The geometry within it will be used as the mask. + */ + createGeometryMask(graphics?: Phaser.GameObjects.Graphics): Phaser.Display.Masks.GeometryMask; + + /** + * The horizontal origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the left of the Game Object. + */ + originX: number; + + /** + * The vertical origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the top of the Game Object. + */ + originY: number; + + /** + * The horizontal display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginX: number; + + /** + * The vertical display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginY: number; + + /** + * Sets the origin of this Game Object. + * + * The values are given in the range 0 to 1. + * @param x The horizontal origin value. Default 0.5. + * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x. + */ + setOrigin(x?: number, y?: number): this; + + /** + * Sets the origin of this Game Object based on the Pivot values in its Frame. + */ + setOriginFromFrame(): this; + + /** + * Sets the display origin of this Game Object. + * The difference between this and setting the origin is that you can use pixel values for setting the display origin. + * @param x The horizontal display origin value. Default 0. + * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x. + */ + setDisplayOrigin(x?: number, y?: number): this; + + /** + * Updates the Display Origin cached values internally stored on this Game Object. + * You don't usually call this directly, but it is exposed for edge-cases where you may. + */ + updateDisplayOrigin(): this; + + /** + * The initial WebGL pipeline of this Game Object. + */ + defaultPipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * The current WebGL pipeline of this Game Object. + */ + pipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * This should only be called during the instantiation of the Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. Defaults to the Texture Tint Pipeline. Default TextureTintPipeline. + */ + initPipeline(pipelineName?: string): boolean; + + /** + * Sets the active WebGL Pipeline of this Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + setPipeline(pipelineName: string): this; + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + */ + resetPipeline(): boolean; + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + */ + getPipelineName(): string; + + /** + * The horizontal scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * + * Please be aware that scroll factor values other than 1 are not taken in to consideration when + * calculating physics collisions. Bodies always collide based on their world position, but changing + * the scroll factor is a visual adjustment to where the textures are rendered, which can offset + * them from physics bodies if not accounted for in your code. + */ + scrollFactorX: number; + + /** + * The vertical scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * + * Please be aware that scroll factor values other than 1 are not taken in to consideration when + * calculating physics collisions. Bodies always collide based on their world position, but changing + * the scroll factor is a visual adjustment to where the textures are rendered, which can offset + * them from physics bodies if not accounted for in your code. + */ + scrollFactorY: number; + + /** + * Sets the scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * + * Please be aware that scroll factor values other than 1 are not taken in to consideration when + * calculating physics collisions. Bodies always collide based on their world position, but changing + * the scroll factor is a visual adjustment to where the textures are rendered, which can offset + * them from physics bodies if not accounted for in your code. + * @param x The horizontal scroll factor of this Game Object. + * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. + */ + setScrollFactor(x: number, y?: number): this; + + /** + * The x position of this Game Object. + */ + x: number; + + /** + * The y position of this Game Object. + */ + y: number; + + /** + * The z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. + */ + z: number; + + /** + * The w position of this Game Object. + */ + w: number; + + /** + * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object + * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`. + * + * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this + * isn't the case, use the `scaleX` or `scaleY` properties instead. + */ + scale: number; + + /** + * The horizontal scale of this Game Object. + */ + scaleX: number; + + /** + * The vertical scale of this Game Object. + */ + scaleY: number; + + /** + * The angle of this Game Object as expressed in degrees. + * + * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left + * and -90 is up. + * + * If you prefer to work in radians, see the `rotation` property instead. + */ + angle: integer; + + /** + * The angle of this Game Object in radians. + * + * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left + * and -90 is up. + * + * If you prefer to work in degrees, see the `angle` property instead. + */ + rotation: number; + + /** + * Sets the position of this Game Object. + * @param x The x position of this Game Object. Default 0. + * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. + * @param z The z position of this Game Object. Default 0. + * @param w The w position of this Game Object. Default 0. + */ + setPosition(x?: number, y?: number, z?: number, w?: number): this; + + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * @param x The x position of the top-left of the random area. Default 0. + * @param y The y position of the top-left of the random area. Default 0. + * @param width The width of the random area. + * @param height The height of the random area. + */ + setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; + + /** + * Sets the rotation of this Game Object. + * @param radians The rotation of this Game Object, in radians. Default 0. + */ + setRotation(radians?: number): this; + + /** + * Sets the angle of this Game Object. + * @param degrees The rotation of this Game Object, in degrees. Default 0. + */ + setAngle(degrees?: number): this; + + /** + * Sets the scale of this Game Object. + * @param x The horizontal scale of this Game Object. + * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. + */ + setScale(x: number, y?: number): this; + + /** + * Sets the x position of this Game Object. + * @param value The x position of this Game Object. Default 0. + */ + setX(value?: number): this; + + /** + * Sets the y position of this Game Object. + * @param value The y position of this Game Object. Default 0. + */ + setY(value?: number): this; + + /** + * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -24789,57 +25427,6 @@ declare namespace Phaser { */ setEndAngle(value: integer): this; - /** - * Clears all alpha values associated with this Game Object. - * - * Immediately sets the alpha levels back to 1 (fully opaque). - */ - clearAlpha(): this; - - /** - * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. - * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. - * - * If your game is running under WebGL you can optionally specify four different alpha values, each of which - * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. - * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. - * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. - * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. - * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. - */ - setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; - - /** - * The alpha value of the Game Object. - * - * This is a global value, impacting the entire Game Object, not just a region of it. - */ - alpha: number; - - /** - * The alpha value starting from the top-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopLeft: number; - - /** - * The alpha value starting from the top-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopRight: number; - - /** - * The alpha value starting from the bottom-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomLeft: number; - - /** - * The alpha value starting from the bottom-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomRight: number; - /** * Sets the Blend Mode being used by this Game Object. * @@ -25271,7 +25858,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -25376,6 +25965,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -25465,57 +26057,6 @@ declare namespace Phaser { */ setSmoothness(value: integer): this; - /** - * Clears all alpha values associated with this Game Object. - * - * Immediately sets the alpha levels back to 1 (fully opaque). - */ - clearAlpha(): this; - - /** - * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. - * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. - * - * If your game is running under WebGL you can optionally specify four different alpha values, each of which - * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. - * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. - * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. - * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. - * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. - */ - setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; - - /** - * The alpha value of the Game Object. - * - * This is a global value, impacting the entire Game Object, not just a region of it. - */ - alpha: number; - - /** - * The alpha value starting from the top-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopLeft: number; - - /** - * The alpha value starting from the top-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopRight: number; - - /** - * The alpha value starting from the bottom-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomLeft: number; - - /** - * The alpha value starting from the bottom-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomRight: number; - /** * Sets the Blend Mode being used by this Game Object. * @@ -25947,7 +26488,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -26052,6 +26595,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -26151,57 +26697,6 @@ declare namespace Phaser { */ setSmoothness(value: integer): this; - /** - * Clears all alpha values associated with this Game Object. - * - * Immediately sets the alpha levels back to 1 (fully opaque). - */ - clearAlpha(): this; - - /** - * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. - * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. - * - * If your game is running under WebGL you can optionally specify four different alpha values, each of which - * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. - * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. - * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. - * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. - * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. - */ - setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; - - /** - * The alpha value of the Game Object. - * - * This is a global value, impacting the entire Game Object, not just a region of it. - */ - alpha: number; - - /** - * The alpha value starting from the top-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopLeft: number; - - /** - * The alpha value starting from the top-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopRight: number; - - /** - * The alpha value starting from the bottom-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomLeft: number; - - /** - * The alpha value starting from the bottom-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomRight: number; - /** * Sets the Blend Mode being used by this Game Object. * @@ -26618,7 +27113,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -26723,6 +27220,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -26892,57 +27392,6 @@ declare namespace Phaser { */ setOutlineStyle(fillColor?: number, fillAlpha?: number): this; - /** - * Clears all alpha values associated with this Game Object. - * - * Immediately sets the alpha levels back to 1 (fully opaque). - */ - clearAlpha(): this; - - /** - * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. - * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. - * - * If your game is running under WebGL you can optionally specify four different alpha values, each of which - * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. - * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. - * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. - * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. - * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. - */ - setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; - - /** - * The alpha value of the Game Object. - * - * This is a global value, impacting the entire Game Object, not just a region of it. - */ - alpha: number; - - /** - * The alpha value starting from the top-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopLeft: number; - - /** - * The alpha value starting from the top-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopRight: number; - - /** - * The alpha value starting from the bottom-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomLeft: number; - - /** - * The alpha value starting from the bottom-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomRight: number; - /** * Sets the Blend Mode being used by this Game Object. * @@ -27374,7 +27823,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -27479,6 +27930,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -27615,57 +28069,6 @@ declare namespace Phaser { */ setFillStyle(fillTop?: number, fillLeft?: number, fillRight?: number): this; - /** - * Clears all alpha values associated with this Game Object. - * - * Immediately sets the alpha levels back to 1 (fully opaque). - */ - clearAlpha(): this; - - /** - * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. - * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. - * - * If your game is running under WebGL you can optionally specify four different alpha values, each of which - * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. - * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. - * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. - * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. - * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. - */ - setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; - - /** - * The alpha value of the Game Object. - * - * This is a global value, impacting the entire Game Object, not just a region of it. - */ - alpha: number; - - /** - * The alpha value starting from the top-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopLeft: number; - - /** - * The alpha value starting from the top-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopRight: number; - - /** - * The alpha value starting from the bottom-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomLeft: number; - - /** - * The alpha value starting from the bottom-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomRight: number; - /** * Sets the Blend Mode being used by this Game Object. * @@ -28097,7 +28500,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -28202,6 +28607,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -28352,57 +28760,6 @@ declare namespace Phaser { */ setFillStyle(fillTop?: number, fillLeft?: number, fillRight?: number): this; - /** - * Clears all alpha values associated with this Game Object. - * - * Immediately sets the alpha levels back to 1 (fully opaque). - */ - clearAlpha(): this; - - /** - * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. - * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. - * - * If your game is running under WebGL you can optionally specify four different alpha values, each of which - * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. - * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. - * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. - * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. - * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. - */ - setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; - - /** - * The alpha value of the Game Object. - * - * This is a global value, impacting the entire Game Object, not just a region of it. - */ - alpha: number; - - /** - * The alpha value starting from the top-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopLeft: number; - - /** - * The alpha value starting from the top-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopRight: number; - - /** - * The alpha value starting from the bottom-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomLeft: number; - - /** - * The alpha value starting from the bottom-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomRight: number; - /** * Sets the Blend Mode being used by this Game Object. * @@ -28834,7 +29191,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -28939,6 +29298,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -29045,57 +29407,6 @@ declare namespace Phaser { */ setTo(x1?: number, y1?: number, x2?: number, y2?: number): this; - /** - * Clears all alpha values associated with this Game Object. - * - * Immediately sets the alpha levels back to 1 (fully opaque). - */ - clearAlpha(): this; - - /** - * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. - * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. - * - * If your game is running under WebGL you can optionally specify four different alpha values, each of which - * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. - * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. - * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. - * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. - * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. - */ - setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; - - /** - * The alpha value of the Game Object. - * - * This is a global value, impacting the entire Game Object, not just a region of it. - */ - alpha: number; - - /** - * The alpha value starting from the top-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopLeft: number; - - /** - * The alpha value starting from the top-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopRight: number; - - /** - * The alpha value starting from the bottom-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomLeft: number; - - /** - * The alpha value starting from the bottom-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomRight: number; - /** * Sets the Blend Mode being used by this Game Object. * @@ -29527,7 +29838,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -29632,6 +29945,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -29719,57 +30035,6 @@ declare namespace Phaser { */ smooth(iterations?: integer): this; - /** - * Clears all alpha values associated with this Game Object. - * - * Immediately sets the alpha levels back to 1 (fully opaque). - */ - clearAlpha(): this; - - /** - * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. - * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. - * - * If your game is running under WebGL you can optionally specify four different alpha values, each of which - * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. - * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. - * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. - * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. - * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. - */ - setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; - - /** - * The alpha value of the Game Object. - * - * This is a global value, impacting the entire Game Object, not just a region of it. - */ - alpha: number; - - /** - * The alpha value starting from the top-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopLeft: number; - - /** - * The alpha value starting from the top-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopRight: number; - - /** - * The alpha value starting from the bottom-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomLeft: number; - - /** - * The alpha value starting from the bottom-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomRight: number; - /** * Sets the Blend Mode being used by this Game Object. * @@ -30201,7 +30466,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -30306,6 +30573,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -30376,57 +30646,6 @@ declare namespace Phaser { */ constructor(scene: Phaser.Scene, x: number, y: number, width?: number, height?: number, fillColor?: number, fillAlpha?: number); - /** - * Clears all alpha values associated with this Game Object. - * - * Immediately sets the alpha levels back to 1 (fully opaque). - */ - clearAlpha(): this; - - /** - * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. - * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. - * - * If your game is running under WebGL you can optionally specify four different alpha values, each of which - * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. - * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. - * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. - * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. - * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. - */ - setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; - - /** - * The alpha value of the Game Object. - * - * This is a global value, impacting the entire Game Object, not just a region of it. - */ - alpha: number; - - /** - * The alpha value starting from the top-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopLeft: number; - - /** - * The alpha value starting from the top-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopRight: number; - - /** - * The alpha value starting from the bottom-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomLeft: number; - - /** - * The alpha value starting from the bottom-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomRight: number; - /** * Sets the Blend Mode being used by this Game Object. * @@ -30858,7 +31077,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -30963,753 +31184,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. - * @param value The z position of this Game Object. Default 0. - */ - setZ(value?: number): this; - - /** - * Sets the w position of this Game Object. - * @param value The w position of this Game Object. Default 0. - */ - setW(value?: number): this; - - /** - * Gets the local transform matrix for this Game Object. - * @param tempMatrix The matrix to populate with the values from this Game Object. - */ - getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; - - /** - * Gets the world transform matrix for this Game Object, factoring in any parent Containers. - * @param tempMatrix The matrix to populate with the values from this Game Object. - * @param parentMatrix A temporary matrix to hold parent values during the calculations. - */ - getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; - - /** - * Gets the sum total rotation of all of this Game Objects parent Containers. * - * The returned value is in radians and will be zero if this Game Object has no parent container. - */ - getParentRotation(): number; - - /** - * The visible state of the Game Object. - * - * An invisible Game Object will skip rendering, but will still process update logic. - */ - visible: boolean; - - /** - * Sets the visibility of this Game Object. - * - * An invisible Game Object will skip rendering, but will still process update logic. - * @param value The visible state of the Game Object. - */ - setVisible(value: boolean): this; - - } - - /** - * The Shape Game Object is a base class for the various different shapes, such as the Arc, Star or Polygon. - * You cannot add a Shape directly to your Scene, it is meant as a base for your own custom Shape classes. - */ - class Shape extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.ComputedSize, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { - /** - * - * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. - * @param type The internal type of the Shape. - * @param data The data of the source shape geometry, if any. - */ - constructor(scene: Phaser.Scene, type?: string, data?: any); - - /** - * The source Shape data. Typically a geometry object. - * You should not manipulate this directly. - */ - readonly data: any; - - /** - * Holds the polygon path data for filled rendering. - */ - readonly pathData: number[]; - - /** - * Holds the earcut polygon path index data for filled rendering. - */ - readonly pathIndexes: integer[]; - - /** - * The fill color used by this Shape. - */ - fillColor: number; - - /** - * The fill alpha value used by this Shape. - */ - fillAlpha: number; - - /** - * The stroke color used by this Shape. - */ - strokeColor: number; - - /** - * The stroke alpha value used by this Shape. - */ - strokeAlpha: number; - - /** - * The stroke line width used by this Shape. - */ - lineWidth: number; - - /** - * Controls if this Shape is filled or not. - * Note that some Shapes do not support being filled (such as Line shapes) - */ - isFilled: boolean; - - /** - * Controls if this Shape is stroked or not. - * Note that some Shapes do not support being stroked (such as Iso Box shapes) - */ - isStroked: boolean; - - /** - * Controls if this Shape path is closed during rendering when stroked. - * Note that some Shapes are always closed when stroked (such as Ellipse shapes) - */ - closePath: boolean; - - /** - * Sets the fill color and alpha for this Shape. - * - * If you wish for the Shape to not be filled then call this method with no arguments, or just set `isFilled` to `false`. - * - * Note that some Shapes do not support fill colors, such as the Line shape. - * - * This call can be chained. - * @param color The color used to fill this shape. If not provided the Shape will not be filled. - * @param alpha The alpha value used when filling this shape, if a fill color is given. Default 1. - */ - setFillStyle(color?: number, alpha?: number): this; - - /** - * Sets the stroke color and alpha for this Shape. - * - * If you wish for the Shape to not be stroked then call this method with no arguments, or just set `isStroked` to `false`. - * - * Note that some Shapes do not support being stroked, such as the Iso Box shape. - * - * This call can be chained. - * @param lineWidth The width of line to stroke with. If not provided or undefined the Shape will not be stroked. - * @param color The color used to stroke this shape. If not provided the Shape will not be stroked. - * @param alpha The alpha value used when stroking this shape, if a stroke color is given. Default 1. - */ - setStrokeStyle(lineWidth?: number, color?: number, alpha?: number): this; - - /** - * Sets if this Shape path is closed during rendering when stroked. - * Note that some Shapes are always closed when stroked (such as Ellipse shapes) - * - * This call can be chained. - * @param value Set to `true` if the Shape should be closed when stroked, otherwise `false`. - */ - setClosePath(value: boolean): this; - - /** - * Internal destroy handler, called as part of the destroy process. - */ - protected preDestroy(): void; - - /** - * Clears all alpha values associated with this Game Object. - * - * Immediately sets the alpha levels back to 1 (fully opaque). - */ - clearAlpha(): this; - - /** - * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. - * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. - * - * If your game is running under WebGL you can optionally specify four different alpha values, each of which - * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. - * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. - * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. - * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. - * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. - */ - setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; - - /** - * The alpha value of the Game Object. - * - * This is a global value, impacting the entire Game Object, not just a region of it. - */ - alpha: number; - - /** - * The alpha value starting from the top-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopLeft: number; - - /** - * The alpha value starting from the top-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopRight: number; - - /** - * The alpha value starting from the bottom-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomLeft: number; - - /** - * The alpha value starting from the bottom-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomRight: number; - - /** - * Sets the Blend Mode being used by this Game Object. - * - * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) - * - * Under WebGL only the following Blend Modes are available: - * - * * ADD - * * MULTIPLY - * * SCREEN - * * ERASE - * - * Canvas has more available depending on browser support. - * - * You can also create your own custom Blend Modes in WebGL. - * - * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending - * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these - * reasons try to be careful about the construction of your Scene and the frequency of which blend modes - * are used. - */ - blendMode: Phaser.BlendModes | string; - - /** - * Sets the Blend Mode being used by this Game Object. - * - * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) - * - * Under WebGL only the following Blend Modes are available: - * - * * ADD - * * MULTIPLY - * * SCREEN - * * ERASE (only works when rendering to a framebuffer, like a Render Texture) - * - * Canvas has more available depending on browser support. - * - * You can also create your own custom Blend Modes in WebGL. - * - * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending - * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these - * reasons try to be careful about the construction of your Scene and the frequency in which blend modes - * are used. - * @param value The BlendMode value. Either a string or a CONST. - */ - setBlendMode(value: string | Phaser.BlendModes): this; - - /** - * The native (un-scaled) width of this Game Object. - * - * Changing this value will not change the size that the Game Object is rendered in-game. - * For that you need to either set the scale of the Game Object (`setScale`) or use - * the `displayWidth` property. - */ - width: number; - - /** - * The native (un-scaled) height of this Game Object. - * - * Changing this value will not change the size that the Game Object is rendered in-game. - * For that you need to either set the scale of the Game Object (`setScale`) or use - * the `displayHeight` property. - */ - height: number; - - /** - * The displayed width of this Game Object. - * - * This value takes into account the scale factor. - * - * Setting this value will adjust the Game Object's scale property. - */ - displayWidth: number; - - /** - * The displayed height of this Game Object. - * - * This value takes into account the scale factor. - * - * Setting this value will adjust the Game Object's scale property. - */ - displayHeight: number; - - /** - * Sets the internal size of this Game Object, as used for frame or physics body creation. - * - * This will not change the size that the Game Object is rendered in-game. - * For that you need to either set the scale of the Game Object (`setScale`) or call the - * `setDisplaySize` method, which is the same thing as changing the scale but allows you - * to do so by giving pixel values. - * - * If you have enabled this Game Object for input, changing the size will _not_ change the - * size of the hit area. To do this you should adjust the `input.hitArea` object directly. - * @param width The width of this Game Object. - * @param height The height of this Game Object. - */ - setSize(width: number, height: number): this; - - /** - * Sets the display size of this Game Object. - * - * Calling this will adjust the scale. - * @param width The width of this Game Object. - * @param height The height of this Game Object. - */ - setDisplaySize(width: number, height: number): this; - - /** - * The depth of this Game Object within the Scene. - * - * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order - * of Game Objects, without actually moving their position in the display list. - * - * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth - * value will always render in front of one with a lower value. - * - * Setting the depth will queue a depth sort event within the Scene. - */ - depth: number; - - /** - * The depth of this Game Object within the Scene. - * - * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order - * of Game Objects, without actually moving their position in the display list. - * - * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth - * value will always render in front of one with a lower value. - * - * Setting the depth will queue a depth sort event within the Scene. - * @param value The depth of this Game Object. - */ - setDepth(value: integer): this; - - /** - * Gets the center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - */ - getCenter(output?: O): O; - - /** - * Gets the top-left corner coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getTopLeft(output?: O, includeParent?: boolean): O; - - /** - * Gets the top-center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getTopCenter(output?: O, includeParent?: boolean): O; - - /** - * Gets the top-right corner coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getTopRight(output?: O, includeParent?: boolean): O; - - /** - * Gets the left-center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getLeftCenter(output?: O, includeParent?: boolean): O; - - /** - * Gets the right-center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getRightCenter(output?: O, includeParent?: boolean): O; - - /** - * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getBottomLeft(output?: O, includeParent?: boolean): O; - - /** - * Gets the bottom-center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getBottomCenter(output?: O, includeParent?: boolean): O; - - /** - * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getBottomRight(output?: O, includeParent?: boolean): O; - - /** - * Gets the bounds of this Game Object, regardless of origin. - * The values are stored and returned in a Rectangle, or Rectangle-like, object. - * @param output An object to store the values in. If not provided a new Rectangle will be created. - */ - getBounds(output?: O): O; - - /** - * The Mask this Game Object is using during render. - */ - mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask; - - /** - * Sets the mask that this Game Object will use to render with. - * - * The mask must have been previously created and can be either a GeometryMask or a BitmapMask. - * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. - * - * If a mask is already set on this Game Object it will be immediately replaced. - * - * Masks are positioned in global space and are not relative to the Game Object to which they - * are applied. The reason for this is that multiple Game Objects can all share the same mask. - * - * Masks have no impact on physics or input detection. They are purely a rendering component - * that allows you to limit what is visible during the render pass. - * @param mask The mask this Game Object will use when rendering. - */ - setMask(mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask): this; - - /** - * Clears the mask that this Game Object was using. - * @param destroyMask Destroy the mask before clearing it? Default false. - */ - clearMask(destroyMask?: boolean): this; - - /** - * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, - * including this one. - * - * To create the mask you need to pass in a reference to a renderable Game Object. - * A renderable Game Object is one that uses a texture to render with, such as an - * Image, Sprite, Render Texture or BitmapText. - * - * If you do not provide a renderable object, and this Game Object has a texture, - * it will use itself as the object. This means you can call this method to create - * a Bitmap Mask from any renderable Game Object. - * @param renderable A renderable Game Object that uses a texture, such as a Sprite. - */ - createBitmapMask(renderable?: Phaser.GameObjects.GameObject): Phaser.Display.Masks.BitmapMask; - - /** - * Creates and returns a Geometry Mask. This mask can be used by any Game Object, - * including this one. - * - * To create the mask you need to pass in a reference to a Graphics Game Object. - * - * If you do not provide a graphics object, and this Game Object is an instance - * of a Graphics object, then it will use itself to create the mask. - * - * This means you can call this method to create a Geometry Mask from any Graphics Game Object. - * @param graphics A Graphics Game Object. The geometry within it will be used as the mask. - */ - createGeometryMask(graphics?: Phaser.GameObjects.Graphics): Phaser.Display.Masks.GeometryMask; - - /** - * The horizontal origin of this Game Object. - * The origin maps the relationship between the size and position of the Game Object. - * The default value is 0.5, meaning all Game Objects are positioned based on their center. - * Setting the value to 0 means the position now relates to the left of the Game Object. - */ - originX: number; - - /** - * The vertical origin of this Game Object. - * The origin maps the relationship between the size and position of the Game Object. - * The default value is 0.5, meaning all Game Objects are positioned based on their center. - * Setting the value to 0 means the position now relates to the top of the Game Object. - */ - originY: number; - - /** - * The horizontal display origin of this Game Object. - * The origin is a normalized value between 0 and 1. - * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. - */ - displayOriginX: number; - - /** - * The vertical display origin of this Game Object. - * The origin is a normalized value between 0 and 1. - * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. - */ - displayOriginY: number; - - /** - * Sets the origin of this Game Object. - * - * The values are given in the range 0 to 1. - * @param x The horizontal origin value. Default 0.5. - * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x. - */ - setOrigin(x?: number, y?: number): this; - - /** - * Sets the origin of this Game Object based on the Pivot values in its Frame. - */ - setOriginFromFrame(): this; - - /** - * Sets the display origin of this Game Object. - * The difference between this and setting the origin is that you can use pixel values for setting the display origin. - * @param x The horizontal display origin value. Default 0. - * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x. - */ - setDisplayOrigin(x?: number, y?: number): this; - - /** - * Updates the Display Origin cached values internally stored on this Game Object. - * You don't usually call this directly, but it is exposed for edge-cases where you may. - */ - updateDisplayOrigin(): this; - - /** - * The initial WebGL pipeline of this Game Object. - */ - defaultPipeline: Phaser.Renderer.WebGL.WebGLPipeline; - - /** - * The current WebGL pipeline of this Game Object. - */ - pipeline: Phaser.Renderer.WebGL.WebGLPipeline; - - /** - * Sets the initial WebGL Pipeline of this Game Object. - * This should only be called during the instantiation of the Game Object. - * @param pipelineName The name of the pipeline to set on this Game Object. Defaults to the Texture Tint Pipeline. Default TextureTintPipeline. - */ - initPipeline(pipelineName?: string): boolean; - - /** - * Sets the active WebGL Pipeline of this Game Object. - * @param pipelineName The name of the pipeline to set on this Game Object. - */ - setPipeline(pipelineName: string): this; - - /** - * Resets the WebGL Pipeline of this Game Object back to the default it was created with. - */ - resetPipeline(): boolean; - - /** - * Gets the name of the WebGL Pipeline this Game Object is currently using. - */ - getPipelineName(): string; - - /** - * The horizontal scroll factor of this Game Object. - * - * The scroll factor controls the influence of the movement of a Camera upon this Game Object. - * - * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. - * It does not change the Game Objects actual position values. - * - * A value of 1 means it will move exactly in sync with a camera. - * A value of 0 means it will not move at all, even if the camera moves. - * Other values control the degree to which the camera movement is mapped to this Game Object. - * - * Please be aware that scroll factor values other than 1 are not taken in to consideration when - * calculating physics collisions. Bodies always collide based on their world position, but changing - * the scroll factor is a visual adjustment to where the textures are rendered, which can offset - * them from physics bodies if not accounted for in your code. - */ - scrollFactorX: number; - - /** - * The vertical scroll factor of this Game Object. - * - * The scroll factor controls the influence of the movement of a Camera upon this Game Object. - * - * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. - * It does not change the Game Objects actual position values. - * - * A value of 1 means it will move exactly in sync with a camera. - * A value of 0 means it will not move at all, even if the camera moves. - * Other values control the degree to which the camera movement is mapped to this Game Object. - * - * Please be aware that scroll factor values other than 1 are not taken in to consideration when - * calculating physics collisions. Bodies always collide based on their world position, but changing - * the scroll factor is a visual adjustment to where the textures are rendered, which can offset - * them from physics bodies if not accounted for in your code. - */ - scrollFactorY: number; - - /** - * Sets the scroll factor of this Game Object. - * - * The scroll factor controls the influence of the movement of a Camera upon this Game Object. - * - * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. - * It does not change the Game Objects actual position values. - * - * A value of 1 means it will move exactly in sync with a camera. - * A value of 0 means it will not move at all, even if the camera moves. - * Other values control the degree to which the camera movement is mapped to this Game Object. - * - * Please be aware that scroll factor values other than 1 are not taken in to consideration when - * calculating physics collisions. Bodies always collide based on their world position, but changing - * the scroll factor is a visual adjustment to where the textures are rendered, which can offset - * them from physics bodies if not accounted for in your code. - * @param x The horizontal scroll factor of this Game Object. - * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. - */ - setScrollFactor(x: number, y?: number): this; - - /** - * The x position of this Game Object. - */ - x: number; - - /** - * The y position of this Game Object. - */ - y: number; - - /** - * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. - */ - z: number; - - /** - * The w position of this Game Object. - */ - w: number; - - /** - * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object - * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`. - * - * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this - * isn't the case, use the `scaleX` or `scaleY` properties instead. - */ - scale: number; - - /** - * The horizontal scale of this Game Object. - */ - scaleX: number; - - /** - * The vertical scale of this Game Object. - */ - scaleY: number; - - /** - * The angle of this Game Object as expressed in degrees. - * - * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left - * and -90 is up. - * - * If you prefer to work in radians, see the `rotation` property instead. - */ - angle: integer; - - /** - * The angle of this Game Object in radians. - * - * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left - * and -90 is up. - * - * If you prefer to work in degrees, see the `angle` property instead. - */ - rotation: number; - - /** - * Sets the position of this Game Object. - * @param x The x position of this Game Object. Default 0. - * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. - * @param z The z position of this Game Object. Default 0. - * @param w The w position of this Game Object. Default 0. - */ - setPosition(x?: number, y?: number, z?: number, w?: number): this; - - /** - * Sets the position of this Game Object to be a random position within the confines of - * the given area. - * - * If no area is specified a random position between 0 x 0 and the game width x height is used instead. - * - * The position does not factor in the size of this Game Object, meaning that only the origin is - * guaranteed to be within the area. - * @param x The x position of the top-left of the random area. Default 0. - * @param y The y position of the top-left of the random area. Default 0. - * @param width The width of the random area. - * @param height The height of the random area. - */ - setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; - - /** - * Sets the rotation of this Game Object. - * @param radians The rotation of this Game Object, in radians. Default 0. - */ - setRotation(radians?: number): this; - - /** - * Sets the angle of this Game Object. - * @param degrees The rotation of this Game Object, in degrees. Default 0. - */ - setAngle(degrees?: number): this; - - /** - * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. - * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. - */ - setScale(x: number, y?: number): this; - - /** - * Sets the x position of this Game Object. - * @param value The x position of this Game Object. Default 0. - */ - setX(value?: number): this; - - /** - * Sets the y position of this Game Object. - * @param value The y position of this Game Object. Default 0. - */ - setY(value?: number): this; - - /** - * Sets the z position of this Game Object. + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -31823,57 +31300,6 @@ declare namespace Phaser { */ outerRadius: number; - /** - * Clears all alpha values associated with this Game Object. - * - * Immediately sets the alpha levels back to 1 (fully opaque). - */ - clearAlpha(): this; - - /** - * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. - * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. - * - * If your game is running under WebGL you can optionally specify four different alpha values, each of which - * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. - * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. - * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. - * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. - * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. - */ - setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; - - /** - * The alpha value of the Game Object. - * - * This is a global value, impacting the entire Game Object, not just a region of it. - */ - alpha: number; - - /** - * The alpha value starting from the top-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopLeft: number; - - /** - * The alpha value starting from the top-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopRight: number; - - /** - * The alpha value starting from the bottom-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomLeft: number; - - /** - * The alpha value starting from the bottom-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomRight: number; - /** * Sets the Blend Mode being used by this Game Object. * @@ -32305,7 +31731,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -32410,6 +31838,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -32497,57 +31928,6 @@ declare namespace Phaser { */ setTo(x1?: number, y1?: number, x2?: number, y2?: number, x3?: number, y3?: number): this; - /** - * Clears all alpha values associated with this Game Object. - * - * Immediately sets the alpha levels back to 1 (fully opaque). - */ - clearAlpha(): this; - - /** - * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. - * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. - * - * If your game is running under WebGL you can optionally specify four different alpha values, each of which - * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. - * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. - * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. - * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. - * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. - */ - setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; - - /** - * The alpha value of the Game Object. - * - * This is a global value, impacting the entire Game Object, not just a region of it. - */ - alpha: number; - - /** - * The alpha value starting from the top-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopLeft: number; - - /** - * The alpha value starting from the top-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopRight: number; - - /** - * The alpha value starting from the bottom-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomLeft: number; - - /** - * The alpha value starting from the bottom-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomRight: number; - /** * Sets the Blend Mode being used by this Game Object. * @@ -32979,7 +32359,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -33084,6 +32466,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -33901,7 +33286,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -34006,6 +33393,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -34053,6 +33443,359 @@ declare namespace Phaser { } + /** + * A TextStyle class manages all of the style settings for a Text object. + * + * Text Game Objects create a TextStyle instance automatically, which is + * accessed via the `Text.style` property. You do not normally need to + * instantiate one yourself. + */ + class TextStyle { + /** + * + * @param text The Text object that this TextStyle is styling. + * @param style The style settings to set. + */ + constructor(text: Phaser.GameObjects.Text, style: Phaser.Types.GameObjects.Text.TextStyle); + + /** + * The Text object that this TextStyle is styling. + */ + parent: Phaser.GameObjects.Text; + + /** + * The font family. + */ + fontFamily: string; + + /** + * The font size. + */ + fontSize: string; + + /** + * The font style. + */ + fontStyle: string; + + /** + * The background color. + */ + backgroundColor: string; + + /** + * The text fill color. + */ + color: string; + + /** + * The text stroke color. + */ + stroke: string; + + /** + * The text stroke thickness. + */ + strokeThickness: number; + + /** + * The horizontal shadow offset. + */ + shadowOffsetX: number; + + /** + * The vertical shadow offset. + */ + shadowOffsetY: number; + + /** + * The shadow color. + */ + shadowColor: string; + + /** + * The shadow blur radius. + */ + shadowBlur: number; + + /** + * Whether shadow stroke is enabled or not. + */ + shadowStroke: boolean; + + /** + * Whether shadow fill is enabled or not. + */ + shadowFill: boolean; + + /** + * The text alignment. + */ + align: string; + + /** + * The maximum number of lines to draw. + */ + maxLines: integer; + + /** + * The fixed width of the text. + * + * `0` means no fixed with. + */ + fixedWidth: number; + + /** + * The fixed height of the text. + * + * `0` means no fixed height. + */ + fixedHeight: number; + + /** + * The resolution the text is rendered to its internal canvas at. + * The default is 0, which means it will use the resolution set in the Game Config. + */ + resolution: number; + + /** + * Whether the text should render right to left. + */ + rtl: boolean; + + /** + * The test string to use when measuring the font. + */ + testString: string; + + /** + * The amount of horizontal padding added to the width of the text when calculating the font metrics. + */ + baselineX: number; + + /** + * The amount of vertical padding added to the height of the text when calculating the font metrics. + */ + baselineY: number; + + /** + * Set the text style. + * @param style The style settings to set. + * @param updateText Whether to update the text immediately. Default true. + * @param setDefaults Use the default values is not set, or the local values. Default false. + */ + setStyle(style: Phaser.Types.GameObjects.Text.TextStyle, updateText?: boolean, setDefaults?: boolean): Phaser.GameObjects.Text; + + /** + * Synchronize the font settings to the given Canvas Rendering Context. + * @param canvas The Canvas Element. + * @param context The Canvas Rendering Context. + */ + syncFont(canvas: HTMLCanvasElement, context: CanvasRenderingContext2D): void; + + /** + * Synchronize the text style settings to the given Canvas Rendering Context. + * @param canvas The Canvas Element. + * @param context The Canvas Rendering Context. + */ + syncStyle(canvas: HTMLCanvasElement, context: CanvasRenderingContext2D): void; + + /** + * Synchronize the shadow settings to the given Canvas Rendering Context. + * @param context The Canvas Rendering Context. + * @param enabled Whether shadows are enabled or not. + */ + syncShadow(context: CanvasRenderingContext2D, enabled: boolean): void; + + /** + * Update the style settings for the parent Text object. + * @param recalculateMetrics Whether to recalculate font and text metrics. + */ + update(recalculateMetrics: boolean): Phaser.GameObjects.Text; + + /** + * Set the font. + * + * If a string is given, the font family is set. + * + * If an object is given, the `fontFamily`, `fontSize` and `fontStyle` + * properties of that object are set. + * @param font The font family or font settings to set. + * @param updateText Whether to update the text immediately. Default true. + */ + setFont(font: string | object, updateText?: boolean): Phaser.GameObjects.Text; + + /** + * Set the font family. + * @param family The font family. + */ + setFontFamily(family: string): Phaser.GameObjects.Text; + + /** + * Set the font style. + * @param style The font style. + */ + setFontStyle(style: string): Phaser.GameObjects.Text; + + /** + * Set the font size. + * @param size The font size. + */ + setFontSize(size: number | string): Phaser.GameObjects.Text; + + /** + * Set the test string to use when measuring the font. + * @param string The test string to use when measuring the font. + */ + setTestString(string: string): Phaser.GameObjects.Text; + + /** + * Set a fixed width and height for the text. + * + * Pass in `0` for either of these parameters to disable fixed width or height respectively. + * @param width The fixed width to set. + * @param height The fixed height to set. + */ + setFixedSize(width: number, height: number): Phaser.GameObjects.Text; + + /** + * Set the background color. + * @param color The background color. + */ + setBackgroundColor(color: string): Phaser.GameObjects.Text; + + /** + * Set the text fill color. + * @param color The text fill color. + */ + setFill(color: string): Phaser.GameObjects.Text; + + /** + * Set the text fill color. + * @param color The text fill color. + */ + setColor(color: string): Phaser.GameObjects.Text; + + /** + * Set the resolution used by the Text object. + * + * By default it will be set to match the resolution set in the Game Config, + * but you can override it via this method. It allows for much clearer text on High DPI devices, + * at the cost of memory because it uses larger internal Canvas textures for the Text. + * + * Please use with caution, as the more high res Text you have, the more memory it uses up. + * @param value The resolution for this Text object to use. + */ + setResolution(value: number): Phaser.GameObjects.Text; + + /** + * Set the stroke settings. + * @param color The stroke color. + * @param thickness The stroke thickness. + */ + setStroke(color: string, thickness: number): Phaser.GameObjects.Text; + + /** + * Set the shadow settings. + * + * Calling this method always re-measures the parent Text object, + * so only call it when you actually change the shadow settings. + * @param x The horizontal shadow offset. Default 0. + * @param y The vertical shadow offset. Default 0. + * @param color The shadow color. Default '#000'. + * @param blur The shadow blur radius. Default 0. + * @param shadowStroke Whether to stroke the shadow. Default false. + * @param shadowFill Whether to fill the shadow. Default true. + */ + setShadow(x?: number, y?: number, color?: string, blur?: number, shadowStroke?: boolean, shadowFill?: boolean): Phaser.GameObjects.Text; + + /** + * Set the shadow offset. + * @param x The horizontal shadow offset. Default 0. + * @param y The vertical shadow offset. Default 0. + */ + setShadowOffset(x?: number, y?: number): Phaser.GameObjects.Text; + + /** + * Set the shadow color. + * @param color The shadow color. Default '#000'. + */ + setShadowColor(color?: string): Phaser.GameObjects.Text; + + /** + * Set the shadow blur radius. + * @param blur The shadow blur radius. Default 0. + */ + setShadowBlur(blur?: number): Phaser.GameObjects.Text; + + /** + * Enable or disable shadow stroke. + * @param enabled Whether shadow stroke is enabled or not. + */ + setShadowStroke(enabled: boolean): Phaser.GameObjects.Text; + + /** + * Enable or disable shadow fill. + * @param enabled Whether shadow fill is enabled or not. + */ + setShadowFill(enabled: boolean): Phaser.GameObjects.Text; + + /** + * Set the width (in pixels) to use for wrapping lines. + * + * Pass in null to remove wrapping by width. + * @param width The maximum width of a line in pixels. Set to null to remove wrapping. + * @param useAdvancedWrap Whether or not to use the advanced wrapping + * algorithm. If true, spaces are collapsed and whitespace is trimmed from lines. If false, + * spaces and whitespace are left as is. Default false. + */ + setWordWrapWidth(width: number, useAdvancedWrap?: boolean): Phaser.GameObjects.Text; + + /** + * Set a custom callback for wrapping lines. + * + * Pass in null to remove wrapping by callback. + * @param callback A custom function that will be responsible for wrapping the + * text. It will receive two arguments: text (the string to wrap), textObject (this Text + * instance). It should return the wrapped lines either as an array of lines or as a string with + * newline characters in place to indicate where breaks should happen. + * @param scope The scope that will be applied when the callback is invoked. Default null. + */ + setWordWrapCallback(callback: TextStyleWordWrapCallback, scope?: object): Phaser.GameObjects.Text; + + /** + * Set the alignment of the text in this Text object. + * + * The argument can be one of: `left`, `right`, `center` or `justify`. + * + * Alignment only works if the Text object has more than one line of text. + * @param align The text alignment for multi-line text. Default 'left'. + */ + setAlign(align?: string): Phaser.GameObjects.Text; + + /** + * Set the maximum number of lines to draw. + * @param max The maximum number of lines to draw. Default 0. + */ + setMaxLines(max?: integer): Phaser.GameObjects.Text; + + /** + * Get the current text metrics. + */ + getTextMetrics(): Phaser.Types.GameObjects.Text.TextMetrics; + + /** + * Build a JSON representation of this Text Style. + */ + toJSON(): object; + + /** + * Destroy this Text Style. + */ + destroy(): void; + + } + /** * A Text Game Object. * @@ -35136,7 +34879,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -35241,6 +34986,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -35288,359 +35036,6 @@ declare namespace Phaser { } - /** - * A TextStyle class manages all of the style settings for a Text object. - * - * Text Game Objects create a TextStyle instance automatically, which is - * accessed via the `Text.style` property. You do not normally need to - * instantiate one yourself. - */ - class TextStyle { - /** - * - * @param text The Text object that this TextStyle is styling. - * @param style The style settings to set. - */ - constructor(text: Phaser.GameObjects.Text, style: Phaser.Types.GameObjects.Text.TextStyle); - - /** - * The Text object that this TextStyle is styling. - */ - parent: Phaser.GameObjects.Text; - - /** - * The font family. - */ - fontFamily: string; - - /** - * The font size. - */ - fontSize: string; - - /** - * The font style. - */ - fontStyle: string; - - /** - * The background color. - */ - backgroundColor: string; - - /** - * The text fill color. - */ - color: string; - - /** - * The text stroke color. - */ - stroke: string; - - /** - * The text stroke thickness. - */ - strokeThickness: number; - - /** - * The horizontal shadow offset. - */ - shadowOffsetX: number; - - /** - * The vertical shadow offset. - */ - shadowOffsetY: number; - - /** - * The shadow color. - */ - shadowColor: string; - - /** - * The shadow blur radius. - */ - shadowBlur: number; - - /** - * Whether shadow stroke is enabled or not. - */ - shadowStroke: boolean; - - /** - * Whether shadow fill is enabled or not. - */ - shadowFill: boolean; - - /** - * The text alignment. - */ - align: string; - - /** - * The maximum number of lines to draw. - */ - maxLines: integer; - - /** - * The fixed width of the text. - * - * `0` means no fixed with. - */ - fixedWidth: number; - - /** - * The fixed height of the text. - * - * `0` means no fixed height. - */ - fixedHeight: number; - - /** - * The resolution the text is rendered to its internal canvas at. - * The default is 0, which means it will use the resolution set in the Game Config. - */ - resolution: number; - - /** - * Whether the text should render right to left. - */ - rtl: boolean; - - /** - * The test string to use when measuring the font. - */ - testString: string; - - /** - * The amount of horizontal padding added to the width of the text when calculating the font metrics. - */ - baselineX: number; - - /** - * The amount of vertical padding added to the height of the text when calculating the font metrics. - */ - baselineY: number; - - /** - * Set the text style. - * @param style The style settings to set. - * @param updateText Whether to update the text immediately. Default true. - * @param setDefaults Use the default values is not set, or the local values. Default false. - */ - setStyle(style: Phaser.Types.GameObjects.Text.TextStyle, updateText?: boolean, setDefaults?: boolean): Phaser.GameObjects.Text; - - /** - * Synchronize the font settings to the given Canvas Rendering Context. - * @param canvas The Canvas Element. - * @param context The Canvas Rendering Context. - */ - syncFont(canvas: HTMLCanvasElement, context: CanvasRenderingContext2D): void; - - /** - * Synchronize the text style settings to the given Canvas Rendering Context. - * @param canvas The Canvas Element. - * @param context The Canvas Rendering Context. - */ - syncStyle(canvas: HTMLCanvasElement, context: CanvasRenderingContext2D): void; - - /** - * Synchronize the shadow settings to the given Canvas Rendering Context. - * @param context The Canvas Rendering Context. - * @param enabled Whether shadows are enabled or not. - */ - syncShadow(context: CanvasRenderingContext2D, enabled: boolean): void; - - /** - * Update the style settings for the parent Text object. - * @param recalculateMetrics Whether to recalculate font and text metrics. - */ - update(recalculateMetrics: boolean): Phaser.GameObjects.Text; - - /** - * Set the font. - * - * If a string is given, the font family is set. - * - * If an object is given, the `fontFamily`, `fontSize` and `fontStyle` - * properties of that object are set. - * @param font The font family or font settings to set. - * @param updateText Whether to update the text immediately. Default true. - */ - setFont(font: string | object, updateText?: boolean): Phaser.GameObjects.Text; - - /** - * Set the font family. - * @param family The font family. - */ - setFontFamily(family: string): Phaser.GameObjects.Text; - - /** - * Set the font style. - * @param style The font style. - */ - setFontStyle(style: string): Phaser.GameObjects.Text; - - /** - * Set the font size. - * @param size The font size. - */ - setFontSize(size: number | string): Phaser.GameObjects.Text; - - /** - * Set the test string to use when measuring the font. - * @param string The test string to use when measuring the font. - */ - setTestString(string: string): Phaser.GameObjects.Text; - - /** - * Set a fixed width and height for the text. - * - * Pass in `0` for either of these parameters to disable fixed width or height respectively. - * @param width The fixed width to set. - * @param height The fixed height to set. - */ - setFixedSize(width: number, height: number): Phaser.GameObjects.Text; - - /** - * Set the background color. - * @param color The background color. - */ - setBackgroundColor(color: string): Phaser.GameObjects.Text; - - /** - * Set the text fill color. - * @param color The text fill color. - */ - setFill(color: string): Phaser.GameObjects.Text; - - /** - * Set the text fill color. - * @param color The text fill color. - */ - setColor(color: string): Phaser.GameObjects.Text; - - /** - * Set the resolution used by the Text object. - * - * By default it will be set to match the resolution set in the Game Config, - * but you can override it via this method. It allows for much clearer text on High DPI devices, - * at the cost of memory because it uses larger internal Canvas textures for the Text. - * - * Please use with caution, as the more high res Text you have, the more memory it uses up. - * @param value The resolution for this Text object to use. - */ - setResolution(value: number): Phaser.GameObjects.Text; - - /** - * Set the stroke settings. - * @param color The stroke color. - * @param thickness The stroke thickness. - */ - setStroke(color: string, thickness: number): Phaser.GameObjects.Text; - - /** - * Set the shadow settings. - * - * Calling this method always re-measures the parent Text object, - * so only call it when you actually change the shadow settings. - * @param x The horizontal shadow offset. Default 0. - * @param y The vertical shadow offset. Default 0. - * @param color The shadow color. Default '#000'. - * @param blur The shadow blur radius. Default 0. - * @param shadowStroke Whether to stroke the shadow. Default false. - * @param shadowFill Whether to fill the shadow. Default true. - */ - setShadow(x?: number, y?: number, color?: string, blur?: number, shadowStroke?: boolean, shadowFill?: boolean): Phaser.GameObjects.Text; - - /** - * Set the shadow offset. - * @param x The horizontal shadow offset. Default 0. - * @param y The vertical shadow offset. Default 0. - */ - setShadowOffset(x?: number, y?: number): Phaser.GameObjects.Text; - - /** - * Set the shadow color. - * @param color The shadow color. Default '#000'. - */ - setShadowColor(color?: string): Phaser.GameObjects.Text; - - /** - * Set the shadow blur radius. - * @param blur The shadow blur radius. Default 0. - */ - setShadowBlur(blur?: number): Phaser.GameObjects.Text; - - /** - * Enable or disable shadow stroke. - * @param enabled Whether shadow stroke is enabled or not. - */ - setShadowStroke(enabled: boolean): Phaser.GameObjects.Text; - - /** - * Enable or disable shadow fill. - * @param enabled Whether shadow fill is enabled or not. - */ - setShadowFill(enabled: boolean): Phaser.GameObjects.Text; - - /** - * Set the width (in pixels) to use for wrapping lines. - * - * Pass in null to remove wrapping by width. - * @param width The maximum width of a line in pixels. Set to null to remove wrapping. - * @param useAdvancedWrap Whether or not to use the advanced wrapping - * algorithm. If true, spaces are collapsed and whitespace is trimmed from lines. If false, - * spaces and whitespace are left as is. Default false. - */ - setWordWrapWidth(width: number, useAdvancedWrap?: boolean): Phaser.GameObjects.Text; - - /** - * Set a custom callback for wrapping lines. - * - * Pass in null to remove wrapping by callback. - * @param callback A custom function that will be responsible for wrapping the - * text. It will receive two arguments: text (the string to wrap), textObject (this Text - * instance). It should return the wrapped lines either as an array of lines or as a string with - * newline characters in place to indicate where breaks should happen. - * @param scope The scope that will be applied when the callback is invoked. Default null. - */ - setWordWrapCallback(callback: TextStyleWordWrapCallback, scope?: object): Phaser.GameObjects.Text; - - /** - * Set the alignment of the text in this Text object. - * - * The argument can be one of: `left`, `right`, `center` or `justify`. - * - * Alignment only works if the Text object has more than one line of text. - * @param align The text alignment for multi-line text. Default 'left'. - */ - setAlign(align?: string): Phaser.GameObjects.Text; - - /** - * Set the maximum number of lines to draw. - * @param max The maximum number of lines to draw. Default 0. - */ - setMaxLines(max?: integer): Phaser.GameObjects.Text; - - /** - * Get the current text metrics. - */ - getTextMetrics(): Phaser.Types.GameObjects.Text.TextMetrics; - - /** - * Build a JSON representation of this Text Style. - */ - toJSON(): object; - - /** - * Destroy this Text Style. - */ - destroy(): void; - - } - /** * A TileSprite is a Sprite that has a repeating texture. * @@ -36470,7 +35865,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -36575,6 +35972,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -36622,55 +36022,6 @@ declare namespace Phaser { } - /** - * The Update List plugin. - * - * Update Lists belong to a Scene and maintain the list Game Objects to be updated every frame. - * - * Some or all of these Game Objects may also be part of the Scene's [Display List]{@link Phaser.GameObjects.DisplayList}, for Rendering. - */ - class UpdateList extends Phaser.Structs.ProcessQueue { - /** - * - * @param scene The Scene that the Update List belongs to. - */ - constructor(scene: Phaser.Scene); - - /** - * The Scene that the Update List belongs to. - */ - scene: Phaser.Scene; - - /** - * The Scene's Systems. - */ - systems: Phaser.Scenes.Systems; - - /** - * The update step. - * - * Pre-updates every active Game Object in the list. - * @param time The current timestamp. - * @param delta The delta time elapsed since the last frame. - */ - sceneUpdate(time: number, delta: number): void; - - /** - * The Scene that owns this plugin is shutting down. - * - * We need to kill and reset all internal properties as well as stop listening to Scene events. - */ - shutdown(): void; - - /** - * The Scene that owns this plugin is being destroyed. - * - * We need to shutdown and then kill off all external references. - */ - destroy(): void; - - } - /** * A Video Game Object. * @@ -37892,7 +37243,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -37997,6 +37350,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -38309,7 +37665,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -38414,6 +37772,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -39292,7 +38653,7 @@ declare namespace Phaser { * @param stepRate The optional step rate for the points on the line. Default 1. * @param results An optional array to push the resulting coordinates into. */ - static BresenhamPoints(line: Phaser.Geom.Line, stepRate?: integer, results?: any[]): object[]; + static BresenhamPoints(line: Phaser.Geom.Line, stepRate?: integer, results?: Phaser.Types.Math.Vector2Like[]): Phaser.Types.Math.Vector2Like[]; /** * Center a line on the given coordinates. @@ -40646,6 +40007,1328 @@ declare namespace Phaser { } namespace Input { + /** + * Creates a new Interactive Object. + * + * This is called automatically by the Input Manager when you enable a Game Object for input. + * + * The resulting Interactive Object is mapped to the Game Object's `input` property. + * @param gameObject The Game Object to which this Interactive Object is bound. + * @param hitArea The hit area for this Interactive Object. Typically a geometry shape, like a Rectangle or Circle. + * @param hitAreaCallback The 'contains' check callback that the hit area shape will use for all hit tests. + */ + function CreateInteractiveObject(gameObject: Phaser.GameObjects.GameObject, hitArea: any, hitAreaCallback: Phaser.Types.Input.HitAreaCallback): Phaser.Types.Input.InteractiveObject; + + /** + * Creates a new Pixel Perfect Handler function. + * + * Access via `InputPlugin.makePixelPerfect` rather than calling it directly. + * @param textureManager A reference to the Texture Manager. + * @param alphaTolerance The alpha level that the pixel should be above to be included as a successful interaction. + */ + function CreatePixelPerfectHandler(textureManager: Phaser.Textures.TextureManager, alphaTolerance: integer): Function; + + /** + * The Input Manager is responsible for handling the pointer related systems in a single Phaser Game instance. + * + * Based on the Game Config it will create handlers for mouse and touch support. + * + * Keyboard and Gamepad are plugins, handled directly by the InputPlugin class. + * + * It then manages the events, pointer creation and general hit test related operations. + * + * You rarely need to interact with the Input Manager directly, and as such, all of its properties and methods + * should be considered private. Instead, you should use the Input Plugin, which is a Scene level system, responsible + * for dealing with all input events for a Scene. + */ + class InputManager { + /** + * + * @param game The Game instance that owns the Input Manager. + * @param config The Input Configuration object, as set in the Game Config. + */ + constructor(game: Phaser.Game, config: object); + + /** + * The Game instance that owns the Input Manager. + * A Game only maintains on instance of the Input Manager at any time. + */ + readonly game: Phaser.Game; + + /** + * A reference to the global Game Scale Manager. + * Used for all bounds checks and pointer scaling. + */ + scaleManager: Phaser.Scale.ScaleManager; + + /** + * The Canvas that is used for all DOM event input listeners. + */ + canvas: HTMLCanvasElement; + + /** + * The Game Configuration object, as set during the game boot. + */ + config: Phaser.Core.Config; + + /** + * If set, the Input Manager will run its update loop every frame. + */ + enabled: boolean; + + /** + * The Event Emitter instance that the Input Manager uses to emit events from. + */ + events: Phaser.Events.EventEmitter; + + /** + * Are any mouse or touch pointers currently over the game canvas? + * This is updated automatically by the canvas over and out handlers. + */ + readonly isOver: boolean; + + /** + * The default CSS cursor to be used when interacting with your game. + * + * See the `setDefaultCursor` method for more details. + */ + defaultCursor: string; + + /** + * A reference to the Keyboard Manager class, if enabled via the `input.keyboard` Game Config property. + */ + keyboard: Phaser.Input.Keyboard.KeyboardManager; + + /** + * A reference to the Mouse Manager class, if enabled via the `input.mouse` Game Config property. + */ + mouse: Phaser.Input.Mouse.MouseManager; + + /** + * A reference to the Touch Manager class, if enabled via the `input.touch` Game Config property. + */ + touch: Phaser.Input.Touch.TouchManager; + + /** + * An array of Pointers that have been added to the game. + * The first entry is reserved for the Mouse Pointer, the rest are Touch Pointers. + * + * By default there is 1 touch pointer enabled. If you need more use the `addPointer` method to start them, + * or set the `input.activePointers` property in the Game Config. + */ + pointers: Phaser.Input.Pointer[]; + + /** + * The number of touch objects activated and being processed each update. + * + * You can change this by either calling `addPointer` at run-time, or by + * setting the `input.activePointers` property in the Game Config. + */ + readonly pointersTotal: integer; + + /** + * The mouse has its own unique Pointer object, which you can reference directly if making a _desktop specific game_. + * If you are supporting both desktop and touch devices then do not use this property, instead use `activePointer` + * which will always map to the most recently interacted pointer. + */ + mousePointer: Phaser.Input.Pointer; + + /** + * The most recently active Pointer object. + * + * If you've only 1 Pointer in your game then this will accurately be either the first finger touched, or the mouse. + * + * If your game doesn't need to support multi-touch then you can safely use this property in all of your game + * code and it will adapt to be either the mouse or the touch, based on device. + */ + activePointer: Phaser.Input.Pointer; + + /** + * If the top-most Scene in the Scene List receives an input it will stop input from + * propagating any lower down the scene list, i.e. if you have a UI Scene at the top + * and click something on it, that click will not then be passed down to any other + * Scene below. Disable this to have input events passed through all Scenes, all the time. + */ + globalTopOnly: boolean; + + /** + * The time this Input Manager was last updated. + * This value is populated by the Game Step each frame. + */ + readonly time: number; + + /** + * The Boot handler is called by Phaser.Game when it first starts up. + * The renderer is available by now. + */ + protected boot(): void; + + /** + * Tells the Input system to set a custom cursor. + * + * This cursor will be the default cursor used when interacting with the game canvas. + * + * If an Interactive Object also sets a custom cursor, this is the cursor that is reset after its use. + * + * Any valid CSS cursor value is allowed, including paths to image files, i.e.: + * + * ```javascript + * this.input.setDefaultCursor('url(assets/cursors/sword.cur), pointer'); + * ``` + * + * Please read about the differences between browsers when it comes to the file formats and sizes they support: + * + * https://developer.mozilla.org/en-US/docs/Web/CSS/cursor + * https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_User_Interface/Using_URL_values_for_the_cursor_property + * + * It's up to you to pick a suitable cursor format that works across the range of browsers you need to support. + * @param cursor The CSS to be used when setting the default cursor. + */ + setDefaultCursor(cursor: string): void; + + /** + * Adds new Pointer objects to the Input Manager. + * + * By default Phaser creates 2 pointer objects: `mousePointer` and `pointer1`. + * + * You can create more either by calling this method, or by setting the `input.activePointers` property + * in the Game Config, up to a maximum of 10 pointers. + * + * The first 10 pointers are available via the `InputPlugin.pointerX` properties, once they have been added + * via this method. + * @param quantity The number of new Pointers to create. A maximum of 10 is allowed in total. Default 1. + */ + addPointer(quantity?: integer): Phaser.Input.Pointer[]; + + /** + * Internal method that gets a list of all the active Input Plugins in the game + * and updates each of them in turn, in reverse order (top to bottom), to allow + * for DOM top-level event handling simulation. + * @param type The type of event to process. + * @param pointers An array of Pointers on which the event occurred. + */ + updateInputPlugins(type: integer, pointers: Phaser.Input.Pointer[]): void; + + /** + * Performs a hit test using the given Pointer and camera, against an array of interactive Game Objects. + * + * The Game Objects are culled against the camera, and then the coordinates are translated into the local camera space + * and used to determine if they fall within the remaining Game Objects hit areas or not. + * + * If nothing is matched an empty array is returned. + * + * This method is called automatically by InputPlugin.hitTestPointer and doesn't usually need to be invoked directly. + * @param pointer The Pointer to test against. + * @param gameObjects An array of interactive Game Objects to check. + * @param camera The Camera which is being tested against. + * @param output An array to store the results in. If not given, a new empty array is created. + */ + hitTest(pointer: Phaser.Input.Pointer, gameObjects: any[], camera: Phaser.Cameras.Scene2D.Camera, output?: any[]): any[]; + + /** + * Checks if the given x and y coordinate are within the hit area of the Game Object. + * + * This method assumes that the coordinate values have already been translated into the space of the Game Object. + * + * If the coordinates are within the hit area they are set into the Game Objects Input `localX` and `localY` properties. + * @param gameObject The interactive Game Object to check against. + * @param x The translated x coordinate for the hit test. + * @param y The translated y coordinate for the hit test. + */ + pointWithinHitArea(gameObject: Phaser.GameObjects.GameObject, x: number, y: number): boolean; + + /** + * Checks if the given x and y coordinate are within the hit area of the Interactive Object. + * + * This method assumes that the coordinate values have already been translated into the space of the Interactive Object. + * + * If the coordinates are within the hit area they are set into the Interactive Objects Input `localX` and `localY` properties. + * @param object The Interactive Object to check against. + * @param x The translated x coordinate for the hit test. + * @param y The translated y coordinate for the hit test. + */ + pointWithinInteractiveObject(object: Phaser.Types.Input.InteractiveObject, x: number, y: number): boolean; + + /** + * Transforms the pageX and pageY values of a Pointer into the scaled coordinate space of the Input Manager. + * @param pointer The Pointer to transform the values for. + * @param pageX The Page X value. + * @param pageY The Page Y value. + * @param wasMove Are we transforming the Pointer from a move event, or an up / down event? + */ + transformPointer(pointer: Phaser.Input.Pointer, pageX: number, pageY: number, wasMove: boolean): void; + + /** + * Destroys the Input Manager and all of its systems. + * + * There is no way to recover from doing this. + */ + destroy(): void; + + } + + /** + * The Input Plugin belongs to a Scene and handles all input related events and operations for it. + * + * You can access it from within a Scene using `this.input`. + * + * It emits events directly. For example, you can do: + * + * ```javascript + * this.input.on('pointerdown', callback, context); + * ``` + * + * To listen for a pointer down event anywhere on the game canvas. + * + * Game Objects can be enabled for input by calling their `setInteractive` method. After which they + * will directly emit input events: + * + * ```javascript + * var sprite = this.add.sprite(x, y, texture); + * sprite.setInteractive(); + * sprite.on('pointerdown', callback, context); + * ``` + * + * There are lots of game configuration options available relating to input. + * See the [Input Config object]{@linkcode Phaser.Types.Core.InputConfig} for more details, including how to deal with Phaser + * listening for input events outside of the canvas, how to set a default number of pointers, input + * capture settings and more. + * + * Please also see the Input examples and tutorials for further information. + */ + class InputPlugin extends Phaser.Events.EventEmitter { + /** + * + * @param scene A reference to the Scene that this Input Plugin is responsible for. + */ + constructor(scene: Phaser.Scene); + + /** + * A reference to the Scene that this Input Plugin is responsible for. + */ + scene: Phaser.Scene; + + /** + * A reference to the Scene Systems class. + */ + systems: Phaser.Scenes.Systems; + + /** + * A reference to the Scene Systems Settings. + */ + settings: Phaser.Types.Scenes.SettingsObject; + + /** + * A reference to the Game Input Manager. + */ + manager: Phaser.Input.InputManager; + + /** + * If `true` this Input Plugin will process DOM input events. + */ + enabled: boolean; + + /** + * A reference to the Scene Display List. This property is set during the `boot` method. + */ + displayList: Phaser.GameObjects.DisplayList; + + /** + * A reference to the Scene Cameras Manager. This property is set during the `boot` method. + */ + cameras: Phaser.Cameras.Scene2D.CameraManager; + + /** + * A reference to the Mouse Manager. + * + * This property is only set if Mouse support has been enabled in your Game Configuration file. + * + * If you just wish to get access to the mouse pointer, use the `mousePointer` property instead. + */ + mouse: Phaser.Input.Mouse.MouseManager; + + /** + * When set to `true` (the default) the Input Plugin will emulate DOM behavior by only emitting events from + * the top-most Game Objects in the Display List. + * + * If set to `false` it will emit events from all Game Objects below a Pointer, not just the top one. + */ + topOnly: boolean; + + /** + * How often should the Pointers be checked? + * + * The value is a time, given in ms, and is the time that must have elapsed between game steps before + * the Pointers will be polled again. When a pointer is polled it runs a hit test to see which Game + * Objects are currently below it, or being interacted with it. + * + * Pointers will *always* be checked if they have been moved by the user, or press or released. + * + * This property only controls how often they will be polled if they have not been updated. + * You should set this if you want to have Game Objects constantly check against the pointers, even + * if the pointer didn't itself move. + * + * Set to 0 to poll constantly. Set to -1 to only poll on user movement. + */ + pollRate: integer; + + /** + * The distance, in pixels, a pointer has to move while being held down, before it thinks it is being dragged. + */ + dragDistanceThreshold: number; + + /** + * The amount of time, in ms, a pointer has to be held down before it thinks it is dragging. + * + * The default polling rate is to poll only on move so once the time threshold is reached the + * drag event will not start until you move the mouse. If you want it to start immediately + * when the time threshold is reached, you must increase the polling rate by calling + * [setPollAlways]{@linkcode Phaser.Input.InputPlugin#setPollAlways} or + * [setPollRate]{@linkcode Phaser.Input.InputPlugin#setPollRate}. + */ + dragTimeThreshold: number; + + /** + * Checks to see if both this plugin and the Scene to which it belongs is active. + */ + isActive(): boolean; + + /** + * This is called automatically by the Input Manager. + * It emits events for plugins to listen to and also handles polling updates, if enabled. + * @param time The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. + * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. + */ + updatePoll(time: number, delta: number): boolean; + + /** + * Clears a Game Object so it no longer has an Interactive Object associated with it. + * The Game Object is then queued for removal from the Input Plugin on the next update. + * @param gameObject The Game Object that will have its Interactive Object removed. + * @param skipQueue Skip adding this Game Object into the removal queue? Default false. + */ + clear(gameObject: Phaser.GameObjects.GameObject, skipQueue?: boolean): Phaser.GameObjects.GameObject; + + /** + * Disables Input on a single Game Object. + * + * An input disabled Game Object still retains its Interactive Object component and can be re-enabled + * at any time, by passing it to `InputPlugin.enable`. + * @param gameObject The Game Object to have its input system disabled. + */ + disable(gameObject: Phaser.GameObjects.GameObject): void; + + /** + * Enable a Game Object for interaction. + * + * If the Game Object already has an Interactive Object component, it is enabled and returned. + * + * Otherwise, a new Interactive Object component is created and assigned to the Game Object's `input` property. + * + * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area + * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced + * input detection. + * + * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If + * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific + * shape for it to use. + * + * You can also provide an Input Configuration Object as the only argument to this method. + * @param gameObject The Game Object to be enabled for input. + * @param shape Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used. + * @param callback The 'contains' function to invoke to check if the pointer is within the hit area. + * @param dropZone Is this Game Object a drop zone or not? Default false. + */ + enable(gameObject: Phaser.GameObjects.GameObject, shape?: Phaser.Types.Input.InputConfiguration | any, callback?: Phaser.Types.Input.HitAreaCallback, dropZone?: boolean): Phaser.Input.InputPlugin; + + /** + * Takes the given Pointer and performs a hit test against it, to see which interactive Game Objects + * it is currently above. + * + * The hit test is performed against which-ever Camera the Pointer is over. If it is over multiple + * cameras, it starts checking the camera at the top of the camera list, and if nothing is found, iterates down the list. + * @param pointer The Pointer to check against the Game Objects. + */ + hitTestPointer(pointer: Phaser.Input.Pointer): Phaser.GameObjects.GameObject[]; + + /** + * Returns the drag state of the given Pointer for this Input Plugin. + * + * The state will be one of the following: + * + * 0 = Not dragging anything + * 1 = Primary button down and objects below, so collect a draglist + * 2 = Pointer being checked if meets drag criteria + * 3 = Pointer meets criteria, notify the draglist + * 4 = Pointer actively dragging the draglist and has moved + * 5 = Pointer actively dragging but has been released, notify draglist + * @param pointer The Pointer to get the drag state for. + */ + getDragState(pointer: Phaser.Input.Pointer): integer; + + /** + * Sets the drag state of the given Pointer for this Input Plugin. + * + * The state must be one of the following values: + * + * 0 = Not dragging anything + * 1 = Primary button down and objects below, so collect a draglist + * 2 = Pointer being checked if meets drag criteria + * 3 = Pointer meets criteria, notify the draglist + * 4 = Pointer actively dragging the draglist and has moved + * 5 = Pointer actively dragging but has been released, notify draglist + * @param pointer The Pointer to set the drag state for. + * @param state The drag state value. An integer between 0 and 5. + */ + setDragState(pointer: Phaser.Input.Pointer, state: integer): void; + + /** + * Sets the draggable state of the given array of Game Objects. + * + * They can either be set to be draggable, or can have their draggable state removed by passing `false`. + * + * A Game Object will not fire drag events unless it has been specifically enabled for drag. + * @param gameObjects An array of Game Objects to change the draggable state on. + * @param value Set to `true` if the Game Objects should be made draggable, `false` if they should be unset. Default true. + */ + setDraggable(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], value?: boolean): Phaser.Input.InputPlugin; + + /** + * Creates a function that can be passed to `setInteractive`, `enable` or `setHitArea` that will handle + * pixel-perfect input detection on an Image or Sprite based Game Object, or any custom class that extends them. + * + * The following will create a sprite that is clickable on any pixel that has an alpha value >= 1. + * + * ```javascript + * this.add.sprite(x, y, key).setInteractive(this.input.makePixelPerfect()); + * ``` + * + * The following will create a sprite that is clickable on any pixel that has an alpha value >= 150. + * + * ```javascript + * this.add.sprite(x, y, key).setInteractive(this.input.makePixelPerfect(150)); + * ``` + * + * Once you have made an Interactive Object pixel perfect it impacts all input related events for it: down, up, + * dragstart, drag, etc. + * + * As a pointer interacts with the Game Object it will constantly poll the texture, extracting a single pixel from + * the given coordinates and checking its color values. This is an expensive process, so should only be enabled on + * Game Objects that really need it. + * + * You cannot make non-texture based Game Objects pixel perfect. So this will not work on Graphics, BitmapText, + * Render Textures, Text, Tilemaps, Containers or Particles. + * @param alphaTolerance The alpha level that the pixel should be above to be included as a successful interaction. Default 1. + */ + makePixelPerfect(alphaTolerance?: integer): Function; + + /** + * Sets the hit area for the given array of Game Objects. + * + * A hit area is typically one of the geometric shapes Phaser provides, such as a `Phaser.Geom.Rectangle` + * or `Phaser.Geom.Circle`. However, it can be any object as long as it works with the provided callback. + * + * If no hit area is provided a Rectangle is created based on the size of the Game Object, if possible + * to calculate. + * + * The hit area callback is the function that takes an `x` and `y` coordinate and returns a boolean if + * those values fall within the area of the shape or not. All of the Phaser geometry objects provide this, + * such as `Phaser.Geom.Rectangle.Contains`. + * @param gameObjects An array of Game Objects to set the hit area on. + * @param shape Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used. + * @param callback The 'contains' function to invoke to check if the pointer is within the hit area. + */ + setHitArea(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], shape?: Phaser.Types.Input.InputConfiguration | any, callback?: Phaser.Types.Input.HitAreaCallback): Phaser.Input.InputPlugin; + + /** + * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Circle` shape, using + * the given coordinates and radius to control its position and size. + * @param gameObjects An array of Game Objects to set as having a circle hit area. + * @param x The center of the circle. + * @param y The center of the circle. + * @param radius The radius of the circle. + * @param callback The hit area callback. If undefined it uses Circle.Contains. + */ + setHitAreaCircle(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], x: number, y: number, radius: number, callback?: Phaser.Types.Input.HitAreaCallback): Phaser.Input.InputPlugin; + + /** + * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Ellipse` shape, using + * the given coordinates and dimensions to control its position and size. + * @param gameObjects An array of Game Objects to set as having an ellipse hit area. + * @param x The center of the ellipse. + * @param y The center of the ellipse. + * @param width The width of the ellipse. + * @param height The height of the ellipse. + * @param callback The hit area callback. If undefined it uses Ellipse.Contains. + */ + setHitAreaEllipse(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], x: number, y: number, width: number, height: number, callback?: Phaser.Types.Input.HitAreaCallback): Phaser.Input.InputPlugin; + + /** + * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Rectangle` shape, using + * the Game Objects texture frame to define the position and size of the hit area. + * @param gameObjects An array of Game Objects to set as having an ellipse hit area. + * @param callback The hit area callback. If undefined it uses Rectangle.Contains. + */ + setHitAreaFromTexture(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], callback?: Phaser.Types.Input.HitAreaCallback): Phaser.Input.InputPlugin; + + /** + * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Rectangle` shape, using + * the given coordinates and dimensions to control its position and size. + * @param gameObjects An array of Game Objects to set as having a rectangular hit area. + * @param x The top-left of the rectangle. + * @param y The top-left of the rectangle. + * @param width The width of the rectangle. + * @param height The height of the rectangle. + * @param callback The hit area callback. If undefined it uses Rectangle.Contains. + */ + setHitAreaRectangle(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], x: number, y: number, width: number, height: number, callback?: Phaser.Types.Input.HitAreaCallback): Phaser.Input.InputPlugin; + + /** + * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Triangle` shape, using + * the given coordinates to control the position of its points. + * @param gameObjects An array of Game Objects to set as having a triangular hit area. + * @param x1 The x coordinate of the first point of the triangle. + * @param y1 The y coordinate of the first point of the triangle. + * @param x2 The x coordinate of the second point of the triangle. + * @param y2 The y coordinate of the second point of the triangle. + * @param x3 The x coordinate of the third point of the triangle. + * @param y3 The y coordinate of the third point of the triangle. + * @param callback The hit area callback. If undefined it uses Triangle.Contains. + */ + setHitAreaTriangle(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, callback?: Phaser.Types.Input.HitAreaCallback): Phaser.Input.InputPlugin; + + /** + * Creates an Input Debug Shape for the given Game Object. + * + * The Game Object must have _already_ been enabled for input prior to calling this method. + * + * This is intended to assist you during development and debugging. + * + * Debug Shapes can only be created for Game Objects that are using standard Phaser Geometry for input, + * including: Circle, Ellipse, Line, Polygon, Rectangle and Triangle. + * + * Game Objects that are using their automatic hit areas are using Rectangles by default, so will also work. + * + * The Debug Shape is created and added to the display list and is then kept in sync with the Game Object + * it is connected with. Should you need to modify it yourself, such as to hide it, you can access it via + * the Game Object property: `GameObject.input.hitAreaDebug`. + * + * Calling this method on a Game Object that already has a Debug Shape will first destroy the old shape, + * before creating a new one. If you wish to remove the Debug Shape entirely, you should call the + * method `InputPlugin.removeDebug`. + * + * Note that the debug shape will only show the outline of the input area. If the input test is using a + * pixel perfect check, for example, then this is not displayed. If you are using a custom shape, that + * doesn't extend one of the base Phaser Geometry objects, as your hit area, then this method will not + * work. + * @param gameObject The Game Object to create the input debug shape for. + * @param color The outline color of the debug shape. Default 0x00ff00. + */ + enableDebug(gameObject: Phaser.GameObjects.GameObject, color?: number): Phaser.Input.InputPlugin; + + /** + * Removes an Input Debug Shape from the given Game Object. + * + * The shape is destroyed immediately and the `hitAreaDebug` property is set to `null`. + * @param gameObject The Game Object to remove the input debug shape from. + */ + removeDebug(gameObject: Phaser.GameObjects.GameObject): Phaser.Input.InputPlugin; + + /** + * Sets the Pointers to always poll. + * + * When a pointer is polled it runs a hit test to see which Game Objects are currently below it, + * or being interacted with it, regardless if the Pointer has actually moved or not. + * + * You should enable this if you want objects in your game to fire over / out events, and the objects + * are constantly moving, but the pointer may not have. Polling every frame has additional computation + * costs, especially if there are a large number of interactive objects in your game. + */ + setPollAlways(): Phaser.Input.InputPlugin; + + /** + * Sets the Pointers to only poll when they are moved or updated. + * + * When a pointer is polled it runs a hit test to see which Game Objects are currently below it, + * or being interacted with it. + */ + setPollOnMove(): Phaser.Input.InputPlugin; + + /** + * Sets the poll rate value. This is the amount of time that should have elapsed before a pointer + * will be polled again. See the `setPollAlways` and `setPollOnMove` methods. + * @param value The amount of time, in ms, that should elapsed before re-polling the pointers. + */ + setPollRate(value: number): Phaser.Input.InputPlugin; + + /** + * When set to `true` the global Input Manager will emulate DOM behavior by only emitting events from + * the top-most Scene in the Scene List. By default, if a Scene receives an input event it will then stop the event + * from flowing down to any Scenes below it in the Scene list. To disable this behavior call this method with `false`. + * @param value Set to `true` to stop processing input events on the Scene that receives it, or `false` to let the event continue down the Scene list. + */ + setGlobalTopOnly(value: boolean): Phaser.Input.InputPlugin; + + /** + * When set to `true` this Input Plugin will emulate DOM behavior by only emitting events from + * the top-most Game Objects in the Display List. + * + * If set to `false` it will emit events from all Game Objects below a Pointer, not just the top one. + * @param value `true` to only include the top-most Game Object, or `false` to include all Game Objects in a hit test. + */ + setTopOnly(value: boolean): Phaser.Input.InputPlugin; + + /** + * Given an array of Game Objects, sort the array and return it, so that the objects are in depth index order + * with the lowest at the bottom. + * @param gameObjects An array of Game Objects to be sorted. + */ + sortGameObjects(gameObjects: Phaser.GameObjects.GameObject[]): Phaser.GameObjects.GameObject[]; + + /** + * This method should be called from within an input event handler, such as `pointerdown`. + * + * When called, it stops the Input Manager from allowing _this specific event_ to be processed by any other Scene + * not yet handled in the scene list. + */ + stopPropagation(): Phaser.Input.InputPlugin; + + /** + * Adds new Pointer objects to the Input Manager. + * + * By default Phaser creates 2 pointer objects: `mousePointer` and `pointer1`. + * + * You can create more either by calling this method, or by setting the `input.activePointers` property + * in the Game Config, up to a maximum of 10 pointers. + * + * The first 10 pointers are available via the `InputPlugin.pointerX` properties, once they have been added + * via this method. + * @param quantity The number of new Pointers to create. A maximum of 10 is allowed in total. Default 1. + */ + addPointer(quantity?: integer): Phaser.Input.Pointer[]; + + /** + * Tells the Input system to set a custom cursor. + * + * This cursor will be the default cursor used when interacting with the game canvas. + * + * If an Interactive Object also sets a custom cursor, this is the cursor that is reset after its use. + * + * Any valid CSS cursor value is allowed, including paths to image files, i.e.: + * + * ```javascript + * this.input.setDefaultCursor('url(assets/cursors/sword.cur), pointer'); + * ``` + * + * Please read about the differences between browsers when it comes to the file formats and sizes they support: + * + * https://developer.mozilla.org/en-US/docs/Web/CSS/cursor + * https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_User_Interface/Using_URL_values_for_the_cursor_property + * + * It's up to you to pick a suitable cursor format that works across the range of browsers you need to support. + * @param cursor The CSS to be used when setting the default cursor. + */ + setDefaultCursor(cursor: string): Phaser.Input.InputPlugin; + + /** + * The x coordinates of the ActivePointer based on the first camera in the camera list. + * This is only safe to use if your game has just 1 non-transformed camera and doesn't use multi-touch. + */ + readonly x: number; + + /** + * The y coordinates of the ActivePointer based on the first camera in the camera list. + * This is only safe to use if your game has just 1 non-transformed camera and doesn't use multi-touch. + */ + readonly y: number; + + /** + * Are any mouse or touch pointers currently over the game canvas? + */ + readonly isOver: boolean; + + /** + * The mouse has its own unique Pointer object, which you can reference directly if making a _desktop specific game_. + * If you are supporting both desktop and touch devices then do not use this property, instead use `activePointer` + * which will always map to the most recently interacted pointer. + */ + readonly mousePointer: Phaser.Input.Pointer; + + /** + * The current active input Pointer. + */ + readonly activePointer: Phaser.Input.Pointer; + + /** + * A touch-based Pointer object. + * This will be `undefined` by default unless you add a new Pointer using `addPointer`. + */ + readonly pointer1: Phaser.Input.Pointer; + + /** + * A touch-based Pointer object. + * This will be `undefined` by default unless you add a new Pointer using `addPointer`. + */ + readonly pointer2: Phaser.Input.Pointer; + + /** + * A touch-based Pointer object. + * This will be `undefined` by default unless you add a new Pointer using `addPointer`. + */ + readonly pointer3: Phaser.Input.Pointer; + + /** + * A touch-based Pointer object. + * This will be `undefined` by default unless you add a new Pointer using `addPointer`. + */ + readonly pointer4: Phaser.Input.Pointer; + + /** + * A touch-based Pointer object. + * This will be `undefined` by default unless you add a new Pointer using `addPointer`. + */ + readonly pointer5: Phaser.Input.Pointer; + + /** + * A touch-based Pointer object. + * This will be `undefined` by default unless you add a new Pointer using `addPointer`. + */ + readonly pointer6: Phaser.Input.Pointer; + + /** + * A touch-based Pointer object. + * This will be `undefined` by default unless you add a new Pointer using `addPointer`. + */ + readonly pointer7: Phaser.Input.Pointer; + + /** + * A touch-based Pointer object. + * This will be `undefined` by default unless you add a new Pointer using `addPointer`. + */ + readonly pointer8: Phaser.Input.Pointer; + + /** + * A touch-based Pointer object. + * This will be `undefined` by default unless you add a new Pointer using `addPointer`. + */ + readonly pointer9: Phaser.Input.Pointer; + + /** + * A touch-based Pointer object. + * This will be `undefined` by default unless you add a new Pointer using `addPointer`. + */ + readonly pointer10: Phaser.Input.Pointer; + + /** + * An instance of the Gamepad Plugin class, if enabled via the `input.gamepad` Scene or Game Config property. + * Use this to create access Gamepads connected to the browser and respond to gamepad buttons. + */ + gamepad: Phaser.Input.Gamepad.GamepadPlugin; + + /** + * An instance of the Keyboard Plugin class, if enabled via the `input.keyboard` Scene or Game Config property. + * Use this to create Key objects and listen for keyboard specific events. + */ + keyboard: Phaser.Input.Keyboard.KeyboardPlugin; + + } + + namespace InputPluginCache { + /** + * Static method called directly by the Core internal Plugins. + * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin) + * Plugin is the object to instantiate to create the plugin + * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input) + * @param key A reference used to get this plugin from the plugin cache. + * @param plugin The plugin to be stored. Should be the core object, not instantiated. + * @param mapping If this plugin is to be injected into the Input Plugin, this is the property key used. + * @param settingsKey The key in the Scene Settings to check to see if this plugin should install or not. + * @param configKey The key in the Game Config to check to see if this plugin should install or not. + */ + function register(key: string, plugin: Function, mapping: string, settingsKey: string, configKey: string): void; + + /** + * Returns the input plugin object from the cache based on the given key. + * @param key The key of the input plugin to get. + */ + function getCore(key: string): Phaser.Types.Input.InputPluginContainer; + + /** + * Installs all of the registered Input Plugins into the given target. + * @param target The target InputPlugin to install the plugins into. + */ + function install(target: Phaser.Input.InputPlugin): void; + + /** + * Removes an input plugin based on the given key. + * @param key The key of the input plugin to remove. + */ + function remove(key: string): void; + + } + + /** + * A Pointer object encapsulates both mouse and touch input within Phaser. + * + * By default, Phaser will create 2 pointers for your game to use. If you require more, i.e. for a multi-touch + * game, then use the `InputPlugin.addPointer` method to do so, rather than instantiating this class directly, + * otherwise it won't be managed by the input system. + * + * You can reference the current active pointer via `InputPlugin.activePointer`. You can also use the properties + * `InputPlugin.pointer1` through to `pointer10`, for each pointer you have enabled in your game. + * + * The properties of this object are set by the Input Plugin during processing. This object is then sent in all + * input related events that the Input Plugin emits, so you can reference properties from it directly in your + * callbacks. + */ + class Pointer { + /** + * + * @param manager A reference to the Input Manager. + * @param id The internal ID of this Pointer. + */ + constructor(manager: Phaser.Input.InputManager, id: integer); + + /** + * A reference to the Input Manager. + */ + manager: Phaser.Input.InputManager; + + /** + * The internal ID of this Pointer. + */ + readonly id: integer; + + /** + * The most recent native DOM Event this Pointer has processed. + */ + event: TouchEvent | MouseEvent; + + /** + * The DOM element the Pointer was pressed down on, taken from the DOM event. + * In a default set-up this will be the Canvas that Phaser is rendering to, or the Window element. + */ + readonly downElement: any; + + /** + * The DOM element the Pointer was released on, taken from the DOM event. + * In a default set-up this will be the Canvas that Phaser is rendering to, or the Window element. + */ + readonly upElement: any; + + /** + * The camera the Pointer interacted with during its last update. + * + * A Pointer can only ever interact with one camera at once, which will be the top-most camera + * in the list should multiple cameras be positioned on-top of each other. + */ + camera: Phaser.Cameras.Scene2D.Camera; + + /** + * A read-only property that indicates which button was pressed, or released, on the pointer + * during the most recent event. It is only set during `up` and `down` events. + * + * On Touch devices the value is always 0. + * + * Users may change the configuration of buttons on their pointing device so that if an event's button property + * is zero, it may not have been caused by the button that is physically left–most on the pointing device; + * however, it should behave as if the left button was clicked in the standard button layout. + */ + readonly button: integer; + + /** + * 0: No button or un-initialized + * 1: Left button + * 2: Right button + * 4: Wheel button or middle button + * 8: 4th button (typically the "Browser Back" button) + * 16: 5th button (typically the "Browser Forward" button) + * + * For a mouse configured for left-handed use, the button actions are reversed. + * In this case, the values are read from right to left. + */ + buttons: integer; + + /** + * The position of the Pointer in screen space. + */ + readonly position: Phaser.Math.Vector2; + + /** + * The previous position of the Pointer in screen space. + * + * The old x and y values are stored in here during the InputManager.transformPointer call. + * + * Use the properties `velocity`, `angle` and `distance` to create your own gesture recognition. + */ + readonly prevPosition: Phaser.Math.Vector2; + + /** + * The current velocity of the Pointer, based on its current and previous positions. + * + * This value is smoothed out each frame, according to the `motionFactor` property. + * + * This property is updated whenever the Pointer moves, regardless of any button states. In other words, + * it changes based on movement alone - a button doesn't have to be pressed first. + */ + readonly velocity: Phaser.Math.Vector2; + + /** + * The current angle the Pointer is moving, in radians, based on its previous and current position. + * + * The angle is based on the old position facing to the current position. + * + * This property is updated whenever the Pointer moves, regardless of any button states. In other words, + * it changes based on movement alone - a button doesn't have to be pressed first. + */ + readonly angle: number; + + /** + * The distance the Pointer has moved, based on its previous and current position. + * + * This value is smoothed out each frame, according to the `motionFactor` property. + * + * This property is updated whenever the Pointer moves, regardless of any button states. In other words, + * it changes based on movement alone - a button doesn't have to be pressed first. + * + * If you need the total distance travelled since the primary buttons was pressed down, + * then use the `Pointer.getDistance` method. + */ + readonly distance: number; + + /** + * The smoothing factor to apply to the Pointer position. + * + * Due to their nature, pointer positions are inherently noisy. While this is fine for lots of games, if you need cleaner positions + * then you can set this value to apply an automatic smoothing to the positions as they are recorded. + * + * The default value of zero means 'no smoothing'. + * Set to a small value, such as 0.2, to apply an average level of smoothing between positions. You can do this by changing this + * value directly, or by setting the `input.smoothFactor` property in the Game Config. + * + * Positions are only smoothed when the pointer moves. If the primary button on this Pointer enters an Up or Down state, then the position + * is always precise, and not smoothed. + */ + smoothFactor: number; + + /** + * The factor applied to the motion smoothing each frame. + * + * This value is passed to the Smooth Step Interpolation that is used to calculate the velocity, + * angle and distance of the Pointer. It's applied every frame, until the midPoint reaches the current + * position of the Pointer. 0.2 provides a good average but can be increased if you need a + * quicker update and are working in a high performance environment. Never set this value to + * zero. + */ + motionFactor: number; + + /** + * The x position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with. + * + * If you wish to use this value _outside_ of an input event handler then you should update it first by calling + * the `Pointer.updateWorldPoint` method. + */ + worldX: number; + + /** + * The y position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with. + * + * If you wish to use this value _outside_ of an input event handler then you should update it first by calling + * the `Pointer.updateWorldPoint` method. + */ + worldY: number; + + /** + * Time when this Pointer was most recently moved (regardless of the state of its buttons, if any) + */ + moveTime: number; + + /** + * X coordinate of the Pointer when Button 1 (left button), or Touch, was pressed, used for dragging objects. + */ + downX: number; + + /** + * Y coordinate of the Pointer when Button 1 (left button), or Touch, was pressed, used for dragging objects. + */ + downY: number; + + /** + * Time when Button 1 (left button), or Touch, was pressed, used for dragging objects. + */ + downTime: number; + + /** + * X coordinate of the Pointer when Button 1 (left button), or Touch, was released, used for dragging objects. + */ + upX: number; + + /** + * Y coordinate of the Pointer when Button 1 (left button), or Touch, was released, used for dragging objects. + */ + upY: number; + + /** + * Time when Button 1 (left button), or Touch, was released, used for dragging objects. + */ + upTime: number; + + /** + * Is the primary button down? (usually button 0, the left mouse button) + */ + primaryDown: boolean; + + /** + * Is _any_ button on this pointer considered as being down? + */ + isDown: boolean; + + /** + * Did the previous input event come from a Touch input (true) or Mouse? (false) + */ + wasTouch: boolean; + + /** + * Did this Pointer get canceled by a touchcancel event? + * + * Note: "canceled" is the American-English spelling of "cancelled". Please don't submit PRs correcting it! + */ + wasCanceled: boolean; + + /** + * If the mouse is locked, the horizontal relative movement of the Pointer in pixels since last frame. + */ + movementX: number; + + /** + * If the mouse is locked, the vertical relative movement of the Pointer in pixels since last frame. + */ + movementY: number; + + /** + * The identifier property of the Pointer as set by the DOM event when this Pointer is started. + */ + identifier: number; + + /** + * The pointerId property of the Pointer as set by the DOM event when this Pointer is started. + * The browser can and will recycle this value. + */ + pointerId: number; + + /** + * An active Pointer is one that is currently pressed down on the display. + * A Mouse is always considered as active. + */ + active: boolean; + + /** + * Is this pointer Pointer Locked? + * + * Only a mouse pointer can be locked and it only becomes locked when requested via + * the browsers Pointer Lock API. + * + * You can request this by calling the `this.input.mouse.requestPointerLock()` method from + * a `pointerdown` or `pointerup` event handler. + */ + readonly locked: boolean; + + /** + * The horizontal scroll amount that occurred due to the user moving a mouse wheel or similar input device. + */ + deltaX: number; + + /** + * The vertical scroll amount that occurred due to the user moving a mouse wheel or similar input device. + * This value will typically be less than 0 if the user scrolls up and greater than zero if scrolling down. + */ + deltaY: number; + + /** + * The z-axis scroll amount that occurred due to the user moving a mouse wheel or similar input device. + */ + deltaZ: number; + + /** + * Takes a Camera and updates this Pointer's `worldX` and `worldY` values so they are + * the result of a translation through the given Camera. + * + * Note that the values will be automatically replaced the moment the Pointer is + * updated by an input event, such as a mouse move, so should be used immediately. + * @param camera The Camera which is being tested against. + */ + updateWorldPoint(camera: Phaser.Cameras.Scene2D.Camera): this; + + /** + * Takes a Camera and returns a Vector2 containing the translated position of this Pointer + * within that Camera. This can be used to convert this Pointers position into camera space. + * @param camera The Camera to use for the translation. + * @param output A Vector2-like object in which to store the translated position. + */ + positionToCamera(camera: Phaser.Cameras.Scene2D.Camera, output?: Phaser.Math.Vector2 | object): Phaser.Math.Vector2 | object; + + /** + * Checks to see if any buttons are being held down on this Pointer. + */ + noButtonDown(): boolean; + + /** + * Checks to see if the left button is being held down on this Pointer. + */ + leftButtonDown(): boolean; + + /** + * Checks to see if the right button is being held down on this Pointer. + */ + rightButtonDown(): boolean; + + /** + * Checks to see if the middle button is being held down on this Pointer. + */ + middleButtonDown(): boolean; + + /** + * Checks to see if the back button is being held down on this Pointer. + */ + backButtonDown(): boolean; + + /** + * Checks to see if the forward button is being held down on this Pointer. + */ + forwardButtonDown(): boolean; + + /** + * Checks to see if the left button was just released on this Pointer. + */ + leftButtonReleased(): boolean; + + /** + * Checks to see if the right button was just released on this Pointer. + */ + rightButtonReleased(): boolean; + + /** + * Checks to see if the middle button was just released on this Pointer. + */ + middleButtonReleased(): boolean; + + /** + * Checks to see if the back button was just released on this Pointer. + */ + backButtonReleased(): boolean; + + /** + * Checks to see if the forward button was just released on this Pointer. + */ + forwardButtonReleased(): boolean; + + /** + * If the Pointer has a button pressed down at the time this method is called, it will return the + * distance between the Pointer's `downX` and `downY` values and the current position. + * + * If no button is held down, it will return the last recorded distance, based on where + * the Pointer was when the button was released. + * + * If you wish to get the distance being travelled currently, based on the velocity of the Pointer, + * then see the `Pointer.distance` property. + */ + getDistance(): number; + + /** + * If the Pointer has a button pressed down at the time this method is called, it will return the + * horizontal distance between the Pointer's `downX` and `downY` values and the current position. + * + * If no button is held down, it will return the last recorded horizontal distance, based on where + * the Pointer was when the button was released. + */ + getDistanceX(): number; + + /** + * If the Pointer has a button pressed down at the time this method is called, it will return the + * vertical distance between the Pointer's `downX` and `downY` values and the current position. + * + * If no button is held down, it will return the last recorded vertical distance, based on where + * the Pointer was when the button was released. + */ + getDistanceY(): number; + + /** + * If the Pointer has a button pressed down at the time this method is called, it will return the + * duration since the button was pressed down. + * + * If no button is held down, it will return the last recorded duration, based on the time + * the Pointer button was released. + */ + getDuration(): number; + + /** + * If the Pointer has a button pressed down at the time this method is called, it will return the + * angle between the Pointer's `downX` and `downY` values and the current position. + * + * If no button is held down, it will return the last recorded angle, based on where + * the Pointer was when the button was released. + * + * The angle is based on the old position facing to the current position. + * + * If you wish to get the current angle, based on the velocity of the Pointer, then + * see the `Pointer.angle` property. + */ + getAngle(): number; + + /** + * Takes the previous and current Pointer positions and then generates an array of interpolated values between + * the two. The array will be populated up to the size of the `steps` argument. + * + * ```javaScript + * var points = pointer.getInterpolatedPosition(4); + * + * // points[0] = { x: 0, y: 0 } + * // points[1] = { x: 2, y: 1 } + * // points[2] = { x: 3, y: 2 } + * // points[3] = { x: 6, y: 3 } + * ``` + * + * Use this if you need to get smoothed values between the previous and current pointer positions. DOM pointer + * events can often fire faster than the main browser loop, and this will help you avoid janky movement + * especially if you have an object following a Pointer. + * + * Note that if you provide an output array it will only be populated up to the number of steps provided. + * It will not clear any previous data that may have existed beyond the range of the steps count. + * + * Internally it uses the Smooth Step interpolation calculation. + * @param steps The number of interpolation steps to use. Default 10. + * @param out An array to store the results in. If not provided a new one will be created. + */ + getInterpolatedPosition(steps?: integer, out?: any[]): any[]; + + /** + * Destroys this Pointer instance and resets its external references. + */ + destroy(): void; + + /** + * The x position of this Pointer. + * The value is in screen space. + * See `worldX` to get a camera converted position. + */ + x: number; + + /** + * The y position of this Pointer. + * The value is in screen space. + * See `worldY` to get a camera converted position. + */ + y: number; + + /** + * Time when this Pointer was most recently updated by a DOM Event. + * This comes directly from the `event.timeStamp` property. + * If no event has yet taken place, it will return zero. + */ + readonly time: number; + + } + /** * The mouse pointer is being held down. */ @@ -40691,27 +41374,6 @@ declare namespace Phaser { */ var MOUSE_WHEEL: integer; - /** - * Creates a new Interactive Object. - * - * This is called automatically by the Input Manager when you enable a Game Object for input. - * - * The resulting Interactive Object is mapped to the Game Object's `input` property. - * @param gameObject The Game Object to which this Interactive Object is bound. - * @param hitArea The hit area for this Interactive Object. Typically a geometry shape, like a Rectangle or Circle. - * @param hitAreaCallback The 'contains' check callback that the hit area shape will use for all hit tests. - */ - function CreateInteractiveObject(gameObject: Phaser.GameObjects.GameObject, hitArea: any, hitAreaCallback: Phaser.Types.Input.HitAreaCallback): Phaser.Types.Input.InteractiveObject; - - /** - * Creates a new Pixel Perfect Handler function. - * - * Access via `InputPlugin.makePixelPerfect` rather than calling it directly. - * @param textureManager A reference to the Texture Manager. - * @param alphaTolerance The alpha level that the pixel should be above to be included as a successful interaction. - */ - function CreatePixelPerfectHandler(textureManager: Phaser.Textures.TextureManager, alphaTolerance: integer): Function; - namespace Events { /** * The Input Plugin Boot Event. @@ -41292,7 +41954,7 @@ declare namespace Phaser { * * This event is dispatched by the Input Plugin belonging to a Scene if a pointer moves out of any interactive Game Object. * - * Listen to this event from within a Scene using: `this.input.on('pointerup', listener)`. + * Listen to this event from within a Scene using: `this.input.on('pointerout', listener)`. * * The event hierarchy is as follows: * @@ -41511,102 +42173,6 @@ declare namespace Phaser { } - namespace Configs { - /** - * Tatar SNES USB Controller Gamepad Configuration. - * USB Gamepad (STANDARD GAMEPAD Vendor: 0079 Product: 0011) - */ - var SNES_USB: object; - - /** - * PlayStation DualShock 4 Gamepad Configuration. - * Sony PlayStation DualShock 4 (v2) wireless controller - */ - var DUALSHOCK_4: object; - - /** - * XBox 360 Gamepad Configuration. - */ - var XBOX_360: object; - - } - - namespace Events { - /** - * The Gamepad Button Down Event. - * - * This event is dispatched by the Gamepad Plugin when a button has been pressed on any active Gamepad. - * - * Listen to this event from within a Scene using: `this.input.gamepad.on('down', listener)`. - * - * You can also listen for a DOWN event from a Gamepad instance. See the [GAMEPAD_BUTTON_DOWN]{@linkcode Phaser.Input.Gamepad.Events#event:GAMEPAD_BUTTON_DOWN} event for details. - */ - const BUTTON_DOWN: any; - - /** - * The Gamepad Button Up Event. - * - * This event is dispatched by the Gamepad Plugin when a button has been released on any active Gamepad. - * - * Listen to this event from within a Scene using: `this.input.gamepad.on('up', listener)`. - * - * You can also listen for an UP event from a Gamepad instance. See the [GAMEPAD_BUTTON_UP]{@linkcode Phaser.Input.Gamepad.Events#event:GAMEPAD_BUTTON_UP} event for details. - */ - const BUTTON_UP: any; - - /** - * The Gamepad Connected Event. - * - * This event is dispatched by the Gamepad Plugin when a Gamepad has been connected. - * - * Listen to this event from within a Scene using: `this.input.gamepad.once('connected', listener)`. - * - * Note that the browser may require you to press a button on a gamepad before it will allow you to access it, - * this is for security reasons. However, it may also trust the page already, in which case you won't get the - * 'connected' event and instead should check `GamepadPlugin.total` to see if it thinks there are any gamepads - * already connected. - */ - const CONNECTED: any; - - /** - * The Gamepad Disconnected Event. - * - * This event is dispatched by the Gamepad Plugin when a Gamepad has been disconnected. - * - * Listen to this event from within a Scene using: `this.input.gamepad.once('disconnected', listener)`. - */ - const DISCONNECTED: any; - - /** - * The Gamepad Button Down Event. - * - * This event is dispatched by a Gamepad instance when a button has been pressed on it. - * - * Listen to this event from a Gamepad instance. Once way to get this is from the `pad1`, `pad2`, etc properties on the Gamepad Plugin: - * `this.input.gamepad.pad1.on('down', listener)`. - * - * Note that you will not receive any Gamepad button events until the browser considers the Gamepad as being 'connected'. - * - * You can also listen for a DOWN event from the Gamepad Plugin. See the [BUTTON_DOWN]{@linkcode Phaser.Input.Gamepad.Events#event:BUTTON_DOWN} event for details. - */ - const GAMEPAD_BUTTON_DOWN: any; - - /** - * The Gamepad Button Up Event. - * - * This event is dispatched by a Gamepad instance when a button has been released on it. - * - * Listen to this event from a Gamepad instance. Once way to get this is from the `pad1`, `pad2`, etc properties on the Gamepad Plugin: - * `this.input.gamepad.pad1.on('up', listener)`. - * - * Note that you will not receive any Gamepad button events until the browser considers the Gamepad as being 'connected'. - * - * You can also listen for an UP event from the Gamepad Plugin. See the [BUTTON_UP]{@linkcode Phaser.Input.Gamepad.Events#event:BUTTON_UP} event for details. - */ - const GAMEPAD_BUTTON_UP: any; - - } - /** * A single Gamepad. * @@ -41975,1079 +42541,105 @@ declare namespace Phaser { } - } - - /** - * The Input Manager is responsible for handling the pointer related systems in a single Phaser Game instance. - * - * Based on the Game Config it will create handlers for mouse and touch support. - * - * Keyboard and Gamepad are plugins, handled directly by the InputPlugin class. - * - * It then manages the events, pointer creation and general hit test related operations. - * - * You rarely need to interact with the Input Manager directly, and as such, all of its properties and methods - * should be considered private. Instead, you should use the Input Plugin, which is a Scene level system, responsible - * for dealing with all input events for a Scene. - */ - class InputManager { - /** - * - * @param game The Game instance that owns the Input Manager. - * @param config The Input Configuration object, as set in the Game Config. - */ - constructor(game: Phaser.Game, config: object); - - /** - * The Game instance that owns the Input Manager. - * A Game only maintains on instance of the Input Manager at any time. - */ - readonly game: Phaser.Game; - - /** - * A reference to the global Game Scale Manager. - * Used for all bounds checks and pointer scaling. - */ - scaleManager: Phaser.Scale.ScaleManager; - - /** - * The Canvas that is used for all DOM event input listeners. - */ - canvas: HTMLCanvasElement; - - /** - * The Game Configuration object, as set during the game boot. - */ - config: Phaser.Core.Config; - - /** - * If set, the Input Manager will run its update loop every frame. - */ - enabled: boolean; - - /** - * The Event Emitter instance that the Input Manager uses to emit events from. - */ - events: Phaser.Events.EventEmitter; - - /** - * Are any mouse or touch pointers currently over the game canvas? - * This is updated automatically by the canvas over and out handlers. - */ - readonly isOver: boolean; - - /** - * The default CSS cursor to be used when interacting with your game. - * - * See the `setDefaultCursor` method for more details. - */ - defaultCursor: string; - - /** - * A reference to the Keyboard Manager class, if enabled via the `input.keyboard` Game Config property. - */ - keyboard: Phaser.Input.Keyboard.KeyboardManager; - - /** - * A reference to the Mouse Manager class, if enabled via the `input.mouse` Game Config property. - */ - mouse: Phaser.Input.Mouse.MouseManager; - - /** - * A reference to the Touch Manager class, if enabled via the `input.touch` Game Config property. - */ - touch: Phaser.Input.Touch.TouchManager; - - /** - * An array of Pointers that have been added to the game. - * The first entry is reserved for the Mouse Pointer, the rest are Touch Pointers. - * - * By default there is 1 touch pointer enabled. If you need more use the `addPointer` method to start them, - * or set the `input.activePointers` property in the Game Config. - */ - pointers: Phaser.Input.Pointer[]; - - /** - * The number of touch objects activated and being processed each update. - * - * You can change this by either calling `addPointer` at run-time, or by - * setting the `input.activePointers` property in the Game Config. - */ - readonly pointersTotal: integer; - - /** - * The mouse has its own unique Pointer object, which you can reference directly if making a _desktop specific game_. - * If you are supporting both desktop and touch devices then do not use this property, instead use `activePointer` - * which will always map to the most recently interacted pointer. - */ - mousePointer: Phaser.Input.Pointer; - - /** - * The most recently active Pointer object. - * - * If you've only 1 Pointer in your game then this will accurately be either the first finger touched, or the mouse. - * - * If your game doesn't need to support multi-touch then you can safely use this property in all of your game - * code and it will adapt to be either the mouse or the touch, based on device. - */ - activePointer: Phaser.Input.Pointer; - - /** - * If the top-most Scene in the Scene List receives an input it will stop input from - * propagating any lower down the scene list, i.e. if you have a UI Scene at the top - * and click something on it, that click will not then be passed down to any other - * Scene below. Disable this to have input events passed through all Scenes, all the time. - */ - globalTopOnly: boolean; - - /** - * The time this Input Manager was last updated. - * This value is populated by the Game Step each frame. - */ - readonly time: number; - - /** - * The Boot handler is called by Phaser.Game when it first starts up. - * The renderer is available by now. - */ - protected boot(): void; - - /** - * Tells the Input system to set a custom cursor. - * - * This cursor will be the default cursor used when interacting with the game canvas. - * - * If an Interactive Object also sets a custom cursor, this is the cursor that is reset after its use. - * - * Any valid CSS cursor value is allowed, including paths to image files, i.e.: - * - * ```javascript - * this.input.setDefaultCursor('url(assets/cursors/sword.cur), pointer'); - * ``` - * - * Please read about the differences between browsers when it comes to the file formats and sizes they support: - * - * https://developer.mozilla.org/en-US/docs/Web/CSS/cursor - * https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_User_Interface/Using_URL_values_for_the_cursor_property - * - * It's up to you to pick a suitable cursor format that works across the range of browsers you need to support. - * @param cursor The CSS to be used when setting the default cursor. - */ - setDefaultCursor(cursor: string): void; - - /** - * Adds new Pointer objects to the Input Manager. - * - * By default Phaser creates 2 pointer objects: `mousePointer` and `pointer1`. - * - * You can create more either by calling this method, or by setting the `input.activePointers` property - * in the Game Config, up to a maximum of 10 pointers. - * - * The first 10 pointers are available via the `InputPlugin.pointerX` properties, once they have been added - * via this method. - * @param quantity The number of new Pointers to create. A maximum of 10 is allowed in total. Default 1. - */ - addPointer(quantity?: integer): Phaser.Input.Pointer[]; - - /** - * Internal method that gets a list of all the active Input Plugins in the game - * and updates each of them in turn, in reverse order (top to bottom), to allow - * for DOM top-level event handling simulation. - * @param type The type of event to process. - * @param pointers An array of Pointers on which the event occurred. - */ - updateInputPlugins(type: integer, pointers: Phaser.Input.Pointer[]): void; - - /** - * Performs a hit test using the given Pointer and camera, against an array of interactive Game Objects. - * - * The Game Objects are culled against the camera, and then the coordinates are translated into the local camera space - * and used to determine if they fall within the remaining Game Objects hit areas or not. - * - * If nothing is matched an empty array is returned. - * - * This method is called automatically by InputPlugin.hitTestPointer and doesn't usually need to be invoked directly. - * @param pointer The Pointer to test against. - * @param gameObjects An array of interactive Game Objects to check. - * @param camera The Camera which is being tested against. - * @param output An array to store the results in. If not given, a new empty array is created. - */ - hitTest(pointer: Phaser.Input.Pointer, gameObjects: any[], camera: Phaser.Cameras.Scene2D.Camera, output?: any[]): any[]; - - /** - * Checks if the given x and y coordinate are within the hit area of the Game Object. - * - * This method assumes that the coordinate values have already been translated into the space of the Game Object. - * - * If the coordinates are within the hit area they are set into the Game Objects Input `localX` and `localY` properties. - * @param gameObject The interactive Game Object to check against. - * @param x The translated x coordinate for the hit test. - * @param y The translated y coordinate for the hit test. - */ - pointWithinHitArea(gameObject: Phaser.GameObjects.GameObject, x: number, y: number): boolean; - - /** - * Checks if the given x and y coordinate are within the hit area of the Interactive Object. - * - * This method assumes that the coordinate values have already been translated into the space of the Interactive Object. - * - * If the coordinates are within the hit area they are set into the Interactive Objects Input `localX` and `localY` properties. - * @param object The Interactive Object to check against. - * @param x The translated x coordinate for the hit test. - * @param y The translated y coordinate for the hit test. - */ - pointWithinInteractiveObject(object: Phaser.Types.Input.InteractiveObject, x: number, y: number): boolean; - - /** - * Transforms the pageX and pageY values of a Pointer into the scaled coordinate space of the Input Manager. - * @param pointer The Pointer to transform the values for. - * @param pageX The Page X value. - * @param pageY The Page Y value. - * @param wasMove Are we transforming the Pointer from a move event, or an up / down event? - */ - transformPointer(pointer: Phaser.Input.Pointer, pageX: number, pageY: number, wasMove: boolean): void; - - /** - * Destroys the Input Manager and all of its systems. - * - * There is no way to recover from doing this. - */ - destroy(): void; - - } - - /** - * The Input Plugin belongs to a Scene and handles all input related events and operations for it. - * - * You can access it from within a Scene using `this.input`. - * - * It emits events directly. For example, you can do: - * - * ```javascript - * this.input.on('pointerdown', callback, context); - * ``` - * - * To listen for a pointer down event anywhere on the game canvas. - * - * Game Objects can be enabled for input by calling their `setInteractive` method. After which they - * will directly emit input events: - * - * ```javascript - * var sprite = this.add.sprite(x, y, texture); - * sprite.setInteractive(); - * sprite.on('pointerdown', callback, context); - * ``` - * - * There are lots of game configuration options available relating to input. - * See the [Input Config object]{@linkcode Phaser.Types.Core.InputConfig} for more details, including how to deal with Phaser - * listening for input events outside of the canvas, how to set a default number of pointers, input - * capture settings and more. - * - * Please also see the Input examples and tutorials for further information. - */ - class InputPlugin extends Phaser.Events.EventEmitter { - /** - * - * @param scene A reference to the Scene that this Input Plugin is responsible for. - */ - constructor(scene: Phaser.Scene); - - /** - * An instance of the Gamepad Plugin class, if enabled via the `input.gamepad` Scene or Game Config property. - * Use this to create access Gamepads connected to the browser and respond to gamepad buttons. - */ - gamepad: Phaser.Input.Gamepad.GamepadPlugin; - - /** - * A reference to the Scene that this Input Plugin is responsible for. - */ - scene: Phaser.Scene; - - /** - * A reference to the Scene Systems class. - */ - systems: Phaser.Scenes.Systems; - - /** - * A reference to the Scene Systems Settings. - */ - settings: Phaser.Types.Scenes.SettingsObject; - - /** - * A reference to the Game Input Manager. - */ - manager: Phaser.Input.InputManager; - - /** - * If `true` this Input Plugin will process DOM input events. - */ - enabled: boolean; - - /** - * A reference to the Scene Display List. This property is set during the `boot` method. - */ - displayList: Phaser.GameObjects.DisplayList; - - /** - * A reference to the Scene Cameras Manager. This property is set during the `boot` method. - */ - cameras: Phaser.Cameras.Scene2D.CameraManager; - - /** - * A reference to the Mouse Manager. - * - * This property is only set if Mouse support has been enabled in your Game Configuration file. - * - * If you just wish to get access to the mouse pointer, use the `mousePointer` property instead. - */ - mouse: Phaser.Input.Mouse.MouseManager; - - /** - * When set to `true` (the default) the Input Plugin will emulate DOM behavior by only emitting events from - * the top-most Game Objects in the Display List. - * - * If set to `false` it will emit events from all Game Objects below a Pointer, not just the top one. - */ - topOnly: boolean; - - /** - * How often should the Pointers be checked? - * - * The value is a time, given in ms, and is the time that must have elapsed between game steps before - * the Pointers will be polled again. When a pointer is polled it runs a hit test to see which Game - * Objects are currently below it, or being interacted with it. - * - * Pointers will *always* be checked if they have been moved by the user, or press or released. - * - * This property only controls how often they will be polled if they have not been updated. - * You should set this if you want to have Game Objects constantly check against the pointers, even - * if the pointer didn't itself move. - * - * Set to 0 to poll constantly. Set to -1 to only poll on user movement. - */ - pollRate: integer; - - /** - * The distance, in pixels, a pointer has to move while being held down, before it thinks it is being dragged. - */ - dragDistanceThreshold: number; - - /** - * The amount of time, in ms, a pointer has to be held down before it thinks it is dragging. - * - * The default polling rate is to poll only on move so once the time threshold is reached the - * drag event will not start until you move the mouse. If you want it to start immediately - * when the time threshold is reached, you must increase the polling rate by calling - * [setPollAlways]{@linkcode Phaser.Input.InputPlugin#setPollAlways} or - * [setPollRate]{@linkcode Phaser.Input.InputPlugin#setPollRate}. - */ - dragTimeThreshold: number; - - /** - * Checks to see if both this plugin and the Scene to which it belongs is active. - */ - isActive(): boolean; - - /** - * This is called automatically by the Input Manager. - * It emits events for plugins to listen to and also handles polling updates, if enabled. - * @param time The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. - * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. - */ - updatePoll(time: number, delta: number): boolean; - - /** - * Clears a Game Object so it no longer has an Interactive Object associated with it. - * The Game Object is then queued for removal from the Input Plugin on the next update. - * @param gameObject The Game Object that will have its Interactive Object removed. - * @param skipQueue Skip adding this Game Object into the removal queue? Default false. - */ - clear(gameObject: Phaser.GameObjects.GameObject, skipQueue?: boolean): Phaser.GameObjects.GameObject; - - /** - * Disables Input on a single Game Object. - * - * An input disabled Game Object still retains its Interactive Object component and can be re-enabled - * at any time, by passing it to `InputPlugin.enable`. - * @param gameObject The Game Object to have its input system disabled. - */ - disable(gameObject: Phaser.GameObjects.GameObject): void; - - /** - * Enable a Game Object for interaction. - * - * If the Game Object already has an Interactive Object component, it is enabled and returned. - * - * Otherwise, a new Interactive Object component is created and assigned to the Game Object's `input` property. - * - * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area - * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced - * input detection. - * - * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If - * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific - * shape for it to use. - * - * You can also provide an Input Configuration Object as the only argument to this method. - * @param gameObject The Game Object to be enabled for input. - * @param shape Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used. - * @param callback The 'contains' function to invoke to check if the pointer is within the hit area. - * @param dropZone Is this Game Object a drop zone or not? Default false. - */ - enable(gameObject: Phaser.GameObjects.GameObject, shape?: Phaser.Types.Input.InputConfiguration | any, callback?: Phaser.Types.Input.HitAreaCallback, dropZone?: boolean): Phaser.Input.InputPlugin; - - /** - * Takes the given Pointer and performs a hit test against it, to see which interactive Game Objects - * it is currently above. - * - * The hit test is performed against which-ever Camera the Pointer is over. If it is over multiple - * cameras, it starts checking the camera at the top of the camera list, and if nothing is found, iterates down the list. - * @param pointer The Pointer to check against the Game Objects. - */ - hitTestPointer(pointer: Phaser.Input.Pointer): Phaser.GameObjects.GameObject[]; - - /** - * Returns the drag state of the given Pointer for this Input Plugin. - * - * The state will be one of the following: - * - * 0 = Not dragging anything - * 1 = Primary button down and objects below, so collect a draglist - * 2 = Pointer being checked if meets drag criteria - * 3 = Pointer meets criteria, notify the draglist - * 4 = Pointer actively dragging the draglist and has moved - * 5 = Pointer actively dragging but has been released, notify draglist - * @param pointer The Pointer to get the drag state for. - */ - getDragState(pointer: Phaser.Input.Pointer): integer; - - /** - * Sets the drag state of the given Pointer for this Input Plugin. - * - * The state must be one of the following values: - * - * 0 = Not dragging anything - * 1 = Primary button down and objects below, so collect a draglist - * 2 = Pointer being checked if meets drag criteria - * 3 = Pointer meets criteria, notify the draglist - * 4 = Pointer actively dragging the draglist and has moved - * 5 = Pointer actively dragging but has been released, notify draglist - * @param pointer The Pointer to set the drag state for. - * @param state The drag state value. An integer between 0 and 5. - */ - setDragState(pointer: Phaser.Input.Pointer, state: integer): void; - - /** - * Sets the draggable state of the given array of Game Objects. - * - * They can either be set to be draggable, or can have their draggable state removed by passing `false`. - * - * A Game Object will not fire drag events unless it has been specifically enabled for drag. - * @param gameObjects An array of Game Objects to change the draggable state on. - * @param value Set to `true` if the Game Objects should be made draggable, `false` if they should be unset. Default true. - */ - setDraggable(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], value?: boolean): Phaser.Input.InputPlugin; - - /** - * Creates a function that can be passed to `setInteractive`, `enable` or `setHitArea` that will handle - * pixel-perfect input detection on an Image or Sprite based Game Object, or any custom class that extends them. - * - * The following will create a sprite that is clickable on any pixel that has an alpha value >= 1. - * - * ```javascript - * this.add.sprite(x, y, key).setInteractive(this.input.makePixelPerfect()); - * ``` - * - * The following will create a sprite that is clickable on any pixel that has an alpha value >= 150. - * - * ```javascript - * this.add.sprite(x, y, key).setInteractive(this.input.makePixelPerfect(150)); - * ``` - * - * Once you have made an Interactive Object pixel perfect it impacts all input related events for it: down, up, - * dragstart, drag, etc. - * - * As a pointer interacts with the Game Object it will constantly poll the texture, extracting a single pixel from - * the given coordinates and checking its color values. This is an expensive process, so should only be enabled on - * Game Objects that really need it. - * - * You cannot make non-texture based Game Objects pixel perfect. So this will not work on Graphics, BitmapText, - * Render Textures, Text, Tilemaps, Containers or Particles. - * @param alphaTolerance The alpha level that the pixel should be above to be included as a successful interaction. Default 1. - */ - makePixelPerfect(alphaTolerance?: integer): Function; - - /** - * Sets the hit area for the given array of Game Objects. - * - * A hit area is typically one of the geometric shapes Phaser provides, such as a `Phaser.Geom.Rectangle` - * or `Phaser.Geom.Circle`. However, it can be any object as long as it works with the provided callback. - * - * If no hit area is provided a Rectangle is created based on the size of the Game Object, if possible - * to calculate. - * - * The hit area callback is the function that takes an `x` and `y` coordinate and returns a boolean if - * those values fall within the area of the shape or not. All of the Phaser geometry objects provide this, - * such as `Phaser.Geom.Rectangle.Contains`. - * @param gameObjects An array of Game Objects to set the hit area on. - * @param shape Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used. - * @param callback The 'contains' function to invoke to check if the pointer is within the hit area. - */ - setHitArea(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], shape?: Phaser.Types.Input.InputConfiguration | any, callback?: Phaser.Types.Input.HitAreaCallback): Phaser.Input.InputPlugin; - - /** - * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Circle` shape, using - * the given coordinates and radius to control its position and size. - * @param gameObjects An array of Game Objects to set as having a circle hit area. - * @param x The center of the circle. - * @param y The center of the circle. - * @param radius The radius of the circle. - * @param callback The hit area callback. If undefined it uses Circle.Contains. - */ - setHitAreaCircle(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], x: number, y: number, radius: number, callback?: Phaser.Types.Input.HitAreaCallback): Phaser.Input.InputPlugin; - - /** - * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Ellipse` shape, using - * the given coordinates and dimensions to control its position and size. - * @param gameObjects An array of Game Objects to set as having an ellipse hit area. - * @param x The center of the ellipse. - * @param y The center of the ellipse. - * @param width The width of the ellipse. - * @param height The height of the ellipse. - * @param callback The hit area callback. If undefined it uses Ellipse.Contains. - */ - setHitAreaEllipse(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], x: number, y: number, width: number, height: number, callback?: Phaser.Types.Input.HitAreaCallback): Phaser.Input.InputPlugin; - - /** - * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Rectangle` shape, using - * the Game Objects texture frame to define the position and size of the hit area. - * @param gameObjects An array of Game Objects to set as having an ellipse hit area. - * @param callback The hit area callback. If undefined it uses Rectangle.Contains. - */ - setHitAreaFromTexture(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], callback?: Phaser.Types.Input.HitAreaCallback): Phaser.Input.InputPlugin; - - /** - * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Rectangle` shape, using - * the given coordinates and dimensions to control its position and size. - * @param gameObjects An array of Game Objects to set as having a rectangular hit area. - * @param x The top-left of the rectangle. - * @param y The top-left of the rectangle. - * @param width The width of the rectangle. - * @param height The height of the rectangle. - * @param callback The hit area callback. If undefined it uses Rectangle.Contains. - */ - setHitAreaRectangle(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], x: number, y: number, width: number, height: number, callback?: Phaser.Types.Input.HitAreaCallback): Phaser.Input.InputPlugin; - - /** - * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Triangle` shape, using - * the given coordinates to control the position of its points. - * @param gameObjects An array of Game Objects to set as having a triangular hit area. - * @param x1 The x coordinate of the first point of the triangle. - * @param y1 The y coordinate of the first point of the triangle. - * @param x2 The x coordinate of the second point of the triangle. - * @param y2 The y coordinate of the second point of the triangle. - * @param x3 The x coordinate of the third point of the triangle. - * @param y3 The y coordinate of the third point of the triangle. - * @param callback The hit area callback. If undefined it uses Triangle.Contains. - */ - setHitAreaTriangle(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, callback?: Phaser.Types.Input.HitAreaCallback): Phaser.Input.InputPlugin; - - /** - * Creates an Input Debug Shape for the given Game Object. - * - * The Game Object must have _already_ been enabled for input prior to calling this method. - * - * This is intended to assist you during development and debugging. - * - * Debug Shapes can only be created for Game Objects that are using standard Phaser Geometry for input, - * including: Circle, Ellipse, Line, Polygon, Rectangle and Triangle. - * - * Game Objects that are using their automatic hit areas are using Rectangles by default, so will also work. - * - * The Debug Shape is created and added to the display list and is then kept in sync with the Game Object - * it is connected with. Should you need to modify it yourself, such as to hide it, you can access it via - * the Game Object property: `GameObject.input.hitAreaDebug`. - * - * Calling this method on a Game Object that already has a Debug Shape will first destroy the old shape, - * before creating a new one. If you wish to remove the Debug Shape entirely, you should call the - * method `InputPlugin.removeDebug`. - * - * Note that the debug shape will only show the outline of the input area. If the input test is using a - * pixel perfect check, for example, then this is not displayed. If you are using a custom shape, that - * doesn't extend one of the base Phaser Geometry objects, as your hit area, then this method will not - * work. - * @param gameObject The Game Object to create the input debug shape for. - * @param color The outline color of the debug shape. Default 0x00ff00. - */ - enableDebug(gameObject: Phaser.GameObjects.GameObject, color?: number): Phaser.Input.InputPlugin; - - /** - * Removes an Input Debug Shape from the given Game Object. - * - * The shape is destroyed immediately and the `hitAreaDebug` property is set to `null`. - * @param gameObject The Game Object to remove the input debug shape from. - */ - removeDebug(gameObject: Phaser.GameObjects.GameObject): Phaser.Input.InputPlugin; - - /** - * Sets the Pointers to always poll. - * - * When a pointer is polled it runs a hit test to see which Game Objects are currently below it, - * or being interacted with it, regardless if the Pointer has actually moved or not. - * - * You should enable this if you want objects in your game to fire over / out events, and the objects - * are constantly moving, but the pointer may not have. Polling every frame has additional computation - * costs, especially if there are a large number of interactive objects in your game. - */ - setPollAlways(): Phaser.Input.InputPlugin; - - /** - * Sets the Pointers to only poll when they are moved or updated. - * - * When a pointer is polled it runs a hit test to see which Game Objects are currently below it, - * or being interacted with it. - */ - setPollOnMove(): Phaser.Input.InputPlugin; - - /** - * Sets the poll rate value. This is the amount of time that should have elapsed before a pointer - * will be polled again. See the `setPollAlways` and `setPollOnMove` methods. - * @param value The amount of time, in ms, that should elapsed before re-polling the pointers. - */ - setPollRate(value: number): Phaser.Input.InputPlugin; - - /** - * When set to `true` the global Input Manager will emulate DOM behavior by only emitting events from - * the top-most Scene in the Scene List. By default, if a Scene receives an input event it will then stop the event - * from flowing down to any Scenes below it in the Scene list. To disable this behavior call this method with `false`. - * @param value Set to `true` to stop processing input events on the Scene that receives it, or `false` to let the event continue down the Scene list. - */ - setGlobalTopOnly(value: boolean): Phaser.Input.InputPlugin; - - /** - * When set to `true` this Input Plugin will emulate DOM behavior by only emitting events from - * the top-most Game Objects in the Display List. - * - * If set to `false` it will emit events from all Game Objects below a Pointer, not just the top one. - * @param value `true` to only include the top-most Game Object, or `false` to include all Game Objects in a hit test. - */ - setTopOnly(value: boolean): Phaser.Input.InputPlugin; - - /** - * Given an array of Game Objects, sort the array and return it, so that the objects are in depth index order - * with the lowest at the bottom. - * @param gameObjects An array of Game Objects to be sorted. - */ - sortGameObjects(gameObjects: Phaser.GameObjects.GameObject[]): Phaser.GameObjects.GameObject[]; - - /** - * This method should be called from within an input event handler, such as `pointerdown`. - * - * When called, it stops the Input Manager from allowing _this specific event_ to be processed by any other Scene - * not yet handled in the scene list. - */ - stopPropagation(): Phaser.Input.InputPlugin; - - /** - * Adds new Pointer objects to the Input Manager. - * - * By default Phaser creates 2 pointer objects: `mousePointer` and `pointer1`. - * - * You can create more either by calling this method, or by setting the `input.activePointers` property - * in the Game Config, up to a maximum of 10 pointers. - * - * The first 10 pointers are available via the `InputPlugin.pointerX` properties, once they have been added - * via this method. - * @param quantity The number of new Pointers to create. A maximum of 10 is allowed in total. Default 1. - */ - addPointer(quantity?: integer): Phaser.Input.Pointer[]; - - /** - * Tells the Input system to set a custom cursor. - * - * This cursor will be the default cursor used when interacting with the game canvas. - * - * If an Interactive Object also sets a custom cursor, this is the cursor that is reset after its use. - * - * Any valid CSS cursor value is allowed, including paths to image files, i.e.: - * - * ```javascript - * this.input.setDefaultCursor('url(assets/cursors/sword.cur), pointer'); - * ``` - * - * Please read about the differences between browsers when it comes to the file formats and sizes they support: - * - * https://developer.mozilla.org/en-US/docs/Web/CSS/cursor - * https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_User_Interface/Using_URL_values_for_the_cursor_property - * - * It's up to you to pick a suitable cursor format that works across the range of browsers you need to support. - * @param cursor The CSS to be used when setting the default cursor. - */ - setDefaultCursor(cursor: string): Phaser.Input.InputPlugin; - - /** - * The x coordinates of the ActivePointer based on the first camera in the camera list. - * This is only safe to use if your game has just 1 non-transformed camera and doesn't use multi-touch. - */ - readonly x: number; - - /** - * The y coordinates of the ActivePointer based on the first camera in the camera list. - * This is only safe to use if your game has just 1 non-transformed camera and doesn't use multi-touch. - */ - readonly y: number; - - /** - * Are any mouse or touch pointers currently over the game canvas? - */ - readonly isOver: boolean; - - /** - * The mouse has its own unique Pointer object, which you can reference directly if making a _desktop specific game_. - * If you are supporting both desktop and touch devices then do not use this property, instead use `activePointer` - * which will always map to the most recently interacted pointer. - */ - readonly mousePointer: Phaser.Input.Pointer; - - /** - * The current active input Pointer. - */ - readonly activePointer: Phaser.Input.Pointer; - - /** - * A touch-based Pointer object. - * This will be `undefined` by default unless you add a new Pointer using `addPointer`. - */ - readonly pointer1: Phaser.Input.Pointer; - - /** - * A touch-based Pointer object. - * This will be `undefined` by default unless you add a new Pointer using `addPointer`. - */ - readonly pointer2: Phaser.Input.Pointer; - - /** - * A touch-based Pointer object. - * This will be `undefined` by default unless you add a new Pointer using `addPointer`. - */ - readonly pointer3: Phaser.Input.Pointer; - - /** - * A touch-based Pointer object. - * This will be `undefined` by default unless you add a new Pointer using `addPointer`. - */ - readonly pointer4: Phaser.Input.Pointer; - - /** - * A touch-based Pointer object. - * This will be `undefined` by default unless you add a new Pointer using `addPointer`. - */ - readonly pointer5: Phaser.Input.Pointer; - - /** - * A touch-based Pointer object. - * This will be `undefined` by default unless you add a new Pointer using `addPointer`. - */ - readonly pointer6: Phaser.Input.Pointer; - - /** - * A touch-based Pointer object. - * This will be `undefined` by default unless you add a new Pointer using `addPointer`. - */ - readonly pointer7: Phaser.Input.Pointer; - - /** - * A touch-based Pointer object. - * This will be `undefined` by default unless you add a new Pointer using `addPointer`. - */ - readonly pointer8: Phaser.Input.Pointer; - - /** - * A touch-based Pointer object. - * This will be `undefined` by default unless you add a new Pointer using `addPointer`. - */ - readonly pointer9: Phaser.Input.Pointer; - - /** - * A touch-based Pointer object. - * This will be `undefined` by default unless you add a new Pointer using `addPointer`. - */ - readonly pointer10: Phaser.Input.Pointer; - - /** - * An instance of the Keyboard Plugin class, if enabled via the `input.keyboard` Scene or Game Config property. - * Use this to create Key objects and listen for keyboard specific events. - */ - keyboard: Phaser.Input.Keyboard.KeyboardPlugin; - - } - - namespace InputPluginCache { - /** - * Static method called directly by the Core internal Plugins. - * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin) - * Plugin is the object to instantiate to create the plugin - * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input) - */ - var register: Function; - - /** - * Returns the input plugin object from the cache based on the given key. - */ - var getCore: Function; - - /** - * Installs all of the registered Input Plugins into the given target. - */ - var install: Function; - - /** - * Removes an input plugin based on the given key. - */ - var remove: Function; - - } - - namespace Keyboard { - /** - * A KeyCombo will listen for a specific string of keys from the Keyboard, and when it receives them - * it will emit a `keycombomatch` event from the Keyboard Manager. - * - * The keys to be listened for can be defined as: - * - * A string (i.e. 'ATARI') - * An array of either integers (key codes) or strings, or a mixture of both - * An array of objects (such as Key objects) with a public 'keyCode' property - * - * For example, to listen for the Konami code (up, up, down, down, left, right, left, right, b, a, enter) - * you could pass the following array of key codes: - * - * ```javascript - * this.input.keyboard.createCombo([ 38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 13 ], { resetOnMatch: true }); - * - * this.input.keyboard.on('keycombomatch', function (event) { - * console.log('Konami Code entered!'); - * }); - * ``` - * - * Or, to listen for the user entering the word PHASER: - * - * ```javascript - * this.input.keyboard.createCombo('PHASER'); - * ``` - */ - class KeyCombo { + namespace Configs { /** - * - * @param keyboardPlugin A reference to the Keyboard Plugin. - * @param keys The keys that comprise this combo. - * @param config A Key Combo configuration object. + * Tatar SNES USB Controller Gamepad Configuration. + * USB Gamepad (STANDARD GAMEPAD Vendor: 0079 Product: 0011) */ - constructor(keyboardPlugin: Phaser.Input.Keyboard.KeyboardPlugin, keys: string | integer[] | object[], config?: Phaser.Types.Input.Keyboard.KeyComboConfig); + var SNES_USB: object; /** - * A reference to the Keyboard Manager + * PlayStation DualShock 4 Gamepad Configuration. + * Sony PlayStation DualShock 4 (v2) wireless controller */ - manager: Phaser.Input.Keyboard.KeyboardPlugin; + var DUALSHOCK_4: object; /** - * A flag that controls if this Key Combo is actively processing keys or not. + * XBox 360 Gamepad Configuration. */ - enabled: boolean; - - /** - * An array of the keycodes that comprise this combo. - */ - keyCodes: any[]; - - /** - * The current keyCode the combo is waiting for. - */ - current: integer; - - /** - * The current index of the key being waited for in the 'keys' string. - */ - index: integer; - - /** - * The length of this combo (in keycodes) - */ - size: number; - - /** - * The time the previous key in the combo was matched. - */ - timeLastMatched: number; - - /** - * Has this Key Combo been matched yet? - */ - matched: boolean; - - /** - * The time the entire combo was matched. - */ - timeMatched: number; - - /** - * If they press the wrong key do we reset the combo? - */ - resetOnWrongKey: boolean; - - /** - * The max delay in ms between each key press. Above this the combo is reset. 0 means disabled. - */ - maxKeyDelay: integer; - - /** - * If previously matched and they press the first key of the combo again, will it reset? - */ - resetOnMatch: boolean; - - /** - * If the combo matches, will it delete itself? - */ - deleteOnMatch: boolean; - - /** - * How far complete is this combo? A value between 0 and 1. - */ - readonly progress: number; - - /** - * Destroys this Key Combo and all of its references. - */ - destroy(): void; + var XBOX_360: object; } namespace Events { /** - * The Global Key Down Event. + * The Gamepad Button Down Event. * - * This event is dispatched by the Keyboard Plugin when any key on the keyboard is pressed down. + * This event is dispatched by the Gamepad Plugin when a button has been pressed on any active Gamepad. * - * Listen to this event from within a Scene using: `this.input.keyboard.on('keydown', listener)`. + * Listen to this event from within a Scene using: `this.input.gamepad.on('down', listener)`. * - * You can also listen for a specific key being pressed. See [Keyboard.Events.KEY_DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:KEY_DOWN} for details. - * - * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:DOWN} for details. - * - * _Note_: Many keyboards are unable to process certain combinations of keys due to hardware limitations known as ghosting. - * Read [this article on ghosting]{@link http://www.html5gamedevs.com/topic/4876-impossible-to-use-more-than-2-keyboard-input-buttons-at-the-same-time/} for details. - * - * Also, please be aware that some browser extensions can disable or override Phaser keyboard handling. - * For example, the Chrome extension vimium is known to disable Phaser from using the D key, while EverNote disables the backtick key. - * There are others. So, please check your extensions if you find you have specific keys that don't work. + * You can also listen for a DOWN event from a Gamepad instance. See the [GAMEPAD_BUTTON_DOWN]{@linkcode Phaser.Input.Gamepad.Events#event:GAMEPAD_BUTTON_DOWN} event for details. */ - const ANY_KEY_DOWN: any; + const BUTTON_DOWN: any; /** - * The Global Key Up Event. + * The Gamepad Button Up Event. * - * This event is dispatched by the Keyboard Plugin when any key on the keyboard is released. + * This event is dispatched by the Gamepad Plugin when a button has been released on any active Gamepad. * - * Listen to this event from within a Scene using: `this.input.keyboard.on('keyup', listener)`. + * Listen to this event from within a Scene using: `this.input.gamepad.on('up', listener)`. * - * You can also listen for a specific key being released. See [Keyboard.Events.KEY_UP]{@linkcode Phaser.Input.Keyboard.Events#event:KEY_UP} for details. - * - * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.UP]{@linkcode Phaser.Input.Keyboard.Events#event:UP} for details. + * You can also listen for an UP event from a Gamepad instance. See the [GAMEPAD_BUTTON_UP]{@linkcode Phaser.Input.Gamepad.Events#event:GAMEPAD_BUTTON_UP} event for details. */ - const ANY_KEY_UP: any; + const BUTTON_UP: any; /** - * The Key Combo Match Event. + * The Gamepad Connected Event. * - * This event is dispatched by the Keyboard Plugin when a [Key Combo]{@link Phaser.Input.Keyboard.KeyCombo} is matched. + * This event is dispatched by the Gamepad Plugin when a Gamepad has been connected. * - * Listen for this event from the Key Plugin after a combo has been created: + * Listen to this event from within a Scene using: `this.input.gamepad.once('connected', listener)`. * - * ```javascript - * this.input.keyboard.createCombo([ 38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 13 ], { resetOnMatch: true }); - * - * this.input.keyboard.on('keycombomatch', function (event) { - * console.log('Konami Code entered!'); - * }); - * ``` + * Note that the browser may require you to press a button on a gamepad before it will allow you to access it, + * this is for security reasons. However, it may also trust the page already, in which case you won't get the + * 'connected' event and instead should check `GamepadPlugin.total` to see if it thinks there are any gamepads + * already connected. */ - const COMBO_MATCH: any; + const CONNECTED: any; /** - * The Key Down Event. + * The Gamepad Disconnected Event. * - * This event is dispatched by a [Key]{@link Phaser.Input.Keyboard.Key} object when it is pressed. + * This event is dispatched by the Gamepad Plugin when a Gamepad has been disconnected. * - * Listen for this event from the Key object instance directly: - * - * ```javascript - * var spaceBar = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.SPACE); - * - * spaceBar.on('down', listener) - * ``` - * - * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_DOWN} for details. + * Listen to this event from within a Scene using: `this.input.gamepad.once('disconnected', listener)`. */ - const DOWN: any; + const DISCONNECTED: any; /** - * The Key Down Event. + * The Gamepad Button Down Event. * - * This event is dispatched by the Keyboard Plugin when any key on the keyboard is pressed down. + * This event is dispatched by a Gamepad instance when a button has been pressed on it. * - * Unlike the `ANY_KEY_DOWN` event, this one has a special dynamic event name. For example, to listen for the `A` key being pressed - * use the following from within a Scene: `this.input.keyboard.on('keydown-A', listener)`. You can replace the `-A` part of the event - * name with any valid [Key Code string]{@link Phaser.Input.Keyboard.KeyCodes}. For example, this will listen for the space bar: - * `this.input.keyboard.on('keydown-SPACE', listener)`. + * Listen to this event from a Gamepad instance. Once way to get this is from the `pad1`, `pad2`, etc properties on the Gamepad Plugin: + * `this.input.gamepad.pad1.on('down', listener)`. * - * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_DOWN} for details. + * Note that you will not receive any Gamepad button events until the browser considers the Gamepad as being 'connected'. * - * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:DOWN} for details. - * - * _Note_: Many keyboards are unable to process certain combinations of keys due to hardware limitations known as ghosting. - * Read [this article on ghosting]{@link http://www.html5gamedevs.com/topic/4876-impossible-to-use-more-than-2-keyboard-input-buttons-at-the-same-time/} for details. - * - * Also, please be aware that some browser extensions can disable or override Phaser keyboard handling. - * For example, the Chrome extension vimium is known to disable Phaser from using the D key, while EverNote disables the backtick key. - * There are others. So, please check your extensions if you find you have specific keys that don't work. + * You can also listen for a DOWN event from the Gamepad Plugin. See the [BUTTON_DOWN]{@linkcode Phaser.Input.Gamepad.Events#event:BUTTON_DOWN} event for details. */ - const KEY_DOWN: any; + const GAMEPAD_BUTTON_DOWN: any; /** - * The Key Up Event. + * The Gamepad Button Up Event. * - * This event is dispatched by the Keyboard Plugin when any key on the keyboard is released. + * This event is dispatched by a Gamepad instance when a button has been released on it. * - * Unlike the `ANY_KEY_UP` event, this one has a special dynamic event name. For example, to listen for the `A` key being released - * use the following from within a Scene: `this.input.keyboard.on('keyup-A', listener)`. You can replace the `-A` part of the event - * name with any valid [Key Code string]{@link Phaser.Input.Keyboard.KeyCodes}. For example, this will listen for the space bar: - * `this.input.keyboard.on('keyup-SPACE', listener)`. + * Listen to this event from a Gamepad instance. Once way to get this is from the `pad1`, `pad2`, etc properties on the Gamepad Plugin: + * `this.input.gamepad.pad1.on('up', listener)`. * - * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_UP]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_UP} for details. + * Note that you will not receive any Gamepad button events until the browser considers the Gamepad as being 'connected'. * - * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.UP]{@linkcode Phaser.Input.Keyboard.Events#event:UP} for details. + * You can also listen for an UP event from the Gamepad Plugin. See the [BUTTON_UP]{@linkcode Phaser.Input.Gamepad.Events#event:BUTTON_UP} event for details. */ - const KEY_UP: any; - - /** - * The Key Up Event. - * - * This event is dispatched by a [Key]{@link Phaser.Input.Keyboard.Key} object when it is released. - * - * Listen for this event from the Key object instance directly: - * - * ```javascript - * var spaceBar = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.SPACE); - * - * spaceBar.on('up', listener) - * ``` - * - * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_UP]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_UP} for details. - */ - const UP: any; + const GAMEPAD_BUTTON_UP: any; } + } + + namespace Keyboard { /** * The Keyboard Manager is a helper class that belongs to the global Input Manager. * @@ -43515,6 +43107,245 @@ declare namespace Phaser { } + /** + * A KeyCombo will listen for a specific string of keys from the Keyboard, and when it receives them + * it will emit a `keycombomatch` event from the Keyboard Manager. + * + * The keys to be listened for can be defined as: + * + * A string (i.e. 'ATARI') + * An array of either integers (key codes) or strings, or a mixture of both + * An array of objects (such as Key objects) with a public 'keyCode' property + * + * For example, to listen for the Konami code (up, up, down, down, left, right, left, right, b, a, enter) + * you could pass the following array of key codes: + * + * ```javascript + * this.input.keyboard.createCombo([ 38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 13 ], { resetOnMatch: true }); + * + * this.input.keyboard.on('keycombomatch', function (event) { + * console.log('Konami Code entered!'); + * }); + * ``` + * + * Or, to listen for the user entering the word PHASER: + * + * ```javascript + * this.input.keyboard.createCombo('PHASER'); + * ``` + */ + class KeyCombo { + /** + * + * @param keyboardPlugin A reference to the Keyboard Plugin. + * @param keys The keys that comprise this combo. + * @param config A Key Combo configuration object. + */ + constructor(keyboardPlugin: Phaser.Input.Keyboard.KeyboardPlugin, keys: string | integer[] | object[], config?: Phaser.Types.Input.Keyboard.KeyComboConfig); + + /** + * A reference to the Keyboard Manager + */ + manager: Phaser.Input.Keyboard.KeyboardPlugin; + + /** + * A flag that controls if this Key Combo is actively processing keys or not. + */ + enabled: boolean; + + /** + * An array of the keycodes that comprise this combo. + */ + keyCodes: any[]; + + /** + * The current keyCode the combo is waiting for. + */ + current: integer; + + /** + * The current index of the key being waited for in the 'keys' string. + */ + index: integer; + + /** + * The length of this combo (in keycodes) + */ + size: number; + + /** + * The time the previous key in the combo was matched. + */ + timeLastMatched: number; + + /** + * Has this Key Combo been matched yet? + */ + matched: boolean; + + /** + * The time the entire combo was matched. + */ + timeMatched: number; + + /** + * If they press the wrong key do we reset the combo? + */ + resetOnWrongKey: boolean; + + /** + * The max delay in ms between each key press. Above this the combo is reset. 0 means disabled. + */ + maxKeyDelay: integer; + + /** + * If previously matched and they press the first key of the combo again, will it reset? + */ + resetOnMatch: boolean; + + /** + * If the combo matches, will it delete itself? + */ + deleteOnMatch: boolean; + + /** + * How far complete is this combo? A value between 0 and 1. + */ + readonly progress: number; + + /** + * Destroys this Key Combo and all of its references. + */ + destroy(): void; + + } + + namespace Events { + /** + * The Global Key Down Event. + * + * This event is dispatched by the Keyboard Plugin when any key on the keyboard is pressed down. + * + * Listen to this event from within a Scene using: `this.input.keyboard.on('keydown', listener)`. + * + * You can also listen for a specific key being pressed. See [Keyboard.Events.KEY_DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:KEY_DOWN} for details. + * + * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:DOWN} for details. + * + * _Note_: Many keyboards are unable to process certain combinations of keys due to hardware limitations known as ghosting. + * Read [this article on ghosting]{@link http://www.html5gamedevs.com/topic/4876-impossible-to-use-more-than-2-keyboard-input-buttons-at-the-same-time/} for details. + * + * Also, please be aware that some browser extensions can disable or override Phaser keyboard handling. + * For example, the Chrome extension vimium is known to disable Phaser from using the D key, while EverNote disables the backtick key. + * There are others. So, please check your extensions if you find you have specific keys that don't work. + */ + const ANY_KEY_DOWN: any; + + /** + * The Global Key Up Event. + * + * This event is dispatched by the Keyboard Plugin when any key on the keyboard is released. + * + * Listen to this event from within a Scene using: `this.input.keyboard.on('keyup', listener)`. + * + * You can also listen for a specific key being released. See [Keyboard.Events.KEY_UP]{@linkcode Phaser.Input.Keyboard.Events#event:KEY_UP} for details. + * + * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.UP]{@linkcode Phaser.Input.Keyboard.Events#event:UP} for details. + */ + const ANY_KEY_UP: any; + + /** + * The Key Combo Match Event. + * + * This event is dispatched by the Keyboard Plugin when a [Key Combo]{@link Phaser.Input.Keyboard.KeyCombo} is matched. + * + * Listen for this event from the Key Plugin after a combo has been created: + * + * ```javascript + * this.input.keyboard.createCombo([ 38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 13 ], { resetOnMatch: true }); + * + * this.input.keyboard.on('keycombomatch', function (event) { + * console.log('Konami Code entered!'); + * }); + * ``` + */ + const COMBO_MATCH: any; + + /** + * The Key Down Event. + * + * This event is dispatched by a [Key]{@link Phaser.Input.Keyboard.Key} object when it is pressed. + * + * Listen for this event from the Key object instance directly: + * + * ```javascript + * var spaceBar = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.SPACE); + * + * spaceBar.on('down', listener) + * ``` + * + * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_DOWN} for details. + */ + const DOWN: any; + + /** + * The Key Down Event. + * + * This event is dispatched by the Keyboard Plugin when any key on the keyboard is pressed down. + * + * Unlike the `ANY_KEY_DOWN` event, this one has a special dynamic event name. For example, to listen for the `A` key being pressed + * use the following from within a Scene: `this.input.keyboard.on('keydown-A', listener)`. You can replace the `-A` part of the event + * name with any valid [Key Code string]{@link Phaser.Input.Keyboard.KeyCodes}. For example, this will listen for the space bar: + * `this.input.keyboard.on('keydown-SPACE', listener)`. + * + * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_DOWN} for details. + * + * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:DOWN} for details. + * + * _Note_: Many keyboards are unable to process certain combinations of keys due to hardware limitations known as ghosting. + * Read [this article on ghosting]{@link http://www.html5gamedevs.com/topic/4876-impossible-to-use-more-than-2-keyboard-input-buttons-at-the-same-time/} for details. + * + * Also, please be aware that some browser extensions can disable or override Phaser keyboard handling. + * For example, the Chrome extension vimium is known to disable Phaser from using the D key, while EverNote disables the backtick key. + * There are others. So, please check your extensions if you find you have specific keys that don't work. + */ + const KEY_DOWN: any; + + /** + * The Key Up Event. + * + * This event is dispatched by the Keyboard Plugin when any key on the keyboard is released. + * + * Unlike the `ANY_KEY_UP` event, this one has a special dynamic event name. For example, to listen for the `A` key being released + * use the following from within a Scene: `this.input.keyboard.on('keyup-A', listener)`. You can replace the `-A` part of the event + * name with any valid [Key Code string]{@link Phaser.Input.Keyboard.KeyCodes}. For example, this will listen for the space bar: + * `this.input.keyboard.on('keyup-SPACE', listener)`. + * + * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_UP]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_UP} for details. + * + * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.UP]{@linkcode Phaser.Input.Keyboard.Events#event:UP} for details. + */ + const KEY_UP: any; + + /** + * The Key Up Event. + * + * This event is dispatched by a [Key]{@link Phaser.Input.Keyboard.Key} object when it is released. + * + * Listen for this event from the Key object instance directly: + * + * ```javascript + * var spaceBar = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.SPACE); + * + * spaceBar.on('up', listener) + * ``` + * + * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_UP]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_UP} for details. + */ + const UP: any; + + } + /** * Returns `true` if the Key was pressed down within the `duration` value given, based on the current * game clock time. Or `false` if it either isn't down, or was pressed down longer ago than the given duration. @@ -44349,468 +44180,6 @@ declare namespace Phaser { } - /** - * A Pointer object encapsulates both mouse and touch input within Phaser. - * - * By default, Phaser will create 2 pointers for your game to use. If you require more, i.e. for a multi-touch - * game, then use the `InputPlugin.addPointer` method to do so, rather than instantiating this class directly, - * otherwise it won't be managed by the input system. - * - * You can reference the current active pointer via `InputPlugin.activePointer`. You can also use the properties - * `InputPlugin.pointer1` through to `pointer10`, for each pointer you have enabled in your game. - * - * The properties of this object are set by the Input Plugin during processing. This object is then sent in all - * input related events that the Input Plugin emits, so you can reference properties from it directly in your - * callbacks. - */ - class Pointer { - /** - * - * @param manager A reference to the Input Manager. - * @param id The internal ID of this Pointer. - */ - constructor(manager: Phaser.Input.InputManager, id: integer); - - /** - * A reference to the Input Manager. - */ - manager: Phaser.Input.InputManager; - - /** - * The internal ID of this Pointer. - */ - readonly id: integer; - - /** - * The most recent native DOM Event this Pointer has processed. - */ - event: TouchEvent | MouseEvent; - - /** - * The DOM element the Pointer was pressed down on, taken from the DOM event. - * In a default set-up this will be the Canvas that Phaser is rendering to, or the Window element. - */ - readonly downElement: any; - - /** - * The DOM element the Pointer was released on, taken from the DOM event. - * In a default set-up this will be the Canvas that Phaser is rendering to, or the Window element. - */ - readonly upElement: any; - - /** - * The camera the Pointer interacted with during its last update. - * - * A Pointer can only ever interact with one camera at once, which will be the top-most camera - * in the list should multiple cameras be positioned on-top of each other. - */ - camera: Phaser.Cameras.Scene2D.Camera; - - /** - * A read-only property that indicates which button was pressed, or released, on the pointer - * during the most recent event. It is only set during `up` and `down` events. - * - * On Touch devices the value is always 0. - * - * Users may change the configuration of buttons on their pointing device so that if an event's button property - * is zero, it may not have been caused by the button that is physically left–most on the pointing device; - * however, it should behave as if the left button was clicked in the standard button layout. - */ - readonly button: integer; - - /** - * 0: No button or un-initialized - * 1: Left button - * 2: Right button - * 4: Wheel button or middle button - * 8: 4th button (typically the "Browser Back" button) - * 16: 5th button (typically the "Browser Forward" button) - * - * For a mouse configured for left-handed use, the button actions are reversed. - * In this case, the values are read from right to left. - */ - buttons: integer; - - /** - * The position of the Pointer in screen space. - */ - readonly position: Phaser.Math.Vector2; - - /** - * The previous position of the Pointer in screen space. - * - * The old x and y values are stored in here during the InputManager.transformPointer call. - * - * Use the properties `velocity`, `angle` and `distance` to create your own gesture recognition. - */ - readonly prevPosition: Phaser.Math.Vector2; - - /** - * The current velocity of the Pointer, based on its current and previous positions. - * - * This value is smoothed out each frame, according to the `motionFactor` property. - * - * This property is updated whenever the Pointer moves, regardless of any button states. In other words, - * it changes based on movement alone - a button doesn't have to be pressed first. - */ - readonly velocity: Phaser.Math.Vector2; - - /** - * The current angle the Pointer is moving, in radians, based on its previous and current position. - * - * The angle is based on the old position facing to the current position. - * - * This property is updated whenever the Pointer moves, regardless of any button states. In other words, - * it changes based on movement alone - a button doesn't have to be pressed first. - */ - readonly angle: number; - - /** - * The distance the Pointer has moved, based on its previous and current position. - * - * This value is smoothed out each frame, according to the `motionFactor` property. - * - * This property is updated whenever the Pointer moves, regardless of any button states. In other words, - * it changes based on movement alone - a button doesn't have to be pressed first. - * - * If you need the total distance travelled since the primary buttons was pressed down, - * then use the `Pointer.getDistance` method. - */ - readonly distance: number; - - /** - * The smoothing factor to apply to the Pointer position. - * - * Due to their nature, pointer positions are inherently noisy. While this is fine for lots of games, if you need cleaner positions - * then you can set this value to apply an automatic smoothing to the positions as they are recorded. - * - * The default value of zero means 'no smoothing'. - * Set to a small value, such as 0.2, to apply an average level of smoothing between positions. You can do this by changing this - * value directly, or by setting the `input.smoothFactor` property in the Game Config. - * - * Positions are only smoothed when the pointer moves. If the primary button on this Pointer enters an Up or Down state, then the position - * is always precise, and not smoothed. - */ - smoothFactor: number; - - /** - * The factor applied to the motion smoothing each frame. - * - * This value is passed to the Smooth Step Interpolation that is used to calculate the velocity, - * angle and distance of the Pointer. It's applied every frame, until the midPoint reaches the current - * position of the Pointer. 0.2 provides a good average but can be increased if you need a - * quicker update and are working in a high performance environment. Never set this value to - * zero. - */ - motionFactor: number; - - /** - * The x position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with. - * - * If you wish to use this value _outside_ of an input event handler then you should update it first by calling - * the `Pointer.updateWorldPoint` method. - */ - worldX: number; - - /** - * The y position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with. - * - * If you wish to use this value _outside_ of an input event handler then you should update it first by calling - * the `Pointer.updateWorldPoint` method. - */ - worldY: number; - - /** - * Time when this Pointer was most recently moved (regardless of the state of its buttons, if any) - */ - moveTime: number; - - /** - * X coordinate of the Pointer when Button 1 (left button), or Touch, was pressed, used for dragging objects. - */ - downX: number; - - /** - * Y coordinate of the Pointer when Button 1 (left button), or Touch, was pressed, used for dragging objects. - */ - downY: number; - - /** - * Time when Button 1 (left button), or Touch, was pressed, used for dragging objects. - */ - downTime: number; - - /** - * X coordinate of the Pointer when Button 1 (left button), or Touch, was released, used for dragging objects. - */ - upX: number; - - /** - * Y coordinate of the Pointer when Button 1 (left button), or Touch, was released, used for dragging objects. - */ - upY: number; - - /** - * Time when Button 1 (left button), or Touch, was released, used for dragging objects. - */ - upTime: number; - - /** - * Is the primary button down? (usually button 0, the left mouse button) - */ - primaryDown: boolean; - - /** - * Is _any_ button on this pointer considered as being down? - */ - isDown: boolean; - - /** - * Did the previous input event come from a Touch input (true) or Mouse? (false) - */ - wasTouch: boolean; - - /** - * Did this Pointer get canceled by a touchcancel event? - * - * Note: "canceled" is the American-English spelling of "cancelled". Please don't submit PRs correcting it! - */ - wasCanceled: boolean; - - /** - * If the mouse is locked, the horizontal relative movement of the Pointer in pixels since last frame. - */ - movementX: number; - - /** - * If the mouse is locked, the vertical relative movement of the Pointer in pixels since last frame. - */ - movementY: number; - - /** - * The identifier property of the Pointer as set by the DOM event when this Pointer is started. - */ - identifier: number; - - /** - * The pointerId property of the Pointer as set by the DOM event when this Pointer is started. - * The browser can and will recycle this value. - */ - pointerId: number; - - /** - * An active Pointer is one that is currently pressed down on the display. - * A Mouse is always considered as active. - */ - active: boolean; - - /** - * Is this pointer Pointer Locked? - * - * Only a mouse pointer can be locked and it only becomes locked when requested via - * the browsers Pointer Lock API. - * - * You can request this by calling the `this.input.mouse.requestPointerLock()` method from - * a `pointerdown` or `pointerup` event handler. - */ - readonly locked: boolean; - - /** - * The horizontal scroll amount that occurred due to the user moving a mouse wheel or similar input device. - */ - deltaX: number; - - /** - * The vertical scroll amount that occurred due to the user moving a mouse wheel or similar input device. - * This value will typically be less than 0 if the user scrolls up and greater than zero if scrolling down. - */ - deltaY: number; - - /** - * The z-axis scroll amount that occurred due to the user moving a mouse wheel or similar input device. - */ - deltaZ: number; - - /** - * Takes a Camera and updates this Pointer's `worldX` and `worldY` values so they are - * the result of a translation through the given Camera. - * - * Note that the values will be automatically replaced the moment the Pointer is - * updated by an input event, such as a mouse move, so should be used immediately. - * @param camera The Camera which is being tested against. - */ - updateWorldPoint(camera: Phaser.Cameras.Scene2D.Camera): this; - - /** - * Takes a Camera and returns a Vector2 containing the translated position of this Pointer - * within that Camera. This can be used to convert this Pointers position into camera space. - * @param camera The Camera to use for the translation. - * @param output A Vector2-like object in which to store the translated position. - */ - positionToCamera(camera: Phaser.Cameras.Scene2D.Camera, output?: Phaser.Math.Vector2 | object): Phaser.Math.Vector2 | object; - - /** - * Checks to see if any buttons are being held down on this Pointer. - */ - noButtonDown(): boolean; - - /** - * Checks to see if the left button is being held down on this Pointer. - */ - leftButtonDown(): boolean; - - /** - * Checks to see if the right button is being held down on this Pointer. - */ - rightButtonDown(): boolean; - - /** - * Checks to see if the middle button is being held down on this Pointer. - */ - middleButtonDown(): boolean; - - /** - * Checks to see if the back button is being held down on this Pointer. - */ - backButtonDown(): boolean; - - /** - * Checks to see if the forward button is being held down on this Pointer. - */ - forwardButtonDown(): boolean; - - /** - * Checks to see if the left button was just released on this Pointer. - */ - leftButtonReleased(): boolean; - - /** - * Checks to see if the right button was just released on this Pointer. - */ - rightButtonReleased(): boolean; - - /** - * Checks to see if the middle button was just released on this Pointer. - */ - middleButtonReleased(): boolean; - - /** - * Checks to see if the back button was just released on this Pointer. - */ - backButtonReleased(): boolean; - - /** - * Checks to see if the forward button was just released on this Pointer. - */ - forwardButtonReleased(): boolean; - - /** - * If the Pointer has a button pressed down at the time this method is called, it will return the - * distance between the Pointer's `downX` and `downY` values and the current position. - * - * If no button is held down, it will return the last recorded distance, based on where - * the Pointer was when the button was released. - * - * If you wish to get the distance being travelled currently, based on the velocity of the Pointer, - * then see the `Pointer.distance` property. - */ - getDistance(): number; - - /** - * If the Pointer has a button pressed down at the time this method is called, it will return the - * horizontal distance between the Pointer's `downX` and `downY` values and the current position. - * - * If no button is held down, it will return the last recorded horizontal distance, based on where - * the Pointer was when the button was released. - */ - getDistanceX(): number; - - /** - * If the Pointer has a button pressed down at the time this method is called, it will return the - * vertical distance between the Pointer's `downX` and `downY` values and the current position. - * - * If no button is held down, it will return the last recorded vertical distance, based on where - * the Pointer was when the button was released. - */ - getDistanceY(): number; - - /** - * If the Pointer has a button pressed down at the time this method is called, it will return the - * duration since the button was pressed down. - * - * If no button is held down, it will return the last recorded duration, based on the time - * the Pointer button was released. - */ - getDuration(): number; - - /** - * If the Pointer has a button pressed down at the time this method is called, it will return the - * angle between the Pointer's `downX` and `downY` values and the current position. - * - * If no button is held down, it will return the last recorded angle, based on where - * the Pointer was when the button was released. - * - * The angle is based on the old position facing to the current position. - * - * If you wish to get the current angle, based on the velocity of the Pointer, then - * see the `Pointer.angle` property. - */ - getAngle(): number; - - /** - * Takes the previous and current Pointer positions and then generates an array of interpolated values between - * the two. The array will be populated up to the size of the `steps` argument. - * - * ```javaScript - * var points = pointer.getInterpolatedPosition(4); - * - * // points[0] = { x: 0, y: 0 } - * // points[1] = { x: 2, y: 1 } - * // points[2] = { x: 3, y: 2 } - * // points[3] = { x: 6, y: 3 } - * ``` - * - * Use this if you need to get smoothed values between the previous and current pointer positions. DOM pointer - * events can often fire faster than the main browser loop, and this will help you avoid janky movement - * especially if you have an object following a Pointer. - * - * Note that if you provide an output array it will only be populated up to the number of steps provided. - * It will not clear any previous data that may have existed beyond the range of the steps count. - * - * Internally it uses the Smooth Step interpolation calculation. - * @param steps The number of interpolation steps to use. Default 10. - * @param out An array to store the results in. If not provided a new one will be created. - */ - getInterpolatedPosition(steps?: integer, out?: any[]): any[]; - - /** - * Destroys this Pointer instance and resets its external references. - */ - destroy(): void; - - /** - * The x position of this Pointer. - * The value is in screen space. - * See `worldX` to get a camera converted position. - */ - x: number; - - /** - * The y position of this Pointer. - * The value is in screen space. - * See `worldY` to get a camera converted position. - */ - y: number; - - /** - * Time when this Pointer was most recently updated by a DOM Event. - * This comes directly from the `event.timeStamp` property. - * If no event has yet taken place, it will return zero. - */ - readonly time: number; - - } - namespace Touch { /** * The Touch Manager is a helper class that belongs to the Input Manager. @@ -44938,214 +44307,6 @@ declare namespace Phaser { } namespace Loader { - /** - * The Loader is idle. - */ - var LOADER_IDLE: integer; - - /** - * The Loader is actively loading. - */ - var LOADER_LOADING: integer; - - /** - * The Loader is processing files is has loaded. - */ - var LOADER_PROCESSING: integer; - - /** - * The Loader has completed loading and processing. - */ - var LOADER_COMPLETE: integer; - - /** - * The Loader is shutting down. - */ - var LOADER_SHUTDOWN: integer; - - /** - * The Loader has been destroyed. - */ - var LOADER_DESTROYED: integer; - - /** - * File is in the load queue but not yet started - */ - var FILE_PENDING: integer; - - /** - * File has been started to load by the loader (onLoad called) - */ - var FILE_LOADING: integer; - - /** - * File has loaded successfully, awaiting processing - */ - var FILE_LOADED: integer; - - /** - * File failed to load - */ - var FILE_FAILED: integer; - - /** - * File is being processed (onProcess callback) - */ - var FILE_PROCESSING: integer; - - /** - * The File has errored somehow during processing. - */ - var FILE_ERRORED: integer; - - /** - * File has finished processing. - */ - var FILE_COMPLETE: integer; - - /** - * File has been destroyed - */ - var FILE_DESTROYED: integer; - - /** - * File was populated from local data and doesn't need an HTTP request - */ - var FILE_POPULATED: integer; - - namespace Events { - /** - * The Loader Plugin Add File Event. - * - * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue. - * - * Listen to it from a Scene using: `this.load.on('addfile', listener)`. - * - * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them. - */ - const ADD: any; - - /** - * The Loader Plugin Complete Event. - * - * This event is dispatched when the Loader has fully processed everything in the load queue. - * By this point every loaded file will now be in its associated cache and ready for use. - * - * Listen to it from a Scene using: `this.load.on('complete', listener)`. - */ - const COMPLETE: any; - - /** - * The File Load Complete Event. - * - * This event is dispatched by the Loader Plugin when any file in the queue finishes loading. - * - * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`. - * - * You can also listen for the completion of a specific file. See the [FILE_KEY_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_KEY_COMPLETE} event. - */ - const FILE_COMPLETE: any; - - /** - * The File Load Complete Event. - * - * This event is dispatched by the Loader Plugin when any file in the queue finishes loading. - * - * It uses a special dynamic event name constructed from the key and type of the file. - * - * For example, if you have loaded an `image` with a key of `monster`, you can listen for it - * using the following: - * - * ```javascript - * this.load.on('filecomplete-image-monster', function (key, type, data) { - * // Your handler code - * }); - * ``` - * - * Or, if you have loaded a texture `atlas` with a key of `Level1`: - * - * ```javascript - * this.load.on('filecomplete-atlas-Level1', function (key, type, data) { - * // Your handler code - * }); - * ``` - * - * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`: - * - * ```javascript - * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) { - * // Your handler code - * }); - * ``` - * - * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event. - */ - const FILE_KEY_COMPLETE: any; - - /** - * The File Load Error Event. - * - * This event is dispatched by the Loader Plugin when a file fails to load. - * - * Listen to it from a Scene using: `this.load.on('loaderror', listener)`. - */ - const FILE_LOAD_ERROR: any; - - /** - * The File Load Event. - * - * This event is dispatched by the Loader Plugin when a file finishes loading, - * but _before_ it is processed and added to the internal Phaser caches. - * - * Listen to it from a Scene using: `this.load.on('load', listener)`. - */ - const FILE_LOAD: any; - - /** - * The File Load Progress Event. - * - * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and - * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen. - * - * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`. - */ - const FILE_PROGRESS: any; - - /** - * The Loader Plugin Post Process Event. - * - * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue. - * It is dispatched before the internal lists are cleared and each File is destroyed. - * - * Use this hook to perform any last minute processing of files that can only happen once the - * Loader has completed, but prior to it emitting the `complete` event. - * - * Listen to it from a Scene using: `this.load.on('postprocess', listener)`. - */ - const POST_PROCESS: any; - - /** - * The Loader Plugin Progress Event. - * - * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading. - * - * Listen to it from a Scene using: `this.load.on('progress', listener)`. - */ - const PROGRESS: any; - - /** - * The Loader Plugin Start Event. - * - * This event is dispatched when the Loader starts running. At this point load progress is zero. - * - * This event is dispatched even if there aren't any files in the load queue. - * - * Listen to it from a Scene using: `this.load.on('start', listener)`. - */ - const START: any; - - } - /** * The base File class used by all File Types that the Loader can support. * You shouldn't create an instance of a File directly, but should extend it with your own class, setting a custom type and processing methods. @@ -45350,871 +44511,6 @@ declare namespace Phaser { } - namespace FileTypes { - /** - * A single Animation JSON File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#animation method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#animation. - */ - class AnimationJSONFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". - * @param xhrSettings Extra XHR Settings specifically for this file. - * @param dataKey When the JSON file loads only this property will be stored in the Cache. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.JSONFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject, dataKey?: string); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - /** - * Called at the end of the load process, after the Loader has finished all files in its queue. - */ - onLoadComplete(): void; - - } - - /** - * A single JSON based Texture Atlas File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#atlas method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#atlas. - * - * https://www.codeandweb.com/texturepacker/tutorials/how-to-create-sprite-sheets-for-phaser3?source=photonstorm - */ - class AtlasJSONFile extends Phaser.Loader.MultiFile { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param textureURL The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". - * @param atlasURL The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". - * @param textureXhrSettings An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings. - * @param atlasXhrSettings An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig, textureURL?: string | string[], atlasURL?: string, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - } - - /** - * A single XML based Texture Atlas File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#atlasXML method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#atlasXML. - */ - class AtlasXMLFile extends Phaser.Loader.MultiFile { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param textureURL The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". - * @param atlasURL The absolute or relative URL to load the texture atlas xml data file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was "alien" then the URL will be "alien.xml". - * @param textureXhrSettings An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings. - * @param atlasXhrSettings An XHR Settings configuration object for the atlas xml file. Used in replacement of the Loaders default XHR Settings. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig, textureURL?: string | string[], atlasURL?: string, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - } - - /** - * A single Audio File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#audio method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#audio. - */ - class AudioFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param urlConfig The absolute or relative URL to load this file from in a config object. - * @param xhrSettings Extra XHR Settings specifically for this file. - * @param audioContext The AudioContext this file will use to process itself. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.AudioFileConfig, urlConfig?: any, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject, audioContext?: AudioContext); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - } - - /** - * An Audio Sprite File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#audioSprite method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#audioSprite. - */ - class AudioSpriteFile extends Phaser.Loader.MultiFile { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param jsonURL The absolute or relative URL to load the json file from. Or a well formed JSON object to use instead. - * @param audioURL The absolute or relative URL to load the audio file from. If empty it will be obtained by parsing the JSON file. - * @param audioConfig The audio configuration options. - * @param audioXhrSettings An XHR Settings configuration object for the audio file. Used in replacement of the Loaders default XHR Settings. - * @param jsonXhrSettings An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig, jsonURL: string, audioURL?: Object, audioConfig?: any, audioXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, jsonXhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called by each File when it finishes loading. - * @param file The File that has completed processing. - */ - onFileComplete(file: Phaser.Loader.File): void; - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - } - - /** - * A single Binary File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#binary method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#binary. - */ - class BinaryFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.bin`, i.e. if `key` was "alien" then the URL will be "alien.bin". - * @param xhrSettings Extra XHR Settings specifically for this file. - * @param dataType Optional type to cast the binary file to once loaded. For example, `Uint8Array`. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.BinaryFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject, dataType?: any); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - } - - /** - * A single Bitmap Font based File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#bitmapFont method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#bitmapFont. - */ - class BitmapFontFile extends Phaser.Loader.MultiFile { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param textureURL The absolute or relative URL to load the font image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". - * @param fontDataURL The absolute or relative URL to load the font xml data file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was "alien" then the URL will be "alien.xml". - * @param textureXhrSettings An XHR Settings configuration object for the font image file. Used in replacement of the Loaders default XHR Settings. - * @param fontDataXhrSettings An XHR Settings configuration object for the font data xml file. Used in replacement of the Loaders default XHR Settings. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.BitmapFontFileConfig, textureURL?: string | string[], fontDataURL?: string, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, fontDataXhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - } - - /** - * A single CSS File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#css method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#css. - */ - class CSSFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was "alien" then the URL will be "alien.js". - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.CSSFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - } - - /** - * A single GLSL File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#glsl method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#glsl. - */ - class GLSLFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". - * @param shaderType The type of shader. Either `fragment` for a fragment shader, or `vertex` for a vertex shader. This is ignored if you load a shader bundle. Default 'fragment'. - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.GLSLFileConfig, url?: string, shaderType?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - /** - * Returns the name of the shader from the header block. - * @param headerSource The header data. - */ - getShaderName(headerSource: string[]): string; - - /** - * Returns the type of the shader from the header block. - * @param headerSource The header data. - */ - getShaderType(headerSource: string[]): string; - - /** - * Returns the shader uniforms from the header block. - * @param headerSource The header data. - */ - getShaderUniforms(headerSource: string[]): any; - - } - - /** - * A single Audio File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#audio method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#audio. - */ - class HTML5AudioFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param urlConfig The absolute or relative URL to load this file from. - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.AudioFileConfig, urlConfig?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called when the file finishes loading. - */ - onLoad(): void; - - /** - * Called if the file errors while loading. - */ - onError(): void; - - /** - * Called during the file load progress. Is sent a DOM ProgressEvent. - */ - onProgress(): void; - - /** - * Called by the Loader, starts the actual file downloading. - * During the load the methods onLoad, onError and onProgress are called, based on the XHR events. - * You shouldn't normally call this method directly, it's meant to be invoked by the Loader. - */ - load(): void; - - } - - /** - * A single HTML File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#html method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#html. - */ - class HTMLFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was "alien" then the URL will be "alien.html". - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.HTMLFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - } - - /** - * A single HTML File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#htmlTexture method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#htmlTexture. - */ - class HTMLTextureFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". - * @param width The width of the texture the HTML will be rendered to. - * @param height The height of the texture the HTML will be rendered to. - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig, url?: string, width?: integer, height?: integer, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - } - - /** - * A single Image File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image. - */ - class ImageFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". - * @param xhrSettings Extra XHR Settings specifically for this file. - * @param frameConfig The frame configuration object. Only provided for, and used by, Sprite Sheets. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.ImageFileConfig, url?: string | string[], xhrSettings?: Phaser.Types.Loader.XHRSettingsObject, frameConfig?: Phaser.Types.Loader.FileTypes.ImageFrameConfig); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - } - - /** - * A single JSON File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json. - */ - class JSONFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". - * @param xhrSettings Extra XHR Settings specifically for this file. - * @param dataKey When the JSON file loads only this property will be stored in the Cache. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.JSONFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject, dataKey?: string); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - } - - /** - * A single Multi Texture Atlas File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#multiatlas method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#multiatlas. - */ - class MultiAtlasFile extends Phaser.Loader.MultiFile { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key of the file. Must be unique within both the Loader and the Texture Manager. - * @param atlasURL The absolute or relative URL to load the multi atlas json file from. - * @param path Optional path to use when loading the textures defined in the atlas data. - * @param baseURL Optional Base URL to use when loading the textures defined in the atlas data. - * @param atlasXhrSettings Extra XHR Settings specifically for the atlas json file. - * @param textureXhrSettings Extra XHR Settings specifically for the texture files. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string, atlasURL?: string, path?: string, baseURL?: string, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called by each File when it finishes loading. - * @param file The File that has completed processing. - */ - onFileComplete(file: Phaser.Loader.File): void; - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - } - - /** - * A Multi Script File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#scripts method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#scripts. - */ - class MultiScriptFile extends Phaser.Loader.MultiFile { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url An array of absolute or relative URLs to load the script files from. They are processed in the order given in the array. - * @param xhrSettings An XHR Settings configuration object for the script files. Used in replacement of the Loaders default XHR Settings. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.MultiScriptFileConfig, url?: string[], xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - } - - /** - * A single JSON Pack File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#pack method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#pack. - */ - class PackFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". - * @param xhrSettings Extra XHR Settings specifically for this file. - * @param dataKey When the JSON file loads only this property will be stored in the Cache. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.PackFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject, dataKey?: string); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - } - - /** - * A single Plugin Script File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#plugin method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#plugin. - */ - class PluginFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was "alien" then the URL will be "alien.js". - * @param start Automatically start the plugin after loading? Default false. - * @param mapping If this plugin is to be injected into the Scene, this is the property key used. - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.PluginFileConfig, url?: string, start?: boolean, mapping?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - } - - /** - * An external Scene JavaScript File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#sceneFile method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#sceneFile. - */ - class SceneFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was "alien" then the URL will be "alien.js". - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.SceneFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - } - - /** - * A single Scene Plugin Script File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#scenePlugin method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#scenePlugin. - */ - class ScenePluginFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was "alien" then the URL will be "alien.js". - * @param systemKey If this plugin is to be added to Scene.Systems, this is the property key for it. - * @param sceneKey If this plugin is to be added to the Scene, this is the property key for it. - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.ScenePluginFileConfig, url?: string, systemKey?: string, sceneKey?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - } - - /** - * A single Script File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#script method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#script. - */ - class ScriptFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was "alien" then the URL will be "alien.js". - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.ScriptFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - } - - /** - * A single Sprite Sheet Image File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#spritesheet method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spritesheet. - */ - class SpriteSheetFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". - * @param frameConfig The frame configuration object. - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig, url?: string | string[], frameConfig?: Phaser.Types.Loader.FileTypes.ImageFrameConfig, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - } - - /** - * A single SVG File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#svg method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#svg. - */ - class SVGFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.svg`, i.e. if `key` was "alien" then the URL will be "alien.svg". - * @param svgConfig The svg size configuration object. - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.SVGFileConfig, url?: string, svgConfig?: Phaser.Types.Loader.FileTypes.SVGSizeConfig, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - } - - /** - * A single Text File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text. - */ - class TextFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.TextFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - } - - /** - * A single Tilemap CSV File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#tilemapCSV method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#tilemapCSV. - */ - class TilemapCSVFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.csv`, i.e. if `key` was "alien" then the URL will be "alien.csv". - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - } - - /** - * A single Impact.js Tilemap JSON File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#tilemapImpact method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#tilemapImpact. - */ - class TilemapImpactFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - } - - /** - * A single Tiled Tilemap JSON File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#tilemapTiledJSON method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#tilemapTiledJSON. - */ - class TilemapJSONFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - } - - /** - * A single text file based Unity Texture Atlas File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#unityAtlas method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#unityAtlas. - */ - class UnityAtlasFile extends Phaser.Loader.MultiFile { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param textureURL The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". - * @param atlasURL The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". - * @param textureXhrSettings An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings. - * @param atlasXhrSettings An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig, textureURL?: string | string[], atlasURL?: string, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - } - - /** - * A single Video File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#video method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#video. - */ - class VideoFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param urlConfig The absolute or relative URL to load this file from in a config object. - * @param loadEvent The load event to listen for when _not_ loading as a blob. Either 'loadeddata', 'canplay' or 'canplaythrough'. - * @param asBlob Load the video as a data blob, or via the Video element? - * @param noAudio Does the video have an audio track? If not you can enable auto-playing on it. - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.VideoFileConfig, urlConfig?: any, loadEvent?: string, asBlob?: boolean, noAudio?: boolean, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - /** - * Called by the Loader, starts the actual file downloading. - * During the load the methods onLoad, onError and onProgress are called, based on the XHR events. - * You shouldn't normally call this method directly, it's meant to be invoked by the Loader. - */ - load(): void; - - } - - /** - * A single XML File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#xml method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#xml. - */ - class XMLFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was "alien" then the URL will be "alien.xml". - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.XMLFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - } - - } - namespace FileTypesManager { /** * Static method called when a LoaderPlugin is created. @@ -46280,6 +44576,335 @@ declare namespace Phaser { */ constructor(scene: Phaser.Scene); + /** + * The Scene which owns this Loader instance. + */ + scene: Phaser.Scene; + + /** + * A reference to the Scene Systems. + */ + systems: Phaser.Scenes.Systems; + + /** + * A reference to the global Cache Manager. + */ + cacheManager: Phaser.Cache.CacheManager; + + /** + * A reference to the global Texture Manager. + */ + textureManager: Phaser.Textures.TextureManager; + + /** + * A reference to the global Scene Manager. + */ + protected sceneManager: Phaser.Scenes.SceneManager; + + /** + * An optional prefix that is automatically prepended to the start of every file key. + * If prefix was `MENU.` and you load an image with the key 'Background' the resulting key would be `MENU.Background`. + * You can set this directly, or call `Loader.setPrefix()`. It will then affect every file added to the Loader + * from that point on. It does _not_ change any file already in the load queue. + */ + prefix: string; + + /** + * The value of `path`, if set, is placed before any _relative_ file path given. For example: + * + * ```javascript + * this.load.path = "images/sprites/"; + * this.load.image("ball", "ball.png"); + * this.load.image("tree", "level1/oaktree.png"); + * this.load.image("boom", "http://server.com/explode.png"); + * ``` + * + * Would load the `ball` file from `images/sprites/ball.png` and the tree from + * `images/sprites/level1/oaktree.png` but the file `boom` would load from the URL + * given as it's an absolute URL. + * + * Please note that the path is added before the filename but *after* the baseURL (if set.) + * + * If you set this property directly then it _must_ end with a "/". Alternatively, call `setPath()` and it'll do it for you. + */ + path: string; + + /** + * If you want to append a URL before the path of any asset you can set this here. + * + * Useful if allowing the asset base url to be configured outside of the game code. + * + * If you set this property directly then it _must_ end with a "/". Alternatively, call `setBaseURL()` and it'll do it for you. + */ + baseURL: string; + + /** + * The number of concurrent / parallel resources to try and fetch at once. + * + * Old browsers limit 6 requests per domain; modern ones, especially those with HTTP/2 don't limit it at all. + * + * The default is 32 but you can change this in your Game Config, or by changing this property before the Loader starts. + */ + maxParallelDownloads: integer; + + /** + * xhr specific global settings (can be overridden on a per-file basis) + */ + xhr: Phaser.Types.Loader.XHRSettingsObject; + + /** + * The crossOrigin value applied to loaded images. Very often this needs to be set to 'anonymous'. + */ + crossOrigin: string; + + /** + * The total number of files to load. It may not always be accurate because you may add to the Loader during the process + * of loading, especially if you load a Pack File. Therefore this value can change, but in most cases remains static. + */ + totalToLoad: integer; + + /** + * The progress of the current load queue, as a float value between 0 and 1. + * This is updated automatically as files complete loading. + * Note that it is possible for this value to go down again if you add content to the current load queue during a load. + */ + progress: number; + + /** + * Files are placed in this Set when they're added to the Loader via `addFile`. + * + * They are moved to the `inflight` Set when they start loading, and assuming a successful + * load, to the `queue` Set for further processing. + * + * By the end of the load process this Set will be empty. + */ + list: Phaser.Structs.Set; + + /** + * Files are stored in this Set while they're in the process of being loaded. + * + * Upon a successful load they are moved to the `queue` Set. + * + * By the end of the load process this Set will be empty. + */ + inflight: Phaser.Structs.Set; + + /** + * Files are stored in this Set while they're being processed. + * + * If the process is successful they are moved to their final destination, which could be + * a Cache or the Texture Manager. + * + * At the end of the load process this Set will be empty. + */ + queue: Phaser.Structs.Set; + + /** + * The total number of files that failed to load during the most recent load. + * This value is reset when you call `Loader.start`. + */ + totalFailed: integer; + + /** + * The total number of files that successfully loaded during the most recent load. + * This value is reset when you call `Loader.start`. + */ + totalComplete: integer; + + /** + * The current state of the Loader. + */ + readonly state: integer; + + /** + * If you want to append a URL before the path of any asset you can set this here. + * + * Useful if allowing the asset base url to be configured outside of the game code. + * + * Once a base URL is set it will affect every file loaded by the Loader from that point on. It does _not_ change any + * file _already_ being loaded. To reset it, call this method with no arguments. + * @param url The URL to use. Leave empty to reset. + */ + setBaseURL(url?: string): Phaser.Loader.LoaderPlugin; + + /** + * The value of `path`, if set, is placed before any _relative_ file path given. For example: + * + * ```javascript + * this.load.setPath("images/sprites/"); + * this.load.image("ball", "ball.png"); + * this.load.image("tree", "level1/oaktree.png"); + * this.load.image("boom", "http://server.com/explode.png"); + * ``` + * + * Would load the `ball` file from `images/sprites/ball.png` and the tree from + * `images/sprites/level1/oaktree.png` but the file `boom` would load from the URL + * given as it's an absolute URL. + * + * Please note that the path is added before the filename but *after* the baseURL (if set.) + * + * Once a path is set it will then affect every file added to the Loader from that point on. It does _not_ change any + * file _already_ in the load queue. To reset it, call this method with no arguments. + * @param path The path to use. Leave empty to reset. + */ + setPath(path?: string): Phaser.Loader.LoaderPlugin; + + /** + * An optional prefix that is automatically prepended to the start of every file key. + * + * If prefix was `MENU.` and you load an image with the key 'Background' the resulting key would be `MENU.Background`. + * + * Once a prefix is set it will then affect every file added to the Loader from that point on. It does _not_ change any + * file _already_ in the load queue. To reset it, call this method with no arguments. + * @param prefix The prefix to use. Leave empty to reset. + */ + setPrefix(prefix?: string): Phaser.Loader.LoaderPlugin; + + /** + * Sets the Cross Origin Resource Sharing value used when loading files. + * + * Files can override this value on a per-file basis by specifying an alternative `crossOrigin` value in their file config. + * + * Once CORs is set it will then affect every file loaded by the Loader from that point on, as long as they don't have + * their own CORs setting. To reset it, call this method with no arguments. + * + * For more details about CORs see https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS + * @param crossOrigin The value to use for the `crossOrigin` property in the load request. + */ + setCORS(crossOrigin?: string): Phaser.Loader.LoaderPlugin; + + /** + * Adds a file, or array of files, into the load queue. + * + * The file must be an instance of `Phaser.Loader.File`, or a class that extends it. The Loader will check that the key + * used by the file won't conflict with any other key either in the loader, the inflight queue or the target cache. + * If allowed it will then add the file into the pending list, read for the load to start. Or, if the load has already + * started, ready for the next batch of files to be pulled from the list to the inflight queue. + * + * You should not normally call this method directly, but rather use one of the Loader methods like `image` or `atlas`, + * however you can call this as long as the file given to it is well formed. + * @param file The file, or array of files, to be added to the load queue. + */ + addFile(file: Phaser.Loader.File | Phaser.Loader.File[]): void; + + /** + * Checks the key and type of the given file to see if it will conflict with anything already + * in a Cache, the Texture Manager, or the list or inflight queues. + * @param file The file to check the key of. + */ + keyExists(file: Phaser.Loader.File): boolean; + + /** + * Takes a well formed, fully parsed pack file object and adds its entries into the load queue. Usually you do not call + * this method directly, but instead use `Loader.pack` and supply a path to a JSON file that holds the + * pack data. However, if you've got the data prepared you can pass it to this method. + * + * You can also provide an optional key. If you do then it will only add the entries from that part of the pack into + * to the load queue. If not specified it will add all entries it finds. For more details about the pack file format + * see the `LoaderPlugin.pack` method. + * @param data The Pack File data to be parsed and each entry of it to added to the load queue. + * @param packKey An optional key to use from the pack file data. + */ + addPack(data: any, packKey?: string): boolean; + + /** + * Is the Loader actively loading, or processing loaded files? + */ + isLoading(): boolean; + + /** + * Is the Loader ready to start a new load? + */ + isReady(): boolean; + + /** + * Starts the Loader running. This will reset the progress and totals and then emit a `start` event. + * If there is nothing in the queue the Loader will immediately complete, otherwise it will start + * loading the first batch of files. + * + * The Loader is started automatically if the queue is populated within your Scenes `preload` method. + * + * However, outside of this, you need to call this method to start it. + * + * If the Loader is already running this method will simply return. + */ + start(): void; + + /** + * Called automatically during the load process. + * It updates the `progress` value and then emits a progress event, which you can use to + * display a loading bar in your game. + */ + updateProgress(): void; + + /** + * Called automatically during the load process. + */ + update(): void; + + /** + * An internal method called automatically by the XHRLoader belong to a File. + * + * This method will remove the given file from the inflight Set and update the load progress. + * If the file was successful its `onProcess` method is called, otherwise it is added to the delete queue. + * @param file The File that just finished loading, or errored during load. + * @param success `true` if the file loaded successfully, otherwise `false`. + */ + nextFile(file: Phaser.Loader.File, success: boolean): void; + + /** + * An internal method that is called automatically by the File when it has finished processing. + * + * If the process was successful, and the File isn't part of a MultiFile, its `addToCache` method is called. + * + * It this then removed from the queue. If there are no more files to load `loadComplete` is called. + * @param file The file that has finished processing. + */ + fileProcessComplete(file: Phaser.Loader.File): void; + + /** + * Called at the end when the load queue is exhausted and all files have either loaded or errored. + * By this point every loaded file will now be in its associated cache and ready for use. + * + * Also clears down the Sets, puts progress to 1 and clears the deletion queue. + */ + loadComplete(): void; + + /** + * Adds a File into the pending-deletion queue. + * @param file The File to be queued for deletion when the Loader completes. + */ + flagForRemoval(file: Phaser.Loader.File): void; + + /** + * Converts the given JSON data into a file that the browser then prompts you to download so you can save it locally. + * + * The data must be well formed JSON and ready-parsed, not a JavaScript object. + * @param data The JSON data, ready parsed. + * @param filename The name to save the JSON file as. Default file.json. + */ + saveJSON(data: any, filename?: string): Phaser.Loader.LoaderPlugin; + + /** + * Causes the browser to save the given data as a file to its default Downloads folder. + * + * Creates a DOM level anchor link, assigns it as being a `download` anchor, sets the href + * to be an ObjectURL based on the given data, and then invokes a click event. + * @param data The data to be saved. Will be passed through URL.createObjectURL. + * @param filename The filename to save the file as. Default file.json. + * @param filetype The file type to use when saving the file. Defaults to JSON. Default application/json. + */ + save(data: any, filename?: string, filetype?: string): Phaser.Loader.LoaderPlugin; + + /** + * Resets the Loader. + * + * This will clear all lists and reset the base URL, path and prefix. + * + * Warning: If the Loader is currently downloading files, or has files in its queue, they will be aborted. + */ + reset(): void; + /** * Adds an Animation JSON Data file, or array of Animation JSON files, to the current load queue. * @@ -47611,6 +46236,118 @@ declare namespace Phaser { */ plugin(key: string | Phaser.Types.Loader.FileTypes.PluginFileConfig | Phaser.Types.Loader.FileTypes.PluginFileConfig[], url?: string | Function, start?: boolean, mapping?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): Phaser.Loader.LoaderPlugin; + /** + * Adds an SVG File, or array of SVG Files, to the current load queue. When the files are loaded they + * will be rendered to bitmap textures and stored in the Texture Manager. + * + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: + * + * ```javascript + * function preload () + * { + * this.load.svg('morty', 'images/Morty.svg'); + * } + * ``` + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the Texture Manager. + * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file + * then remove it from the Texture Manager first, before loading a new one. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.svg({ + * key: 'morty', + * url: 'images/Morty.svg' + * }); + * ``` + * + * See the documentation for `Phaser.Types.Loader.FileTypes.SVGFileConfig` for more details. + * + * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key: + * + * ```javascript + * this.load.svg('morty', 'images/Morty.svg'); + * // and later in your game ... + * this.add.image(x, y, 'morty'); + * ``` + * + * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files + * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and + * this is what you would use to retrieve the image from the Texture Manager. + * + * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. + * + * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" + * and no URL is given then the Loader will set the URL to be "alien.html". It will always add `.html` as the extension, although + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * You can optionally pass an SVG Resize Configuration object when you load an SVG file. By default the SVG will be rendered to a texture + * at the same size defined in the SVG file attributes. However, this isn't always desirable. You may wish to resize the SVG (either down + * or up) to improve texture clarity, or reduce texture memory consumption. You can either specify an exact width and height to resize + * the SVG to: + * + * ```javascript + * function preload () + * { + * this.load.svg('morty', 'images/Morty.svg', { width: 300, height: 600 }); + * } + * ``` + * + * Or when using a configuration object: + * + * ```javascript + * this.load.svg({ + * key: 'morty', + * url: 'images/Morty.svg', + * svgConfig: { + * width: 300, + * height: 600 + * } + * }); + * ``` + * + * Alternatively, you can just provide a scale factor instead: + * + * ```javascript + * function preload () + * { + * this.load.svg('morty', 'images/Morty.svg', { scale: 2.5 }); + * } + * ``` + * + * Or when using a configuration object: + * + * ```javascript + * this.load.svg({ + * key: 'morty', + * url: 'images/Morty.svg', + * svgConfig: { + * scale: 2.5 + * } + * }); + * ``` + * + * If scale, width and height values are all given, the scale has priority and the width and height values are ignored. + * + * Note: The ability to load this type of file will only be available if the SVG File type has been built into Phaser. + * It is available in the default build but can be excluded from custom builds. + * @param key The key to use for this file, or a file configuration object, or array of them. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.svg`, i.e. if `key` was "alien" then the URL will be "alien.svg". + * @param svgConfig The svg size configuration object. + * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. + */ + svg(key: string | Phaser.Types.Loader.FileTypes.SVGFileConfig | Phaser.Types.Loader.FileTypes.SVGFileConfig[], url?: string, svgConfig?: Phaser.Types.Loader.FileTypes.SVGSizeConfig, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): Phaser.Loader.LoaderPlugin; + /** * Adds an external Scene file, or array of Scene files, to the current load queue. * @@ -47910,118 +46647,6 @@ declare namespace Phaser { */ spritesheet(key: string | Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig | Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig[], url?: string, frameConfig?: Phaser.Types.Loader.FileTypes.ImageFrameConfig, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): Phaser.Loader.LoaderPlugin; - /** - * Adds an SVG File, or array of SVG Files, to the current load queue. When the files are loaded they - * will be rendered to bitmap textures and stored in the Texture Manager. - * - * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * - * ```javascript - * function preload () - * { - * this.load.svg('morty', 'images/Morty.svg'); - * } - * ``` - * - * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, - * or if it's already running, when the next free load slot becomes available. This happens automatically if you - * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued - * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. - * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the - * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been - * loaded. - * - * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. - * The key should be unique both in terms of files being loaded and files already present in the Texture Manager. - * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file - * then remove it from the Texture Manager first, before loading a new one. - * - * Instead of passing arguments you can pass a configuration object, such as: - * - * ```javascript - * this.load.svg({ - * key: 'morty', - * url: 'images/Morty.svg' - * }); - * ``` - * - * See the documentation for `Phaser.Types.Loader.FileTypes.SVGFileConfig` for more details. - * - * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key: - * - * ```javascript - * this.load.svg('morty', 'images/Morty.svg'); - * // and later in your game ... - * this.add.image(x, y, 'morty'); - * ``` - * - * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files - * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and - * this is what you would use to retrieve the image from the Texture Manager. - * - * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. - * - * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" - * and no URL is given then the Loader will set the URL to be "alien.html". It will always add `.html` as the extension, although - * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. - * - * You can optionally pass an SVG Resize Configuration object when you load an SVG file. By default the SVG will be rendered to a texture - * at the same size defined in the SVG file attributes. However, this isn't always desirable. You may wish to resize the SVG (either down - * or up) to improve texture clarity, or reduce texture memory consumption. You can either specify an exact width and height to resize - * the SVG to: - * - * ```javascript - * function preload () - * { - * this.load.svg('morty', 'images/Morty.svg', { width: 300, height: 600 }); - * } - * ``` - * - * Or when using a configuration object: - * - * ```javascript - * this.load.svg({ - * key: 'morty', - * url: 'images/Morty.svg', - * svgConfig: { - * width: 300, - * height: 600 - * } - * }); - * ``` - * - * Alternatively, you can just provide a scale factor instead: - * - * ```javascript - * function preload () - * { - * this.load.svg('morty', 'images/Morty.svg', { scale: 2.5 }); - * } - * ``` - * - * Or when using a configuration object: - * - * ```javascript - * this.load.svg({ - * key: 'morty', - * url: 'images/Morty.svg', - * svgConfig: { - * scale: 2.5 - * } - * }); - * ``` - * - * If scale, width and height values are all given, the scale has priority and the width and height values are ignored. - * - * Note: The ability to load this type of file will only be available if the SVG File type has been built into Phaser. - * It is available in the default build but can be excluded from custom builds. - * @param key The key to use for this file, or a file configuration object, or array of them. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.svg`, i.e. if `key` was "alien" then the URL will be "alien.svg". - * @param svgConfig The svg size configuration object. - * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. - */ - svg(key: string | Phaser.Types.Loader.FileTypes.SVGFileConfig | Phaser.Types.Loader.FileTypes.SVGFileConfig[], url?: string, svgConfig?: Phaser.Types.Loader.FileTypes.SVGSizeConfig, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): Phaser.Loader.LoaderPlugin; - /** * Adds a Text file, or array of Text files, to the current load queue. * @@ -48491,335 +47116,6 @@ declare namespace Phaser { */ xml(key: string | Phaser.Types.Loader.FileTypes.XMLFileConfig | Phaser.Types.Loader.FileTypes.XMLFileConfig[], url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): Phaser.Loader.LoaderPlugin; - /** - * The Scene which owns this Loader instance. - */ - scene: Phaser.Scene; - - /** - * A reference to the Scene Systems. - */ - systems: Phaser.Scenes.Systems; - - /** - * A reference to the global Cache Manager. - */ - cacheManager: Phaser.Cache.CacheManager; - - /** - * A reference to the global Texture Manager. - */ - textureManager: Phaser.Textures.TextureManager; - - /** - * A reference to the global Scene Manager. - */ - protected sceneManager: Phaser.Scenes.SceneManager; - - /** - * An optional prefix that is automatically prepended to the start of every file key. - * If prefix was `MENU.` and you load an image with the key 'Background' the resulting key would be `MENU.Background`. - * You can set this directly, or call `Loader.setPrefix()`. It will then affect every file added to the Loader - * from that point on. It does _not_ change any file already in the load queue. - */ - prefix: string; - - /** - * The value of `path`, if set, is placed before any _relative_ file path given. For example: - * - * ```javascript - * this.load.path = "images/sprites/"; - * this.load.image("ball", "ball.png"); - * this.load.image("tree", "level1/oaktree.png"); - * this.load.image("boom", "http://server.com/explode.png"); - * ``` - * - * Would load the `ball` file from `images/sprites/ball.png` and the tree from - * `images/sprites/level1/oaktree.png` but the file `boom` would load from the URL - * given as it's an absolute URL. - * - * Please note that the path is added before the filename but *after* the baseURL (if set.) - * - * If you set this property directly then it _must_ end with a "/". Alternatively, call `setPath()` and it'll do it for you. - */ - path: string; - - /** - * If you want to append a URL before the path of any asset you can set this here. - * - * Useful if allowing the asset base url to be configured outside of the game code. - * - * If you set this property directly then it _must_ end with a "/". Alternatively, call `setBaseURL()` and it'll do it for you. - */ - baseURL: string; - - /** - * The number of concurrent / parallel resources to try and fetch at once. - * - * Old browsers limit 6 requests per domain; modern ones, especially those with HTTP/2 don't limit it at all. - * - * The default is 32 but you can change this in your Game Config, or by changing this property before the Loader starts. - */ - maxParallelDownloads: integer; - - /** - * xhr specific global settings (can be overridden on a per-file basis) - */ - xhr: Phaser.Types.Loader.XHRSettingsObject; - - /** - * The crossOrigin value applied to loaded images. Very often this needs to be set to 'anonymous'. - */ - crossOrigin: string; - - /** - * The total number of files to load. It may not always be accurate because you may add to the Loader during the process - * of loading, especially if you load a Pack File. Therefore this value can change, but in most cases remains static. - */ - totalToLoad: integer; - - /** - * The progress of the current load queue, as a float value between 0 and 1. - * This is updated automatically as files complete loading. - * Note that it is possible for this value to go down again if you add content to the current load queue during a load. - */ - progress: number; - - /** - * Files are placed in this Set when they're added to the Loader via `addFile`. - * - * They are moved to the `inflight` Set when they start loading, and assuming a successful - * load, to the `queue` Set for further processing. - * - * By the end of the load process this Set will be empty. - */ - list: Phaser.Structs.Set; - - /** - * Files are stored in this Set while they're in the process of being loaded. - * - * Upon a successful load they are moved to the `queue` Set. - * - * By the end of the load process this Set will be empty. - */ - inflight: Phaser.Structs.Set; - - /** - * Files are stored in this Set while they're being processed. - * - * If the process is successful they are moved to their final destination, which could be - * a Cache or the Texture Manager. - * - * At the end of the load process this Set will be empty. - */ - queue: Phaser.Structs.Set; - - /** - * The total number of files that failed to load during the most recent load. - * This value is reset when you call `Loader.start`. - */ - totalFailed: integer; - - /** - * The total number of files that successfully loaded during the most recent load. - * This value is reset when you call `Loader.start`. - */ - totalComplete: integer; - - /** - * The current state of the Loader. - */ - readonly state: integer; - - /** - * If you want to append a URL before the path of any asset you can set this here. - * - * Useful if allowing the asset base url to be configured outside of the game code. - * - * Once a base URL is set it will affect every file loaded by the Loader from that point on. It does _not_ change any - * file _already_ being loaded. To reset it, call this method with no arguments. - * @param url The URL to use. Leave empty to reset. - */ - setBaseURL(url?: string): Phaser.Loader.LoaderPlugin; - - /** - * The value of `path`, if set, is placed before any _relative_ file path given. For example: - * - * ```javascript - * this.load.setPath("images/sprites/"); - * this.load.image("ball", "ball.png"); - * this.load.image("tree", "level1/oaktree.png"); - * this.load.image("boom", "http://server.com/explode.png"); - * ``` - * - * Would load the `ball` file from `images/sprites/ball.png` and the tree from - * `images/sprites/level1/oaktree.png` but the file `boom` would load from the URL - * given as it's an absolute URL. - * - * Please note that the path is added before the filename but *after* the baseURL (if set.) - * - * Once a path is set it will then affect every file added to the Loader from that point on. It does _not_ change any - * file _already_ in the load queue. To reset it, call this method with no arguments. - * @param path The path to use. Leave empty to reset. - */ - setPath(path?: string): Phaser.Loader.LoaderPlugin; - - /** - * An optional prefix that is automatically prepended to the start of every file key. - * - * If prefix was `MENU.` and you load an image with the key 'Background' the resulting key would be `MENU.Background`. - * - * Once a prefix is set it will then affect every file added to the Loader from that point on. It does _not_ change any - * file _already_ in the load queue. To reset it, call this method with no arguments. - * @param prefix The prefix to use. Leave empty to reset. - */ - setPrefix(prefix?: string): Phaser.Loader.LoaderPlugin; - - /** - * Sets the Cross Origin Resource Sharing value used when loading files. - * - * Files can override this value on a per-file basis by specifying an alternative `crossOrigin` value in their file config. - * - * Once CORs is set it will then affect every file loaded by the Loader from that point on, as long as they don't have - * their own CORs setting. To reset it, call this method with no arguments. - * - * For more details about CORs see https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS - * @param crossOrigin The value to use for the `crossOrigin` property in the load request. - */ - setCORS(crossOrigin?: string): Phaser.Loader.LoaderPlugin; - - /** - * Adds a file, or array of files, into the load queue. - * - * The file must be an instance of `Phaser.Loader.File`, or a class that extends it. The Loader will check that the key - * used by the file won't conflict with any other key either in the loader, the inflight queue or the target cache. - * If allowed it will then add the file into the pending list, read for the load to start. Or, if the load has already - * started, ready for the next batch of files to be pulled from the list to the inflight queue. - * - * You should not normally call this method directly, but rather use one of the Loader methods like `image` or `atlas`, - * however you can call this as long as the file given to it is well formed. - * @param file The file, or array of files, to be added to the load queue. - */ - addFile(file: Phaser.Loader.File | Phaser.Loader.File[]): void; - - /** - * Checks the key and type of the given file to see if it will conflict with anything already - * in a Cache, the Texture Manager, or the list or inflight queues. - * @param file The file to check the key of. - */ - keyExists(file: Phaser.Loader.File): boolean; - - /** - * Takes a well formed, fully parsed pack file object and adds its entries into the load queue. Usually you do not call - * this method directly, but instead use `Loader.pack` and supply a path to a JSON file that holds the - * pack data. However, if you've got the data prepared you can pass it to this method. - * - * You can also provide an optional key. If you do then it will only add the entries from that part of the pack into - * to the load queue. If not specified it will add all entries it finds. For more details about the pack file format - * see the `LoaderPlugin.pack` method. - * @param data The Pack File data to be parsed and each entry of it to added to the load queue. - * @param packKey An optional key to use from the pack file data. - */ - addPack(data: any, packKey?: string): boolean; - - /** - * Is the Loader actively loading, or processing loaded files? - */ - isLoading(): boolean; - - /** - * Is the Loader ready to start a new load? - */ - isReady(): boolean; - - /** - * Starts the Loader running. This will reset the progress and totals and then emit a `start` event. - * If there is nothing in the queue the Loader will immediately complete, otherwise it will start - * loading the first batch of files. - * - * The Loader is started automatically if the queue is populated within your Scenes `preload` method. - * - * However, outside of this, you need to call this method to start it. - * - * If the Loader is already running this method will simply return. - */ - start(): void; - - /** - * Called automatically during the load process. - * It updates the `progress` value and then emits a progress event, which you can use to - * display a loading bar in your game. - */ - updateProgress(): void; - - /** - * Called automatically during the load process. - */ - update(): void; - - /** - * An internal method called automatically by the XHRLoader belong to a File. - * - * This method will remove the given file from the inflight Set and update the load progress. - * If the file was successful its `onProcess` method is called, otherwise it is added to the delete queue. - * @param file The File that just finished loading, or errored during load. - * @param success `true` if the file loaded successfully, otherwise `false`. - */ - nextFile(file: Phaser.Loader.File, success: boolean): void; - - /** - * An internal method that is called automatically by the File when it has finished processing. - * - * If the process was successful, and the File isn't part of a MultiFile, its `addToCache` method is called. - * - * It this then removed from the queue. If there are no more files to load `loadComplete` is called. - * @param file The file that has finished processing. - */ - fileProcessComplete(file: Phaser.Loader.File): void; - - /** - * Called at the end when the load queue is exhausted and all files have either loaded or errored. - * By this point every loaded file will now be in its associated cache and ready for use. - * - * Also clears down the Sets, puts progress to 1 and clears the deletion queue. - */ - loadComplete(): void; - - /** - * Adds a File into the pending-deletion queue. - * @param file The File to be queued for deletion when the Loader completes. - */ - flagForRemoval(file: Phaser.Loader.File): void; - - /** - * Converts the given JSON data into a file that the browser then prompts you to download so you can save it locally. - * - * The data must be well formed JSON and ready-parsed, not a JavaScript object. - * @param data The JSON data, ready parsed. - * @param filename The name to save the JSON file as. Default file.json. - */ - saveJSON(data: any, filename?: string): Phaser.Loader.LoaderPlugin; - - /** - * Causes the browser to save the given data as a file to its default Downloads folder. - * - * Creates a DOM level anchor link, assigns it as being a `download` anchor, sets the href - * to be an ObjectURL based on the given data, and then invokes a click event. - * @param data The data to be saved. Will be passed through URL.createObjectURL. - * @param filename The filename to save the file as. Default file.json. - * @param filetype The file type to use when saving the file. Defaults to JSON. Default application/json. - */ - save(data: any, filename?: string, filetype?: string): Phaser.Loader.LoaderPlugin; - - /** - * Resets the Loader. - * - * This will clear all lists and reset the base URL, path and prefix. - * - * Warning: If the Loader is currently downloading files, or has files in its queue, they will be aborted. - */ - reset(): void; - } /** @@ -48950,121 +47246,1082 @@ declare namespace Phaser { */ function XHRSettings(responseType?: XMLHttpRequestResponseType, async?: boolean, user?: string, password?: string, timeout?: integer): Phaser.Types.Loader.XHRSettingsObject; - } + /** + * The Loader is idle. + */ + var LOADER_IDLE: integer; - namespace Math { - namespace Angle { - /** - * Find the angle of a segment from (x1, y1) -> (x2, y2). - * @param x1 The x coordinate of the first point. - * @param y1 The y coordinate of the first point. - * @param x2 The x coordinate of the second point. - * @param y2 The y coordinate of the second point. - */ - function Between(x1: number, y1: number, x2: number, y2: number): number; + /** + * The Loader is actively loading. + */ + var LOADER_LOADING: integer; + /** + * The Loader is processing files is has loaded. + */ + var LOADER_PROCESSING: integer; + + /** + * The Loader has completed loading and processing. + */ + var LOADER_COMPLETE: integer; + + /** + * The Loader is shutting down. + */ + var LOADER_SHUTDOWN: integer; + + /** + * The Loader has been destroyed. + */ + var LOADER_DESTROYED: integer; + + /** + * File is in the load queue but not yet started + */ + var FILE_PENDING: integer; + + /** + * File has been started to load by the loader (onLoad called) + */ + var FILE_LOADING: integer; + + /** + * File has loaded successfully, awaiting processing + */ + var FILE_LOADED: integer; + + /** + * File failed to load + */ + var FILE_FAILED: integer; + + /** + * File is being processed (onProcess callback) + */ + var FILE_PROCESSING: integer; + + /** + * The File has errored somehow during processing. + */ + var FILE_ERRORED: integer; + + /** + * File has finished processing. + */ + var FILE_COMPLETE: integer; + + /** + * File has been destroyed + */ + var FILE_DESTROYED: integer; + + /** + * File was populated from local data and doesn't need an HTTP request + */ + var FILE_POPULATED: integer; + + namespace Events { /** - * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y). + * The Loader Plugin Add File Event. * - * Calculates the angle of the vector from the first point to the second point. - * @param point1 The first point. - * @param point2 The second point. + * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue. + * + * Listen to it from a Scene using: `this.load.on('addfile', listener)`. + * + * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them. */ - function BetweenPoints(point1: Phaser.Geom.Point | object, point2: Phaser.Geom.Point | object): number; + const ADD: any; /** - * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y). + * The Loader Plugin Complete Event. * - * The difference between this method and {@link Phaser.Math.Angle.BetweenPoints} is that this assumes the y coordinate - * travels down the screen. - * @param point1 The first point. - * @param point2 The second point. + * This event is dispatched when the Loader has fully processed everything in the load queue. + * By this point every loaded file will now be in its associated cache and ready for use. + * + * Listen to it from a Scene using: `this.load.on('complete', listener)`. */ - function BetweenPointsY(point1: Phaser.Geom.Point | object, point2: Phaser.Geom.Point | object): number; + const COMPLETE: any; /** - * Find the angle of a segment from (x1, y1) -> (x2, y2). + * The File Load Complete Event. * - * The difference between this method and {@link Phaser.Math.Angle.Between} is that this assumes the y coordinate - * travels down the screen. - * @param x1 The x coordinate of the first point. - * @param y1 The y coordinate of the first point. - * @param x2 The x coordinate of the second point. - * @param y2 The y coordinate of the second point. + * This event is dispatched by the Loader Plugin when any file in the queue finishes loading. + * + * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`. + * + * You can also listen for the completion of a specific file. See the [FILE_KEY_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_KEY_COMPLETE} event. */ - function BetweenY(x1: number, y1: number, x2: number, y2: number): number; + const FILE_COMPLETE: any; /** - * Takes an angle in Phasers default clockwise format and converts it so that - * 0 is North, 90 is West, 180 is South and 270 is East, - * therefore running counter-clockwise instead of clockwise. + * The File Load Complete Event. * - * You can pass in the angle from a Game Object using: + * This event is dispatched by the Loader Plugin when any file in the queue finishes loading. + * + * It uses a special dynamic event name constructed from the key and type of the file. + * + * For example, if you have loaded an `image` with a key of `monster`, you can listen for it + * using the following: * * ```javascript - * var converted = CounterClockwise(gameobject.rotation); + * this.load.on('filecomplete-image-monster', function (key, type, data) { + * // Your handler code + * }); * ``` * - * All values for this function are in radians. - * @param angle The angle to convert, in radians. - */ - function CounterClockwise(angle: number): number; - - /** - * Normalize an angle to the [0, 2pi] range. - * @param angle The angle to normalize, in radians. - */ - function Normalize(angle: number): number; - - /** - * Reverse the given angle. - * @param angle The angle to reverse, in radians. - */ - function Reverse(angle: number): number; - - /** - * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call. - * @param currentAngle The current angle, in radians. - * @param targetAngle The target angle to rotate to, in radians. - * @param lerp The lerp value to add to the current angle. Default 0.05. - */ - function RotateTo(currentAngle: number, targetAngle: number, lerp?: number): number; - - /** - * Gets the shortest angle between `angle1` and `angle2`. + * Or, if you have loaded a texture `atlas` with a key of `Level1`: * - * Both angles must be in the range -180 to 180, which is the same clamped - * range that `sprite.angle` uses, so you can pass in two sprite angles to - * this method and get the shortest angle back between the two of them. + * ```javascript + * this.load.on('filecomplete-atlas-Level1', function (key, type, data) { + * // Your handler code + * }); + * ``` * - * The angle returned will be in the same range. If the returned angle is - * greater than 0 then it's a counter-clockwise rotation, if < 0 then it's - * a clockwise rotation. + * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`: * - * TODO: Wrap the angles in this function? - * @param angle1 The first angle in the range -180 to 180. - * @param angle2 The second angle in the range -180 to 180. + * ```javascript + * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) { + * // Your handler code + * }); + * ``` + * + * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event. */ - function ShortestBetween(angle1: number, angle2: number): number; + const FILE_KEY_COMPLETE: any; /** - * Wrap an angle. + * The File Load Error Event. * - * Wraps the angle to a value in the range of -PI to PI. - * @param angle The angle to wrap, in radians. + * This event is dispatched by the Loader Plugin when a file fails to load. + * + * Listen to it from a Scene using: `this.load.on('loaderror', listener)`. */ - function Wrap(angle: number): number; + const FILE_LOAD_ERROR: any; /** - * Wrap an angle in degrees. + * The File Load Event. * - * Wraps the angle to a value in the range of -180 to 180. - * @param angle The angle to wrap, in degrees. + * This event is dispatched by the Loader Plugin when a file finishes loading, + * but _before_ it is processed and added to the internal Phaser caches. + * + * Listen to it from a Scene using: `this.load.on('load', listener)`. */ - function WrapDegrees(angle: number): number; + const FILE_LOAD: any; + + /** + * The File Load Progress Event. + * + * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and + * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen. + * + * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`. + */ + const FILE_PROGRESS: any; + + /** + * The Loader Plugin Post Process Event. + * + * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue. + * It is dispatched before the internal lists are cleared and each File is destroyed. + * + * Use this hook to perform any last minute processing of files that can only happen once the + * Loader has completed, but prior to it emitting the `complete` event. + * + * Listen to it from a Scene using: `this.load.on('postprocess', listener)`. + */ + const POST_PROCESS: any; + + /** + * The Loader Plugin Progress Event. + * + * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading. + * + * Listen to it from a Scene using: `this.load.on('progress', listener)`. + */ + const PROGRESS: any; + + /** + * The Loader Plugin Start Event. + * + * This event is dispatched when the Loader starts running. At this point load progress is zero. + * + * This event is dispatched even if there aren't any files in the load queue. + * + * Listen to it from a Scene using: `this.load.on('start', listener)`. + */ + const START: any; } + namespace FileTypes { + /** + * A single Animation JSON File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#animation method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#animation. + */ + class AnimationJSONFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param xhrSettings Extra XHR Settings specifically for this file. + * @param dataKey When the JSON file loads only this property will be stored in the Cache. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.JSONFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject, dataKey?: string); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + /** + * Called at the end of the load process, after the Loader has finished all files in its queue. + */ + onLoadComplete(): void; + + } + + /** + * A single JSON based Texture Atlas File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#atlas method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#atlas. + * + * https://www.codeandweb.com/texturepacker/tutorials/how-to-create-sprite-sheets-for-phaser3?source=photonstorm + */ + class AtlasJSONFile extends Phaser.Loader.MultiFile { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param textureURL The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". + * @param atlasURL The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param textureXhrSettings An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings. + * @param atlasXhrSettings An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig, textureURL?: string | string[], atlasURL?: string, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * A single XML based Texture Atlas File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#atlasXML method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#atlasXML. + */ + class AtlasXMLFile extends Phaser.Loader.MultiFile { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param textureURL The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". + * @param atlasURL The absolute or relative URL to load the texture atlas xml data file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was "alien" then the URL will be "alien.xml". + * @param textureXhrSettings An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings. + * @param atlasXhrSettings An XHR Settings configuration object for the atlas xml file. Used in replacement of the Loaders default XHR Settings. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig, textureURL?: string | string[], atlasURL?: string, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * A single Audio File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#audio method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#audio. + */ + class AudioFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param urlConfig The absolute or relative URL to load this file from in a config object. + * @param xhrSettings Extra XHR Settings specifically for this file. + * @param audioContext The AudioContext this file will use to process itself. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.AudioFileConfig, urlConfig?: any, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject, audioContext?: AudioContext); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + /** + * An Audio Sprite File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#audioSprite method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#audioSprite. + */ + class AudioSpriteFile extends Phaser.Loader.MultiFile { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param jsonURL The absolute or relative URL to load the json file from. Or a well formed JSON object to use instead. + * @param audioURL The absolute or relative URL to load the audio file from. If empty it will be obtained by parsing the JSON file. + * @param audioConfig The audio configuration options. + * @param audioXhrSettings An XHR Settings configuration object for the audio file. Used in replacement of the Loaders default XHR Settings. + * @param jsonXhrSettings An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig, jsonURL: string, audioURL?: Object, audioConfig?: any, audioXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, jsonXhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called by each File when it finishes loading. + * @param file The File that has completed processing. + */ + onFileComplete(file: Phaser.Loader.File): void; + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * A single Binary File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#binary method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#binary. + */ + class BinaryFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.bin`, i.e. if `key` was "alien" then the URL will be "alien.bin". + * @param xhrSettings Extra XHR Settings specifically for this file. + * @param dataType Optional type to cast the binary file to once loaded. For example, `Uint8Array`. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.BinaryFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject, dataType?: any); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + /** + * A single Bitmap Font based File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#bitmapFont method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#bitmapFont. + */ + class BitmapFontFile extends Phaser.Loader.MultiFile { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param textureURL The absolute or relative URL to load the font image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". + * @param fontDataURL The absolute or relative URL to load the font xml data file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was "alien" then the URL will be "alien.xml". + * @param textureXhrSettings An XHR Settings configuration object for the font image file. Used in replacement of the Loaders default XHR Settings. + * @param fontDataXhrSettings An XHR Settings configuration object for the font data xml file. Used in replacement of the Loaders default XHR Settings. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.BitmapFontFileConfig, textureURL?: string | string[], fontDataURL?: string, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, fontDataXhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * A single CSS File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#css method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#css. + */ + class CSSFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was "alien" then the URL will be "alien.js". + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.CSSFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + /** + * A single GLSL File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#glsl method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#glsl. + */ + class GLSLFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". + * @param shaderType The type of shader. Either `fragment` for a fragment shader, or `vertex` for a vertex shader. This is ignored if you load a shader bundle. Default 'fragment'. + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.GLSLFileConfig, url?: string, shaderType?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + /** + * Returns the name of the shader from the header block. + * @param headerSource The header data. + */ + getShaderName(headerSource: string[]): string; + + /** + * Returns the type of the shader from the header block. + * @param headerSource The header data. + */ + getShaderType(headerSource: string[]): string; + + /** + * Returns the shader uniforms from the header block. + * @param headerSource The header data. + */ + getShaderUniforms(headerSource: string[]): any; + + } + + /** + * A single Audio File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#audio method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#audio. + */ + class HTML5AudioFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param urlConfig The absolute or relative URL to load this file from. + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.AudioFileConfig, urlConfig?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called when the file finishes loading. + */ + onLoad(): void; + + /** + * Called if the file errors while loading. + */ + onError(): void; + + /** + * Called during the file load progress. Is sent a DOM ProgressEvent. + */ + onProgress(): void; + + /** + * Called by the Loader, starts the actual file downloading. + * During the load the methods onLoad, onError and onProgress are called, based on the XHR events. + * You shouldn't normally call this method directly, it's meant to be invoked by the Loader. + */ + load(): void; + + } + + /** + * A single HTML File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#html method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#html. + */ + class HTMLFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was "alien" then the URL will be "alien.html". + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.HTMLFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + /** + * A single HTML File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#htmlTexture method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#htmlTexture. + */ + class HTMLTextureFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". + * @param width The width of the texture the HTML will be rendered to. + * @param height The height of the texture the HTML will be rendered to. + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig, url?: string, width?: integer, height?: integer, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * A single Image File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image. + */ + class ImageFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". + * @param xhrSettings Extra XHR Settings specifically for this file. + * @param frameConfig The frame configuration object. Only provided for, and used by, Sprite Sheets. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.ImageFileConfig, url?: string | string[], xhrSettings?: Phaser.Types.Loader.XHRSettingsObject, frameConfig?: Phaser.Types.Loader.FileTypes.ImageFrameConfig); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * A single JSON File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json. + */ + class JSONFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param xhrSettings Extra XHR Settings specifically for this file. + * @param dataKey When the JSON file loads only this property will be stored in the Cache. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.JSONFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject, dataKey?: string); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + /** + * A single Multi Texture Atlas File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#multiatlas method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#multiatlas. + */ + class MultiAtlasFile extends Phaser.Loader.MultiFile { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key of the file. Must be unique within both the Loader and the Texture Manager. + * @param atlasURL The absolute or relative URL to load the multi atlas json file from. + * @param path Optional path to use when loading the textures defined in the atlas data. + * @param baseURL Optional Base URL to use when loading the textures defined in the atlas data. + * @param atlasXhrSettings Extra XHR Settings specifically for the atlas json file. + * @param textureXhrSettings Extra XHR Settings specifically for the texture files. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string, atlasURL?: string, path?: string, baseURL?: string, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called by each File when it finishes loading. + * @param file The File that has completed processing. + */ + onFileComplete(file: Phaser.Loader.File): void; + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * A Multi Script File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#scripts method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#scripts. + */ + class MultiScriptFile extends Phaser.Loader.MultiFile { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url An array of absolute or relative URLs to load the script files from. They are processed in the order given in the array. + * @param xhrSettings An XHR Settings configuration object for the script files. Used in replacement of the Loaders default XHR Settings. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.MultiScriptFileConfig, url?: string[], xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * A single JSON Pack File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#pack method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#pack. + */ + class PackFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param xhrSettings Extra XHR Settings specifically for this file. + * @param dataKey When the JSON file loads only this property will be stored in the Cache. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.PackFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject, dataKey?: string); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + /** + * A single Plugin Script File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#plugin method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#plugin. + */ + class PluginFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was "alien" then the URL will be "alien.js". + * @param start Automatically start the plugin after loading? Default false. + * @param mapping If this plugin is to be injected into the Scene, this is the property key used. + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.PluginFileConfig, url?: string, start?: boolean, mapping?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + /** + * A single SVG File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#svg method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#svg. + */ + class SVGFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.svg`, i.e. if `key` was "alien" then the URL will be "alien.svg". + * @param svgConfig The svg size configuration object. + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.SVGFileConfig, url?: string, svgConfig?: Phaser.Types.Loader.FileTypes.SVGSizeConfig, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * An external Scene JavaScript File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#sceneFile method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#sceneFile. + */ + class SceneFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was "alien" then the URL will be "alien.js". + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.SceneFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * A single Scene Plugin Script File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#scenePlugin method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#scenePlugin. + */ + class ScenePluginFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was "alien" then the URL will be "alien.js". + * @param systemKey If this plugin is to be added to Scene.Systems, this is the property key for it. + * @param sceneKey If this plugin is to be added to the Scene, this is the property key for it. + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.ScenePluginFileConfig, url?: string, systemKey?: string, sceneKey?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + /** + * A single Script File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#script method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#script. + */ + class ScriptFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was "alien" then the URL will be "alien.js". + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.ScriptFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + /** + * A single Sprite Sheet Image File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#spritesheet method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spritesheet. + */ + class SpriteSheetFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". + * @param frameConfig The frame configuration object. + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig, url?: string | string[], frameConfig?: Phaser.Types.Loader.FileTypes.ImageFrameConfig, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * A single Text File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text. + */ + class TextFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.TextFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + /** + * A single Tilemap CSV File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#tilemapCSV method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#tilemapCSV. + */ + class TilemapCSVFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.csv`, i.e. if `key` was "alien" then the URL will be "alien.csv". + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * A single Impact.js Tilemap JSON File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#tilemapImpact method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#tilemapImpact. + */ + class TilemapImpactFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * A single Tiled Tilemap JSON File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#tilemapTiledJSON method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#tilemapTiledJSON. + */ + class TilemapJSONFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * A single text file based Unity Texture Atlas File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#unityAtlas method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#unityAtlas. + */ + class UnityAtlasFile extends Phaser.Loader.MultiFile { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param textureURL The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". + * @param atlasURL The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". + * @param textureXhrSettings An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings. + * @param atlasXhrSettings An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig, textureURL?: string | string[], atlasURL?: string, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * A single Video File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#video method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#video. + */ + class VideoFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param urlConfig The absolute or relative URL to load this file from in a config object. + * @param loadEvent The load event to listen for when _not_ loading as a blob. Either 'loadeddata', 'canplay' or 'canplaythrough'. + * @param asBlob Load the video as a data blob, or via the Video element? + * @param noAudio Does the video have an audio track? If not you can enable auto-playing on it. + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.VideoFileConfig, urlConfig?: any, loadEvent?: string, asBlob?: boolean, noAudio?: boolean, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + /** + * Called by the Loader, starts the actual file downloading. + * During the load the methods onLoad, onError and onProgress are called, based on the XHR events. + * You shouldn't normally call this method directly, it's meant to be invoked by the Loader. + */ + load(): void; + + } + + /** + * A single XML File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#xml method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#xml. + */ + class XMLFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was "alien" then the URL will be "alien.xml". + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.XMLFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + } + + } + + namespace Math { /** * Calculate the mean average of the given values. * @param values The values to average. @@ -49113,49 +48370,6 @@ declare namespace Phaser { */ function Clamp(value: number, min: number, max: number): number; - /** - * The value of PI * 2. - */ - var PI2: number; - - /** - * The value of PI * 0.5. - */ - var TAU: number; - - /** - * An epsilon value (1.0e-6) - */ - var EPSILON: number; - - /** - * For converting degrees to radians (PI / 180) - */ - var DEG_TO_RAD: number; - - /** - * For converting radians to degrees (180 / PI) - */ - var RAD_TO_DEG: number; - - /** - * An instance of the Random Number Generator. - * This is not set until the Game boots. - */ - var RND: Phaser.Math.RandomDataGenerator; - - /** - * The minimum safe integer this browser supports. - * We use a const for backward compatibility with Internet Explorer. - */ - var MIN_SAFE_INTEGER: number; - - /** - * The maximum safe integer this browser supports. - * We use a const for backward compatibility with Internet Explorer. - */ - var MAX_SAFE_INTEGER: number; - /** * Convert the given angle from degrees, to the equivalent angle in radians. * @param degrees The angle (in degrees) to convert to radians. @@ -49169,278 +48383,6 @@ declare namespace Phaser { */ function Difference(a: number, b: number): number; - namespace Distance { - /** - * Calculate the distance between two sets of coordinates (points). - * @param x1 The x coordinate of the first point. - * @param y1 The y coordinate of the first point. - * @param x2 The x coordinate of the second point. - * @param y2 The y coordinate of the second point. - */ - function Between(x1: number, y1: number, x2: number, y2: number): number; - - /** - * Calculate the distance between two sets of coordinates (points) to the power of `pow`. - * @param x1 The x coordinate of the first point. - * @param y1 The y coordinate of the first point. - * @param x2 The x coordinate of the second point. - * @param y2 The y coordinate of the second point. - * @param pow The exponent. - */ - function Power(x1: number, y1: number, x2: number, y2: number, pow: number): number; - - /** - * Calculate the distance between two sets of coordinates (points), squared. - * @param x1 The x coordinate of the first point. - * @param y1 The y coordinate of the first point. - * @param x2 The x coordinate of the second point. - * @param y2 The y coordinate of the second point. - */ - function Squared(x1: number, y1: number, x2: number, y2: number): number; - - } - - namespace Easing { - namespace Back { - /** - * Back ease-in. - * @param v The value to be tweened. - * @param overshoot The overshoot amount. Default 1.70158. - */ - function In(v: number, overshoot?: number): number; - - /** - * Back ease-in/out. - * @param v The value to be tweened. - * @param overshoot The overshoot amount. Default 1.70158. - */ - function InOut(v: number, overshoot?: number): number; - - /** - * Back ease-out. - * @param v The value to be tweened. - * @param overshoot The overshoot amount. Default 1.70158. - */ - function Out(v: number, overshoot?: number): number; - - } - - namespace Bounce { - /** - * Bounce ease-in. - * @param v The value to be tweened. - */ - function In(v: number): number; - - /** - * Bounce ease-in/out. - * @param v The value to be tweened. - */ - function InOut(v: number): number; - - /** - * Bounce ease-out. - * @param v The value to be tweened. - */ - function Out(v: number): number; - - } - - namespace Circular { - /** - * Circular ease-in. - * @param v The value to be tweened. - */ - function In(v: number): number; - - /** - * Circular ease-in/out. - * @param v The value to be tweened. - */ - function InOut(v: number): number; - - /** - * Circular ease-out. - * @param v The value to be tweened. - */ - function Out(v: number): number; - - } - - namespace Cubic { - /** - * Cubic ease-in. - * @param v The value to be tweened. - */ - function In(v: number): number; - - /** - * Cubic ease-in/out. - * @param v The value to be tweened. - */ - function InOut(v: number): number; - - /** - * Cubic ease-out. - * @param v The value to be tweened. - */ - function Out(v: number): number; - - } - - namespace Elastic { - /** - * Elastic ease-in. - * @param v The value to be tweened. - * @param amplitude The amplitude of the elastic ease. Default 0.1. - * @param period Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles. Default 0.1. - */ - function In(v: number, amplitude?: number, period?: number): number; - - /** - * Elastic ease-in/out. - * @param v The value to be tweened. - * @param amplitude The amplitude of the elastic ease. Default 0.1. - * @param period Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles. Default 0.1. - */ - function InOut(v: number, amplitude?: number, period?: number): number; - - /** - * Elastic ease-out. - * @param v The value to be tweened. - * @param amplitude The amplitude of the elastic ease. Default 0.1. - * @param period Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles. Default 0.1. - */ - function Out(v: number, amplitude?: number, period?: number): number; - - } - - namespace Expo { - /** - * Exponential ease-in. - * @param v The value to be tweened. - */ - function In(v: number): number; - - /** - * Exponential ease-in/out. - * @param v The value to be tweened. - */ - function InOut(v: number): number; - - /** - * Exponential ease-out. - * @param v The value to be tweened. - */ - function Out(v: number): number; - - } - - namespace Linear { - /** - * Linear easing (no variation). - * @param v The value to be tweened. - */ - function Linear(v: number): number; - - } - - namespace Quadratic { - /** - * Quadratic ease-in. - * @param v The value to be tweened. - */ - function In(v: number): number; - - /** - * Quadratic ease-in/out. - * @param v The value to be tweened. - */ - function InOut(v: number): number; - - /** - * Quadratic ease-out. - * @param v The value to be tweened. - */ - function Out(v: number): number; - - } - - namespace Quartic { - /** - * Quartic ease-in. - * @param v The value to be tweened. - */ - function In(v: number): number; - - /** - * Quartic ease-in/out. - * @param v The value to be tweened. - */ - function InOut(v: number): number; - - /** - * Quartic ease-out. - * @param v The value to be tweened. - */ - function Out(v: number): number; - - } - - namespace Quintic { - /** - * Quintic ease-in. - * @param v The value to be tweened. - */ - function In(v: number): number; - - /** - * Quintic ease-in/out. - * @param v The value to be tweened. - */ - function InOut(v: number): number; - - /** - * Quintic ease-out. - * @param v The value to be tweened. - */ - function Out(v: number): number; - - } - - namespace Sine { - /** - * Sinusoidal ease-in. - * @param v The value to be tweened. - */ - function In(v: number): number; - - /** - * Sinusoidal ease-in/out. - * @param v The value to be tweened. - */ - function InOut(v: number): number; - - /** - * Sinusoidal ease-out. - * @param v The value to be tweened. - */ - function Out(v: number): number; - - } - - namespace Stepped { - /** - * Stepped easing. - * @param v The value to be tweened. - * @param steps The number of steps in the ease. Default 1. - */ - function Stepped(v: number, steps?: number): number; - - } - - } - /** * Calculates the factorial of a given number for integer values greater than 0. * @param value A positive integer to calculate the factorial of. @@ -49472,121 +48414,13 @@ declare namespace Phaser { */ function FromPercent(percent: number, min: number, max?: number): number; - namespace Fuzzy { - /** - * Calculate the fuzzy ceiling of the given value. - * @param value The value. - * @param epsilon The epsilon. Default 0.0001. - */ - function Ceil(value: number, epsilon?: number): number; - - /** - * Check whether the given values are fuzzily equal. - * - * Two numbers are fuzzily equal if their difference is less than `epsilon`. - * @param a The first value. - * @param b The second value. - * @param epsilon The epsilon. Default 0.0001. - */ - function Equal(a: number, b: number, epsilon?: number): boolean; - - /** - * Calculate the fuzzy floor of the given value. - * @param value The value. - * @param epsilon The epsilon. Default 0.0001. - */ - function Floor(value: number, epsilon?: number): number; - - /** - * Check whether `a` is fuzzily greater than `b`. - * - * `a` is fuzzily greater than `b` if it is more than `b - epsilon`. - * @param a The first value. - * @param b The second value. - * @param epsilon The epsilon. Default 0.0001. - */ - function GreaterThan(a: number, b: number, epsilon?: number): boolean; - - /** - * Check whether `a` is fuzzily less than `b`. - * - * `a` is fuzzily less than `b` if it is less than `b + epsilon`. - * @param a The first value. - * @param b The second value. - * @param epsilon The epsilon. Default 0.0001. - */ - function LessThan(a: number, b: number, epsilon?: number): boolean; - - } - /** - * Calculate the speed required to cover a distance in the time given. - * @param distance The distance to travel in pixels. - * @param time The time, in ms, to cover the distance in. + * Calculate a per-ms speed from a distance and time (given in seconds). + * @param distance The distance. + * @param time The time, in seconds. */ function GetSpeed(distance: number, time: integer): number; - namespace Interpolation { - /** - * A bezier interpolation method. - * @param v The input array of values to interpolate between. - * @param k The percentage of interpolation, between 0 and 1. - */ - function Bezier(v: number[], k: number): number; - - /** - * A Catmull-Rom interpolation method. - * @param v The input array of values to interpolate between. - * @param k The percentage of interpolation, between 0 and 1. - */ - function CatmullRom(v: number[], k: number): number; - - /** - * A cubic bezier interpolation method. - * - * https://medium.com/@adrian_cooney/bezier-interpolation-13b68563313a - * @param t The percentage of interpolation, between 0 and 1. - * @param p0 The start point. - * @param p1 The first control point. - * @param p2 The second control point. - * @param p3 The end point. - */ - function CubicBezier(t: number, p0: number, p1: number, p2: number, p3: number): number; - - /** - * A linear interpolation method. - * @param v The input array of values to interpolate between. - * @param k The percentage of interpolation, between 0 and 1. - */ - function Linear(v: number[], k: number): number; - - /** - * A quadratic bezier interpolation method. - * @param t The percentage of interpolation, between 0 and 1. - * @param p0 The start point. - * @param p1 The control point. - * @param p2 The end point. - */ - function QuadraticBezier(t: number, p0: number, p1: number, p2: number): number; - - /** - * A Smoother Step interpolation method. - * @param t The percentage of interpolation, between 0 and 1. - * @param min The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'. - * @param max The maximum value, also known as the 'right edge', assumed greater than the 'left edge'. - */ - function SmootherStep(t: number, min: number, max: number): number; - - /** - * A Smooth Step interpolation method. - * @param t The percentage of interpolation, between 0 and 1. - * @param min The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'. - * @param max The maximum value, also known as the 'right edge', assumed greater than the 'left edge'. - */ - function SmoothStep(t: number, min: number, max: number): number; - - } - /** * Check if a given value is an even number. * @param value The number to perform the check with. @@ -49987,29 +48821,6 @@ declare namespace Phaser { */ function Percent(value: number, min: number, max?: number, upperMax?: number): number; - namespace Pow2 { - /** - * Returns the nearest power of 2 to the given `value`. - * @param value The value. - */ - function GetNext(value: number): integer; - - /** - * Checks if the given `width` and `height` are a power of two. - * Useful for checking texture dimensions. - * @param width The width. - * @param height The height. - */ - function IsSize(width: number, height: number): boolean; - - /** - * Tests the value and returns `true` if it is a power of two. - * @param value The value to check if it's a power of two. - */ - function IsValue(value: number): boolean; - - } - /** * A quaternion. */ @@ -50195,149 +49006,6 @@ declare namespace Phaser { */ function RadToDeg(radians: number): integer; - /** - * A seeded Random Data Generator. - * - * Access via `Phaser.Math.RND` which is an instance of this class pre-defined - * by Phaser. Or, create your own instance to use as you require. - * - * The `Math.RND` generator is seeded by the Game Config property value `seed`. - * If no such config property exists, a random number is used. - * - * If you create your own instance of this class you should provide a seed for it. - * If no seed is given it will use a 'random' one based on Date.now. - */ - class RandomDataGenerator { - /** - * - * @param seeds The seeds to use for the random number generator. - */ - constructor(seeds?: string | string[]); - - /** - * Signs to choose from. - */ - signs: number[]; - - /** - * Initialize the state of the random data generator. - * @param seeds The seeds to initialize the random data generator with. - */ - init(seeds: string | string[]): void; - - /** - * Reset the seed of the random data generator. - * - * _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. - */ - sow(seeds: string[]): void; - - /** - * Returns a random integer between 0 and 2^32. - */ - integer(): number; - - /** - * Returns a random real number between 0 and 1. - */ - frac(): number; - - /** - * Returns a random real number between 0 and 2^32. - */ - real(): 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. - */ - integerInRange(min: number, max: number): number; - - /** - * 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. - */ - between(min: number, max: number): 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. - */ - realInRange(min: number, max: number): number; - - /** - * Returns a random real number between -1 and 1. - */ - normal(): number; - - /** - * Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368 - */ - uuid(): string; - - /** - * Returns a random element from within the given array. - * @param array The array to pick a random element from. - */ - pick(array: any[]): any; - - /** - * Returns a sign to be used with multiplication operator. - */ - sign(): number; - - /** - * Returns a random element from within the given array, favoring the earlier entries. - * @param array The array to pick a random element from. - */ - weightedPick(array: any[]): any; - - /** - * 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. - */ - timestamp(min: number, max: number): number; - - /** - * Returns a random angle between -180 and 180. - */ - angle(): number; - - /** - * Returns a random rotation in radians, between -3.141 and 3.141 - */ - rotation(): number; - - /** - * Gets or Sets the state of the generator. This allows you to retain the values - * that the generator is using between games, i.e. in a game save file. - * - * To seed this generator with a previously saved state you can pass it as the - * `seed` value in your game config, or call this method directly after Phaser has booted. - * - * Call this method with no parameters to return the current state. - * - * If providing a state it should match the same format that this method - * returns, which is a string with a header `!rnd` followed by the `c`, - * `s0`, `s1` and `s2` values respectively, each comma-delimited. - * @param state Generator state to be set. - */ - state(state?: string): string; - - /** - * Shuffles the given array, using the current seed. - * @param array The array to be shuffled. - */ - shuffle(array?: any[]): any[]; - - } - /** * Compute a random unit vector. * @@ -50440,6 +49108,18 @@ declare namespace Phaser { */ function SinCosTableGenerator(length: number, sinAmp?: number, cosAmp?: number, frequency?: number): Phaser.Types.Math.SinCosTable; + /** + * Calculate a smooth interpolation percentage of `x` between `min` and `max`. + * + * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge, + * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial, + * between 0 and 1 otherwise. + * @param x The input value. + * @param min The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'. + * @param max The maximum value, also known as the 'right edge', assumed greater than the 'left edge'. + */ + function SmoothStep(x: number, min: number, max: number): number; + /** * Calculate a smoother interpolation percentage of `x` between `min` and `max`. * @@ -50454,56 +49134,6 @@ declare namespace Phaser { */ function SmootherStep(x: number, min: number, max: number): number; - /** - * Calculate a smooth interpolation percentage of `x` between `min` and `max`. - * - * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge, - * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial, - * between 0 and 1 otherwise. - * @param x The input value. - * @param min The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'. - * @param max The maximum value, also known as the 'right edge', assumed greater than the 'left edge'. - */ - function SmoothStep(x: number, min: number, max: number): number; - - namespace Snap { - /** - * Snap a value to nearest grid slice, using ceil. - * - * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `15`. - * As will `14` snap to `15`... but `16` will snap to `20`. - * @param value The value to snap. - * @param gap The interval gap of the grid. - * @param start Optional starting offset for gap. Default 0. - * @param divide If `true` it will divide the snapped value by the gap before returning. Default false. - */ - function Ceil(value: number, gap: number, start?: number, divide?: boolean): number; - - /** - * Snap a value to nearest grid slice, using floor. - * - * 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 value The value to snap. - * @param gap The interval gap of the grid. - * @param start Optional starting offset for gap. Default 0. - * @param divide If `true` it will divide the snapped value by the gap before returning. Default false. - */ - function Floor(value: number, gap: number, start?: number, divide?: boolean): number; - - /** - * Snap a value to nearest grid slice, using rounding. - * - * 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 value The value to snap. - * @param gap The interval gap of the grid. - * @param start Optional starting offset for gap. Default 0. - * @param divide If `true` it will divide the snapped value by the gap before returning. Default false. - */ - function To(value: number, gap: number, start?: number, divide?: boolean): number; - - } - /** * Returns a Vec2 containing the x and y position of the given index in a `width` x `height` sized grid. * @@ -51208,6 +49838,783 @@ declare namespace Phaser { */ function Wrap(value: number, min: number, max: number): number; + namespace Angle { + /** + * Find the angle of a segment from (x1, y1) -> (x2, y2). + * @param x1 The x coordinate of the first point. + * @param y1 The y coordinate of the first point. + * @param x2 The x coordinate of the second point. + * @param y2 The y coordinate of the second point. + */ + function Between(x1: number, y1: number, x2: number, y2: number): number; + + /** + * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y). + * + * Calculates the angle of the vector from the first point to the second point. + * @param point1 The first point. + * @param point2 The second point. + */ + function BetweenPoints(point1: Phaser.Geom.Point | object, point2: Phaser.Geom.Point | object): number; + + /** + * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y). + * + * The difference between this method and {@link Phaser.Math.Angle.BetweenPoints} is that this assumes the y coordinate + * travels down the screen. + * @param point1 The first point. + * @param point2 The second point. + */ + function BetweenPointsY(point1: Phaser.Geom.Point | object, point2: Phaser.Geom.Point | object): number; + + /** + * Find the angle of a segment from (x1, y1) -> (x2, y2). + * + * The difference between this method and {@link Phaser.Math.Angle.Between} is that this assumes the y coordinate + * travels down the screen. + * @param x1 The x coordinate of the first point. + * @param y1 The y coordinate of the first point. + * @param x2 The x coordinate of the second point. + * @param y2 The y coordinate of the second point. + */ + function BetweenY(x1: number, y1: number, x2: number, y2: number): number; + + /** + * Takes an angle in Phasers default clockwise format and converts it so that + * 0 is North, 90 is West, 180 is South and 270 is East, + * therefore running counter-clockwise instead of clockwise. + * + * You can pass in the angle from a Game Object using: + * + * ```javascript + * var converted = CounterClockwise(gameobject.rotation); + * ``` + * + * All values for this function are in radians. + * @param angle The angle to convert, in radians. + */ + function CounterClockwise(angle: number): number; + + /** + * Normalize an angle to the [0, 2pi] range. + * @param angle The angle to normalize, in radians. + */ + function Normalize(angle: number): number; + + /** + * Reverse the given angle. + * @param angle The angle to reverse, in radians. + */ + function Reverse(angle: number): number; + + /** + * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call. + * @param currentAngle The current angle, in radians. + * @param targetAngle The target angle to rotate to, in radians. + * @param lerp The lerp value to add to the current angle. Default 0.05. + */ + function RotateTo(currentAngle: number, targetAngle: number, lerp?: number): number; + + /** + * Gets the shortest angle between `angle1` and `angle2`. + * + * Both angles must be in the range -180 to 180, which is the same clamped + * range that `sprite.angle` uses, so you can pass in two sprite angles to + * this method and get the shortest angle back between the two of them. + * + * The angle returned will be in the same range. If the returned angle is + * greater than 0 then it's a counter-clockwise rotation, if < 0 then it's + * a clockwise rotation. + * + * TODO: Wrap the angles in this function? + * @param angle1 The first angle in the range -180 to 180. + * @param angle2 The second angle in the range -180 to 180. + */ + function ShortestBetween(angle1: number, angle2: number): number; + + /** + * Wrap an angle. + * + * Wraps the angle to a value in the range of -PI to PI. + * @param angle The angle to wrap, in radians. + */ + function Wrap(angle: number): number; + + /** + * Wrap an angle in degrees. + * + * Wraps the angle to a value in the range of -180 to 180. + * @param angle The angle to wrap, in degrees. + */ + function WrapDegrees(angle: number): number; + + } + + /** + * The value of PI * 2. + */ + var PI2: number; + + /** + * The value of PI * 0.5. + */ + var TAU: number; + + /** + * An epsilon value (1.0e-6) + */ + var EPSILON: number; + + /** + * For converting degrees to radians (PI / 180) + */ + var DEG_TO_RAD: number; + + /** + * For converting radians to degrees (180 / PI) + */ + var RAD_TO_DEG: number; + + /** + * An instance of the Random Number Generator. + * This is not set until the Game boots. + */ + var RND: Phaser.Math.RandomDataGenerator; + + /** + * The minimum safe integer this browser supports. + * We use a const for backward compatibility with Internet Explorer. + */ + var MIN_SAFE_INTEGER: number; + + /** + * The maximum safe integer this browser supports. + * We use a const for backward compatibility with Internet Explorer. + */ + var MAX_SAFE_INTEGER: number; + + namespace Distance { + /** + * Calculate the distance between two sets of coordinates (points). + * @param x1 The x coordinate of the first point. + * @param y1 The y coordinate of the first point. + * @param x2 The x coordinate of the second point. + * @param y2 The y coordinate of the second point. + */ + function Between(x1: number, y1: number, x2: number, y2: number): number; + + /** + * Calculate the distance between two points. + * @param a The first point. + * @param b The second point. + */ + function BetweenPoints(a: Phaser.Types.Math.Vector2Like, b: Phaser.Types.Math.Vector2Like): number; + + /** + * Calculate the squared distance between two points. + * @param a The first point. + * @param b The second point. + */ + function BetweenPointsSquared(a: Phaser.Types.Math.Vector2Like, b: Phaser.Types.Math.Vector2Like): number; + + /** + * Calculate the Chebyshev distance between two sets of coordinates (points). + * + * Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances. + * It's the effective distance when movement can be horizontal, vertical, or diagonal. + * @param x1 The x coordinate of the first point. + * @param y1 The y coordinate of the first point. + * @param x2 The x coordinate of the second point. + * @param y2 The y coordinate of the second point. + */ + function Chebyshev(x1: number, y1: number, x2: number, y2: number): number; + + /** + * Calculate the distance between two sets of coordinates (points) to the power of `pow`. + * @param x1 The x coordinate of the first point. + * @param y1 The y coordinate of the first point. + * @param x2 The x coordinate of the second point. + * @param y2 The y coordinate of the second point. + * @param pow The exponent. + */ + function Power(x1: number, y1: number, x2: number, y2: number, pow: number): number; + + /** + * Calculate the snake distance between two sets of coordinates (points). + * + * Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances. + * It's the effective distance when movement is allowed only horizontally or vertically (but not both). + * @param x1 The x coordinate of the first point. + * @param y1 The y coordinate of the first point. + * @param x2 The x coordinate of the second point. + * @param y2 The y coordinate of the second point. + */ + function Snake(x1: number, y1: number, x2: number, y2: number): number; + + /** + * Calculate the distance between two sets of coordinates (points), squared. + * @param x1 The x coordinate of the first point. + * @param y1 The y coordinate of the first point. + * @param x2 The x coordinate of the second point. + * @param y2 The y coordinate of the second point. + */ + function Squared(x1: number, y1: number, x2: number, y2: number): number; + + } + + namespace Easing { + namespace Back { + /** + * Back ease-in. + * @param v The value to be tweened. + * @param overshoot The overshoot amount. Default 1.70158. + */ + function In(v: number, overshoot?: number): number; + + /** + * Back ease-in/out. + * @param v The value to be tweened. + * @param overshoot The overshoot amount. Default 1.70158. + */ + function InOut(v: number, overshoot?: number): number; + + /** + * Back ease-out. + * @param v The value to be tweened. + * @param overshoot The overshoot amount. Default 1.70158. + */ + function Out(v: number, overshoot?: number): number; + + } + + namespace Bounce { + /** + * Bounce ease-in. + * @param v The value to be tweened. + */ + function In(v: number): number; + + /** + * Bounce ease-in/out. + * @param v The value to be tweened. + */ + function InOut(v: number): number; + + /** + * Bounce ease-out. + * @param v The value to be tweened. + */ + function Out(v: number): number; + + } + + namespace Circular { + /** + * Circular ease-in. + * @param v The value to be tweened. + */ + function In(v: number): number; + + /** + * Circular ease-in/out. + * @param v The value to be tweened. + */ + function InOut(v: number): number; + + /** + * Circular ease-out. + * @param v The value to be tweened. + */ + function Out(v: number): number; + + } + + namespace Cubic { + /** + * Cubic ease-in. + * @param v The value to be tweened. + */ + function In(v: number): number; + + /** + * Cubic ease-in/out. + * @param v The value to be tweened. + */ + function InOut(v: number): number; + + /** + * Cubic ease-out. + * @param v The value to be tweened. + */ + function Out(v: number): number; + + } + + namespace Elastic { + /** + * Elastic ease-in. + * @param v The value to be tweened. + * @param amplitude The amplitude of the elastic ease. Default 0.1. + * @param period Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles. Default 0.1. + */ + function In(v: number, amplitude?: number, period?: number): number; + + /** + * Elastic ease-in/out. + * @param v The value to be tweened. + * @param amplitude The amplitude of the elastic ease. Default 0.1. + * @param period Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles. Default 0.1. + */ + function InOut(v: number, amplitude?: number, period?: number): number; + + /** + * Elastic ease-out. + * @param v The value to be tweened. + * @param amplitude The amplitude of the elastic ease. Default 0.1. + * @param period Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles. Default 0.1. + */ + function Out(v: number, amplitude?: number, period?: number): number; + + } + + namespace Expo { + /** + * Exponential ease-in. + * @param v The value to be tweened. + */ + function In(v: number): number; + + /** + * Exponential ease-in/out. + * @param v The value to be tweened. + */ + function InOut(v: number): number; + + /** + * Exponential ease-out. + * @param v The value to be tweened. + */ + function Out(v: number): number; + + } + + namespace Linear { + /** + * Linear easing (no variation). + * @param v The value to be tweened. + */ + function Linear(v: number): number; + + } + + namespace Quadratic { + /** + * Quadratic ease-in. + * @param v The value to be tweened. + */ + function In(v: number): number; + + /** + * Quadratic ease-in/out. + * @param v The value to be tweened. + */ + function InOut(v: number): number; + + /** + * Quadratic ease-out. + * @param v The value to be tweened. + */ + function Out(v: number): number; + + } + + namespace Quartic { + /** + * Quartic ease-in. + * @param v The value to be tweened. + */ + function In(v: number): number; + + /** + * Quartic ease-in/out. + * @param v The value to be tweened. + */ + function InOut(v: number): number; + + /** + * Quartic ease-out. + * @param v The value to be tweened. + */ + function Out(v: number): number; + + } + + namespace Quintic { + /** + * Quintic ease-in. + * @param v The value to be tweened. + */ + function In(v: number): number; + + /** + * Quintic ease-in/out. + * @param v The value to be tweened. + */ + function InOut(v: number): number; + + /** + * Quintic ease-out. + * @param v The value to be tweened. + */ + function Out(v: number): number; + + } + + namespace Sine { + /** + * Sinusoidal ease-in. + * @param v The value to be tweened. + */ + function In(v: number): number; + + /** + * Sinusoidal ease-in/out. + * @param v The value to be tweened. + */ + function InOut(v: number): number; + + /** + * Sinusoidal ease-out. + * @param v The value to be tweened. + */ + function Out(v: number): number; + + } + + namespace Stepped { + /** + * Stepped easing. + * @param v The value to be tweened. + * @param steps The number of steps in the ease. Default 1. + */ + function Stepped(v: number, steps?: number): number; + + } + + } + + namespace Fuzzy { + /** + * Calculate the fuzzy ceiling of the given value. + * @param value The value. + * @param epsilon The epsilon. Default 0.0001. + */ + function Ceil(value: number, epsilon?: number): number; + + /** + * Check whether the given values are fuzzily equal. + * + * Two numbers are fuzzily equal if their difference is less than `epsilon`. + * @param a The first value. + * @param b The second value. + * @param epsilon The epsilon. Default 0.0001. + */ + function Equal(a: number, b: number, epsilon?: number): boolean; + + /** + * Calculate the fuzzy floor of the given value. + * @param value The value. + * @param epsilon The epsilon. Default 0.0001. + */ + function Floor(value: number, epsilon?: number): number; + + /** + * Check whether `a` is fuzzily greater than `b`. + * + * `a` is fuzzily greater than `b` if it is more than `b - epsilon`. + * @param a The first value. + * @param b The second value. + * @param epsilon The epsilon. Default 0.0001. + */ + function GreaterThan(a: number, b: number, epsilon?: number): boolean; + + /** + * Check whether `a` is fuzzily less than `b`. + * + * `a` is fuzzily less than `b` if it is less than `b + epsilon`. + * @param a The first value. + * @param b The second value. + * @param epsilon The epsilon. Default 0.0001. + */ + function LessThan(a: number, b: number, epsilon?: number): boolean; + + } + + namespace Interpolation { + /** + * A bezier interpolation method. + * @param v The input array of values to interpolate between. + * @param k The percentage of interpolation, between 0 and 1. + */ + function Bezier(v: number[], k: number): number; + + /** + * A Catmull-Rom interpolation method. + * @param v The input array of values to interpolate between. + * @param k The percentage of interpolation, between 0 and 1. + */ + function CatmullRom(v: number[], k: number): number; + + /** + * A cubic bezier interpolation method. + * + * https://medium.com/@adrian_cooney/bezier-interpolation-13b68563313a + * @param t The percentage of interpolation, between 0 and 1. + * @param p0 The start point. + * @param p1 The first control point. + * @param p2 The second control point. + * @param p3 The end point. + */ + function CubicBezier(t: number, p0: number, p1: number, p2: number, p3: number): number; + + /** + * A linear interpolation method. + * @param v The input array of values to interpolate between. + * @param k The percentage of interpolation, between 0 and 1. + */ + function Linear(v: number[], k: number): number; + + /** + * A quadratic bezier interpolation method. + * @param t The percentage of interpolation, between 0 and 1. + * @param p0 The start point. + * @param p1 The control point. + * @param p2 The end point. + */ + function QuadraticBezier(t: number, p0: number, p1: number, p2: number): number; + + /** + * A Smooth Step interpolation method. + * @param t The percentage of interpolation, between 0 and 1. + * @param min The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'. + * @param max The maximum value, also known as the 'right edge', assumed greater than the 'left edge'. + */ + function SmoothStep(t: number, min: number, max: number): number; + + /** + * A Smoother Step interpolation method. + * @param t The percentage of interpolation, between 0 and 1. + * @param min The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'. + * @param max The maximum value, also known as the 'right edge', assumed greater than the 'left edge'. + */ + function SmootherStep(t: number, min: number, max: number): number; + + } + + namespace Pow2 { + /** + * Returns the nearest power of 2 to the given `value`. + * @param value The value. + */ + function GetNext(value: number): integer; + + /** + * Checks if the given `width` and `height` are a power of two. + * Useful for checking texture dimensions. + * @param width The width. + * @param height The height. + */ + function IsSize(width: number, height: number): boolean; + + /** + * Tests the value and returns `true` if it is a power of two. + * @param value The value to check if it's a power of two. + */ + function IsValue(value: number): boolean; + + } + + /** + * A seeded Random Data Generator. + * + * Access via `Phaser.Math.RND` which is an instance of this class pre-defined + * by Phaser. Or, create your own instance to use as you require. + * + * The `Math.RND` generator is seeded by the Game Config property value `seed`. + * If no such config property exists, a random number is used. + * + * If you create your own instance of this class you should provide a seed for it. + * If no seed is given it will use a 'random' one based on Date.now. + */ + class RandomDataGenerator { + /** + * + * @param seeds The seeds to use for the random number generator. + */ + constructor(seeds?: string | string[]); + + /** + * Signs to choose from. + */ + signs: number[]; + + /** + * Initialize the state of the random data generator. + * @param seeds The seeds to initialize the random data generator with. + */ + init(seeds: string | string[]): void; + + /** + * Reset the seed of the random data generator. + * + * _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. + */ + sow(seeds: string[]): void; + + /** + * Returns a random integer between 0 and 2^32. + */ + integer(): number; + + /** + * Returns a random real number between 0 and 1. + */ + frac(): number; + + /** + * Returns a random real number between 0 and 2^32. + */ + real(): 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. + */ + integerInRange(min: number, max: number): number; + + /** + * 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. + */ + between(min: number, max: number): 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. + */ + realInRange(min: number, max: number): number; + + /** + * Returns a random real number between -1 and 1. + */ + normal(): number; + + /** + * Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368 + */ + uuid(): string; + + /** + * Returns a random element from within the given array. + * @param array The array to pick a random element from. + */ + pick(array: T[]): T; + + /** + * Returns a sign to be used with multiplication operator. + */ + sign(): number; + + /** + * Returns a random element from within the given array, favoring the earlier entries. + * @param array The array to pick a random element from. + */ + weightedPick(array: T[]): T; + + /** + * 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. + */ + timestamp(min: number, max: number): number; + + /** + * Returns a random angle between -180 and 180. + */ + angle(): number; + + /** + * Returns a random rotation in radians, between -3.141 and 3.141 + */ + rotation(): number; + + /** + * Gets or Sets the state of the generator. This allows you to retain the values + * that the generator is using between games, i.e. in a game save file. + * + * To seed this generator with a previously saved state you can pass it as the + * `seed` value in your game config, or call this method directly after Phaser has booted. + * + * Call this method with no parameters to return the current state. + * + * If providing a state it should match the same format that this method + * returns, which is a string with a header `!rnd` followed by the `c`, + * `s0`, `s1` and `s2` values respectively, each comma-delimited. + * @param state Generator state to be set. + */ + state(state?: string): string; + + /** + * Shuffles the given array, using the current seed. + * @param array The array to be shuffled. + */ + shuffle(array?: T[]): T[]; + + } + + namespace Snap { + /** + * Snap a value to nearest grid slice, using ceil. + * + * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `15`. + * As will `14` snap to `15`... but `16` will snap to `20`. + * @param value The value to snap. + * @param gap The interval gap of the grid. + * @param start Optional starting offset for gap. Default 0. + * @param divide If `true` it will divide the snapped value by the gap before returning. Default false. + */ + function Ceil(value: number, gap: number, start?: number, divide?: boolean): number; + + /** + * Snap a value to nearest grid slice, using floor. + * + * 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 value The value to snap. + * @param gap The interval gap of the grid. + * @param start Optional starting offset for gap. Default 0. + * @param divide If `true` it will divide the snapped value by the gap before returning. Default false. + */ + function Floor(value: number, gap: number, start?: number, divide?: boolean): number; + + /** + * Snap a value to nearest grid slice, using rounding. + * + * 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 value The value to snap. + * @param gap The interval gap of the grid. + * @param start Optional starting offset for gap. Default 0. + * @param divide If `true` it will divide the snapped value by the gap before returning. Default false. + */ + function To(value: number, gap: number, start?: number, divide?: boolean): number; + + } + } /** @@ -51773,6 +51180,10 @@ declare namespace Phaser { * The amount of frames the time step counts before we trust the delta values again. */ panicMax?: integer; + /** + * Apply delta smoothing during the game update to help avoid spikes? + */ + smoothStep?: boolean; }; type GameConfig = { @@ -54027,8 +53438,6 @@ declare namespace Phaser { shift?: Phaser.Input.Keyboard.Key; }; - type KeyboardKeydownCallback = (event: KeyboardEvent)=>void; - type KeyComboConfig = { /** * If they press the wrong key do we reset the combo? @@ -54048,6 +53457,8 @@ declare namespace Phaser { deleteOnMatch?: boolean; }; + type KeyboardKeydownCallback = (event: KeyboardEvent)=>void; + } /** @@ -54648,6 +54059,44 @@ declare namespace Phaser { xhrSettings?: Phaser.Types.Loader.XHRSettingsObject; }; + type SVGFileConfig = { + /** + * The key of the file. Must be unique within both the Loader and the Texture Manager. + */ + key: string; + /** + * The absolute or relative URL to load the file from. + */ + url?: string; + /** + * The default file extension to use if no url is provided. + */ + extension?: string; + /** + * Extra XHR Settings specifically for this file. + */ + xhrSettings?: Phaser.Types.Loader.XHRSettingsObject; + /** + * The svg size configuration object. + */ + svgConfig?: Phaser.Types.Loader.FileTypes.SVGSizeConfig; + }; + + type SVGSizeConfig = { + /** + * An optional width. The SVG will be resized to this size before being rendered to a texture. + */ + width?: integer; + /** + * An optional height. The SVG will be resized to this size before being rendered to a texture. + */ + height?: integer; + /** + * An optional scale. If given it overrides the width / height properties. The SVG is scaled by the scale factor before being rendered to a texture. + */ + scale?: number; + }; + type SceneFileConfig = { /** * The key of the file. Must be unique within both the Loader and the Text Cache. @@ -54740,44 +54189,6 @@ declare namespace Phaser { xhrSettings?: Phaser.Types.Loader.XHRSettingsObject; }; - type SVGFileConfig = { - /** - * The key of the file. Must be unique within both the Loader and the Texture Manager. - */ - key: string; - /** - * The absolute or relative URL to load the file from. - */ - url?: string; - /** - * The default file extension to use if no url is provided. - */ - extension?: string; - /** - * Extra XHR Settings specifically for this file. - */ - xhrSettings?: Phaser.Types.Loader.XHRSettingsObject; - /** - * The svg size configuration object. - */ - svgConfig?: Phaser.Types.Loader.FileTypes.SVGSizeConfig; - }; - - type SVGSizeConfig = { - /** - * An optional width. The SVG will be resized to this size before being rendered to a texture. - */ - width?: integer; - /** - * An optional height. The SVG will be resized to this size before being rendered to a texture. - */ - height?: integer; - /** - * An optional scale. If given it overrides the width / height properties. The SVG is scaled by the scale factor before being rendered to a texture. - */ - scale?: number; - }; - type TextFileConfig = { /** * The key of the file. Must be unique within both the Loader and the Text Cache. @@ -55695,6 +55106,286 @@ declare namespace Phaser { addToWorld?: boolean; }; + type MatterCollisionData = { + /** + * Have the pair collided or not? + */ + collided: boolean; + /** + * A reference to the first body involved in the collision. + */ + bodyA: MatterJS.Body; + /** + * A reference to the second body involved in the collision. + */ + bodyB: MatterJS.Body; + /** + * A reference to the dominant axis body. + */ + axisBody: MatterJS.Body; + /** + * The index of the dominant collision axis vector (edge normal) + */ + axisNumber: number; + /** + * The depth of the collision on the minimum overlap. + */ + depth: number; + /** + * A reference to the parent of Body A, or to Body A itself if it has no parent. + */ + parentA: MatterJS.Body; + /** + * A reference to the parent of Body B, or to Body B itself if it has no parent. + */ + parentB: MatterJS.Body; + /** + * The collision normal, facing away from Body A. + */ + normal: vector; + /** + * The tangent of the collision normal. + */ + tangent: vector; + /** + * The penetration distances between the two bodies. + */ + penetration: vector; + /** + * An array of support points, either exactly one or two points. + */ + supports: vector[]; + /** + * The resulting inverse mass from the collision. + */ + inverseMass: number; + /** + * The resulting friction from the collision. + */ + friction: number; + /** + * The resulting static friction from the collision. + */ + frictionStatic: number; + /** + * The resulting restitution from the collision. + */ + restitution: number; + /** + * The resulting slop from the collision. + */ + slop: number; + }; + + type MatterCollisionPair = { + /** + * The unique auto-generated collision pair id. A combination of the body A and B IDs. + */ + id: string; + /** + * A reference to the first body involved in the collision. + */ + bodyA: MatterJS.Body; + /** + * A reference to the second body involved in the collision. + */ + bodyB: MatterJS.Body; + /** + * An array containing all of the active contacts between bodies A and B. + */ + activeContacts: any[]; + /** + * The amount of separation that occured between bodies A and B. + */ + separation: number; + /** + * Is the collision still active or not? + */ + isActive: boolean; + /** + * Has Matter determined the collision are being active yet? + */ + confirmedActive: boolean; + /** + * Is either body A or B a sensor? + */ + isSensor: boolean; + /** + * The timestamp when the collision pair was created. + */ + timeCreated: number; + /** + * The timestamp when the collision pair was most recently updated. + */ + timeUpdated: number; + /** + * The collision data object. + */ + collision: Phaser.Types.Physics.Matter.MatterCollisionData; + /** + * The resulting inverse mass from the collision. + */ + inverseMass: number; + /** + * The resulting friction from the collision. + */ + friction: number; + /** + * The resulting static friction from the collision. + */ + frictionStatic: number; + /** + * The resulting restitution from the collision. + */ + restitution: number; + /** + * The resulting slop from the collision. + */ + slop: number; + }; + + type MatterDebugConfig = { + /** + * Render the dynamic bodies in the world to the Graphics object? + */ + showBody?: boolean; + /** + * Render the static bodies in the world to the Graphics object? + */ + showStaticBody?: boolean; + /** + * Render any sleeping bodies (dynamic or static) in the world to the Graphics object? + */ + showSleeping?: boolean; + /** + * Render all world constraints to the Graphics object? + */ + showJoint?: boolean; + /** + * When rendering bodies, render the internal edges as well? + */ + showInternalEdges?: boolean; + /** + * When rendering polygon bodies, render the convex hull as well? + */ + showConvexHulls?: boolean; + /** + * Render the bodies using a fill color. + */ + renderFill?: boolean; + /** + * Render the bodies using a line stroke. + */ + renderLine?: boolean; + /** + * The color value of the fill when rendering dynamic bodies. + */ + fillColor?: number; + /** + * The opacity of the fill when rendering dynamic bodies, a value between 0 and 1. + */ + fillOpacity?: number; + /** + * The color value of the line stroke when rendering dynamic bodies. + */ + lineColor?: number; + /** + * The opacity of the line when rendering dynamic bodies, a value between 0 and 1. + */ + lineOpacity?: number; + /** + * If rendering lines, the thickness of the line. + */ + lineThickness?: number; + /** + * The color value of the fill when rendering static bodies. + */ + staticFillColor?: number; + /** + * The color value of the line stroke when rendering static bodies. + */ + staticLineColor?: number; + /** + * The amount to multiply the opacity of sleeping static bodies by. + */ + staticBodySleepOpacity?: number; + /** + * The color value of the fill when rendering sleeping dynamic bodies. + */ + sleepFillColor?: number; + /** + * The color value of the line stroke when rendering sleeping dynamic bodies. + */ + sleepLineColor?: number; + /** + * The color value of joints when `showJoint` is set. + */ + jointColor?: number; + /** + * The line opacity when rendering joints, a value between 0 and 1. + */ + jointLineOpacity?: number; + /** + * The line thickness when rendering joints. + */ + jointLineThickness?: number; + /** + * The size of the circles drawn when rendering pin constraints. + */ + pinSize?: number; + /** + * The color value of the circles drawn when rendering pin constraints. + */ + pinColor?: number; + /** + * The color value of spring constraints. + */ + springColor?: number; + /** + * The color value of constraint anchors. + */ + anchorColor?: number; + /** + * The size of the circles drawn as the constraint anchors. + */ + anchorSize?: number; + /** + * The color value of hulls when `showConvexHulls` is set. + */ + hullColor?: number; + }; + + type MatterRunnerConfig = { + /** + * A boolean that specifies if the runner should use a fixed timestep (otherwise it is variable). If timing is fixed, then the apparent simulation speed will change depending on the frame rate (but behaviour will be deterministic). If the timing is variable, then the apparent simulation speed will be constant (approximately, but at the cost of determininism). + */ + isFixed?: boolean; + /** + * A number that specifies the frame rate in seconds. If you don't specify this, but do specify `delta`, those values set the fps rate. + */ + fps?: number; + /** + * A number that specifies the time correction factor to apply to the update. This can help improve the accuracy of the simulation in cases where delta is changing between updates. + */ + correction?: number; + /** + * The size of the delta smoothing array when `isFixed` is `false`. + */ + deltaSampleSize?: number; + /** + * A number that specifies the time step between updates in milliseconds. If you set the `fps` property, this value is set based on that. If `isFixed` is set to `true`, then `delta` is fixed. If it is `false`, then `delta` can dynamically change to maintain the correct apparent simulation speed. + */ + delta?: number; + /** + * A number that specifies the minimum time step between updates in milliseconds. + */ + deltaMin?: number; + /** + * A number that specifies the maximum time step between updates in milliseconds. + */ + deltaMax?: number; + }; + type MatterTileOptions = { /** * An existing Matter body to be used instead of creating a new one. @@ -55779,6 +55470,18 @@ declare namespace Phaser { * A `Number` that specifies the global scaling factor of time for all bodies. A value of `0` freezes the simulation. A value of `0.1` gives a slow-motion effect. A value of `1.2` gives a speed-up effect. */ "timing.timeScale"?: number; + /** + * Should the Matter Attractor Plugin be enabled? An attractors plugin that makes it easy to apply continual forces on bodies. It's possible to simulate effects such as wind, gravity and magnetism. + */ + "plugins.attractors"?: boolean; + /** + * Should the Matter Wrap Plugin be enabled? A coordinate wrapping plugin that automatically wraps the position of bodies such that they always stay within the given bounds. Upon crossing a boundary the body will appear on the opposite side of the bounds, while maintaining its velocity. + */ + "plugins.wrap"?: boolean; + /** + * Should the Matter Collision Events Plugin be enabled? + */ + "plugins.collisionevents"?: boolean; /** * Toggles if the world is enabled or not. */ @@ -55796,65 +55499,33 @@ declare namespace Phaser { */ autoUpdate?: boolean; /** - * Sets if Matter will render to the debug Graphic overlay. Do not enable this in production. + * Sets the Resolver resting threshold property. */ - debug?: boolean; + restingThresh?: number; /** - * Should dynamic bodies be drawn to the debug graphic? + * Sets the Resolver resting threshold tangent property. */ - debugShowBody?: boolean; + restingThreshTangent?: number; /** - * Should static bodies be drawn to the debug graphic? + * Sets the Resolver position dampen property. */ - debugShowStaticBody?: boolean; + positionDampen?: number; /** - * Should the velocity vector be drawn to the debug graphic? + * Sets the Resolver position warming property. */ - debugShowVelocity?: boolean; + positionWarming?: number; /** - * The color that dynamic body debug outlines are drawn in. + * Sets the Resolver friction normal multiplier property. */ - debugBodyColor?: number; + frictionNormalMultiplier?: number; /** - * The color that dynamic body debug fills are drawn in. + * Controls the Matter Debug Rendering options. If a boolean it will use the default values, otherwise, specify a Debug Config object. */ - debugBodyFillColor?: number; + debug?: boolean | Phaser.Types.Physics.Matter.MatterDebugConfig; /** - * The color that static body debug outlines are drawn in. + * Sets the Matter Runner options. */ - debugStaticBodyColor?: number; - /** - * The color that the debug velocity vector lines are drawn in. - */ - debugVelocityColor?: number; - /** - * Render joints to the debug graphic. - */ - debugShowJoint?: boolean; - /** - * The color that the debug joints are drawn in. - */ - debugJointColor?: number; - /** - * Render the debug output as wireframes. - */ - debugWireframes?: boolean; - /** - * Render internal edges to the debug. - */ - debugShowInternalEdges?: boolean; - /** - * Render convex hulls to the debug. - */ - debugShowConvexHulls?: boolean; - /** - * The color that the debug convex hulls are drawn in, if enabled. - */ - debugConvexHullColor?: number; - /** - * Render sleeping bodies the debug. - */ - debugShowSleeping?: boolean; + runner?: Phaser.Types.Physics.Matter.MatterRunnerConfig; }; } @@ -58140,7 +57811,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -58245,6 +57918,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -59632,7 +59308,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -59737,6 +59415,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -60227,7 +59908,9 @@ declare namespace Phaser { velocity: Phaser.Math.Vector2; /** - * The Body's calculated velocity, in pixels per second, at the last step. + * The Body's change in position (due to velocity) at the last step, in pixels. + * + * The size of this value depends on the simulation's step rate. */ readonly newVelocity: Phaser.Math.Vector2; @@ -60313,19 +59996,19 @@ declare namespace Phaser { maxVelocity: Phaser.Math.Vector2; /** - * The maximum speed this Body is allowed to reach. + * The maximum speed this Body is allowed to reach, in pixels per second. * * If not negative it limits the scalar value of speed. * - * Any negative value means no maximum is being applied. + * Any negative value means no maximum is being applied (the default). */ maxSpeed: number; /** * If this Body is `immovable` and in motion, `friction` is the proportion of this Body's motion received by the riding Body on each axis, relative to 1. - * The default value (1, 0) moves the riding Body horizontally in equal proportion to this Body and vertically not at all. * The horizontal component (x) is applied only when two colliding Bodies are separated vertically. * The vertical component (y) is applied only when two colliding Bodies are separated horizontally. + * The default value (1, 0) moves the riding Body horizontally in equal proportion to this Body and vertically not at all. */ friction: Phaser.Math.Vector2; @@ -60424,7 +60107,7 @@ declare namespace Phaser { overlapR: number; /** - * Whether this Body is overlapped with another and both are not moving. + * Whether this Body is overlapped with another and both are not moving, on at least one axis. */ embedded: boolean; @@ -60440,17 +60123,19 @@ declare namespace Phaser { checkCollision: Phaser.Types.Physics.Arcade.ArcadeBodyCollision; /** - * Whether this Body is colliding with another and in which direction. + * Whether this Body is colliding with a Body or Static Body and in which direction. + * In a collision where both bodies have zero velocity, `embedded` will be set instead. */ touching: Phaser.Types.Physics.Arcade.ArcadeBodyCollision; /** - * Whether this Body was colliding with another during the last step, and in which direction. + * This Body's `touching` value during the previous step. */ wasTouching: Phaser.Types.Physics.Arcade.ArcadeBodyCollision; /** - * Whether this Body is colliding with a tile or the world boundary. + * Whether this Body is colliding with a Static Body, a tile, or the world boundary. + * In a collision with a Static Body, if this Body has zero velocity then `embedded` will be set instead. */ blocked: Phaser.Types.Physics.Arcade.ArcadeBodyCollision; @@ -60599,15 +60284,47 @@ declare namespace Phaser { /** * The change in this Body's horizontal position from the previous step. * This value is set during the Body's update phase. + * + * As a Body can update multiple times per step this may not hold the final + * delta value for the Body. In this case, please see the `deltaXFinal` method. */ deltaX(): number; /** * The change in this Body's vertical position from the previous step. * This value is set during the Body's update phase. + * + * As a Body can update multiple times per step this may not hold the final + * delta value for the Body. In this case, please see the `deltaYFinal` method. */ deltaY(): number; + /** + * The change in this Body's horizontal position from the previous game update. + * + * This value is set during the `postUpdate` phase and takes into account the + * `deltaMax` and final position of the Body. + * + * Because this value is not calculated until `postUpdate`, you must listen for it + * during a Scene `POST_UPDATE` or `RENDER` event, and not in `update`, as it will + * not be calculated by that point. If you _do_ use these values in `update` they + * will represent the delta from the _previous_ game frame. + */ + deltaXFinal(): number; + + /** + * The change in this Body's vertical position from the previous game update. + * + * This value is set during the `postUpdate` phase and takes into account the + * `deltaMax` and final position of the Body. + * + * Because this value is not calculated until `postUpdate`, you must listen for it + * during a Scene `POST_UPDATE` or `RENDER` event, and not in `update`, as it will + * not be calculated by that point. If you _do_ use these values in `update` they + * will represent the delta from the _previous_ game frame. + */ + deltaYFinal(): number; + /** * The change in this Body's rotation from the previous step, in degrees. */ @@ -60934,530 +60651,6 @@ declare namespace Phaser { } - namespace Components { - /** - * Provides methods used for setting the acceleration properties of an Arcade Physics Body. - */ - interface Acceleration { - /** - * Sets the body's horizontal and vertical acceleration. If the vertical acceleration value is not provided, the vertical acceleration is set to the same value as the horizontal acceleration. - * @param x The horizontal acceleration - * @param y The vertical acceleration Default x. - */ - setAcceleration(x: number, y?: number): this; - /** - * Sets the body's horizontal acceleration. - * @param value The horizontal acceleration - */ - setAccelerationX(value: number): this; - /** - * Sets the body's vertical acceleration. - * @param value The vertical acceleration - */ - setAccelerationY(value: number): this; - } - - /** - * Provides methods used for setting the angular acceleration properties of an Arcade Physics Body. - */ - interface Angular { - /** - * Sets the angular velocity of the body. - * - * In Arcade Physics, bodies cannot rotate. They are always axis-aligned. - * However, they can have angular motion, which is passed on to the Game Object bound to the body, - * causing them to visually rotate, even though the body remains axis-aligned. - * @param value The amount of angular velocity. - */ - setAngularVelocity(value: number): this; - /** - * Sets the angular acceleration of the body. - * - * In Arcade Physics, bodies cannot rotate. They are always axis-aligned. - * However, they can have angular motion, which is passed on to the Game Object bound to the body, - * causing them to visually rotate, even though the body remains axis-aligned. - * @param value The amount of angular acceleration. - */ - setAngularAcceleration(value: number): this; - /** - * Sets the angular drag of the body. Drag is applied to the current velocity, providing a form of deceleration. - * @param value The amount of drag. - */ - setAngularDrag(value: number): this; - } - - /** - * Provides methods used for setting the bounce properties of an Arcade Physics Body. - */ - interface Bounce { - /** - * Sets the bounce values of this body. - * - * Bounce is the amount of restitution, or elasticity, the body has when it collides with another object. - * A value of 1 means that it will retain its full velocity after the rebound. A value of 0 means it will not rebound at all. - * @param x The amount of horizontal bounce to apply on collision. A float, typically between 0 and 1. - * @param y The amount of vertical bounce to apply on collision. A float, typically between 0 and 1. Default x. - */ - setBounce(x: number, y?: number): this; - /** - * Sets the horizontal bounce value for this body. - * @param value The amount of horizontal bounce to apply on collision. A float, typically between 0 and 1. - */ - setBounceX(value: number): this; - /** - * Sets the vertical bounce value for this body. - * @param value The amount of vertical bounce to apply on collision. A float, typically between 0 and 1. - */ - setBounceY(value: number): this; - /** - * Sets whether this Body collides with the world boundary. - * - * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Vec2 first. - * @param value `true` if this body should collide with the world bounds, otherwise `false`. Default true. - * @param bounceX If given this will be replace the `worldBounce.x` value. - * @param bounceY If given this will be replace the `worldBounce.y` value. - */ - setCollideWorldBounds(value?: boolean, bounceX?: number, bounceY?: number): this; - } - - /** - * Provides methods used for setting the debug properties of an Arcade Physics Body. - */ - interface Debug { - /** - * Sets the debug values of this body. - * - * Bodies will only draw their debug if debug has been enabled for Arcade Physics as a whole. - * Note that there is a performance cost in drawing debug displays. It should never be used in production. - * @param showBody Set to `true` to have this body render its outline to the debug display. - * @param showVelocity Set to `true` to have this body render a velocity marker to the debug display. - * @param bodyColor The color of the body outline when rendered to the debug display. - */ - setDebug(showBody: boolean, showVelocity: boolean, bodyColor: number): this; - /** - * Sets the color of the body outline when it renders to the debug display. - * @param value The color of the body outline when rendered to the debug display. - */ - setDebugBodyColor(value: number): this; - /** - * Set to `true` to have this body render its outline to the debug display. - */ - debugShowBody: boolean; - /** - * Set to `true` to have this body render a velocity marker to the debug display. - */ - debugShowVelocity: boolean; - /** - * The color of the body outline when it renders to the debug display. - */ - debugBodyColor: number; - } - - /** - * Provides methods used for setting the drag properties of an Arcade Physics Body. - */ - interface Drag { - /** - * Sets the body's horizontal and vertical drag. If the vertical drag value is not provided, the vertical drag is set to the same value as the horizontal drag. - * - * Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time. - * It is the absolute loss of velocity due to movement, in pixels per second squared. - * The x and y components are applied separately. - * - * When `useDamping` is true, this is 1 minus the damping factor. - * A value of 1 means the Body loses no velocity. - * A value of 0.95 means the Body loses 5% of its velocity per step. - * A value of 0.5 means the Body loses 50% of its velocity per step. - * - * Drag is applied only when `acceleration` is zero. - * @param x The amount of horizontal drag to apply. - * @param y The amount of vertical drag to apply. Default x. - */ - setDrag(x: number, y?: number): this; - /** - * Sets the body's horizontal drag. - * - * Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time. - * It is the absolute loss of velocity due to movement, in pixels per second squared. - * The x and y components are applied separately. - * - * When `useDamping` is true, this is 1 minus the damping factor. - * A value of 1 means the Body loses no velocity. - * A value of 0.95 means the Body loses 5% of its velocity per step. - * A value of 0.5 means the Body loses 50% of its velocity per step. - * - * Drag is applied only when `acceleration` is zero. - * @param value The amount of horizontal drag to apply. - */ - setDragX(value: number): this; - /** - * Sets the body's vertical drag. - * - * Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time. - * It is the absolute loss of velocity due to movement, in pixels per second squared. - * The x and y components are applied separately. - * - * When `useDamping` is true, this is 1 minus the damping factor. - * A value of 1 means the Body loses no velocity. - * A value of 0.95 means the Body loses 5% of its velocity per step. - * A value of 0.5 means the Body loses 50% of its velocity per step. - * - * Drag is applied only when `acceleration` is zero. - * @param value The amount of vertical drag to apply. - */ - setDragY(value: number): this; - /** - * If this Body is using `drag` for deceleration this function controls how the drag is applied. - * If set to `true` drag will use a damping effect rather than a linear approach. If you are - * creating a game where the Body moves freely at any angle (i.e. like the way the ship moves in - * the game Asteroids) then you will get a far smoother and more visually correct deceleration - * by using damping, avoiding the axis-drift that is prone with linear deceleration. - * - * If you enable this property then you should use far smaller `drag` values than with linear, as - * they are used as a multiplier on the velocity. Values such as 0.95 will give a nice slow - * deceleration, where-as smaller values, such as 0.5 will stop an object almost immediately. - * @param value `true` to use damping for deceleration, or `false` to use linear deceleration. - */ - setDamping(value: boolean): this; - } - - /** - * Provides methods used for setting the enable properties of an Arcade Physics Body. - */ - interface Enable { - /** - * Enables this Game Object's Body. - * @param reset Also reset the Body and place it at (x, y). - * @param x The horizontal position to place the Game Object and Body. - * @param y The horizontal position to place the Game Object and Body. - * @param enableGameObject Also activate this Game Object. - * @param showGameObject Also show this Game Object. - */ - enableBody(reset: boolean, x: number, y: number, enableGameObject: boolean, showGameObject: boolean): this; - /** - * Stops and disables this Game Object's Body. - * @param disableGameObject Also deactivate this Game Object. Default false. - * @param hideGameObject Also hide this Game Object. Default false. - */ - disableBody(disableGameObject?: boolean, hideGameObject?: boolean): this; - /** - * Syncs the Body's position and size with its parent Game Object. - * You don't need to call this for Dynamic Bodies, as it happens automatically. - * But for Static bodies it's a useful way of modifying the position of a Static Body - * in the Physics World, based on its Game Object. - */ - refreshBody(): this; - } - - /** - * Sets the friction (e.g. the amount of velocity reduced over time) of the physics body when moving horizontally in the X axis. The higher than friction, the faster the body will slow down once force stops being applied to it. - */ - interface Friction { - /** - * Sets the friction (e.g. the amount of velocity reduced over time) of the physics body when moving. - * The higher than friction, the faster the body will slow down once force stops being applied to it. - * @param x The amount of horizontal friction to apply. - * @param y The amount of vertical friction to apply. Default x. - */ - setFriction(x: number, y?: number): this; - /** - * Sets the friction (e.g. the amount of velocity reduced over time) of the physics body when moving horizontally in the X axis. - * The higher than friction, the faster the body will slow down once force stops being applied to it. - * @param x The amount of friction to apply. - */ - setFrictionX(x: number): this; - /** - * Sets the friction (e.g. the amount of velocity reduced over time) of the physics body when moving vertically in the Y axis. - * The higher than friction, the faster the body will slow down once force stops being applied to it. - * @param x The amount of friction to apply. - */ - setFrictionY(x: number): this; - } - - /** - * Provides methods for setting the gravity properties of an Arcade Physics Game Object. - * Should be applied as a mixin and not used directly. - */ - interface Gravity { - /** - * Set the X and Y values of the gravitational pull to act upon this Arcade Physics Game Object. Values can be positive or negative. Larger values result in a stronger effect. - * - * If only one value is provided, this value will be used for both the X and Y axis. - * @param x The gravitational force to be applied to the X-axis. - * @param y The gravitational force to be applied to the Y-axis. If this is not specified, the X value will be used. Default x. - */ - setGravity(x: number, y?: number): this; - /** - * Set the gravitational force to be applied to the X axis. Value can be positive or negative. Larger values result in a stronger effect. - * @param x The gravitational force to be applied to the X-axis. - */ - setGravityX(x: number): this; - /** - * Set the gravitational force to be applied to the Y axis. Value can be positive or negative. Larger values result in a stronger effect. - * @param y The gravitational force to be applied to the Y-axis. - */ - setGravityY(y: number): this; - } - - /** - * Provides methods used for setting the immovable properties of an Arcade Physics Body. - */ - interface Immovable { - /** - * Sets Whether this Body can be moved by collisions with another Body. - * @param value Sets if this body can be moved by collisions with another Body. Default true. - */ - setImmovable(value?: boolean): this; - } - - /** - * Provides methods used for setting the mass properties of an Arcade Physics Body. - */ - interface Mass { - /** - * Sets the mass of the physics body - * @param value New value for the mass of the body. - */ - setMass(value: number): this; - } - - /** - * This method will search the given circular area and return an array of all physics bodies that - * overlap with it. It can return either Dynamic, Static bodies or a mixture of both. - * - * A body only has to intersect with the search area to be considered, it doesn't have to be fully - * contained within it. - * - * If Arcade Physics is set to use the RTree (which it is by default) then the search is rather fast, - * otherwise the search is O(N) for Dynamic Bodies. - */ - interface OverlapCirc { - } - - /** - * This method will search the given rectangular area and return an array of all physics bodies that - * overlap with it. It can return either Dynamic, Static bodies or a mixture of both. - * - * A body only has to intersect with the search area to be considered, it doesn't have to be fully - * contained within it. - * - * If Arcade Physics is set to use the RTree (which it is by default) then the search for is extremely fast, - * otherwise the search is O(N) for Dynamic Bodies. - */ - interface OverlapRect { - } - - /** - * Provides methods for setting the size of an Arcade Physics Game Object. - * Should be applied as a mixin and not used directly. - */ - interface Size { - /** - * Sets the body offset. This allows you to adjust the difference between the center of the body - * and the x and y coordinates of the parent Game Object. - * @param x The amount to offset the body from the parent Game Object along the x-axis. - * @param y The amount to offset the body from the parent Game Object along the y-axis. Defaults to the value given for the x-axis. Default x. - */ - setOffset(x: number, y?: number): this; - /** - * Sets the size of this physics body. Setting the size does not adjust the dimensions - * of the parent Game Object. - * @param width The new width of the physics body, in pixels. - * @param height The new height of the physics body, in pixels. - * @param center Should the body be re-positioned so its center aligns with the parent Game Object? Default true. - */ - setSize(width: number, height: number, center?: boolean): this; - /** - * Sets this physics body to use a circle for collision instead of a rectangle. - * @param radius The radius of the physics body, in pixels. - * @param offsetX The amount to offset the body from the parent Game Object along the x-axis. - * @param offsetY The amount to offset the body from the parent Game Object along the y-axis. - */ - setCircle(radius: number, offsetX?: number, offsetY?: number): this; - } - - /** - * Provides methods for modifying the velocity of an Arcade Physics body. - * - * Should be applied as a mixin and not used directly. - */ - interface Velocity { - /** - * Sets the velocity of the Body. - * @param x The horizontal velocity of the body. Positive values move the body to the right, while negative values move it to the left. - * @param y The vertical velocity of the body. Positive values move the body down, while negative values move it up. Default x. - */ - setVelocity(x: number, y?: number): this; - /** - * Sets the horizontal component of the body's velocity. - * - * Positive values move the body to the right, while negative values move it to the left. - * @param x The new horizontal velocity. - */ - setVelocityX(x: number): this; - /** - * Sets the vertical component of the body's velocity. - * - * Positive values move the body down, while negative values move it up. - * @param y The new vertical velocity of the body. - */ - setVelocityY(y: number): this; - /** - * Sets the maximum velocity of the body. - * @param x The new maximum horizontal velocity. - * @param y The new maximum vertical velocity. Default x. - */ - setMaxVelocity(x: number, y?: number): this; - } - - } - - /** - * Dynamic Body. - */ - var DYNAMIC_BODY: number; - - /** - * Static Body. - */ - var STATIC_BODY: number; - - /** - * Arcade Physics Group containing Dynamic Bodies. - */ - var GROUP: number; - - /** - * A Tilemap Layer. - */ - var TILEMAPLAYER: number; - - /** - * Facing no direction (initial value). - */ - var FACING_NONE: number; - - /** - * Facing up. - */ - var FACING_UP: number; - - /** - * Facing down. - */ - var FACING_DOWN: number; - - /** - * Facing left. - */ - var FACING_LEFT: number; - - /** - * Facing right. - */ - var FACING_RIGHT: number; - - namespace Events { - /** - * The Arcade Physics World Collide Event. - * - * This event is dispatched by an Arcade Physics World instance if two bodies collide _and_ at least - * one of them has their [onCollide]{@link Phaser.Physics.Arcade.Body#onCollide} property set to `true`. - * - * It provides an alternative means to handling collide events rather than using the callback approach. - * - * Listen to it from a Scene using: `this.physics.world.on('collide', listener)`. - * - * Please note that 'collide' and 'overlap' are two different things in Arcade Physics. - */ - const COLLIDE: any; - - /** - * The Arcade Physics World Overlap Event. - * - * This event is dispatched by an Arcade Physics World instance if two bodies overlap _and_ at least - * one of them has their [onOverlap]{@link Phaser.Physics.Arcade.Body#onOverlap} property set to `true`. - * - * It provides an alternative means to handling overlap events rather than using the callback approach. - * - * Listen to it from a Scene using: `this.physics.world.on('overlap', listener)`. - * - * Please note that 'collide' and 'overlap' are two different things in Arcade Physics. - */ - const OVERLAP: any; - - /** - * The Arcade Physics World Pause Event. - * - * This event is dispatched by an Arcade Physics World instance when it is paused. - * - * Listen to it from a Scene using: `this.physics.world.on('pause', listener)`. - */ - const PAUSE: any; - - /** - * The Arcade Physics World Resume Event. - * - * This event is dispatched by an Arcade Physics World instance when it resumes from a paused state. - * - * Listen to it from a Scene using: `this.physics.world.on('resume', listener)`. - */ - const RESUME: any; - - /** - * The Arcade Physics Tile Collide Event. - * - * This event is dispatched by an Arcade Physics World instance if a body collides with a Tile _and_ - * has its [onCollide]{@link Phaser.Physics.Arcade.Body#onCollide} property set to `true`. - * - * It provides an alternative means to handling collide events rather than using the callback approach. - * - * Listen to it from a Scene using: `this.physics.world.on('tilecollide', listener)`. - * - * Please note that 'collide' and 'overlap' are two different things in Arcade Physics. - */ - const TILE_COLLIDE: any; - - /** - * The Arcade Physics Tile Overlap Event. - * - * This event is dispatched by an Arcade Physics World instance if a body overlaps with a Tile _and_ - * has its [onOverlap]{@link Phaser.Physics.Arcade.Body#onOverlap} property set to `true`. - * - * It provides an alternative means to handling overlap events rather than using the callback approach. - * - * Listen to it from a Scene using: `this.physics.world.on('tileoverlap', listener)`. - * - * Please note that 'collide' and 'overlap' are two different things in Arcade Physics. - */ - const TILE_OVERLAP: any; - - /** - * The Arcade Physics World Bounds Event. - * - * This event is dispatched by an Arcade Physics World instance if a body makes contact with the world bounds _and_ - * it has its [onWorldBounds]{@link Phaser.Physics.Arcade.Body#onWorldBounds} property set to `true`. - * - * It provides an alternative means to handling collide events rather than using the callback approach. - * - * Listen to it from a Scene using: `this.physics.world.on('worldbounds', listener)`. - */ - const WORLD_BOUNDS: any; - - /** - * The Arcade Physics World Step Event. - * - * This event is dispatched by an Arcade Physics World instance whenever a physics step is run. - * It is emitted _after_ the bodies and colliders have been updated. - * - * In high framerate settings this can be multiple times per game frame. - * - * Listen to it from a Scene using: `this.physics.world.on('worldstep', listener)`. - */ - const WORLD_STEP: any; - - } - /** * The Arcade Physics Factory allows you to easily create Arcade Physics enabled Game Objects. * Objects that are created by this Factory are automatically added to the physics world. @@ -61910,8 +61103,7 @@ declare namespace Phaser { setGameObject(gameObject: Phaser.GameObjects.GameObject, update?: boolean): Phaser.Physics.Arcade.StaticBody; /** - * Updates this Static Body so that its position and dimensions are updated - * based on the current Game Object it is bound to. + * Syncs the Body's position and size with its parent Game Object. */ updateFromGameObject(): Phaser.Physics.Arcade.StaticBody; @@ -61946,7 +61138,6 @@ declare namespace Phaser { /** * Resets this Body to the given coordinates. Also positions its parent Game Object to the same coordinates. - * Similar to `updateFromGameObject`, but doesn't modify the Body's dimensions. * @param x The x coordinate to reset the body to. If not given will use the parent Game Object's coordinate. * @param y The y coordinate to reset the body to. If not given will use the parent Game Object's coordinate. */ @@ -62113,73 +61304,6 @@ declare namespace Phaser { } - namespace Tilemap { - /** - * A function to process the collision callbacks between a single tile and an Arcade Physics enabled Game Object. - * @param tile The Tile to process. - * @param sprite The Game Object to process with the Tile. - */ - function ProcessTileCallbacks(tile: Phaser.Tilemaps.Tile, sprite: Phaser.GameObjects.Sprite): 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. - */ - function ProcessTileSeparationX(body: Phaser.Physics.Arcade.Body, x: number): void; - - /** - * 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. - */ - function ProcessTileSeparationY(body: Phaser.Physics.Arcade.Body, y: number): void; - - /** - * The core separation function to separate a physics body and a tile. - * @param i The index of the tile within the map data. - * @param body The Body object to separate. - * @param tile The tile to collide against. - * @param tileWorldRect A rectangle-like object defining the dimensions of the tile. - * @param tilemapLayer The tilemapLayer to collide against. - * @param tileBias The tile bias value. Populated by the `World.TILE_BIAS` constant. - * @param isLayer Is this check coming from a TilemapLayer or an array of tiles? - */ - function SeparateTile(i: number, body: Phaser.Physics.Arcade.Body, tile: Phaser.Tilemaps.Tile, tileWorldRect: Phaser.Geom.Rectangle, tilemapLayer: Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer, tileBias: number, isLayer: boolean): boolean; - - /** - * Check the body against the given tile on the X axis. - * Used internally by the SeparateTile function. - * @param body The Body object to separate. - * @param tile The tile to check. - * @param tileLeft The left position of the tile within the tile world. - * @param tileRight The right position of the tile within the tile world. - * @param tileBias The tile bias value. Populated by the `World.TILE_BIAS` constant. - * @param isLayer Is this check coming from a TilemapLayer or an array of tiles? - */ - function TileCheckX(body: Phaser.Physics.Arcade.Body, tile: Phaser.Tilemaps.Tile, tileLeft: number, tileRight: number, tileBias: number, isLayer: boolean): number; - - /** - * Check the body against the given tile on the Y axis. - * Used internally by the SeparateTile function. - * @param body The Body object to separate. - * @param tile The tile to check. - * @param tileTop The top position of the tile within the tile world. - * @param tileBottom The bottom position of the tile within the tile world. - * @param tileBias The tile bias value. Populated by the `World.TILE_BIAS` constant. - * @param isLayer Is this check coming from a TilemapLayer or an array of tiles? - */ - function TileCheckY(body: Phaser.Physics.Arcade.Body, tile: Phaser.Tilemaps.Tile, tileTop: number, tileBottom: number, tileBias: number, isLayer: boolean): number; - - /** - * Checks for intersection between the given tile rectangle-like object and an Arcade Physics body. - * @param tileWorldRect A rectangle object that defines the tile placement in the world. - * @param body The body to check for intersection against. - */ - function TileIntersectsBody(tileWorldRect: Object, body: Phaser.Physics.Arcade.Body): boolean; - - } - /** * The Arcade Physics World. * @@ -62754,6 +61878,597 @@ declare namespace Phaser { } + namespace Components { + /** + * Provides methods used for setting the acceleration properties of an Arcade Physics Body. + */ + interface Acceleration { + /** + * Sets the body's horizontal and vertical acceleration. If the vertical acceleration value is not provided, the vertical acceleration is set to the same value as the horizontal acceleration. + * @param x The horizontal acceleration + * @param y The vertical acceleration Default x. + */ + setAcceleration(x: number, y?: number): this; + /** + * Sets the body's horizontal acceleration. + * @param value The horizontal acceleration + */ + setAccelerationX(value: number): this; + /** + * Sets the body's vertical acceleration. + * @param value The vertical acceleration + */ + setAccelerationY(value: number): this; + } + + /** + * Provides methods used for setting the angular acceleration properties of an Arcade Physics Body. + */ + interface Angular { + /** + * Sets the angular velocity of the body. + * + * In Arcade Physics, bodies cannot rotate. They are always axis-aligned. + * However, they can have angular motion, which is passed on to the Game Object bound to the body, + * causing them to visually rotate, even though the body remains axis-aligned. + * @param value The amount of angular velocity. + */ + setAngularVelocity(value: number): this; + /** + * Sets the angular acceleration of the body. + * + * In Arcade Physics, bodies cannot rotate. They are always axis-aligned. + * However, they can have angular motion, which is passed on to the Game Object bound to the body, + * causing them to visually rotate, even though the body remains axis-aligned. + * @param value The amount of angular acceleration. + */ + setAngularAcceleration(value: number): this; + /** + * Sets the angular drag of the body. Drag is applied to the current velocity, providing a form of deceleration. + * @param value The amount of drag. + */ + setAngularDrag(value: number): this; + } + + /** + * Provides methods used for setting the bounce properties of an Arcade Physics Body. + */ + interface Bounce { + /** + * Sets the bounce values of this body. + * + * Bounce is the amount of restitution, or elasticity, the body has when it collides with another object. + * A value of 1 means that it will retain its full velocity after the rebound. A value of 0 means it will not rebound at all. + * @param x The amount of horizontal bounce to apply on collision. A float, typically between 0 and 1. + * @param y The amount of vertical bounce to apply on collision. A float, typically between 0 and 1. Default x. + */ + setBounce(x: number, y?: number): this; + /** + * Sets the horizontal bounce value for this body. + * @param value The amount of horizontal bounce to apply on collision. A float, typically between 0 and 1. + */ + setBounceX(value: number): this; + /** + * Sets the vertical bounce value for this body. + * @param value The amount of vertical bounce to apply on collision. A float, typically between 0 and 1. + */ + setBounceY(value: number): this; + /** + * Sets whether this Body collides with the world boundary. + * + * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Vec2 first. + * @param value `true` if this body should collide with the world bounds, otherwise `false`. Default true. + * @param bounceX If given this will be replace the `worldBounce.x` value. + * @param bounceY If given this will be replace the `worldBounce.y` value. + */ + setCollideWorldBounds(value?: boolean, bounceX?: number, bounceY?: number): this; + } + + /** + * Provides methods used for setting the debug properties of an Arcade Physics Body. + */ + interface Debug { + /** + * Sets the debug values of this body. + * + * Bodies will only draw their debug if debug has been enabled for Arcade Physics as a whole. + * Note that there is a performance cost in drawing debug displays. It should never be used in production. + * @param showBody Set to `true` to have this body render its outline to the debug display. + * @param showVelocity Set to `true` to have this body render a velocity marker to the debug display. + * @param bodyColor The color of the body outline when rendered to the debug display. + */ + setDebug(showBody: boolean, showVelocity: boolean, bodyColor: number): this; + /** + * Sets the color of the body outline when it renders to the debug display. + * @param value The color of the body outline when rendered to the debug display. + */ + setDebugBodyColor(value: number): this; + /** + * Set to `true` to have this body render its outline to the debug display. + */ + debugShowBody: boolean; + /** + * Set to `true` to have this body render a velocity marker to the debug display. + */ + debugShowVelocity: boolean; + /** + * The color of the body outline when it renders to the debug display. + */ + debugBodyColor: number; + } + + /** + * Provides methods used for setting the drag properties of an Arcade Physics Body. + */ + interface Drag { + /** + * Sets the body's horizontal and vertical drag. If the vertical drag value is not provided, the vertical drag is set to the same value as the horizontal drag. + * + * Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time. + * It is the absolute loss of velocity due to movement, in pixels per second squared. + * The x and y components are applied separately. + * + * When `useDamping` is true, this is 1 minus the damping factor. + * A value of 1 means the Body loses no velocity. + * A value of 0.95 means the Body loses 5% of its velocity per step. + * A value of 0.5 means the Body loses 50% of its velocity per step. + * + * Drag is applied only when `acceleration` is zero. + * @param x The amount of horizontal drag to apply. + * @param y The amount of vertical drag to apply. Default x. + */ + setDrag(x: number, y?: number): this; + /** + * Sets the body's horizontal drag. + * + * Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time. + * It is the absolute loss of velocity due to movement, in pixels per second squared. + * The x and y components are applied separately. + * + * When `useDamping` is true, this is 1 minus the damping factor. + * A value of 1 means the Body loses no velocity. + * A value of 0.95 means the Body loses 5% of its velocity per step. + * A value of 0.5 means the Body loses 50% of its velocity per step. + * + * Drag is applied only when `acceleration` is zero. + * @param value The amount of horizontal drag to apply. + */ + setDragX(value: number): this; + /** + * Sets the body's vertical drag. + * + * Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time. + * It is the absolute loss of velocity due to movement, in pixels per second squared. + * The x and y components are applied separately. + * + * When `useDamping` is true, this is 1 minus the damping factor. + * A value of 1 means the Body loses no velocity. + * A value of 0.95 means the Body loses 5% of its velocity per step. + * A value of 0.5 means the Body loses 50% of its velocity per step. + * + * Drag is applied only when `acceleration` is zero. + * @param value The amount of vertical drag to apply. + */ + setDragY(value: number): this; + /** + * If this Body is using `drag` for deceleration this function controls how the drag is applied. + * If set to `true` drag will use a damping effect rather than a linear approach. If you are + * creating a game where the Body moves freely at any angle (i.e. like the way the ship moves in + * the game Asteroids) then you will get a far smoother and more visually correct deceleration + * by using damping, avoiding the axis-drift that is prone with linear deceleration. + * + * If you enable this property then you should use far smaller `drag` values than with linear, as + * they are used as a multiplier on the velocity. Values such as 0.95 will give a nice slow + * deceleration, where-as smaller values, such as 0.5 will stop an object almost immediately. + * @param value `true` to use damping for deceleration, or `false` to use linear deceleration. + */ + setDamping(value: boolean): this; + } + + /** + * Provides methods used for setting the enable properties of an Arcade Physics Body. + */ + interface Enable { + /** + * Enables this Game Object's Body. + * @param reset Also reset the Body and place it at (x, y). + * @param x The horizontal position to place the Game Object and Body. + * @param y The horizontal position to place the Game Object and Body. + * @param enableGameObject Also activate this Game Object. + * @param showGameObject Also show this Game Object. + */ + enableBody(reset: boolean, x: number, y: number, enableGameObject: boolean, showGameObject: boolean): this; + /** + * Stops and disables this Game Object's Body. + * @param disableGameObject Also deactivate this Game Object. Default false. + * @param hideGameObject Also hide this Game Object. Default false. + */ + disableBody(disableGameObject?: boolean, hideGameObject?: boolean): this; + /** + * Syncs the Body's position and size with its parent Game Object. + * You don't need to call this for Dynamic Bodies, as it happens automatically. + * But for Static bodies it's a useful way of modifying the position of a Static Body + * in the Physics World, based on its Game Object. + */ + refreshBody(): this; + } + + /** + * Sets the friction (e.g. the amount of velocity reduced over time) of the physics body when moving horizontally in the X axis. The higher than friction, the faster the body will slow down once force stops being applied to it. + */ + interface Friction { + /** + * Sets the friction (e.g. the amount of velocity reduced over time) of the physics body when moving. + * The higher than friction, the faster the body will slow down once force stops being applied to it. + * @param x The amount of horizontal friction to apply. + * @param y The amount of vertical friction to apply. Default x. + */ + setFriction(x: number, y?: number): this; + /** + * Sets the friction (e.g. the amount of velocity reduced over time) of the physics body when moving horizontally in the X axis. + * The higher than friction, the faster the body will slow down once force stops being applied to it. + * @param x The amount of friction to apply. + */ + setFrictionX(x: number): this; + /** + * Sets the friction (e.g. the amount of velocity reduced over time) of the physics body when moving vertically in the Y axis. + * The higher than friction, the faster the body will slow down once force stops being applied to it. + * @param x The amount of friction to apply. + */ + setFrictionY(x: number): this; + } + + /** + * Provides methods for setting the gravity properties of an Arcade Physics Game Object. + * Should be applied as a mixin and not used directly. + */ + interface Gravity { + /** + * Set the X and Y values of the gravitational pull to act upon this Arcade Physics Game Object. Values can be positive or negative. Larger values result in a stronger effect. + * + * If only one value is provided, this value will be used for both the X and Y axis. + * @param x The gravitational force to be applied to the X-axis. + * @param y The gravitational force to be applied to the Y-axis. If this is not specified, the X value will be used. Default x. + */ + setGravity(x: number, y?: number): this; + /** + * Set the gravitational force to be applied to the X axis. Value can be positive or negative. Larger values result in a stronger effect. + * @param x The gravitational force to be applied to the X-axis. + */ + setGravityX(x: number): this; + /** + * Set the gravitational force to be applied to the Y axis. Value can be positive or negative. Larger values result in a stronger effect. + * @param y The gravitational force to be applied to the Y-axis. + */ + setGravityY(y: number): this; + } + + /** + * Provides methods used for setting the immovable properties of an Arcade Physics Body. + */ + interface Immovable { + /** + * Sets Whether this Body can be moved by collisions with another Body. + * @param value Sets if this body can be moved by collisions with another Body. Default true. + */ + setImmovable(value?: boolean): this; + } + + /** + * Provides methods used for setting the mass properties of an Arcade Physics Body. + */ + interface Mass { + /** + * Sets the mass of the physics body + * @param value New value for the mass of the body. + */ + setMass(value: number): this; + } + + /** + * This method will search the given circular area and return an array of all physics bodies that + * overlap with it. It can return either Dynamic, Static bodies or a mixture of both. + * + * A body only has to intersect with the search area to be considered, it doesn't have to be fully + * contained within it. + * + * If Arcade Physics is set to use the RTree (which it is by default) then the search is rather fast, + * otherwise the search is O(N) for Dynamic Bodies. + */ + interface OverlapCirc { + } + + /** + * This method will search the given rectangular area and return an array of all physics bodies that + * overlap with it. It can return either Dynamic, Static bodies or a mixture of both. + * + * A body only has to intersect with the search area to be considered, it doesn't have to be fully + * contained within it. + * + * If Arcade Physics is set to use the RTree (which it is by default) then the search for is extremely fast, + * otherwise the search is O(N) for Dynamic Bodies. + */ + interface OverlapRect { + } + + /** + * Provides methods for setting the size of an Arcade Physics Game Object. + * Should be applied as a mixin and not used directly. + */ + interface Size { + /** + * Sets the body offset. This allows you to adjust the difference between the center of the body + * and the x and y coordinates of the parent Game Object. + * @param x The amount to offset the body from the parent Game Object along the x-axis. + * @param y The amount to offset the body from the parent Game Object along the y-axis. Defaults to the value given for the x-axis. Default x. + */ + setOffset(x: number, y?: number): this; + /** + * Sets the size of this physics body. Setting the size does not adjust the dimensions + * of the parent Game Object. + * @param width The new width of the physics body, in pixels. + * @param height The new height of the physics body, in pixels. + * @param center Should the body be re-positioned so its center aligns with the parent Game Object? Default true. + */ + setSize(width: number, height: number, center?: boolean): this; + /** + * Sets this physics body to use a circle for collision instead of a rectangle. + * @param radius The radius of the physics body, in pixels. + * @param offsetX The amount to offset the body from the parent Game Object along the x-axis. + * @param offsetY The amount to offset the body from the parent Game Object along the y-axis. + */ + setCircle(radius: number, offsetX?: number, offsetY?: number): this; + } + + /** + * Provides methods for modifying the velocity of an Arcade Physics body. + * + * Should be applied as a mixin and not used directly. + */ + interface Velocity { + /** + * Sets the velocity of the Body. + * @param x The horizontal velocity of the body. Positive values move the body to the right, while negative values move it to the left. + * @param y The vertical velocity of the body. Positive values move the body down, while negative values move it up. Default x. + */ + setVelocity(x: number, y?: number): this; + /** + * Sets the horizontal component of the body's velocity. + * + * Positive values move the body to the right, while negative values move it to the left. + * @param x The new horizontal velocity. + */ + setVelocityX(x: number): this; + /** + * Sets the vertical component of the body's velocity. + * + * Positive values move the body down, while negative values move it up. + * @param y The new vertical velocity of the body. + */ + setVelocityY(y: number): this; + /** + * Sets the maximum velocity of the body. + * @param x The new maximum horizontal velocity. + * @param y The new maximum vertical velocity. Default x. + */ + setMaxVelocity(x: number, y?: number): this; + } + + } + + /** + * Dynamic Body. + */ + var DYNAMIC_BODY: number; + + /** + * Static Body. + */ + var STATIC_BODY: number; + + /** + * Arcade Physics Group containing Dynamic Bodies. + */ + var GROUP: number; + + /** + * A Tilemap Layer. + */ + var TILEMAPLAYER: number; + + /** + * Facing no direction (initial value). + */ + var FACING_NONE: number; + + /** + * Facing up. + */ + var FACING_UP: number; + + /** + * Facing down. + */ + var FACING_DOWN: number; + + /** + * Facing left. + */ + var FACING_LEFT: number; + + /** + * Facing right. + */ + var FACING_RIGHT: number; + + namespace Events { + /** + * The Arcade Physics World Collide Event. + * + * This event is dispatched by an Arcade Physics World instance if two bodies collide _and_ at least + * one of them has their [onCollide]{@link Phaser.Physics.Arcade.Body#onCollide} property set to `true`. + * + * It provides an alternative means to handling collide events rather than using the callback approach. + * + * Listen to it from a Scene using: `this.physics.world.on('collide', listener)`. + * + * Please note that 'collide' and 'overlap' are two different things in Arcade Physics. + */ + const COLLIDE: any; + + /** + * The Arcade Physics World Overlap Event. + * + * This event is dispatched by an Arcade Physics World instance if two bodies overlap _and_ at least + * one of them has their [onOverlap]{@link Phaser.Physics.Arcade.Body#onOverlap} property set to `true`. + * + * It provides an alternative means to handling overlap events rather than using the callback approach. + * + * Listen to it from a Scene using: `this.physics.world.on('overlap', listener)`. + * + * Please note that 'collide' and 'overlap' are two different things in Arcade Physics. + */ + const OVERLAP: any; + + /** + * The Arcade Physics World Pause Event. + * + * This event is dispatched by an Arcade Physics World instance when it is paused. + * + * Listen to it from a Scene using: `this.physics.world.on('pause', listener)`. + */ + const PAUSE: any; + + /** + * The Arcade Physics World Resume Event. + * + * This event is dispatched by an Arcade Physics World instance when it resumes from a paused state. + * + * Listen to it from a Scene using: `this.physics.world.on('resume', listener)`. + */ + const RESUME: any; + + /** + * The Arcade Physics Tile Collide Event. + * + * This event is dispatched by an Arcade Physics World instance if a body collides with a Tile _and_ + * has its [onCollide]{@link Phaser.Physics.Arcade.Body#onCollide} property set to `true`. + * + * It provides an alternative means to handling collide events rather than using the callback approach. + * + * Listen to it from a Scene using: `this.physics.world.on('tilecollide', listener)`. + * + * Please note that 'collide' and 'overlap' are two different things in Arcade Physics. + */ + const TILE_COLLIDE: any; + + /** + * The Arcade Physics Tile Overlap Event. + * + * This event is dispatched by an Arcade Physics World instance if a body overlaps with a Tile _and_ + * has its [onOverlap]{@link Phaser.Physics.Arcade.Body#onOverlap} property set to `true`. + * + * It provides an alternative means to handling overlap events rather than using the callback approach. + * + * Listen to it from a Scene using: `this.physics.world.on('tileoverlap', listener)`. + * + * Please note that 'collide' and 'overlap' are two different things in Arcade Physics. + */ + const TILE_OVERLAP: any; + + /** + * The Arcade Physics World Bounds Event. + * + * This event is dispatched by an Arcade Physics World instance if a body makes contact with the world bounds _and_ + * it has its [onWorldBounds]{@link Phaser.Physics.Arcade.Body#onWorldBounds} property set to `true`. + * + * It provides an alternative means to handling collide events rather than using the callback approach. + * + * Listen to it from a Scene using: `this.physics.world.on('worldbounds', listener)`. + */ + const WORLD_BOUNDS: any; + + /** + * The Arcade Physics World Step Event. + * + * This event is dispatched by an Arcade Physics World instance whenever a physics step is run. + * It is emitted _after_ the bodies and colliders have been updated. + * + * In high framerate settings this can be multiple times per game frame. + * + * Listen to it from a Scene using: `this.physics.world.on('worldstep', listener)`. + */ + const WORLD_STEP: any; + + } + + namespace Tilemap { + /** + * A function to process the collision callbacks between a single tile and an Arcade Physics enabled Game Object. + * @param tile The Tile to process. + * @param sprite The Game Object to process with the Tile. + */ + function ProcessTileCallbacks(tile: Phaser.Tilemaps.Tile, sprite: Phaser.GameObjects.Sprite): 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. + */ + function ProcessTileSeparationX(body: Phaser.Physics.Arcade.Body, x: number): void; + + /** + * 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. + */ + function ProcessTileSeparationY(body: Phaser.Physics.Arcade.Body, y: number): void; + + /** + * The core separation function to separate a physics body and a tile. + * @param i The index of the tile within the map data. + * @param body The Body object to separate. + * @param tile The tile to collide against. + * @param tileWorldRect A rectangle-like object defining the dimensions of the tile. + * @param tilemapLayer The tilemapLayer to collide against. + * @param tileBias The tile bias value. Populated by the `World.TILE_BIAS` constant. + * @param isLayer Is this check coming from a TilemapLayer or an array of tiles? + */ + function SeparateTile(i: number, body: Phaser.Physics.Arcade.Body, tile: Phaser.Tilemaps.Tile, tileWorldRect: Phaser.Geom.Rectangle, tilemapLayer: Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer, tileBias: number, isLayer: boolean): boolean; + + /** + * Check the body against the given tile on the X axis. + * Used internally by the SeparateTile function. + * @param body The Body object to separate. + * @param tile The tile to check. + * @param tileLeft The left position of the tile within the tile world. + * @param tileRight The right position of the tile within the tile world. + * @param tileBias The tile bias value. Populated by the `World.TILE_BIAS` constant. + * @param isLayer Is this check coming from a TilemapLayer or an array of tiles? + */ + function TileCheckX(body: Phaser.Physics.Arcade.Body, tile: Phaser.Tilemaps.Tile, tileLeft: number, tileRight: number, tileBias: number, isLayer: boolean): number; + + /** + * Check the body against the given tile on the Y axis. + * Used internally by the SeparateTile function. + * @param body The Body object to separate. + * @param tile The tile to check. + * @param tileTop The top position of the tile within the tile world. + * @param tileBottom The bottom position of the tile within the tile world. + * @param tileBias The tile bias value. Populated by the `World.TILE_BIAS` constant. + * @param isLayer Is this check coming from a TilemapLayer or an array of tiles? + */ + function TileCheckY(body: Phaser.Physics.Arcade.Body, tile: Phaser.Tilemaps.Tile, tileTop: number, tileBottom: number, tileBias: number, isLayer: boolean): number; + + /** + * Checks for intersection between the given tile rectangle-like object and an Arcade Physics body. + * @param tileWorldRect A rectangle object that defines the tile placement in the world. + * @param body The body to check for intersection against. + */ + function TileIntersectsBody(tileWorldRect: Object, body: Phaser.Physics.Arcade.Body): boolean; + + } + } /** @@ -63127,325 +62842,6 @@ declare namespace Phaser { } - namespace Components { - /** - * The Impact Acceleration component. - * Should be applied as a mixin. - */ - interface Acceleration { - /** - * Sets the horizontal acceleration of this body. - * @param x The amount of acceleration to apply. - */ - setAccelerationX(x: number): this; - /** - * Sets the vertical acceleration of this body. - * @param y The amount of acceleration to apply. - */ - setAccelerationY(y: number): this; - /** - * Sets the horizontal and vertical acceleration of this body. - * @param x The amount of horizontal acceleration to apply. - * @param y The amount of vertical acceleration to apply. - */ - setAcceleration(x: number, y: number): this; - } - - /** - * The Impact Body Scale component. - * Should be applied as a mixin. - */ - interface BodyScale { - /** - * Sets the size of the physics body. - * @param width The width of the body in pixels. - * @param height The height of the body in pixels. Default width. - */ - setBodySize(width: number, height?: number): this; - /** - * Sets the scale of the physics body. - * @param scaleX The horizontal scale of the body. - * @param scaleY The vertical scale of the body. If not given, will use the horizontal scale value. - */ - setBodyScale(scaleX: number, scaleY?: number): this; - } - - /** - * The Impact Body Type component. - * Should be applied as a mixin. - */ - interface BodyType { - /** - * [description] - */ - getBodyType(): number; - /** - * [description] - */ - setTypeNone(): Phaser.GameObjects.GameObject; - /** - * [description] - */ - setTypeA(): Phaser.GameObjects.GameObject; - /** - * [description] - */ - setTypeB(): Phaser.GameObjects.GameObject; - } - - /** - * The Impact Bounce component. - * Should be applied as a mixin. - */ - interface Bounce { - /** - * Sets the impact physics bounce, or restitution, value. - * @param value A value between 0 (no rebound) and 1 (full rebound) - */ - setBounce(value: number): Phaser.GameObjects.GameObject; - /** - * Sets the minimum velocity the body is allowed to be moving to be considered for rebound. - * @param value The minimum allowed velocity. - */ - setMinBounceVelocity(value: number): Phaser.GameObjects.GameObject; - /** - * The bounce, or restitution, value of this body. - * A value between 0 (no rebound) and 1 (full rebound) - */ - bounce: number; - } - - /** - * The Impact Check Against component. - * Should be applied as a mixin. - */ - interface CheckAgainst { - /** - * [description] - */ - setAvsB(): Phaser.GameObjects.GameObject; - /** - * [description] - */ - setBvsA(): Phaser.GameObjects.GameObject; - /** - * [description] - */ - setCheckAgainstNone(): Phaser.GameObjects.GameObject; - /** - * [description] - */ - setCheckAgainstA(): Phaser.GameObjects.GameObject; - /** - * [description] - */ - setCheckAgainstB(): Phaser.GameObjects.GameObject; - /** - * [description] - */ - checkAgainst: number; - } - - /** - * The Impact Collides component. - * Should be applied as a mixin. - */ - interface Collides { - /** - * [description] - * @param callback [description] - * @param scope [description] - */ - setCollideCallback(callback: CollideCallback, scope: any): Phaser.GameObjects.GameObject; - /** - * [description] - */ - setCollidesNever(): Phaser.GameObjects.GameObject; - /** - * [description] - */ - setLiteCollision(): Phaser.GameObjects.GameObject; - /** - * [description] - */ - setPassiveCollision(): Phaser.GameObjects.GameObject; - /** - * [description] - */ - setActiveCollision(): Phaser.GameObjects.GameObject; - /** - * [description] - */ - setFixedCollision(): Phaser.GameObjects.GameObject; - /** - * [description] - */ - collides: number; - } - - /** - * The Impact Debug component. - * Should be applied as a mixin. - */ - interface Debug { - /** - * [description] - * @param showBody [description] - * @param showVelocity [description] - * @param bodyColor [description] - */ - setDebug(showBody: boolean, showVelocity: boolean, bodyColor: number): Phaser.GameObjects.GameObject; - /** - * [description] - * @param value [description] - */ - setDebugBodyColor(value: number): Phaser.GameObjects.GameObject; - /** - * [description] - */ - debugShowBody: boolean; - /** - * [description] - */ - debugShowVelocity: boolean; - /** - * [description] - */ - debugBodyColor: number; - } - - /** - * The Impact Friction component. - * Should be applied as a mixin. - */ - interface Friction { - /** - * [description] - * @param x [description] - */ - setFrictionX(x: number): Phaser.GameObjects.GameObject; - /** - * [description] - * @param y [description] - */ - setFrictionY(y: number): Phaser.GameObjects.GameObject; - /** - * [description] - * @param x [description] - * @param y [description] - */ - setFriction(x: number, y: number): Phaser.GameObjects.GameObject; - } - - /** - * The Impact Gravity component. - * Should be applied as a mixin. - */ - interface Gravity { - /** - * [description] - * @param value [description] - */ - setGravity(value: number): Phaser.GameObjects.GameObject; - /** - * [description] - */ - gravity: number; - } - - /** - * The Impact Offset component. - * Should be applied as a mixin. - */ - interface Offset { - /** - * [description] - * @param x [description] - * @param y [description] - * @param width [description] - * @param height [description] - */ - setOffset(x: number, y: number, width?: number, height?: number): Phaser.GameObjects.GameObject; - } - - /** - * The Impact Set Game Object component. - * Should be applied as a mixin. - */ - interface SetGameObject { - /** - * [description] - * @param gameObject [description] - * @param sync [description] Default true. - */ - setGameObject(gameObject: Phaser.GameObjects.GameObject, sync?: boolean): Phaser.GameObjects.GameObject; - /** - * [description] - */ - syncGameObject(): Phaser.GameObjects.GameObject; - } - - /** - * The Impact Velocity component. - * Should be applied as a mixin. - */ - interface Velocity { - /** - * Sets the horizontal velocity of the physics body. - * @param x The horizontal velocity value. - */ - setVelocityX(x: number): this; - /** - * Sets the vertical velocity of the physics body. - * @param y The vertical velocity value. - */ - setVelocityY(y: number): this; - /** - * Sets the horizontal and vertical velocities of the physics body. - * @param x The horizontal velocity value. - * @param y The vertical velocity value. If not given, defaults to the horizontal value. Default x. - */ - setVelocity(x: number, y?: number): this; - /** - * Sets the maximum velocity this body can travel at. - * @param x The maximum allowed horizontal velocity. - * @param y The maximum allowed vertical velocity. If not given, defaults to the horizontal value. Default x. - */ - setMaxVelocity(x: number, y?: number): this; - } - - } - - namespace Events { - /** - * The Impact Physics World Collide Event. - * - * This event is dispatched by an Impact Physics World instance if two bodies collide. - * - * Listen to it from a Scene using: `this.impact.world.on('collide', listener)`. - */ - const COLLIDE: any; - - /** - * The Impact Physics World Pause Event. - * - * This event is dispatched by an Impact Physics World instance when it is paused. - * - * Listen to it from a Scene using: `this.impact.world.on('pause', listener)`. - */ - const PAUSE: any; - - /** - * The Impact Physics World Resume Event. - * - * This event is dispatched by an Impact Physics World instance when it resumes from a paused state. - * - * Listen to it from a Scene using: `this.impact.world.on('resume', listener)`. - */ - const RESUME: any; - - } - /** * The Impact Physics Factory allows you to easily create Impact Physics enabled Game Objects. * Objects that are created by this Factory are automatically added to the physics world. @@ -64589,7 +63985,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -64694,6 +64092,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -65817,7 +65218,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -65922,6 +65325,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -66552,549 +65958,329 @@ declare namespace Phaser { } - } - - namespace Matter { namespace Components { /** - * A component to set restitution on objects. + * The Impact Acceleration component. + * Should be applied as a mixin. + */ + interface Acceleration { + /** + * Sets the horizontal acceleration of this body. + * @param x The amount of acceleration to apply. + */ + setAccelerationX(x: number): this; + /** + * Sets the vertical acceleration of this body. + * @param y The amount of acceleration to apply. + */ + setAccelerationY(y: number): this; + /** + * Sets the horizontal and vertical acceleration of this body. + * @param x The amount of horizontal acceleration to apply. + * @param y The amount of vertical acceleration to apply. + */ + setAcceleration(x: number, y: number): this; + } + + /** + * The Impact Body Scale component. + * Should be applied as a mixin. + */ + interface BodyScale { + /** + * Sets the size of the physics body. + * @param width The width of the body in pixels. + * @param height The height of the body in pixels. Default width. + */ + setBodySize(width: number, height?: number): this; + /** + * Sets the scale of the physics body. + * @param scaleX The horizontal scale of the body. + * @param scaleY The vertical scale of the body. If not given, will use the horizontal scale value. + */ + setBodyScale(scaleX: number, scaleY?: number): this; + } + + /** + * The Impact Body Type component. + * Should be applied as a mixin. + */ + interface BodyType { + /** + * [description] + */ + getBodyType(): number; + /** + * [description] + */ + setTypeNone(): Phaser.GameObjects.GameObject; + /** + * [description] + */ + setTypeA(): Phaser.GameObjects.GameObject; + /** + * [description] + */ + setTypeB(): Phaser.GameObjects.GameObject; + } + + /** + * The Impact Bounce component. + * Should be applied as a mixin. */ interface Bounce { /** - * Sets the restitution on the physics object. - * @param value A Number that defines the restitution (elasticity) of the body. The value is always positive and is in the range (0, 1). A value of 0 means collisions may be perfectly inelastic and no bouncing may occur. A value of 0.8 means the body may bounce back with approximately 80% of its kinetic energy. Note that collision response is based on pairs of bodies, and that restitution values are combined with the following formula: `Math.max(bodyA.restitution, bodyB.restitution)` + * Sets the impact physics bounce, or restitution, value. + * @param value A value between 0 (no rebound) and 1 (full rebound) */ setBounce(value: number): Phaser.GameObjects.GameObject; + /** + * Sets the minimum velocity the body is allowed to be moving to be considered for rebound. + * @param value The minimum allowed velocity. + */ + setMinBounceVelocity(value: number): Phaser.GameObjects.GameObject; + /** + * The bounce, or restitution, value of this body. + * A value between 0 (no rebound) and 1 (full rebound) + */ + bounce: number; } /** - * Contains methods for changing the collision filter of a Matter Body. Should be used as a mixin and not called directly. + * The Impact Check Against component. + * Should be applied as a mixin. */ - interface Collision { + interface CheckAgainst { /** - * Sets the collision category of this Game Object's Matter Body. This number must be a power of two between 2^0 (= 1) and 2^31. Two bodies with different collision groups (see {@link #setCollisionGroup}) will only collide if their collision categories are included in their collision masks (see {@link #setCollidesWith}). - * @param value Unique category bitfield. + * [description] */ - setCollisionCategory(value: number): Phaser.GameObjects.GameObject; + setAvsB(): Phaser.GameObjects.GameObject; /** - * Sets the collision group of this Game Object's Matter Body. If this is zero or two Matter Bodies have different values, they will collide according to the usual rules (see {@link #setCollisionCategory} and {@link #setCollisionGroup}). If two Matter Bodies have the same positive value, they will always collide; if they have the same negative value, they will never collide. - * @param value Unique group index. + * [description] */ - setCollisionGroup(value: number): Phaser.GameObjects.GameObject; + setBvsA(): Phaser.GameObjects.GameObject; /** - * Sets the collision mask for this Game Object's Matter Body. Two Matter Bodies with different collision groups will only collide if each one includes the other's category in its mask based on a bitwise AND, i.e. `(categoryA & maskB) !== 0` and `(categoryB & maskA) !== 0` are both true. - * @param categories A unique category bitfield, or an array of them. + * [description] */ - setCollidesWith(categories: number | number[]): Phaser.GameObjects.GameObject; + setCheckAgainstNone(): Phaser.GameObjects.GameObject; + /** + * [description] + */ + setCheckAgainstA(): Phaser.GameObjects.GameObject; + /** + * [description] + */ + setCheckAgainstB(): Phaser.GameObjects.GameObject; + /** + * [description] + */ + checkAgainst: number; } /** - * A component to apply force to Matter.js bodies. + * The Impact Collides component. + * Should be applied as a mixin. */ - interface Force { + interface Collides { /** - * Applies a force to a body. - * @param force A Vector that specifies the force to apply. + * [description] + * @param callback [description] + * @param scope [description] */ - applyForce(force: Phaser.Math.Vector2): Phaser.GameObjects.GameObject; + setCollideCallback(callback: CollideCallback, scope: any): Phaser.GameObjects.GameObject; /** - * Applies a force to a body from a given position. - * @param position The position in which the force comes from. - * @param force A Vector that specifies the force to apply. + * [description] */ - applyForceFrom(position: Phaser.Math.Vector2, force: Phaser.Math.Vector2): Phaser.GameObjects.GameObject; + setCollidesNever(): Phaser.GameObjects.GameObject; /** - * Apply thrust to the forward position of the body. - * @param speed A speed value to be applied to a directional force. + * [description] */ - thrust(speed: number): Phaser.GameObjects.GameObject; + setLiteCollision(): Phaser.GameObjects.GameObject; /** - * Apply thrust to the left position of the body. - * @param speed A speed value to be applied to a directional force. + * [description] */ - thrustLeft(speed: number): Phaser.GameObjects.GameObject; + setPassiveCollision(): Phaser.GameObjects.GameObject; /** - * Apply thrust to the right position of the body. - * @param speed A speed value to be applied to a directional force. + * [description] */ - thrustRight(speed: number): Phaser.GameObjects.GameObject; + setActiveCollision(): Phaser.GameObjects.GameObject; /** - * Apply thrust to the back position of the body. - * @param speed A speed value to be applied to a directional force. + * [description] */ - thrustBack(speed: number): Phaser.GameObjects.GameObject; + setFixedCollision(): Phaser.GameObjects.GameObject; + /** + * [description] + */ + collides: number; } /** - * Contains methods for changing the friction of a Game Object's Matter Body. Should be used a mixin, not called directly. + * The Impact Debug component. + * Should be applied as a mixin. + */ + interface Debug { + /** + * [description] + * @param showBody [description] + * @param showVelocity [description] + * @param bodyColor [description] + */ + setDebug(showBody: boolean, showVelocity: boolean, bodyColor: number): Phaser.GameObjects.GameObject; + /** + * [description] + * @param value [description] + */ + setDebugBodyColor(value: number): Phaser.GameObjects.GameObject; + /** + * [description] + */ + debugShowBody: boolean; + /** + * [description] + */ + debugShowVelocity: boolean; + /** + * [description] + */ + debugBodyColor: number; + } + + /** + * The Impact Friction component. + * Should be applied as a mixin. */ interface Friction { /** - * Sets new friction values for this Game Object's Matter Body. - * @param value The new friction of the body, between 0 and 1, where 0 allows the Body to slide indefinitely, while 1 allows it to stop almost immediately after a force is applied. - * @param air If provided, the new air resistance of the Body. The higher the value, the faster the Body will slow as it moves through space. 0 means the body has no air resistance. - * @param fstatic If provided, the new static friction of the Body. The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary. 0 means the body will never "stick" when it is nearly stationary. + * [description] + * @param x [description] */ - setFriction(value: number, air?: number, fstatic?: number): Phaser.GameObjects.GameObject; + setFrictionX(x: number): Phaser.GameObjects.GameObject; /** - * Sets a new air resistance for this Game Object's Matter Body. A value of 0 means the Body will never slow as it moves through space. The higher the value, the faster a Body slows when moving through space. - * @param value The new air resistance for the Body. + * [description] + * @param y [description] */ - setFrictionAir(value: number): Phaser.GameObjects.GameObject; + setFrictionY(y: number): Phaser.GameObjects.GameObject; /** - * Sets a new static friction for this Game Object's Matter Body. A value of 0 means the Body will never "stick" when it is nearly stationary. The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary. - * @param value The new static friction for the Body. + * [description] + * @param x [description] + * @param y [description] */ - setFrictionStatic(value: number): Phaser.GameObjects.GameObject; + setFriction(x: number, y: number): Phaser.GameObjects.GameObject; } /** - * A component to manipulate world gravity for Matter.js bodies. + * The Impact Gravity component. + * Should be applied as a mixin. */ interface Gravity { - /** - * A togglable function for ignoring world gravity in real-time on the current body. - * @param value Set to true to ignore the effect of world gravity, or false to not ignore it. - */ - setIgnoreGravity(value: boolean): Phaser.GameObjects.GameObject; - } - - /** - * Allows accessing the mass, density, and center of mass of a Matter-enabled Game Object. Should be used as a mixin and not directly. - */ - interface Mass { - /** - * Sets the mass of the Game Object's Matter Body. - * @param value The new mass of the body. - */ - setMass(value: number): Phaser.GameObjects.GameObject; - /** - * Sets density of the body. - * @param value The new density of the body. - */ - setDensity(value: number): Phaser.GameObjects.GameObject; - /** - * The body's center of mass. - */ - readonly centerOfMass: Phaser.Math.Vector2; - } - - /** - * [description] - */ - interface Sensor { /** * [description] * @param value [description] */ - setSensor(value: boolean): Phaser.GameObjects.GameObject; + setGravity(value: number): Phaser.GameObjects.GameObject; /** * [description] */ - isSensor(): boolean; + gravity: number; } /** - * [description] + * The Impact Offset component. + * Should be applied as a mixin. */ - interface SetBody { - /** - * Set the body on a Game Object to a rectangle. - * @param width Width of the rectangle. - * @param height Height of the rectangle. - * @param options [description] - */ - setRectangle(width: number, height: number, options: object): Phaser.GameObjects.GameObject; + interface Offset { /** * [description] - * @param radius [description] - * @param options [description] + * @param x [description] + * @param y [description] + * @param width [description] + * @param height [description] */ - setCircle(radius: number, options: object): Phaser.GameObjects.GameObject; - /** - * Set the body on the Game Object to a polygon shape. - * @param radius The radius of the polygon. - * @param sides The amount of sides creating the polygon. - * @param options A matterjs config object. - */ - setPolygon(radius: number, sides: number, options: object): Phaser.GameObjects.GameObject; - /** - * Creates a new matterjs trapezoid body. - * @param width The width of the trapezoid. - * @param height The height of the trapezoid. - * @param slope The angle of slope for the trapezoid. - * @param options A matterjs config object for the body. - */ - setTrapezoid(width: number, height: number, slope: number, options: object): Phaser.GameObjects.GameObject; - /** - * [description] - * @param body [description] - * @param addToWorld [description] Default true. - */ - setExistingBody(body: MatterJS.Body, addToWorld?: boolean): Phaser.GameObjects.GameObject; - /** - * [description] - * @param config [description] - * @param options [description] - */ - setBody(config: object, options: object): Phaser.GameObjects.GameObject; + setOffset(x: number, y: number, width?: number, height?: number): Phaser.GameObjects.GameObject; } /** - * [description] + * The Impact Set Game Object component. + * Should be applied as a mixin. */ - interface Sleep { + interface SetGameObject { /** * [description] - * @param value [description] Default 60. + * @param gameObject [description] + * @param sync [description] Default true. */ - setSleepThreshold(value?: number): Phaser.GameObjects.GameObject; + setGameObject(gameObject: Phaser.GameObjects.GameObject, sync?: boolean): Phaser.GameObjects.GameObject; /** * [description] - * @param start [description] - * @param end [description] */ - setSleepEvents(start: boolean, end: boolean): Phaser.GameObjects.GameObject; - /** - * [description] - * @param value [description] - */ - setSleepStartEvent(value: boolean): Phaser.GameObjects.GameObject; - /** - * [description] - * @param value [description] - */ - setSleepEndEvent(value: boolean): Phaser.GameObjects.GameObject; + syncGameObject(): Phaser.GameObjects.GameObject; } /** - * [description] - */ - interface Static { - /** - * [description] - * @param value [description] - */ - setStatic(value: boolean): Phaser.GameObjects.GameObject; - /** - * [description] - */ - isStatic(): boolean; - } - - /** - * Provides methods used for getting and setting the position, scale and rotation of a Game Object. - */ - interface Transform { - /** - * The x position of this Game Object. - */ - x: number; - /** - * The y position of this Game Object. - */ - y: number; - /** - * The horizontal scale of this Game Object. - */ - scaleX: number; - /** - * The vertical scale of this Game Object. - */ - scaleY: number; - /** - * Use `angle` to set or get rotation of the physics body associated to this GameObject. Unlike rotation, when using set the value can be in degrees, which will be converted to radians internally. - */ - angle: number; - /** - * Use `rotation` to set or get the rotation of the physics body associated with this GameObject. The value when set must be in radians. - */ - rotation: number; - /** - * Sets the position of the physics body along x and y axes. Both the parameters to this function are optional and if not passed any they default to 0. - * @param x The horizontal position of the body. Default 0. - * @param y The vertical position of the body. Default x. - */ - setPosition(x?: number, y?: number): this; - /** - * [description] - * @param radians [description] Default 0. - */ - setRotation(radians?: number): this; - /** - * [description] - */ - setFixedRotation(): this; - /** - * [description] - * @param degrees [description] Default 0. - */ - setAngle(degrees?: number): this; - /** - * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. Default 1. - * @param y The vertical scale of this Game Object. If not set it will use the x value. Default x. - * @param point The point (Vector2) from which scaling will occur. - */ - setScale(x?: number, y?: number, point?: Phaser.Math.Vector2): this; - } - - /** - * [description] + * The Impact Velocity component. + * Should be applied as a mixin. */ interface Velocity { - /** - * [description] - * @param value [description] - */ - setAngularVelocity(value: number): Phaser.GameObjects.GameObject; /** * Sets the horizontal velocity of the physics body. * @param x The horizontal velocity value. */ - setVelocityX(x: number): Phaser.GameObjects.GameObject; + setVelocityX(x: number): this; /** - * Sets vertical velocity of the physics body. + * Sets the vertical velocity of the physics body. * @param y The vertical velocity value. */ - setVelocityY(y: number): Phaser.GameObjects.GameObject; + setVelocityY(y: number): this; /** - * Sets both the horizontal and vertical velocity of the physics body. + * Sets the horizontal and vertical velocities of the physics body. * @param x The horizontal velocity value. - * @param y The vertical velocity value, it can be either positive or negative. If not given, it will be the same as the `x` value. Default x. + * @param y The vertical velocity value. If not given, defaults to the horizontal value. Default x. */ - setVelocity(x: number, y?: number): Phaser.GameObjects.GameObject; + setVelocity(x: number, y?: number): this; + /** + * Sets the maximum velocity this body can travel at. + * @param x The maximum allowed horizontal velocity. + * @param y The maximum allowed vertical velocity. If not given, defaults to the horizontal value. Default x. + */ + setMaxVelocity(x: number, y?: number): this; } } - namespace Matter { - } - namespace Events { - type AfterUpdateEvent = { - /** - * The Matter Engine `timing.timestamp` value for the event. - */ - timestamp: number; - /** - * The source object of the event. - */ - source: any; - /** - * The name of the event. - */ - name: string; - }; - /** - * The Matter Physics After Update Event. + * The Impact Physics World Collide Event. * - * This event is dispatched by a Matter Physics World instance after the engine has updated and all collision events have resolved. + * This event is dispatched by an Impact Physics World instance if two bodies collide. * - * Listen to it from a Scene using: `this.matter.world.on('afterupdate', listener)`. + * Listen to it from a Scene using: `this.impact.world.on('collide', listener)`. */ - const AFTER_UPDATE: any; - - type BeforeUpdateEvent = { - /** - * The Matter Engine `timing.timestamp` value for the event. - */ - timestamp: number; - /** - * The source object of the event. - */ - source: any; - /** - * The name of the event. - */ - name: string; - }; + const COLLIDE: any; /** - * The Matter Physics Before Update Event. + * The Impact Physics World Pause Event. * - * This event is dispatched by a Matter Physics World instance right before all the collision processing takes place. + * This event is dispatched by an Impact Physics World instance when it is paused. * - * Listen to it from a Scene using: `this.matter.world.on('beforeupdate', listener)`. - */ - const BEFORE_UPDATE: any; - - type CollisionActiveEvent = { - /** - * A list of all affected pairs in the collision. - */ - pairs: any[]; - /** - * The Matter Engine `timing.timestamp` value for the event. - */ - timestamp: number; - /** - * The source object of the event. - */ - source: any; - /** - * The name of the event. - */ - name: string; - }; - - /** - * The Matter Physics Collision Active Event. - * - * This event is dispatched by a Matter Physics World instance after the engine has updated. - * It provides a list of all pairs that are colliding in the current tick (if any). - * - * Listen to it from a Scene using: `this.matter.world.on('collisionactive', listener)`. - */ - const COLLISION_ACTIVE: any; - - type CollisionEndEvent = { - /** - * A list of all affected pairs in the collision. - */ - pairs: any[]; - /** - * The Matter Engine `timing.timestamp` value for the event. - */ - timestamp: number; - /** - * The source object of the event. - */ - source: any; - /** - * The name of the event. - */ - name: string; - }; - - /** - * The Matter Physics Collision End Event. - * - * This event is dispatched by a Matter Physics World instance after the engine has updated. - * It provides a list of all pairs that have finished colliding in the current tick (if any). - * - * Listen to it from a Scene using: `this.matter.world.on('collisionend', listener)`. - */ - const COLLISION_END: any; - - type CollisionStartEvent = { - /** - * A list of all affected pairs in the collision. - */ - pairs: any[]; - /** - * The Matter Engine `timing.timestamp` value for the event. - */ - timestamp: number; - /** - * The source object of the event. - */ - source: any; - /** - * The name of the event. - */ - name: string; - }; - - /** - * The Matter Physics Collision Start Event. - * - * This event is dispatched by a Matter Physics World instance after the engine has updated. - * It provides a list of all pairs that have started to collide in the current tick (if any). - * - * Listen to it from a Scene using: `this.matter.world.on('collisionstart', listener)`. - */ - const COLLISION_START: any; - - /** - * The Matter Physics Drag End Event. - * - * This event is dispatched by a Matter Physics World instance when a Pointer Constraint - * stops dragging a body. - * - * Listen to it from a Scene using: `this.matter.world.on('dragend', listener)`. - */ - const DRAG_END: any; - - /** - * The Matter Physics Drag Event. - * - * This event is dispatched by a Matter Physics World instance when a Pointer Constraint - * is actively dragging a body. It is emitted each time the pointer moves. - * - * Listen to it from a Scene using: `this.matter.world.on('drag', listener)`. - */ - const DRAG: any; - - /** - * The Matter Physics Drag Start Event. - * - * This event is dispatched by a Matter Physics World instance when a Pointer Constraint - * starts dragging a body. - * - * Listen to it from a Scene using: `this.matter.world.on('dragstart', listener)`. - */ - const DRAG_START: any; - - /** - * The Matter Physics World Pause Event. - * - * This event is dispatched by an Matter Physics World instance when it is paused. - * - * Listen to it from a Scene using: `this.matter.world.on('pause', listener)`. + * Listen to it from a Scene using: `this.impact.world.on('pause', listener)`. */ const PAUSE: any; /** - * The Matter Physics World Resume Event. + * The Impact Physics World Resume Event. * - * This event is dispatched by an Matter Physics World instance when it resumes from a paused state. + * This event is dispatched by an Impact Physics World instance when it resumes from a paused state. * - * Listen to it from a Scene using: `this.matter.world.on('resume', listener)`. + * Listen to it from a Scene using: `this.impact.world.on('resume', listener)`. */ const RESUME: any; - type SleepEndEvent = { - /** - * The source object of the event. - */ - source: any; - /** - * The name of the event. - */ - name: string; - }; + } - /** - * The Matter Physics Sleep End Event. - * - * This event is dispatched by a Matter Physics World instance when a Body stop sleeping. - * - * Listen to it from a Scene using: `this.matter.world.on('sleepend', listener)`. - */ - const SLEEP_END: any; - - type SleepStartEvent = { - /** - * The source object of the event. - */ - source: any; - /** - * The name of the event. - */ - name: string; - }; - - /** - * The Matter Physics Sleep Start Event. - * - * This event is dispatched by a Matter Physics World instance when a Body goes to sleep. - * - * Listen to it from a Scene using: `this.matter.world.on('sleepstart', listener)`. - */ - const SLEEP_START: any; + } + namespace Matter { + namespace Matter { } /** @@ -67176,6 +66362,18 @@ declare namespace Phaser { */ fromVertices(x: number, y: number, vertexSets: string | any[], options?: object, flagInternal?: boolean, removeCollinear?: number, minimumArea?: number): MatterJS.Body; + /** + * **This function is still in development** + * + * Creates a body using the supplied body data, as provided by a JSON file. + * @param x The X coordinate of the body. + * @param y The Y coordinate of the body. + * @param data The body data object as parsed from the JSON body format. + * @param options Optional Matter body configuration object, as passed to `Body.create`. + * @param addToWorld Should the newly created body be immediately added to the World? Default true. + */ + fromJSON(x: number, y: number, data: object, options?: object, addToWorld?: boolean): MatterJS.Body; + /** * Create a new composite containing Matter Image objects created in a grid arrangement. * This function uses the body bounds to prevent overlaps. @@ -67305,12 +66503,12 @@ declare namespace Phaser { /** * [description] - * @param bodyB The second possible `Body` that this constraint is attached to. - * @param length A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. + * @param body The Matter `Body` that this constraint is attached to. + * @param length A number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. * @param stiffness A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. Default 1. * @param options [description] Default {}. */ - worldConstraint(bodyB: MatterJS.Body, length?: number, stiffness?: number, options?: object): MatterJS.Constraint; + worldConstraint(body: MatterJS.Body, length?: number, stiffness?: number, options?: object): MatterJS.Constraint; /** * [description] @@ -67355,8 +66553,9 @@ declare namespace Phaser { * [description] * @param gameObject The Game Object to inject the Matter Body in to. * @param options A Matter Body configuration object, or an instance of a Matter Body. + * @param addToWorld Add this Matter Body to the World? Default true. */ - gameObject(gameObject: Phaser.GameObjects.GameObject, options: object | MatterJS.Body): Phaser.GameObjects.GameObject; + gameObject(gameObject: Phaser.GameObjects.GameObject, options?: object | MatterJS.Body, addToWorld?: boolean): Phaser.GameObjects.GameObject; /** * Instantly sets the linear velocity of the given body. Position, angle, force etc. are unchanged. @@ -67396,8 +66595,9 @@ declare namespace Phaser { * @param world The Matter world to add the body to. * @param gameObject The Game Object that will have the Matter body applied to it. * @param options A Matter Body configuration object, or an instance of a Matter Body. + * @param addToWorld Should the newly created body be immediately added to the World? Default true. */ - function MatterGameObject(world: Phaser.Physics.Matter.World, gameObject: Phaser.GameObjects.GameObject, options: object | MatterJS.Body): Phaser.GameObjects.GameObject; + function MatterGameObject(world: Phaser.Physics.Matter.World, gameObject: Phaser.GameObjects.GameObject, options?: object | MatterJS.Body, addToWorld?: boolean): Phaser.GameObjects.GameObject; /** * A Matter Physics Image Game Object. @@ -67410,7 +66610,7 @@ declare namespace Phaser { class Image extends Phaser.GameObjects.Image implements Phaser.Physics.Matter.Components.Bounce, Phaser.Physics.Matter.Components.Collision, Phaser.Physics.Matter.Components.Force, Phaser.Physics.Matter.Components.Friction, Phaser.Physics.Matter.Components.Gravity, Phaser.Physics.Matter.Components.Mass, Phaser.Physics.Matter.Components.Sensor, Phaser.Physics.Matter.Components.SetBody, Phaser.Physics.Matter.Components.Sleep, Phaser.Physics.Matter.Components.Static, Phaser.Physics.Matter.Components.Transform, Phaser.Physics.Matter.Components.Velocity, Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Size, Phaser.GameObjects.Components.Texture, Phaser.GameObjects.Components.Tint, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { /** * - * @param world [description] + * @param world A reference to the Matter.World instance that this body belongs to. * @param x The horizontal position of this Game Object in the world. * @param y The vertical position of this Game Object in the world. * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. @@ -67420,7 +66620,7 @@ declare namespace Phaser { constructor(world: Phaser.Physics.Matter.World, x: number, y: number, texture: string, frame?: string | integer, options?: object); /** - * [description] + * A reference to the Matter.World instance that this body belongs to. */ world: Phaser.Physics.Matter.World; @@ -68147,7 +67347,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -68252,6 +67454,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -68304,23 +67509,67 @@ declare namespace Phaser { setBounce(value: number): Phaser.GameObjects.GameObject; /** - * Sets the collision category of this Game Object's Matter Body. This number must be a power of two between 2^0 (= 1) and 2^31. Two bodies with different collision groups (see {@link #setCollisionGroup}) will only collide if their collision categories are included in their collision masks (see {@link #setCollidesWith}). + * Sets the collision category of this Game Object's Matter Body. This number must be a power of two between 2^0 (= 1) and 2^31. + * Two bodies with different collision groups (see {@link #setCollisionGroup}) will only collide if their collision + * categories are included in their collision masks (see {@link #setCollidesWith}). * @param value Unique category bitfield. */ setCollisionCategory(value: number): Phaser.GameObjects.GameObject; /** - * Sets the collision group of this Game Object's Matter Body. If this is zero or two Matter Bodies have different values, they will collide according to the usual rules (see {@link #setCollisionCategory} and {@link #setCollisionGroup}). If two Matter Bodies have the same positive value, they will always collide; if they have the same negative value, they will never collide. + * Sets the collision group of this Game Object's Matter Body. If this is zero or two Matter Bodies have different values, + * they will collide according to the usual rules (see {@link #setCollisionCategory} and {@link #setCollisionGroup}). + * If two Matter Bodies have the same positive value, they will always collide; if they have the same negative value, + * they will never collide. * @param value Unique group index. */ setCollisionGroup(value: number): Phaser.GameObjects.GameObject; /** - * Sets the collision mask for this Game Object's Matter Body. Two Matter Bodies with different collision groups will only collide if each one includes the other's category in its mask based on a bitwise AND, i.e. `(categoryA & maskB) !== 0` and `(categoryB & maskA) !== 0` are both true. + * Sets the collision mask for this Game Object's Matter Body. Two Matter Bodies with different collision groups will only + * collide if each one includes the other's category in its mask based on a bitwise AND, i.e. `(categoryA & maskB) !== 0` + * and `(categoryB & maskA) !== 0` are both true. * @param categories A unique category bitfield, or an array of them. */ setCollidesWith(categories: number | number[]): Phaser.GameObjects.GameObject; + /** + * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object. + * + * This does not change the bodies collision category, group or filter. Those must be set in addition + * to the callback. + * @param callback The callback to invoke when this body starts colliding with another. + */ + setOnCollide(callback: Function): Phaser.GameObjects.GameObject; + + /** + * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object. + * + * This does not change the bodies collision category, group or filter. Those must be set in addition + * to the callback. + * @param callback The callback to invoke when this body stops colliding with another. + */ + setOnCollideEnd(callback: Function): Phaser.GameObjects.GameObject; + + /** + * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object. + * + * This does not change the bodies collision category, group or filter. Those must be set in addition + * to the callback. + * @param callback The callback to invoke for the duration of this body colliding with another. + */ + setOnCollideActive(callback: Function): Phaser.GameObjects.GameObject; + + /** + * The callback is sent a reference to the other body, along with a `Phaser.Types.Physics.Matter.MatterCollisionData` object. + * + * This does not change the bodies collision category, group or filter. Those must be set in addition + * to the callback. + * @param body The body, or an array of bodies, to test for collisions with. + * @param callback The callback to invoke when this body collides with the given body or bodies. + */ + setOnCollideWith(body: MatterJS.Body | MatterJS.Body[], callback: Function): Phaser.GameObjects.GameObject; + /** * Applies a force to a body. * @param force A Vector that specifies the force to apply. @@ -68336,24 +67585,32 @@ declare namespace Phaser { /** * Apply thrust to the forward position of the body. + * + * Use very small values, such as 0.1, depending on the mass and required speed. * @param speed A speed value to be applied to a directional force. */ thrust(speed: number): Phaser.GameObjects.GameObject; /** * Apply thrust to the left position of the body. + * + * Use very small values, such as 0.1, depending on the mass and required speed. * @param speed A speed value to be applied to a directional force. */ thrustLeft(speed: number): Phaser.GameObjects.GameObject; /** * Apply thrust to the right position of the body. + * + * Use very small values, such as 0.1, depending on the mass and required speed. * @param speed A speed value to be applied to a directional force. */ thrustRight(speed: number): Phaser.GameObjects.GameObject; /** * Apply thrust to the back position of the body. + * + * Use very small values, such as 0.1, depending on the mass and required speed. * @param speed A speed value to be applied to a directional force. */ thrustBack(speed: number): Phaser.GameObjects.GameObject; @@ -68398,6 +67655,10 @@ declare namespace Phaser { /** * The body's center of mass. + * + * Calling this creates a new `Vector2 each time to avoid mutation. + * + * If you only need to read the value and won't change it, you can get it from `GameObject.body.centerOfMass`. */ readonly centerOfMass: Phaser.Math.Vector2; @@ -68447,7 +67708,7 @@ declare namespace Phaser { /** * [description] * @param body [description] - * @param addToWorld [description] Default true. + * @param addToWorld Should the newly created body be immediately added to the World? Default true. */ setExistingBody(body: MatterJS.Body, addToWorld?: boolean): Phaser.GameObjects.GameObject; @@ -68484,18 +67745,43 @@ declare namespace Phaser { setSleepEndEvent(value: boolean): Phaser.GameObjects.GameObject; /** - * [description] - * @param value [description] + * Changes the physics body to be either static `true` or dynamic `false`. + * @param value `true` to set the body as being static, or `false` to make it dynamic. */ setStatic(value: boolean): Phaser.GameObjects.GameObject; /** - * [description] + * Returns `true` if the body is static, otherwise `false` for a dynamic body. */ isStatic(): boolean; /** - * [description] + * Returns the center x offset of the Body this Game Object is using. + * + * This is calculated by taking the difference between the center of the frame and the center of + * the physics body. If set, the `body.render.sprite.xOffset` value is then added to it. + * + * Use this when setting the Origin of a Physics Game Object post-creation, i.e.: + * + * `setOrigin(originX + centerOffsetX, originY + centerOffsetY)` + */ + readonly centerOffsetX: number; + + /** + * Returns the center y offset of the Body this Game Object is using. + * + * This is calculated by taking the difference between the center of the frame and the center of + * the physics body. If set, the `body.render.sprite.yOffset` value is then added to it. + * + * Use this when setting the Origin of a Physics Game Object post-creation, i.e.: + * + * `setOrigin(originX + centerOffsetX, originY + centerOffsetY)` + */ + readonly centerOffsetY: number; + + /** + * Setting fixed rotation sets the Body inertia to Infinity, which stops it + * from being able to rotate when forces are applied to it. */ setFixedRotation(): this; @@ -68527,79 +67813,304 @@ declare namespace Phaser { } /** - * [description] + * The Phaser Matter plugin provides the ability to use the Matter JS Physics Engine within your Phaser games. + * + * Unlike Arcade Physics, the other physics system provided with Phaser, Matter JS is a full-body physics system. + * It features: + * + * * Rigid bodies + * * Compound bodies + * * Composite bodies + * * Concave and convex hulls + * * Physical properties (mass, area, density etc.) + * * Restitution (elastic and inelastic collisions) + * * Collisions (broad-phase, mid-phase and narrow-phase) + * * Stable stacking and resting + * * Conservation of momentum + * * Friction and resistance + * * Constraints + * * Gravity + * * Sleeping and static bodies + * * Rounded corners (chamfering) + * * Views (translate, zoom) + * * Collision queries (raycasting, region tests) + * * Time scaling (slow-mo, speed-up) + * + * Configuration of Matter is handled via the Matter World Config object, which can be passed in either the + * Phaser Game Config, or Phaser Scene Config. Here is a basic example: + * + * ```js + * physics: { + * default: 'matter', + * matter: { + * enableSleeping: true, + * gravity: { + * y: 0 + * }, + * debug: { + * showBody: true, + * showStaticBody: true + * } + * } + * } + * ``` + * + * This class acts as an interface between a Phaser Scene and a single instance of the Matter Engine. + * + * Use it to access the most common Matter features and helper functions. + * + * You can find details, documentation and examples on the Matter JS website: https://brm.io/matter-js/ */ class MatterPhysics { /** * - * @param scene [description] + * @param scene The Phaser Scene that owns this Matter Physics instance. */ constructor(scene: Phaser.Scene); /** - * [description] + * The Phaser Scene that owns this Matter Physics instance */ scene: Phaser.Scene; /** - * [description] + * A reference to the Scene Systems that belong to the Scene owning this Matter Physics instance. */ systems: Phaser.Scenes.Systems; /** - * [description] + * The parsed Matter Configuration object. */ - config: object; + config: Phaser.Types.Physics.Matter.MatterWorldConfig; /** - * [description] + * An instance of the Matter World class. This class is responsible for the updating of the + * Matter Physics world, as well as handling debug drawing functions. */ world: Phaser.Physics.Matter.World; /** - * [description] + * An instance of the Matter Factory. This class provides lots of functions for creatying a + * wide variety of physics objects and adds them automatically to the Matter World. + * + * You can use this class to cut-down on the amount of code required in your game, however, + * use of the Factory is entirely optional and should be seen as a development aid. It's + * perfectly possible to create and add components to the Matter world without using it. */ add: Phaser.Physics.Matter.Factory; /** - * A reference to the `Matter.Vertices` module which contains methods for creating and manipulating sets of vertices. + * A reference to the `Matter.Body` module. + * + * The `Matter.Body` module contains methods for creating and manipulating body models. + * A `Matter.Body` is a rigid body that can be simulated by a `Matter.Engine`. + * Factories for commonly used body configurations (such as rectangles, circles and other polygons) can be found in the `Bodies` module. + */ + body: MatterJS.Body; + + /** + * A reference to the `Matter.Composite` module. + * + * The `Matter.Composite` module contains methods for creating and manipulating composite bodies. + * A composite body is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`, therefore composites form a tree structure. + * It is important to use the functions in this module to modify composites, rather than directly modifying their properties. + * Note that the `Matter.World` object is also a type of `Matter.Composite` and as such all composite methods here can also operate on a `Matter.World`. + */ + composite: MatterJS.Composite; + + /** + * A reference to the `Matter.Detector` module. + * + * The `Matter.Detector` module contains methods for detecting collisions given a set of pairs. + */ + detector: MatterJS.Detector; + + /** + * A reference to the `Matter.Grid` module. + * + * The `Matter.Grid` module contains methods for creating and manipulating collision broadphase grid structures. + */ + grid: MatterJS.Grid; + + /** + * A reference to the `Matter.Pair` module. + * + * The `Matter.Pair` module contains methods for creating and manipulating collision pairs. + */ + pair: MatterJS.Pair; + + /** + * A reference to the `Matter.Pairs` module. + * + * The `Matter.Pairs` module contains methods for creating and manipulating collision pair sets. + */ + pairs: MatterJS.Pairs; + + /** + * A reference to the `Matter.Query` module. + * + * The `Matter.Query` module contains methods for performing collision queries. + */ + query: MatterJS.Query; + + /** + * A reference to the `Matter.Resolver` module. + * + * The `Matter.Resolver` module contains methods for resolving collision pairs. + */ + resolver: MatterJS.Resolver; + + /** + * A reference to the `Matter.SAT` module. + * + * The `Matter.SAT` module contains methods for detecting collisions using the Separating Axis Theorem. + */ + sat: MatterJS.SAT; + + /** + * A reference to the `Matter.Constraint` module. + * + * The `Matter.Constraint` module contains methods for creating and manipulating constraints. + * Constraints are used for specifying that a fixed distance must be maintained between two bodies (or a body and a fixed world-space position). + * The stiffness of constraints can be modified to create springs or elastic. + */ + constraint: MatterJS.Constraint; + + /** + * A reference to the `Matter.Bodies` module. + * + * The `Matter.Bodies` module contains factory methods for creating rigid body models + * with commonly used body configurations (such as rectangles, circles and other polygons). + */ + bodies: MatterJS.Bodies; + + /** + * A reference to the `Matter.Composites` module. + * + * The `Matter.Composites` module contains factory methods for creating composite bodies + * with commonly used configurations (such as stacks and chains). + */ + composites: MatterJS.Composites; + + /** + * A reference to the `Matter.Axes` module. + * + * The `Matter.Axes` module contains methods for creating and manipulating sets of axes. + */ + axes: MatterJS.Axes; + + /** + * A reference to the `Matter.Bounds` module. + * + * The `Matter.Bounds` module contains methods for creating and manipulating axis-aligned bounding boxes (AABB). + */ + bounds: MatterJS.Bounds; + + /** + * A reference to the `Matter.Svg` module. + * + * The `Matter.Svg` module contains methods for converting SVG images into an array of vector points. + * + * To use this module you also need the SVGPathSeg polyfill: https://github.com/progers/pathseg + */ + svg: MatterJS.Svg; + + /** + * A reference to the `Matter.Vector` module. + * + * The `Matter.Vector` module contains methods for creating and manipulating vectors. + * Vectors are the basis of all the geometry related operations in the engine. + * A `Matter.Vector` object is of the form `{ x: 0, y: 0 }`. + */ + vector: MatterJS.Vector; + + /** + * A reference to the `Matter.Vertices` module. + * + * The `Matter.Vertices` module contains methods for creating and manipulating sets of vertices. + * A set of vertices is an array of `Matter.Vector` with additional indexing properties inserted by `Vertices.create`. + * A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull). + */ + vertices: MatterJS.Vertices; + + /** + * A reference to the `Matter.Vertices` module. + * + * The `Matter.Vertices` module contains methods for creating and manipulating sets of vertices. * A set of vertices is an array of `Matter.Vector` with additional indexing properties inserted by `Vertices.create`. * A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull). */ verts: MatterJS.Vertices; /** - * A reference to the `Matter.Body` module which contains methods for creating and manipulating body models. + * This internal method is called when this class starts and retrieves the final Matter World Config. */ - body: MatterJS.Body; + getConfig(): Phaser.Types.Physics.Matter.MatterWorldConfig; /** - * A reference to the `Matter.Bodies` module which contains methods for creating bodies. + * Enables the Matter Attractors Plugin. + * + * The attractors plugin that makes it easy to apply continual forces on bodies. + * It's possible to simulate effects such as wind, gravity and magnetism. + * + * https://github.com/liabru/matter-attractors + * + * This method is called automatically if `plugins.attractors` is set in the Matter World Config. + * However, you can also call it directly from within your game. */ - bodies: MatterJS.Bodies; + enableAttractorPlugin(): this; /** - * [description] + * Enables the Matter Wrap Plugin. + * + * The coordinate wrapping plugin that automatically wraps the position of bodies such that they always stay + * within the given bounds. Upon crossing a boundary the body will appear on the opposite side of the bounds, + * while maintaining its velocity. + * + * https://github.com/liabru/matter-wrap + * + * This method is called automatically if `plugins.wrap` is set in the Matter World Config. + * However, you can also call it directly from within your game. */ - getConfig(): object; + enableWrapPlugin(): this; /** - * [description] + * Enables the Matter Collision Events Plugin. + * + * Note that this plugin is enabled by default. So you should only ever need to call this + * method if you have specifically disabled the plugin in your Matter World Config. + * You can disable it by setting `plugins.collisionevents: false` in your Matter World Config. + * + * This plugin triggers three new events on Matter.Body: + * + * 1. `onCollide` + * 2. `onCollideEnd` + * 3. `onCollideActive` + * + * These events correspond to the Matter.js events `collisionStart`, `collisionActive` and `collisionEnd`, respectively. + * You can listen to these events via Matter.Events or they will also be emitted from the Matter World. + * + * This plugin also extends Matter.Body with three convenience functions: + * + * `Matter.Body.setOnCollide(callback)` + * `Matter.Body.setOnCollideEnd(callback)` + * `Matter.Body.setOnCollideActive(callback)` + * + * You can register event callbacks by providing a function of type (pair: Matter.Pair) => void + * + * https://github.com/dxu/matter-collision-events */ - enableAttractorPlugin(): Phaser.Physics.Matter.MatterPhysics; + enableCollisionEventsPlugin(): this; /** - * [description] - */ - enableWrapPlugin(): Phaser.Physics.Matter.MatterPhysics; - - /** - * [description] + * Pauses the Matter World instance and sets `enabled` to `false`. + * + * A paused world will not run any simulations for the duration it is paused. */ pause(): Phaser.Physics.Matter.World; /** - * [description] + * Resumes this Matter World instance from a paused state and sets `enabled` to `true`. */ resume(): Phaser.Physics.Matter.World; @@ -68607,13 +68118,13 @@ declare namespace Phaser { * Sets the Matter Engine to run at fixed timestep of 60Hz and enables `autoUpdate`. * If you have set a custom `getDelta` function then this will override it. */ - set60Hz(): Phaser.Physics.Matter.MatterPhysics; + set60Hz(): this; /** * Sets the Matter Engine to run at fixed timestep of 30Hz and enables `autoUpdate`. * If you have set a custom `getDelta` function then this will override it. */ - set30Hz(): Phaser.Physics.Matter.MatterPhysics; + set30Hz(): this; /** * Manually advances the physics simulation by one iteration. @@ -68635,11 +68146,152 @@ declare namespace Phaser { * * Adjusting these values can help performance in certain situations, depending on the physics requirements * of your game. - * @param delta [description] Default 16.666. - * @param correction [description] Default 1. + * @param delta The delta value. Default 16.666. + * @param correction Optional delta correction value. Default 1. */ step(delta?: number, correction?: number): void; + /** + * Checks if the vertices of the given body, or an array of bodies, contains the given point, or not. + * + * You can pass in either a single body, or an array of bodies to be checked. This method will + * return `true` if _any_ of the bodies in the array contain the point. See the `intersectPoint` method if you need + * to get a list of intersecting bodies. + * + * The point should be transformed into the Matter World coordinate system in advance. This happens by + * default with Input Pointers, but if you wish to use points from another system you may need to + * transform them before passing them. + * @param body The body, or an array of bodies, to check against the point. + * @param x The horizontal coordinate of the point. + * @param y The vertical coordinate of the point. + */ + containsPoint(body: MatterJS.Body | MatterJS.Body[], x: number, y: number): boolean; + + /** + * Checks the given coordinates to see if any vertices of the given bodies contain it. + * + * If no bodies are provided it will search all bodies in the Matter World, including within Composites. + * + * The coordinates should be transformed into the Matter World coordinate system in advance. This happens by + * default with Input Pointers, but if you wish to use coordinates from another system you may need to + * transform them before passing them. + * @param x The horizontal coordinate of the point. + * @param y The vertical coordinate of the point. + * @param bodies An array of bodies to check. If not provided it will search all bodies in the world. + */ + intersectPoint(x: number, y: number, bodies?: MatterJS.Body[]): MatterJS.Body[]; + + /** + * Checks the given rectangular area to see if any vertices of the given bodies intersect with it. + * Or, if the `outside` parameter is set to `true`, it checks to see which bodies do not + * intersect with it. + * + * If no bodies are provided it will search all bodies in the Matter World, including within Composites. + * @param x The horizontal coordinate of the top-left of the area. + * @param y The vertical coordinate of the top-left of the area. + * @param width The width of the area. + * @param height The height of the area. + * @param outside If `false` it checks for vertices inside the area, if `true` it checks for vertices outside the area. Default false. + * @param bodies An array of bodies to check. If not provided it will search all bodies in the world. + */ + intersectRect(x: number, y: number, width: number, height: number, outside?: boolean, bodies?: MatterJS.Body[]): MatterJS.Body[]; + + /** + * Checks the given ray segment to see if any vertices of the given bodies intersect with it. + * + * If no bodies are provided it will search all bodies in the Matter World. + * + * The width of the ray can be specified via the `rayWidth` parameter. + * @param x1 The horizontal coordinate of the start of the ray segment. + * @param y1 The vertical coordinate of the start of the ray segment. + * @param x2 The horizontal coordinate of the end of the ray segment. + * @param y2 The vertical coordinate of the end of the ray segment. + * @param rayWidth The width of the ray segment. Default 1. + * @param bodies An array of bodies to check. If not provided it will search all bodies in the world. + */ + intersectRay(x1: number, y1: number, x2: number, y2: number, rayWidth?: number, bodies?: MatterJS.Body[]): MatterJS.Body[]; + + /** + * Checks the given Matter Body to see if it intersects with any of the given bodies. + * + * If no bodies are provided it will check against all bodies in the Matter World. + * @param body The target body. + * @param bodies An array of bodies to check the target body against. If not provided it will search all bodies in the world. + */ + intersectBody(body: MatterJS.Body, bodies?: MatterJS.Body[]): MatterJS.Body[]; + + /** + * Checks to see if the target body, or an array of target bodies, intersects with any of the given bodies. + * + * If intersection occurs this method will return `true` and, if provided, invoke the callbacks. + * + * If no bodies are provided for the second parameter the target will check again all bodies in the Matter World. + * + * Note that bodies can only overlap if they are in non-colliding collision groups or categories. + * + * If you provide a `processCallback` then the two bodies that overlap are sent to it. This callback + * must return a boolean and is used to allow you to perform additional processing tests before a final + * outcome is decided. If it returns `true` then the bodies are finally passed to the `overlapCallback`, if set. + * + * If you provide an `overlapCallback` then the matching pairs of overlapping bodies will be sent to it. + * + * Both callbacks have the following signature: `function (bodyA, bodyB, collisionInfo)` where `bodyA` is always + * the target body. The `collisionInfo` object contains additional data, such as the angle and depth of penetration. + * @param target The target body, or array of target bodies, to check. + * @param bodies The second body, or array of bodies, to check. If falsey it will check against all bodies in the world. + * @param overlapCallback An optional callback function that is called if the bodies overlap. + * @param processCallback An optional callback function that lets you perform additional checks against the two bodies if they overlap. If this is set then `overlapCallback` will only be invoked if this callback returns `true`. + * @param callbackContext The context, or scope, in which to run the callbacks. + */ + overlap(target: MatterJS.Body | MatterJS.Body[], bodies?: MatterJS.Body[], overlapCallback?: ArcadePhysicsCallback, processCallback?: ArcadePhysicsCallback, callbackContext?: any): boolean; + + /** + * Sets the collision filter category of all given Matter Bodies to the given value. + * + * This number must be a power of two between 2^0 (= 1) and 2^31. + * + * Bodies with different collision groups (see {@link #setCollisionGroup}) will only collide if their collision + * categories are included in their collision masks (see {@link #setCollidesWith}). + * @param bodies An array of bodies to update. If falsey it will use all bodies in the world. + * @param value Unique category bitfield. + */ + setCollisionCategory(bodies: MatterJS.Body[], value: number): this; + + /** + * Sets the collision filter group of all given Matter Bodies to the given value. + * + * If the group value is zero, or if two Matter Bodies have different group values, + * they will collide according to the usual collision filter rules (see {@link #setCollisionCategory} and {@link #setCollisionGroup}). + * + * If two Matter Bodies have the same positive group value, they will always collide; + * if they have the same negative group value they will never collide. + * @param bodies An array of bodies to update. If falsey it will use all bodies in the world. + * @param value Unique group index. + */ + setCollisionGroup(bodies: MatterJS.Body[], value: number): this; + + /** + * Sets the collision filter mask of all given Matter Bodies to the given value. + * + * Two Matter Bodies with different collision groups will only collide if each one includes the others + * category in its mask based on a bitwise AND operation: `(categoryA & maskB) !== 0` and + * `(categoryB & maskA) !== 0` are both true. + * @param bodies An array of bodies to update. If falsey it will use all bodies in the world. + * @param categories A unique category bitfield, or an array of them. + */ + setCollidesWith(bodies: MatterJS.Body[], categories: number | number[]): this; + + /** + * Takes an array and returns a new array made from all of the Matter Bodies found in the original array. + * + * For example, passing in Matter Game Objects, such as a bunch of Matter Sprites, to this method, would + * return an array containing all of their native Matter Body objects. + * + * If the `bodies` argument is falsey, it will return all bodies in the world. + * @param bodies An array of objects to extract the bodies from. If falsey, it will return all bodies in the world. + */ + getMatterBodies(bodies?: any[]): MatterJS.Body[]; + } /** @@ -68656,7 +68308,7 @@ declare namespace Phaser { class Sprite extends Phaser.GameObjects.Sprite implements Phaser.Physics.Matter.Components.Bounce, Phaser.Physics.Matter.Components.Collision, Phaser.Physics.Matter.Components.Force, Phaser.Physics.Matter.Components.Friction, Phaser.Physics.Matter.Components.Gravity, Phaser.Physics.Matter.Components.Mass, Phaser.Physics.Matter.Components.Sensor, Phaser.Physics.Matter.Components.SetBody, Phaser.Physics.Matter.Components.Sleep, Phaser.Physics.Matter.Components.Static, Phaser.Physics.Matter.Components.Transform, Phaser.Physics.Matter.Components.Velocity, Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Size, Phaser.GameObjects.Components.Texture, Phaser.GameObjects.Components.Tint, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { /** * - * @param world [description] + * @param world A reference to the Matter.World instance that this body belongs to. * @param x The horizontal position of this Game Object in the world. * @param y The vertical position of this Game Object in the world. * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. @@ -68666,7 +68318,7 @@ declare namespace Phaser { constructor(world: Phaser.Physics.Matter.World, x: number, y: number, texture: string, frame?: string | integer, options?: object); /** - * [description] + * A reference to the Matter.World instance that this body belongs to. */ world: Phaser.Physics.Matter.World; @@ -69393,7 +69045,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -69498,6 +69152,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -69550,23 +69207,67 @@ declare namespace Phaser { setBounce(value: number): Phaser.GameObjects.GameObject; /** - * Sets the collision category of this Game Object's Matter Body. This number must be a power of two between 2^0 (= 1) and 2^31. Two bodies with different collision groups (see {@link #setCollisionGroup}) will only collide if their collision categories are included in their collision masks (see {@link #setCollidesWith}). + * Sets the collision category of this Game Object's Matter Body. This number must be a power of two between 2^0 (= 1) and 2^31. + * Two bodies with different collision groups (see {@link #setCollisionGroup}) will only collide if their collision + * categories are included in their collision masks (see {@link #setCollidesWith}). * @param value Unique category bitfield. */ setCollisionCategory(value: number): Phaser.GameObjects.GameObject; /** - * Sets the collision group of this Game Object's Matter Body. If this is zero or two Matter Bodies have different values, they will collide according to the usual rules (see {@link #setCollisionCategory} and {@link #setCollisionGroup}). If two Matter Bodies have the same positive value, they will always collide; if they have the same negative value, they will never collide. + * Sets the collision group of this Game Object's Matter Body. If this is zero or two Matter Bodies have different values, + * they will collide according to the usual rules (see {@link #setCollisionCategory} and {@link #setCollisionGroup}). + * If two Matter Bodies have the same positive value, they will always collide; if they have the same negative value, + * they will never collide. * @param value Unique group index. */ setCollisionGroup(value: number): Phaser.GameObjects.GameObject; /** - * Sets the collision mask for this Game Object's Matter Body. Two Matter Bodies with different collision groups will only collide if each one includes the other's category in its mask based on a bitwise AND, i.e. `(categoryA & maskB) !== 0` and `(categoryB & maskA) !== 0` are both true. + * Sets the collision mask for this Game Object's Matter Body. Two Matter Bodies with different collision groups will only + * collide if each one includes the other's category in its mask based on a bitwise AND, i.e. `(categoryA & maskB) !== 0` + * and `(categoryB & maskA) !== 0` are both true. * @param categories A unique category bitfield, or an array of them. */ setCollidesWith(categories: number | number[]): Phaser.GameObjects.GameObject; + /** + * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object. + * + * This does not change the bodies collision category, group or filter. Those must be set in addition + * to the callback. + * @param callback The callback to invoke when this body starts colliding with another. + */ + setOnCollide(callback: Function): Phaser.GameObjects.GameObject; + + /** + * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object. + * + * This does not change the bodies collision category, group or filter. Those must be set in addition + * to the callback. + * @param callback The callback to invoke when this body stops colliding with another. + */ + setOnCollideEnd(callback: Function): Phaser.GameObjects.GameObject; + + /** + * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object. + * + * This does not change the bodies collision category, group or filter. Those must be set in addition + * to the callback. + * @param callback The callback to invoke for the duration of this body colliding with another. + */ + setOnCollideActive(callback: Function): Phaser.GameObjects.GameObject; + + /** + * The callback is sent a reference to the other body, along with a `Phaser.Types.Physics.Matter.MatterCollisionData` object. + * + * This does not change the bodies collision category, group or filter. Those must be set in addition + * to the callback. + * @param body The body, or an array of bodies, to test for collisions with. + * @param callback The callback to invoke when this body collides with the given body or bodies. + */ + setOnCollideWith(body: MatterJS.Body | MatterJS.Body[], callback: Function): Phaser.GameObjects.GameObject; + /** * Applies a force to a body. * @param force A Vector that specifies the force to apply. @@ -69582,24 +69283,32 @@ declare namespace Phaser { /** * Apply thrust to the forward position of the body. + * + * Use very small values, such as 0.1, depending on the mass and required speed. * @param speed A speed value to be applied to a directional force. */ thrust(speed: number): Phaser.GameObjects.GameObject; /** * Apply thrust to the left position of the body. + * + * Use very small values, such as 0.1, depending on the mass and required speed. * @param speed A speed value to be applied to a directional force. */ thrustLeft(speed: number): Phaser.GameObjects.GameObject; /** * Apply thrust to the right position of the body. + * + * Use very small values, such as 0.1, depending on the mass and required speed. * @param speed A speed value to be applied to a directional force. */ thrustRight(speed: number): Phaser.GameObjects.GameObject; /** * Apply thrust to the back position of the body. + * + * Use very small values, such as 0.1, depending on the mass and required speed. * @param speed A speed value to be applied to a directional force. */ thrustBack(speed: number): Phaser.GameObjects.GameObject; @@ -69644,6 +69353,10 @@ declare namespace Phaser { /** * The body's center of mass. + * + * Calling this creates a new `Vector2 each time to avoid mutation. + * + * If you only need to read the value and won't change it, you can get it from `GameObject.body.centerOfMass`. */ readonly centerOfMass: Phaser.Math.Vector2; @@ -69693,7 +69406,7 @@ declare namespace Phaser { /** * [description] * @param body [description] - * @param addToWorld [description] Default true. + * @param addToWorld Should the newly created body be immediately added to the World? Default true. */ setExistingBody(body: MatterJS.Body, addToWorld?: boolean): Phaser.GameObjects.GameObject; @@ -69730,18 +69443,43 @@ declare namespace Phaser { setSleepEndEvent(value: boolean): Phaser.GameObjects.GameObject; /** - * [description] - * @param value [description] + * Changes the physics body to be either static `true` or dynamic `false`. + * @param value `true` to set the body as being static, or `false` to make it dynamic. */ setStatic(value: boolean): Phaser.GameObjects.GameObject; /** - * [description] + * Returns `true` if the body is static, otherwise `false` for a dynamic body. */ isStatic(): boolean; /** - * [description] + * Returns the center x offset of the Body this Game Object is using. + * + * This is calculated by taking the difference between the center of the frame and the center of + * the physics body. If set, the `body.render.sprite.xOffset` value is then added to it. + * + * Use this when setting the Origin of a Physics Game Object post-creation, i.e.: + * + * `setOrigin(originX + centerOffsetX, originY + centerOffsetY)` + */ + readonly centerOffsetX: number; + + /** + * Returns the center y offset of the Body this Game Object is using. + * + * This is calculated by taking the difference between the center of the frame and the center of + * the physics body. If set, the `body.render.sprite.yOffset` value is then added to it. + * + * Use this when setting the Origin of a Physics Game Object post-creation, i.e.: + * + * `setOrigin(originX + centerOffsetX, originY + centerOffsetY)` + */ + readonly centerOffsetY: number; + + /** + * Setting fixed rotation sets the Body inertia to Infinity, which stops it + * from being able to rotate when forces are applied to it. */ setFixedRotation(): this; @@ -69848,23 +69586,67 @@ declare namespace Phaser { setBounce(value: number): Phaser.GameObjects.GameObject; /** - * Sets the collision category of this Game Object's Matter Body. This number must be a power of two between 2^0 (= 1) and 2^31. Two bodies with different collision groups (see {@link #setCollisionGroup}) will only collide if their collision categories are included in their collision masks (see {@link #setCollidesWith}). + * Sets the collision category of this Game Object's Matter Body. This number must be a power of two between 2^0 (= 1) and 2^31. + * Two bodies with different collision groups (see {@link #setCollisionGroup}) will only collide if their collision + * categories are included in their collision masks (see {@link #setCollidesWith}). * @param value Unique category bitfield. */ setCollisionCategory(value: number): Phaser.GameObjects.GameObject; /** - * Sets the collision group of this Game Object's Matter Body. If this is zero or two Matter Bodies have different values, they will collide according to the usual rules (see {@link #setCollisionCategory} and {@link #setCollisionGroup}). If two Matter Bodies have the same positive value, they will always collide; if they have the same negative value, they will never collide. + * Sets the collision group of this Game Object's Matter Body. If this is zero or two Matter Bodies have different values, + * they will collide according to the usual rules (see {@link #setCollisionCategory} and {@link #setCollisionGroup}). + * If two Matter Bodies have the same positive value, they will always collide; if they have the same negative value, + * they will never collide. * @param value Unique group index. */ setCollisionGroup(value: number): Phaser.GameObjects.GameObject; /** - * Sets the collision mask for this Game Object's Matter Body. Two Matter Bodies with different collision groups will only collide if each one includes the other's category in its mask based on a bitwise AND, i.e. `(categoryA & maskB) !== 0` and `(categoryB & maskA) !== 0` are both true. + * Sets the collision mask for this Game Object's Matter Body. Two Matter Bodies with different collision groups will only + * collide if each one includes the other's category in its mask based on a bitwise AND, i.e. `(categoryA & maskB) !== 0` + * and `(categoryB & maskA) !== 0` are both true. * @param categories A unique category bitfield, or an array of them. */ setCollidesWith(categories: number | number[]): Phaser.GameObjects.GameObject; + /** + * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object. + * + * This does not change the bodies collision category, group or filter. Those must be set in addition + * to the callback. + * @param callback The callback to invoke when this body starts colliding with another. + */ + setOnCollide(callback: Function): Phaser.GameObjects.GameObject; + + /** + * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object. + * + * This does not change the bodies collision category, group or filter. Those must be set in addition + * to the callback. + * @param callback The callback to invoke when this body stops colliding with another. + */ + setOnCollideEnd(callback: Function): Phaser.GameObjects.GameObject; + + /** + * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object. + * + * This does not change the bodies collision category, group or filter. Those must be set in addition + * to the callback. + * @param callback The callback to invoke for the duration of this body colliding with another. + */ + setOnCollideActive(callback: Function): Phaser.GameObjects.GameObject; + + /** + * The callback is sent a reference to the other body, along with a `Phaser.Types.Physics.Matter.MatterCollisionData` object. + * + * This does not change the bodies collision category, group or filter. Those must be set in addition + * to the callback. + * @param body The body, or an array of bodies, to test for collisions with. + * @param callback The callback to invoke when this body collides with the given body or bodies. + */ + setOnCollideWith(body: MatterJS.Body | MatterJS.Body[], callback: Function): Phaser.GameObjects.GameObject; + /** * Sets new friction values for this Game Object's Matter Body. * @param value The new friction of the body, between 0 and 1, where 0 allows the Body to slide indefinitely, while 1 allows it to stop almost immediately after a force is applied. @@ -69905,6 +69687,10 @@ declare namespace Phaser { /** * The body's center of mass. + * + * Calling this creates a new `Vector2 each time to avoid mutation. + * + * If you only need to read the value and won't change it, you can get it from `GameObject.body.centerOfMass`. */ readonly centerOfMass: Phaser.Math.Vector2; @@ -69945,13 +69731,13 @@ declare namespace Phaser { setSleepEndEvent(value: boolean): Phaser.GameObjects.GameObject; /** - * [description] - * @param value [description] + * Changes the physics body to be either static `true` or dynamic `false`. + * @param value `true` to set the body as being static, or `false` to make it dynamic. */ setStatic(value: boolean): Phaser.GameObjects.GameObject; /** - * [description] + * Returns `true` if the body is static, otherwise `false` for a dynamic body. */ isStatic(): boolean; @@ -70055,18 +69841,24 @@ declare namespace Phaser { /** * The native Matter Constraint that is used to attach to bodies. */ - constraint: object; + constraint: MatterJS.Constraint; /** * A Pointer has been pressed down onto the Scene. * - * If this Constraint doesn't have an active Pointer then a hit test is - * run against all active bodies in the world. If one is found it is bound - * to this constraint and the drag begins. + * If this Constraint doesn't have an active Pointer then a hit test is set to + * run against all active bodies in the world during the _next_ call to `update`. + * If a body is found, it is bound to this constraint and the drag begins. * @param pointer A reference to the Pointer that was pressed. */ onDown(pointer: Phaser.Input.Pointer): void; + /** + * A Pointer has been released from the Scene. If it was the one this constraint was using, it's cleared. + * @param pointer A reference to the Pointer that was pressed. + */ + onUp(pointer: Phaser.Input.Pointer): void; + /** * Scans all active bodies in the current Matter World to see if any of them * are hit by the Pointer. The _first one_ found to hit is set as the active contraint @@ -70105,7 +69897,17 @@ declare namespace Phaser { } /** - * [description] + * The Matter World class is responsible for managing one single instance of a Matter Physics World for Phaser. + * + * Access this via `this.matter.world` from within a Scene. + * + * This class creates a Matter JS World Composite along with the Matter JS Engine during instantiation. It also + * handles delta timing, bounds, body and constraint creation and debug drawing. + * + * If you wish to access the Matter JS World object directly, see the `localWorld` property. + * If you wish to access the Matter Engine directly, see the `engine` property. + * + * This class is an Event Emitter and will proxy _all_ Matter JS events, as they are received. */ class World extends Phaser.Events.EventEmitter { /** @@ -70144,7 +69946,7 @@ declare namespace Phaser { * The correction argument is an optional Number that specifies the time correction factor to apply to the update. * This can help improve the accuracy of the simulation in cases where delta is changing between updates. * The value of correction is defined as delta / lastDelta, i.e. the percentage change of delta over the last step. - * Therefore the value is always 1 (no correction) when delta constant (or when no correction is desired, which is the default). + * Therefore the value is always 1 (no correction) when delta is constant (or when no correction is desired, which is the default). * See the paper on Time Corrected Verlet for more information. */ correction: number; @@ -70175,6 +69977,14 @@ declare namespace Phaser { */ getDelta: Function; + /** + * The Matter JS Runner Configuration object. + * + * This object is populated via the Matter Configuration object's `runner` property and is + * updated constantly during the game step. + */ + runner: Phaser.Types.Physics.Matter.MatterRunnerConfig; + /** * Automatically call Engine.update every time the game steps. * If you disable this then you are responsible for calling `World.step` directly from your game. @@ -70193,12 +70003,71 @@ declare namespace Phaser { debugGraphic: Phaser.GameObjects.Graphics; /** - * The default configuration values. + * The debug configuration object. + * + * The values stored in this object are read from the Matter World Config `debug` property. + * + * When a new Body or Constraint is _added to the World_, they are given the values stored in this object, + * unless they have their own `render` object set that will override them. + * + * Note that while you can modify the values of properties in this object at run-time, it will not change + * any of the Matter objects _already added_. It will only impact objects newly added to the world, or one + * that is removed and then re-added at a later time. */ - defaults: object; + debugConfig: Phaser.Types.Physics.Matter.MatterDebugConfig; /** - * [description] + * Sets the debug render style for the children of the given Matter Composite. + * + * Composites themselves do not render, but they can contain bodies, constraints and other composites that may do. + * So the children of this composite are passed to the `setBodyRenderStyle`, `setCompositeRenderStyle` and + * `setConstraintRenderStyle` methods accordingly. + * @param composite The Matter Composite to set the render style on. + */ + setCompositeRenderStyle(composite: MatterJS.Composite): this; + + /** + * Sets the debug render style for the given Matter Body. + * + * If you are using this on a Phaser Game Object, such as a Matter Sprite, then pass in the body property + * to this method, not the Game Object itself. + * + * If you wish to skip a parameter, so it retains its current value, pass `false` for it. + * + * If you wish to reset the Body render colors to the defaults found in the World Debug Config, then call + * this method with just the `body` parameter provided and no others. + * @param body The Matter Body to set the render style on. + * @param lineColor The line color. If `null` it will use the World Debug Config value. + * @param lineOpacity The line opacity, between 0 and 1. If `null` it will use the World Debug Config value. + * @param lineThickness The line thickness. If `null` it will use the World Debug Config value. + * @param fillColor The fill color. If `null` it will use the World Debug Config value. + * @param fillOpacity The fill opacity, between 0 and 1. If `null` it will use the World Debug Config value. + */ + setBodyRenderStyle(body: MatterJS.Body, lineColor?: number, lineOpacity?: number, lineThickness?: number, fillColor?: number, fillOpacity?: number): this; + + /** + * Sets the debug render style for the given Matter Constraint. + * + * If you are using this on a Phaser Game Object, then pass in the body property + * to this method, not the Game Object itself. + * + * If you wish to skip a parameter, so it retains its current value, pass `false` for it. + * + * If you wish to reset the Constraint render colors to the defaults found in the World Debug Config, then call + * this method with just the `constraint` parameter provided and no others. + * @param constraint The Matter Constraint to set the render style on. + * @param lineColor The line color. If `null` it will use the World Debug Config value. + * @param lineOpacity The line opacity, between 0 and 1. If `null` it will use the World Debug Config value. + * @param lineThickness The line thickness. If `null` it will use the World Debug Config value. + * @param pinSize If this constraint is a pin, this sets the size of the pin circle. If `null` it will use the World Debug Config value. + * @param anchorColor The color used when rendering this constraints anchors. If `null` it will use the World Debug Config value. + * @param anchorSize The size of the anchor circle, if this constraint has anchors. If `null` it will use the World Debug Config value. + */ + setConstraintRenderStyle(constraint: MatterJS.Constraint, lineColor?: number, lineOpacity?: number, lineThickness?: number, pinSize?: number, anchorColor?: number, anchorSize?: number): this; + + /** + * This internal method acts as a proxy between all of the Matter JS events and then re-emits them + * via this class. */ setEventsProxy(): void; @@ -70213,7 +70082,7 @@ declare namespace Phaser { * @param y The y coordinate of the top-left corner of the bounds. Default 0. * @param width The width of the bounds. * @param height The height of the bounds. - * @param thickness The thickness of each wall, in pixels. Default 128. + * @param thickness The thickness of each wall, in pixels. Default 64. * @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. @@ -70222,33 +70091,43 @@ declare namespace Phaser { setBounds(x?: number, y?: number, width?: number, height?: number, thickness?: number, left?: boolean, right?: boolean, top?: boolean, bottom?: boolean): Phaser.Physics.Matter.World; /** - * [description] - * @param add [description] - * @param position [description] - * @param x [description] - * @param y [description] - * @param width [description] - * @param height [description] + * Updates the 4 rectangle bodies that were created, if `setBounds` was set in the Matter config, to use + * the new positions and sizes. This method is usually only called internally via the `setBounds` method. + * @param add `true` if the walls are being added or updated, `false` to remove them from the world. + * @param position Either `left`, `right`, `top` or `bottom`. Only optional if `add` is `false`. + * @param x The horizontal position to place the walls at. Only optional if `add` is `false`. + * @param y The vertical position to place the walls at. Only optional if `add` is `false`. + * @param width The width of the walls, in pixels. Only optional if `add` is `false`. + * @param height The height of the walls, in pixels. Only optional if `add` is `false`. */ - updateWall(add: boolean, position: string, x: number, y: number, width: number, height: number): void; + updateWall(add: boolean, position?: string, x?: number, y?: number, width?: number, height?: number): void; /** - * [description] + * Creates a Phaser.GameObjects.Graphics object that is used to render all of the debug bodies and joints to. + * + * This method is called automatically by the constructor, if debugging has been enabled. + * + * The created Graphics object is automatically added to the Scene at 0x0 and given a depth of `Number.MAX_VALUE`, + * so it renders above all else in the Scene. + * + * The Graphics object is assigned to the `debugGraphic` property of this class and `drawDebug` is enabled. */ createDebugGraphic(): Phaser.GameObjects.Graphics; /** - * Sets the world's gravity and gravity scale to 0. + * Sets the world gravity and gravity scale to 0. */ - disableGravity(): Phaser.Physics.Matter.World; + disableGravity(): this; /** - * Sets the world's gravity + * Sets the worlds gravity to the values given. + * + * Gravity effects all bodies in the world, unless they have the `ignoreGravity` flag set. * @param x The world gravity x component. Default 0. * @param y The world gravity y component. Default 1. - * @param scale [description] + * @param scale The gravity scale factor. Default 0.001. */ - setGravity(x?: number, y?: number, scale?: number): Phaser.Physics.Matter.World; + setGravity(x?: number, y?: number, scale?: number): this; /** * Creates a rectangle Matter body and adds it to the world. @@ -70261,64 +70140,90 @@ declare namespace Phaser { create(x: number, y: number, width: number, height: number, options: object): MatterJS.Body; /** - * Adds an object to the world. - * @param object Can be single or an array, and can be a body, composite or constraint + * Adds a Matter JS object, or array of objects, to the world. + * + * The objects should be valid Matter JS entities, such as a Body, Composite or Constraint. + * + * Triggers `beforeAdd` and `afterAdd` events. + * @param object Can be single object, or an array, and can be a body, composite or constraint. */ - add(object: object | object[]): Phaser.Physics.Matter.World; + add(object: object | object[]): this; /** - * [description] - * @param object The object to be removed from the world. - * @param deep [description] + * Removes a Matter JS object, or array of objects, from the world. + * + * The objects should be valid Matter JS entities, such as a Body, Composite or Constraint. + * + * Triggers `beforeRemove` and `afterRemove` events. + * @param object Can be single object, or an array, and can be a body, composite or constraint. + * @param deep Optionally search the objects children and recursively remove those as well. Default false. */ - remove(object: object, deep: boolean): Phaser.Physics.Matter.World; + remove(object: object | object[], deep?: boolean): this; /** - * [description] - * @param constraint [description] - * @param deep [description] + * Removes a Matter JS constraint, or array of constraints, from the world. + * + * Triggers `beforeRemove` and `afterRemove` events. + * @param constraint A Matter JS Constraint, or an array of constraints, to be removed. + * @param deep Optionally search the objects children and recursively remove those as well. Default false. */ - removeConstraint(constraint: MatterJS.Constraint, deep: boolean): Phaser.Physics.Matter.World; + removeConstraint(constraint: MatterJS.Constraint | MatterJS.Constraint[], deep?: boolean): this; /** - * Adds MatterTileBody instances for all the colliding tiles within the given tilemap layer. Set - * the appropriate tiles in your layer to collide before calling this method! + * Adds `MatterTileBody` instances for all the colliding tiles within the given tilemap layer. + * + * Set the appropriate tiles in your layer to collide before calling this method! * @param tilemapLayer An array of tiles. - * @param options Options to be passed to the MatterTileBody constructor. {@ee Phaser.Physics.Matter.TileBody} + * @param options Options to be passed to the MatterTileBody constructor. {@see Phaser.Physics.Matter.TileBody} */ - convertTilemapLayer(tilemapLayer: Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer, options?: object): Phaser.Physics.Matter.World; + convertTilemapLayer(tilemapLayer: Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer, options?: object): this; /** - * Adds MatterTileBody instances for the given tiles. This adds bodies regardless of whether the + * Adds `MatterTileBody` instances for the given tiles. This adds bodies regardless of whether the * tiles are set to collide or not. * @param tiles An array of tiles. * @param options Options to be passed to the MatterTileBody constructor. {@see Phaser.Physics.Matter.TileBody} */ - convertTiles(tiles: Phaser.Tilemaps.Tile[], options?: object): Phaser.Physics.Matter.World; + convertTiles(tiles: Phaser.Tilemaps.Tile[], options?: object): this; /** - * [description] - * @param isNonColliding [description] + * Returns the next unique group index for which bodies will collide. + * If `isNonColliding` is `true`, returns the next unique group index for which bodies will not collide. + * @param isNonColliding If `true`, returns the next unique group index for which bodies will _not_ collide. Default false. */ - nextGroup(isNonColliding: boolean): number; + nextGroup(isNonColliding?: boolean): number; /** - * [description] + * Returns the next unique category bitfield (starting after the initial default category 0x0001). + * There are 32 available. */ nextCategory(): number; /** - * [description] + * Pauses this Matter World instance and sets `enabled` to `false`. + * + * A paused world will not run any simulations for the duration it is paused. */ - pause(): Phaser.Physics.Matter.World; + pause(): this; /** - * [description] + * Resumes this Matter World instance from a paused state and sets `enabled` to `true`. */ - resume(): Phaser.Physics.Matter.World; + resume(): this; /** - * [description] + * The internal update method. This is called automatically by the parent Scene. + * + * Moves the simulation forward in time by delta ms. Uses `World.correction` value as an optional number that + * specifies the time correction factor to apply to the update. This can help improve the accuracy of the + * simulation in cases where delta is changing between updates. The value of correction is defined as `delta / lastDelta`, + * i.e. the percentage change of delta over the last step. Therefore the value is always 1 (no correction) when + * delta is constant (or when no correction is desired, which is the default). + * See the paper on Time Corrected Verlet for more information. + * + * Triggers `beforeUpdate` and `afterUpdate` events. Triggers `collisionStart`, `collisionActive` and `collisionEnd` events. + * + * If the World is paused, `update` is still run, but exits early and does not update the Matter Engine. * @param time The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. */ @@ -70344,8 +70249,8 @@ declare namespace Phaser { * * Adjusting these values can help performance in certain situations, depending on the physics requirements * of your game. - * @param delta [description] Default 16.666. - * @param correction [description] Default 1. + * @param delta The delta value. Default 16.666. + * @param correction Optional delta correction value. Default 1. */ step(delta?: number, correction?: number): void; @@ -70360,11 +70265,72 @@ declare namespace Phaser { update30Hz(): number; /** - * [description] - * @param path [description] - * @param points [description] + * Returns `true` if the given body can be found within the World. + * @param body The Matter Body, or Game Object, to search for within the world. */ - fromPath(path: string, points: any[]): any[]; + has(body: MatterJS.Body | Phaser.GameObjects.GameObject): MatterJS.Body[]; + + /** + * Returns all the bodies in the Matter World, including all bodies in children, recursively. + */ + getAllBodies(): MatterJS.Body[]; + + /** + * Returns all the constraints in the Matter World, including all constraints in children, recursively. + */ + getAllConstraints(): MatterJS.Constraint[]; + + /** + * Returns all the composites in the Matter World, including all composites in children, recursively. + */ + getAllComposites(): MatterJS.Composite[]; + + /** + * Renders a single Matter Body to the given Phaser Graphics Game Object. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render a Body to your own Graphics instance. + * + * If you don't wish to render a line around the body, set the `lineColor` parameter to `null`. + * Equally, if you don't wish to render a fill, set the `fillColor` parameter to `null`. + * @param body The Matter Body to be rendered. + * @param graphics The Graphics object to render to. + * @param showInternalEdges Render internal edges of the polygon? + * @param lineColor The line color. + * @param lineOpacity The line opacity, between 0 and 1. + * @param lineThickness The line thickness. Default 1. + * @param fillColor The fill color. + * @param fillOpacity The fill opacity, between 0 and 1. + */ + renderBody(body: MatterJS.Body, graphics: Phaser.GameObjects.Graphics, showInternalEdges: boolean, lineColor?: number, lineOpacity?: number, lineThickness?: number, fillColor?: number, fillOpacity?: number): this; + + /** + * Renders the Convex Hull for a single Matter Body to the given Phaser Graphics Game Object. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render a Body hull to your own Graphics instance. + * @param body The Matter Body to be rendered. + * @param graphics The Graphics object to render to. + * @param hullColor The color used to render the hull. + * @param lineThickness The hull line thickness. Default 1. + */ + renderConvexHull(body: MatterJS.Body, graphics: Phaser.GameObjects.Graphics, hullColor: number, lineThickness?: number): this; + + /** + * Renders a single Matter Constraint, such as a Pin or a Spring, to the given Phaser Graphics Game Object. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render a Constraint to your own Graphics instance. + * @param constraint The Matter Constraint to render. + * @param graphics The Graphics object to render to. + * @param lineColor The line color. + * @param lineOpacity The line opacity, between 0 and 1. + * @param lineThickness The line thickness. + * @param pinSize If this constraint is a pin, this sets the size of the pin circle. + * @param anchorColor The color used when rendering this constraints anchors. Set to `null` to not render anchors. + * @param anchorSize The size of the anchor circle, if this constraint has anchors and is rendering them. + */ + renderConstraint(constraint: MatterJS.Constraint, graphics: Phaser.GameObjects.Graphics, lineColor: number, lineOpacity: number, lineThickness: number, pinSize: number, anchorColor: number, anchorSize: number): this; /** * Resets the internal collision IDs that Matter.JS uses for Body collision groups. @@ -70392,6 +70358,726 @@ declare namespace Phaser { } + namespace Components { + /** + * A component to set restitution on objects. + */ + interface Bounce { + /** + * Sets the restitution on the physics object. + * @param value A Number that defines the restitution (elasticity) of the body. The value is always positive and is in the range (0, 1). A value of 0 means collisions may be perfectly inelastic and no bouncing may occur. A value of 0.8 means the body may bounce back with approximately 80% of its kinetic energy. Note that collision response is based on pairs of bodies, and that restitution values are combined with the following formula: `Math.max(bodyA.restitution, bodyB.restitution)` + */ + setBounce(value: number): Phaser.GameObjects.GameObject; + } + + /** + * Contains methods for changing the collision filter of a Matter Body. Should be used as a mixin and not called directly. + */ + interface Collision { + /** + * Sets the collision category of this Game Object's Matter Body. This number must be a power of two between 2^0 (= 1) and 2^31. + * Two bodies with different collision groups (see {@link #setCollisionGroup}) will only collide if their collision + * categories are included in their collision masks (see {@link #setCollidesWith}). + * @param value Unique category bitfield. + */ + setCollisionCategory(value: number): Phaser.GameObjects.GameObject; + /** + * Sets the collision group of this Game Object's Matter Body. If this is zero or two Matter Bodies have different values, + * they will collide according to the usual rules (see {@link #setCollisionCategory} and {@link #setCollisionGroup}). + * If two Matter Bodies have the same positive value, they will always collide; if they have the same negative value, + * they will never collide. + * @param value Unique group index. + */ + setCollisionGroup(value: number): Phaser.GameObjects.GameObject; + /** + * Sets the collision mask for this Game Object's Matter Body. Two Matter Bodies with different collision groups will only + * collide if each one includes the other's category in its mask based on a bitwise AND, i.e. `(categoryA & maskB) !== 0` + * and `(categoryB & maskA) !== 0` are both true. + * @param categories A unique category bitfield, or an array of them. + */ + setCollidesWith(categories: number | number[]): Phaser.GameObjects.GameObject; + /** + * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object. + * + * This does not change the bodies collision category, group or filter. Those must be set in addition + * to the callback. + * @param callback The callback to invoke when this body starts colliding with another. + */ + setOnCollide(callback: Function): Phaser.GameObjects.GameObject; + /** + * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object. + * + * This does not change the bodies collision category, group or filter. Those must be set in addition + * to the callback. + * @param callback The callback to invoke when this body stops colliding with another. + */ + setOnCollideEnd(callback: Function): Phaser.GameObjects.GameObject; + /** + * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object. + * + * This does not change the bodies collision category, group or filter. Those must be set in addition + * to the callback. + * @param callback The callback to invoke for the duration of this body colliding with another. + */ + setOnCollideActive(callback: Function): Phaser.GameObjects.GameObject; + /** + * The callback is sent a reference to the other body, along with a `Phaser.Types.Physics.Matter.MatterCollisionData` object. + * + * This does not change the bodies collision category, group or filter. Those must be set in addition + * to the callback. + * @param body The body, or an array of bodies, to test for collisions with. + * @param callback The callback to invoke when this body collides with the given body or bodies. + */ + setOnCollideWith(body: MatterJS.Body | MatterJS.Body[], callback: Function): Phaser.GameObjects.GameObject; + } + + /** + * A component to apply force to Matter.js bodies. + */ + interface Force { + /** + * Applies a force to a body. + * @param force A Vector that specifies the force to apply. + */ + applyForce(force: Phaser.Math.Vector2): Phaser.GameObjects.GameObject; + /** + * Applies a force to a body from a given position. + * @param position The position in which the force comes from. + * @param force A Vector that specifies the force to apply. + */ + applyForceFrom(position: Phaser.Math.Vector2, force: Phaser.Math.Vector2): Phaser.GameObjects.GameObject; + /** + * Apply thrust to the forward position of the body. + * + * Use very small values, such as 0.1, depending on the mass and required speed. + * @param speed A speed value to be applied to a directional force. + */ + thrust(speed: number): Phaser.GameObjects.GameObject; + /** + * Apply thrust to the left position of the body. + * + * Use very small values, such as 0.1, depending on the mass and required speed. + * @param speed A speed value to be applied to a directional force. + */ + thrustLeft(speed: number): Phaser.GameObjects.GameObject; + /** + * Apply thrust to the right position of the body. + * + * Use very small values, such as 0.1, depending on the mass and required speed. + * @param speed A speed value to be applied to a directional force. + */ + thrustRight(speed: number): Phaser.GameObjects.GameObject; + /** + * Apply thrust to the back position of the body. + * + * Use very small values, such as 0.1, depending on the mass and required speed. + * @param speed A speed value to be applied to a directional force. + */ + thrustBack(speed: number): Phaser.GameObjects.GameObject; + } + + /** + * Contains methods for changing the friction of a Game Object's Matter Body. Should be used a mixin, not called directly. + */ + interface Friction { + /** + * Sets new friction values for this Game Object's Matter Body. + * @param value The new friction of the body, between 0 and 1, where 0 allows the Body to slide indefinitely, while 1 allows it to stop almost immediately after a force is applied. + * @param air If provided, the new air resistance of the Body. The higher the value, the faster the Body will slow as it moves through space. 0 means the body has no air resistance. + * @param fstatic If provided, the new static friction of the Body. The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary. 0 means the body will never "stick" when it is nearly stationary. + */ + setFriction(value: number, air?: number, fstatic?: number): Phaser.GameObjects.GameObject; + /** + * Sets a new air resistance for this Game Object's Matter Body. A value of 0 means the Body will never slow as it moves through space. The higher the value, the faster a Body slows when moving through space. + * @param value The new air resistance for the Body. + */ + setFrictionAir(value: number): Phaser.GameObjects.GameObject; + /** + * Sets a new static friction for this Game Object's Matter Body. A value of 0 means the Body will never "stick" when it is nearly stationary. The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary. + * @param value The new static friction for the Body. + */ + setFrictionStatic(value: number): Phaser.GameObjects.GameObject; + } + + /** + * A component to manipulate world gravity for Matter.js bodies. + */ + interface Gravity { + /** + * A togglable function for ignoring world gravity in real-time on the current body. + * @param value Set to true to ignore the effect of world gravity, or false to not ignore it. + */ + setIgnoreGravity(value: boolean): Phaser.GameObjects.GameObject; + } + + /** + * Allows accessing the mass, density, and center of mass of a Matter-enabled Game Object. Should be used as a mixin and not directly. + */ + interface Mass { + /** + * Sets the mass of the Game Object's Matter Body. + * @param value The new mass of the body. + */ + setMass(value: number): Phaser.GameObjects.GameObject; + /** + * Sets density of the body. + * @param value The new density of the body. + */ + setDensity(value: number): Phaser.GameObjects.GameObject; + /** + * The body's center of mass. + * + * Calling this creates a new `Vector2 each time to avoid mutation. + * + * If you only need to read the value and won't change it, you can get it from `GameObject.body.centerOfMass`. + */ + readonly centerOfMass: Phaser.Math.Vector2; + } + + /** + * [description] + */ + interface Sensor { + /** + * [description] + * @param value [description] + */ + setSensor(value: boolean): Phaser.GameObjects.GameObject; + /** + * [description] + */ + isSensor(): boolean; + } + + /** + * [description] + */ + interface SetBody { + /** + * Set the body on a Game Object to a rectangle. + * @param width Width of the rectangle. + * @param height Height of the rectangle. + * @param options [description] + */ + setRectangle(width: number, height: number, options: object): Phaser.GameObjects.GameObject; + /** + * [description] + * @param radius [description] + * @param options [description] + */ + setCircle(radius: number, options: object): Phaser.GameObjects.GameObject; + /** + * Set the body on the Game Object to a polygon shape. + * @param radius The radius of the polygon. + * @param sides The amount of sides creating the polygon. + * @param options A matterjs config object. + */ + setPolygon(radius: number, sides: number, options: object): Phaser.GameObjects.GameObject; + /** + * Creates a new matterjs trapezoid body. + * @param width The width of the trapezoid. + * @param height The height of the trapezoid. + * @param slope The angle of slope for the trapezoid. + * @param options A matterjs config object for the body. + */ + setTrapezoid(width: number, height: number, slope: number, options: object): Phaser.GameObjects.GameObject; + /** + * [description] + * @param body [description] + * @param addToWorld Should the newly created body be immediately added to the World? Default true. + */ + setExistingBody(body: MatterJS.Body, addToWorld?: boolean): Phaser.GameObjects.GameObject; + /** + * [description] + * @param config [description] + * @param options [description] + */ + setBody(config: object, options: object): Phaser.GameObjects.GameObject; + } + + /** + * [description] + */ + interface Sleep { + /** + * [description] + * @param value [description] Default 60. + */ + setSleepThreshold(value?: number): Phaser.GameObjects.GameObject; + /** + * [description] + * @param start [description] + * @param end [description] + */ + setSleepEvents(start: boolean, end: boolean): Phaser.GameObjects.GameObject; + /** + * [description] + * @param value [description] + */ + setSleepStartEvent(value: boolean): Phaser.GameObjects.GameObject; + /** + * [description] + * @param value [description] + */ + setSleepEndEvent(value: boolean): Phaser.GameObjects.GameObject; + } + + /** + * Provides methods used for getting and setting the static state of a physics body. + */ + interface Static { + /** + * Changes the physics body to be either static `true` or dynamic `false`. + * @param value `true` to set the body as being static, or `false` to make it dynamic. + */ + setStatic(value: boolean): Phaser.GameObjects.GameObject; + /** + * Returns `true` if the body is static, otherwise `false` for a dynamic body. + */ + isStatic(): boolean; + } + + /** + * Provides methods used for getting and setting the position, scale and rotation of a Game Object. + */ + interface Transform { + /** + * The x position of this Game Object. + */ + x: number; + /** + * The y position of this Game Object. + */ + y: number; + /** + * The horizontal scale of this Game Object. + */ + scaleX: number; + /** + * The vertical scale of this Game Object. + */ + scaleY: number; + /** + * Use `angle` to set or get rotation of the physics body associated to this GameObject. + * Unlike rotation, when using set the value can be in degrees, which will be converted to radians internally. + */ + angle: number; + /** + * Use `rotation` to set or get the rotation of the physics body associated with this GameObject. + * The value when set must be in radians. + */ + rotation: number; + /** + * Returns the center x offset of the Body this Game Object is using. + * + * This is calculated by taking the difference between the center of the frame and the center of + * the physics body. If set, the `body.render.sprite.xOffset` value is then added to it. + * + * Use this when setting the Origin of a Physics Game Object post-creation, i.e.: + * + * `setOrigin(originX + centerOffsetX, originY + centerOffsetY)` + */ + readonly centerOffsetX: number; + /** + * Returns the center y offset of the Body this Game Object is using. + * + * This is calculated by taking the difference between the center of the frame and the center of + * the physics body. If set, the `body.render.sprite.yOffset` value is then added to it. + * + * Use this when setting the Origin of a Physics Game Object post-creation, i.e.: + * + * `setOrigin(originX + centerOffsetX, originY + centerOffsetY)` + */ + readonly centerOffsetY: number; + /** + * Sets the position of the physics body along x and y axes. + * Both the parameters to this function are optional and if not passed any they default to 0. + * Velocity, angle, force etc. are unchanged. + * @param x The horizontal position of the body. Default 0. + * @param y The vertical position of the body. Default x. + */ + setPosition(x?: number, y?: number): this; + /** + * Immediately sets the angle of the Body. + * Angular velocity, position, force etc. are unchanged. + * @param radians The angle of the body, in radians. Default 0. + */ + setRotation(radians?: number): this; + /** + * Setting fixed rotation sets the Body inertia to Infinity, which stops it + * from being able to rotate when forces are applied to it. + */ + setFixedRotation(): this; + /** + * Immediately sets the angle of the Body. + * Angular velocity, position, force etc. are unchanged. + * @param degrees The angle to set, in degrees. Default 0. + */ + setAngle(degrees?: number): this; + /** + * Sets the scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. + * @param y The vertical scale of this Game Object. If not set it will use the x value. Default x. + * @param point The point (Vector2) from which scaling will occur. + */ + setScale(x?: number, y?: number, point?: Phaser.Math.Vector2): this; + } + + /** + * [description] + */ + interface Velocity { + /** + * [description] + * @param value [description] + */ + setAngularVelocity(value: number): Phaser.GameObjects.GameObject; + /** + * Sets the horizontal velocity of the physics body. + * @param x The horizontal velocity value. + */ + setVelocityX(x: number): Phaser.GameObjects.GameObject; + /** + * Sets vertical velocity of the physics body. + * @param y The vertical velocity value. + */ + setVelocityY(y: number): Phaser.GameObjects.GameObject; + /** + * Sets both the horizontal and vertical velocity of the physics body. + * @param x The horizontal velocity value. + * @param y The vertical velocity value, it can be either positive or negative. If not given, it will be the same as the `x` value. Default x. + */ + setVelocity(x: number, y?: number): Phaser.GameObjects.GameObject; + } + + } + + namespace Events { + type AfterAddEvent = { + /** + * An array of the object(s) that have been added. May be a single body, constraint, composite or a mixture of these. + */ + object: any[]; + /** + * The source object of the event. + */ + source: any; + /** + * The name of the event. + */ + name: string; + }; + + /** + * The Matter Physics After Add Event. + * + * This event is dispatched by a Matter Physics World instance at the end of the process when a new Body + * or Constraint has just been added to the world. + * + * Listen to it from a Scene using: `this.matter.world.on('afteradd', listener)`. + */ + const AFTER_ADD: any; + + type AfterRemoveEvent = { + /** + * An array of the object(s) that were removed. May be a single body, constraint, composite or a mixture of these. + */ + object: any[]; + /** + * The source object of the event. + */ + source: any; + /** + * The name of the event. + */ + name: string; + }; + + /** + * The Matter Physics After Remove Event. + * + * This event is dispatched by a Matter Physics World instance at the end of the process when a + * Body or Constraint was removed from the world. + * + * Listen to it from a Scene using: `this.matter.world.on('afterremove', listener)`. + */ + const AFTER_REMOVE: any; + + type AfterUpdateEvent = { + /** + * The Matter Engine `timing.timestamp` value for the event. + */ + timestamp: number; + /** + * The source object of the event. + */ + source: any; + /** + * The name of the event. + */ + name: string; + }; + + /** + * The Matter Physics After Update Event. + * + * This event is dispatched by a Matter Physics World instance after the engine has updated and all collision events have resolved. + * + * Listen to it from a Scene using: `this.matter.world.on('afterupdate', listener)`. + */ + const AFTER_UPDATE: any; + + type BeforeAddEvent = { + /** + * An array of the object(s) to be added. May be a single body, constraint, composite or a mixture of these. + */ + object: any[]; + /** + * The source object of the event. + */ + source: any; + /** + * The name of the event. + */ + name: string; + }; + + /** + * The Matter Physics Before Add Event. + * + * This event is dispatched by a Matter Physics World instance at the start of the process when a new Body + * or Constraint is being added to the world. + * + * Listen to it from a Scene using: `this.matter.world.on('beforeadd', listener)`. + */ + const BEFORE_ADD: any; + + type BeforeRemoveEvent = { + /** + * An array of the object(s) to be removed. May be a single body, constraint, composite or a mixture of these. + */ + object: any[]; + /** + * The source object of the event. + */ + source: any; + /** + * The name of the event. + */ + name: string; + }; + + /** + * The Matter Physics Before Remove Event. + * + * This event is dispatched by a Matter Physics World instance at the start of the process when a + * Body or Constraint is being removed from the world. + * + * Listen to it from a Scene using: `this.matter.world.on('beforeremove', listener)`. + */ + const BEFORE_REMOVE: any; + + type BeforeUpdateEvent = { + /** + * The Matter Engine `timing.timestamp` value for the event. + */ + timestamp: number; + /** + * The source object of the event. + */ + source: any; + /** + * The name of the event. + */ + name: string; + }; + + /** + * The Matter Physics Before Update Event. + * + * This event is dispatched by a Matter Physics World instance right before all the collision processing takes place. + * + * Listen to it from a Scene using: `this.matter.world.on('beforeupdate', listener)`. + */ + const BEFORE_UPDATE: any; + + type CollisionActiveEvent = { + /** + * A list of all affected pairs in the collision. + */ + pairs: Phaser.Types.Physics.Matter.MatterCollisionData[]; + /** + * The Matter Engine `timing.timestamp` value for the event. + */ + timestamp: number; + /** + * The source object of the event. + */ + source: any; + /** + * The name of the event. + */ + name: string; + }; + + /** + * The Matter Physics Collision Active Event. + * + * This event is dispatched by a Matter Physics World instance after the engine has updated. + * It provides a list of all pairs that are colliding in the current tick (if any). + * + * Listen to it from a Scene using: `this.matter.world.on('collisionactive', listener)`. + */ + const COLLISION_ACTIVE: any; + + type CollisionEndEvent = { + /** + * A list of all affected pairs in the collision. + */ + pairs: Phaser.Types.Physics.Matter.MatterCollisionData[]; + /** + * The Matter Engine `timing.timestamp` value for the event. + */ + timestamp: number; + /** + * The source object of the event. + */ + source: any; + /** + * The name of the event. + */ + name: string; + }; + + /** + * The Matter Physics Collision End Event. + * + * This event is dispatched by a Matter Physics World instance after the engine has updated. + * It provides a list of all pairs that have finished colliding in the current tick (if any). + * + * Listen to it from a Scene using: `this.matter.world.on('collisionend', listener)`. + */ + const COLLISION_END: any; + + type CollisionStartEvent = { + /** + * A list of all affected pairs in the collision. + */ + pairs: Phaser.Types.Physics.Matter.MatterCollisionData[]; + /** + * The Matter Engine `timing.timestamp` value for the event. + */ + timestamp: number; + /** + * The source object of the event. + */ + source: any; + /** + * The name of the event. + */ + name: string; + }; + + /** + * The Matter Physics Collision Start Event. + * + * This event is dispatched by a Matter Physics World instance after the engine has updated. + * It provides a list of all pairs that have started to collide in the current tick (if any). + * + * Listen to it from a Scene using: `this.matter.world.on('collisionstart', listener)`. + */ + const COLLISION_START: any; + + /** + * The Matter Physics Drag End Event. + * + * This event is dispatched by a Matter Physics World instance when a Pointer Constraint + * stops dragging a body. + * + * Listen to it from a Scene using: `this.matter.world.on('dragend', listener)`. + */ + const DRAG_END: any; + + /** + * The Matter Physics Drag Event. + * + * This event is dispatched by a Matter Physics World instance when a Pointer Constraint + * is actively dragging a body. It is emitted each time the pointer moves. + * + * Listen to it from a Scene using: `this.matter.world.on('drag', listener)`. + */ + const DRAG: any; + + /** + * The Matter Physics Drag Start Event. + * + * This event is dispatched by a Matter Physics World instance when a Pointer Constraint + * starts dragging a body. + * + * Listen to it from a Scene using: `this.matter.world.on('dragstart', listener)`. + */ + const DRAG_START: any; + + /** + * The Matter Physics World Pause Event. + * + * This event is dispatched by an Matter Physics World instance when it is paused. + * + * Listen to it from a Scene using: `this.matter.world.on('pause', listener)`. + */ + const PAUSE: any; + + /** + * The Matter Physics World Resume Event. + * + * This event is dispatched by an Matter Physics World instance when it resumes from a paused state. + * + * Listen to it from a Scene using: `this.matter.world.on('resume', listener)`. + */ + const RESUME: any; + + type SleepEndEvent = { + /** + * The source object of the event. + */ + source: any; + /** + * The name of the event. + */ + name: string; + }; + + /** + * The Matter Physics Sleep End Event. + * + * This event is dispatched by a Matter Physics World instance when a Body stop sleeping. + * + * Listen to it from a Scene using: `this.matter.world.on('sleepend', listener)`. + */ + const SLEEP_END: any; + + type SleepStartEvent = { + /** + * The source object of the event. + */ + source: any; + /** + * The name of the event. + */ + name: string; + }; + + /** + * The Matter Physics Sleep Start Event. + * + * This event is dispatched by a Matter Physics World instance when a Body goes to sleep. + * + * Listen to it from a Scene using: `this.matter.world.on('sleepstart', listener)`. + */ + const SLEEP_START: any; + + } + } } @@ -71094,6 +71780,24 @@ declare namespace Phaser { XOR, } + /** + * Phaser Scale Modes. + */ + enum ScaleModes { + /** + * Default Scale Mode (Linear). + */ + DEFAULT, + /** + * Linear Scale Mode. + */ + LINEAR, + /** + * Nearest Scale Mode. + */ + NEAREST, + } + namespace Renderer { namespace Canvas { /** @@ -71377,600 +72081,6 @@ declare namespace Phaser { } namespace WebGL { - namespace Pipelines { - /** - * BitmapMaskPipeline handles all bitmap masking rendering in WebGL. It works by using - * sampling two texture on the fragment shader and using the fragment's alpha to clip the region. - * The config properties are: - * - game: Current game instance. - * - renderer: Current WebGL renderer. - * - topology: This indicates how the primitives are rendered. The default value is GL_TRIANGLES. - * Here is the full list of rendering primitives (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants). - * - vertShader: Source for vertex shader as a string. - * - fragShader: Source for fragment shader as a string. - * - vertexCapacity: The amount of vertices that shall be allocated - * - vertexSize: The size of a single vertex in bytes. - */ - class BitmapMaskPipeline extends Phaser.Renderer.WebGL.WebGLPipeline { - /** - * - * @param config Used for overriding shader an pipeline properties if extending this pipeline. - */ - constructor(config: object); - - /** - * Float32 view of the array buffer containing the pipeline's vertices. - */ - vertexViewF32: Float32Array; - - /** - * Size of the batch. - */ - maxQuads: number; - - /** - * Dirty flag to check if resolution properties need to be updated on the - * masking shader. - */ - resolutionDirty: boolean; - - /** - * Called every time the pipeline needs to be used. - * It binds all necessary resources. - */ - onBind(): this; - - /** - * [description] - * @param width [description] - * @param height [description] - * @param resolution [description] - */ - resize(width: number, height: number, resolution: number): this; - - /** - * Binds necessary resources and renders the mask to a separated framebuffer. - * The framebuffer for the masked object is also bound for further use. - * @param mask GameObject used as mask. - * @param maskedObject GameObject masked by the mask GameObject. - * @param camera [description] - */ - beginMask(mask: Phaser.GameObjects.GameObject, maskedObject: Phaser.GameObjects.GameObject, camera: Phaser.Cameras.Scene2D.Camera): void; - - /** - * The masked game objects framebuffer is unbound and its texture - * is bound together with the mask texture and the mask shader and - * a draw call with a single quad is processed. Here is where the - * masking effect is applied. - * @param mask GameObject used as a mask. - */ - endMask(mask: Phaser.GameObjects.GameObject): void; - - } - - /** - * Implements a model view projection matrices. - * Pipelines can implement this for doing 2D and 3D rendering. - */ - interface ModelViewProjection { - /** - * Dirty flag for checking if model matrix needs to be updated on GPU. - */ - modelMatrixDirty: boolean; - /** - * Dirty flag for checking if view matrix needs to be updated on GPU. - */ - viewMatrixDirty: boolean; - /** - * Dirty flag for checking if projection matrix needs to be updated on GPU. - */ - projectionMatrixDirty: boolean; - /** - * Model matrix - */ - modelMatrix: Float32Array; - /** - * View matrix - */ - viewMatrix: Float32Array; - /** - * Projection matrix - */ - projectionMatrix: Float32Array; - /** - * Initializes MVP matrices with an identity matrix - */ - mvpInit(): void; - /** - * If dirty flags are set then the matrices are uploaded to the GPU. - */ - mvpUpdate(): void; - /** - * Loads an identity matrix to the model matrix - */ - modelIdentity(): void; - /** - * Scale model matrix - * @param x The x component. - * @param y The y component. - * @param z The z component. - */ - modelScale(x: number, y: number, z: number): this; - /** - * Translate model matrix - * @param x The x component. - * @param y The y component. - * @param z The z component. - */ - modelTranslate(x: number, y: number, z: number): this; - /** - * Rotates the model matrix in the X axis. - * @param radians The amount to rotate by. - */ - modelRotateX(radians: number): this; - /** - * Rotates the model matrix in the Y axis. - * @param radians The amount to rotate by. - */ - modelRotateY(radians: number): this; - /** - * Rotates the model matrix in the Z axis. - * @param radians The amount to rotate by. - */ - modelRotateZ(radians: number): this; - /** - * Loads identity matrix into the view matrix - */ - viewIdentity(): this; - /** - * Scales view matrix - * @param x The x component. - * @param y The y component. - * @param z The z component. - */ - viewScale(x: number, y: number, z: number): this; - /** - * Translates view matrix - * @param x The x component. - * @param y The y component. - * @param z The z component. - */ - viewTranslate(x: number, y: number, z: number): this; - /** - * Rotates view matrix in the X axis. - * @param radians The amount to rotate by. - */ - viewRotateX(radians: number): this; - /** - * Rotates view matrix in the Y axis. - * @param radians The amount to rotate by. - */ - viewRotateY(radians: number): this; - /** - * Rotates view matrix in the Z axis. - * @param radians The amount to rotate by. - */ - viewRotateZ(radians: number): this; - /** - * Loads a 2D view matrix (3x2 matrix) into a 4x4 view matrix - * @param matrix2D The Matrix2D. - */ - viewLoad2D(matrix2D: Float32Array): this; - /** - * Copies a 4x4 matrix into the view matrix - * @param matrix The Matrix2D. - */ - viewLoad(matrix: Float32Array): this; - /** - * Loads identity matrix into the projection matrix. - */ - projIdentity(): this; - /** - * Sets up an orthographic projection matrix - * @param left The left value. - * @param right The right value. - * @param bottom The bottom value. - * @param top The top value. - * @param near The near value. - * @param far The far value. - */ - projOrtho(left: number, right: number, bottom: number, top: number, near: number, far: number): this; - /** - * Sets up a perspective projection matrix - * @param fovY The fov value. - * @param aspectRatio The aspectRatio value. - * @param near The near value. - * @param far The far value. - */ - projPersp(fovY: number, aspectRatio: number, near: number, far: number): this; - } - - /** - * ForwardDiffuseLightPipeline implements a forward rendering approach for 2D lights. - * This pipeline extends TextureTintPipeline so it implements all it's rendering functions - * and batching system. - */ - class ForwardDiffuseLightPipeline extends Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline { - /** - * - * @param config The configuration of the pipeline, same as the {@link Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline}. The fragment shader will be replaced with the lighting shader. - */ - constructor(config: object); - - /** - * This function sets all the needed resources for each camera pass. - * @param scene The Scene being rendered. - * @param camera The Scene Camera being rendered with. - */ - onRender(scene: Phaser.Scene, camera: Phaser.Cameras.Scene2D.Camera): this; - - /** - * Generic function for batching a textured quad - * @param gameObject Source GameObject - * @param texture Raw WebGLTexture associated with the quad - * @param textureWidth Real texture width - * @param textureHeight Real texture height - * @param srcX X coordinate of the quad - * @param srcY Y coordinate of the quad - * @param srcWidth Width of the quad - * @param srcHeight Height of the quad - * @param scaleX X component of scale - * @param scaleY Y component of scale - * @param rotation Rotation of the quad - * @param flipX Indicates if the quad is horizontally flipped - * @param flipY Indicates if the quad is vertically flipped - * @param scrollFactorX By which factor is the quad affected by the camera horizontal scroll - * @param scrollFactorY By which factor is the quad effected by the camera vertical scroll - * @param displayOriginX Horizontal origin in pixels - * @param displayOriginY Vertical origin in pixels - * @param frameX X coordinate of the texture frame - * @param frameY Y coordinate of the texture frame - * @param frameWidth Width of the texture frame - * @param frameHeight Height of the texture frame - * @param tintTL Tint for top left - * @param tintTR Tint for top right - * @param tintBL Tint for bottom left - * @param tintBR Tint for bottom right - * @param tintEffect The tint effect (0 for additive, 1 for replacement) - * @param uOffset Horizontal offset on texture coordinate - * @param vOffset Vertical offset on texture coordinate - * @param camera Current used camera - * @param parentTransformMatrix Parent container - */ - batchTexture(gameObject: Phaser.GameObjects.GameObject, texture: WebGLTexture, textureWidth: integer, textureHeight: integer, srcX: number, srcY: number, srcWidth: number, srcHeight: number, scaleX: number, scaleY: number, rotation: number, flipX: boolean, flipY: boolean, scrollFactorX: number, scrollFactorY: number, displayOriginX: number, displayOriginY: number, frameX: number, frameY: number, frameWidth: number, frameHeight: number, tintTL: integer, tintTR: integer, tintBL: integer, tintBR: integer, tintEffect: number, uOffset: number, vOffset: number, camera: Phaser.Cameras.Scene2D.Camera, parentTransformMatrix: Phaser.GameObjects.Components.TransformMatrix): void; - - /** - * Sets the Game Objects normal map as the active texture. - * @param gameObject The Game Object to update. - */ - setNormalMap(gameObject: Phaser.GameObjects.GameObject): void; - - /** - * Rotates the normal map vectors inversely by the given angle. - * Only works in 2D space. - * @param rotation The angle of rotation in radians. - */ - setNormalMapRotation(rotation: number): void; - - /** - * Takes a Sprite Game Object, or any object that extends it, which has a normal texture and adds it to the batch. - * @param sprite The texture-based Game Object to add to the batch. - * @param camera The Camera to use for the rendering transform. - * @param parentTransformMatrix The transform matrix of the parent container, if set. - */ - batchSprite(sprite: Phaser.GameObjects.Sprite, camera: Phaser.Cameras.Scene2D.Camera, parentTransformMatrix: Phaser.GameObjects.Components.TransformMatrix): void; - - } - - /** - * TextureTintPipeline implements the rendering infrastructure - * for displaying textured objects - * The config properties are: - * - game: Current game instance. - * - renderer: Current WebGL renderer. - * - topology: This indicates how the primitives are rendered. The default value is GL_TRIANGLES. - * Here is the full list of rendering primitives (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants). - * - vertShader: Source for vertex shader as a string. - * - fragShader: Source for fragment shader as a string. - * - vertexCapacity: The amount of vertices that shall be allocated - * - vertexSize: The size of a single vertex in bytes. - */ - class TextureTintPipeline extends Phaser.Renderer.WebGL.WebGLPipeline { - /** - * - * @param config The configuration options for this Texture Tint Pipeline, as described above. - */ - constructor(config: object); - - /** - * Float32 view of the array buffer containing the pipeline's vertices. - */ - vertexViewF32: Float32Array; - - /** - * Uint32 view of the array buffer containing the pipeline's vertices. - */ - vertexViewU32: Uint32Array; - - /** - * Size of the batch. - */ - maxQuads: integer; - - /** - * Collection of batch information - */ - batches: any[]; - - /** - * Called every time the pipeline needs to be used. - * It binds all necessary resources. - */ - onBind(): this; - - /** - * Resizes this pipeline and updates the projection. - * @param width The new width. - * @param height The new height. - * @param resolution The resolution. - */ - resize(width: number, height: number, resolution: number): this; - - /** - * Assigns a texture to the current batch. If a different texture is already set it creates a new batch object. - * @param texture WebGLTexture that will be assigned to the current batch. If not given uses blankTexture. - * @param unit Texture unit to which the texture needs to be bound. Default 0. - */ - setTexture2D(texture?: WebGLTexture, unit?: integer): Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline; - - /** - * Checks if the current batch has the same texture and texture unit, or if we need to create a new batch. - * @param texture WebGLTexture that will be assigned to the current batch. If not given uses blankTexture. - * @param unit Texture unit to which the texture needs to be bound. - */ - requireTextureBatch(texture: WebGLTexture, unit: integer): boolean; - - /** - * Creates a new batch object and pushes it to a batch array. - * The batch object contains information relevant to the current - * vertex batch like the offset in the vertex buffer, vertex count and - * the textures used by that batch. - * @param texture Optional WebGLTexture that will be assigned to the created batch. - * @param unit Texture unit to which the texture needs to be bound. - */ - pushBatch(texture: WebGLTexture, unit: integer): void; - - /** - * Uploads the vertex data and emits a draw call for the current batch of vertices. - */ - flush(): this; - - /** - * Takes a Sprite Game Object, or any object that extends it, and adds it to the batch. - * @param sprite The texture based Game Object to add to the batch. - * @param camera The Camera to use for the rendering transform. - * @param parentTransformMatrix The transform matrix of the parent container, if set. - */ - batchSprite(sprite: Phaser.GameObjects.Image | Phaser.GameObjects.Sprite, camera: Phaser.Cameras.Scene2D.Camera, parentTransformMatrix?: Phaser.GameObjects.Components.TransformMatrix): void; - - /** - * Adds the vertices data into the batch and flushes if full. - * - * Assumes 6 vertices in the following arrangement: - * - * ``` - * 0----3 - * |\ B| - * | \ | - * | \ | - * | A \| - * | \ - * 1----2 - * ``` - * - * Where tx0/ty0 = 0, tx1/ty1 = 1, tx2/ty2 = 2 and tx3/ty3 = 3 - * @param x0 The top-left x position. - * @param y0 The top-left y position. - * @param x1 The bottom-left x position. - * @param y1 The bottom-left y position. - * @param x2 The bottom-right x position. - * @param y2 The bottom-right y position. - * @param x3 The top-right x position. - * @param y3 The top-right y position. - * @param u0 UV u0 value. - * @param v0 UV v0 value. - * @param u1 UV u1 value. - * @param v1 UV v1 value. - * @param tintTL The top-left tint color value. - * @param tintTR The top-right tint color value. - * @param tintBL The bottom-left tint color value. - * @param tintBR The bottom-right tint color value. - * @param tintEffect The tint effect for the shader to use. - * @param texture WebGLTexture that will be assigned to the current batch if a flush occurs. - * @param unit Texture unit to which the texture needs to be bound. Default 0. - */ - batchQuad(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, u0: number, v0: number, u1: number, v1: number, tintTL: number, tintTR: number, tintBL: number, tintBR: number, tintEffect: number | boolean, texture?: WebGLTexture, unit?: integer): boolean; - - /** - * Adds the vertices data into the batch and flushes if full. - * - * Assumes 3 vertices in the following arrangement: - * - * ``` - * 0 - * |\ - * | \ - * | \ - * | \ - * | \ - * 1-----2 - * ``` - * @param x1 The bottom-left x position. - * @param y1 The bottom-left y position. - * @param x2 The bottom-right x position. - * @param y2 The bottom-right y position. - * @param x3 The top-right x position. - * @param y3 The top-right y position. - * @param u0 UV u0 value. - * @param v0 UV v0 value. - * @param u1 UV u1 value. - * @param v1 UV v1 value. - * @param tintTL The top-left tint color value. - * @param tintTR The top-right tint color value. - * @param tintBL The bottom-left tint color value. - * @param tintEffect The tint effect for the shader to use. - * @param texture WebGLTexture that will be assigned to the current batch if a flush occurs. - * @param unit Texture unit to which the texture needs to be bound. Default 0. - */ - batchTri(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, u0: number, v0: number, u1: number, v1: number, tintTL: number, tintTR: number, tintBL: number, tintEffect: number | boolean, texture?: WebGLTexture, unit?: integer): boolean; - - /** - * Generic function for batching a textured quad using argument values instead of a Game Object. - * @param gameObject Source GameObject. - * @param texture Raw WebGLTexture associated with the quad. - * @param textureWidth Real texture width. - * @param textureHeight Real texture height. - * @param srcX X coordinate of the quad. - * @param srcY Y coordinate of the quad. - * @param srcWidth Width of the quad. - * @param srcHeight Height of the quad. - * @param scaleX X component of scale. - * @param scaleY Y component of scale. - * @param rotation Rotation of the quad. - * @param flipX Indicates if the quad is horizontally flipped. - * @param flipY Indicates if the quad is vertically flipped. - * @param scrollFactorX By which factor is the quad affected by the camera horizontal scroll. - * @param scrollFactorY By which factor is the quad effected by the camera vertical scroll. - * @param displayOriginX Horizontal origin in pixels. - * @param displayOriginY Vertical origin in pixels. - * @param frameX X coordinate of the texture frame. - * @param frameY Y coordinate of the texture frame. - * @param frameWidth Width of the texture frame. - * @param frameHeight Height of the texture frame. - * @param tintTL Tint for top left. - * @param tintTR Tint for top right. - * @param tintBL Tint for bottom left. - * @param tintBR Tint for bottom right. - * @param tintEffect The tint effect. - * @param uOffset Horizontal offset on texture coordinate. - * @param vOffset Vertical offset on texture coordinate. - * @param camera Current used camera. - * @param parentTransformMatrix Parent container. - * @param skipFlip Skip the renderTexture check. Default false. - */ - batchTexture(gameObject: Phaser.GameObjects.GameObject, texture: WebGLTexture, textureWidth: integer, textureHeight: integer, srcX: number, srcY: number, srcWidth: number, srcHeight: number, scaleX: number, scaleY: number, rotation: number, flipX: boolean, flipY: boolean, scrollFactorX: number, scrollFactorY: number, displayOriginX: number, displayOriginY: number, frameX: number, frameY: number, frameWidth: number, frameHeight: number, tintTL: integer, tintTR: integer, tintBL: integer, tintBR: integer, tintEffect: number, uOffset: number, vOffset: number, camera: Phaser.Cameras.Scene2D.Camera, parentTransformMatrix: Phaser.GameObjects.Components.TransformMatrix, skipFlip?: boolean): void; - - /** - * Adds a Texture Frame into the batch for rendering. - * @param frame The Texture Frame to be rendered. - * @param x The horizontal position to render the texture at. - * @param y The vertical position to render the texture at. - * @param tint The tint color. - * @param alpha The alpha value. - * @param transformMatrix The Transform Matrix to use for the texture. - * @param parentTransformMatrix A parent Transform Matrix. - */ - batchTextureFrame(frame: Phaser.Textures.Frame, x: number, y: number, tint: number, alpha: number, transformMatrix: Phaser.GameObjects.Components.TransformMatrix, parentTransformMatrix?: Phaser.GameObjects.Components.TransformMatrix): void; - - /** - * Pushes a filled rectangle into the vertex batch. - * Rectangle has no transform values and isn't transformed into the local space. - * Used for directly batching untransformed rectangles, such as Camera background colors. - * @param x Horizontal top left coordinate of the rectangle. - * @param y Vertical top left coordinate of the rectangle. - * @param width Width of the rectangle. - * @param height Height of the rectangle. - * @param color Color of the rectangle to draw. - * @param alpha Alpha value of the rectangle to draw. - */ - drawFillRect(x: number, y: number, width: number, height: number, color: number, alpha: number): void; - - /** - * Pushes a filled rectangle into the vertex batch. - * Rectangle factors in the given transform matrices before adding to the batch. - * @param x Horizontal top left coordinate of the rectangle. - * @param y Vertical top left coordinate of the rectangle. - * @param width Width of the rectangle. - * @param height Height of the rectangle. - * @param currentMatrix The current transform. - * @param parentMatrix The parent transform. - */ - batchFillRect(x: number, y: number, width: number, height: number, currentMatrix: Phaser.GameObjects.Components.TransformMatrix, parentMatrix: Phaser.GameObjects.Components.TransformMatrix): void; - - /** - * Pushes a filled triangle into the vertex batch. - * Triangle factors in the given transform matrices before adding to the batch. - * @param x0 Point 0 x coordinate. - * @param y0 Point 0 y coordinate. - * @param x1 Point 1 x coordinate. - * @param y1 Point 1 y coordinate. - * @param x2 Point 2 x coordinate. - * @param y2 Point 2 y coordinate. - * @param currentMatrix The current transform. - * @param parentMatrix The parent transform. - */ - batchFillTriangle(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, currentMatrix: Phaser.GameObjects.Components.TransformMatrix, parentMatrix: Phaser.GameObjects.Components.TransformMatrix): void; - - /** - * Pushes a stroked triangle into the vertex batch. - * Triangle factors in the given transform matrices before adding to the batch. - * The triangle is created from 3 lines and drawn using the `batchStrokePath` method. - * @param x0 Point 0 x coordinate. - * @param y0 Point 0 y coordinate. - * @param x1 Point 1 x coordinate. - * @param y1 Point 1 y coordinate. - * @param x2 Point 2 x coordinate. - * @param y2 Point 2 y coordinate. - * @param lineWidth The width of the line in pixels. - * @param currentMatrix The current transform. - * @param parentMatrix The parent transform. - */ - batchStrokeTriangle(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, lineWidth: number, currentMatrix: Phaser.GameObjects.Components.TransformMatrix, parentMatrix: Phaser.GameObjects.Components.TransformMatrix): void; - - /** - * Adds the given path to the vertex batch for rendering. - * - * It works by taking the array of path data and then passing it through Earcut, which - * creates a list of polygons. Each polygon is then added to the batch. - * - * The path is always automatically closed because it's filled. - * @param path Collection of points that represent the path. - * @param currentMatrix The current transform. - * @param parentMatrix The parent transform. - */ - batchFillPath(path: any[], currentMatrix: Phaser.GameObjects.Components.TransformMatrix, parentMatrix: Phaser.GameObjects.Components.TransformMatrix): void; - - /** - * Adds the given path to the vertex batch for rendering. - * - * It works by taking the array of path data and calling `batchLine` for each section - * of the path. - * - * The path is optionally closed at the end. - * @param path Collection of points that represent the path. - * @param lineWidth The width of the line segments in pixels. - * @param pathOpen Indicates if the path should be closed or left open. - * @param currentMatrix The current transform. - * @param parentMatrix The parent transform. - */ - batchStrokePath(path: any[], lineWidth: number, pathOpen: boolean, currentMatrix: Phaser.GameObjects.Components.TransformMatrix, parentMatrix: Phaser.GameObjects.Components.TransformMatrix): void; - - /** - * Creates a quad and adds it to the vertex batch based on the given line values. - * @param ax X coordinate to the start of the line - * @param ay Y coordinate to the start of the line - * @param bx X coordinate to the end of the line - * @param by Y coordinate to the end of the line - * @param aLineWidth Width of the start of the line - * @param bLineWidth Width of the end of the line - * @param currentMatrix Parent matrix, generally used by containers - */ - batchLine(ax: number, ay: number, bx: number, by: number, aLineWidth: number, bLineWidth: number, currentMatrix: Float32Array): void; - - } - - } - namespace Utils { /** * Packs four floats on a range from 0.0 to 1.0 into a single Uint32 @@ -73197,203 +73307,605 @@ declare namespace Phaser { } + namespace Pipelines { + /** + * BitmapMaskPipeline handles all bitmap masking rendering in WebGL. It works by using + * sampling two texture on the fragment shader and using the fragment's alpha to clip the region. + * The config properties are: + * - game: Current game instance. + * - renderer: Current WebGL renderer. + * - topology: This indicates how the primitives are rendered. The default value is GL_TRIANGLES. + * Here is the full list of rendering primitives (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants). + * - vertShader: Source for vertex shader as a string. + * - fragShader: Source for fragment shader as a string. + * - vertexCapacity: The amount of vertices that shall be allocated + * - vertexSize: The size of a single vertex in bytes. + */ + class BitmapMaskPipeline extends Phaser.Renderer.WebGL.WebGLPipeline { + /** + * + * @param config Used for overriding shader an pipeline properties if extending this pipeline. + */ + constructor(config: object); + + /** + * Float32 view of the array buffer containing the pipeline's vertices. + */ + vertexViewF32: Float32Array; + + /** + * Size of the batch. + */ + maxQuads: number; + + /** + * Dirty flag to check if resolution properties need to be updated on the + * masking shader. + */ + resolutionDirty: boolean; + + /** + * Called every time the pipeline needs to be used. + * It binds all necessary resources. + */ + onBind(): this; + + /** + * [description] + * @param width [description] + * @param height [description] + * @param resolution [description] + */ + resize(width: number, height: number, resolution: number): this; + + /** + * Binds necessary resources and renders the mask to a separated framebuffer. + * The framebuffer for the masked object is also bound for further use. + * @param mask GameObject used as mask. + * @param maskedObject GameObject masked by the mask GameObject. + * @param camera [description] + */ + beginMask(mask: Phaser.GameObjects.GameObject, maskedObject: Phaser.GameObjects.GameObject, camera: Phaser.Cameras.Scene2D.Camera): void; + + /** + * The masked game objects framebuffer is unbound and its texture + * is bound together with the mask texture and the mask shader and + * a draw call with a single quad is processed. Here is where the + * masking effect is applied. + * @param mask GameObject used as a mask. + */ + endMask(mask: Phaser.GameObjects.GameObject): void; + + } + + /** + * ForwardDiffuseLightPipeline implements a forward rendering approach for 2D lights. + * This pipeline extends TextureTintPipeline so it implements all it's rendering functions + * and batching system. + */ + class ForwardDiffuseLightPipeline extends Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline { + /** + * + * @param config The configuration of the pipeline, same as the {@link Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline}. The fragment shader will be replaced with the lighting shader. + */ + constructor(config: object); + + /** + * This function sets all the needed resources for each camera pass. + * @param scene The Scene being rendered. + * @param camera The Scene Camera being rendered with. + */ + onRender(scene: Phaser.Scene, camera: Phaser.Cameras.Scene2D.Camera): this; + + /** + * Generic function for batching a textured quad + * @param gameObject Source GameObject + * @param texture Raw WebGLTexture associated with the quad + * @param textureWidth Real texture width + * @param textureHeight Real texture height + * @param srcX X coordinate of the quad + * @param srcY Y coordinate of the quad + * @param srcWidth Width of the quad + * @param srcHeight Height of the quad + * @param scaleX X component of scale + * @param scaleY Y component of scale + * @param rotation Rotation of the quad + * @param flipX Indicates if the quad is horizontally flipped + * @param flipY Indicates if the quad is vertically flipped + * @param scrollFactorX By which factor is the quad affected by the camera horizontal scroll + * @param scrollFactorY By which factor is the quad effected by the camera vertical scroll + * @param displayOriginX Horizontal origin in pixels + * @param displayOriginY Vertical origin in pixels + * @param frameX X coordinate of the texture frame + * @param frameY Y coordinate of the texture frame + * @param frameWidth Width of the texture frame + * @param frameHeight Height of the texture frame + * @param tintTL Tint for top left + * @param tintTR Tint for top right + * @param tintBL Tint for bottom left + * @param tintBR Tint for bottom right + * @param tintEffect The tint effect (0 for additive, 1 for replacement) + * @param uOffset Horizontal offset on texture coordinate + * @param vOffset Vertical offset on texture coordinate + * @param camera Current used camera + * @param parentTransformMatrix Parent container + */ + batchTexture(gameObject: Phaser.GameObjects.GameObject, texture: WebGLTexture, textureWidth: integer, textureHeight: integer, srcX: number, srcY: number, srcWidth: number, srcHeight: number, scaleX: number, scaleY: number, rotation: number, flipX: boolean, flipY: boolean, scrollFactorX: number, scrollFactorY: number, displayOriginX: number, displayOriginY: number, frameX: number, frameY: number, frameWidth: number, frameHeight: number, tintTL: integer, tintTR: integer, tintBL: integer, tintBR: integer, tintEffect: number, uOffset: number, vOffset: number, camera: Phaser.Cameras.Scene2D.Camera, parentTransformMatrix: Phaser.GameObjects.Components.TransformMatrix): void; + + /** + * Sets the Game Objects normal map as the active texture. + * @param gameObject The Game Object to update. + */ + setNormalMap(gameObject: Phaser.GameObjects.GameObject): void; + + /** + * Rotates the normal map vectors inversely by the given angle. + * Only works in 2D space. + * @param rotation The angle of rotation in radians. + */ + setNormalMapRotation(rotation: number): void; + + /** + * Takes a Sprite Game Object, or any object that extends it, which has a normal texture and adds it to the batch. + * @param sprite The texture-based Game Object to add to the batch. + * @param camera The Camera to use for the rendering transform. + * @param parentTransformMatrix The transform matrix of the parent container, if set. + */ + batchSprite(sprite: Phaser.GameObjects.Sprite, camera: Phaser.Cameras.Scene2D.Camera, parentTransformMatrix: Phaser.GameObjects.Components.TransformMatrix): void; + + } + + /** + * TextureTintPipeline implements the rendering infrastructure + * for displaying textured objects + * The config properties are: + * - game: Current game instance. + * - renderer: Current WebGL renderer. + * - topology: This indicates how the primitives are rendered. The default value is GL_TRIANGLES. + * Here is the full list of rendering primitives (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants). + * - vertShader: Source for vertex shader as a string. + * - fragShader: Source for fragment shader as a string. + * - vertexCapacity: The amount of vertices that shall be allocated + * - vertexSize: The size of a single vertex in bytes. + */ + class TextureTintPipeline extends Phaser.Renderer.WebGL.WebGLPipeline { + /** + * + * @param config The configuration options for this Texture Tint Pipeline, as described above. + */ + constructor(config: object); + + /** + * Float32 view of the array buffer containing the pipeline's vertices. + */ + vertexViewF32: Float32Array; + + /** + * Uint32 view of the array buffer containing the pipeline's vertices. + */ + vertexViewU32: Uint32Array; + + /** + * Size of the batch. + */ + maxQuads: integer; + + /** + * Collection of batch information + */ + batches: any[]; + + /** + * Called every time the pipeline needs to be used. + * It binds all necessary resources. + */ + onBind(): this; + + /** + * Resizes this pipeline and updates the projection. + * @param width The new width. + * @param height The new height. + * @param resolution The resolution. + */ + resize(width: number, height: number, resolution: number): this; + + /** + * Assigns a texture to the current batch. If a different texture is already set it creates a new batch object. + * @param texture WebGLTexture that will be assigned to the current batch. If not given uses blankTexture. + * @param unit Texture unit to which the texture needs to be bound. Default 0. + */ + setTexture2D(texture?: WebGLTexture, unit?: integer): Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline; + + /** + * Checks if the current batch has the same texture and texture unit, or if we need to create a new batch. + * @param texture WebGLTexture that will be assigned to the current batch. If not given uses blankTexture. + * @param unit Texture unit to which the texture needs to be bound. + */ + requireTextureBatch(texture: WebGLTexture, unit: integer): boolean; + + /** + * Creates a new batch object and pushes it to a batch array. + * The batch object contains information relevant to the current + * vertex batch like the offset in the vertex buffer, vertex count and + * the textures used by that batch. + * @param texture Optional WebGLTexture that will be assigned to the created batch. + * @param unit Texture unit to which the texture needs to be bound. + */ + pushBatch(texture: WebGLTexture, unit: integer): void; + + /** + * Uploads the vertex data and emits a draw call for the current batch of vertices. + */ + flush(): this; + + /** + * Takes a Sprite Game Object, or any object that extends it, and adds it to the batch. + * @param sprite The texture based Game Object to add to the batch. + * @param camera The Camera to use for the rendering transform. + * @param parentTransformMatrix The transform matrix of the parent container, if set. + */ + batchSprite(sprite: Phaser.GameObjects.Image | Phaser.GameObjects.Sprite, camera: Phaser.Cameras.Scene2D.Camera, parentTransformMatrix?: Phaser.GameObjects.Components.TransformMatrix): void; + + /** + * Adds the vertices data into the batch and flushes if full. + * + * Assumes 6 vertices in the following arrangement: + * + * ``` + * 0----3 + * |\ B| + * | \ | + * | \ | + * | A \| + * | \ + * 1----2 + * ``` + * + * Where tx0/ty0 = 0, tx1/ty1 = 1, tx2/ty2 = 2 and tx3/ty3 = 3 + * @param x0 The top-left x position. + * @param y0 The top-left y position. + * @param x1 The bottom-left x position. + * @param y1 The bottom-left y position. + * @param x2 The bottom-right x position. + * @param y2 The bottom-right y position. + * @param x3 The top-right x position. + * @param y3 The top-right y position. + * @param u0 UV u0 value. + * @param v0 UV v0 value. + * @param u1 UV u1 value. + * @param v1 UV v1 value. + * @param tintTL The top-left tint color value. + * @param tintTR The top-right tint color value. + * @param tintBL The bottom-left tint color value. + * @param tintBR The bottom-right tint color value. + * @param tintEffect The tint effect for the shader to use. + * @param texture WebGLTexture that will be assigned to the current batch if a flush occurs. + * @param unit Texture unit to which the texture needs to be bound. Default 0. + */ + batchQuad(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, u0: number, v0: number, u1: number, v1: number, tintTL: number, tintTR: number, tintBL: number, tintBR: number, tintEffect: number | boolean, texture?: WebGLTexture, unit?: integer): boolean; + + /** + * Adds the vertices data into the batch and flushes if full. + * + * Assumes 3 vertices in the following arrangement: + * + * ``` + * 0 + * |\ + * | \ + * | \ + * | \ + * | \ + * 1-----2 + * ``` + * @param x1 The bottom-left x position. + * @param y1 The bottom-left y position. + * @param x2 The bottom-right x position. + * @param y2 The bottom-right y position. + * @param x3 The top-right x position. + * @param y3 The top-right y position. + * @param u0 UV u0 value. + * @param v0 UV v0 value. + * @param u1 UV u1 value. + * @param v1 UV v1 value. + * @param tintTL The top-left tint color value. + * @param tintTR The top-right tint color value. + * @param tintBL The bottom-left tint color value. + * @param tintEffect The tint effect for the shader to use. + * @param texture WebGLTexture that will be assigned to the current batch if a flush occurs. + * @param unit Texture unit to which the texture needs to be bound. Default 0. + */ + batchTri(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, u0: number, v0: number, u1: number, v1: number, tintTL: number, tintTR: number, tintBL: number, tintEffect: number | boolean, texture?: WebGLTexture, unit?: integer): boolean; + + /** + * Generic function for batching a textured quad using argument values instead of a Game Object. + * @param gameObject Source GameObject. + * @param texture Raw WebGLTexture associated with the quad. + * @param textureWidth Real texture width. + * @param textureHeight Real texture height. + * @param srcX X coordinate of the quad. + * @param srcY Y coordinate of the quad. + * @param srcWidth Width of the quad. + * @param srcHeight Height of the quad. + * @param scaleX X component of scale. + * @param scaleY Y component of scale. + * @param rotation Rotation of the quad. + * @param flipX Indicates if the quad is horizontally flipped. + * @param flipY Indicates if the quad is vertically flipped. + * @param scrollFactorX By which factor is the quad affected by the camera horizontal scroll. + * @param scrollFactorY By which factor is the quad effected by the camera vertical scroll. + * @param displayOriginX Horizontal origin in pixels. + * @param displayOriginY Vertical origin in pixels. + * @param frameX X coordinate of the texture frame. + * @param frameY Y coordinate of the texture frame. + * @param frameWidth Width of the texture frame. + * @param frameHeight Height of the texture frame. + * @param tintTL Tint for top left. + * @param tintTR Tint for top right. + * @param tintBL Tint for bottom left. + * @param tintBR Tint for bottom right. + * @param tintEffect The tint effect. + * @param uOffset Horizontal offset on texture coordinate. + * @param vOffset Vertical offset on texture coordinate. + * @param camera Current used camera. + * @param parentTransformMatrix Parent container. + * @param skipFlip Skip the renderTexture check. Default false. + */ + batchTexture(gameObject: Phaser.GameObjects.GameObject, texture: WebGLTexture, textureWidth: integer, textureHeight: integer, srcX: number, srcY: number, srcWidth: number, srcHeight: number, scaleX: number, scaleY: number, rotation: number, flipX: boolean, flipY: boolean, scrollFactorX: number, scrollFactorY: number, displayOriginX: number, displayOriginY: number, frameX: number, frameY: number, frameWidth: number, frameHeight: number, tintTL: integer, tintTR: integer, tintBL: integer, tintBR: integer, tintEffect: number, uOffset: number, vOffset: number, camera: Phaser.Cameras.Scene2D.Camera, parentTransformMatrix: Phaser.GameObjects.Components.TransformMatrix, skipFlip?: boolean): void; + + /** + * Adds a Texture Frame into the batch for rendering. + * @param frame The Texture Frame to be rendered. + * @param x The horizontal position to render the texture at. + * @param y The vertical position to render the texture at. + * @param tint The tint color. + * @param alpha The alpha value. + * @param transformMatrix The Transform Matrix to use for the texture. + * @param parentTransformMatrix A parent Transform Matrix. + */ + batchTextureFrame(frame: Phaser.Textures.Frame, x: number, y: number, tint: number, alpha: number, transformMatrix: Phaser.GameObjects.Components.TransformMatrix, parentTransformMatrix?: Phaser.GameObjects.Components.TransformMatrix): void; + + /** + * Pushes a filled rectangle into the vertex batch. + * Rectangle has no transform values and isn't transformed into the local space. + * Used for directly batching untransformed rectangles, such as Camera background colors. + * @param x Horizontal top left coordinate of the rectangle. + * @param y Vertical top left coordinate of the rectangle. + * @param width Width of the rectangle. + * @param height Height of the rectangle. + * @param color Color of the rectangle to draw. + * @param alpha Alpha value of the rectangle to draw. + */ + drawFillRect(x: number, y: number, width: number, height: number, color: number, alpha: number): void; + + /** + * Pushes a filled rectangle into the vertex batch. + * Rectangle factors in the given transform matrices before adding to the batch. + * @param x Horizontal top left coordinate of the rectangle. + * @param y Vertical top left coordinate of the rectangle. + * @param width Width of the rectangle. + * @param height Height of the rectangle. + * @param currentMatrix The current transform. + * @param parentMatrix The parent transform. + */ + batchFillRect(x: number, y: number, width: number, height: number, currentMatrix: Phaser.GameObjects.Components.TransformMatrix, parentMatrix: Phaser.GameObjects.Components.TransformMatrix): void; + + /** + * Pushes a filled triangle into the vertex batch. + * Triangle factors in the given transform matrices before adding to the batch. + * @param x0 Point 0 x coordinate. + * @param y0 Point 0 y coordinate. + * @param x1 Point 1 x coordinate. + * @param y1 Point 1 y coordinate. + * @param x2 Point 2 x coordinate. + * @param y2 Point 2 y coordinate. + * @param currentMatrix The current transform. + * @param parentMatrix The parent transform. + */ + batchFillTriangle(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, currentMatrix: Phaser.GameObjects.Components.TransformMatrix, parentMatrix: Phaser.GameObjects.Components.TransformMatrix): void; + + /** + * Pushes a stroked triangle into the vertex batch. + * Triangle factors in the given transform matrices before adding to the batch. + * The triangle is created from 3 lines and drawn using the `batchStrokePath` method. + * @param x0 Point 0 x coordinate. + * @param y0 Point 0 y coordinate. + * @param x1 Point 1 x coordinate. + * @param y1 Point 1 y coordinate. + * @param x2 Point 2 x coordinate. + * @param y2 Point 2 y coordinate. + * @param lineWidth The width of the line in pixels. + * @param currentMatrix The current transform. + * @param parentMatrix The parent transform. + */ + batchStrokeTriangle(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, lineWidth: number, currentMatrix: Phaser.GameObjects.Components.TransformMatrix, parentMatrix: Phaser.GameObjects.Components.TransformMatrix): void; + + /** + * Adds the given path to the vertex batch for rendering. + * + * It works by taking the array of path data and then passing it through Earcut, which + * creates a list of polygons. Each polygon is then added to the batch. + * + * The path is always automatically closed because it's filled. + * @param path Collection of points that represent the path. + * @param currentMatrix The current transform. + * @param parentMatrix The parent transform. + */ + batchFillPath(path: any[], currentMatrix: Phaser.GameObjects.Components.TransformMatrix, parentMatrix: Phaser.GameObjects.Components.TransformMatrix): void; + + /** + * Adds the given path to the vertex batch for rendering. + * + * It works by taking the array of path data and calling `batchLine` for each section + * of the path. + * + * The path is optionally closed at the end. + * @param path Collection of points that represent the path. + * @param lineWidth The width of the line segments in pixels. + * @param pathOpen Indicates if the path should be closed or left open. + * @param currentMatrix The current transform. + * @param parentMatrix The parent transform. + */ + batchStrokePath(path: any[], lineWidth: number, pathOpen: boolean, currentMatrix: Phaser.GameObjects.Components.TransformMatrix, parentMatrix: Phaser.GameObjects.Components.TransformMatrix): void; + + /** + * Creates a quad and adds it to the vertex batch based on the given line values. + * @param ax X coordinate to the start of the line + * @param ay Y coordinate to the start of the line + * @param bx X coordinate to the end of the line + * @param by Y coordinate to the end of the line + * @param aLineWidth Width of the start of the line + * @param bLineWidth Width of the end of the line + * @param currentMatrix Parent matrix, generally used by containers + */ + batchLine(ax: number, ay: number, bx: number, by: number, aLineWidth: number, bLineWidth: number, currentMatrix: Float32Array): void; + + } + + /** + * Implements a model view projection matrices. + * Pipelines can implement this for doing 2D and 3D rendering. + */ + interface ModelViewProjection { + /** + * Dirty flag for checking if model matrix needs to be updated on GPU. + */ + modelMatrixDirty: boolean; + /** + * Dirty flag for checking if view matrix needs to be updated on GPU. + */ + viewMatrixDirty: boolean; + /** + * Dirty flag for checking if projection matrix needs to be updated on GPU. + */ + projectionMatrixDirty: boolean; + /** + * Model matrix + */ + modelMatrix: Float32Array; + /** + * View matrix + */ + viewMatrix: Float32Array; + /** + * Projection matrix + */ + projectionMatrix: Float32Array; + /** + * Initializes MVP matrices with an identity matrix + */ + mvpInit(): void; + /** + * If dirty flags are set then the matrices are uploaded to the GPU. + */ + mvpUpdate(): void; + /** + * Loads an identity matrix to the model matrix + */ + modelIdentity(): void; + /** + * Scale model matrix + * @param x The x component. + * @param y The y component. + * @param z The z component. + */ + modelScale(x: number, y: number, z: number): this; + /** + * Translate model matrix + * @param x The x component. + * @param y The y component. + * @param z The z component. + */ + modelTranslate(x: number, y: number, z: number): this; + /** + * Rotates the model matrix in the X axis. + * @param radians The amount to rotate by. + */ + modelRotateX(radians: number): this; + /** + * Rotates the model matrix in the Y axis. + * @param radians The amount to rotate by. + */ + modelRotateY(radians: number): this; + /** + * Rotates the model matrix in the Z axis. + * @param radians The amount to rotate by. + */ + modelRotateZ(radians: number): this; + /** + * Loads identity matrix into the view matrix + */ + viewIdentity(): this; + /** + * Scales view matrix + * @param x The x component. + * @param y The y component. + * @param z The z component. + */ + viewScale(x: number, y: number, z: number): this; + /** + * Translates view matrix + * @param x The x component. + * @param y The y component. + * @param z The z component. + */ + viewTranslate(x: number, y: number, z: number): this; + /** + * Rotates view matrix in the X axis. + * @param radians The amount to rotate by. + */ + viewRotateX(radians: number): this; + /** + * Rotates view matrix in the Y axis. + * @param radians The amount to rotate by. + */ + viewRotateY(radians: number): this; + /** + * Rotates view matrix in the Z axis. + * @param radians The amount to rotate by. + */ + viewRotateZ(radians: number): this; + /** + * Loads a 2D view matrix (3x2 matrix) into a 4x4 view matrix + * @param matrix2D The Matrix2D. + */ + viewLoad2D(matrix2D: Float32Array): this; + /** + * Copies a 4x4 matrix into the view matrix + * @param matrix The Matrix2D. + */ + viewLoad(matrix: Float32Array): this; + /** + * Loads identity matrix into the projection matrix. + */ + projIdentity(): this; + /** + * Sets up an orthographic projection matrix + * @param left The left value. + * @param right The right value. + * @param bottom The bottom value. + * @param top The top value. + * @param near The near value. + * @param far The far value. + */ + projOrtho(left: number, right: number, bottom: number, top: number, near: number, far: number): this; + /** + * Sets up a perspective projection matrix + * @param fovY The fov value. + * @param aspectRatio The aspectRatio value. + * @param near The near value. + * @param far The far value. + */ + projPersp(fovY: number, aspectRatio: number, near: number, far: number): this; + } + + } + } } - /** - * Phaser Scale Modes. - */ - enum ScaleModes { - /** - * Default Scale Mode (Linear). - */ - DEFAULT, - /** - * Linear Scale Mode. - */ - LINEAR, - /** - * Nearest Scale Mode. - */ - NEAREST, - } - namespace Scale { - /** - * Phaser Scale Manager constants for centering the game canvas. - */ - enum Center { - /** - * The game canvas is not centered within the parent by Phaser. - * You can still center it yourself via CSS. - */ - NO_CENTER, - /** - * The game canvas is centered both horizontally and vertically within the parent. - * To do this, the parent has to have a bounds that can be calculated and not be empty. - * - * Centering is achieved by setting the margin left and top properties of the - * game canvas, and does not factor in any other CSS styles you may have applied. - */ - CENTER_BOTH, - /** - * The game canvas is centered horizontally within the parent. - * To do this, the parent has to have a bounds that can be calculated and not be empty. - * - * Centering is achieved by setting the margin left and top properties of the - * game canvas, and does not factor in any other CSS styles you may have applied. - */ - CENTER_HORIZONTALLY, - /** - * The game canvas is centered both vertically within the parent. - * To do this, the parent has to have a bounds that can be calculated and not be empty. - * - * Centering is achieved by setting the margin left and top properties of the - * game canvas, and does not factor in any other CSS styles you may have applied. - */ - CENTER_VERTICALLY, - } - - /** - * Phaser Scale Manager constants for centering the game canvas. - * - * To find out what each mode does please see [Phaser.Scale.Center]{@link Phaser.Scale.Center}. - */ - type CenterType = Phaser.Scale.Center; - - /** - * Phaser Scale Manager constants for orientation. - */ - enum Orientation { - /** - * A landscape orientation. - */ - LANDSCAPE, - /** - * A portrait orientation. - */ - PORTRAIT, - } - - /** - * Phaser Scale Manager constants for orientation. - * - * To find out what each mode does please see [Phaser.Scale.Orientation]{@link Phaser.Scale.Orientation}. - */ - type OrientationType = Phaser.Scale.Orientation; - - /** - * Phaser Scale Manager constants for the different scale modes available. - */ - enum ScaleModes { - /** - * No scaling happens at all. The canvas is set to the size given in the game config and Phaser doesn't change it - * again from that point on. If you change the canvas size, either via CSS, or directly via code, then you need - * to call the Scale Managers `resize` method to give the new dimensions, or input events will stop working. - */ - NONE, - /** - * The height is automatically adjusted based on the width. - */ - WIDTH_CONTROLS_HEIGHT, - /** - * The width is automatically adjusted based on the height. - */ - HEIGHT_CONTROLS_WIDTH, - /** - * The width and height are automatically adjusted to fit inside the given target area, - * while keeping the aspect ratio. Depending on the aspect ratio there may be some space - * inside the area which is not covered. - */ - FIT, - /** - * The width and height are automatically adjusted to make the size cover the entire target - * area while keeping the aspect ratio. This may extend further out than the target size. - */ - ENVELOP, - /** - * The Canvas is resized to fit all available _parent_ space, regardless of aspect ratio. - */ - RESIZE, - } - - /** - * Phaser Scale Manager constants for the different scale modes available. - * - * To find out what each mode does please see [Phaser.Scale.ScaleModes]{@link Phaser.Scale.ScaleModes}. - */ - type ScaleModeType = Phaser.Scale.ScaleModes; - - /** - * Phaser Scale Manager constants for zoom modes. - */ - enum Zoom { - /** - * The game canvas will not be zoomed by Phaser. - */ - NO_ZOOM, - /** - * The game canvas will be 2x zoomed by Phaser. - */ - ZOOM_2X, - /** - * The game canvas will be 4x zoomed by Phaser. - */ - ZOOM_4X, - /** - * Calculate the zoom value based on the maximum multiplied game size that will - * fit into the parent, or browser window if no parent is set. - */ - MAX_ZOOM, - } - - /** - * Phaser Scale Manager constants for zoom modes. - * - * To find out what each mode does please see [Phaser.Scale.Zoom]{@link Phaser.Scale.Zoom}. - */ - type ZoomType = Phaser.Scale.Zoom; - - namespace Events { - /** - * The Scale Manager has successfully entered fullscreen mode. - */ - const ENTER_FULLSCREEN: any; - - /** - * The Scale Manager tried to enter fullscreen mode but failed. - */ - const FULLSCREEN_FAILED: any; - - /** - * The Scale Manager tried to enter fullscreen mode, but it is unsupported by the browser. - */ - const FULLSCREEN_UNSUPPORTED: any; - - /** - * The Scale Manager was in fullscreen mode, but has since left, either directly via game code, - * or via a user gestured, such as pressing the ESC key. - */ - const LEAVE_FULLSCREEN: any; - - /** - * The Scale Manager Orientation Change Event. - */ - const ORIENTATION_CHANGE: any; - - /** - * The Scale Manager Resize Event. - * - * This event is dispatched whenever the Scale Manager detects a resize event from the browser. - * It sends three parameters to the callback, each of them being Size components. You can read - * the `width`, `height`, `aspectRatio` and other properties of these components to help with - * scaling your own game content. - */ - const RESIZE: any; - - } - /** * The Scale Manager handles the scaling, resizing and alignment of the game canvas. * @@ -73931,6 +74443,180 @@ declare namespace Phaser { } + /** + * Phaser Scale Manager constants for centering the game canvas. + */ + enum Center { + /** + * The game canvas is not centered within the parent by Phaser. + * You can still center it yourself via CSS. + */ + NO_CENTER, + /** + * The game canvas is centered both horizontally and vertically within the parent. + * To do this, the parent has to have a bounds that can be calculated and not be empty. + * + * Centering is achieved by setting the margin left and top properties of the + * game canvas, and does not factor in any other CSS styles you may have applied. + */ + CENTER_BOTH, + /** + * The game canvas is centered horizontally within the parent. + * To do this, the parent has to have a bounds that can be calculated and not be empty. + * + * Centering is achieved by setting the margin left and top properties of the + * game canvas, and does not factor in any other CSS styles you may have applied. + */ + CENTER_HORIZONTALLY, + /** + * The game canvas is centered both vertically within the parent. + * To do this, the parent has to have a bounds that can be calculated and not be empty. + * + * Centering is achieved by setting the margin left and top properties of the + * game canvas, and does not factor in any other CSS styles you may have applied. + */ + CENTER_VERTICALLY, + } + + /** + * Phaser Scale Manager constants for centering the game canvas. + * + * To find out what each mode does please see [Phaser.Scale.Center]{@link Phaser.Scale.Center}. + */ + type CenterType = Phaser.Scale.Center; + + /** + * Phaser Scale Manager constants for orientation. + */ + enum Orientation { + /** + * A landscape orientation. + */ + LANDSCAPE, + /** + * A portrait orientation. + */ + PORTRAIT, + } + + /** + * Phaser Scale Manager constants for orientation. + * + * To find out what each mode does please see [Phaser.Scale.Orientation]{@link Phaser.Scale.Orientation}. + */ + type OrientationType = Phaser.Scale.Orientation; + + /** + * Phaser Scale Manager constants for the different scale modes available. + */ + enum ScaleModes { + /** + * No scaling happens at all. The canvas is set to the size given in the game config and Phaser doesn't change it + * again from that point on. If you change the canvas size, either via CSS, or directly via code, then you need + * to call the Scale Managers `resize` method to give the new dimensions, or input events will stop working. + */ + NONE, + /** + * The height is automatically adjusted based on the width. + */ + WIDTH_CONTROLS_HEIGHT, + /** + * The width is automatically adjusted based on the height. + */ + HEIGHT_CONTROLS_WIDTH, + /** + * The width and height are automatically adjusted to fit inside the given target area, + * while keeping the aspect ratio. Depending on the aspect ratio there may be some space + * inside the area which is not covered. + */ + FIT, + /** + * The width and height are automatically adjusted to make the size cover the entire target + * area while keeping the aspect ratio. This may extend further out than the target size. + */ + ENVELOP, + /** + * The Canvas is resized to fit all available _parent_ space, regardless of aspect ratio. + */ + RESIZE, + } + + /** + * Phaser Scale Manager constants for the different scale modes available. + * + * To find out what each mode does please see [Phaser.Scale.ScaleModes]{@link Phaser.Scale.ScaleModes}. + */ + type ScaleModeType = Phaser.Scale.ScaleModes; + + /** + * Phaser Scale Manager constants for zoom modes. + */ + enum Zoom { + /** + * The game canvas will not be zoomed by Phaser. + */ + NO_ZOOM, + /** + * The game canvas will be 2x zoomed by Phaser. + */ + ZOOM_2X, + /** + * The game canvas will be 4x zoomed by Phaser. + */ + ZOOM_4X, + /** + * Calculate the zoom value based on the maximum multiplied game size that will + * fit into the parent, or browser window if no parent is set. + */ + MAX_ZOOM, + } + + /** + * Phaser Scale Manager constants for zoom modes. + * + * To find out what each mode does please see [Phaser.Scale.Zoom]{@link Phaser.Scale.Zoom}. + */ + type ZoomType = Phaser.Scale.Zoom; + + namespace Events { + /** + * The Scale Manager has successfully entered fullscreen mode. + */ + const ENTER_FULLSCREEN: any; + + /** + * The Scale Manager tried to enter fullscreen mode but failed. + */ + const FULLSCREEN_FAILED: any; + + /** + * The Scale Manager tried to enter fullscreen mode, but it is unsupported by the browser. + */ + const FULLSCREEN_UNSUPPORTED: any; + + /** + * The Scale Manager was in fullscreen mode, but has since left, either directly via game code, + * or via a user gestured, such as pressing the ESC key. + */ + const LEAVE_FULLSCREEN: any; + + /** + * The Scale Manager Orientation Change Event. + */ + const ORIENTATION_CHANGE: any; + + /** + * The Scale Manager Resize Event. + * + * This event is dispatched whenever the Scale Manager detects a resize event from the browser. + * It sends three parameters to the callback, each of them being Size components. You can read + * the `width`, `height`, `aspectRatio` and other properties of these components to help with + * scaling your own game content. + */ + const RESIZE: any; + + } + /** * The game canvas is not centered within the parent by Phaser. * You can still center it yourself via CSS. @@ -74032,341 +74718,180 @@ declare namespace Phaser { } + /** + * A base Phaser.Scene class which can be extended for your own use. + * + * You can also define the optional methods {@link Phaser.Types.Scenes.SceneInitCallback init()}, {@link Phaser.Types.Scenes.ScenePreloadCallback preload()}, and {@link Phaser.Types.Scenes.SceneCreateCallback create()}. + */ + class Scene { + /** + * + * @param config Scene specific configuration settings. + */ + constructor(config: string | Phaser.Types.Scenes.SettingsConfig); + + /** + * The Scene Systems. You must never overwrite this property, or all hell will break lose. + */ + sys: Phaser.Scenes.Systems; + + /** + * A reference to the Phaser.Game instance. + * This property will only be available if defined in the Scene Injection Map. + */ + game: Phaser.Game; + + /** + * A reference to the global Animation Manager. + * This property will only be available if defined in the Scene Injection Map. + */ + anims: Phaser.Animations.AnimationManager; + + /** + * A reference to the global Cache. + * This property will only be available if defined in the Scene Injection Map. + */ + cache: Phaser.Cache.CacheManager; + + /** + * A reference to the game level Data Manager. + * This property will only be available if defined in the Scene Injection Map. + */ + registry: Phaser.Data.DataManager; + + /** + * A reference to the Sound Manager. + * This property will only be available if defined in the Scene Injection Map and the plugin is installed. + */ + sound: Phaser.Sound.BaseSoundManager; + + /** + * A reference to the Texture Manager. + * This property will only be available if defined in the Scene Injection Map. + */ + textures: Phaser.Textures.TextureManager; + + /** + * A scene level Event Emitter. + * This property will only be available if defined in the Scene Injection Map. + */ + events: Phaser.Events.EventEmitter; + + /** + * A scene level Camera System. + * This property will only be available if defined in the Scene Injection Map. + */ + cameras: Phaser.Cameras.Scene2D.CameraManager; + + /** + * A scene level Game Object Factory. + * This property will only be available if defined in the Scene Injection Map. + */ + add: Phaser.GameObjects.GameObjectFactory; + + /** + * A scene level Game Object Creator. + * This property will only be available if defined in the Scene Injection Map. + */ + make: Phaser.GameObjects.GameObjectCreator; + + /** + * A reference to the Scene Manager Plugin. + * This property will only be available if defined in the Scene Injection Map. + */ + scene: Phaser.Scenes.ScenePlugin; + + /** + * A scene level Game Object Display List. + * This property will only be available if defined in the Scene Injection Map. + */ + children: Phaser.GameObjects.DisplayList; + + /** + * A scene level Lights Manager Plugin. + * This property will only be available if defined in the Scene Injection Map and the plugin is installed. + */ + lights: Phaser.GameObjects.LightsManager; + + /** + * A scene level Data Manager Plugin. + * This property will only be available if defined in the Scene Injection Map and the plugin is installed. + */ + data: Phaser.Data.DataManager; + + /** + * A scene level Input Manager Plugin. + * This property will only be available if defined in the Scene Injection Map and the plugin is installed. + */ + input: Phaser.Input.InputPlugin; + + /** + * A scene level Loader Plugin. + * This property will only be available if defined in the Scene Injection Map and the plugin is installed. + */ + load: Phaser.Loader.LoaderPlugin; + + /** + * A scene level Time and Clock Plugin. + * This property will only be available if defined in the Scene Injection Map and the plugin is installed. + */ + time: Phaser.Time.Clock; + + /** + * A scene level Tween Manager Plugin. + * This property will only be available if defined in the Scene Injection Map and the plugin is installed. + */ + tweens: Phaser.Tweens.TweenManager; + + /** + * A scene level Arcade Physics Plugin. + * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured. + */ + physics: Phaser.Physics.Arcade.ArcadePhysics; + + /** + * A scene level Impact Physics Plugin. + * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured. + */ + impact: Phaser.Physics.Impact.ImpactPhysics; + + /** + * A scene level Matter Physics Plugin. + * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured. + */ + matter: Phaser.Physics.Matter.MatterPhysics; + + /** + * A scene level Facebook Instant Games Plugin. + * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured. + */ + facebook: Phaser.FacebookInstantGamesPlugin; + + /** + * A reference to the global Scale Manager. + * This property will only be available if defined in the Scene Injection Map. + */ + scale: Phaser.Scale.ScaleManager; + + /** + * A reference to the Plugin Manager. + * + * The Plugin Manager is a global system that allows plugins to register themselves with it, and can then install + * those plugins into Scenes as required. + */ + plugins: Phaser.Plugins.PluginManager; + + /** + * Should be overridden by your own Scenes. + * This method is called once per game step while the scene is running. + * @param time The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. + * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. + */ + update(time: number, delta: number): void; + + } + namespace Scenes { - /** - * Scene state. - */ - var PENDING: integer; - - /** - * Scene state. - */ - var INIT: integer; - - /** - * Scene state. - */ - var START: integer; - - /** - * Scene state. - */ - var LOADING: integer; - - /** - * Scene state. - */ - var CREATING: integer; - - /** - * Scene state. - */ - var RUNNING: integer; - - /** - * Scene state. - */ - var PAUSED: integer; - - /** - * Scene state. - */ - var SLEEPING: integer; - - /** - * Scene state. - */ - var SHUTDOWN: integer; - - /** - * Scene state. - */ - var DESTROYED: integer; - - namespace Events { - /** - * The Scene Systems Boot Event. - * - * This event is dispatched by a Scene during the Scene Systems boot process. Primarily used by Scene Plugins. - * - * Listen to it from a Scene using `this.scene.events.on('boot', listener)`. - */ - const BOOT: any; - - /** - * The Scene Create Event. - * - * This event is dispatched by a Scene after it has been created by the Scene Manager. - * - * If a Scene has a `create` method then this event is emitted _after_ that has run. - * - * If there is a transition, this event will be fired after the `TRANSITION_START` event. - * - * Listen to it from a Scene using `this.scene.events.on('create', listener)`. - */ - const CREATE: any; - - /** - * The Scene Systems Destroy Event. - * - * This event is dispatched by a Scene during the Scene Systems destroy process. - * - * Listen to it from a Scene using `this.scene.events.on('destroy', listener)`. - * - * You should destroy any resources that may be in use by your Scene in this event handler. - */ - const DESTROY: any; - - /** - * The Scene Systems Pause Event. - * - * This event is dispatched by a Scene when it is paused, either directly via the `pause` method, or as an - * action from another Scene. - * - * Listen to it from a Scene using `this.scene.events.on('pause', listener)`. - */ - const PAUSE: any; - - /** - * The Scene Systems Post Update Event. - * - * This event is dispatched by a Scene during the main game loop step. - * - * The event flow for a single step of a Scene is as follows: - * - * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE} - * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE} - * 3. The `Scene.update` method is called, if it exists - * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE} - * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} - * - * Listen to it from a Scene using `this.scene.events.on('postupdate', listener)`. - * - * A Scene will only run its step if it is active. - */ - const POST_UPDATE: any; - - /** - * The Scene Systems Pre Update Event. - * - * This event is dispatched by a Scene during the main game loop step. - * - * The event flow for a single step of a Scene is as follows: - * - * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE} - * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE} - * 3. The `Scene.update` method is called, if it exists - * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE} - * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} - * - * Listen to it from a Scene using `this.scene.events.on('preupdate', listener)`. - * - * A Scene will only run its step if it is active. - */ - const PRE_UPDATE: any; - - /** - * The Scene Systems Ready Event. - * - * This event is dispatched by a Scene during the Scene Systems start process. - * By this point in the process the Scene is now fully active and rendering. - * This event is meant for your game code to use, as all plugins have responded to the earlier 'start' event. - * - * Listen to it from a Scene using `this.scene.events.on('ready', listener)`. - */ - const READY: any; - - /** - * The Scene Systems Render Event. - * - * This event is dispatched by a Scene during the main game loop step. - * - * The event flow for a single step of a Scene is as follows: - * - * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE} - * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE} - * 3. The `Scene.update` method is called, if it exists - * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE} - * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} - * - * Listen to it from a Scene using `this.scene.events.on('render', listener)`. - * - * A Scene will only render if it is visible and active. - * By the time this event is dispatched, the Scene will have already been rendered. - */ - const RENDER: any; - - /** - * The Scene Systems Resume Event. - * - * This event is dispatched by a Scene when it is resumed from a paused state, either directly via the `resume` method, - * or as an action from another Scene. - * - * Listen to it from a Scene using `this.scene.events.on('resume', listener)`. - */ - const RESUME: any; - - /** - * The Scene Systems Shutdown Event. - * - * This event is dispatched by a Scene during the Scene Systems shutdown process. - * - * Listen to it from a Scene using `this.scene.events.on('shutdown', listener)`. - * - * You should free-up any resources that may be in use by your Scene in this event handler, on the understanding - * that the Scene may, at any time, become active again. A shutdown Scene is not 'destroyed', it's simply not - * currently active. Use the [DESTROY]{@linkcode Phaser.Scenes.Events#event:DESTROY} event to completely clear resources. - */ - const SHUTDOWN: any; - - /** - * The Scene Systems Sleep Event. - * - * This event is dispatched by a Scene when it is sent to sleep, either directly via the `sleep` method, - * or as an action from another Scene. - * - * Listen to it from a Scene using `this.scene.events.on('sleep', listener)`. - */ - const SLEEP: any; - - /** - * The Scene Systems Start Event. - * - * This event is dispatched by a Scene during the Scene Systems start process. Primarily used by Scene Plugins. - * - * Listen to it from a Scene using `this.scene.events.on('start', listener)`. - */ - const START: any; - - /** - * The Scene Transition Complete Event. - * - * This event is dispatched by the Target Scene of a transition. - * - * It happens when the transition process has completed. This occurs when the duration timer equals or exceeds the duration - * of the transition. - * - * Listen to it from a Scene using `this.scene.events.on('transitioncomplete', listener)`. - * - * The Scene Transition event flow is as follows: - * - * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event. - * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method. - * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ... - * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to. - * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes. - */ - const TRANSITION_COMPLETE: any; - - /** - * The Scene Transition Init Event. - * - * This event is dispatched by the Target Scene of a transition. - * - * It happens immediately after the `Scene.init` method is called. If the Scene does not have an `init` method, - * this event is not dispatched. - * - * Listen to it from a Scene using `this.scene.events.on('transitioninit', listener)`. - * - * The Scene Transition event flow is as follows: - * - * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event. - * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method. - * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ... - * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to. - * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes. - */ - const TRANSITION_INIT: any; - - /** - * The Scene Transition Out Event. - * - * This event is dispatched by a Scene when it initiates a transition to another Scene. - * - * Listen to it from a Scene using `this.scene.events.on('transitionout', listener)`. - * - * The Scene Transition event flow is as follows: - * - * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event. - * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method. - * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ... - * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to. - * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes. - */ - const TRANSITION_OUT: any; - - /** - * The Scene Transition Start Event. - * - * This event is dispatched by the Target Scene of a transition, only if that Scene was not asleep. - * - * It happens immediately after the `Scene.create` method is called. If the Scene does not have a `create` method, - * this event is dispatched anyway. - * - * If the Target Scene was sleeping then the [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} event is - * dispatched instead of this event. - * - * Listen to it from a Scene using `this.scene.events.on('transitionstart', listener)`. - * - * The Scene Transition event flow is as follows: - * - * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event. - * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method. - * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ... - * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to. - * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes. - */ - const TRANSITION_START: any; - - /** - * The Scene Transition Wake Event. - * - * This event is dispatched by the Target Scene of a transition, only if that Scene was asleep before - * the transition began. If the Scene was not asleep the [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} event is dispatched instead. - * - * Listen to it from a Scene using `this.scene.events.on('transitionwake', listener)`. - * - * The Scene Transition event flow is as follows: - * - * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event. - * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method. - * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ... - * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to. - * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes. - */ - const TRANSITION_WAKE: any; - - /** - * The Scene Systems Update Event. - * - * This event is dispatched by a Scene during the main game loop step. - * - * The event flow for a single step of a Scene is as follows: - * - * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE} - * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE} - * 3. The `Scene.update` method is called, if it exists - * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE} - * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} - * - * Listen to it from a Scene using `this.scene.events.on('update', listener)`. - * - * A Scene will only run its step if it is active. - */ - const UPDATE: any; - - /** - * The Scene Systems Wake Event. - * - * This event is dispatched by a Scene when it is woken from sleep, either directly via the `wake` method, - * or as an action from another Scene. - * - * Listen to it from a Scene using `this.scene.events.on('wake', listener)`. - */ - const WAKE: any; - - } - /** * Builds an array of which physics plugins should be activated for the given Scene. * @param sys The scene system to get the physics systems of. @@ -75252,178 +75777,339 @@ declare namespace Phaser { } - } - - /** - * A base Phaser.Scene class which can be extended for your own use. - * - * You can also define the optional methods {@link Phaser.Types.Scenes.SceneInitCallback init()}, {@link Phaser.Types.Scenes.ScenePreloadCallback preload()}, and {@link Phaser.Types.Scenes.SceneCreateCallback create()}. - */ - class Scene { /** - * - * @param config Scene specific configuration settings. + * Scene state. */ - constructor(config: string | Phaser.Types.Scenes.SettingsConfig); + var PENDING: integer; /** - * The Scene Systems. You must never overwrite this property, or all hell will break lose. + * Scene state. */ - sys: Phaser.Scenes.Systems; + var INIT: integer; /** - * A reference to the Phaser.Game instance. - * This property will only be available if defined in the Scene Injection Map. + * Scene state. */ - game: Phaser.Game; + var START: integer; /** - * A reference to the global Animation Manager. - * This property will only be available if defined in the Scene Injection Map. + * Scene state. */ - anims: Phaser.Animations.AnimationManager; + var LOADING: integer; /** - * A reference to the global Cache. - * This property will only be available if defined in the Scene Injection Map. + * Scene state. */ - cache: Phaser.Cache.CacheManager; + var CREATING: integer; /** - * A reference to the game level Data Manager. - * This property will only be available if defined in the Scene Injection Map. + * Scene state. */ - registry: Phaser.Data.DataManager; + var RUNNING: integer; /** - * A reference to the Sound Manager. - * This property will only be available if defined in the Scene Injection Map and the plugin is installed. + * Scene state. */ - sound: Phaser.Sound.BaseSoundManager; + var PAUSED: integer; /** - * A reference to the Texture Manager. - * This property will only be available if defined in the Scene Injection Map. + * Scene state. */ - textures: Phaser.Textures.TextureManager; + var SLEEPING: integer; /** - * A scene level Event Emitter. - * This property will only be available if defined in the Scene Injection Map. + * Scene state. */ - events: Phaser.Events.EventEmitter; + var SHUTDOWN: integer; /** - * A scene level Camera System. - * This property will only be available if defined in the Scene Injection Map. + * Scene state. */ - cameras: Phaser.Cameras.Scene2D.CameraManager; + var DESTROYED: integer; - /** - * A scene level Game Object Factory. - * This property will only be available if defined in the Scene Injection Map. - */ - add: Phaser.GameObjects.GameObjectFactory; + namespace Events { + /** + * The Scene Systems Boot Event. + * + * This event is dispatched by a Scene during the Scene Systems boot process. Primarily used by Scene Plugins. + * + * Listen to it from a Scene using `this.scene.events.on('boot', listener)`. + */ + const BOOT: any; - /** - * A scene level Game Object Creator. - * This property will only be available if defined in the Scene Injection Map. - */ - make: Phaser.GameObjects.GameObjectCreator; + /** + * The Scene Create Event. + * + * This event is dispatched by a Scene after it has been created by the Scene Manager. + * + * If a Scene has a `create` method then this event is emitted _after_ that has run. + * + * If there is a transition, this event will be fired after the `TRANSITION_START` event. + * + * Listen to it from a Scene using `this.scene.events.on('create', listener)`. + */ + const CREATE: any; - /** - * A reference to the Scene Manager Plugin. - * This property will only be available if defined in the Scene Injection Map. - */ - scene: Phaser.Scenes.ScenePlugin; + /** + * The Scene Systems Destroy Event. + * + * This event is dispatched by a Scene during the Scene Systems destroy process. + * + * Listen to it from a Scene using `this.scene.events.on('destroy', listener)`. + * + * You should destroy any resources that may be in use by your Scene in this event handler. + */ + const DESTROY: any; - /** - * A scene level Game Object Display List. - * This property will only be available if defined in the Scene Injection Map. - */ - children: Phaser.GameObjects.DisplayList; + /** + * The Scene Systems Pause Event. + * + * This event is dispatched by a Scene when it is paused, either directly via the `pause` method, or as an + * action from another Scene. + * + * Listen to it from a Scene using `this.scene.events.on('pause', listener)`. + */ + const PAUSE: any; - /** - * A scene level Lights Manager Plugin. - * This property will only be available if defined in the Scene Injection Map and the plugin is installed. - */ - lights: Phaser.GameObjects.LightsManager; + /** + * The Scene Systems Post Update Event. + * + * This event is dispatched by a Scene during the main game loop step. + * + * The event flow for a single step of a Scene is as follows: + * + * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE} + * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE} + * 3. The `Scene.update` method is called, if it exists + * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE} + * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to it from a Scene using `this.scene.events.on('postupdate', listener)`. + * + * A Scene will only run its step if it is active. + */ + const POST_UPDATE: any; - /** - * A scene level Data Manager Plugin. - * This property will only be available if defined in the Scene Injection Map and the plugin is installed. - */ - data: Phaser.Data.DataManager; + /** + * The Scene Systems Pre Update Event. + * + * This event is dispatched by a Scene during the main game loop step. + * + * The event flow for a single step of a Scene is as follows: + * + * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE} + * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE} + * 3. The `Scene.update` method is called, if it exists + * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE} + * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to it from a Scene using `this.scene.events.on('preupdate', listener)`. + * + * A Scene will only run its step if it is active. + */ + const PRE_UPDATE: any; - /** - * A scene level Input Manager Plugin. - * This property will only be available if defined in the Scene Injection Map and the plugin is installed. - */ - input: Phaser.Input.InputPlugin; + /** + * The Scene Systems Ready Event. + * + * This event is dispatched by a Scene during the Scene Systems start process. + * By this point in the process the Scene is now fully active and rendering. + * This event is meant for your game code to use, as all plugins have responded to the earlier 'start' event. + * + * Listen to it from a Scene using `this.scene.events.on('ready', listener)`. + */ + const READY: any; - /** - * A scene level Loader Plugin. - * This property will only be available if defined in the Scene Injection Map and the plugin is installed. - */ - load: Phaser.Loader.LoaderPlugin; + /** + * The Scene Systems Render Event. + * + * This event is dispatched by a Scene during the main game loop step. + * + * The event flow for a single step of a Scene is as follows: + * + * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE} + * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE} + * 3. The `Scene.update` method is called, if it exists + * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE} + * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to it from a Scene using `this.scene.events.on('render', listener)`. + * + * A Scene will only render if it is visible and active. + * By the time this event is dispatched, the Scene will have already been rendered. + */ + const RENDER: any; - /** - * A scene level Time and Clock Plugin. - * This property will only be available if defined in the Scene Injection Map and the plugin is installed. - */ - time: Phaser.Time.Clock; + /** + * The Scene Systems Resume Event. + * + * This event is dispatched by a Scene when it is resumed from a paused state, either directly via the `resume` method, + * or as an action from another Scene. + * + * Listen to it from a Scene using `this.scene.events.on('resume', listener)`. + */ + const RESUME: any; - /** - * A scene level Tween Manager Plugin. - * This property will only be available if defined in the Scene Injection Map and the plugin is installed. - */ - tweens: Phaser.Tweens.TweenManager; + /** + * The Scene Systems Shutdown Event. + * + * This event is dispatched by a Scene during the Scene Systems shutdown process. + * + * Listen to it from a Scene using `this.scene.events.on('shutdown', listener)`. + * + * You should free-up any resources that may be in use by your Scene in this event handler, on the understanding + * that the Scene may, at any time, become active again. A shutdown Scene is not 'destroyed', it's simply not + * currently active. Use the [DESTROY]{@linkcode Phaser.Scenes.Events#event:DESTROY} event to completely clear resources. + */ + const SHUTDOWN: any; - /** - * A scene level Arcade Physics Plugin. - * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured. - */ - physics: Phaser.Physics.Arcade.ArcadePhysics; + /** + * The Scene Systems Sleep Event. + * + * This event is dispatched by a Scene when it is sent to sleep, either directly via the `sleep` method, + * or as an action from another Scene. + * + * Listen to it from a Scene using `this.scene.events.on('sleep', listener)`. + */ + const SLEEP: any; - /** - * A scene level Impact Physics Plugin. - * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured. - */ - impact: Phaser.Physics.Impact.ImpactPhysics; + /** + * The Scene Systems Start Event. + * + * This event is dispatched by a Scene during the Scene Systems start process. Primarily used by Scene Plugins. + * + * Listen to it from a Scene using `this.scene.events.on('start', listener)`. + */ + const START: any; - /** - * A scene level Matter Physics Plugin. - * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured. - */ - matter: Phaser.Physics.Matter.MatterPhysics; + /** + * The Scene Transition Complete Event. + * + * This event is dispatched by the Target Scene of a transition. + * + * It happens when the transition process has completed. This occurs when the duration timer equals or exceeds the duration + * of the transition. + * + * Listen to it from a Scene using `this.scene.events.on('transitioncomplete', listener)`. + * + * The Scene Transition event flow is as follows: + * + * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event. + * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method. + * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ... + * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to. + * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes. + */ + const TRANSITION_COMPLETE: any; - /** - * A scene level Facebook Instant Games Plugin. - * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured. - */ - facebook: Phaser.FacebookInstantGamesPlugin; + /** + * The Scene Transition Init Event. + * + * This event is dispatched by the Target Scene of a transition. + * + * It happens immediately after the `Scene.init` method is called. If the Scene does not have an `init` method, + * this event is not dispatched. + * + * Listen to it from a Scene using `this.scene.events.on('transitioninit', listener)`. + * + * The Scene Transition event flow is as follows: + * + * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event. + * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method. + * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ... + * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to. + * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes. + */ + const TRANSITION_INIT: any; - /** - * A reference to the global Scale Manager. - * This property will only be available if defined in the Scene Injection Map. - */ - scale: Phaser.Scale.ScaleManager; + /** + * The Scene Transition Out Event. + * + * This event is dispatched by a Scene when it initiates a transition to another Scene. + * + * Listen to it from a Scene using `this.scene.events.on('transitionout', listener)`. + * + * The Scene Transition event flow is as follows: + * + * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event. + * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method. + * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ... + * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to. + * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes. + */ + const TRANSITION_OUT: any; - /** - * A reference to the Plugin Manager. - * - * The Plugin Manager is a global system that allows plugins to register themselves with it, and can then install - * those plugins into Scenes as required. - */ - plugins: Phaser.Plugins.PluginManager; + /** + * The Scene Transition Start Event. + * + * This event is dispatched by the Target Scene of a transition, only if that Scene was not asleep. + * + * It happens immediately after the `Scene.create` method is called. If the Scene does not have a `create` method, + * this event is dispatched anyway. + * + * If the Target Scene was sleeping then the [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} event is + * dispatched instead of this event. + * + * Listen to it from a Scene using `this.scene.events.on('transitionstart', listener)`. + * + * The Scene Transition event flow is as follows: + * + * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event. + * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method. + * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ... + * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to. + * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes. + */ + const TRANSITION_START: any; - /** - * Should be overridden by your own Scenes. - * This method is called once per game step while the scene is running. - * @param time The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. - * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. - */ - update(time: number, delta: number): void; + /** + * The Scene Transition Wake Event. + * + * This event is dispatched by the Target Scene of a transition, only if that Scene was asleep before + * the transition began. If the Scene was not asleep the [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} event is dispatched instead. + * + * Listen to it from a Scene using `this.scene.events.on('transitionwake', listener)`. + * + * The Scene Transition event flow is as follows: + * + * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event. + * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method. + * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ... + * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to. + * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes. + */ + const TRANSITION_WAKE: any; + + /** + * The Scene Systems Update Event. + * + * This event is dispatched by a Scene during the main game loop step. + * + * The event flow for a single step of a Scene is as follows: + * + * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE} + * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE} + * 3. The `Scene.update` method is called, if it exists + * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE} + * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to it from a Scene using `this.scene.events.on('update', listener)`. + * + * A Scene will only run its step if it is active. + */ + const UPDATE: any; + + /** + * The Scene Systems Wake Event. + * + * This event is dispatched by a Scene when it is woken from sleep, either directly via the `wake` method, + * or as an action from another Scene. + * + * Listen to it from a Scene using `this.scene.events.on('wake', listener)`. + */ + const WAKE: any; + + } } @@ -75730,6 +76416,14 @@ declare namespace Phaser { } + /** + * Creates a Web Audio, HTML5 Audio or No Audio Sound Manager based on config and device settings. + * + * Be aware of https://developers.google.com/web/updates/2017/09/autoplay-policy-changes + * @param game Reference to the current game instance. + */ + function SoundManagerCreator(game: Phaser.Game): void; + namespace Events { /** * The Sound Complete Event. @@ -76327,14 +77021,6 @@ declare namespace Phaser { } - /** - * Creates a Web Audio, HTML5 Audio or No Audio Sound Manager based on config and device settings. - * - * Be aware of https://developers.google.com/web/updates/2017/09/autoplay-policy-changes - * @param game Reference to the current game instance. - */ - function SoundManagerCreator(game: Phaser.Game): void; - /** * Web Audio API implementation of the sound. */ @@ -76565,31 +77251,6 @@ declare namespace Phaser { } namespace Structs { - namespace Events { - /** - * The Process Queue Add Event. - * - * This event is dispatched by a Process Queue when a new item is successfully moved to its active list. - * - * You will most commonly see this used by a Scene's Update List when a new Game Object has been added. - * - * In that instance, listen to this event from within a Scene using: `this.sys.updateList.on('add', listener)`. - */ - const PROCESS_QUEUE_ADD: any; - - /** - * The Process Queue Remove Event. - * - * This event is dispatched by a Process Queue when a new item is successfully removed from its active list. - * - * You will most commonly see this used by a Scene's Update List when a Game Object has been removed. - * - * In that instance, listen to this event from within a Scene using: `this.sys.updateList.on('remove', listener)`. - */ - const PROCESS_QUEUE_REMOVE: any; - - } - /** * List is a generic implementation of an ordered list which contains utility methods for retrieving, manipulating, and iterating items. */ @@ -77480,6 +78141,31 @@ declare namespace Phaser { } + namespace Events { + /** + * The Process Queue Add Event. + * + * This event is dispatched by a Process Queue when a new item is successfully moved to its active list. + * + * You will most commonly see this used by a Scene's Update List when a new Game Object has been added. + * + * In that instance, listen to this event from within a Scene using: `this.sys.updateList.on('add', listener)`. + */ + const PROCESS_QUEUE_ADD: any; + + /** + * The Process Queue Remove Event. + * + * This event is dispatched by a Process Queue when a new item is successfully removed from its active list. + * + * You will most commonly see this used by a Scene's Update List when a Game Object has been removed. + * + * In that instance, listen to this event from within a Scene using: `this.sys.updateList.on('remove', listener)`. + */ + const PROCESS_QUEUE_REMOVE: any; + + } + } namespace Textures { @@ -77699,75 +78385,6 @@ declare namespace Phaser { } - /** - * Filter Types. - */ - enum FilterMode { - /** - * Linear filter type. - */ - LINEAR, - /** - * Nearest neighbor filter type. - */ - NEAREST, - } - - namespace Events { - /** - * The Texture Add Event. - * - * This event is dispatched by the Texture Manager when a texture is added to it. - * - * Listen to this event from within a Scene using: `this.textures.on('addtexture', listener)`. - */ - const ADD: any; - - /** - * The Texture Load Error Event. - * - * This event is dispatched by the Texture Manager when a texture it requested to load failed. - * This only happens when base64 encoded textures fail. All other texture types are loaded via the Loader Plugin. - * - * Listen to this event from within a Scene using: `this.textures.on('onerror', listener)`. - */ - const ERROR: any; - - /** - * The Texture Load Event. - * - * This event is dispatched by the Texture Manager when a texture has finished loading on it. - * This only happens for base64 encoded textures. All other texture types are loaded via the Loader Plugin. - * - * Listen to this event from within a Scene using: `this.textures.on('onload', listener)`. - * - * This event is dispatched after the [ADD]{@linkcode Phaser.Textures.Events#event:ADD} event. - */ - const LOAD: any; - - /** - * This internal event signifies that the Texture Manager is now ready and the Game can continue booting. - * - * When a Phaser Game instance is booting for the first time, the Texture Manager has to wait on a couple of non-blocking - * async events before it's fully ready to carry on. When those complete the Texture Manager emits this event via the Game - * instance, which tells the Game to carry on booting. - */ - const READY: any; - - /** - * The Texture Remove Event. - * - * This event is dispatched by the Texture Manager when a texture is removed from it. - * - * Listen to this event from within a Scene using: `this.textures.on('removetexture', listener)`. - * - * If you have any Game Objects still using the removed texture, they will start throwing - * errors the next time they try to render. Be sure to clear all use of the texture in this event handler. - */ - const REMOVE: any; - - } - /** * A Frame is a section of a Texture. */ @@ -78026,19 +78643,6 @@ declare namespace Phaser { } - /** - * Linear filter type. - */ - const LINEAR: integer; - - /** - * Nearest Neighbor filter type. - */ - const NEAREST: integer; - - namespace Parsers { - } - /** * A Texture consists of a source, usually an Image from the Cache, and a collection of Frames. * The Frames represent the different areas of the Texture. For example a texture atlas @@ -78675,9 +79279,1863 @@ declare namespace Phaser { } + /** + * Filter Types. + */ + enum FilterMode { + /** + * Linear filter type. + */ + LINEAR, + /** + * Nearest neighbor filter type. + */ + NEAREST, + } + + namespace Events { + /** + * The Texture Add Event. + * + * This event is dispatched by the Texture Manager when a texture is added to it. + * + * Listen to this event from within a Scene using: `this.textures.on('addtexture', listener)`. + */ + const ADD: any; + + /** + * The Texture Load Error Event. + * + * This event is dispatched by the Texture Manager when a texture it requested to load failed. + * This only happens when base64 encoded textures fail. All other texture types are loaded via the Loader Plugin. + * + * Listen to this event from within a Scene using: `this.textures.on('onerror', listener)`. + */ + const ERROR: any; + + /** + * The Texture Load Event. + * + * This event is dispatched by the Texture Manager when a texture has finished loading on it. + * This only happens for base64 encoded textures. All other texture types are loaded via the Loader Plugin. + * + * Listen to this event from within a Scene using: `this.textures.on('onload', listener)`. + * + * This event is dispatched after the [ADD]{@linkcode Phaser.Textures.Events#event:ADD} event. + */ + const LOAD: any; + + /** + * This internal event signifies that the Texture Manager is now ready and the Game can continue booting. + * + * When a Phaser Game instance is booting for the first time, the Texture Manager has to wait on a couple of non-blocking + * async events before it's fully ready to carry on. When those complete the Texture Manager emits this event via the Game + * instance, which tells the Game to carry on booting. + */ + const READY: any; + + /** + * The Texture Remove Event. + * + * This event is dispatched by the Texture Manager when a texture is removed from it. + * + * Listen to this event from within a Scene using: `this.textures.on('removetexture', listener)`. + * + * If you have any Game Objects still using the removed texture, they will start throwing + * errors the next time they try to render. Be sure to clear all use of the texture in this event handler. + */ + const REMOVE: any; + + } + + /** + * Linear filter type. + */ + const LINEAR: integer; + + /** + * Nearest Neighbor filter type. + */ + const NEAREST: integer; + + namespace Parsers { + } + } namespace Tilemaps { + namespace Formats { + /** + * CSV Map Type + */ + var CSV: number; + + /** + * Tiled JSON Map Type + */ + var TILED_JSON: number; + + /** + * 2D Array Map Type + */ + var ARRAY_2D: number; + + /** + * Weltmeister (Impact.js) Map Type + */ + var WELTMEISTER: number; + + } + + /** + * An Image Collection is a special Tile Set containing multiple images, with no slicing into each image. + * + * Image Collections are normally created automatically when Tiled data is loaded. + */ + class ImageCollection { + /** + * + * @param name The name of the image collection in the map data. + * @param firstgid The first image index this image collection contains. + * @param width Width of widest image (in pixels). Default 32. + * @param height Height of tallest image (in pixels). Default 32. + * @param margin The margin around all images in the collection (in pixels). Default 0. + * @param spacing The spacing between each image in the collection (in pixels). Default 0. + * @param properties Custom Image Collection properties. Default {}. + */ + constructor(name: string, firstgid: integer, width?: integer, height?: integer, margin?: integer, spacing?: integer, properties?: object); + + /** + * The name of the Image Collection. + */ + name: string; + + /** + * The Tiled firstgid value. + * This is the starting index of the first image index this Image Collection contains. + */ + firstgid: integer; + + /** + * The width of the widest image (in pixels). + */ + readonly imageWidth: integer; + + /** + * The height of the tallest image (in pixels). + */ + readonly imageHeight: integer; + + /** + * The margin around the images in the collection (in pixels). + * Use `setSpacing` to change. + */ + readonly imageMarge: integer; + + /** + * The spacing between each image in the collection (in pixels). + * Use `setSpacing` to change. + */ + readonly imageSpacing: integer; + + /** + * Image Collection-specific properties that are typically defined in the Tiled editor. + */ + properties: object; + + /** + * The cached images that are a part of this collection. + */ + readonly images: any[]; + + /** + * The total number of images in the image collection. + */ + readonly total: integer; + + /** + * Returns true if and only if this image collection contains the given image index. + * @param imageIndex The image index to search for. + */ + containsImageIndex(imageIndex: integer): boolean; + + /** + * Add an image to this Image Collection. + * @param gid The gid of the image in the Image Collection. + * @param image The the key of the image in the Image Collection and in the cache. + */ + addImage(gid: integer, image: string): Phaser.Tilemaps.ImageCollection; + + } + + /** + * Create a Tilemap from the given key or data. If neither is given, make a blank Tilemap. When + * loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing from + * a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the map data. For + * an empty map, you should specify tileWidth, tileHeight, width & height. + * @param scene The Scene to which this Tilemap belongs. + * @param key The key in the Phaser cache that corresponds to the loaded tilemap data. + * @param tileWidth The width of a tile in pixels. Default 32. + * @param tileHeight The height of a tile in pixels. Default 32. + * @param width The width of the map in tiles. Default 10. + * @param height The height of the map in tiles. Default 10. + * @param data Instead of loading from the cache, you can also load directly from + * a 2D array of tile indexes. + * @param insertNull Controls how empty tiles, tiles with an index of -1, in the + * map data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty + * location will get a Tile object with an index of -1. If you've a large sparsely populated map and + * the tile data doesn't need to change then setting this value to `true` will help with memory + * consumption. However if your map is small or you need to update the tiles dynamically, then leave + * the default value set. Default false. + */ + function ParseToTilemap(scene: Phaser.Scene, key?: string, tileWidth?: integer, tileHeight?: integer, width?: integer, height?: integer, data?: integer[][], insertNull?: boolean): Phaser.Tilemaps.Tilemap; + + /** + * A Tile is a representation of a single tile within the Tilemap. This is a lightweight data + * representation, so its position information is stored without factoring in scroll, layer + * scale or layer position. + */ + class Tile implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.Visible { + /** + * + * @param layer The LayerData object in the Tilemap that this tile belongs to. + * @param index The unique index of this tile within the map. + * @param x The x coordinate of this tile in tile coordinates. + * @param y The y coordinate of this tile in tile coordinates. + * @param width Width of the tile in pixels. + * @param height Height of the tile in pixels. + * @param baseWidth The base width a tile in the map (in pixels). Tiled maps support + * multiple tileset sizes within one map, but they are still placed at intervals of the base + * tile width. + * @param baseHeight The base height of the tile in pixels (in pixels). Tiled maps + * support multiple tileset sizes within one map, but they are still placed at intervals of the + * base tile height. + */ + constructor(layer: Phaser.Tilemaps.LayerData, index: integer, x: integer, y: integer, width: integer, height: integer, baseWidth: integer, baseHeight: integer); + + /** + * The LayerData in the Tilemap data that this tile belongs to. + */ + layer: Phaser.Tilemaps.LayerData; + + /** + * The index of this tile within the map data corresponding to the tileset, or -1 if this + * represents a blank tile. + */ + index: integer; + + /** + * The x map coordinate of this tile in tile units. + */ + x: integer; + + /** + * The y map coordinate of this tile in tile units. + */ + y: integer; + + /** + * The width of the tile in pixels. + */ + width: integer; + + /** + * The height of the tile in pixels. + */ + height: integer; + + /** + * The map's base width of a tile in pixels. Tiled maps support multiple tileset sizes + * within one map, but they are still placed at intervals of the base tile size. + */ + baseWidth: integer; + + /** + * The map's base height of a tile in pixels. Tiled maps support multiple tileset sizes + * within one map, but they are still placed at intervals of the base tile size. + */ + baseHeight: integer; + + /** + * The x coordinate of the top left of this tile in pixels. This is relative to the top left + * of the layer this tile is being rendered within. This property does NOT factor in camera + * scroll, layer scale or layer position. + */ + pixelX: number; + + /** + * The y coordinate of the top left of this tile in pixels. This is relative to the top left + * of the layer this tile is being rendered within. This property does NOT factor in camera + * scroll, layer scale or layer position. + */ + pixelY: number; + + /** + * Tile specific properties. These usually come from Tiled. + */ + properties: any; + + /** + * The rotation angle of this tile. + */ + rotation: number; + + /** + * Whether the tile should collide with any object on the left side. + */ + collideLeft: boolean; + + /** + * Whether the tile should collide with any object on the right side. + */ + collideRight: boolean; + + /** + * Whether the tile should collide with any object on the top side. + */ + collideUp: boolean; + + /** + * Whether the tile should collide with any object on the bottom side. + */ + collideDown: boolean; + + /** + * Whether the tile's left edge is interesting for collisions. + */ + faceLeft: boolean; + + /** + * Whether the tile's right edge is interesting for collisions. + */ + faceRight: boolean; + + /** + * Whether the tile's top edge is interesting for collisions. + */ + faceTop: boolean; + + /** + * Whether the tile's bottom edge is interesting for collisions. + */ + faceBottom: boolean; + + /** + * Tile collision callback. + */ + collisionCallback: Function; + + /** + * The context in which the collision callback will be called. + */ + collisionCallbackContext: object; + + /** + * The tint to apply to this tile. Note: tint is currently a single color value instead of + * the 4 corner tint component on other GameObjects. + */ + tint: number; + + /** + * An empty object where physics-engine specific information (e.g. bodies) may be stored. + */ + physics: object; + + /** + * Check if the given x and y world coordinates are within this Tile. This does not factor in + * camera scroll, layer scale or layer position. + * @param x The x coordinate to test. + * @param y The y coordinate to test. + */ + containsPoint(x: number, y: number): boolean; + + /** + * Copies the tile data & properties from the given tile to this tile. This copies everything + * except for position and interesting faces. + * @param tile The tile to copy from. + */ + copy(tile: Phaser.Tilemaps.Tile): Phaser.Tilemaps.Tile; + + /** + * The collision group for this Tile, defined within the Tileset. This returns a reference to + * the collision group stored within the Tileset, so any modification of the returned object + * will impact all tiles that have the same index as this tile. + */ + getCollisionGroup(): object; + + /** + * The tile data for this Tile, defined within the Tileset. This typically contains Tiled + * collision data, tile animations and terrain information. This returns a reference to the tile + * data stored within the Tileset, so any modification of the returned object will impact all + * tiles that have the same index as this tile. + */ + getTileData(): object; + + /** + * Gets the world X position of the left side of the tile, factoring in the layers position, + * scale and scroll. + * @param camera The Camera to use to perform the check. + */ + getLeft(camera?: Phaser.Cameras.Scene2D.Camera): number; + + /** + * Gets the world X position of the right side of the tile, factoring in the layer's position, + * scale and scroll. + * @param camera The Camera to use to perform the check. + */ + getRight(camera?: Phaser.Cameras.Scene2D.Camera): number; + + /** + * Gets the world Y position of the top side of the tile, factoring in the layer's position, + * scale and scroll. + * @param camera The Camera to use to perform the check. + */ + getTop(camera?: Phaser.Cameras.Scene2D.Camera): number; + + /** + * Gets the world Y position of the bottom side of the tile, factoring in the layer's position, + * scale and scroll. + * @param camera The Camera to use to perform the check. + */ + getBottom(camera?: Phaser.Cameras.Scene2D.Camera): number; + + /** + * Gets the world rectangle bounding box for the tile, factoring in the layers position, + * scale and scroll. + * @param camera The Camera to use to perform the check. + * @param output [description] + */ + getBounds(camera?: Phaser.Cameras.Scene2D.Camera, output?: object): Phaser.Geom.Rectangle | object; + + /** + * Gets the world X position of the center of the tile, factoring in the layer's position, + * scale and scroll. + * @param camera The Camera to use to perform the check. + */ + getCenterX(camera?: Phaser.Cameras.Scene2D.Camera): number; + + /** + * Gets the world Y position of the center of the tile, factoring in the layer's position, + * scale and scroll. + * @param camera The Camera to use to perform the check. + */ + getCenterY(camera?: Phaser.Cameras.Scene2D.Camera): number; + + /** + * Clean up memory. + */ + destroy(): void; + + /** + * Check for intersection with this tile. This does not factor in camera scroll, layer scale or + * layer position. + * @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; + + /** + * Checks if the tile is interesting. + * @param collides If true, will consider the tile interesting if it collides on any side. + * @param faces If true, will consider the tile interesting if it has an interesting face. + */ + isInteresting(collides: boolean, faces: boolean): boolean; + + /** + * Reset collision status flags. + * @param recalculateFaces Whether or not to recalculate interesting faces for this tile and its neighbors. Default true. + */ + resetCollision(recalculateFaces?: boolean): Phaser.Tilemaps.Tile; + + /** + * Reset faces. + */ + resetFaces(): Phaser.Tilemaps.Tile; + + /** + * 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 recalculateFaces Whether or not to recalculate interesting faces + * for this tile and its neighbors. Default true. + */ + setCollision(left: boolean, right?: boolean, up?: boolean, down?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.Tile; + + /** + * Set a callback to be called when this tile is hit by an object. The callback must true for + * collision processing to take place. + * @param callback Callback function. + * @param context Callback will be called within this context. + */ + setCollisionCallback(callback: Function, context: object): Phaser.Tilemaps.Tile; + + /** + * Sets the size of the tile and updates its pixelX and pixelY. + * @param tileWidth The width of the tile in pixels. + * @param tileHeight The height of the tile in pixels. + * @param baseWidth The base width a tile in the map (in pixels). + * @param baseHeight The base height of the tile in pixels (in pixels). + */ + setSize(tileWidth: integer, tileHeight: integer, baseWidth: integer, baseHeight: integer): Phaser.Tilemaps.Tile; + + /** + * Used internally. Updates the tile's world XY position based on the current tile size. + */ + updatePixelXY(): Phaser.Tilemaps.Tile; + + /** + * True if this tile can collide on any of its faces or has a collision callback set. + */ + readonly canCollide: boolean; + + /** + * True if this tile can collide on any of its faces. + */ + readonly collides: boolean; + + /** + * True if this tile has any interesting faces. + */ + readonly hasInterestingFace: boolean; + + /** + * The tileset that contains this Tile. This is null if accessed from a LayerData instance + * before the tile is placed in a StaticTilemapLayer or DynamicTilemapLayer, or if the tile has + * an index that doesn't correspond to any of the map's tilesets. + */ + readonly tileset: Phaser.Tilemaps.Tileset; + + /** + * The tilemap layer that contains this Tile. This will only return null if accessed from a + * LayerData instance before the tile is placed within a StaticTilemapLayer or + * DynamicTilemapLayer. + */ + readonly tilemapLayer: Phaser.Tilemaps.StaticTilemapLayer | Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * The tilemap that contains this Tile. This will only return null if accessed from a LayerData + * instance before the tile is placed within a StaticTilemapLayer or DynamicTilemapLayer. + */ + readonly tilemap: Phaser.Tilemaps.Tilemap; + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. + * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. + * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. + */ + setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopLeft: number; + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopRight: number; + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomLeft: number; + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomRight: number; + + /** + * The horizontally flipped state of the Game Object. + * + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + */ + flipX: boolean; + + /** + * The vertically flipped state of the Game Object. + * + * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + */ + flipY: boolean; + + /** + * Toggles the horizontal flipped state of this Game Object. + * + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + */ + toggleFlipX(): this; + + /** + * Toggles the vertical flipped state of this Game Object. + */ + toggleFlipY(): this; + + /** + * Sets the horizontal flipped state of this Game Object. + * + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipX(value: boolean): this; + + /** + * Sets the vertical flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipY(value: boolean): this; + + /** + * Sets the horizontal and vertical flipped state of this Game Object. + * + * A Game Object that is flipped will render inversed on the flipped axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * @param y The horizontal flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlip(x: boolean, y: boolean): this; + + /** + * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. + */ + resetFlip(): this; + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + */ + visible: boolean; + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): this; + + } + + /** + * A Tilemap is a container for Tilemap data. This isn't a display object, rather, it holds data + * about the map and allows you to add tilesets and tilemap layers to it. A map can have one or + * more tilemap layers (StaticTilemapLayer or DynamicTilemapLayer), which are the display + * objects that actually render tiles. + * + * The Tilemap data be parsed from a Tiled JSON file, a CSV file or a 2D array. Tiled is a free + * software package specifically for creating tile maps, and is available from: + * http://www.mapeditor.org + * + * A Tilemap has handy methods for getting & manipulating the tiles within a layer. You can only + * use the methods that change tiles (e.g. removeTileAt) on a DynamicTilemapLayer. + * + * Note that all Tilemaps use a base tile size to calculate dimensions from, but that a + * StaticTilemapLayer or DynamicTilemapLayer may have its own unique tile size that overrides + * it. + * + * As of Phaser 3.21.0, if your tilemap includes layer groups (a feature of Tiled 1.2.0+) these + * will be traversed and the following properties will affect children: + * - opacity (blended with parent) and visibility (parent overrides child) + * - Vertical and horizontal offset + * The grouping hierarchy is not preserved and all layers will be flattened into a single array. + * Group layers are parsed during Tilemap construction but are discarded after parsing so dynamic + * layers will NOT continue to be affected by a parent. + * + * To avoid duplicate layer names, a layer that is a child of a group layer will have its parent + * group name prepended with a '/'. For example, consider a group called 'ParentGroup' with a + * child called 'Layer 1'. In the Tilemap object, 'Layer 1' will have the name + * 'ParentGroup/Layer 1'. + */ + class Tilemap { + /** + * + * @param scene The Scene to which this Tilemap belongs. + * @param mapData A MapData instance containing Tilemap data. + */ + constructor(scene: Phaser.Scene, mapData: Phaser.Tilemaps.MapData); + + scene: Phaser.Scene; + + /** + * The base width of a tile in pixels. Note that individual layers may have a different tile + * width. + */ + tileWidth: integer; + + /** + * The base height of a tile in pixels. Note that individual layers may have a different + * tile height. + */ + tileHeight: integer; + + /** + * The width of the map (in tiles). + */ + width: number; + + /** + * The height of the map (in tiles). + */ + height: number; + + /** + * The orientation of the map data (as specified in Tiled), usually 'orthogonal'. + */ + orientation: string; + + /** + * The render (draw) order of the map data (as specified in Tiled), usually 'right-down'. + * + * The draw orders are: + * + * right-down + * left-down + * right-up + * left-up + * + * This can be changed via the `setRenderOrder` method. + */ + renderOrder: string; + + /** + * The format of the map data. + */ + format: number; + + /** + * The version of the map data (as specified in Tiled, usually 1). + */ + version: number; + + /** + * Map specific properties as specified in Tiled. + */ + properties: object; + + /** + * The width of the map in pixels based on width * tileWidth. + */ + widthInPixels: number; + + /** + * The height of the map in pixels based on height * tileHeight. + */ + heightInPixels: number; + + imageCollections: Phaser.Tilemaps.ImageCollection[]; + + /** + * An array of Tiled Image Layers. + */ + images: any[]; + + /** + * An array of Tilemap layer data. + */ + layers: Phaser.Tilemaps.LayerData[]; + + /** + * An array of Tilesets used in the map. + */ + tilesets: Phaser.Tilemaps.Tileset[]; + + /** + * An array of ObjectLayer instances parsed from Tiled object layers. + */ + objects: Phaser.Tilemaps.ObjectLayer[]; + + /** + * The index of the currently selected LayerData object. + */ + currentLayerIndex: integer; + + /** + * Sets the rendering (draw) order of the tiles in this map. + * + * The default is 'right-down', meaning it will order the tiles starting from the top-left, + * drawing to the right and then moving down to the next row. + * + * The draw orders are: + * + * 0 = right-down + * 1 = left-down + * 2 = right-up + * 3 = left-up + * + * Setting the render order does not change the tiles or how they are stored in the layer, + * it purely impacts the order in which they are rendered. + * + * You can provide either an integer (0 to 3), or the string version of the order. + * + * Calling this method _after_ creating Static or Dynamic Tilemap Layers will **not** automatically + * update them to use the new render order. If you call this method after creating layers, use their + * own `setRenderOrder` methods to change them as needed. + * @param renderOrder The render (draw) order value. Either an integer between 0 and 3, or a string: 'right-down', 'left-down', 'right-up' or 'left-up'. + */ + setRenderOrder(renderOrder: integer | string): this; + + /** + * 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 tilesetName 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 + * `undefined` or `null` it will look for an image with a key matching the tilesetName parameter. + * @param tileWidth The width of the tile (in pixels) in the Tileset Image. If not + * given it will default to the map's tileWidth value, or the tileWidth specified in the Tiled + * JSON file. + * @param tileHeight The height of the tiles (in pixels) in the Tileset Image. If + * not given it will default to the map's tileHeight value, or the tileHeight specified in the + * Tiled JSON file. + * @param tileMargin The margin around the tiles in the sheet (in pixels). If not + * specified, it will default to 0 or the value specified in the Tiled JSON file. + * @param tileSpacing The spacing between each the tile in the sheet (in pixels). + * If not specified, it will default to 0 or the value specified in the Tiled JSON file. + * @param gid If adding multiple tilesets to a blank map, specify the starting + * GID this set will use here. Default 0. + */ + addTilesetImage(tilesetName: string, key?: string, tileWidth?: integer, tileHeight?: integer, tileMargin?: integer, tileSpacing?: integer, gid?: integer): Phaser.Tilemaps.Tileset; + + /** + * Turns the DynamicTilemapLayer associated with the given layer into a StaticTilemapLayer. If + * no layer specified, the map's current layer is used. This is useful if you want to manipulate + * a map at the start of a scene, but then make it non-manipulable and optimize it for speed. + * Note: the DynamicTilemapLayer passed in is destroyed, so make sure to store the value + * returned from this method if you want to manipulate the new StaticTilemapLayer. + * @param layer The name of the layer from Tiled, the + * index of the layer in the map, or a DynamicTilemapLayer. + */ + convertLayerToStatic(layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer): Phaser.Tilemaps.StaticTilemapLayer; + + /** + * Copies the tiles in the source rectangular area to a new destination (all specified in tile + * coordinates) within the layer. This copies all tile properties & recalculates collision + * information in the destination region. + * + * If no layer specified, the map's current layer is used. This cannot be applied to StaticTilemapLayers. + * @param srcTileX The x coordinate of the area to copy from, in tiles, not pixels. + * @param srcTileY The y coordinate of the area to copy from, in tiles, not pixels. + * @param width The width of the area to copy, in tiles, not pixels. + * @param height The height of the area to copy, in tiles, not pixels. + * @param destTileX The x coordinate of the area to copy to, in tiles, not pixels. + * @param destTileY The y coordinate of the area to copy to, in tiles, not pixels. + * @param recalculateFaces `true` if the faces data should be recalculated. Default true. + * @param layer The tile layer to use. If not given the current layer is used. + */ + copy(srcTileX: integer, srcTileY: integer, width: integer, height: integer, destTileX: integer, destTileY: integer, recalculateFaces?: boolean, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; + + /** + * Creates a new and empty DynamicTilemapLayer. The currently selected layer in the map is set to this new layer. + * @param name The name of this layer. Must be unique within the map. + * @param tileset The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object. + * @param x The world x position where the top left of this layer will be placed. Default 0. + * @param y The world y position where the top left of this layer will be placed. Default 0. + * @param width The width of the layer in tiles. If not specified, it will default to the map's width. + * @param height The height of the layer in tiles. If not specified, it will default to the map's height. + * @param tileWidth The width of the tiles the layer uses for calculations. If not specified, it will default to the map's tileWidth. + * @param tileHeight The height of the tiles the layer uses for calculations. If not specified, it will default to the map's tileHeight. + */ + createBlankDynamicLayer(name: string, tileset: string | string[] | Phaser.Tilemaps.Tileset | Phaser.Tilemaps.Tileset[], x?: number, y?: number, width?: integer, height?: integer, tileWidth?: integer, tileHeight?: integer): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Creates a new DynamicTilemapLayer that renders the LayerData associated with the given + * `layerID`. The currently selected layer in the map is set to this new layer. + * + * The `layerID` is important. If you've created your map in Tiled then you can get this by + * looking in Tiled and looking at the layer name. Or you can open the JSON file it exports and + * look at the layers[].name value. Either way it must match. + * + * Unlike a static layer, a dynamic layer can be modified. See DynamicTilemapLayer for more + * information. + * @param layerID The layer array index value, or if a string is given, the layer name from Tiled. + * @param tileset The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object. + * @param x The x position to place the layer in the world. If not specified, it will default to the layer offset from Tiled or 0. Default 0. + * @param y The y position to place the layer in the world. If not specified, it will default to the layer offset from Tiled or 0. Default 0. + */ + createDynamicLayer(layerID: integer | string, tileset: string | string[] | Phaser.Tilemaps.Tileset | Phaser.Tilemaps.Tileset[], x?: number, y?: number): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Creates a Sprite for every object matching the given gid in the map data. All properties from + * the map data objectgroup are copied into the `spriteConfig`, so you can use this as an easy + * way to 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. + * + * Custom object properties not sharing names with the Sprite's own properties are copied to the + * Sprite's {@link Phaser.GameObjects.Sprite#data data store}. + * @param name The name of the object layer (from Tiled) to create Sprites from. + * @param id Either the id (object), gid (tile object) or name (object or + * tile object) from Tiled. Ids are unique in Tiled, but a gid is shared by all tile objects + * with the same graphic. The same name can be used on multiple objects. + * @param spriteConfig The config object to pass into the Sprite creator (i.e. + * scene.make.sprite). + * @param scene The Scene to create the Sprites within. Default the scene the map is within. + */ + createFromObjects(name: string, id: integer | string, spriteConfig: Phaser.Types.GameObjects.Sprite.SpriteConfig, scene?: Phaser.Scene): Phaser.GameObjects.Sprite[]; + + /** + * Creates a Sprite for every object matching the given tile indexes in the layer. You can + * optionally specify if each tile will be replaced with a new tile after the Sprite has been + * 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 indexes 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 leave the tiles unchanged. If an array is given, it is assumed to be a + * one-to-one mapping with the indexes array. + * @param spriteConfig The config object to pass into the Sprite creator (i.e. scene.make.sprite). + * @param scene The Scene to create the Sprites within. Default scene the map is within. + * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. + * @param layer The tile layer to use. If not given the current layer is used. + */ + createFromTiles(indexes: integer | any[], replacements: integer | any[], spriteConfig: Phaser.Types.GameObjects.Sprite.SpriteConfig, scene?: Phaser.Scene, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.GameObjects.Sprite[]; + + /** + * Creates a new StaticTilemapLayer that renders the LayerData associated with the given + * `layerID`. The currently selected layer in the map is set to this new layer. + * + * The `layerID` is important. If you've created your map in Tiled then you can get this by + * looking in Tiled and looking at the layer name. Or you can open the JSON file it exports and + * look at the layers[].name value. Either way it must match. + * + * It's important to remember that a static layer cannot be modified. See StaticTilemapLayer for + * more information. + * @param layerID The layer array index value, or if a string is given, the layer name from Tiled. + * @param tileset The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object. + * @param x The x position to place the layer in the world. If not specified, it will default to the layer offset from Tiled or 0. Default 0. + * @param y The y position to place the layer in the world. If not specified, it will default to the layer offset from Tiled or 0. Default 0. + */ + createStaticLayer(layerID: integer | string, tileset: string | string[] | Phaser.Tilemaps.Tileset | Phaser.Tilemaps.Tileset[], x?: number, y?: number): Phaser.Tilemaps.StaticTilemapLayer; + + /** + * Removes all layer data from this Tilemap and nulls the scene reference. This will destroy any + * StaticTilemapLayers or DynamicTilemapLayers that have been linked to LayerData. + */ + destroy(): void; + + /** + * Sets the tiles in the given rectangular area (in tile coordinates) of the layer with the + * specified index. Tiles will be set to collide if the given index is a colliding index. + * Collision information in the region will be recalculated. + * + * If no layer specified, the map's current layer is used. + * This cannot be applied to StaticTilemapLayers. + * @param index The tile index to fill the area with. + * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. + * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. + * @param recalculateFaces `true` if the faces data should be recalculated. Default true. + * @param layer The tile layer to use. If not given the current layer is used. + */ + fill(index: integer, tileX?: integer, tileY?: integer, width?: integer, height?: integer, recalculateFaces?: boolean, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; + + /** + * For each object in the given object layer, run the given filter callback function. Any + * objects that pass the filter test (i.e. where the callback returns true) will returned as a + * new array. Similar to Array.prototype.Filter in vanilla JS. + * @param objectLayer The name of an object layer (from Tiled) or an ObjectLayer instance. + * @param callback The callback. Each object 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. + */ + filterObjects(objectLayer: Phaser.Tilemaps.ObjectLayer | string, callback: TilemapFilterCallback, context?: object): Phaser.GameObjects.GameObject[]; + + /** + * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given + * filter callback function. Any tiles that pass the filter test (i.e. where the callback returns + * true) will returned as a new array. Similar to Array.prototype.Filter in vanilla JS. + * If no layer specified, the map's current layer is used. + * @param callback The callback. Each tile in the given area will be passed to this + * callback as the first and only parameter. The callback should return true for tiles that pass the + * filter. + * @param context The context under which the callback should be run. + * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area to filter. Default 0. + * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area to filter. Default 0. + * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. + * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. + * @param filteringOptions Optional filters to apply when getting the tiles. + * @param layer The tile layer to use. If not given the current layer is used. + */ + filterTiles(callback: Function, context?: object, tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tile[]; + + /** + * Searches the entire map layer for the first tile matching the given index, then returns that Tile + * object. If no match is found, it returns null. 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 traveling up to + * the top-left. + * If no layer specified, the map's current layer is used. + * @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 tile layer to use. If not given the current layer is used. + */ + findByIndex(index: integer, skip?: integer, reverse?: boolean, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tile; + + /** + * Find the first object in the given object layer that satisfies the provided testing function. + * I.e. finds the first object for which `callback` returns true. Similar to + * Array.prototype.find in vanilla JS. + * @param objectLayer The name of an object layer (from Tiled) or an ObjectLayer instance. + * @param callback The callback. Each object 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. + */ + findObject(objectLayer: Phaser.Tilemaps.ObjectLayer | string, callback: TilemapFindCallback, context?: object): Phaser.GameObjects.GameObject; + + /** + * Find the first tile in the given rectangular area (in tile coordinates) of the layer that + * satisfies the provided testing function. I.e. finds the first tile for which `callback` returns + * true. Similar to Array.prototype.find in vanilla JS. + * If no layer specified, the maps current layer is used. + * @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 tileX The left most tile index (in tile coordinates) to use as the origin of the area to search. Default 0. + * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area to search. Default 0. + * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. + * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. + * @param filteringOptions Optional filters to apply when getting the tiles. + * @param layer The Tile layer to run the search on. If not provided will use the current layer. + */ + findTile(callback: FindTileCallback, context?: object, tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tile; + + /** + * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given + * callback. Similar to Array.prototype.forEach in vanilla JS. + * + * If no layer specified, the map's current layer is used. + * @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 tileX The left most tile index (in tile coordinates) to use as the origin of the area to search. Default 0. + * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area to search. Default 0. + * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. + * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. + * @param filteringOptions Optional filters to apply when getting the tiles. + * @param layer The Tile layer to run the search on. If not provided will use the current layer. + */ + forEachTile(callback: EachTileCallback, context?: object, tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; + + /** + * Gets the image layer index based on its name. + * @param name The name of the image to get. + */ + getImageIndex(name: string): integer; + + /** + * Return a list of all valid imagelayer names loaded in this Tilemap. + */ + getImageLayerNames(): string[]; + + /** + * Internally used. Returns the index of the object in one of the Tilemaps arrays whose name + * property matches the given `name`. + * @param location The Tilemap array to search. + * @param name The name of the array element to get. + */ + getIndex(location: any[], name: string): number; + + /** + * Gets the LayerData from this.layers that is associated with `layer`, or null if an invalid + * `layer` is given. + * @param layer The name of the + * layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a + * StaticTilemapLayer. If not given will default to the maps current layer index. + */ + getLayer(layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.LayerData; + + /** + * Gets the ObjectLayer from this.objects that has the given `name`, or null if no ObjectLayer + * is found with that name. + * @param name The name of the object layer from Tiled. + */ + getObjectLayer(name?: string): Phaser.Tilemaps.ObjectLayer; + + /** + * Return a list of all valid objectgroup names loaded in this Tilemap. + */ + getObjectLayerNames(): string[]; + + /** + * Gets the LayerData index of the given `layer` within this.layers, or null if an invalid + * `layer` is given. + * @param layer The name of the + * layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a + * StaticTilemapLayer. If not given will default to the map's current layer index. + */ + getLayerIndex(layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): integer; + + /** + * Gets the index of the LayerData within this.layers that has the given `name`, or null if an + * invalid `name` is given. + * @param name The name of the layer to get. + */ + getLayerIndexByName(name: string): integer; + + /** + * Gets a tile at the given tile coordinates from the given layer. + * If no layer specified, the map's current layer is used. + * @param tileX X position to get the tile from (given in tile units, not pixels). + * @param tileY Y position to get the tile from (given in tile units, not pixels). + * @param nonNull If true getTile won't return null for empty tiles, but a Tile object with an index of -1. Default false. + * @param layer The tile layer to use. If not given the current layer is used. + */ + getTileAt(tileX: integer, tileY: integer, nonNull?: boolean, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tile; + + /** + * Gets a tile at the given world coordinates from the given layer. + * If no layer specified, the map's current layer is used. + * @param worldX X position to get the tile from (given in pixels) + * @param worldY Y position to get the tile from (given in pixels) + * @param nonNull If true, function won't return null for empty tiles, but a Tile object with an index of -1. Default false. + * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. + * @param layer The tile layer to use. If not given the current layer is used. + */ + getTileAtWorldXY(worldX: number, worldY: number, nonNull?: boolean, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tile; + + /** + * Return a list of all valid tilelayer names loaded in this Tilemap. + */ + getTileLayerNames(): string[]; + + /** + * Gets the tiles in the given rectangular area (in tile coordinates) of the layer. + * If no layer specified, the maps current layer is used. + * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. + * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. + * @param filteringOptions Optional filters to apply when getting the tiles. + * @param layer The tile layer to use. If not given the current layer is used. + */ + getTilesWithin(tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tile[]; + + /** + * Gets the tiles that overlap with the given shape in the given layer. The shape must be a Circle, + * Line, Rectangle or Triangle. The shape should be in world coordinates. + * If no layer specified, the maps current layer is used. + * @param shape A shape in world (pixel) coordinates + * @param filteringOptions Optional filters to apply when getting the tiles. + * @param camera The Camera to use when factoring in which tiles to return. Default main camera. + * @param layer The tile layer to use. If not given the current layer is used. + */ + getTilesWithinShape(shape: Phaser.Geom.Circle | Phaser.Geom.Line | Phaser.Geom.Rectangle | Phaser.Geom.Triangle, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tile[]; + + /** + * Gets the tiles in the given rectangular area (in world coordinates) of the layer. + * If no layer specified, the maps current layer is used. + * @param worldX The world x coordinate for the top-left of the area. + * @param worldY The world y coordinate for the top-left of the area. + * @param width The width of the area. + * @param height The height of the area. + * @param filteringOptions Optional filters to apply when getting the tiles. + * @param camera The Camera to use when factoring in which tiles to return. Default main camera. + * @param layer The tile layer to use. If not given the current layer is used. + */ + getTilesWithinWorldXY(worldX: number, worldY: number, width: number, height: number, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tile[]; + + /** + * Gets the Tileset that has the given `name`, or null if an invalid `name` is given. + * @param name The name of the Tileset to get. + */ + getTileset(name: string): Phaser.Tilemaps.Tileset; + + /** + * Gets the index of the Tileset within this.tilesets that has the given `name`, or null if an + * invalid `name` is given. + * @param name The name of the Tileset to get. + */ + getTilesetIndex(name: string): integer; + + /** + * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns + * false if there is no tile or if the tile at that location has an index of -1. + * + * If no layer specified, the map's current layer is used. + * @param tileX The x coordinate, in tiles, not pixels. + * @param tileY The y coordinate, in tiles, not pixels. + * @param layer The tile layer to use. If not given the current layer is used. + */ + hasTileAt(tileX: integer, tileY: integer, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): boolean; + + /** + * Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns + * false if there is no tile or if the tile at that location has an index of -1. + * + * If no layer specified, the maps current layer is used. + * @param worldX The x coordinate, in pixels. + * @param worldY The y coordinate, in pixels. + * @param camera The Camera to use when factoring in which tiles to return. Default main camera. + * @param layer The tile layer to use. If not given the current layer is used. + */ + hasTileAtWorldXY(worldX: number, worldY: number, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): boolean; + + /** + * The LayerData object that is currently selected in the map. You can set this property using + * any type supported by setLayer. + */ + layer: Phaser.Tilemaps.LayerData; + + /** + * Puts a tile at the given tile coordinates in the specified layer. You can pass in either an index + * or a Tile object. If you pass in a Tile, all attributes will be copied over to the specified + * location. If you pass in an index, only the index at the specified location will be changed. + * Collision information will be recalculated at the specified location. + * + * If no layer specified, the maps current layer is used. + * + * This cannot be applied to StaticTilemapLayers. + * @param tile The index of this tile to set or a Tile object. + * @param tileX The x coordinate, in tiles, not pixels. + * @param tileY The y coordinate, in tiles, not pixels. + * @param recalculateFaces `true` if the faces data should be recalculated. Default true. + * @param layer The tile layer to use. If not given the current layer is used. + */ + putTileAt(tile: integer | Phaser.Tilemaps.Tile, tileX: integer, tileY: integer, recalculateFaces?: boolean, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tile; + + /** + * Puts a tile at the given world coordinates (pixels) in the specified layer. You can pass in either + * an index or a Tile object. If you pass in a Tile, all attributes will be copied over to the + * specified location. If you pass in an index, only the index at the specified location will be + * changed. Collision information will be recalculated at the specified location. + * + * If no layer specified, the maps current layer is used. This + * cannot be applied to StaticTilemapLayers. + * @param tile The index of this tile to set or a Tile object. + * @param worldX The x coordinate, in pixels. + * @param worldY The y coordinate, in pixels. + * @param recalculateFaces `true` if the faces data should be recalculated. Default true. + * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. + * @param layer The tile layer to use. If not given the current layer is used. + */ + putTileAtWorldXY(tile: integer | Phaser.Tilemaps.Tile, worldX: number, worldY: number, recalculateFaces?: boolean, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tile; + + /** + * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified + * layer. The array can be composed of either tile indexes or Tile objects. If you pass in a Tile, + * all attributes will be copied over to the specified location. If you pass in an index, only the + * index at the specified location will be changed. Collision information will be recalculated + * within the region tiles were changed. + * + * If no layer specified, the maps current layer is used. + * This cannot be applied to StaticTilemapLayers. + * @param tile A row (array) or grid (2D array) of Tiles or tile indexes to place. + * @param tileX The x coordinate, in tiles, not pixels. + * @param tileY The y coordinate, in tiles, not pixels. + * @param recalculateFaces `true` if the faces data should be recalculated. Default true. + * @param layer The tile layer to use. If not given the current layer is used. + */ + putTilesAt(tile: integer[] | integer[][] | Phaser.Tilemaps.Tile[] | Phaser.Tilemaps.Tile[][], tileX: integer, tileY: integer, recalculateFaces?: boolean, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; + + /** + * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the + * specified layer. Each tile will receive a new index. If an array of indexes is passed in, then + * those will be used for randomly assigning new tile indexes. If an array is not provided, the + * indexes found within the region (excluding -1) will be used for randomly assigning new tile + * indexes. This method only modifies tile indexes and does not change collision information. + * + * If no layer specified, the maps current layer is used. + * This cannot be applied to StaticTilemapLayers. + * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. + * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. + * @param indexes An array of indexes to randomly draw from during randomization. + * @param layer The tile layer to use. If not given the current layer is used. + */ + randomize(tileX?: integer, tileY?: integer, width?: integer, height?: integer, indexes?: integer[], layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; + + /** + * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting + * faces are used internally for optimizing collisions against tiles. This method is mostly used + * internally to optimize recalculating faces when only one tile has been changed. + * + * If no layer specified, the maps current layer is used. + * @param tileX The x coordinate, in tiles, not pixels. + * @param tileY The y coordinate, in tiles, not pixels. + * @param layer The tile layer to use. If not given the current layer is used. + */ + calculateFacesAt(tileX: integer, tileY: integer, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; + + /** + * Calculates interesting faces within the rectangular area specified (in tile coordinates) of the + * layer. Interesting faces are used internally for optimizing collisions against tiles. This method + * is mostly used internally. + * + * If no layer specified, the map's current layer is used. + * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. + * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. + * @param layer The tile layer to use. If not given the current layer is used. + */ + calculateFacesWithin(tileX?: integer, tileY?: integer, width?: integer, height?: integer, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; + + /** + * Removes the given TilemapLayer from this Tilemap without destroying it. + * + * If no layer specified, the map's current layer is used. + * @param layer The tile layer to be removed. + */ + removeLayer(layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; + + /** + * Destroys the given TilemapLayer and removes it from this Tilemap. + * + * If no layer specified, the map's current layer is used. + * @param layer The tile layer to be destroyed. + */ + destroyLayer(layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; + + /** + * Removes all layers from this Tilemap and destroys any associated StaticTilemapLayers or + * DynamicTilemapLayers. + */ + removeAllLayers(): Phaser.Tilemaps.Tilemap; + + /** + * Removes the given Tile, or an array of Tiles, from the layer to which they belong, + * and optionally recalculates the collision information. + * + * This cannot be applied to Tiles that belong to Static Tilemap Layers. + * @param tiles The Tile to remove, or an array of Tiles. + * @param replaceIndex After removing the Tile, insert a brand new Tile into its location with the given index. Leave as -1 to just remove the tile. Default -1. + * @param recalculateFaces `true` if the faces data should be recalculated. Default true. + */ + removeTile(tiles: Phaser.Tilemaps.Tile | Phaser.Tilemaps.Tile[], replaceIndex?: integer, recalculateFaces?: boolean): Phaser.Tilemaps.Tile[]; + + /** + * Removes the tile at the given tile coordinates in the specified layer and updates the layer's + * collision information. + * + * If no layer specified, the maps current layer is used. + * This cannot be applied to StaticTilemapLayers. + * @param tileX The x coordinate, in tiles, not pixels. + * @param tileY The y coordinate, in tiles, not pixels. + * @param replaceWithNull If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1. Default true. + * @param recalculateFaces `true` if the faces data should be recalculated. Default true. + * @param layer The tile layer to use. If not given the current layer is used. + */ + removeTileAt(tileX: integer, tileY: integer, replaceWithNull?: boolean, recalculateFaces?: boolean, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tile; + + /** + * Removes the tile at the given world coordinates in the specified layer and updates the layer's + * collision information. + * + * If no layer specified, the maps current layer is used. + * This cannot be applied to StaticTilemapLayers. + * @param worldX The x coordinate, in pixels. + * @param worldY The y coordinate, in pixels. + * @param replaceWithNull If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1. Default true. + * @param recalculateFaces `true` if the faces data should be recalculated. Default true. + * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. + * @param layer The tile layer to use. If not given the current layer is used. + */ + removeTileAtWorldXY(worldX: number, worldY: number, replaceWithNull?: boolean, recalculateFaces?: boolean, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tile; + + /** + * Draws a debug representation of the layer to the given Graphics. This is helpful when you want to + * get a quick idea of which of your tiles are colliding and which have interesting faces. The tiles + * are drawn starting at (0, 0) in the Graphics, allowing you to place the debug representation + * wherever you want on the screen. + * + * If no layer specified, the maps current layer is used. + * @param graphics The target Graphics object to draw upon. + * @param styleConfig An object specifying the colors to use for the debug drawing. + * @param layer The tile layer to use. If not given the current layer is used. + */ + renderDebug(graphics: Phaser.GameObjects.Graphics, styleConfig: Phaser.Types.Tilemaps.StyleConfig, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; + + /** + * Draws a debug representation of all layers within this Tilemap to the given Graphics object. + * + * This is helpful when you want to get a quick idea of which of your tiles are colliding and which + * have interesting faces. The tiles are drawn starting at (0, 0) in the Graphics, allowing you to + * place the debug representation wherever you want on the screen. + * @param graphics The target Graphics object to draw upon. + * @param styleConfig An object specifying the colors to use for the debug drawing. + * @param layer The tile layer to use. If not given the current layer is used. + */ + renderDebugFull(graphics: Phaser.GameObjects.Graphics, styleConfig: Phaser.Types.Tilemaps.StyleConfig, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; + + /** + * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching + * `findIndex` and updates their index to match `newIndex`. This only modifies the index and does + * not change collision information. + * + * If no layer specified, the maps current layer is used. + * This cannot be applied to StaticTilemapLayers. + * @param findIndex The index of the tile to search for. + * @param newIndex The index of the tile to replace it with. + * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. + * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. + * @param layer The tile layer to use. If not given the current layer is used. + */ + replaceByIndex(findIndex: integer, newIndex: integer, tileX?: integer, tileY?: integer, width?: integer, height?: integer, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; + + /** + * Sets collision on the given tile or tiles within a layer by index. 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). + * + * If no layer specified, the map's current layer is used. + * @param indexes Either a single tile index, or an array of tile indexes. + * @param collides If true it will enable collision. If false it will clear collision. Default true. + * @param recalculateFaces Whether or not to recalculate the tile faces after the update. Default true. + * @param layer The tile layer to use. If not given the current layer is used. + * @param updateLayer If true, updates the current tiles on the layer. Set to false if no tiles have been placed for significant performance boost. Default true. + */ + setCollision(indexes: integer | any[], collides?: boolean, recalculateFaces?: boolean, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer, updateLayer?: boolean): Phaser.Tilemaps.Tilemap; + + /** + * Sets collision on a range of tiles in a layer whose index is between the specified `start` and + * `stop` (inclusive). 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). + * + * If no layer specified, the map's current layer is used. + * @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 recalculateFaces Whether or not to recalculate the tile faces after the update. Default true. + * @param layer The tile layer to use. If not given the current layer is used. + */ + setCollisionBetween(start: integer, stop: integer, collides?: boolean, recalculateFaces?: boolean, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; + + /** + * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property + * that matches the given properties object, its collision flag will be set. The `collides` + * parameter controls if collision will be enabled (true) or disabled (false). Passing in + * `{ collides: true }` would update the collision flag on any tiles with a "collides" property that + * has a value of true. Any tile that doesn't have "collides" set to true will be ignored. You can + * also use an array of values, e.g. `{ types: ["stone", "lava", "sand" ] }`. If a tile has a + * "types" property that matches any of those values, its collision flag will be updated. + * + * If no layer specified, the map's current layer is used. + * @param properties An object with tile properties and corresponding values that should be checked. + * @param collides If true it will enable collision. If false it will clear collision. Default true. + * @param recalculateFaces Whether or not to recalculate the tile faces after the update. Default true. + * @param layer The tile layer to use. If not given the current layer is used. + */ + setCollisionByProperty(properties: object, collides?: boolean, recalculateFaces?: boolean, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; + + /** + * Sets collision on all tiles in the given layer, except for tiles that have an index specified in + * the given array. The `collides` parameter controls if collision will be enabled (true) or + * disabled (false). + * + * If no layer specified, the map's current layer is used. + * @param indexes An array of the tile indexes to not be counted for collision. + * @param collides If true it will enable collision. If false it will clear collision. Default true. + * @param recalculateFaces Whether or not to recalculate the tile faces after the update. Default true. + * @param layer The tile layer to use. If not given the current layer is used. + */ + setCollisionByExclusion(indexes: integer[], collides?: boolean, recalculateFaces?: boolean, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; + + /** + * Sets collision on the tiles within a layer by checking each tile's collision group data + * (typically defined in Tiled within the tileset collision editor). If any objects are found within + * a tile's collision group, the tile's colliding information will be set. The `collides` parameter + * controls if collision will be enabled (true) or disabled (false). + * + * If no layer specified, the map's current layer is used. + * @param collides If true it will enable collision. If false it will clear collision. Default true. + * @param recalculateFaces Whether or not to recalculate the tile faces after the update. Default true. + * @param layer The tile layer to use. If not given the current layer is used. + */ + setCollisionFromCollisionGroup(collides?: boolean, recalculateFaces?: boolean, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; + + /** + * Sets a global collision callback for the given tile index within the layer. This will affect all + * tiles on this layer that have the same index. 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. + * + * If no layer specified, the map's current layer is used. + * @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 tile layer to use. If not given the current layer is used. + */ + setTileIndexCallback(indexes: integer | any[], callback: Function, callbackContext: object, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; + + /** + * Sets a collision callback for the given rectangular area (in tile coordinates) within the layer. + * If a callback is already set for the tile index it will be replaced. Set the callback to null to + * remove it. + * + * If no layer specified, the map's current layer is used. + * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. + * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. + * @param width How many tiles wide from the `tileX` index the area will be. + * @param height How many tiles tall from the `tileY` index the area will be. + * @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 tile layer to use. If not given the current layer is used. + */ + setTileLocationCallback(tileX: integer, tileY: integer, width: integer, height: integer, callback: Function, callbackContext?: object, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; + + /** + * Sets the current layer to the LayerData associated with `layer`. + * @param layer The name of the + * layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a + * StaticTilemapLayer. If not given will default to the map's current layer index. + */ + setLayer(layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; + + /** + * Sets the base tile size for the map. Note: this does not necessarily match the tileWidth and + * tileHeight for all layers. This also updates the base size on all tiles across all layers. + * @param tileWidth The width of the tiles the map uses for calculations. + * @param tileHeight The height of the tiles the map uses for calculations. + */ + setBaseTileSize(tileWidth: integer, tileHeight: integer): Phaser.Tilemaps.Tilemap; + + /** + * Sets the tile size for a specific `layer`. Note: this does not necessarily match the map's + * tileWidth and tileHeight for all layers. This will set the tile size for the layer and any + * tiles the layer has. + * @param tileWidth The width of the tiles (in pixels) in the layer. + * @param tileHeight The height of the tiles (in pixels) in the layer. + * @param layer The name of the + * layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a + * StaticTilemapLayer. If not given will default to the map's current layer index. + */ + setLayerTileSize(tileWidth: integer, tileHeight: integer, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; + + /** + * Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given + * layer. It will only randomize the tiles in that area, so if they're all the same nothing will + * appear to have changed! This method only modifies tile indexes and does not change collision + * information. + * + * If no layer specified, the maps current layer is used. + * This cannot be applied to StaticTilemapLayers. + * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. + * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. + * @param layer The tile layer to use. If not given the current layer is used. + */ + shuffle(tileX?: integer, tileY?: integer, width?: integer, height?: integer, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; + + /** + * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching + * `indexA` and swaps then with `indexB`. This only modifies the index and does not change collision + * information. + * + * If no layer specified, the maps current layer is used. + * This cannot be applied to StaticTilemapLayers. + * @param tileA First tile index. + * @param tileB Second tile index. + * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. + * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. + * @param layer The tile layer to use. If not given the current layer is used. + */ + swapByIndex(tileA: integer, tileB: integer, tileX?: integer, tileY?: integer, width?: integer, height?: integer, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; + + /** + * Converts from tile X coordinates (tile units) to world X coordinates (pixels), factoring in the + * layers position, scale and scroll. + * + * If no layer specified, the maps current layer is used. + * @param tileX The x coordinate, in tiles, not pixels. + * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. + * @param layer The tile layer to use. If not given the current layer is used. + */ + tileToWorldX(tileX: integer, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): number; + + /** + * Converts from tile Y coordinates (tile units) to world Y coordinates (pixels), factoring in the + * layers position, scale and scroll. + * + * If no layer specified, the maps current layer is used. + * @param tileY The y coordinate, in tiles, not pixels. + * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. + * @param layer The tile layer + * to use. If not given the current layer is used. + */ + tileToWorldY(tileY: integer, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): number; + + /** + * Converts from tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the + * layers position, scale and scroll. This will return a new Vector2 object or update the given + * `point` object. + * + * If no layer specified, the maps current layer is used. + * @param tileX The x coordinate, in tiles, not pixels. + * @param tileY The y coordinate, in tiles, not pixels. + * @param point A Vector2 to store the coordinates in. If not given a new Vector2 is created. + * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. + * @param layer The tile layer to use. If not given the current layer is used. + */ + tileToWorldXY(tileX: integer, tileY: integer, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Math.Vector2; + + /** + * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the + * specified layer. Each tile will receive a new index. New indexes are drawn from the given + * weightedIndexes array. An example weighted array: + * + * [ + * { index: 6, weight: 4 }, // Probability of index 6 is 4 / 8 + * { index: 7, weight: 2 }, // Probability of index 7 would be 2 / 8 + * { index: 8, weight: 1.5 }, // Probability of index 8 would be 1.5 / 8 + * { index: 26, weight: 0.5 } // Probability of index 27 would be 0.5 / 8 + * ] + * + * The probability of any index being choose is (the index's weight) / (sum of all weights). This + * method only modifies tile indexes and does not change collision information. + * + * If no layer specified, the map's current layer is used. This + * cannot be applied to StaticTilemapLayers. + * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. + * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. + * @param weightedIndexes An array of objects to randomly draw from during + * randomization. They should be in the form: { index: 0, weight: 4 } or + * { index: [0, 1], weight: 4 } if you wish to draw from multiple tile indexes. + * @param layer The tile layer to use. If not given the current layer is used. + */ + weightedRandomize(tileX?: integer, tileY?: integer, width?: integer, height?: integer, weightedIndexes?: object[], layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; + + /** + * Converts from world X coordinates (pixels) to tile X coordinates (tile units), factoring in the + * layers position, scale and scroll. + * + * If no layer specified, the maps current layer is used. + * @param worldX The x coordinate to be converted, in pixels, not tiles. + * @param snapToFloor Whether or not to round the tile coordinate down to the nearest integer. Default true. + * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. + * @param layer The tile layer + * to use. If not given the current layer is used. + */ + worldToTileX(worldX: number, snapToFloor?: boolean, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): number; + + /** + * Converts from world Y coordinates (pixels) to tile Y coordinates (tile units), factoring in the + * layers position, scale and scroll. + * + * If no layer specified, the maps current layer is used. + * @param worldY The y coordinate to be converted, in pixels, not tiles. + * @param snapToFloor Whether or not to round the tile coordinate down to the nearest integer. Default true. + * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. + * @param layer The tile layer to use. If not given the current layer is used. + */ + worldToTileY(worldY: number, snapToFloor?: boolean, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): number; + + /** + * Converts from world XY coordinates (pixels) to tile XY coordinates (tile units), factoring in the + * layers position, scale and scroll. This will return a new Vector2 object or update the given + * `point` object. + * + * If no layer specified, the maps current layer is used. + * @param worldX The x coordinate to be converted, in pixels, not tiles. + * @param worldY The y coordinate to be converted, in pixels, not tiles. + * @param snapToFloor Whether or not to round the tile coordinate down to the nearest integer. Default true. + * @param point A Vector2 to store the coordinates in. If not given a new Vector2 is created. + * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. + * @param layer The tile layer to use. If not given the current layer is used. + */ + worldToTileXY(worldX: number, worldY: number, snapToFloor?: boolean, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Math.Vector2; + + } + + /** + * A Tileset is a combination of an image containing the tiles and a container for data about + * each tile. + */ + class Tileset { + /** + * + * @param name The name of the tileset in the map data. + * @param firstgid The first tile index this tileset contains. + * @param tileWidth Width of each tile (in pixels). Default 32. + * @param tileHeight Height of each tile (in pixels). Default 32. + * @param tileMargin The margin around all tiles in the sheet (in pixels). Default 0. + * @param tileSpacing The spacing between each tile in the sheet (in pixels). Default 0. + * @param tileProperties Custom properties defined per tile in the Tileset. + * These typically are custom properties created in Tiled when editing a tileset. Default {}. + * @param tileData Data stored per tile. These typically are created in Tiled + * when editing a tileset, e.g. from Tiled's tile collision editor or terrain editor. Default {}. + */ + constructor(name: string, firstgid: integer, tileWidth?: integer, tileHeight?: integer, tileMargin?: integer, tileSpacing?: integer, tileProperties?: object, tileData?: object); + + /** + * The name of the Tileset. + */ + name: string; + + /** + * The starting index of the first tile index this Tileset contains. + */ + firstgid: integer; + + /** + * The width of each tile (in pixels). Use setTileSize to change. + */ + readonly tileWidth: integer; + + /** + * The height of each tile (in pixels). Use setTileSize to change. + */ + readonly tileHeight: integer; + + /** + * The margin around the tiles in the sheet (in pixels). Use `setSpacing` to change. + */ + readonly tileMargin: integer; + + /** + * The spacing between each the tile in the sheet (in pixels). Use `setSpacing` to change. + */ + readonly tileSpacing: integer; + + /** + * Tileset-specific properties per tile that are typically defined in the Tiled editor in the + * Tileset editor. + */ + tileProperties: object; + + /** + * Tileset-specific data per tile that are typically defined in the Tiled editor, e.g. within + * the Tileset collision editor. This is where collision objects and terrain are stored. + */ + tileData: object; + + /** + * The cached image that contains the individual tiles. Use setImage to set. + */ + readonly image: Phaser.Textures.Texture; + + /** + * The gl texture used by the WebGL renderer. + */ + readonly glTexture: WebGLTexture; + + /** + * The number of tile rows in the the tileset. + */ + readonly rows: integer; + + /** + * The number of tile columns in the tileset. + */ + readonly columns: integer; + + /** + * The total number of tiles in the tileset. + */ + readonly total: integer; + + /** + * The look-up table to specific tile image texture coordinates (UV in pixels). Each element + * contains the coordinates for a tile in an object of the form {x, y}. + */ + readonly texCoordinates: object[]; + + /** + * Get a tiles properties that are stored in the Tileset. Returns null if tile index is not + * contained in this Tileset. This is typically defined in Tiled under the Tileset editor. + * @param tileIndex The unique id of the tile across all tilesets in the map. + */ + getTileProperties(tileIndex: integer): object | undefined; + + /** + * Get a tile's data that is stored in the Tileset. Returns null if tile index is not contained + * in this Tileset. This is typically defined in Tiled and will contain both Tileset collision + * info and terrain mapping. + * @param tileIndex The unique id of the tile across all tilesets in the map. + */ + getTileData(tileIndex: integer): object | undefined; + + /** + * Get a tile's collision group that is stored in the Tileset. Returns null if tile index is not + * contained in this Tileset. This is typically defined within Tiled's tileset collision editor. + * @param tileIndex The unique id of the tile across all tilesets in the map. + */ + getTileCollisionGroup(tileIndex: integer): object; + + /** + * Returns true if and only if this Tileset contains the given tile index. + * @param tileIndex The unique id of the tile across all tilesets in the map. + */ + containsTileIndex(tileIndex: integer): boolean; + + /** + * Returns the texture coordinates (UV in pixels) in the Tileset image for the given tile index. + * Returns null if tile index is not contained in this Tileset. + * @param tileIndex The unique id of the tile across all tilesets in the map. + */ + getTileTextureCoordinates(tileIndex: integer): object; + + /** + * Sets the image associated with this Tileset and updates the tile data (rows, columns, etc.). + * @param texture The image that contains the tiles. + */ + setImage(texture: Phaser.Textures.Texture): Phaser.Tilemaps.Tileset; + + /** + * Sets the tile width & height and updates the tile data (rows, columns, etc.). + * @param tileWidth The width of a tile in pixels. + * @param tileHeight The height of a tile in pixels. + */ + setTileSize(tileWidth?: integer, tileHeight?: integer): Phaser.Tilemaps.Tileset; + + /** + * Sets the tile margin & spacing and updates the tile data (rows, columns, etc.). + * @param margin The margin around the tiles in the sheet (in pixels). + * @param spacing The spacing between the tiles in the sheet (in pixels). + */ + setSpacing(margin?: integer, spacing?: integer): Phaser.Tilemaps.Tileset; + + /** + * Updates tile texture coordinates and tileset data. + * @param imageWidth The (expected) width of the image to slice. + * @param imageHeight The (expected) height of the image to slice. + */ + updateTileData(imageWidth: integer, imageHeight: integer): Phaser.Tilemaps.Tileset; + + } + namespace Components { } @@ -79802,7 +82260,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -79907,6 +82367,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -79954,110 +82417,6 @@ declare namespace Phaser { } - namespace Formats { - /** - * CSV Map Type - */ - var CSV: number; - - /** - * Tiled JSON Map Type - */ - var TILED_JSON: number; - - /** - * 2D Array Map Type - */ - var ARRAY_2D: number; - - /** - * Weltmeister (Impact.js) Map Type - */ - var WELTMEISTER: number; - - } - - /** - * An Image Collection is a special Tile Set containing multiple images, with no slicing into each image. - * - * Image Collections are normally created automatically when Tiled data is loaded. - */ - class ImageCollection { - /** - * - * @param name The name of the image collection in the map data. - * @param firstgid The first image index this image collection contains. - * @param width Width of widest image (in pixels). Default 32. - * @param height Height of tallest image (in pixels). Default 32. - * @param margin The margin around all images in the collection (in pixels). Default 0. - * @param spacing The spacing between each image in the collection (in pixels). Default 0. - * @param properties Custom Image Collection properties. Default {}. - */ - constructor(name: string, firstgid: integer, width?: integer, height?: integer, margin?: integer, spacing?: integer, properties?: object); - - /** - * The name of the Image Collection. - */ - name: string; - - /** - * The Tiled firstgid value. - * This is the starting index of the first image index this Image Collection contains. - */ - firstgid: integer; - - /** - * The width of the widest image (in pixels). - */ - readonly imageWidth: integer; - - /** - * The height of the tallest image (in pixels). - */ - readonly imageHeight: integer; - - /** - * The margin around the images in the collection (in pixels). - * Use `setSpacing` to change. - */ - readonly imageMarge: integer; - - /** - * The spacing between each image in the collection (in pixels). - * Use `setSpacing` to change. - */ - readonly imageSpacing: integer; - - /** - * Image Collection-specific properties that are typically defined in the Tiled editor. - */ - properties: object; - - /** - * The cached images that are a part of this collection. - */ - readonly images: any[]; - - /** - * The total number of images in the image collection. - */ - readonly total: integer; - - /** - * Returns true if and only if this image collection contains the given image index. - * @param imageIndex The image index to search for. - */ - containsImageIndex(imageIndex: integer): boolean; - - /** - * Add an image to this Image Collection. - * @param gid The gid of the image in the Image Collection. - * @param image The the key of the image in the Image Collection and in the cache. - */ - addImage(gid: integer, image: string): Phaser.Tilemaps.ImageCollection; - - } - /** * A class for representing data about about a layer in a map. Maps are parsed from CSV, Tiled, * etc. into this format. Tilemap, StaticTilemapLayer and DynamicTilemapLayer have a reference @@ -80163,7 +82522,7 @@ declare namespace Phaser { /** * An array of the tile indexes */ - data: number[]; + data: Phaser.Tilemaps.Tile[][]; /** * [description] @@ -80360,35 +82719,6 @@ declare namespace Phaser { } namespace Parsers { - namespace Impact { - /** - * [description] - * @param json [description] - * @param insertNull [description] - */ - function ParseTileLayers(json: object, insertNull: boolean): any[]; - - /** - * [description] - * @param json [description] - */ - function ParseTilesets(json: object): any[]; - - /** - * Parses a Weltmeister JSON object into a new MapData object. - * @param name The name of the tilemap, used to set the name on the MapData. - * @param json The Weltmeister JSON object. - * @param insertNull Controls how empty tiles, tiles with an index of -1, in the map - * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty - * location will get a Tile object with an index of -1. If you've a large sparsely populated map and - * the tile data doesn't need to change then setting this value to `true` will help with memory - * consumption. However if your map is small or you need to update the tiles dynamically, then leave - * the default value set. - */ - function ParseWeltmeister(name: string, json: object, insertNull: boolean): object; - - } - /** * Parses raw data of a given Tilemap format into a new MapData object. If no recognized data format * is found, returns `null`. When loading from CSV or a 2D array, you should specify the tileWidth & @@ -80440,6 +82770,35 @@ declare namespace Phaser { */ function ParseCSV(name: string, data: string, tileWidth: integer, tileHeight: integer, insertNull: boolean): Phaser.Tilemaps.MapData; + namespace Impact { + /** + * [description] + * @param json [description] + * @param insertNull [description] + */ + function ParseTileLayers(json: object, insertNull: boolean): any[]; + + /** + * [description] + * @param json [description] + */ + function ParseTilesets(json: object): any[]; + + /** + * Parses a Weltmeister JSON object into a new MapData object. + * @param name The name of the tilemap, used to set the name on the MapData. + * @param json The Weltmeister JSON object. + * @param insertNull Controls how empty tiles, tiles with an index of -1, in the map + * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty + * location will get a Tile object with an index of -1. If you've a large sparsely populated map and + * the tile data doesn't need to change then setting this value to `true` will help with memory + * consumption. However if your map is small or you need to update the tiles dynamically, then leave + * the default value set. + */ + function ParseWeltmeister(name: string, json: object, insertNull: boolean): object; + + } + namespace Tiled { /** * Copy properties from tileset to tiles. @@ -80525,28 +82884,6 @@ declare namespace Phaser { } - /** - * Create a Tilemap from the given key or data. If neither is given, make a blank Tilemap. When - * loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing from - * a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the map data. For - * an empty map, you should specify tileWidth, tileHeight, width & height. - * @param scene The Scene to which this Tilemap belongs. - * @param key The key in the Phaser cache that corresponds to the loaded tilemap data. - * @param tileWidth The width of a tile in pixels. Default 32. - * @param tileHeight The height of a tile in pixels. Default 32. - * @param width The width of the map in tiles. Default 10. - * @param height The height of the map in tiles. Default 10. - * @param data Instead of loading from the cache, you can also load directly from - * a 2D array of tile indexes. - * @param insertNull Controls how empty tiles, tiles with an index of -1, in the - * map data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty - * location will get a Tile object with an index of -1. If you've a large sparsely populated map and - * the tile data doesn't need to change then setting this value to `true` will help with memory - * consumption. However if your map is small or you need to update the tiles dynamically, then leave - * the default value set. Default false. - */ - function ParseToTilemap(scene: Phaser.Scene, key?: string, tileWidth?: integer, tileHeight?: integer, width?: integer, height?: integer, data?: integer[][], insertNull?: boolean): Phaser.Tilemaps.Tilemap; - /** * A Static Tilemap Layer is a Game Object that renders LayerData from a Tilemap when used in combination * with one, or more, Tilesets. @@ -81488,7 +83825,9 @@ declare namespace Phaser { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. */ z: number; @@ -81593,6 +83932,9 @@ declare namespace Phaser { /** * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. * @param value The z position of this Game Object. Default 0. */ setZ(value?: number): this; @@ -81699,1652 +84041,6 @@ declare namespace Phaser { } - /** - * A Tile is a representation of a single tile within the Tilemap. This is a lightweight data - * representation, so its position information is stored without factoring in scroll, layer - * scale or layer position. - */ - class Tile implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.Visible { - /** - * - * @param layer The LayerData object in the Tilemap that this tile belongs to. - * @param index The unique index of this tile within the map. - * @param x The x coordinate of this tile in tile coordinates. - * @param y The y coordinate of this tile in tile coordinates. - * @param width Width of the tile in pixels. - * @param height Height of the tile in pixels. - * @param baseWidth The base width a tile in the map (in pixels). Tiled maps support - * multiple tileset sizes within one map, but they are still placed at intervals of the base - * tile width. - * @param baseHeight The base height of the tile in pixels (in pixels). Tiled maps - * support multiple tileset sizes within one map, but they are still placed at intervals of the - * base tile height. - */ - constructor(layer: Phaser.Tilemaps.LayerData, index: integer, x: integer, y: integer, width: integer, height: integer, baseWidth: integer, baseHeight: integer); - - /** - * The LayerData in the Tilemap data that this tile belongs to. - */ - layer: Phaser.Tilemaps.LayerData; - - /** - * The index of this tile within the map data corresponding to the tileset, or -1 if this - * represents a blank tile. - */ - index: integer; - - /** - * The x map coordinate of this tile in tile units. - */ - x: integer; - - /** - * The y map coordinate of this tile in tile units. - */ - y: integer; - - /** - * The width of the tile in pixels. - */ - width: integer; - - /** - * The height of the tile in pixels. - */ - height: integer; - - /** - * The map's base width of a tile in pixels. Tiled maps support multiple tileset sizes - * within one map, but they are still placed at intervals of the base tile size. - */ - baseWidth: integer; - - /** - * The map's base height of a tile in pixels. Tiled maps support multiple tileset sizes - * within one map, but they are still placed at intervals of the base tile size. - */ - baseHeight: integer; - - /** - * The x coordinate of the top left of this tile in pixels. This is relative to the top left - * of the layer this tile is being rendered within. This property does NOT factor in camera - * scroll, layer scale or layer position. - */ - pixelX: number; - - /** - * The y coordinate of the top left of this tile in pixels. This is relative to the top left - * of the layer this tile is being rendered within. This property does NOT factor in camera - * scroll, layer scale or layer position. - */ - pixelY: number; - - /** - * Tile specific properties. These usually come from Tiled. - */ - properties: any; - - /** - * The rotation angle of this tile. - */ - rotation: number; - - /** - * Whether the tile should collide with any object on the left side. - */ - collideLeft: boolean; - - /** - * Whether the tile should collide with any object on the right side. - */ - collideRight: boolean; - - /** - * Whether the tile should collide with any object on the top side. - */ - collideUp: boolean; - - /** - * Whether the tile should collide with any object on the bottom side. - */ - collideDown: boolean; - - /** - * Whether the tile's left edge is interesting for collisions. - */ - faceLeft: boolean; - - /** - * Whether the tile's right edge is interesting for collisions. - */ - faceRight: boolean; - - /** - * Whether the tile's top edge is interesting for collisions. - */ - faceTop: boolean; - - /** - * Whether the tile's bottom edge is interesting for collisions. - */ - faceBottom: boolean; - - /** - * Tile collision callback. - */ - collisionCallback: Function; - - /** - * The context in which the collision callback will be called. - */ - collisionCallbackContext: object; - - /** - * The tint to apply to this tile. Note: tint is currently a single color value instead of - * the 4 corner tint component on other GameObjects. - */ - tint: number; - - /** - * An empty object where physics-engine specific information (e.g. bodies) may be stored. - */ - physics: object; - - /** - * Check if the given x and y world coordinates are within this Tile. This does not factor in - * camera scroll, layer scale or layer position. - * @param x The x coordinate to test. - * @param y The y coordinate to test. - */ - containsPoint(x: number, y: number): boolean; - - /** - * Copies the tile data & properties from the given tile to this tile. This copies everything - * except for position and interesting faces. - * @param tile The tile to copy from. - */ - copy(tile: Phaser.Tilemaps.Tile): Phaser.Tilemaps.Tile; - - /** - * The collision group for this Tile, defined within the Tileset. This returns a reference to - * the collision group stored within the Tileset, so any modification of the returned object - * will impact all tiles that have the same index as this tile. - */ - getCollisionGroup(): object; - - /** - * The tile data for this Tile, defined within the Tileset. This typically contains Tiled - * collision data, tile animations and terrain information. This returns a reference to the tile - * data stored within the Tileset, so any modification of the returned object will impact all - * tiles that have the same index as this tile. - */ - getTileData(): object; - - /** - * Gets the world X position of the left side of the tile, factoring in the layers position, - * scale and scroll. - * @param camera The Camera to use to perform the check. - */ - getLeft(camera?: Phaser.Cameras.Scene2D.Camera): number; - - /** - * Gets the world X position of the right side of the tile, factoring in the layer's position, - * scale and scroll. - * @param camera The Camera to use to perform the check. - */ - getRight(camera?: Phaser.Cameras.Scene2D.Camera): number; - - /** - * Gets the world Y position of the top side of the tile, factoring in the layer's position, - * scale and scroll. - * @param camera The Camera to use to perform the check. - */ - getTop(camera?: Phaser.Cameras.Scene2D.Camera): number; - - /** - * Gets the world Y position of the bottom side of the tile, factoring in the layer's position, - * scale and scroll. - * @param camera The Camera to use to perform the check. - */ - getBottom(camera?: Phaser.Cameras.Scene2D.Camera): number; - - /** - * Gets the world rectangle bounding box for the tile, factoring in the layers position, - * scale and scroll. - * @param camera The Camera to use to perform the check. - * @param output [description] - */ - getBounds(camera?: Phaser.Cameras.Scene2D.Camera, output?: object): Phaser.Geom.Rectangle | object; - - /** - * Gets the world X position of the center of the tile, factoring in the layer's position, - * scale and scroll. - * @param camera The Camera to use to perform the check. - */ - getCenterX(camera?: Phaser.Cameras.Scene2D.Camera): number; - - /** - * Gets the world Y position of the center of the tile, factoring in the layer's position, - * scale and scroll. - * @param camera The Camera to use to perform the check. - */ - getCenterY(camera?: Phaser.Cameras.Scene2D.Camera): number; - - /** - * Clean up memory. - */ - destroy(): void; - - /** - * Check for intersection with this tile. This does not factor in camera scroll, layer scale or - * layer position. - * @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; - - /** - * Checks if the tile is interesting. - * @param collides If true, will consider the tile interesting if it collides on any side. - * @param faces If true, will consider the tile interesting if it has an interesting face. - */ - isInteresting(collides: boolean, faces: boolean): boolean; - - /** - * Reset collision status flags. - * @param recalculateFaces Whether or not to recalculate interesting faces for this tile and its neighbors. Default true. - */ - resetCollision(recalculateFaces?: boolean): Phaser.Tilemaps.Tile; - - /** - * Reset faces. - */ - resetFaces(): Phaser.Tilemaps.Tile; - - /** - * 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 recalculateFaces Whether or not to recalculate interesting faces - * for this tile and its neighbors. Default true. - */ - setCollision(left: boolean, right?: boolean, up?: boolean, down?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.Tile; - - /** - * Set a callback to be called when this tile is hit by an object. The callback must true for - * collision processing to take place. - * @param callback Callback function. - * @param context Callback will be called within this context. - */ - setCollisionCallback(callback: Function, context: object): Phaser.Tilemaps.Tile; - - /** - * Sets the size of the tile and updates its pixelX and pixelY. - * @param tileWidth The width of the tile in pixels. - * @param tileHeight The height of the tile in pixels. - * @param baseWidth The base width a tile in the map (in pixels). - * @param baseHeight The base height of the tile in pixels (in pixels). - */ - setSize(tileWidth: integer, tileHeight: integer, baseWidth: integer, baseHeight: integer): Phaser.Tilemaps.Tile; - - /** - * Used internally. Updates the tile's world XY position based on the current tile size. - */ - updatePixelXY(): Phaser.Tilemaps.Tile; - - /** - * True if this tile can collide on any of its faces or has a collision callback set. - */ - readonly canCollide: boolean; - - /** - * True if this tile can collide on any of its faces. - */ - readonly collides: boolean; - - /** - * True if this tile has any interesting faces. - */ - readonly hasInterestingFace: boolean; - - /** - * The tileset that contains this Tile. This is null if accessed from a LayerData instance - * before the tile is placed in a StaticTilemapLayer or DynamicTilemapLayer, or if the tile has - * an index that doesn't correspond to any of the map's tilesets. - */ - readonly tileset: Phaser.Tilemaps.Tileset; - - /** - * The tilemap layer that contains this Tile. This will only return null if accessed from a - * LayerData instance before the tile is placed within a StaticTilemapLayer or - * DynamicTilemapLayer. - */ - readonly tilemapLayer: Phaser.Tilemaps.StaticTilemapLayer | Phaser.Tilemaps.DynamicTilemapLayer; - - /** - * The tilemap that contains this Tile. This will only return null if accessed from a LayerData - * instance before the tile is placed within a StaticTilemapLayer or DynamicTilemapLayer. - */ - readonly tilemap: Phaser.Tilemaps.Tilemap; - - /** - * Clears all alpha values associated with this Game Object. - * - * Immediately sets the alpha levels back to 1 (fully opaque). - */ - clearAlpha(): this; - - /** - * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. - * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. - * - * If your game is running under WebGL you can optionally specify four different alpha values, each of which - * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. - * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. - * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. - * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. - * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. - */ - setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; - - /** - * The alpha value of the Game Object. - * - * This is a global value, impacting the entire Game Object, not just a region of it. - */ - alpha: number; - - /** - * The alpha value starting from the top-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopLeft: number; - - /** - * The alpha value starting from the top-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopRight: number; - - /** - * The alpha value starting from the bottom-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomLeft: number; - - /** - * The alpha value starting from the bottom-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomRight: number; - - /** - * The horizontally flipped state of the Game Object. - * - * A Game Object that is flipped horizontally will render inversed on the horizontal axis. - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - */ - flipX: boolean; - - /** - * The vertically flipped state of the Game Object. - * - * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - */ - flipY: boolean; - - /** - * Toggles the horizontal flipped state of this Game Object. - * - * A Game Object that is flipped horizontally will render inversed on the horizontal axis. - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - */ - toggleFlipX(): this; - - /** - * Toggles the vertical flipped state of this Game Object. - */ - toggleFlipY(): this; - - /** - * Sets the horizontal flipped state of this Game Object. - * - * A Game Object that is flipped horizontally will render inversed on the horizontal axis. - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * @param value The flipped state. `false` for no flip, or `true` to be flipped. - */ - setFlipX(value: boolean): this; - - /** - * Sets the vertical flipped state of this Game Object. - * @param value The flipped state. `false` for no flip, or `true` to be flipped. - */ - setFlipY(value: boolean): this; - - /** - * Sets the horizontal and vertical flipped state of this Game Object. - * - * A Game Object that is flipped will render inversed on the flipped axis. - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped. - * @param y The horizontal flipped state. `false` for no flip, or `true` to be flipped. - */ - setFlip(x: boolean, y: boolean): this; - - /** - * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. - */ - resetFlip(): this; - - /** - * The visible state of the Game Object. - * - * An invisible Game Object will skip rendering, but will still process update logic. - */ - visible: boolean; - - /** - * Sets the visibility of this Game Object. - * - * An invisible Game Object will skip rendering, but will still process update logic. - * @param value The visible state of the Game Object. - */ - setVisible(value: boolean): this; - - } - - /** - * A Tilemap is a container for Tilemap data. This isn't a display object, rather, it holds data - * about the map and allows you to add tilesets and tilemap layers to it. A map can have one or - * more tilemap layers (StaticTilemapLayer or DynamicTilemapLayer), which are the display - * objects that actually render tiles. - * - * The Tilemap data be parsed from a Tiled JSON file, a CSV file or a 2D array. Tiled is a free - * software package specifically for creating tile maps, and is available from: - * http://www.mapeditor.org - * - * A Tilemap has handy methods for getting & manipulating the tiles within a layer. You can only - * use the methods that change tiles (e.g. removeTileAt) on a DynamicTilemapLayer. - * - * Note that all Tilemaps use a base tile size to calculate dimensions from, but that a - * StaticTilemapLayer or DynamicTilemapLayer may have its own unique tile size that overrides - * it. - * - * As of Phaser 3.21.0, if your tilemap includes layer groups (a feature of Tiled 1.2.0+) these - * will be traversed and the following properties will affect children: - * - opacity (blended with parent) and visibility (parent overrides child) - * - Vertical and horizontal offset - * The grouping hierarchy is not preserved and all layers will be flattened into a single array. - * Group layers are parsed during Tilemap construction but are discarded after parsing so dynamic - * layers will NOT continue to be affected by a parent. - * - * To avoid duplicate layer names, a layer that is a child of a group layer will have its parent - * group name prepended with a '/'. For example, consider a group called 'ParentGroup' with a - * child called 'Layer 1'. In the Tilemap object, 'Layer 1' will have the name - * 'ParentGroup/Layer 1'. - */ - class Tilemap { - /** - * - * @param scene The Scene to which this Tilemap belongs. - * @param mapData A MapData instance containing Tilemap data. - */ - constructor(scene: Phaser.Scene, mapData: Phaser.Tilemaps.MapData); - - scene: Phaser.Scene; - - /** - * The base width of a tile in pixels. Note that individual layers may have a different tile - * width. - */ - tileWidth: integer; - - /** - * The base height of a tile in pixels. Note that individual layers may have a different - * tile height. - */ - tileHeight: integer; - - /** - * The width of the map (in tiles). - */ - width: number; - - /** - * The height of the map (in tiles). - */ - height: number; - - /** - * The orientation of the map data (as specified in Tiled), usually 'orthogonal'. - */ - orientation: string; - - /** - * The render (draw) order of the map data (as specified in Tiled), usually 'right-down'. - * - * The draw orders are: - * - * right-down - * left-down - * right-up - * left-up - * - * This can be changed via the `setRenderOrder` method. - */ - renderOrder: string; - - /** - * The format of the map data. - */ - format: number; - - /** - * The version of the map data (as specified in Tiled, usually 1). - */ - version: number; - - /** - * Map specific properties as specified in Tiled. - */ - properties: object; - - /** - * The width of the map in pixels based on width * tileWidth. - */ - widthInPixels: number; - - /** - * The height of the map in pixels based on height * tileHeight. - */ - heightInPixels: number; - - imageCollections: Phaser.Tilemaps.ImageCollection[]; - - /** - * An array of Tiled Image Layers. - */ - images: any[]; - - /** - * An array of Tilemap layer data. - */ - layers: Phaser.Tilemaps.LayerData[]; - - /** - * An array of Tilesets used in the map. - */ - tilesets: Phaser.Tilemaps.Tileset[]; - - /** - * An array of ObjectLayer instances parsed from Tiled object layers. - */ - objects: Phaser.Tilemaps.ObjectLayer[]; - - /** - * The index of the currently selected LayerData object. - */ - currentLayerIndex: integer; - - /** - * Sets the rendering (draw) order of the tiles in this map. - * - * The default is 'right-down', meaning it will order the tiles starting from the top-left, - * drawing to the right and then moving down to the next row. - * - * The draw orders are: - * - * 0 = right-down - * 1 = left-down - * 2 = right-up - * 3 = left-up - * - * Setting the render order does not change the tiles or how they are stored in the layer, - * it purely impacts the order in which they are rendered. - * - * You can provide either an integer (0 to 3), or the string version of the order. - * - * Calling this method _after_ creating Static or Dynamic Tilemap Layers will **not** automatically - * update them to use the new render order. If you call this method after creating layers, use their - * own `setRenderOrder` methods to change them as needed. - * @param renderOrder The render (draw) order value. Either an integer between 0 and 3, or a string: 'right-down', 'left-down', 'right-up' or 'left-up'. - */ - setRenderOrder(renderOrder: integer | string): this; - - /** - * 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 tilesetName 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 - * `undefined` or `null` it will look for an image with a key matching the tilesetName parameter. - * @param tileWidth The width of the tile (in pixels) in the Tileset Image. If not - * given it will default to the map's tileWidth value, or the tileWidth specified in the Tiled - * JSON file. - * @param tileHeight The height of the tiles (in pixels) in the Tileset Image. If - * not given it will default to the map's tileHeight value, or the tileHeight specified in the - * Tiled JSON file. - * @param tileMargin The margin around the tiles in the sheet (in pixels). If not - * specified, it will default to 0 or the value specified in the Tiled JSON file. - * @param tileSpacing The spacing between each the tile in the sheet (in pixels). - * If not specified, it will default to 0 or the value specified in the Tiled JSON file. - * @param gid If adding multiple tilesets to a blank map, specify the starting - * GID this set will use here. Default 0. - */ - addTilesetImage(tilesetName: string, key?: string, tileWidth?: integer, tileHeight?: integer, tileMargin?: integer, tileSpacing?: integer, gid?: integer): Phaser.Tilemaps.Tileset; - - /** - * Turns the DynamicTilemapLayer associated with the given layer into a StaticTilemapLayer. If - * no layer specified, the map's current layer is used. This is useful if you want to manipulate - * a map at the start of a scene, but then make it non-manipulable and optimize it for speed. - * Note: the DynamicTilemapLayer passed in is destroyed, so make sure to store the value - * returned from this method if you want to manipulate the new StaticTilemapLayer. - * @param layer The name of the layer from Tiled, the - * index of the layer in the map, or a DynamicTilemapLayer. - */ - convertLayerToStatic(layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer): Phaser.Tilemaps.StaticTilemapLayer; - - /** - * Copies the tiles in the source rectangular area to a new destination (all specified in tile - * coordinates) within the layer. This copies all tile properties & recalculates collision - * information in the destination region. - * - * If no layer specified, the map's current layer is used. This cannot be applied to StaticTilemapLayers. - * @param srcTileX The x coordinate of the area to copy from, in tiles, not pixels. - * @param srcTileY The y coordinate of the area to copy from, in tiles, not pixels. - * @param width The width of the area to copy, in tiles, not pixels. - * @param height The height of the area to copy, in tiles, not pixels. - * @param destTileX The x coordinate of the area to copy to, in tiles, not pixels. - * @param destTileY The y coordinate of the area to copy to, in tiles, not pixels. - * @param recalculateFaces `true` if the faces data should be recalculated. Default true. - * @param layer The tile layer to use. If not given the current layer is used. - */ - copy(srcTileX: integer, srcTileY: integer, width: integer, height: integer, destTileX: integer, destTileY: integer, recalculateFaces?: boolean, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; - - /** - * Creates a new and empty DynamicTilemapLayer. The currently selected layer in the map is set to this new layer. - * @param name The name of this layer. Must be unique within the map. - * @param tileset The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object. - * @param x The world x position where the top left of this layer will be placed. Default 0. - * @param y The world y position where the top left of this layer will be placed. Default 0. - * @param width The width of the layer in tiles. If not specified, it will default to the map's width. - * @param height The height of the layer in tiles. If not specified, it will default to the map's height. - * @param tileWidth The width of the tiles the layer uses for calculations. If not specified, it will default to the map's tileWidth. - * @param tileHeight The height of the tiles the layer uses for calculations. If not specified, it will default to the map's tileHeight. - */ - createBlankDynamicLayer(name: string, tileset: string | string[] | Phaser.Tilemaps.Tileset | Phaser.Tilemaps.Tileset[], x?: number, y?: number, width?: integer, height?: integer, tileWidth?: integer, tileHeight?: integer): Phaser.Tilemaps.DynamicTilemapLayer; - - /** - * Creates a new DynamicTilemapLayer that renders the LayerData associated with the given - * `layerID`. The currently selected layer in the map is set to this new layer. - * - * The `layerID` is important. If you've created your map in Tiled then you can get this by - * looking in Tiled and looking at the layer name. Or you can open the JSON file it exports and - * look at the layers[].name value. Either way it must match. - * - * Unlike a static layer, a dynamic layer can be modified. See DynamicTilemapLayer for more - * information. - * @param layerID The layer array index value, or if a string is given, the layer name from Tiled. - * @param tileset The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object. - * @param x The x position to place the layer in the world. If not specified, it will default to the layer offset from Tiled or 0. Default 0. - * @param y The y position to place the layer in the world. If not specified, it will default to the layer offset from Tiled or 0. Default 0. - */ - createDynamicLayer(layerID: integer | string, tileset: string | string[] | Phaser.Tilemaps.Tileset | Phaser.Tilemaps.Tileset[], x?: number, y?: number): Phaser.Tilemaps.DynamicTilemapLayer; - - /** - * Creates a Sprite for every object matching the given gid in the map data. All properties from - * the map data objectgroup are copied into the `spriteConfig`, so you can use this as an easy - * way to 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. - * - * Custom object properties not sharing names with the Sprite's own properties are copied to the - * Sprite's {@link Phaser.GameObjects.Sprite#data data store}. - * @param name The name of the object layer (from Tiled) to create Sprites from. - * @param id Either the id (object), gid (tile object) or name (object or - * tile object) from Tiled. Ids are unique in Tiled, but a gid is shared by all tile objects - * with the same graphic. The same name can be used on multiple objects. - * @param spriteConfig The config object to pass into the Sprite creator (i.e. - * scene.make.sprite). - * @param scene The Scene to create the Sprites within. Default the scene the map is within. - */ - createFromObjects(name: string, id: integer | string, spriteConfig: Phaser.Types.GameObjects.Sprite.SpriteConfig, scene?: Phaser.Scene): Phaser.GameObjects.Sprite[]; - - /** - * Creates a Sprite for every object matching the given tile indexes in the layer. You can - * optionally specify if each tile will be replaced with a new tile after the Sprite has been - * 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 indexes 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 leave the tiles unchanged. If an array is given, it is assumed to be a - * one-to-one mapping with the indexes array. - * @param spriteConfig The config object to pass into the Sprite creator (i.e. scene.make.sprite). - * @param scene The Scene to create the Sprites within. Default scene the map is within. - * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. - * @param layer The tile layer to use. If not given the current layer is used. - */ - createFromTiles(indexes: integer | any[], replacements: integer | any[], spriteConfig: Phaser.Types.GameObjects.Sprite.SpriteConfig, scene?: Phaser.Scene, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.GameObjects.Sprite[]; - - /** - * Creates a new StaticTilemapLayer that renders the LayerData associated with the given - * `layerID`. The currently selected layer in the map is set to this new layer. - * - * The `layerID` is important. If you've created your map in Tiled then you can get this by - * looking in Tiled and looking at the layer name. Or you can open the JSON file it exports and - * look at the layers[].name value. Either way it must match. - * - * It's important to remember that a static layer cannot be modified. See StaticTilemapLayer for - * more information. - * @param layerID The layer array index value, or if a string is given, the layer name from Tiled. - * @param tileset The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object. - * @param x The x position to place the layer in the world. If not specified, it will default to the layer offset from Tiled or 0. Default 0. - * @param y The y position to place the layer in the world. If not specified, it will default to the layer offset from Tiled or 0. Default 0. - */ - createStaticLayer(layerID: integer | string, tileset: string | string[] | Phaser.Tilemaps.Tileset | Phaser.Tilemaps.Tileset[], x?: number, y?: number): Phaser.Tilemaps.StaticTilemapLayer; - - /** - * Removes all layer data from this Tilemap and nulls the scene reference. This will destroy any - * StaticTilemapLayers or DynamicTilemapLayers that have been linked to LayerData. - */ - destroy(): void; - - /** - * Sets the tiles in the given rectangular area (in tile coordinates) of the layer with the - * specified index. Tiles will be set to collide if the given index is a colliding index. - * Collision information in the region will be recalculated. - * - * If no layer specified, the map's current layer is used. - * This cannot be applied to StaticTilemapLayers. - * @param index The tile index to fill the area with. - * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. - * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. - * @param recalculateFaces `true` if the faces data should be recalculated. Default true. - * @param layer The tile layer to use. If not given the current layer is used. - */ - fill(index: integer, tileX?: integer, tileY?: integer, width?: integer, height?: integer, recalculateFaces?: boolean, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; - - /** - * For each object in the given object layer, run the given filter callback function. Any - * objects that pass the filter test (i.e. where the callback returns true) will returned as a - * new array. Similar to Array.prototype.Filter in vanilla JS. - * @param objectLayer The name of an object layer (from Tiled) or an ObjectLayer instance. - * @param callback The callback. Each object 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. - */ - filterObjects(objectLayer: Phaser.Tilemaps.ObjectLayer | string, callback: TilemapFilterCallback, context?: object): Phaser.GameObjects.GameObject[]; - - /** - * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given - * filter callback function. Any tiles that pass the filter test (i.e. where the callback returns - * true) will returned as a new array. Similar to Array.prototype.Filter in vanilla JS. - * If no layer specified, the map's current layer is used. - * @param callback The callback. Each tile in the given area will be passed to this - * callback as the first and only parameter. The callback should return true for tiles that pass the - * filter. - * @param context The context under which the callback should be run. - * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area to filter. Default 0. - * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area to filter. Default 0. - * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. - * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. - * @param filteringOptions Optional filters to apply when getting the tiles. - * @param layer The tile layer to use. If not given the current layer is used. - */ - filterTiles(callback: Function, context?: object, tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tile[]; - - /** - * Searches the entire map layer for the first tile matching the given index, then returns that Tile - * object. If no match is found, it returns null. 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 traveling up to - * the top-left. - * If no layer specified, the map's current layer is used. - * @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 tile layer to use. If not given the current layer is used. - */ - findByIndex(index: integer, skip?: integer, reverse?: boolean, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tile; - - /** - * Find the first object in the given object layer that satisfies the provided testing function. - * I.e. finds the first object for which `callback` returns true. Similar to - * Array.prototype.find in vanilla JS. - * @param objectLayer The name of an object layer (from Tiled) or an ObjectLayer instance. - * @param callback The callback. Each object 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. - */ - findObject(objectLayer: Phaser.Tilemaps.ObjectLayer | string, callback: TilemapFindCallback, context?: object): Phaser.GameObjects.GameObject; - - /** - * Find the first tile in the given rectangular area (in tile coordinates) of the layer that - * satisfies the provided testing function. I.e. finds the first tile for which `callback` returns - * true. Similar to Array.prototype.find in vanilla JS. - * If no layer specified, the maps current layer is used. - * @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 tileX The left most tile index (in tile coordinates) to use as the origin of the area to search. Default 0. - * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area to search. Default 0. - * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. - * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. - * @param filteringOptions Optional filters to apply when getting the tiles. - * @param layer The Tile layer to run the search on. If not provided will use the current layer. - */ - findTile(callback: FindTileCallback, context?: object, tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tile; - - /** - * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given - * callback. Similar to Array.prototype.forEach in vanilla JS. - * - * If no layer specified, the map's current layer is used. - * @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 tileX The left most tile index (in tile coordinates) to use as the origin of the area to search. Default 0. - * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area to search. Default 0. - * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. - * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. - * @param filteringOptions Optional filters to apply when getting the tiles. - * @param layer The Tile layer to run the search on. If not provided will use the current layer. - */ - forEachTile(callback: EachTileCallback, context?: object, tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; - - /** - * Gets the image layer index based on its name. - * @param name The name of the image to get. - */ - getImageIndex(name: string): integer; - - /** - * Return a list of all valid imagelayer names loaded in this Tilemap. - */ - getImageLayerNames(): string[]; - - /** - * Internally used. Returns the index of the object in one of the Tilemaps arrays whose name - * property matches the given `name`. - * @param location The Tilemap array to search. - * @param name The name of the array element to get. - */ - getIndex(location: any[], name: string): number; - - /** - * Gets the LayerData from this.layers that is associated with `layer`, or null if an invalid - * `layer` is given. - * @param layer The name of the - * layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a - * StaticTilemapLayer. If not given will default to the maps current layer index. - */ - getLayer(layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.LayerData; - - /** - * Gets the ObjectLayer from this.objects that has the given `name`, or null if no ObjectLayer - * is found with that name. - * @param name The name of the object layer from Tiled. - */ - getObjectLayer(name?: string): Phaser.Tilemaps.ObjectLayer; - - /** - * Return a list of all valid objectgroup names loaded in this Tilemap. - */ - getObjectLayerNames(): string[]; - - /** - * Gets the LayerData index of the given `layer` within this.layers, or null if an invalid - * `layer` is given. - * @param layer The name of the - * layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a - * StaticTilemapLayer. If not given will default to the map's current layer index. - */ - getLayerIndex(layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): integer; - - /** - * Gets the index of the LayerData within this.layers that has the given `name`, or null if an - * invalid `name` is given. - * @param name The name of the layer to get. - */ - getLayerIndexByName(name: string): integer; - - /** - * Gets a tile at the given tile coordinates from the given layer. - * If no layer specified, the map's current layer is used. - * @param tileX X position to get the tile from (given in tile units, not pixels). - * @param tileY Y position to get the tile from (given in tile units, not pixels). - * @param nonNull If true getTile won't return null for empty tiles, but a Tile object with an index of -1. Default false. - * @param layer The tile layer to use. If not given the current layer is used. - */ - getTileAt(tileX: integer, tileY: integer, nonNull?: boolean, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tile; - - /** - * Gets a tile at the given world coordinates from the given layer. - * If no layer specified, the map's current layer is used. - * @param worldX X position to get the tile from (given in pixels) - * @param worldY Y position to get the tile from (given in pixels) - * @param nonNull If true, function won't return null for empty tiles, but a Tile object with an index of -1. Default false. - * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. - * @param layer The tile layer to use. If not given the current layer is used. - */ - getTileAtWorldXY(worldX: number, worldY: number, nonNull?: boolean, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tile; - - /** - * Return a list of all valid tilelayer names loaded in this Tilemap. - */ - getTileLayerNames(): any; - - /** - * Gets the tiles in the given rectangular area (in tile coordinates) of the layer. - * If no layer specified, the maps current layer is used. - * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. - * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. - * @param filteringOptions Optional filters to apply when getting the tiles. - * @param layer The tile layer to use. If not given the current layer is used. - */ - getTilesWithin(tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tile[]; - - /** - * Gets the tiles that overlap with the given shape in the given layer. The shape must be a Circle, - * Line, Rectangle or Triangle. The shape should be in world coordinates. - * If no layer specified, the maps current layer is used. - * @param shape A shape in world (pixel) coordinates - * @param filteringOptions Optional filters to apply when getting the tiles. - * @param camera The Camera to use when factoring in which tiles to return. Default main camera. - * @param layer The tile layer to use. If not given the current layer is used. - */ - getTilesWithinShape(shape: Phaser.Geom.Circle | Phaser.Geom.Line | Phaser.Geom.Rectangle | Phaser.Geom.Triangle, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tile[]; - - /** - * Gets the tiles in the given rectangular area (in world coordinates) of the layer. - * If no layer specified, the maps current layer is used. - * @param worldX The world x coordinate for the top-left of the area. - * @param worldY The world y coordinate for the top-left of the area. - * @param width The width of the area. - * @param height The height of the area. - * @param filteringOptions Optional filters to apply when getting the tiles. - * @param camera The Camera to use when factoring in which tiles to return. Default main camera. - * @param layer The tile layer to use. If not given the current layer is used. - */ - getTilesWithinWorldXY(worldX: number, worldY: number, width: number, height: number, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tile[]; - - /** - * Gets the Tileset that has the given `name`, or null if an invalid `name` is given. - * @param name The name of the Tileset to get. - */ - getTileset(name: string): Phaser.Tilemaps.Tileset; - - /** - * Gets the index of the Tileset within this.tilesets that has the given `name`, or null if an - * invalid `name` is given. - * @param name The name of the Tileset to get. - */ - getTilesetIndex(name: string): integer; - - /** - * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns - * false if there is no tile or if the tile at that location has an index of -1. - * - * If no layer specified, the map's current layer is used. - * @param tileX The x coordinate, in tiles, not pixels. - * @param tileY The y coordinate, in tiles, not pixels. - * @param layer The tile layer to use. If not given the current layer is used. - */ - hasTileAt(tileX: integer, tileY: integer, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): boolean; - - /** - * Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns - * false if there is no tile or if the tile at that location has an index of -1. - * - * If no layer specified, the maps current layer is used. - * @param worldX The x coordinate, in pixels. - * @param worldY The y coordinate, in pixels. - * @param camera The Camera to use when factoring in which tiles to return. Default main camera. - * @param layer The tile layer to use. If not given the current layer is used. - */ - hasTileAtWorldXY(worldX: number, worldY: number, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): boolean; - - /** - * The LayerData object that is currently selected in the map. You can set this property using - * any type supported by setLayer. - */ - layer: Phaser.Tilemaps.LayerData; - - /** - * Puts a tile at the given tile coordinates in the specified layer. You can pass in either an index - * or a Tile object. If you pass in a Tile, all attributes will be copied over to the specified - * location. If you pass in an index, only the index at the specified location will be changed. - * Collision information will be recalculated at the specified location. - * - * If no layer specified, the maps current layer is used. - * - * This cannot be applied to StaticTilemapLayers. - * @param tile The index of this tile to set or a Tile object. - * @param tileX The x coordinate, in tiles, not pixels. - * @param tileY The y coordinate, in tiles, not pixels. - * @param recalculateFaces `true` if the faces data should be recalculated. Default true. - * @param layer The tile layer to use. If not given the current layer is used. - */ - putTileAt(tile: integer | Phaser.Tilemaps.Tile, tileX: integer, tileY: integer, recalculateFaces?: boolean, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tile; - - /** - * Puts a tile at the given world coordinates (pixels) in the specified layer. You can pass in either - * an index or a Tile object. If you pass in a Tile, all attributes will be copied over to the - * specified location. If you pass in an index, only the index at the specified location will be - * changed. Collision information will be recalculated at the specified location. - * - * If no layer specified, the maps current layer is used. This - * cannot be applied to StaticTilemapLayers. - * @param tile The index of this tile to set or a Tile object. - * @param worldX The x coordinate, in pixels. - * @param worldY The y coordinate, in pixels. - * @param recalculateFaces `true` if the faces data should be recalculated. Default true. - * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. - * @param layer The tile layer to use. If not given the current layer is used. - */ - putTileAtWorldXY(tile: integer | Phaser.Tilemaps.Tile, worldX: number, worldY: number, recalculateFaces?: boolean, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tile; - - /** - * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified - * layer. The array can be composed of either tile indexes or Tile objects. If you pass in a Tile, - * all attributes will be copied over to the specified location. If you pass in an index, only the - * index at the specified location will be changed. Collision information will be recalculated - * within the region tiles were changed. - * - * If no layer specified, the maps current layer is used. - * This cannot be applied to StaticTilemapLayers. - * @param tile A row (array) or grid (2D array) of Tiles or tile indexes to place. - * @param tileX The x coordinate, in tiles, not pixels. - * @param tileY The y coordinate, in tiles, not pixels. - * @param recalculateFaces `true` if the faces data should be recalculated. Default true. - * @param layer The tile layer to use. If not given the current layer is used. - */ - putTilesAt(tile: integer[] | integer[][] | Phaser.Tilemaps.Tile[] | Phaser.Tilemaps.Tile[][], tileX: integer, tileY: integer, recalculateFaces?: boolean, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; - - /** - * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the - * specified layer. Each tile will receive a new index. If an array of indexes is passed in, then - * those will be used for randomly assigning new tile indexes. If an array is not provided, the - * indexes found within the region (excluding -1) will be used for randomly assigning new tile - * indexes. This method only modifies tile indexes and does not change collision information. - * - * If no layer specified, the maps current layer is used. - * This cannot be applied to StaticTilemapLayers. - * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. - * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. - * @param indexes An array of indexes to randomly draw from during randomization. - * @param layer The tile layer to use. If not given the current layer is used. - */ - randomize(tileX?: integer, tileY?: integer, width?: integer, height?: integer, indexes?: integer[], layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; - - /** - * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting - * faces are used internally for optimizing collisions against tiles. This method is mostly used - * internally to optimize recalculating faces when only one tile has been changed. - * - * If no layer specified, the maps current layer is used. - * @param tileX The x coordinate, in tiles, not pixels. - * @param tileY The y coordinate, in tiles, not pixels. - * @param layer The tile layer to use. If not given the current layer is used. - */ - calculateFacesAt(tileX: integer, tileY: integer, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; - - /** - * Calculates interesting faces within the rectangular area specified (in tile coordinates) of the - * layer. Interesting faces are used internally for optimizing collisions against tiles. This method - * is mostly used internally. - * - * If no layer specified, the map's current layer is used. - * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. - * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. - * @param layer The tile layer to use. If not given the current layer is used. - */ - calculateFacesWithin(tileX?: integer, tileY?: integer, width?: integer, height?: integer, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; - - /** - * Removes the given TilemapLayer from this Tilemap without destroying it. - * - * If no layer specified, the map's current layer is used. - * @param layer The tile layer to be removed. - */ - removeLayer(layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; - - /** - * Destroys the given TilemapLayer and removes it from this Tilemap. - * - * If no layer specified, the map's current layer is used. - * @param layer The tile layer to be destroyed. - */ - destroyLayer(layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; - - /** - * Removes all layers from this Tilemap and destroys any associated StaticTilemapLayers or - * DynamicTilemapLayers. - */ - removeAllLayers(): Phaser.Tilemaps.Tilemap; - - /** - * Removes the given Tile, or an array of Tiles, from the layer to which they belong, - * and optionally recalculates the collision information. - * - * This cannot be applied to Tiles that belong to Static Tilemap Layers. - * @param tiles The Tile to remove, or an array of Tiles. - * @param replaceIndex After removing the Tile, insert a brand new Tile into its location with the given index. Leave as -1 to just remove the tile. Default -1. - * @param recalculateFaces `true` if the faces data should be recalculated. Default true. - */ - removeTile(tiles: Phaser.Tilemaps.Tile | Phaser.Tilemaps.Tile[], replaceIndex?: integer, recalculateFaces?: boolean): Phaser.Tilemaps.Tile[]; - - /** - * Removes the tile at the given tile coordinates in the specified layer and updates the layer's - * collision information. - * - * If no layer specified, the maps current layer is used. - * This cannot be applied to StaticTilemapLayers. - * @param tileX The x coordinate, in tiles, not pixels. - * @param tileY The y coordinate, in tiles, not pixels. - * @param replaceWithNull If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1. Default true. - * @param recalculateFaces `true` if the faces data should be recalculated. Default true. - * @param layer The tile layer to use. If not given the current layer is used. - */ - removeTileAt(tileX: integer, tileY: integer, replaceWithNull?: boolean, recalculateFaces?: boolean, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tile; - - /** - * Removes the tile at the given world coordinates in the specified layer and updates the layer's - * collision information. - * - * If no layer specified, the maps current layer is used. - * This cannot be applied to StaticTilemapLayers. - * @param worldX The x coordinate, in pixels. - * @param worldY The y coordinate, in pixels. - * @param replaceWithNull If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1. Default true. - * @param recalculateFaces `true` if the faces data should be recalculated. Default true. - * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. - * @param layer The tile layer to use. If not given the current layer is used. - */ - removeTileAtWorldXY(worldX: number, worldY: number, replaceWithNull?: boolean, recalculateFaces?: boolean, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tile; - - /** - * Draws a debug representation of the layer to the given Graphics. This is helpful when you want to - * get a quick idea of which of your tiles are colliding and which have interesting faces. The tiles - * are drawn starting at (0, 0) in the Graphics, allowing you to place the debug representation - * wherever you want on the screen. - * - * If no layer specified, the maps current layer is used. - * @param graphics The target Graphics object to draw upon. - * @param styleConfig An object specifying the colors to use for the debug drawing. - * @param layer The tile layer to use. If not given the current layer is used. - */ - renderDebug(graphics: Phaser.GameObjects.Graphics, styleConfig: Phaser.Types.Tilemaps.StyleConfig, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; - - /** - * Draws a debug representation of all layers within this Tilemap to the given Graphics object. - * - * This is helpful when you want to get a quick idea of which of your tiles are colliding and which - * have interesting faces. The tiles are drawn starting at (0, 0) in the Graphics, allowing you to - * place the debug representation wherever you want on the screen. - * @param graphics The target Graphics object to draw upon. - * @param styleConfig An object specifying the colors to use for the debug drawing. - * @param layer The tile layer to use. If not given the current layer is used. - */ - renderDebugFull(graphics: Phaser.GameObjects.Graphics, styleConfig: Phaser.Types.Tilemaps.StyleConfig, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; - - /** - * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching - * `findIndex` and updates their index to match `newIndex`. This only modifies the index and does - * not change collision information. - * - * If no layer specified, the maps current layer is used. - * This cannot be applied to StaticTilemapLayers. - * @param findIndex The index of the tile to search for. - * @param newIndex The index of the tile to replace it with. - * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. - * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. - * @param layer The tile layer to use. If not given the current layer is used. - */ - replaceByIndex(findIndex: integer, newIndex: integer, tileX?: integer, tileY?: integer, width?: integer, height?: integer, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; - - /** - * Sets collision on the given tile or tiles within a layer by index. 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). - * - * If no layer specified, the map's current layer is used. - * @param indexes Either a single tile index, or an array of tile indexes. - * @param collides If true it will enable collision. If false it will clear collision. Default true. - * @param recalculateFaces Whether or not to recalculate the tile faces after the update. Default true. - * @param layer The tile layer to use. If not given the current layer is used. - * @param updateLayer If true, updates the current tiles on the layer. Set to false if no tiles have been placed for significant performance boost. Default true. - */ - setCollision(indexes: integer | any[], collides?: boolean, recalculateFaces?: boolean, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer, updateLayer?: boolean): Phaser.Tilemaps.Tilemap; - - /** - * Sets collision on a range of tiles in a layer whose index is between the specified `start` and - * `stop` (inclusive). 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). - * - * If no layer specified, the map's current layer is used. - * @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 recalculateFaces Whether or not to recalculate the tile faces after the update. Default true. - * @param layer The tile layer to use. If not given the current layer is used. - */ - setCollisionBetween(start: integer, stop: integer, collides?: boolean, recalculateFaces?: boolean, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; - - /** - * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property - * that matches the given properties object, its collision flag will be set. The `collides` - * parameter controls if collision will be enabled (true) or disabled (false). Passing in - * `{ collides: true }` would update the collision flag on any tiles with a "collides" property that - * has a value of true. Any tile that doesn't have "collides" set to true will be ignored. You can - * also use an array of values, e.g. `{ types: ["stone", "lava", "sand" ] }`. If a tile has a - * "types" property that matches any of those values, its collision flag will be updated. - * - * If no layer specified, the map's current layer is used. - * @param properties An object with tile properties and corresponding values that should be checked. - * @param collides If true it will enable collision. If false it will clear collision. Default true. - * @param recalculateFaces Whether or not to recalculate the tile faces after the update. Default true. - * @param layer The tile layer to use. If not given the current layer is used. - */ - setCollisionByProperty(properties: object, collides?: boolean, recalculateFaces?: boolean, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; - - /** - * Sets collision on all tiles in the given layer, except for tiles that have an index specified in - * the given array. The `collides` parameter controls if collision will be enabled (true) or - * disabled (false). - * - * If no layer specified, the map's current layer is used. - * @param indexes An array of the tile indexes to not be counted for collision. - * @param collides If true it will enable collision. If false it will clear collision. Default true. - * @param recalculateFaces Whether or not to recalculate the tile faces after the update. Default true. - * @param layer The tile layer to use. If not given the current layer is used. - */ - setCollisionByExclusion(indexes: integer[], collides?: boolean, recalculateFaces?: boolean, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; - - /** - * Sets collision on the tiles within a layer by checking each tile's collision group data - * (typically defined in Tiled within the tileset collision editor). If any objects are found within - * a tile's collision group, the tile's colliding information will be set. The `collides` parameter - * controls if collision will be enabled (true) or disabled (false). - * - * If no layer specified, the map's current layer is used. - * @param collides If true it will enable collision. If false it will clear collision. Default true. - * @param recalculateFaces Whether or not to recalculate the tile faces after the update. Default true. - * @param layer The tile layer to use. If not given the current layer is used. - */ - setCollisionFromCollisionGroup(collides?: boolean, recalculateFaces?: boolean, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; - - /** - * Sets a global collision callback for the given tile index within the layer. This will affect all - * tiles on this layer that have the same index. 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. - * - * If no layer specified, the map's current layer is used. - * @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 tile layer to use. If not given the current layer is used. - */ - setTileIndexCallback(indexes: integer | any[], callback: Function, callbackContext: object, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; - - /** - * Sets a collision callback for the given rectangular area (in tile coordinates) within the layer. - * If a callback is already set for the tile index it will be replaced. Set the callback to null to - * remove it. - * - * If no layer specified, the map's current layer is used. - * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. - * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. - * @param width How many tiles wide from the `tileX` index the area will be. - * @param height How many tiles tall from the `tileY` index the area will be. - * @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 tile layer to use. If not given the current layer is used. - */ - setTileLocationCallback(tileX: integer, tileY: integer, width: integer, height: integer, callback: Function, callbackContext?: object, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; - - /** - * Sets the current layer to the LayerData associated with `layer`. - * @param layer The name of the - * layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a - * StaticTilemapLayer. If not given will default to the map's current layer index. - */ - setLayer(layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; - - /** - * Sets the base tile size for the map. Note: this does not necessarily match the tileWidth and - * tileHeight for all layers. This also updates the base size on all tiles across all layers. - * @param tileWidth The width of the tiles the map uses for calculations. - * @param tileHeight The height of the tiles the map uses for calculations. - */ - setBaseTileSize(tileWidth: integer, tileHeight: integer): Phaser.Tilemaps.Tilemap; - - /** - * Sets the tile size for a specific `layer`. Note: this does not necessarily match the map's - * tileWidth and tileHeight for all layers. This will set the tile size for the layer and any - * tiles the layer has. - * @param tileWidth The width of the tiles (in pixels) in the layer. - * @param tileHeight The height of the tiles (in pixels) in the layer. - * @param layer The name of the - * layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a - * StaticTilemapLayer. If not given will default to the map's current layer index. - */ - setLayerTileSize(tileWidth: integer, tileHeight: integer, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; - - /** - * Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given - * layer. It will only randomize the tiles in that area, so if they're all the same nothing will - * appear to have changed! This method only modifies tile indexes and does not change collision - * information. - * - * If no layer specified, the maps current layer is used. - * This cannot be applied to StaticTilemapLayers. - * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. - * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. - * @param layer The tile layer to use. If not given the current layer is used. - */ - shuffle(tileX?: integer, tileY?: integer, width?: integer, height?: integer, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; - - /** - * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching - * `indexA` and swaps then with `indexB`. This only modifies the index and does not change collision - * information. - * - * If no layer specified, the maps current layer is used. - * This cannot be applied to StaticTilemapLayers. - * @param tileA First tile index. - * @param tileB Second tile index. - * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. - * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. - * @param layer The tile layer to use. If not given the current layer is used. - */ - swapByIndex(tileA: integer, tileB: integer, tileX?: integer, tileY?: integer, width?: integer, height?: integer, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; - - /** - * Converts from tile X coordinates (tile units) to world X coordinates (pixels), factoring in the - * layers position, scale and scroll. - * - * If no layer specified, the maps current layer is used. - * @param tileX The x coordinate, in tiles, not pixels. - * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. - * @param layer The tile layer to use. If not given the current layer is used. - */ - tileToWorldX(tileX: integer, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): number; - - /** - * Converts from tile Y coordinates (tile units) to world Y coordinates (pixels), factoring in the - * layers position, scale and scroll. - * - * If no layer specified, the maps current layer is used. - * @param tileY The y coordinate, in tiles, not pixels. - * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. - * @param layer The tile layer - * to use. If not given the current layer is used. - */ - tileToWorldY(tileY: integer, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): number; - - /** - * Converts from tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the - * layers position, scale and scroll. This will return a new Vector2 object or update the given - * `point` object. - * - * If no layer specified, the maps current layer is used. - * @param tileX The x coordinate, in tiles, not pixels. - * @param tileY The y coordinate, in tiles, not pixels. - * @param point A Vector2 to store the coordinates in. If not given a new Vector2 is created. - * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. - * @param layer The tile layer to use. If not given the current layer is used. - */ - tileToWorldXY(tileX: integer, tileY: integer, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Math.Vector2; - - /** - * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the - * specified layer. Each tile will receive a new index. New indexes are drawn from the given - * weightedIndexes array. An example weighted array: - * - * [ - * { index: 6, weight: 4 }, // Probability of index 6 is 4 / 8 - * { index: 7, weight: 2 }, // Probability of index 7 would be 2 / 8 - * { index: 8, weight: 1.5 }, // Probability of index 8 would be 1.5 / 8 - * { index: 26, weight: 0.5 } // Probability of index 27 would be 0.5 / 8 - * ] - * - * The probability of any index being choose is (the index's weight) / (sum of all weights). This - * method only modifies tile indexes and does not change collision information. - * - * If no layer specified, the map's current layer is used. This - * cannot be applied to StaticTilemapLayers. - * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. - * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. - * @param weightedIndexes An array of objects to randomly draw from during - * randomization. They should be in the form: { index: 0, weight: 4 } or - * { index: [0, 1], weight: 4 } if you wish to draw from multiple tile indexes. - * @param layer The tile layer to use. If not given the current layer is used. - */ - weightedRandomize(tileX?: integer, tileY?: integer, width?: integer, height?: integer, weightedIndexes?: object[], layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; - - /** - * Converts from world X coordinates (pixels) to tile X coordinates (tile units), factoring in the - * layers position, scale and scroll. - * - * If no layer specified, the maps current layer is used. - * @param worldX The x coordinate to be converted, in pixels, not tiles. - * @param snapToFloor Whether or not to round the tile coordinate down to the nearest integer. Default true. - * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. - * @param layer The tile layer - * to use. If not given the current layer is used. - */ - worldToTileX(worldX: number, snapToFloor?: boolean, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): number; - - /** - * Converts from world Y coordinates (pixels) to tile Y coordinates (tile units), factoring in the - * layers position, scale and scroll. - * - * If no layer specified, the maps current layer is used. - * @param worldY The y coordinate to be converted, in pixels, not tiles. - * @param snapToFloor Whether or not to round the tile coordinate down to the nearest integer. Default true. - * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. - * @param layer The tile layer to use. If not given the current layer is used. - */ - worldToTileY(worldY: number, snapToFloor?: boolean, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): number; - - /** - * Converts from world XY coordinates (pixels) to tile XY coordinates (tile units), factoring in the - * layers position, scale and scroll. This will return a new Vector2 object or update the given - * `point` object. - * - * If no layer specified, the maps current layer is used. - * @param worldX The x coordinate to be converted, in pixels, not tiles. - * @param worldY The y coordinate to be converted, in pixels, not tiles. - * @param snapToFloor Whether or not to round the tile coordinate down to the nearest integer. Default true. - * @param point A Vector2 to store the coordinates in. If not given a new Vector2 is created. - * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. - * @param layer The tile layer to use. If not given the current layer is used. - */ - worldToTileXY(worldX: number, worldY: number, snapToFloor?: boolean, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Math.Vector2; - - } - - /** - * A Tileset is a combination of an image containing the tiles and a container for data about - * each tile. - */ - class Tileset { - /** - * - * @param name The name of the tileset in the map data. - * @param firstgid The first tile index this tileset contains. - * @param tileWidth Width of each tile (in pixels). Default 32. - * @param tileHeight Height of each tile (in pixels). Default 32. - * @param tileMargin The margin around all tiles in the sheet (in pixels). Default 0. - * @param tileSpacing The spacing between each tile in the sheet (in pixels). Default 0. - * @param tileProperties Custom properties defined per tile in the Tileset. - * These typically are custom properties created in Tiled when editing a tileset. Default {}. - * @param tileData Data stored per tile. These typically are created in Tiled - * when editing a tileset, e.g. from Tiled's tile collision editor or terrain editor. Default {}. - */ - constructor(name: string, firstgid: integer, tileWidth?: integer, tileHeight?: integer, tileMargin?: integer, tileSpacing?: integer, tileProperties?: object, tileData?: object); - - /** - * The name of the Tileset. - */ - name: string; - - /** - * The starting index of the first tile index this Tileset contains. - */ - firstgid: integer; - - /** - * The width of each tile (in pixels). Use setTileSize to change. - */ - readonly tileWidth: integer; - - /** - * The height of each tile (in pixels). Use setTileSize to change. - */ - readonly tileHeight: integer; - - /** - * The margin around the tiles in the sheet (in pixels). Use `setSpacing` to change. - */ - readonly tileMargin: integer; - - /** - * The spacing between each the tile in the sheet (in pixels). Use `setSpacing` to change. - */ - readonly tileSpacing: integer; - - /** - * Tileset-specific properties per tile that are typically defined in the Tiled editor in the - * Tileset editor. - */ - tileProperties: object; - - /** - * Tileset-specific data per tile that are typically defined in the Tiled editor, e.g. within - * the Tileset collision editor. This is where collision objects and terrain are stored. - */ - tileData: object; - - /** - * The cached image that contains the individual tiles. Use setImage to set. - */ - readonly image: Phaser.Textures.Texture; - - /** - * The gl texture used by the WebGL renderer. - */ - readonly glTexture: WebGLTexture; - - /** - * The number of tile rows in the the tileset. - */ - readonly rows: integer; - - /** - * The number of tile columns in the tileset. - */ - readonly columns: integer; - - /** - * The total number of tiles in the tileset. - */ - readonly total: integer; - - /** - * The look-up table to specific tile image texture coordinates (UV in pixels). Each element - * contains the coordinates for a tile in an object of the form {x, y}. - */ - readonly texCoordinates: object[]; - - /** - * Get a tiles properties that are stored in the Tileset. Returns null if tile index is not - * contained in this Tileset. This is typically defined in Tiled under the Tileset editor. - * @param tileIndex The unique id of the tile across all tilesets in the map. - */ - getTileProperties(tileIndex: integer): object | undefined; - - /** - * Get a tile's data that is stored in the Tileset. Returns null if tile index is not contained - * in this Tileset. This is typically defined in Tiled and will contain both Tileset collision - * info and terrain mapping. - * @param tileIndex The unique id of the tile across all tilesets in the map. - */ - getTileData(tileIndex: integer): object | undefined; - - /** - * Get a tile's collision group that is stored in the Tileset. Returns null if tile index is not - * contained in this Tileset. This is typically defined within Tiled's tileset collision editor. - * @param tileIndex The unique id of the tile across all tilesets in the map. - */ - getTileCollisionGroup(tileIndex: integer): object; - - /** - * Returns true if and only if this Tileset contains the given tile index. - * @param tileIndex The unique id of the tile across all tilesets in the map. - */ - containsTileIndex(tileIndex: integer): boolean; - - /** - * Returns the texture coordinates (UV in pixels) in the Tileset image for the given tile index. - * Returns null if tile index is not contained in this Tileset. - * @param tileIndex The unique id of the tile across all tilesets in the map. - */ - getTileTextureCoordinates(tileIndex: integer): object; - - /** - * Sets the image associated with this Tileset and updates the tile data (rows, columns, etc.). - * @param texture The image that contains the tiles. - */ - setImage(texture: Phaser.Textures.Texture): Phaser.Tilemaps.Tileset; - - /** - * Sets the tile width & height and updates the tile data (rows, columns, etc.). - * @param tileWidth The width of a tile in pixels. - * @param tileHeight The height of a tile in pixels. - */ - setTileSize(tileWidth?: integer, tileHeight?: integer): Phaser.Tilemaps.Tileset; - - /** - * Sets the tile margin & spacing and updates the tile data (rows, columns, etc.). - * @param margin The margin around the tiles in the sheet (in pixels). - * @param spacing The spacing between the tiles in the sheet (in pixels). - */ - setSpacing(margin?: integer, spacing?: integer): Phaser.Tilemaps.Tileset; - - /** - * Updates tile texture coordinates and tileset data. - * @param imageWidth The (expected) width of the image to slice. - * @param imageHeight The (expected) height of the image to slice. - */ - updateTileData(imageWidth: integer, imageHeight: integer): Phaser.Tilemaps.Tileset; - - } - } namespace Time { @@ -83559,6 +84255,487 @@ declare namespace Phaser { } namespace Tweens { + /** + * A Timeline combines multiple Tweens into one. Its overall behavior is otherwise similar to a single Tween. + * + * The Timeline updates all of its Tweens simultaneously. Its methods allow you to easily build a sequence + * of Tweens (each one starting after the previous one) or run multiple Tweens at once during given parts of the Timeline. + */ + class Timeline extends Phaser.Events.EventEmitter { + /** + * + * @param manager The Tween Manager which owns this Timeline. + */ + constructor(manager: Phaser.Tweens.TweenManager); + + /** + * The Tween Manager which owns this Timeline. + */ + manager: Phaser.Tweens.TweenManager; + + /** + * A constant value which allows this Timeline to be easily identified as one. + */ + isTimeline: boolean; + + /** + * An array of Tween objects, each containing a unique property and target being tweened. + */ + data: any[]; + + /** + * The cached size of the data array. + */ + totalData: number; + + /** + * If true then duration, delay, etc values are all frame totals, rather than ms. + */ + useFrames: boolean; + + /** + * Scales the time applied to this Timeline. A value of 1 runs in real-time. A value of 0.5 runs 50% slower, and so on. + * Value isn't used when calculating total duration of the Timeline, it's a run-time delta adjustment only. + */ + timeScale: number; + + /** + * Loop this Timeline? Can be -1 for an infinite loop, or an integer. + * When enabled it will play through ALL Tweens again (use Tween.repeat to loop a single tween) + */ + loop: number; + + /** + * Time in ms/frames before this Timeline loops. + */ + loopDelay: number; + + /** + * How many loops are left to run? + */ + loopCounter: number; + + /** + * Time in ms/frames before the 'onComplete' event fires. This never fires if loop = true (as it never completes) + */ + completeDelay: number; + + /** + * Countdown timer value, as used by `loopDelay` and `completeDelay`. + */ + countdown: number; + + /** + * The current state of the Timeline. + */ + state: integer; + + /** + * Does the Timeline start off paused? (if so it needs to be started with Timeline.play) + */ + paused: boolean; + + /** + * Elapsed time in ms/frames of this run through of the Timeline. + */ + elapsed: number; + + /** + * Total elapsed time in ms/frames of the entire Timeline, including looping. + */ + totalElapsed: number; + + /** + * Time in ms/frames for the whole Timeline to play through once, excluding loop amounts and loop delays. + */ + duration: number; + + /** + * Value between 0 and 1. The amount of progress through the Timeline, _excluding loops_. + */ + progress: number; + + /** + * Time in ms/frames for all Tweens in this Timeline to complete (including looping) + */ + totalDuration: number; + + /** + * Value between 0 and 1. The amount through the entire Timeline, including looping. + */ + totalProgress: number; + + /** + * An object containing the different Tween callback functions. + * + * You can either set these in the Tween config, or by calling the `Tween.setCallback` method. + * + * `onComplete` When the Timeline finishes playback fully or `Timeline.stop` is called. Never invoked if timeline is set to repeat infinitely. + * `onLoop` When a Timeline loops. + * `onStart` When the Timeline starts playing. + * `onUpdate` When a Timeline updates a child Tween. + * `onYoyo` When a Timeline starts a yoyo. + */ + callbacks: object; + + /** + * The context in which all callbacks are invoked. + */ + callbackScope: any; + + /** + * Internal method that will emit a Timeline based Event and invoke the given callback. + * @param event The Event to be dispatched. + * @param callback The callback to be invoked. Can be `null` or `undefined` to skip invocation. + */ + dispatchTimelineEvent(event: Phaser.Types.Tweens.Event, callback: Function): void; + + /** + * Sets the value of the time scale applied to this Timeline. A value of 1 runs in real-time. + * A value of 0.5 runs 50% slower, and so on. + * + * The value isn't used when calculating total duration of the tween, it's a run-time delta adjustment only. + * @param value The time scale value to set. + */ + setTimeScale(value: number): this; + + /** + * Gets the value of the time scale applied to this Timeline. A value of 1 runs in real-time. + * A value of 0.5 runs 50% slower, and so on. + */ + getTimeScale(): number; + + /** + * Check whether or not the Timeline is playing. + */ + isPlaying(): boolean; + + /** + * Creates a new Tween, based on the given Tween Config, and adds it to this Timeline. + * @param config The configuration object for the Tween. + */ + add(config: Phaser.Types.Tweens.TweenBuilderConfig | object): this; + + /** + * Adds an existing Tween to this Timeline. + * @param tween The Tween to be added to this Timeline. + */ + queue(tween: Phaser.Tweens.Tween): this; + + /** + * Checks whether a Tween has an offset value. + * @param tween The Tween to check. + */ + hasOffset(tween: Phaser.Tweens.Tween): boolean; + + /** + * Checks whether the offset value is a number or a directive that is relative to previous tweens. + * @param value The offset value to be evaluated. + */ + isOffsetAbsolute(value: number): boolean; + + /** + * Checks if the offset is a relative value rather than an absolute one. + * If the value is just a number, this returns false. + * @param value The offset value to be evaluated. + */ + isOffsetRelative(value: string): boolean; + + /** + * Parses the relative offset value, returning a positive or negative number. + * @param value The relative offset, in the format of '-=500', for example. The first character determines whether it will be a positive or negative number. Spacing matters here. + * @param base The value to use as the offset. + */ + getRelativeOffset(value: string, base: number): number; + + /** + * Calculates the total duration of the timeline. + * + * Computes all tween durations and returns the full duration of the timeline. + * + * The resulting number is stored in the timeline, not as a return value. + */ + calcDuration(): void; + + /** + * Initializes the timeline, which means all Tweens get their init() called, and the total duration will be computed. + * Returns a boolean indicating whether the timeline is auto-started or not. + */ + init(): boolean; + + /** + * Resets all of the timeline's tweens back to their initial states. + * The boolean parameter indicates whether tweens that are looping should reset as well, or not. + * @param resetFromLoop If `true`, resets all looping tweens to their initial values. + */ + resetTweens(resetFromLoop: boolean): void; + + /** + * Sets a callback for the Timeline. + * @param type The internal type of callback to set. + * @param callback Timeline allows multiple tweens to be linked together to create a streaming sequence. + * @param params The parameters to pass to the callback. + * @param scope The context scope of the callback. + */ + setCallback(type: string, callback: Function, params?: any[], scope?: object): this; + + /** + * Passed a Tween to the Tween Manager and requests it be made active. + * @param tween The tween object to make active. + */ + makeActive(tween: Phaser.Tweens.Tween): Phaser.Tweens.TweenManager; + + /** + * Starts playing the Timeline. + */ + play(): void; + + /** + * Updates the Timeline's `state` and fires callbacks and events. + */ + nextState(): void; + + /** + * Returns 'true' if this Timeline has finished and should be removed from the Tween Manager. + * Otherwise, returns false. + * @param timestamp The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. + * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. + */ + update(timestamp: number, delta: number): boolean; + + /** + * Stops the Timeline immediately, whatever stage of progress it is at and flags it for removal by the TweenManager. + */ + stop(): void; + + /** + * Pauses the Timeline, retaining its internal state. + * + * Calling this on a Timeline that is already paused has no effect and fires no event. + */ + pause(): this; + + /** + * Resumes a paused Timeline from where it was when it was paused. + * + * Calling this on a Timeline that isn't paused has no effect and fires no event. + */ + resume(): this; + + /** + * Checks if any of the Tweens in this Timeline as operating on the target object. + * + * Returns `false` if no Tweens operate on the target object. + * @param target The target to check all Tweens against. + */ + hasTarget(target: object): boolean; + + /** + * Stops all the Tweens in the Timeline immediately, whatever stage of progress they are at and flags + * them for removal by the TweenManager. + */ + destroy(): void; + + } + + /** + * The Tween Manager is a default Scene Plugin which controls and updates Tweens and Timelines. + */ + class TweenManager { + /** + * + * @param scene The Scene which owns this Tween Manager. + */ + constructor(scene: Phaser.Scene); + + /** + * The Scene which owns this Tween Manager. + */ + scene: Phaser.Scene; + + /** + * The Systems object of the Scene which owns this Tween Manager. + */ + systems: Phaser.Scenes.Systems; + + /** + * The time scale of the Tween Manager. + * + * This value scales the time delta between two frames, thus influencing the speed of time for all Tweens owned by this Tween Manager. + */ + timeScale: number; + + /** + * Create a Tween Timeline and return it, but do NOT add it to the active or pending Tween lists. + * @param config The configuration object for the Timeline and its Tweens. + */ + createTimeline(config?: Phaser.Types.Tweens.TimelineBuilderConfig): Phaser.Tweens.Timeline; + + /** + * Create a Tween Timeline and add it to the active Tween list/ + * @param config The configuration object for the Timeline and its Tweens. + */ + timeline(config?: Phaser.Types.Tweens.TimelineBuilderConfig): Phaser.Tweens.Timeline; + + /** + * Create a Tween and return it, but do NOT add it to the active or pending Tween lists. + * @param config The configuration object for the Tween. + */ + create(config: Phaser.Types.Tweens.TweenBuilderConfig | object): Phaser.Tweens.Tween; + + /** + * Create a Tween and add it to the active Tween list. + * @param config The configuration object for the Tween. + */ + add(config: Phaser.Types.Tweens.TweenBuilderConfig | object): Phaser.Tweens.Tween; + + /** + * Add an existing tween into the active Tween list. + * @param tween The Tween to add. + */ + existing(tween: Phaser.Tweens.Tween): Phaser.Tweens.TweenManager; + + /** + * Create a Number Tween and add it to the active Tween list. + * @param config The configuration object for the Number Tween. + */ + addCounter(config: Phaser.Types.Tweens.NumberTweenBuilderConfig): Phaser.Tweens.Tween; + + /** + * Creates a Stagger function to be used by a Tween property. + * + * The stagger function will allow you to stagger changes to the value of the property across all targets of the tween. + * + * This is only worth using if the tween has multiple targets. + * + * The following will stagger the delay by 100ms across all targets of the tween, causing them to scale down to 0.2 + * over the duration specified: + * + * ```javascript + * this.tweens.add({ + * targets: [ ... ], + * scale: 0.2, + * ease: 'linear', + * duration: 1000, + * delay: this.tweens.stagger(100) + * }); + * ``` + * + * The following will stagger the delay by 500ms across all targets of the tween using a 10 x 6 grid, staggering + * from the center out, using a cubic ease. + * + * ```javascript + * this.tweens.add({ + * targets: [ ... ], + * scale: 0.2, + * ease: 'linear', + * duration: 1000, + * delay: this.tweens.stagger(500, { grid: [ 10, 6 ], from: 'center', ease: 'cubic.out' }) + * }); + * ``` + * @param config The configuration object for the Stagger function. + */ + stagger(config: Phaser.Types.Tweens.StaggerConfig): Function; + + /** + * Updates the Tween Manager's internal lists at the start of the frame. + * + * This method will return immediately if no changes have been indicated. + */ + preUpdate(): void; + + /** + * Updates all Tweens and Timelines of the Tween Manager. + * @param timestamp The current time in milliseconds. + * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. + */ + update(timestamp: number, delta: number): void; + + /** + * Removes the given tween from the Tween Manager, regardless of its state (pending or active). + * @param tween The Tween to be removed. + */ + remove(tween: Phaser.Tweens.Tween): Phaser.Tweens.TweenManager; + + /** + * Checks if a Tween or Timeline is active and adds it to the Tween Manager at the start of the frame if it isn't. + * @param tween The Tween to check. + */ + makeActive(tween: Phaser.Tweens.Tween): Phaser.Tweens.TweenManager; + + /** + * Passes all Tweens to the given callback. + * @param callback The function to call. + * @param scope The scope (`this` object) to call the function with. + * @param args The arguments to pass into the function. Its first argument will always be the Tween currently being iterated. + */ + each(callback: Function, scope?: object, ...args: any[]): void; + + /** + * Returns an array of all active Tweens and Timelines in the Tween Manager. + */ + getAllTweens(): Phaser.Tweens.Tween[]; + + /** + * Returns the scale of the time delta for all Tweens and Timelines owned by this Tween Manager. + */ + getGlobalTimeScale(): number; + + /** + * Returns an array of all Tweens or Timelines in the Tween Manager which affect the given target or array of targets. + * @param target The target to look for. Provide an array to look for multiple targets. + */ + getTweensOf(target: object | any[]): Phaser.Tweens.Tween[]; + + /** + * Checks if the given object is being affected by a playing Tween. + * @param target target Phaser.Tweens.Tween object + */ + isTweening(target: object): boolean; + + /** + * Stops all Tweens in this Tween Manager. They will be removed at the start of the frame. + */ + killAll(): Phaser.Tweens.TweenManager; + + /** + * Stops all Tweens which affect the given target or array of targets. The Tweens will be removed from the Tween Manager at the start of the frame. + * @param target The target to look for. Provide an array to look for multiple targets. + */ + killTweensOf(target: object | any[]): Phaser.Tweens.TweenManager; + + /** + * Pauses all Tweens in this Tween Manager. + */ + pauseAll(): Phaser.Tweens.TweenManager; + + /** + * Resumes all Tweens in this Tween Manager. + */ + resumeAll(): Phaser.Tweens.TweenManager; + + /** + * Sets a new scale of the time delta for this Tween Manager. + * + * The time delta is the time elapsed between two consecutive frames and influences the speed of time for this Tween Manager and all Tweens it owns. Values higher than 1 increase the speed of time, while values smaller than 1 decrease it. A value of 0 freezes time and is effectively equivalent to pausing all Tweens. + * @param value The new scale of the time delta, where 1 is the normal speed. + */ + setGlobalTimeScale(value: number): Phaser.Tweens.TweenManager; + + /** + * The Scene that owns this plugin is shutting down. + * We need to kill and reset all internal properties as well as stop listening to Scene events. + */ + shutdown(): void; + + /** + * The Scene that owns this plugin is being destroyed. + * We need to shutdown and then kill off all external references. + */ + destroy(): void; + + } + namespace Builders { /** * Retrieves the value of the given key from an object. @@ -83999,374 +85176,6 @@ declare namespace Phaser { } - /** - * A Timeline combines multiple Tweens into one. Its overall behavior is otherwise similar to a single Tween. - * - * The Timeline updates all of its Tweens simultaneously. Its methods allow you to easily build a sequence - * of Tweens (each one starting after the previous one) or run multiple Tweens at once during given parts of the Timeline. - */ - class Timeline extends Phaser.Events.EventEmitter { - /** - * - * @param manager The Tween Manager which owns this Timeline. - */ - constructor(manager: Phaser.Tweens.TweenManager); - - /** - * The Tween Manager which owns this Timeline. - */ - manager: Phaser.Tweens.TweenManager; - - /** - * A constant value which allows this Timeline to be easily identified as one. - */ - isTimeline: boolean; - - /** - * An array of Tween objects, each containing a unique property and target being tweened. - */ - data: any[]; - - /** - * The cached size of the data array. - */ - totalData: number; - - /** - * If true then duration, delay, etc values are all frame totals, rather than ms. - */ - useFrames: boolean; - - /** - * Scales the time applied to this Timeline. A value of 1 runs in real-time. A value of 0.5 runs 50% slower, and so on. - * Value isn't used when calculating total duration of the Timeline, it's a run-time delta adjustment only. - */ - timeScale: number; - - /** - * Loop this Timeline? Can be -1 for an infinite loop, or an integer. - * When enabled it will play through ALL Tweens again (use Tween.repeat to loop a single tween) - */ - loop: number; - - /** - * Time in ms/frames before this Timeline loops. - */ - loopDelay: number; - - /** - * How many loops are left to run? - */ - loopCounter: number; - - /** - * Time in ms/frames before the 'onComplete' event fires. This never fires if loop = true (as it never completes) - */ - completeDelay: number; - - /** - * Countdown timer value, as used by `loopDelay` and `completeDelay`. - */ - countdown: number; - - /** - * The current state of the Timeline. - */ - state: integer; - - /** - * Does the Timeline start off paused? (if so it needs to be started with Timeline.play) - */ - paused: boolean; - - /** - * Elapsed time in ms/frames of this run through of the Timeline. - */ - elapsed: number; - - /** - * Total elapsed time in ms/frames of the entire Timeline, including looping. - */ - totalElapsed: number; - - /** - * Time in ms/frames for the whole Timeline to play through once, excluding loop amounts and loop delays. - */ - duration: number; - - /** - * Value between 0 and 1. The amount of progress through the Timeline, _excluding loops_. - */ - progress: number; - - /** - * Time in ms/frames for all Tweens in this Timeline to complete (including looping) - */ - totalDuration: number; - - /** - * Value between 0 and 1. The amount through the entire Timeline, including looping. - */ - totalProgress: number; - - /** - * An object containing the different Tween callback functions. - * - * You can either set these in the Tween config, or by calling the `Tween.setCallback` method. - * - * `onComplete` When the Timeline finishes playback fully or `Timeline.stop` is called. Never invoked if timeline is set to repeat infinitely. - * `onLoop` When a Timeline loops. - * `onStart` When the Timeline starts playing. - * `onUpdate` When a Timeline updates a child Tween. - * `onYoyo` When a Timeline starts a yoyo. - */ - callbacks: object; - - /** - * The context in which all callbacks are invoked. - */ - callbackScope: any; - - /** - * Internal method that will emit a Timeline based Event and invoke the given callback. - * @param event The Event to be dispatched. - * @param callback The callback to be invoked. Can be `null` or `undefined` to skip invocation. - */ - dispatchTimelineEvent(event: Phaser.Types.Tweens.Event, callback: Function): void; - - /** - * Sets the value of the time scale applied to this Timeline. A value of 1 runs in real-time. - * A value of 0.5 runs 50% slower, and so on. - * - * The value isn't used when calculating total duration of the tween, it's a run-time delta adjustment only. - * @param value The time scale value to set. - */ - setTimeScale(value: number): this; - - /** - * Gets the value of the time scale applied to this Timeline. A value of 1 runs in real-time. - * A value of 0.5 runs 50% slower, and so on. - */ - getTimeScale(): number; - - /** - * Check whether or not the Timeline is playing. - */ - isPlaying(): boolean; - - /** - * Creates a new Tween, based on the given Tween Config, and adds it to this Timeline. - * @param config The configuration object for the Tween. - */ - add(config: Phaser.Types.Tweens.TweenBuilderConfig | object): this; - - /** - * Adds an existing Tween to this Timeline. - * @param tween The Tween to be added to this Timeline. - */ - queue(tween: Phaser.Tweens.Tween): this; - - /** - * Checks whether a Tween has an offset value. - * @param tween The Tween to check. - */ - hasOffset(tween: Phaser.Tweens.Tween): boolean; - - /** - * Checks whether the offset value is a number or a directive that is relative to previous tweens. - * @param value The offset value to be evaluated. - */ - isOffsetAbsolute(value: number): boolean; - - /** - * Checks if the offset is a relative value rather than an absolute one. - * If the value is just a number, this returns false. - * @param value The offset value to be evaluated. - */ - isOffsetRelative(value: string): boolean; - - /** - * Parses the relative offset value, returning a positive or negative number. - * @param value The relative offset, in the format of '-=500', for example. The first character determines whether it will be a positive or negative number. Spacing matters here. - * @param base The value to use as the offset. - */ - getRelativeOffset(value: string, base: number): number; - - /** - * Calculates the total duration of the timeline. - * - * Computes all tween durations and returns the full duration of the timeline. - * - * The resulting number is stored in the timeline, not as a return value. - */ - calcDuration(): void; - - /** - * Initializes the timeline, which means all Tweens get their init() called, and the total duration will be computed. - * Returns a boolean indicating whether the timeline is auto-started or not. - */ - init(): boolean; - - /** - * Resets all of the timeline's tweens back to their initial states. - * The boolean parameter indicates whether tweens that are looping should reset as well, or not. - * @param resetFromLoop If `true`, resets all looping tweens to their initial values. - */ - resetTweens(resetFromLoop: boolean): void; - - /** - * Sets a callback for the Timeline. - * @param type The internal type of callback to set. - * @param callback Timeline allows multiple tweens to be linked together to create a streaming sequence. - * @param params The parameters to pass to the callback. - * @param scope The context scope of the callback. - */ - setCallback(type: string, callback: Function, params?: any[], scope?: object): this; - - /** - * Passed a Tween to the Tween Manager and requests it be made active. - * @param tween The tween object to make active. - */ - makeActive(tween: Phaser.Tweens.Tween): Phaser.Tweens.TweenManager; - - /** - * Starts playing the Timeline. - */ - play(): void; - - /** - * Updates the Timeline's `state` and fires callbacks and events. - */ - nextState(): void; - - /** - * Returns 'true' if this Timeline has finished and should be removed from the Tween Manager. - * Otherwise, returns false. - * @param timestamp The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. - * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. - */ - update(timestamp: number, delta: number): boolean; - - /** - * Stops the Timeline immediately, whatever stage of progress it is at and flags it for removal by the TweenManager. - */ - stop(): void; - - /** - * Pauses the Timeline, retaining its internal state. - * - * Calling this on a Timeline that is already paused has no effect and fires no event. - */ - pause(): this; - - /** - * Resumes a paused Timeline from where it was when it was paused. - * - * Calling this on a Timeline that isn't paused has no effect and fires no event. - */ - resume(): this; - - /** - * Checks if any of the Tweens in this Timeline as operating on the target object. - * - * Returns `false` if no Tweens operate on the target object. - * @param target The target to check all Tweens against. - */ - hasTarget(target: object): boolean; - - /** - * Stops all the Tweens in the Timeline immediately, whatever stage of progress they are at and flags - * them for removal by the TweenManager. - */ - destroy(): void; - - } - - /** - * TweenData state. - */ - var CREATED: integer; - - /** - * TweenData state. - */ - var INIT: integer; - - /** - * TweenData state. - */ - var DELAY: integer; - - /** - * TweenData state. - */ - var OFFSET_DELAY: integer; - - /** - * TweenData state. - */ - var PENDING_RENDER: integer; - - /** - * TweenData state. - */ - var PLAYING_FORWARD: integer; - - /** - * TweenData state. - */ - var PLAYING_BACKWARD: integer; - - /** - * TweenData state. - */ - var HOLD_DELAY: integer; - - /** - * TweenData state. - */ - var REPEAT_DELAY: integer; - - /** - * TweenData state. - */ - var COMPLETE: integer; - - /** - * Tween state. - */ - var PENDING_ADD: integer; - - /** - * Tween state. - */ - var PAUSED: integer; - - /** - * Tween state. - */ - var LOOP_DELAY: integer; - - /** - * Tween state. - */ - var ACTIVE: integer; - - /** - * Tween state. - */ - var COMPLETE_DELAY: integer; - - /** - * Tween state. - */ - var PENDING_REMOVE: integer; - - /** - * Tween state. - */ - var REMOVED: integer; - /** * A Tween is able to manipulate the properties of one or more objects to any given value, based * on a duration and type of ease. They are rarely instantiated directly and instead should be @@ -84779,206 +85588,101 @@ declare namespace Phaser { function TweenData(target: any, index: integer, key: string, getEnd: Function, getStart: Function, getActive: Function, ease: Function, delay: number, duration: number, yoyo: boolean, hold: number, repeat: number, repeatDelay: number, flipX: boolean, flipY: boolean): Phaser.Types.Tweens.TweenDataConfig; /** - * The Tween Manager is a default Scene Plugin which controls and updates Tweens and Timelines. + * TweenData state. */ - class TweenManager { - /** - * - * @param scene The Scene which owns this Tween Manager. - */ - constructor(scene: Phaser.Scene); + var CREATED: integer; - /** - * The Scene which owns this Tween Manager. - */ - scene: Phaser.Scene; + /** + * TweenData state. + */ + var INIT: integer; - /** - * The Systems object of the Scene which owns this Tween Manager. - */ - systems: Phaser.Scenes.Systems; + /** + * TweenData state. + */ + var DELAY: integer; - /** - * The time scale of the Tween Manager. - * - * This value scales the time delta between two frames, thus influencing the speed of time for all Tweens owned by this Tween Manager. - */ - timeScale: number; + /** + * TweenData state. + */ + var OFFSET_DELAY: integer; - /** - * Create a Tween Timeline and return it, but do NOT add it to the active or pending Tween lists. - * @param config The configuration object for the Timeline and its Tweens. - */ - createTimeline(config?: Phaser.Types.Tweens.TimelineBuilderConfig): Phaser.Tweens.Timeline; + /** + * TweenData state. + */ + var PENDING_RENDER: integer; - /** - * Create a Tween Timeline and add it to the active Tween list/ - * @param config The configuration object for the Timeline and its Tweens. - */ - timeline(config?: Phaser.Types.Tweens.TimelineBuilderConfig): Phaser.Tweens.Timeline; + /** + * TweenData state. + */ + var PLAYING_FORWARD: integer; - /** - * Create a Tween and return it, but do NOT add it to the active or pending Tween lists. - * @param config The configuration object for the Tween. - */ - create(config: Phaser.Types.Tweens.TweenBuilderConfig | object): Phaser.Tweens.Tween; + /** + * TweenData state. + */ + var PLAYING_BACKWARD: integer; - /** - * Create a Tween and add it to the active Tween list. - * @param config The configuration object for the Tween. - */ - add(config: Phaser.Types.Tweens.TweenBuilderConfig | object): Phaser.Tweens.Tween; + /** + * TweenData state. + */ + var HOLD_DELAY: integer; - /** - * Add an existing tween into the active Tween list. - * @param tween The Tween to add. - */ - existing(tween: Phaser.Tweens.Tween): Phaser.Tweens.TweenManager; + /** + * TweenData state. + */ + var REPEAT_DELAY: integer; - /** - * Create a Number Tween and add it to the active Tween list. - * @param config The configuration object for the Number Tween. - */ - addCounter(config: Phaser.Types.Tweens.NumberTweenBuilderConfig): Phaser.Tweens.Tween; + /** + * TweenData state. + */ + var COMPLETE: integer; - /** - * Creates a Stagger function to be used by a Tween property. - * - * The stagger function will allow you to stagger changes to the value of the property across all targets of the tween. - * - * This is only worth using if the tween has multiple targets. - * - * The following will stagger the delay by 100ms across all targets of the tween, causing them to scale down to 0.2 - * over the duration specified: - * - * ```javascript - * this.tweens.add({ - * targets: [ ... ], - * scale: 0.2, - * ease: 'linear', - * duration: 1000, - * delay: this.tweens.stagger(100) - * }); - * ``` - * - * The following will stagger the delay by 500ms across all targets of the tween using a 10 x 6 grid, staggering - * from the center out, using a cubic ease. - * - * ```javascript - * this.tweens.add({ - * targets: [ ... ], - * scale: 0.2, - * ease: 'linear', - * duration: 1000, - * delay: this.tweens.stagger(500, { grid: [ 10, 6 ], from: 'center', ease: 'cubic.out' }) - * }); - * ``` - * @param config The configuration object for the Stagger function. - */ - stagger(config: Phaser.Types.Tweens.StaggerConfig): Function; + /** + * Tween state. + */ + var PENDING_ADD: integer; - /** - * Updates the Tween Manager's internal lists at the start of the frame. - * - * This method will return immediately if no changes have been indicated. - */ - preUpdate(): void; + /** + * Tween state. + */ + var PAUSED: integer; - /** - * Updates all Tweens and Timelines of the Tween Manager. - * @param timestamp The current time in milliseconds. - * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. - */ - update(timestamp: number, delta: number): void; + /** + * Tween state. + */ + var LOOP_DELAY: integer; - /** - * Removes the given tween from the Tween Manager, regardless of its state (pending or active). - * @param tween The Tween to be removed. - */ - remove(tween: Phaser.Tweens.Tween): Phaser.Tweens.TweenManager; + /** + * Tween state. + */ + var ACTIVE: integer; - /** - * Checks if a Tween or Timeline is active and adds it to the Tween Manager at the start of the frame if it isn't. - * @param tween The Tween to check. - */ - makeActive(tween: Phaser.Tweens.Tween): Phaser.Tweens.TweenManager; + /** + * Tween state. + */ + var COMPLETE_DELAY: integer; - /** - * Passes all Tweens to the given callback. - * @param callback The function to call. - * @param scope The scope (`this` object) to call the function with. - * @param args The arguments to pass into the function. Its first argument will always be the Tween currently being iterated. - */ - each(callback: Function, scope?: object, ...args: any[]): void; + /** + * Tween state. + */ + var PENDING_REMOVE: integer; - /** - * Returns an array of all active Tweens and Timelines in the Tween Manager. - */ - getAllTweens(): Phaser.Tweens.Tween[]; - - /** - * Returns the scale of the time delta for all Tweens and Timelines owned by this Tween Manager. - */ - getGlobalTimeScale(): number; - - /** - * Returns an array of all Tweens or Timelines in the Tween Manager which affect the given target or array of targets. - * @param target The target to look for. Provide an array to look for multiple targets. - */ - getTweensOf(target: object | any[]): Phaser.Tweens.Tween[]; - - /** - * Checks if the given object is being affected by a playing Tween. - * @param target target Phaser.Tweens.Tween object - */ - isTweening(target: object): boolean; - - /** - * Stops all Tweens in this Tween Manager. They will be removed at the start of the frame. - */ - killAll(): Phaser.Tweens.TweenManager; - - /** - * Stops all Tweens which affect the given target or array of targets. The Tweens will be removed from the Tween Manager at the start of the frame. - * @param target The target to look for. Provide an array to look for multiple targets. - */ - killTweensOf(target: object | any[]): Phaser.Tweens.TweenManager; - - /** - * Pauses all Tweens in this Tween Manager. - */ - pauseAll(): Phaser.Tweens.TweenManager; - - /** - * Resumes all Tweens in this Tween Manager. - */ - resumeAll(): Phaser.Tweens.TweenManager; - - /** - * Sets a new scale of the time delta for this Tween Manager. - * - * The time delta is the time elapsed between two consecutive frames and influences the speed of time for this Tween Manager and all Tweens it owns. Values higher than 1 increase the speed of time, while values smaller than 1 decrease it. A value of 0 freezes time and is effectively equivalent to pausing all Tweens. - * @param value The new scale of the time delta, where 1 is the normal speed. - */ - setGlobalTimeScale(value: number): Phaser.Tweens.TweenManager; - - /** - * The Scene that owns this plugin is shutting down. - * We need to kill and reset all internal properties as well as stop listening to Scene events. - */ - shutdown(): void; - - /** - * The Scene that owns this plugin is being destroyed. - * We need to shutdown and then kill off all external references. - */ - destroy(): void; - - } + /** + * Tween state. + */ + var REMOVED: integer; } namespace Utils { + /** + * A NOOP (No Operation) callback function. + * + * Used internally by Phaser when it's more expensive to determine if a callback exists + * than it is to just invoke an empty function. + */ + function NOOP(): void; + namespace Array { /** * Adds the given item, or array of items, to the array. @@ -85113,84 +85817,6 @@ declare namespace Phaser { */ function GetRandom(array: any[], startIndex?: integer, length?: integer): any; - namespace Matrix { - /** - * Checks if an array can be used as a matrix. - * - * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows) have the same length. There must be at least two rows: - * - * ``` - * [ - * [ 1, 1, 1, 1, 1, 1 ], - * [ 2, 0, 0, 0, 0, 4 ], - * [ 2, 0, 1, 2, 0, 4 ], - * [ 2, 0, 3, 4, 0, 4 ], - * [ 2, 0, 0, 0, 0, 4 ], - * [ 3, 3, 3, 3, 3, 3 ] - * ] - * ``` - * @param matrix The array to check. - */ - function CheckMatrix(matrix?: T[][]): boolean; - - /** - * Generates a string (which you can pass to console.log) from the given Array Matrix. - * @param matrix A 2-dimensional array. - */ - function MatrixToString(matrix?: T[][]): string; - - /** - * Reverses the columns in the given Array Matrix. - * @param matrix The array matrix to reverse the columns for. - */ - function ReverseColumns(matrix?: T[][]): T[][]; - - /** - * Reverses the rows in the given Array Matrix. - * @param matrix The array matrix to reverse the rows for. - */ - function ReverseRows(matrix?: T[][]): T[][]; - - /** - * Rotates the array matrix 180 degrees. - * @param matrix The array to rotate. - */ - function Rotate180(matrix?: T[][]): T[][]; - - /** - * Rotates the array matrix to the left (or 90 degrees) - * @param matrix The array to rotate. - */ - function RotateLeft(matrix?: T[][]): T[][]; - - /** - * Rotates the array matrix based on the given rotation value. - * - * The value can be given in degrees: 90, -90, 270, -270 or 180, - * or a string command: `rotateLeft`, `rotateRight` or `rotate180`. - * - * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}. - * @param matrix The array to rotate. - * @param direction The amount to rotate the matrix by. Default 90. - */ - function RotateMatrix(matrix?: T[][], direction?: number | string): T[][]; - - /** - * Rotates the array matrix to the left (or -90 degrees) - * @param matrix The array to rotate. - */ - function RotateRight(matrix?: T[][]): T[][]; - - /** - * Transposes the elements of the given matrix (array of arrays). - * - * The transpose of a matrix is a new matrix whose rows are the columns of the original. - * @param array The array matrix to transpose. - */ - function TransposeMatrix(array?: T[][]): T[][]; - - } - /** * Moves the given array element down one place in the array. * The array is modified in-place. @@ -85417,7 +86043,7 @@ declare namespace Phaser { * The original array is modified directly and returned. * @param array The array to shuffle. This array is modified in place. */ - function Shuffle(array: any[]): any[]; + function Shuffle(array: T[]): T[]; /** * Removes a single item from an array and returns it without creating gc, like the native splice does. @@ -85455,6 +86081,84 @@ declare namespace Phaser { */ function Swap(array: any[], item1: any, item2: any): any[]; + namespace Matrix { + /** + * Checks if an array can be used as a matrix. + * + * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows) have the same length. There must be at least two rows: + * + * ``` + * [ + * [ 1, 1, 1, 1, 1, 1 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 2, 0, 1, 2, 0, 4 ], + * [ 2, 0, 3, 4, 0, 4 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 3, 3, 3, 3, 3, 3 ] + * ] + * ``` + * @param matrix The array to check. + */ + function CheckMatrix(matrix?: T[][]): boolean; + + /** + * Generates a string (which you can pass to console.log) from the given Array Matrix. + * @param matrix A 2-dimensional array. + */ + function MatrixToString(matrix?: T[][]): string; + + /** + * Reverses the columns in the given Array Matrix. + * @param matrix The array matrix to reverse the columns for. + */ + function ReverseColumns(matrix?: T[][]): T[][]; + + /** + * Reverses the rows in the given Array Matrix. + * @param matrix The array matrix to reverse the rows for. + */ + function ReverseRows(matrix?: T[][]): T[][]; + + /** + * Rotates the array matrix 180 degrees. + * @param matrix The array to rotate. + */ + function Rotate180(matrix?: T[][]): T[][]; + + /** + * Rotates the array matrix to the left (or 90 degrees) + * @param matrix The array to rotate. + */ + function RotateLeft(matrix?: T[][]): T[][]; + + /** + * Rotates the array matrix based on the given rotation value. + * + * The value can be given in degrees: 90, -90, 270, -270 or 180, + * or a string command: `rotateLeft`, `rotateRight` or `rotate180`. + * + * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}. + * @param matrix The array to rotate. + * @param direction The amount to rotate the matrix by. Default 90. + */ + function RotateMatrix(matrix?: T[][], direction?: number | string): T[][]; + + /** + * Rotates the array matrix to the left (or -90 degrees) + * @param matrix The array to rotate. + */ + function RotateRight(matrix?: T[][]): T[][]; + + /** + * Transposes the elements of the given matrix (array of arrays). + * + * The transpose of a matrix is a new matrix whose rows are the columns of the original. + * @param array The array matrix to transpose. + */ + function TransposeMatrix(array?: T[][]): T[][]; + + } + } namespace Base64 { @@ -85477,14 +86181,6 @@ declare namespace Phaser { } - /** - * A NOOP (No Operation) callback function. - * - * Used internally by Phaser when it's more expensive to determine if a callback exists - * than it is to just invoke an empty function. - */ - function NOOP(): void; - namespace Objects { /** * Shallow Object Clone. Will not clone nested objects. @@ -85685,12 +86381,6 @@ declare namespace Phaser { */ function Reverse(string: string): string; - /** - * Capitalizes the first letter of a string if there is one. - * @param str The string to capitalize. - */ - function UppercaseFirst(str: string): string; - /** * Creates and returns an RFC4122 version 4 compliant UUID. * @@ -85699,6 +86389,12 @@ declare namespace Phaser { */ function UUID(): string; + /** + * Capitalizes the first letter of a string if there is one. + * @param str The string to capitalize. + */ + function UppercaseFirst(str: string): string; + } } @@ -86670,14 +87366,14 @@ declare type EachSetCallback = (entry: E, index: number)=>void; declare type EachTextureCallback = (texture: Phaser.Textures.Texture, ...args: any[])=>void; -declare type FindTileCallback = (value: Phaser.Tilemaps.Tile, index: integer, array: Phaser.Tilemaps.Tile[])=>void; - -declare type EachTileCallback = (value: Phaser.Tilemaps.Tile, index: integer, array: Phaser.Tilemaps.Tile[])=>void; - declare type TilemapFilterCallback = (value: Phaser.GameObjects.GameObject, index: number, array: Phaser.GameObjects.GameObject[])=>void; declare type TilemapFindCallback = (value: Phaser.GameObjects.GameObject, index: number, array: Phaser.GameObjects.GameObject[])=>void; +declare type FindTileCallback = (value: Phaser.Tilemaps.Tile, index: integer, array: Phaser.Tilemaps.Tile[])=>void; + +declare type EachTileCallback = (value: Phaser.Tilemaps.Tile, index: integer, array: Phaser.Tilemaps.Tile[])=>void; + /** * Extends the given `myClass` object's prototype with the properties of `definition`. * @param ctor The constructor object to mix into. From a794c16361864385459145b57b40bcaf2f848f78 Mon Sep 17 00:00:00 2001 From: Chnapy Date: Thu, 2 Jan 2020 20:23:10 +0100 Subject: [PATCH 025/189] improve typings: GenerateFrameNames --- src/animations/typedefs/GenerateFrameNames.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/animations/typedefs/GenerateFrameNames.js b/src/animations/typedefs/GenerateFrameNames.js index 56dfdf3a0..2c9e28627 100644 --- a/src/animations/typedefs/GenerateFrameNames.js +++ b/src/animations/typedefs/GenerateFrameNames.js @@ -8,5 +8,5 @@ * @property {string} [suffix=''] - The string to append to every resulting frame name if using a range or an array of `frames`. * @property {integer} [zeroPad=0] - The minimum expected lengths of each resulting frame's number. Numbers will be left-padded with zeroes until they are this long, then prepended and appended to create the resulting frame name. * @property {Phaser.Types.Animations.AnimationFrame[]} [outputArray=[]] - The array to append the created configuration objects to. - * @property {boolean} [frames=false] - If provided as an array, the range defined by `start` and `end` will be ignored and these frame numbers will be used. + * @property {(boolean|integer[])} [frames=false] - If provided as an array, the range defined by `start` and `end` will be ignored and these frame numbers will be used. */ From 74c5a373e88c2a4835ef8724d5792d318a0464ab Mon Sep 17 00:00:00 2001 From: Chnapy Date: Thu, 2 Jan 2020 21:07:42 +0100 Subject: [PATCH 026/189] upgrade dts-dom 3.2->3.3 --- package-lock.json | 1111 ++++++++++++++++++++++++++++++--------------- package.json | 2 +- 2 files changed, 749 insertions(+), 364 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9e25385c4..d941eb502 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "phaser", - "version": "3.20.2-beta1", + "version": "3.22.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -11,175 +11,179 @@ "dev": true }, "@webassemblyjs/ast": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.7.10.tgz", - "integrity": "sha512-wTUeaByYN2EA6qVqhbgavtGc7fLTOx0glG2IBsFlrFG51uXIGlYBTyIZMf4SPLo3v1bgV/7lBN3l7Z0R6Hswew==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.8.5.tgz", + "integrity": "sha512-aJMfngIZ65+t71C3y2nBBg5FFG0Okt9m0XEgWZ7Ywgn1oMAT8cNwx00Uv1cQyHtidq0Xn94R4TAywO+LCQ+ZAQ==", "dev": true, "requires": { - "@webassemblyjs/helper-module-context": "1.7.10", - "@webassemblyjs/helper-wasm-bytecode": "1.7.10", - "@webassemblyjs/wast-parser": "1.7.10" + "@webassemblyjs/helper-module-context": "1.8.5", + "@webassemblyjs/helper-wasm-bytecode": "1.8.5", + "@webassemblyjs/wast-parser": "1.8.5" } }, "@webassemblyjs/floating-point-hex-parser": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.7.10.tgz", - "integrity": "sha512-gMsGbI6I3p/P1xL2UxqhNh1ga2HCsx5VBB2i5VvJFAaqAjd2PBTRULc3BpTydabUQEGlaZCzEUQhLoLG7TvEYQ==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.8.5.tgz", + "integrity": "sha512-9p+79WHru1oqBh9ewP9zW95E3XAo+90oth7S5Re3eQnECGq59ly1Ri5tsIipKGpiStHsUYmY3zMLqtk3gTcOtQ==", "dev": true }, "@webassemblyjs/helper-api-error": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.7.10.tgz", - "integrity": "sha512-DoYRlPWtuw3yd5BOr9XhtrmB6X1enYF0/54yNvQWGXZEPDF5PJVNI7zQ7gkcKfTESzp8bIBWailaFXEK/jjCsw==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.8.5.tgz", + "integrity": "sha512-Za/tnzsvnqdaSPOUXHyKJ2XI7PDX64kWtURyGiJJZKVEdFOsdKUCPTNEVFZq3zJ2R0G5wc2PZ5gvdTRFgm81zA==", "dev": true }, "@webassemblyjs/helper-buffer": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.7.10.tgz", - "integrity": "sha512-+RMU3dt/dPh4EpVX4u5jxsOlw22tp3zjqE0m3ftU2tsYxnPULb4cyHlgaNd2KoWuwasCQqn8Mhr+TTdbtj3LlA==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.8.5.tgz", + "integrity": "sha512-Ri2R8nOS0U6G49Q86goFIPNgjyl6+oE1abW1pS84BuhP1Qcr5JqMwRFT3Ah3ADDDYGEgGs1iyb1DGX+kAi/c/Q==", "dev": true }, "@webassemblyjs/helper-code-frame": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.7.10.tgz", - "integrity": "sha512-UiytbpKAULOEab2hUZK2ywXen4gWJVrgxtwY3Kn+eZaaSWaRM8z/7dAXRSoamhKFiBh1uaqxzE/XD9BLlug3gw==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.8.5.tgz", + "integrity": "sha512-VQAadSubZIhNpH46IR3yWO4kZZjMxN1opDrzePLdVKAZ+DFjkGD/rf4v1jap744uPVU6yjL/smZbRIIJTOUnKQ==", "dev": true, "requires": { - "@webassemblyjs/wast-printer": "1.7.10" + "@webassemblyjs/wast-printer": "1.8.5" } }, "@webassemblyjs/helper-fsm": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.7.10.tgz", - "integrity": "sha512-w2vDtUK9xeSRtt5+RnnlRCI7wHEvLjF0XdnxJpgx+LJOvklTZPqWkuy/NhwHSLP19sm9H8dWxKeReMR7sCkGZA==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.8.5.tgz", + "integrity": "sha512-kRuX/saORcg8se/ft6Q2UbRpZwP4y7YrWsLXPbbmtepKr22i8Z4O3V5QE9DbZK908dh5Xya4Un57SDIKwB9eow==", "dev": true }, "@webassemblyjs/helper-module-context": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.7.10.tgz", - "integrity": "sha512-yE5x/LzZ3XdPdREmJijxzfrf+BDRewvO0zl8kvORgSWmxpRrkqY39KZSq6TSgIWBxkK4SrzlS3BsMCv2s1FpsQ==", - "dev": true + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.8.5.tgz", + "integrity": "sha512-/O1B236mN7UNEU4t9X7Pj38i4VoU8CcMHyy3l2cV/kIF4U5KoHXDVqcDuOs1ltkac90IM4vZdHc52t1x8Yfs3g==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.8.5", + "mamacro": "^0.0.3" + } }, "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.7.10.tgz", - "integrity": "sha512-u5qy4SJ/OrxKxZqJ9N3qH4ZQgHaAzsopsYwLvoWJY6Q33r8PhT3VPyNMaJ7ZFoqzBnZlCcS/0f4Sp8WBxylXfg==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.8.5.tgz", + "integrity": "sha512-Cu4YMYG3Ddl72CbmpjU/wbP6SACcOPVbHN1dI4VJNJVgFwaKf1ppeFJrwydOG3NDHxVGuCfPlLZNyEdIYlQ6QQ==", "dev": true }, "@webassemblyjs/helper-wasm-section": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.7.10.tgz", - "integrity": "sha512-Ecvww6sCkcjatcyctUrn22neSJHLN/TTzolMGG/N7S9rpbsTZ8c6Bl98GpSpV77EvzNijiNRHBG0+JO99qKz6g==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.8.5.tgz", + "integrity": "sha512-VV083zwR+VTrIWWtgIUpqfvVdK4ff38loRmrdDBgBT8ADXYsEZ5mPQ4Nde90N3UYatHdYoDIFb7oHzMncI02tA==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.10", - "@webassemblyjs/helper-buffer": "1.7.10", - "@webassemblyjs/helper-wasm-bytecode": "1.7.10", - "@webassemblyjs/wasm-gen": "1.7.10" + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-buffer": "1.8.5", + "@webassemblyjs/helper-wasm-bytecode": "1.8.5", + "@webassemblyjs/wasm-gen": "1.8.5" } }, "@webassemblyjs/ieee754": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.7.10.tgz", - "integrity": "sha512-HRcWcY+YWt4+s/CvQn+vnSPfRaD4KkuzQFt5MNaELXXHSjelHlSEA8ZcqT69q0GTIuLWZ6JaoKar4yWHVpZHsQ==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.8.5.tgz", + "integrity": "sha512-aaCvQYrvKbY/n6wKHb/ylAJr27GglahUO89CcGXMItrOBqRarUMxWLJgxm9PJNuKULwN5n1csT9bYoMeZOGF3g==", "dev": true, "requires": { "@xtuc/ieee754": "^1.2.0" } }, "@webassemblyjs/leb128": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.7.10.tgz", - "integrity": "sha512-og8MciYlA8hvzCLR71hCuZKPbVBfLQeHv7ImKZ4nlyxrYbG7uJHYtHiHu6OV9SqrGuD03H/HtXC4Bgdjfm9FHw==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.8.5.tgz", + "integrity": "sha512-plYUuUwleLIziknvlP8VpTgO4kqNaH57Y3JnNa6DLpu/sGcP6hbVdfdX5aHAV716pQBKrfuU26BJK29qY37J7A==", "dev": true, "requires": { - "@xtuc/long": "4.2.1" + "@xtuc/long": "4.2.2" } }, "@webassemblyjs/utf8": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.7.10.tgz", - "integrity": "sha512-Ng6Pxv6siyZp635xCSnH3mKmIFgqWPCcGdoo0GBYgyGdxu7cUj4agV7Uu1a8REP66UYUFXJLudeGgd4RvuJAnQ==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.8.5.tgz", + "integrity": "sha512-U7zgftmQriw37tfD934UNInokz6yTmn29inT2cAetAsaU9YeVCveWEwhKL1Mg4yS7q//NGdzy79nlXh3bT8Kjw==", "dev": true }, "@webassemblyjs/wasm-edit": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.7.10.tgz", - "integrity": "sha512-e9RZFQlb+ZuYcKRcW9yl+mqX/Ycj9+3/+ppDI8nEE/NCY6FoK8f3dKBcfubYV/HZn44b+ND4hjh+4BYBt+sDnA==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.8.5.tgz", + "integrity": "sha512-A41EMy8MWw5yvqj7MQzkDjU29K7UJq1VrX2vWLzfpRHt3ISftOXqrtojn7nlPsZ9Ijhp5NwuODuycSvfAO/26Q==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.10", - "@webassemblyjs/helper-buffer": "1.7.10", - "@webassemblyjs/helper-wasm-bytecode": "1.7.10", - "@webassemblyjs/helper-wasm-section": "1.7.10", - "@webassemblyjs/wasm-gen": "1.7.10", - "@webassemblyjs/wasm-opt": "1.7.10", - "@webassemblyjs/wasm-parser": "1.7.10", - "@webassemblyjs/wast-printer": "1.7.10" + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-buffer": "1.8.5", + "@webassemblyjs/helper-wasm-bytecode": "1.8.5", + "@webassemblyjs/helper-wasm-section": "1.8.5", + "@webassemblyjs/wasm-gen": "1.8.5", + "@webassemblyjs/wasm-opt": "1.8.5", + "@webassemblyjs/wasm-parser": "1.8.5", + "@webassemblyjs/wast-printer": "1.8.5" } }, "@webassemblyjs/wasm-gen": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.7.10.tgz", - "integrity": "sha512-M0lb6cO2Y0PzDye/L39PqwV+jvO+2YxEG5ax+7dgq7EwXdAlpOMx1jxyXJTScQoeTpzOPIb+fLgX/IkLF8h2yw==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.8.5.tgz", + "integrity": "sha512-BCZBT0LURC0CXDzj5FXSc2FPTsxwp3nWcqXQdOZE4U7h7i8FqtFK5Egia6f9raQLpEKT1VL7zr4r3+QX6zArWg==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.10", - "@webassemblyjs/helper-wasm-bytecode": "1.7.10", - "@webassemblyjs/ieee754": "1.7.10", - "@webassemblyjs/leb128": "1.7.10", - "@webassemblyjs/utf8": "1.7.10" + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-wasm-bytecode": "1.8.5", + "@webassemblyjs/ieee754": "1.8.5", + "@webassemblyjs/leb128": "1.8.5", + "@webassemblyjs/utf8": "1.8.5" } }, "@webassemblyjs/wasm-opt": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.7.10.tgz", - "integrity": "sha512-R66IHGCdicgF5ZliN10yn5HaC7vwYAqrSVJGjtJJQp5+QNPBye6heWdVH/at40uh0uoaDN/UVUfXK0gvuUqtVg==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.8.5.tgz", + "integrity": "sha512-HKo2mO/Uh9A6ojzu7cjslGaHaUU14LdLbGEKqTR7PBKwT6LdPtLLh9fPY33rmr5wcOMrsWDbbdCHq4hQUdd37Q==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.10", - "@webassemblyjs/helper-buffer": "1.7.10", - "@webassemblyjs/wasm-gen": "1.7.10", - "@webassemblyjs/wasm-parser": "1.7.10" + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-buffer": "1.8.5", + "@webassemblyjs/wasm-gen": "1.8.5", + "@webassemblyjs/wasm-parser": "1.8.5" } }, "@webassemblyjs/wasm-parser": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.7.10.tgz", - "integrity": "sha512-AEv8mkXVK63n/iDR3T693EzoGPnNAwKwT3iHmKJNBrrALAhhEjuPzo/lTE4U7LquEwyvg5nneSNdTdgrBaGJcA==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.8.5.tgz", + "integrity": "sha512-pi0SYE9T6tfcMkthwcgCpL0cM9nRYr6/6fjgDtL6q/ZqKHdMWvxitRi5JcZ7RI4SNJJYnYNaWy5UUrHQy998lw==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.10", - "@webassemblyjs/helper-api-error": "1.7.10", - "@webassemblyjs/helper-wasm-bytecode": "1.7.10", - "@webassemblyjs/ieee754": "1.7.10", - "@webassemblyjs/leb128": "1.7.10", - "@webassemblyjs/utf8": "1.7.10" + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-api-error": "1.8.5", + "@webassemblyjs/helper-wasm-bytecode": "1.8.5", + "@webassemblyjs/ieee754": "1.8.5", + "@webassemblyjs/leb128": "1.8.5", + "@webassemblyjs/utf8": "1.8.5" } }, "@webassemblyjs/wast-parser": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.7.10.tgz", - "integrity": "sha512-YTPEtOBljkCL0VjDp4sHe22dAYSm3ZwdJ9+2NTGdtC7ayNvuip1wAhaAS8Zt9Q6SW9E5Jf5PX7YE3XWlrzR9cw==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.8.5.tgz", + "integrity": "sha512-daXC1FyKWHF1i11obK086QRlsMsY4+tIOKgBqI1lxAnkp9xe9YMcgOxm9kLe+ttjs5aWV2KKE1TWJCN57/Btsg==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.10", - "@webassemblyjs/floating-point-hex-parser": "1.7.10", - "@webassemblyjs/helper-api-error": "1.7.10", - "@webassemblyjs/helper-code-frame": "1.7.10", - "@webassemblyjs/helper-fsm": "1.7.10", - "@xtuc/long": "4.2.1" + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/floating-point-hex-parser": "1.8.5", + "@webassemblyjs/helper-api-error": "1.8.5", + "@webassemblyjs/helper-code-frame": "1.8.5", + "@webassemblyjs/helper-fsm": "1.8.5", + "@xtuc/long": "4.2.2" } }, "@webassemblyjs/wast-printer": { - "version": "1.7.10", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.7.10.tgz", - "integrity": "sha512-mJ3QKWtCchL1vhU/kZlJnLPuQZnlDOdZsyP0bbLWPGdYsQDnSBvyTLhzwBA3QAMlzEL9V4JHygEmK6/OTEyytA==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.8.5.tgz", + "integrity": "sha512-w0U0pD4EhlnvRyeJzBqaVSJAo9w/ce7/WPogeXLzGkO6hzhr4GnQIZ4W4uUt5b9ooAaXPtnXlj0gzsXEOUNYMg==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.10", - "@webassemblyjs/wast-parser": "1.7.10", - "@xtuc/long": "4.2.1" + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/wast-parser": "1.8.5", + "@xtuc/long": "4.2.2" } }, "@xtuc/ieee754": { @@ -189,9 +193,9 @@ "dev": true }, "@xtuc/long": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.1.tgz", - "integrity": "sha512-FZdkNBDqBRHKQ2MEbSC17xnPFOhZxeJ2YGSfr2BKf3sujG49Qe3bB+rGCwQfIaA7WHnGeGkSijX4FuBCdrzW/g==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", "dev": true }, "acorn": { @@ -200,15 +204,6 @@ "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==", "dev": true }, - "acorn-dynamic-import": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", - "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", - "dev": true, - "requires": { - "acorn": "^5.0.0" - } - }, "acorn-jsx": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", @@ -238,6 +233,12 @@ "json-schema-traverse": "^0.3.0" } }, + "ajv-errors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", + "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", + "dev": true + }, "ajv-keywords": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", @@ -270,6 +271,17 @@ "requires": { "micromatch": "^3.1.4", "normalize-path": "^2.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } } }, "aproba": { @@ -350,11 +362,12 @@ } }, "assert": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", - "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", + "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", "dev": true, "requires": { + "object-assign": "^4.1.1", "util": "0.10.3" }, "dependencies": { @@ -382,15 +395,15 @@ "dev": true }, "async-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", - "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", "dev": true }, "atob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.1.tgz", - "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", "dev": true }, "babel-code-frame": { @@ -490,9 +503,9 @@ } }, "base64-js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", + "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==", "dev": true }, "big.js": { @@ -501,11 +514,21 @@ "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==" }, "binary-extensions": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.12.0.tgz", - "integrity": "sha512-DYWGk01lDcxeS/K9IHPGWfT8PsJmbXRtRd2Sx72Tnb8pcYZQFF1oSDb8hJtS1vhp212q1Rzi5dUf9+nq0o9UIg==", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", "dev": true }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "optional": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, "bluebird": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.2.tgz", @@ -601,9 +624,9 @@ }, "dependencies": { "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", + "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", "dev": true } } @@ -643,9 +666,9 @@ } }, "buffer": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", - "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", "dev": true, "requires": { "base64-js": "^1.0.2", @@ -777,24 +800,23 @@ "dev": true }, "chokidar": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", - "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", "dev": true, "requires": { "anymatch": "^2.0.0", - "async-each": "^1.0.0", - "braces": "^2.3.0", - "fsevents": "^1.2.2", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", "glob-parent": "^3.1.0", - "inherits": "^2.0.1", + "inherits": "^2.0.3", "is-binary-path": "^1.0.0", "is-glob": "^4.0.0", - "lodash.debounce": "^4.0.8", - "normalize-path": "^2.1.1", + "normalize-path": "^3.0.0", "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0", - "upath": "^1.0.5" + "readdirp": "^2.2.1", + "upath": "^1.1.1" } }, "chownr": { @@ -804,9 +826,9 @@ "dev": true }, "chrome-trace-event": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.0.tgz", - "integrity": "sha512-xDbVgyfDTT2piup/h8dK/y4QZfJRSa73bw1WZ8b4XM1o7fsFubUVGYcE+1ANtOzJJELGpYoG2961z0Z6OAld9A==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz", + "integrity": "sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ==", "dev": true, "requires": { "tslib": "^1.9.0" @@ -936,9 +958,9 @@ "dev": true }, "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", "dev": true }, "concat-map": { @@ -960,13 +982,10 @@ } }, "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "dev": true, - "requires": { - "date-now": "^0.1.4" - } + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", + "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", + "dev": true }, "constants-browserify": { "version": "1.0.0", @@ -1073,12 +1092,6 @@ "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", "dev": true }, - "date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", - "dev": true - }, "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", @@ -1166,9 +1179,9 @@ } }, "des.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", - "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", "dev": true, "requires": { "inherits": "^2.0.1", @@ -1202,9 +1215,9 @@ "dev": true }, "dts-dom": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/dts-dom/-/dts-dom-3.2.0.tgz", - "integrity": "sha512-M3PfyWqmL/5gEvz8PoogzOhk8UA/WaSUt2B0qS4PdZRMTZnjxlvSqh9AVNsZJflvPK8qjjPb0m1d/alGiYlk3w==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/dts-dom/-/dts-dom-3.5.0.tgz", + "integrity": "sha512-73WTIRTIgcvd44QNfNKi9Flh9JAFSLY4hknv/tGD8V6W91EsbMpsSu+kuG9ShsHzG79sHY/iWo2QR2PJTIxLZQ==", "dev": true }, "duplexify": { @@ -1220,9 +1233,9 @@ } }, "elliptic": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", - "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", + "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", "dev": true, "requires": { "bn.js": "^4.4.0", @@ -1400,9 +1413,9 @@ "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==" }, "events": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", + "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==", "dev": true }, "evp_bytestokey": { @@ -1620,6 +1633,12 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, + "figgy-pudding": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz", + "integrity": "sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==", + "dev": true + }, "figures": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", @@ -1639,6 +1658,13 @@ "object-assign": "^4.0.1" } }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "optional": true + }, "fill-range": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", @@ -1759,14 +1785,15 @@ "dev": true }, "fsevents": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", - "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==", + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.11.tgz", + "integrity": "sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw==", "dev": true, "optional": true, "requires": { + "bindings": "^1.5.0", "nan": "^2.12.1", - "node-pre-gyp": "^0.12.0" + "node-pre-gyp": "*" }, "dependencies": { "abbrev": { @@ -1778,8 +1805,7 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "aproba": { "version": "1.2.0", @@ -1800,21 +1826,19 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "chownr": { - "version": "1.1.1", + "version": "1.1.3", "bundled": true, "dev": true, "optional": true @@ -1822,20 +1846,17 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -1844,7 +1865,7 @@ "optional": true }, "debug": { - "version": "4.1.1", + "version": "3.2.6", "bundled": true, "dev": true, "optional": true, @@ -1871,12 +1892,12 @@ "optional": true }, "fs-minipass": { - "version": "1.2.5", + "version": "1.2.7", "bundled": true, "dev": true, "optional": true, "requires": { - "minipass": "^2.2.1" + "minipass": "^2.6.0" } }, "fs.realpath": { @@ -1902,7 +1923,7 @@ } }, "glob": { - "version": "7.1.3", + "version": "7.1.6", "bundled": true, "dev": true, "optional": true, @@ -1931,7 +1952,7 @@ } }, "ignore-walk": { - "version": "3.0.1", + "version": "3.0.3", "bundled": true, "dev": true, "optional": true, @@ -1950,10 +1971,9 @@ } }, "inherits": { - "version": "2.0.3", + "version": "2.0.4", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -1965,7 +1985,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -1980,7 +1999,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -1988,56 +2006,53 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "minipass": { - "version": "2.3.5", + "version": "2.9.0", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" } }, "minizlib": { - "version": "1.2.1", + "version": "1.3.3", "bundled": true, "dev": true, "optional": true, "requires": { - "minipass": "^2.2.1" + "minipass": "^2.9.0" } }, "mkdirp": { "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } }, "ms": { - "version": "2.1.1", + "version": "2.1.2", "bundled": true, "dev": true, "optional": true }, "needle": { - "version": "2.3.0", + "version": "2.4.0", "bundled": true, "dev": true, "optional": true, "requires": { - "debug": "^4.1.0", + "debug": "^3.2.6", "iconv-lite": "^0.4.4", "sax": "^1.2.4" } }, "node-pre-gyp": { - "version": "0.12.0", + "version": "0.14.0", "bundled": true, "dev": true, "optional": true, @@ -2051,7 +2066,7 @@ "rc": "^1.2.7", "rimraf": "^2.6.1", "semver": "^5.3.0", - "tar": "^4" + "tar": "^4.4.2" } }, "nopt": { @@ -2065,13 +2080,22 @@ } }, "npm-bundled": { - "version": "1.0.6", + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "npm-normalize-package-bin": "^1.0.1" + } + }, + "npm-normalize-package-bin": { + "version": "1.0.1", "bundled": true, "dev": true, "optional": true }, "npm-packlist": { - "version": "1.4.1", + "version": "1.4.7", "bundled": true, "dev": true, "optional": true, @@ -2095,8 +2119,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -2108,7 +2131,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -2142,7 +2164,7 @@ "optional": true }, "process-nextick-args": { - "version": "2.0.0", + "version": "2.0.1", "bundled": true, "dev": true, "optional": true @@ -2183,7 +2205,7 @@ } }, "rimraf": { - "version": "2.6.3", + "version": "2.7.1", "bundled": true, "dev": true, "optional": true, @@ -2194,8 +2216,7 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -2210,7 +2231,7 @@ "optional": true }, "semver": { - "version": "5.7.0", + "version": "5.7.1", "bundled": true, "dev": true, "optional": true @@ -2231,7 +2252,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -2251,7 +2271,6 @@ "version": "3.0.1", "bundled": true, "dev": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -2263,18 +2282,18 @@ "optional": true }, "tar": { - "version": "4.4.8", + "version": "4.4.13", "bundled": true, "dev": true, "optional": true, "requires": { "chownr": "^1.1.1", "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", + "minipass": "^2.8.6", + "minizlib": "^1.2.1", "mkdirp": "^0.5.0", "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" + "yallist": "^3.0.3" } }, "util-deprecate": { @@ -2295,14 +2314,12 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "yallist": { - "version": "3.0.3", + "version": "3.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true } } }, @@ -2455,9 +2472,9 @@ } }, "hash.js": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.5.tgz", - "integrity": "sha512-eWI5HG9Np+eHV1KQhisXWwM+4EPPYe5dFX1UZZH7k/E3JzDEazVH+VGlZi6R94ZqImq+A3D1mCEtrFIfg/E7sA==", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -2488,9 +2505,9 @@ "dev": true }, "ieee754": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", - "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", "dev": true }, "iferr": { @@ -2584,10 +2601,10 @@ "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true }, - "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", + "infer-owner": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", + "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", "dev": true }, "inflight": { @@ -2732,9 +2749,9 @@ "dev": true }, "is-glob": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", "dev": true, "requires": { "is-extglob": "^2.1.1" @@ -2817,6 +2834,12 @@ "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", "dev": true }, + "is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", + "dev": true + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -2978,9 +3001,9 @@ } }, "loader-runner": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.1.tgz", - "integrity": "sha512-By6ZFY7ETWOc9RFaAIb23IjJVcM4dvJC/N57nmdz9RSkMXvAXGI7SyVlAw3v8vjtDRlqThgVDVmTnr9fqMlxkw==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", + "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==", "dev": true }, "loader-utils": { @@ -3009,12 +3032,6 @@ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", "dev": true }, - "lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", - "dev": true - }, "lru-cache": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.2.tgz", @@ -3042,6 +3059,12 @@ } } }, + "mamacro": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/mamacro/-/mamacro-0.0.3.tgz", + "integrity": "sha512-qMEwh+UujcQ+kbz3T6V+wAmO2U8veoq2w+3wY8MquqwVA3jChfwY+Tk52GZKDfACEPjuZ7r2oJLejwpt8jtwTA==", + "dev": true + }, "map-age-cleaner": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.2.tgz", @@ -3103,9 +3126,9 @@ }, "dependencies": { "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", + "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", "dev": true } } @@ -3308,9 +3331,9 @@ "dev": true }, "neo-async": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.1.tgz", - "integrity": "sha512-3KL3fvuRkZ7s4IFOMfztb7zJp3QaVWnBeGoJlgB38XnCRPj/0tLzzLG5IB8NYOHbJ8g8UGrgZv44GLDk6CxTxA==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", + "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", "dev": true }, "nice-try": { @@ -3320,9 +3343,9 @@ "dev": true }, "node-libs-browser": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", - "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz", + "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==", "dev": true, "requires": { "assert": "^1.1.1", @@ -3332,10 +3355,10 @@ "constants-browserify": "^1.0.0", "crypto-browserify": "^3.11.0", "domain-browser": "^1.1.1", - "events": "^1.0.0", + "events": "^3.0.0", "https-browserify": "^1.0.0", "os-browserify": "^0.3.0", - "path-browserify": "0.0.0", + "path-browserify": "0.0.1", "process": "^0.11.10", "punycode": "^1.2.4", "querystring-es3": "^0.2.0", @@ -3346,8 +3369,8 @@ "timers-browserify": "^2.0.4", "tty-browserify": "0.0.0", "url": "^0.11.0", - "util": "^0.10.3", - "vm-browserify": "0.0.4" + "util": "^0.11.0", + "vm-browserify": "^1.0.1" }, "dependencies": { "punycode": { @@ -3355,6 +3378,15 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", "dev": true + }, + "util": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", + "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", + "dev": true, + "requires": { + "inherits": "2.0.3" + } } } }, @@ -3410,13 +3442,10 @@ } }, "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true }, "npm-run-path": { "version": "2.0.2", @@ -3586,9 +3615,9 @@ "dev": true }, "pako": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", - "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", + "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==", "dev": true }, "parallel-transform": { @@ -3603,16 +3632,17 @@ } }, "parse-asn1": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", - "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.5.tgz", + "integrity": "sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ==", "dev": true, "requires": { "asn1.js": "^4.0.0", "browserify-aes": "^1.0.0", "create-hash": "^1.1.0", "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3" + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" } }, "pascalcase": { @@ -3631,9 +3661,9 @@ } }, "path-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", - "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", + "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", "dev": true }, "path-dirname": { @@ -3787,9 +3817,9 @@ }, "dependencies": { "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", + "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", "dev": true } } @@ -3834,9 +3864,9 @@ "dev": true }, "randombytes": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", - "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, "requires": { "safe-buffer": "^5.1.0" @@ -3907,9 +3937,9 @@ "dev": true }, "repeat-element": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", - "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", "dev": true }, "repeat-string": { @@ -4324,18 +4354,28 @@ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, "source-map-resolve": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", "dev": true, "requires": { - "atob": "^2.1.1", + "atob": "^2.1.2", "decode-uri-component": "^0.2.0", "resolve-url": "^0.2.1", "source-map-url": "^0.4.0", "urix": "^0.1.0" } }, + "source-map-support": { + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.16.tgz", + "integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, "source-map-url": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", @@ -4388,9 +4428,9 @@ } }, "stream-browserify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", - "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", + "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", "dev": true, "requires": { "inherits": "~2.0.1", @@ -4532,6 +4572,305 @@ "integrity": "sha512-dQRhbNQkRnaqauC7WqSJ21EEksgT0fYZX2lqXzGkpo8JNig9zGZTYoMGvyI2nWmXlE2VSVXVDu7wLVGu/mQEsg==", "dev": true }, + "terser": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.5.0.tgz", + "integrity": "sha512-UEocwHeNeGFbZ2wHJSidpYu4pkEoRI/tyrjWjGYBL8P3MwKsAtprK5ZbHX1MopkHkTSDm6g6vscLxITFMyE3bw==", + "dev": true, + "requires": { + "commander": "^2.20.0", + "source-map": "~0.6.1", + "source-map-support": "~0.5.12" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + } + } + }, + "terser-webpack-plugin": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz", + "integrity": "sha512-QMxecFz/gHQwteWwSo5nTc6UaICqN1bMedC5sMtUc7y3Ha3Q8y6ZO0iCR8pq4RJC8Hjf0FEPEHZqcMB/+DFCrA==", + "dev": true, + "requires": { + "cacache": "^12.0.2", + "find-cache-dir": "^2.1.0", + "is-wsl": "^1.1.0", + "schema-utils": "^1.0.0", + "serialize-javascript": "^2.1.2", + "source-map": "^0.6.1", + "terser": "^4.1.2", + "webpack-sources": "^1.4.0", + "worker-farm": "^1.7.0" + }, + "dependencies": { + "ajv": { + "version": "6.10.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", + "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz", + "integrity": "sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==", + "dev": true + }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, + "cacache": { + "version": "12.0.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.3.tgz", + "integrity": "sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw==", + "dev": true, + "requires": { + "bluebird": "^3.5.5", + "chownr": "^1.1.1", + "figgy-pudding": "^3.5.1", + "glob": "^7.1.4", + "graceful-fs": "^4.1.15", + "infer-owner": "^1.0.3", + "lru-cache": "^5.1.1", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.3", + "ssri": "^6.0.1", + "unique-filename": "^1.1.1", + "y18n": "^4.0.0" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", + "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "mississippi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", + "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", + "dev": true, + "requires": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^3.0.0", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + } + }, + "p-limit": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", + "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + } + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "serialize-javascript": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz", + "integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==", + "dev": true + }, + "ssri": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", + "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", + "dev": true, + "requires": { + "figgy-pudding": "^3.5.1" + } + }, + "webpack-sources": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", + "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "dev": true, + "requires": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + } + }, + "worker-farm": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz", + "integrity": "sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==", + "dev": true, + "requires": { + "errno": "~0.1.7" + } + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + } + } + }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -4555,9 +4894,9 @@ } }, "timers-browserify": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", - "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.11.tgz", + "integrity": "sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ==", "dev": true, "requires": { "setimmediate": "^1.0.4" @@ -4621,9 +4960,9 @@ } }, "tslib": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", "dev": true }, "tty-browserify": { @@ -4768,9 +5107,9 @@ } }, "upath": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", - "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", "dev": true }, "uri-js": { @@ -4807,13 +5146,10 @@ } }, "use": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", - "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", - "dev": true, - "requires": { - "kind-of": "^6.0.2" - } + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true }, "util": { "version": "0.10.4", @@ -4842,13 +5178,10 @@ "dev": true }, "vm-browserify": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", - "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", - "dev": true, - "requires": { - "indexof": "0.0.1" - } + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", + "dev": true }, "watchpack": { "version": "1.6.0", @@ -4862,47 +5195,46 @@ } }, "webpack": { - "version": "4.23.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.23.0.tgz", - "integrity": "sha512-Osh/3U9y4swhEKDjy8fF48v2Qx5VC6VvdQ8bEm1HMaVVddiQBw4+mIyDrzVcVRCPT/+4uJFOcklPuoB+I3Zw0w==", + "version": "4.41.5", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.41.5.tgz", + "integrity": "sha512-wp0Co4vpyumnp3KlkmpM5LWuzvZYayDwM2n17EHFr4qxBBbRokC7DJawPJC7TfSFZ9HZ6GsdH40EBj4UV0nmpw==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.10", - "@webassemblyjs/helper-module-context": "1.7.10", - "@webassemblyjs/wasm-edit": "1.7.10", - "@webassemblyjs/wasm-parser": "1.7.10", - "acorn": "^5.6.2", - "acorn-dynamic-import": "^3.0.0", - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0", - "chrome-trace-event": "^1.0.0", + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-module-context": "1.8.5", + "@webassemblyjs/wasm-edit": "1.8.5", + "@webassemblyjs/wasm-parser": "1.8.5", + "acorn": "^6.2.1", + "ajv": "^6.10.2", + "ajv-keywords": "^3.4.1", + "chrome-trace-event": "^1.0.2", "enhanced-resolve": "^4.1.0", - "eslint-scope": "^4.0.0", + "eslint-scope": "^4.0.3", "json-parse-better-errors": "^1.0.2", - "loader-runner": "^2.3.0", - "loader-utils": "^1.1.0", - "memory-fs": "~0.4.1", - "micromatch": "^3.1.8", - "mkdirp": "~0.5.0", - "neo-async": "^2.5.0", - "node-libs-browser": "^2.0.0", - "schema-utils": "^0.4.4", - "tapable": "^1.1.0", - "uglifyjs-webpack-plugin": "^1.2.4", - "watchpack": "^1.5.0", - "webpack-sources": "^1.3.0" + "loader-runner": "^2.4.0", + "loader-utils": "^1.2.3", + "memory-fs": "^0.4.1", + "micromatch": "^3.1.10", + "mkdirp": "^0.5.1", + "neo-async": "^2.6.1", + "node-libs-browser": "^2.2.1", + "schema-utils": "^1.0.0", + "tapable": "^1.1.3", + "terser-webpack-plugin": "^1.4.3", + "watchpack": "^1.6.0", + "webpack-sources": "^1.4.1" }, "dependencies": { "acorn": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.0.tgz", + "integrity": "sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw==", "dev": true }, "ajv": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.4.tgz", - "integrity": "sha512-4Wyjt8+t6YszqaXnLDfMmG/8AlO5Zbcsy3ATHncCzjW/NoPzAId8AK6749Ybjmdt+kUY1gP60fCu46oDxPv/mg==", + "version": "6.10.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", + "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", "dev": true, "requires": { "fast-deep-equal": "^2.0.1", @@ -4912,15 +5244,21 @@ } }, "ajv-keywords": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", - "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz", + "integrity": "sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==", + "dev": true + }, + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", "dev": true }, "eslint-scope": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", - "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", "dev": true, "requires": { "esrecurse": "^4.1.0", @@ -4939,11 +5277,58 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, - "tapable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.0.tgz", - "integrity": "sha512-IlqtmLVaZA2qab8epUXbVWRn3aB1imbDMJtjB3nu4X0NqPkcY/JH9ZtCBWKHWPxs8Svi9tyo8w2dBoi07qZbBA==", + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "loader-utils": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^2.0.0", + "json5": "^1.0.1" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + }, + "tapable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", + "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", + "dev": true + }, + "webpack-sources": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", + "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "dev": true, + "requires": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + } } } }, diff --git a/package.json b/package.json index efa179ccc..f91b400a7 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ ], "devDependencies": { "clean-webpack-plugin": "^0.1.19", - "dts-dom": "^3.2.0", + "dts-dom": "^3.3.0", "eslint": "^4.19.1", "eslint-plugin-es5": "^1.3.1", "fs-extra": "^6.0.1", From bf09e4740a3feb19b1902fa5b04ada3ad5aad2bd Mon Sep 17 00:00:00 2001 From: Chnapy Date: Thu, 2 Jan 2020 21:51:38 +0100 Subject: [PATCH 027/189] edit tsgen to handle generic default types --- scripts/tsgen/bin/Parser.js | 17 ++++++++++++++--- scripts/tsgen/bin/Parser.js.map | 2 +- scripts/tsgen/src/Parser.ts | 25 ++++++++++++++++++++++--- 3 files changed, 37 insertions(+), 7 deletions(-) diff --git a/scripts/tsgen/bin/Parser.js b/scripts/tsgen/bin/Parser.js index 4dbbdef4a..28b0ebf07 100644 --- a/scripts/tsgen/bin/Parser.js +++ b/scripts/tsgen/bin/Parser.js @@ -468,10 +468,21 @@ class Parser { if (doclet.tags) for (let tag of doclet.tags) { if (tag.originalTitle === 'generic') { - let matches = tag.value.match(/(?:(?:{)([^}]+)(?:}))?\s?([^\s]+)(?:\s?-\s?(?:\[)(.+)(?:\]))?/); - let typeParam = dom.create.typeParameter(matches[2], matches[1] == null ? null : dom.create.typeParameter(matches[1])); + /** + * {string} K - [key] + * 1 = string | 2 = null | 3 = K | 4 = key + * + * {string=string} K - [key] + * 1 = string | 2 = string | 3 = K | 4 = key + */ + const matches = tag.value.match(/(?:(?:{)([^}=]+)(?:=)?([^}=]+)?(?:}))?\s?([^\s]+)(?:\s?-\s?(?:\[)(.+)(?:\]))?/); + const [_, _type, _defaultType, _name, _paramsNames] = matches; + const typeParam = dom.create.typeParameter(_name, _type == null ? null : dom.create.typeParameter(_type)); + if (_defaultType != null) { + typeParam.defaultType = dom.create.typeParameter(_defaultType); + } obj.typeParameters.push(typeParam); - handleOverrides(matches[3], matches[2]); + handleOverrides(_paramsNames, _name); } else if (tag.originalTitle === 'genericUse') { let matches = tag.value.match(/(?:(?:{)([^}]+)(?:}))(?:\s?-\s?(?:\[)(.+)(?:\]))?/); diff --git a/scripts/tsgen/bin/Parser.js.map b/scripts/tsgen/bin/Parser.js.map index 55c6f9fe3..558e49eb4 100644 --- a/scripts/tsgen/bin/Parser.js.map +++ b/scripts/tsgen/bin/Parser.js.map @@ -1 +1 @@ -{"version":3,"file":"Parser.js","sourceRoot":"","sources":["../src/Parser.ts"],"names":[],"mappings":";;AAAA,+BAA+B;AAE/B,MAAM,YAAY,GAAG,mBAAmB,CAAC;AAEzC,MAAa,MAAM;IAMf,YAAY,IAAW;QAEnB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAClB,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QAErB,qDAAqD;QACrD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAExB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAE1B,yCAAyC;QACzC,yIAAyI;QACzI,kDAAkD;QAClD,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAE9B,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAE1B,oBAAoB;QACpB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QAEjE,qBAAqB;QACrB,MAAM,kBAAkB,GAAG,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACvD,kBAAkB,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC;QACnE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAC3C,CAAC;IAED,IAAI;QACA,IAAI,OAAO,GAAG,EAAE,CAAC;QACjB,IAAI,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAW,EAAE,GAA4B,EAAE,EAAE;YAC5E,2BAA2B;YAC3B,yCAAyC;YACzC,qCAAqC;YACrC,kBAAkB;YAClB,IAAI;YACJ,0BAA0B;YAC1B,OAAO,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC/B,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EACtB;YACI,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;YAC7C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;SACxB;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;IAEO,YAAY,CAAC,IAAW;QAC5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAElC,IAAI,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YAErB,+BAA+B;YAC/B,QAAQ,MAAM,CAAC,QAAQ,EACvB;gBACI,KAAK,qCAAqC,CAAC;gBAC3C,KAAK,yCAAyC,CAAC;gBAC/C,KAAK,yCAAyC,CAAC;gBAC/C,KAAK,4CAA4C,CAAC;gBAClD,KAAK,oCAAoC,CAAC;gBAC1C,KAAK,qCAAqC,CAAC;gBAC3C,KAAK,oCAAoC,CAAC;gBAC1C,KAAK,yCAAyC,CAAC;gBAC/C,KAAK,oCAAoC,CAAC;gBAC1C,KAAK,sCAAsC,CAAC;gBAC5C,KAAK,4CAA4C,CAAC;gBAClD,KAAK,wCAAwC,CAAC;gBAC9C,KAAK,4CAA4C,CAAC;gBAClD,KAAK,oCAAoC,CAAC;gBAC1C,KAAK,uCAAuC,CAAC;gBAC7C,KAAK,2CAA2C,CAAC;gBACjD,KAAK,oCAAoC,CAAC;gBAC1C,KAAK,sCAAsC,CAAC;gBAC5C,KAAK,yCAAyC,CAAC;gBAC/C,KAAK,uCAAuC,CAAC;gBAC7C,KAAK,qDAAqD;oBACtD,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC;oBACtB,MAAM;gBAEV,+BAA+B;gBAC/B,KAAK,mBAAmB,CAAC;gBACzB,KAAK,mBAAmB,CAAC;gBACzB,KAAK,4BAA4B,CAAC;gBAClC,KAAK,gCAAgC,CAAC;gBACtC,KAAK,qBAAqB,CAAC;gBAC3B,KAAK,0BAA0B,CAAC;gBAChC,KAAK,yBAAyB,CAAC;gBAC/B,KAAK,mBAAmB,CAAC;gBACzB,KAAK,4BAA4B;oBAC7B,sDAAsD;oBACtD,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;oBACvB,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC;oBACrB,MAAM;aACb;YAED,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,mCAAmC,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,mCAAmC,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,mCAAmC,CAAC,IAAI,CAAC,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EACvP;gBACI,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC;aACzB;YAED,IAAI,GAAwB,CAAC;YAC7B,IAAI,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC;YAE7B,QAAQ,MAAM,CAAC,IAAI,EAAE;gBACjB,KAAK,WAAW;oBACZ,GAAG,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;oBACnC,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC;oBAC5B,MAAM;gBACV,KAAK,OAAO;oBACR,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;oBAC/B,MAAM;gBACV,KAAK,OAAO;oBACR,GAAG,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;oBACnC,MAAM;gBACV,KAAK,QAAQ;oBACT,IAAI,MAAM,CAAC,MAAM,KAAK,IAAI,EAAE;wBACxB,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;wBAC9B,MAAM;qBACT;gBACL,KAAK,UAAU;oBACX,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;oBAChC,MAAM;gBACV,KAAK,UAAU;oBACX,GAAG,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;oBAClC,MAAM;gBACV,KAAK,SAAS;oBACV,GAAG,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;oBACjC,MAAM;gBACV,KAAK,OAAO;oBACR,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;oBAC/B,MAAM;gBACV;oBACI,OAAO,CAAC,GAAG,CAAC,uBAAuB,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;oBACnD,MAAM;aACb;YAED,IAAI,GAAG,EAAE;gBACL,IAAI,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE;oBAC5B,OAAO,CAAC,GAAG,CAAC,wCAAwC,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;oBACxE,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;oBACpB,SAAS;iBACZ;gBACD,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC;gBACjC,IAAI,MAAM,CAAC,WAAW,EAAE;oBACpB,IAAI,SAAS,GAAG,GAAG,CAAC,YAAY,IAAI,EAAE,CAAC;oBACvC,GAAG,CAAC,YAAY,GAAG,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;iBACnF;aACJ;SACJ;IACL,CAAC;IAEO,cAAc,CAAC,IAAW;QAC9B,IAAI,QAAQ,GAAG,IAAI,GAAG,EAAU,CAAC;QACjC,KAAK,IAAI,MAAM,IAAI,IAAI,EAAE;YACrB,IAAI,GAAG,GAAG,MAAM,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAEzG,IAAI,CAAC,GAAG,EAAE;gBAEN,QAAQ;gBACR,OAAO,CAAC,GAAG,CAAC,mCAAmC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;gBAElE,SAAS;aACZ;YAED,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;gBAClB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAA8B,CAAC,CAAC;aACtD;iBAAM;gBACH,IAAI,iBAAiB,GAAG,MAAM,CAAC,IAAI,KAAK,OAAO,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,IAAI,MAAM,CAAC,IAAI,IAAI,WAAW,IAAI,MAAM,CAAC,MAAM,CAAC;gBAC5H,IAAI,MAAM,GAAG,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAExI,wDAAwD;gBACxD,IAAI,CAAC,MAAM,EAAE;oBACT,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,QAAQ,OAAO,MAAM,CAAC,IAAI,CAAC,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,gBAAgB,MAAM,CAAC,QAAQ,wBAAwB,CAAC,CAAC;oBACxI,IAAI,KAAK,GAAa,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;oBACjD,IAAI,QAAQ,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;oBAC7B,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI;wBAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;oBAChG,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAA6B,CAAC;oBACnE,IAAI,MAAM,IAAI,IAAI,EAAE;wBAChB,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;wBAC/C,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,GAA6B,MAAM,CAAC;wBACpE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAA2B,MAAM,CAAC,CAAC;qBACxD;yBAAM;wBACH,OAAO,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;4BACxB,IAAI,SAAS,GAA6B,MAAM,CAAC;4BACjD,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;4BAChD,KAAK,CAAC,IAAI,CAA4B,MAAO,CAAC,IAAI,CAAC,CAAC;4BACpD,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAA6B,MAAM,CAAC;4BACpE,SAAS,CAAC,OAAO,CAAC,IAAI,CAA2B,MAAM,CAAC,CAAC;4BACnD,MAAO,CAAC,OAAO,GAAG,SAAS,CAAC;yBACrC;qBACJ;iBACJ;gBACD,uDAAuD;gBAEvD,IAAU,MAAO,CAAC,OAAO,EAAE;oBACjB,MAAO,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;iBACnC;qBAAM;oBACH,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;oBAC9C,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;iBACvB;gBAEK,GAAI,CAAC,OAAO,GAAG,MAAM,CAAC;gBAE5B,sDAAsD;gBACtD,IAAI,CAAE,MAAc,CAAC,IAAI,KAAK,OAAO,IAAK,MAAc,CAAC,IAAI,KAAK,WAAW,CAAC;uBACtE,GAAW,CAAC,IAAI,KAAK,UAAU;oBAClC,GAAW,CAAC,IAAI,GAAG,QAAQ,CAAC;gBACjC,uDAAuD;gBACvD,IAAK,MAAc,CAAC,IAAI,KAAK,WAAW,IAAK,GAAW,CAAC,IAAI,KAAK,UAAU,EAAE;oBAC1E,IAAI,MAAM,CAAC,IAAI,IAAI,UAAU;wBAAG,GAAW,CAAC,IAAI,GAAG,OAAO,CAAC;;wBACrD,GAAW,CAAC,IAAI,GAAG,KAAK,CAAC;iBAClC;aACJ;SACJ;IACL,CAAC;IAEO,kBAAkB,CAAC,IAAW;QAClC,KAAK,IAAI,MAAM,IAAI,IAAI,EAAE;YACrB,IAAI,GAAG,GAAG,MAAM,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YACzG,IAAI,CAAC,GAAG,EAAE;gBAEN,QAAQ;gBACR,OAAO,CAAC,GAAG,CAAC,oBAAoB,MAAM,CAAC,QAAQ,MAAM,CAAC,CAAC;gBAEvD,SAAS;aACZ;YACD,IAAI,CAAO,GAAI,CAAC,OAAO;gBAAE,SAAS;YAElC,IAAI,MAAM,CAAC,SAAS,EAAE,EAAC,4DAA4D;gBAC/E,IAAI,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;gBACzC,IAAI,CAAC,IAAI,IAAI,CAAO,IAAK,CAAC,OAAO;oBAC7B,MAAM,IAAI,MAAM,CAAC,QAAQ,0BAA0B,MAAM,CAAC,QAAQ,0BAA0B,CAAC;gBAEjG,IAAU,IAAK,CAAC,OAAO,CAAC,IAAI,IAAI,WAAW,EAAE;oBACnC,GAAI,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAO,GAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;oBACxE,GAAI,CAAC,OAAO,GAAG,IAAI,CAAC;iBAC7B;aACJ;SACJ;IACL,CAAC;IAEO,cAAc,CAAC,IAAW;QAC9B,KAAK,IAAI,MAAM,IAAI,IAAI,EAAE;YACrB,IAAI,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YACxC,IAAI,CAAC,GAAG,IAAI,MAAM,CAAC,IAAI,KAAK,OAAO;gBAAE,SAAS;YAE9C,IAAI,CAAC,GAAG,GAA2B,CAAC;YAEpC,mBAAmB;YACnB,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE;gBAC3C,KAAK,IAAI,OAAO,IAAI,MAAM,CAAC,QAAQ,EAAE;oBACjC,IAAI,IAAI,GAAW,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;oBAEjD,IAAI,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA,2EAA2E;oBAEtH,IAAI,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAoD,CAAC;oBAE7F,IAAI,CAAC,QAAQ,EAAE;wBACX,OAAO,CAAC,GAAG,CAAC,kCAAkC,OAAO,QAAQ,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;qBACnF;yBAAM;wBACH,IAAI,QAAQ,CAAC,IAAI,IAAI,OAAO,EAAE;4BAC1B,CAAC,CAAC,QAAQ,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;yBACvC;6BAAM;4BACH,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;yBACjD;qBACJ;iBACJ;aACJ;SACJ;IACL,CAAC;IAEO,eAAe,CAAC,MAAW;QAE/B;;;;;;;;;;;;;;;WAeG;QAEC,8CAA8C;QAElD,IAAI,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAE5C,OAAO,GAAG,CAAC;IACf,CAAC;IAEO,WAAW,CAAC,MAAW;QAC3B,IAAI,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAExC,IAAI,MAAM,GAAG,IAAI,CAAC;QAClB,IAAI,MAAM,CAAC,MAAM,EAAE;YACf,IAAI,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YACxC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YAC7B,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC;YAEzB,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACjB,IAAK,CAAC,OAAO,GAAG,GAAG,CAAC;SAC7B;QAED,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;QAEzC,IAAI,MAAM,CAAC,SAAS;YAChB,MAAM,CAAC,WAAW,GAAG,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC,+BAA+B;QAExG,OAAO,GAAG,CAAC;IACf,CAAC;IAEO,eAAe,CAAC,MAAW;QAC/B,OAAO,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IAEO,YAAY,CAAC,MAAW;QAC5B,IAAI,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAElC,IAAI,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAEjD,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;QAEvC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAE/B,OAAO,GAAG,CAAC;IACf,CAAC;IAEO,WAAW,CAAC,MAAW;QAE3B,IAAI,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAElC,IAAI,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAE9C,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAE/B,OAAO,GAAG,CAAC;IACf,CAAC;IAEO,UAAU,CAAC,MAAW;QAC1B,IAAI,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAE9C,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAE/B,OAAO,GAAG,CAAC;IACf,CAAC;IAEO,cAAc,CAAC,MAAW;QAC9B,IAAI,UAAU,GAAa,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;QAEzC,IAAI,MAAM,CAAC,OAAO,EAAE;YAChB,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;SAClD;QAED,IAAI,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;QAC7D,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAE5B,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;QAEjD,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAE/B,OAAO,GAAG,CAAC;IACf,CAAC;IAEO,aAAa,CAAC,MAAW;QAC7B,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACtC,IAAI,IAAI,GAAG,IAAI,CAAC;QAEhB,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE;YACnC,IAAI,UAAU,GAAG,EAAE,CAAC;YAEpB,KAAK,IAAI,OAAO,IAAI,MAAM,CAAC,UAAU,EAAE;gBACnC,IAAI,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;gBACtC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACtB,IAAI,OAAO,CAAC,WAAW;oBACnB,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;aAC7E;YAED,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;YAEzC,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE;gBAC3C,IAAI,iBAAiB,GAAG,EAAE,CAAC;gBAC3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;oBAC7C,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;iBAC7E;gBACD,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC7B,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;aACrD;SAEJ;aAAM;YACH,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,UAAU,EAAE;gBACpC,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACpD,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;aAChC;iBAAM;gBACH,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;aACjC;SACJ;QAED,IAAI,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAEhD,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QAEzC,OAAO,KAAK,CAAC;IACjB,CAAC;IAEO,SAAS,CAAC,MAAW,EAAE,GAAyD;QACpF,IAAI,UAAU,GAAoB,EAAE,CAAC;QAErC,IAAI,MAAM,CAAC,MAAM,EAAE;YAEf,IAAI,QAAQ,GAAG,KAAK,CAAC;YAErB,GAAG,CAAC,YAAY,GAAG,EAAE,CAAC;YAEtB,KAAK,IAAI,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE;gBAEhC,uBAAuB;gBACvB,IAAI,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE;oBAClC,OAAO,CAAC,GAAG,CAAC,yCAAyC,MAAM,CAAC,QAAQ,QAAQ,MAAM,CAAC,IAAI,CAAC,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;oBAE1H,IAAI,UAAU,GAAG,QAAQ,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,YAAY,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;oBACzG,IAAI,QAAQ,CAAC,WAAW;wBACpB,GAAG,CAAC,YAAY,IAAI,YAAY,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,EAAE,GAAG,UAAU,CAAC;yBAClH,IAAI,UAAU,CAAC,MAAM;wBACtB,GAAG,CAAC,YAAY,IAAI,YAAY,QAAQ,CAAC,IAAI,GAAG,GAAG,UAAU,CAAC;oBAClE,SAAS;iBACZ;gBACD,uBAAuB;gBAEvB,IAAI,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAC1E,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAEvB,IAAI,QAAQ,IAAI,QAAQ,CAAC,QAAQ,IAAI,IAAI,EAAE;oBACvC,OAAO,CAAC,GAAG,CAAC,+CAA+C,QAAQ,CAAC,IAAI,UAAU,MAAM,CAAC,QAAQ,QAAQ,MAAM,CAAC,IAAI,CAAC,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;oBACvJ,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC;iBAC5B;gBAED,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;gBAEnC,QAAQ,GAAG,QAAQ,IAAI,QAAQ,CAAC,QAAQ,KAAK,IAAI,CAAC;gBAElD,IAAI,UAAU,GAAG,QAAQ,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,YAAY,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;gBAEzG,IAAI,QAAQ,CAAC,WAAW;oBACpB,GAAG,CAAC,YAAY,IAAI,YAAY,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,EAAE,GAAG,UAAU,CAAC;qBAClH,IAAI,UAAU,CAAC,MAAM;oBACtB,GAAG,CAAC,YAAY,IAAI,YAAY,QAAQ,CAAC,IAAI,GAAG,GAAG,UAAU,CAAC;aACrE;SACJ;QAED,GAAG,CAAC,UAAU,GAAG,UAAU,CAAC;IAChC,CAAC;IAEO,SAAS,CAAC,OAAY;QAC1B,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;YAC3B,OAAO,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC;SACvB;aAAM;YACH,IAAI,KAAK,GAAG,EAAE,CAAC;YACf,KAAK,IAAI,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE;gBAEjC,IAAI,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;gBAElC,IAAI,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;gBAErE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACpB;YACD,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC;gBAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;;gBAClC,OAAO,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SACvC;IACL,CAAC;IAEO,eAAe,CAAC,IAAY;QAChC,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE;YACzB,IAAI,GAAY,IAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAChD;QACD,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,KAAK,oBAAoB,EAAE;YAC3D,IAAI,GAAY,IAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAC/C;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAEO,eAAe,CAAC,IAAY;QAChC,IAAI,IAAI,KAAK,OAAO;YAAE,OAAO,QAAQ,CAAC;QACtC,IAAI,IAAI,KAAK,UAAU;YAAE,OAAO,UAAU,CAAC;QAC3C,IAAI,IAAI,KAAK,oBAAoB;YAAE,OAAO,YAAY,CAAC;QACvD,IAAI,IAAI,KAAK,OAAO;YAAE,OAAO,OAAO,CAAC;QAErC,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;YAC3B,IAAI,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;YAE1C,IAAI,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE;gBACvB,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;aAClD;SACJ;aAAM,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;YACnC,IAAI,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;YAE3C,IAAI,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE;gBACvB,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE;oBAC/B,IAAI,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;oBAClC,OAAO,UAAU,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;iBAC1F;qBAAM;oBACH,OAAO,mBAAmB,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;iBACjE;aACJ;SACJ;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;IAEO,YAAY,CAAC,MAAW,EAAE,GAAwC;QACtE,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,gBAAgB,CAAC,IAAI,CAAC;QACtC,IAAI,MAAM,CAAC,QAAQ,KAAK,IAAI,EAAE;YAC1B,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC;YACrC,IAAI,IAAI,GAAwB,GAAI,CAAC,IAAI,CAAC;YAC1C,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;gBAC3B,IAAI,IAAI,CAAC,IAAI,IAAI,KAAK;oBAClB,OAAO,CAAC,GAAG,CAAC,uDAAuD,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;gBAC1F,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,mBAAmB;aACpD;SACJ;aAAM,IAAI,MAAM,CAAC,QAAQ,KAAK,IAAI,EAAE,EAAC,qDAAqD;YACvF,IAAI,GAAG,CAAC,MAAM,CAAC,KAAK,WAAW;gBAAE,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC;;gBACrE,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,gBAAgB,CAAC,QAAQ,CAAC;SACnD;QACD,QAAQ,MAAM,CAAC,MAAM,EAAE;YACnB,KAAK,WAAW;gBACZ,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,gBAAgB,CAAC,SAAS,CAAC;gBAC5C,MAAM;YACV,KAAK,SAAS;gBACV,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,gBAAgB,CAAC,OAAO,CAAC;gBAC1C,MAAM;SACb;QACD,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,IAAI,KAAK,UAAU;YAAE,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,gBAAgB,CAAC,QAAQ,CAAC;QAC9F,IAAI,MAAM,CAAC,KAAK,KAAK,QAAQ;YAAE,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,gBAAgB,CAAC,MAAM,CAAC;IAC5E,CAAC;IAEO,cAAc,CAAC,MAAW,EAAE,GAAwG,EAAE,MAAuB;QACjK,IAAI,MAAM,CAAC,IAAI;YACX,KAAK,IAAI,GAAG,IAAI,MAAM,CAAC,IAAI,EAAE;gBACzB,IAAI,GAAG,CAAC,aAAa,KAAK,SAAS,EAAE;oBACjC,IAAI,OAAO,GAAY,GAAG,CAAC,KAAM,CAAC,KAAK,CAAC,+DAA+D,CAAC,CAAC;oBACzG,IAAI,SAAS,GAAG,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC3C,GAAI,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;oBAChH,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;iBAC3C;qBAAM,IAAI,GAAG,CAAC,aAAa,KAAK,YAAY,EAAE;oBAC3C,IAAI,OAAO,GAAY,GAAG,CAAC,KAAM,CAAC,KAAK,CAAC,mDAAmD,CAAC,CAAC;oBAC7F,IAAI,YAAY,GAAW,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;oBAE5D,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC;iBACnE;aACJ;QAEL,SAAS,eAAe,CAAC,aAAqB,EAAE,YAAoB;YAChE,IAAI,aAAa,IAAI,IAAI,EAAE;gBACvB,IAAI,SAAS,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACzC,IAAI,MAAM,IAAI,IAAI,EAAE;oBAChB,KAAK,IAAI,KAAK,IAAI,MAAM,EAAE;wBACtB,IAAI,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE;4BACrC,KAAK,CAAC,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;yBAC5D;qBACJ;iBACJ;gBACD,IAAI,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,EAAC,kCAAkC;oBAC7C,GAAI,CAAC,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;iBAC3F;gBACD,IAAI,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,EAAC,gCAAgC;oBACzC,GAAI,CAAC,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;iBACrF;aACJ;QACL,CAAC;IACL,CAAC;CAEJ;AAxkBD,wBAwkBC"} \ No newline at end of file +{"version":3,"file":"Parser.js","sourceRoot":"","sources":["../src/Parser.ts"],"names":[],"mappings":";;AAAA,+BAA+B;AAE/B,MAAM,YAAY,GAAG,mBAAmB,CAAC;AAEzC,MAAa,MAAM;IAMf,YAAY,IAAW;QAEnB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAClB,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QAErB,qDAAqD;QACrD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAExB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAE1B,yCAAyC;QACzC,yIAAyI;QACzI,kDAAkD;QAClD,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAE9B,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAE1B,oBAAoB;QACpB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QAEjE,qBAAqB;QACrB,MAAM,kBAAkB,GAAG,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACvD,kBAAkB,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC;QACnE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAC3C,CAAC;IAED,IAAI;QACA,IAAI,OAAO,GAAG,EAAE,CAAC;QACjB,IAAI,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAW,EAAE,GAA4B,EAAE,EAAE;YAC5E,2BAA2B;YAC3B,yCAAyC;YACzC,qCAAqC;YACrC,kBAAkB;YAClB,IAAI;YACJ,0BAA0B;YAC1B,OAAO,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC/B,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EACtB;YACI,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;YAC7C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;SACxB;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;IAEO,YAAY,CAAC,IAAW;QAC5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAElC,IAAI,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YAErB,+BAA+B;YAC/B,QAAQ,MAAM,CAAC,QAAQ,EACvB;gBACI,KAAK,qCAAqC,CAAC;gBAC3C,KAAK,yCAAyC,CAAC;gBAC/C,KAAK,yCAAyC,CAAC;gBAC/C,KAAK,4CAA4C,CAAC;gBAClD,KAAK,oCAAoC,CAAC;gBAC1C,KAAK,qCAAqC,CAAC;gBAC3C,KAAK,oCAAoC,CAAC;gBAC1C,KAAK,yCAAyC,CAAC;gBAC/C,KAAK,oCAAoC,CAAC;gBAC1C,KAAK,sCAAsC,CAAC;gBAC5C,KAAK,4CAA4C,CAAC;gBAClD,KAAK,wCAAwC,CAAC;gBAC9C,KAAK,4CAA4C,CAAC;gBAClD,KAAK,oCAAoC,CAAC;gBAC1C,KAAK,uCAAuC,CAAC;gBAC7C,KAAK,2CAA2C,CAAC;gBACjD,KAAK,oCAAoC,CAAC;gBAC1C,KAAK,sCAAsC,CAAC;gBAC5C,KAAK,yCAAyC,CAAC;gBAC/C,KAAK,uCAAuC,CAAC;gBAC7C,KAAK,qDAAqD;oBACtD,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC;oBACtB,MAAM;gBAEV,+BAA+B;gBAC/B,KAAK,mBAAmB,CAAC;gBACzB,KAAK,mBAAmB,CAAC;gBACzB,KAAK,4BAA4B,CAAC;gBAClC,KAAK,gCAAgC,CAAC;gBACtC,KAAK,qBAAqB,CAAC;gBAC3B,KAAK,0BAA0B,CAAC;gBAChC,KAAK,yBAAyB,CAAC;gBAC/B,KAAK,mBAAmB,CAAC;gBACzB,KAAK,4BAA4B;oBAC7B,sDAAsD;oBACtD,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;oBACvB,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC;oBACrB,MAAM;aACb;YAED,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,mCAAmC,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,mCAAmC,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,mCAAmC,CAAC,IAAI,CAAC,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EACvP;gBACI,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC;aACzB;YAED,IAAI,GAAwB,CAAC;YAC7B,IAAI,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC;YAE7B,QAAQ,MAAM,CAAC,IAAI,EAAE;gBACjB,KAAK,WAAW;oBACZ,GAAG,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;oBACnC,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC;oBAC5B,MAAM;gBACV,KAAK,OAAO;oBACR,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;oBAC/B,MAAM;gBACV,KAAK,OAAO;oBACR,GAAG,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;oBACnC,MAAM;gBACV,KAAK,QAAQ;oBACT,IAAI,MAAM,CAAC,MAAM,KAAK,IAAI,EAAE;wBACxB,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;wBAC9B,MAAM;qBACT;gBACL,KAAK,UAAU;oBACX,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;oBAChC,MAAM;gBACV,KAAK,UAAU;oBACX,GAAG,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;oBAClC,MAAM;gBACV,KAAK,SAAS;oBACV,GAAG,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;oBACjC,MAAM;gBACV,KAAK,OAAO;oBACR,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;oBAC/B,MAAM;gBACV;oBACI,OAAO,CAAC,GAAG,CAAC,uBAAuB,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;oBACnD,MAAM;aACb;YAED,IAAI,GAAG,EAAE;gBACL,IAAI,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE;oBAC5B,OAAO,CAAC,GAAG,CAAC,wCAAwC,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;oBACxE,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;oBACpB,SAAS;iBACZ;gBACD,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC;gBACjC,IAAI,MAAM,CAAC,WAAW,EAAE;oBACpB,IAAI,SAAS,GAAG,GAAG,CAAC,YAAY,IAAI,EAAE,CAAC;oBACvC,GAAG,CAAC,YAAY,GAAG,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;iBACnF;aACJ;SACJ;IACL,CAAC;IAEO,cAAc,CAAC,IAAW;QAC9B,IAAI,QAAQ,GAAG,IAAI,GAAG,EAAU,CAAC;QACjC,KAAK,IAAI,MAAM,IAAI,IAAI,EAAE;YACrB,IAAI,GAAG,GAAG,MAAM,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAEzG,IAAI,CAAC,GAAG,EAAE;gBAEN,QAAQ;gBACR,OAAO,CAAC,GAAG,CAAC,mCAAmC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;gBAElE,SAAS;aACZ;YAED,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;gBAClB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAA8B,CAAC,CAAC;aACtD;iBAAM;gBACH,IAAI,iBAAiB,GAAG,MAAM,CAAC,IAAI,KAAK,OAAO,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,IAAI,MAAM,CAAC,IAAI,IAAI,WAAW,IAAI,MAAM,CAAC,MAAM,CAAC;gBAC5H,IAAI,MAAM,GAAG,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAExI,wDAAwD;gBACxD,IAAI,CAAC,MAAM,EAAE;oBACT,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,QAAQ,OAAO,MAAM,CAAC,IAAI,CAAC,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,gBAAgB,MAAM,CAAC,QAAQ,wBAAwB,CAAC,CAAC;oBACxI,IAAI,KAAK,GAAa,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;oBACjD,IAAI,QAAQ,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;oBAC7B,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI;wBAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;oBAChG,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAA6B,CAAC;oBACnE,IAAI,MAAM,IAAI,IAAI,EAAE;wBAChB,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;wBAC/C,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,GAA6B,MAAM,CAAC;wBACpE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAA2B,MAAM,CAAC,CAAC;qBACxD;yBAAM;wBACH,OAAO,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;4BACxB,IAAI,SAAS,GAA6B,MAAM,CAAC;4BACjD,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;4BAChD,KAAK,CAAC,IAAI,CAA4B,MAAO,CAAC,IAAI,CAAC,CAAC;4BACpD,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAA6B,MAAM,CAAC;4BACpE,SAAS,CAAC,OAAO,CAAC,IAAI,CAA2B,MAAM,CAAC,CAAC;4BACnD,MAAO,CAAC,OAAO,GAAG,SAAS,CAAC;yBACrC;qBACJ;iBACJ;gBACD,uDAAuD;gBAEvD,IAAU,MAAO,CAAC,OAAO,EAAE;oBACjB,MAAO,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;iBACnC;qBAAM;oBACH,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;oBAC9C,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;iBACvB;gBAEK,GAAI,CAAC,OAAO,GAAG,MAAM,CAAC;gBAE5B,sDAAsD;gBACtD,IAAI,CAAE,MAAc,CAAC,IAAI,KAAK,OAAO,IAAK,MAAc,CAAC,IAAI,KAAK,WAAW,CAAC;uBACtE,GAAW,CAAC,IAAI,KAAK,UAAU;oBAClC,GAAW,CAAC,IAAI,GAAG,QAAQ,CAAC;gBACjC,uDAAuD;gBACvD,IAAK,MAAc,CAAC,IAAI,KAAK,WAAW,IAAK,GAAW,CAAC,IAAI,KAAK,UAAU,EAAE;oBAC1E,IAAI,MAAM,CAAC,IAAI,IAAI,UAAU;wBAAG,GAAW,CAAC,IAAI,GAAG,OAAO,CAAC;;wBACrD,GAAW,CAAC,IAAI,GAAG,KAAK,CAAC;iBAClC;aACJ;SACJ;IACL,CAAC;IAEO,kBAAkB,CAAC,IAAW;QAClC,KAAK,IAAI,MAAM,IAAI,IAAI,EAAE;YACrB,IAAI,GAAG,GAAG,MAAM,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YACzG,IAAI,CAAC,GAAG,EAAE;gBAEN,QAAQ;gBACR,OAAO,CAAC,GAAG,CAAC,oBAAoB,MAAM,CAAC,QAAQ,MAAM,CAAC,CAAC;gBAEvD,SAAS;aACZ;YACD,IAAI,CAAO,GAAI,CAAC,OAAO;gBAAE,SAAS;YAElC,IAAI,MAAM,CAAC,SAAS,EAAE,EAAC,4DAA4D;gBAC/E,IAAI,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;gBACzC,IAAI,CAAC,IAAI,IAAI,CAAO,IAAK,CAAC,OAAO;oBAC7B,MAAM,IAAI,MAAM,CAAC,QAAQ,0BAA0B,MAAM,CAAC,QAAQ,0BAA0B,CAAC;gBAEjG,IAAU,IAAK,CAAC,OAAO,CAAC,IAAI,IAAI,WAAW,EAAE;oBACnC,GAAI,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAO,GAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;oBACxE,GAAI,CAAC,OAAO,GAAG,IAAI,CAAC;iBAC7B;aACJ;SACJ;IACL,CAAC;IAEO,cAAc,CAAC,IAAW;QAC9B,KAAK,IAAI,MAAM,IAAI,IAAI,EAAE;YACrB,IAAI,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YACxC,IAAI,CAAC,GAAG,IAAI,MAAM,CAAC,IAAI,KAAK,OAAO;gBAAE,SAAS;YAE9C,IAAI,CAAC,GAAG,GAA2B,CAAC;YAEpC,mBAAmB;YACnB,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE;gBAC3C,KAAK,IAAI,OAAO,IAAI,MAAM,CAAC,QAAQ,EAAE;oBACjC,IAAI,IAAI,GAAW,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;oBAEjD,IAAI,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA,2EAA2E;oBAEtH,IAAI,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAoD,CAAC;oBAE7F,IAAI,CAAC,QAAQ,EAAE;wBACX,OAAO,CAAC,GAAG,CAAC,kCAAkC,OAAO,QAAQ,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;qBACnF;yBAAM;wBACH,IAAI,QAAQ,CAAC,IAAI,IAAI,OAAO,EAAE;4BAC1B,CAAC,CAAC,QAAQ,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;yBACvC;6BAAM;4BACH,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;yBACjD;qBACJ;iBACJ;aACJ;SACJ;IACL,CAAC;IAEO,eAAe,CAAC,MAAW;QAE/B;;;;;;;;;;;;;;;WAeG;QAEC,8CAA8C;QAElD,IAAI,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAE5C,OAAO,GAAG,CAAC;IACf,CAAC;IAEO,WAAW,CAAC,MAAW;QAC3B,IAAI,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAExC,IAAI,MAAM,GAAG,IAAI,CAAC;QAClB,IAAI,MAAM,CAAC,MAAM,EAAE;YACf,IAAI,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YACxC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YAC7B,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC;YAEzB,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACjB,IAAK,CAAC,OAAO,GAAG,GAAG,CAAC;SAC7B;QAED,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;QAEzC,IAAI,MAAM,CAAC,SAAS;YAChB,MAAM,CAAC,WAAW,GAAG,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC,+BAA+B;QAExG,OAAO,GAAG,CAAC;IACf,CAAC;IAEO,eAAe,CAAC,MAAW;QAC/B,OAAO,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IAEO,YAAY,CAAC,MAAW;QAC5B,IAAI,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAElC,IAAI,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAEjD,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;QAEvC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAE/B,OAAO,GAAG,CAAC;IACf,CAAC;IAEO,WAAW,CAAC,MAAW;QAE3B,IAAI,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAElC,IAAI,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAE9C,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAE/B,OAAO,GAAG,CAAC;IACf,CAAC;IAEO,UAAU,CAAC,MAAW;QAC1B,IAAI,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAE9C,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAE/B,OAAO,GAAG,CAAC;IACf,CAAC;IAEO,cAAc,CAAC,MAAW;QAC9B,IAAI,UAAU,GAAa,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;QAEzC,IAAI,MAAM,CAAC,OAAO,EAAE;YAChB,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;SAClD;QAED,IAAI,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;QAC7D,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAE5B,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;QAEjD,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAE/B,OAAO,GAAG,CAAC;IACf,CAAC;IAEO,aAAa,CAAC,MAAW;QAC7B,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACtC,IAAI,IAAI,GAAG,IAAI,CAAC;QAEhB,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE;YACnC,IAAI,UAAU,GAAG,EAAE,CAAC;YAEpB,KAAK,IAAI,OAAO,IAAI,MAAM,CAAC,UAAU,EAAE;gBACnC,IAAI,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;gBACtC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACtB,IAAI,OAAO,CAAC,WAAW;oBACnB,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;aAC7E;YAED,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;YAEzC,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE;gBAC3C,IAAI,iBAAiB,GAAG,EAAE,CAAC;gBAC3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;oBAC7C,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;iBAC7E;gBACD,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC7B,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;aACrD;SAEJ;aAAM;YACH,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,UAAU,EAAE;gBACpC,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACpD,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;aAChC;iBAAM;gBACH,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;aACjC;SACJ;QAED,IAAI,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAEhD,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QAEzC,OAAO,KAAK,CAAC;IACjB,CAAC;IAEO,SAAS,CAAC,MAAW,EAAE,GAAyD;QACpF,IAAI,UAAU,GAAoB,EAAE,CAAC;QAErC,IAAI,MAAM,CAAC,MAAM,EAAE;YAEf,IAAI,QAAQ,GAAG,KAAK,CAAC;YAErB,GAAG,CAAC,YAAY,GAAG,EAAE,CAAC;YAEtB,KAAK,IAAI,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE;gBAEhC,uBAAuB;gBACvB,IAAI,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE;oBAClC,OAAO,CAAC,GAAG,CAAC,yCAAyC,MAAM,CAAC,QAAQ,QAAQ,MAAM,CAAC,IAAI,CAAC,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;oBAE1H,IAAI,UAAU,GAAG,QAAQ,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,YAAY,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;oBACzG,IAAI,QAAQ,CAAC,WAAW;wBACpB,GAAG,CAAC,YAAY,IAAI,YAAY,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,EAAE,GAAG,UAAU,CAAC;yBAClH,IAAI,UAAU,CAAC,MAAM;wBACtB,GAAG,CAAC,YAAY,IAAI,YAAY,QAAQ,CAAC,IAAI,GAAG,GAAG,UAAU,CAAC;oBAClE,SAAS;iBACZ;gBACD,uBAAuB;gBAEvB,IAAI,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAC1E,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAEvB,IAAI,QAAQ,IAAI,QAAQ,CAAC,QAAQ,IAAI,IAAI,EAAE;oBACvC,OAAO,CAAC,GAAG,CAAC,+CAA+C,QAAQ,CAAC,IAAI,UAAU,MAAM,CAAC,QAAQ,QAAQ,MAAM,CAAC,IAAI,CAAC,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;oBACvJ,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC;iBAC5B;gBAED,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;gBAEnC,QAAQ,GAAG,QAAQ,IAAI,QAAQ,CAAC,QAAQ,KAAK,IAAI,CAAC;gBAElD,IAAI,UAAU,GAAG,QAAQ,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,YAAY,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;gBAEzG,IAAI,QAAQ,CAAC,WAAW;oBACpB,GAAG,CAAC,YAAY,IAAI,YAAY,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,EAAE,GAAG,UAAU,CAAC;qBAClH,IAAI,UAAU,CAAC,MAAM;oBACtB,GAAG,CAAC,YAAY,IAAI,YAAY,QAAQ,CAAC,IAAI,GAAG,GAAG,UAAU,CAAC;aACrE;SACJ;QAED,GAAG,CAAC,UAAU,GAAG,UAAU,CAAC;IAChC,CAAC;IAEO,SAAS,CAAC,OAAY;QAC1B,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;YAC3B,OAAO,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC;SACvB;aAAM;YACH,IAAI,KAAK,GAAG,EAAE,CAAC;YACf,KAAK,IAAI,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE;gBAEjC,IAAI,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;gBAElC,IAAI,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;gBAErE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACpB;YACD,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC;gBAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;;gBAClC,OAAO,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SACvC;IACL,CAAC;IAEO,eAAe,CAAC,IAAY;QAChC,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE;YACzB,IAAI,GAAY,IAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAChD;QACD,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,KAAK,oBAAoB,EAAE;YAC3D,IAAI,GAAY,IAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAC/C;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAEO,eAAe,CAAC,IAAY;QAChC,IAAI,IAAI,KAAK,OAAO;YAAE,OAAO,QAAQ,CAAC;QACtC,IAAI,IAAI,KAAK,UAAU;YAAE,OAAO,UAAU,CAAC;QAC3C,IAAI,IAAI,KAAK,oBAAoB;YAAE,OAAO,YAAY,CAAC;QACvD,IAAI,IAAI,KAAK,OAAO;YAAE,OAAO,OAAO,CAAC;QAErC,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;YAC3B,IAAI,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;YAE1C,IAAI,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE;gBACvB,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;aAClD;SACJ;aAAM,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;YACnC,IAAI,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;YAE3C,IAAI,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE;gBACvB,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE;oBAC/B,IAAI,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;oBAClC,OAAO,UAAU,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;iBAC1F;qBAAM;oBACH,OAAO,mBAAmB,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;iBACjE;aACJ;SACJ;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;IAEO,YAAY,CAAC,MAAW,EAAE,GAAwC;QACtE,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,gBAAgB,CAAC,IAAI,CAAC;QACtC,IAAI,MAAM,CAAC,QAAQ,KAAK,IAAI,EAAE;YAC1B,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC;YACrC,IAAI,IAAI,GAAwB,GAAI,CAAC,IAAI,CAAC;YAC1C,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;gBAC3B,IAAI,IAAI,CAAC,IAAI,IAAI,KAAK;oBAClB,OAAO,CAAC,GAAG,CAAC,uDAAuD,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;gBAC1F,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,mBAAmB;aACpD;SACJ;aAAM,IAAI,MAAM,CAAC,QAAQ,KAAK,IAAI,EAAE,EAAC,qDAAqD;YACvF,IAAI,GAAG,CAAC,MAAM,CAAC,KAAK,WAAW;gBAAE,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC;;gBACrE,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,gBAAgB,CAAC,QAAQ,CAAC;SACnD;QACD,QAAQ,MAAM,CAAC,MAAM,EAAE;YACnB,KAAK,WAAW;gBACZ,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,gBAAgB,CAAC,SAAS,CAAC;gBAC5C,MAAM;YACV,KAAK,SAAS;gBACV,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,gBAAgB,CAAC,OAAO,CAAC;gBAC1C,MAAM;SACb;QACD,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,IAAI,KAAK,UAAU;YAAE,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,gBAAgB,CAAC,QAAQ,CAAC;QAC9F,IAAI,MAAM,CAAC,KAAK,KAAK,QAAQ;YAAE,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,gBAAgB,CAAC,MAAM,CAAC;IAC5E,CAAC;IAEO,cAAc,CAAC,MAAW,EAAE,GAAwG,EAAE,MAAuB;QACjK,IAAI,MAAM,CAAC,IAAI;YACX,KAAK,IAAI,GAAG,IAAI,MAAM,CAAC,IAAI,EAAE;gBACzB,IAAI,GAAG,CAAC,aAAa,KAAK,SAAS,EAAE;oBAEjC;;;;;;uBAMG;oBACH,MAAM,OAAO,GAAY,GAAG,CAAC,KAAM,CAAC,KAAK,CAAC,+EAA+E,CAAC,CAAC;oBAC3H,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,CAAC,GAAG,OAAO,CAAC;oBAE9D,MAAM,SAAS,GAAG,GAAG,CAAC,MAAM,CAAC,aAAa,CACtC,KAAK,EACL,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CACzD,CAAC;oBAEF,IAAG,YAAY,IAAI,IAAI,EAAE;wBACrB,SAAS,CAAC,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;qBAClE;oBAE2E,GAAI,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;oBAChH,eAAe,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;iBAExC;qBAAM,IAAI,GAAG,CAAC,aAAa,KAAK,YAAY,EAAE;oBAC3C,IAAI,OAAO,GAAY,GAAG,CAAC,KAAM,CAAC,KAAK,CAAC,mDAAmD,CAAC,CAAC;oBAC7F,IAAI,YAAY,GAAW,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;oBAE5D,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC;iBACnE;aACJ;QAEL,SAAS,eAAe,CAAC,aAAqB,EAAE,YAAoB;YAChE,IAAI,aAAa,IAAI,IAAI,EAAE;gBACvB,IAAI,SAAS,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACzC,IAAI,MAAM,IAAI,IAAI,EAAE;oBAChB,KAAK,IAAI,KAAK,IAAI,MAAM,EAAE;wBACtB,IAAI,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE;4BACrC,KAAK,CAAC,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;yBAC5D;qBACJ;iBACJ;gBACD,IAAI,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,EAAC,kCAAkC;oBAC7C,GAAI,CAAC,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;iBAC3F;gBACD,IAAI,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,EAAC,gCAAgC;oBACzC,GAAI,CAAC,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;iBACrF;aACJ;QACL,CAAC;IACL,CAAC;CAEJ;AA3lBD,wBA2lBC"} \ No newline at end of file diff --git a/scripts/tsgen/src/Parser.ts b/scripts/tsgen/src/Parser.ts index b880b6e5c..d05d962de 100644 --- a/scripts/tsgen/src/Parser.ts +++ b/scripts/tsgen/src/Parser.ts @@ -554,10 +554,29 @@ export class Parser { if (doclet.tags) for (let tag of doclet.tags) { if (tag.originalTitle === 'generic') { - let matches = (tag.value).match(/(?:(?:{)([^}]+)(?:}))?\s?([^\s]+)(?:\s?-\s?(?:\[)(.+)(?:\]))?/); - let typeParam = dom.create.typeParameter(matches[2], matches[1] == null ? null : dom.create.typeParameter(matches[1])); + + /** + * {string} K - [key] + * 1 = string | 2 = null | 3 = K | 4 = key + * + * {string=string} K - [key] + * 1 = string | 2 = string | 3 = K | 4 = key + */ + const matches = (tag.value).match(/(?:(?:{)([^}=]+)(?:=)?([^}=]+)?(?:}))?\s?([^\s]+)(?:\s?-\s?(?:\[)(.+)(?:\]))?/); + const [_, _type, _defaultType, _name, _paramsNames] = matches; + + const typeParam = dom.create.typeParameter( + _name, + _type == null ? null : dom.create.typeParameter(_type) + ); + + if(_defaultType != null) { + typeParam.defaultType = dom.create.typeParameter(_defaultType); + } + (obj).typeParameters.push(typeParam); - handleOverrides(matches[3], matches[2]); + handleOverrides(_paramsNames, _name); + } else if (tag.originalTitle === 'genericUse') { let matches = (tag.value).match(/(?:(?:{)([^}]+)(?:}))(?:\s?-\s?(?:\[)(.+)(?:\]))?/); let overrideType: string = this.prepareTypeName(matches[1]); From a1cf6e4456e8cbb5dd74487dd720927aa7a13031 Mon Sep 17 00:00:00 2001 From: Chnapy Date: Thu, 2 Jan 2020 21:54:45 +0100 Subject: [PATCH 028/189] add generics for Scene and its config key --- src/scene/Scene.js | 3 +++ src/scene/typedefs/SettingsConfig.js | 4 +++- types/phaser.d.ts | 10 +++++----- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/scene/Scene.js b/src/scene/Scene.js index 0d4a5ba99..d011b3875 100644 --- a/src/scene/Scene.js +++ b/src/scene/Scene.js @@ -17,6 +17,9 @@ var Systems = require('./Systems'); * @memberof Phaser * @constructor * @since 3.0.0 + * + * @generic {string=string} K + * @genericUse {K | Phaser.Types.Scenes.SettingsConfig.} - [config] * * @param {(string|Phaser.Types.Scenes.SettingsConfig)} config - Scene specific configuration settings. */ diff --git a/src/scene/typedefs/SettingsConfig.js b/src/scene/typedefs/SettingsConfig.js index 1b774fa17..a77af51d1 100644 --- a/src/scene/typedefs/SettingsConfig.js +++ b/src/scene/typedefs/SettingsConfig.js @@ -1,8 +1,10 @@ /** * @typedef {object} Phaser.Types.Scenes.SettingsConfig * @since 3.0.0 + * + * @generic {string=string} K - [key] * - * @property {string} [key] - The unique key of this Scene. Must be unique within the entire Game instance. + * @property {K} [key] - The unique key of this Scene. Must be unique within the entire Game instance. * @property {boolean} [active=false] - Does the Scene start as active or not? An active Scene updates each step. * @property {boolean} [visible=true] - Does the Scene start as visible or not? A visible Scene renders each step. * @property {(false|Phaser.Types.Loader.FileTypes.PackFileConfig)} [pack=false] - An optional Loader Packfile to be loaded before the Scene begins. diff --git a/types/phaser.d.ts b/types/phaser.d.ts index 0eb28ba81..1aed73d16 100644 --- a/types/phaser.d.ts +++ b/types/phaser.d.ts @@ -50758,7 +50758,7 @@ declare namespace Phaser { /** * If provided as an array, the range defined by `start` and `end` will be ignored and these frame numbers will be used. */ - frames?: boolean; + frames?: boolean | integer[]; }; type GenerateFrameNumbers = { @@ -55726,11 +55726,11 @@ declare namespace Phaser { data?: any; }; - type SettingsConfig = { + type SettingsConfig = { /** * The unique key of this Scene. Must be unique within the entire Game instance. */ - key?: string; + key?: K; /** * Does the Scene start as active or not? An active Scene updates each step. */ @@ -74723,12 +74723,12 @@ declare namespace Phaser { * * You can also define the optional methods {@link Phaser.Types.Scenes.SceneInitCallback init()}, {@link Phaser.Types.Scenes.ScenePreloadCallback preload()}, and {@link Phaser.Types.Scenes.SceneCreateCallback create()}. */ - class Scene { + class Scene { /** * * @param config Scene specific configuration settings. */ - constructor(config: string | Phaser.Types.Scenes.SettingsConfig); + constructor(config: K | Phaser.Types.Scenes.SettingsConfig); /** * The Scene Systems. You must never overwrite this property, or all hell will break lose. From 6e05e0252f02fe5179e8aea63b810e6ad5880153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Garc=C3=ADa=20=C3=81lvarez?= Date: Fri, 3 Jan 2020 09:37:59 +0100 Subject: [PATCH 029/189] Added some documentation for Spline curves. --- src/curves/SplineCurve.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/curves/SplineCurve.js b/src/curves/SplineCurve.js index d1db43c57..8c813b7f8 100644 --- a/src/curves/SplineCurve.js +++ b/src/curves/SplineCurve.js @@ -13,7 +13,7 @@ var Vector2 = require('../math/Vector2'); /** * @classdesc - * [description] + * Create a smooth 2d spline curve from a series of points. * * @class Spline * @extends Phaser.Curves.Curve @@ -21,7 +21,7 @@ var Vector2 = require('../math/Vector2'); * @constructor * @since 3.0.0 * - * @param {Phaser.Math.Vector2[]} [points] - [description] + * @param {(Phaser.Math.Vector2[]|number[]|number[][])} [points] - The points that configure the curve. */ var SplineCurve = new Class({ @@ -36,7 +36,7 @@ var SplineCurve = new Class({ Curve.call(this, 'SplineCurve'); /** - * [description] + * The Vector2 points that configure the curve. * * @name Phaser.Curves.Spline#points * @type {Phaser.Math.Vector2[]} @@ -49,12 +49,12 @@ var SplineCurve = new Class({ }, /** - * [description] + * Add a list of points to the current list of Vector2 points of the curve. * * @method Phaser.Curves.Spline#addPoints * @since 3.0.0 * - * @param {(Phaser.Math.Vector2[]|number[]|number[][])} points - [description] + * @param {(Phaser.Math.Vector2[]|number[]|number[][])} points - The points that configure the curve. * * @return {Phaser.Curves.Spline} This curve object. */ @@ -89,15 +89,15 @@ var SplineCurve = new Class({ }, /** - * [description] + * Add a point to the current list of Vector2 points of the curve. * * @method Phaser.Curves.Spline#addPoint * @since 3.0.0 * - * @param {number} x - [description] - * @param {number} y - [description] + * @param {number} x - The x coordinate of this curve + * @param {number} y - The y coordinate of this curve * - * @return {Phaser.Math.Vector2} [description] + * @return {Phaser.Math.Vector2} The new Vector2 added to the curve */ addPoint: function (x, y) { @@ -176,7 +176,7 @@ var SplineCurve = new Class({ }, /** - * [description] + * Exports a JSON object containing this curve data. * * @method Phaser.Curves.Spline#toJSON * @since 3.0.0 @@ -202,14 +202,14 @@ var SplineCurve = new Class({ }); /** - * [description] + * Imports a JSON object containing this curve data. * * @function Phaser.Curves.Spline.fromJSON * @since 3.0.0 * * @param {Phaser.Types.Curves.JSONCurve} data - The JSON object containing this curve data. * - * @return {Phaser.Curves.Spline} [description] + * @return {Phaser.Curves.Spline} The spline curve created. */ SplineCurve.fromJSON = function (data) { From 094e322acef2a969bd1cde680d395336fbfd918a Mon Sep 17 00:00:00 2001 From: Chnapy Date: Fri, 3 Jan 2020 12:37:50 +0100 Subject: [PATCH 030/189] Revert "add generics for Scene and its config key" This reverts commit a1cf6e4456e8cbb5dd74487dd720927aa7a13031. --- src/scene/Scene.js | 3 --- src/scene/typedefs/SettingsConfig.js | 4 +--- types/phaser.d.ts | 10 +++++----- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/scene/Scene.js b/src/scene/Scene.js index d011b3875..0d4a5ba99 100644 --- a/src/scene/Scene.js +++ b/src/scene/Scene.js @@ -17,9 +17,6 @@ var Systems = require('./Systems'); * @memberof Phaser * @constructor * @since 3.0.0 - * - * @generic {string=string} K - * @genericUse {K | Phaser.Types.Scenes.SettingsConfig.} - [config] * * @param {(string|Phaser.Types.Scenes.SettingsConfig)} config - Scene specific configuration settings. */ diff --git a/src/scene/typedefs/SettingsConfig.js b/src/scene/typedefs/SettingsConfig.js index a77af51d1..1b774fa17 100644 --- a/src/scene/typedefs/SettingsConfig.js +++ b/src/scene/typedefs/SettingsConfig.js @@ -1,10 +1,8 @@ /** * @typedef {object} Phaser.Types.Scenes.SettingsConfig * @since 3.0.0 - * - * @generic {string=string} K - [key] * - * @property {K} [key] - The unique key of this Scene. Must be unique within the entire Game instance. + * @property {string} [key] - The unique key of this Scene. Must be unique within the entire Game instance. * @property {boolean} [active=false] - Does the Scene start as active or not? An active Scene updates each step. * @property {boolean} [visible=true] - Does the Scene start as visible or not? A visible Scene renders each step. * @property {(false|Phaser.Types.Loader.FileTypes.PackFileConfig)} [pack=false] - An optional Loader Packfile to be loaded before the Scene begins. diff --git a/types/phaser.d.ts b/types/phaser.d.ts index 1aed73d16..0eb28ba81 100644 --- a/types/phaser.d.ts +++ b/types/phaser.d.ts @@ -50758,7 +50758,7 @@ declare namespace Phaser { /** * If provided as an array, the range defined by `start` and `end` will be ignored and these frame numbers will be used. */ - frames?: boolean | integer[]; + frames?: boolean; }; type GenerateFrameNumbers = { @@ -55726,11 +55726,11 @@ declare namespace Phaser { data?: any; }; - type SettingsConfig = { + type SettingsConfig = { /** * The unique key of this Scene. Must be unique within the entire Game instance. */ - key?: K; + key?: string; /** * Does the Scene start as active or not? An active Scene updates each step. */ @@ -74723,12 +74723,12 @@ declare namespace Phaser { * * You can also define the optional methods {@link Phaser.Types.Scenes.SceneInitCallback init()}, {@link Phaser.Types.Scenes.ScenePreloadCallback preload()}, and {@link Phaser.Types.Scenes.SceneCreateCallback create()}. */ - class Scene { + class Scene { /** * * @param config Scene specific configuration settings. */ - constructor(config: K | Phaser.Types.Scenes.SettingsConfig); + constructor(config: string | Phaser.Types.Scenes.SettingsConfig); /** * The Scene Systems. You must never overwrite this property, or all hell will break lose. From 265bfc76fbecd751a059a229a9480dae21f0569a Mon Sep 17 00:00:00 2001 From: Chnapy Date: Fri, 3 Jan 2020 13:00:42 +0100 Subject: [PATCH 031/189] improve typings: EventEmitter --- src/events/EventEmitter.js | 16 ++++++++-------- types/phaser.d.ts | 18 +++++++++--------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/events/EventEmitter.js b/src/events/EventEmitter.js index bd489222e..cabbf4b7f 100644 --- a/src/events/EventEmitter.js +++ b/src/events/EventEmitter.js @@ -58,7 +58,7 @@ var EventEmitter = new Class({ * @method Phaser.Events.EventEmitter#eventNames * @since 3.0.0 * - * @return {array} + * @return {Array.} */ /** @@ -69,7 +69,7 @@ var EventEmitter = new Class({ * * @param {(string|symbol)} event - The event name. * - * @return {array} The registered listeners. + * @return {Function[]} The registered listeners. */ /** @@ -105,7 +105,7 @@ var EventEmitter = new Class({ * @param {function} fn - The listener function. * @param {*} [context=this] - The context to invoke the listener with. * - * @return {Phaser.Events.EventEmitter} `this`. + * @return {this} `this`. */ /** @@ -118,7 +118,7 @@ var EventEmitter = new Class({ * @param {function} fn - The listener function. * @param {*} [context=this] - The context to invoke the listener with. * - * @return {Phaser.Events.EventEmitter} `this`. + * @return {this} `this`. */ /** @@ -131,7 +131,7 @@ var EventEmitter = new Class({ * @param {function} fn - The listener function. * @param {*} [context=this] - The context to invoke the listener with. * - * @return {Phaser.Events.EventEmitter} `this`. + * @return {this} `this`. */ /** @@ -145,7 +145,7 @@ var EventEmitter = new Class({ * @param {*} [context] - Only remove the listeners that have this context. * @param {boolean} [once] - Only remove one-time listeners. * - * @return {Phaser.Events.EventEmitter} `this`. + * @return {this} `this`. */ /** @@ -159,7 +159,7 @@ var EventEmitter = new Class({ * @param {*} [context] - Only remove the listeners that have this context. * @param {boolean} [once] - Only remove one-time listeners. * - * @return {Phaser.Events.EventEmitter} `this`. + * @return {this} `this`. */ /** @@ -170,7 +170,7 @@ var EventEmitter = new Class({ * * @param {(string|symbol)} [event] - The event name. * - * @return {Phaser.Events.EventEmitter} `this`. + * @return {this} `this`. */ PluginCache.register('EventEmitter', EventEmitter, 'events'); diff --git a/types/phaser.d.ts b/types/phaser.d.ts index 0eb28ba81..43b74e683 100644 --- a/types/phaser.d.ts +++ b/types/phaser.d.ts @@ -7876,13 +7876,13 @@ declare namespace Phaser { /** * Return an array listing the events for which the emitter has registered listeners. */ - eventNames(): any[]; + eventNames(): (string|symbol)[]; /** * Return the listeners registered for a given event. * @param event The event name. */ - listeners(event: string | symbol): any[]; + listeners(event: string | symbol): Function[]; /** * Return the number of listeners listening to a given event. @@ -7903,7 +7903,7 @@ declare namespace Phaser { * @param fn The listener function. * @param context The context to invoke the listener with. Default this. */ - on(event: string | symbol, fn: Function, context?: any): Phaser.Events.EventEmitter; + on(event: string | symbol, fn: Function, context?: any): this; /** * Add a listener for a given event. @@ -7911,7 +7911,7 @@ declare namespace Phaser { * @param fn The listener function. * @param context The context to invoke the listener with. Default this. */ - addListener(event: string | symbol, fn: Function, context?: any): Phaser.Events.EventEmitter; + addListener(event: string | symbol, fn: Function, context?: any): this; /** * Add a one-time listener for a given event. @@ -7919,7 +7919,7 @@ declare namespace Phaser { * @param fn The listener function. * @param context The context to invoke the listener with. Default this. */ - once(event: string | symbol, fn: Function, context?: any): Phaser.Events.EventEmitter; + once(event: string | symbol, fn: Function, context?: any): this; /** * Remove the listeners of a given event. @@ -7928,7 +7928,7 @@ declare namespace Phaser { * @param context Only remove the listeners that have this context. * @param once Only remove one-time listeners. */ - removeListener(event: string | symbol, fn?: Function, context?: any, once?: boolean): Phaser.Events.EventEmitter; + removeListener(event: string | symbol, fn?: Function, context?: any, once?: boolean): this; /** * Remove the listeners of a given event. @@ -7937,13 +7937,13 @@ declare namespace Phaser { * @param context Only remove the listeners that have this context. * @param once Only remove one-time listeners. */ - off(event: string | symbol, fn?: Function, context?: any, once?: boolean): Phaser.Events.EventEmitter; + off(event: string | symbol, fn?: Function, context?: any, once?: boolean): this; /** * Remove all listeners, or those of the specified event. * @param event The event name. */ - removeAllListeners(event?: string | symbol): Phaser.Events.EventEmitter; + removeAllListeners(event?: string | symbol): this; } @@ -50758,7 +50758,7 @@ declare namespace Phaser { /** * If provided as an array, the range defined by `start` and `end` will be ignored and these frame numbers will be used. */ - frames?: boolean; + frames?: boolean | integer[]; }; type GenerateFrameNumbers = { From 9bb02d57ef618a3ca759734c79f3648570bfb0b1 Mon Sep 17 00:00:00 2001 From: Chnapy Date: Fri, 3 Jan 2020 13:21:50 +0100 Subject: [PATCH 032/189] improve typings: getPoints functions --- src/curves/Curve.js | 2 ++ src/geom/ellipse/Ellipse.js | 6 ++++-- src/geom/line/Line.js | 2 +- src/geom/polygon/Polygon.js | 6 ++++-- types/phaser.d.ts | 8 ++++---- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/curves/Curve.js b/src/curves/Curve.js index 36b8023b4..45697c14c 100644 --- a/src/curves/Curve.js +++ b/src/curves/Curve.js @@ -295,6 +295,8 @@ var Curve = new Class({ * @method Phaser.Curves.Curve#getPoints * @since 3.0.0 * + * @generic {Phaser.Math.Vector2[]} O - [out,$return] + * * @param {integer} divisions - The number of evenly spaced points from the curve to return. If falsy, step param will be used to calculate the number of points. * @param {number} step - Step between points. Used to calculate the number of points to return when divisions is falsy. Ignored if divisions is positive. * @param {(array|Phaser.Math.Vector2[])} [out] - An optional array to store the points in. diff --git a/src/geom/ellipse/Ellipse.js b/src/geom/ellipse/Ellipse.js index 0bbd35184..80c23c114 100644 --- a/src/geom/ellipse/Ellipse.js +++ b/src/geom/ellipse/Ellipse.js @@ -135,11 +135,13 @@ var Ellipse = new Class({ * @method Phaser.Geom.Ellipse#getPoints * @since 3.0.0 * + * @generic {Phaser.Geom.Point[]} O - [output,$return] + * * @param {integer} quantity - The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead. * @param {number} [stepRate] - Sets the quantity by getting the circumference of the ellipse and dividing it by the stepRate. - * @param {array} [output] - An array to insert the points in to. If not provided a new array will be created. + * @param {(array|Phaser.Geom.Point[])} [output] - An array to insert the points in to. If not provided a new array will be created. * - * @return {Phaser.Geom.Point[]} An array of Point objects pertaining to the points around the circumference of the ellipse. + * @return {(array|Phaser.Geom.Point[])} An array of Point objects pertaining to the points around the circumference of the ellipse. */ getPoints: function (quantity, stepRate, output) { diff --git a/src/geom/line/Line.js b/src/geom/line/Line.js index 09b3f87b1..e99817234 100644 --- a/src/geom/line/Line.js +++ b/src/geom/line/Line.js @@ -113,7 +113,7 @@ var Line = new Class({ * @method Phaser.Geom.Line#getPoints * @since 3.0.0 * - * @generic {Phaser.Geom.Point} O - [output,$return] + * @generic {Phaser.Geom.Point[]} O - [output,$return] * * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead. * @param {integer} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`. diff --git a/src/geom/polygon/Polygon.js b/src/geom/polygon/Polygon.js index 2d04e1d9f..4133d3892 100644 --- a/src/geom/polygon/Polygon.js +++ b/src/geom/polygon/Polygon.js @@ -211,11 +211,13 @@ var Polygon = new Class({ * @method Phaser.Geom.Polygon#getPoints * @since 3.12.0 * + * @generic {Phaser.Geom.Point[]} O - [output,$return] + * * @param {integer} quantity - The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead. * @param {number} [stepRate] - Sets the quantity by getting the perimeter of the Polygon and dividing it by the stepRate. - * @param {array} [output] - An array to insert the points in to. If not provided a new array will be created. + * @param {(array|Phaser.Geom.Point[])} [output] - An array to insert the points in to. If not provided a new array will be created. * - * @return {Phaser.Geom.Point[]} An array of Point objects pertaining to the points around the perimeter of the Polygon. + * @return {(array|Phaser.Geom.Point[])} An array of Point objects pertaining to the points around the perimeter of the Polygon. */ getPoints: function (quantity, step, output) { diff --git a/types/phaser.d.ts b/types/phaser.d.ts index 43b74e683..39a845498 100644 --- a/types/phaser.d.ts +++ b/types/phaser.d.ts @@ -5178,7 +5178,7 @@ declare namespace Phaser { * @param step Step between points. Used to calculate the number of points to return when divisions is falsy. Ignored if divisions is positive. * @param out An optional array to store the points in. */ - getPoints(divisions: integer, step: number, out?: any[] | Phaser.Math.Vector2[]): any[] | Phaser.Math.Vector2[]; + getPoints(divisions: integer, step: number, out?: O): O; /** * [description] @@ -38275,7 +38275,7 @@ declare namespace Phaser { * @param stepRate Sets the quantity by getting the circumference of the ellipse and dividing it by the stepRate. * @param output An array to insert the points in to. If not provided a new array will be created. */ - getPoints(quantity: integer, stepRate?: number, output?: any[]): Phaser.Geom.Point[]; + getPoints(quantity: integer, stepRate?: number, output?: O): O; /** * Returns a uniformly distributed random point from anywhere within the given Ellipse. @@ -38807,7 +38807,7 @@ declare namespace Phaser { * @param stepRate The distance between each point on the line. When set, `quantity` is implied and should be set to `0`. * @param output An optional array of Points, or point-like objects, to store the coordinates of the points on the line. */ - getPoints(quantity: integer, stepRate?: integer, output?: O): O; + getPoints(quantity: integer, stepRate?: integer, output?: O): O; /** * Get a random Point on the Line. @@ -39218,7 +39218,7 @@ declare namespace Phaser { * @param stepRate Sets the quantity by getting the perimeter of the Polygon and dividing it by the stepRate. * @param output An array to insert the points in to. If not provided a new array will be created. */ - getPoints(quantity: integer, stepRate?: number, output?: any[]): Phaser.Geom.Point[]; + getPoints(quantity: integer, stepRate?: number, output?: O): O; /** * Reverses the order of the points of a Polygon. From bee0a96542880f5486006eeb3d46f83923eb5106 Mon Sep 17 00:00:00 2001 From: samme Date: Fri, 3 Jan 2020 13:34:05 -0800 Subject: [PATCH 033/189] Docs for Phaser.Curves.Curve and Phaser.Curves.Path And whitespace --- src/curves/Curve.js | 88 +++++++++++++++++++++++++---------------- src/curves/path/Path.js | 12 +++--- 2 files changed, 60 insertions(+), 40 deletions(-) diff --git a/src/curves/Curve.js b/src/curves/Curve.js index 36b8023b4..4d79a8adb 100644 --- a/src/curves/Curve.js +++ b/src/curves/Curve.js @@ -20,7 +20,7 @@ var Vector2 = require('../math/Vector2'); * @constructor * @since 3.0.0 * - * @param {string} type - [description] + * @param {string} type - The curve type. */ var Curve = new Class({ @@ -78,7 +78,7 @@ var Curve = new Class({ this.needsUpdate = true; /** - * [description] + * For a curve on a Path, `false` means the Path will ignore this curve. * * @name Phaser.Curves.Curve#active * @type {boolean} @@ -131,7 +131,7 @@ var Curve = new Class({ // So you can chain graphics calls return graphics.strokePoints(this.getPoints(pointsTotal)); }, - + /** * Returns a Rectangle where the position and dimensions match the bounds of this Curve. * @@ -187,7 +187,7 @@ var Curve = new Class({ }, /** - * [description] + * Get a point at the end of the curve. * * @method Phaser.Curves.Curve#getEndPoint * @since 3.0.0 @@ -209,7 +209,7 @@ var Curve = new Class({ * @method Phaser.Curves.Curve#getLength * @since 3.0.0 * - * @return {number} [description] + * @return {number} The total length of the curve. */ getLength: function () { @@ -220,14 +220,22 @@ var Curve = new Class({ /** - * Get list of cumulative segment lengths + * Get a list of cumulative segment lengths. + * + * These lengths are + * + * - [0] 0 + * - [1] The first segment + * - [2] The first and second segment + * - ... + * - [divisions] All segments * * @method Phaser.Curves.Curve#getLengths * @since 3.0.0 * - * @param {integer} [divisions] - [description] + * @param {integer} [divisions] - The number of divisions or segments. * - * @return {number[]} [description] + * @return {number[]} An array of cumulative lengths. */ getLengths: function (divisions) { @@ -268,17 +276,17 @@ var Curve = new Class({ // - u [0 .. 1] /** - * [description] + * Get a point at a relative position on the curve, by arc length. * * @method Phaser.Curves.Curve#getPointAt * @since 3.0.0 * * @generic {Phaser.Math.Vector2} O - [out,$return] * - * @param {number} u - [description] - * @param {Phaser.Math.Vector2} [out] - [description] + * @param {number} u - The relative position, [0..1]. + * @param {Phaser.Math.Vector2} [out] - A point to store the result in. * - * @return {Phaser.Math.Vector2} [description] + * @return {Phaser.Math.Vector2} The point. */ getPointAt: function (u, out) { @@ -290,13 +298,23 @@ var Curve = new Class({ // Get sequence of points using getPoint( t ) /** - * [description] + * Get a sequence of evenly spaced points from the curve. + * + * You can pass `divisions`, `stepRate`, or neither. + * + * The number of divisions will be + * + * 1. `divisions`, if `divisions` > 0; or + * 2. `this.getLength / stepRate`, if `stepRate` > 0; or + * 3. `this.defaultDivisions` + * + * `1 + divisions` points will be returned. * * @method Phaser.Curves.Curve#getPoints * @since 3.0.0 * - * @param {integer} divisions - The number of evenly spaced points from the curve to return. If falsy, step param will be used to calculate the number of points. - * @param {number} step - Step between points. Used to calculate the number of points to return when divisions is falsy. Ignored if divisions is positive. + * @param {integer} [divisions] - The number of divisions to make. + * @param {number} [stepRate] - The curve distance between points, implying `divisions`. * @param {(array|Phaser.Math.Vector2[])} [out] - An optional array to store the points in. * * @return {(array|Phaser.Math.Vector2[])} An array of Points from the curve. @@ -327,16 +345,16 @@ var Curve = new Class({ }, /** - * [description] + * Get a random point from the curve. * * @method Phaser.Curves.Curve#getRandomPoint * @since 3.0.0 * * @generic {Phaser.Math.Vector2} O - [out,$return] * - * @param {Phaser.Math.Vector2} [out] - [description] + * @param {Phaser.Math.Vector2} [out] - A point object to store the result in. * - * @return {Phaser.Math.Vector2} [description] + * @return {Phaser.Math.Vector2} The point. */ getRandomPoint: function (out) { @@ -348,16 +366,18 @@ var Curve = new Class({ // Get sequence of points using getPointAt( u ) /** - * [description] + * Get a sequence of equally spaced points (by arc distance) from the curve. + * + * `1 + divisions` points will be returned. * * @method Phaser.Curves.Curve#getSpacedPoints * @since 3.0.0 * - * @param {integer} [divisions] - The number of evenly spaced points from the curve to return. If falsy, step param will be used to calculate the number of points. - * @param {number} [step] - Step between points. Used to calculate the number of points to return when divisions is falsy. Ignored if divisions is positive. + * @param {integer} [divisions=this.defaultDivisions] - The number of divisions to make. + * @param {number} [stepRate] - Step between points. Used to calculate the number of points to return when divisions is falsy. Ignored if divisions is positive. * @param {(array|Phaser.Math.Vector2[])} [out] - An optional array to store the points in. * - * @return {Phaser.Math.Vector2[]} [description] + * @return {Phaser.Math.Vector2[]} An array of points. */ getSpacedPoints: function (divisions, stepRate, out) { @@ -387,16 +407,16 @@ var Curve = new Class({ }, /** - * [description] + * Get a point at the start of the curve. * * @method Phaser.Curves.Curve#getStartPoint * @since 3.0.0 * * @generic {Phaser.Math.Vector2} O - [out,$return] * - * @param {Phaser.Math.Vector2} [out] - [description] + * @param {Phaser.Math.Vector2} [out] - A point to store the result in. * - * @return {Phaser.Math.Vector2} [description] + * @return {Phaser.Math.Vector2} The point. */ getStartPoint: function (out) { @@ -406,7 +426,7 @@ var Curve = new Class({ }, /** - * Returns a unit vector tangent at t + * Get a unit vector tangent at a relative position on the curve. * In case any sub curve does not implement its tangent derivation, * 2 points a small delta apart will be used to find its gradient * which seems to give a reasonable approximation @@ -416,8 +436,8 @@ var Curve = new Class({ * * @generic {Phaser.Math.Vector2} O - [out,$return] * - * @param {number} t - [description] - * @param {Phaser.Math.Vector2} [out] - [description] + * @param {number} t - The relative position on the curve, [0..1]. + * @param {Phaser.Math.Vector2} [out] - A vector to store the result in. * * @return {Phaser.Math.Vector2} Vector approximating the tangent line at the point t (delta +/- 0.0001) */ @@ -448,17 +468,17 @@ var Curve = new Class({ }, /** - * [description] + * Get a unit vector tangent at a relative position on the curve, by arc length. * * @method Phaser.Curves.Curve#getTangentAt * @since 3.0.0 * * @generic {Phaser.Math.Vector2} O - [out,$return] * - * @param {number} u - [description] - * @param {Phaser.Math.Vector2} [out] - [description] + * @param {number} u - The relative position on the curve, [0..1]. + * @param {Phaser.Math.Vector2} [out] - A vector to store the result in. * - * @return {Phaser.Math.Vector2} [description] + * @return {Phaser.Math.Vector2} The tangent vector. */ getTangentAt: function (u, out) { @@ -573,10 +593,12 @@ var Curve = new Class({ }, /** - * [description] + * Calculate and cache the arc lengths. * * @method Phaser.Curves.Curve#updateArcLengths * @since 3.0.0 + * + * @see Phaser.Curves.Curve#getLengths() */ updateArcLengths: function () { diff --git a/src/curves/path/Path.js b/src/curves/path/Path.js index eec47c28c..6cdc5e668 100644 --- a/src/curves/path/Path.js +++ b/src/curves/path/Path.js @@ -569,14 +569,12 @@ var Path = new Class({ }, /** - * Returns the defined starting point of the Path. - * - * This is not necessarily equal to the starting point of the first Curve if it differs from {@link startPoint}. + * Get a sequence of points on the path. * * @method Phaser.Curves.Path#getPoints * @since 3.0.0 * - * @param {integer} [divisions=12] - The number of points to divide the path in to. + * @param {integer} [divisions=12] - The number of divisions per resolution per curve. * * @return {Phaser.Math.Vector2[]} An array of Vector2 objects that containing the points along the Path. */ @@ -626,7 +624,7 @@ var Path = new Class({ /** * Returns a randomly chosen point anywhere on the path. This follows the same rules as `getPoint` in that it may return a point on any Curve inside this path. - * + * * When calling this method multiple times, the points are not guaranteed to be equally spaced spatially. * * @method Phaser.Curves.Path#getRandomPoint @@ -647,7 +645,7 @@ var Path = new Class({ /** * Divides this Path into a set of equally spaced points, - * + * * The resulting points are equally spaced with respect to the points' position on the path, but not necessarily equally spaced spatially. * * @method Phaser.Curves.Path#getSpacedPoints @@ -741,7 +739,7 @@ var Path = new Class({ /** * Creates a "gap" in this path from the path's current end point to the given coordinates. - * + * * After calling this function, this Path's end point will be equal to the given coordinates * * @method Phaser.Curves.Path#moveTo From b28f45b60914c3eb6b59a1cda941bdde4e5cd6ff Mon Sep 17 00:00:00 2001 From: samme Date: Fri, 3 Jan 2020 13:35:07 -0800 Subject: [PATCH 034/189] Docs for Phaser.Scenes.ScenePlugin - Note operations are queued - https://github.com/photonstorm/phaser/issues/4403#issuecomment-481264025 --- src/scene/ScenePlugin.js | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/src/scene/ScenePlugin.js b/src/scene/ScenePlugin.js index 39678408e..61a30a5d0 100644 --- a/src/scene/ScenePlugin.js +++ b/src/scene/ScenePlugin.js @@ -188,6 +188,8 @@ var ScenePlugin = new Class({ /** * Shutdown this Scene and run the given one. * + * This will happen at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#start * @since 3.0.0 * @@ -209,6 +211,8 @@ var ScenePlugin = new Class({ /** * Restarts this Scene. * + * This will happen at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#restart * @since 3.4.0 * @@ -444,6 +448,8 @@ var ScenePlugin = new Class({ /** * Launch the given Scene and run it in parallel with this one. * + * This will happen at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#launch * @since 3.0.0 * @@ -465,6 +471,8 @@ var ScenePlugin = new Class({ /** * Runs the given Scene, but does not change the state of this Scene. * + * This will happen at the next Scene Manager update, not immediately. + * * If the given Scene is paused, it will resume it. If sleeping, it will wake it. * If not running at all, it will be started. * @@ -492,6 +500,8 @@ var ScenePlugin = new Class({ /** * Pause the Scene - this stops the update step from happening but it still renders. * + * This will happen at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#pause * @since 3.0.0 * @@ -512,6 +522,8 @@ var ScenePlugin = new Class({ /** * Resume the Scene - starts the update loop again. * + * This will happen at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#resume * @since 3.0.0 * @@ -532,6 +544,8 @@ var ScenePlugin = new Class({ /** * Makes the Scene sleep (no update, no render) but doesn't shutdown. * + * This will happen at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#sleep * @since 3.0.0 * @@ -552,6 +566,8 @@ var ScenePlugin = new Class({ /** * Makes the Scene wake-up (starts update and render) * + * This will happen at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#wake * @since 3.0.0 * @@ -571,11 +587,8 @@ var ScenePlugin = new Class({ /** * Makes this Scene sleep then starts the Scene given. - * - * No checks are made to see if an instance of the given Scene is already running. - * Because Scenes in Phaser are non-exclusive, you are allowed to run multiple - * instances of them _at the same time_. This means, calling this function - * may launch another instance of the requested Scene if it's already running. + * + * This will happen at the next Scene Manager update, not immediately. * * @method Phaser.Scenes.ScenePlugin#switch * @since 3.0.0 @@ -597,6 +610,8 @@ var ScenePlugin = new Class({ /** * Shutdown the Scene, clearing display list, timers, etc. * + * This happens at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#stop * @since 3.0.0 * @@ -814,7 +829,7 @@ var ScenePlugin = new Class({ * The Scene is removed from the local scenes array, it's key is cleared from the keys * cache and Scene.Systems.destroy is then called on it. * - * If the SceneManager is processing the Scenes when this method is called it wil + * If the SceneManager is processing the Scenes when this method is called it will * queue the operation for the next update sequence. * * @method Phaser.Scenes.ScenePlugin#remove From 974ffd93ee149577852d7c3ed14d3e5a14dc4e8c Mon Sep 17 00:00:00 2001 From: samme Date: Fri, 3 Jan 2020 13:36:00 -0800 Subject: [PATCH 035/189] Docs for Phaser.Sound.BaseSoundManager#play Always adds a new sound --- src/sound/BaseSoundManager.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sound/BaseSoundManager.js b/src/sound/BaseSoundManager.js index 29c84c9d6..e582833ec 100644 --- a/src/sound/BaseSoundManager.js +++ b/src/sound/BaseSoundManager.js @@ -227,8 +227,9 @@ var BaseSoundManager = new Class({ }, /** - * Enables playing sound on the fly without the need to keep a reference to it. - * Sound will auto destroy once its playback ends. + * Adds a new sound to the sound manager and plays it. + * The sound will be automatically removed (destroyed) once playback ends. + * This lets you play a new sound on the fly without the need to keep a reference to it. * * @method Phaser.Sound.BaseSoundManager#play * @listens Phaser.Sound.Events#COMPLETE From 7d62b08f46a8e897c2fa51abfb809428bd1d3c05 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 3 Jan 2020 23:18:18 +0000 Subject: [PATCH 036/189] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 048109fd0..62241c394 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -157,7 +157,7 @@ My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs: -@fselcukcan Bambosh @louisth @hexus @javigaralva @samme @BeLi4L @jcyuan +@fselcukcan Bambosh @louisth @hexus @javigaralva @samme @BeLi4L @jcyuan @javigaralva ## Version 3.21.0 - Senku - 22nd November 2019 From ba4c82e14072c50e507279b66990e21b7c586fed Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 4 Jan 2020 12:27:04 +0000 Subject: [PATCH 037/189] Added jsdocs --- src/physics/matter-js/components/Velocity.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/physics/matter-js/components/Velocity.js b/src/physics/matter-js/components/Velocity.js index f0214917c..09e0b91f1 100644 --- a/src/physics/matter-js/components/Velocity.js +++ b/src/physics/matter-js/components/Velocity.js @@ -7,7 +7,7 @@ var Body = require('../lib/body/Body'); /** - * [description] + * Contains methods for changing the velocity of a Matter Body. Should be used as a mixin and not called directly. * * @namespace Phaser.Physics.Matter.Components.Velocity * @since 3.0.0 @@ -15,12 +15,13 @@ var Body = require('../lib/body/Body'); var Velocity = { /** - * [description] + * Sets the angular velocity of the body instantly. + * Position, angle, force etc. are unchanged. * * @method Phaser.Physics.Matter.Components.Velocity#setAngularVelocity * @since 3.0.0 * - * @param {number} value - [description] + * @param {number} value - The angular velocity. * * @return {Phaser.GameObjects.GameObject} This Game Object. */ From ffb604c502c53666a9c2fbe0ffa268562ad18874 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 4 Jan 2020 12:31:27 +0000 Subject: [PATCH 038/189] Added new setVelocity, setVelocityX, setVelocityY, setAngularVelocity, applyForce and applyForceFromAngle methods. --- CHANGELOG.md | 7 + src/physics/matter-js/MatterPhysics.js | 186 +++++++++++++++++++++++++ 2 files changed, 193 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 62241c394..ce57c296c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -118,6 +118,13 @@ * `MatterGameObject.setOnCollideActive` is a new method available on any Matter Game Object, that sets a callback which is invoked for the duration of the bodies collision with another. * `MatterGameObject.setOnCollideWith` is a new method available on any Matter Game Object, that allows you to set a callback to be invoked whenever the body collides with another specific body, or array of bodies. * `Body.gravityScale` is a new vector property that allows you to scale the effect of world gravity on a specific Body. +* `MatterPhysics._tempVec2` is a new private internal vector used for velocity and force calculations. +* `MatterPhysics.setVelocity` is a new method that will set both the horizontal and vertical linear velocity of the given physics bodies. This can be used on all Matter bodies, not just those created via the factory. +* `MatterPhysics.setVelocityX` is a new method that will set the horizontal linear velocity of the given physics bodies. This can be used on all Matter bodies, not just those created via the factory. +* `MatterPhysics.setVelocityY` is a new method that will set the vertical linear velocity of the given physics bodies. This can be used on all Matter bodies, not just those created via the factory. +* `MatterPhysics.setAngularVelocity` is a new method that will set the angular velocity of the given physics bodies. This can be used on all Matter bodies, not just those created via the factory. +* `MatterPhysics.applyForce` is a new method that applies a force to a body, at the bodies current position, including resulting torque. This can be used on all Matter bodies, not just those created via the factory. +* `MatterPhysics.applyForceFromAngle` is a new method that applies a force to a body from the given angle, at the bodies current position, including resulting torque. This can be used on all Matter bodies, not just those created via the factory. ### New Features diff --git a/src/physics/matter-js/MatterPhysics.js b/src/physics/matter-js/MatterPhysics.js index 7277f72ea..1927fdfee 100644 --- a/src/physics/matter-js/MatterPhysics.js +++ b/src/physics/matter-js/MatterPhysics.js @@ -374,6 +374,16 @@ var MatterPhysics = new Class({ */ this.verts = Vertices; + /** + * An internal temp vector used for velocity and force calculations. + * + * @name Phaser.Physics.Matter.MatterPhysics#_tempVec2 + * @type {MatterJS.Vector} + * @private + * @since 3.22.0 + */ + this._tempVec2 = Vector.create(); + // Matter plugins if (GetValue(this.config, 'plugins.collisionevents', true)) @@ -1047,6 +1057,182 @@ var MatterPhysics = new Class({ return output; }, + /** + * Sets both the horizontal and vertical linear velocity of the physics bodies. + * + * @method Phaser.Physics.Matter.MatterPhysics#setVelocity + * @since 3.22.0 + * + * @param {(MatterJS.Body|MatterJS.Body[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param {number} x - The horizontal linear velocity value. + * @param {number} y - The vertical linear velocity value. + * + * @return {this} This Matter Physics instance. + */ + setVelocity: function (bodies, x, y) + { + bodies = this.getMatterBodies(bodies); + + var vec2 = this._tempVec2; + + vec2.x = x; + vec2.y = y; + + bodies.forEach(function (body) + { + Body.setVelocity(body, vec2); + }); + + return this; + }, + + /** + * Sets just the horizontal linear velocity of the physics bodies. + * The vertical velocity of the body is unchanged. + * + * @method Phaser.Physics.Matter.MatterPhysics#setVelocity + * @since 3.22.0 + * + * @param {(MatterJS.Body|MatterJS.Body[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param {number} x - The horizontal linear velocity value. + * + * @return {this} This Matter Physics instance. + */ + setVelocityX: function (bodies, x) + { + bodies = this.getMatterBodies(bodies); + + var vec2 = this._tempVec2; + + vec2.x = x; + + bodies.forEach(function (body) + { + vec2.y = body.velocity.y; + Body.setVelocity(body, vec2); + }); + + return this; + }, + + /** + * Sets just the vertical linear velocity of the physics bodies. + * The horizontal velocity of the body is unchanged. + * + * @method Phaser.Physics.Matter.MatterPhysics#setVelocity + * @since 3.22.0 + * + * @param {(MatterJS.Body|MatterJS.Body[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param {number} y - The vertical linear velocity value. + * + * @return {this} This Matter Physics instance. + */ + setVelocityY: function (bodies, y) + { + bodies = this.getMatterBodies(bodies); + + var vec2 = this._tempVec2; + + vec2.y = y; + + bodies.forEach(function (body) + { + vec2.x = body.velocity.x; + Body.setVelocity(body, vec2); + }); + + return this; + }, + + /** + * Sets the angular velocity of the bodies instantly. + * Position, angle, force etc. are unchanged. + * + * @method Phaser.Physics.Matter.MatterPhysics#setAngularVelocity + * @since 3.22.0 + * + * @param {(MatterJS.Body|MatterJS.Body[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param {number} value - The angular velocity. + * + * @return {this} This Matter Physics instance. + */ + setAngularVelocity: function (bodies, value) + { + bodies = this.getMatterBodies(bodies); + + bodies.forEach(function (body) + { + Body.setAngularVelocity(body, value); + }); + + return this; + }, + + /** + * Applies a force to a body, at the bodies current position, including resulting torque. + * + * @method Phaser.Physics.Matter.MatterPhysics#applyForce + * @since 3.22.0 + * + * @param {(MatterJS.Body|MatterJS.Body[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param {Phaser.Math.Vector2Like} force - A Vector that specifies the force to apply. + * + * @return {this} This Matter Physics instance. + */ + applyForce: function (bodies, force) + { + bodies = this.getMatterBodies(bodies); + + var vec2 = this._tempVec2; + + bodies.forEach(function (body) + { + vec2.x = body.position.x; + vec2.y = body.position.y; + + Body.applyForce(body, vec2, force); + }); + + return this; + }, + + /** + * Apply a force to a body based on the given angle and speed. + * If no angle is given, the current body angle is used. + * + * Use very small speed values, such as 0.1, depending on the mass and required velocity. + * + * @method Phaser.Physics.Matter.MatterPhysics#applyForceFromAngle + * @since 3.22.0 + * + * @param {(MatterJS.Body|MatterJS.Body[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param {number} speed - A speed value to be applied to a directional force. + * @param {number} [angle] - The angle, in radians, to apply the force from. Leave undefined to use the current body angle. + * + * @return {this} This Matter Physics instance. + */ + applyForceFromAngle: function (bodies, speed, angle) + { + bodies = this.getMatterBodies(bodies); + + var vec2 = this._tempVec2; + + bodies.forEach(function (body) + { + if (angle === undefined) + { + angle = body.angle; + } + + vec2.x = speed * Math.cos(angle); + vec2.y = speed * Math.sin(angle); + + Body.applyForce(body, { x: body.position.x, y: body.position.y }, vec2); + }); + + return this; + }, + /** * The Scene that owns this plugin is shutting down. * We need to kill and reset all internal properties as well as stop listening to Scene events. From c5675ae17138d24d20817d5965f7b0422270785d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sun, 5 Jan 2020 23:47:25 +0000 Subject: [PATCH 039/189] Added jsdocs --- src/physics/matter-js/components/Sensor.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/physics/matter-js/components/Sensor.js b/src/physics/matter-js/components/Sensor.js index 3466aabd5..f678554ee 100644 --- a/src/physics/matter-js/components/Sensor.js +++ b/src/physics/matter-js/components/Sensor.js @@ -5,7 +5,7 @@ */ /** - * [description] + * Enables a Matter-enabled Game Object to be a sensor. Should be used as a mixin and not directly. * * @namespace Phaser.Physics.Matter.Components.Sensor * @since 3.0.0 @@ -13,12 +13,13 @@ var Sensor = { /** - * [description] + * Set the body belonging to this Game Object to be a sensor. + * Sensors trigger collision events, but don't react with colliding body physically. * * @method Phaser.Physics.Matter.Components.Sensor#setSensor * @since 3.0.0 * - * @param {boolean} value - [description] + * @param {boolean} value - `true` to set the body as a sensor, or `false` to disable it. * * @return {Phaser.GameObjects.GameObject} This Game Object. */ @@ -30,12 +31,12 @@ var Sensor = { }, /** - * [description] + * Is the body belonging to this Game Object a sensor or not? * * @method Phaser.Physics.Matter.Components.Sensor#isSensor * @since 3.0.0 * - * @return {boolean} [description] + * @return {boolean} `true` if the body is a sensor, otherwise `false`. */ isSensor: function () { From 25339383f1049c3de44b79df1d518b47d105bd69 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sun, 5 Jan 2020 23:48:49 +0000 Subject: [PATCH 040/189] Added jsdocs --- src/physics/matter-js/MatterTileBody.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/physics/matter-js/MatterTileBody.js b/src/physics/matter-js/MatterTileBody.js index 28228fad2..2debe357a 100644 --- a/src/physics/matter-js/MatterTileBody.js +++ b/src/physics/matter-js/MatterTileBody.js @@ -39,7 +39,7 @@ var Vertices = require('./lib/geometry/Vertices'); * @extends Phaser.Physics.Matter.Components.Sleep * @extends Phaser.Physics.Matter.Components.Static * - * @param {Phaser.Physics.Matter.World} world - [description] + * @param {Phaser.Physics.Matter.World} world - The Matter world instance this body belongs to. * @param {Phaser.Tilemaps.Tile} tile - The target tile that should have a Matter body. * @param {Phaser.Types.Physics.Matter.MatterTileOptions} [options] - Options to be used when creating the Matter body. */ From beefcf09b617a1b8c3eef50f343456c7dbcd98b4 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sun, 5 Jan 2020 23:54:08 +0000 Subject: [PATCH 041/189] Added jsdocs --- src/physics/matter-js/components/Sleep.js | 25 ++++++++++++++--------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/physics/matter-js/components/Sleep.js b/src/physics/matter-js/components/Sleep.js index 63c648b1f..bd725e7a1 100644 --- a/src/physics/matter-js/components/Sleep.js +++ b/src/physics/matter-js/components/Sleep.js @@ -8,7 +8,7 @@ var Events = require('../events'); var MatterEvents = require('../lib/core/Events'); /** - * [description] + * Enables a Matter-enabled Game Object to be able to go to sleep. Should be used as a mixin and not directly. * * @namespace Phaser.Physics.Matter.Components.Sleep * @since 3.0.0 @@ -16,12 +16,12 @@ var MatterEvents = require('../lib/core/Events'); var Sleep = { /** - * [description] + * Sets the number of updates in which this body must have near-zero velocity before it is set as sleeping (if sleeping is enabled by the engine). * * @method Phaser.Physics.Matter.Components.Sleep#setSleepThreshold * @since 3.0.0 * - * @param {number} [value=60] - [description] + * @param {number} [value=60] - A `Number` that defines the number of updates in which this body must have near-zero velocity before it is set as sleeping. * * @return {Phaser.GameObjects.GameObject} This Game Object. */ @@ -35,13 +35,18 @@ var Sleep = { }, /** - * [description] + * Enable sleep and wake events for this body. + * + * By default when a body goes to sleep, or wakes up, it will not emit any events. + * + * The events are emitted by the Matter World instance and can be listened to via + * the `SLEEP_START` and `SLEEP_END` events. * * @method Phaser.Physics.Matter.Components.Sleep#setSleepEvents * @since 3.0.0 * - * @param {boolean} start - [description] - * @param {boolean} end - [description] + * @param {boolean} start - `true` if you want the sleep start event to be emitted for this body. + * @param {boolean} end - `true` if you want the sleep end event to be emitted for this body. * * @return {Phaser.GameObjects.GameObject} This Game Object. */ @@ -54,12 +59,12 @@ var Sleep = { }, /** - * [description] + * Enables or disables the Sleep Start event for this body. * * @method Phaser.Physics.Matter.Components.Sleep#setSleepStartEvent * @since 3.0.0 * - * @param {boolean} value - [description] + * @param {boolean} value - `true` to enable the sleep event, or `false` to disable it. * * @return {Phaser.GameObjects.GameObject} This Game Object. */ @@ -83,12 +88,12 @@ var Sleep = { }, /** - * [description] + * Enables or disables the Sleep End event for this body. * * @method Phaser.Physics.Matter.Components.Sleep#setSleepEndEvent * @since 3.0.0 * - * @param {boolean} value - [description] + * @param {boolean} value - `true` to enable the sleep event, or `false` to disable it. * * @return {Phaser.GameObjects.GameObject} This Game Object. */ From 5b17e0e61e9bdf902eb40899eaa7df498d4986be Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sun, 5 Jan 2020 23:55:45 +0000 Subject: [PATCH 042/189] Added jsdocs --- src/physics/matter-js/MatterGameObject.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/physics/matter-js/MatterGameObject.js b/src/physics/matter-js/MatterGameObject.js index 0c3470e9e..5f4c7c870 100644 --- a/src/physics/matter-js/MatterGameObject.js +++ b/src/physics/matter-js/MatterGameObject.js @@ -24,7 +24,11 @@ function hasGetterOrSetter (def) } /** - * [description] + * A Matter Game Object is a generic object that allows you to combine any Phaser Game Object, + * including those you have extended or created yourself, with all of the Matter Components. + * + * This enables you to use component methods such as `setVelocity` or `isSensor` directly from + * this Game Object. * * @function Phaser.Physics.Matter.MatterGameObject * @since 3.3.0 From 2d3a87a3a693a49219f46255713dd4b875eb0af4 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 6 Jan 2020 13:33:23 +0000 Subject: [PATCH 043/189] Updated `existing` for TS defs. Fix #4941 --- CHANGELOG.md | 2 +- src/gameobjects/GameObjectFactory.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce57c296c..2190a661b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -164,7 +164,7 @@ My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs: -@fselcukcan Bambosh @louisth @hexus @javigaralva @samme @BeLi4L @jcyuan @javigaralva +@fselcukcan Bambosh @louisth @hexus @javigaralva @samme @BeLi4L @jcyuan @javigaralva @T-Grave ## Version 3.21.0 - Senku - 22nd November 2019 diff --git a/src/gameobjects/GameObjectFactory.js b/src/gameobjects/GameObjectFactory.js index 42e50d73d..52c654fa6 100644 --- a/src/gameobjects/GameObjectFactory.js +++ b/src/gameobjects/GameObjectFactory.js @@ -112,7 +112,7 @@ var GameObjectFactory = new Class({ * @method Phaser.GameObjects.GameObjectFactory#existing * @since 3.0.0 * - * @param {Phaser.GameObjects.GameObject} child - The child to be added to this Scene. + * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group)} child - The child to be added to this Scene. * * @return {Phaser.GameObjects.GameObject} The Game Object that was added. */ From aa32235f5a64f064e6b89171778437ecbf959c73 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 6 Jan 2020 17:56:20 +0000 Subject: [PATCH 044/189] Added applyForceFromPosition --- src/physics/matter-js/MatterPhysics.js | 38 ++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/src/physics/matter-js/MatterPhysics.js b/src/physics/matter-js/MatterPhysics.js index 1927fdfee..788bdbeff 100644 --- a/src/physics/matter-js/MatterPhysics.js +++ b/src/physics/matter-js/MatterPhysics.js @@ -1196,6 +1196,44 @@ var MatterPhysics = new Class({ return this; }, + /** + * Applies a force to a body, from the given world position, including resulting torque. + * If no angle is given, the current body angle is used. + * + * Use very small speed values, such as 0.1, depending on the mass and required velocity. + * + * @method Phaser.Physics.Matter.MatterPhysics#applyForceFromPosition + * @since 3.22.0 + * + * @param {(MatterJS.Body|MatterJS.Body[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param {Phaser.Math.Vector2Like} position - A Vector that specifies the world-space position to apply the force at. + * @param {number} speed - A speed value to be applied to a directional force. + * @param {number} [angle] - The angle, in radians, to apply the force from. Leave undefined to use the current body angle. + * + * @return {this} This Matter Physics instance. + */ + applyForceFromPosition: function (bodies, position, speed, angle) + { + bodies = this.getMatterBodies(bodies); + + var vec2 = this._tempVec2; + + bodies.forEach(function (body) + { + if (angle === undefined) + { + angle = body.angle; + } + + vec2.x = speed * Math.cos(angle); + vec2.y = speed * Math.sin(angle); + + Body.applyForce(body, position, vec2); + }); + + return this; + }, + /** * Apply a force to a body based on the given angle and speed. * If no angle is given, the current body angle is used. From 64c12a9c60f9eaf9367640306788f067def264de Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 6 Jan 2020 22:30:38 +0000 Subject: [PATCH 045/189] Added showBodyPosition config option --- src/physics/matter-js/World.js | 24 ++++++++----------- .../matter-js/typedefs/MatterDebugConfig.js | 3 +++ 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/physics/matter-js/World.js b/src/physics/matter-js/World.js index 6be6dea4d..e1606dabc 100644 --- a/src/physics/matter-js/World.js +++ b/src/physics/matter-js/World.js @@ -244,6 +244,7 @@ var World = new Class({ showBody: GetFastValue(debugConfig, 'showBody', true), showStaticBody: GetFastValue(debugConfig, 'showStaticBody', true), showSleeping: GetFastValue(debugConfig, 'showSleeping', false), + showBodyPosition: GetFastValue(debugConfig, 'showBodyPosition', true), showJoint: GetFastValue(debugConfig, 'showJoint', true), showInternalEdges: GetFastValue(debugConfig, 'showInternalEdges', false), showConvexHulls: GetFastValue(debugConfig, 'showConvexHulls', false), @@ -264,6 +265,9 @@ var World = new Class({ sleepFillColor: GetFastValue(debugConfig, 'sleepFillColor', 0x464646), sleepLineColor: GetFastValue(debugConfig, 'sleepLineColor', 0x999a99), + positionSize: GetFastValue(debugConfig, 'positionSize', 4), + positionColor: GetFastValue(debugConfig, 'positionColor', 0xe042da), + jointColor: GetFastValue(debugConfig, 'jointColor', 0xe0e042), jointLineOpacity: GetFastValue(debugConfig, 'jointLineOpacity', 1), jointLineThickness: GetFastValue(debugConfig, 'jointLineThickness', 2), @@ -1411,21 +1415,12 @@ var World = new Class({ if (fillColor === undefined) { fillColor = null; } if (fillOpacity === undefined) { fillOpacity = null; } + var config = this.debugConfig; + // Handle compound parts var parts = body.parts; var partsLength = parts.length; - /* - if (!body.isStatic) - { - var w = body.bounds.max.x - body.bounds.min.x; - var h = body.bounds.max.y - body.bounds.min.y; - - graphics.fillStyle(0x6d6d6d, 0.3); - graphics.fillRect(body.bounds.min.x, body.bounds.min.y, w, h); - } - */ - for (var k = (partsLength > 1) ? 1 : 0; k < partsLength; k++) { var part = parts[k]; @@ -1498,13 +1493,14 @@ var World = new Class({ } } - if (!body.isStatic) + if (config.showBodyPosition && !body.isStatic) { var px = body.position.x; var py = body.position.y; + var hs = Math.ceil(config.positionSize / 2); - graphics.fillStyle(0xff00ff, 1); - graphics.fillRect(px - 3, py - 3, 6, 6); + graphics.fillStyle(config.positionColor, 1); + graphics.fillRect(px - hs, py - hs, config.positionSize, config.positionSize); } return this; diff --git a/src/physics/matter-js/typedefs/MatterDebugConfig.js b/src/physics/matter-js/typedefs/MatterDebugConfig.js index 5f0825cbb..4f5088d7f 100644 --- a/src/physics/matter-js/typedefs/MatterDebugConfig.js +++ b/src/physics/matter-js/typedefs/MatterDebugConfig.js @@ -8,6 +8,7 @@ * @property {boolean} [showJoint=true] - Render all world constraints to the Graphics object? * @property {boolean} [showInternalEdges=false] - When rendering bodies, render the internal edges as well? * @property {boolean} [showConvexHulls=false] - When rendering polygon bodies, render the convex hull as well? + * @property {boolean} [showBodyPosition=true] - Render the position of non-static bodies? * @property {boolean} [renderFill=false] - Render the bodies using a fill color. * @property {boolean} [renderLine=true] - Render the bodies using a line stroke. * @property {number} [fillColor=0x106909] - The color value of the fill when rendering dynamic bodies. @@ -20,6 +21,8 @@ * @property {number} [staticBodySleepOpacity=0.7] - The amount to multiply the opacity of sleeping static bodies by. * @property {number} [sleepFillColor=0x464646] - The color value of the fill when rendering sleeping dynamic bodies. * @property {number} [sleepLineColor=0x999a99] - The color value of the line stroke when rendering sleeping dynamic bodies. + * @property {number} [positionSize=4] - The size of the rectangle drawn when rendering the body position. + * @property {number} [positionColor=0xe042da] - The color value of the rectangle drawn when rendering the body position. * @property {number} [jointColor=0xe0e042] - The color value of joints when `showJoint` is set. * @property {number} [jointLineOpacity=1] - The line opacity when rendering joints, a value between 0 and 1. * @property {number} [jointLineThickness=2] - The line thickness when rendering joints. From c8b2ff5042de7bec0bc39a9865ed20302f731a5e Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 6 Jan 2020 22:30:41 +0000 Subject: [PATCH 046/189] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2190a661b..66a9fccfd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ * `showJoint` - Render all world constraints to the Graphics object? * `showInternalEdges` - When rendering bodies, render the internal edges as well? * `showConvexHulls` - When rendering polygon bodies, render the convex hull as well? +* `showBodyPosition` - Render the position of non-static bodies? * `renderFill` - Render the bodies using a fill color. * `renderLine`- Render the bodies using a line stroke. * `fillColor` - The color value of the fill when rendering dynamic bodies. @@ -32,6 +33,8 @@ * `anchorColor` - The color value of constraint anchors. * `anchorSize` - The size of the circles drawn as the constraint anchors. * `hullColor` - The color value of hulls when `showConvexHulls` is set. +* `positionSize` - The size of the rectangle drawn when rendering the body position. +* `positionColor` - The color value of the rectangle drawn when rendering the body position. * The `debug` property in the Matter World Config is now a `MatterDebugConfig` option instead of a boolean. However, if a boolean is given, it will use the default debug config values. * The following `MatterWorldConfig` options have now been removed: `debugShowBody`, `debugShowStaticBody`, `debugBodyColor`, `debugBodyFillColor`, `debugStaticBodyColor`, `debugShowJoint`, `debugJointColor`, `debugWireframes`, `debugShowInternalEdges`, `debugShowConvexHulls`, `debugConvexHullColor` and `debugShowSleeping`. These can all be set via the new `MatterDebugConfig` object instead. * The object `World.defaults` has been removed. Defaults are now access via `World.debugDefaults`. From 76d2c971f769be46efc5df6528d642a101b88507 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 7 Jan 2020 00:28:37 +0000 Subject: [PATCH 047/189] Added showSensor debug option --- src/physics/matter-js/World.js | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/src/physics/matter-js/World.js b/src/physics/matter-js/World.js index e1606dabc..c5f1ee040 100644 --- a/src/physics/matter-js/World.js +++ b/src/physics/matter-js/World.js @@ -248,6 +248,7 @@ var World = new Class({ showJoint: GetFastValue(debugConfig, 'showJoint', true), showInternalEdges: GetFastValue(debugConfig, 'showInternalEdges', false), showConvexHulls: GetFastValue(debugConfig, 'showConvexHulls', false), + showSensors: GetFastValue(debugConfig, 'showSensors', true), renderFill: GetFastValue(debugConfig, 'renderFill', false), renderLine: GetFastValue(debugConfig, 'renderLine', true), @@ -265,6 +266,9 @@ var World = new Class({ sleepFillColor: GetFastValue(debugConfig, 'sleepFillColor', 0x464646), sleepLineColor: GetFastValue(debugConfig, 'sleepLineColor', 0x999a99), + sensorFillColor: GetFastValue(debugConfig, 'sensorFillColor', 0x0d177b), + sensorLineColor: GetFastValue(debugConfig, 'sensorLineColor', 0x1327e4), + positionSize: GetFastValue(debugConfig, 'positionSize', 4), positionColor: GetFastValue(debugConfig, 'positionColor', 0xe042da), @@ -1417,6 +1421,9 @@ var World = new Class({ var config = this.debugConfig; + var sensorFillColor = config.sensorFillColor; + var sensorLineColor = config.sensorLineColor; + // Handle compound parts var parts = body.parts; var partsLength = parts.length; @@ -1427,7 +1434,7 @@ var World = new Class({ var render = part.render; var opacity = render.opacity; - if (!render.visible || opacity === 0) + if (!render.visible || opacity === 0 || (part.isSensor && !config.showSensors)) { continue; } @@ -1437,14 +1444,29 @@ var World = new Class({ graphics.beginPath(); - if (fillColor !== null) + if (part.isSensor) { - graphics.fillStyle(fillColor, fillOpacity * opacity); + if (fillColor !== null) + { + graphics.fillStyle(sensorFillColor, fillOpacity * opacity); + } + + if (lineColor !== null) + { + graphics.lineStyle(lineThickness, sensorLineColor, lineOpacity * opacity); + } } - - if (lineColor !== null) + else { - graphics.lineStyle(lineThickness, lineColor, lineOpacity * opacity); + if (fillColor !== null) + { + graphics.fillStyle(fillColor, fillOpacity * opacity); + } + + if (lineColor !== null) + { + graphics.lineStyle(lineThickness, lineColor, lineOpacity * opacity); + } } if (circleRadius) From 7aec93d1c3e1efb24bfc67626f44d8be2dd6a768 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 7 Jan 2020 00:28:39 +0000 Subject: [PATCH 048/189] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66a9fccfd..090123b7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ * `showInternalEdges` - When rendering bodies, render the internal edges as well? * `showConvexHulls` - When rendering polygon bodies, render the convex hull as well? * `showBodyPosition` - Render the position of non-static bodies? +* `showSensors` - Render sensors? * `renderFill` - Render the bodies using a fill color. * `renderLine`- Render the bodies using a line stroke. * `fillColor` - The color value of the fill when rendering dynamic bodies. @@ -24,6 +25,8 @@ * `staticBodySleepOpacity` - The amount to multiply the opacity of sleeping static bodies by. * `sleepFillColor` - The color value of the fill when rendering sleeping dynamic bodies. * `sleepLineColor` - The color value of the line stroke when rendering sleeping dynamic bodies. +* `sensorFillColor` - The color value of the fill when rendering sensor bodies. +* `sensorLineColor` - The color value of the line stroke when rendering sensor bodies. * `jointColor` - The color value of joints when `showJoint` is set. * `jointLineOpacity` - The line opacity when rendering joints, a value between 0 and 1. * `jointLineThickness` - The line thickness when rendering joints. From 0a801cbac457e4b7f58a8a78e5b7150a07532a12 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 7 Jan 2020 11:56:39 +0000 Subject: [PATCH 049/189] Added World.renderGrid method. Renamed showBodyPosition to showPositions --- src/physics/matter-js/World.js | 69 ++++++++++++++++++- .../matter-js/typedefs/MatterDebugConfig.js | 4 +- 2 files changed, 70 insertions(+), 3 deletions(-) diff --git a/src/physics/matter-js/World.js b/src/physics/matter-js/World.js index c5f1ee040..0b9a3f97f 100644 --- a/src/physics/matter-js/World.js +++ b/src/physics/matter-js/World.js @@ -244,12 +244,26 @@ var World = new Class({ showBody: GetFastValue(debugConfig, 'showBody', true), showStaticBody: GetFastValue(debugConfig, 'showStaticBody', true), showSleeping: GetFastValue(debugConfig, 'showSleeping', false), - showBodyPosition: GetFastValue(debugConfig, 'showBodyPosition', true), + showPositions: GetFastValue(debugConfig, 'showPositions', true), showJoint: GetFastValue(debugConfig, 'showJoint', true), showInternalEdges: GetFastValue(debugConfig, 'showInternalEdges', false), showConvexHulls: GetFastValue(debugConfig, 'showConvexHulls', false), showSensors: GetFastValue(debugConfig, 'showSensors', true), + showBroadphase: GetFastValue(debugConfig, 'showBroadphase', false), + broadphaseColor: GetFastValue(debugConfig, 'broadphaseColor', 0xffb400), + + showBounds: true, + showVelocity: true, + showCollisions: true, + showSeparations: true, + showAxes: true, + showAngleIndicator: true, + showIds: true, + showShadows: true, + showVertexNumbers: true, + showMousePosition: true, + renderFill: GetFastValue(debugConfig, 'renderFill', false), renderLine: GetFastValue(debugConfig, 'renderLine', true), @@ -1276,6 +1290,8 @@ var World = new Class({ postUpdate: function () { var config = this.debugConfig; + var engine = this.engine; + var graphics = this.debugGraphic; var showBody = config.showBody; var showStaticBody = config.showStaticBody; @@ -1288,6 +1304,11 @@ var World = new Class({ this.debugGraphic.clear(); + if (config.showBroadphase && engine.broadphase.controller) + { + this.renderGrid(engine.broadphase, graphics, config.broadphaseColor, 0.2); + } + var bodies = Composite.allBodies(this.localWorld); this.renderBodies(bodies); @@ -1298,6 +1319,50 @@ var World = new Class({ } }, + /** + * Renders the Engine Broadphase Controller Grid to the given Graphics instance. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render the Grid to your own Graphics instance. + * + * @method Phaser.Physics.Matter.World#renderGrid + * @since 3.22.0 + * + * @param {MatterJS.Grid} grid - The Matter Grid to be rendered. + * @param {Phaser.GameObjects.Graphics} graphics - The Graphics object to render to. + * @param {number} lineColor - The line color. + * @param {number} lineOpacity - The line opacity, between 0 and 1. + * + * @return {this} This Matter World instance for method chaining. + */ + renderGrid: function (grid, graphics, lineColor, lineOpacity) + { + graphics.lineStyle(1, lineColor, lineOpacity); + + var bucketKeys = Common.keys(grid.buckets); + + for (var i = 0; i < bucketKeys.length; i++) + { + var bucketId = bucketKeys[i]; + + if (grid.buckets[bucketId].length < 2) + { + continue; + } + + var region = bucketId.split(/C|R/); + + graphics.strokeRect( + parseInt(region[1], 10) * grid.bucketWidth, + parseInt(region[2], 10) * grid.bucketHeight, + grid.bucketWidth, + grid.bucketHeight + ); + } + + return this; + }, + /** * Renders the given array of Bodies to the debug graphics instance. * @@ -1515,7 +1580,7 @@ var World = new Class({ } } - if (config.showBodyPosition && !body.isStatic) + if (config.showPositions && !body.isStatic) { var px = body.position.x; var py = body.position.y; diff --git a/src/physics/matter-js/typedefs/MatterDebugConfig.js b/src/physics/matter-js/typedefs/MatterDebugConfig.js index 4f5088d7f..2363a6010 100644 --- a/src/physics/matter-js/typedefs/MatterDebugConfig.js +++ b/src/physics/matter-js/typedefs/MatterDebugConfig.js @@ -8,7 +8,9 @@ * @property {boolean} [showJoint=true] - Render all world constraints to the Graphics object? * @property {boolean} [showInternalEdges=false] - When rendering bodies, render the internal edges as well? * @property {boolean} [showConvexHulls=false] - When rendering polygon bodies, render the convex hull as well? - * @property {boolean} [showBodyPosition=true] - Render the position of non-static bodies? + * @property {boolean} [showPositions=true] - Render the position of non-static bodies? + * @property {boolean} [showBroadphase=false] - Render the broadphase grid? + * @property {boolean} [broadphaseColor=0xffb400] - The color of the broadphase grid. * @property {boolean} [renderFill=false] - Render the bodies using a fill color. * @property {boolean} [renderLine=true] - Render the bodies using a line stroke. * @property {number} [fillColor=0x106909] - The color value of the fill when rendering dynamic bodies. From a938b6d59745483187592aec7012382edda59f68 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 7 Jan 2020 11:56:41 +0000 Subject: [PATCH 050/189] Update CHANGELOG.md --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 090123b7c..e90208f3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,8 +11,10 @@ * `showJoint` - Render all world constraints to the Graphics object? * `showInternalEdges` - When rendering bodies, render the internal edges as well? * `showConvexHulls` - When rendering polygon bodies, render the convex hull as well? -* `showBodyPosition` - Render the position of non-static bodies? +* `showPositions` - Render the position of non-static bodies? * `showSensors` - Render sensors? +* `showBroadphase` - Render the broadphase grid behind the bodies? +* `broadphaseColor` - The color of the broadphase grid lines. * `renderFill` - Render the bodies using a fill color. * `renderLine`- Render the bodies using a line stroke. * `fillColor` - The color value of the fill when rendering dynamic bodies. @@ -44,6 +46,7 @@ * `World.renderBody` is a new method that will render a single Matter Body to the given Graphics object. This is used internally during debug rendering but is also public. This allows you to control which bodies are rendered and to which Graphics object, should you wish to use them in-game and not just during debugging. * `World.renderConstraint` is a new method that will render a single Matter Constraint, such as a pin or a spring, to the given Graphics object. This is used internally during debug rendering but is also public. This allows you to control which constraints are rendered and to which Graphics object, should you wish to use them in-game and not just during debugging. * `World.renderConvexHull` is a new method that will render the convex hull of a single Matter Body, to the given Graphics object. This is used internally during debug rendering but is also public. This allows you to control which hulls are rendered and to which Graphics object, should you wish to use them in-game and not just during debugging. +* `World.renderGrid` is a new method that will render the broadphase Grid to the given graphics instance. * `World.renderBodies` has been rewritten to cache commonly-used values and avoid a situation when a single body would be rendered twice. * The private method `World.renderConvexHulls` has been removed as it's no longer used internally. * The private method `World.renderWireframes` has been removed as it's no longer used internally. From ad1891cd8d1dce74a2858e3e203a79eaa6ed8f63 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 7 Jan 2020 12:39:27 +0000 Subject: [PATCH 051/189] Added renderBodyBounds and renderBodyAxes methods --- src/physics/matter-js/World.js | 191 ++++++++++++++++++++++++++++----- 1 file changed, 166 insertions(+), 25 deletions(-) diff --git a/src/physics/matter-js/World.js b/src/physics/matter-js/World.js index 0b9a3f97f..4cf53c6d2 100644 --- a/src/physics/matter-js/World.js +++ b/src/physics/matter-js/World.js @@ -241,29 +241,29 @@ var World = new Class({ * @since 3.22.0 */ this.debugConfig = { - showBody: GetFastValue(debugConfig, 'showBody', true), - showStaticBody: GetFastValue(debugConfig, 'showStaticBody', true), - showSleeping: GetFastValue(debugConfig, 'showSleeping', false), - showPositions: GetFastValue(debugConfig, 'showPositions', true), - showJoint: GetFastValue(debugConfig, 'showJoint', true), - showInternalEdges: GetFastValue(debugConfig, 'showInternalEdges', false), - showConvexHulls: GetFastValue(debugConfig, 'showConvexHulls', false), - showSensors: GetFastValue(debugConfig, 'showSensors', true), - showBroadphase: GetFastValue(debugConfig, 'showBroadphase', false), - broadphaseColor: GetFastValue(debugConfig, 'broadphaseColor', 0xffb400), - - showBounds: true, showVelocity: true, showCollisions: true, showSeparations: true, - showAxes: true, - showAngleIndicator: true, showIds: true, showShadows: true, showVertexNumbers: true, showMousePosition: true, + showAxes: GetFastValue(debugConfig, 'showAxes', false), + showAngleIndicator: GetFastValue(debugConfig, 'showAngleIndicator', false), + angleColor: GetFastValue(debugConfig, 'angleColor', 0xe81153), + + showBroadphase: GetFastValue(debugConfig, 'showBroadphase', false), + broadphaseColor: GetFastValue(debugConfig, 'broadphaseColor', 0xffb400), + + showBounds: GetFastValue(debugConfig, 'showBounds', false), + boundsColor: GetFastValue(debugConfig, 'boundsColor', 0xffffff), + + showBody: GetFastValue(debugConfig, 'showBody', true), + showStaticBody: GetFastValue(debugConfig, 'showStaticBody', true), + showInternalEdges: GetFastValue(debugConfig, 'showInternalEdges', false), + renderFill: GetFastValue(debugConfig, 'renderFill', false), renderLine: GetFastValue(debugConfig, 'renderLine', true), @@ -276,16 +276,20 @@ var World = new Class({ staticFillColor: GetFastValue(debugConfig, 'staticFillColor', 0x0d177b), staticLineColor: GetFastValue(debugConfig, 'staticLineColor', 0x1327e4), + showSleeping: GetFastValue(debugConfig, 'showSleeping', false), staticBodySleepOpacity: GetFastValue(debugConfig, 'staticBodySleepOpacity', 0.7), sleepFillColor: GetFastValue(debugConfig, 'sleepFillColor', 0x464646), sleepLineColor: GetFastValue(debugConfig, 'sleepLineColor', 0x999a99), + showSensors: GetFastValue(debugConfig, 'showSensors', true), sensorFillColor: GetFastValue(debugConfig, 'sensorFillColor', 0x0d177b), sensorLineColor: GetFastValue(debugConfig, 'sensorLineColor', 0x1327e4), + showPositions: GetFastValue(debugConfig, 'showPositions', true), positionSize: GetFastValue(debugConfig, 'positionSize', 4), positionColor: GetFastValue(debugConfig, 'positionColor', 0xe042da), + showJoint: GetFastValue(debugConfig, 'showJoint', true), jointColor: GetFastValue(debugConfig, 'jointColor', 0xe0e042), jointLineOpacity: GetFastValue(debugConfig, 'jointLineOpacity', 1), jointLineThickness: GetFastValue(debugConfig, 'jointLineThickness', 2), @@ -298,6 +302,7 @@ var World = new Class({ anchorColor: GetFastValue(debugConfig, 'anchorColor', 0xefefef), anchorSize: GetFastValue(debugConfig, 'anchorSize', 6), + showConvexHulls: GetFastValue(debugConfig, 'showConvexHulls', false), hullColor: GetFastValue(debugConfig, 'hullColor', 0xd703d0) }; @@ -1289,18 +1294,16 @@ var World = new Class({ */ postUpdate: function () { + if (!this.drawDebug) + { + return; + } + var config = this.debugConfig; var engine = this.engine; var graphics = this.debugGraphic; - var showBody = config.showBody; - var showStaticBody = config.showStaticBody; - var showJoint = config.showJoint; - - if (!this.drawDebug || (!showBody && !showStaticBody && !showJoint)) - { - return; - } + var bodies = Composite.allBodies(this.localWorld); this.debugGraphic.clear(); @@ -1309,11 +1312,22 @@ var World = new Class({ this.renderGrid(engine.broadphase, graphics, config.broadphaseColor, 0.2); } - var bodies = Composite.allBodies(this.localWorld); + if (config.showBounds) + { + this.renderBodyBounds(bodies, graphics, config.boundsColor, 0.2); + } - this.renderBodies(bodies); + if (config.showAxes || config.showAngleIndicator) + { + this.renderBodyAxes(bodies, graphics, config.showAxes, config.angleColor, 0.5); + } - if (showJoint) + if (config.showBody || config.showStaticBody) + { + this.renderBodies(bodies); + } + + if (config.showJoint) { this.renderJoints(); } @@ -1322,6 +1336,8 @@ var World = new Class({ /** * Renders the Engine Broadphase Controller Grid to the given Graphics instance. * + * The debug renderer calls this method if the `showBroadphase` config value is set. + * * This method is used internally by the Matter Debug Renderer, but is also exposed publically should * you wish to render the Grid to your own Graphics instance. * @@ -1363,6 +1379,131 @@ var World = new Class({ return this; }, + /** + * Renders the bounds of an array of Bodies to the given Graphics instance. + * + * The debug renderer calls this method if the `showBounds` config value is set. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render bounds to your own Graphics instance. + * + * @method Phaser.Physics.Matter.World#renderBodyBounds + * @since 3.22.0 + * + * @param {array} bodies - An array of bodies from the localWorld. + * @param {Phaser.GameObjects.Graphics} graphics - The Graphics object to render to. + * @param {number} lineColor - The line color. + * @param {number} lineOpacity - The line opacity, between 0 and 1. + */ + renderBodyBounds: function (bodies, graphics, lineColor, lineOpacity) + { + graphics.lineStyle(1, lineColor, lineOpacity); + + for (var i = 0; i < bodies.length; i++) + { + var body = bodies[i]; + + // 1) Don't show invisible bodies + if (!body.render.visible) + { + continue; + } + + var parts = body.parts; + + for (var j = parts.length > 1 ? 1 : 0; j < parts.length; j++) + { + var part = parts[j]; + + graphics.strokeRect( + part.bounds.min.x, + part.bounds.min.y, + part.bounds.max.x - part.bounds.min.x, + part.bounds.max.y - part.bounds.min.y + ); + } + } + + return this; + }, + + /** + * Renders either all axes, or a single axis indicator, for an array of Bodies, to the given Graphics instance. + * + * The debug renderer calls this method if the `showAxes` or `showAngleIndicator` config values are set. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render bounds to your own Graphics instance. + * + * @method Phaser.Physics.Matter.World#renderBodyAxes + * @since 3.22.0 + * + * @param {array} bodies - An array of bodies from the localWorld. + * @param {Phaser.GameObjects.Graphics} graphics - The Graphics object to render to. + * @param {boolean} showAxes - If `true` it will render all body axes. If `false` it will render a single axis indicator. + * @param {number} lineColor - The line color. + * @param {number} lineOpacity - The line opacity, between 0 and 1. + */ + renderBodyAxes: function (bodies, graphics, showAxes, lineColor, lineOpacity) + { + graphics.lineStyle(1, lineColor, lineOpacity); + + for (var i = 0; i < bodies.length; i++) + { + var body = bodies[i]; + var parts = body.parts; + + // 1) Don't show invisible bodies + if (!body.render.visible) + { + continue; + } + + var part; + var j; + var k; + + if (showAxes) + { + for (j = parts.length > 1 ? 1 : 0; j < parts.length; j++) + { + part = parts[j]; + + for (k = 0; k < part.axes.length; k++) + { + var axis = part.axes[k]; + + graphics.lineBetween( + part.position.x, + part.position.y, + part.position.x + axis.x * 20, + part.position.y + axis.y * 20 + ); + } + } + } + else + { + for (j = parts.length > 1 ? 1 : 0; j < parts.length; j++) + { + part = parts[j]; + + for (k = 0; k < part.axes.length; k++) + { + graphics.lineBetween( + part.position.x, + part.position.y, + (part.vertices[0].x + part.vertices[part.vertices.length - 1].x) / 2, + (part.vertices[0].y + part.vertices[part.vertices.length - 1].y) / 2 + ); + } + } + } + } + + return this; + }, + /** * Renders the given array of Bodies to the debug graphics instance. * From 334f17439ee880e45ff41ccbcdcf9dfa32c2e78d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 7 Jan 2020 12:39:31 +0000 Subject: [PATCH 052/189] Update MatterDebugConfig.js --- src/physics/matter-js/typedefs/MatterDebugConfig.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/physics/matter-js/typedefs/MatterDebugConfig.js b/src/physics/matter-js/typedefs/MatterDebugConfig.js index 2363a6010..c6e45e459 100644 --- a/src/physics/matter-js/typedefs/MatterDebugConfig.js +++ b/src/physics/matter-js/typedefs/MatterDebugConfig.js @@ -11,6 +11,11 @@ * @property {boolean} [showPositions=true] - Render the position of non-static bodies? * @property {boolean} [showBroadphase=false] - Render the broadphase grid? * @property {boolean} [broadphaseColor=0xffb400] - The color of the broadphase grid. + * @property {boolean} [showBounds=false] - Render the bounds of the bodies in the world? + * @property {boolean} [boundsColor=0xffb400] - The color of the body bounds. + * @property {boolean} [showAxes=false] - Render all of the body axes? + * @property {boolean} [showAngleIndicator=false] - Render just the single body angle? + * @property {boolean} [angleColor=0xe81153] - The color of the body angle / axes lines. * @property {boolean} [renderFill=false] - Render the bodies using a fill color. * @property {boolean} [renderLine=true] - Render the bodies using a line stroke. * @property {number} [fillColor=0x106909] - The color value of the fill when rendering dynamic bodies. From 1eec78375ae45c3b9257f258836033186fe20f04 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 7 Jan 2020 12:39:38 +0000 Subject: [PATCH 053/189] Removed old comments --- src/core/TimeStep.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/core/TimeStep.js b/src/core/TimeStep.js index a499014e1..b949fd345 100644 --- a/src/core/TimeStep.js +++ b/src/core/TimeStep.js @@ -9,16 +9,6 @@ var GetValue = require('../utils/object/GetValue'); var NOOP = require('../utils/NOOP'); var RequestAnimationFrame = require('../dom/RequestAnimationFrame'); -// Frame Rate config -// fps: { -// min: 10, -// target: 60, -// forceSetTimeOut: false, -// deltaHistory: 10, -// panicMax: 120, -// smoothStep: true -// } - // http://www.testufo.com/#test=animation-time-graph /** From 171ecb7fccd5532aff2bcdf46fbc92aac79157b5 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 7 Jan 2020 12:39:42 +0000 Subject: [PATCH 054/189] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e90208f3f..7f881223c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,11 @@ * `showSensors` - Render sensors? * `showBroadphase` - Render the broadphase grid behind the bodies? * `broadphaseColor` - The color of the broadphase grid lines. +* `showBounds` - Render the bounds of the bodies? +* `boundsColor` - The color of the body bounds lines. +* `showAxes` - Render all of the body axes? +* `showAngleIndicator` - Render just a single axis indicator per body? +* `angleColor` - The color of the body axis lines. * `renderFill` - Render the bodies using a fill color. * `renderLine`- Render the bodies using a line stroke. * `fillColor` - The color value of the fill when rendering dynamic bodies. @@ -47,6 +52,8 @@ * `World.renderConstraint` is a new method that will render a single Matter Constraint, such as a pin or a spring, to the given Graphics object. This is used internally during debug rendering but is also public. This allows you to control which constraints are rendered and to which Graphics object, should you wish to use them in-game and not just during debugging. * `World.renderConvexHull` is a new method that will render the convex hull of a single Matter Body, to the given Graphics object. This is used internally during debug rendering but is also public. This allows you to control which hulls are rendered and to which Graphics object, should you wish to use them in-game and not just during debugging. * `World.renderGrid` is a new method that will render the broadphase Grid to the given graphics instance. +* `World.renderBodyBounds` is a new method that will render the bounds of all the given bodies to the given graphics instance. +* `World.renderBodyAxes` is a new method that will render the axes of all the given bodies to the given graphics instance. * `World.renderBodies` has been rewritten to cache commonly-used values and avoid a situation when a single body would be rendered twice. * The private method `World.renderConvexHulls` has been removed as it's no longer used internally. * The private method `World.renderWireframes` has been removed as it's no longer used internally. From c0e61cf2becef2a60e2b269d86ed6f86f8306b1a Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 7 Jan 2020 12:56:30 +0000 Subject: [PATCH 055/189] Added renderBodyVelocity --- src/physics/matter-js/World.js | 51 ++++++++++++++++++- .../matter-js/typedefs/MatterDebugConfig.js | 2 + 2 files changed, 52 insertions(+), 1 deletion(-) diff --git a/src/physics/matter-js/World.js b/src/physics/matter-js/World.js index 4cf53c6d2..3232f9266 100644 --- a/src/physics/matter-js/World.js +++ b/src/physics/matter-js/World.js @@ -242,7 +242,6 @@ var World = new Class({ */ this.debugConfig = { - showVelocity: true, showCollisions: true, showSeparations: true, showIds: true, @@ -260,6 +259,9 @@ var World = new Class({ showBounds: GetFastValue(debugConfig, 'showBounds', false), boundsColor: GetFastValue(debugConfig, 'boundsColor', 0xffffff), + showVelocity: GetFastValue(debugConfig, 'showVelocity', false), + velocityColor: GetFastValue(debugConfig, 'velocityColor', 0x00aeef), + showBody: GetFastValue(debugConfig, 'showBody', true), showStaticBody: GetFastValue(debugConfig, 'showStaticBody', true), showInternalEdges: GetFastValue(debugConfig, 'showInternalEdges', false), @@ -1322,6 +1324,11 @@ var World = new Class({ this.renderBodyAxes(bodies, graphics, config.showAxes, config.angleColor, 0.5); } + if (config.showVelocity) + { + this.renderBodyVelocity(bodies, graphics, config.velocityColor, 1, 2); + } + if (config.showBody || config.showStaticBody) { this.renderBodies(bodies); @@ -1504,6 +1511,48 @@ var World = new Class({ return this; }, + /** + * Renders a velocity indicator for an array of Bodies, to the given Graphics instance. + * + * The debug renderer calls this method if the `showVelocity` config value is set. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render bounds to your own Graphics instance. + * + * @method Phaser.Physics.Matter.World#renderBodyVelocity + * @since 3.22.0 + * + * @param {array} bodies - An array of bodies from the localWorld. + * @param {Phaser.GameObjects.Graphics} graphics - The Graphics object to render to. + * @param {number} lineColor - The line color. + * @param {number} lineOpacity - The line opacity, between 0 and 1. + * @param {number} lineThickness - The line thickness. + */ + renderBodyVelocity: function (bodies, graphics, lineColor, lineOpacity, lineThickness) + { + graphics.lineStyle(lineThickness, lineColor, lineOpacity); + + for (var i = 0; i < bodies.length; i++) + { + var body = bodies[i]; + + // 1) Don't show invisible bodies + if (!body.render.visible) + { + continue; + } + + graphics.lineBetween( + body.position.x, + body.position.y, + body.position.x + (body.position.x - body.positionPrev.x) * 2, + body.position.y + (body.position.y - body.positionPrev.y) * 2 + ); + } + + return this; + }, + /** * Renders the given array of Bodies to the debug graphics instance. * diff --git a/src/physics/matter-js/typedefs/MatterDebugConfig.js b/src/physics/matter-js/typedefs/MatterDebugConfig.js index c6e45e459..ad659c3d8 100644 --- a/src/physics/matter-js/typedefs/MatterDebugConfig.js +++ b/src/physics/matter-js/typedefs/MatterDebugConfig.js @@ -16,6 +16,8 @@ * @property {boolean} [showAxes=false] - Render all of the body axes? * @property {boolean} [showAngleIndicator=false] - Render just the single body angle? * @property {boolean} [angleColor=0xe81153] - The color of the body angle / axes lines. + * @property {boolean} [showVelocity=false] - Render the velocity of the bodies in the world? + * @property {boolean} [velocityColor=0x00aeef] - The color of the body velocity line. * @property {boolean} [renderFill=false] - Render the bodies using a fill color. * @property {boolean} [renderLine=true] - Render the bodies using a line stroke. * @property {number} [fillColor=0x106909] - The color value of the fill when rendering dynamic bodies. From d4b6c54418881d5bd797bbd9916d17442379ceb0 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 7 Jan 2020 12:56:33 +0000 Subject: [PATCH 056/189] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f881223c..10ce46342 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,8 @@ * `showAxes` - Render all of the body axes? * `showAngleIndicator` - Render just a single axis indicator per body? * `angleColor` - The color of the body axis lines. +* `showVelocity` - Render a velocity line for the bodies? +* `velocityColor` - The color of the body velocity line. * `renderFill` - Render the bodies using a fill color. * `renderLine`- Render the bodies using a line stroke. * `fillColor` - The color value of the fill when rendering dynamic bodies. @@ -54,6 +56,7 @@ * `World.renderGrid` is a new method that will render the broadphase Grid to the given graphics instance. * `World.renderBodyBounds` is a new method that will render the bounds of all the given bodies to the given graphics instance. * `World.renderBodyAxes` is a new method that will render the axes of all the given bodies to the given graphics instance. +* `World.renderBodyVelocity` is a new method that will render a velocity line for all the given bodies to the given graphics instance. * `World.renderBodies` has been rewritten to cache commonly-used values and avoid a situation when a single body would be rendered twice. * The private method `World.renderConvexHulls` has been removed as it's no longer used internally. * The private method `World.renderWireframes` has been removed as it's no longer used internally. From 8527e10d64d9ff636be8f47494c9fd3b400a17d5 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 7 Jan 2020 14:02:28 +0000 Subject: [PATCH 057/189] Added renderCollisions and renderSeparations --- src/physics/matter-js/World.js | 195 +++++++++++++++++++++++++++++++-- 1 file changed, 183 insertions(+), 12 deletions(-) diff --git a/src/physics/matter-js/World.js b/src/physics/matter-js/World.js index 3232f9266..6782cfe2d 100644 --- a/src/physics/matter-js/World.js +++ b/src/physics/matter-js/World.js @@ -241,14 +241,6 @@ var World = new Class({ * @since 3.22.0 */ this.debugConfig = { - - showCollisions: true, - showSeparations: true, - showIds: true, - showShadows: true, - showVertexNumbers: true, - showMousePosition: true, - showAxes: GetFastValue(debugConfig, 'showAxes', false), showAngleIndicator: GetFastValue(debugConfig, 'showAngleIndicator', false), angleColor: GetFastValue(debugConfig, 'angleColor', 0xe81153), @@ -262,6 +254,12 @@ var World = new Class({ showVelocity: GetFastValue(debugConfig, 'showVelocity', false), velocityColor: GetFastValue(debugConfig, 'velocityColor', 0x00aeef), + showCollisions: GetFastValue(debugConfig, 'showCollisions', false), + collisionColor: GetFastValue(debugConfig, 'collisionColor', 0xf5950c), + + showSeparations: GetFastValue(debugConfig, 'showSeparations', false), + separationColor: GetFastValue(debugConfig, 'separationColor', 0xffa500), + showBody: GetFastValue(debugConfig, 'showBody', true), showStaticBody: GetFastValue(debugConfig, 'showStaticBody', true), showInternalEdges: GetFastValue(debugConfig, 'showInternalEdges', false), @@ -1319,6 +1317,16 @@ var World = new Class({ this.renderBodyBounds(bodies, graphics, config.boundsColor, 0.2); } + if (config.showBody || config.showStaticBody) + { + this.renderBodies(bodies); + } + + if (config.showJoint) + { + this.renderJoints(); + } + if (config.showAxes || config.showAngleIndicator) { this.renderBodyAxes(bodies, graphics, config.showAxes, config.angleColor, 0.5); @@ -1329,14 +1337,14 @@ var World = new Class({ this.renderBodyVelocity(bodies, graphics, config.velocityColor, 1, 2); } - if (config.showBody || config.showStaticBody) + if (config.showSeparations) { - this.renderBodies(bodies); + this.renderSeparations(engine.pairs.list, graphics, config.separationColor); } - if (config.showJoint) + if (config.showCollisions) { - this.renderJoints(); + this.renderCollisions(engine.pairs.list, graphics, config.collisionColor); } }, @@ -1386,6 +1394,169 @@ var World = new Class({ return this; }, + /** + * Renders the list of Pair separations to the given Graphics instance. + * + * The debug renderer calls this method if the `showSeparations` config value is set. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render the Grid to your own Graphics instance. + * + * @method Phaser.Physics.Matter.World#renderSeparations + * @since 3.22.0 + * + * @param {MatterJS.Pair[]} pairs - An array of Matter Pairs to be rendered. + * @param {Phaser.GameObjects.Graphics} graphics - The Graphics object to render to. + * @param {number} lineColor - The line color. + * + * @return {this} This Matter World instance for method chaining. + */ + renderSeparations: function (pairs, graphics, lineColor) + { + graphics.lineStyle(1, lineColor, 1); + + for (var i = 0; i < pairs.length; i++) + { + var pair = pairs[i]; + + if (!pair.isActive) + { + continue; + } + + var collision = pair.collision; + var bodyA = collision.bodyA; + var bodyB = collision.bodyB; + var posA = bodyA.position; + var posB = bodyB.position; + var penetration = collision.penetration; + + var k = (!bodyA.isStatic && !bodyB.isStatic) ? 4 : 1; + + if (bodyB.isStatic) + { + k = 0; + } + + graphics.lineBetween( + posB.x, + posB.y, + posB.x - (penetration.x * k), + posB.y - (penetration.y * k) + ); + + k = (!bodyA.isStatic && !bodyB.isStatic) ? 4 : 1; + + if (bodyA.isStatic) + { + k = 0; + } + + graphics.lineBetween( + posA.x, + posA.y, + posA.x - (penetration.x * k), + posA.y - (penetration.y * k) + ); + } + + return this; + }, + + /** + * Renders the list of collision points and normals to the given Graphics instance. + * + * The debug renderer calls this method if the `showCollisions` config value is set. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render the Grid to your own Graphics instance. + * + * @method Phaser.Physics.Matter.World#renderCollisions + * @since 3.22.0 + * + * @param {MatterJS.Pair[]} pairs - An array of Matter Pairs to be rendered. + * @param {Phaser.GameObjects.Graphics} graphics - The Graphics object to render to. + * @param {number} lineColor - The line color. + * + * @return {this} This Matter World instance for method chaining. + */ + renderCollisions: function (pairs, graphics, lineColor) + { + graphics.lineStyle(1, lineColor, 0.5); + graphics.fillStyle(lineColor, 1); + + var i; + var pair; + + // Collision Positions + + for (i = 0; i < pairs.length; i++) + { + pair = pairs[i]; + + if (!pair.isActive) + { + continue; + } + + for (var j = 0; j < pair.activeContacts.length; j++) + { + var contact = pair.activeContacts[j]; + var vertex = contact.vertex; + + graphics.fillRect(vertex.x - 2, vertex.y - 2, 5, 5); + } + } + + // Collision Normals + + for (i = 0; i < pairs.length; i++) + { + pair = pairs[i]; + + if (!pair.isActive) + { + continue; + } + + var collision = pair.collision; + var contacts = pair.activeContacts; + + if (contacts.length > 0) + { + var normalPosX = contacts[0].vertex.x; + var normalPosY = contacts[0].vertex.y; + + if (contacts.length === 2) + { + normalPosX = (contacts[0].vertex.x + contacts[1].vertex.x) / 2; + normalPosY = (contacts[0].vertex.y + contacts[1].vertex.y) / 2; + } + + if (collision.bodyB === collision.supports[0].body || collision.bodyA.isStatic) + { + graphics.lineBetween( + normalPosX - collision.normal.x * 8, + normalPosY - collision.normal.y * 8, + normalPosX, + normalPosY + ); + } + else + { + graphics.lineBetween( + normalPosX + collision.normal.x * 8, + normalPosY + collision.normal.y * 8, + normalPosX, + normalPosY + ); + } + } + } + + return this; + }, + /** * Renders the bounds of an array of Bodies to the given Graphics instance. * From 2b66f81d28db08d4b582af98432234ba921b5b03 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 7 Jan 2020 14:02:38 +0000 Subject: [PATCH 058/189] Final config structure and values --- .../matter-js/typedefs/MatterDebugConfig.js | 41 ++++++++++++++----- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/src/physics/matter-js/typedefs/MatterDebugConfig.js b/src/physics/matter-js/typedefs/MatterDebugConfig.js index ad659c3d8..301a77776 100644 --- a/src/physics/matter-js/typedefs/MatterDebugConfig.js +++ b/src/physics/matter-js/typedefs/MatterDebugConfig.js @@ -2,22 +2,29 @@ * @typedef {object} Phaser.Types.Physics.Matter.MatterDebugConfig * @since 3.22.0 * - * @property {boolean} [showBody=true] - Render the dynamic bodies in the world to the Graphics object? - * @property {boolean} [showStaticBody=true] - Render the static bodies in the world to the Graphics object? - * @property {boolean} [showSleeping=false] - Render any sleeping bodies (dynamic or static) in the world to the Graphics object? - * @property {boolean} [showJoint=true] - Render all world constraints to the Graphics object? - * @property {boolean} [showInternalEdges=false] - When rendering bodies, render the internal edges as well? - * @property {boolean} [showConvexHulls=false] - When rendering polygon bodies, render the convex hull as well? - * @property {boolean} [showPositions=true] - Render the position of non-static bodies? + * @property {boolean} [showAxes=false] - Render all of the body axes? + * @property {boolean} [showAngleIndicator=false] - Render just a single body axis? + * @property {boolean} [angleColor=0xe81153] - The color of the body angle / axes lines. + * * @property {boolean} [showBroadphase=false] - Render the broadphase grid? * @property {boolean} [broadphaseColor=0xffb400] - The color of the broadphase grid. + * * @property {boolean} [showBounds=false] - Render the bounds of the bodies in the world? - * @property {boolean} [boundsColor=0xffb400] - The color of the body bounds. - * @property {boolean} [showAxes=false] - Render all of the body axes? - * @property {boolean} [showAngleIndicator=false] - Render just the single body angle? - * @property {boolean} [angleColor=0xe81153] - The color of the body angle / axes lines. + * @property {boolean} [boundsColor=0xffffff] - The color of the body bounds. + * * @property {boolean} [showVelocity=false] - Render the velocity of the bodies in the world? * @property {boolean} [velocityColor=0x00aeef] - The color of the body velocity line. + * + * @property {boolean} [showCollisions=false] - Render the collision points and normals for colliding pairs. + * @property {boolean} [collisionColor=0xf5950c] - The color of the collision points. + * + * @property {boolean} [showSeparation=false] - Render lines showing the separation between bodies. + * @property {boolean} [separationColor=0xffa500] - The color of the body separation line. + * + * @property {boolean} [showBody=true] - Render the dynamic bodies in the world to the Graphics object? + * @property {boolean} [showStaticBody=true] - Render the static bodies in the world to the Graphics object? + * @property {boolean} [showInternalEdges=false] - When rendering bodies, render the internal edges as well? + * * @property {boolean} [renderFill=false] - Render the bodies using a fill color. * @property {boolean} [renderLine=true] - Render the bodies using a line stroke. * @property {number} [fillColor=0x106909] - The color value of the fill when rendering dynamic bodies. @@ -27,11 +34,21 @@ * @property {number} [lineThickness=1] - If rendering lines, the thickness of the line. * @property {number} [staticFillColor=0x0d177b] - The color value of the fill when rendering static bodies. * @property {number} [staticLineColor=0x1327e4] - The color value of the line stroke when rendering static bodies. + * + * @property {boolean} [showSleeping=false] - Render any sleeping bodies (dynamic or static) in the world to the Graphics object? * @property {number} [staticBodySleepOpacity=0.7] - The amount to multiply the opacity of sleeping static bodies by. * @property {number} [sleepFillColor=0x464646] - The color value of the fill when rendering sleeping dynamic bodies. * @property {number} [sleepLineColor=0x999a99] - The color value of the line stroke when rendering sleeping dynamic bodies. + * + * @property {boolean} [showSensors=true] - Render bodies or body parts that are flagged as being a sensor? + * @property {number} [sensorFillColor=0x0d177b] - The fill color when rendering body sensors. + * @property {number} [sensorLineColor=0x1327e4] - The line color when rendering body sensors. + * + * @property {boolean} [showPositions=true] - Render the position of non-static bodies? * @property {number} [positionSize=4] - The size of the rectangle drawn when rendering the body position. * @property {number} [positionColor=0xe042da] - The color value of the rectangle drawn when rendering the body position. + * + * @property {boolean} [showJoint=true] - Render all world constraints to the Graphics object? * @property {number} [jointColor=0xe0e042] - The color value of joints when `showJoint` is set. * @property {number} [jointLineOpacity=1] - The line opacity when rendering joints, a value between 0 and 1. * @property {number} [jointLineThickness=2] - The line thickness when rendering joints. @@ -40,5 +57,7 @@ * @property {number} [springColor=0xe042e0] - The color value of spring constraints. * @property {number} [anchorColor=0xefefef] - The color value of constraint anchors. * @property {number} [anchorSize=6] - The size of the circles drawn as the constraint anchors. + * + * @property {boolean} [showConvexHulls=false] - When rendering polygon bodies, render the convex hull as well? * @property {number} [hullColor=0xd703d0] - The color value of hulls when `showConvexHulls` is set. */ From a7c2a562be872c123425e0a131616e0eba291227 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 7 Jan 2020 14:02:42 +0000 Subject: [PATCH 059/189] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10ce46342..46033fe52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,6 +57,8 @@ * `World.renderBodyBounds` is a new method that will render the bounds of all the given bodies to the given graphics instance. * `World.renderBodyAxes` is a new method that will render the axes of all the given bodies to the given graphics instance. * `World.renderBodyVelocity` is a new method that will render a velocity line for all the given bodies to the given graphics instance. +* `World.renderSeparations` is a new method that will render the separations in the current pairs list to the given graphics instance. +* `World.renderCollisions` is a new method that will render the collision points and normals in the current pairs list to the given graphics instance. * `World.renderBodies` has been rewritten to cache commonly-used values and avoid a situation when a single body would be rendered twice. * The private method `World.renderConvexHulls` has been removed as it's no longer used internally. * The private method `World.renderWireframes` has been removed as it's no longer used internally. From 105fb64b4f378a7189ed9a4daab60b16a99f255e Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 7 Jan 2020 14:39:22 +0000 Subject: [PATCH 060/189] Removed spaces --- src/physics/matter-js/typedefs/MatterDebugConfig.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/physics/matter-js/typedefs/MatterDebugConfig.js b/src/physics/matter-js/typedefs/MatterDebugConfig.js index 301a77776..4b4c8dd43 100644 --- a/src/physics/matter-js/typedefs/MatterDebugConfig.js +++ b/src/physics/matter-js/typedefs/MatterDebugConfig.js @@ -5,26 +5,19 @@ * @property {boolean} [showAxes=false] - Render all of the body axes? * @property {boolean} [showAngleIndicator=false] - Render just a single body axis? * @property {boolean} [angleColor=0xe81153] - The color of the body angle / axes lines. - * * @property {boolean} [showBroadphase=false] - Render the broadphase grid? * @property {boolean} [broadphaseColor=0xffb400] - The color of the broadphase grid. - * * @property {boolean} [showBounds=false] - Render the bounds of the bodies in the world? * @property {boolean} [boundsColor=0xffffff] - The color of the body bounds. - * * @property {boolean} [showVelocity=false] - Render the velocity of the bodies in the world? * @property {boolean} [velocityColor=0x00aeef] - The color of the body velocity line. - * * @property {boolean} [showCollisions=false] - Render the collision points and normals for colliding pairs. * @property {boolean} [collisionColor=0xf5950c] - The color of the collision points. - * * @property {boolean} [showSeparation=false] - Render lines showing the separation between bodies. * @property {boolean} [separationColor=0xffa500] - The color of the body separation line. - * * @property {boolean} [showBody=true] - Render the dynamic bodies in the world to the Graphics object? * @property {boolean} [showStaticBody=true] - Render the static bodies in the world to the Graphics object? * @property {boolean} [showInternalEdges=false] - When rendering bodies, render the internal edges as well? - * * @property {boolean} [renderFill=false] - Render the bodies using a fill color. * @property {boolean} [renderLine=true] - Render the bodies using a line stroke. * @property {number} [fillColor=0x106909] - The color value of the fill when rendering dynamic bodies. @@ -34,20 +27,16 @@ * @property {number} [lineThickness=1] - If rendering lines, the thickness of the line. * @property {number} [staticFillColor=0x0d177b] - The color value of the fill when rendering static bodies. * @property {number} [staticLineColor=0x1327e4] - The color value of the line stroke when rendering static bodies. - * * @property {boolean} [showSleeping=false] - Render any sleeping bodies (dynamic or static) in the world to the Graphics object? * @property {number} [staticBodySleepOpacity=0.7] - The amount to multiply the opacity of sleeping static bodies by. * @property {number} [sleepFillColor=0x464646] - The color value of the fill when rendering sleeping dynamic bodies. * @property {number} [sleepLineColor=0x999a99] - The color value of the line stroke when rendering sleeping dynamic bodies. - * * @property {boolean} [showSensors=true] - Render bodies or body parts that are flagged as being a sensor? * @property {number} [sensorFillColor=0x0d177b] - The fill color when rendering body sensors. * @property {number} [sensorLineColor=0x1327e4] - The line color when rendering body sensors. - * * @property {boolean} [showPositions=true] - Render the position of non-static bodies? * @property {number} [positionSize=4] - The size of the rectangle drawn when rendering the body position. * @property {number} [positionColor=0xe042da] - The color value of the rectangle drawn when rendering the body position. - * * @property {boolean} [showJoint=true] - Render all world constraints to the Graphics object? * @property {number} [jointColor=0xe0e042] - The color value of joints when `showJoint` is set. * @property {number} [jointLineOpacity=1] - The line opacity when rendering joints, a value between 0 and 1. @@ -57,7 +46,6 @@ * @property {number} [springColor=0xe042e0] - The color value of spring constraints. * @property {number} [anchorColor=0xefefef] - The color value of constraint anchors. * @property {number} [anchorSize=6] - The size of the circles drawn as the constraint anchors. - * * @property {boolean} [showConvexHulls=false] - When rendering polygon bodies, render the convex hull as well? * @property {number} [hullColor=0xd703d0] - The color value of hulls when `showConvexHulls` is set. */ From 070ea9585f82580e17f2d1ed9e3567b500a1386e Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 7 Jan 2020 14:39:26 +0000 Subject: [PATCH 061/189] Update CHANGELOG.md --- CHANGELOG.md | 88 +++++++++++++++++++++++++++------------------------- 1 file changed, 46 insertions(+), 42 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46033fe52..3dcccbef3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,48 +5,52 @@ ### Matter Physics Updates * `MatterDebugConfig` is a new configuration object that contains all of the following new Matter debug settings: -* `showBody` - Render the dynamic bodies in the world to the Graphics object? -* `showStaticBody` - Render the static bodies in the world to the Graphics object? -* `showSleeping` - Render any sleeping bodies (dynamic or static) in the world to the Graphics object? -* `showJoint` - Render all world constraints to the Graphics object? -* `showInternalEdges` - When rendering bodies, render the internal edges as well? -* `showConvexHulls` - When rendering polygon bodies, render the convex hull as well? -* `showPositions` - Render the position of non-static bodies? -* `showSensors` - Render sensors? -* `showBroadphase` - Render the broadphase grid behind the bodies? -* `broadphaseColor` - The color of the broadphase grid lines. -* `showBounds` - Render the bounds of the bodies? -* `boundsColor` - The color of the body bounds lines. -* `showAxes` - Render all of the body axes? -* `showAngleIndicator` - Render just a single axis indicator per body? -* `angleColor` - The color of the body axis lines. -* `showVelocity` - Render a velocity line for the bodies? -* `velocityColor` - The color of the body velocity line. -* `renderFill` - Render the bodies using a fill color. +* `showAxes`- Render all of the body axes? +* `showAngleIndicator`- Render just a single body axis? +* `angleColor`- The color of the body angle / axes lines. +* `showBroadphase`- Render the broadphase grid? +* `broadphaseColor`- The color of the broadphase grid. +* `showBounds`- Render the bounds of the bodies in the world? +* `boundsColor`- The color of the body bounds. +* `showVelocity`- Render the velocity of the bodies in the world? +* `velocityColor`- The color of the body velocity line. +* `showCollisions`- Render the collision points and normals for colliding pairs. +* `collisionColor`- The color of the collision points. +* `showSeparation`- Render lines showing the separation between bodies. +* `separationColor`- The color of the body separation line. +* `showBody`- Render the dynamic bodies in the world to the Graphics object? +* `showStaticBody`- Render the static bodies in the world to the Graphics object? +* `showInternalEdges`- When rendering bodies, render the internal edges as well? +* `renderFill`- Render the bodies using a fill color. * `renderLine`- Render the bodies using a line stroke. -* `fillColor` - The color value of the fill when rendering dynamic bodies. -* `fillOpacity` - The opacity of the fill when rendering dynamic bodies, a value between 0 and 1. -* `lineColor` - The color value of the line stroke when rendering dynamic bodies. -* `lineOpacity` - The opacity of the line when rendering dynamic bodies, a value between 0 and 1. -* `lineThickness` - If rendering lines, the thickness of the line. -* `staticFillColor` - The color value of the fill when rendering static bodies. -* `staticLineColor` - The color value of the line stroke when rendering static bodies. -* `staticBodySleepOpacity` - The amount to multiply the opacity of sleeping static bodies by. -* `sleepFillColor` - The color value of the fill when rendering sleeping dynamic bodies. -* `sleepLineColor` - The color value of the line stroke when rendering sleeping dynamic bodies. -* `sensorFillColor` - The color value of the fill when rendering sensor bodies. -* `sensorLineColor` - The color value of the line stroke when rendering sensor bodies. -* `jointColor` - The color value of joints when `showJoint` is set. -* `jointLineOpacity` - The line opacity when rendering joints, a value between 0 and 1. -* `jointLineThickness` - The line thickness when rendering joints. -* `pinSize` - The size of the circles drawn when rendering pin constraints. -* `pinColor` - The color value of the circles drawn when rendering pin constraints. -* `springColor` - The color value of spring constraints. -* `anchorColor` - The color value of constraint anchors. -* `anchorSize` - The size of the circles drawn as the constraint anchors. -* `hullColor` - The color value of hulls when `showConvexHulls` is set. -* `positionSize` - The size of the rectangle drawn when rendering the body position. -* `positionColor` - The color value of the rectangle drawn when rendering the body position. +* `fillColor`- The color value of the fill when rendering dynamic bodies. +* `fillOpacity`- The opacity of the fill when rendering dynamic bodies, a value between 0 and 1. +* `lineColor`- The color value of the line stroke when rendering dynamic bodies. +* `lineOpacity`- The opacity of the line when rendering dynamic bodies, a value between 0 and 1. +* `lineThickness`- If rendering lines, the thickness of the line. +* `staticFillColor`- The color value of the fill when rendering static bodies. +* `staticLineColor`- The color value of the line stroke when rendering static bodies. +* `showSleeping`- Render any sleeping bodies (dynamic or static) in the world to the Graphics object? +* `staticBodySleepOpacity`] - The amount to multiply the opacity of sleeping static bodies by. +* `sleepFillColor`- The color value of the fill when rendering sleeping dynamic bodies. +* `sleepLineColor`- The color value of the line stroke when rendering sleeping dynamic bodies. +* `showSensors`- Render bodies or body parts that are flagged as being a sensor? +* `sensorFillColor`- The fill color when rendering body sensors. +* `sensorLineColor`- The line color when rendering body sensors. +* `showPositions`- Render the position of non-static bodies? +* `positionSize`- The size of the rectangle drawn when rendering the body position. +* `positionColor`- The color value of the rectangle drawn when rendering the body position. +* `showJoint`- Render all world constraints to the Graphics object? +* `jointColor`- The color value of joints when `showJoint` is set. +* `jointLineOpacity`- The line opacity when rendering joints, a value between 0 and 1. +* `jointLineThickness`- The line thickness when rendering joints. +* `pinSize`- The size of the circles drawn when rendering pin constraints. +* `pinColor`- The color value of the circles drawn when rendering pin constraints. +* `springColor`- The color value of spring constraints. +* `anchorColor`- The color value of constraint anchors. +* `anchorSize`- The size of the circles drawn as the constraint anchors. +* `showConvexHulls`- When rendering polygon bodies, render the convex hull as well? +* `hullColor`- The color value of hulls when `showConvexHulls` is set. * The `debug` property in the Matter World Config is now a `MatterDebugConfig` option instead of a boolean. However, if a boolean is given, it will use the default debug config values. * The following `MatterWorldConfig` options have now been removed: `debugShowBody`, `debugShowStaticBody`, `debugBodyColor`, `debugBodyFillColor`, `debugStaticBodyColor`, `debugShowJoint`, `debugJointColor`, `debugWireframes`, `debugShowInternalEdges`, `debugShowConvexHulls`, `debugConvexHullColor` and `debugShowSleeping`. These can all be set via the new `MatterDebugConfig` object instead. * The object `World.defaults` has been removed. Defaults are now access via `World.debugDefaults`. @@ -145,7 +149,7 @@ * `MatterPhysics.setVelocityY` is a new method that will set the vertical linear velocity of the given physics bodies. This can be used on all Matter bodies, not just those created via the factory. * `MatterPhysics.setAngularVelocity` is a new method that will set the angular velocity of the given physics bodies. This can be used on all Matter bodies, not just those created via the factory. * `MatterPhysics.applyForce` is a new method that applies a force to a body, at the bodies current position, including resulting torque. This can be used on all Matter bodies, not just those created via the factory. -* `MatterPhysics.applyForceFromAngle` is a new method that applies a force to a body from the given angle, at the bodies current position, including resulting torque. This can be used on all Matter bodies, not just those created via the factory. +* `MatterPhysics.applyForceFromPosition` is a new method that applies a force to a body from the given world position, including resulting torque. If no angle is given, the current body angle is used. This can be used on all Matter bodies, not just those created via the factory. ### New Features From a2c13771316100f6af3a95d0888b2085fd9fece2 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 7 Jan 2020 16:38:13 +0000 Subject: [PATCH 062/189] You can now set `gravity: false` in your Matter Config and it will reset gravity from the defaults to zero. --- src/physics/matter-js/World.js | 4 ++++ src/physics/matter-js/typedefs/MatterWorldConfig.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/physics/matter-js/World.js b/src/physics/matter-js/World.js index 6782cfe2d..590ab2844 100644 --- a/src/physics/matter-js/World.js +++ b/src/physics/matter-js/World.js @@ -86,6 +86,10 @@ var World = new Class({ { this.setGravity(gravity.x, gravity.y, gravity.scale); } + else if (gravity === false) + { + this.setGravity(0, 0, 0); + } /** * An object containing the 4 wall bodies that bound the physics world. diff --git a/src/physics/matter-js/typedefs/MatterWorldConfig.js b/src/physics/matter-js/typedefs/MatterWorldConfig.js index fc7c02952..c417b8bd1 100644 --- a/src/physics/matter-js/typedefs/MatterWorldConfig.js +++ b/src/physics/matter-js/typedefs/MatterWorldConfig.js @@ -2,7 +2,7 @@ * @typedef {object} Phaser.Types.Physics.Matter.MatterWorldConfig * @since 3.0.0 * - * @property {Phaser.Types.Math.Vector2Like} [gravity] - Sets {@link Phaser.Physics.Matter.World#gravity}. + * @property {(Phaser.Types.Math.Vector2Like|boolean)} [gravity] - Sets {@link Phaser.Physics.Matter.World#gravity}. If `false` Gravity will be set to zero. * @property {(object|boolean)} [setBounds] - Should the world have bounds enabled by default? * @property {number} [setBounds.x=0] - The x coordinate of the world bounds. * @property {number} [setBounds.y=0] - The y coordinate of the world bounds. From f9738ab237392d2ccf7b2544ab910638bd4a9e46 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 7 Jan 2020 16:38:16 +0000 Subject: [PATCH 063/189] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3dcccbef3..0975f316b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -150,6 +150,7 @@ * `MatterPhysics.setAngularVelocity` is a new method that will set the angular velocity of the given physics bodies. This can be used on all Matter bodies, not just those created via the factory. * `MatterPhysics.applyForce` is a new method that applies a force to a body, at the bodies current position, including resulting torque. This can be used on all Matter bodies, not just those created via the factory. * `MatterPhysics.applyForceFromPosition` is a new method that applies a force to a body from the given world position, including resulting torque. If no angle is given, the current body angle is used. This can be used on all Matter bodies, not just those created via the factory. +* You can now set `gravity: false` in your Matter Config and it will reset gravity from the defaults to zero. ### New Features From 2b1ce933af3619dc14fd75c2c7cb86554494f06a Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 7 Jan 2020 17:20:31 +0000 Subject: [PATCH 064/189] The internal Matter `Composite.setModified` function will now emit a `compositeModified` event, which the Matter World listens for, if debug draw is enabled, so it can update the composite children render styles. --- src/physics/matter-js/World.js | 5 +++++ src/physics/matter-js/lib/body/Composite.js | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/physics/matter-js/World.js b/src/physics/matter-js/World.js index 590ab2844..c6a51ad92 100644 --- a/src/physics/matter-js/World.js +++ b/src/physics/matter-js/World.js @@ -608,6 +608,11 @@ var World = new Class({ if (this.drawDebug) { + MatterEvents.on(world, 'compositeModified', function (composite) + { + _this.setCompositeRenderStyle(composite); + }); + MatterEvents.on(world, 'beforeAdd', function (event) { var objects = [].concat(event.object); diff --git a/src/physics/matter-js/lib/body/Composite.js b/src/physics/matter-js/lib/body/Composite.js index 7f79d3736..ef364654d 100644 --- a/src/physics/matter-js/lib/body/Composite.js +++ b/src/physics/matter-js/lib/body/Composite.js @@ -52,6 +52,9 @@ var Body = require('./Body'); * @param {boolean} [updateChildren=false] */ Composite.setModified = function(composite, isModified, updateParents, updateChildren) { + + Events.trigger(composite, 'compositeModified', composite); + composite.isModified = isModified; if (updateParents && composite.parent) { From 8ac59f9773b926f5928bf2402e6b9483c1fb8248 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 7 Jan 2020 17:20:34 +0000 Subject: [PATCH 065/189] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0975f316b..a5badecb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -151,6 +151,7 @@ * `MatterPhysics.applyForce` is a new method that applies a force to a body, at the bodies current position, including resulting torque. This can be used on all Matter bodies, not just those created via the factory. * `MatterPhysics.applyForceFromPosition` is a new method that applies a force to a body from the given world position, including resulting torque. If no angle is given, the current body angle is used. This can be used on all Matter bodies, not just those created via the factory. * You can now set `gravity: false` in your Matter Config and it will reset gravity from the defaults to zero. +* The internal Matter `Composite.setModified` function will now emit a `compositeModified` event, which the Matter World listens for, if debug draw is enabled, so it can update the composite children render styles. ### New Features From 99df00244bd6b9faa75708aca4d69c5e42352c8c Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 7 Jan 2020 17:31:29 +0000 Subject: [PATCH 066/189] Reduced default anchor size --- src/physics/matter-js/World.js | 2 +- src/physics/matter-js/typedefs/MatterDebugConfig.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/physics/matter-js/World.js b/src/physics/matter-js/World.js index c6a51ad92..3f952ac9f 100644 --- a/src/physics/matter-js/World.js +++ b/src/physics/matter-js/World.js @@ -304,7 +304,7 @@ var World = new Class({ springColor: GetFastValue(debugConfig, 'springColor', 0xe042e0), anchorColor: GetFastValue(debugConfig, 'anchorColor', 0xefefef), - anchorSize: GetFastValue(debugConfig, 'anchorSize', 6), + anchorSize: GetFastValue(debugConfig, 'anchorSize', 4), showConvexHulls: GetFastValue(debugConfig, 'showConvexHulls', false), hullColor: GetFastValue(debugConfig, 'hullColor', 0xd703d0) diff --git a/src/physics/matter-js/typedefs/MatterDebugConfig.js b/src/physics/matter-js/typedefs/MatterDebugConfig.js index 4b4c8dd43..989f916ed 100644 --- a/src/physics/matter-js/typedefs/MatterDebugConfig.js +++ b/src/physics/matter-js/typedefs/MatterDebugConfig.js @@ -45,7 +45,7 @@ * @property {number} [pinColor=0x42e0e0] - The color value of the circles drawn when rendering pin constraints. * @property {number} [springColor=0xe042e0] - The color value of spring constraints. * @property {number} [anchorColor=0xefefef] - The color value of constraint anchors. - * @property {number} [anchorSize=6] - The size of the circles drawn as the constraint anchors. + * @property {number} [anchorSize=4] - The size of the circles drawn as the constraint anchors. * @property {boolean} [showConvexHulls=false] - When rendering polygon bodies, render the convex hull as well? * @property {number} [hullColor=0xd703d0] - The color value of hulls when `showConvexHulls` is set. */ From 868d599832968f803fff989053e0e25e1ddece59 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 7 Jan 2020 17:31:41 +0000 Subject: [PATCH 067/189] Added JSDocs --- src/physics/matter-js/Factory.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/physics/matter-js/Factory.js b/src/physics/matter-js/Factory.js index 4aa138160..3e3515a58 100644 --- a/src/physics/matter-js/Factory.js +++ b/src/physics/matter-js/Factory.js @@ -350,14 +350,14 @@ var Factory = new Class({ * @method Phaser.Physics.Matter.Factory#chain * @since 3.0.0 * - * @param {MatterJS.Composite} composite - [description] - * @param {number} xOffsetA - [description] - * @param {number} yOffsetA - [description] - * @param {number} xOffsetB - [description] - * @param {number} yOffsetB - [description] - * @param {object} options - [description] + * @param {MatterJS.Composite} composite - The composite in which all bodies will be chained together sequentially. + * @param {number} xOffsetA - The horizontal offset of the BodyA constraint. This is a percentage based on the body size, not a world position. + * @param {number} yOffsetA - The vertical offset of the BodyA constraint. This is a percentage based on the body size, not a world position. + * @param {number} xOffsetB - The horizontal offset of the BodyB constraint. This is a percentage based on the body size, not a world position. + * @param {number} yOffsetB - The vertical offset of the BodyB constraint. This is a percentage based on the body size, not a world position. + * @param {object} options - An optional Constraint configuration object passed to the newly created constraints. * - * @return {MatterJS.Composite} A new composite containing objects chained together with constraints. + * @return {MatterJS.Composite} The original composite that was passed to this method. */ chain: function (composite, xOffsetA, yOffsetA, xOffsetB, yOffsetB, options) { @@ -370,13 +370,13 @@ var Factory = new Class({ * @method Phaser.Physics.Matter.Factory#mesh * @since 3.0.0 * - * @param {MatterJS.Composite} composite - [description] - * @param {number} columns - [description] - * @param {number} rows - [description] - * @param {boolean} crossBrace - [description] - * @param {object} options - [description] + * @param {MatterJS.Composite} composite - The composite in which all bodies will be chained together. + * @param {number} columns - The number of columns in the mesh. + * @param {number} rows - The number of rows in the mesh. + * @param {boolean} crossBrace - Create cross braces for the mesh as well? + * @param {object} options - An optional Constraint configuration object passed to the newly created constraints. * - * @return {MatterJS.Composite} The composite containing objects meshed together with constraints. + * @return {MatterJS.Composite} The original composite that was passed to this method. */ mesh: function (composite, columns, rows, crossBrace, options) { From 279829b4142b11ca32d5b4eb618090931fef4ab8 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 7 Jan 2020 17:54:47 +0000 Subject: [PATCH 068/189] Added JSDocs --- src/physics/matter-js/Factory.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/physics/matter-js/Factory.js b/src/physics/matter-js/Factory.js index 3e3515a58..81b2646d9 100644 --- a/src/physics/matter-js/Factory.js +++ b/src/physics/matter-js/Factory.js @@ -389,13 +389,13 @@ var Factory = new Class({ * @method Phaser.Physics.Matter.Factory#newtonsCradle * @since 3.0.0 * - * @param {number} x - [description] - * @param {number} y - [description] - * @param {number} number - [description] - * @param {number} size - [description] - * @param {number} length - [description] + * @param {number} x - The horizontal position of the start of the cradle. + * @param {number} y - The vertical position of the start of the cradle. + * @param {number} number - The number of balls in the cradle. + * @param {number} size - The radius of each ball in the cradle. + * @param {number} length - The length of the 'string' the balls hang from. * - * @return {MatterJS.Composite} A new composite newtonsCradle body. + * @return {MatterJS.Composite} A Newton's cradle composite. */ newtonsCradle: function (x, y, number, size, length) { From 736fd6dfb9d4c2422ae8d163379275dfcda9ac4f Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 7 Jan 2020 23:56:15 +0000 Subject: [PATCH 069/189] Added TWEEN_UPDATE current and previous values --- src/tweens/events/TWEEN_UPDATE_EVENT.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tweens/events/TWEEN_UPDATE_EVENT.js b/src/tweens/events/TWEEN_UPDATE_EVENT.js index 1d9c3dff8..b27f7f740 100644 --- a/src/tweens/events/TWEEN_UPDATE_EVENT.js +++ b/src/tweens/events/TWEEN_UPDATE_EVENT.js @@ -31,5 +31,7 @@ * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event. * @param {string} key - The property that was updated, i.e. `x` or `scale`. * @param {any} target - The target object that was updated. Usually a Game Object, but can be of any type. + * @param {number} current - The current value of the property that was tweened. + * @param {number} previous - The previous value of the property that was tweened, prior to this update. */ module.exports = 'update'; From 1a69cd9e0fb7c9e5b1098958cfcc471b17561496 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 7 Jan 2020 23:56:39 +0000 Subject: [PATCH 070/189] TweenData now stores its previous ease value. --- src/tweens/tween/TweenData.js | 1 + src/tweens/typedefs/TweenDataConfig.js | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/tweens/tween/TweenData.js b/src/tweens/tween/TweenData.js index d7910b40c..73873911b 100644 --- a/src/tweens/tween/TweenData.js +++ b/src/tweens/tween/TweenData.js @@ -96,6 +96,7 @@ var TweenData = function (target, index, key, getEnd, getStart, getActive, ease, // Ease Value Data: start: 0, + previous: 0, current: 0, end: 0, diff --git a/src/tweens/typedefs/TweenDataConfig.js b/src/tweens/typedefs/TweenDataConfig.js index 5e70cac92..7470ea1e0 100644 --- a/src/tweens/typedefs/TweenDataConfig.js +++ b/src/tweens/typedefs/TweenDataConfig.js @@ -21,9 +21,10 @@ * @property {number} [progress=0] - Between 0 and 1 showing completion of this TweenData. * @property {number} [elapsed=0] - Delta counter * @property {integer} [repeatCounter=0] - How many repeats are left to run? - * @property {number} [start=0] - Ease value data. - * @property {number} [current=0] - Ease value data. - * @property {number} [end=0] - Ease value data. + * @property {number} [start=0] - The property value at the start of the ease. + * @property {number} [current=0] - The current propety value. + * @property {number} [previous=0] - The previous property value. + * @property {number} [end=0] - The property value at the end of the ease. * @property {number} [t1=0] - Time duration 1. * @property {number} [t2=0] - Time duration 2. * @property {Phaser.Types.Tweens.TweenDataGenConfig} [gen] - LoadValue generation functions. From e861ecf5a0e4bf7f154c24172befc70e8d18c5fb Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 7 Jan 2020 23:57:08 +0000 Subject: [PATCH 071/189] Emit the current and previous values --- src/tweens/tween/Tween.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tweens/tween/Tween.js b/src/tweens/tween/Tween.js index d56b80a54..c90640a79 100644 --- a/src/tweens/tween/Tween.js +++ b/src/tweens/tween/Tween.js @@ -1240,7 +1240,7 @@ var Tween = new Class({ { if (!this.isSeeking) { - this.emit(event, this, tweenData.key, tweenData.target); + this.emit(event, this, tweenData.key, tweenData.target, tweenData.current, tweenData.previous); if (callback) { @@ -1465,6 +1465,7 @@ var Tween = new Class({ tweenData.elapsed = elapsed; tweenData.progress = progress; + tweenData.previous = tweenData.current; if (progress === 1) { From 08b30a2ec3971f68112fbc7f0bbd2e94a2f3e916 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 7 Jan 2020 23:57:11 +0000 Subject: [PATCH 072/189] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5badecb8..7c2f10ca8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -178,6 +178,8 @@ * The `Container` Game Object now uses the AlphaSingle component, allowing you to uniformly set the alpha of the container, rather than a quad alpha, which never worked consistently across Container children. Fix #4916 (thanks @laineus) * The `DOMElement` Game Object now uses the AlphaSingle component, allowing you to uniformly set the alpha of the element, rather than a quad alpha, which never worked for these objects. * The `Graphics` Game Object now uses the AlphaSingle component, allowing you to uniformly set the alpha of the element, rather than a quad alpha, which never worked for these objects. +* `TweenData` has a new property called `previous` which holds the eased property value prior to the update. +* The `TWEEN_UPDATE` event now sends two new parameters to the handler: `current` and `previous` which contain the current and previous property values. ### Bug Fixes From b908ebdda2eb043078af78fdb0f9990d75805190 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 8 Jan 2020 01:50:51 +0000 Subject: [PATCH 073/189] Added fromSVG method --- src/physics/matter-js/Factory.js | 47 ++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/src/physics/matter-js/Factory.js b/src/physics/matter-js/Factory.js index 81b2646d9..ea4378df0 100644 --- a/src/physics/matter-js/Factory.js +++ b/src/physics/matter-js/Factory.js @@ -9,6 +9,7 @@ var Body = require('./lib/body/Body'); var Class = require('../../utils/Class'); var Composites = require('./lib/factory/Composites'); var Constraint = require('./lib/constraint/Constraint'); +var Svg = require('./lib/geometry/Svg'); var MatterGameObject = require('./MatterGameObject'); var MatterImage = require('./MatterImage'); var MatterSprite = require('./MatterSprite'); @@ -185,6 +186,52 @@ var Factory = new Class({ return body; }, + /** + * Creates a body using the supplied body data, as provided by an SVG file. + * + * @method Phaser.Physics.Matter.Factory#fromSVG + * @since 3.22.0 + * + * @param {number} x - The X coordinate of the body. + * @param {number} y - The Y coordinate of the body. + * @param {object} xml - The SVG Path data. + * @param {number} [scale=1] - Scale the vertices by this amount after creation. + * @param {object} [options] - Optional Matter body configuration object, as passed to `Body.create`. + * @param {boolean} [addToWorld=true] - Should the newly created body be immediately added to the World? + * + * @return {MatterJS.Body} A Matter JS Body. + */ + fromSVG: function (x, y, xml, scale, options, addToWorld) + { + if (scale === undefined) { scale = 1; } + if (options === undefined) { options = {}; } + if (addToWorld === undefined) { addToWorld = true; } + + var path = xml.getElementsByTagName('path'); + var vertexSets = []; + + for (var i = 0; i < path.length; i++) + { + var points = Svg.pathToVertices(path[i], 30); + + if (scale !== 1) + { + Vertices.scale(points, scale, scale); + } + + vertexSets.push(points); + } + + var body = Bodies.fromVertices(x, y, vertexSets, options); + + if (addToWorld) + { + this.world.add(body); + } + + return body; + }, + /** * **This function is still in development** * From 0a6e696295e29232edd4024026322cbc4e5a8a3a Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 8 Jan 2020 01:50:54 +0000 Subject: [PATCH 074/189] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c2f10ca8..6b4d1b471 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -152,6 +152,7 @@ * `MatterPhysics.applyForceFromPosition` is a new method that applies a force to a body from the given world position, including resulting torque. If no angle is given, the current body angle is used. This can be used on all Matter bodies, not just those created via the factory. * You can now set `gravity: false` in your Matter Config and it will reset gravity from the defaults to zero. * The internal Matter `Composite.setModified` function will now emit a `compositeModified` event, which the Matter World listens for, if debug draw is enabled, so it can update the composite children render styles. +* `MatterPhysics.fromSVG` is a new method that allows you to create a Body from the given SVG path data. ### New Features From 6a8bce925020eed28136303766b70e34fae96f65 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 8 Jan 2020 11:14:26 +0000 Subject: [PATCH 075/189] Added essential new type defs --- .../matter-js/typedefs/MatterBodyConfig.js | 37 +++++++++++++++++++ .../typedefs/MatterBodyRenderConfig.js | 15 ++++++++ .../matter-js/typedefs/MatterChamferConfig.js | 9 +++++ .../typedefs/MatterCollisionFilter.js | 29 +++++++++++++++ 4 files changed, 90 insertions(+) create mode 100644 src/physics/matter-js/typedefs/MatterBodyConfig.js create mode 100644 src/physics/matter-js/typedefs/MatterBodyRenderConfig.js create mode 100644 src/physics/matter-js/typedefs/MatterChamferConfig.js create mode 100644 src/physics/matter-js/typedefs/MatterCollisionFilter.js diff --git a/src/physics/matter-js/typedefs/MatterBodyConfig.js b/src/physics/matter-js/typedefs/MatterBodyConfig.js new file mode 100644 index 000000000..c8af45cf8 --- /dev/null +++ b/src/physics/matter-js/typedefs/MatterBodyConfig.js @@ -0,0 +1,37 @@ +/** + * @typedef {object} Phaser.Types.Physics.Matter.MatterBodyConfig + * @since 3.22.0 + * + * @property {string} [label='Body'] - An arbitrary string-based name to help identify this body. + * @property {MatterJS.Body[]} [parts] - An array of bodies that make up this body. The first body in the array must always be a self reference to the current body instance. All bodies in the `parts` array together form a single rigid compound body. + * @property {any} [plugin] - An object reserved for storing plugin-specific properties. + * @property {number} [angle=0] - A number specifying the angle of the body, in radians. + * @property {Phaser.Types.Math.Vector2Like[]} [vertices=null] - An array of `Vector` objects that specify the convex hull of the rigid body. These should be provided about the origin `(0, 0)`. + * @property {Phaser.Types.Math.Vector2Like} [position] - A `Vector` that specifies the current world-space position of the body. + * @property {Phaser.Types.Math.Vector2Like} [force] - A `Vector` that specifies the force to apply in the current step. It is zeroed after every `Body.update`. See also `Body.applyForce`. + * @property {number} [torque=0] - A `Number` that specifies the torque (turning force) to apply in the current step. It is zeroed after every `Body.update`. + * @property {boolean} [isSensor=false] - A flag that indicates whether a body is a sensor. Sensor triggers collision events, but doesn't react with colliding body physically. + * @property {boolean} [isStatic=false] - A flag that indicates whether a body is considered static. A static body can never change position or angle and is completely fixed. + * @property {number} [sleepThreshold=60] - A `Number` that defines the number of updates in which this body must have near-zero velocity before it is set as sleeping by the `Matter.Sleeping` module (if sleeping is enabled by the engine). + * @property {number} [density=0.001] - A `Number` that defines the density of the body, that is its mass per unit area. If you pass the density via `Body.create` the `mass` property is automatically calculated for you based on the size (area) of the object. This is generally preferable to simply setting mass and allows for more intuitive definition of materials (e.g. rock has a higher density than wood). + * @property {number} [restitution=0] - A `Number` that defines the restitution (elasticity) of the body. The value is always positive and is in the range `(0, 1)`. + * @property {number} [friction=0.1] - A `Number` that defines the friction of the body. The value is always positive and is in the range `(0, 1)`. A value of `0` means that the body may slide indefinitely. A value of `1` means the body may come to a stop almost instantly after a force is applied. + * @property {number} [frictionStatic=0.5] - A `Number` that defines the static friction of the body (in the Coulomb friction model). A value of `0` means the body will never 'stick' when it is nearly stationary and only dynamic `friction` is used. The higher the value (e.g. `10`), the more force it will take to initially get the body moving when nearly stationary. This value is multiplied with the `friction` property to make it easier to change `friction` and maintain an appropriate amount of static friction. + * @property {number} [frictionAir=0.01] - A `Number` that defines the air friction of the body (air resistance). A value of `0` means the body will never slow as it moves through space. The higher the value, the faster a body slows when moving through space. + * @property {Phaser.Types.Physics.Matter.MatterCollisionFilter} [collisionFilter] - An `Object` that specifies the collision filtering properties of this body. + * @property {number} [slop=0.05] - A `Number` that specifies a tolerance on how far a body is allowed to 'sink' or rotate into other bodies. Avoid changing this value unless you understand the purpose of `slop` in physics engines. The default should generally suffice, although very large bodies may require larger values for stable stacking. + * @property {number} [timeScale=1] - A `Number` that allows per-body time scaling, e.g. a force-field where bodies inside are in slow-motion, while others are at full speed. + * @property {(number|number[]|Phaser.Types.Physics.Matter.MatterChamferConfig)} [chamfer=null] - A number, or array of numbers, to chamfer the vertices of the body, or a full Chamfer configuration object. + * @property {number} [circleRadius=0] - The radius of this body if a circle. + * @property {number} [mass=0] - A `Number` that defines the mass of the body, although it may be more appropriate to specify the `density` property instead. If you modify this value, you must also modify the `body.inverseMass` property (`1 / mass`). + * @property {number} [inverseMass=0] - A `Number` that defines the inverse mass of the body (`1 / mass`). If you modify this value, you must also modify the `body.mass` property. + * @property {Phaser.Types.Math.Vector2Like} [scale] - A `Vector` that specifies the initial scale of the body. + * @property {Phaser.Types.Math.Vector2Like} [gravityScale] - A `Vector` that scales the influence of World gravity when applied to this body. + * @property {boolean} [ignoreGravity=false] - A boolean that toggles if this body should ignore world gravity or not. + * @property {boolean} [ignorePointer=false] - A boolean that toggles if this body should ignore pointer / mouse constraints or not. + * @property {Phaser.Types.Physics.Matter.MatterBodyRenderConfig} [render] - The Debug Render configuration object for this body. + * @property {function} [onCollideCallback] - A callback that is invoked when this Body starts colliding with any other Body. You can register callbacks by providing a function of type `( pair: Matter.Pair) => void`. + * @property {function} [onCollideEndCallback] - A callback that is invoked when this Body stops colliding with any other Body. You can register callbacks by providing a function of type `( pair: Matter.Pair) => void`. + * @property {function} [onCollideActiveCallback] - A callback that is invoked for the duration that this Body is colliding with any other Body. You can register callbacks by providing a function of type `( pair: Matter.Pair) => void`. + * @property {any} [onCollideWith] - A collision callback dictionary used by the `Body.setOnCollideWith` function. + */ diff --git a/src/physics/matter-js/typedefs/MatterBodyRenderConfig.js b/src/physics/matter-js/typedefs/MatterBodyRenderConfig.js new file mode 100644 index 000000000..204ec6bbc --- /dev/null +++ b/src/physics/matter-js/typedefs/MatterBodyRenderConfig.js @@ -0,0 +1,15 @@ +/** + * @typedef {object} Phaser.Types.Physics.Matter.MatterBodyRenderConfig + * @since 3.22.0 + * + * @property {boolean} [visible=true] - Should this body be rendered by the Debug Renderer? + * @property {number} [opacity=1] - The opacity of the body and all parts within it. + * @property {number} [fillColor] - The color value of the fill when rendering this body. + * @property {number} [fillOpacity] - The opacity of the fill when rendering this body, a value between 0 and 1. + * @property {number} [lineColor] - The color value of the line stroke when rendering this body. + * @property {number} [lineOpacity] - The opacity of the line when rendering this body, a value between 0 and 1. + * @property {number} [lineThickness] - If rendering lines, the thickness of the line. + * @property {object} [sprite] - Controls the offset between the body and the parent Game Object, if it has one. + * @property {number} [sprite.xOffset=0] - The horizontal offset between the body and the parent Game Object texture, if it has one. + * @property {number} [sprite.yOffset=0] - The vertical offset between the body and the parent Game Object texture, if it has one. + */ diff --git a/src/physics/matter-js/typedefs/MatterChamferConfig.js b/src/physics/matter-js/typedefs/MatterChamferConfig.js new file mode 100644 index 000000000..f9869b4d7 --- /dev/null +++ b/src/physics/matter-js/typedefs/MatterChamferConfig.js @@ -0,0 +1,9 @@ +/** + * @typedef {object} Phaser.Types.Physics.Matter.MatterChamferConfig + * @since 3.22.0 + * + * @property {(number|number[])} [radius=8] - A single number, or an array, to specify the radius for each vertex. + * @property {number} [quality=-1] - The quality of the chamfering. -1 means 'auto'. + * @property {number} [qualityMin=2] - The minimum quality of the chamfering. The higher this value, the more vertices are created. + * @property {number} [qualityMax=14] - The maximum quality of the chamfering. The higher this value, the more vertices are created. + */ diff --git a/src/physics/matter-js/typedefs/MatterCollisionFilter.js b/src/physics/matter-js/typedefs/MatterCollisionFilter.js new file mode 100644 index 000000000..a966159c5 --- /dev/null +++ b/src/physics/matter-js/typedefs/MatterCollisionFilter.js @@ -0,0 +1,29 @@ +/** + * An `Object` that specifies the collision filtering properties of this body. + * + * Collisions between two bodies will obey the following rules: + * - If the two bodies have the same non-zero value of `collisionFilter.group`, + * they will always collide if the value is positive, and they will never collide + * if the value is negative. + * - If the two bodies have different values of `collisionFilter.group` or if one + * (or both) of the bodies has a value of 0, then the category/mask rules apply as follows: + * + * Each body belongs to a collision category, given by `collisionFilter.category`. This + * value is used as a bit field and the category should have only one bit set, meaning that + * the value of this property is a power of two in the range [1, 2^31]. Thus, there are 32 + * different collision categories available. + * + * Each body also defines a collision bitmask, given by `collisionFilter.mask` which specifies + * the categories it collides with (the value is the bitwise AND value of all these categories). + * + * Using the category/mask rules, two bodies `A` and `B` collide if each includes the other's + * category in its mask, i.e. `(categoryA & maskB) !== 0` and `(categoryB & maskA) !== 0` + * are both true. + * + * @typedef {object} Phaser.Types.Physics.Matter.MatterCollisionFilter + * @since 3.22.0 + * + * @property {number} [category=0x0001] - A bit field that specifies the collision category this body belongs to. The category value should have only one bit set, for example `0x0001`. This means there are up to 32 unique collision categories available. + * @property {number} [mask=0xFFFFFFFF] - A bit mask that specifies the collision categories this body may collide with. + * @property {number} [group=0] - An Integer `Number`, that specifies the collision group this body belongs to. + */ From 2ac0562fb6486234896ae1204098e8ddfd5e1630 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 8 Jan 2020 11:14:40 +0000 Subject: [PATCH 076/189] Updated JSDocs --- src/physics/matter-js/MatterGameObject.js | 2 +- src/physics/matter-js/MatterImage.js | 2 +- src/physics/matter-js/MatterPhysics.js | 8 ++++---- src/physics/matter-js/MatterSprite.js | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/physics/matter-js/MatterGameObject.js b/src/physics/matter-js/MatterGameObject.js index 5f4c7c870..cf9dfab81 100644 --- a/src/physics/matter-js/MatterGameObject.js +++ b/src/physics/matter-js/MatterGameObject.js @@ -35,7 +35,7 @@ function hasGetterOrSetter (def) * * @param {Phaser.Physics.Matter.World} world - The Matter world to add the body to. * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will have the Matter body applied to it. - * @param {(object|MatterJS.Body)} [options] - A Matter Body configuration object, or an instance of a Matter Body. + * @param {(Phaser.Types.Physics.Matter.MatterBodyConfig|MatterJS.Body)} [options] - A Matter Body configuration object, or an instance of a Matter Body. * @param {boolean} [addToWorld=true] - Should the newly created body be immediately added to the World? * * @return {Phaser.GameObjects.GameObject} The Game Object that was created with the Matter body. diff --git a/src/physics/matter-js/MatterImage.js b/src/physics/matter-js/MatterImage.js index 0692c0077..a6a9c054d 100644 --- a/src/physics/matter-js/MatterImage.js +++ b/src/physics/matter-js/MatterImage.js @@ -58,7 +58,7 @@ var Vector2 = require('../../math/Vector2'); * @param {number} y - The vertical position of this Game Object in the world. * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. - * @param {object} [options={}] - Matter.js configuration object. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. */ var MatterImage = new Class({ diff --git a/src/physics/matter-js/MatterPhysics.js b/src/physics/matter-js/MatterPhysics.js index 788bdbeff..f3123c50b 100644 --- a/src/physics/matter-js/MatterPhysics.js +++ b/src/physics/matter-js/MatterPhysics.js @@ -1090,7 +1090,7 @@ var MatterPhysics = new Class({ * Sets just the horizontal linear velocity of the physics bodies. * The vertical velocity of the body is unchanged. * - * @method Phaser.Physics.Matter.MatterPhysics#setVelocity + * @method Phaser.Physics.Matter.MatterPhysics#setVelocityX * @since 3.22.0 * * @param {(MatterJS.Body|MatterJS.Body[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. @@ -1119,7 +1119,7 @@ var MatterPhysics = new Class({ * Sets just the vertical linear velocity of the physics bodies. * The horizontal velocity of the body is unchanged. * - * @method Phaser.Physics.Matter.MatterPhysics#setVelocity + * @method Phaser.Physics.Matter.MatterPhysics#setVelocityY * @since 3.22.0 * * @param {(MatterJS.Body|MatterJS.Body[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. @@ -1175,7 +1175,7 @@ var MatterPhysics = new Class({ * @since 3.22.0 * * @param {(MatterJS.Body|MatterJS.Body[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. - * @param {Phaser.Math.Vector2Like} force - A Vector that specifies the force to apply. + * @param {Phaser.Types.Math.Vector2Like} force - A Vector that specifies the force to apply. * * @return {this} This Matter Physics instance. */ @@ -1206,7 +1206,7 @@ var MatterPhysics = new Class({ * @since 3.22.0 * * @param {(MatterJS.Body|MatterJS.Body[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. - * @param {Phaser.Math.Vector2Like} position - A Vector that specifies the world-space position to apply the force at. + * @param {Phaser.Types.Math.Vector2Like} position - A Vector that specifies the world-space position to apply the force at. * @param {number} speed - A speed value to be applied to a directional force. * @param {number} [angle] - The angle, in radians, to apply the force from. Leave undefined to use the current body angle. * diff --git a/src/physics/matter-js/MatterSprite.js b/src/physics/matter-js/MatterSprite.js index 400e7fe3e..8d8e3831b 100644 --- a/src/physics/matter-js/MatterSprite.js +++ b/src/physics/matter-js/MatterSprite.js @@ -62,7 +62,7 @@ var Vector2 = require('../../math/Vector2'); * @param {number} y - The vertical position of this Game Object in the world. * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. - * @param {object} [options={}] - Matter.js configuration object. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. */ var MatterSprite = new Class({ From 86edd99248a56f8d7e7a7fd5d7b5ec316c8ef1c2 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 8 Jan 2020 11:15:02 +0000 Subject: [PATCH 077/189] `inverseMass` is a required property! Also removed duplicate jsdoc --- src/physics/matter-js/lib/body/Body.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/physics/matter-js/lib/body/Body.js b/src/physics/matter-js/lib/body/Body.js index e8d0c9a1d..4c3a64572 100644 --- a/src/physics/matter-js/lib/body/Body.js +++ b/src/physics/matter-js/lib/body/Body.js @@ -82,6 +82,7 @@ var Axes = require('../geometry/Axes'); axes: null, area: 0, mass: 0, + inverseMass: 0, inertia: 0, _original: null, render: { @@ -1269,14 +1270,6 @@ var Axes = require('../geometry/Axes'); * @type Phaser.GameObjects.GameObject */ - /** - * The scale of the Body when Body.setScale was called. Not used internally by Matter. - * - * @property scale - * @type vector - * @default { x: 1, y: 1 } - */ - /** * The center of mass of the Body. * From ac92fbe1b00ce7c8b826d6b02f4272b0747b60a3 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 8 Jan 2020 11:15:30 +0000 Subject: [PATCH 078/189] Lots of JSDoc updates. Also removed velocity and force methods as they don't belong in the Factory. --- src/physics/matter-js/Factory.js | 143 ++++++++++++------------------- 1 file changed, 57 insertions(+), 86 deletions(-) diff --git a/src/physics/matter-js/Factory.js b/src/physics/matter-js/Factory.js index ea4378df0..0bc2e51c3 100644 --- a/src/physics/matter-js/Factory.js +++ b/src/physics/matter-js/Factory.js @@ -19,7 +19,18 @@ var Vertices = require('./lib/geometry/Vertices'); /** * @classdesc - * The Matter Factory can create different types of bodies and them to a physics world. + * The Matter Factory is responsible for quickly creating a variety of different types of + * bodies, constraints and Game Objects and adding them into the physics world. + * + * You access the factory from within a Scene using `add`: + * + * ```javascript + * this.matter.add.rectangle(x, y, width, height); + * ``` + * + * Use of the Factory is optional. All of the objects it creates can also be created + * directly via your own code or constructors. It is provided as a means to keep your + * code concise. * * @class Factory * @memberof Phaser.Physics.Matter @@ -72,7 +83,7 @@ var Factory = new Class({ * @param {number} y - The Y coordinate of the center of the Body. * @param {number} width - The width of the Body. * @param {number} height - The height of the Body. - * @param {object} options - An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * * @return {MatterJS.Body} A Matter JS Body. */ @@ -96,7 +107,7 @@ var Factory = new Class({ * @param {number} width - The width of the trapezoid of the Body. * @param {number} height - The height of the trapezoid of the Body. * @param {number} slope - The slope of the trapezoid. 0 creates a rectangle, while 1 creates a triangle. Positive values make the top side shorter, while negative values make the bottom side shorter. - * @param {object} options - An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * * @return {MatterJS.Body} A Matter JS Body. */ @@ -118,7 +129,7 @@ var Factory = new Class({ * @param {number} x - The X coordinate of the center of the Body. * @param {number} y - The Y coordinate of the center of the Body. * @param {number} radius - The radius of the circle. - * @param {object} [options] - An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * @param {number} [maxSides] - The maximum amount of sides to use for the polygon which will approximate this circle. * * @return {MatterJS.Body} A Matter JS Body. @@ -142,7 +153,7 @@ var Factory = new Class({ * @param {number} y - The Y coordinate of the center of the Body. * @param {number} sides - The number of sides the polygon will have. * @param {number} radius - The "radius" of the polygon, i.e. the distance from its center to any vertex. This is also the radius of its circumcircle. - * @param {object} options - An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * * @return {MatterJS.Body} A Matter JS Body. */ @@ -165,7 +176,7 @@ var Factory = new Class({ * @param {number} x - The X coordinate of the center of the Body. * @param {number} y - The Y coordinate of the center of the Body. * @param {(string|array)} vertexSets - [description] - * @param {object} [options] - [description] + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * @param {boolean} [flagInternal=false] - Flag internal edges (coincident part edges) * @param {number} [removeCollinear=0.01] - Whether Matter.js will discard collinear edges (to improve performance). * @param {number} [minimumArea=10] - During decomposition discard parts that have an area less than this. @@ -196,7 +207,7 @@ var Factory = new Class({ * @param {number} y - The Y coordinate of the body. * @param {object} xml - The SVG Path data. * @param {number} [scale=1] - Scale the vertices by this amount after creation. - * @param {object} [options] - Optional Matter body configuration object, as passed to `Body.create`. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * @param {boolean} [addToWorld=true] - Should the newly created body be immediately added to the World? * * @return {MatterJS.Body} A Matter JS Body. @@ -243,7 +254,7 @@ var Factory = new Class({ * @param {number} x - The X coordinate of the body. * @param {number} y - The Y coordinate of the body. * @param {object} data - The body data object as parsed from the JSON body format. - * @param {object} [options] - Optional Matter body configuration object, as passed to `Body.create`. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * @param {boolean} [addToWorld=true] - Should the newly created body be immediately added to the World? * * @return {MatterJS.Body} A Matter JS Body. @@ -310,7 +321,7 @@ var Factory = new Class({ * @param {number} rows - The number of rows in the grid. * @param {number} [columnGap=0] - The distance between each column. * @param {number} [rowGap=0] - The distance between each row. - * @param {object} [options] - [description] + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * * @return {MatterJS.Composite} A Matter JS Composite Stack. */ @@ -459,11 +470,11 @@ var Factory = new Class({ * @method Phaser.Physics.Matter.Factory#car * @since 3.0.0 * - * @param {number} x - [description] - * @param {number} y - [description] - * @param {number} width - [description] - * @param {number} height - [description] - * @param {number} wheelSize - [description] + * @param {number} x - The horizontal position of the car in the world. + * @param {number} y - The vertical position of the car in the world. + * @param {number} width - The width of the car chasis. + * @param {number} height - The height of the car chasis. + * @param {number} wheelSize - The radius of the car wheels. * * @return {MatterJS.Composite} A new composite car body. */ @@ -488,7 +499,7 @@ var Factory = new Class({ * @param {number} rows - The number of rows in the Composite. * @param {number} columnGap - The distance between each column. * @param {number} rowGap - The distance between each row. - * @param {boolean} crossBrace - [description] + * @param {boolean} crossBrace - `true` to create cross braces between the bodies, or `false` to create just straight braces. * @param {number} particleRadius - The radius of this circlular composite. * @param {object} particleOptions - [description] * @param {object} constraintOptions - [description] @@ -654,7 +665,12 @@ var Factory = new Class({ }, /** - * [description] + * Creates a Matter Physics Image Game Object. + * + * An Image is a light-weight Game Object useful for the display of static images in your game, + * such as logos, backgrounds, scenery or other non-animated elements. Images can have input + * events and physics bodies, or be tweened, tinted or scrolled. The main difference between an + * Image and a Sprite is that you cannot animate an Image as they do not have the Animation component. * * @method Phaser.Physics.Matter.Factory#image * @since 3.0.0 @@ -663,9 +679,9 @@ var Factory = new Class({ * @param {number} y - The vertical position of this Game Object in the world. * @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value. - * @param {object} [options={}] - [description] + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * - * @return {Phaser.Physics.Matter.Image} [description] + * @return {Phaser.Physics.Matter.Image} The Matter Image Game Object. */ image: function (x, y, key, frame, options) { @@ -682,8 +698,8 @@ var Factory = new Class({ * @method Phaser.Physics.Matter.Factory#tileBody * @since 3.0.0 * - * @param {Phaser.Tilemaps.Tile} tile - [description] - * @param {object} options - [description] + * @param {Phaser.Tilemaps.Tile} tile - The target tile that should have a Matter body. + * @param {Phaser.Types.Physics.Matter.MatterTileOptions} [options] - Options to be used when creating the Matter body. * * @return {Phaser.Physics.Matter.TileBody} [description] */ @@ -695,7 +711,15 @@ var Factory = new Class({ }, /** - * [description] + * Creates a Matter Physics Sprite Game Object. + * + * A Sprite Game Object is used for the display of both static and animated images in your game. + * Sprites can have input events and physics bodies. They can also be tweened, tinted, scrolled + * and animated. + * + * The main difference between a Sprite and an Image Game Object is that you cannot animate Images. + * As such, Sprites take a fraction longer to process and have a larger API footprint due to the Animation + * Component. If you do not require animation then you can safely use Images to replace Sprites in all cases. * * @method Phaser.Physics.Matter.Factory#sprite * @since 3.0.0 @@ -704,9 +728,9 @@ var Factory = new Class({ * @param {number} y - The vertical position of this Game Object in the world. * @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value. - * @param {object} [options={}] - [description] + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * - * @return {Phaser.Physics.Matter.Sprite} [description] + * @return {Phaser.Physics.Matter.Sprite} The Matter Sprite Game Object. */ sprite: function (x, y, key, frame, options) { @@ -719,81 +743,28 @@ var Factory = new Class({ }, /** - * [description] + * Takes an existing Game Object and injects all of the Matter Components into it. + * + * This enables you to use component methods such as `setVelocity` or `isSensor` directly from + * this Game Object. + * + * You can also pass in either a Matter Body Configuration object, or a Matter Body instance + * to link with this Game Object. * * @method Phaser.Physics.Matter.Factory#gameObject * @since 3.3.0 * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to inject the Matter Body in to. - * @param {(object|MatterJS.Body)} [options] - A Matter Body configuration object, or an instance of a Matter Body. + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to inject the Matter Components in to. + * @param {(Phaser.Types.Physics.Matter.MatterBodyConfig|MatterJS.Body)} [options] - A Matter Body configuration object, or an instance of a Matter Body. * @param {boolean} [addToWorld=true] - Add this Matter Body to the World? * - * @return {Phaser.GameObjects.GameObject} The Game Object that had the Matter Body injected into it. + * @return {Phaser.GameObjects.GameObject} The Game Object that had the Matter Components injected into it. */ gameObject: function (gameObject, options, addToWorld) { return MatterGameObject(this.world, gameObject, options, addToWorld); }, - /** - * Instantly sets the linear velocity of the given body. Position, angle, force etc. are unchanged. - * - * See also `force`. - * - * @method Phaser.Physics.Matter.Factory#velocity - * @since 3.18.0 - * - * @param {MatterJS.Body} body - The Matter Body to set the velocity on. - * @param {Phaser.Types.Math.Vector2Like} velocity - The velocity to set. An object with public `x` and `y` components. - * - * @return {MatterJS.Body} The Matter body. - */ - velocity: function (body, velocity) - { - Body.setVelocity(body, velocity); - - return body; - }, - - /** - * Instantly sets the angular velocity of the given body. Position, angle, force etc. are unchanged. - * - * See also `force`. - * - * @method Phaser.Physics.Matter.Factory#angularVelocity - * @since 3.18.0 - * - * @param {MatterJS.Body} body - The Matter Body to set the velocity on. - * @param {number} velocity - The angular velocity to set. - * - * @return {MatterJS.Body} The Matter body. - */ - angularVelocity: function (body, velocity) - { - Body.setAngularVelocity(body, velocity); - - return body; - }, - - /** - * Applies a force to a body from a given world-space position, including resulting torque. - * - * @method Phaser.Physics.Matter.Factory#force - * @since 3.18.0 - * - * @param {MatterJS.Body} body - The Matter Body to set the force on. - * @param {Phaser.Types.Math.Vector2Like} position - The world position to apply the force from. An object with public `x` and `y` components. - * @param {Phaser.Types.Math.Vector2Like} force - The force to set. An object with public `x` and `y` components. - * - * @return {MatterJS.Body} The Matter body. - */ - force: function (body, position, force) - { - Body.applyForce(body, position, force); - - return body; - }, - /** * Destroys this Factory. * From 0a376d6c6e96649aa3e8e7d5a46026cbc90b6e0e Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 8 Jan 2020 11:15:40 +0000 Subject: [PATCH 079/189] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b4d1b471..b711d8090 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -153,6 +153,13 @@ * You can now set `gravity: false` in your Matter Config and it will reset gravity from the defaults to zero. * The internal Matter `Composite.setModified` function will now emit a `compositeModified` event, which the Matter World listens for, if debug draw is enabled, so it can update the composite children render styles. * `MatterPhysics.fromSVG` is a new method that allows you to create a Body from the given SVG path data. +* The `Matter.Factory.velocity` method has been removed. Please now use `MatterPhysics.setVelocity` instead. +* The `Matter.Factory.angularVelocity` method has been removed. Please now use `MatterPhysics.setAngularVelocity` instead. +* The `Matter.Factory.force` method has been removed. Please now use `MatterPhysics.applyForce` instead. +* `MatterBodyConfig` is a new type def that contains all of the Body configuration properties. This is now used through-out the JSDocs to aid in code-completion. +* `MatterBodyRenderConfig` is a new type def that contains all of the Body debug rendering configuration properties. This is now used through-out the JSDocs to aid in code-completion. +* `MatterChamferConfig` is a new type def that contains all of the chamfer configuration properties. This is now used through-out the JSDocs to aid in code-completion. +* `MatterCollisionFilter` is a new type def that contains all of the collision configuration properties. This is now used through-out the JSDocs to aid in code-completion. ### New Features From 49556021efc3010ea23457ec98f6e35a319bee8f Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 8 Jan 2020 11:55:24 +0000 Subject: [PATCH 080/189] New constraint type defs --- .../typedefs/MatterConstraintConfig.js | 18 ++++++++++++++++++ .../typedefs/MatterConstraintRenderConfig.js | 13 +++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 src/physics/matter-js/typedefs/MatterConstraintConfig.js create mode 100644 src/physics/matter-js/typedefs/MatterConstraintRenderConfig.js diff --git a/src/physics/matter-js/typedefs/MatterConstraintConfig.js b/src/physics/matter-js/typedefs/MatterConstraintConfig.js new file mode 100644 index 000000000..96fdb4e46 --- /dev/null +++ b/src/physics/matter-js/typedefs/MatterConstraintConfig.js @@ -0,0 +1,18 @@ +/** + * @typedef {object} Phaser.Types.Physics.Matter.MatterConstraintConfig + * @since 3.22.0 + * + * @property {string} [label='Constraint'] - An arbitrary string-based name to help identify this constraint. + * @property {MatterJS.Body} [bodyA] - The first possible `Body` that this constraint is attached to. + * @property {MatterJS.Body} [bodyB] - The second possible `Body` that this constraint is attached to. + * @property {Phaser.Types.Math.Vector2Like} [pointA] - A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyA` if defined, otherwise a world-space position. + * @property {Phaser.Types.Math.Vector2Like} [pointB] - A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyB` if defined, otherwise a world-space position. + * @property {number} [stiffness=1] - A `Number` that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts like a soft spring. + * @property {number} [angularStiffness=0] - A `Number` that specifies the angular stiffness of the constraint. + * @property {number} [angleA=0] - The angleA of the constraint. If bodyA is set, the angle of bodyA is used instead. + * @property {number} [angleB=0] - The angleB of the constraint. If bodyB is set, the angle of bodyB is used instead. + * @property {number} [damping=0] - A `Number` that specifies the damping of the constraint, i.e. the amount of resistance applied to each body based on their velocities to limit the amount of oscillation. Damping will only be apparent when the constraint also has a very low `stiffness`. A value of `0.1` means the constraint will apply heavy damping, resulting in little to no oscillation. A value of `0` means the constraint will apply no damping. + * @property {number} [length] - A `Number` that specifies the target resting length of the constraint. It is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. + * @property {any} [plugin] - An object reserved for storing plugin-specific properties. + * @property {Phaser.Types.Physics.Matter.MatterConstraintRenderConfig} [render] - The Debug Render configuration object for this constraint. + */ diff --git a/src/physics/matter-js/typedefs/MatterConstraintRenderConfig.js b/src/physics/matter-js/typedefs/MatterConstraintRenderConfig.js new file mode 100644 index 000000000..a3c89f007 --- /dev/null +++ b/src/physics/matter-js/typedefs/MatterConstraintRenderConfig.js @@ -0,0 +1,13 @@ +/** + * @typedef {object} Phaser.Types.Physics.Matter.MatterConstraintRenderConfig + * @since 3.22.0 + * + * @property {boolean} [visible=true] - Should this constraint be rendered by the Debug Renderer? + * @property {boolean} [anchors=true] - If this constraint has anchors, should they be rendered? Pin constraints never have anchors. + * @property {number} [lineColor] - The color value of the line stroke when rendering this constraint. + * @property {number} [lineOpacity] - The opacity of the line when rendering this constraint, a value between 0 and 1. + * @property {number} [lineThickness] - If rendering lines, the thickness of the line. + * @property {number} [pinSize=4] - The size of the circles drawn when rendering pin constraints. + * @property {number} [anchorSize=4] - The size of the circles drawn as the constraint anchors. + * @property {number} [anchorColor=0xefefef] - The color value of constraint anchors. + */ From 4e8c676895e1d41f332e949c9ddb54ebd43453d0 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 8 Jan 2020 11:55:35 +0000 Subject: [PATCH 081/189] Full JSDocs coverage! --- src/physics/matter-js/Factory.js | 137 +++++++++++++++++++++++++------ 1 file changed, 114 insertions(+), 23 deletions(-) diff --git a/src/physics/matter-js/Factory.js b/src/physics/matter-js/Factory.js index 0bc2e51c3..a2ab23ac0 100644 --- a/src/physics/matter-js/Factory.js +++ b/src/physics/matter-js/Factory.js @@ -175,7 +175,7 @@ var Factory = new Class({ * * @param {number} x - The X coordinate of the center of the Body. * @param {number} y - The Y coordinate of the center of the Body. - * @param {(string|array)} vertexSets - [description] + * @param {(string|array)} vertexSets - The vertices data. Either a path string or an array of vertices. * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * @param {boolean} [flagInternal=false] - Flag internal edges (coincident part edges) * @param {number} [removeCollinear=0.01] - Whether Matter.js will discard collinear edges (to improve performance). @@ -198,7 +198,24 @@ var Factory = new Class({ }, /** - * Creates a body using the supplied body data, as provided by an SVG file. + * Creates a body using the path data from an SVG file. + * + * SVG Parsing requires the pathseg polyfill from https://github.com/progers/pathseg + * + * The SVG file should be loaded as XML, as this method requires the ability to extract + * the path data from it. I.e.: + * + * ```javascript + * preload () + * { + * this.load.xml('face', 'assets/face.svg); + * } + * + * create () + * { + * this.matter.add.fromSVG(400, 300, this.cache.xml.get('face')); + * } + * ``` * * @method Phaser.Physics.Matter.Factory#fromSVG * @since 3.22.0 @@ -413,7 +430,7 @@ var Factory = new Class({ * @param {number} yOffsetA - The vertical offset of the BodyA constraint. This is a percentage based on the body size, not a world position. * @param {number} xOffsetB - The horizontal offset of the BodyB constraint. This is a percentage based on the body size, not a world position. * @param {number} yOffsetB - The vertical offset of the BodyB constraint. This is a percentage based on the body size, not a world position. - * @param {object} options - An optional Constraint configuration object passed to the newly created constraints. + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * * @return {MatterJS.Composite} The original composite that was passed to this method. */ @@ -432,7 +449,7 @@ var Factory = new Class({ * @param {number} columns - The number of columns in the mesh. * @param {number} rows - The number of rows in the mesh. * @param {boolean} crossBrace - Create cross braces for the mesh as well? - * @param {object} options - An optional Constraint configuration object passed to the newly created constraints. + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * * @return {MatterJS.Composite} The original composite that was passed to this method. */ @@ -501,8 +518,8 @@ var Factory = new Class({ * @param {number} rowGap - The distance between each row. * @param {boolean} crossBrace - `true` to create cross braces between the bodies, or `false` to create just straight braces. * @param {number} particleRadius - The radius of this circlular composite. - * @param {object} particleOptions - [description] - * @param {object} constraintOptions - [description] + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [particleOptions] - An optional Body configuration object that is used to set initial Body properties on creation. + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [constraintOptions] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * * @return {MatterJS.Composite} A new composite simple soft body. */ @@ -516,7 +533,20 @@ var Factory = new Class({ }, /** - * [description] + * This method is an alias for `Factory.constraint`. + * + * Constraints (or joints) are used for specifying that a fixed distance must be maintained + * between two bodies, or a body and a fixed world-space position. + * + * The stiffness of constraints can be modified to create springs or elastic. + * + * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` + * value (e.g. `0.7` or above). + * + * If the constraint is unstable, try lowering the `stiffness` value and / or increasing + * `constraintIterations` within the Matter Config. + * + * For compound bodies, constraints must be applied to the parent body and not one of its parts. * * @method Phaser.Physics.Matter.Factory#joint * @since 3.0.0 @@ -525,7 +555,7 @@ var Factory = new Class({ * @param {MatterJS.Body} bodyB - The second possible `Body` that this constraint is attached to. * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. - * @param {object} [options={}] - [description] + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * * @return {MatterJS.Constraint} A Matter JS Constraint. */ @@ -535,7 +565,20 @@ var Factory = new Class({ }, /** - * [description] + * This method is an alias for `Factory.constraint`. + * + * Constraints (or joints) are used for specifying that a fixed distance must be maintained + * between two bodies, or a body and a fixed world-space position. + * + * The stiffness of constraints can be modified to create springs or elastic. + * + * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` + * value (e.g. `0.7` or above). + * + * If the constraint is unstable, try lowering the `stiffness` value and / or increasing + * `constraintIterations` within the Matter Config. + * + * For compound bodies, constraints must be applied to the parent body and not one of its parts. * * @method Phaser.Physics.Matter.Factory#spring * @since 3.0.0 @@ -544,7 +587,7 @@ var Factory = new Class({ * @param {MatterJS.Body} bodyB - The second possible `Body` that this constraint is attached to. * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. - * @param {object} [options={}] - [description] + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * * @return {MatterJS.Constraint} A Matter JS Constraint. */ @@ -554,7 +597,18 @@ var Factory = new Class({ }, /** - * [description] + * Constraints (or joints) are used for specifying that a fixed distance must be maintained + * between two bodies, or a body and a fixed world-space position. + * + * The stiffness of constraints can be modified to create springs or elastic. + * + * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` + * value (e.g. `0.7` or above). + * + * If the constraint is unstable, try lowering the `stiffness` value and / or increasing + * `constraintIterations` within the Matter Config. + * + * For compound bodies, constraints must be applied to the parent body and not one of its parts. * * @method Phaser.Physics.Matter.Factory#constraint * @since 3.0.0 @@ -563,7 +617,7 @@ var Factory = new Class({ * @param {MatterJS.Body} bodyB - The second possible `Body` that this constraint is attached to. * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. - * @param {object} [options={}] - [description] + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * * @return {MatterJS.Constraint} A Matter JS Constraint. */ @@ -590,7 +644,21 @@ var Factory = new Class({ }, /** - * [description] + * Constraints (or joints) are used for specifying that a fixed distance must be maintained + * between two bodies, or a body and a fixed world-space position. + * + * A world constraint has only one body, you should specify a `pointA` position in + * the constraint options parameter to attach the constraint to the world. + * + * The stiffness of constraints can be modified to create springs or elastic. + * + * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` + * value (e.g. `0.7` or above). + * + * If the constraint is unstable, try lowering the `stiffness` value and / or increasing + * `constraintIterations` within the Matter Config. + * + * For compound bodies, constraints must be applied to the parent body and not one of its parts. * * @method Phaser.Physics.Matter.Factory#worldConstraint * @since 3.0.0 @@ -598,7 +666,7 @@ var Factory = new Class({ * @param {MatterJS.Body} body - The Matter `Body` that this constraint is attached to. * @param {number} [length] - A number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. - * @param {object} [options={}] - [description] + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * * @return {MatterJS.Constraint} A Matter JS Constraint. */ @@ -624,12 +692,21 @@ var Factory = new Class({ }, /** - * [description] + * This method is an alias for `Factory.pointerConstraint`. + * + * A Pointer Constraint is a special type of constraint that allows you to click + * and drag bodies in a Matter World. It monitors the active Pointers in a Scene, + * and when one is pressed down it checks to see if that hit any part of any active + * body in the world. If it did, and the body has input enabled, it will begin to + * drag it until either released, or you stop it via the `stopDrag` method. + * + * You can adjust the stiffness, length and other properties of the constraint via + * the `options` object on creation. * * @method Phaser.Physics.Matter.Factory#mouseSpring * @since 3.0.0 * - * @param {object} options - [description] + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * * @return {MatterJS.Constraint} A Matter JS Constraint. */ @@ -639,12 +716,19 @@ var Factory = new Class({ }, /** - * [description] + * A Pointer Constraint is a special type of constraint that allows you to click + * and drag bodies in a Matter World. It monitors the active Pointers in a Scene, + * and when one is pressed down it checks to see if that hit any part of any active + * body in the world. If it did, and the body has input enabled, it will begin to + * drag it until either released, or you stop it via the `stopDrag` method. + * + * You can adjust the stiffness, length and other properties of the constraint via + * the `options` object on creation. * * @method Phaser.Physics.Matter.Factory#pointerConstraint * @since 3.0.0 * - * @param {object} options - [description] + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * * @return {MatterJS.Constraint} A Matter JS Constraint. */ @@ -693,7 +777,16 @@ var Factory = new Class({ }, /** - * [description] + * Creates a wrapper around a Tile that provides access to a corresponding Matter body. A tile can only + * have one Matter body associated with it. You can either pass in an existing Matter body for + * the tile or allow the constructor to create the corresponding body for you. If the Tile has a + * collision group (defined in Tiled), those shapes will be used to create the body. If not, the + * tile's rectangle bounding box will be used. + * + * The corresponding body will be accessible on the Tile itself via Tile.physics.matterBody. + * + * Note: not all Tiled collision shapes are supported. See + * Phaser.Physics.Matter.TileBody#setFromTileCollision for more information. * * @method Phaser.Physics.Matter.Factory#tileBody * @since 3.0.0 @@ -701,13 +794,11 @@ var Factory = new Class({ * @param {Phaser.Tilemaps.Tile} tile - The target tile that should have a Matter body. * @param {Phaser.Types.Physics.Matter.MatterTileOptions} [options] - Options to be used when creating the Matter body. * - * @return {Phaser.Physics.Matter.TileBody} [description] + * @return {Phaser.Physics.Matter.TileBody} The Matter Tile Body Game Object. */ tileBody: function (tile, options) { - var tileBody = new MatterTileBody(this.world, tile, options); - - return tileBody; + return new MatterTileBody(this.world, tile, options); }, /** From 28a7ccab57e1b1c478d6e2adbee514dc3666fc65 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 8 Jan 2020 11:55:38 +0000 Subject: [PATCH 082/189] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b711d8090..7c73cbb34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -160,6 +160,8 @@ * `MatterBodyRenderConfig` is a new type def that contains all of the Body debug rendering configuration properties. This is now used through-out the JSDocs to aid in code-completion. * `MatterChamferConfig` is a new type def that contains all of the chamfer configuration properties. This is now used through-out the JSDocs to aid in code-completion. * `MatterCollisionFilter` is a new type def that contains all of the collision configuration properties. This is now used through-out the JSDocs to aid in code-completion. +* `MatterConstraintConfig` is a new type def that contains all of the constraint configuration properties. This is now used through-out the JSDocs to aid in code-completion. +* `MatterConstraintRenderConfig` is a new type def that contains all of the Constraint debug rendering configuration properties. This is now used through-out the JSDocs to aid in code-completion. ### New Features From 2859eb6a688cc04b61ac2e82f3b5c4703ab0afaf Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 8 Jan 2020 12:15:17 +0000 Subject: [PATCH 083/189] Added new Set Body Config --- .../matter-js/typedefs/MatterSetBodyConfig.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/physics/matter-js/typedefs/MatterSetBodyConfig.js diff --git a/src/physics/matter-js/typedefs/MatterSetBodyConfig.js b/src/physics/matter-js/typedefs/MatterSetBodyConfig.js new file mode 100644 index 000000000..69f1df972 --- /dev/null +++ b/src/physics/matter-js/typedefs/MatterSetBodyConfig.js @@ -0,0 +1,19 @@ +/** + * @typedef {object} Phaser.Types.Physics.Matter.MatterSetBodyConfig + * @since 3.22.0 + * + * @property {string} [type='rectangle'] - The shape type. Either `rectangle`, `circle`, `trapezoid`, `polygon`, `fromVertices`, `fromVerts` or `fromPhysicsEditor`. + * @property {number} [x] - The horizontal world position to place the body at. + * @property {number} [y] - The vertical world position to place the body at. + * @property {number} [width] - The width of the body. + * @property {number} [height] - The height of the body. + * @property {number} [radius] - The radius of the body. Used by `circle` and `polygon` shapes. + * @property {number} [maxSides=25] - The max sizes of the body. Used by the `circle` shape. + * @property {number} [slope=0.5] - Used by the `trapezoid` shape. The slope of the trapezoid. 0 creates a rectangle, while 1 creates a triangle. Positive values make the top side shorter, while negative values make the bottom side shorter. + * @property {number} [sides=5] - Used by the `polygon` shape. The number of sides the polygon will have. + * @property {(string|array)} [verts] - Used by the `fromVerts` shape. The vertices data. Either a path string or an array of vertices. + * @property {boolean} [flagInternal=false] - Used by the `fromVerts` shape. Flag internal edges (coincident part edges) + * @property {number} [removeCollinear=0.01] - Used by the `fromVerts` shape. Whether Matter.js will discard collinear edges (to improve performance). + * @property {number} [minimumArea=10] - Used by the `fromVerts` shape. During decomposition discard parts that have an area less than this. + * @property {boolean} [addToWorld=true] - Should the new body be automatically added to the world? + */ From ae8bfbc0135cf942252f4d3f41d85bd38d9868e5 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 8 Jan 2020 12:15:29 +0000 Subject: [PATCH 084/189] Added missing JSDocs --- src/physics/matter-js/Factory.js | 4 +- src/physics/matter-js/components/SetBody.js | 60 +++++++++++++-------- 2 files changed, 41 insertions(+), 23 deletions(-) diff --git a/src/physics/matter-js/Factory.js b/src/physics/matter-js/Factory.js index a2ab23ac0..deb7674c0 100644 --- a/src/physics/matter-js/Factory.js +++ b/src/physics/matter-js/Factory.js @@ -104,8 +104,8 @@ var Factory = new Class({ * * @param {number} x - The X coordinate of the center of the Body. * @param {number} y - The Y coordinate of the center of the Body. - * @param {number} width - The width of the trapezoid of the Body. - * @param {number} height - The height of the trapezoid of the Body. + * @param {number} width - The width of the trapezoid Body. + * @param {number} height - The height of the trapezoid Body. * @param {number} slope - The slope of the trapezoid. 0 creates a rectangle, while 1 creates a triangle. Positive values make the top side shorter, while negative values make the bottom side shorter. * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * diff --git a/src/physics/matter-js/components/SetBody.js b/src/physics/matter-js/components/SetBody.js index b3bfe95bf..ec5f2713b 100644 --- a/src/physics/matter-js/components/SetBody.js +++ b/src/physics/matter-js/components/SetBody.js @@ -11,24 +11,25 @@ var PhysicsEditorParser = require('../PhysicsEditorParser'); var Vertices = require('../lib/geometry/Vertices'); /** - * [description] + * Enables a Matter-enabled Game Object to set its Body. Should be used as a mixin and not directly. * * @namespace Phaser.Physics.Matter.Components.SetBody * @since 3.0.0 */ var SetBody = { - // Calling any of these methods resets previous properties you may have set on the body, including plugins, mass, etc - /** * Set the body on a Game Object to a rectangle. + * + * Calling this methods resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. * * @method Phaser.Physics.Matter.Components.SetBody#setRectangle * @since 3.0.0 * * @param {number} width - Width of the rectangle. * @param {number} height - Height of the rectangle. - * @param {object} options - [description] + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * * @return {Phaser.GameObjects.GameObject} This Game Object. */ @@ -38,13 +39,16 @@ var SetBody = { }, /** - * [description] + * Set the body on a Game Object to a circle. + * + * Calling this methods resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. * * @method Phaser.Physics.Matter.Components.SetBody#setCircle * @since 3.0.0 * - * @param {number} radius - [description] - * @param {object} options - [description] + * @param {number} radius - The radius of the circle. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * * @return {Phaser.GameObjects.GameObject} This Game Object. */ @@ -55,13 +59,16 @@ var SetBody = { /** * Set the body on the Game Object to a polygon shape. + * + * Calling this methods resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. * * @method Phaser.Physics.Matter.Components.SetBody#setPolygon * @since 3.0.0 * - * @param {number} radius - The radius of the polygon. - * @param {number} sides - The amount of sides creating the polygon. - * @param {object} options - A matterjs config object. + * @param {number} sides - The number of sides the polygon will have. + * @param {number} radius - The "radius" of the polygon, i.e. the distance from its center to any vertex. This is also the radius of its circumcircle. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * * @return {Phaser.GameObjects.GameObject} This Game Object. */ @@ -71,15 +78,18 @@ var SetBody = { }, /** - * Creates a new matterjs trapezoid body. + * Set the body on the Game Object to a trapezoid shape. + * + * Calling this methods resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. * * @method Phaser.Physics.Matter.Components.SetBody#setTrapezoid * @since 3.0.0 * - * @param {number} width - The width of the trapezoid. - * @param {number} height - The height of the trapezoid. - * @param {number} slope - The angle of slope for the trapezoid. - * @param {object} options - A matterjs config object for the body. + * @param {number} width - The width of the trapezoid Body. + * @param {number} height - The height of the trapezoid Body. + * @param {number} slope - The slope of the trapezoid. 0 creates a rectangle, while 1 creates a triangle. Positive values make the top side shorter, while negative values make the bottom side shorter. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * * @return {Phaser.GameObjects.GameObject} This Game Object. */ @@ -89,13 +99,18 @@ var SetBody = { }, /** - * [description] + * Set this Game Object to use the given existing Matter Body. + * + * The body is first removed from the world before being added to this Game Object. + * + * Calling this methods resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. * * @method Phaser.Physics.Matter.Components.SetBody#setExistingBody * @since 3.0.0 * - * @param {MatterJS.Body} body - [description] - * @param {boolean} [addToWorld=true] - Should the newly created body be immediately added to the World? + * @param {MatterJS.Body} body - The Body this Game Object should use. + * @param {boolean} [addToWorld=true] - Should the body be immediately added to the World? * * @return {Phaser.GameObjects.GameObject} This Game Object. */ @@ -144,13 +159,16 @@ var SetBody = { }, /** - * [description] + * Set this Game Object to create and use a new Body based on the configuration object given. + * + * Calling this methods resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. * * @method Phaser.Physics.Matter.Components.SetBody#setBody * @since 3.0.0 * - * @param {object} config - [description] - * @param {object} options - [description] + * @param {(string|Phaser.Types.Physics.Matter.MatterSetBodyConfig)} config - Either a string, such as `circle`, or a Matter Set Body Configuration object. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * * @return {Phaser.GameObjects.GameObject} This Game Object. */ From b8797de87a5ee95c7a37cc95a9e2289d2e6f274c Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 8 Jan 2020 12:15:32 +0000 Subject: [PATCH 085/189] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c73cbb34..0fe73a754 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Matter Physics Updates +* Matter Physics now has 100% JSDoc coverage! Woohoo :) * `MatterDebugConfig` is a new configuration object that contains all of the following new Matter debug settings: * `showAxes`- Render all of the body axes? * `showAngleIndicator`- Render just a single body axis? @@ -162,6 +163,7 @@ * `MatterCollisionFilter` is a new type def that contains all of the collision configuration properties. This is now used through-out the JSDocs to aid in code-completion. * `MatterConstraintConfig` is a new type def that contains all of the constraint configuration properties. This is now used through-out the JSDocs to aid in code-completion. * `MatterConstraintRenderConfig` is a new type def that contains all of the Constraint debug rendering configuration properties. This is now used through-out the JSDocs to aid in code-completion. +* `MatterSetBodyConfig` is a new type def that contains all of the Constraint debug rendering configuration properties. This is now used through-out the JSDocs to aid in code-completion. ### New Features From d6e0ba9b29d842e59792ce81f819b9062f597560 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 8 Jan 2020 14:41:24 +0000 Subject: [PATCH 086/189] `MatterPhysics.getConstraintLength` is a new method that will return the length of the given constraint, as this is something you cannot get from the constraint properties directly. --- src/physics/matter-js/MatterPhysics.js | 33 ++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/physics/matter-js/MatterPhysics.js b/src/physics/matter-js/MatterPhysics.js index f3123c50b..5ceb9eeb6 100644 --- a/src/physics/matter-js/MatterPhysics.js +++ b/src/physics/matter-js/MatterPhysics.js @@ -13,6 +13,7 @@ var Composite = require('./lib/body/Composite'); var Composites = require('./lib/factory/Composites'); var Constraint = require('./lib/constraint/Constraint'); var Detector = require('./lib/collision/Detector'); +var DistanceBetween = require('../../math/distance/DistanceBetween'); var Factory = require('./Factory'); var GetFastValue = require('../../utils/object/GetFastValue'); var GetValue = require('../../utils/object/GetValue'); @@ -1271,6 +1272,38 @@ var MatterPhysics = new Class({ return this; }, + /** + * Returns the length of the given constraint, which is the distance between the two points. + * + * @method Phaser.Physics.Matter.MatterPhysics#getConstraintLength + * @since 3.22.0 + * + * @param {MatterJS.Constraint} constraint - The constraint to get the length from. + * + * @return {number} The length of the constraint. + */ + getConstraintLength: function (constraint) + { + var aX = constraint.pointA.x; + var aY = constraint.pointA.y; + var bX = constraint.pointB.x; + var bY = constraint.pointB.y; + + if (constraint.bodyA) + { + aX += constraint.bodyA.position.x; + aY += constraint.bodyA.position.y; + } + + if (constraint.bodyB) + { + bX += constraint.bodyB.position.x; + bY += constraint.bodyB.position.y; + } + + return DistanceBetween(aX, aY, bX, bY); + }, + /** * The Scene that owns this plugin is shutting down. * We need to kill and reset all internal properties as well as stop listening to Scene events. From 83c5bc41fa956abbb24b66357bf60f178f1f8311 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 8 Jan 2020 14:41:28 +0000 Subject: [PATCH 087/189] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fe73a754..d844a5ecb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -164,6 +164,7 @@ * `MatterConstraintConfig` is a new type def that contains all of the constraint configuration properties. This is now used through-out the JSDocs to aid in code-completion. * `MatterConstraintRenderConfig` is a new type def that contains all of the Constraint debug rendering configuration properties. This is now used through-out the JSDocs to aid in code-completion. * `MatterSetBodyConfig` is a new type def that contains all of the Constraint debug rendering configuration properties. This is now used through-out the JSDocs to aid in code-completion. +* `MatterPhysics.getConstraintLength` is a new method that will return the length of the given constraint, as this is something you cannot get from the constraint properties directly. ### New Features From 312f4dab105389108fb25d3f5d7f32ad2e79caee Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 8 Jan 2020 17:44:02 +0000 Subject: [PATCH 088/189] Start of alignBody method --- src/physics/matter-js/MatterPhysics.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/physics/matter-js/MatterPhysics.js b/src/physics/matter-js/MatterPhysics.js index 5ceb9eeb6..de2e4e173 100644 --- a/src/physics/matter-js/MatterPhysics.js +++ b/src/physics/matter-js/MatterPhysics.js @@ -1304,6 +1304,11 @@ var MatterPhysics = new Class({ return DistanceBetween(aX, aY, bX, bY); }, + // alignBody: function (body, x, y, align) + // { + + // }, + /** * The Scene that owns this plugin is shutting down. * We need to kill and reset all internal properties as well as stop listening to Scene events. From 4d0618232b1d0c2a829ceb4c9417cd1eb64c0969 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 9 Jan 2020 00:43:38 +0000 Subject: [PATCH 089/189] Only render compound bounds --- src/physics/matter-js/World.js | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/src/physics/matter-js/World.js b/src/physics/matter-js/World.js index 3f952ac9f..4650dfff4 100644 --- a/src/physics/matter-js/World.js +++ b/src/physics/matter-js/World.js @@ -1569,6 +1569,8 @@ var World = new Class({ /** * Renders the bounds of an array of Bodies to the given Graphics instance. * + * If the body is a compound body, it will render the bounds for the parent compound. + * * The debug renderer calls this method if the `showBounds` config value is set. * * This method is used internally by the Matter Debug Renderer, but is also exposed publically should @@ -1596,19 +1598,33 @@ var World = new Class({ continue; } - var parts = body.parts; + var bounds = body.bounds; - for (var j = parts.length > 1 ? 1 : 0; j < parts.length; j++) + if (bounds) { - var part = parts[j]; - graphics.strokeRect( - part.bounds.min.x, - part.bounds.min.y, - part.bounds.max.x - part.bounds.min.x, - part.bounds.max.y - part.bounds.min.y + bounds.min.x, + bounds.min.y, + bounds.max.x - bounds.min.x, + bounds.max.y - bounds.min.y ); } + else + { + var parts = body.parts; + + for (var j = parts.length > 1 ? 1 : 0; j < parts.length; j++) + { + var part = parts[j]; + + graphics.strokeRect( + part.bounds.min.x, + part.bounds.min.y, + part.bounds.max.x - part.bounds.min.x, + part.bounds.max.y - part.bounds.min.y + ); + } + } } return this; From cfa6eeb6e2b99290c9d1e03dd684ce2a05596b72 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 9 Jan 2020 00:43:46 +0000 Subject: [PATCH 090/189] Finished alignBody method --- src/physics/matter-js/MatterPhysics.js | 97 ++++++++++++++++++++++++-- 1 file changed, 93 insertions(+), 4 deletions(-) diff --git a/src/physics/matter-js/MatterPhysics.js b/src/physics/matter-js/MatterPhysics.js index de2e4e173..80d6c890b 100644 --- a/src/physics/matter-js/MatterPhysics.js +++ b/src/physics/matter-js/MatterPhysics.js @@ -4,6 +4,7 @@ * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var ALIGN_CONST = require('../../display/align/const'); var Axes = require('./lib/geometry/Axes'); var Bodies = require('./lib/factory/Bodies'); var Body = require('./lib/body/Body'); @@ -1052,7 +1053,6 @@ var MatterPhysics = new Class({ var body = (bodies[i].hasOwnProperty('body')) ? bodies[i].body : bodies[i]; output.push(body); - } return output; @@ -1304,10 +1304,99 @@ var MatterPhysics = new Class({ return DistanceBetween(aX, aY, bX, bY); }, - // alignBody: function (body, x, y, align) - // { + /** + * Aligns a Body, or Matter Game Object, against the given coordinates. + * + * The alignment takes place using the body bounds, which take into consideration things + * like body scale and rotation. + * + * For example, if you wanted to align a body so it sat in the bottom-left of the + * Scene, and the world was 800 x 600 in size: + * + * ```javascript + * this.matter.alignBody(body, 0, 600, Phaser.Display.Align.BOTTOM_LEFT); + * ``` + * + * @method Phaser.Physics.Matter.MatterPhysics#alignBody + * @since 3.22.0 + * + * @param {MatterJS.Body} body - The Body to align. + * @param {number} x - The horizontal position to align the body to. + * @param {number} y - The vertical position to align the body to. + * @param {integer} align - One of the `Phaser.Display.Align` constants, such as `Phaser.Display.Align.TOP_LEFT`. + * + * @return {number} The length of the constraint. + */ + alignBody: function (body, x, y, align) + { + body = (body.hasOwnProperty('body')) ? body.body : body; - // }, + var boundsWidth = body.bounds.max.x - body.bounds.min.x; + var boundsHeight = body.bounds.max.y - body.bounds.min.y; + + var boundsCenterX = boundsWidth / 2; + var boundsCenterY = boundsHeight / 2; + + var bodyCenterX = boundsWidth * body.centerOfMass.x; + var bodyCenterY = boundsHeight * body.centerOfMass.y; + + var diffX = bodyCenterX - boundsCenterX; + var diffY = bodyCenterY - boundsCenterY; + + var posX; + var posY; + + switch (align) + { + case ALIGN_CONST.TOP_LEFT: + case ALIGN_CONST.LEFT_TOP: + posX = x + boundsCenterX + diffX; + posY = y + boundsCenterY + diffY; + break; + + case ALIGN_CONST.TOP_CENTER: + posX = x + diffX; + posY = y + boundsCenterY + diffY; + break; + + case ALIGN_CONST.TOP_RIGHT: + case ALIGN_CONST.RIGHT_TOP: + posX = x - (boundsCenterX - diffX); + posY = y + boundsCenterY + diffY; + break; + + case ALIGN_CONST.LEFT_CENTER: + posX = x + boundsCenterX + diffX; + posY = y + diffY; + break; + + case ALIGN_CONST.LEFT_BOTTOM: + case ALIGN_CONST.BOTTOM_LEFT: + posX = x + boundsCenterX + diffX; + posY = y - (boundsCenterY - diffY); + break; + + case ALIGN_CONST.BOTTOM_CENTER: + posX = x + diffX; + posY = y - (boundsCenterY - diffY); + break; + + case ALIGN_CONST.BOTTOM_RIGHT: + case ALIGN_CONST.RIGHT_BOTTOM: + posX = x - (boundsCenterX - diffX); + posY = y - (boundsCenterY - diffY); + break; + + case ALIGN_CONST.RIGHT_CENTER: + posX = x - (boundsCenterX - diffX); + posY = y + diffY; + break; + } + + Body.setPosition(body, { x: posX, y: posY }); + + return this; + }, /** * The Scene that owns this plugin is shutting down. From 4de6f17a38a61ef43c66f8a4135705f8727fe4a2 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 9 Jan 2020 13:17:43 +0000 Subject: [PATCH 091/189] Formatted docs --- src/physics/matter-js/components/Friction.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/physics/matter-js/components/Friction.js b/src/physics/matter-js/components/Friction.js index 6d00f5571..1f6d687c7 100644 --- a/src/physics/matter-js/components/Friction.js +++ b/src/physics/matter-js/components/Friction.js @@ -42,7 +42,9 @@ var Friction = { }, /** - * Sets a new air resistance for this Game Object's Matter Body. A value of 0 means the Body will never slow as it moves through space. The higher the value, the faster a Body slows when moving through space. + * Sets a new air resistance for this Game Object's Matter Body. + * A value of 0 means the Body will never slow as it moves through space. + * The higher the value, the faster a Body slows when moving through space. * * @method Phaser.Physics.Matter.Components.Friction#setFrictionAir * @since 3.0.0 @@ -59,7 +61,9 @@ var Friction = { }, /** - * Sets a new static friction for this Game Object's Matter Body. A value of 0 means the Body will never "stick" when it is nearly stationary. The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary. + * Sets a new static friction for this Game Object's Matter Body. + * A value of 0 means the Body will never "stick" when it is nearly stationary. + * The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary. * * @method Phaser.Physics.Matter.Components.Friction#setFrictionStatic * @since 3.0.0 From 9aeead5cc24650c6a410acd4dde1b0aa1847390b Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 9 Jan 2020 13:17:56 +0000 Subject: [PATCH 092/189] New Body typedef --- src/physics/matter-js/typedefs/MatterBody.js | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 src/physics/matter-js/typedefs/MatterBody.js diff --git a/src/physics/matter-js/typedefs/MatterBody.js b/src/physics/matter-js/typedefs/MatterBody.js new file mode 100644 index 000000000..ad630b0dd --- /dev/null +++ b/src/physics/matter-js/typedefs/MatterBody.js @@ -0,0 +1,4 @@ +/** + * @typedef {(MatterJS.Body|Phaser.Physics.Matter.MatterGameObject|Phaser.Physics.Matter.Image|Phaser.Physics.Matter.Sprite|Phaser.Physics.Matter.TileBody)} Phaser.Types.Physics.Matter.MatterBody + * @since 3.22.0 + */ From d031d91f1ea2133f6a602a94e125a3349edd5e2b Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 9 Jan 2020 13:18:13 +0000 Subject: [PATCH 093/189] Added bodyBounds class, finished alignBody and fixed typedefs --- src/physics/matter-js/MatterPhysics.js | 127 +++++++++++++------------ 1 file changed, 64 insertions(+), 63 deletions(-) diff --git a/src/physics/matter-js/MatterPhysics.js b/src/physics/matter-js/MatterPhysics.js index 80d6c890b..7a7fb41ef 100644 --- a/src/physics/matter-js/MatterPhysics.js +++ b/src/physics/matter-js/MatterPhysics.js @@ -8,6 +8,7 @@ var ALIGN_CONST = require('../../display/align/const'); var Axes = require('./lib/geometry/Axes'); var Bodies = require('./lib/factory/Bodies'); var Body = require('./lib/body/Body'); +var BodyBounds = require('./BodyBounds'); var Bounds = require('./lib/geometry/Bounds'); var Class = require('../../utils/Class'); var Composite = require('./lib/body/Composite'); @@ -138,7 +139,7 @@ var MatterPhysics = new Class({ this.world; /** - * An instance of the Matter Factory. This class provides lots of functions for creatying a + * An instance of the Matter Factory. This class provides lots of functions for creating a * wide variety of physics objects and adds them automatically to the Matter World. * * You can use this class to cut-down on the amount of code required in your game, however, @@ -151,6 +152,16 @@ var MatterPhysics = new Class({ */ this.add; + /** + * An instance of the Body Bounds class. This class contains functions used for getting the + * world position from various points around the bounds of a physics body. + * + * @name Phaser.Physics.Matter.MatterPhysics#bodyBounds + * @type {Phaser.Physics.Matter.BodyBounds} + * @since 3.22.0 + */ + this.bodyBounds; + // Body /** @@ -425,6 +436,7 @@ var MatterPhysics = new Class({ { this.world = new World(this.scene, this.config); this.add = new Factory(this.world); + this.bodyBounds = new BodyBounds(); this.systems.events.once(SceneEvents.DESTROY, this.destroy, this); }, @@ -671,7 +683,7 @@ var MatterPhysics = new Class({ * @method Phaser.Physics.Matter.MatterPhysics#containsPoint * @since 3.22.0 * - * @param {(MatterJS.Body|MatterJS.Body[])} body - The body, or an array of bodies, to check against the point. + * @param {(Phaser.Types.Physics.Matter.MatterBody|Phaser.Types.Physics.Matter.MatterBody[])} body - The body, or an array of bodies, to check against the point. * @param {number} x - The horizontal coordinate of the point. * @param {number} y - The vertical coordinate of the point. * @@ -702,9 +714,9 @@ var MatterPhysics = new Class({ * * @param {number} x - The horizontal coordinate of the point. * @param {number} y - The vertical coordinate of the point. - * @param {MatterJS.Body[]} [bodies] - An array of bodies to check. If not provided it will search all bodies in the world. + * @param {Phaser.Types.Physics.Matter.MatterBody[]} [bodies] - An array of bodies to check. If not provided it will search all bodies in the world. * - * @return {MatterJS.Body[]} An array of bodies which contain the given point. + * @return {Phaser.Types.Physics.Matter.MatterBody[]} An array of bodies which contain the given point. */ intersectPoint: function (x, y, bodies) { @@ -742,9 +754,9 @@ var MatterPhysics = new Class({ * @param {number} width - The width of the area. * @param {number} height - The height of the area. * @param {boolean} [outside=false] - If `false` it checks for vertices inside the area, if `true` it checks for vertices outside the area. - * @param {MatterJS.Body[]} [bodies] - An array of bodies to check. If not provided it will search all bodies in the world. + * @param {Phaser.Types.Physics.Matter.MatterBody[]} [bodies] - An array of bodies to check. If not provided it will search all bodies in the world. * - * @return {MatterJS.Body[]} An array of bodies that intersect with the given area. + * @return {Phaser.Types.Physics.Matter.MatterBody[]} An array of bodies that intersect with the given area. */ intersectRect: function (x, y, width, height, outside, bodies) { @@ -787,9 +799,9 @@ var MatterPhysics = new Class({ * @param {number} x2 - The horizontal coordinate of the end of the ray segment. * @param {number} y2 - The vertical coordinate of the end of the ray segment. * @param {number} [rayWidth=1] - The width of the ray segment. - * @param {MatterJS.Body[]} [bodies] - An array of bodies to check. If not provided it will search all bodies in the world. + * @param {Phaser.Types.Physics.Matter.MatterBody[]} [bodies] - An array of bodies to check. If not provided it will search all bodies in the world. * - * @return {MatterJS.Body[]} An array of bodies whos vertices intersect with the ray segment. + * @return {Phaser.Types.Physics.Matter.MatterBody[]} An array of bodies whos vertices intersect with the ray segment. */ intersectRay: function (x1, y1, x2, y2, rayWidth, bodies) { @@ -816,10 +828,10 @@ var MatterPhysics = new Class({ * @method Phaser.Physics.Matter.MatterPhysics#intersectBody * @since 3.22.0 * - * @param {MatterJS.Body} body - The target body. - * @param {MatterJS.Body[]} [bodies] - An array of bodies to check the target body against. If not provided it will search all bodies in the world. + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The target body. + * @param {Phaser.Types.Physics.Matter.MatterBody[]} [bodies] - An array of bodies to check the target body against. If not provided it will search all bodies in the world. * - * @return {MatterJS.Body[]} An array of bodies whos vertices intersect with target body. + * @return {Phaser.Types.Physics.Matter.MatterBody[]} An array of bodies whos vertices intersect with target body. */ intersectBody: function (body, bodies) { @@ -866,8 +878,8 @@ var MatterPhysics = new Class({ * @method Phaser.Physics.Matter.MatterPhysics#overlap * @since 3.22.0 * - * @param {(MatterJS.Body|MatterJS.Body[])} target - The target body, or array of target bodies, to check. - * @param {MatterJS.Body[]} [bodies] - The second body, or array of bodies, to check. If falsey it will check against all bodies in the world. + * @param {(Phaser.Types.Physics.Matter.MatterBody|Phaser.Types.Physics.Matter.MatterBody[])} target - The target body, or array of target bodies, to check. + * @param {Phaser.Types.Physics.Matter.MatterBody[]} [bodies] - The second body, or array of bodies, to check. If falsey it will check against all bodies in the world. * @param {ArcadePhysicsCallback} [overlapCallback] - An optional callback function that is called if the bodies overlap. * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two bodies if they overlap. If this is set then `overlapCallback` will only be invoked if this callback returns `true`. * @param {*} [callbackContext] - The context, or scope, in which to run the callbacks. @@ -932,7 +944,7 @@ var MatterPhysics = new Class({ * @method Phaser.Physics.Matter.MatterPhysics#setCollisionCategory * @since 3.22.0 * - * @param {MatterJS.Body[]} bodies - An array of bodies to update. If falsey it will use all bodies in the world. + * @param {Phaser.Types.Physics.Matter.MatterBody[]} bodies - An array of bodies to update. If falsey it will use all bodies in the world. * @param {number} value - Unique category bitfield. * * @return {this} This Matter Physics instance. @@ -961,7 +973,7 @@ var MatterPhysics = new Class({ * @method Phaser.Physics.Matter.MatterPhysics#setCollisionGroup * @since 3.22.0 * - * @param {MatterJS.Body[]} bodies - An array of bodies to update. If falsey it will use all bodies in the world. + * @param {Phaser.Types.Physics.Matter.MatterBody[]} bodies - An array of bodies to update. If falsey it will use all bodies in the world. * @param {number} value - Unique group index. * * @return {this} This Matter Physics instance. @@ -988,7 +1000,7 @@ var MatterPhysics = new Class({ * @method Phaser.Physics.Matter.MatterPhysics#setCollidesWith * @since 3.22.0 * - * @param {MatterJS.Body[]} bodies - An array of bodies to update. If falsey it will use all bodies in the world. + * @param {Phaser.Types.Physics.Matter.MatterBody[]} bodies - An array of bodies to update. If falsey it will use all bodies in the world. * @param {(number|number[])} categories - A unique category bitfield, or an array of them. * * @return {this} This Matter Physics instance. @@ -1064,7 +1076,7 @@ var MatterPhysics = new Class({ * @method Phaser.Physics.Matter.MatterPhysics#setVelocity * @since 3.22.0 * - * @param {(MatterJS.Body|MatterJS.Body[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param {(Phaser.Types.Physics.Matter.MatterBody|Phaser.Types.Physics.Matter.MatterBody[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. * @param {number} x - The horizontal linear velocity value. * @param {number} y - The vertical linear velocity value. * @@ -1094,7 +1106,7 @@ var MatterPhysics = new Class({ * @method Phaser.Physics.Matter.MatterPhysics#setVelocityX * @since 3.22.0 * - * @param {(MatterJS.Body|MatterJS.Body[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param {(Phaser.Types.Physics.Matter.MatterBody|Phaser.Types.Physics.Matter.MatterBody[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. * @param {number} x - The horizontal linear velocity value. * * @return {this} This Matter Physics instance. @@ -1123,7 +1135,7 @@ var MatterPhysics = new Class({ * @method Phaser.Physics.Matter.MatterPhysics#setVelocityY * @since 3.22.0 * - * @param {(MatterJS.Body|MatterJS.Body[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param {(Phaser.Types.Physics.Matter.MatterBody|Phaser.Types.Physics.Matter.MatterBody[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. * @param {number} y - The vertical linear velocity value. * * @return {this} This Matter Physics instance. @@ -1152,7 +1164,7 @@ var MatterPhysics = new Class({ * @method Phaser.Physics.Matter.MatterPhysics#setAngularVelocity * @since 3.22.0 * - * @param {(MatterJS.Body|MatterJS.Body[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param {(Phaser.Types.Physics.Matter.MatterBody|Phaser.Types.Physics.Matter.MatterBody[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. * @param {number} value - The angular velocity. * * @return {this} This Matter Physics instance. @@ -1175,7 +1187,7 @@ var MatterPhysics = new Class({ * @method Phaser.Physics.Matter.MatterPhysics#applyForce * @since 3.22.0 * - * @param {(MatterJS.Body|MatterJS.Body[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param {(Phaser.Types.Physics.Matter.MatterBody|Phaser.Types.Physics.Matter.MatterBody[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. * @param {Phaser.Types.Math.Vector2Like} force - A Vector that specifies the force to apply. * * @return {this} This Matter Physics instance. @@ -1206,7 +1218,7 @@ var MatterPhysics = new Class({ * @method Phaser.Physics.Matter.MatterPhysics#applyForceFromPosition * @since 3.22.0 * - * @param {(MatterJS.Body|MatterJS.Body[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param {(Phaser.Types.Physics.Matter.MatterBody|Phaser.Types.Physics.Matter.MatterBody[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. * @param {Phaser.Types.Math.Vector2Like} position - A Vector that specifies the world-space position to apply the force at. * @param {number} speed - A speed value to be applied to a directional force. * @param {number} [angle] - The angle, in radians, to apply the force from. Leave undefined to use the current body angle. @@ -1244,7 +1256,7 @@ var MatterPhysics = new Class({ * @method Phaser.Physics.Matter.MatterPhysics#applyForceFromAngle * @since 3.22.0 * - * @param {(MatterJS.Body|MatterJS.Body[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param {(Phaser.Types.Physics.Matter.MatterBody|Phaser.Types.Physics.Matter.MatterBody[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. * @param {number} speed - A speed value to be applied to a directional force. * @param {number} [angle] - The angle, in radians, to apply the force from. Leave undefined to use the current body angle. * @@ -1310,90 +1322,79 @@ var MatterPhysics = new Class({ * The alignment takes place using the body bounds, which take into consideration things * like body scale and rotation. * - * For example, if you wanted to align a body so it sat in the bottom-left of the + * Although a Body has a `position` property, it is based on the center of mass for the body, + * not a dimension based center. This makes aligning bodies difficult, especially if they have + * rotated or scaled. This method will derive the correct position based on the body bounds and + * its center of mass offset, in order to align the body with the given coordinate. + * + * For example, if you wanted to align a body so it sat in the bottom-center of the * Scene, and the world was 800 x 600 in size: * * ```javascript - * this.matter.alignBody(body, 0, 600, Phaser.Display.Align.BOTTOM_LEFT); + * this.matter.alignBody(body, 400, 600, Phaser.Display.Align.BOTTOM_CENTER); * ``` + * + * You pass in 400 for the x coordinate, because that is the center of the world, and 600 for + * the y coordinate, as that is the base of the world. * * @method Phaser.Physics.Matter.MatterPhysics#alignBody * @since 3.22.0 * - * @param {MatterJS.Body} body - The Body to align. + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to align. * @param {number} x - The horizontal position to align the body to. * @param {number} y - The vertical position to align the body to. * @param {integer} align - One of the `Phaser.Display.Align` constants, such as `Phaser.Display.Align.TOP_LEFT`. * - * @return {number} The length of the constraint. + * @return {this} This Matter Physics instance. */ alignBody: function (body, x, y, align) { - body = (body.hasOwnProperty('body')) ? body.body : body; - - var boundsWidth = body.bounds.max.x - body.bounds.min.x; - var boundsHeight = body.bounds.max.y - body.bounds.min.y; - - var boundsCenterX = boundsWidth / 2; - var boundsCenterY = boundsHeight / 2; - - var bodyCenterX = boundsWidth * body.centerOfMass.x; - var bodyCenterY = boundsHeight * body.centerOfMass.y; - - var diffX = bodyCenterX - boundsCenterX; - var diffY = bodyCenterY - boundsCenterY; - - var posX; - var posY; + var pos; switch (align) { case ALIGN_CONST.TOP_LEFT: case ALIGN_CONST.LEFT_TOP: - posX = x + boundsCenterX + diffX; - posY = y + boundsCenterY + diffY; + pos = this.bodyBounds.getTopLeft(body, x, y); break; case ALIGN_CONST.TOP_CENTER: - posX = x + diffX; - posY = y + boundsCenterY + diffY; + pos = this.bodyBounds.getTopCenter(body, x, y); break; case ALIGN_CONST.TOP_RIGHT: case ALIGN_CONST.RIGHT_TOP: - posX = x - (boundsCenterX - diffX); - posY = y + boundsCenterY + diffY; + pos = this.bodyBounds.getTopRight(body, x, y); break; case ALIGN_CONST.LEFT_CENTER: - posX = x + boundsCenterX + diffX; - posY = y + diffY; + pos = this.bodyBounds.getLeftCenter(body, x, y); + break; + + case ALIGN_CONST.CENTER: + pos = this.bodyBounds.getCenter(body, x, y); + break; + + case ALIGN_CONST.RIGHT_CENTER: + pos = this.bodyBounds.getRightCenter(body, x, y); break; case ALIGN_CONST.LEFT_BOTTOM: case ALIGN_CONST.BOTTOM_LEFT: - posX = x + boundsCenterX + diffX; - posY = y - (boundsCenterY - diffY); + pos = this.bodyBounds.getBottomLeft(body, x, y); break; case ALIGN_CONST.BOTTOM_CENTER: - posX = x + diffX; - posY = y - (boundsCenterY - diffY); + pos = this.bodyBounds.getBottomCenter(body, x, y); break; case ALIGN_CONST.BOTTOM_RIGHT: case ALIGN_CONST.RIGHT_BOTTOM: - posX = x - (boundsCenterX - diffX); - posY = y - (boundsCenterY - diffY); - break; - - case ALIGN_CONST.RIGHT_CENTER: - posX = x - (boundsCenterX - diffX); - posY = y + diffY; + pos = this.bodyBounds.getBottomRight(body, x, y); break; } - Body.setPosition(body, { x: posX, y: posY }); + Body.setPosition(body, pos); return this; }, From fceef3ddf0fc498de79b61b5531d2586535effdc Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 9 Jan 2020 13:18:24 +0000 Subject: [PATCH 094/189] Added BodyBounds class --- src/physics/matter-js/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/physics/matter-js/index.js b/src/physics/matter-js/index.js index 4532657db..efba704f6 100644 --- a/src/physics/matter-js/index.js +++ b/src/physics/matter-js/index.js @@ -10,6 +10,7 @@ module.exports = { + BodyBounds: require('./BodyBounds'), Factory: require('./Factory'), Image: require('./MatterImage'), Matter: require('./CustomMain'), From a8f3c3b9c097970d20d6e19bf11cbea8ea4a4b4e Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 9 Jan 2020 13:18:44 +0000 Subject: [PATCH 095/189] New BodyBounds class for getting body bounds based coordinates --- src/physics/matter-js/BodyBounds.js | 381 ++++++++++++++++++++++++++++ 1 file changed, 381 insertions(+) create mode 100644 src/physics/matter-js/BodyBounds.js diff --git a/src/physics/matter-js/BodyBounds.js b/src/physics/matter-js/BodyBounds.js new file mode 100644 index 000000000..aa7005b34 --- /dev/null +++ b/src/physics/matter-js/BodyBounds.js @@ -0,0 +1,381 @@ +/** + * @author Richard Davey + * @copyright 2019 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = require('../../utils/Class'); +var Vec2 = require('../../math/Vector2'); + +/** + * @classdesc + * + * The Body Bounds class contains methods to help you extract the world coordinates from various points around + * the bounds of a Matter Body. Because Matter bodies are positioned based on their center of mass, and not a + * dimension based center, you often need to get the bounds coordinates in order to properly align them in the world. + * + * You can access this class via the MatterPhysics class from a Scene, i.e.: + * + * ```javascript + * this.matter.bodyBounds.getTopLeft(body); + * ``` + * + * See also the `MatterPhysics.alignBody` method. + * + * @class BodyBounds + * @memberof Phaser.Physics.Matter + * @constructor + * @since 3.22.0 + */ +var BodyBounds = new Class({ + + initialize: + + function BodyBounds () + { + this.boundsCenter = new Vec2(); + this.centerDiff = new Vec2(); + }, + + /** + * Returns the length of the given constraint, which is the distance between the two points. + * + * @method Phaser.Physics.Matter.BodyBounds#parseBody + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to get the bounds position from. + * + * @return {boolean} `true` if it was able to get the bounds, otherwise `false`. + */ + parseBody: function (body) + { + body = (body.hasOwnProperty('body')) ? body.body : body; + + if (!body.hasOwnProperty('bounds') || !body.hasOwnProperty('centerOfMass')) + { + return false; + } + + var boundsCenter = this.boundsCenter; + var centerDiff = this.centerDiff; + + var boundsWidth = body.bounds.max.x - body.bounds.min.x; + var boundsHeight = body.bounds.max.y - body.bounds.min.y; + + var bodyCenterX = boundsWidth * body.centerOfMass.x; + var bodyCenterY = boundsHeight * body.centerOfMass.y; + + boundsCenter.set(boundsWidth / 2, boundsHeight / 2); + centerDiff.set(bodyCenterX - boundsCenter.x, bodyCenterY - boundsCenter.y); + + return true; + }, + + /** + * Takes a Body and returns the world coordinates of the top-left of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * + * @method Phaser.Physics.Matter.BodyBounds#getTopLeft + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to get the position from. + * @param {number} [x=0] - Optional horizontal offset to add to the returned coordinates. + * @param {number} [y=0] - Optional vertical offset to add to the returned coordinates. + * + * @return {(Phaser.Math.Vector2|false)} A Vector2 containing the coordinates, or `false` if it was unable to parse the body. + */ + getTopLeft: function (body, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + if (this.parseBody(body)) + { + var center = this.boundsCenter; + var diff = this.centerDiff; + + return new Vec2( + x + center.x + diff.x, + y + center.y + diff.y + ); + } + + return false; + }, + + /** + * Takes a Body and returns the world coordinates of the top-center of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * + * @method Phaser.Physics.Matter.BodyBounds#getTopCenter + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to get the position from. + * @param {number} [x=0] - Optional horizontal offset to add to the returned coordinates. + * @param {number} [y=0] - Optional vertical offset to add to the returned coordinates. + * + * @return {(Phaser.Math.Vector2|false)} A Vector2 containing the coordinates, or `false` if it was unable to parse the body. + */ + getTopCenter: function (body, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + if (this.parseBody(body)) + { + var center = this.boundsCenter; + var diff = this.centerDiff; + + return new Vec2( + x + diff.x, + y + center.y + diff.y + ); + } + + return false; + }, + + /** + * Takes a Body and returns the world coordinates of the top-right of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * + * @method Phaser.Physics.Matter.BodyBounds#getTopRight + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to get the position from. + * @param {number} [x=0] - Optional horizontal offset to add to the returned coordinates. + * @param {number} [y=0] - Optional vertical offset to add to the returned coordinates. + * + * @return {(Phaser.Math.Vector2|false)} A Vector2 containing the coordinates, or `false` if it was unable to parse the body. + */ + getTopRight: function (body, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + if (this.parseBody(body)) + { + var center = this.boundsCenter; + var diff = this.centerDiff; + + return new Vec2( + x - (center.x - diff.x), + y + center.y + diff.y + ); + } + + return false; + }, + + /** + * Takes a Body and returns the world coordinates of the left-center of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * + * @method Phaser.Physics.Matter.BodyBounds#getLeftCenter + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to get the position from. + * @param {number} [x=0] - Optional horizontal offset to add to the returned coordinates. + * @param {number} [y=0] - Optional vertical offset to add to the returned coordinates. + * + * @return {(Phaser.Math.Vector2|false)} A Vector2 containing the coordinates, or `false` if it was unable to parse the body. + */ + getLeftCenter: function (body, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + if (this.parseBody(body)) + { + var center = this.boundsCenter; + var diff = this.centerDiff; + + return new Vec2( + x + center.x + diff.x, + y + diff.y + ); + } + + return false; + }, + + /** + * Takes a Body and returns the world coordinates of the center of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * + * @method Phaser.Physics.Matter.BodyBounds#getCenter + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to get the position from. + * @param {number} [x=0] - Optional horizontal offset to add to the returned coordinates. + * @param {number} [y=0] - Optional vertical offset to add to the returned coordinates. + * + * @return {(Phaser.Math.Vector2|false)} A Vector2 containing the coordinates, or `false` if it was unable to parse the body. + */ + getCenter: function (body, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + if (this.parseBody(body)) + { + var diff = this.centerDiff; + + return new Vec2( + x + diff.x, + y + diff.y + ); + } + + return false; + }, + + /** + * Takes a Body and returns the world coordinates of the right-center of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * + * @method Phaser.Physics.Matter.BodyBounds#getRightCenter + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to get the position from. + * @param {number} [x=0] - Optional horizontal offset to add to the returned coordinates. + * @param {number} [y=0] - Optional vertical offset to add to the returned coordinates. + * + * @return {(Phaser.Math.Vector2|false)} A Vector2 containing the coordinates, or `false` if it was unable to parse the body. + */ + getRightCenter: function (body, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + if (this.parseBody(body)) + { + var center = this.boundsCenter; + var diff = this.centerDiff; + + return new Vec2( + x - (center.x - diff.x), + y + diff.y + ); + } + + return false; + }, + + /** + * Takes a Body and returns the world coordinates of the bottom-left of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * + * @method Phaser.Physics.Matter.BodyBounds#getBottomLeft + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to get the position from. + * @param {number} [x=0] - Optional horizontal offset to add to the returned coordinates. + * @param {number} [y=0] - Optional vertical offset to add to the returned coordinates. + * + * @return {(Phaser.Math.Vector2|false)} A Vector2 containing the coordinates, or `false` if it was unable to parse the body. + */ + getBottomLeft: function (body, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + if (this.parseBody(body)) + { + var center = this.boundsCenter; + var diff = this.centerDiff; + + return new Vec2( + x + center.x + diff.x, + y - (center.y - diff.y) + ); + } + + return false; + }, + + /** + * Takes a Body and returns the world coordinates of the bottom-center of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * + * @method Phaser.Physics.Matter.BodyBounds#getBottomCenter + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to get the position from. + * @param {number} [x=0] - Optional horizontal offset to add to the returned coordinates. + * @param {number} [y=0] - Optional vertical offset to add to the returned coordinates. + * + * @return {(Phaser.Math.Vector2|false)} A Vector2 containing the coordinates, or `false` if it was unable to parse the body. + */ + getBottomCenter: function (body, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + if (this.parseBody(body)) + { + var center = this.boundsCenter; + var diff = this.centerDiff; + + return new Vec2( + x + diff.x, + y - (center.y - diff.y) + ); + } + + return false; + }, + + /** + * Takes a Body and returns the world coordinates of the bottom-right of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * + * @method Phaser.Physics.Matter.BodyBounds#getBottomRight + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to get the position from. + * @param {number} [x=0] - Optional horizontal offset to add to the returned coordinates. + * @param {number} [y=0] - Optional vertical offset to add to the returned coordinates. + * + * @return {(Phaser.Math.Vector2|false)} A Vector2 containing the coordinates, or `false` if it was unable to parse the body. + */ + getBottomRight: function (body, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + if (this.parseBody(body)) + { + var center = this.boundsCenter; + var diff = this.centerDiff; + + return new Vec2( + x - (center.x - diff.x), + y - (center.y - diff.y) + ); + } + + return false; + } + +}); + +module.exports = BodyBounds; From acb1ecce6c6589a2faa98b9878be7a5954b27771 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 9 Jan 2020 13:20:32 +0000 Subject: [PATCH 096/189] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d844a5ecb..d9b4861e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -165,6 +165,9 @@ * `MatterConstraintRenderConfig` is a new type def that contains all of the Constraint debug rendering configuration properties. This is now used through-out the JSDocs to aid in code-completion. * `MatterSetBodyConfig` is a new type def that contains all of the Constraint debug rendering configuration properties. This is now used through-out the JSDocs to aid in code-completion. * `MatterPhysics.getConstraintLength` is a new method that will return the length of the given constraint, as this is something you cannot get from the constraint properties directly. +* `MatterPhysics.alignBody` is a new method that will align a Body, or Matter Game Object, against the given coordinates, using the given alignment constant. For example, this allows you to easily position a body to the `BOTTOM_LEFT`, or `TOP_CENTER`, or a coordinate. Alignment is based on the body bounds. +* `Phaser.Types.Physics.Matter.MatterBody` is a new type def that contains all of the valid Matter Body objects. This is now used through-out the JSDocs to aid in code-completion. +* `Matter.BodyBounds` is a new class that contains methods to help you extract world coordinates from various points around the bounds of a Matter Body. Because Matter bodies are positioned based on their center of mass, and not a dimension based center, you often need to get the bounds coordinates in order to properly align them in the world. You can access this new class via `this.matter.bodyBounds`. ### New Features From d3aaff82e11369472eb961a0e01a27c018a64f9c Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 9 Jan 2020 16:38:33 +0000 Subject: [PATCH 097/189] Finished JSDocs --- src/physics/matter-js/BodyBounds.js | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/physics/matter-js/BodyBounds.js b/src/physics/matter-js/BodyBounds.js index aa7005b34..f5e4dd71a 100644 --- a/src/physics/matter-js/BodyBounds.js +++ b/src/physics/matter-js/BodyBounds.js @@ -33,12 +33,31 @@ var BodyBounds = new Class({ function BodyBounds () { + /** + * A vec2 that stores the temporary bounds center value during calculations by methods in this class. + * + * @name Phaser.Physics.Matter.BodyBounds#boundsCenter + * @type {Phaser.Math.Vector2} + * @since 3.22.0 + */ this.boundsCenter = new Vec2(); + + /** + * A vec2 that stores the temporary center diff values during calculations by methods in this class. + * + * @name Phaser.Physics.Matter.BodyBounds#centerDiff + * @type {Phaser.Math.Vector2} + * @since 3.22.0 + */ this.centerDiff = new Vec2(); }, /** - * Returns the length of the given constraint, which is the distance between the two points. + * Parses the given body to get the bounds diff values from it. + * + * They're stored in this class in the temporary properties `boundsCenter` and `centerDiff`. + * + * This method is called automatically by all other methods in this class. * * @method Phaser.Physics.Matter.BodyBounds#parseBody * @since 3.22.0 From 590256fe92c251e4c86b2f982966149aaa407ddc Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 9 Jan 2020 17:54:38 +0000 Subject: [PATCH 098/189] Added fromPhysicsEditor method --- src/physics/matter-js/Factory.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/physics/matter-js/Factory.js b/src/physics/matter-js/Factory.js index deb7674c0..1ba61906b 100644 --- a/src/physics/matter-js/Factory.js +++ b/src/physics/matter-js/Factory.js @@ -14,6 +14,7 @@ var MatterGameObject = require('./MatterGameObject'); var MatterImage = require('./MatterImage'); var MatterSprite = require('./MatterSprite'); var MatterTileBody = require('./MatterTileBody'); +var PhysicsEditorParser = require('./PhysicsEditorParser'); var PointerConstraint = require('./PointerConstraint'); var Vertices = require('./lib/geometry/Vertices'); @@ -197,6 +198,15 @@ var Factory = new Class({ return body; }, + fromPhysicsEditor: function (x, y, width, height, config) + { + var body = PhysicsEditorParser.parseBody(x, y, width, height, config); + + // this.world.add(body); + + return body; + }, + /** * Creates a body using the path data from an SVG file. * From d63001d7190abd53e3dc3715e08420ba0c52da19 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 9 Jan 2020 17:55:03 +0000 Subject: [PATCH 099/189] Testing offsets --- src/physics/matter-js/PhysicsEditorParser.js | 4 ++ src/physics/matter-js/components/SetBody.js | 50 ++++++++++++++++++- src/physics/matter-js/components/Transform.js | 16 +++++- src/physics/matter-js/lib/body/Body.js | 39 ++++++++++++--- 4 files changed, 100 insertions(+), 9 deletions(-) diff --git a/src/physics/matter-js/PhysicsEditorParser.js b/src/physics/matter-js/PhysicsEditorParser.js index eb26826fb..c5be0ad45 100644 --- a/src/physics/matter-js/PhysicsEditorParser.js +++ b/src/physics/matter-js/PhysicsEditorParser.js @@ -56,6 +56,10 @@ var PhysicsEditorParser = { var body = Body.create(matterConfig); Body.setParts(body, fixtures); + + // body.render.sprite.xOffset = body.position.x / w; + // body.render.sprite.yOffset = body.position.y / h; + Body.setPosition(body, { x: x, y: y }); return body; diff --git a/src/physics/matter-js/components/SetBody.js b/src/physics/matter-js/components/SetBody.js index ec5f2713b..624fc77d8 100644 --- a/src/physics/matter-js/components/SetBody.js +++ b/src/physics/matter-js/components/SetBody.js @@ -152,7 +152,55 @@ var SetBody = { if (this._originComponent) { - this.setOrigin(this.centerOffsetX, this.centerOffsetY); + /* + var cx = this.width / 2; + var cy = this.height / 2; + + console.log('cx', this.width * body.centerOfMass.x); + console.log('cy', this.height * body.centerOfMass.y); + + var dx = (this.width * body.centerOfMass.x) - cx; + var dy = (this.height * body.centerOfMass.y) - cy; + + console.log('dx', dx); + console.log('dy', dy); + + // cx -= body.centerOffset.x * 2; + // cy += body.centerOffset.y * 2; + + cx -= dx * 2; + cy += dy * 1; + + this.setDisplayOrigin(cx, cy); + */ + + // var cx = this.x / this.width; + // var cy = this.y / this.height; + + // var cx = this.width / 2; + // var cy = this.height / 2; + + // var dx = cx + (this.width * body.centerOfMass.x) + body.centerOffset.x; + // var dy = cy * body.centerOfMass.y) + body.centerOffset.y; + + // console.log(cx, cy); + + // this.setOrigin(cx, cy); + + // this.setOrigin(body.render.sprite.xOffset, body.render.sprite.yOffset); + + // console.log('SO', this.centerOffsetX, this.centerOffsetY); + + // this.setDisplayOrigin(this.centerOffsetX, this.centerOffsetY); + + // this.setOrigin(this.originX - this.centerOffsetX, this.originY + this.centerOffsetY); + + // this.setOrigin(this.body.centerOfMass.x, this.body.centerOfMass.y); + + // this.displayOriginX -= (this.body.centerOffset.x * 2); + // this.displayOriginY -= this.body.centerOffset.y; + + // this.setOrigin(this.centerOffsetX, this.centerOffsetY); } return this; diff --git a/src/physics/matter-js/components/Transform.js b/src/physics/matter-js/components/Transform.js index 3d6ea82c8..6c91e675c 100644 --- a/src/physics/matter-js/components/Transform.js +++ b/src/physics/matter-js/components/Transform.js @@ -208,9 +208,14 @@ var Transform = { get: function () { - return this.body.centerOfMass.x; + return this.body.centerOffset.x; + + // return this.body.centerOfMass.x; // var body = this.body; + + // return body.render.sprite.xOffset + ((body.centerOfMass.x - (this.width / 2)) / this.width); + // return body.render.sprite.xOffset + ((body.centerOfMass.x - (this.width / 2)) / this.width); } }, @@ -234,9 +239,16 @@ var Transform = { get: function () { - return this.body.centerOfMass.y; + return this.body.centerOffset.y; + + // return 0.5; + + // return this.body.centerOfMass.y - this.displayOriginY; + + // return this.body.centerOfMass.y; // var body = this.body; + // return body.render.sprite.yOffset + ((body.centerOfMass.y - (this.height / 2)) / this.height); } }, diff --git a/src/physics/matter-js/lib/body/Body.js b/src/physics/matter-js/lib/body/Body.js index 4c3a64572..20f046cbd 100644 --- a/src/physics/matter-js/lib/body/Body.js +++ b/src/physics/matter-js/lib/body/Body.js @@ -101,6 +101,7 @@ var Axes = require('../geometry/Axes'); gameObject: null, // custom Phaser property scale: { x: 1, y: 1 }, // custom Phaser property centerOfMass: { x: 0, y: 0 }, // custom Phaser property + centerOffset: { x: 0, y: 0 }, // custom Phaser property gravityScale: { x: 1, y: 1 }, // custom Phaser property ignoreGravity: false, // custom Phaser property ignorePointer: false, // custom Phaser property @@ -189,9 +190,23 @@ var Axes = require('../geometry/Axes'); parent: body.parent || body }); + var bounds = body.bounds; + var centerOfMass = body.centerOfMass; + + Bounds.update(bounds, body.vertices, body.velocity); + + var boundsWidth = bounds.max.x - bounds.min.x; + var boundsHeight = bounds.max.y - bounds.min.y; + + centerOfMass.x = -(bounds.min.x - body.position.x) / boundsWidth; + centerOfMass.y = -(bounds.min.y - body.position.y) / boundsHeight; + + body.centerOffset.x = (boundsWidth * centerOfMass.x) - (boundsWidth / 2); + body.centerOffset.y = (boundsHeight * centerOfMass.y) - (boundsHeight / 2); + Vertices.rotate(body.vertices, body.angle, body.position); Axes.rotate(body.axes, body.angle); - Bounds.update(body.bounds, body.vertices, body.velocity); + Bounds.update(bounds, body.vertices, body.velocity); // allow options to override the automatically calculated properties Body.set(body, { @@ -200,9 +215,6 @@ var Axes = require('../geometry/Axes'); mass: options.mass || body.mass, inertia: options.inertia || body.inertia }); - - body.centerOfMass.x = -(body.bounds.min.x - body.position.x) / (body.bounds.max.x - body.bounds.min.x); - body.centerOfMass.y = -(body.bounds.min.y - body.position.y) / (body.bounds.max.y - body.bounds.min.y); }; /** @@ -451,8 +463,23 @@ var Axes = require('../geometry/Axes'); var cx = total.centre.x; var cy = total.centre.y; - body.centerOfMass.x = cx; - body.centerOfMass.y = cy; + var bounds = body.bounds; + var centerOfMass = body.centerOfMass; + + Bounds.update(bounds, body.vertices, body.velocity); + + var boundsWidth = bounds.max.x - bounds.min.x; + var boundsHeight = bounds.max.y - bounds.min.y; + + centerOfMass.x = -(bounds.min.x - cx) / boundsWidth; + centerOfMass.y = -(bounds.min.y - cy) / boundsHeight; + + body.centerOffset.x = (boundsWidth * centerOfMass.x) - (boundsWidth / 2); + body.centerOffset.y = (boundsHeight * centerOfMass.y) - (boundsHeight / 2); + + console.log('setParts1-com', body.centerOfMass.x, body.centerOfMass.y); + console.log('setParts2-off', body.centerOffset.x, body.centerOffset.y); + console.log('setParts3-bwh', boundsWidth, boundsHeight); body.area = total.area; body.parent = body; From 45abd5447e5f8a69f0cf92b1619901bee5d031f1 Mon Sep 17 00:00:00 2001 From: Tommy Leung Date: Thu, 9 Jan 2020 11:16:11 -0700 Subject: [PATCH 100/189] add SpinePlugin, SpineGameObject, SpineFile d.ts --- types/SpineFile.d.ts | 18 ++++++++ types/SpineGameObject.d.ts | 85 ++++++++++++++++++++++++++++++++++++++ types/SpinePlugin.d.ts | 57 +++++++++++++++++++++++++ 3 files changed, 160 insertions(+) create mode 100644 types/SpineFile.d.ts create mode 100644 types/SpineGameObject.d.ts create mode 100644 types/SpinePlugin.d.ts diff --git a/types/SpineFile.d.ts b/types/SpineFile.d.ts new file mode 100644 index 000000000..d2abdab1f --- /dev/null +++ b/types/SpineFile.d.ts @@ -0,0 +1,18 @@ +declare namespace Phaser.Loader.FileTypes { + interface SpineFileConfig { + key: string + textureURL?: string + textureExtension?: string + textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject + normalMap?: string + atlasURL?: string + atlasExtension?: string + atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject + } + + class SpineFile extends Phaser.Loader.MultiFile { + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Loader.FileTypes.SpineFileConfig, jsonURL: string | string[], atlasURL: string, preMultipliedAlpha: boolean, jsonXhrSettings: Phaser.Types.Loader.XHRSettingsObject, atlasXhrSettings: Phaser.Types.Loader.XHRSettingsObject) + + addToCache() + } +} diff --git a/types/SpineGameObject.d.ts b/types/SpineGameObject.d.ts new file mode 100644 index 000000000..171319d47 --- /dev/null +++ b/types/SpineGameObject.d.ts @@ -0,0 +1,85 @@ +/// + +declare class SpineGameObject { + constructor(scene: Phaser.Scene, pluginManager: SpinePlugin, x: number, y: number, key?: string, animationName?: string, loop?: boolean) + + alpha: number + + readonly blendMode: number + + blue: number + bounds: any + displayOriginX: number + displayOriginY: number + drawDebug: boolean + green: number + plugin: SpinePlugin + preMultipliedAlpha: boolean + red: number + root: spine.Bone + scaleX: number + scaleY: number + skeleton: spine.Skeleton + skeletonData: spine.SkeletonData + state: spine.AnimationState + stateData: spine.AnimationStateData + timeScale: number + + addAnimation(trackIndex: integer, animationName: string, loop?: boolean, delay?: integer): spine.TrackEntry + angleBoneToXY(bone: spine.Bone, worldX: number, worldY: number, offset?: number, minAngle?: number, maxAngle?: number): SpineGameObject + clearTrack(trackIndex: integer): SpineGameObject + clearTracks(): SpineGameObject + findAnimation(animationName: string): spine.Animation + findBone(boneName: string): spine.Bone + findBoneIndex(boneName: string): number + findEvent(eventDataName: string): spine.EventData + findIkConstraint(constraintName: string): spine.IkConstraintData + findPathConstraint(constraintName: string): spine.PathConstraintData + findPathConstraintIndex(constraintName: string): number + findSkin(skinName: string): spine.Skin + findSlot(slotName: string): spine.Slot + findSlotIndex(slotName: string): number + findTransformConstraint(constraintName: string): spine.TransformConstraintData + getAnimationList(): string[] + getAttachment(slotIndex: integer, attachmentName: string): spine.Attachment + getAttachmentByName(slotName: string, attachmentName: string): spine.Attachment + getBoneList(): string[] + getBounds(): any + getCurrentAnimation(trackIndex?: integer): spine.Animation + getRootBone(): spine.Bone + getSkinList(): string[] + getSlotList(): string[] + play(animationName: string, loop?: boolean, ignoreIfPlaying?: boolean): SpineGameObject + + protected preUpdate(time: number, delta: number): void + protected preDestroy(): void + + refresh(): SpineGameObject + setAlpha(value?: number): SpineGameObject + setAnimation(trackIndex: integer, animationName: string, loop?: boolean, ignoreIfPlaying?: boolean): spine.TrackEntry + setAttachment(slotName: string, attachmentName: string): SpineGameObject + setBonesToSetupPose(): SpineGameObject + setColor(color?: integer, slotName?: string): SpineGameObject + setEmptyAnimation(trackIndex: integer, mixDuration?: integer): spine.TrackEntry + setMix(fromName: string, toName: string, duration?: number): SpineGameObject + setOffset(offsetX?: number, offsetY?: number): SpineGameObject + setSize(width?: number, height?: number, offsetX?: number, offsetY?: number): SpineGameObject + setSkeleton(atlasDataKey: string, skeletonJSON: object, animationName?: string, loop?: boolean): SpineGameObject + setSkeletonFromJSON(atlasDataKey: string, skeletonJSON: object, animationName?: string, loop?: boolean): SpineGameObject + setSkin(newSkin: spine.Skin): SpineGameObject + setSkinByName(skinName: string): SpineGameObject + setSlotsToSetupPose(): SpineGameObject + setToSetupPose(): SpineGameObject + updateSize(): SpineGameObject + willRender(): boolean +} + +declare interface SpineGameObjectConfig extends Phaser.Types.GameObjects.GameObjectConfig +{ + key?: string + animationName?: string + loop?: boolean + skinName?: string + slotName?: string + attachmentName?: string +} diff --git a/types/SpinePlugin.d.ts b/types/SpinePlugin.d.ts new file mode 100644 index 000000000..2e68dca5d --- /dev/null +++ b/types/SpinePlugin.d.ts @@ -0,0 +1,57 @@ +/// + +declare namespace Phaser.Loader { + interface LoaderPlugin extends Phaser.Events.EventEmitter { + spine(key: string | Phaser.Loader.FileTypes.SpineFileConfig | Phaser.Loader.FileTypes.SpineFileConfig[], jsonURL: string, atlasURL: string | string[], preMultipliedAlpha?: boolean, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject): LoaderPlugin + } +} + +declare namespace Phaser.GameObjects { + interface GameObjectFactory { + spine(x: number, y: number, key?: string, aimationName?: string, loop?: boolean): SpineGameObject + } + + interface GameObjectCreator { + spine(config: SpineGameObjectConfig, addToScene?: boolean): SpineGameObject + } +} + +declare class SpinePlugin extends Phaser.Plugins.ScenePlugin { + constructor(scene: Phaser.Scene, pluginManager: Phaser.Plugins.PluginManager) + + readonly isWebGL: boolean + + cache: Phaser.Cache.BaseCache + spineTextures: Phaser.Cache.BaseCache + json: Phaser.Cache.BaseCache + textures: Phaser.Textures.TextureManager + drawDebug: boolean + gl: WebGLRenderingContext + renderer: Phaser.Renderer.Canvas.CanvasRenderer | Phaser.Renderer.WebGL.WebGLRenderer + sceneRenderer: spine.webgl.SceneRenderer + skeletonRenderer: spine.canvas.SkeletonRenderer | spine.webgl.SkeletonRenderer + skeletonDebugRenderer: spine.webgl.SkeletonDebugRenderer + + plugin: typeof spine + + getAtlasCanvas(key: string): spine.TextureAtlas + getAtlasWebGL(key: string): spine.TextureAtlas + worldToLocal(x: number, y: number, skeleton: spine.Skeleton, bone?: spine.Bone): spine.Vector2 + getVector2(x: number, y: number): spine.Vector2 + getVector3(x: number, y: number, z: number): spine.Vector2 + setDebugBones(value?: boolean): SpinePlugin + setDebugRegionAttachments(value?: boolean): SpinePlugin + setDebugBoundingBoxes(value?: boolean): SpinePlugin + setDebugMeshHull(value?: boolean): SpinePlugin + setDebugMeshTriangles(value?: boolean): SpinePlugin + setDebugPaths(value?: boolean): SpinePlugin + setDebugSkeletonXY(value?: boolean): SpinePlugin + setDebugClipping(value?: boolean): SpinePlugin + setEffect(effect?: spine.VertexEffect): SpinePlugin + createSkeleton(key: string, skeletonJSON?: object): any | null + createAnimationState(skeleton: spine.Skeleton): any + getBounds(skeleton: spine.Skeleton): any + onResize(): void + add(x: number, y: number, key?: string, animationName?: string, loop?: boolean): SpineGameObject + make(config: SpineGameObjectConfig, addToScene?: boolean): SpineGameObject +} From eacb61e10966c048dc263604fa06619372d55b49 Mon Sep 17 00:00:00 2001 From: samme Date: Thu, 9 Jan 2020 19:45:11 -0800 Subject: [PATCH 101/189] Check for disabled body in collideSpriteVsGroup() --- src/physics/arcade/World.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/physics/arcade/World.js b/src/physics/arcade/World.js index ed795f03f..0185d3316 100644 --- a/src/physics/arcade/World.js +++ b/src/physics/arcade/World.js @@ -1948,7 +1948,7 @@ var World = new Class({ { bodyB = results[i]; - if (bodyA === bodyB || !group.contains(bodyB.gameObject)) + if (bodyA === bodyB || !bodyB.enable || !group.contains(bodyB.gameObject)) { // Skip if comparing against itself, or if bodyB isn't actually part of the Group continue; From 6c947c96774fd41769bd7d95004d7687129cb1e4 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 10 Jan 2020 08:55:31 +0000 Subject: [PATCH 102/189] Updated PhysicsEditor Parser Now allows you to specify options object to override the loaded config. Also removed un-used parameters and fixed JSDocs. Finally, using Common.clone to avoid mutating the loaded JSON. --- src/physics/matter-js/PhysicsEditorParser.js | 38 ++++++++++---------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/src/physics/matter-js/PhysicsEditorParser.js b/src/physics/matter-js/PhysicsEditorParser.js index c5be0ad45..60154d2ff 100644 --- a/src/physics/matter-js/PhysicsEditorParser.js +++ b/src/physics/matter-js/PhysicsEditorParser.js @@ -1,6 +1,8 @@ /** * @author Joachim Grill + * @author Richard Davey * @copyright 2018 CodeAndWeb GmbH + * @copyright 2019 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25,16 +27,17 @@ var PhysicsEditorParser = { * @function Phaser.Physics.Matter.PhysicsEditorParser.parseBody * @since 3.10.0 * - * @param {number} x - x position. - * @param {number} y - y position. - * @param {number} w - width. - * @param {number} h - height. - * @param {object} config - body configuration and fixture (child body) definitions. + * @param {number} x - The horizontal world location of the body. + * @param {number} y - The vertical world location of the body. + * @param {object} config - The body configuration and fixture (child body) definitions, as exported by PhysicsEditor. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * - * @return {object} A matter body, consisting of several parts (child bodies) + * @return {MatterJS.Body} A compound Matter JS Body. */ - parseBody: function (x, y, w, h, config) + parseBody: function (x, y, config, options) { + if (options === undefined) { options = {}; } + var fixtureConfigs = GetFastValue(config, 'fixtures', []); var fixtures = []; @@ -48,7 +51,9 @@ var PhysicsEditorParser = { } } - var matterConfig = Common.extend({}, false, config); + var matterConfig = Common.clone(config, true); + + Common.extend(matterConfig, options, true); delete matterConfig.fixtures; delete matterConfig.type; @@ -57,9 +62,6 @@ var PhysicsEditorParser = { Body.setParts(body, fixtures); - // body.render.sprite.xOffset = body.position.x / w; - // body.render.sprite.yOffset = body.position.y / h; - Body.setPosition(body, { x: x, y: y }); return body; @@ -71,9 +73,9 @@ var PhysicsEditorParser = { * @function Phaser.Physics.Matter.PhysicsEditorParser.parseFixture * @since 3.10.0 * - * @param {object} fixtureConfig - the fixture object to parse + * @param {object} fixtureConfig - The fixture object to parse. * - * @return {object[]} - A list of matter bodies + * @return {MatterJS.Body[]} - An array of Matter JS Bodies. */ parseFixture: function (fixtureConfig) { @@ -105,16 +107,16 @@ var PhysicsEditorParser = { * @function Phaser.Physics.Matter.PhysicsEditorParser.parseVertices * @since 3.10.0 * - * @param {object} vertexSets - The vertex lists to parse. - * @param {object} options - Matter body options. + * @param {array} vertexSets - The vertex lists to parse. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * - * @return {object[]} - A list of matter bodies. + * @return {MatterJS.Body[]} - An array of Matter JS Bodies. */ parseVertices: function (vertexSets, options) { - var parts = []; + if (options === undefined) { options = {}; } - options = options || {}; + var parts = []; for (var v = 0; v < vertexSets.length; v++) { From 887227a3134e4f4c9e0be6cd7038c4166b685205 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 10 Jan 2020 08:55:56 +0000 Subject: [PATCH 103/189] Added centerOffset back and fixed calculations --- src/physics/matter-js/lib/body/Body.js | 46 +++++++++++--------------- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/src/physics/matter-js/lib/body/Body.js b/src/physics/matter-js/lib/body/Body.js index 20f046cbd..3ae0992d6 100644 --- a/src/physics/matter-js/lib/body/Body.js +++ b/src/physics/matter-js/lib/body/Body.js @@ -1,11 +1,10 @@ /** -* The `Matter.Body` module contains methods for creating and manipulating body models. -* A `Matter.Body` is a rigid body that can be simulated by a `Matter.Engine`. -* Factories for commonly used body configurations (such as rectangles, circles and other polygons) can be found in the module `Matter.Bodies`. -* -* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). - -* @class Body + * The `Matter.Body` module contains methods for creating and manipulating body models. + * A `Matter.Body` is a rigid body that can be simulated by a `Matter.Engine`. + * Factories for commonly used body configurations (such as rectangles, circles and other polygons) can be found in the module `Matter.Bodies`. + * + * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). + * @class Body */ var Body = {}; @@ -100,8 +99,8 @@ var Axes = require('../geometry/Axes'); }, gameObject: null, // custom Phaser property scale: { x: 1, y: 1 }, // custom Phaser property - centerOfMass: { x: 0, y: 0 }, // custom Phaser property - centerOffset: { x: 0, y: 0 }, // custom Phaser property + centerOfMass: { x: 0, y: 0 }, // custom Phaser property (float, 0 - 1) + centerOffset: { x: 0, y: 0 }, // custom Phaser property (pixel values) gravityScale: { x: 1, y: 1 }, // custom Phaser property ignoreGravity: false, // custom Phaser property ignorePointer: false, // custom Phaser property @@ -192,17 +191,18 @@ var Axes = require('../geometry/Axes'); var bounds = body.bounds; var centerOfMass = body.centerOfMass; + var centerOffset = body.centerOffset; Bounds.update(bounds, body.vertices, body.velocity); - var boundsWidth = bounds.max.x - bounds.min.x; - var boundsHeight = bounds.max.y - bounds.min.y; + var bodyWidth = bounds.max.x - bounds.min.x; + var bodyHeight = bounds.max.y - bounds.min.y; - centerOfMass.x = -(bounds.min.x - body.position.x) / boundsWidth; - centerOfMass.y = -(bounds.min.y - body.position.y) / boundsHeight; + centerOfMass.x = -(bounds.min.x - body.position.x) / bodyWidth; + centerOfMass.y = -(bounds.min.y - body.position.y) / bodyHeight; - body.centerOffset.x = (boundsWidth * centerOfMass.x) - (boundsWidth / 2); - body.centerOffset.y = (boundsHeight * centerOfMass.y) - (boundsHeight / 2); + centerOffset.x = body.position.x; + centerOffset.y = body.position.y; Vertices.rotate(body.vertices, body.angle, body.position); Axes.rotate(body.axes, body.angle); @@ -465,21 +465,15 @@ var Axes = require('../geometry/Axes'); var bounds = body.bounds; var centerOfMass = body.centerOfMass; + var centerOffset = body.centerOffset; Bounds.update(bounds, body.vertices, body.velocity); - var boundsWidth = bounds.max.x - bounds.min.x; - var boundsHeight = bounds.max.y - bounds.min.y; + centerOfMass.x = -(bounds.min.x - cx) / (bounds.max.x - bounds.min.x); + centerOfMass.y = -(bounds.min.y - cy) / (bounds.max.y - bounds.min.y); - centerOfMass.x = -(bounds.min.x - cx) / boundsWidth; - centerOfMass.y = -(bounds.min.y - cy) / boundsHeight; - - body.centerOffset.x = (boundsWidth * centerOfMass.x) - (boundsWidth / 2); - body.centerOffset.y = (boundsHeight * centerOfMass.y) - (boundsHeight / 2); - - console.log('setParts1-com', body.centerOfMass.x, body.centerOfMass.y); - console.log('setParts2-off', body.centerOffset.x, body.centerOffset.y); - console.log('setParts3-bwh', boundsWidth, boundsHeight); + centerOffset.x = cx; + centerOffset.y = cy; body.area = total.area; body.parent = body; From 5c9c00bfdb5d2fbf8b11a917707de13132009968 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 10 Jan 2020 08:56:17 +0000 Subject: [PATCH 104/189] Removed un-used code. --- src/physics/matter-js/components/Transform.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/physics/matter-js/components/Transform.js b/src/physics/matter-js/components/Transform.js index 6c91e675c..56726e4ad 100644 --- a/src/physics/matter-js/components/Transform.js +++ b/src/physics/matter-js/components/Transform.js @@ -209,14 +209,6 @@ var Transform = { get: function () { return this.body.centerOffset.x; - - // return this.body.centerOfMass.x; - - // var body = this.body; - - // return body.render.sprite.xOffset + ((body.centerOfMass.x - (this.width / 2)) / this.width); - - // return body.render.sprite.xOffset + ((body.centerOfMass.x - (this.width / 2)) / this.width); } }, @@ -240,16 +232,6 @@ var Transform = { get: function () { return this.body.centerOffset.y; - - // return 0.5; - - // return this.body.centerOfMass.y - this.displayOriginY; - - // return this.body.centerOfMass.y; - - // var body = this.body; - - // return body.render.sprite.yOffset + ((body.centerOfMass.y - (this.height / 2)) / this.height); } }, From ea338cadaac5ebc03f2c0fa5829e669f654345e5 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 10 Jan 2020 08:56:31 +0000 Subject: [PATCH 105/189] Fixed JSDocs and origin assignment. --- src/physics/matter-js/components/SetBody.js | 60 +++------------------ 1 file changed, 7 insertions(+), 53 deletions(-) diff --git a/src/physics/matter-js/components/SetBody.js b/src/physics/matter-js/components/SetBody.js index 624fc77d8..2e0ea20e6 100644 --- a/src/physics/matter-js/components/SetBody.js +++ b/src/physics/matter-js/components/SetBody.js @@ -102,9 +102,6 @@ var SetBody = { * Set this Game Object to use the given existing Matter Body. * * The body is first removed from the world before being added to this Game Object. - * - * Calling this methods resets previous properties you may have set on the body, including - * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. * * @method Phaser.Physics.Matter.Components.SetBody#setExistingBody * @since 3.0.0 @@ -146,61 +143,18 @@ var SetBody = { this.world.remove(body, true); } - // Only add the body if it's not already in the world this.world.add(body); } if (this._originComponent) { - /* - var cx = this.width / 2; - var cy = this.height / 2; + var rx = body.render.sprite.xOffset; + var ry = body.render.sprite.yOffset; - console.log('cx', this.width * body.centerOfMass.x); - console.log('cy', this.height * body.centerOfMass.y); + var cx = body.centerOffset.x; + var cy = body.centerOffset.y; - var dx = (this.width * body.centerOfMass.x) - cx; - var dy = (this.height * body.centerOfMass.y) - cy; - - console.log('dx', dx); - console.log('dy', dy); - - // cx -= body.centerOffset.x * 2; - // cy += body.centerOffset.y * 2; - - cx -= dx * 2; - cy += dy * 1; - - this.setDisplayOrigin(cx, cy); - */ - - // var cx = this.x / this.width; - // var cy = this.y / this.height; - - // var cx = this.width / 2; - // var cy = this.height / 2; - - // var dx = cx + (this.width * body.centerOfMass.x) + body.centerOffset.x; - // var dy = cy * body.centerOfMass.y) + body.centerOffset.y; - - // console.log(cx, cy); - - // this.setOrigin(cx, cy); - - // this.setOrigin(body.render.sprite.xOffset, body.render.sprite.yOffset); - - // console.log('SO', this.centerOffsetX, this.centerOffsetY); - - // this.setDisplayOrigin(this.centerOffsetX, this.centerOffsetY); - - // this.setOrigin(this.originX - this.centerOffsetX, this.originY + this.centerOffsetY); - - // this.setOrigin(this.body.centerOfMass.x, this.body.centerOfMass.y); - - // this.displayOriginX -= (this.body.centerOffset.x * 2); - // this.displayOriginY -= this.body.centerOffset.y; - - // this.setOrigin(this.centerOffsetX, this.centerOffsetY); + this.setOrigin(rx + (cx / this.width), ry + (cy / this.height)); } return this; @@ -209,7 +163,7 @@ var SetBody = { /** * Set this Game Object to create and use a new Body based on the configuration object given. * - * Calling this methods resets previous properties you may have set on the body, including + * Calling this method resets previous properties you may have set on the body, including * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. * * @method Phaser.Physics.Matter.Components.SetBody#setBody @@ -297,7 +251,7 @@ var SetBody = { break; case 'fromPhysicsEditor': - body = PhysicsEditorParser.parseBody(bodyX, bodyY, bodyWidth, bodyHeight, config); + body = PhysicsEditorParser.parseBody(bodyX, bodyY, config, options); break; } From 0d66c98ff046dac9f6f5968b31eb22a69af7ac72 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 10 Jan 2020 08:56:49 +0000 Subject: [PATCH 106/189] Added JSDocs for `fromPhysicsEditor` method and tidied things up a bit. --- src/physics/matter-js/Factory.js | 44 +++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/src/physics/matter-js/Factory.js b/src/physics/matter-js/Factory.js index 1ba61906b..2561232bf 100644 --- a/src/physics/matter-js/Factory.js +++ b/src/physics/matter-js/Factory.js @@ -198,11 +198,49 @@ var Factory = new Class({ return body; }, - fromPhysicsEditor: function (x, y, width, height, config) + /** + * Creates a body using data exported from the application PhysicsEditor (https://www.codeandweb.com/physicseditor) + * + * The PhysicsEditor file should be loaded as JSON: + * + * ```javascript + * preload () + * { + * this.load.json('vehicles', 'assets/vehicles.json); + * } + * + * create () + * { + * const vehicleShapes = this.cache.json.get('vehicles'); + * this.matter.add.fromPhysicsEditor(400, 300, vehicleShapes.truck); + * } + * ``` + * + * Do not pass the entire JSON file to this method, but instead pass one of the shapes contained within it. + * + * If you pas in an `options` object, any settings in there will override those in the PhysicsEditor config object. + * + * @method Phaser.Physics.Matter.Factory#fromPhysicsEditor + * @since 3.22.0 + * + * @param {number} x - The horizontal world location of the body. + * @param {number} y - The vertical world location of the body. + * @param {any} config - The JSON data exported from PhysicsEditor. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. + * @param {boolean} [addToWorld=true] - Should the newly created body be immediately added to the World? + * + * @return {MatterJS.Body} A Matter JS Body. + */ + fromPhysicsEditor: function (x, y, config, options, addToWorld) { - var body = PhysicsEditorParser.parseBody(x, y, width, height, config); + if (addToWorld === undefined) { addToWorld = true; } - // this.world.add(body); + var body = PhysicsEditorParser.parseBody(x, y, config, options); + + if (addToWorld && !this.world.has(body)) + { + this.world.add(body); + } return body; }, From e27914792e4205d8cd4aef93e5b933a2b9172fe9 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 10 Jan 2020 10:52:54 +0000 Subject: [PATCH 107/189] More robust checks --- src/physics/matter-js/MatterPhysics.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/physics/matter-js/MatterPhysics.js b/src/physics/matter-js/MatterPhysics.js index 7a7fb41ef..daa9659b4 100644 --- a/src/physics/matter-js/MatterPhysics.js +++ b/src/physics/matter-js/MatterPhysics.js @@ -1349,6 +1349,8 @@ var MatterPhysics = new Class({ */ alignBody: function (body, x, y, align) { + body = (body.hasOwnProperty('body')) ? body.body : body; + var pos; switch (align) @@ -1394,7 +1396,10 @@ var MatterPhysics = new Class({ break; } - Body.setPosition(body, pos); + if (pos) + { + Body.setPosition(body, pos); + } return this; }, From 2a5ee807ac5069d7a308de60ff77245ee0a597c0 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 10 Jan 2020 11:20:30 +0000 Subject: [PATCH 108/189] New name --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index efa179ccc..942ba9f1e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "phaser", "version": "3.22.0", - "release": "Senku", + "release": "Kohaku", "description": "A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers.", "author": "Richard Davey (http://www.photonstorm.com)", "homepage": "http://phaser.io", From 4e53d745817912c9dcff79ae1e408e99e2982334 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 10 Jan 2020 11:20:41 +0000 Subject: [PATCH 109/189] Removed un-used properties --- src/physics/matter-js/components/Transform.js | 46 ------------------- 1 file changed, 46 deletions(-) diff --git a/src/physics/matter-js/components/Transform.js b/src/physics/matter-js/components/Transform.js index 56726e4ad..6d8a36055 100644 --- a/src/physics/matter-js/components/Transform.js +++ b/src/physics/matter-js/components/Transform.js @@ -189,52 +189,6 @@ var Transform = { } }, - /** - * Returns the center x offset of the Body this Game Object is using. - * - * This is calculated by taking the difference between the center of the frame and the center of - * the physics body. If set, the `body.render.sprite.xOffset` value is then added to it. - * - * Use this when setting the Origin of a Physics Game Object post-creation, i.e.: - * - * `setOrigin(originX + centerOffsetX, originY + centerOffsetY)` - * - * @name Phaser.Physics.Matter.Components.Transform#centerOffsetX - * @type {number} - * @readonly - * @since 3.22.0 - */ - centerOffsetX: { - - get: function () - { - return this.body.centerOffset.x; - } - }, - - /** - * Returns the center y offset of the Body this Game Object is using. - * - * This is calculated by taking the difference between the center of the frame and the center of - * the physics body. If set, the `body.render.sprite.yOffset` value is then added to it. - * - * Use this when setting the Origin of a Physics Game Object post-creation, i.e.: - * - * `setOrigin(originX + centerOffsetX, originY + centerOffsetY)` - * - * @name Phaser.Physics.Matter.Components.Transform#centerOffsetY - * @type {number} - * @readonly - * @since 3.22.0 - */ - centerOffsetY: { - - get: function () - { - return this.body.centerOffset.y; - } - }, - /** * Sets the position of the physics body along x and y axes. * Both the parameters to this function are optional and if not passed any they default to 0. From e07513b707873722604cfb123664bb005f8ec51d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 10 Jan 2020 11:20:53 +0000 Subject: [PATCH 110/189] Small restructure --- src/physics/matter-js/lib/body/Body.js | 36 ++++++++++++++++---------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/src/physics/matter-js/lib/body/Body.js b/src/physics/matter-js/lib/body/Body.js index 3ae0992d6..5958a8efe 100644 --- a/src/physics/matter-js/lib/body/Body.js +++ b/src/physics/matter-js/lib/body/Body.js @@ -5,7 +5,7 @@ * * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). * @class Body -*/ + */ var Body = {}; @@ -190,19 +190,6 @@ var Axes = require('../geometry/Axes'); }); var bounds = body.bounds; - var centerOfMass = body.centerOfMass; - var centerOffset = body.centerOffset; - - Bounds.update(bounds, body.vertices, body.velocity); - - var bodyWidth = bounds.max.x - bounds.min.x; - var bodyHeight = bounds.max.y - bounds.min.y; - - centerOfMass.x = -(bounds.min.x - body.position.x) / bodyWidth; - centerOfMass.y = -(bounds.min.y - body.position.y) / bodyHeight; - - centerOffset.x = body.position.x; - centerOffset.y = body.position.y; Vertices.rotate(body.vertices, body.angle, body.position); Axes.rotate(body.axes, body.angle); @@ -215,6 +202,18 @@ var Axes = require('../geometry/Axes'); mass: options.mass || body.mass, inertia: options.inertia || body.inertia }); + + var centerOfMass = body.centerOfMass; + var centerOffset = body.centerOffset; + + var bodyWidth = bounds.max.x - bounds.min.x; + var bodyHeight = bounds.max.y - bounds.min.y; + + centerOfMass.x = -(bounds.min.x - body.position.x) / bodyWidth; + centerOfMass.y = -(bounds.min.y - body.position.y) / bodyHeight; + + centerOffset.x = body.position.x; + centerOffset.y = body.position.y; }; /** @@ -1299,6 +1298,15 @@ var Axes = require('../geometry/Axes'); * @default { x: 0, y: 0 } */ + /** + * The center of the body in pixel values. + * Used by Phaser for texture aligment. + * + * @property centerOffset + * @type vector + * @default { x: 0, y: 0 } + */ + /** * Will this Body ignore World gravity during the Engine update? * From 415de5b7b8342d08c7d859d0a4f36ee0e37852d9 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 10 Jan 2020 11:20:57 +0000 Subject: [PATCH 111/189] Update CHANGELOG.md --- CHANGELOG.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9b4861e0..b4c8a3b7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log -## Version 3.22 - Senku - in development +## Version 3.22 - Kohaku - in development ### Matter Physics Updates @@ -114,10 +114,9 @@ * `MatterPhysics.setCollisionCategory` is a new method that will set the collision filter category to the value given, on all of the bodies given. This allows you to easily set the category on bodies that don't have a Phaser Matter Collision component. * `MatterPhysics.setCollisionGroup` is a new method that will set the collision filter group to the value given, on all of the bodies given. This allows you to easily set the group on bodies that don't have a Phaser Matter Collision component. * `MatterPhysics.setCollidesWith` is a new method that will set the collision filter mask to the value given, on all of the bodies given. This allows you to easily set the filter mask on bodies that don't have a Phaser Matter Collision component. -* `Matter.Body.centerOfMass` is a new property added to the Matter Body object that retains the center of mass coordinates when the Body is first created. -* `Matter.Body.render.sprite.xOffset` and `yOffset` are no longer set to anything when a Body is created. They are left as zero, or you can override them in the Body config, in which case the value is added to the sprite origin offset. -* `Matter.Transform.centerOffsetX` is a new read-only property available on all Matter Game Objects that returns the horizontal offset between the center of the frame and the center of mass. This can be used to allow for accurately mapping texture centers to the body center. -* `Matter.Transform.centerOffsetY` is a new read-only property available on all Matter Game Objects that returns the vertical offset between the center of the frame and the center of mass. This can be used to allow for accurately mapping texture centers to the body center. +* `Matter.Body.centerOfMass` is a new vec2 property added to the Matter Body object that retains the center of mass coordinates when the Body is first created, or has parts added to it. These are float values, derived from the body position and bounds. +* `Matter.Body.centerOffset` is a new vec2 property added to the Matter Body object that retains the center offset coordinates when the Body is first created, or has parts added to it. These are pixel values. +* `Matter.Body.render.sprite.xOffset` and `yOffset` are no longer set to anything when a Body is created. They are left as zero, or you can override them in the Body config, in which case the value is added to the sprite origin offset during a call to `setExistingBody`. * The `Matter.Mass.centerOfMass` component property now returns the pre-calculated Body `centerOfMass` property, which is much more accurate than the previous bounds offset value. * `Matter.setExistingBody`, which is called interally whenever a Body is set on a Game Object, now uses the new `centerOffset` values to ensure that the texture frame is correctly centered based on the center of mass, not the Body bounds, allowing for much more accurate body to texture mapping with complex multi-part compound bodies. * The `Matter.PhysicsEditorParser` has been updated so it no longer needs to set the render offsets, and instead uses the center of mass values. @@ -126,12 +125,12 @@ * `Constraint.pointBWorld` is a new method added to Matter that returns the world-space position of `constraint.pointB`, accounting for `constraint.bodyB`. * `Body.setCentre` is a new method added to Matter that allows you to set the center of mass of a Body (please note the English spelling of this function.) * Bumped Matter Plugin versions to avoid console logs from Common.info and Common.warn. -* `Body.scale` is a new vector that holds the most recent scale values as passed to `Body.scale`. +* `Body.scale` is a new read-only vector that holds the most recent scale values as passed to `Body.scale`. * `Matter.Bodies.flagCoincidentParts` is a new function that will flags all internal edges (coincident parts) on an array of body parts. This was previously part of the `fromVertices` function, but has been made external for outside use. * `PhysicsEditorParser.parseVertices` now uses `Bodies.flagCoincidentParts` to avoid duplicating code. * `MatterGameObject` has a new optional boolean parameter `addToWorld` which lets you control if the Body should be added to the world or not. Useful for toggling off should you be merging pre-existing bodies with Game Objects. * The `Matter.SetBody.setExistingBody` function, which all Matter Game Objects have, has a new parameter `addToWorld` which allows you to control when the body is added to the Matter world should you not require it immediately. It will also only add the body to the world if it doesn't already exist within it, or any of its composites. -* `PointerConstraint` has been recoded so that when pressed down, it only polls the World for a body hit test during the next game update. This stops it coming out of sync with the state of the world. Useage of the constraint remains the same as before. +* `PointerConstraint` has been recoded so that when pressed down, it only polls the World for a body hit test during the next game update. This stops it coming out of sync with the state of the world. Use of the constraint remains the same as before. * `Matter.getMatterBodies` is a new function that will return an array of Matter JS Bodies from the given input array, which can be Matter Game Objects, or any class that extends them. * `Matter.World.has` is a new method that will take a Matter Body, or Game Object, and search the world for it. If found, it will return `true`. * Matter now has the option to use the Runner that it ships with. The Matter Runner operates in two modes: fixed and variable. In the fixed mode, the Matter Engine updates at a fixed delta value every frame (which is what Phaser has used since the first version). In variable mode, the delta will be smoothed and capped each frame to keep the simulation constant, but at the cost of determininism. You can configure the runner by setting the `runner` property in the Matter Config object, both of which are fully covered with JSDocs. As of 3.22 the runner is now used by default in variable (non-fixed) mode. If you wish to return to the previous behavior, set `runner: { isFixed: true }`. @@ -168,6 +167,9 @@ * `MatterPhysics.alignBody` is a new method that will align a Body, or Matter Game Object, against the given coordinates, using the given alignment constant. For example, this allows you to easily position a body to the `BOTTOM_LEFT`, or `TOP_CENTER`, or a coordinate. Alignment is based on the body bounds. * `Phaser.Types.Physics.Matter.MatterBody` is a new type def that contains all of the valid Matter Body objects. This is now used through-out the JSDocs to aid in code-completion. * `Matter.BodyBounds` is a new class that contains methods to help you extract world coordinates from various points around the bounds of a Matter Body. Because Matter bodies are positioned based on their center of mass, and not a dimension based center, you often need to get the bounds coordinates in order to properly align them in the world. You can access this new class via `this.matter.bodyBounds`. +* The method signature for `Matter.PhysicsEditorParser.parseBody` has changed. It now takes `(x, y, config, options)` and no longer has `width` and `height` parameters. Please see the updated documentation for more details if you were calling this method directly. +* `Matter.PhysicsEditorParser.parseBody` can now accept a MatterBodyConfig file as a 4th parameter. This allows you to set Body properties when the body is created, overriding whatever values may have been set in the PhysicsEditor JSON. +* `MatterPhysics.fromPhysicsEditor` is a new method that allows you to create a Matter Body based on the given PhysicsEditor shape data. Previously, you could only using PhysicsEditor data with a Matter Game Object, but now you can create a body directly using it. ### New Features From 282a4df811af923eb5529bf96701423f26402c46 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 10 Jan 2020 14:53:17 +0000 Subject: [PATCH 112/189] Update Factory.js --- src/physics/matter-js/Factory.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/physics/matter-js/Factory.js b/src/physics/matter-js/Factory.js index 2561232bf..435978ae9 100644 --- a/src/physics/matter-js/Factory.js +++ b/src/physics/matter-js/Factory.js @@ -417,6 +417,7 @@ var Factory = new Class({ /** * Create a new composite containing bodies created in the callback in a grid arrangement. + * * This function uses the body bounds to prevent overlaps. * * @method Phaser.Physics.Matter.Factory#stack From ea2337c091fbd7420414f41d591d1370d3aa4f8c Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 10 Jan 2020 14:53:27 +0000 Subject: [PATCH 113/189] Only if parts = 1 --- src/physics/matter-js/lib/body/Body.js | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/physics/matter-js/lib/body/Body.js b/src/physics/matter-js/lib/body/Body.js index 5958a8efe..1988a458e 100644 --- a/src/physics/matter-js/lib/body/Body.js +++ b/src/physics/matter-js/lib/body/Body.js @@ -203,17 +203,20 @@ var Axes = require('../geometry/Axes'); inertia: options.inertia || body.inertia }); - var centerOfMass = body.centerOfMass; - var centerOffset = body.centerOffset; - - var bodyWidth = bounds.max.x - bounds.min.x; - var bodyHeight = bounds.max.y - bounds.min.y; - - centerOfMass.x = -(bounds.min.x - body.position.x) / bodyWidth; - centerOfMass.y = -(bounds.min.y - body.position.y) / bodyHeight; - - centerOffset.x = body.position.x; - centerOffset.y = body.position.y; + if (body.parts.length === 1) + { + var centerOfMass = body.centerOfMass; + var centerOffset = body.centerOffset; + + var bodyWidth = bounds.max.x - bounds.min.x; + var bodyHeight = bounds.max.y - bounds.min.y; + + centerOfMass.x = -(bounds.min.x - body.position.x) / bodyWidth; + centerOfMass.y = -(bounds.min.y - body.position.y) / bodyHeight; + + centerOffset.x = bodyWidth * centerOfMass.x; + centerOffset.y = bodyHeight * centerOfMass.y; + } }; /** From 1d827c911f162d4413c89d0b39f5642a0014aad8 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 10 Jan 2020 14:53:39 +0000 Subject: [PATCH 114/189] 0.2 is just too dim --- src/physics/matter-js/World.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/physics/matter-js/World.js b/src/physics/matter-js/World.js index 4650dfff4..853bfa631 100644 --- a/src/physics/matter-js/World.js +++ b/src/physics/matter-js/World.js @@ -1318,12 +1318,12 @@ var World = new Class({ if (config.showBroadphase && engine.broadphase.controller) { - this.renderGrid(engine.broadphase, graphics, config.broadphaseColor, 0.2); + this.renderGrid(engine.broadphase, graphics, config.broadphaseColor, 0.5); } if (config.showBounds) { - this.renderBodyBounds(bodies, graphics, config.boundsColor, 0.2); + this.renderBodyBounds(bodies, graphics, config.boundsColor, 0.5); } if (config.showBody || config.showStaticBody) From 88cd83a5082ed66aad55c5c1e3dd2dfc22958295 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 10 Jan 2020 15:32:03 +0000 Subject: [PATCH 115/189] Fixed bug in PhysicsEditorParser where it would allow non-clockwise vertices through --- src/physics/matter-js/PhysicsEditorParser.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/physics/matter-js/PhysicsEditorParser.js b/src/physics/matter-js/PhysicsEditorParser.js index 60154d2ff..390bc9a5e 100644 --- a/src/physics/matter-js/PhysicsEditorParser.js +++ b/src/physics/matter-js/PhysicsEditorParser.js @@ -120,6 +120,8 @@ var PhysicsEditorParser = { for (var v = 0; v < vertexSets.length; v++) { + Vertices.clockwiseSort(vertexSets[v]); + parts.push(Body.create(Common.extend({ position: Vertices.centre(vertexSets[v]), vertices: vertexSets[v] From f3bbf4f88d6ae7b80fdcde60fdd21616c6d49c64 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 10 Jan 2020 15:34:44 +0000 Subject: [PATCH 116/189] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4c8a3b7f..a7f996ee9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -170,6 +170,7 @@ * The method signature for `Matter.PhysicsEditorParser.parseBody` has changed. It now takes `(x, y, config, options)` and no longer has `width` and `height` parameters. Please see the updated documentation for more details if you were calling this method directly. * `Matter.PhysicsEditorParser.parseBody` can now accept a MatterBodyConfig file as a 4th parameter. This allows you to set Body properties when the body is created, overriding whatever values may have been set in the PhysicsEditor JSON. * `MatterPhysics.fromPhysicsEditor` is a new method that allows you to create a Matter Body based on the given PhysicsEditor shape data. Previously, you could only using PhysicsEditor data with a Matter Game Object, but now you can create a body directly using it. +* `Matter.PhysicsEditorParser` had a bug where it would allow fixtures with non-clockwise sorted vertices through, which would break pointer constraint interaction with these bodies. The parser now sorts the vertices properly. Fix #4261 (thanks @Sanchez3) ### New Features From 8e7c3103d8b36444fd785ca12dd705f394497000 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 10 Jan 2020 16:24:30 +0000 Subject: [PATCH 117/189] Moved the fromJSON code to its own external parser --- src/physics/matter-js/Factory.js | 79 +++++++-------- src/physics/matter-js/PhysicsJSONParser.js | 111 +++++++++++++++++++++ src/physics/matter-js/index.js | 1 + 3 files changed, 152 insertions(+), 39 deletions(-) create mode 100644 src/physics/matter-js/PhysicsJSONParser.js diff --git a/src/physics/matter-js/Factory.js b/src/physics/matter-js/Factory.js index 435978ae9..44b2c97d2 100644 --- a/src/physics/matter-js/Factory.js +++ b/src/physics/matter-js/Factory.js @@ -5,7 +5,6 @@ */ var Bodies = require('./lib/factory/Bodies'); -var Body = require('./lib/body/Body'); var Class = require('../../utils/Class'); var Composites = require('./lib/factory/Composites'); var Constraint = require('./lib/constraint/Constraint'); @@ -15,6 +14,7 @@ var MatterImage = require('./MatterImage'); var MatterSprite = require('./MatterSprite'); var MatterTileBody = require('./MatterTileBody'); var PhysicsEditorParser = require('./PhysicsEditorParser'); +var PhysicsJSONParser = require('./PhysicsJSONParser'); var PointerConstraint = require('./PointerConstraint'); var Vertices = require('./lib/geometry/Vertices'); @@ -309,61 +309,62 @@ var Factory = new Class({ }, /** - * **This function is still in development** + * Creates a body using the supplied physics data, as provided by a JSON file. * - * Creates a body using the supplied body data, as provided by a JSON file. + * The data file should be loaded as JSON: + * + * ```javascript + * preload () + * { + * this.load.json('ninjas', 'assets/ninjas.json); + * } + * + * create () + * { + * const ninjaShapes = this.cache.json.get('ninjas'); + * + * this.matter.add.fromJSON(400, 300, ninjaShapes.shinobi); + * } + * ``` + * + * Do not pass the entire JSON file to this method, but instead pass one of the shapes contained within it. + * + * If you pas in an `options` object, any settings in there will override those in the config object. + * + * The structure of the JSON file is as follows: + * + * ```text + * { + * 'generator_info': // The name of the application that created the JSON data + * 'shapeName': { + * 'type': // The type of body + * 'label': // Optional body label + * 'vertices': // An array, or an array of arrays, containing the vertex data in x/y object pairs + * } + * } + * ``` + * + * At the time of writing, only the Phaser Physics Tracer App exports in this format. * * @method Phaser.Physics.Matter.Factory#fromJSON * @since 3.22.0 * * @param {number} x - The X coordinate of the body. * @param {number} y - The Y coordinate of the body. - * @param {object} data - The body data object as parsed from the JSON body format. + * @param {any} config - The JSON physics data. * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * @param {boolean} [addToWorld=true] - Should the newly created body be immediately added to the World? * * @return {MatterJS.Body} A Matter JS Body. */ - fromJSON: function (x, y, data, options, addToWorld) + fromJSON: function (x, y, config, options, addToWorld) { if (options === undefined) { options = {}; } if (addToWorld === undefined) { addToWorld = true; } - var body; - var vertexSets = data.verts; + var body = PhysicsJSONParser.parseBody(x, y, config, options); - if (vertexSets.length === 1) - { - // Just a single Body - options.vertices = vertexSets[0]; - - body = Body.create(options); - - Bodies.flagCoincidentParts(body.parts); - } - else - { - var parts = []; - - for (var i = 0; i < vertexSets.length; i++) - { - var part = Body.create({ - vertices: vertexSets[i] - }); - - parts.push(part); - } - - Bodies.flagCoincidentParts(parts); - - options.parts = parts; - - body = Body.create(options); - } - - Body.setPosition(body, { x: x, y: y }); - - if (addToWorld) + if (body && addToWorld) { this.world.add(body); } diff --git a/src/physics/matter-js/PhysicsJSONParser.js b/src/physics/matter-js/PhysicsJSONParser.js new file mode 100644 index 000000000..473764542 --- /dev/null +++ b/src/physics/matter-js/PhysicsJSONParser.js @@ -0,0 +1,111 @@ +/** + * @author Richard Davey + * @copyright 2019 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Bodies = require('./lib/factory/Bodies'); +var Body = require('./lib/body/Body'); + +/** + * Creates a body using the supplied physics data, as provided by a JSON file. + * + * The data file should be loaded as JSON: + * + * ```javascript + * preload () + * { + * this.load.json('ninjas', 'assets/ninjas.json); + * } + * + * create () + * { + * const ninjaShapes = this.cache.json.get('ninjas'); + * + * this.matter.add.fromJSON(400, 300, ninjaShapes.shinobi); + * } + * ``` + * + * Do not pass the entire JSON file to this method, but instead pass one of the shapes contained within it. + * + * If you pas in an `options` object, any settings in there will override those in the config object. + * + * The structure of the JSON file is as follows: + * + * ```text + * { + * 'generator_info': // The name of the application that created the JSON data + * 'shapeName': { + * 'type': // The type of body + * 'label': // Optional body label + * 'vertices': // An array, or an array of arrays, containing the vertex data in x/y object pairs + * } + * } + * ``` + * + * At the time of writing, only the Phaser Physics Tracer App exports in this format. + * + * @namespace Phaser.Physics.Matter.PhysicsJSONParser + * @since 3.22.0 + */ +var PhysicsJSONParser = { + + /** + * Parses a body element from the given JSON data. + * + * @function Phaser.Physics.Matter.PhysicsJSONParser.parseBody + * @since 3.22.0 + * + * @param {number} x - The horizontal world location of the body. + * @param {number} y - The vertical world location of the body. + * @param {object} config - The body configuration data. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. + * + * @return {MatterJS.Body} A Matter JS Body. + */ + parseBody: function (x, y, config, options) + { + if (options === undefined) { options = {}; } + + var body; + var vertexSets = config.vertices; + + if (vertexSets.length === 1) + { + // Just a single Body + options.vertices = vertexSets[0]; + + body = Body.create(options); + + Bodies.flagCoincidentParts(body.parts); + } + else + { + var parts = []; + + for (var i = 0; i < vertexSets.length; i++) + { + var part = Body.create({ + vertices: vertexSets[i] + }); + + parts.push(part); + } + + Bodies.flagCoincidentParts(parts); + + options.parts = parts; + + body = Body.create(options); + } + + body.label = config.label; + + Body.setPosition(body, { x: x, y: y }); + + return body; + } + +}; + +module.exports = PhysicsJSONParser; diff --git a/src/physics/matter-js/index.js b/src/physics/matter-js/index.js index efba704f6..ce2af9c40 100644 --- a/src/physics/matter-js/index.js +++ b/src/physics/matter-js/index.js @@ -19,6 +19,7 @@ module.exports = { Sprite: require('./MatterSprite'), TileBody: require('./MatterTileBody'), PhysicsEditorParser: require('./PhysicsEditorParser'), + PhysicsJSONParser: require('./PhysicsJSONParser'), World: require('./World') }; From 8b1cc40a23927ef8599884bff40a0f142b6db2c4 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 10 Jan 2020 16:24:40 +0000 Subject: [PATCH 118/189] SetBody can now use JSON data natively --- src/physics/matter-js/components/SetBody.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/physics/matter-js/components/SetBody.js b/src/physics/matter-js/components/SetBody.js index 2e0ea20e6..2b1503e5e 100644 --- a/src/physics/matter-js/components/SetBody.js +++ b/src/physics/matter-js/components/SetBody.js @@ -8,6 +8,7 @@ var Bodies = require('../lib/factory/Bodies'); var Body = require('../lib/body/Body'); var GetFastValue = require('../../../utils/object/GetFastValue'); var PhysicsEditorParser = require('../PhysicsEditorParser'); +var PhysicsJSONParser = require('../PhysicsJSONParser'); var Vertices = require('../lib/geometry/Vertices'); /** @@ -253,6 +254,10 @@ var SetBody = { case 'fromPhysicsEditor': body = PhysicsEditorParser.parseBody(bodyX, bodyY, config, options); break; + + case 'fromPhysicsTracer': + body = PhysicsJSONParser.parseBody(bodyX, bodyY, config, options); + break; } if (body) From c9a98088b67661b81864b0a734a0437d142ab48c Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 10 Jan 2020 16:24:44 +0000 Subject: [PATCH 119/189] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7f996ee9..e90e96e71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -171,6 +171,9 @@ * `Matter.PhysicsEditorParser.parseBody` can now accept a MatterBodyConfig file as a 4th parameter. This allows you to set Body properties when the body is created, overriding whatever values may have been set in the PhysicsEditor JSON. * `MatterPhysics.fromPhysicsEditor` is a new method that allows you to create a Matter Body based on the given PhysicsEditor shape data. Previously, you could only using PhysicsEditor data with a Matter Game Object, but now you can create a body directly using it. * `Matter.PhysicsEditorParser` had a bug where it would allow fixtures with non-clockwise sorted vertices through, which would break pointer constraint interaction with these bodies. The parser now sorts the vertices properly. Fix #4261 (thanks @Sanchez3) +* `Matter.PhysicsJSONParser` is a new parser that will create Matter bodies from JSON physics data files. Currently onto the Phaser Physics Tracer app exports in this format, but details are published in the JSDocs, so any app can do so. +* `Matter.Factory.fromJSON` is a new method that will create a body from a JSON physics data file. +* The `SetBody` Matter component can now automatically use shapes created in the Phaser Physics Tracer App in the JSON data format. ### New Features From d884fd0468d63cb45db3a8d5d981ad0a72c28bc4 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 10 Jan 2020 17:03:50 +0000 Subject: [PATCH 120/189] Handle scaled bodies properly --- src/physics/matter-js/components/SetBody.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/physics/matter-js/components/SetBody.js b/src/physics/matter-js/components/SetBody.js index 2b1503e5e..780bd0973 100644 --- a/src/physics/matter-js/components/SetBody.js +++ b/src/physics/matter-js/components/SetBody.js @@ -155,7 +155,7 @@ var SetBody = { var cx = body.centerOffset.x; var cy = body.centerOffset.y; - this.setOrigin(rx + (cx / this.width), ry + (cy / this.height)); + this.setOrigin(rx + (cx / this.displayWidth), ry + (cy / this.displayHeight)); } return this; From f90d679d2240f7214ecdeb7754adf37e8a0bcef9 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 10 Jan 2020 17:39:40 +0000 Subject: [PATCH 121/189] Added setToSleep and setAwake methods --- src/physics/matter-js/components/Sleep.js | 35 ++++++++++++++++++++--- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/src/physics/matter-js/components/Sleep.js b/src/physics/matter-js/components/Sleep.js index bd725e7a1..4bb242c7e 100644 --- a/src/physics/matter-js/components/Sleep.js +++ b/src/physics/matter-js/components/Sleep.js @@ -5,6 +5,7 @@ */ var Events = require('../events'); +var Sleeping = require('../lib/core/Sleeping'); var MatterEvents = require('../lib/core/Events'); /** @@ -15,6 +16,32 @@ var MatterEvents = require('../lib/core/Events'); */ var Sleep = { + /** + * Sets this Body to sleep. + * + * @method Phaser.Physics.Matter.Components.Sleep#setToSleep + * @since 3.22.0 + * + * @return {this} This Game Object. + */ + setToSleep: function () + { + Sleeping.set(this.body, true); + }, + + /** + * Wakes this Body if asleep. + * + * @method Phaser.Physics.Matter.Components.Sleep#setAwake + * @since 3.22.0 + * + * @return {this} This Game Object. + */ + setAwake: function () + { + Sleeping.set(this.body, false); + }, + /** * Sets the number of updates in which this body must have near-zero velocity before it is set as sleeping (if sleeping is enabled by the engine). * @@ -23,7 +50,7 @@ var Sleep = { * * @param {number} [value=60] - A `Number` that defines the number of updates in which this body must have near-zero velocity before it is set as sleeping. * - * @return {Phaser.GameObjects.GameObject} This Game Object. + * @return {this} This Game Object. */ setSleepThreshold: function (value) { @@ -48,7 +75,7 @@ var Sleep = { * @param {boolean} start - `true` if you want the sleep start event to be emitted for this body. * @param {boolean} end - `true` if you want the sleep end event to be emitted for this body. * - * @return {Phaser.GameObjects.GameObject} This Game Object. + * @return {this} This Game Object. */ setSleepEvents: function (start, end) { @@ -66,7 +93,7 @@ var Sleep = { * * @param {boolean} value - `true` to enable the sleep event, or `false` to disable it. * - * @return {Phaser.GameObjects.GameObject} This Game Object. + * @return {this} This Game Object. */ setSleepStartEvent: function (value) { @@ -95,7 +122,7 @@ var Sleep = { * * @param {boolean} value - `true` to enable the sleep event, or `false` to disable it. * - * @return {Phaser.GameObjects.GameObject} This Game Object. + * @return {this} This Game Object. */ setSleepEndEvent: function (value) { From 7ceda58213f13e531d73d0d49c39f05ce3651d49 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 10 Jan 2020 17:39:43 +0000 Subject: [PATCH 122/189] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e90e96e71..855446e90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -174,6 +174,8 @@ * `Matter.PhysicsJSONParser` is a new parser that will create Matter bodies from JSON physics data files. Currently onto the Phaser Physics Tracer app exports in this format, but details are published in the JSDocs, so any app can do so. * `Matter.Factory.fromJSON` is a new method that will create a body from a JSON physics data file. * The `SetBody` Matter component can now automatically use shapes created in the Phaser Physics Tracer App in the JSON data format. +* `Matter.Components.Sleep.setToSleep` is a new method available on any Matter Game Object that will send the body to sleep, if Engine sleeping has been enabled. +* `Matter.Components.Sleep.setAwake` is a new method available on any Matter Game Object that will awake a body from sleep, if Engine sleeping has been enabled. ### New Features From cf1e4645f349936f595060219485d1399c078fd5 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 10 Jan 2020 18:05:20 +0000 Subject: [PATCH 123/189] Ignore if CoM is 0.5 --- src/physics/matter-js/components/SetBody.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/physics/matter-js/components/SetBody.js b/src/physics/matter-js/components/SetBody.js index 780bd0973..cdcdb3232 100644 --- a/src/physics/matter-js/components/SetBody.js +++ b/src/physics/matter-js/components/SetBody.js @@ -152,10 +152,20 @@ var SetBody = { var rx = body.render.sprite.xOffset; var ry = body.render.sprite.yOffset; - var cx = body.centerOffset.x; - var cy = body.centerOffset.y; + var comx = body.centerOfMass.x; + var comy = body.centerOfMass.y; - this.setOrigin(rx + (cx / this.displayWidth), ry + (cy / this.displayHeight)); + if (comx === 0.5 && comy === 0.5) + { + this.setOrigin(rx + 0.5, ry + 0.5); + } + else + { + var cx = body.centerOffset.x; + var cy = body.centerOffset.y; + + this.setOrigin(rx + (cx / this.displayWidth), ry + (cy / this.displayHeight)); + } } return this; From e42f227ec2d923c19369391ce2c24a3ec0ed0adc Mon Sep 17 00:00:00 2001 From: Andrew Brampton Date: Sat, 11 Jan 2020 06:46:25 -0800 Subject: [PATCH 124/189] Update documentation and one import, to use the consistent name of `Vector2`. There were examples that used Vec2, which wouldn't work. For example `An array of Point or Vector2 objects: [new Phaser.Math.Vec2(x1, y1), ...]` was not copy and pastable. --- src/cameras/2d/BaseCamera.js | 2 +- src/curves/path/Path.js | 16 +++++------ src/gameobjects/shape/polygon/Polygon.js | 2 +- .../shape/polygon/PolygonFactory.js | 2 +- src/math/ToXY.js | 4 +-- src/physics/arcade/Body.js | 2 +- src/physics/arcade/components/Bounce.js | 2 +- src/physics/matter-js/BodyBounds.js | 28 +++++++++---------- 8 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/cameras/2d/BaseCamera.js b/src/cameras/2d/BaseCamera.js index ad0e9c801..ad44cabfd 100644 --- a/src/cameras/2d/BaseCamera.js +++ b/src/cameras/2d/BaseCamera.js @@ -577,7 +577,7 @@ var BaseCamera = new Class({ * * @param {number} x - The horizontal coordinate to center on. * @param {number} y - The vertical coordinate to center on. - * @param {Phaser.Math.Vector2} [out] - A Vec2 to store the values in. If not given a new Vec2 is created. + * @param {Phaser.Math.Vector2} [out] - A Vector2 to store the values in. If not given a new Vector2 is created. * * @return {Phaser.Math.Vector2} The scroll coordinates stored in the `x` and `y` properties. */ diff --git a/src/curves/path/Path.js b/src/curves/path/Path.js index 6cdc5e668..83b78d757 100644 --- a/src/curves/path/Path.js +++ b/src/curves/path/Path.js @@ -198,12 +198,12 @@ var Path = new Class({ * @method Phaser.Curves.Path#cubicBezierTo * @since 3.0.0 * - * @param {(number|Phaser.Math.Vector2)} x - The x coordinate of the end point. Or, if a Vec2, the p1 value. - * @param {(number|Phaser.Math.Vector2)} y - The y coordinate of the end point. Or, if a Vec2, the p2 value. - * @param {(number|Phaser.Math.Vector2)} control1X - The x coordinate of the first control point. Or, if a Vec2, the p3 value. - * @param {number} [control1Y] - The y coordinate of the first control point. Not used if vec2s are provided as the first 3 arguments. - * @param {number} [control2X] - The x coordinate of the second control point. Not used if vec2s are provided as the first 3 arguments. - * @param {number} [control2Y] - The y coordinate of the second control point. Not used if vec2s are provided as the first 3 arguments. + * @param {(number|Phaser.Math.Vector2)} x - The x coordinate of the end point. Or, if a Vector2, the p1 value. + * @param {(number|Phaser.Math.Vector2)} y - The y coordinate of the end point. Or, if a Vector2, the p2 value. + * @param {(number|Phaser.Math.Vector2)} control1X - The x coordinate of the first control point. Or, if a Vector2, the p3 value. + * @param {number} [control1Y] - The y coordinate of the first control point. Not used if Vector2s are provided as the first 3 arguments. + * @param {number} [control2X] - The x coordinate of the second control point. Not used if Vector2s are provided as the first 3 arguments. + * @param {number} [control2Y] - The y coordinate of the second control point. Not used if Vector2s are provided as the first 3 arguments. * * @return {Phaser.Curves.Path} This Path object. */ @@ -214,7 +214,7 @@ var Path = new Class({ var p2; var p3; - // Assume they're all vec2s + // Assume they're all Vector2s if (x instanceof Vector2) { p1 = x; @@ -252,7 +252,7 @@ var Path = new Class({ var p1; var p2; - // Assume they're all vec2s + // Assume they're all Vector2s if (x instanceof Vector2) { p1 = x; diff --git a/src/gameobjects/shape/polygon/Polygon.js b/src/gameobjects/shape/polygon/Polygon.js index 7e9d538b7..7c63b8494 100644 --- a/src/gameobjects/shape/polygon/Polygon.js +++ b/src/gameobjects/shape/polygon/Polygon.js @@ -25,7 +25,7 @@ var Smooth = require('../../../geom/polygon/Smooth'); * internal Polygon geometry object. The points can be set from a variety of formats: * * - A string containing paired values separated by a single space: `'40 0 40 20 100 20 100 80 40 80 40 100 0 50'` - * - An array of Point or Vector2 objects: `[new Phaser.Math.Vec2(x1, y1), ...]` + * - An array of Point or Vector2 objects: `[new Phaser.Math.Vector2(x1, y1), ...]` * - An array of objects with public x/y properties: `[obj1, obj2, ...]` * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]` * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]` diff --git a/src/gameobjects/shape/polygon/PolygonFactory.js b/src/gameobjects/shape/polygon/PolygonFactory.js index dd79c8a86..451632a84 100644 --- a/src/gameobjects/shape/polygon/PolygonFactory.js +++ b/src/gameobjects/shape/polygon/PolygonFactory.js @@ -22,7 +22,7 @@ var Polygon = require('./Polygon'); * The Polygon Shape is created by providing a list of points, which are then used to create an * internal Polygon geometry object. The points can be set from a variety of formats: * - * - An array of Point or Vector2 objects: `[new Phaser.Math.Vec2(x1, y1), ...]` + * - An array of Point or Vector2 objects: `[new Phaser.Math.Vector2(x1, y1), ...]` * - An array of objects with public x/y properties: `[obj1, obj2, ...]` * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]` * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]` diff --git a/src/math/ToXY.js b/src/math/ToXY.js index 5328335fa..d22205527 100644 --- a/src/math/ToXY.js +++ b/src/math/ToXY.js @@ -7,11 +7,11 @@ var Vector2 = require('./Vector2'); /** - * Returns a Vec2 containing the x and y position of the given index in a `width` x `height` sized grid. + * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid. * * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2. * - * If the given index is out of range an empty Vec2 is returned. + * If the given index is out of range an empty Vector2 is returned. * * @function Phaser.Math.ToXY * @since 3.19.0 diff --git a/src/physics/arcade/Body.js b/src/physics/arcade/Body.js index 5ba4be9b2..c39597f5d 100644 --- a/src/physics/arcade/Body.js +++ b/src/physics/arcade/Body.js @@ -1634,7 +1634,7 @@ var Body = new Class({ /** * Sets whether this Body collides with the world boundary. * - * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Vec2 first. + * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Phaser.Math.Vector2 first. * * @method Phaser.Physics.Arcade.Body#setCollideWorldBounds * @since 3.0.0 diff --git a/src/physics/arcade/components/Bounce.js b/src/physics/arcade/components/Bounce.js index b1d94b526..904c8a1bd 100644 --- a/src/physics/arcade/components/Bounce.js +++ b/src/physics/arcade/components/Bounce.js @@ -70,7 +70,7 @@ var Bounce = { /** * Sets whether this Body collides with the world boundary. * - * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Vec2 first. + * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Phaser.Math.Vector2 first. * * @method Phaser.Physics.Arcade.Components.Bounce#setCollideWorldBounds * @since 3.0.0 diff --git a/src/physics/matter-js/BodyBounds.js b/src/physics/matter-js/BodyBounds.js index f5e4dd71a..36e8722f6 100644 --- a/src/physics/matter-js/BodyBounds.js +++ b/src/physics/matter-js/BodyBounds.js @@ -5,7 +5,7 @@ */ var Class = require('../../utils/Class'); -var Vec2 = require('../../math/Vector2'); +var Vector2 = require('../../math/Vector2'); /** * @classdesc @@ -34,22 +34,22 @@ var BodyBounds = new Class({ function BodyBounds () { /** - * A vec2 that stores the temporary bounds center value during calculations by methods in this class. + * A Vector2 that stores the temporary bounds center value during calculations by methods in this class. * * @name Phaser.Physics.Matter.BodyBounds#boundsCenter * @type {Phaser.Math.Vector2} * @since 3.22.0 */ - this.boundsCenter = new Vec2(); + this.boundsCenter = new Vector2(); /** - * A vec2 that stores the temporary center diff values during calculations by methods in this class. + * A Vector2 that stores the temporary center diff values during calculations by methods in this class. * * @name Phaser.Physics.Matter.BodyBounds#centerDiff * @type {Phaser.Math.Vector2} * @since 3.22.0 */ - this.centerDiff = new Vec2(); + this.centerDiff = new Vector2(); }, /** @@ -115,7 +115,7 @@ var BodyBounds = new Class({ var center = this.boundsCenter; var diff = this.centerDiff; - return new Vec2( + return new Vector2( x + center.x + diff.x, y + center.y + diff.y ); @@ -149,7 +149,7 @@ var BodyBounds = new Class({ var center = this.boundsCenter; var diff = this.centerDiff; - return new Vec2( + return new Vector2( x + diff.x, y + center.y + diff.y ); @@ -183,7 +183,7 @@ var BodyBounds = new Class({ var center = this.boundsCenter; var diff = this.centerDiff; - return new Vec2( + return new Vector2( x - (center.x - diff.x), y + center.y + diff.y ); @@ -217,7 +217,7 @@ var BodyBounds = new Class({ var center = this.boundsCenter; var diff = this.centerDiff; - return new Vec2( + return new Vector2( x + center.x + diff.x, y + diff.y ); @@ -250,7 +250,7 @@ var BodyBounds = new Class({ { var diff = this.centerDiff; - return new Vec2( + return new Vector2( x + diff.x, y + diff.y ); @@ -284,7 +284,7 @@ var BodyBounds = new Class({ var center = this.boundsCenter; var diff = this.centerDiff; - return new Vec2( + return new Vector2( x - (center.x - diff.x), y + diff.y ); @@ -318,7 +318,7 @@ var BodyBounds = new Class({ var center = this.boundsCenter; var diff = this.centerDiff; - return new Vec2( + return new Vector2( x + center.x + diff.x, y - (center.y - diff.y) ); @@ -352,7 +352,7 @@ var BodyBounds = new Class({ var center = this.boundsCenter; var diff = this.centerDiff; - return new Vec2( + return new Vector2( x + diff.x, y - (center.y - diff.y) ); @@ -386,7 +386,7 @@ var BodyBounds = new Class({ var center = this.boundsCenter; var diff = this.centerDiff; - return new Vec2( + return new Vector2( x - (center.x - diff.x), y - (center.y - diff.y) ); From 708b16d570f864718a37421e1394237fd2c6cd09 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 11 Jan 2020 15:25:03 +0000 Subject: [PATCH 125/189] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 855446e90..ce2c42017 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -217,7 +217,7 @@ My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs: -@fselcukcan Bambosh @louisth @hexus @javigaralva @samme @BeLi4L @jcyuan @javigaralva @T-Grave +@fselcukcan Bambosh @louisth @hexus @javigaralva @samme @BeLi4L @jcyuan @javigaralva @T-Grave @bramp ## Version 3.21.0 - Senku - 22nd November 2019 From 439d50ee9f220a6846215963f9f5f66a038295c5 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 11 Jan 2020 16:18:56 +0000 Subject: [PATCH 126/189] Update Polygon.js --- src/geom/polygon/Polygon.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/geom/polygon/Polygon.js b/src/geom/polygon/Polygon.js index 2d04e1d9f..0082a7aca 100644 --- a/src/geom/polygon/Polygon.js +++ b/src/geom/polygon/Polygon.js @@ -13,7 +13,6 @@ var GEOM_CONST = require('../const'); * @classdesc * A Polygon object * - * The polygon is a closed shape consists of a series of connected straight lines defined by list of ordered points. * Several formats are supported to define the list of points, check the setTo method for details. * This is a geometry object allowing you to define and inspect the shape. From 3714b490b10e5f5439bc09e60251339d5477a698 Mon Sep 17 00:00:00 2001 From: Edwin Zaniar Putra Date: Sun, 12 Jan 2020 22:06:41 +0700 Subject: [PATCH 127/189] Make Phaser.Display.Align.In.QuickSet accepts LEFT_BOTTOM, LEFT_TOP, RIGHT_BOTTOM, and RIGHT_TOP. --- src/display/align/in/QuickSet.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/display/align/in/QuickSet.js b/src/display/align/in/QuickSet.js index cfd31c66b..408539b72 100644 --- a/src/display/align/in/QuickSet.js +++ b/src/display/align/in/QuickSet.js @@ -17,6 +17,10 @@ AlignInMap[ALIGN_CONST.RIGHT_CENTER] = require('./RightCenter'); AlignInMap[ALIGN_CONST.TOP_CENTER] = require('./TopCenter'); AlignInMap[ALIGN_CONST.TOP_LEFT] = require('./TopLeft'); AlignInMap[ALIGN_CONST.TOP_RIGHT] = require('./TopRight'); +AlignInMap[ALIGN_CONST.LEFT_BOTTOM] = AlignInMap[ALIGN_CONST.BOTTOM_LEFT]; +AlignInMap[ALIGN_CONST.LEFT_TOP] = AlignInMap[ALIGN_CONST.TOP_LEFT]; +AlignInMap[ALIGN_CONST.RIGHT_BOTTOM] = AlignInMap[ALIGN_CONST.BOTTOM_RIGHT]; +AlignInMap[ALIGN_CONST.RIGHT_TOP] = AlignInMap[ALIGN_CONST.TOP_RIGHT]; /** * Takes given Game Object and aligns it so that it is positioned relative to the other. From 271e4e39432b95161adc51edb9f647ee38b76805 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 13 Jan 2020 11:33:21 +0000 Subject: [PATCH 128/189] Use FuzzyEquals for safety --- src/physics/matter-js/components/SetBody.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/physics/matter-js/components/SetBody.js b/src/physics/matter-js/components/SetBody.js index cdcdb3232..e2a2b6ed9 100644 --- a/src/physics/matter-js/components/SetBody.js +++ b/src/physics/matter-js/components/SetBody.js @@ -6,6 +6,7 @@ var Bodies = require('../lib/factory/Bodies'); var Body = require('../lib/body/Body'); +var FuzzyEquals = require('../../../math/fuzzy/Equal'); var GetFastValue = require('../../../utils/object/GetFastValue'); var PhysicsEditorParser = require('../PhysicsEditorParser'); var PhysicsJSONParser = require('../PhysicsJSONParser'); @@ -155,7 +156,7 @@ var SetBody = { var comx = body.centerOfMass.x; var comy = body.centerOfMass.y; - if (comx === 0.5 && comy === 0.5) + if (FuzzyEquals(comx, 0.5) && FuzzyEquals(comy, 0.5)) { this.setOrigin(rx + 0.5, ry + 0.5); } From 5da15fc18995cac82db62c12409465503001caa9 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 13 Jan 2020 11:33:25 +0000 Subject: [PATCH 129/189] Update CHANGELOG.md --- CHANGELOG.md | 65 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce2c42017..bb0a3d67f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,12 @@ # Change Log -## Version 3.22 - Kohaku - in development +## Version 3.22 - Kohaku - January 13th 2020 -### Matter Physics Updates +### Matter Physics + +All of the following are specific to the Matter Physics implementation used by Phaser: + +#### Matter Physics New Features * Matter Physics now has 100% JSDoc coverage! Woohoo :) * `MatterDebugConfig` is a new configuration object that contains all of the following new Matter debug settings: @@ -52,9 +56,6 @@ * `anchorSize`- The size of the circles drawn as the constraint anchors. * `showConvexHulls`- When rendering polygon bodies, render the convex hull as well? * `hullColor`- The color value of hulls when `showConvexHulls` is set. -* The `debug` property in the Matter World Config is now a `MatterDebugConfig` option instead of a boolean. However, if a boolean is given, it will use the default debug config values. -* The following `MatterWorldConfig` options have now been removed: `debugShowBody`, `debugShowStaticBody`, `debugBodyColor`, `debugBodyFillColor`, `debugStaticBodyColor`, `debugShowJoint`, `debugJointColor`, `debugWireframes`, `debugShowInternalEdges`, `debugShowConvexHulls`, `debugConvexHullColor` and `debugShowSleeping`. These can all be set via the new `MatterDebugConfig` object instead. -* The object `World.defaults` has been removed. Defaults are now access via `World.debugDefaults`. * `World.renderBody` is a new method that will render a single Matter Body to the given Graphics object. This is used internally during debug rendering but is also public. This allows you to control which bodies are rendered and to which Graphics object, should you wish to use them in-game and not just during debugging. * `World.renderConstraint` is a new method that will render a single Matter Constraint, such as a pin or a spring, to the given Graphics object. This is used internally during debug rendering but is also public. This allows you to control which constraints are rendered and to which Graphics object, should you wish to use them in-game and not just during debugging. * `World.renderConvexHull` is a new method that will render the convex hull of a single Matter Body, to the given Graphics object. This is used internally during debug rendering but is also public. This allows you to control which hulls are rendered and to which Graphics object, should you wish to use them in-game and not just during debugging. @@ -64,12 +65,6 @@ * `World.renderBodyVelocity` is a new method that will render a velocity line for all the given bodies to the given graphics instance. * `World.renderSeparations` is a new method that will render the separations in the current pairs list to the given graphics instance. * `World.renderCollisions` is a new method that will render the collision points and normals in the current pairs list to the given graphics instance. -* `World.renderBodies` has been rewritten to cache commonly-used values and avoid a situation when a single body would be rendered twice. -* The private method `World.renderConvexHulls` has been removed as it's no longer used internally. -* The private method `World.renderWireframes` has been removed as it's no longer used internally. -* Due to the rewrite of the debug rendering, it is now possible to render _just_ constraints, where-as before this was only possible if bodies were being rendered as well. Fix #4880 (thanks @roberto257) -* The method `World.fromPath` has been removed. This was never used internally and you can get the same results by calling `Vertices.fromPath`. -* The `World.setBounds` argument `thickness` now defaults to 64, not 128, to keep it matching the Matter World Config. * `World.getAllBodies` is a new method that will return all bodies in the Matter World. * `World.getAllConstraints` is a new method that will return all constraints in the Matter World. * `World.getAllComposites` is a new method that will return all composites in the Matter World. @@ -92,8 +87,6 @@ * `AFTER_ADD` is a new Event dispatched by `Matter.World` when a Body or Constraint has been added to the World. * `BEFORE_REMOVE` is a new Event dispatched by `Matter.World` when a Body or Constraint is about to be removed from the World. * `AFTER_REMOVE` is a new Event dispatched by `Matter.World` when a Body or Constraint has been removed from the World. -* The `Body.render.fillStyle` property that existed on the Matter Body object has been removed and replaced with `fillColor`. -* The `Body.render.strokeStyle` property that existed on the Matter Body object has been removed and replaced with `lineColor`. * `Body.render.lineOpacity` is a new property on the Matter Body object that allows for custom debug rendering. * `Body.render.lineThickness` is a new property on the Matter Body object that allows for custom debug rendering. * `Body.render.fillOpacity` is a new property on the Matter Body object that allows for custom debug rendering. @@ -116,21 +109,11 @@ * `MatterPhysics.setCollidesWith` is a new method that will set the collision filter mask to the value given, on all of the bodies given. This allows you to easily set the filter mask on bodies that don't have a Phaser Matter Collision component. * `Matter.Body.centerOfMass` is a new vec2 property added to the Matter Body object that retains the center of mass coordinates when the Body is first created, or has parts added to it. These are float values, derived from the body position and bounds. * `Matter.Body.centerOffset` is a new vec2 property added to the Matter Body object that retains the center offset coordinates when the Body is first created, or has parts added to it. These are pixel values. -* `Matter.Body.render.sprite.xOffset` and `yOffset` are no longer set to anything when a Body is created. They are left as zero, or you can override them in the Body config, in which case the value is added to the sprite origin offset during a call to `setExistingBody`. -* The `Matter.Mass.centerOfMass` component property now returns the pre-calculated Body `centerOfMass` property, which is much more accurate than the previous bounds offset value. -* `Matter.setExistingBody`, which is called interally whenever a Body is set on a Game Object, now uses the new `centerOffset` values to ensure that the texture frame is correctly centered based on the center of mass, not the Body bounds, allowing for much more accurate body to texture mapping with complex multi-part compound bodies. -* The `Matter.PhysicsEditorParser` has been updated so it no longer needs to set the render offsets, and instead uses the center of mass values. -* If the `Matter.Body` config doesn't contain a `position` property, it will now default to using `Vertices.centre(body.vertices)` as the position. In most cases, this is what you need, so it saves having to pass it in the config object. * `Constraint.pointAWorld` is a new method added to Matter that returns the world-space position of `constraint.pointA`, accounting for `constraint.bodyA`. * `Constraint.pointBWorld` is a new method added to Matter that returns the world-space position of `constraint.pointB`, accounting for `constraint.bodyB`. * `Body.setCentre` is a new method added to Matter that allows you to set the center of mass of a Body (please note the English spelling of this function.) -* Bumped Matter Plugin versions to avoid console logs from Common.info and Common.warn. * `Body.scale` is a new read-only vector that holds the most recent scale values as passed to `Body.scale`. * `Matter.Bodies.flagCoincidentParts` is a new function that will flags all internal edges (coincident parts) on an array of body parts. This was previously part of the `fromVertices` function, but has been made external for outside use. -* `PhysicsEditorParser.parseVertices` now uses `Bodies.flagCoincidentParts` to avoid duplicating code. -* `MatterGameObject` has a new optional boolean parameter `addToWorld` which lets you control if the Body should be added to the world or not. Useful for toggling off should you be merging pre-existing bodies with Game Objects. -* The `Matter.SetBody.setExistingBody` function, which all Matter Game Objects have, has a new parameter `addToWorld` which allows you to control when the body is added to the Matter world should you not require it immediately. It will also only add the body to the world if it doesn't already exist within it, or any of its composites. -* `PointerConstraint` has been recoded so that when pressed down, it only polls the World for a body hit test during the next game update. This stops it coming out of sync with the state of the world. Use of the constraint remains the same as before. * `Matter.getMatterBodies` is a new function that will return an array of Matter JS Bodies from the given input array, which can be Matter Game Objects, or any class that extends them. * `Matter.World.has` is a new method that will take a Matter Body, or Game Object, and search the world for it. If found, it will return `true`. * Matter now has the option to use the Runner that it ships with. The Matter Runner operates in two modes: fixed and variable. In the fixed mode, the Matter Engine updates at a fixed delta value every frame (which is what Phaser has used since the first version). In variable mode, the delta will be smoothed and capped each frame to keep the simulation constant, but at the cost of determininism. You can configure the runner by setting the `runner` property in the Matter Config object, both of which are fully covered with JSDocs. As of 3.22 the runner is now used by default in variable (non-fixed) mode. If you wish to return to the previous behavior, set `runner: { isFixed: true }`. @@ -150,8 +133,6 @@ * `MatterPhysics.setAngularVelocity` is a new method that will set the angular velocity of the given physics bodies. This can be used on all Matter bodies, not just those created via the factory. * `MatterPhysics.applyForce` is a new method that applies a force to a body, at the bodies current position, including resulting torque. This can be used on all Matter bodies, not just those created via the factory. * `MatterPhysics.applyForceFromPosition` is a new method that applies a force to a body from the given world position, including resulting torque. If no angle is given, the current body angle is used. This can be used on all Matter bodies, not just those created via the factory. -* You can now set `gravity: false` in your Matter Config and it will reset gravity from the defaults to zero. -* The internal Matter `Composite.setModified` function will now emit a `compositeModified` event, which the Matter World listens for, if debug draw is enabled, so it can update the composite children render styles. * `MatterPhysics.fromSVG` is a new method that allows you to create a Body from the given SVG path data. * The `Matter.Factory.velocity` method has been removed. Please now use `MatterPhysics.setVelocity` instead. * The `Matter.Factory.angularVelocity` method has been removed. Please now use `MatterPhysics.setAngularVelocity` instead. @@ -168,15 +149,44 @@ * `Phaser.Types.Physics.Matter.MatterBody` is a new type def that contains all of the valid Matter Body objects. This is now used through-out the JSDocs to aid in code-completion. * `Matter.BodyBounds` is a new class that contains methods to help you extract world coordinates from various points around the bounds of a Matter Body. Because Matter bodies are positioned based on their center of mass, and not a dimension based center, you often need to get the bounds coordinates in order to properly align them in the world. You can access this new class via `this.matter.bodyBounds`. * The method signature for `Matter.PhysicsEditorParser.parseBody` has changed. It now takes `(x, y, config, options)` and no longer has `width` and `height` parameters. Please see the updated documentation for more details if you were calling this method directly. -* `Matter.PhysicsEditorParser.parseBody` can now accept a MatterBodyConfig file as a 4th parameter. This allows you to set Body properties when the body is created, overriding whatever values may have been set in the PhysicsEditor JSON. * `MatterPhysics.fromPhysicsEditor` is a new method that allows you to create a Matter Body based on the given PhysicsEditor shape data. Previously, you could only using PhysicsEditor data with a Matter Game Object, but now you can create a body directly using it. -* `Matter.PhysicsEditorParser` had a bug where it would allow fixtures with non-clockwise sorted vertices through, which would break pointer constraint interaction with these bodies. The parser now sorts the vertices properly. Fix #4261 (thanks @Sanchez3) * `Matter.PhysicsJSONParser` is a new parser that will create Matter bodies from JSON physics data files. Currently onto the Phaser Physics Tracer app exports in this format, but details are published in the JSDocs, so any app can do so. * `Matter.Factory.fromJSON` is a new method that will create a body from a JSON physics data file. * The `SetBody` Matter component can now automatically use shapes created in the Phaser Physics Tracer App in the JSON data format. * `Matter.Components.Sleep.setToSleep` is a new method available on any Matter Game Object that will send the body to sleep, if Engine sleeping has been enabled. * `Matter.Components.Sleep.setAwake` is a new method available on any Matter Game Object that will awake a body from sleep, if Engine sleeping has been enabled. +#### Matter Physics Updates + +* The `debug` property in the Matter World Config is now a `MatterDebugConfig` option instead of a boolean. However, if a boolean is given, it will use the default debug config values. +* The following `MatterWorldConfig` options have now been removed: `debugShowBody`, `debugShowStaticBody`, `debugBodyColor`, `debugBodyFillColor`, `debugStaticBodyColor`, `debugShowJoint`, `debugJointColor`, `debugWireframes`, `debugShowInternalEdges`, `debugShowConvexHulls`, `debugConvexHullColor` and `debugShowSleeping`. These can all be set via the new `MatterDebugConfig` object instead. +* The object `World.defaults` has been removed. Defaults are now access via `World.debugDefaults`. +* `World.renderBodies` has been rewritten to cache commonly-used values and avoid a situation when a single body would be rendered twice. +* The private method `World.renderConvexHulls` has been removed as it's no longer used internally. +* The private method `World.renderWireframes` has been removed as it's no longer used internally. +* The method `World.fromPath` has been removed. This was never used internally and you can get the same results by calling `Vertices.fromPath`. +* The `World.setBounds` argument `thickness` now defaults to 64, not 128, to keep it matching the Matter World Config. +* The `Body.render.fillStyle` property that existed on the Matter Body object has been removed and replaced with `fillColor`. +* The `Body.render.strokeStyle` property that existed on the Matter Body object has been removed and replaced with `lineColor`. +* `Matter.Body.render.sprite.xOffset` and `yOffset` are no longer set to anything when a Body is created. They are left as zero, or you can override them in the Body config, in which case the value is added to the sprite origin offset during a call to `setExistingBody`. +* The `Matter.Mass.centerOfMass` component property now returns the pre-calculated Body `centerOfMass` property, which is much more accurate than the previous bounds offset value. +* `Matter.setExistingBody`, which is called interally whenever a Body is set on a Game Object, now uses the new `centerOffset` values to ensure that the texture frame is correctly centered based on the center of mass, not the Body bounds, allowing for much more accurate body to texture mapping with complex multi-part compound bodies. +* The `Matter.PhysicsEditorParser` has been updated so it no longer needs to set the render offsets, and instead uses the center of mass values. +* If the `Matter.Body` config doesn't contain a `position` property, it will now default to using `Vertices.centre(body.vertices)` as the position. In most cases, this is what you need, so it saves having to pass it in the config object. +* Bumped Matter Plugin versions to avoid console logs from Common.info and Common.warn. +* `PhysicsEditorParser.parseVertices` now uses `Bodies.flagCoincidentParts` to avoid duplicating code. +* `MatterGameObject` has a new optional boolean constructor parameter `addToWorld` which lets you control if the Body should be added to the world or not. Useful for toggling off should you be merging pre-existing bodies with Game Objects. +* The `Matter.SetBody.setExistingBody` function, which all Matter Game Objects have, has a new parameter `addToWorld` which allows you to control when the body is added to the Matter world should you not require it immediately. It will also only add the body to the world if it doesn't already exist within it, or any of its composites. +* `PointerConstraint` has been recoded so that when pressed down, it only polls the World for a body hit test during the next game update. This stops it coming out of sync with the state of the world. Use of the constraint remains the same as before. +* You can now set `gravity: false` in your Matter Config and it will reset gravity from the defaults to zero. +* The internal Matter `Composite.setModified` function will now emit a `compositeModified` event, which the Matter World listens for, if debug draw is enabled, so it can update the composite children render styles. +* `Matter.PhysicsEditorParser.parseBody` can now accept a MatterBodyConfig file as a 4th parameter. This allows you to set Body properties when the body is created, overriding whatever values may have been set in the PhysicsEditor JSON. + +#### Matter Physics Bug Fixes + +* Due to the rewrite of the debug rendering, it is now possible to render _just_ constraints, where-as before this was only possible if bodies were being rendered as well. Fix #4880 (thanks @roberto257) +* `Matter.PhysicsEditorParser` had a bug where it would allow fixtures with non-clockwise sorted vertices through, which would break pointer constraint interaction with these bodies. The parser now sorts the vertices properly. Fix #4261 (thanks @Sanchez3) + ### New Features * `TimeStep.smoothStep` is a new boolean property that controls if any delta smoothing takes place during the game step. Delta smoothing has been enabled in Phaser since the first version and helps avoid delta spikes and dips, especially after loss of focus. However, you can now easily toggle if this happens via this property and the corresponding `FPSConfig` property. @@ -219,7 +229,6 @@ My thanks to the following for helping with the Phaser 3 Examples, Docs and Type @fselcukcan Bambosh @louisth @hexus @javigaralva @samme @BeLi4L @jcyuan @javigaralva @T-Grave @bramp - ## Version 3.21.0 - Senku - 22nd November 2019 ### New Features From 22b5f95254a2d02047ffb8072dd63e3ee426f0c7 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 13 Jan 2020 11:39:01 +0000 Subject: [PATCH 130/189] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb0a3d67f..9ea91298c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -214,6 +214,7 @@ All of the following are specific to the Matter Physics implementation used by P * The `Graphics` Game Object now uses the AlphaSingle component, allowing you to uniformly set the alpha of the element, rather than a quad alpha, which never worked for these objects. * `TweenData` has a new property called `previous` which holds the eased property value prior to the update. * The `TWEEN_UPDATE` event now sends two new parameters to the handler: `current` and `previous` which contain the current and previous property values. +* During `collideSpriteVsGroup` checks it will now skip bodies that are disabled to save doing a `contains` test (thanks @samme) ### Bug Fixes From fdbd5a4f6d08a1ca7989d236ef378db9e1fd2620 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 13 Jan 2020 12:20:01 +0000 Subject: [PATCH 131/189] The `ScaleManager.destroy` method wasn't being called when the Game `DESTROY` event was dispatched, causing minor gc to build up. The destroy method will now be called properly on game destruction. Fix #4944 --- src/scale/ScaleManager.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/scale/ScaleManager.js b/src/scale/ScaleManager.js index 6105e5690..e4c4797e5 100644 --- a/src/scale/ScaleManager.js +++ b/src/scale/ScaleManager.js @@ -464,6 +464,7 @@ var ScaleManager = new Class({ } game.events.on(GameEvents.PRE_STEP, this.step, this); + game.events.once(GameEvents.DESTROY, this.destroy, this); this.startListeners(); }, From 4090c3e723c9c72c01f006ff73c0ad0a4088f396 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 13 Jan 2020 12:20:06 +0000 Subject: [PATCH 132/189] Update CHANGELOG.md --- CHANGELOG.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ea91298c..5035e5732 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -198,6 +198,7 @@ All of the following are specific to the Matter Physics implementation used by P * `ParticleEmitter.remove` is a new method that will remove the Emitter from its Emitter Manager (thanks @samme) * `ParticleEmitterManager.removeEmitter` is a new method that will remove the given emitter from the manager, if the emitter belongs to it (thanks @samme) * `AlphaSingle` is a new Game Object Component that allows a Game Object to set its alpha values, but only as a single uniform value, not on a per-quad basis. +* `Actions.AlignTo` (in combination with the new `Display.Align.To.QuickSet` function) allows you to align an array of Game Objects so they sit next to each other, one at a time. The first item isn't moved, the second is moved to sit next to the first, and so on. You can align them using any of the alignment constants (thanks @samme) ### Updates @@ -215,6 +216,7 @@ All of the following are specific to the Matter Physics implementation used by P * `TweenData` has a new property called `previous` which holds the eased property value prior to the update. * The `TWEEN_UPDATE` event now sends two new parameters to the handler: `current` and `previous` which contain the current and previous property values. * During `collideSpriteVsGroup` checks it will now skip bodies that are disabled to save doing a `contains` test (thanks @samme) +* `Display.Align.In.QuickSet` now accepts `LEFT_BOTTOM` as `BOTTOM_LEFT`, `LEFT_TOP` as `TOP_LEFT`, `RIGHT_BOTTOM` as `BOTTOM_RIGHT` and `RIGHT_TOP` as `TOP_RIGHT`. Fix #4927 (thanks @zaniar) ### Bug Fixes @@ -223,12 +225,17 @@ All of the following are specific to the Matter Physics implementation used by P * When `Game.destroy` is running, Scenes are now destroyed _before_ plugins, avoiding bugs when closing down plugins and deleting Render Textures. Fix #4849 #4876 (thanks @rexrainbow @siyuanqiao) * The `Mesh` and `Quad` Game Objects have had the `GetBounds` component removed as it cannot operate on a Mesh as they don't have origins. Fix #4902 (thanks @samme) * Setting `lineSpacing` in the Text Game Object style config would set the value but not apply it to the Text, leaving you to call `updateText` yourself. If set, it's now applied on instantiation. Fix #4901 (thanks @FantaZZ) +* External calls to the Fullscreen API using `element.requestFullscreen()` would be blocked by the Scale Manager. The Scale Manager will no longer call `stopFullScreen` should it be triggered outside of Phaser (thanks @AdamXA) +* The `Tilemaps.Tile.tint` property wasn't working correctly as it expected the colors in the wrong order (BGR instead of RGB). It will now expect them in the correct RGB order (thanks @Aedalus @plissken2013es) +* The `ScaleManager.destroy` method wasn't being called when the Game `DESTROY` event was dispatched, causing minor gc to build up. The destroy method will now be called properly on game destruction. Fix #4944 (thanks @sunshineuoow) ### Examples, Documentation and TypeScript My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs: -@fselcukcan Bambosh @louisth @hexus @javigaralva @samme @BeLi4L @jcyuan @javigaralva @T-Grave @bramp +@fselcukcan Bambosh @louisth @hexus @javigaralva @samme @BeLi4L @jcyuan @javigaralva @T-Grave @bramp @Chnapy + +The Spine Plugin now has new TypeScript defs in the `types` folder thanks to @supertommy ## Version 3.21.0 - Senku - 22nd November 2019 From c8d5e19a13c83388eb459a15b61c531ed59765b3 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 13 Jan 2020 12:20:12 +0000 Subject: [PATCH 133/189] Update package-lock.json --- package-lock.json | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index d941eb502..50b01a25f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1805,7 +1805,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -1826,12 +1827,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1846,17 +1849,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -1973,7 +1979,8 @@ "inherits": { "version": "2.0.4", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -1985,6 +1992,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -1999,6 +2007,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -2006,12 +2015,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.9.0", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -2030,6 +2041,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -2119,7 +2131,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -2131,6 +2144,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -2216,7 +2230,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -2252,6 +2267,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -2271,6 +2287,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -2314,12 +2331,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, From b63dd557e143f145932db9715728f3760834880a Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 13 Jan 2020 12:20:17 +0000 Subject: [PATCH 134/189] Update Parser.ts --- scripts/tsgen/src/Parser.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/scripts/tsgen/src/Parser.ts b/scripts/tsgen/src/Parser.ts index d05d962de..5b1489b24 100644 --- a/scripts/tsgen/src/Parser.ts +++ b/scripts/tsgen/src/Parser.ts @@ -36,15 +36,12 @@ export class Parser { } emit() { + + const matter = '/// '; + let ignored = []; let result = this.topLevel.reduce((out: string, obj: dom.TopLevelDeclaration) => { - // TODO: remove once stable - // if (obj.kind === 'property') { - // ignored.push((obj).name); - // return out; - // } - ////////////////////////// - return out + dom.emit(obj); + return matter + '\n\n' + out + dom.emit(obj); }, ''); if (ignored.length > 0) From fce658aea2e30d8e558106b27b575e62ec81e96a Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 13 Jan 2020 12:29:57 +0000 Subject: [PATCH 135/189] Fix #4825 --- src/data/events/CHANGE_DATA_KEY_EVENT.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/data/events/CHANGE_DATA_KEY_EVENT.js b/src/data/events/CHANGE_DATA_KEY_EVENT.js index 33394b58e..54eab5ab8 100644 --- a/src/data/events/CHANGE_DATA_KEY_EVENT.js +++ b/src/data/events/CHANGE_DATA_KEY_EVENT.js @@ -18,7 +18,6 @@ * @since 3.16.1 * * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event. - * @param {string} key - The unique key of the data item within the Data Manager. * @param {any} value - The item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance. * @param {any} previousValue - The previous item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance. */ From f36a4eef3e0f40287f8931e372ac915c876abe79 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 13 Jan 2020 12:30:00 +0000 Subject: [PATCH 136/189] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5035e5732..2d8ca1e51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -233,7 +233,7 @@ All of the following are specific to the Matter Physics implementation used by P My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs: -@fselcukcan Bambosh @louisth @hexus @javigaralva @samme @BeLi4L @jcyuan @javigaralva @T-Grave @bramp @Chnapy +@fselcukcan Bambosh @louisth @hexus @javigaralva @samme @BeLi4L @jcyuan @javigaralva @T-Grave @bramp @Chnapy @dranitski The Spine Plugin now has new TypeScript defs in the `types` folder thanks to @supertommy From 19284809135b87fc58de443a42c9fdcddc632f53 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 13 Jan 2020 12:35:33 +0000 Subject: [PATCH 137/189] Fixed JSDocs --- src/gameobjects/components/AlphaSingle.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gameobjects/components/AlphaSingle.js b/src/gameobjects/components/AlphaSingle.js index 7c45928ce..d792a6ac4 100644 --- a/src/gameobjects/components/AlphaSingle.js +++ b/src/gameobjects/components/AlphaSingle.js @@ -22,7 +22,7 @@ var AlphaSingle = { /** * Private internal value. Holds the global alpha value. * - * @name Phaser.GameObjects.Components.Alpha#_alpha + * @name Phaser.GameObjects.Components.AlphaSingle#_alpha * @type {number} * @private * @default 1 @@ -35,7 +35,7 @@ var AlphaSingle = { * * Immediately sets the alpha levels back to 1 (fully opaque). * - * @method Phaser.GameObjects.Components.Alpha#clearAlpha + * @method Phaser.GameObjects.Components.AlphaSingle#clearAlpha * @since 3.0.0 * * @return {this} This Game Object instance. @@ -49,7 +49,7 @@ var AlphaSingle = { * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. * - * @method Phaser.GameObjects.Components.Alpha#setAlpha + * @method Phaser.GameObjects.Components.AlphaSingle#setAlpha * @since 3.0.0 * * @param {number} [value=1] - The alpha value applied across the whole Game Object. @@ -70,7 +70,7 @@ var AlphaSingle = { * * This is a global value, impacting the entire Game Object, not just a region of it. * - * @name Phaser.GameObjects.Components.Alpha#alpha + * @name Phaser.GameObjects.Components.AlphaSingle#alpha * @type {number} * @since 3.0.0 */ From 9c0b77db924e61534cafa0e9c6a3930fd661b9f0 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 13 Jan 2020 13:28:24 +0000 Subject: [PATCH 138/189] Fixed JSDocs --- src/physics/matter-js/typedefs/MatterBody.js | 2 +- src/physics/matter-js/typedefs/MatterCollisionData.js | 8 ++++---- src/physics/matter-js/typedefs/MatterCollisionPair.js | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/physics/matter-js/typedefs/MatterBody.js b/src/physics/matter-js/typedefs/MatterBody.js index ad630b0dd..58a6af601 100644 --- a/src/physics/matter-js/typedefs/MatterBody.js +++ b/src/physics/matter-js/typedefs/MatterBody.js @@ -1,4 +1,4 @@ /** - * @typedef {(MatterJS.Body|Phaser.Physics.Matter.MatterGameObject|Phaser.Physics.Matter.Image|Phaser.Physics.Matter.Sprite|Phaser.Physics.Matter.TileBody)} Phaser.Types.Physics.Matter.MatterBody + * @typedef {(MatterJS.Body|Phaser.GameObjects.GameObject|Phaser.Physics.Matter.Image|Phaser.Physics.Matter.Sprite|Phaser.Physics.Matter.TileBody)} Phaser.Types.Physics.Matter.MatterBody * @since 3.22.0 */ diff --git a/src/physics/matter-js/typedefs/MatterCollisionData.js b/src/physics/matter-js/typedefs/MatterCollisionData.js index d9d174524..88d5ea880 100644 --- a/src/physics/matter-js/typedefs/MatterCollisionData.js +++ b/src/physics/matter-js/typedefs/MatterCollisionData.js @@ -10,10 +10,10 @@ * @property {number} depth - The depth of the collision on the minimum overlap. * @property {MatterJS.Body} parentA - A reference to the parent of Body A, or to Body A itself if it has no parent. * @property {MatterJS.Body} parentB - A reference to the parent of Body B, or to Body B itself if it has no parent. - * @property {vector} normal - The collision normal, facing away from Body A. - * @property {vector} tangent - The tangent of the collision normal. - * @property {vector} penetration - The penetration distances between the two bodies. - * @property {vector[]} supports - An array of support points, either exactly one or two points. + * @property {MatterJS.Vector} normal - The collision normal, facing away from Body A. + * @property {MatterJS.Vector} tangent - The tangent of the collision normal. + * @property {MatterJS.Vector} penetration - The penetration distances between the two bodies. + * @property {MatterJS.Vector[]} supports - An array of support points, either exactly one or two points. * @property {number} inverseMass - The resulting inverse mass from the collision. * @property {number} friction - The resulting friction from the collision. * @property {number} frictionStatic - The resulting static friction from the collision. diff --git a/src/physics/matter-js/typedefs/MatterCollisionPair.js b/src/physics/matter-js/typedefs/MatterCollisionPair.js index 985ca191a..9a97e4593 100644 --- a/src/physics/matter-js/typedefs/MatterCollisionPair.js +++ b/src/physics/matter-js/typedefs/MatterCollisionPair.js @@ -5,7 +5,7 @@ * @property {string} id - The unique auto-generated collision pair id. A combination of the body A and B IDs. * @property {MatterJS.Body} bodyA - A reference to the first body involved in the collision. * @property {MatterJS.Body} bodyB - A reference to the second body involved in the collision. - * @property {array} activeContacts - An array containing all of the active contacts between bodies A and B. + * @property {MatterJS.Vector[]} activeContacts - An array containing all of the active contacts between bodies A and B. * @property {number} separation - The amount of separation that occured between bodies A and B. * @property {boolean} isActive - Is the collision still active or not? * @property {boolean} confirmedActive - Has Matter determined the collision are being active yet? From 51aa5d019d3d9f9f60f4b0af8d3e85874fee48bf Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 13 Jan 2020 13:28:50 +0000 Subject: [PATCH 139/189] Removed namespace as it conflicts with TypeScript defs --- src/physics/matter-js/index.js | 76 ---------------------------------- 1 file changed, 76 deletions(-) diff --git a/src/physics/matter-js/index.js b/src/physics/matter-js/index.js index ce2af9c40..ddfdc06e4 100644 --- a/src/physics/matter-js/index.js +++ b/src/physics/matter-js/index.js @@ -23,79 +23,3 @@ module.exports = { World: require('./World') }; - -/** - * @namespace MatterJS - */ - -/** - * @classdesc - * The `Matter.Body` module contains methods for creating and manipulating body models. - * A `Matter.Body` is a rigid body that can be simulated by a `Matter.Engine`. - * Factories for commonly used body configurations (such as rectangles, circles and other polygons) can be found in the module `Matter.Bodies`. - * - * @class MatterJS.Body - * @since 3.0.0 - */ - -/** - * @classdesc - * The `Matter.Bodies` module contains factory methods for creating rigid body models - * with commonly used body configurations (such as rectangles, circles and other polygons). - * - * @class MatterJS.Bodies - * @since 3.18.0 - */ - -/** - * @classdesc - * The `Matter.Composite` module contains methods for creating and manipulating composite bodies. - * A composite body is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`, therefore composites form a tree structure. - * It is important to use the functions in this module to modify composites, rather than directly modifying their properties. - * Note that the `Matter.World` object is also a type of `Matter.Composite` and as such all composite methods here can also operate on a `Matter.World`. - * - * @class MatterJS.Composite - * @since 3.0.0 - */ - -/** - * @classdesc - * The `Matter.World` module contains methods for creating and manipulating the world composite. - * A `Matter.World` is a `Matter.Composite` body, which is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`. - * A `Matter.World` has a few additional properties including `gravity` and `bounds`. - * It is important to use the functions in the `Matter.Composite` module to modify the world composite, rather than directly modifying its properties. - * There are also a few methods here that alias those in `Matter.Composite` for easier readability. - * - * @class MatterJS.World - * @extends MatterJS.Composite - * @since 3.0.0 - */ - -/** - * @classdesc - * The `Matter.Constraint` module contains methods for creating and manipulating constraints. - * Constraints are used for specifying that a fixed distance must be maintained between two bodies (or a body and a fixed world-space position). - * The stiffness of constraints can be modified to create springs or elastic. - * - * @class MatterJS.Constraint - * @since 3.0.0 - */ - -/** - * @classdesc - * The `Matter.Engine` module contains methods for creating and manipulating engines. - * An engine is a controller that manages updating the simulation of the world. - * - * @class MatterJS.Engine - * @since 3.0.0 - */ - -/** - * @classdesc - * The `Matter.Vertices` module contains methods for creating and manipulating sets of vertices. - * A set of vertices is an array of `Matter.Vector` with additional indexing properties inserted by `Vertices.create`. - * A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull). - * - * @class MatterJS.Vertices - * @since 3.0.0 - */ From 9ad53daf7255910cbabfe5202ed94c6b741eb5fa Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 13 Jan 2020 13:29:15 +0000 Subject: [PATCH 140/189] Parser now includes Matter defs and AlphaSingle component --- scripts/tsgen/bin/Parser.js | 12 ++++-------- scripts/tsgen/bin/Parser.js.map | 2 +- scripts/tsgen/src/Parser.ts | 12 +++++++----- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/scripts/tsgen/bin/Parser.js b/scripts/tsgen/bin/Parser.js index 28b0ebf07..95029d62e 100644 --- a/scripts/tsgen/bin/Parser.js +++ b/scripts/tsgen/bin/Parser.js @@ -24,15 +24,10 @@ class Parser { } emit() { let ignored = []; - let result = this.topLevel.reduce((out, obj) => { - // TODO: remove once stable - // if (obj.kind === 'property') { - // ignored.push((obj).name); - // return out; - // } - ////////////////////////// + let result = '/// \n\n'; + result = result.concat(this.topLevel.reduce((out, obj) => { return out + dom.emit(obj); - }, ''); + }, '')); if (ignored.length > 0) { console.log('ignored top level properties:'); console.log(ignored); @@ -45,6 +40,7 @@ class Parser { // TODO: Custom temporary rules switch (doclet.longname) { case 'Phaser.GameObjects.Components.Alpha': + case 'Phaser.GameObjects.Components.AlphaSingle': case 'Phaser.GameObjects.Components.Animation': case 'Phaser.GameObjects.Components.BlendMode': case 'Phaser.GameObjects.Components.ComputedSize': diff --git a/scripts/tsgen/bin/Parser.js.map b/scripts/tsgen/bin/Parser.js.map index 558e49eb4..cd9aa0236 100644 --- a/scripts/tsgen/bin/Parser.js.map +++ b/scripts/tsgen/bin/Parser.js.map @@ -1 +1 @@ -{"version":3,"file":"Parser.js","sourceRoot":"","sources":["../src/Parser.ts"],"names":[],"mappings":";;AAAA,+BAA+B;AAE/B,MAAM,YAAY,GAAG,mBAAmB,CAAC;AAEzC,MAAa,MAAM;IAMf,YAAY,IAAW;QAEnB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAClB,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QAErB,qDAAqD;QACrD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAExB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAE1B,yCAAyC;QACzC,yIAAyI;QACzI,kDAAkD;QAClD,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAE9B,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAE1B,oBAAoB;QACpB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QAEjE,qBAAqB;QACrB,MAAM,kBAAkB,GAAG,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACvD,kBAAkB,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC;QACnE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAC3C,CAAC;IAED,IAAI;QACA,IAAI,OAAO,GAAG,EAAE,CAAC;QACjB,IAAI,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAW,EAAE,GAA4B,EAAE,EAAE;YAC5E,2BAA2B;YAC3B,yCAAyC;YACzC,qCAAqC;YACrC,kBAAkB;YAClB,IAAI;YACJ,0BAA0B;YAC1B,OAAO,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC/B,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EACtB;YACI,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;YAC7C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;SACxB;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;IAEO,YAAY,CAAC,IAAW;QAC5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAElC,IAAI,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YAErB,+BAA+B;YAC/B,QAAQ,MAAM,CAAC,QAAQ,EACvB;gBACI,KAAK,qCAAqC,CAAC;gBAC3C,KAAK,yCAAyC,CAAC;gBAC/C,KAAK,yCAAyC,CAAC;gBAC/C,KAAK,4CAA4C,CAAC;gBAClD,KAAK,oCAAoC,CAAC;gBAC1C,KAAK,qCAAqC,CAAC;gBAC3C,KAAK,oCAAoC,CAAC;gBAC1C,KAAK,yCAAyC,CAAC;gBAC/C,KAAK,oCAAoC,CAAC;gBAC1C,KAAK,sCAAsC,CAAC;gBAC5C,KAAK,4CAA4C,CAAC;gBAClD,KAAK,wCAAwC,CAAC;gBAC9C,KAAK,4CAA4C,CAAC;gBAClD,KAAK,oCAAoC,CAAC;gBAC1C,KAAK,uCAAuC,CAAC;gBAC7C,KAAK,2CAA2C,CAAC;gBACjD,KAAK,oCAAoC,CAAC;gBAC1C,KAAK,sCAAsC,CAAC;gBAC5C,KAAK,yCAAyC,CAAC;gBAC/C,KAAK,uCAAuC,CAAC;gBAC7C,KAAK,qDAAqD;oBACtD,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC;oBACtB,MAAM;gBAEV,+BAA+B;gBAC/B,KAAK,mBAAmB,CAAC;gBACzB,KAAK,mBAAmB,CAAC;gBACzB,KAAK,4BAA4B,CAAC;gBAClC,KAAK,gCAAgC,CAAC;gBACtC,KAAK,qBAAqB,CAAC;gBAC3B,KAAK,0BAA0B,CAAC;gBAChC,KAAK,yBAAyB,CAAC;gBAC/B,KAAK,mBAAmB,CAAC;gBACzB,KAAK,4BAA4B;oBAC7B,sDAAsD;oBACtD,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;oBACvB,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC;oBACrB,MAAM;aACb;YAED,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,mCAAmC,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,mCAAmC,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,mCAAmC,CAAC,IAAI,CAAC,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EACvP;gBACI,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC;aACzB;YAED,IAAI,GAAwB,CAAC;YAC7B,IAAI,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC;YAE7B,QAAQ,MAAM,CAAC,IAAI,EAAE;gBACjB,KAAK,WAAW;oBACZ,GAAG,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;oBACnC,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC;oBAC5B,MAAM;gBACV,KAAK,OAAO;oBACR,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;oBAC/B,MAAM;gBACV,KAAK,OAAO;oBACR,GAAG,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;oBACnC,MAAM;gBACV,KAAK,QAAQ;oBACT,IAAI,MAAM,CAAC,MAAM,KAAK,IAAI,EAAE;wBACxB,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;wBAC9B,MAAM;qBACT;gBACL,KAAK,UAAU;oBACX,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;oBAChC,MAAM;gBACV,KAAK,UAAU;oBACX,GAAG,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;oBAClC,MAAM;gBACV,KAAK,SAAS;oBACV,GAAG,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;oBACjC,MAAM;gBACV,KAAK,OAAO;oBACR,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;oBAC/B,MAAM;gBACV;oBACI,OAAO,CAAC,GAAG,CAAC,uBAAuB,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;oBACnD,MAAM;aACb;YAED,IAAI,GAAG,EAAE;gBACL,IAAI,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE;oBAC5B,OAAO,CAAC,GAAG,CAAC,wCAAwC,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;oBACxE,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;oBACpB,SAAS;iBACZ;gBACD,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC;gBACjC,IAAI,MAAM,CAAC,WAAW,EAAE;oBACpB,IAAI,SAAS,GAAG,GAAG,CAAC,YAAY,IAAI,EAAE,CAAC;oBACvC,GAAG,CAAC,YAAY,GAAG,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;iBACnF;aACJ;SACJ;IACL,CAAC;IAEO,cAAc,CAAC,IAAW;QAC9B,IAAI,QAAQ,GAAG,IAAI,GAAG,EAAU,CAAC;QACjC,KAAK,IAAI,MAAM,IAAI,IAAI,EAAE;YACrB,IAAI,GAAG,GAAG,MAAM,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAEzG,IAAI,CAAC,GAAG,EAAE;gBAEN,QAAQ;gBACR,OAAO,CAAC,GAAG,CAAC,mCAAmC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;gBAElE,SAAS;aACZ;YAED,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;gBAClB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAA8B,CAAC,CAAC;aACtD;iBAAM;gBACH,IAAI,iBAAiB,GAAG,MAAM,CAAC,IAAI,KAAK,OAAO,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,IAAI,MAAM,CAAC,IAAI,IAAI,WAAW,IAAI,MAAM,CAAC,MAAM,CAAC;gBAC5H,IAAI,MAAM,GAAG,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAExI,wDAAwD;gBACxD,IAAI,CAAC,MAAM,EAAE;oBACT,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,QAAQ,OAAO,MAAM,CAAC,IAAI,CAAC,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,gBAAgB,MAAM,CAAC,QAAQ,wBAAwB,CAAC,CAAC;oBACxI,IAAI,KAAK,GAAa,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;oBACjD,IAAI,QAAQ,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;oBAC7B,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI;wBAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;oBAChG,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAA6B,CAAC;oBACnE,IAAI,MAAM,IAAI,IAAI,EAAE;wBAChB,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;wBAC/C,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,GAA6B,MAAM,CAAC;wBACpE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAA2B,MAAM,CAAC,CAAC;qBACxD;yBAAM;wBACH,OAAO,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;4BACxB,IAAI,SAAS,GAA6B,MAAM,CAAC;4BACjD,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;4BAChD,KAAK,CAAC,IAAI,CAA4B,MAAO,CAAC,IAAI,CAAC,CAAC;4BACpD,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAA6B,MAAM,CAAC;4BACpE,SAAS,CAAC,OAAO,CAAC,IAAI,CAA2B,MAAM,CAAC,CAAC;4BACnD,MAAO,CAAC,OAAO,GAAG,SAAS,CAAC;yBACrC;qBACJ;iBACJ;gBACD,uDAAuD;gBAEvD,IAAU,MAAO,CAAC,OAAO,EAAE;oBACjB,MAAO,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;iBACnC;qBAAM;oBACH,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;oBAC9C,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;iBACvB;gBAEK,GAAI,CAAC,OAAO,GAAG,MAAM,CAAC;gBAE5B,sDAAsD;gBACtD,IAAI,CAAE,MAAc,CAAC,IAAI,KAAK,OAAO,IAAK,MAAc,CAAC,IAAI,KAAK,WAAW,CAAC;uBACtE,GAAW,CAAC,IAAI,KAAK,UAAU;oBAClC,GAAW,CAAC,IAAI,GAAG,QAAQ,CAAC;gBACjC,uDAAuD;gBACvD,IAAK,MAAc,CAAC,IAAI,KAAK,WAAW,IAAK,GAAW,CAAC,IAAI,KAAK,UAAU,EAAE;oBAC1E,IAAI,MAAM,CAAC,IAAI,IAAI,UAAU;wBAAG,GAAW,CAAC,IAAI,GAAG,OAAO,CAAC;;wBACrD,GAAW,CAAC,IAAI,GAAG,KAAK,CAAC;iBAClC;aACJ;SACJ;IACL,CAAC;IAEO,kBAAkB,CAAC,IAAW;QAClC,KAAK,IAAI,MAAM,IAAI,IAAI,EAAE;YACrB,IAAI,GAAG,GAAG,MAAM,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YACzG,IAAI,CAAC,GAAG,EAAE;gBAEN,QAAQ;gBACR,OAAO,CAAC,GAAG,CAAC,oBAAoB,MAAM,CAAC,QAAQ,MAAM,CAAC,CAAC;gBAEvD,SAAS;aACZ;YACD,IAAI,CAAO,GAAI,CAAC,OAAO;gBAAE,SAAS;YAElC,IAAI,MAAM,CAAC,SAAS,EAAE,EAAC,4DAA4D;gBAC/E,IAAI,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;gBACzC,IAAI,CAAC,IAAI,IAAI,CAAO,IAAK,CAAC,OAAO;oBAC7B,MAAM,IAAI,MAAM,CAAC,QAAQ,0BAA0B,MAAM,CAAC,QAAQ,0BAA0B,CAAC;gBAEjG,IAAU,IAAK,CAAC,OAAO,CAAC,IAAI,IAAI,WAAW,EAAE;oBACnC,GAAI,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAO,GAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;oBACxE,GAAI,CAAC,OAAO,GAAG,IAAI,CAAC;iBAC7B;aACJ;SACJ;IACL,CAAC;IAEO,cAAc,CAAC,IAAW;QAC9B,KAAK,IAAI,MAAM,IAAI,IAAI,EAAE;YACrB,IAAI,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YACxC,IAAI,CAAC,GAAG,IAAI,MAAM,CAAC,IAAI,KAAK,OAAO;gBAAE,SAAS;YAE9C,IAAI,CAAC,GAAG,GAA2B,CAAC;YAEpC,mBAAmB;YACnB,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE;gBAC3C,KAAK,IAAI,OAAO,IAAI,MAAM,CAAC,QAAQ,EAAE;oBACjC,IAAI,IAAI,GAAW,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;oBAEjD,IAAI,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA,2EAA2E;oBAEtH,IAAI,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAoD,CAAC;oBAE7F,IAAI,CAAC,QAAQ,EAAE;wBACX,OAAO,CAAC,GAAG,CAAC,kCAAkC,OAAO,QAAQ,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;qBACnF;yBAAM;wBACH,IAAI,QAAQ,CAAC,IAAI,IAAI,OAAO,EAAE;4BAC1B,CAAC,CAAC,QAAQ,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;yBACvC;6BAAM;4BACH,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;yBACjD;qBACJ;iBACJ;aACJ;SACJ;IACL,CAAC;IAEO,eAAe,CAAC,MAAW;QAE/B;;;;;;;;;;;;;;;WAeG;QAEC,8CAA8C;QAElD,IAAI,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAE5C,OAAO,GAAG,CAAC;IACf,CAAC;IAEO,WAAW,CAAC,MAAW;QAC3B,IAAI,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAExC,IAAI,MAAM,GAAG,IAAI,CAAC;QAClB,IAAI,MAAM,CAAC,MAAM,EAAE;YACf,IAAI,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YACxC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YAC7B,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC;YAEzB,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACjB,IAAK,CAAC,OAAO,GAAG,GAAG,CAAC;SAC7B;QAED,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;QAEzC,IAAI,MAAM,CAAC,SAAS;YAChB,MAAM,CAAC,WAAW,GAAG,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC,+BAA+B;QAExG,OAAO,GAAG,CAAC;IACf,CAAC;IAEO,eAAe,CAAC,MAAW;QAC/B,OAAO,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IAEO,YAAY,CAAC,MAAW;QAC5B,IAAI,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAElC,IAAI,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAEjD,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;QAEvC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAE/B,OAAO,GAAG,CAAC;IACf,CAAC;IAEO,WAAW,CAAC,MAAW;QAE3B,IAAI,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAElC,IAAI,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAE9C,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAE/B,OAAO,GAAG,CAAC;IACf,CAAC;IAEO,UAAU,CAAC,MAAW;QAC1B,IAAI,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAE9C,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAE/B,OAAO,GAAG,CAAC;IACf,CAAC;IAEO,cAAc,CAAC,MAAW;QAC9B,IAAI,UAAU,GAAa,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;QAEzC,IAAI,MAAM,CAAC,OAAO,EAAE;YAChB,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;SAClD;QAED,IAAI,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;QAC7D,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAE5B,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;QAEjD,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAE/B,OAAO,GAAG,CAAC;IACf,CAAC;IAEO,aAAa,CAAC,MAAW;QAC7B,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACtC,IAAI,IAAI,GAAG,IAAI,CAAC;QAEhB,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE;YACnC,IAAI,UAAU,GAAG,EAAE,CAAC;YAEpB,KAAK,IAAI,OAAO,IAAI,MAAM,CAAC,UAAU,EAAE;gBACnC,IAAI,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;gBACtC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACtB,IAAI,OAAO,CAAC,WAAW;oBACnB,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;aAC7E;YAED,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;YAEzC,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE;gBAC3C,IAAI,iBAAiB,GAAG,EAAE,CAAC;gBAC3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;oBAC7C,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;iBAC7E;gBACD,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC7B,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;aACrD;SAEJ;aAAM;YACH,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,UAAU,EAAE;gBACpC,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACpD,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;aAChC;iBAAM;gBACH,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;aACjC;SACJ;QAED,IAAI,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAEhD,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QAEzC,OAAO,KAAK,CAAC;IACjB,CAAC;IAEO,SAAS,CAAC,MAAW,EAAE,GAAyD;QACpF,IAAI,UAAU,GAAoB,EAAE,CAAC;QAErC,IAAI,MAAM,CAAC,MAAM,EAAE;YAEf,IAAI,QAAQ,GAAG,KAAK,CAAC;YAErB,GAAG,CAAC,YAAY,GAAG,EAAE,CAAC;YAEtB,KAAK,IAAI,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE;gBAEhC,uBAAuB;gBACvB,IAAI,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE;oBAClC,OAAO,CAAC,GAAG,CAAC,yCAAyC,MAAM,CAAC,QAAQ,QAAQ,MAAM,CAAC,IAAI,CAAC,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;oBAE1H,IAAI,UAAU,GAAG,QAAQ,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,YAAY,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;oBACzG,IAAI,QAAQ,CAAC,WAAW;wBACpB,GAAG,CAAC,YAAY,IAAI,YAAY,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,EAAE,GAAG,UAAU,CAAC;yBAClH,IAAI,UAAU,CAAC,MAAM;wBACtB,GAAG,CAAC,YAAY,IAAI,YAAY,QAAQ,CAAC,IAAI,GAAG,GAAG,UAAU,CAAC;oBAClE,SAAS;iBACZ;gBACD,uBAAuB;gBAEvB,IAAI,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAC1E,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAEvB,IAAI,QAAQ,IAAI,QAAQ,CAAC,QAAQ,IAAI,IAAI,EAAE;oBACvC,OAAO,CAAC,GAAG,CAAC,+CAA+C,QAAQ,CAAC,IAAI,UAAU,MAAM,CAAC,QAAQ,QAAQ,MAAM,CAAC,IAAI,CAAC,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;oBACvJ,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC;iBAC5B;gBAED,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;gBAEnC,QAAQ,GAAG,QAAQ,IAAI,QAAQ,CAAC,QAAQ,KAAK,IAAI,CAAC;gBAElD,IAAI,UAAU,GAAG,QAAQ,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,YAAY,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;gBAEzG,IAAI,QAAQ,CAAC,WAAW;oBACpB,GAAG,CAAC,YAAY,IAAI,YAAY,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,EAAE,GAAG,UAAU,CAAC;qBAClH,IAAI,UAAU,CAAC,MAAM;oBACtB,GAAG,CAAC,YAAY,IAAI,YAAY,QAAQ,CAAC,IAAI,GAAG,GAAG,UAAU,CAAC;aACrE;SACJ;QAED,GAAG,CAAC,UAAU,GAAG,UAAU,CAAC;IAChC,CAAC;IAEO,SAAS,CAAC,OAAY;QAC1B,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;YAC3B,OAAO,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC;SACvB;aAAM;YACH,IAAI,KAAK,GAAG,EAAE,CAAC;YACf,KAAK,IAAI,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE;gBAEjC,IAAI,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;gBAElC,IAAI,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;gBAErE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACpB;YACD,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC;gBAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;;gBAClC,OAAO,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SACvC;IACL,CAAC;IAEO,eAAe,CAAC,IAAY;QAChC,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE;YACzB,IAAI,GAAY,IAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAChD;QACD,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,KAAK,oBAAoB,EAAE;YAC3D,IAAI,GAAY,IAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAC/C;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAEO,eAAe,CAAC,IAAY;QAChC,IAAI,IAAI,KAAK,OAAO;YAAE,OAAO,QAAQ,CAAC;QACtC,IAAI,IAAI,KAAK,UAAU;YAAE,OAAO,UAAU,CAAC;QAC3C,IAAI,IAAI,KAAK,oBAAoB;YAAE,OAAO,YAAY,CAAC;QACvD,IAAI,IAAI,KAAK,OAAO;YAAE,OAAO,OAAO,CAAC;QAErC,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;YAC3B,IAAI,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;YAE1C,IAAI,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE;gBACvB,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;aAClD;SACJ;aAAM,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;YACnC,IAAI,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;YAE3C,IAAI,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE;gBACvB,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE;oBAC/B,IAAI,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;oBAClC,OAAO,UAAU,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;iBAC1F;qBAAM;oBACH,OAAO,mBAAmB,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;iBACjE;aACJ;SACJ;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;IAEO,YAAY,CAAC,MAAW,EAAE,GAAwC;QACtE,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,gBAAgB,CAAC,IAAI,CAAC;QACtC,IAAI,MAAM,CAAC,QAAQ,KAAK,IAAI,EAAE;YAC1B,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC;YACrC,IAAI,IAAI,GAAwB,GAAI,CAAC,IAAI,CAAC;YAC1C,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;gBAC3B,IAAI,IAAI,CAAC,IAAI,IAAI,KAAK;oBAClB,OAAO,CAAC,GAAG,CAAC,uDAAuD,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;gBAC1F,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,mBAAmB;aACpD;SACJ;aAAM,IAAI,MAAM,CAAC,QAAQ,KAAK,IAAI,EAAE,EAAC,qDAAqD;YACvF,IAAI,GAAG,CAAC,MAAM,CAAC,KAAK,WAAW;gBAAE,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC;;gBACrE,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,gBAAgB,CAAC,QAAQ,CAAC;SACnD;QACD,QAAQ,MAAM,CAAC,MAAM,EAAE;YACnB,KAAK,WAAW;gBACZ,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,gBAAgB,CAAC,SAAS,CAAC;gBAC5C,MAAM;YACV,KAAK,SAAS;gBACV,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,gBAAgB,CAAC,OAAO,CAAC;gBAC1C,MAAM;SACb;QACD,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,IAAI,KAAK,UAAU;YAAE,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,gBAAgB,CAAC,QAAQ,CAAC;QAC9F,IAAI,MAAM,CAAC,KAAK,KAAK,QAAQ;YAAE,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,gBAAgB,CAAC,MAAM,CAAC;IAC5E,CAAC;IAEO,cAAc,CAAC,MAAW,EAAE,GAAwG,EAAE,MAAuB;QACjK,IAAI,MAAM,CAAC,IAAI;YACX,KAAK,IAAI,GAAG,IAAI,MAAM,CAAC,IAAI,EAAE;gBACzB,IAAI,GAAG,CAAC,aAAa,KAAK,SAAS,EAAE;oBAEjC;;;;;;uBAMG;oBACH,MAAM,OAAO,GAAY,GAAG,CAAC,KAAM,CAAC,KAAK,CAAC,+EAA+E,CAAC,CAAC;oBAC3H,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,CAAC,GAAG,OAAO,CAAC;oBAE9D,MAAM,SAAS,GAAG,GAAG,CAAC,MAAM,CAAC,aAAa,CACtC,KAAK,EACL,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CACzD,CAAC;oBAEF,IAAG,YAAY,IAAI,IAAI,EAAE;wBACrB,SAAS,CAAC,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;qBAClE;oBAE2E,GAAI,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;oBAChH,eAAe,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;iBAExC;qBAAM,IAAI,GAAG,CAAC,aAAa,KAAK,YAAY,EAAE;oBAC3C,IAAI,OAAO,GAAY,GAAG,CAAC,KAAM,CAAC,KAAK,CAAC,mDAAmD,CAAC,CAAC;oBAC7F,IAAI,YAAY,GAAW,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;oBAE5D,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC;iBACnE;aACJ;QAEL,SAAS,eAAe,CAAC,aAAqB,EAAE,YAAoB;YAChE,IAAI,aAAa,IAAI,IAAI,EAAE;gBACvB,IAAI,SAAS,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACzC,IAAI,MAAM,IAAI,IAAI,EAAE;oBAChB,KAAK,IAAI,KAAK,IAAI,MAAM,EAAE;wBACtB,IAAI,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE;4BACrC,KAAK,CAAC,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;yBAC5D;qBACJ;iBACJ;gBACD,IAAI,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,EAAC,kCAAkC;oBAC7C,GAAI,CAAC,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;iBAC3F;gBACD,IAAI,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,EAAC,gCAAgC;oBACzC,GAAI,CAAC,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;iBACrF;aACJ;QACL,CAAC;IACL,CAAC;CAEJ;AA3lBD,wBA2lBC"} \ No newline at end of file +{"version":3,"file":"Parser.js","sourceRoot":"","sources":["../src/Parser.ts"],"names":[],"mappings":";;AAAA,+BAA+B;AAE/B,MAAM,YAAY,GAAG,mBAAmB,CAAC;AAEzC,MAAa,MAAM;IAMf,YAAY,IAAW;QAEnB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAClB,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QAErB,qDAAqD;QACrD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAExB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAE1B,yCAAyC;QACzC,yIAAyI;QACzI,kDAAkD;QAClD,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAE9B,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAE1B,oBAAoB;QACpB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QAEjE,qBAAqB;QACrB,MAAM,kBAAkB,GAAG,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACvD,kBAAkB,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC;QACnE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAC3C,CAAC;IAED,IAAI;QAEA,IAAI,OAAO,GAAG,EAAE,CAAC;QAEjB,IAAI,MAAM,GAAG,wCAAwC,CAAC;QAEtD,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAW,EAAE,GAA4B,EAAE,EAAE;YACtF,OAAO,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC/B,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QAER,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EACtB;YACI,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;YAC7C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;SACxB;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;IAEO,YAAY,CAAC,IAAW;QAC5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAElC,IAAI,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YAErB,+BAA+B;YAC/B,QAAQ,MAAM,CAAC,QAAQ,EACvB;gBACI,KAAK,qCAAqC,CAAC;gBAC3C,KAAK,2CAA2C,CAAC;gBACjD,KAAK,yCAAyC,CAAC;gBAC/C,KAAK,yCAAyC,CAAC;gBAC/C,KAAK,4CAA4C,CAAC;gBAClD,KAAK,oCAAoC,CAAC;gBAC1C,KAAK,qCAAqC,CAAC;gBAC3C,KAAK,oCAAoC,CAAC;gBAC1C,KAAK,yCAAyC,CAAC;gBAC/C,KAAK,oCAAoC,CAAC;gBAC1C,KAAK,sCAAsC,CAAC;gBAC5C,KAAK,4CAA4C,CAAC;gBAClD,KAAK,wCAAwC,CAAC;gBAC9C,KAAK,4CAA4C,CAAC;gBAClD,KAAK,oCAAoC,CAAC;gBAC1C,KAAK,uCAAuC,CAAC;gBAC7C,KAAK,2CAA2C,CAAC;gBACjD,KAAK,oCAAoC,CAAC;gBAC1C,KAAK,sCAAsC,CAAC;gBAC5C,KAAK,yCAAyC,CAAC;gBAC/C,KAAK,uCAAuC,CAAC;gBAC7C,KAAK,qDAAqD;oBACtD,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC;oBACtB,MAAM;gBAEV,+BAA+B;gBAC/B,KAAK,mBAAmB,CAAC;gBACzB,KAAK,mBAAmB,CAAC;gBACzB,KAAK,4BAA4B,CAAC;gBAClC,KAAK,gCAAgC,CAAC;gBACtC,KAAK,qBAAqB,CAAC;gBAC3B,KAAK,0BAA0B,CAAC;gBAChC,KAAK,yBAAyB,CAAC;gBAC/B,KAAK,mBAAmB,CAAC;gBACzB,KAAK,4BAA4B;oBAC7B,sDAAsD;oBACtD,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;oBACvB,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC;oBACrB,MAAM;aACb;YAED,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,mCAAmC,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,mCAAmC,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,mCAAmC,CAAC,IAAI,CAAC,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EACvP;gBACI,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC;aACzB;YAED,IAAI,GAAwB,CAAC;YAC7B,IAAI,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC;YAE7B,QAAQ,MAAM,CAAC,IAAI,EAAE;gBACjB,KAAK,WAAW;oBACZ,GAAG,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;oBACnC,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC;oBAC5B,MAAM;gBACV,KAAK,OAAO;oBACR,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;oBAC/B,MAAM;gBACV,KAAK,OAAO;oBACR,GAAG,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;oBACnC,MAAM;gBACV,KAAK,QAAQ;oBACT,IAAI,MAAM,CAAC,MAAM,KAAK,IAAI,EAAE;wBACxB,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;wBAC9B,MAAM;qBACT;gBACL,KAAK,UAAU;oBACX,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;oBAChC,MAAM;gBACV,KAAK,UAAU;oBACX,GAAG,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;oBAClC,MAAM;gBACV,KAAK,SAAS;oBACV,GAAG,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;oBACjC,MAAM;gBACV,KAAK,OAAO;oBACR,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;oBAC/B,MAAM;gBACV;oBACI,OAAO,CAAC,GAAG,CAAC,uBAAuB,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;oBACnD,MAAM;aACb;YAED,IAAI,GAAG,EAAE;gBACL,IAAI,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE;oBAC5B,OAAO,CAAC,GAAG,CAAC,wCAAwC,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;oBACxE,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;oBACpB,SAAS;iBACZ;gBACD,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC;gBACjC,IAAI,MAAM,CAAC,WAAW,EAAE;oBACpB,IAAI,SAAS,GAAG,GAAG,CAAC,YAAY,IAAI,EAAE,CAAC;oBACvC,GAAG,CAAC,YAAY,GAAG,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;iBACnF;aACJ;SACJ;IACL,CAAC;IAEO,cAAc,CAAC,IAAW;QAC9B,IAAI,QAAQ,GAAG,IAAI,GAAG,EAAU,CAAC;QACjC,KAAK,IAAI,MAAM,IAAI,IAAI,EAAE;YACrB,IAAI,GAAG,GAAG,MAAM,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAEzG,IAAI,CAAC,GAAG,EAAE;gBAEN,QAAQ;gBACR,OAAO,CAAC,GAAG,CAAC,mCAAmC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;gBAElE,SAAS;aACZ;YAED,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;gBAClB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAA8B,CAAC,CAAC;aACtD;iBAAM;gBACH,IAAI,iBAAiB,GAAG,MAAM,CAAC,IAAI,KAAK,OAAO,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,IAAI,MAAM,CAAC,IAAI,IAAI,WAAW,IAAI,MAAM,CAAC,MAAM,CAAC;gBAC5H,IAAI,MAAM,GAAG,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAExI,wDAAwD;gBACxD,IAAI,CAAC,MAAM,EAAE;oBACT,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,QAAQ,OAAO,MAAM,CAAC,IAAI,CAAC,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,gBAAgB,MAAM,CAAC,QAAQ,wBAAwB,CAAC,CAAC;oBACxI,IAAI,KAAK,GAAa,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;oBACjD,IAAI,QAAQ,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;oBAC7B,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI;wBAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;oBAChG,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAA6B,CAAC;oBACnE,IAAI,MAAM,IAAI,IAAI,EAAE;wBAChB,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;wBAC/C,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,GAA6B,MAAM,CAAC;wBACpE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAA2B,MAAM,CAAC,CAAC;qBACxD;yBAAM;wBACH,OAAO,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;4BACxB,IAAI,SAAS,GAA6B,MAAM,CAAC;4BACjD,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;4BAChD,KAAK,CAAC,IAAI,CAA4B,MAAO,CAAC,IAAI,CAAC,CAAC;4BACpD,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAA6B,MAAM,CAAC;4BACpE,SAAS,CAAC,OAAO,CAAC,IAAI,CAA2B,MAAM,CAAC,CAAC;4BACnD,MAAO,CAAC,OAAO,GAAG,SAAS,CAAC;yBACrC;qBACJ;iBACJ;gBACD,uDAAuD;gBAEvD,IAAU,MAAO,CAAC,OAAO,EAAE;oBACjB,MAAO,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;iBACnC;qBAAM;oBACH,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;oBAC9C,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;iBACvB;gBAEK,GAAI,CAAC,OAAO,GAAG,MAAM,CAAC;gBAE5B,sDAAsD;gBACtD,IAAI,CAAE,MAAc,CAAC,IAAI,KAAK,OAAO,IAAK,MAAc,CAAC,IAAI,KAAK,WAAW,CAAC;uBACtE,GAAW,CAAC,IAAI,KAAK,UAAU;oBAClC,GAAW,CAAC,IAAI,GAAG,QAAQ,CAAC;gBACjC,uDAAuD;gBACvD,IAAK,MAAc,CAAC,IAAI,KAAK,WAAW,IAAK,GAAW,CAAC,IAAI,KAAK,UAAU,EAAE;oBAC1E,IAAI,MAAM,CAAC,IAAI,IAAI,UAAU;wBAAG,GAAW,CAAC,IAAI,GAAG,OAAO,CAAC;;wBACrD,GAAW,CAAC,IAAI,GAAG,KAAK,CAAC;iBAClC;aACJ;SACJ;IACL,CAAC;IAEO,kBAAkB,CAAC,IAAW;QAClC,KAAK,IAAI,MAAM,IAAI,IAAI,EAAE;YACrB,IAAI,GAAG,GAAG,MAAM,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YACzG,IAAI,CAAC,GAAG,EAAE;gBAEN,QAAQ;gBACR,OAAO,CAAC,GAAG,CAAC,oBAAoB,MAAM,CAAC,QAAQ,MAAM,CAAC,CAAC;gBAEvD,SAAS;aACZ;YACD,IAAI,CAAO,GAAI,CAAC,OAAO;gBAAE,SAAS;YAElC,IAAI,MAAM,CAAC,SAAS,EAAE,EAAC,4DAA4D;gBAC/E,IAAI,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;gBACzC,IAAI,CAAC,IAAI,IAAI,CAAO,IAAK,CAAC,OAAO;oBAC7B,MAAM,IAAI,MAAM,CAAC,QAAQ,0BAA0B,MAAM,CAAC,QAAQ,0BAA0B,CAAC;gBAEjG,IAAU,IAAK,CAAC,OAAO,CAAC,IAAI,IAAI,WAAW,EAAE;oBACnC,GAAI,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAO,GAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;oBACxE,GAAI,CAAC,OAAO,GAAG,IAAI,CAAC;iBAC7B;aACJ;SACJ;IACL,CAAC;IAEO,cAAc,CAAC,IAAW;QAC9B,KAAK,IAAI,MAAM,IAAI,IAAI,EAAE;YACrB,IAAI,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YACxC,IAAI,CAAC,GAAG,IAAI,MAAM,CAAC,IAAI,KAAK,OAAO;gBAAE,SAAS;YAE9C,IAAI,CAAC,GAAG,GAA2B,CAAC;YAEpC,mBAAmB;YACnB,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE;gBAC3C,KAAK,IAAI,OAAO,IAAI,MAAM,CAAC,QAAQ,EAAE;oBACjC,IAAI,IAAI,GAAW,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;oBAEjD,IAAI,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA,2EAA2E;oBAEtH,IAAI,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAoD,CAAC;oBAE7F,IAAI,CAAC,QAAQ,EAAE;wBACX,OAAO,CAAC,GAAG,CAAC,kCAAkC,OAAO,QAAQ,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;qBACnF;yBAAM;wBACH,IAAI,QAAQ,CAAC,IAAI,IAAI,OAAO,EAAE;4BAC1B,CAAC,CAAC,QAAQ,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;yBACvC;6BAAM;4BACH,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;yBACjD;qBACJ;iBACJ;aACJ;SACJ;IACL,CAAC;IAEO,eAAe,CAAC,MAAW;QAE/B;;;;;;;;;;;;;;;WAeG;QAEC,8CAA8C;QAElD,IAAI,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAE5C,OAAO,GAAG,CAAC;IACf,CAAC;IAEO,WAAW,CAAC,MAAW;QAC3B,IAAI,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAExC,IAAI,MAAM,GAAG,IAAI,CAAC;QAClB,IAAI,MAAM,CAAC,MAAM,EAAE;YACf,IAAI,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YACxC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YAC7B,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC;YAEzB,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACjB,IAAK,CAAC,OAAO,GAAG,GAAG,CAAC;SAC7B;QAED,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;QAEzC,IAAI,MAAM,CAAC,SAAS;YAChB,MAAM,CAAC,WAAW,GAAG,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC,+BAA+B;QAExG,OAAO,GAAG,CAAC;IACf,CAAC;IAEO,eAAe,CAAC,MAAW;QAC/B,OAAO,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IAEO,YAAY,CAAC,MAAW;QAC5B,IAAI,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAElC,IAAI,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAEjD,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;QAEvC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAE/B,OAAO,GAAG,CAAC;IACf,CAAC;IAEO,WAAW,CAAC,MAAW;QAE3B,IAAI,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAElC,IAAI,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAE9C,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAE/B,OAAO,GAAG,CAAC;IACf,CAAC;IAEO,UAAU,CAAC,MAAW;QAC1B,IAAI,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAE9C,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAE/B,OAAO,GAAG,CAAC;IACf,CAAC;IAEO,cAAc,CAAC,MAAW;QAC9B,IAAI,UAAU,GAAa,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;QAEzC,IAAI,MAAM,CAAC,OAAO,EAAE;YAChB,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;SAClD;QAED,IAAI,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;QAC7D,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAE5B,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;QAEjD,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAE/B,OAAO,GAAG,CAAC;IACf,CAAC;IAEO,aAAa,CAAC,MAAW;QAC7B,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACtC,IAAI,IAAI,GAAG,IAAI,CAAC;QAEhB,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE;YACnC,IAAI,UAAU,GAAG,EAAE,CAAC;YAEpB,KAAK,IAAI,OAAO,IAAI,MAAM,CAAC,UAAU,EAAE;gBACnC,IAAI,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;gBACtC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACtB,IAAI,OAAO,CAAC,WAAW;oBACnB,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;aAC7E;YAED,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;YAEzC,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE;gBAC3C,IAAI,iBAAiB,GAAG,EAAE,CAAC;gBAC3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;oBAC7C,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;iBAC7E;gBACD,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC7B,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;aACrD;SAEJ;aAAM;YACH,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,UAAU,EAAE;gBACpC,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACpD,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;aAChC;iBAAM;gBACH,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;aACjC;SACJ;QAED,IAAI,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAEhD,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QAEzC,OAAO,KAAK,CAAC;IACjB,CAAC;IAEO,SAAS,CAAC,MAAW,EAAE,GAAyD;QACpF,IAAI,UAAU,GAAoB,EAAE,CAAC;QAErC,IAAI,MAAM,CAAC,MAAM,EAAE;YAEf,IAAI,QAAQ,GAAG,KAAK,CAAC;YAErB,GAAG,CAAC,YAAY,GAAG,EAAE,CAAC;YAEtB,KAAK,IAAI,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE;gBAEhC,uBAAuB;gBACvB,IAAI,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE;oBAClC,OAAO,CAAC,GAAG,CAAC,yCAAyC,MAAM,CAAC,QAAQ,QAAQ,MAAM,CAAC,IAAI,CAAC,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;oBAE1H,IAAI,UAAU,GAAG,QAAQ,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,YAAY,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;oBACzG,IAAI,QAAQ,CAAC,WAAW;wBACpB,GAAG,CAAC,YAAY,IAAI,YAAY,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,EAAE,GAAG,UAAU,CAAC;yBAClH,IAAI,UAAU,CAAC,MAAM;wBACtB,GAAG,CAAC,YAAY,IAAI,YAAY,QAAQ,CAAC,IAAI,GAAG,GAAG,UAAU,CAAC;oBAClE,SAAS;iBACZ;gBACD,uBAAuB;gBAEvB,IAAI,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAC1E,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAEvB,IAAI,QAAQ,IAAI,QAAQ,CAAC,QAAQ,IAAI,IAAI,EAAE;oBACvC,OAAO,CAAC,GAAG,CAAC,+CAA+C,QAAQ,CAAC,IAAI,UAAU,MAAM,CAAC,QAAQ,QAAQ,MAAM,CAAC,IAAI,CAAC,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;oBACvJ,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC;iBAC5B;gBAED,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;gBAEnC,QAAQ,GAAG,QAAQ,IAAI,QAAQ,CAAC,QAAQ,KAAK,IAAI,CAAC;gBAElD,IAAI,UAAU,GAAG,QAAQ,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,YAAY,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;gBAEzG,IAAI,QAAQ,CAAC,WAAW;oBACpB,GAAG,CAAC,YAAY,IAAI,YAAY,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,EAAE,GAAG,UAAU,CAAC;qBAClH,IAAI,UAAU,CAAC,MAAM;oBACtB,GAAG,CAAC,YAAY,IAAI,YAAY,QAAQ,CAAC,IAAI,GAAG,GAAG,UAAU,CAAC;aACrE;SACJ;QAED,GAAG,CAAC,UAAU,GAAG,UAAU,CAAC;IAChC,CAAC;IAEO,SAAS,CAAC,OAAY;QAC1B,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;YAC3B,OAAO,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC;SACvB;aAAM;YACH,IAAI,KAAK,GAAG,EAAE,CAAC;YACf,KAAK,IAAI,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE;gBAEjC,IAAI,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;gBAElC,IAAI,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;gBAErE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACpB;YACD,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC;gBAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;;gBAClC,OAAO,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SACvC;IACL,CAAC;IAEO,eAAe,CAAC,IAAY;QAChC,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE;YACzB,IAAI,GAAY,IAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAChD;QACD,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,KAAK,oBAAoB,EAAE;YAC3D,IAAI,GAAY,IAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAC/C;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAEO,eAAe,CAAC,IAAY;QAChC,IAAI,IAAI,KAAK,OAAO;YAAE,OAAO,QAAQ,CAAC;QACtC,IAAI,IAAI,KAAK,UAAU;YAAE,OAAO,UAAU,CAAC;QAC3C,IAAI,IAAI,KAAK,oBAAoB;YAAE,OAAO,YAAY,CAAC;QACvD,IAAI,IAAI,KAAK,OAAO;YAAE,OAAO,OAAO,CAAC;QAErC,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;YAC3B,IAAI,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;YAE1C,IAAI,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE;gBACvB,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;aAClD;SACJ;aAAM,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;YACnC,IAAI,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;YAE3C,IAAI,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE;gBACvB,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE;oBAC/B,IAAI,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;oBAClC,OAAO,UAAU,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;iBAC1F;qBAAM;oBACH,OAAO,mBAAmB,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;iBACjE;aACJ;SACJ;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;IAEO,YAAY,CAAC,MAAW,EAAE,GAAwC;QACtE,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,gBAAgB,CAAC,IAAI,CAAC;QACtC,IAAI,MAAM,CAAC,QAAQ,KAAK,IAAI,EAAE;YAC1B,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC;YACrC,IAAI,IAAI,GAAwB,GAAI,CAAC,IAAI,CAAC;YAC1C,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;gBAC3B,IAAI,IAAI,CAAC,IAAI,IAAI,KAAK;oBAClB,OAAO,CAAC,GAAG,CAAC,uDAAuD,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;gBAC1F,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,mBAAmB;aACpD;SACJ;aAAM,IAAI,MAAM,CAAC,QAAQ,KAAK,IAAI,EAAE,EAAC,qDAAqD;YACvF,IAAI,GAAG,CAAC,MAAM,CAAC,KAAK,WAAW;gBAAE,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC;;gBACrE,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,gBAAgB,CAAC,QAAQ,CAAC;SACnD;QACD,QAAQ,MAAM,CAAC,MAAM,EAAE;YACnB,KAAK,WAAW;gBACZ,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,gBAAgB,CAAC,SAAS,CAAC;gBAC5C,MAAM;YACV,KAAK,SAAS;gBACV,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,gBAAgB,CAAC,OAAO,CAAC;gBAC1C,MAAM;SACb;QACD,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,IAAI,KAAK,UAAU;YAAE,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,gBAAgB,CAAC,QAAQ,CAAC;QAC9F,IAAI,MAAM,CAAC,KAAK,KAAK,QAAQ;YAAE,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,gBAAgB,CAAC,MAAM,CAAC;IAC5E,CAAC;IAEO,cAAc,CAAC,MAAW,EAAE,GAAwG,EAAE,MAAuB;QACjK,IAAI,MAAM,CAAC,IAAI;YACX,KAAK,IAAI,GAAG,IAAI,MAAM,CAAC,IAAI,EAAE;gBACzB,IAAI,GAAG,CAAC,aAAa,KAAK,SAAS,EAAE;oBAEjC;;;;;;uBAMG;oBACH,MAAM,OAAO,GAAY,GAAG,CAAC,KAAM,CAAC,KAAK,CAAC,+EAA+E,CAAC,CAAC;oBAC3H,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,CAAC,GAAG,OAAO,CAAC;oBAE9D,MAAM,SAAS,GAAG,GAAG,CAAC,MAAM,CAAC,aAAa,CACtC,KAAK,EACL,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CACzD,CAAC;oBAEF,IAAG,YAAY,IAAI,IAAI,EAAE;wBACrB,SAAS,CAAC,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;qBAClE;oBAE2E,GAAI,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;oBAChH,eAAe,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;iBAExC;qBAAM,IAAI,GAAG,CAAC,aAAa,KAAK,YAAY,EAAE;oBAC3C,IAAI,OAAO,GAAY,GAAG,CAAC,KAAM,CAAC,KAAK,CAAC,mDAAmD,CAAC,CAAC;oBAC7F,IAAI,YAAY,GAAW,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;oBAE5D,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC;iBACnE;aACJ;QAEL,SAAS,eAAe,CAAC,aAAqB,EAAE,YAAoB;YAChE,IAAI,aAAa,IAAI,IAAI,EAAE;gBACvB,IAAI,SAAS,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACzC,IAAI,MAAM,IAAI,IAAI,EAAE;oBAChB,KAAK,IAAI,KAAK,IAAI,MAAM,EAAE;wBACtB,IAAI,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE;4BACrC,KAAK,CAAC,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;yBAC5D;qBACJ;iBACJ;gBACD,IAAI,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,EAAC,kCAAkC;oBAC7C,GAAI,CAAC,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;iBAC3F;gBACD,IAAI,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,EAAC,gCAAgC;oBACzC,GAAI,CAAC,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;iBACrF;aACJ;QACL,CAAC;IACL,CAAC;CAEJ;AA1lBD,wBA0lBC"} \ No newline at end of file diff --git a/scripts/tsgen/src/Parser.ts b/scripts/tsgen/src/Parser.ts index 5b1489b24..b61480f3b 100644 --- a/scripts/tsgen/src/Parser.ts +++ b/scripts/tsgen/src/Parser.ts @@ -37,12 +37,13 @@ export class Parser { emit() { - const matter = '/// '; - let ignored = []; - let result = this.topLevel.reduce((out: string, obj: dom.TopLevelDeclaration) => { - return matter + '\n\n' + out + dom.emit(obj); - }, ''); + + let result = '/// \n\n'; + + result = result.concat(this.topLevel.reduce((out: string, obj: dom.TopLevelDeclaration) => { + return out + dom.emit(obj); + }, '')); if (ignored.length > 0) { @@ -62,6 +63,7 @@ export class Parser { switch (doclet.longname) { case 'Phaser.GameObjects.Components.Alpha': + case 'Phaser.GameObjects.Components.AlphaSingle': case 'Phaser.GameObjects.Components.Animation': case 'Phaser.GameObjects.Components.BlendMode': case 'Phaser.GameObjects.Components.ComputedSize': From c56d91281cee25e089bfca457ac75e3246669ba4 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 13 Jan 2020 13:29:25 +0000 Subject: [PATCH 141/189] Lots of fixes to the Matter defs --- types/matter.d.ts | 442 ++++++++++++++++++++-------------------------- 1 file changed, 187 insertions(+), 255 deletions(-) diff --git a/types/matter.d.ts b/types/matter.d.ts index 04ed8bd89..2a6127f78 100644 --- a/types/matter.d.ts +++ b/types/matter.d.ts @@ -1,14 +1,16 @@ -// Type definitions for Matter.js - 0.10.1 +// Type definitions for Matter.js as used by Phaser 3 +// // Project: https://github.com/liabru/matter-js +// // Definitions by: Ivane Gegia , // David Asmuth , -// Piotr Pietrzak -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Piotr Pietrzak , +// Richard Davey -export = Matter; -export as namespace Matter; +export = MatterJS; +export as namespace MatterJS; -declare namespace Matter { +declare namespace MatterJS { /** * Installs the given plugins on the `Matter` namespace. * This is a short-hand for `Plugin.use`, see it for more information. @@ -2029,19 +2031,6 @@ declare namespace Matter { */ positionIterations: number; - /** - * An instance of a `Render` controller. The default value is a `Matter.Render` instance created by `Engine.create`. - * One may also develop a custom renderer module based on `Matter.Render` and pass an instance of it to `Engine.create` via `options.render`. - * - * A minimal custom renderer object must define at least three functions: `create`, `clear` and `world` (see `Matter.Render`). - * It is also possible to instead pass the _module_ reference via `options.render.controller` and `Engine.create` will instantiate one for you. - * - * @property render - * @type render - * @default a Matter.Render instance - */ - render: Render; - /** * An `Object` containing properties regarding the timing systems of the engine. * @@ -2255,6 +2244,185 @@ declare namespace Matter { slop: number; } + export interface ICollisionData { + collided: boolean; + bodyA: Body; + bodyB: Body; + axisBody: Body; + axisNumber: number; + depth: number; + parentA: Body; + parentB: Body; + normal: Vector; + tangent: Vector; + penetration: Vector; + supports: Vector[]; + inverseMass: number; + friction: number; + frictionStatic: number; + restitution: number; + slop: number; + } + + export interface ICollisionPair { + id: string; + bodyA: Body; + bodyB: Body; + activeContacts: Vector[]; + separation: number; + isActive: boolean; + confirmedActive: boolean; + isSensor: boolean; + timeCreated: number; + timeUpdated: number; + collision: ICollisionData; + inverseMass: number; + friction: number; + frictionStatic: number; + restitution: number; + slop: number; + } + + /** + * The `Matter.Pair` module contains methods for creating and manipulating collision pairs. + * + * @class Pair + */ + export class Pair { + + /** + * Creates a pair. + * @method create + * @param {ICollisionData} collision + * @param {number} timestamp + * @return {IPair} A new pair + */ + static create(collision: ICollisionData, timestamp: number): any; + + /** + * Updates a pair given a collision. + * @method update + * @param {IPair} pair + * @param {ICollisionData} collision + * @param {number} timestamp + */ + static update (pair: IPair, collision: ICollisionData, timestamp: number): void; + + /** + * Set a pair as active or inactive. + * @method setActive + * @param {IPair} pair + * @param {boolean} isActive + * @param {number} timestamp + */ + static setActive (pair: IPair, isActive: boolean, timestamp: number): void; + + /** + * Get the id for the given pair. + * @method id + * @param {Body} bodyA + * @param {Body} bodyB + * @return {string} Unique pairId + */ + static id (bodyA: Body, bodyB: Body): string; + + } + + /** + * The `Matter.Detector` module contains methods for detecting collisions given a set of pairs. + * + * @class Detector + */ + export class Detector { + + /** + * Finds all collisions given a list of pairs. + * @method collisions + * @param {pair[]} broadphasePairs + * @param {engine} engine + * @return {ICollisionData[]} collisions + */ + static collisions (broadphasePairs: IPair[], engine: Engine): ICollisionData[]; + + /** + * Returns `true` if both supplied collision filters will allow a collision to occur. + * See `body.collisionFilter` for more information. + * @method canCollide + * @param {} filterA + * @param {} filterB + * @return {bool} `true` if collision can occur + */ + static canCollide (filterA: ICollisionFilter, filterB: ICollisionFilter): boolean; + + } + + /** + * The `Matter.Resolver` module contains methods for resolving collision pairs. + * + * @class Resolver + */ + export class Resolver { + + /** + * Prepare pairs for position solving. + * @method preSolvePosition + * @param {pair[]} pairs + */ + static preSolvePosition (pairs: IPair[]): void; + + /** + * Find a solution for pair positions. + * @method solvePosition + * @param {pair[]} pairs + * @param {body[]} bodies + * @param {number} timeScale + */ + static solvePosition (pairs: IPair[], bodies: Body[], timeScale: number): void; + + /** + * Apply position resolution. + * @method postSolvePosition + * @param {body[]} bodies + */ + static postSolvePosition (bodies: Body[]): void; + + /** + * Prepare pairs for velocity solving. + * @method preSolveVelocity + * @param {pair[]} pairs + */ + static preSolveVelocity (pairs: IPair[]): void; + + /** + * Find a solution for pair velocities. + * @method solveVelocity + * @param {pair[]} pairs + * @param {number} timeScale + */ + static solveVelocity (pairs: IPair[], timeScale: number): void; + + } + + /** + * The `Matter.SAT` module contains methods for detecting collisions using the Separating Axis Theorem. + * + * @class SAT + */ + + export class SAT { + + /** + * Detect collision between two bodies using the Separating Axis Theorem. + * @method collides + * @param {body} bodyA + * @param {body} bodyB + * @param {ICollisionData} previousCollision + * @return {ICollisionData} collision + */ + static collides (bodyA: Body, bodyB: Body, previousCollision: ICollisionData): ICollisionData + + } + /** * The `Matter.Query` module contains methods for performing collision queries. * @@ -2294,220 +2462,6 @@ declare namespace Matter { static point(bodies: Array, point: Vector): Array; } - export interface IRenderDefinition { - /** - * A back-reference to the `Matter.Render` module. - * - * @property controller - * @type render - */ - controller?: any; - /** - * A reference to the `Matter.Engine` instance to be used. - * - * @property engine - * @type engine - */ - engine: Engine; - /** - * A reference to the element where the canvas is to be inserted (if `render.canvas` has not been specified) - * - * @property element - * @type HTMLElement - * @default null - * @deprecated - */ - element?: HTMLElement; - /** - * The canvas element to render to. If not specified, one will be created if `render.element` has been specified. - * - * @property canvas - * @type HTMLCanvasElement - * @default null - */ - canvas?: HTMLCanvasElement; - - /** - * The configuration options of the renderer. - * - * @property options - * @type {} - */ - options?: IRendererOptions; - - /** - * A `Bounds` object that specifies the drawing view region. - * Rendering will be automatically transformed and scaled to fit within the canvas size (`render.options.width` and `render.options.height`). - * This allows for creating views that can pan or zoom around the scene. - * You must also set `render.options.hasBounds` to `true` to enable bounded rendering. - * - * @property bounds - * @type bounds - */ - bounds?: Bounds; - - /** - * The 2d rendering context from the `render.canvas` element. - * - * @property context - * @type CanvasRenderingContext2D - */ - context?: CanvasRenderingContext2D; - - /** - * The sprite texture cache. - * - * @property textures - * @type {} - */ - textures?: any; - - - } - - export interface IRendererOptions { - /** - * The target width in pixels of the `render.canvas` to be created. - * - * @property options.width - * @type number - * @default 800 - */ - width?: number; - - /** - * The target height in pixels of the `render.canvas` to be created. - * - * @property options.height - * @type number - * @default 600 - */ - height?: number; - - /** - * A flag that specifies if `render.bounds` should be used when rendering. - * - * @property options.hasBounds - * @type boolean - * @default false - */ - hasBounds?: boolean; - - /** - * Render wireframes only - * @type boolean - * @default true - */ - wireframes?: boolean; - } - - /** - * The `Matter.Render` module is a simple HTML5 canvas based renderer for visualising instances of `Matter.Engine`. - * It is intended for development and debugging purposes, but may also be suitable for simple games. - * It includes a number of drawing options including wireframe, vector with support for sprites and viewports. - * - * @class Render - */ - export class Render { - /** - * Creates a new renderer. The options parameter is an object that specifies any properties you wish to override the defaults. - * All properties have default values, and many are pre-calculated automatically based on other properties. - * See the properties section below for detailed information on what you can pass via the `options` object. - * @method create - * @param {object} [options] - * @return {render} A new renderer - */ - static create(options: IRenderDefinition): Render; - /** - * Continuously updates the render canvas on the `requestAnimationFrame` event. - * @method run - * @param {render} render - */ - static run(render: Render): void; - /** - * Ends execution of `Render.run` on the given `render`, by canceling the animation frame request event loop. - * @method stop - * @param {render} render - */ - static stop(render: Render): void; - /** - * Sets the pixel ratio of the renderer and updates the canvas. - * To automatically detect the correct ratio, pass the string `'auto'` for `pixelRatio`. - * @method setPixelRatio - * @param {render} render - * @param {number} pixelRatio - */ - static setPixelRatio(render: Render, pixelRatio: number): void; - /** - * Renders the given `engine`'s `Matter.World` object. - * This is the entry point for all rendering and should be called every time the scene changes. - * @method world - * @param {engine} engine - */ - static world(render: Render): void; - - /** - * A back-reference to the `Matter.Render` module. - * - * @property controller - * @type render - */ - controller: any; - /** - * A reference to the element where the canvas is to be inserted (if `render.canvas` has not been specified) - * - * @property element - * @type HTMLElement - * @default null - */ - element: HTMLElement; - /** - * The canvas element to render to. If not specified, one will be created if `render.element` has been specified. - * - * @property canvas - * @type HTMLCanvasElement - * @default null - */ - canvas: HTMLCanvasElement; - - /** - * The configuration options of the renderer. - * - * @property options - * @type {} - */ - options: IRendererOptions; - - /** - * A `Bounds` object that specifies the drawing view region. - * Rendering will be automatically transformed and scaled to fit within the canvas size (`render.options.width` and `render.options.height`). - * This allows for creating views that can pan or zoom around the scene. - * You must also set `render.options.hasBounds` to `true` to enable bounded rendering. - * - * @property bounds - * @type bounds - */ - bounds: Bounds; - - /** - * The 2d rendering context from the `render.canvas` element. - * - * @property context - * @type CanvasRenderingContext2D - */ - context: CanvasRenderingContext2D; - - /** - * The sprite texture cache. - * - * @property textures - * @type {} - */ - textures: any; - } - - - export interface IRunnerOptions { /** * A `Boolean` that specifies if the runner should use a fixed timestep (otherwise it is variable). @@ -3189,28 +3143,6 @@ declare namespace Matter { */ static on(obj: Engine, name: "afterUpdate", callback: (e: IEventTimestamped) => void): void; - /** - * Fired before rendering - * - * @event beforeRender - * @param {} event An event object - * @param {number} event.timestamp The engine.timing.timestamp of the event - * @param {} event.source The source object of the event - * @param {} event.name The name of the event - */ - static on(obj: Engine, name: "beforeRender", callback: (e: IEventTimestamped) => void): void; - /** - * Fired after rendering - * - * @event afterRender - * @param {} event An event object - * @param {number} event.timestamp The engine.timing.timestamp of the event - * @param {} event.source The source object of the event - * @param {} event.name The name of the event - */ - static on(obj: Engine, name: "afterRender", callback: (e: IEventTimestamped) => void): void; - - /** * Fired just before an update * From 0ced4e36695943a52132a6290dc30c6cc22b031d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 13 Jan 2020 13:29:30 +0000 Subject: [PATCH 142/189] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d8ca1e51..164360a94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -235,6 +235,8 @@ My thanks to the following for helping with the Phaser 3 Examples, Docs and Type @fselcukcan Bambosh @louisth @hexus @javigaralva @samme @BeLi4L @jcyuan @javigaralva @T-Grave @bramp @Chnapy @dranitski +The Matter TypeScript defs have been updated to include lots of missing classes, removed some redundant elements and general fixes. The Phaser TypeScript defs now reference the Matter defs directly and no longer try to parse them from the JSDocs. This allows the `MatterJS` namespace to work in TypeScript projects without any compilation warnings. + The Spine Plugin now has new TypeScript defs in the `types` folder thanks to @supertommy ## Version 3.21.0 - Senku - 22nd November 2019 From cc5c5bb1e3072b1775f4e48d25214878ebf12176 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 13 Jan 2020 13:29:40 +0000 Subject: [PATCH 143/189] 3.22 defs --- types/phaser.d.ts | 28660 +++++++++++++++++++++++--------------------- 1 file changed, 15030 insertions(+), 13630 deletions(-) diff --git a/types/phaser.d.ts b/types/phaser.d.ts index 39a845498..fbb0bafb7 100644 --- a/types/phaser.d.ts +++ b/types/phaser.d.ts @@ -1,3 +1,5 @@ +/// + declare type DataEachCallback = (parent: any, key: string, value: any, ...args: any[])=>void; declare type ContentLoadedCallback = ()=>void; @@ -17,6 +19,17 @@ declare type CenterFunction = (triangle: Phaser.Geom.Triangle)=>void; declare namespace Phaser { namespace Actions { + /** + * Takes an array of Game Objects, or any objects that have public `x` and `y` properties, and aligns them next to each other. + * + * The first item isn't moved. The second item is aligned next to the first, then the third next to the second, and so on. + * @param items The array of items to be updated by this action. + * @param position The position to align the items with. This is an align constant, such as `Phaser.Display.Align.LEFT_CENTER`. + * @param offsetX Optional horizontal offset from the position. Default 0. + * @param offsetY Optional vertical offset from the position. Default 0. + */ + function AlignTo(items: G, position: integer, offsetX?: number, offsetY?: number): G; + /** * Takes an array of Game Objects, or any objects that have a public `angle` property, * and then adds the given value to each of their `angle` properties. @@ -614,18 +627,6 @@ declare namespace Phaser { */ function Shuffle(items: G): G; - /** - * Smoothstep is a sigmoid-like interpolation and clamping function. - * - * The function depends on three parameters, the input x, the "left edge" and the "right edge", with the left edge being assumed smaller than the right edge. The function receives a real number x as an argument and returns 0 if x is less than or equal to the left edge, 1 if x is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial, between 0 and 1 otherwise. The slope of the smoothstep function is zero at both edges. This is convenient for creating a sequence of transitions using smoothstep to interpolate each segment as an alternative to using more sophisticated or expensive interpolation techniques. - * @param items An array of Game Objects. The contents of this array are updated by this Action. - * @param property The property of the Game Object to interpolate. - * @param min The minimum interpolation value. - * @param max The maximum interpolation value. - * @param inc Should the values be incremented? `true` or set (`false`) Default false. - */ - function SmoothStep(items: G, property: string, min: number, max: number, inc?: boolean): G; - /** * Smootherstep is a sigmoid-like interpolation and clamping function. * @@ -638,6 +639,18 @@ declare namespace Phaser { */ function SmootherStep(items: G, property: string, min: number, max: number, inc?: boolean): G; + /** + * Smoothstep is a sigmoid-like interpolation and clamping function. + * + * The function depends on three parameters, the input x, the "left edge" and the "right edge", with the left edge being assumed smaller than the right edge. The function receives a real number x as an argument and returns 0 if x is less than or equal to the left edge, 1 if x is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial, between 0 and 1 otherwise. The slope of the smoothstep function is zero at both edges. This is convenient for creating a sequence of transitions using smoothstep to interpolate each segment as an alternative to using more sophisticated or expensive interpolation techniques. + * @param items An array of Game Objects. The contents of this array are updated by this Action. + * @param property The property of the Game Object to interpolate. + * @param min The minimum interpolation value. + * @param max The maximum interpolation value. + * @param inc Should the values be incremented? `true` or set (`false`) Default false. + */ + function SmoothStep(items: G, property: string, min: number, max: number, inc?: boolean): G; + /** * Takes an array of Game Objects and then modifies their `property` so the value equals, or is incremented, by the * calculated spread value. @@ -1733,7 +1746,7 @@ declare namespace Phaser { * the Camera there. The results are clamped based on the Camera bounds, if set. * @param x The horizontal coordinate to center on. * @param y The vertical coordinate to center on. - * @param out A Vec2 to store the values in. If not given a new Vec2 is created. + * @param out A Vector2 to store the values in. If not given a new Vector2 is created. */ getScroll(x: number, y: number, out?: Phaser.Math.Vector2): Phaser.Math.Vector2; @@ -4568,6 +4581,148 @@ declare namespace Phaser { */ function DebugHeader(game: Phaser.Game): void; + namespace Events { + /** + * The Game Blur Event. + * + * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded + * enters a blurred state. The blur event is raised when the window loses focus. This can happen if a user swaps + * tab, or if they simply remove focus from the browser to another app. + */ + const BLUR: any; + + /** + * The Game Boot Event. + * + * This event is dispatched when the Phaser Game instance has finished booting, but before it is ready to start running. + * The global systems use this event to know when to set themselves up, dispatching their own `ready` events as required. + */ + const BOOT: any; + + /** + * The Game Context Lost Event. + * + * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Lost event from the browser. + * + * The partner event is `CONTEXT_RESTORED`. + */ + const CONTEXT_LOST: any; + + /** + * The Game Context Restored Event. + * + * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Restored event from the browser. + * + * The partner event is `CONTEXT_LOST`. + */ + const CONTEXT_RESTORED: any; + + /** + * The Game Destroy Event. + * + * This event is dispatched when the game instance has been told to destroy itself. + * Lots of internal systems listen to this event in order to clear themselves out. + * Custom plugins and game code should also do the same. + */ + const DESTROY: any; + + /** + * The Game Focus Event. + * + * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded + * enters a focused state. The focus event is raised when the window re-gains focus, having previously lost it. + */ + const FOCUS: any; + + /** + * The Game Hidden Event. + * + * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded + * enters a hidden state. Only browsers that support the Visibility API will cause this event to be emitted. + * + * In most modern browsers, when the document enters a hidden state, the Request Animation Frame and setTimeout, which + * control the main game loop, will automatically pause. There is no way to stop this from happening. It is something + * your game should account for in its own code, should the pause be an issue (i.e. for multiplayer games) + */ + const HIDDEN: any; + + /** + * The Game Pause Event. + * + * This event is dispatched when the Game loop enters a paused state, usually as a result of the Visibility Handler. + */ + const PAUSE: any; + + /** + * The Game Post-Render Event. + * + * This event is dispatched right at the end of the render process. + * + * Every Scene will have rendered and been drawn to the canvas by the time this event is fired. + * Use it for any last minute post-processing before the next game step begins. + */ + const POST_RENDER: any; + + /** + * The Game Post-Step Event. + * + * This event is dispatched after the Scene Manager has updated. + * Hook into it from plugins or systems that need to do things before the render starts. + */ + const POST_STEP: any; + + /** + * The Game Pre-Render Event. + * + * This event is dispatched immediately before any of the Scenes have started to render. + * + * The renderer will already have been initialized this frame, clearing itself and preparing to receive the Scenes for rendering, but it won't have actually drawn anything yet. + */ + const PRE_RENDER: any; + + /** + * The Game Pre-Step Event. + * + * This event is dispatched before the main Game Step starts. By this point in the game cycle none of the Scene updates have yet happened. + * Hook into it from plugins or systems that need to update before the Scene Manager does. + */ + const PRE_STEP: any; + + /** + * The Game Ready Event. + * + * This event is dispatched when the Phaser Game instance has finished booting, the Texture Manager is fully ready, + * and all local systems are now able to start. + */ + const READY: any; + + /** + * The Game Resume Event. + * + * This event is dispatched when the game loop leaves a paused state and resumes running. + */ + const RESUME: any; + + /** + * The Game Step Event. + * + * This event is dispatched after the Game Pre-Step and before the Scene Manager steps. + * Hook into it from plugins or systems that need to update before the Scene Manager does, but after the core Systems have. + */ + const STEP: any; + + /** + * The Game Visible Event. + * + * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded + * enters a visible state, previously having been hidden. + * + * Only browsers that support the Visibility API will cause this event to be emitted. + */ + const VISIBLE: any; + + } + /** * The core runner class that Phaser uses to handle the game loop. It can use either Request Animation Frame, * or SetTimeout, based on browser support and config settings, to create a continuous loop within the browser. @@ -4825,148 +4980,6 @@ declare namespace Phaser { */ function VisibilityHandler(game: Phaser.Game): void; - namespace Events { - /** - * The Game Blur Event. - * - * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded - * enters a blurred state. The blur event is raised when the window loses focus. This can happen if a user swaps - * tab, or if they simply remove focus from the browser to another app. - */ - const BLUR: any; - - /** - * The Game Boot Event. - * - * This event is dispatched when the Phaser Game instance has finished booting, but before it is ready to start running. - * The global systems use this event to know when to set themselves up, dispatching their own `ready` events as required. - */ - const BOOT: any; - - /** - * The Game Context Lost Event. - * - * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Lost event from the browser. - * - * The partner event is `CONTEXT_RESTORED`. - */ - const CONTEXT_LOST: any; - - /** - * The Game Context Restored Event. - * - * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Restored event from the browser. - * - * The partner event is `CONTEXT_LOST`. - */ - const CONTEXT_RESTORED: any; - - /** - * The Game Destroy Event. - * - * This event is dispatched when the game instance has been told to destroy itself. - * Lots of internal systems listen to this event in order to clear themselves out. - * Custom plugins and game code should also do the same. - */ - const DESTROY: any; - - /** - * The Game Focus Event. - * - * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded - * enters a focused state. The focus event is raised when the window re-gains focus, having previously lost it. - */ - const FOCUS: any; - - /** - * The Game Hidden Event. - * - * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded - * enters a hidden state. Only browsers that support the Visibility API will cause this event to be emitted. - * - * In most modern browsers, when the document enters a hidden state, the Request Animation Frame and setTimeout, which - * control the main game loop, will automatically pause. There is no way to stop this from happening. It is something - * your game should account for in its own code, should the pause be an issue (i.e. for multiplayer games) - */ - const HIDDEN: any; - - /** - * The Game Pause Event. - * - * This event is dispatched when the Game loop enters a paused state, usually as a result of the Visibility Handler. - */ - const PAUSE: any; - - /** - * The Game Post-Render Event. - * - * This event is dispatched right at the end of the render process. - * - * Every Scene will have rendered and been drawn to the canvas by the time this event is fired. - * Use it for any last minute post-processing before the next game step begins. - */ - const POST_RENDER: any; - - /** - * The Game Post-Step Event. - * - * This event is dispatched after the Scene Manager has updated. - * Hook into it from plugins or systems that need to do things before the render starts. - */ - const POST_STEP: any; - - /** - * The Game Pre-Render Event. - * - * This event is dispatched immediately before any of the Scenes have started to render. - * - * The renderer will already have been initialized this frame, clearing itself and preparing to receive the Scenes for rendering, but it won't have actually drawn anything yet. - */ - const PRE_RENDER: any; - - /** - * The Game Pre-Step Event. - * - * This event is dispatched before the main Game Step starts. By this point in the game cycle none of the Scene updates have yet happened. - * Hook into it from plugins or systems that need to update before the Scene Manager does. - */ - const PRE_STEP: any; - - /** - * The Game Ready Event. - * - * This event is dispatched when the Phaser Game instance has finished booting, the Texture Manager is fully ready, - * and all local systems are now able to start. - */ - const READY: any; - - /** - * The Game Resume Event. - * - * This event is dispatched when the game loop leaves a paused state and resumes running. - */ - const RESUME: any; - - /** - * The Game Step Event. - * - * This event is dispatched after the Game Pre-Step and before the Scene Manager steps. - * Hook into it from plugins or systems that need to update before the Scene Manager does, but after the core Systems have. - */ - const STEP: any; - - /** - * The Game Visible Event. - * - * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded - * enters a visible state, previously having been hidden. - * - * Only browsers that support the Visibility API will cause this event to be emitted. - */ - const VISIBLE: any; - - } - } namespace Create { @@ -5087,7 +5100,7 @@ declare namespace Phaser { class Curve { /** * - * @param type [description] + * @param type The curve type. */ constructor(type: string); @@ -5117,7 +5130,7 @@ declare namespace Phaser { needsUpdate: boolean; /** - * [description] + * For a curve on a Path, `false` means the Path will ignore this curve. */ active: boolean; @@ -5149,7 +5162,7 @@ declare namespace Phaser { getDistancePoints(distance: integer): Phaser.Geom.Point[]; /** - * [description] + * Get a point at the end of the curve. * @param out Optional Vector object to store the result in. */ getEndPoint(out?: Phaser.Math.Vector2): Phaser.Math.Vector2; @@ -5160,60 +5173,80 @@ declare namespace Phaser { getLength(): number; /** - * Get list of cumulative segment lengths - * @param divisions [description] + * Get a list of cumulative segment lengths. + * + * These lengths are + * + * - [0] 0 + * - [1] The first segment + * - [2] The first and second segment + * - ... + * - [divisions] All segments + * @param divisions The number of divisions or segments. */ getLengths(divisions?: integer): number[]; /** - * [description] - * @param u [description] - * @param out [description] + * Get a point at a relative position on the curve, by arc length. + * @param u The relative position, [0..1]. + * @param out A point to store the result in. */ getPointAt(u: number, out?: O): O; /** - * [description] - * @param divisions The number of evenly spaced points from the curve to return. If falsy, step param will be used to calculate the number of points. - * @param step Step between points. Used to calculate the number of points to return when divisions is falsy. Ignored if divisions is positive. + * Get a sequence of evenly spaced points from the curve. + * + * You can pass `divisions`, `stepRate`, or neither. + * + * The number of divisions will be + * + * 1. `divisions`, if `divisions` > 0; or + * 2. `this.getLength / stepRate`, if `stepRate` > 0; or + * 3. `this.defaultDivisions` + * + * `1 + divisions` points will be returned. + * @param divisions The number of divisions to make. + * @param stepRate The curve distance between points, implying `divisions`. * @param out An optional array to store the points in. */ - getPoints(divisions: integer, step: number, out?: O): O; + getPoints(divisions?: integer, stepRate?: number, out?: O): O; /** - * [description] - * @param out [description] + * Get a random point from the curve. + * @param out A point object to store the result in. */ getRandomPoint(out?: O): O; /** - * [description] - * @param divisions The number of evenly spaced points from the curve to return. If falsy, step param will be used to calculate the number of points. - * @param step Step between points. Used to calculate the number of points to return when divisions is falsy. Ignored if divisions is positive. + * Get a sequence of equally spaced points (by arc distance) from the curve. + * + * `1 + divisions` points will be returned. + * @param divisions The number of divisions to make. Default this.defaultDivisions. + * @param stepRate Step between points. Used to calculate the number of points to return when divisions is falsy. Ignored if divisions is positive. * @param out An optional array to store the points in. */ - getSpacedPoints(divisions?: integer, step?: number, out?: any[] | Phaser.Math.Vector2[]): Phaser.Math.Vector2[]; + getSpacedPoints(divisions?: integer, stepRate?: number, out?: any[] | Phaser.Math.Vector2[]): Phaser.Math.Vector2[]; /** - * [description] - * @param out [description] + * Get a point at the start of the curve. + * @param out A point to store the result in. */ getStartPoint(out?: O): O; /** - * Returns a unit vector tangent at t + * Get a unit vector tangent at a relative position on the curve. * In case any sub curve does not implement its tangent derivation, * 2 points a small delta apart will be used to find its gradient * which seems to give a reasonable approximation - * @param t [description] - * @param out [description] + * @param t The relative position on the curve, [0..1]. + * @param out A vector to store the result in. */ getTangent(t: number, out?: O): O; /** - * [description] - * @param u [description] - * @param out [description] + * Get a unit vector tangent at a relative position on the curve, by arc length. + * @param u The relative position on the curve, [0..1]. + * @param out A vector to store the result in. */ getTangentAt(u: number, out?: O): O; @@ -5233,7 +5266,7 @@ declare namespace Phaser { getUtoTmapping(u: number, distance: integer, divisions?: integer): number; /** - * [description] + * Calculate and cache the arc lengths. */ updateArcLengths(): void; @@ -5481,132 +5514,6 @@ declare namespace Phaser { } - /** - * [description] - */ - class QuadraticBezier extends Phaser.Curves.Curve { - /** - * - * @param p0 Start point, or an array of point pairs. - * @param p1 Control Point 1. - * @param p2 Control Point 2. - */ - constructor(p0: Phaser.Math.Vector2 | number[], p1: Phaser.Math.Vector2, p2: Phaser.Math.Vector2); - - /** - * [description] - */ - p0: Phaser.Math.Vector2; - - /** - * [description] - */ - p1: Phaser.Math.Vector2; - - /** - * [description] - */ - p2: Phaser.Math.Vector2; - - /** - * Gets the starting point on the curve. - * @param out A Vector2 object to store the result in. If not given will be created. - */ - getStartPoint(out?: O): O; - - /** - * [description] - * @param divisions [description] - */ - getResolution(divisions: number): number; - - /** - * Get point at relative position in curve according to length. - * @param t The position along the curve to return. Where 0 is the start and 1 is the end. - * @param out A Vector2 object to store the result in. If not given will be created. - */ - getPoint(t: number, out?: O): O; - - /** - * [description] - * @param graphics `Graphics` object to draw onto. - * @param pointsTotal Number of points to be used for drawing the curve. Higher numbers result in smoother curve but require more processing. Default 32. - */ - draw(graphics: G, pointsTotal?: integer): G; - - /** - * Converts the curve into a JSON compatible object. - */ - toJSON(): Phaser.Types.Curves.JSONCurve; - - /** - * Creates a curve from a JSON object, e. g. created by `toJSON`. - * @param data The JSON object containing this curve data. - */ - static fromJSON(data: Phaser.Types.Curves.JSONCurve): Phaser.Curves.QuadraticBezier; - - } - - /** - * [description] - */ - class Spline extends Phaser.Curves.Curve { - /** - * - * @param points [description] - */ - constructor(points?: Phaser.Math.Vector2[]); - - /** - * [description] - */ - points: Phaser.Math.Vector2[]; - - /** - * [description] - * @param points [description] - */ - addPoints(points: Phaser.Math.Vector2[] | number[] | number[][]): Phaser.Curves.Spline; - - /** - * [description] - * @param x [description] - * @param y [description] - */ - addPoint(x: number, y: number): Phaser.Math.Vector2; - - /** - * Gets the starting point on the curve. - * @param out A Vector2 object to store the result in. If not given will be created. - */ - getStartPoint(out?: O): O; - - /** - * [description] - * @param divisions [description] - */ - getResolution(divisions: number): number; - - /** - * Get point at relative position in curve according to length. - * @param t The position along the curve to return. Where 0 is the start and 1 is the end. - * @param out A Vector2 object to store the result in. If not given will be created. - */ - getPoint(t: number, out?: O): O; - - /** - * [description] - */ - toJSON(): Phaser.Types.Curves.JSONCurve; - - /** - * [description] - * @param data The JSON object containing this curve data. - */ - static fromJSON(data: Phaser.Types.Curves.JSONCurve): Phaser.Curves.Spline; - - } - /** * A MoveTo Curve is a very simple curve consisting of only a single point. Its intended use is to move the ending point in a Path. */ @@ -5731,12 +5638,12 @@ declare namespace Phaser { /** * Creates a cubic bezier curve starting at the previous end point and ending at p3, using p1 and p2 as control points. - * @param x The x coordinate of the end point. Or, if a Vec2, the p1 value. - * @param y The y coordinate of the end point. Or, if a Vec2, the p2 value. - * @param control1X The x coordinate of the first control point. Or, if a Vec2, the p3 value. - * @param control1Y The y coordinate of the first control point. Not used if vec2s are provided as the first 3 arguments. - * @param control2X The x coordinate of the second control point. Not used if vec2s are provided as the first 3 arguments. - * @param control2Y The y coordinate of the second control point. Not used if vec2s are provided as the first 3 arguments. + * @param x The x coordinate of the end point. Or, if a Vector2, the p1 value. + * @param y The y coordinate of the end point. Or, if a Vector2, the p2 value. + * @param control1X The x coordinate of the first control point. Or, if a Vector2, the p3 value. + * @param control1Y The y coordinate of the first control point. Not used if Vector2s are provided as the first 3 arguments. + * @param control2X The x coordinate of the second control point. Not used if Vector2s are provided as the first 3 arguments. + * @param control2Y The y coordinate of the second control point. Not used if Vector2s are provided as the first 3 arguments. */ cubicBezierTo(x: number | Phaser.Math.Vector2, y: number | Phaser.Math.Vector2, control1X: number | Phaser.Math.Vector2, control1Y?: number, control2X?: number, control2Y?: number): Phaser.Curves.Path; @@ -5812,10 +5719,8 @@ declare namespace Phaser { getPoint(t: number, out?: O): O; /** - * Returns the defined starting point of the Path. - * - * This is not necessarily equal to the starting point of the first Curve if it differs from {@link startPoint}. - * @param divisions The number of points to divide the path in to. Default 12. + * Get a sequence of points on the path. + * @param divisions The number of divisions per resolution per curve. Default 12. */ getPoints(divisions?: integer): Phaser.Math.Vector2[]; @@ -5880,6 +5785,132 @@ declare namespace Phaser { } + /** + * [description] + */ + class QuadraticBezier extends Phaser.Curves.Curve { + /** + * + * @param p0 Start point, or an array of point pairs. + * @param p1 Control Point 1. + * @param p2 Control Point 2. + */ + constructor(p0: Phaser.Math.Vector2 | number[], p1: Phaser.Math.Vector2, p2: Phaser.Math.Vector2); + + /** + * [description] + */ + p0: Phaser.Math.Vector2; + + /** + * [description] + */ + p1: Phaser.Math.Vector2; + + /** + * [description] + */ + p2: Phaser.Math.Vector2; + + /** + * Gets the starting point on the curve. + * @param out A Vector2 object to store the result in. If not given will be created. + */ + getStartPoint(out?: O): O; + + /** + * [description] + * @param divisions [description] + */ + getResolution(divisions: number): number; + + /** + * Get point at relative position in curve according to length. + * @param t The position along the curve to return. Where 0 is the start and 1 is the end. + * @param out A Vector2 object to store the result in. If not given will be created. + */ + getPoint(t: number, out?: O): O; + + /** + * [description] + * @param graphics `Graphics` object to draw onto. + * @param pointsTotal Number of points to be used for drawing the curve. Higher numbers result in smoother curve but require more processing. Default 32. + */ + draw(graphics: G, pointsTotal?: integer): G; + + /** + * Converts the curve into a JSON compatible object. + */ + toJSON(): Phaser.Types.Curves.JSONCurve; + + /** + * Creates a curve from a JSON object, e. g. created by `toJSON`. + * @param data The JSON object containing this curve data. + */ + static fromJSON(data: Phaser.Types.Curves.JSONCurve): Phaser.Curves.QuadraticBezier; + + } + + /** + * Create a smooth 2d spline curve from a series of points. + */ + class Spline extends Phaser.Curves.Curve { + /** + * + * @param points The points that configure the curve. + */ + constructor(points?: Phaser.Math.Vector2[] | number[] | number[][]); + + /** + * The Vector2 points that configure the curve. + */ + points: Phaser.Math.Vector2[]; + + /** + * Add a list of points to the current list of Vector2 points of the curve. + * @param points The points that configure the curve. + */ + addPoints(points: Phaser.Math.Vector2[] | number[] | number[][]): Phaser.Curves.Spline; + + /** + * Add a point to the current list of Vector2 points of the curve. + * @param x The x coordinate of this curve + * @param y The y coordinate of this curve + */ + addPoint(x: number, y: number): Phaser.Math.Vector2; + + /** + * Gets the starting point on the curve. + * @param out A Vector2 object to store the result in. If not given will be created. + */ + getStartPoint(out?: O): O; + + /** + * [description] + * @param divisions [description] + */ + getResolution(divisions: number): number; + + /** + * Get point at relative position in curve according to length. + * @param t The position along the curve to return. Where 0 is the start and 1 is the end. + * @param out A Vector2 object to store the result in. If not given will be created. + */ + getPoint(t: number, out?: O): O; + + /** + * Exports a JSON object containing this curve data. + */ + toJSON(): Phaser.Types.Curves.JSONCurve; + + /** + * Imports a JSON object containing this curve data. + * @param data The JSON object containing this curve data. + */ + static fromJSON(data: Phaser.Types.Curves.JSONCurve): Phaser.Curves.Spline; + + } + } namespace Data { @@ -6779,6 +6810,17 @@ declare namespace Phaser { */ function LeftTop(gameObject: G, alignTo: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G; + /** + * Takes a Game Object and aligns it next to another, at the given position. + * The alignment used is based on the `position` argument, which is a `Phaser.Display.Align` property such as `LEFT_CENTER` or `TOP_RIGHT`. + * @param child The Game Object that will be positioned. + * @param alignTo The Game Object to base the alignment position on. + * @param position The position to align the Game Object with. This is an align constant, such as `Phaser.Display.Align.LEFT_CENTER`. + * @param offsetX Optional horizontal offset from the position. Default 0. + * @param offsetY Optional vertical offset from the position. Default 0. + */ + function QuickSet(child: G, alignTo: Phaser.GameObjects.GameObject, position: integer, offsetX?: number, offsetY?: number): G; + /** * Takes given Game Object and aligns it so that it is positioned next to the right bottom position of the other. * @param gameObject The Game Object that will be positioned. @@ -7334,6 +7376,16 @@ declare namespace Phaser { */ static GetColor32(red: integer, green: integer, blue: integer, alpha: integer): number; + /** + * Converts a hex string into a Phaser Color object. + * + * The hex string can supplied as `'#0033ff'` or the short-hand format of `'#03f'`; it can begin with an optional "#" or "0x", or be unprefixed. + * + * An alpha channel is _not_ supported. + * @param hex The hex color value to convert, such as `#0033ff` or the short-hand format: `#03f`. + */ + static HexStringToColor(hex: string): Phaser.Display.Color; + /** * Converts HSL (hue, saturation and lightness) values to a Phaser Color object. * @param h The hue value in the range 0 to 1. @@ -7361,16 +7413,6 @@ declare namespace Phaser { */ static HSVToRGB(h: number, s: number, v: number, out?: Phaser.Types.Display.ColorObject | Phaser.Display.Color): Phaser.Types.Display.ColorObject | Phaser.Display.Color; - /** - * Converts a hex string into a Phaser Color object. - * - * The hex string can supplied as `'#0033ff'` or the short-hand format of `'#03f'`; it can begin with an optional "#" or "0x", or be unprefixed. - * - * An alpha channel is _not_ supported. - * @param hex The hex color value to convert, such as `#0033ff` or the short-hand format: `#03f`. - */ - static HexStringToColor(hex: string): Phaser.Display.Color; - /** * Converts a hue to an RGB color. * Based on code by Michael Jackson (https://github.com/mjijackson) @@ -7397,6 +7439,14 @@ declare namespace Phaser { */ static ObjectToColor(input: Phaser.Types.Display.InputColorObject): Phaser.Display.Color; + /** + * Creates a new Color object where the r, g, and b values have been set to random values + * based on the given min max values. + * @param min The minimum value to set the random range from (between 0 and 255) Default 0. + * @param max The maximum value to set the random range from (between 0 and 255) Default 255. + */ + static RandomRGB(min?: integer, max?: integer): Phaser.Display.Color; + /** * Converts a CSS 'web' string into a Phaser Color object. * @@ -7427,14 +7477,6 @@ declare namespace Phaser { */ static RGBToString(r: integer, g: integer, b: integer, a?: integer, prefix?: string): string; - /** - * Creates a new Color object where the r, g, and b values have been set to random values - * based on the given min max values. - * @param min The minimum value to set the random range from (between 0 and 255) Default 0. - * @param max The maximum value to set the random range from (between 0 and 255) Default 255. - */ - static RandomRGB(min?: integer, max?: integer): Phaser.Display.Color; - /** * Converts the given source color value into an instance of a Color class. * The value can be either a string, prefixed with `rgb` or a hex string, a number or an Object. @@ -7956,1472 +7998,6 @@ declare namespace Phaser { } namespace GameObjects { - /** - * Builds a Game Object using the provided configuration object. - * @param scene A reference to the Scene. - * @param gameObject The initial GameObject. - * @param config The config to build the GameObject with. - */ - function BuildGameObject(scene: Phaser.Scene, gameObject: Phaser.GameObjects.GameObject, config: Phaser.Types.GameObjects.GameObjectConfig): Phaser.GameObjects.GameObject; - - /** - * Adds an Animation component to a Sprite and populates it based on the given config. - * @param sprite The sprite to add an Animation component to. - * @param config The animation config. - */ - function BuildGameObjectAnimation(sprite: Phaser.GameObjects.Sprite, config: object): Phaser.GameObjects.Sprite; - - /** - * The Display List plugin. - * - * Display Lists belong to a Scene and maintain the list of Game Objects to render every frame. - * - * Some of these Game Objects may also be part of the Scene's [Update List]{@link Phaser.GameObjects.UpdateList}, for updating. - */ - class DisplayList extends Phaser.Structs.List { - /** - * - * @param scene The Scene that this Display List belongs to. - */ - constructor(scene: Phaser.Scene); - - /** - * The flag the determines whether Game Objects should be sorted when `depthSort()` is called. - */ - sortChildrenFlag: boolean; - - /** - * The Scene that this Display List belongs to. - */ - scene: Phaser.Scene; - - /** - * The Scene's Systems. - */ - systems: Phaser.Scenes.Systems; - - /** - * Force a sort of the display list on the next call to depthSort. - */ - queueDepthSort(): void; - - /** - * Immediately sorts the display list if the flag is set. - */ - depthSort(): void; - - /** - * Compare the depth of two Game Objects. - * @param childA The first Game Object. - * @param childB The second Game Object. - */ - sortByDepth(childA: Phaser.GameObjects.GameObject, childB: Phaser.GameObjects.GameObject): integer; - - /** - * Returns an array which contains all objects currently on the Display List. - * This is a reference to the main list array, not a copy of it, so be careful not to modify it. - */ - getChildren(): Phaser.GameObjects.GameObject[]; - - } - - /** - * The base class that all Game Objects extend. - * You don't create GameObjects directly and they cannot be added to the display list. - * Instead, use them as the base for your own custom classes. - */ - class GameObject extends Phaser.Events.EventEmitter { - /** - * - * @param scene The Scene to which this Game Object belongs. - * @param type A textual representation of the type of Game Object, i.e. `sprite`. - */ - constructor(scene: Phaser.Scene, type: string); - - /** - * The Scene to which this Game Object belongs. - * Game Objects can only belong to one Scene. - */ - protected scene: Phaser.Scene; - - /** - * A textual representation of this Game Object, i.e. `sprite`. - * Used internally by Phaser but is available for your own custom classes to populate. - */ - type: string; - - /** - * The current state of this Game Object. - * - * Phaser itself will never modify this value, although plugins may do so. - * - * Use this property to track the state of a Game Object during its lifetime. For example, it could change from - * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant - * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons. - * If you need to store complex data about your Game Object, look at using the Data Component instead. - */ - state: integer | string; - - /** - * The parent Container of this Game Object, if it has one. - */ - parentContainer: Phaser.GameObjects.Container; - - /** - * The name of this Game Object. - * Empty by default and never populated by Phaser, this is left for developers to use. - */ - name: string; - - /** - * The active state of this Game Object. - * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it. - * An active object is one which is having its logic and internal systems updated. - */ - active: boolean; - - /** - * The Tab Index of the Game Object. - * Reserved for future use by plugins and the Input Manager. - */ - tabIndex: integer; - - /** - * A Data Manager. - * It allows you to store, query and get key/value paired information specific to this Game Object. - * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`. - */ - data: Phaser.Data.DataManager; - - /** - * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not. - * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively. - * If those components are not used by your custom class then you can use this bitmask as you wish. - */ - renderFlags: integer; - - /** - * A bitmask that controls if this Game Object is drawn by a Camera or not. - * Not usually set directly, instead call `Camera.ignore`, however you can - * set this property directly using the Camera.id property: - */ - cameraFilter: number; - - /** - * If this Game Object is enabled for input then this property will contain an InteractiveObject instance. - * Not usually set directly. Instead call `GameObject.setInteractive()`. - */ - input: Phaser.Types.Input.InteractiveObject; - - /** - * If this Game Object is enabled for physics then this property will contain a reference to a Physics Body. - */ - body: object | Phaser.Physics.Arcade.Body | Phaser.Physics.Impact.Body; - - /** - * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`. - * This includes calls that may come from a Group, Container or the Scene itself. - * While it allows you to persist a Game Object across Scenes, please understand you are entirely - * responsible for managing references to and from this Game Object. - */ - ignoreDestroy: boolean; - - /** - * Sets the `active` property of this Game Object and returns this Game Object for further chaining. - * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList. - * @param value True if this Game Object should be set as active, false if not. - */ - setActive(value: boolean): this; - - /** - * Sets the `name` property of this Game Object and returns this Game Object for further chaining. - * The `name` property is not populated by Phaser and is presented for your own use. - * @param value The name to be given to this Game Object. - */ - setName(value: string): this; - - /** - * Sets the current state of this Game Object. - * - * Phaser itself will never modify the State of a Game Object, although plugins may do so. - * - * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'. - * The state value should typically be an integer (ideally mapped to a constant - * in your game code), but could also be a string. It is recommended to keep it light and simple. - * If you need to store complex data about your Game Object, look at using the Data Component instead. - * @param value The state of the Game Object. - */ - setState(value: integer | string): this; - - /** - * Adds a Data Manager component to this Game Object. - */ - setDataEnabled(): this; - - /** - * Allows you to store a key value pair within this Game Objects Data Manager. - * - * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled - * before setting the value. - * - * If the key doesn't already exist in the Data Manager then it is created. - * - * ```javascript - * sprite.setData('name', 'Red Gem Stone'); - * ``` - * - * You can also pass in an object of key value pairs as the first argument: - * - * ```javascript - * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 }); - * ``` - * - * To get a value back again you can call `getData`: - * - * ```javascript - * sprite.getData('gold'); - * ``` - * - * Or you can access the value directly via the `values` property, where it works like any other variable: - * - * ```javascript - * sprite.data.values.gold += 50; - * ``` - * - * When the value is first set, a `setdata` event is emitted from this Game Object. - * - * If the key already exists, a `changedata` event is emitted instead, along an event named after the key. - * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`. - * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter. - * - * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings. - * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager. - * @param key The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored. - * @param data The value to set for the given key. If an object is provided as the key this argument is ignored. - */ - setData(key: string | object, data?: any): this; - - /** - * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist. - * - * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either: - * - * ```javascript - * sprite.getData('gold'); - * ``` - * - * Or access the value directly: - * - * ```javascript - * sprite.data.values.gold; - * ``` - * - * You can also pass in an array of keys, in which case an array of values will be returned: - * - * ```javascript - * sprite.getData([ 'gold', 'armor', 'health' ]); - * ``` - * - * This approach is useful for destructuring arrays in ES6. - * @param key The key of the value to retrieve, or an array of keys. - */ - getData(key: string | string[]): any; - - /** - * Pass this Game Object to the Input Manager to enable it for Input. - * - * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area - * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced - * input detection. - * - * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If - * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific - * shape for it to use. - * - * You can also provide an Input Configuration Object as the only argument to this method. - * @param shape Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used. - * @param callback A callback to be invoked when the Game Object is interacted with. If you provide a shape you must also provide a callback. - * @param dropZone Should this Game Object be treated as a drop zone target? Default false. - */ - setInteractive(shape?: Phaser.Types.Input.InputConfiguration | any, callback?: Phaser.Types.Input.HitAreaCallback, dropZone?: boolean): this; - - /** - * If this Game Object has previously been enabled for input, this will disable it. - * - * An object that is disabled for input stops processing or being considered for - * input events, but can be turned back on again at any time by simply calling - * `setInteractive()` with no arguments provided. - * - * If want to completely remove interaction from this Game Object then use `removeInteractive` instead. - */ - disableInteractive(): this; - - /** - * If this Game Object has previously been enabled for input, this will queue it - * for removal, causing it to no longer be interactive. The removal happens on - * the next game step, it is not immediate. - * - * The Interactive Object that was assigned to this Game Object will be destroyed, - * removed from the Input Manager and cleared from this Game Object. - * - * If you wish to re-enable this Game Object at a later date you will need to - * re-create its InteractiveObject by calling `setInteractive` again. - * - * If you wish to only temporarily stop an object from receiving input then use - * `disableInteractive` instead, as that toggles the interactive state, where-as - * this erases it completely. - * - * If you wish to resize a hit area, don't remove and then set it as being - * interactive. Instead, access the hitarea object directly and resize the shape - * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the - * shape is a Rectangle, which it is by default.) - */ - removeInteractive(): this; - - /** - * To be overridden by custom GameObjects. Allows base objects to be used in a Pool. - * @param args args - */ - update(...args: any[]): void; - - /** - * Returns a JSON representation of the Game Object. - */ - toJSON(): Phaser.Types.GameObjects.JSONGameObject; - - /** - * Compares the renderMask with the renderFlags to see if this Game Object will render or not. - * Also checks the Game Object against the given Cameras exclusion list. - * @param camera The Camera to check against this Game Object. - */ - willRender(camera: Phaser.Cameras.Scene2D.Camera): boolean; - - /** - * Returns an array containing the display list index of either this Game Object, or if it has one, - * its parent Container. It then iterates up through all of the parent containers until it hits the - * root of the display list (which is index 0 in the returned array). - * - * Used internally by the InputPlugin but also useful if you wish to find out the display depth of - * this Game Object and all of its ancestors. - */ - getIndexList(): integer[]; - - /** - * Destroys this Game Object removing it from the Display List and Update List and - * severing all ties to parent resources. - * - * Also removes itself from the Input Manager and Physics Manager if previously enabled. - * - * Use this to remove a Game Object from your game if you don't ever plan to use it again. - * As long as no reference to it exists within your own code it should become free for - * garbage collection by the browser. - * - * If you just want to temporarily disable an object then look at using the - * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected. - * @param fromScene Is this Game Object being destroyed as the result of a Scene shutdown? Default false. - */ - destroy(fromScene?: boolean): void; - - /** - * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not. - */ - static readonly RENDER_MASK: integer; - - } - - /** - * The Game Object Creator is a Scene plugin that allows you to quickly create many common - * types of Game Objects and return them. Unlike the Game Object Factory, they are not automatically - * added to the Scene. - * - * Game Objects directly register themselves with the Creator and inject their own creation - * methods into the class. - */ - class GameObjectCreator { - /** - * - * @param scene The Scene to which this Game Object Factory belongs. - */ - constructor(scene: Phaser.Scene); - - /** - * The Scene to which this Game Object Creator belongs. - */ - protected scene: Phaser.Scene; - - /** - * A reference to the Scene.Systems. - */ - protected systems: Phaser.Scenes.Systems; - - /** - * A reference to the Scene Display List. - */ - protected displayList: Phaser.GameObjects.DisplayList; - - /** - * A reference to the Scene Update List. - */ - protected updateList: Phaser.GameObjects.UpdateList; - - /** - * Creates a new Dynamic Bitmap Text Game Object and returns it. - * - * Note: This method will only be available if the Dynamic Bitmap Text Game Object has been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - */ - dynamicBitmapText(config: Phaser.Types.GameObjects.BitmapText.BitmapTextConfig, addToScene?: boolean): Phaser.GameObjects.DynamicBitmapText; - - /** - * Creates a new Bitmap Text Game Object and returns it. - * - * Note: This method will only be available if the Bitmap Text Game Object has been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - */ - bitmapText(config: Phaser.Types.GameObjects.BitmapText.BitmapTextConfig, addToScene?: boolean): Phaser.GameObjects.BitmapText; - - /** - * Creates a new Blitter Game Object and returns it. - * - * Note: This method will only be available if the Blitter Game Object has been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - */ - blitter(config: object, addToScene?: boolean): Phaser.GameObjects.Blitter; - - /** - * Creates a new Container Game Object and returns it. - * - * Note: This method will only be available if the Container Game Object has been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - */ - container(config: object, addToScene?: boolean): Phaser.GameObjects.Container; - - /** - * Creates a new Graphics Game Object and returns it. - * - * Note: This method will only be available if the Graphics Game Object has been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - */ - graphics(config: object, addToScene?: boolean): Phaser.GameObjects.Graphics; - - /** - * Creates a new Group Game Object and returns it. - * - * Note: This method will only be available if the Group Game Object has been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - */ - group(config: Phaser.Types.GameObjects.Group.GroupConfig | Phaser.Types.GameObjects.Group.GroupCreateConfig): Phaser.GameObjects.Group; - - /** - * Creates a new Image Game Object and returns it. - * - * Note: This method will only be available if the Image Game Object has been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - */ - image(config: object, addToScene?: boolean): Phaser.GameObjects.Image; - - /** - * Creates a new Mesh Game Object and returns it. - * - * Note: This method will only be available if the Mesh Game Object and WebGL support have been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - */ - mesh(config: object, addToScene?: boolean): Phaser.GameObjects.Mesh; - - /** - * Creates a new Particle Emitter Manager Game Object and returns it. - * - * Note: This method will only be available if the Particles Game Object has been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - */ - particles(config: object, addToScene?: boolean): Phaser.GameObjects.Particles.ParticleEmitterManager; - - /** - * Creates a new Quad Game Object and returns it. - * - * Note: This method will only be available if the Quad Game Object and WebGL support have been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - */ - quad(config: object, addToScene?: boolean): Phaser.GameObjects.Quad; - - /** - * Creates a new Render Texture Game Object and returns it. - * - * Note: This method will only be available if the Render Texture Game Object has been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - */ - renderTexture(config: Phaser.Types.GameObjects.RenderTexture.RenderTextureConfig, addToScene?: boolean): Phaser.GameObjects.RenderTexture; - - /** - * Creates a new Shader Game Object and returns it. - * - * Note: This method will only be available if the Shader Game Object and WebGL support have been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - */ - shader(config: object, addToScene?: boolean): Phaser.GameObjects.Shader; - - /** - * Creates a new Sprite Game Object and returns it. - * - * Note: This method will only be available if the Sprite Game Object has been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - */ - sprite(config: Phaser.Types.GameObjects.Sprite.SpriteConfig, addToScene?: boolean): Phaser.GameObjects.Sprite; - - /** - * Creates a new Text Game Object and returns it. - * - * Note: This method will only be available if the Text Game Object has been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - */ - text(config: object, addToScene?: boolean): Phaser.GameObjects.Text; - - /** - * Creates a new TileSprite Game Object and returns it. - * - * Note: This method will only be available if the TileSprite Game Object has been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - */ - tileSprite(config: Phaser.Types.GameObjects.TileSprite.TileSpriteConfig, addToScene?: boolean): Phaser.GameObjects.TileSprite; - - /** - * Creates a new Video Game Object and returns it. - * - * Note: This method will only be available if the Video Game Object has been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - */ - video(config: object, addToScene?: boolean): Phaser.GameObjects.Video; - - /** - * Creates a new Zone Game Object and returns it. - * - * Note: This method will only be available if the Zone Game Object has been built into Phaser. - * @param config The configuration object this Game Object will use to create itself. - */ - zone(config: object): Phaser.GameObjects.Zone; - - /** - * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. - * When loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing - * from a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the map - * data. For an empty map, you should specify tileWidth, tileHeight, width & height. - * @param config The config options for the Tilemap. - */ - tilemap(config?: Phaser.Types.Tilemaps.TilemapConfig): Phaser.Tilemaps.Tilemap; - - /** - * Creates a new Tween object and returns it. - * - * Note: This method will only be available if Tweens have been built into Phaser. - * @param config The Tween configuration. - */ - tween(config: Phaser.Types.Tweens.TweenBuilderConfig | object): Phaser.Tweens.Tween; - - } - - /** - * The Game Object Factory is a Scene plugin that allows you to quickly create many common - * types of Game Objects and have them automatically registered with the Scene. - * - * Game Objects directly register themselves with the Factory and inject their own creation - * methods into the class. - */ - class GameObjectFactory { - /** - * - * @param scene The Scene to which this Game Object Factory belongs. - */ - constructor(scene: Phaser.Scene); - - /** - * Creates a new Path Object. - * @param x The horizontal position of this Path. - * @param y The vertical position of this Path. - */ - path(x: number, y: number): Phaser.Curves.Path; - - /** - * The Scene to which this Game Object Factory belongs. - */ - protected scene: Phaser.Scene; - - /** - * A reference to the Scene.Systems. - */ - protected systems: Phaser.Scenes.Systems; - - /** - * A reference to the Scene Display List. - */ - protected displayList: Phaser.GameObjects.DisplayList; - - /** - * A reference to the Scene Update List. - */ - protected updateList: Phaser.GameObjects.UpdateList; - - /** - * Adds an existing Game Object to this Scene. - * - * If the Game Object renders, it will be added to the Display List. - * If it has a `preUpdate` method, it will be added to the Update List. - * @param child The child to be added to this Scene. - */ - existing(child: Phaser.GameObjects.GameObject): Phaser.GameObjects.GameObject; - - /** - * Static method called directly by the Game Object factory functions. - * With this method you can register a custom GameObject factory in the GameObjectFactory, - * providing a name (`factoryType`) and the constructor (`factoryFunction`) in order - * to be called when you call to Phaser.Scene.add[ factoryType ] method. - * @param factoryType The key of the factory that you will use to call to Phaser.Scene.add[ factoryType ] method. - * @param factoryFunction The constructor function to be called when you invoke to the Phaser.Scene.add method. - */ - static register(factoryType: string, factoryFunction: Function): void; - - /** - * Static method called directly by the Game Object factory functions. - * With this method you can remove a custom GameObject factory registered in the GameObjectFactory, - * providing a its `factoryType`. - * @param factoryType The key of the factory that you want to remove from the GameObjectFactory. - */ - static remove(factoryType: string): void; - - /** - * Creates a new Dynamic Bitmap Text Game Object and adds it to the Scene. - * - * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure. - * - * During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to - * match the font structure. - * - * Dynamic Bitmap Text objects are different from Static Bitmap Text in that they invoke a callback for each - * letter being rendered during the render pass. This callback allows you to manipulate the properties of - * each letter being rendered, such as its position, scale or tint, allowing you to create interesting effects - * like jiggling text, which can't be done with Static text. This means that Dynamic Text takes more processing - * time, so only use them if you require the callback ability they have. - * - * BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability - * to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by - * processing the font texture in an image editor, applying fills and any other effects required. - * - * To create multi-line text insert \r, \n or \r\n escape codes into the text string. - * - * To create a BitmapText data files you need a 3rd party app such as: - * - * BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ - * Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner - * Littera (Web-based, free): http://kvazars.com/littera/ - * - * For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of - * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson - * - * Note: This method will only be available if the Dynamic Bitmap Text Game Object has been built into Phaser. - * @param x The x position of the Game Object. - * @param y The y position of the Game Object. - * @param font The key of the font to use from the BitmapFont cache. - * @param text The string, or array of strings, to be set as the content of this Bitmap Text. - * @param size The font size to set. - */ - dynamicBitmapText(x: number, y: number, font: string, text?: string | string[], size?: number): Phaser.GameObjects.DynamicBitmapText; - - /** - * Creates a new Bitmap Text Game Object and adds it to the Scene. - * - * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure. - * - * During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to - * match the font structure. - * - * BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability - * to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by - * processing the font texture in an image editor, applying fills and any other effects required. - * - * To create multi-line text insert \r, \n or \r\n escape codes into the text string. - * - * To create a BitmapText data files you need a 3rd party app such as: - * - * BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ - * Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner - * Littera (Web-based, free): http://kvazars.com/littera/ - * - * For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of - * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson - * - * Note: This method will only be available if the Bitmap Text Game Object has been built into Phaser. - * @param x The x position of the Game Object. - * @param y The y position of the Game Object. - * @param font The key of the font to use from the BitmapFont cache. - * @param text The string, or array of strings, to be set as the content of this Bitmap Text. - * @param size The font size to set. - * @param align The alignment of the text in a multi-line BitmapText object. Default 0. - */ - bitmapText(x: number, y: number, font: string, text?: string | string[], size?: number, align?: integer): Phaser.GameObjects.BitmapText; - - /** - * Creates a new Blitter Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Blitter Game Object has been built into Phaser. - * @param x The x position of the Game Object. - * @param y The y position of the Game Object. - * @param key The key of the Texture the Blitter object will use. - * @param frame The default Frame children of the Blitter will use. - */ - blitter(x: number, y: number, key: string, frame?: string | integer): Phaser.GameObjects.Blitter; - - /** - * Creates a new Container Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Container Game Object has been built into Phaser. - * @param x The horizontal position of this Game Object in the world. - * @param y The vertical position of this Game Object in the world. - * @param children An optional array of Game Objects to add to this Container. - */ - container(x: number, y: number, children?: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[]): Phaser.GameObjects.Container; - - /** - * DOM Element Game Objects are a way to control and manipulate HTML Elements over the top of your game. - * - * In order for DOM Elements to display you have to enable them by adding the following to your game - * configuration object: - * - * ```javascript - * dom { - * createContainer: true - * } - * ``` - * - * When this is added, Phaser will automatically create a DOM Container div that is positioned over the top - * of the game canvas. This div is sized to match the canvas, and if the canvas size changes, as a result of - * settings within the Scale Manager, the dom container is resized accordingly. - * - * You can create a DOM Element by either passing in DOMStrings, or by passing in a reference to an existing - * Element that you wish to be placed under the control of Phaser. For example: - * - * ```javascript - * this.add.dom(x, y, 'div', 'background-color: lime; width: 220px; height: 100px; font: 48px Arial', 'Phaser'); - * ``` - * - * The above code will insert a div element into the DOM Container at the given x/y coordinate. The DOMString in - * the 4th argument sets the initial CSS style of the div and the final argument is the inner text. In this case, - * it will create a lime colored div that is 220px by 100px in size with the text Phaser in it, in an Arial font. - * - * You should nearly always, without exception, use explicitly sized HTML Elements, in order to fully control - * alignment and positioning of the elements next to regular game content. - * - * Rather than specify the CSS and HTML directly you can use the `load.html` File Loader to load it into the - * cache and then use the `createFromCache` method instead. You can also use `createFromHTML` and various other - * methods available in this class to help construct your elements. - * - * Once the element has been created you can then control it like you would any other Game Object. You can set its - * position, scale, rotation, alpha and other properties. It will move as the main Scene Camera moves and be clipped - * at the edge of the canvas. It's important to remember some limitations of DOM Elements: The obvious one is that - * they appear above or below your game canvas. You cannot blend them into the display list, meaning you cannot have - * a DOM Element, then a Sprite, then another DOM Element behind it. - * - * They also cannot be enabled for input. To do that, you have to use the `addListener` method to add native event - * listeners directly. The final limitation is to do with cameras. The DOM Container is sized to match the game canvas - * entirely and clipped accordingly. DOM Elements respect camera scrolling and scrollFactor settings, but if you - * change the size of the camera so it no longer matches the size of the canvas, they won't be clipped accordingly. - * - * Also, all DOM Elements are inserted into the same DOM Container, regardless of which Scene they are created in. - * - * DOM Elements are a powerful way to align native HTML with your Phaser Game Objects. For example, you can insert - * a login form for a multiplayer game directly into your title screen. Or a text input box for a highscore table. - * Or a banner ad from a 3rd party service. Or perhaps you'd like to use them for high resolution text display and - * UI. The choice is up to you, just remember that you're dealing with standard HTML and CSS floating over the top - * of your game, and should treat it accordingly. - * - * Note: This method will only be available if the DOM Element Game Object has been built into Phaser. - * @param x The horizontal position of this DOM Element in the world. - * @param y The vertical position of this DOM Element in the world. - * @param element An existing DOM element, or a string. If a string starting with a # it will do a `getElementById` look-up on the string (minus the hash). Without a hash, it represents the type of element to create, i.e. 'div'. - * @param style If a string, will be set directly as the elements `style` property value. If a plain object, will be iterated and the values transferred. In both cases the values replacing whatever CSS styles may have been previously set. - * @param innerText If given, will be set directly as the elements `innerText` property value, replacing whatever was there before. - */ - dom(x: number, y: number, element?: HTMLElement | string, style?: string | any, innerText?: string): Phaser.GameObjects.DOMElement; - - /** - * Creates a new Extern Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Extern Game Object has been built into Phaser. - */ - extern(): Phaser.GameObjects.Extern; - - /** - * Creates a new Graphics Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Graphics Game Object has been built into Phaser. - * @param config The Graphics configuration. - */ - graphics(config?: Phaser.Types.GameObjects.Graphics.Options): Phaser.GameObjects.Graphics; - - /** - * Creates a new Group Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Group Game Object has been built into Phaser. - * @param children Game Objects to add to this Group; or the `config` argument. - * @param config A Group Configuration object. - */ - group(children?: Phaser.GameObjects.GameObject[] | Phaser.Types.GameObjects.Group.GroupConfig | Phaser.Types.GameObjects.Group.GroupConfig[], config?: Phaser.Types.GameObjects.Group.GroupConfig | Phaser.Types.GameObjects.Group.GroupCreateConfig): Phaser.GameObjects.Group; - - /** - * Creates a new Image Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Image Game Object has been built into Phaser. - * @param x The horizontal position of this Game Object in the world. - * @param y The vertical position of this Game Object in the world. - * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. - * @param frame An optional frame from the Texture this Game Object is rendering with. - */ - image(x: number, y: number, texture: string, frame?: string | integer): Phaser.GameObjects.Image; - - /** - * Creates a new Mesh Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Mesh Game Object and WebGL support have been built into Phaser. - * @param x The horizontal position of this Game Object in the world. - * @param y The vertical position of this Game Object in the world. - * @param vertices An array containing the vertices data for this Mesh. - * @param uv An array containing the uv data for this Mesh. - * @param colors An array containing the color data for this Mesh. - * @param alphas An array containing the alpha data for this Mesh. - * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. - * @param frame An optional frame from the Texture this Game Object is rendering with. - */ - mesh(x: number, y: number, vertices: number[], uv: number[], colors: number[], alphas: number[], texture: string, frame?: string | integer): Phaser.GameObjects.Mesh; - - /** - * Creates a new Particle Emitter Manager Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Particles Game Object has been built into Phaser. - * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. - * @param frame An optional frame from the Texture this Game Object is rendering with. - * @param emitters Configuration settings for one or more emitters to create. - */ - particles(texture: string, frame?: string | integer | object, emitters?: Phaser.Types.GameObjects.Particles.ParticleEmitterConfig | Phaser.Types.GameObjects.Particles.ParticleEmitterConfig[]): Phaser.GameObjects.Particles.ParticleEmitterManager; - - /** - * Creates a new PathFollower Game Object and adds it to the Scene. - * - * Note: This method will only be available if the PathFollower Game Object has been built into Phaser. - * @param path The Path this PathFollower is connected to. - * @param x The horizontal position of this Game Object in the world. - * @param y The vertical position of this Game Object in the world. - * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. - * @param frame An optional frame from the Texture this Game Object is rendering with. - */ - follower(path: Phaser.Curves.Path, x: number, y: number, texture: string, frame?: string | integer): Phaser.GameObjects.PathFollower; - - /** - * Creates a new Quad Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Quad Game Object and WebGL support have been built into Phaser. - * @param x The horizontal position of this Game Object in the world. - * @param y The vertical position of this Game Object in the world. - * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. - * @param frame An optional frame from the Texture this Game Object is rendering with. - */ - quad(x: number, y: number, texture: string, frame?: string | integer): Phaser.GameObjects.Quad; - - /** - * Creates a new Render Texture Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Render Texture Game Object has been built into Phaser. - * - * A Render Texture is a special texture that allows any number of Game Objects to be drawn to it. You can take many complex objects and - * draw them all to this one texture, which can they be used as the texture for other Game Object's. It's a way to generate dynamic - * textures at run-time that are WebGL friendly and don't invoke expensive GPU uploads. - * @param x The horizontal position of this Game Object in the world. - * @param y The vertical position of this Game Object in the world. - * @param width The width of the Render Texture. Default 32. - * @param height The height of the Render Texture. Default 32. - */ - renderTexture(x: number, y: number, width?: integer, height?: integer): Phaser.GameObjects.RenderTexture; - - /** - * Creates a new Shader Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Shader Game Object and WebGL support have been built into Phaser. - * @param key The key of the shader to use from the shader cache, or a BaseShader instance. - * @param x The horizontal position of this Game Object in the world. Default 0. - * @param y The vertical position of this Game Object in the world. Default 0. - * @param width The width of the Game Object. Default 128. - * @param height The height of the Game Object. Default 128. - * @param textures Optional array of texture keys to bind to the iChannel0...3 uniforms. The textures must already exist in the Texture Manager. - * @param textureData Optional additional texture data. - */ - shader(key: string | Phaser.Display.BaseShader, x?: number, y?: number, width?: number, height?: number, textures?: string[], textureData?: object): Phaser.GameObjects.Shader; - - /** - * Creates a new Arc Shape Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Arc Game Object has been built into Phaser. - * - * The Arc Shape is a Game Object that can be added to a Scene, Group or Container. You can - * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling - * it for input or physics. It provides a quick and easy way for you to render this shape in your - * game without using a texture, while still taking advantage of being fully batched in WebGL. - * - * This shape supports both fill and stroke colors. - * - * When it renders it displays an arc shape. You can control the start and end angles of the arc, - * as well as if the angles are winding clockwise or anti-clockwise. With the default settings - * it renders as a complete circle. By changing the angles you can create other arc shapes, - * such as half-circles. - * @param x The horizontal position of this Game Object in the world. Default 0. - * @param y The vertical position of this Game Object in the world. Default 0. - * @param radius The radius of the arc. Default 128. - * @param startAngle The start angle of the arc, in degrees. Default 0. - * @param endAngle The end angle of the arc, in degrees. Default 360. - * @param anticlockwise The winding order of the start and end angles. Default false. - * @param fillColor The color the arc will be filled with, i.e. 0xff0000 for red. - * @param fillAlpha The alpha the arc will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. - */ - arc(x?: number, y?: number, radius?: number, startAngle?: integer, endAngle?: integer, anticlockwise?: boolean, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Arc; - - /** - * Creates a new Circle Shape Game Object and adds it to the Scene. - * - * A Circle is an Arc with no defined start and end angle, making it render as a complete circle. - * - * Note: This method will only be available if the Arc Game Object has been built into Phaser. - * @param x The horizontal position of this Game Object in the world. Default 0. - * @param y The vertical position of this Game Object in the world. Default 0. - * @param radius The radius of the circle. Default 128. - * @param fillColor The color the circle will be filled with, i.e. 0xff0000 for red. - * @param fillAlpha The alpha the circle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. - */ - circle(x?: number, y?: number, radius?: number, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Arc; - - /** - * Creates a new Curve Shape Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Curve Game Object has been built into Phaser. - * - * The Curve Shape is a Game Object that can be added to a Scene, Group or Container. You can - * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling - * it for input or physics. It provides a quick and easy way for you to render this shape in your - * game without using a texture, while still taking advantage of being fully batched in WebGL. - * - * This shape supports both fill and stroke colors. - * - * To render a Curve Shape you must first create a `Phaser.Curves.Curve` object, then pass it to - * the Curve Shape in the constructor. - * - * The Curve shape also has a `smoothness` property and corresponding `setSmoothness` method. - * This allows you to control how smooth the shape renders in WebGL, by controlling the number of iterations - * that take place during construction. Increase and decrease the default value for smoother, or more - * jagged, shapes. - * @param x The horizontal position of this Game Object in the world. Default 0. - * @param y The vertical position of this Game Object in the world. Default 0. - * @param curve The Curve object to use to create the Shape. - * @param fillColor The color the curve will be filled with, i.e. 0xff0000 for red. - * @param fillAlpha The alpha the curve will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. - */ - curve(x?: number, y?: number, curve?: Phaser.Curves.Curve, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Curve; - - /** - * Creates a new Ellipse Shape Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Ellipse Game Object has been built into Phaser. - * - * The Ellipse Shape is a Game Object that can be added to a Scene, Group or Container. You can - * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling - * it for input or physics. It provides a quick and easy way for you to render this shape in your - * game without using a texture, while still taking advantage of being fully batched in WebGL. - * - * This shape supports both fill and stroke colors. - * - * When it renders it displays an ellipse shape. You can control the width and height of the ellipse. - * If the width and height match it will render as a circle. If the width is less than the height, - * it will look more like an egg shape. - * - * The Ellipse shape also has a `smoothness` property and corresponding `setSmoothness` method. - * This allows you to control how smooth the shape renders in WebGL, by controlling the number of iterations - * that take place during construction. Increase and decrease the default value for smoother, or more - * jagged, shapes. - * @param x The horizontal position of this Game Object in the world. Default 0. - * @param y The vertical position of this Game Object in the world. Default 0. - * @param width The width of the ellipse. An ellipse with equal width and height renders as a circle. Default 128. - * @param height The height of the ellipse. An ellipse with equal width and height renders as a circle. Default 128. - * @param fillColor The color the ellipse will be filled with, i.e. 0xff0000 for red. - * @param fillAlpha The alpha the ellipse will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. - */ - ellipse(x?: number, y?: number, width?: number, height?: number, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Ellipse; - - /** - * Creates a new Grid Shape Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Grid Game Object has been built into Phaser. - * - * The Grid Shape is a Game Object that can be added to a Scene, Group or Container. You can - * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling - * it for input or physics. It provides a quick and easy way for you to render this shape in your - * game without using a texture, while still taking advantage of being fully batched in WebGL. - * - * This shape supports only fill colors and cannot be stroked. - * - * A Grid Shape allows you to display a grid in your game, where you can control the size of the - * grid as well as the width and height of the grid cells. You can set a fill color for each grid - * cell as well as an alternate fill color. When the alternate fill color is set then the grid - * cells will alternate the fill colors as they render, creating a chess-board effect. You can - * also optionally have an outline fill color. If set, this draws lines between the grid cells - * in the given color. If you specify an outline color with an alpha of zero, then it will draw - * the cells spaced out, but without the lines between them. - * @param x The horizontal position of this Game Object in the world. Default 0. - * @param y The vertical position of this Game Object in the world. Default 0. - * @param width The width of the grid. Default 128. - * @param height The height of the grid. Default 128. - * @param cellWidth The width of one cell in the grid. Default 32. - * @param cellHeight The height of one cell in the grid. Default 32. - * @param fillColor The color the grid cells will be filled with, i.e. 0xff0000 for red. - * @param fillAlpha The alpha the grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. - * @param outlineFillColor The color of the lines between the grid cells. - * @param outlineFillAlpha The alpha of the lines between the grid cells. - */ - grid(x?: number, y?: number, width?: number, height?: number, cellWidth?: number, cellHeight?: number, fillColor?: number, fillAlpha?: number, outlineFillColor?: number, outlineFillAlpha?: number): Phaser.GameObjects.Grid; - - /** - * Creates a new IsoBox Shape Game Object and adds it to the Scene. - * - * Note: This method will only be available if the IsoBox Game Object has been built into Phaser. - * - * The IsoBox Shape is a Game Object that can be added to a Scene, Group or Container. You can - * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling - * it for input or physics. It provides a quick and easy way for you to render this shape in your - * game without using a texture, while still taking advantage of being fully batched in WebGL. - * - * This shape supports only fill colors and cannot be stroked. - * - * An IsoBox is an 'isometric' rectangle. Each face of it has a different fill color. You can set - * the color of the top, left and right faces of the rectangle respectively. You can also choose - * which of the faces are rendered via the `showTop`, `showLeft` and `showRight` properties. - * - * You cannot view an IsoBox from under-neath, however you can change the 'angle' by setting - * the `projection` property. - * @param x The horizontal position of this Game Object in the world. Default 0. - * @param y The vertical position of this Game Object in the world. Default 0. - * @param size The width of the iso box in pixels. The left and right faces will be exactly half this value. Default 48. - * @param height The height of the iso box. The left and right faces will be this tall. The overall height of the isobox will be this value plus half the `size` value. Default 32. - * @param fillTop The fill color of the top face of the iso box. Default 0xeeeeee. - * @param fillLeft The fill color of the left face of the iso box. Default 0x999999. - * @param fillRight The fill color of the right face of the iso box. Default 0xcccccc. - */ - isobox(x?: number, y?: number, size?: number, height?: number, fillTop?: number, fillLeft?: number, fillRight?: number): Phaser.GameObjects.IsoBox; - - /** - * Creates a new IsoTriangle Shape Game Object and adds it to the Scene. - * - * Note: This method will only be available if the IsoTriangle Game Object has been built into Phaser. - * - * The IsoTriangle Shape is a Game Object that can be added to a Scene, Group or Container. You can - * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling - * it for input or physics. It provides a quick and easy way for you to render this shape in your - * game without using a texture, while still taking advantage of being fully batched in WebGL. - * - * This shape supports only fill colors and cannot be stroked. - * - * An IsoTriangle is an 'isometric' triangle. Think of it like a pyramid. Each face has a different - * fill color. You can set the color of the top, left and right faces of the triangle respectively - * You can also choose which of the faces are rendered via the `showTop`, `showLeft` and `showRight` properties. - * - * You cannot view an IsoTriangle from under-neath, however you can change the 'angle' by setting - * the `projection` property. The `reversed` property controls if the IsoTriangle is rendered upside - * down or not. - * @param x The horizontal position of this Game Object in the world. Default 0. - * @param y The vertical position of this Game Object in the world. Default 0. - * @param size The width of the iso triangle in pixels. The left and right faces will be exactly half this value. Default 48. - * @param height The height of the iso triangle. The left and right faces will be this tall. The overall height of the iso triangle will be this value plus half the `size` value. Default 32. - * @param reversed Is the iso triangle upside down? Default false. - * @param fillTop The fill color of the top face of the iso triangle. Default 0xeeeeee. - * @param fillLeft The fill color of the left face of the iso triangle. Default 0x999999. - * @param fillRight The fill color of the right face of the iso triangle. Default 0xcccccc. - */ - isotriangle(x?: number, y?: number, size?: number, height?: number, reversed?: boolean, fillTop?: number, fillLeft?: number, fillRight?: number): Phaser.GameObjects.IsoTriangle; - - /** - * Creates a new Line Shape Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Line Game Object has been built into Phaser. - * - * The Line Shape is a Game Object that can be added to a Scene, Group or Container. You can - * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling - * it for input or physics. It provides a quick and easy way for you to render this shape in your - * game without using a texture, while still taking advantage of being fully batched in WebGL. - * - * This shape supports only stroke colors and cannot be filled. - * - * A Line Shape allows you to draw a line between two points in your game. You can control the - * stroke color and thickness of the line. In WebGL only you can also specify a different - * thickness for the start and end of the line, allowing you to render lines that taper-off. - * - * If you need to draw multiple lines in a sequence you may wish to use the Polygon Shape instead. - * @param x The horizontal position of this Game Object in the world. Default 0. - * @param y The vertical position of this Game Object in the world. Default 0. - * @param x1 The horizontal position of the start of the line. Default 0. - * @param y1 The vertical position of the start of the line. Default 0. - * @param x2 The horizontal position of the end of the line. Default 128. - * @param y2 The vertical position of the end of the line. Default 0. - * @param strokeColor The color the line will be drawn in, i.e. 0xff0000 for red. - * @param strokeAlpha The alpha the line will be drawn in. You can also set the alpha of the overall Shape using its `alpha` property. - */ - line(x?: number, y?: number, x1?: number, y1?: number, x2?: number, y2?: number, strokeColor?: number, strokeAlpha?: number): Phaser.GameObjects.Line; - - /** - * Creates a new Polygon Shape Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Polygon Game Object has been built into Phaser. - * - * The Polygon Shape is a Game Object that can be added to a Scene, Group or Container. You can - * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling - * it for input or physics. It provides a quick and easy way for you to render this shape in your - * game without using a texture, while still taking advantage of being fully batched in WebGL. - * - * This shape supports both fill and stroke colors. - * - * The Polygon Shape is created by providing a list of points, which are then used to create an - * internal Polygon geometry object. The points can be set from a variety of formats: - * - * - An array of Point or Vector2 objects: `[new Phaser.Math.Vec2(x1, y1), ...]` - * - An array of objects with public x/y properties: `[obj1, obj2, ...]` - * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]` - * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]` - * - * By default the `x` and `y` coordinates of this Shape refer to the center of it. However, depending - * on the coordinates of the points provided, the final shape may be rendered offset from its origin. - * @param x The horizontal position of this Game Object in the world. Default 0. - * @param y The vertical position of this Game Object in the world. Default 0. - * @param points The points that make up the polygon. - * @param fillColor The color the polygon will be filled with, i.e. 0xff0000 for red. - * @param fillAlpha The alpha the polygon will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. - */ - polygon(x?: number, y?: number, points?: any, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Polygon; - - /** - * Creates a new Rectangle Shape Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Rectangle Game Object has been built into Phaser. - * - * The Rectangle Shape is a Game Object that can be added to a Scene, Group or Container. You can - * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling - * it for input or physics. It provides a quick and easy way for you to render this shape in your - * game without using a texture, while still taking advantage of being fully batched in WebGL. - * - * This shape supports both fill and stroke colors. - * - * You can change the size of the rectangle by changing the `width` and `height` properties. - * @param x The horizontal position of this Game Object in the world. Default 0. - * @param y The vertical position of this Game Object in the world. Default 0. - * @param width The width of the rectangle. Default 128. - * @param height The height of the rectangle. Default 128. - * @param fillColor The color the rectangle will be filled with, i.e. 0xff0000 for red. - * @param fillAlpha The alpha the rectangle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. - */ - rectangle(x?: number, y?: number, width?: number, height?: number, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Rectangle; - - /** - * Creates a new Star Shape Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Star Game Object has been built into Phaser. - * - * The Star Shape is a Game Object that can be added to a Scene, Group or Container. You can - * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling - * it for input or physics. It provides a quick and easy way for you to render this shape in your - * game without using a texture, while still taking advantage of being fully batched in WebGL. - * - * This shape supports both fill and stroke colors. - * - * As the name implies, the Star shape will display a star in your game. You can control several - * aspects of it including the number of points that constitute the star. The default is 5. If - * you change it to 4 it will render as a diamond. If you increase them, you'll get a more spiky - * star shape. - * - * You can also control the inner and outer radius, which is how 'long' each point of the star is. - * Modify these values to create more interesting shapes. - * @param x The horizontal position of this Game Object in the world. Default 0. - * @param y The vertical position of this Game Object in the world. Default 0. - * @param points The number of points on the star. Default 5. - * @param innerRadius The inner radius of the star. Default 32. - * @param outerRadius The outer radius of the star. Default 64. - * @param fillColor The color the star will be filled with, i.e. 0xff0000 for red. - * @param fillAlpha The alpha the star will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. - */ - star(x?: number, y?: number, points?: number, innerRadius?: number, outerRadius?: number, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Star; - - /** - * Creates a new Triangle Shape Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Triangle Game Object has been built into Phaser. - * - * The Triangle Shape is a Game Object that can be added to a Scene, Group or Container. You can - * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling - * it for input or physics. It provides a quick and easy way for you to render this shape in your - * game without using a texture, while still taking advantage of being fully batched in WebGL. - * - * This shape supports both fill and stroke colors. - * - * The Triangle consists of 3 lines, joining up to form a triangular shape. You can control the - * position of each point of these lines. The triangle is always closed and cannot have an open - * face. If you require that, consider using a Polygon instead. - * @param x The horizontal position of this Game Object in the world. Default 0. - * @param y The vertical position of this Game Object in the world. Default 0. - * @param x1 The horizontal position of the first point in the triangle. Default 0. - * @param y1 The vertical position of the first point in the triangle. Default 128. - * @param x2 The horizontal position of the second point in the triangle. Default 64. - * @param y2 The vertical position of the second point in the triangle. Default 0. - * @param x3 The horizontal position of the third point in the triangle. Default 128. - * @param y3 The vertical position of the third point in the triangle. Default 128. - * @param fillColor The color the triangle will be filled with, i.e. 0xff0000 for red. - * @param fillAlpha The alpha the triangle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. - */ - triangle(x?: number, y?: number, x1?: number, y1?: number, x2?: number, y2?: number, x3?: number, y3?: number, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Triangle; - - /** - * Creates a new Sprite Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Sprite Game Object has been built into Phaser. - * @param x The horizontal position of this Game Object in the world. - * @param y The vertical position of this Game Object in the world. - * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. - * @param frame An optional frame from the Texture this Game Object is rendering with. - */ - sprite(x: number, y: number, texture: string, frame?: string | integer): Phaser.GameObjects.Sprite; - - /** - * Creates a new Text Game Object and adds it to the Scene. - * - * A Text Game Object. - * - * Text objects work by creating their own internal hidden Canvas and then renders text to it using - * the standard Canvas `fillText` API. It then creates a texture from this canvas which is rendered - * to your game during the render pass. - * - * Because it uses the Canvas API you can take advantage of all the features this offers, such as - * applying gradient fills to the text, or strokes, shadows and more. You can also use custom fonts - * loaded externally, such as Google or TypeKit Web fonts. - * - * You can only display fonts that are currently loaded and available to the browser: therefore fonts must - * be pre-loaded. Phaser does not do ths for you, so you will require the use of a 3rd party font loader, - * or have the fonts ready available in the CSS on the page in which your Phaser game resides. - * - * See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts - * across mobile browsers. - * - * A note on performance: Every time the contents of a Text object changes, i.e. changing the text being - * displayed, or the style of the text, it needs to remake the Text canvas, and if on WebGL, re-upload the - * new texture to the GPU. This can be an expensive operation if used often, or with large quantities of - * Text objects in your game. If you run into performance issues you would be better off using Bitmap Text - * instead, as it benefits from batching and avoids expensive Canvas API calls. - * - * Note: This method will only be available if the Text Game Object has been built into Phaser. - * @param x The horizontal position of this Game Object in the world. - * @param y The vertical position of this Game Object in the world. - * @param text The text this Text object will display. - * @param style The Text style configuration object. - */ - text(x: number, y: number, text: string | string[], style?: object): Phaser.GameObjects.Text; - - /** - * Creates a new TileSprite Game Object and adds it to the Scene. - * - * Note: This method will only be available if the TileSprite Game Object has been built into Phaser. - * @param x The horizontal position of this Game Object in the world. - * @param y The vertical position of this Game Object in the world. - * @param width The width of the Game Object. If zero it will use the size of the texture frame. - * @param height The height of the Game Object. If zero it will use the size of the texture frame. - * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. - * @param frame An optional frame from the Texture this Game Object is rendering with. - */ - tileSprite(x: number, y: number, width: integer, height: integer, texture: string, frame?: string | integer): Phaser.GameObjects.TileSprite; - - /** - * Creates a new Image Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Image Game Object has been built into Phaser. - * @param x The horizontal position of this Game Object in the world. - * @param y The vertical position of this Game Object in the world. - * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. - * @param frame An optional frame from the Texture this Game Object is rendering with. - */ - video(x: number, y: number, texture: string, frame?: string | integer): Phaser.GameObjects.Image; - - /** - * Creates a new Zone Game Object and adds it to the Scene. - * - * Note: This method will only be available if the Zone Game Object has been built into Phaser. - * @param x The horizontal position of this Game Object in the world. - * @param y The vertical position of this Game Object in the world. - * @param width The width of the Game Object. - * @param height The height of the Game Object. - */ - zone(x: number, y: number, width: number, height: number): Phaser.GameObjects.Zone; - - /** - * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. - * When loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing - * from a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the map - * data. For an empty map, you should specify tileWidth, tileHeight, width & height. - * @param key The key in the Phaser cache that corresponds to the loaded tilemap data. - * @param tileWidth The width of a tile in pixels. Pass in `null` to leave as the - * default. Default 32. - * @param tileHeight The height of a tile in pixels. Pass in `null` to leave as the - * default. Default 32. - * @param width The width of the map in tiles. Pass in `null` to leave as the - * default. Default 10. - * @param height The height of the map in tiles. Pass in `null` to leave as the - * default. Default 10. - * @param data Instead of loading from the cache, you can also load directly from - * a 2D array of tile indexes. Pass in `null` for no data. - * @param insertNull Controls how empty tiles, tiles with an index of -1, in the - * map data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty - * location will get a Tile object with an index of -1. If you've a large sparsely populated map and - * the tile data doesn't need to change then setting this value to `true` will help with memory - * consumption. However if your map is small or you need to update the tiles dynamically, then leave - * the default value set. Default false. - */ - tilemap(key?: string, tileWidth?: integer, tileHeight?: integer, width?: integer, height?: integer, data?: integer[][], insertNull?: boolean): Phaser.Tilemaps.Tilemap; - - /** - * Creates a new Tween object. - * - * Note: This method will only be available if Tweens have been built into Phaser. - * @param config The Tween configuration. - */ - tween(config: Phaser.Types.Tweens.TweenBuilderConfig | object): Phaser.Tweens.Tween; - - } - - /** - * The Update List plugin. - * - * Update Lists belong to a Scene and maintain the list Game Objects to be updated every frame. - * - * Some or all of these Game Objects may also be part of the Scene's [Display List]{@link Phaser.GameObjects.DisplayList}, for Rendering. - */ - class UpdateList extends Phaser.Structs.ProcessQueue { - /** - * - * @param scene The Scene that the Update List belongs to. - */ - constructor(scene: Phaser.Scene); - - /** - * The Scene that the Update List belongs to. - */ - scene: Phaser.Scene; - - /** - * The Scene's Systems. - */ - systems: Phaser.Scenes.Systems; - - /** - * The update step. - * - * Pre-updates every active Game Object in the list. - * @param time The current timestamp. - * @param delta The delta time elapsed since the last frame. - */ - sceneUpdate(time: number, delta: number): void; - - /** - * The Scene that owns this plugin is shutting down. - * - * We need to kill and reset all internal properties as well as stop listening to Scene events. - */ - shutdown(): void; - - /** - * The Scene that owns this plugin is being destroyed. - * - * We need to shutdown and then kill off all external references. - */ - destroy(): void; - - } - - namespace RetroFont { - /** - * Parses a Retro Font configuration object so you can pass it to the BitmapText constructor - * and create a BitmapText object using a fixed-width retro font. - * @param scene A reference to the Phaser Scene. - * @param config The font configuration object. - */ - function Parse(scene: Phaser.Scene, config: Phaser.Types.GameObjects.BitmapText.RetroFontConfig): object; - - /** - * Text Set 1 = !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ - */ - var TEXT_SET1: string; - - /** - * Text Set 2 = !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ - */ - var TEXT_SET2: string; - - /** - * Text Set 3 = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 - */ - var TEXT_SET3: string; - - /** - * Text Set 4 = ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 - */ - var TEXT_SET4: string; - - /** - * Text Set 5 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789 - */ - var TEXT_SET5: string; - - /** - * Text Set 6 = ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.' - */ - var TEXT_SET6: string; - - /** - * Text Set 7 = AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39 - */ - var TEXT_SET7: string; - - /** - * Text Set 8 = 0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ - */ - var TEXT_SET8: string; - - /** - * Text Set 9 = ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?! - */ - var TEXT_SET9: string; - - /** - * Text Set 10 = ABCDEFGHIJKLMNOPQRSTUVWXYZ - */ - var TEXT_SET10: string; - - /** - * Text Set 11 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789 - */ - var TEXT_SET11: string; - - } - /** * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure. * @@ -10156,6 +8732,72 @@ declare namespace Phaser { } + namespace RetroFont { + /** + * Text Set 1 = !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ + */ + var TEXT_SET1: string; + + /** + * Text Set 2 = !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ + */ + var TEXT_SET2: string; + + /** + * Text Set 3 = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 + */ + var TEXT_SET3: string; + + /** + * Text Set 4 = ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 + */ + var TEXT_SET4: string; + + /** + * Text Set 5 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789 + */ + var TEXT_SET5: string; + + /** + * Text Set 6 = ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.' + */ + var TEXT_SET6: string; + + /** + * Text Set 7 = AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39 + */ + var TEXT_SET7: string; + + /** + * Text Set 8 = 0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ + */ + var TEXT_SET8: string; + + /** + * Text Set 9 = ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?! + */ + var TEXT_SET9: string; + + /** + * Text Set 10 = ABCDEFGHIJKLMNOPQRSTUVWXYZ + */ + var TEXT_SET10: string; + + /** + * Text Set 11 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789 + */ + var TEXT_SET11: string; + + /** + * Parses a Retro Font configuration object so you can pass it to the BitmapText constructor + * and create a BitmapText object using a fixed-width retro font. + * @param scene A reference to the Phaser Scene. + * @param config The font configuration object. + */ + function Parse(scene: Phaser.Scene, config: Phaser.Types.GameObjects.BitmapText.RetroFontConfig): object; + + } + /** * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure. * @@ -11834,6 +10476,21 @@ declare namespace Phaser { } + /** + * Builds a Game Object using the provided configuration object. + * @param scene A reference to the Scene. + * @param gameObject The initial GameObject. + * @param config The config to build the GameObject with. + */ + function BuildGameObject(scene: Phaser.Scene, gameObject: Phaser.GameObjects.GameObject, config: Phaser.Types.GameObjects.GameObjectConfig): Phaser.GameObjects.GameObject; + + /** + * Adds an Animation component to a Sprite and populates it based on the given config. + * @param sprite The sprite to add an Animation component to. + * @param config The animation config. + */ + function BuildGameObjectAnimation(sprite: Phaser.GameObjects.Sprite, config: object): Phaser.GameObjects.Sprite; + namespace Components { /** * Provides methods used for setting the alpha properties of a Game Object. @@ -11890,7 +10547,25 @@ declare namespace Phaser { * Provides methods used for setting the alpha property of a Game Object. * Should be applied as a mixin and not used directly. */ - namespace AlphaSingle { + interface AlphaSingle { + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * @param value The alpha value applied across the whole Game Object. Default 1. + */ + setAlpha(value?: number): this; + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; } interface Animation { @@ -13520,7 +12195,7 @@ declare namespace Phaser { * flexible manner as those not within them. In short, don't use them for the sake of it. You pay a small cost * every time you create one, try to structure your game around avoiding that where possible. */ - class Container extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.ComputedSize, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { + class Container extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.AlphaSingle, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.ComputedSize, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { /** * * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. @@ -13995,6 +12670,27 @@ declare namespace Phaser { */ protected preDestroy(): void; + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * @param value The alpha value applied across the whole Game Object. Default 1. + */ + setAlpha(value?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + /** * Sets the Blend Mode being used by this Game Object. * @@ -14355,6 +13051,60 @@ declare namespace Phaser { } + /** + * The Display List plugin. + * + * Display Lists belong to a Scene and maintain the list of Game Objects to render every frame. + * + * Some of these Game Objects may also be part of the Scene's [Update List]{@link Phaser.GameObjects.UpdateList}, for updating. + */ + class DisplayList extends Phaser.Structs.List { + /** + * + * @param scene The Scene that this Display List belongs to. + */ + constructor(scene: Phaser.Scene); + + /** + * The flag the determines whether Game Objects should be sorted when `depthSort()` is called. + */ + sortChildrenFlag: boolean; + + /** + * The Scene that this Display List belongs to. + */ + scene: Phaser.Scene; + + /** + * The Scene's Systems. + */ + systems: Phaser.Scenes.Systems; + + /** + * Force a sort of the display list on the next call to depthSort. + */ + queueDepthSort(): void; + + /** + * Immediately sorts the display list if the flag is set. + */ + depthSort(): void; + + /** + * Compare the depth of two Game Objects. + * @param childA The first Game Object. + * @param childB The second Game Object. + */ + sortByDepth(childA: Phaser.GameObjects.GameObject, childB: Phaser.GameObjects.GameObject): integer; + + /** + * Returns an array which contains all objects currently on the Display List. + * This is a reference to the main list array, not a copy of it, so be careful not to modify it. + */ + getChildren(): Phaser.GameObjects.GameObject[]; + + } + /** * DOM Element Game Objects are a way to control and manipulate HTML Elements over the top of your game. * @@ -14408,7 +13158,7 @@ declare namespace Phaser { * UI. The choice is up to you, just remember that you're dealing with standard HTML and CSS floating over the top * of your game, and should treat it accordingly. */ - class DOMElement extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { + class DOMElement extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.AlphaSingle, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { /** * * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. @@ -14784,6 +13534,27 @@ declare namespace Phaser { */ willRender(): boolean; + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * @param value The alpha value applied across the whole Game Object. Default 1. + */ + setAlpha(value?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + /** * Sets the Blend Mode being used by this Game Object. * @@ -15969,6 +14740,1288 @@ declare namespace Phaser { } + /** + * The base class that all Game Objects extend. + * You don't create GameObjects directly and they cannot be added to the display list. + * Instead, use them as the base for your own custom classes. + */ + class GameObject extends Phaser.Events.EventEmitter { + /** + * + * @param scene The Scene to which this Game Object belongs. + * @param type A textual representation of the type of Game Object, i.e. `sprite`. + */ + constructor(scene: Phaser.Scene, type: string); + + /** + * The Scene to which this Game Object belongs. + * Game Objects can only belong to one Scene. + */ + protected scene: Phaser.Scene; + + /** + * A textual representation of this Game Object, i.e. `sprite`. + * Used internally by Phaser but is available for your own custom classes to populate. + */ + type: string; + + /** + * The current state of this Game Object. + * + * Phaser itself will never modify this value, although plugins may do so. + * + * Use this property to track the state of a Game Object during its lifetime. For example, it could change from + * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant + * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons. + * If you need to store complex data about your Game Object, look at using the Data Component instead. + */ + state: integer | string; + + /** + * The parent Container of this Game Object, if it has one. + */ + parentContainer: Phaser.GameObjects.Container; + + /** + * The name of this Game Object. + * Empty by default and never populated by Phaser, this is left for developers to use. + */ + name: string; + + /** + * The active state of this Game Object. + * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it. + * An active object is one which is having its logic and internal systems updated. + */ + active: boolean; + + /** + * The Tab Index of the Game Object. + * Reserved for future use by plugins and the Input Manager. + */ + tabIndex: integer; + + /** + * A Data Manager. + * It allows you to store, query and get key/value paired information specific to this Game Object. + * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`. + */ + data: Phaser.Data.DataManager; + + /** + * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not. + * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively. + * If those components are not used by your custom class then you can use this bitmask as you wish. + */ + renderFlags: integer; + + /** + * A bitmask that controls if this Game Object is drawn by a Camera or not. + * Not usually set directly, instead call `Camera.ignore`, however you can + * set this property directly using the Camera.id property: + */ + cameraFilter: number; + + /** + * If this Game Object is enabled for input then this property will contain an InteractiveObject instance. + * Not usually set directly. Instead call `GameObject.setInteractive()`. + */ + input: Phaser.Types.Input.InteractiveObject; + + /** + * If this Game Object is enabled for physics then this property will contain a reference to a Physics Body. + */ + body: object | Phaser.Physics.Arcade.Body | Phaser.Physics.Impact.Body; + + /** + * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`. + * This includes calls that may come from a Group, Container or the Scene itself. + * While it allows you to persist a Game Object across Scenes, please understand you are entirely + * responsible for managing references to and from this Game Object. + */ + ignoreDestroy: boolean; + + /** + * Sets the `active` property of this Game Object and returns this Game Object for further chaining. + * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList. + * @param value True if this Game Object should be set as active, false if not. + */ + setActive(value: boolean): this; + + /** + * Sets the `name` property of this Game Object and returns this Game Object for further chaining. + * The `name` property is not populated by Phaser and is presented for your own use. + * @param value The name to be given to this Game Object. + */ + setName(value: string): this; + + /** + * Sets the current state of this Game Object. + * + * Phaser itself will never modify the State of a Game Object, although plugins may do so. + * + * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'. + * The state value should typically be an integer (ideally mapped to a constant + * in your game code), but could also be a string. It is recommended to keep it light and simple. + * If you need to store complex data about your Game Object, look at using the Data Component instead. + * @param value The state of the Game Object. + */ + setState(value: integer | string): this; + + /** + * Adds a Data Manager component to this Game Object. + */ + setDataEnabled(): this; + + /** + * Allows you to store a key value pair within this Game Objects Data Manager. + * + * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled + * before setting the value. + * + * If the key doesn't already exist in the Data Manager then it is created. + * + * ```javascript + * sprite.setData('name', 'Red Gem Stone'); + * ``` + * + * You can also pass in an object of key value pairs as the first argument: + * + * ```javascript + * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 }); + * ``` + * + * To get a value back again you can call `getData`: + * + * ```javascript + * sprite.getData('gold'); + * ``` + * + * Or you can access the value directly via the `values` property, where it works like any other variable: + * + * ```javascript + * sprite.data.values.gold += 50; + * ``` + * + * When the value is first set, a `setdata` event is emitted from this Game Object. + * + * If the key already exists, a `changedata` event is emitted instead, along an event named after the key. + * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`. + * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter. + * + * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings. + * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager. + * @param key The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored. + * @param data The value to set for the given key. If an object is provided as the key this argument is ignored. + */ + setData(key: string | object, data?: any): this; + + /** + * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist. + * + * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either: + * + * ```javascript + * sprite.getData('gold'); + * ``` + * + * Or access the value directly: + * + * ```javascript + * sprite.data.values.gold; + * ``` + * + * You can also pass in an array of keys, in which case an array of values will be returned: + * + * ```javascript + * sprite.getData([ 'gold', 'armor', 'health' ]); + * ``` + * + * This approach is useful for destructuring arrays in ES6. + * @param key The key of the value to retrieve, or an array of keys. + */ + getData(key: string | string[]): any; + + /** + * Pass this Game Object to the Input Manager to enable it for Input. + * + * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area + * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced + * input detection. + * + * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If + * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific + * shape for it to use. + * + * You can also provide an Input Configuration Object as the only argument to this method. + * @param shape Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used. + * @param callback A callback to be invoked when the Game Object is interacted with. If you provide a shape you must also provide a callback. + * @param dropZone Should this Game Object be treated as a drop zone target? Default false. + */ + setInteractive(shape?: Phaser.Types.Input.InputConfiguration | any, callback?: Phaser.Types.Input.HitAreaCallback, dropZone?: boolean): this; + + /** + * If this Game Object has previously been enabled for input, this will disable it. + * + * An object that is disabled for input stops processing or being considered for + * input events, but can be turned back on again at any time by simply calling + * `setInteractive()` with no arguments provided. + * + * If want to completely remove interaction from this Game Object then use `removeInteractive` instead. + */ + disableInteractive(): this; + + /** + * If this Game Object has previously been enabled for input, this will queue it + * for removal, causing it to no longer be interactive. The removal happens on + * the next game step, it is not immediate. + * + * The Interactive Object that was assigned to this Game Object will be destroyed, + * removed from the Input Manager and cleared from this Game Object. + * + * If you wish to re-enable this Game Object at a later date you will need to + * re-create its InteractiveObject by calling `setInteractive` again. + * + * If you wish to only temporarily stop an object from receiving input then use + * `disableInteractive` instead, as that toggles the interactive state, where-as + * this erases it completely. + * + * If you wish to resize a hit area, don't remove and then set it as being + * interactive. Instead, access the hitarea object directly and resize the shape + * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the + * shape is a Rectangle, which it is by default.) + */ + removeInteractive(): this; + + /** + * To be overridden by custom GameObjects. Allows base objects to be used in a Pool. + * @param args args + */ + update(...args: any[]): void; + + /** + * Returns a JSON representation of the Game Object. + */ + toJSON(): Phaser.Types.GameObjects.JSONGameObject; + + /** + * Compares the renderMask with the renderFlags to see if this Game Object will render or not. + * Also checks the Game Object against the given Cameras exclusion list. + * @param camera The Camera to check against this Game Object. + */ + willRender(camera: Phaser.Cameras.Scene2D.Camera): boolean; + + /** + * Returns an array containing the display list index of either this Game Object, or if it has one, + * its parent Container. It then iterates up through all of the parent containers until it hits the + * root of the display list (which is index 0 in the returned array). + * + * Used internally by the InputPlugin but also useful if you wish to find out the display depth of + * this Game Object and all of its ancestors. + */ + getIndexList(): integer[]; + + /** + * Destroys this Game Object removing it from the Display List and Update List and + * severing all ties to parent resources. + * + * Also removes itself from the Input Manager and Physics Manager if previously enabled. + * + * Use this to remove a Game Object from your game if you don't ever plan to use it again. + * As long as no reference to it exists within your own code it should become free for + * garbage collection by the browser. + * + * If you just want to temporarily disable an object then look at using the + * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected. + * @param fromScene Is this Game Object being destroyed as the result of a Scene shutdown? Default false. + */ + destroy(fromScene?: boolean): void; + + /** + * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not. + */ + static readonly RENDER_MASK: integer; + + } + + /** + * The Game Object Creator is a Scene plugin that allows you to quickly create many common + * types of Game Objects and return them. Unlike the Game Object Factory, they are not automatically + * added to the Scene. + * + * Game Objects directly register themselves with the Creator and inject their own creation + * methods into the class. + */ + class GameObjectCreator { + /** + * + * @param scene The Scene to which this Game Object Factory belongs. + */ + constructor(scene: Phaser.Scene); + + /** + * Creates a new Dynamic Bitmap Text Game Object and returns it. + * + * Note: This method will only be available if the Dynamic Bitmap Text Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + dynamicBitmapText(config: Phaser.Types.GameObjects.BitmapText.BitmapTextConfig, addToScene?: boolean): Phaser.GameObjects.DynamicBitmapText; + + /** + * Creates a new Bitmap Text Game Object and returns it. + * + * Note: This method will only be available if the Bitmap Text Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + bitmapText(config: Phaser.Types.GameObjects.BitmapText.BitmapTextConfig, addToScene?: boolean): Phaser.GameObjects.BitmapText; + + /** + * Creates a new Blitter Game Object and returns it. + * + * Note: This method will only be available if the Blitter Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + blitter(config: object, addToScene?: boolean): Phaser.GameObjects.Blitter; + + /** + * Creates a new Container Game Object and returns it. + * + * Note: This method will only be available if the Container Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + container(config: object, addToScene?: boolean): Phaser.GameObjects.Container; + + /** + * The Scene to which this Game Object Creator belongs. + */ + protected scene: Phaser.Scene; + + /** + * A reference to the Scene.Systems. + */ + protected systems: Phaser.Scenes.Systems; + + /** + * A reference to the Scene Display List. + */ + protected displayList: Phaser.GameObjects.DisplayList; + + /** + * A reference to the Scene Update List. + */ + protected updateList: Phaser.GameObjects.UpdateList; + + /** + * Creates a new Graphics Game Object and returns it. + * + * Note: This method will only be available if the Graphics Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + graphics(config: object, addToScene?: boolean): Phaser.GameObjects.Graphics; + + /** + * Creates a new Group Game Object and returns it. + * + * Note: This method will only be available if the Group Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + */ + group(config: Phaser.Types.GameObjects.Group.GroupConfig | Phaser.Types.GameObjects.Group.GroupCreateConfig): Phaser.GameObjects.Group; + + /** + * Creates a new Image Game Object and returns it. + * + * Note: This method will only be available if the Image Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + image(config: object, addToScene?: boolean): Phaser.GameObjects.Image; + + /** + * Creates a new Mesh Game Object and returns it. + * + * Note: This method will only be available if the Mesh Game Object and WebGL support have been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + mesh(config: object, addToScene?: boolean): Phaser.GameObjects.Mesh; + + /** + * Creates a new Particle Emitter Manager Game Object and returns it. + * + * Note: This method will only be available if the Particles Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + particles(config: object, addToScene?: boolean): Phaser.GameObjects.Particles.ParticleEmitterManager; + + /** + * Creates a new Quad Game Object and returns it. + * + * Note: This method will only be available if the Quad Game Object and WebGL support have been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + quad(config: object, addToScene?: boolean): Phaser.GameObjects.Quad; + + /** + * Creates a new Render Texture Game Object and returns it. + * + * Note: This method will only be available if the Render Texture Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + renderTexture(config: Phaser.Types.GameObjects.RenderTexture.RenderTextureConfig, addToScene?: boolean): Phaser.GameObjects.RenderTexture; + + /** + * Creates a new Shader Game Object and returns it. + * + * Note: This method will only be available if the Shader Game Object and WebGL support have been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + shader(config: object, addToScene?: boolean): Phaser.GameObjects.Shader; + + /** + * Creates a new Sprite Game Object and returns it. + * + * Note: This method will only be available if the Sprite Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + sprite(config: Phaser.Types.GameObjects.Sprite.SpriteConfig, addToScene?: boolean): Phaser.GameObjects.Sprite; + + /** + * Creates a new Text Game Object and returns it. + * + * Note: This method will only be available if the Text Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + text(config: object, addToScene?: boolean): Phaser.GameObjects.Text; + + /** + * Creates a new TileSprite Game Object and returns it. + * + * Note: This method will only be available if the TileSprite Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + tileSprite(config: Phaser.Types.GameObjects.TileSprite.TileSpriteConfig, addToScene?: boolean): Phaser.GameObjects.TileSprite; + + /** + * Creates a new Video Game Object and returns it. + * + * Note: This method will only be available if the Video Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + video(config: object, addToScene?: boolean): Phaser.GameObjects.Video; + + /** + * Creates a new Zone Game Object and returns it. + * + * Note: This method will only be available if the Zone Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + */ + zone(config: object): Phaser.GameObjects.Zone; + + /** + * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. + * When loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing + * from a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the map + * data. For an empty map, you should specify tileWidth, tileHeight, width & height. + * @param config The config options for the Tilemap. + */ + tilemap(config?: Phaser.Types.Tilemaps.TilemapConfig): Phaser.Tilemaps.Tilemap; + + /** + * Creates a new Tween object and returns it. + * + * Note: This method will only be available if Tweens have been built into Phaser. + * @param config The Tween configuration. + */ + tween(config: Phaser.Types.Tweens.TweenBuilderConfig | object): Phaser.Tweens.Tween; + + } + + /** + * The Game Object Factory is a Scene plugin that allows you to quickly create many common + * types of Game Objects and have them automatically registered with the Scene. + * + * Game Objects directly register themselves with the Factory and inject their own creation + * methods into the class. + */ + class GameObjectFactory { + /** + * + * @param scene The Scene to which this Game Object Factory belongs. + */ + constructor(scene: Phaser.Scene); + + /** + * Creates a new Path Object. + * @param x The horizontal position of this Path. + * @param y The vertical position of this Path. + */ + path(x: number, y: number): Phaser.Curves.Path; + + /** + * Creates a new Dynamic Bitmap Text Game Object and adds it to the Scene. + * + * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure. + * + * During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to + * match the font structure. + * + * Dynamic Bitmap Text objects are different from Static Bitmap Text in that they invoke a callback for each + * letter being rendered during the render pass. This callback allows you to manipulate the properties of + * each letter being rendered, such as its position, scale or tint, allowing you to create interesting effects + * like jiggling text, which can't be done with Static text. This means that Dynamic Text takes more processing + * time, so only use them if you require the callback ability they have. + * + * BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability + * to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by + * processing the font texture in an image editor, applying fills and any other effects required. + * + * To create multi-line text insert \r, \n or \r\n escape codes into the text string. + * + * To create a BitmapText data files you need a 3rd party app such as: + * + * BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ + * Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner + * Littera (Web-based, free): http://kvazars.com/littera/ + * + * For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of + * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson + * + * Note: This method will only be available if the Dynamic Bitmap Text Game Object has been built into Phaser. + * @param x The x position of the Game Object. + * @param y The y position of the Game Object. + * @param font The key of the font to use from the BitmapFont cache. + * @param text The string, or array of strings, to be set as the content of this Bitmap Text. + * @param size The font size to set. + */ + dynamicBitmapText(x: number, y: number, font: string, text?: string | string[], size?: number): Phaser.GameObjects.DynamicBitmapText; + + /** + * Creates a new Bitmap Text Game Object and adds it to the Scene. + * + * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure. + * + * During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to + * match the font structure. + * + * BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability + * to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by + * processing the font texture in an image editor, applying fills and any other effects required. + * + * To create multi-line text insert \r, \n or \r\n escape codes into the text string. + * + * To create a BitmapText data files you need a 3rd party app such as: + * + * BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ + * Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner + * Littera (Web-based, free): http://kvazars.com/littera/ + * + * For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of + * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson + * + * Note: This method will only be available if the Bitmap Text Game Object has been built into Phaser. + * @param x The x position of the Game Object. + * @param y The y position of the Game Object. + * @param font The key of the font to use from the BitmapFont cache. + * @param text The string, or array of strings, to be set as the content of this Bitmap Text. + * @param size The font size to set. + * @param align The alignment of the text in a multi-line BitmapText object. Default 0. + */ + bitmapText(x: number, y: number, font: string, text?: string | string[], size?: number, align?: integer): Phaser.GameObjects.BitmapText; + + /** + * Creates a new Blitter Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Blitter Game Object has been built into Phaser. + * @param x The x position of the Game Object. + * @param y The y position of the Game Object. + * @param key The key of the Texture the Blitter object will use. + * @param frame The default Frame children of the Blitter will use. + */ + blitter(x: number, y: number, key: string, frame?: string | integer): Phaser.GameObjects.Blitter; + + /** + * Creates a new Container Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Container Game Object has been built into Phaser. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param children An optional array of Game Objects to add to this Container. + */ + container(x: number, y: number, children?: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[]): Phaser.GameObjects.Container; + + /** + * DOM Element Game Objects are a way to control and manipulate HTML Elements over the top of your game. + * + * In order for DOM Elements to display you have to enable them by adding the following to your game + * configuration object: + * + * ```javascript + * dom { + * createContainer: true + * } + * ``` + * + * When this is added, Phaser will automatically create a DOM Container div that is positioned over the top + * of the game canvas. This div is sized to match the canvas, and if the canvas size changes, as a result of + * settings within the Scale Manager, the dom container is resized accordingly. + * + * You can create a DOM Element by either passing in DOMStrings, or by passing in a reference to an existing + * Element that you wish to be placed under the control of Phaser. For example: + * + * ```javascript + * this.add.dom(x, y, 'div', 'background-color: lime; width: 220px; height: 100px; font: 48px Arial', 'Phaser'); + * ``` + * + * The above code will insert a div element into the DOM Container at the given x/y coordinate. The DOMString in + * the 4th argument sets the initial CSS style of the div and the final argument is the inner text. In this case, + * it will create a lime colored div that is 220px by 100px in size with the text Phaser in it, in an Arial font. + * + * You should nearly always, without exception, use explicitly sized HTML Elements, in order to fully control + * alignment and positioning of the elements next to regular game content. + * + * Rather than specify the CSS and HTML directly you can use the `load.html` File Loader to load it into the + * cache and then use the `createFromCache` method instead. You can also use `createFromHTML` and various other + * methods available in this class to help construct your elements. + * + * Once the element has been created you can then control it like you would any other Game Object. You can set its + * position, scale, rotation, alpha and other properties. It will move as the main Scene Camera moves and be clipped + * at the edge of the canvas. It's important to remember some limitations of DOM Elements: The obvious one is that + * they appear above or below your game canvas. You cannot blend them into the display list, meaning you cannot have + * a DOM Element, then a Sprite, then another DOM Element behind it. + * + * They also cannot be enabled for input. To do that, you have to use the `addListener` method to add native event + * listeners directly. The final limitation is to do with cameras. The DOM Container is sized to match the game canvas + * entirely and clipped accordingly. DOM Elements respect camera scrolling and scrollFactor settings, but if you + * change the size of the camera so it no longer matches the size of the canvas, they won't be clipped accordingly. + * + * Also, all DOM Elements are inserted into the same DOM Container, regardless of which Scene they are created in. + * + * DOM Elements are a powerful way to align native HTML with your Phaser Game Objects. For example, you can insert + * a login form for a multiplayer game directly into your title screen. Or a text input box for a highscore table. + * Or a banner ad from a 3rd party service. Or perhaps you'd like to use them for high resolution text display and + * UI. The choice is up to you, just remember that you're dealing with standard HTML and CSS floating over the top + * of your game, and should treat it accordingly. + * + * Note: This method will only be available if the DOM Element Game Object has been built into Phaser. + * @param x The horizontal position of this DOM Element in the world. + * @param y The vertical position of this DOM Element in the world. + * @param element An existing DOM element, or a string. If a string starting with a # it will do a `getElementById` look-up on the string (minus the hash). Without a hash, it represents the type of element to create, i.e. 'div'. + * @param style If a string, will be set directly as the elements `style` property value. If a plain object, will be iterated and the values transferred. In both cases the values replacing whatever CSS styles may have been previously set. + * @param innerText If given, will be set directly as the elements `innerText` property value, replacing whatever was there before. + */ + dom(x: number, y: number, element?: HTMLElement | string, style?: string | any, innerText?: string): Phaser.GameObjects.DOMElement; + + /** + * Creates a new Extern Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Extern Game Object has been built into Phaser. + */ + extern(): Phaser.GameObjects.Extern; + + /** + * The Scene to which this Game Object Factory belongs. + */ + protected scene: Phaser.Scene; + + /** + * A reference to the Scene.Systems. + */ + protected systems: Phaser.Scenes.Systems; + + /** + * A reference to the Scene Display List. + */ + protected displayList: Phaser.GameObjects.DisplayList; + + /** + * A reference to the Scene Update List. + */ + protected updateList: Phaser.GameObjects.UpdateList; + + /** + * Adds an existing Game Object to this Scene. + * + * If the Game Object renders, it will be added to the Display List. + * If it has a `preUpdate` method, it will be added to the Update List. + * @param child The child to be added to this Scene. + */ + existing(child: Phaser.GameObjects.GameObject | Phaser.GameObjects.Group): Phaser.GameObjects.GameObject; + + /** + * Static method called directly by the Game Object factory functions. + * With this method you can register a custom GameObject factory in the GameObjectFactory, + * providing a name (`factoryType`) and the constructor (`factoryFunction`) in order + * to be called when you call to Phaser.Scene.add[ factoryType ] method. + * @param factoryType The key of the factory that you will use to call to Phaser.Scene.add[ factoryType ] method. + * @param factoryFunction The constructor function to be called when you invoke to the Phaser.Scene.add method. + */ + static register(factoryType: string, factoryFunction: Function): void; + + /** + * Static method called directly by the Game Object factory functions. + * With this method you can remove a custom GameObject factory registered in the GameObjectFactory, + * providing a its `factoryType`. + * @param factoryType The key of the factory that you want to remove from the GameObjectFactory. + */ + static remove(factoryType: string): void; + + /** + * Creates a new Graphics Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Graphics Game Object has been built into Phaser. + * @param config The Graphics configuration. + */ + graphics(config?: Phaser.Types.GameObjects.Graphics.Options): Phaser.GameObjects.Graphics; + + /** + * Creates a new Group Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Group Game Object has been built into Phaser. + * @param children Game Objects to add to this Group; or the `config` argument. + * @param config A Group Configuration object. + */ + group(children?: Phaser.GameObjects.GameObject[] | Phaser.Types.GameObjects.Group.GroupConfig | Phaser.Types.GameObjects.Group.GroupConfig[], config?: Phaser.Types.GameObjects.Group.GroupConfig | Phaser.Types.GameObjects.Group.GroupCreateConfig): Phaser.GameObjects.Group; + + /** + * Creates a new Image Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Image Game Object has been built into Phaser. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + image(x: number, y: number, texture: string, frame?: string | integer): Phaser.GameObjects.Image; + + /** + * Creates a new Mesh Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Mesh Game Object and WebGL support have been built into Phaser. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param vertices An array containing the vertices data for this Mesh. + * @param uv An array containing the uv data for this Mesh. + * @param colors An array containing the color data for this Mesh. + * @param alphas An array containing the alpha data for this Mesh. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + mesh(x: number, y: number, vertices: number[], uv: number[], colors: number[], alphas: number[], texture: string, frame?: string | integer): Phaser.GameObjects.Mesh; + + /** + * Creates a new Particle Emitter Manager Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Particles Game Object has been built into Phaser. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + * @param emitters Configuration settings for one or more emitters to create. + */ + particles(texture: string, frame?: string | integer | object, emitters?: Phaser.Types.GameObjects.Particles.ParticleEmitterConfig | Phaser.Types.GameObjects.Particles.ParticleEmitterConfig[]): Phaser.GameObjects.Particles.ParticleEmitterManager; + + /** + * Creates a new PathFollower Game Object and adds it to the Scene. + * + * Note: This method will only be available if the PathFollower Game Object has been built into Phaser. + * @param path The Path this PathFollower is connected to. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + follower(path: Phaser.Curves.Path, x: number, y: number, texture: string, frame?: string | integer): Phaser.GameObjects.PathFollower; + + /** + * Creates a new Quad Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Quad Game Object and WebGL support have been built into Phaser. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + quad(x: number, y: number, texture: string, frame?: string | integer): Phaser.GameObjects.Quad; + + /** + * Creates a new Render Texture Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Render Texture Game Object has been built into Phaser. + * + * A Render Texture is a special texture that allows any number of Game Objects to be drawn to it. You can take many complex objects and + * draw them all to this one texture, which can they be used as the texture for other Game Object's. It's a way to generate dynamic + * textures at run-time that are WebGL friendly and don't invoke expensive GPU uploads. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param width The width of the Render Texture. Default 32. + * @param height The height of the Render Texture. Default 32. + */ + renderTexture(x: number, y: number, width?: integer, height?: integer): Phaser.GameObjects.RenderTexture; + + /** + * Creates a new Shader Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Shader Game Object and WebGL support have been built into Phaser. + * @param key The key of the shader to use from the shader cache, or a BaseShader instance. + * @param x The horizontal position of this Game Object in the world. Default 0. + * @param y The vertical position of this Game Object in the world. Default 0. + * @param width The width of the Game Object. Default 128. + * @param height The height of the Game Object. Default 128. + * @param textures Optional array of texture keys to bind to the iChannel0...3 uniforms. The textures must already exist in the Texture Manager. + * @param textureData Optional additional texture data. + */ + shader(key: string | Phaser.Display.BaseShader, x?: number, y?: number, width?: number, height?: number, textures?: string[], textureData?: object): Phaser.GameObjects.Shader; + + /** + * Creates a new Arc Shape Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Arc Game Object has been built into Phaser. + * + * The Arc Shape is a Game Object that can be added to a Scene, Group or Container. You can + * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling + * it for input or physics. It provides a quick and easy way for you to render this shape in your + * game without using a texture, while still taking advantage of being fully batched in WebGL. + * + * This shape supports both fill and stroke colors. + * + * When it renders it displays an arc shape. You can control the start and end angles of the arc, + * as well as if the angles are winding clockwise or anti-clockwise. With the default settings + * it renders as a complete circle. By changing the angles you can create other arc shapes, + * such as half-circles. + * @param x The horizontal position of this Game Object in the world. Default 0. + * @param y The vertical position of this Game Object in the world. Default 0. + * @param radius The radius of the arc. Default 128. + * @param startAngle The start angle of the arc, in degrees. Default 0. + * @param endAngle The end angle of the arc, in degrees. Default 360. + * @param anticlockwise The winding order of the start and end angles. Default false. + * @param fillColor The color the arc will be filled with, i.e. 0xff0000 for red. + * @param fillAlpha The alpha the arc will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. + */ + arc(x?: number, y?: number, radius?: number, startAngle?: integer, endAngle?: integer, anticlockwise?: boolean, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Arc; + + /** + * Creates a new Circle Shape Game Object and adds it to the Scene. + * + * A Circle is an Arc with no defined start and end angle, making it render as a complete circle. + * + * Note: This method will only be available if the Arc Game Object has been built into Phaser. + * @param x The horizontal position of this Game Object in the world. Default 0. + * @param y The vertical position of this Game Object in the world. Default 0. + * @param radius The radius of the circle. Default 128. + * @param fillColor The color the circle will be filled with, i.e. 0xff0000 for red. + * @param fillAlpha The alpha the circle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. + */ + circle(x?: number, y?: number, radius?: number, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Arc; + + /** + * Creates a new Curve Shape Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Curve Game Object has been built into Phaser. + * + * The Curve Shape is a Game Object that can be added to a Scene, Group or Container. You can + * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling + * it for input or physics. It provides a quick and easy way for you to render this shape in your + * game without using a texture, while still taking advantage of being fully batched in WebGL. + * + * This shape supports both fill and stroke colors. + * + * To render a Curve Shape you must first create a `Phaser.Curves.Curve` object, then pass it to + * the Curve Shape in the constructor. + * + * The Curve shape also has a `smoothness` property and corresponding `setSmoothness` method. + * This allows you to control how smooth the shape renders in WebGL, by controlling the number of iterations + * that take place during construction. Increase and decrease the default value for smoother, or more + * jagged, shapes. + * @param x The horizontal position of this Game Object in the world. Default 0. + * @param y The vertical position of this Game Object in the world. Default 0. + * @param curve The Curve object to use to create the Shape. + * @param fillColor The color the curve will be filled with, i.e. 0xff0000 for red. + * @param fillAlpha The alpha the curve will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. + */ + curve(x?: number, y?: number, curve?: Phaser.Curves.Curve, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Curve; + + /** + * Creates a new Ellipse Shape Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Ellipse Game Object has been built into Phaser. + * + * The Ellipse Shape is a Game Object that can be added to a Scene, Group or Container. You can + * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling + * it for input or physics. It provides a quick and easy way for you to render this shape in your + * game without using a texture, while still taking advantage of being fully batched in WebGL. + * + * This shape supports both fill and stroke colors. + * + * When it renders it displays an ellipse shape. You can control the width and height of the ellipse. + * If the width and height match it will render as a circle. If the width is less than the height, + * it will look more like an egg shape. + * + * The Ellipse shape also has a `smoothness` property and corresponding `setSmoothness` method. + * This allows you to control how smooth the shape renders in WebGL, by controlling the number of iterations + * that take place during construction. Increase and decrease the default value for smoother, or more + * jagged, shapes. + * @param x The horizontal position of this Game Object in the world. Default 0. + * @param y The vertical position of this Game Object in the world. Default 0. + * @param width The width of the ellipse. An ellipse with equal width and height renders as a circle. Default 128. + * @param height The height of the ellipse. An ellipse with equal width and height renders as a circle. Default 128. + * @param fillColor The color the ellipse will be filled with, i.e. 0xff0000 for red. + * @param fillAlpha The alpha the ellipse will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. + */ + ellipse(x?: number, y?: number, width?: number, height?: number, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Ellipse; + + /** + * Creates a new Grid Shape Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Grid Game Object has been built into Phaser. + * + * The Grid Shape is a Game Object that can be added to a Scene, Group or Container. You can + * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling + * it for input or physics. It provides a quick and easy way for you to render this shape in your + * game without using a texture, while still taking advantage of being fully batched in WebGL. + * + * This shape supports only fill colors and cannot be stroked. + * + * A Grid Shape allows you to display a grid in your game, where you can control the size of the + * grid as well as the width and height of the grid cells. You can set a fill color for each grid + * cell as well as an alternate fill color. When the alternate fill color is set then the grid + * cells will alternate the fill colors as they render, creating a chess-board effect. You can + * also optionally have an outline fill color. If set, this draws lines between the grid cells + * in the given color. If you specify an outline color with an alpha of zero, then it will draw + * the cells spaced out, but without the lines between them. + * @param x The horizontal position of this Game Object in the world. Default 0. + * @param y The vertical position of this Game Object in the world. Default 0. + * @param width The width of the grid. Default 128. + * @param height The height of the grid. Default 128. + * @param cellWidth The width of one cell in the grid. Default 32. + * @param cellHeight The height of one cell in the grid. Default 32. + * @param fillColor The color the grid cells will be filled with, i.e. 0xff0000 for red. + * @param fillAlpha The alpha the grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. + * @param outlineFillColor The color of the lines between the grid cells. + * @param outlineFillAlpha The alpha of the lines between the grid cells. + */ + grid(x?: number, y?: number, width?: number, height?: number, cellWidth?: number, cellHeight?: number, fillColor?: number, fillAlpha?: number, outlineFillColor?: number, outlineFillAlpha?: number): Phaser.GameObjects.Grid; + + /** + * Creates a new IsoBox Shape Game Object and adds it to the Scene. + * + * Note: This method will only be available if the IsoBox Game Object has been built into Phaser. + * + * The IsoBox Shape is a Game Object that can be added to a Scene, Group or Container. You can + * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling + * it for input or physics. It provides a quick and easy way for you to render this shape in your + * game without using a texture, while still taking advantage of being fully batched in WebGL. + * + * This shape supports only fill colors and cannot be stroked. + * + * An IsoBox is an 'isometric' rectangle. Each face of it has a different fill color. You can set + * the color of the top, left and right faces of the rectangle respectively. You can also choose + * which of the faces are rendered via the `showTop`, `showLeft` and `showRight` properties. + * + * You cannot view an IsoBox from under-neath, however you can change the 'angle' by setting + * the `projection` property. + * @param x The horizontal position of this Game Object in the world. Default 0. + * @param y The vertical position of this Game Object in the world. Default 0. + * @param size The width of the iso box in pixels. The left and right faces will be exactly half this value. Default 48. + * @param height The height of the iso box. The left and right faces will be this tall. The overall height of the isobox will be this value plus half the `size` value. Default 32. + * @param fillTop The fill color of the top face of the iso box. Default 0xeeeeee. + * @param fillLeft The fill color of the left face of the iso box. Default 0x999999. + * @param fillRight The fill color of the right face of the iso box. Default 0xcccccc. + */ + isobox(x?: number, y?: number, size?: number, height?: number, fillTop?: number, fillLeft?: number, fillRight?: number): Phaser.GameObjects.IsoBox; + + /** + * Creates a new IsoTriangle Shape Game Object and adds it to the Scene. + * + * Note: This method will only be available if the IsoTriangle Game Object has been built into Phaser. + * + * The IsoTriangle Shape is a Game Object that can be added to a Scene, Group or Container. You can + * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling + * it for input or physics. It provides a quick and easy way for you to render this shape in your + * game without using a texture, while still taking advantage of being fully batched in WebGL. + * + * This shape supports only fill colors and cannot be stroked. + * + * An IsoTriangle is an 'isometric' triangle. Think of it like a pyramid. Each face has a different + * fill color. You can set the color of the top, left and right faces of the triangle respectively + * You can also choose which of the faces are rendered via the `showTop`, `showLeft` and `showRight` properties. + * + * You cannot view an IsoTriangle from under-neath, however you can change the 'angle' by setting + * the `projection` property. The `reversed` property controls if the IsoTriangle is rendered upside + * down or not. + * @param x The horizontal position of this Game Object in the world. Default 0. + * @param y The vertical position of this Game Object in the world. Default 0. + * @param size The width of the iso triangle in pixels. The left and right faces will be exactly half this value. Default 48. + * @param height The height of the iso triangle. The left and right faces will be this tall. The overall height of the iso triangle will be this value plus half the `size` value. Default 32. + * @param reversed Is the iso triangle upside down? Default false. + * @param fillTop The fill color of the top face of the iso triangle. Default 0xeeeeee. + * @param fillLeft The fill color of the left face of the iso triangle. Default 0x999999. + * @param fillRight The fill color of the right face of the iso triangle. Default 0xcccccc. + */ + isotriangle(x?: number, y?: number, size?: number, height?: number, reversed?: boolean, fillTop?: number, fillLeft?: number, fillRight?: number): Phaser.GameObjects.IsoTriangle; + + /** + * Creates a new Line Shape Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Line Game Object has been built into Phaser. + * + * The Line Shape is a Game Object that can be added to a Scene, Group or Container. You can + * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling + * it for input or physics. It provides a quick and easy way for you to render this shape in your + * game without using a texture, while still taking advantage of being fully batched in WebGL. + * + * This shape supports only stroke colors and cannot be filled. + * + * A Line Shape allows you to draw a line between two points in your game. You can control the + * stroke color and thickness of the line. In WebGL only you can also specify a different + * thickness for the start and end of the line, allowing you to render lines that taper-off. + * + * If you need to draw multiple lines in a sequence you may wish to use the Polygon Shape instead. + * @param x The horizontal position of this Game Object in the world. Default 0. + * @param y The vertical position of this Game Object in the world. Default 0. + * @param x1 The horizontal position of the start of the line. Default 0. + * @param y1 The vertical position of the start of the line. Default 0. + * @param x2 The horizontal position of the end of the line. Default 128. + * @param y2 The vertical position of the end of the line. Default 0. + * @param strokeColor The color the line will be drawn in, i.e. 0xff0000 for red. + * @param strokeAlpha The alpha the line will be drawn in. You can also set the alpha of the overall Shape using its `alpha` property. + */ + line(x?: number, y?: number, x1?: number, y1?: number, x2?: number, y2?: number, strokeColor?: number, strokeAlpha?: number): Phaser.GameObjects.Line; + + /** + * Creates a new Polygon Shape Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Polygon Game Object has been built into Phaser. + * + * The Polygon Shape is a Game Object that can be added to a Scene, Group or Container. You can + * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling + * it for input or physics. It provides a quick and easy way for you to render this shape in your + * game without using a texture, while still taking advantage of being fully batched in WebGL. + * + * This shape supports both fill and stroke colors. + * + * The Polygon Shape is created by providing a list of points, which are then used to create an + * internal Polygon geometry object. The points can be set from a variety of formats: + * + * - An array of Point or Vector2 objects: `[new Phaser.Math.Vector2(x1, y1), ...]` + * - An array of objects with public x/y properties: `[obj1, obj2, ...]` + * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]` + * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]` + * + * By default the `x` and `y` coordinates of this Shape refer to the center of it. However, depending + * on the coordinates of the points provided, the final shape may be rendered offset from its origin. + * @param x The horizontal position of this Game Object in the world. Default 0. + * @param y The vertical position of this Game Object in the world. Default 0. + * @param points The points that make up the polygon. + * @param fillColor The color the polygon will be filled with, i.e. 0xff0000 for red. + * @param fillAlpha The alpha the polygon will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. + */ + polygon(x?: number, y?: number, points?: any, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Polygon; + + /** + * Creates a new Rectangle Shape Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Rectangle Game Object has been built into Phaser. + * + * The Rectangle Shape is a Game Object that can be added to a Scene, Group or Container. You can + * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling + * it for input or physics. It provides a quick and easy way for you to render this shape in your + * game without using a texture, while still taking advantage of being fully batched in WebGL. + * + * This shape supports both fill and stroke colors. + * + * You can change the size of the rectangle by changing the `width` and `height` properties. + * @param x The horizontal position of this Game Object in the world. Default 0. + * @param y The vertical position of this Game Object in the world. Default 0. + * @param width The width of the rectangle. Default 128. + * @param height The height of the rectangle. Default 128. + * @param fillColor The color the rectangle will be filled with, i.e. 0xff0000 for red. + * @param fillAlpha The alpha the rectangle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. + */ + rectangle(x?: number, y?: number, width?: number, height?: number, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Rectangle; + + /** + * Creates a new Star Shape Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Star Game Object has been built into Phaser. + * + * The Star Shape is a Game Object that can be added to a Scene, Group or Container. You can + * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling + * it for input or physics. It provides a quick and easy way for you to render this shape in your + * game without using a texture, while still taking advantage of being fully batched in WebGL. + * + * This shape supports both fill and stroke colors. + * + * As the name implies, the Star shape will display a star in your game. You can control several + * aspects of it including the number of points that constitute the star. The default is 5. If + * you change it to 4 it will render as a diamond. If you increase them, you'll get a more spiky + * star shape. + * + * You can also control the inner and outer radius, which is how 'long' each point of the star is. + * Modify these values to create more interesting shapes. + * @param x The horizontal position of this Game Object in the world. Default 0. + * @param y The vertical position of this Game Object in the world. Default 0. + * @param points The number of points on the star. Default 5. + * @param innerRadius The inner radius of the star. Default 32. + * @param outerRadius The outer radius of the star. Default 64. + * @param fillColor The color the star will be filled with, i.e. 0xff0000 for red. + * @param fillAlpha The alpha the star will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. + */ + star(x?: number, y?: number, points?: number, innerRadius?: number, outerRadius?: number, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Star; + + /** + * Creates a new Triangle Shape Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Triangle Game Object has been built into Phaser. + * + * The Triangle Shape is a Game Object that can be added to a Scene, Group or Container. You can + * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling + * it for input or physics. It provides a quick and easy way for you to render this shape in your + * game without using a texture, while still taking advantage of being fully batched in WebGL. + * + * This shape supports both fill and stroke colors. + * + * The Triangle consists of 3 lines, joining up to form a triangular shape. You can control the + * position of each point of these lines. The triangle is always closed and cannot have an open + * face. If you require that, consider using a Polygon instead. + * @param x The horizontal position of this Game Object in the world. Default 0. + * @param y The vertical position of this Game Object in the world. Default 0. + * @param x1 The horizontal position of the first point in the triangle. Default 0. + * @param y1 The vertical position of the first point in the triangle. Default 128. + * @param x2 The horizontal position of the second point in the triangle. Default 64. + * @param y2 The vertical position of the second point in the triangle. Default 0. + * @param x3 The horizontal position of the third point in the triangle. Default 128. + * @param y3 The vertical position of the third point in the triangle. Default 128. + * @param fillColor The color the triangle will be filled with, i.e. 0xff0000 for red. + * @param fillAlpha The alpha the triangle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. + */ + triangle(x?: number, y?: number, x1?: number, y1?: number, x2?: number, y2?: number, x3?: number, y3?: number, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Triangle; + + /** + * Creates a new Sprite Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Sprite Game Object has been built into Phaser. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + sprite(x: number, y: number, texture: string, frame?: string | integer): Phaser.GameObjects.Sprite; + + /** + * Creates a new Text Game Object and adds it to the Scene. + * + * A Text Game Object. + * + * Text objects work by creating their own internal hidden Canvas and then renders text to it using + * the standard Canvas `fillText` API. It then creates a texture from this canvas which is rendered + * to your game during the render pass. + * + * Because it uses the Canvas API you can take advantage of all the features this offers, such as + * applying gradient fills to the text, or strokes, shadows and more. You can also use custom fonts + * loaded externally, such as Google or TypeKit Web fonts. + * + * You can only display fonts that are currently loaded and available to the browser: therefore fonts must + * be pre-loaded. Phaser does not do ths for you, so you will require the use of a 3rd party font loader, + * or have the fonts ready available in the CSS on the page in which your Phaser game resides. + * + * See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts + * across mobile browsers. + * + * A note on performance: Every time the contents of a Text object changes, i.e. changing the text being + * displayed, or the style of the text, it needs to remake the Text canvas, and if on WebGL, re-upload the + * new texture to the GPU. This can be an expensive operation if used often, or with large quantities of + * Text objects in your game. If you run into performance issues you would be better off using Bitmap Text + * instead, as it benefits from batching and avoids expensive Canvas API calls. + * + * Note: This method will only be available if the Text Game Object has been built into Phaser. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param text The text this Text object will display. + * @param style The Text style configuration object. + */ + text(x: number, y: number, text: string | string[], style?: object): Phaser.GameObjects.Text; + + /** + * Creates a new TileSprite Game Object and adds it to the Scene. + * + * Note: This method will only be available if the TileSprite Game Object has been built into Phaser. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param width The width of the Game Object. If zero it will use the size of the texture frame. + * @param height The height of the Game Object. If zero it will use the size of the texture frame. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + tileSprite(x: number, y: number, width: integer, height: integer, texture: string, frame?: string | integer): Phaser.GameObjects.TileSprite; + + /** + * Creates a new Image Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Image Game Object has been built into Phaser. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + video(x: number, y: number, texture: string, frame?: string | integer): Phaser.GameObjects.Image; + + /** + * Creates a new Zone Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Zone Game Object has been built into Phaser. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param width The width of the Game Object. + * @param height The height of the Game Object. + */ + zone(x: number, y: number, width: number, height: number): Phaser.GameObjects.Zone; + + /** + * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. + * When loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing + * from a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the map + * data. For an empty map, you should specify tileWidth, tileHeight, width & height. + * @param key The key in the Phaser cache that corresponds to the loaded tilemap data. + * @param tileWidth The width of a tile in pixels. Pass in `null` to leave as the + * default. Default 32. + * @param tileHeight The height of a tile in pixels. Pass in `null` to leave as the + * default. Default 32. + * @param width The width of the map in tiles. Pass in `null` to leave as the + * default. Default 10. + * @param height The height of the map in tiles. Pass in `null` to leave as the + * default. Default 10. + * @param data Instead of loading from the cache, you can also load directly from + * a 2D array of tile indexes. Pass in `null` for no data. + * @param insertNull Controls how empty tiles, tiles with an index of -1, in the + * map data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty + * location will get a Tile object with an index of -1. If you've a large sparsely populated map and + * the tile data doesn't need to change then setting this value to `true` will help with memory + * consumption. However if your map is small or you need to update the tiles dynamically, then leave + * the default value set. Default false. + */ + tilemap(key?: string, tileWidth?: integer, tileHeight?: integer, width?: integer, height?: integer, data?: integer[][], insertNull?: boolean): Phaser.Tilemaps.Tilemap; + + /** + * Creates a new Tween object. + * + * Note: This method will only be available if Tweens have been built into Phaser. + * @param config The Tween configuration. + */ + tween(config: Phaser.Types.Tweens.TweenBuilderConfig | object): Phaser.Tweens.Tween; + + } + /** * A Graphics object is a way to draw primitive shapes to your game. Primitives include forms of geometry, such as * Rectangles, Circles, and Polygons. They also include lines, arcs and curves. When you initially create a Graphics @@ -16009,7 +16062,7 @@ declare namespace Phaser { * As you can tell, Graphics objects are a bit of a trade-off. While they are extremely useful, you need to be careful * in their complexity and quantity of them in your game. */ - class Graphics extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible, Phaser.GameObjects.Components.ScrollFactor { + class Graphics extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.AlphaSingle, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible, Phaser.GameObjects.Components.ScrollFactor { /** * * @param scene The Scene to which this Graphics object belongs. @@ -16524,6 +16577,27 @@ declare namespace Phaser { */ static TargetCamera: Phaser.Cameras.Scene2D.Camera; + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * @param value The alpha value applied across the whole Game Object. Default 1. + */ + setAlpha(value?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + /** * Sets the Blend Mode being used by this Game Object. * @@ -24637,707 +24711,6 @@ declare namespace Phaser { } - /** - * The Shape Game Object is a base class for the various different shapes, such as the Arc, Star or Polygon. - * You cannot add a Shape directly to your Scene, it is meant as a base for your own custom Shape classes. - */ - class Shape extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.ComputedSize, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { - /** - * - * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. - * @param type The internal type of the Shape. - * @param data The data of the source shape geometry, if any. - */ - constructor(scene: Phaser.Scene, type?: string, data?: any); - - /** - * The source Shape data. Typically a geometry object. - * You should not manipulate this directly. - */ - readonly data: any; - - /** - * Holds the polygon path data for filled rendering. - */ - readonly pathData: number[]; - - /** - * Holds the earcut polygon path index data for filled rendering. - */ - readonly pathIndexes: integer[]; - - /** - * The fill color used by this Shape. - */ - fillColor: number; - - /** - * The fill alpha value used by this Shape. - */ - fillAlpha: number; - - /** - * The stroke color used by this Shape. - */ - strokeColor: number; - - /** - * The stroke alpha value used by this Shape. - */ - strokeAlpha: number; - - /** - * The stroke line width used by this Shape. - */ - lineWidth: number; - - /** - * Controls if this Shape is filled or not. - * Note that some Shapes do not support being filled (such as Line shapes) - */ - isFilled: boolean; - - /** - * Controls if this Shape is stroked or not. - * Note that some Shapes do not support being stroked (such as Iso Box shapes) - */ - isStroked: boolean; - - /** - * Controls if this Shape path is closed during rendering when stroked. - * Note that some Shapes are always closed when stroked (such as Ellipse shapes) - */ - closePath: boolean; - - /** - * Sets the fill color and alpha for this Shape. - * - * If you wish for the Shape to not be filled then call this method with no arguments, or just set `isFilled` to `false`. - * - * Note that some Shapes do not support fill colors, such as the Line shape. - * - * This call can be chained. - * @param color The color used to fill this shape. If not provided the Shape will not be filled. - * @param alpha The alpha value used when filling this shape, if a fill color is given. Default 1. - */ - setFillStyle(color?: number, alpha?: number): this; - - /** - * Sets the stroke color and alpha for this Shape. - * - * If you wish for the Shape to not be stroked then call this method with no arguments, or just set `isStroked` to `false`. - * - * Note that some Shapes do not support being stroked, such as the Iso Box shape. - * - * This call can be chained. - * @param lineWidth The width of line to stroke with. If not provided or undefined the Shape will not be stroked. - * @param color The color used to stroke this shape. If not provided the Shape will not be stroked. - * @param alpha The alpha value used when stroking this shape, if a stroke color is given. Default 1. - */ - setStrokeStyle(lineWidth?: number, color?: number, alpha?: number): this; - - /** - * Sets if this Shape path is closed during rendering when stroked. - * Note that some Shapes are always closed when stroked (such as Ellipse shapes) - * - * This call can be chained. - * @param value Set to `true` if the Shape should be closed when stroked, otherwise `false`. - */ - setClosePath(value: boolean): this; - - /** - * Internal destroy handler, called as part of the destroy process. - */ - protected preDestroy(): void; - - /** - * Sets the Blend Mode being used by this Game Object. - * - * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) - * - * Under WebGL only the following Blend Modes are available: - * - * * ADD - * * MULTIPLY - * * SCREEN - * * ERASE - * - * Canvas has more available depending on browser support. - * - * You can also create your own custom Blend Modes in WebGL. - * - * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending - * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these - * reasons try to be careful about the construction of your Scene and the frequency of which blend modes - * are used. - */ - blendMode: Phaser.BlendModes | string; - - /** - * Sets the Blend Mode being used by this Game Object. - * - * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) - * - * Under WebGL only the following Blend Modes are available: - * - * * ADD - * * MULTIPLY - * * SCREEN - * * ERASE (only works when rendering to a framebuffer, like a Render Texture) - * - * Canvas has more available depending on browser support. - * - * You can also create your own custom Blend Modes in WebGL. - * - * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending - * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these - * reasons try to be careful about the construction of your Scene and the frequency in which blend modes - * are used. - * @param value The BlendMode value. Either a string or a CONST. - */ - setBlendMode(value: string | Phaser.BlendModes): this; - - /** - * The native (un-scaled) width of this Game Object. - * - * Changing this value will not change the size that the Game Object is rendered in-game. - * For that you need to either set the scale of the Game Object (`setScale`) or use - * the `displayWidth` property. - */ - width: number; - - /** - * The native (un-scaled) height of this Game Object. - * - * Changing this value will not change the size that the Game Object is rendered in-game. - * For that you need to either set the scale of the Game Object (`setScale`) or use - * the `displayHeight` property. - */ - height: number; - - /** - * The displayed width of this Game Object. - * - * This value takes into account the scale factor. - * - * Setting this value will adjust the Game Object's scale property. - */ - displayWidth: number; - - /** - * The displayed height of this Game Object. - * - * This value takes into account the scale factor. - * - * Setting this value will adjust the Game Object's scale property. - */ - displayHeight: number; - - /** - * Sets the internal size of this Game Object, as used for frame or physics body creation. - * - * This will not change the size that the Game Object is rendered in-game. - * For that you need to either set the scale of the Game Object (`setScale`) or call the - * `setDisplaySize` method, which is the same thing as changing the scale but allows you - * to do so by giving pixel values. - * - * If you have enabled this Game Object for input, changing the size will _not_ change the - * size of the hit area. To do this you should adjust the `input.hitArea` object directly. - * @param width The width of this Game Object. - * @param height The height of this Game Object. - */ - setSize(width: number, height: number): this; - - /** - * Sets the display size of this Game Object. - * - * Calling this will adjust the scale. - * @param width The width of this Game Object. - * @param height The height of this Game Object. - */ - setDisplaySize(width: number, height: number): this; - - /** - * The depth of this Game Object within the Scene. - * - * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order - * of Game Objects, without actually moving their position in the display list. - * - * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth - * value will always render in front of one with a lower value. - * - * Setting the depth will queue a depth sort event within the Scene. - */ - depth: number; - - /** - * The depth of this Game Object within the Scene. - * - * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order - * of Game Objects, without actually moving their position in the display list. - * - * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth - * value will always render in front of one with a lower value. - * - * Setting the depth will queue a depth sort event within the Scene. - * @param value The depth of this Game Object. - */ - setDepth(value: integer): this; - - /** - * Gets the center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - */ - getCenter(output?: O): O; - - /** - * Gets the top-left corner coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getTopLeft(output?: O, includeParent?: boolean): O; - - /** - * Gets the top-center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getTopCenter(output?: O, includeParent?: boolean): O; - - /** - * Gets the top-right corner coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getTopRight(output?: O, includeParent?: boolean): O; - - /** - * Gets the left-center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getLeftCenter(output?: O, includeParent?: boolean): O; - - /** - * Gets the right-center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getRightCenter(output?: O, includeParent?: boolean): O; - - /** - * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getBottomLeft(output?: O, includeParent?: boolean): O; - - /** - * Gets the bottom-center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getBottomCenter(output?: O, includeParent?: boolean): O; - - /** - * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getBottomRight(output?: O, includeParent?: boolean): O; - - /** - * Gets the bounds of this Game Object, regardless of origin. - * The values are stored and returned in a Rectangle, or Rectangle-like, object. - * @param output An object to store the values in. If not provided a new Rectangle will be created. - */ - getBounds(output?: O): O; - - /** - * The Mask this Game Object is using during render. - */ - mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask; - - /** - * Sets the mask that this Game Object will use to render with. - * - * The mask must have been previously created and can be either a GeometryMask or a BitmapMask. - * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. - * - * If a mask is already set on this Game Object it will be immediately replaced. - * - * Masks are positioned in global space and are not relative to the Game Object to which they - * are applied. The reason for this is that multiple Game Objects can all share the same mask. - * - * Masks have no impact on physics or input detection. They are purely a rendering component - * that allows you to limit what is visible during the render pass. - * @param mask The mask this Game Object will use when rendering. - */ - setMask(mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask): this; - - /** - * Clears the mask that this Game Object was using. - * @param destroyMask Destroy the mask before clearing it? Default false. - */ - clearMask(destroyMask?: boolean): this; - - /** - * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, - * including this one. - * - * To create the mask you need to pass in a reference to a renderable Game Object. - * A renderable Game Object is one that uses a texture to render with, such as an - * Image, Sprite, Render Texture or BitmapText. - * - * If you do not provide a renderable object, and this Game Object has a texture, - * it will use itself as the object. This means you can call this method to create - * a Bitmap Mask from any renderable Game Object. - * @param renderable A renderable Game Object that uses a texture, such as a Sprite. - */ - createBitmapMask(renderable?: Phaser.GameObjects.GameObject): Phaser.Display.Masks.BitmapMask; - - /** - * Creates and returns a Geometry Mask. This mask can be used by any Game Object, - * including this one. - * - * To create the mask you need to pass in a reference to a Graphics Game Object. - * - * If you do not provide a graphics object, and this Game Object is an instance - * of a Graphics object, then it will use itself to create the mask. - * - * This means you can call this method to create a Geometry Mask from any Graphics Game Object. - * @param graphics A Graphics Game Object. The geometry within it will be used as the mask. - */ - createGeometryMask(graphics?: Phaser.GameObjects.Graphics): Phaser.Display.Masks.GeometryMask; - - /** - * The horizontal origin of this Game Object. - * The origin maps the relationship between the size and position of the Game Object. - * The default value is 0.5, meaning all Game Objects are positioned based on their center. - * Setting the value to 0 means the position now relates to the left of the Game Object. - */ - originX: number; - - /** - * The vertical origin of this Game Object. - * The origin maps the relationship between the size and position of the Game Object. - * The default value is 0.5, meaning all Game Objects are positioned based on their center. - * Setting the value to 0 means the position now relates to the top of the Game Object. - */ - originY: number; - - /** - * The horizontal display origin of this Game Object. - * The origin is a normalized value between 0 and 1. - * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. - */ - displayOriginX: number; - - /** - * The vertical display origin of this Game Object. - * The origin is a normalized value between 0 and 1. - * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. - */ - displayOriginY: number; - - /** - * Sets the origin of this Game Object. - * - * The values are given in the range 0 to 1. - * @param x The horizontal origin value. Default 0.5. - * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x. - */ - setOrigin(x?: number, y?: number): this; - - /** - * Sets the origin of this Game Object based on the Pivot values in its Frame. - */ - setOriginFromFrame(): this; - - /** - * Sets the display origin of this Game Object. - * The difference between this and setting the origin is that you can use pixel values for setting the display origin. - * @param x The horizontal display origin value. Default 0. - * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x. - */ - setDisplayOrigin(x?: number, y?: number): this; - - /** - * Updates the Display Origin cached values internally stored on this Game Object. - * You don't usually call this directly, but it is exposed for edge-cases where you may. - */ - updateDisplayOrigin(): this; - - /** - * The initial WebGL pipeline of this Game Object. - */ - defaultPipeline: Phaser.Renderer.WebGL.WebGLPipeline; - - /** - * The current WebGL pipeline of this Game Object. - */ - pipeline: Phaser.Renderer.WebGL.WebGLPipeline; - - /** - * Sets the initial WebGL Pipeline of this Game Object. - * This should only be called during the instantiation of the Game Object. - * @param pipelineName The name of the pipeline to set on this Game Object. Defaults to the Texture Tint Pipeline. Default TextureTintPipeline. - */ - initPipeline(pipelineName?: string): boolean; - - /** - * Sets the active WebGL Pipeline of this Game Object. - * @param pipelineName The name of the pipeline to set on this Game Object. - */ - setPipeline(pipelineName: string): this; - - /** - * Resets the WebGL Pipeline of this Game Object back to the default it was created with. - */ - resetPipeline(): boolean; - - /** - * Gets the name of the WebGL Pipeline this Game Object is currently using. - */ - getPipelineName(): string; - - /** - * The horizontal scroll factor of this Game Object. - * - * The scroll factor controls the influence of the movement of a Camera upon this Game Object. - * - * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. - * It does not change the Game Objects actual position values. - * - * A value of 1 means it will move exactly in sync with a camera. - * A value of 0 means it will not move at all, even if the camera moves. - * Other values control the degree to which the camera movement is mapped to this Game Object. - * - * Please be aware that scroll factor values other than 1 are not taken in to consideration when - * calculating physics collisions. Bodies always collide based on their world position, but changing - * the scroll factor is a visual adjustment to where the textures are rendered, which can offset - * them from physics bodies if not accounted for in your code. - */ - scrollFactorX: number; - - /** - * The vertical scroll factor of this Game Object. - * - * The scroll factor controls the influence of the movement of a Camera upon this Game Object. - * - * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. - * It does not change the Game Objects actual position values. - * - * A value of 1 means it will move exactly in sync with a camera. - * A value of 0 means it will not move at all, even if the camera moves. - * Other values control the degree to which the camera movement is mapped to this Game Object. - * - * Please be aware that scroll factor values other than 1 are not taken in to consideration when - * calculating physics collisions. Bodies always collide based on their world position, but changing - * the scroll factor is a visual adjustment to where the textures are rendered, which can offset - * them from physics bodies if not accounted for in your code. - */ - scrollFactorY: number; - - /** - * Sets the scroll factor of this Game Object. - * - * The scroll factor controls the influence of the movement of a Camera upon this Game Object. - * - * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. - * It does not change the Game Objects actual position values. - * - * A value of 1 means it will move exactly in sync with a camera. - * A value of 0 means it will not move at all, even if the camera moves. - * Other values control the degree to which the camera movement is mapped to this Game Object. - * - * Please be aware that scroll factor values other than 1 are not taken in to consideration when - * calculating physics collisions. Bodies always collide based on their world position, but changing - * the scroll factor is a visual adjustment to where the textures are rendered, which can offset - * them from physics bodies if not accounted for in your code. - * @param x The horizontal scroll factor of this Game Object. - * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. - */ - setScrollFactor(x: number, y?: number): this; - - /** - * The x position of this Game Object. - */ - x: number; - - /** - * The y position of this Game Object. - */ - y: number; - - /** - * The z position of this Game Object. - * - * Note: The z position does not control the rendering order of 2D Game Objects. Use - * {@link Phaser.GameObjects.Components.Depth#depth} instead. - */ - z: number; - - /** - * The w position of this Game Object. - */ - w: number; - - /** - * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object - * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`. - * - * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this - * isn't the case, use the `scaleX` or `scaleY` properties instead. - */ - scale: number; - - /** - * The horizontal scale of this Game Object. - */ - scaleX: number; - - /** - * The vertical scale of this Game Object. - */ - scaleY: number; - - /** - * The angle of this Game Object as expressed in degrees. - * - * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left - * and -90 is up. - * - * If you prefer to work in radians, see the `rotation` property instead. - */ - angle: integer; - - /** - * The angle of this Game Object in radians. - * - * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left - * and -90 is up. - * - * If you prefer to work in degrees, see the `angle` property instead. - */ - rotation: number; - - /** - * Sets the position of this Game Object. - * @param x The x position of this Game Object. Default 0. - * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. - * @param z The z position of this Game Object. Default 0. - * @param w The w position of this Game Object. Default 0. - */ - setPosition(x?: number, y?: number, z?: number, w?: number): this; - - /** - * Sets the position of this Game Object to be a random position within the confines of - * the given area. - * - * If no area is specified a random position between 0 x 0 and the game width x height is used instead. - * - * The position does not factor in the size of this Game Object, meaning that only the origin is - * guaranteed to be within the area. - * @param x The x position of the top-left of the random area. Default 0. - * @param y The y position of the top-left of the random area. Default 0. - * @param width The width of the random area. - * @param height The height of the random area. - */ - setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; - - /** - * Sets the rotation of this Game Object. - * @param radians The rotation of this Game Object, in radians. Default 0. - */ - setRotation(radians?: number): this; - - /** - * Sets the angle of this Game Object. - * @param degrees The rotation of this Game Object, in degrees. Default 0. - */ - setAngle(degrees?: number): this; - - /** - * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. - * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. - */ - setScale(x: number, y?: number): this; - - /** - * Sets the x position of this Game Object. - * @param value The x position of this Game Object. Default 0. - */ - setX(value?: number): this; - - /** - * Sets the y position of this Game Object. - * @param value The y position of this Game Object. Default 0. - */ - setY(value?: number): this; - - /** - * Sets the z position of this Game Object. - * - * Note: The z position does not control the rendering order of 2D Game Objects. Use - * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. - * @param value The z position of this Game Object. Default 0. - */ - setZ(value?: number): this; - - /** - * Sets the w position of this Game Object. - * @param value The w position of this Game Object. Default 0. - */ - setW(value?: number): this; - - /** - * Gets the local transform matrix for this Game Object. - * @param tempMatrix The matrix to populate with the values from this Game Object. - */ - getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; - - /** - * Gets the world transform matrix for this Game Object, factoring in any parent Containers. - * @param tempMatrix The matrix to populate with the values from this Game Object. - * @param parentMatrix A temporary matrix to hold parent values during the calculations. - */ - getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; - - /** - * Gets the sum total rotation of all of this Game Objects parent Containers. - * - * The returned value is in radians and will be zero if this Game Object has no parent container. - */ - getParentRotation(): number; - - /** - * The visible state of the Game Object. - * - * An invisible Game Object will skip rendering, but will still process update logic. - */ - visible: boolean; - - /** - * Sets the visibility of this Game Object. - * - * An invisible Game Object will skip rendering, but will still process update logic. - * @param value The visible state of the Game Object. - */ - setVisible(value: boolean): this; - - } - /** * The Arc Shape is a Game Object that can be added to a Scene, Group or Container. You can * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling @@ -25427,6 +24800,27 @@ declare namespace Phaser { */ setEndAngle(value: integer): this; + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * @param value The alpha value applied across the whole Game Object. Default 1. + */ + setAlpha(value?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + /** * Sets the Blend Mode being used by this Game Object. * @@ -26057,6 +25451,27 @@ declare namespace Phaser { */ setSmoothness(value: integer): this; + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * @param value The alpha value applied across the whole Game Object. Default 1. + */ + setAlpha(value?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + /** * Sets the Blend Mode being used by this Game Object. * @@ -26697,6 +26112,27 @@ declare namespace Phaser { */ setSmoothness(value: integer): this; + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * @param value The alpha value applied across the whole Game Object. Default 1. + */ + setAlpha(value?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + /** * Sets the Blend Mode being used by this Game Object. * @@ -27392,6 +26828,27 @@ declare namespace Phaser { */ setOutlineStyle(fillColor?: number, fillAlpha?: number): this; + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * @param value The alpha value applied across the whole Game Object. Default 1. + */ + setAlpha(value?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + /** * Sets the Blend Mode being used by this Game Object. * @@ -28069,6 +27526,27 @@ declare namespace Phaser { */ setFillStyle(fillTop?: number, fillLeft?: number, fillRight?: number): this; + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * @param value The alpha value applied across the whole Game Object. Default 1. + */ + setAlpha(value?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + /** * Sets the Blend Mode being used by this Game Object. * @@ -28760,6 +28238,27 @@ declare namespace Phaser { */ setFillStyle(fillTop?: number, fillLeft?: number, fillRight?: number): this; + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * @param value The alpha value applied across the whole Game Object. Default 1. + */ + setAlpha(value?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + /** * Sets the Blend Mode being used by this Game Object. * @@ -29407,6 +28906,27 @@ declare namespace Phaser { */ setTo(x1?: number, y1?: number, x2?: number, y2?: number): this; + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * @param value The alpha value applied across the whole Game Object. Default 1. + */ + setAlpha(value?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + /** * Sets the Blend Mode being used by this Game Object. * @@ -30007,7 +29527,7 @@ declare namespace Phaser { * internal Polygon geometry object. The points can be set from a variety of formats: * * - A string containing paired values separated by a single space: `'40 0 40 20 100 20 100 80 40 80 40 100 0 50'` - * - An array of Point or Vector2 objects: `[new Phaser.Math.Vec2(x1, y1), ...]` + * - An array of Point or Vector2 objects: `[new Phaser.Math.Vector2(x1, y1), ...]` * - An array of objects with public x/y properties: `[obj1, obj2, ...]` * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]` * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]` @@ -30035,6 +29555,27 @@ declare namespace Phaser { */ smooth(iterations?: integer): this; + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * @param value The alpha value applied across the whole Game Object. Default 1. + */ + setAlpha(value?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + /** * Sets the Blend Mode being used by this Game Object. * @@ -30646,6 +30187,749 @@ declare namespace Phaser { */ constructor(scene: Phaser.Scene, x: number, y: number, width?: number, height?: number, fillColor?: number, fillAlpha?: number); + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * @param value The alpha value applied across the whole Game Object. Default 1. + */ + setAlpha(value?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * * ERASE + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + */ + blendMode: Phaser.BlendModes | string; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * * ERASE (only works when rendering to a framebuffer, like a Render Texture) + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency in which blend modes + * are used. + * @param value The BlendMode value. Either a string or a CONST. + */ + setBlendMode(value: string | Phaser.BlendModes): this; + + /** + * The native (un-scaled) width of this Game Object. + * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayWidth` property. + */ + width: number; + + /** + * The native (un-scaled) height of this Game Object. + * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayHeight` property. + */ + height: number; + + /** + * The displayed width of this Game Object. + * + * This value takes into account the scale factor. + * + * Setting this value will adjust the Game Object's scale property. + */ + displayWidth: number; + + /** + * The displayed height of this Game Object. + * + * This value takes into account the scale factor. + * + * Setting this value will adjust the Game Object's scale property. + */ + displayHeight: number; + + /** + * Sets the internal size of this Game Object, as used for frame or physics body creation. + * + * This will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or call the + * `setDisplaySize` method, which is the same thing as changing the scale but allows you + * to do so by giving pixel values. + * + * If you have enabled this Game Object for input, changing the size will _not_ change the + * size of the hit area. To do this you should adjust the `input.hitArea` object directly. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setSize(width: number, height: number): this; + + /** + * Sets the display size of this Game Object. + * + * Calling this will adjust the scale. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setDisplaySize(width: number, height: number): this; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + */ + depth: number; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * @param value The depth of this Game Object. + */ + setDepth(value: integer): this; + + /** + * Gets the center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + */ + getCenter(output?: O): O; + + /** + * Gets the top-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the top-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopCenter(output?: O, includeParent?: boolean): O; + + /** + * Gets the top-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the left-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getLeftCenter(output?: O, includeParent?: boolean): O; + + /** + * Gets the right-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getRightCenter(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomCenter(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bounds of this Game Object, regardless of origin. + * The values are stored and returned in a Rectangle, or Rectangle-like, object. + * @param output An object to store the values in. If not provided a new Rectangle will be created. + */ + getBounds(output?: O): O; + + /** + * The Mask this Game Object is using during render. + */ + mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask; + + /** + * Sets the mask that this Game Object will use to render with. + * + * The mask must have been previously created and can be either a GeometryMask or a BitmapMask. + * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. + * + * If a mask is already set on this Game Object it will be immediately replaced. + * + * Masks are positioned in global space and are not relative to the Game Object to which they + * are applied. The reason for this is that multiple Game Objects can all share the same mask. + * + * Masks have no impact on physics or input detection. They are purely a rendering component + * that allows you to limit what is visible during the render pass. + * @param mask The mask this Game Object will use when rendering. + */ + setMask(mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask): this; + + /** + * Clears the mask that this Game Object was using. + * @param destroyMask Destroy the mask before clearing it? Default false. + */ + clearMask(destroyMask?: boolean): this; + + /** + * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a renderable Game Object. + * A renderable Game Object is one that uses a texture to render with, such as an + * Image, Sprite, Render Texture or BitmapText. + * + * If you do not provide a renderable object, and this Game Object has a texture, + * it will use itself as the object. This means you can call this method to create + * a Bitmap Mask from any renderable Game Object. + * @param renderable A renderable Game Object that uses a texture, such as a Sprite. + */ + createBitmapMask(renderable?: Phaser.GameObjects.GameObject): Phaser.Display.Masks.BitmapMask; + + /** + * Creates and returns a Geometry Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a Graphics Game Object. + * + * If you do not provide a graphics object, and this Game Object is an instance + * of a Graphics object, then it will use itself to create the mask. + * + * This means you can call this method to create a Geometry Mask from any Graphics Game Object. + * @param graphics A Graphics Game Object. The geometry within it will be used as the mask. + */ + createGeometryMask(graphics?: Phaser.GameObjects.Graphics): Phaser.Display.Masks.GeometryMask; + + /** + * The horizontal origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the left of the Game Object. + */ + originX: number; + + /** + * The vertical origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the top of the Game Object. + */ + originY: number; + + /** + * The horizontal display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginX: number; + + /** + * The vertical display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginY: number; + + /** + * Sets the origin of this Game Object. + * + * The values are given in the range 0 to 1. + * @param x The horizontal origin value. Default 0.5. + * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x. + */ + setOrigin(x?: number, y?: number): this; + + /** + * Sets the origin of this Game Object based on the Pivot values in its Frame. + */ + setOriginFromFrame(): this; + + /** + * Sets the display origin of this Game Object. + * The difference between this and setting the origin is that you can use pixel values for setting the display origin. + * @param x The horizontal display origin value. Default 0. + * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x. + */ + setDisplayOrigin(x?: number, y?: number): this; + + /** + * Updates the Display Origin cached values internally stored on this Game Object. + * You don't usually call this directly, but it is exposed for edge-cases where you may. + */ + updateDisplayOrigin(): this; + + /** + * The initial WebGL pipeline of this Game Object. + */ + defaultPipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * The current WebGL pipeline of this Game Object. + */ + pipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * This should only be called during the instantiation of the Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. Defaults to the Texture Tint Pipeline. Default TextureTintPipeline. + */ + initPipeline(pipelineName?: string): boolean; + + /** + * Sets the active WebGL Pipeline of this Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + setPipeline(pipelineName: string): this; + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + */ + resetPipeline(): boolean; + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + */ + getPipelineName(): string; + + /** + * The horizontal scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * + * Please be aware that scroll factor values other than 1 are not taken in to consideration when + * calculating physics collisions. Bodies always collide based on their world position, but changing + * the scroll factor is a visual adjustment to where the textures are rendered, which can offset + * them from physics bodies if not accounted for in your code. + */ + scrollFactorX: number; + + /** + * The vertical scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * + * Please be aware that scroll factor values other than 1 are not taken in to consideration when + * calculating physics collisions. Bodies always collide based on their world position, but changing + * the scroll factor is a visual adjustment to where the textures are rendered, which can offset + * them from physics bodies if not accounted for in your code. + */ + scrollFactorY: number; + + /** + * Sets the scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * + * Please be aware that scroll factor values other than 1 are not taken in to consideration when + * calculating physics collisions. Bodies always collide based on their world position, but changing + * the scroll factor is a visual adjustment to where the textures are rendered, which can offset + * them from physics bodies if not accounted for in your code. + * @param x The horizontal scroll factor of this Game Object. + * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. + */ + setScrollFactor(x: number, y?: number): this; + + /** + * The x position of this Game Object. + */ + x: number; + + /** + * The y position of this Game Object. + */ + y: number; + + /** + * The z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. + */ + z: number; + + /** + * The w position of this Game Object. + */ + w: number; + + /** + * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object + * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`. + * + * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this + * isn't the case, use the `scaleX` or `scaleY` properties instead. + */ + scale: number; + + /** + * The horizontal scale of this Game Object. + */ + scaleX: number; + + /** + * The vertical scale of this Game Object. + */ + scaleY: number; + + /** + * The angle of this Game Object as expressed in degrees. + * + * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left + * and -90 is up. + * + * If you prefer to work in radians, see the `rotation` property instead. + */ + angle: integer; + + /** + * The angle of this Game Object in radians. + * + * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left + * and -90 is up. + * + * If you prefer to work in degrees, see the `angle` property instead. + */ + rotation: number; + + /** + * Sets the position of this Game Object. + * @param x The x position of this Game Object. Default 0. + * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. + * @param z The z position of this Game Object. Default 0. + * @param w The w position of this Game Object. Default 0. + */ + setPosition(x?: number, y?: number, z?: number, w?: number): this; + + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * @param x The x position of the top-left of the random area. Default 0. + * @param y The y position of the top-left of the random area. Default 0. + * @param width The width of the random area. + * @param height The height of the random area. + */ + setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; + + /** + * Sets the rotation of this Game Object. + * @param radians The rotation of this Game Object, in radians. Default 0. + */ + setRotation(radians?: number): this; + + /** + * Sets the angle of this Game Object. + * @param degrees The rotation of this Game Object, in degrees. Default 0. + */ + setAngle(degrees?: number): this; + + /** + * Sets the scale of this Game Object. + * @param x The horizontal scale of this Game Object. + * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. + */ + setScale(x: number, y?: number): this; + + /** + * Sets the x position of this Game Object. + * @param value The x position of this Game Object. Default 0. + */ + setX(value?: number): this; + + /** + * Sets the y position of this Game Object. + * @param value The y position of this Game Object. Default 0. + */ + setY(value?: number): this; + + /** + * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. + * @param value The z position of this Game Object. Default 0. + */ + setZ(value?: number): this; + + /** + * Sets the w position of this Game Object. + * @param value The w position of this Game Object. Default 0. + */ + setW(value?: number): this; + + /** + * Gets the local transform matrix for this Game Object. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * @param tempMatrix The matrix to populate with the values from this Game Object. + * @param parentMatrix A temporary matrix to hold parent values during the calculations. + */ + getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Gets the sum total rotation of all of this Game Objects parent Containers. + * + * The returned value is in radians and will be zero if this Game Object has no parent container. + */ + getParentRotation(): number; + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + */ + visible: boolean; + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): this; + + } + + /** + * The Shape Game Object is a base class for the various different shapes, such as the Arc, Star or Polygon. + * You cannot add a Shape directly to your Scene, it is meant as a base for your own custom Shape classes. + */ + class Shape extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.AlphaSingle, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.ComputedSize, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { + /** + * + * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. + * @param type The internal type of the Shape. + * @param data The data of the source shape geometry, if any. + */ + constructor(scene: Phaser.Scene, type?: string, data?: any); + + /** + * The source Shape data. Typically a geometry object. + * You should not manipulate this directly. + */ + readonly data: any; + + /** + * Holds the polygon path data for filled rendering. + */ + readonly pathData: number[]; + + /** + * Holds the earcut polygon path index data for filled rendering. + */ + readonly pathIndexes: integer[]; + + /** + * The fill color used by this Shape. + */ + fillColor: number; + + /** + * The fill alpha value used by this Shape. + */ + fillAlpha: number; + + /** + * The stroke color used by this Shape. + */ + strokeColor: number; + + /** + * The stroke alpha value used by this Shape. + */ + strokeAlpha: number; + + /** + * The stroke line width used by this Shape. + */ + lineWidth: number; + + /** + * Controls if this Shape is filled or not. + * Note that some Shapes do not support being filled (such as Line shapes) + */ + isFilled: boolean; + + /** + * Controls if this Shape is stroked or not. + * Note that some Shapes do not support being stroked (such as Iso Box shapes) + */ + isStroked: boolean; + + /** + * Controls if this Shape path is closed during rendering when stroked. + * Note that some Shapes are always closed when stroked (such as Ellipse shapes) + */ + closePath: boolean; + + /** + * Sets the fill color and alpha for this Shape. + * + * If you wish for the Shape to not be filled then call this method with no arguments, or just set `isFilled` to `false`. + * + * Note that some Shapes do not support fill colors, such as the Line shape. + * + * This call can be chained. + * @param color The color used to fill this shape. If not provided the Shape will not be filled. + * @param alpha The alpha value used when filling this shape, if a fill color is given. Default 1. + */ + setFillStyle(color?: number, alpha?: number): this; + + /** + * Sets the stroke color and alpha for this Shape. + * + * If you wish for the Shape to not be stroked then call this method with no arguments, or just set `isStroked` to `false`. + * + * Note that some Shapes do not support being stroked, such as the Iso Box shape. + * + * This call can be chained. + * @param lineWidth The width of line to stroke with. If not provided or undefined the Shape will not be stroked. + * @param color The color used to stroke this shape. If not provided the Shape will not be stroked. + * @param alpha The alpha value used when stroking this shape, if a stroke color is given. Default 1. + */ + setStrokeStyle(lineWidth?: number, color?: number, alpha?: number): this; + + /** + * Sets if this Shape path is closed during rendering when stroked. + * Note that some Shapes are always closed when stroked (such as Ellipse shapes) + * + * This call can be chained. + * @param value Set to `true` if the Shape should be closed when stroked, otherwise `false`. + */ + setClosePath(value: boolean): this; + + /** + * Internal destroy handler, called as part of the destroy process. + */ + protected preDestroy(): void; + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * @param value The alpha value applied across the whole Game Object. Default 1. + */ + setAlpha(value?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + /** * Sets the Blend Mode being used by this Game Object. * @@ -31300,6 +31584,27 @@ declare namespace Phaser { */ outerRadius: number; + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * @param value The alpha value applied across the whole Game Object. Default 1. + */ + setAlpha(value?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + /** * Sets the Blend Mode being used by this Game Object. * @@ -31928,6 +32233,27 @@ declare namespace Phaser { */ setTo(x1?: number, y1?: number, x2?: number, y2?: number, x3?: number, y3?: number): this; + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * @param value The alpha value applied across the whole Game Object. Default 1. + */ + setAlpha(value?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + /** * Sets the Blend Mode being used by this Game Object. * @@ -33443,359 +33769,6 @@ declare namespace Phaser { } - /** - * A TextStyle class manages all of the style settings for a Text object. - * - * Text Game Objects create a TextStyle instance automatically, which is - * accessed via the `Text.style` property. You do not normally need to - * instantiate one yourself. - */ - class TextStyle { - /** - * - * @param text The Text object that this TextStyle is styling. - * @param style The style settings to set. - */ - constructor(text: Phaser.GameObjects.Text, style: Phaser.Types.GameObjects.Text.TextStyle); - - /** - * The Text object that this TextStyle is styling. - */ - parent: Phaser.GameObjects.Text; - - /** - * The font family. - */ - fontFamily: string; - - /** - * The font size. - */ - fontSize: string; - - /** - * The font style. - */ - fontStyle: string; - - /** - * The background color. - */ - backgroundColor: string; - - /** - * The text fill color. - */ - color: string; - - /** - * The text stroke color. - */ - stroke: string; - - /** - * The text stroke thickness. - */ - strokeThickness: number; - - /** - * The horizontal shadow offset. - */ - shadowOffsetX: number; - - /** - * The vertical shadow offset. - */ - shadowOffsetY: number; - - /** - * The shadow color. - */ - shadowColor: string; - - /** - * The shadow blur radius. - */ - shadowBlur: number; - - /** - * Whether shadow stroke is enabled or not. - */ - shadowStroke: boolean; - - /** - * Whether shadow fill is enabled or not. - */ - shadowFill: boolean; - - /** - * The text alignment. - */ - align: string; - - /** - * The maximum number of lines to draw. - */ - maxLines: integer; - - /** - * The fixed width of the text. - * - * `0` means no fixed with. - */ - fixedWidth: number; - - /** - * The fixed height of the text. - * - * `0` means no fixed height. - */ - fixedHeight: number; - - /** - * The resolution the text is rendered to its internal canvas at. - * The default is 0, which means it will use the resolution set in the Game Config. - */ - resolution: number; - - /** - * Whether the text should render right to left. - */ - rtl: boolean; - - /** - * The test string to use when measuring the font. - */ - testString: string; - - /** - * The amount of horizontal padding added to the width of the text when calculating the font metrics. - */ - baselineX: number; - - /** - * The amount of vertical padding added to the height of the text when calculating the font metrics. - */ - baselineY: number; - - /** - * Set the text style. - * @param style The style settings to set. - * @param updateText Whether to update the text immediately. Default true. - * @param setDefaults Use the default values is not set, or the local values. Default false. - */ - setStyle(style: Phaser.Types.GameObjects.Text.TextStyle, updateText?: boolean, setDefaults?: boolean): Phaser.GameObjects.Text; - - /** - * Synchronize the font settings to the given Canvas Rendering Context. - * @param canvas The Canvas Element. - * @param context The Canvas Rendering Context. - */ - syncFont(canvas: HTMLCanvasElement, context: CanvasRenderingContext2D): void; - - /** - * Synchronize the text style settings to the given Canvas Rendering Context. - * @param canvas The Canvas Element. - * @param context The Canvas Rendering Context. - */ - syncStyle(canvas: HTMLCanvasElement, context: CanvasRenderingContext2D): void; - - /** - * Synchronize the shadow settings to the given Canvas Rendering Context. - * @param context The Canvas Rendering Context. - * @param enabled Whether shadows are enabled or not. - */ - syncShadow(context: CanvasRenderingContext2D, enabled: boolean): void; - - /** - * Update the style settings for the parent Text object. - * @param recalculateMetrics Whether to recalculate font and text metrics. - */ - update(recalculateMetrics: boolean): Phaser.GameObjects.Text; - - /** - * Set the font. - * - * If a string is given, the font family is set. - * - * If an object is given, the `fontFamily`, `fontSize` and `fontStyle` - * properties of that object are set. - * @param font The font family or font settings to set. - * @param updateText Whether to update the text immediately. Default true. - */ - setFont(font: string | object, updateText?: boolean): Phaser.GameObjects.Text; - - /** - * Set the font family. - * @param family The font family. - */ - setFontFamily(family: string): Phaser.GameObjects.Text; - - /** - * Set the font style. - * @param style The font style. - */ - setFontStyle(style: string): Phaser.GameObjects.Text; - - /** - * Set the font size. - * @param size The font size. - */ - setFontSize(size: number | string): Phaser.GameObjects.Text; - - /** - * Set the test string to use when measuring the font. - * @param string The test string to use when measuring the font. - */ - setTestString(string: string): Phaser.GameObjects.Text; - - /** - * Set a fixed width and height for the text. - * - * Pass in `0` for either of these parameters to disable fixed width or height respectively. - * @param width The fixed width to set. - * @param height The fixed height to set. - */ - setFixedSize(width: number, height: number): Phaser.GameObjects.Text; - - /** - * Set the background color. - * @param color The background color. - */ - setBackgroundColor(color: string): Phaser.GameObjects.Text; - - /** - * Set the text fill color. - * @param color The text fill color. - */ - setFill(color: string): Phaser.GameObjects.Text; - - /** - * Set the text fill color. - * @param color The text fill color. - */ - setColor(color: string): Phaser.GameObjects.Text; - - /** - * Set the resolution used by the Text object. - * - * By default it will be set to match the resolution set in the Game Config, - * but you can override it via this method. It allows for much clearer text on High DPI devices, - * at the cost of memory because it uses larger internal Canvas textures for the Text. - * - * Please use with caution, as the more high res Text you have, the more memory it uses up. - * @param value The resolution for this Text object to use. - */ - setResolution(value: number): Phaser.GameObjects.Text; - - /** - * Set the stroke settings. - * @param color The stroke color. - * @param thickness The stroke thickness. - */ - setStroke(color: string, thickness: number): Phaser.GameObjects.Text; - - /** - * Set the shadow settings. - * - * Calling this method always re-measures the parent Text object, - * so only call it when you actually change the shadow settings. - * @param x The horizontal shadow offset. Default 0. - * @param y The vertical shadow offset. Default 0. - * @param color The shadow color. Default '#000'. - * @param blur The shadow blur radius. Default 0. - * @param shadowStroke Whether to stroke the shadow. Default false. - * @param shadowFill Whether to fill the shadow. Default true. - */ - setShadow(x?: number, y?: number, color?: string, blur?: number, shadowStroke?: boolean, shadowFill?: boolean): Phaser.GameObjects.Text; - - /** - * Set the shadow offset. - * @param x The horizontal shadow offset. Default 0. - * @param y The vertical shadow offset. Default 0. - */ - setShadowOffset(x?: number, y?: number): Phaser.GameObjects.Text; - - /** - * Set the shadow color. - * @param color The shadow color. Default '#000'. - */ - setShadowColor(color?: string): Phaser.GameObjects.Text; - - /** - * Set the shadow blur radius. - * @param blur The shadow blur radius. Default 0. - */ - setShadowBlur(blur?: number): Phaser.GameObjects.Text; - - /** - * Enable or disable shadow stroke. - * @param enabled Whether shadow stroke is enabled or not. - */ - setShadowStroke(enabled: boolean): Phaser.GameObjects.Text; - - /** - * Enable or disable shadow fill. - * @param enabled Whether shadow fill is enabled or not. - */ - setShadowFill(enabled: boolean): Phaser.GameObjects.Text; - - /** - * Set the width (in pixels) to use for wrapping lines. - * - * Pass in null to remove wrapping by width. - * @param width The maximum width of a line in pixels. Set to null to remove wrapping. - * @param useAdvancedWrap Whether or not to use the advanced wrapping - * algorithm. If true, spaces are collapsed and whitespace is trimmed from lines. If false, - * spaces and whitespace are left as is. Default false. - */ - setWordWrapWidth(width: number, useAdvancedWrap?: boolean): Phaser.GameObjects.Text; - - /** - * Set a custom callback for wrapping lines. - * - * Pass in null to remove wrapping by callback. - * @param callback A custom function that will be responsible for wrapping the - * text. It will receive two arguments: text (the string to wrap), textObject (this Text - * instance). It should return the wrapped lines either as an array of lines or as a string with - * newline characters in place to indicate where breaks should happen. - * @param scope The scope that will be applied when the callback is invoked. Default null. - */ - setWordWrapCallback(callback: TextStyleWordWrapCallback, scope?: object): Phaser.GameObjects.Text; - - /** - * Set the alignment of the text in this Text object. - * - * The argument can be one of: `left`, `right`, `center` or `justify`. - * - * Alignment only works if the Text object has more than one line of text. - * @param align The text alignment for multi-line text. Default 'left'. - */ - setAlign(align?: string): Phaser.GameObjects.Text; - - /** - * Set the maximum number of lines to draw. - * @param max The maximum number of lines to draw. Default 0. - */ - setMaxLines(max?: integer): Phaser.GameObjects.Text; - - /** - * Get the current text metrics. - */ - getTextMetrics(): Phaser.Types.GameObjects.Text.TextMetrics; - - /** - * Build a JSON representation of this Text Style. - */ - toJSON(): object; - - /** - * Destroy this Text Style. - */ - destroy(): void; - - } - /** * A Text Game Object. * @@ -35036,6 +35009,359 @@ declare namespace Phaser { } + /** + * A TextStyle class manages all of the style settings for a Text object. + * + * Text Game Objects create a TextStyle instance automatically, which is + * accessed via the `Text.style` property. You do not normally need to + * instantiate one yourself. + */ + class TextStyle { + /** + * + * @param text The Text object that this TextStyle is styling. + * @param style The style settings to set. + */ + constructor(text: Phaser.GameObjects.Text, style: Phaser.Types.GameObjects.Text.TextStyle); + + /** + * The Text object that this TextStyle is styling. + */ + parent: Phaser.GameObjects.Text; + + /** + * The font family. + */ + fontFamily: string; + + /** + * The font size. + */ + fontSize: string; + + /** + * The font style. + */ + fontStyle: string; + + /** + * The background color. + */ + backgroundColor: string; + + /** + * The text fill color. + */ + color: string; + + /** + * The text stroke color. + */ + stroke: string; + + /** + * The text stroke thickness. + */ + strokeThickness: number; + + /** + * The horizontal shadow offset. + */ + shadowOffsetX: number; + + /** + * The vertical shadow offset. + */ + shadowOffsetY: number; + + /** + * The shadow color. + */ + shadowColor: string; + + /** + * The shadow blur radius. + */ + shadowBlur: number; + + /** + * Whether shadow stroke is enabled or not. + */ + shadowStroke: boolean; + + /** + * Whether shadow fill is enabled or not. + */ + shadowFill: boolean; + + /** + * The text alignment. + */ + align: string; + + /** + * The maximum number of lines to draw. + */ + maxLines: integer; + + /** + * The fixed width of the text. + * + * `0` means no fixed with. + */ + fixedWidth: number; + + /** + * The fixed height of the text. + * + * `0` means no fixed height. + */ + fixedHeight: number; + + /** + * The resolution the text is rendered to its internal canvas at. + * The default is 0, which means it will use the resolution set in the Game Config. + */ + resolution: number; + + /** + * Whether the text should render right to left. + */ + rtl: boolean; + + /** + * The test string to use when measuring the font. + */ + testString: string; + + /** + * The amount of horizontal padding added to the width of the text when calculating the font metrics. + */ + baselineX: number; + + /** + * The amount of vertical padding added to the height of the text when calculating the font metrics. + */ + baselineY: number; + + /** + * Set the text style. + * @param style The style settings to set. + * @param updateText Whether to update the text immediately. Default true. + * @param setDefaults Use the default values is not set, or the local values. Default false. + */ + setStyle(style: Phaser.Types.GameObjects.Text.TextStyle, updateText?: boolean, setDefaults?: boolean): Phaser.GameObjects.Text; + + /** + * Synchronize the font settings to the given Canvas Rendering Context. + * @param canvas The Canvas Element. + * @param context The Canvas Rendering Context. + */ + syncFont(canvas: HTMLCanvasElement, context: CanvasRenderingContext2D): void; + + /** + * Synchronize the text style settings to the given Canvas Rendering Context. + * @param canvas The Canvas Element. + * @param context The Canvas Rendering Context. + */ + syncStyle(canvas: HTMLCanvasElement, context: CanvasRenderingContext2D): void; + + /** + * Synchronize the shadow settings to the given Canvas Rendering Context. + * @param context The Canvas Rendering Context. + * @param enabled Whether shadows are enabled or not. + */ + syncShadow(context: CanvasRenderingContext2D, enabled: boolean): void; + + /** + * Update the style settings for the parent Text object. + * @param recalculateMetrics Whether to recalculate font and text metrics. + */ + update(recalculateMetrics: boolean): Phaser.GameObjects.Text; + + /** + * Set the font. + * + * If a string is given, the font family is set. + * + * If an object is given, the `fontFamily`, `fontSize` and `fontStyle` + * properties of that object are set. + * @param font The font family or font settings to set. + * @param updateText Whether to update the text immediately. Default true. + */ + setFont(font: string | object, updateText?: boolean): Phaser.GameObjects.Text; + + /** + * Set the font family. + * @param family The font family. + */ + setFontFamily(family: string): Phaser.GameObjects.Text; + + /** + * Set the font style. + * @param style The font style. + */ + setFontStyle(style: string): Phaser.GameObjects.Text; + + /** + * Set the font size. + * @param size The font size. + */ + setFontSize(size: number | string): Phaser.GameObjects.Text; + + /** + * Set the test string to use when measuring the font. + * @param string The test string to use when measuring the font. + */ + setTestString(string: string): Phaser.GameObjects.Text; + + /** + * Set a fixed width and height for the text. + * + * Pass in `0` for either of these parameters to disable fixed width or height respectively. + * @param width The fixed width to set. + * @param height The fixed height to set. + */ + setFixedSize(width: number, height: number): Phaser.GameObjects.Text; + + /** + * Set the background color. + * @param color The background color. + */ + setBackgroundColor(color: string): Phaser.GameObjects.Text; + + /** + * Set the text fill color. + * @param color The text fill color. + */ + setFill(color: string): Phaser.GameObjects.Text; + + /** + * Set the text fill color. + * @param color The text fill color. + */ + setColor(color: string): Phaser.GameObjects.Text; + + /** + * Set the resolution used by the Text object. + * + * By default it will be set to match the resolution set in the Game Config, + * but you can override it via this method. It allows for much clearer text on High DPI devices, + * at the cost of memory because it uses larger internal Canvas textures for the Text. + * + * Please use with caution, as the more high res Text you have, the more memory it uses up. + * @param value The resolution for this Text object to use. + */ + setResolution(value: number): Phaser.GameObjects.Text; + + /** + * Set the stroke settings. + * @param color The stroke color. + * @param thickness The stroke thickness. + */ + setStroke(color: string, thickness: number): Phaser.GameObjects.Text; + + /** + * Set the shadow settings. + * + * Calling this method always re-measures the parent Text object, + * so only call it when you actually change the shadow settings. + * @param x The horizontal shadow offset. Default 0. + * @param y The vertical shadow offset. Default 0. + * @param color The shadow color. Default '#000'. + * @param blur The shadow blur radius. Default 0. + * @param shadowStroke Whether to stroke the shadow. Default false. + * @param shadowFill Whether to fill the shadow. Default true. + */ + setShadow(x?: number, y?: number, color?: string, blur?: number, shadowStroke?: boolean, shadowFill?: boolean): Phaser.GameObjects.Text; + + /** + * Set the shadow offset. + * @param x The horizontal shadow offset. Default 0. + * @param y The vertical shadow offset. Default 0. + */ + setShadowOffset(x?: number, y?: number): Phaser.GameObjects.Text; + + /** + * Set the shadow color. + * @param color The shadow color. Default '#000'. + */ + setShadowColor(color?: string): Phaser.GameObjects.Text; + + /** + * Set the shadow blur radius. + * @param blur The shadow blur radius. Default 0. + */ + setShadowBlur(blur?: number): Phaser.GameObjects.Text; + + /** + * Enable or disable shadow stroke. + * @param enabled Whether shadow stroke is enabled or not. + */ + setShadowStroke(enabled: boolean): Phaser.GameObjects.Text; + + /** + * Enable or disable shadow fill. + * @param enabled Whether shadow fill is enabled or not. + */ + setShadowFill(enabled: boolean): Phaser.GameObjects.Text; + + /** + * Set the width (in pixels) to use for wrapping lines. + * + * Pass in null to remove wrapping by width. + * @param width The maximum width of a line in pixels. Set to null to remove wrapping. + * @param useAdvancedWrap Whether or not to use the advanced wrapping + * algorithm. If true, spaces are collapsed and whitespace is trimmed from lines. If false, + * spaces and whitespace are left as is. Default false. + */ + setWordWrapWidth(width: number, useAdvancedWrap?: boolean): Phaser.GameObjects.Text; + + /** + * Set a custom callback for wrapping lines. + * + * Pass in null to remove wrapping by callback. + * @param callback A custom function that will be responsible for wrapping the + * text. It will receive two arguments: text (the string to wrap), textObject (this Text + * instance). It should return the wrapped lines either as an array of lines or as a string with + * newline characters in place to indicate where breaks should happen. + * @param scope The scope that will be applied when the callback is invoked. Default null. + */ + setWordWrapCallback(callback: TextStyleWordWrapCallback, scope?: object): Phaser.GameObjects.Text; + + /** + * Set the alignment of the text in this Text object. + * + * The argument can be one of: `left`, `right`, `center` or `justify`. + * + * Alignment only works if the Text object has more than one line of text. + * @param align The text alignment for multi-line text. Default 'left'. + */ + setAlign(align?: string): Phaser.GameObjects.Text; + + /** + * Set the maximum number of lines to draw. + * @param max The maximum number of lines to draw. Default 0. + */ + setMaxLines(max?: integer): Phaser.GameObjects.Text; + + /** + * Get the current text metrics. + */ + getTextMetrics(): Phaser.Types.GameObjects.Text.TextMetrics; + + /** + * Build a JSON representation of this Text Style. + */ + toJSON(): object; + + /** + * Destroy this Text Style. + */ + destroy(): void; + + } + /** * A TileSprite is a Sprite that has a repeating texture. * @@ -36022,6 +36348,55 @@ declare namespace Phaser { } + /** + * The Update List plugin. + * + * Update Lists belong to a Scene and maintain the list Game Objects to be updated every frame. + * + * Some or all of these Game Objects may also be part of the Scene's [Display List]{@link Phaser.GameObjects.DisplayList}, for Rendering. + */ + class UpdateList extends Phaser.Structs.ProcessQueue { + /** + * + * @param scene The Scene that the Update List belongs to. + */ + constructor(scene: Phaser.Scene); + + /** + * The Scene that the Update List belongs to. + */ + scene: Phaser.Scene; + + /** + * The Scene's Systems. + */ + systems: Phaser.Scenes.Systems; + + /** + * The update step. + * + * Pre-updates every active Game Object in the list. + * @param time The current timestamp. + * @param delta The delta time elapsed since the last frame. + */ + sceneUpdate(time: number, delta: number): void; + + /** + * The Scene that owns this plugin is shutting down. + * + * We need to kill and reset all internal properties as well as stop listening to Scene events. + */ + shutdown(): void; + + /** + * The Scene that owns this plugin is being destroyed. + * + * We need to shutdown and then kill off all external references. + */ + destroy(): void; + + } + /** * A Video Game Object. * @@ -40007,1328 +40382,6 @@ declare namespace Phaser { } namespace Input { - /** - * Creates a new Interactive Object. - * - * This is called automatically by the Input Manager when you enable a Game Object for input. - * - * The resulting Interactive Object is mapped to the Game Object's `input` property. - * @param gameObject The Game Object to which this Interactive Object is bound. - * @param hitArea The hit area for this Interactive Object. Typically a geometry shape, like a Rectangle or Circle. - * @param hitAreaCallback The 'contains' check callback that the hit area shape will use for all hit tests. - */ - function CreateInteractiveObject(gameObject: Phaser.GameObjects.GameObject, hitArea: any, hitAreaCallback: Phaser.Types.Input.HitAreaCallback): Phaser.Types.Input.InteractiveObject; - - /** - * Creates a new Pixel Perfect Handler function. - * - * Access via `InputPlugin.makePixelPerfect` rather than calling it directly. - * @param textureManager A reference to the Texture Manager. - * @param alphaTolerance The alpha level that the pixel should be above to be included as a successful interaction. - */ - function CreatePixelPerfectHandler(textureManager: Phaser.Textures.TextureManager, alphaTolerance: integer): Function; - - /** - * The Input Manager is responsible for handling the pointer related systems in a single Phaser Game instance. - * - * Based on the Game Config it will create handlers for mouse and touch support. - * - * Keyboard and Gamepad are plugins, handled directly by the InputPlugin class. - * - * It then manages the events, pointer creation and general hit test related operations. - * - * You rarely need to interact with the Input Manager directly, and as such, all of its properties and methods - * should be considered private. Instead, you should use the Input Plugin, which is a Scene level system, responsible - * for dealing with all input events for a Scene. - */ - class InputManager { - /** - * - * @param game The Game instance that owns the Input Manager. - * @param config The Input Configuration object, as set in the Game Config. - */ - constructor(game: Phaser.Game, config: object); - - /** - * The Game instance that owns the Input Manager. - * A Game only maintains on instance of the Input Manager at any time. - */ - readonly game: Phaser.Game; - - /** - * A reference to the global Game Scale Manager. - * Used for all bounds checks and pointer scaling. - */ - scaleManager: Phaser.Scale.ScaleManager; - - /** - * The Canvas that is used for all DOM event input listeners. - */ - canvas: HTMLCanvasElement; - - /** - * The Game Configuration object, as set during the game boot. - */ - config: Phaser.Core.Config; - - /** - * If set, the Input Manager will run its update loop every frame. - */ - enabled: boolean; - - /** - * The Event Emitter instance that the Input Manager uses to emit events from. - */ - events: Phaser.Events.EventEmitter; - - /** - * Are any mouse or touch pointers currently over the game canvas? - * This is updated automatically by the canvas over and out handlers. - */ - readonly isOver: boolean; - - /** - * The default CSS cursor to be used when interacting with your game. - * - * See the `setDefaultCursor` method for more details. - */ - defaultCursor: string; - - /** - * A reference to the Keyboard Manager class, if enabled via the `input.keyboard` Game Config property. - */ - keyboard: Phaser.Input.Keyboard.KeyboardManager; - - /** - * A reference to the Mouse Manager class, if enabled via the `input.mouse` Game Config property. - */ - mouse: Phaser.Input.Mouse.MouseManager; - - /** - * A reference to the Touch Manager class, if enabled via the `input.touch` Game Config property. - */ - touch: Phaser.Input.Touch.TouchManager; - - /** - * An array of Pointers that have been added to the game. - * The first entry is reserved for the Mouse Pointer, the rest are Touch Pointers. - * - * By default there is 1 touch pointer enabled. If you need more use the `addPointer` method to start them, - * or set the `input.activePointers` property in the Game Config. - */ - pointers: Phaser.Input.Pointer[]; - - /** - * The number of touch objects activated and being processed each update. - * - * You can change this by either calling `addPointer` at run-time, or by - * setting the `input.activePointers` property in the Game Config. - */ - readonly pointersTotal: integer; - - /** - * The mouse has its own unique Pointer object, which you can reference directly if making a _desktop specific game_. - * If you are supporting both desktop and touch devices then do not use this property, instead use `activePointer` - * which will always map to the most recently interacted pointer. - */ - mousePointer: Phaser.Input.Pointer; - - /** - * The most recently active Pointer object. - * - * If you've only 1 Pointer in your game then this will accurately be either the first finger touched, or the mouse. - * - * If your game doesn't need to support multi-touch then you can safely use this property in all of your game - * code and it will adapt to be either the mouse or the touch, based on device. - */ - activePointer: Phaser.Input.Pointer; - - /** - * If the top-most Scene in the Scene List receives an input it will stop input from - * propagating any lower down the scene list, i.e. if you have a UI Scene at the top - * and click something on it, that click will not then be passed down to any other - * Scene below. Disable this to have input events passed through all Scenes, all the time. - */ - globalTopOnly: boolean; - - /** - * The time this Input Manager was last updated. - * This value is populated by the Game Step each frame. - */ - readonly time: number; - - /** - * The Boot handler is called by Phaser.Game when it first starts up. - * The renderer is available by now. - */ - protected boot(): void; - - /** - * Tells the Input system to set a custom cursor. - * - * This cursor will be the default cursor used when interacting with the game canvas. - * - * If an Interactive Object also sets a custom cursor, this is the cursor that is reset after its use. - * - * Any valid CSS cursor value is allowed, including paths to image files, i.e.: - * - * ```javascript - * this.input.setDefaultCursor('url(assets/cursors/sword.cur), pointer'); - * ``` - * - * Please read about the differences between browsers when it comes to the file formats and sizes they support: - * - * https://developer.mozilla.org/en-US/docs/Web/CSS/cursor - * https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_User_Interface/Using_URL_values_for_the_cursor_property - * - * It's up to you to pick a suitable cursor format that works across the range of browsers you need to support. - * @param cursor The CSS to be used when setting the default cursor. - */ - setDefaultCursor(cursor: string): void; - - /** - * Adds new Pointer objects to the Input Manager. - * - * By default Phaser creates 2 pointer objects: `mousePointer` and `pointer1`. - * - * You can create more either by calling this method, or by setting the `input.activePointers` property - * in the Game Config, up to a maximum of 10 pointers. - * - * The first 10 pointers are available via the `InputPlugin.pointerX` properties, once they have been added - * via this method. - * @param quantity The number of new Pointers to create. A maximum of 10 is allowed in total. Default 1. - */ - addPointer(quantity?: integer): Phaser.Input.Pointer[]; - - /** - * Internal method that gets a list of all the active Input Plugins in the game - * and updates each of them in turn, in reverse order (top to bottom), to allow - * for DOM top-level event handling simulation. - * @param type The type of event to process. - * @param pointers An array of Pointers on which the event occurred. - */ - updateInputPlugins(type: integer, pointers: Phaser.Input.Pointer[]): void; - - /** - * Performs a hit test using the given Pointer and camera, against an array of interactive Game Objects. - * - * The Game Objects are culled against the camera, and then the coordinates are translated into the local camera space - * and used to determine if they fall within the remaining Game Objects hit areas or not. - * - * If nothing is matched an empty array is returned. - * - * This method is called automatically by InputPlugin.hitTestPointer and doesn't usually need to be invoked directly. - * @param pointer The Pointer to test against. - * @param gameObjects An array of interactive Game Objects to check. - * @param camera The Camera which is being tested against. - * @param output An array to store the results in. If not given, a new empty array is created. - */ - hitTest(pointer: Phaser.Input.Pointer, gameObjects: any[], camera: Phaser.Cameras.Scene2D.Camera, output?: any[]): any[]; - - /** - * Checks if the given x and y coordinate are within the hit area of the Game Object. - * - * This method assumes that the coordinate values have already been translated into the space of the Game Object. - * - * If the coordinates are within the hit area they are set into the Game Objects Input `localX` and `localY` properties. - * @param gameObject The interactive Game Object to check against. - * @param x The translated x coordinate for the hit test. - * @param y The translated y coordinate for the hit test. - */ - pointWithinHitArea(gameObject: Phaser.GameObjects.GameObject, x: number, y: number): boolean; - - /** - * Checks if the given x and y coordinate are within the hit area of the Interactive Object. - * - * This method assumes that the coordinate values have already been translated into the space of the Interactive Object. - * - * If the coordinates are within the hit area they are set into the Interactive Objects Input `localX` and `localY` properties. - * @param object The Interactive Object to check against. - * @param x The translated x coordinate for the hit test. - * @param y The translated y coordinate for the hit test. - */ - pointWithinInteractiveObject(object: Phaser.Types.Input.InteractiveObject, x: number, y: number): boolean; - - /** - * Transforms the pageX and pageY values of a Pointer into the scaled coordinate space of the Input Manager. - * @param pointer The Pointer to transform the values for. - * @param pageX The Page X value. - * @param pageY The Page Y value. - * @param wasMove Are we transforming the Pointer from a move event, or an up / down event? - */ - transformPointer(pointer: Phaser.Input.Pointer, pageX: number, pageY: number, wasMove: boolean): void; - - /** - * Destroys the Input Manager and all of its systems. - * - * There is no way to recover from doing this. - */ - destroy(): void; - - } - - /** - * The Input Plugin belongs to a Scene and handles all input related events and operations for it. - * - * You can access it from within a Scene using `this.input`. - * - * It emits events directly. For example, you can do: - * - * ```javascript - * this.input.on('pointerdown', callback, context); - * ``` - * - * To listen for a pointer down event anywhere on the game canvas. - * - * Game Objects can be enabled for input by calling their `setInteractive` method. After which they - * will directly emit input events: - * - * ```javascript - * var sprite = this.add.sprite(x, y, texture); - * sprite.setInteractive(); - * sprite.on('pointerdown', callback, context); - * ``` - * - * There are lots of game configuration options available relating to input. - * See the [Input Config object]{@linkcode Phaser.Types.Core.InputConfig} for more details, including how to deal with Phaser - * listening for input events outside of the canvas, how to set a default number of pointers, input - * capture settings and more. - * - * Please also see the Input examples and tutorials for further information. - */ - class InputPlugin extends Phaser.Events.EventEmitter { - /** - * - * @param scene A reference to the Scene that this Input Plugin is responsible for. - */ - constructor(scene: Phaser.Scene); - - /** - * A reference to the Scene that this Input Plugin is responsible for. - */ - scene: Phaser.Scene; - - /** - * A reference to the Scene Systems class. - */ - systems: Phaser.Scenes.Systems; - - /** - * A reference to the Scene Systems Settings. - */ - settings: Phaser.Types.Scenes.SettingsObject; - - /** - * A reference to the Game Input Manager. - */ - manager: Phaser.Input.InputManager; - - /** - * If `true` this Input Plugin will process DOM input events. - */ - enabled: boolean; - - /** - * A reference to the Scene Display List. This property is set during the `boot` method. - */ - displayList: Phaser.GameObjects.DisplayList; - - /** - * A reference to the Scene Cameras Manager. This property is set during the `boot` method. - */ - cameras: Phaser.Cameras.Scene2D.CameraManager; - - /** - * A reference to the Mouse Manager. - * - * This property is only set if Mouse support has been enabled in your Game Configuration file. - * - * If you just wish to get access to the mouse pointer, use the `mousePointer` property instead. - */ - mouse: Phaser.Input.Mouse.MouseManager; - - /** - * When set to `true` (the default) the Input Plugin will emulate DOM behavior by only emitting events from - * the top-most Game Objects in the Display List. - * - * If set to `false` it will emit events from all Game Objects below a Pointer, not just the top one. - */ - topOnly: boolean; - - /** - * How often should the Pointers be checked? - * - * The value is a time, given in ms, and is the time that must have elapsed between game steps before - * the Pointers will be polled again. When a pointer is polled it runs a hit test to see which Game - * Objects are currently below it, or being interacted with it. - * - * Pointers will *always* be checked if they have been moved by the user, or press or released. - * - * This property only controls how often they will be polled if they have not been updated. - * You should set this if you want to have Game Objects constantly check against the pointers, even - * if the pointer didn't itself move. - * - * Set to 0 to poll constantly. Set to -1 to only poll on user movement. - */ - pollRate: integer; - - /** - * The distance, in pixels, a pointer has to move while being held down, before it thinks it is being dragged. - */ - dragDistanceThreshold: number; - - /** - * The amount of time, in ms, a pointer has to be held down before it thinks it is dragging. - * - * The default polling rate is to poll only on move so once the time threshold is reached the - * drag event will not start until you move the mouse. If you want it to start immediately - * when the time threshold is reached, you must increase the polling rate by calling - * [setPollAlways]{@linkcode Phaser.Input.InputPlugin#setPollAlways} or - * [setPollRate]{@linkcode Phaser.Input.InputPlugin#setPollRate}. - */ - dragTimeThreshold: number; - - /** - * Checks to see if both this plugin and the Scene to which it belongs is active. - */ - isActive(): boolean; - - /** - * This is called automatically by the Input Manager. - * It emits events for plugins to listen to and also handles polling updates, if enabled. - * @param time The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. - * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. - */ - updatePoll(time: number, delta: number): boolean; - - /** - * Clears a Game Object so it no longer has an Interactive Object associated with it. - * The Game Object is then queued for removal from the Input Plugin on the next update. - * @param gameObject The Game Object that will have its Interactive Object removed. - * @param skipQueue Skip adding this Game Object into the removal queue? Default false. - */ - clear(gameObject: Phaser.GameObjects.GameObject, skipQueue?: boolean): Phaser.GameObjects.GameObject; - - /** - * Disables Input on a single Game Object. - * - * An input disabled Game Object still retains its Interactive Object component and can be re-enabled - * at any time, by passing it to `InputPlugin.enable`. - * @param gameObject The Game Object to have its input system disabled. - */ - disable(gameObject: Phaser.GameObjects.GameObject): void; - - /** - * Enable a Game Object for interaction. - * - * If the Game Object already has an Interactive Object component, it is enabled and returned. - * - * Otherwise, a new Interactive Object component is created and assigned to the Game Object's `input` property. - * - * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area - * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced - * input detection. - * - * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If - * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific - * shape for it to use. - * - * You can also provide an Input Configuration Object as the only argument to this method. - * @param gameObject The Game Object to be enabled for input. - * @param shape Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used. - * @param callback The 'contains' function to invoke to check if the pointer is within the hit area. - * @param dropZone Is this Game Object a drop zone or not? Default false. - */ - enable(gameObject: Phaser.GameObjects.GameObject, shape?: Phaser.Types.Input.InputConfiguration | any, callback?: Phaser.Types.Input.HitAreaCallback, dropZone?: boolean): Phaser.Input.InputPlugin; - - /** - * Takes the given Pointer and performs a hit test against it, to see which interactive Game Objects - * it is currently above. - * - * The hit test is performed against which-ever Camera the Pointer is over. If it is over multiple - * cameras, it starts checking the camera at the top of the camera list, and if nothing is found, iterates down the list. - * @param pointer The Pointer to check against the Game Objects. - */ - hitTestPointer(pointer: Phaser.Input.Pointer): Phaser.GameObjects.GameObject[]; - - /** - * Returns the drag state of the given Pointer for this Input Plugin. - * - * The state will be one of the following: - * - * 0 = Not dragging anything - * 1 = Primary button down and objects below, so collect a draglist - * 2 = Pointer being checked if meets drag criteria - * 3 = Pointer meets criteria, notify the draglist - * 4 = Pointer actively dragging the draglist and has moved - * 5 = Pointer actively dragging but has been released, notify draglist - * @param pointer The Pointer to get the drag state for. - */ - getDragState(pointer: Phaser.Input.Pointer): integer; - - /** - * Sets the drag state of the given Pointer for this Input Plugin. - * - * The state must be one of the following values: - * - * 0 = Not dragging anything - * 1 = Primary button down and objects below, so collect a draglist - * 2 = Pointer being checked if meets drag criteria - * 3 = Pointer meets criteria, notify the draglist - * 4 = Pointer actively dragging the draglist and has moved - * 5 = Pointer actively dragging but has been released, notify draglist - * @param pointer The Pointer to set the drag state for. - * @param state The drag state value. An integer between 0 and 5. - */ - setDragState(pointer: Phaser.Input.Pointer, state: integer): void; - - /** - * Sets the draggable state of the given array of Game Objects. - * - * They can either be set to be draggable, or can have their draggable state removed by passing `false`. - * - * A Game Object will not fire drag events unless it has been specifically enabled for drag. - * @param gameObjects An array of Game Objects to change the draggable state on. - * @param value Set to `true` if the Game Objects should be made draggable, `false` if they should be unset. Default true. - */ - setDraggable(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], value?: boolean): Phaser.Input.InputPlugin; - - /** - * Creates a function that can be passed to `setInteractive`, `enable` or `setHitArea` that will handle - * pixel-perfect input detection on an Image or Sprite based Game Object, or any custom class that extends them. - * - * The following will create a sprite that is clickable on any pixel that has an alpha value >= 1. - * - * ```javascript - * this.add.sprite(x, y, key).setInteractive(this.input.makePixelPerfect()); - * ``` - * - * The following will create a sprite that is clickable on any pixel that has an alpha value >= 150. - * - * ```javascript - * this.add.sprite(x, y, key).setInteractive(this.input.makePixelPerfect(150)); - * ``` - * - * Once you have made an Interactive Object pixel perfect it impacts all input related events for it: down, up, - * dragstart, drag, etc. - * - * As a pointer interacts with the Game Object it will constantly poll the texture, extracting a single pixel from - * the given coordinates and checking its color values. This is an expensive process, so should only be enabled on - * Game Objects that really need it. - * - * You cannot make non-texture based Game Objects pixel perfect. So this will not work on Graphics, BitmapText, - * Render Textures, Text, Tilemaps, Containers or Particles. - * @param alphaTolerance The alpha level that the pixel should be above to be included as a successful interaction. Default 1. - */ - makePixelPerfect(alphaTolerance?: integer): Function; - - /** - * Sets the hit area for the given array of Game Objects. - * - * A hit area is typically one of the geometric shapes Phaser provides, such as a `Phaser.Geom.Rectangle` - * or `Phaser.Geom.Circle`. However, it can be any object as long as it works with the provided callback. - * - * If no hit area is provided a Rectangle is created based on the size of the Game Object, if possible - * to calculate. - * - * The hit area callback is the function that takes an `x` and `y` coordinate and returns a boolean if - * those values fall within the area of the shape or not. All of the Phaser geometry objects provide this, - * such as `Phaser.Geom.Rectangle.Contains`. - * @param gameObjects An array of Game Objects to set the hit area on. - * @param shape Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used. - * @param callback The 'contains' function to invoke to check if the pointer is within the hit area. - */ - setHitArea(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], shape?: Phaser.Types.Input.InputConfiguration | any, callback?: Phaser.Types.Input.HitAreaCallback): Phaser.Input.InputPlugin; - - /** - * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Circle` shape, using - * the given coordinates and radius to control its position and size. - * @param gameObjects An array of Game Objects to set as having a circle hit area. - * @param x The center of the circle. - * @param y The center of the circle. - * @param radius The radius of the circle. - * @param callback The hit area callback. If undefined it uses Circle.Contains. - */ - setHitAreaCircle(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], x: number, y: number, radius: number, callback?: Phaser.Types.Input.HitAreaCallback): Phaser.Input.InputPlugin; - - /** - * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Ellipse` shape, using - * the given coordinates and dimensions to control its position and size. - * @param gameObjects An array of Game Objects to set as having an ellipse hit area. - * @param x The center of the ellipse. - * @param y The center of the ellipse. - * @param width The width of the ellipse. - * @param height The height of the ellipse. - * @param callback The hit area callback. If undefined it uses Ellipse.Contains. - */ - setHitAreaEllipse(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], x: number, y: number, width: number, height: number, callback?: Phaser.Types.Input.HitAreaCallback): Phaser.Input.InputPlugin; - - /** - * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Rectangle` shape, using - * the Game Objects texture frame to define the position and size of the hit area. - * @param gameObjects An array of Game Objects to set as having an ellipse hit area. - * @param callback The hit area callback. If undefined it uses Rectangle.Contains. - */ - setHitAreaFromTexture(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], callback?: Phaser.Types.Input.HitAreaCallback): Phaser.Input.InputPlugin; - - /** - * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Rectangle` shape, using - * the given coordinates and dimensions to control its position and size. - * @param gameObjects An array of Game Objects to set as having a rectangular hit area. - * @param x The top-left of the rectangle. - * @param y The top-left of the rectangle. - * @param width The width of the rectangle. - * @param height The height of the rectangle. - * @param callback The hit area callback. If undefined it uses Rectangle.Contains. - */ - setHitAreaRectangle(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], x: number, y: number, width: number, height: number, callback?: Phaser.Types.Input.HitAreaCallback): Phaser.Input.InputPlugin; - - /** - * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Triangle` shape, using - * the given coordinates to control the position of its points. - * @param gameObjects An array of Game Objects to set as having a triangular hit area. - * @param x1 The x coordinate of the first point of the triangle. - * @param y1 The y coordinate of the first point of the triangle. - * @param x2 The x coordinate of the second point of the triangle. - * @param y2 The y coordinate of the second point of the triangle. - * @param x3 The x coordinate of the third point of the triangle. - * @param y3 The y coordinate of the third point of the triangle. - * @param callback The hit area callback. If undefined it uses Triangle.Contains. - */ - setHitAreaTriangle(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, callback?: Phaser.Types.Input.HitAreaCallback): Phaser.Input.InputPlugin; - - /** - * Creates an Input Debug Shape for the given Game Object. - * - * The Game Object must have _already_ been enabled for input prior to calling this method. - * - * This is intended to assist you during development and debugging. - * - * Debug Shapes can only be created for Game Objects that are using standard Phaser Geometry for input, - * including: Circle, Ellipse, Line, Polygon, Rectangle and Triangle. - * - * Game Objects that are using their automatic hit areas are using Rectangles by default, so will also work. - * - * The Debug Shape is created and added to the display list and is then kept in sync with the Game Object - * it is connected with. Should you need to modify it yourself, such as to hide it, you can access it via - * the Game Object property: `GameObject.input.hitAreaDebug`. - * - * Calling this method on a Game Object that already has a Debug Shape will first destroy the old shape, - * before creating a new one. If you wish to remove the Debug Shape entirely, you should call the - * method `InputPlugin.removeDebug`. - * - * Note that the debug shape will only show the outline of the input area. If the input test is using a - * pixel perfect check, for example, then this is not displayed. If you are using a custom shape, that - * doesn't extend one of the base Phaser Geometry objects, as your hit area, then this method will not - * work. - * @param gameObject The Game Object to create the input debug shape for. - * @param color The outline color of the debug shape. Default 0x00ff00. - */ - enableDebug(gameObject: Phaser.GameObjects.GameObject, color?: number): Phaser.Input.InputPlugin; - - /** - * Removes an Input Debug Shape from the given Game Object. - * - * The shape is destroyed immediately and the `hitAreaDebug` property is set to `null`. - * @param gameObject The Game Object to remove the input debug shape from. - */ - removeDebug(gameObject: Phaser.GameObjects.GameObject): Phaser.Input.InputPlugin; - - /** - * Sets the Pointers to always poll. - * - * When a pointer is polled it runs a hit test to see which Game Objects are currently below it, - * or being interacted with it, regardless if the Pointer has actually moved or not. - * - * You should enable this if you want objects in your game to fire over / out events, and the objects - * are constantly moving, but the pointer may not have. Polling every frame has additional computation - * costs, especially if there are a large number of interactive objects in your game. - */ - setPollAlways(): Phaser.Input.InputPlugin; - - /** - * Sets the Pointers to only poll when they are moved or updated. - * - * When a pointer is polled it runs a hit test to see which Game Objects are currently below it, - * or being interacted with it. - */ - setPollOnMove(): Phaser.Input.InputPlugin; - - /** - * Sets the poll rate value. This is the amount of time that should have elapsed before a pointer - * will be polled again. See the `setPollAlways` and `setPollOnMove` methods. - * @param value The amount of time, in ms, that should elapsed before re-polling the pointers. - */ - setPollRate(value: number): Phaser.Input.InputPlugin; - - /** - * When set to `true` the global Input Manager will emulate DOM behavior by only emitting events from - * the top-most Scene in the Scene List. By default, if a Scene receives an input event it will then stop the event - * from flowing down to any Scenes below it in the Scene list. To disable this behavior call this method with `false`. - * @param value Set to `true` to stop processing input events on the Scene that receives it, or `false` to let the event continue down the Scene list. - */ - setGlobalTopOnly(value: boolean): Phaser.Input.InputPlugin; - - /** - * When set to `true` this Input Plugin will emulate DOM behavior by only emitting events from - * the top-most Game Objects in the Display List. - * - * If set to `false` it will emit events from all Game Objects below a Pointer, not just the top one. - * @param value `true` to only include the top-most Game Object, or `false` to include all Game Objects in a hit test. - */ - setTopOnly(value: boolean): Phaser.Input.InputPlugin; - - /** - * Given an array of Game Objects, sort the array and return it, so that the objects are in depth index order - * with the lowest at the bottom. - * @param gameObjects An array of Game Objects to be sorted. - */ - sortGameObjects(gameObjects: Phaser.GameObjects.GameObject[]): Phaser.GameObjects.GameObject[]; - - /** - * This method should be called from within an input event handler, such as `pointerdown`. - * - * When called, it stops the Input Manager from allowing _this specific event_ to be processed by any other Scene - * not yet handled in the scene list. - */ - stopPropagation(): Phaser.Input.InputPlugin; - - /** - * Adds new Pointer objects to the Input Manager. - * - * By default Phaser creates 2 pointer objects: `mousePointer` and `pointer1`. - * - * You can create more either by calling this method, or by setting the `input.activePointers` property - * in the Game Config, up to a maximum of 10 pointers. - * - * The first 10 pointers are available via the `InputPlugin.pointerX` properties, once they have been added - * via this method. - * @param quantity The number of new Pointers to create. A maximum of 10 is allowed in total. Default 1. - */ - addPointer(quantity?: integer): Phaser.Input.Pointer[]; - - /** - * Tells the Input system to set a custom cursor. - * - * This cursor will be the default cursor used when interacting with the game canvas. - * - * If an Interactive Object also sets a custom cursor, this is the cursor that is reset after its use. - * - * Any valid CSS cursor value is allowed, including paths to image files, i.e.: - * - * ```javascript - * this.input.setDefaultCursor('url(assets/cursors/sword.cur), pointer'); - * ``` - * - * Please read about the differences between browsers when it comes to the file formats and sizes they support: - * - * https://developer.mozilla.org/en-US/docs/Web/CSS/cursor - * https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_User_Interface/Using_URL_values_for_the_cursor_property - * - * It's up to you to pick a suitable cursor format that works across the range of browsers you need to support. - * @param cursor The CSS to be used when setting the default cursor. - */ - setDefaultCursor(cursor: string): Phaser.Input.InputPlugin; - - /** - * The x coordinates of the ActivePointer based on the first camera in the camera list. - * This is only safe to use if your game has just 1 non-transformed camera and doesn't use multi-touch. - */ - readonly x: number; - - /** - * The y coordinates of the ActivePointer based on the first camera in the camera list. - * This is only safe to use if your game has just 1 non-transformed camera and doesn't use multi-touch. - */ - readonly y: number; - - /** - * Are any mouse or touch pointers currently over the game canvas? - */ - readonly isOver: boolean; - - /** - * The mouse has its own unique Pointer object, which you can reference directly if making a _desktop specific game_. - * If you are supporting both desktop and touch devices then do not use this property, instead use `activePointer` - * which will always map to the most recently interacted pointer. - */ - readonly mousePointer: Phaser.Input.Pointer; - - /** - * The current active input Pointer. - */ - readonly activePointer: Phaser.Input.Pointer; - - /** - * A touch-based Pointer object. - * This will be `undefined` by default unless you add a new Pointer using `addPointer`. - */ - readonly pointer1: Phaser.Input.Pointer; - - /** - * A touch-based Pointer object. - * This will be `undefined` by default unless you add a new Pointer using `addPointer`. - */ - readonly pointer2: Phaser.Input.Pointer; - - /** - * A touch-based Pointer object. - * This will be `undefined` by default unless you add a new Pointer using `addPointer`. - */ - readonly pointer3: Phaser.Input.Pointer; - - /** - * A touch-based Pointer object. - * This will be `undefined` by default unless you add a new Pointer using `addPointer`. - */ - readonly pointer4: Phaser.Input.Pointer; - - /** - * A touch-based Pointer object. - * This will be `undefined` by default unless you add a new Pointer using `addPointer`. - */ - readonly pointer5: Phaser.Input.Pointer; - - /** - * A touch-based Pointer object. - * This will be `undefined` by default unless you add a new Pointer using `addPointer`. - */ - readonly pointer6: Phaser.Input.Pointer; - - /** - * A touch-based Pointer object. - * This will be `undefined` by default unless you add a new Pointer using `addPointer`. - */ - readonly pointer7: Phaser.Input.Pointer; - - /** - * A touch-based Pointer object. - * This will be `undefined` by default unless you add a new Pointer using `addPointer`. - */ - readonly pointer8: Phaser.Input.Pointer; - - /** - * A touch-based Pointer object. - * This will be `undefined` by default unless you add a new Pointer using `addPointer`. - */ - readonly pointer9: Phaser.Input.Pointer; - - /** - * A touch-based Pointer object. - * This will be `undefined` by default unless you add a new Pointer using `addPointer`. - */ - readonly pointer10: Phaser.Input.Pointer; - - /** - * An instance of the Gamepad Plugin class, if enabled via the `input.gamepad` Scene or Game Config property. - * Use this to create access Gamepads connected to the browser and respond to gamepad buttons. - */ - gamepad: Phaser.Input.Gamepad.GamepadPlugin; - - /** - * An instance of the Keyboard Plugin class, if enabled via the `input.keyboard` Scene or Game Config property. - * Use this to create Key objects and listen for keyboard specific events. - */ - keyboard: Phaser.Input.Keyboard.KeyboardPlugin; - - } - - namespace InputPluginCache { - /** - * Static method called directly by the Core internal Plugins. - * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin) - * Plugin is the object to instantiate to create the plugin - * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input) - * @param key A reference used to get this plugin from the plugin cache. - * @param plugin The plugin to be stored. Should be the core object, not instantiated. - * @param mapping If this plugin is to be injected into the Input Plugin, this is the property key used. - * @param settingsKey The key in the Scene Settings to check to see if this plugin should install or not. - * @param configKey The key in the Game Config to check to see if this plugin should install or not. - */ - function register(key: string, plugin: Function, mapping: string, settingsKey: string, configKey: string): void; - - /** - * Returns the input plugin object from the cache based on the given key. - * @param key The key of the input plugin to get. - */ - function getCore(key: string): Phaser.Types.Input.InputPluginContainer; - - /** - * Installs all of the registered Input Plugins into the given target. - * @param target The target InputPlugin to install the plugins into. - */ - function install(target: Phaser.Input.InputPlugin): void; - - /** - * Removes an input plugin based on the given key. - * @param key The key of the input plugin to remove. - */ - function remove(key: string): void; - - } - - /** - * A Pointer object encapsulates both mouse and touch input within Phaser. - * - * By default, Phaser will create 2 pointers for your game to use. If you require more, i.e. for a multi-touch - * game, then use the `InputPlugin.addPointer` method to do so, rather than instantiating this class directly, - * otherwise it won't be managed by the input system. - * - * You can reference the current active pointer via `InputPlugin.activePointer`. You can also use the properties - * `InputPlugin.pointer1` through to `pointer10`, for each pointer you have enabled in your game. - * - * The properties of this object are set by the Input Plugin during processing. This object is then sent in all - * input related events that the Input Plugin emits, so you can reference properties from it directly in your - * callbacks. - */ - class Pointer { - /** - * - * @param manager A reference to the Input Manager. - * @param id The internal ID of this Pointer. - */ - constructor(manager: Phaser.Input.InputManager, id: integer); - - /** - * A reference to the Input Manager. - */ - manager: Phaser.Input.InputManager; - - /** - * The internal ID of this Pointer. - */ - readonly id: integer; - - /** - * The most recent native DOM Event this Pointer has processed. - */ - event: TouchEvent | MouseEvent; - - /** - * The DOM element the Pointer was pressed down on, taken from the DOM event. - * In a default set-up this will be the Canvas that Phaser is rendering to, or the Window element. - */ - readonly downElement: any; - - /** - * The DOM element the Pointer was released on, taken from the DOM event. - * In a default set-up this will be the Canvas that Phaser is rendering to, or the Window element. - */ - readonly upElement: any; - - /** - * The camera the Pointer interacted with during its last update. - * - * A Pointer can only ever interact with one camera at once, which will be the top-most camera - * in the list should multiple cameras be positioned on-top of each other. - */ - camera: Phaser.Cameras.Scene2D.Camera; - - /** - * A read-only property that indicates which button was pressed, or released, on the pointer - * during the most recent event. It is only set during `up` and `down` events. - * - * On Touch devices the value is always 0. - * - * Users may change the configuration of buttons on their pointing device so that if an event's button property - * is zero, it may not have been caused by the button that is physically left–most on the pointing device; - * however, it should behave as if the left button was clicked in the standard button layout. - */ - readonly button: integer; - - /** - * 0: No button or un-initialized - * 1: Left button - * 2: Right button - * 4: Wheel button or middle button - * 8: 4th button (typically the "Browser Back" button) - * 16: 5th button (typically the "Browser Forward" button) - * - * For a mouse configured for left-handed use, the button actions are reversed. - * In this case, the values are read from right to left. - */ - buttons: integer; - - /** - * The position of the Pointer in screen space. - */ - readonly position: Phaser.Math.Vector2; - - /** - * The previous position of the Pointer in screen space. - * - * The old x and y values are stored in here during the InputManager.transformPointer call. - * - * Use the properties `velocity`, `angle` and `distance` to create your own gesture recognition. - */ - readonly prevPosition: Phaser.Math.Vector2; - - /** - * The current velocity of the Pointer, based on its current and previous positions. - * - * This value is smoothed out each frame, according to the `motionFactor` property. - * - * This property is updated whenever the Pointer moves, regardless of any button states. In other words, - * it changes based on movement alone - a button doesn't have to be pressed first. - */ - readonly velocity: Phaser.Math.Vector2; - - /** - * The current angle the Pointer is moving, in radians, based on its previous and current position. - * - * The angle is based on the old position facing to the current position. - * - * This property is updated whenever the Pointer moves, regardless of any button states. In other words, - * it changes based on movement alone - a button doesn't have to be pressed first. - */ - readonly angle: number; - - /** - * The distance the Pointer has moved, based on its previous and current position. - * - * This value is smoothed out each frame, according to the `motionFactor` property. - * - * This property is updated whenever the Pointer moves, regardless of any button states. In other words, - * it changes based on movement alone - a button doesn't have to be pressed first. - * - * If you need the total distance travelled since the primary buttons was pressed down, - * then use the `Pointer.getDistance` method. - */ - readonly distance: number; - - /** - * The smoothing factor to apply to the Pointer position. - * - * Due to their nature, pointer positions are inherently noisy. While this is fine for lots of games, if you need cleaner positions - * then you can set this value to apply an automatic smoothing to the positions as they are recorded. - * - * The default value of zero means 'no smoothing'. - * Set to a small value, such as 0.2, to apply an average level of smoothing between positions. You can do this by changing this - * value directly, or by setting the `input.smoothFactor` property in the Game Config. - * - * Positions are only smoothed when the pointer moves. If the primary button on this Pointer enters an Up or Down state, then the position - * is always precise, and not smoothed. - */ - smoothFactor: number; - - /** - * The factor applied to the motion smoothing each frame. - * - * This value is passed to the Smooth Step Interpolation that is used to calculate the velocity, - * angle and distance of the Pointer. It's applied every frame, until the midPoint reaches the current - * position of the Pointer. 0.2 provides a good average but can be increased if you need a - * quicker update and are working in a high performance environment. Never set this value to - * zero. - */ - motionFactor: number; - - /** - * The x position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with. - * - * If you wish to use this value _outside_ of an input event handler then you should update it first by calling - * the `Pointer.updateWorldPoint` method. - */ - worldX: number; - - /** - * The y position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with. - * - * If you wish to use this value _outside_ of an input event handler then you should update it first by calling - * the `Pointer.updateWorldPoint` method. - */ - worldY: number; - - /** - * Time when this Pointer was most recently moved (regardless of the state of its buttons, if any) - */ - moveTime: number; - - /** - * X coordinate of the Pointer when Button 1 (left button), or Touch, was pressed, used for dragging objects. - */ - downX: number; - - /** - * Y coordinate of the Pointer when Button 1 (left button), or Touch, was pressed, used for dragging objects. - */ - downY: number; - - /** - * Time when Button 1 (left button), or Touch, was pressed, used for dragging objects. - */ - downTime: number; - - /** - * X coordinate of the Pointer when Button 1 (left button), or Touch, was released, used for dragging objects. - */ - upX: number; - - /** - * Y coordinate of the Pointer when Button 1 (left button), or Touch, was released, used for dragging objects. - */ - upY: number; - - /** - * Time when Button 1 (left button), or Touch, was released, used for dragging objects. - */ - upTime: number; - - /** - * Is the primary button down? (usually button 0, the left mouse button) - */ - primaryDown: boolean; - - /** - * Is _any_ button on this pointer considered as being down? - */ - isDown: boolean; - - /** - * Did the previous input event come from a Touch input (true) or Mouse? (false) - */ - wasTouch: boolean; - - /** - * Did this Pointer get canceled by a touchcancel event? - * - * Note: "canceled" is the American-English spelling of "cancelled". Please don't submit PRs correcting it! - */ - wasCanceled: boolean; - - /** - * If the mouse is locked, the horizontal relative movement of the Pointer in pixels since last frame. - */ - movementX: number; - - /** - * If the mouse is locked, the vertical relative movement of the Pointer in pixels since last frame. - */ - movementY: number; - - /** - * The identifier property of the Pointer as set by the DOM event when this Pointer is started. - */ - identifier: number; - - /** - * The pointerId property of the Pointer as set by the DOM event when this Pointer is started. - * The browser can and will recycle this value. - */ - pointerId: number; - - /** - * An active Pointer is one that is currently pressed down on the display. - * A Mouse is always considered as active. - */ - active: boolean; - - /** - * Is this pointer Pointer Locked? - * - * Only a mouse pointer can be locked and it only becomes locked when requested via - * the browsers Pointer Lock API. - * - * You can request this by calling the `this.input.mouse.requestPointerLock()` method from - * a `pointerdown` or `pointerup` event handler. - */ - readonly locked: boolean; - - /** - * The horizontal scroll amount that occurred due to the user moving a mouse wheel or similar input device. - */ - deltaX: number; - - /** - * The vertical scroll amount that occurred due to the user moving a mouse wheel or similar input device. - * This value will typically be less than 0 if the user scrolls up and greater than zero if scrolling down. - */ - deltaY: number; - - /** - * The z-axis scroll amount that occurred due to the user moving a mouse wheel or similar input device. - */ - deltaZ: number; - - /** - * Takes a Camera and updates this Pointer's `worldX` and `worldY` values so they are - * the result of a translation through the given Camera. - * - * Note that the values will be automatically replaced the moment the Pointer is - * updated by an input event, such as a mouse move, so should be used immediately. - * @param camera The Camera which is being tested against. - */ - updateWorldPoint(camera: Phaser.Cameras.Scene2D.Camera): this; - - /** - * Takes a Camera and returns a Vector2 containing the translated position of this Pointer - * within that Camera. This can be used to convert this Pointers position into camera space. - * @param camera The Camera to use for the translation. - * @param output A Vector2-like object in which to store the translated position. - */ - positionToCamera(camera: Phaser.Cameras.Scene2D.Camera, output?: Phaser.Math.Vector2 | object): Phaser.Math.Vector2 | object; - - /** - * Checks to see if any buttons are being held down on this Pointer. - */ - noButtonDown(): boolean; - - /** - * Checks to see if the left button is being held down on this Pointer. - */ - leftButtonDown(): boolean; - - /** - * Checks to see if the right button is being held down on this Pointer. - */ - rightButtonDown(): boolean; - - /** - * Checks to see if the middle button is being held down on this Pointer. - */ - middleButtonDown(): boolean; - - /** - * Checks to see if the back button is being held down on this Pointer. - */ - backButtonDown(): boolean; - - /** - * Checks to see if the forward button is being held down on this Pointer. - */ - forwardButtonDown(): boolean; - - /** - * Checks to see if the left button was just released on this Pointer. - */ - leftButtonReleased(): boolean; - - /** - * Checks to see if the right button was just released on this Pointer. - */ - rightButtonReleased(): boolean; - - /** - * Checks to see if the middle button was just released on this Pointer. - */ - middleButtonReleased(): boolean; - - /** - * Checks to see if the back button was just released on this Pointer. - */ - backButtonReleased(): boolean; - - /** - * Checks to see if the forward button was just released on this Pointer. - */ - forwardButtonReleased(): boolean; - - /** - * If the Pointer has a button pressed down at the time this method is called, it will return the - * distance between the Pointer's `downX` and `downY` values and the current position. - * - * If no button is held down, it will return the last recorded distance, based on where - * the Pointer was when the button was released. - * - * If you wish to get the distance being travelled currently, based on the velocity of the Pointer, - * then see the `Pointer.distance` property. - */ - getDistance(): number; - - /** - * If the Pointer has a button pressed down at the time this method is called, it will return the - * horizontal distance between the Pointer's `downX` and `downY` values and the current position. - * - * If no button is held down, it will return the last recorded horizontal distance, based on where - * the Pointer was when the button was released. - */ - getDistanceX(): number; - - /** - * If the Pointer has a button pressed down at the time this method is called, it will return the - * vertical distance between the Pointer's `downX` and `downY` values and the current position. - * - * If no button is held down, it will return the last recorded vertical distance, based on where - * the Pointer was when the button was released. - */ - getDistanceY(): number; - - /** - * If the Pointer has a button pressed down at the time this method is called, it will return the - * duration since the button was pressed down. - * - * If no button is held down, it will return the last recorded duration, based on the time - * the Pointer button was released. - */ - getDuration(): number; - - /** - * If the Pointer has a button pressed down at the time this method is called, it will return the - * angle between the Pointer's `downX` and `downY` values and the current position. - * - * If no button is held down, it will return the last recorded angle, based on where - * the Pointer was when the button was released. - * - * The angle is based on the old position facing to the current position. - * - * If you wish to get the current angle, based on the velocity of the Pointer, then - * see the `Pointer.angle` property. - */ - getAngle(): number; - - /** - * Takes the previous and current Pointer positions and then generates an array of interpolated values between - * the two. The array will be populated up to the size of the `steps` argument. - * - * ```javaScript - * var points = pointer.getInterpolatedPosition(4); - * - * // points[0] = { x: 0, y: 0 } - * // points[1] = { x: 2, y: 1 } - * // points[2] = { x: 3, y: 2 } - * // points[3] = { x: 6, y: 3 } - * ``` - * - * Use this if you need to get smoothed values between the previous and current pointer positions. DOM pointer - * events can often fire faster than the main browser loop, and this will help you avoid janky movement - * especially if you have an object following a Pointer. - * - * Note that if you provide an output array it will only be populated up to the number of steps provided. - * It will not clear any previous data that may have existed beyond the range of the steps count. - * - * Internally it uses the Smooth Step interpolation calculation. - * @param steps The number of interpolation steps to use. Default 10. - * @param out An array to store the results in. If not provided a new one will be created. - */ - getInterpolatedPosition(steps?: integer, out?: any[]): any[]; - - /** - * Destroys this Pointer instance and resets its external references. - */ - destroy(): void; - - /** - * The x position of this Pointer. - * The value is in screen space. - * See `worldX` to get a camera converted position. - */ - x: number; - - /** - * The y position of this Pointer. - * The value is in screen space. - * See `worldY` to get a camera converted position. - */ - y: number; - - /** - * Time when this Pointer was most recently updated by a DOM Event. - * This comes directly from the `event.timeStamp` property. - * If no event has yet taken place, it will return zero. - */ - readonly time: number; - - } - /** * The mouse pointer is being held down. */ @@ -41374,6 +40427,27 @@ declare namespace Phaser { */ var MOUSE_WHEEL: integer; + /** + * Creates a new Interactive Object. + * + * This is called automatically by the Input Manager when you enable a Game Object for input. + * + * The resulting Interactive Object is mapped to the Game Object's `input` property. + * @param gameObject The Game Object to which this Interactive Object is bound. + * @param hitArea The hit area for this Interactive Object. Typically a geometry shape, like a Rectangle or Circle. + * @param hitAreaCallback The 'contains' check callback that the hit area shape will use for all hit tests. + */ + function CreateInteractiveObject(gameObject: Phaser.GameObjects.GameObject, hitArea: any, hitAreaCallback: Phaser.Types.Input.HitAreaCallback): Phaser.Types.Input.InteractiveObject; + + /** + * Creates a new Pixel Perfect Handler function. + * + * Access via `InputPlugin.makePixelPerfect` rather than calling it directly. + * @param textureManager A reference to the Texture Manager. + * @param alphaTolerance The alpha level that the pixel should be above to be included as a successful interaction. + */ + function CreatePixelPerfectHandler(textureManager: Phaser.Textures.TextureManager, alphaTolerance: integer): Function; + namespace Events { /** * The Input Plugin Boot Event. @@ -42173,6 +41247,102 @@ declare namespace Phaser { } + namespace Configs { + /** + * Tatar SNES USB Controller Gamepad Configuration. + * USB Gamepad (STANDARD GAMEPAD Vendor: 0079 Product: 0011) + */ + var SNES_USB: object; + + /** + * PlayStation DualShock 4 Gamepad Configuration. + * Sony PlayStation DualShock 4 (v2) wireless controller + */ + var DUALSHOCK_4: object; + + /** + * XBox 360 Gamepad Configuration. + */ + var XBOX_360: object; + + } + + namespace Events { + /** + * The Gamepad Button Down Event. + * + * This event is dispatched by the Gamepad Plugin when a button has been pressed on any active Gamepad. + * + * Listen to this event from within a Scene using: `this.input.gamepad.on('down', listener)`. + * + * You can also listen for a DOWN event from a Gamepad instance. See the [GAMEPAD_BUTTON_DOWN]{@linkcode Phaser.Input.Gamepad.Events#event:GAMEPAD_BUTTON_DOWN} event for details. + */ + const BUTTON_DOWN: any; + + /** + * The Gamepad Button Up Event. + * + * This event is dispatched by the Gamepad Plugin when a button has been released on any active Gamepad. + * + * Listen to this event from within a Scene using: `this.input.gamepad.on('up', listener)`. + * + * You can also listen for an UP event from a Gamepad instance. See the [GAMEPAD_BUTTON_UP]{@linkcode Phaser.Input.Gamepad.Events#event:GAMEPAD_BUTTON_UP} event for details. + */ + const BUTTON_UP: any; + + /** + * The Gamepad Connected Event. + * + * This event is dispatched by the Gamepad Plugin when a Gamepad has been connected. + * + * Listen to this event from within a Scene using: `this.input.gamepad.once('connected', listener)`. + * + * Note that the browser may require you to press a button on a gamepad before it will allow you to access it, + * this is for security reasons. However, it may also trust the page already, in which case you won't get the + * 'connected' event and instead should check `GamepadPlugin.total` to see if it thinks there are any gamepads + * already connected. + */ + const CONNECTED: any; + + /** + * The Gamepad Disconnected Event. + * + * This event is dispatched by the Gamepad Plugin when a Gamepad has been disconnected. + * + * Listen to this event from within a Scene using: `this.input.gamepad.once('disconnected', listener)`. + */ + const DISCONNECTED: any; + + /** + * The Gamepad Button Down Event. + * + * This event is dispatched by a Gamepad instance when a button has been pressed on it. + * + * Listen to this event from a Gamepad instance. Once way to get this is from the `pad1`, `pad2`, etc properties on the Gamepad Plugin: + * `this.input.gamepad.pad1.on('down', listener)`. + * + * Note that you will not receive any Gamepad button events until the browser considers the Gamepad as being 'connected'. + * + * You can also listen for a DOWN event from the Gamepad Plugin. See the [BUTTON_DOWN]{@linkcode Phaser.Input.Gamepad.Events#event:BUTTON_DOWN} event for details. + */ + const GAMEPAD_BUTTON_DOWN: any; + + /** + * The Gamepad Button Up Event. + * + * This event is dispatched by a Gamepad instance when a button has been released on it. + * + * Listen to this event from a Gamepad instance. Once way to get this is from the `pad1`, `pad2`, etc properties on the Gamepad Plugin: + * `this.input.gamepad.pad1.on('up', listener)`. + * + * Note that you will not receive any Gamepad button events until the browser considers the Gamepad as being 'connected'. + * + * You can also listen for an UP event from the Gamepad Plugin. See the [BUTTON_UP]{@linkcode Phaser.Input.Gamepad.Events#event:BUTTON_UP} event for details. + */ + const GAMEPAD_BUTTON_UP: any; + + } + /** * A single Gamepad. * @@ -42541,105 +41711,1087 @@ declare namespace Phaser { } - namespace Configs { + } + + /** + * The Input Manager is responsible for handling the pointer related systems in a single Phaser Game instance. + * + * Based on the Game Config it will create handlers for mouse and touch support. + * + * Keyboard and Gamepad are plugins, handled directly by the InputPlugin class. + * + * It then manages the events, pointer creation and general hit test related operations. + * + * You rarely need to interact with the Input Manager directly, and as such, all of its properties and methods + * should be considered private. Instead, you should use the Input Plugin, which is a Scene level system, responsible + * for dealing with all input events for a Scene. + */ + class InputManager { + /** + * + * @param game The Game instance that owns the Input Manager. + * @param config The Input Configuration object, as set in the Game Config. + */ + constructor(game: Phaser.Game, config: object); + + /** + * The Game instance that owns the Input Manager. + * A Game only maintains on instance of the Input Manager at any time. + */ + readonly game: Phaser.Game; + + /** + * A reference to the global Game Scale Manager. + * Used for all bounds checks and pointer scaling. + */ + scaleManager: Phaser.Scale.ScaleManager; + + /** + * The Canvas that is used for all DOM event input listeners. + */ + canvas: HTMLCanvasElement; + + /** + * The Game Configuration object, as set during the game boot. + */ + config: Phaser.Core.Config; + + /** + * If set, the Input Manager will run its update loop every frame. + */ + enabled: boolean; + + /** + * The Event Emitter instance that the Input Manager uses to emit events from. + */ + events: Phaser.Events.EventEmitter; + + /** + * Are any mouse or touch pointers currently over the game canvas? + * This is updated automatically by the canvas over and out handlers. + */ + readonly isOver: boolean; + + /** + * The default CSS cursor to be used when interacting with your game. + * + * See the `setDefaultCursor` method for more details. + */ + defaultCursor: string; + + /** + * A reference to the Keyboard Manager class, if enabled via the `input.keyboard` Game Config property. + */ + keyboard: Phaser.Input.Keyboard.KeyboardManager; + + /** + * A reference to the Mouse Manager class, if enabled via the `input.mouse` Game Config property. + */ + mouse: Phaser.Input.Mouse.MouseManager; + + /** + * A reference to the Touch Manager class, if enabled via the `input.touch` Game Config property. + */ + touch: Phaser.Input.Touch.TouchManager; + + /** + * An array of Pointers that have been added to the game. + * The first entry is reserved for the Mouse Pointer, the rest are Touch Pointers. + * + * By default there is 1 touch pointer enabled. If you need more use the `addPointer` method to start them, + * or set the `input.activePointers` property in the Game Config. + */ + pointers: Phaser.Input.Pointer[]; + + /** + * The number of touch objects activated and being processed each update. + * + * You can change this by either calling `addPointer` at run-time, or by + * setting the `input.activePointers` property in the Game Config. + */ + readonly pointersTotal: integer; + + /** + * The mouse has its own unique Pointer object, which you can reference directly if making a _desktop specific game_. + * If you are supporting both desktop and touch devices then do not use this property, instead use `activePointer` + * which will always map to the most recently interacted pointer. + */ + mousePointer: Phaser.Input.Pointer; + + /** + * The most recently active Pointer object. + * + * If you've only 1 Pointer in your game then this will accurately be either the first finger touched, or the mouse. + * + * If your game doesn't need to support multi-touch then you can safely use this property in all of your game + * code and it will adapt to be either the mouse or the touch, based on device. + */ + activePointer: Phaser.Input.Pointer; + + /** + * If the top-most Scene in the Scene List receives an input it will stop input from + * propagating any lower down the scene list, i.e. if you have a UI Scene at the top + * and click something on it, that click will not then be passed down to any other + * Scene below. Disable this to have input events passed through all Scenes, all the time. + */ + globalTopOnly: boolean; + + /** + * The time this Input Manager was last updated. + * This value is populated by the Game Step each frame. + */ + readonly time: number; + + /** + * The Boot handler is called by Phaser.Game when it first starts up. + * The renderer is available by now. + */ + protected boot(): void; + + /** + * Tells the Input system to set a custom cursor. + * + * This cursor will be the default cursor used when interacting with the game canvas. + * + * If an Interactive Object also sets a custom cursor, this is the cursor that is reset after its use. + * + * Any valid CSS cursor value is allowed, including paths to image files, i.e.: + * + * ```javascript + * this.input.setDefaultCursor('url(assets/cursors/sword.cur), pointer'); + * ``` + * + * Please read about the differences between browsers when it comes to the file formats and sizes they support: + * + * https://developer.mozilla.org/en-US/docs/Web/CSS/cursor + * https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_User_Interface/Using_URL_values_for_the_cursor_property + * + * It's up to you to pick a suitable cursor format that works across the range of browsers you need to support. + * @param cursor The CSS to be used when setting the default cursor. + */ + setDefaultCursor(cursor: string): void; + + /** + * Adds new Pointer objects to the Input Manager. + * + * By default Phaser creates 2 pointer objects: `mousePointer` and `pointer1`. + * + * You can create more either by calling this method, or by setting the `input.activePointers` property + * in the Game Config, up to a maximum of 10 pointers. + * + * The first 10 pointers are available via the `InputPlugin.pointerX` properties, once they have been added + * via this method. + * @param quantity The number of new Pointers to create. A maximum of 10 is allowed in total. Default 1. + */ + addPointer(quantity?: integer): Phaser.Input.Pointer[]; + + /** + * Internal method that gets a list of all the active Input Plugins in the game + * and updates each of them in turn, in reverse order (top to bottom), to allow + * for DOM top-level event handling simulation. + * @param type The type of event to process. + * @param pointers An array of Pointers on which the event occurred. + */ + updateInputPlugins(type: integer, pointers: Phaser.Input.Pointer[]): void; + + /** + * Performs a hit test using the given Pointer and camera, against an array of interactive Game Objects. + * + * The Game Objects are culled against the camera, and then the coordinates are translated into the local camera space + * and used to determine if they fall within the remaining Game Objects hit areas or not. + * + * If nothing is matched an empty array is returned. + * + * This method is called automatically by InputPlugin.hitTestPointer and doesn't usually need to be invoked directly. + * @param pointer The Pointer to test against. + * @param gameObjects An array of interactive Game Objects to check. + * @param camera The Camera which is being tested against. + * @param output An array to store the results in. If not given, a new empty array is created. + */ + hitTest(pointer: Phaser.Input.Pointer, gameObjects: any[], camera: Phaser.Cameras.Scene2D.Camera, output?: any[]): any[]; + + /** + * Checks if the given x and y coordinate are within the hit area of the Game Object. + * + * This method assumes that the coordinate values have already been translated into the space of the Game Object. + * + * If the coordinates are within the hit area they are set into the Game Objects Input `localX` and `localY` properties. + * @param gameObject The interactive Game Object to check against. + * @param x The translated x coordinate for the hit test. + * @param y The translated y coordinate for the hit test. + */ + pointWithinHitArea(gameObject: Phaser.GameObjects.GameObject, x: number, y: number): boolean; + + /** + * Checks if the given x and y coordinate are within the hit area of the Interactive Object. + * + * This method assumes that the coordinate values have already been translated into the space of the Interactive Object. + * + * If the coordinates are within the hit area they are set into the Interactive Objects Input `localX` and `localY` properties. + * @param object The Interactive Object to check against. + * @param x The translated x coordinate for the hit test. + * @param y The translated y coordinate for the hit test. + */ + pointWithinInteractiveObject(object: Phaser.Types.Input.InteractiveObject, x: number, y: number): boolean; + + /** + * Transforms the pageX and pageY values of a Pointer into the scaled coordinate space of the Input Manager. + * @param pointer The Pointer to transform the values for. + * @param pageX The Page X value. + * @param pageY The Page Y value. + * @param wasMove Are we transforming the Pointer from a move event, or an up / down event? + */ + transformPointer(pointer: Phaser.Input.Pointer, pageX: number, pageY: number, wasMove: boolean): void; + + /** + * Destroys the Input Manager and all of its systems. + * + * There is no way to recover from doing this. + */ + destroy(): void; + + } + + /** + * The Input Plugin belongs to a Scene and handles all input related events and operations for it. + * + * You can access it from within a Scene using `this.input`. + * + * It emits events directly. For example, you can do: + * + * ```javascript + * this.input.on('pointerdown', callback, context); + * ``` + * + * To listen for a pointer down event anywhere on the game canvas. + * + * Game Objects can be enabled for input by calling their `setInteractive` method. After which they + * will directly emit input events: + * + * ```javascript + * var sprite = this.add.sprite(x, y, texture); + * sprite.setInteractive(); + * sprite.on('pointerdown', callback, context); + * ``` + * + * There are lots of game configuration options available relating to input. + * See the [Input Config object]{@linkcode Phaser.Types.Core.InputConfig} for more details, including how to deal with Phaser + * listening for input events outside of the canvas, how to set a default number of pointers, input + * capture settings and more. + * + * Please also see the Input examples and tutorials for further information. + */ + class InputPlugin extends Phaser.Events.EventEmitter { + /** + * + * @param scene A reference to the Scene that this Input Plugin is responsible for. + */ + constructor(scene: Phaser.Scene); + + /** + * An instance of the Gamepad Plugin class, if enabled via the `input.gamepad` Scene or Game Config property. + * Use this to create access Gamepads connected to the browser and respond to gamepad buttons. + */ + gamepad: Phaser.Input.Gamepad.GamepadPlugin; + + /** + * A reference to the Scene that this Input Plugin is responsible for. + */ + scene: Phaser.Scene; + + /** + * A reference to the Scene Systems class. + */ + systems: Phaser.Scenes.Systems; + + /** + * A reference to the Scene Systems Settings. + */ + settings: Phaser.Types.Scenes.SettingsObject; + + /** + * A reference to the Game Input Manager. + */ + manager: Phaser.Input.InputManager; + + /** + * If `true` this Input Plugin will process DOM input events. + */ + enabled: boolean; + + /** + * A reference to the Scene Display List. This property is set during the `boot` method. + */ + displayList: Phaser.GameObjects.DisplayList; + + /** + * A reference to the Scene Cameras Manager. This property is set during the `boot` method. + */ + cameras: Phaser.Cameras.Scene2D.CameraManager; + + /** + * A reference to the Mouse Manager. + * + * This property is only set if Mouse support has been enabled in your Game Configuration file. + * + * If you just wish to get access to the mouse pointer, use the `mousePointer` property instead. + */ + mouse: Phaser.Input.Mouse.MouseManager; + + /** + * When set to `true` (the default) the Input Plugin will emulate DOM behavior by only emitting events from + * the top-most Game Objects in the Display List. + * + * If set to `false` it will emit events from all Game Objects below a Pointer, not just the top one. + */ + topOnly: boolean; + + /** + * How often should the Pointers be checked? + * + * The value is a time, given in ms, and is the time that must have elapsed between game steps before + * the Pointers will be polled again. When a pointer is polled it runs a hit test to see which Game + * Objects are currently below it, or being interacted with it. + * + * Pointers will *always* be checked if they have been moved by the user, or press or released. + * + * This property only controls how often they will be polled if they have not been updated. + * You should set this if you want to have Game Objects constantly check against the pointers, even + * if the pointer didn't itself move. + * + * Set to 0 to poll constantly. Set to -1 to only poll on user movement. + */ + pollRate: integer; + + /** + * The distance, in pixels, a pointer has to move while being held down, before it thinks it is being dragged. + */ + dragDistanceThreshold: number; + + /** + * The amount of time, in ms, a pointer has to be held down before it thinks it is dragging. + * + * The default polling rate is to poll only on move so once the time threshold is reached the + * drag event will not start until you move the mouse. If you want it to start immediately + * when the time threshold is reached, you must increase the polling rate by calling + * [setPollAlways]{@linkcode Phaser.Input.InputPlugin#setPollAlways} or + * [setPollRate]{@linkcode Phaser.Input.InputPlugin#setPollRate}. + */ + dragTimeThreshold: number; + + /** + * Checks to see if both this plugin and the Scene to which it belongs is active. + */ + isActive(): boolean; + + /** + * This is called automatically by the Input Manager. + * It emits events for plugins to listen to and also handles polling updates, if enabled. + * @param time The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. + * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. + */ + updatePoll(time: number, delta: number): boolean; + + /** + * Clears a Game Object so it no longer has an Interactive Object associated with it. + * The Game Object is then queued for removal from the Input Plugin on the next update. + * @param gameObject The Game Object that will have its Interactive Object removed. + * @param skipQueue Skip adding this Game Object into the removal queue? Default false. + */ + clear(gameObject: Phaser.GameObjects.GameObject, skipQueue?: boolean): Phaser.GameObjects.GameObject; + + /** + * Disables Input on a single Game Object. + * + * An input disabled Game Object still retains its Interactive Object component and can be re-enabled + * at any time, by passing it to `InputPlugin.enable`. + * @param gameObject The Game Object to have its input system disabled. + */ + disable(gameObject: Phaser.GameObjects.GameObject): void; + + /** + * Enable a Game Object for interaction. + * + * If the Game Object already has an Interactive Object component, it is enabled and returned. + * + * Otherwise, a new Interactive Object component is created and assigned to the Game Object's `input` property. + * + * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area + * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced + * input detection. + * + * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If + * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific + * shape for it to use. + * + * You can also provide an Input Configuration Object as the only argument to this method. + * @param gameObject The Game Object to be enabled for input. + * @param shape Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used. + * @param callback The 'contains' function to invoke to check if the pointer is within the hit area. + * @param dropZone Is this Game Object a drop zone or not? Default false. + */ + enable(gameObject: Phaser.GameObjects.GameObject, shape?: Phaser.Types.Input.InputConfiguration | any, callback?: Phaser.Types.Input.HitAreaCallback, dropZone?: boolean): Phaser.Input.InputPlugin; + + /** + * Takes the given Pointer and performs a hit test against it, to see which interactive Game Objects + * it is currently above. + * + * The hit test is performed against which-ever Camera the Pointer is over. If it is over multiple + * cameras, it starts checking the camera at the top of the camera list, and if nothing is found, iterates down the list. + * @param pointer The Pointer to check against the Game Objects. + */ + hitTestPointer(pointer: Phaser.Input.Pointer): Phaser.GameObjects.GameObject[]; + + /** + * Returns the drag state of the given Pointer for this Input Plugin. + * + * The state will be one of the following: + * + * 0 = Not dragging anything + * 1 = Primary button down and objects below, so collect a draglist + * 2 = Pointer being checked if meets drag criteria + * 3 = Pointer meets criteria, notify the draglist + * 4 = Pointer actively dragging the draglist and has moved + * 5 = Pointer actively dragging but has been released, notify draglist + * @param pointer The Pointer to get the drag state for. + */ + getDragState(pointer: Phaser.Input.Pointer): integer; + + /** + * Sets the drag state of the given Pointer for this Input Plugin. + * + * The state must be one of the following values: + * + * 0 = Not dragging anything + * 1 = Primary button down and objects below, so collect a draglist + * 2 = Pointer being checked if meets drag criteria + * 3 = Pointer meets criteria, notify the draglist + * 4 = Pointer actively dragging the draglist and has moved + * 5 = Pointer actively dragging but has been released, notify draglist + * @param pointer The Pointer to set the drag state for. + * @param state The drag state value. An integer between 0 and 5. + */ + setDragState(pointer: Phaser.Input.Pointer, state: integer): void; + + /** + * Sets the draggable state of the given array of Game Objects. + * + * They can either be set to be draggable, or can have their draggable state removed by passing `false`. + * + * A Game Object will not fire drag events unless it has been specifically enabled for drag. + * @param gameObjects An array of Game Objects to change the draggable state on. + * @param value Set to `true` if the Game Objects should be made draggable, `false` if they should be unset. Default true. + */ + setDraggable(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], value?: boolean): Phaser.Input.InputPlugin; + + /** + * Creates a function that can be passed to `setInteractive`, `enable` or `setHitArea` that will handle + * pixel-perfect input detection on an Image or Sprite based Game Object, or any custom class that extends them. + * + * The following will create a sprite that is clickable on any pixel that has an alpha value >= 1. + * + * ```javascript + * this.add.sprite(x, y, key).setInteractive(this.input.makePixelPerfect()); + * ``` + * + * The following will create a sprite that is clickable on any pixel that has an alpha value >= 150. + * + * ```javascript + * this.add.sprite(x, y, key).setInteractive(this.input.makePixelPerfect(150)); + * ``` + * + * Once you have made an Interactive Object pixel perfect it impacts all input related events for it: down, up, + * dragstart, drag, etc. + * + * As a pointer interacts with the Game Object it will constantly poll the texture, extracting a single pixel from + * the given coordinates and checking its color values. This is an expensive process, so should only be enabled on + * Game Objects that really need it. + * + * You cannot make non-texture based Game Objects pixel perfect. So this will not work on Graphics, BitmapText, + * Render Textures, Text, Tilemaps, Containers or Particles. + * @param alphaTolerance The alpha level that the pixel should be above to be included as a successful interaction. Default 1. + */ + makePixelPerfect(alphaTolerance?: integer): Function; + + /** + * Sets the hit area for the given array of Game Objects. + * + * A hit area is typically one of the geometric shapes Phaser provides, such as a `Phaser.Geom.Rectangle` + * or `Phaser.Geom.Circle`. However, it can be any object as long as it works with the provided callback. + * + * If no hit area is provided a Rectangle is created based on the size of the Game Object, if possible + * to calculate. + * + * The hit area callback is the function that takes an `x` and `y` coordinate and returns a boolean if + * those values fall within the area of the shape or not. All of the Phaser geometry objects provide this, + * such as `Phaser.Geom.Rectangle.Contains`. + * @param gameObjects An array of Game Objects to set the hit area on. + * @param shape Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used. + * @param callback The 'contains' function to invoke to check if the pointer is within the hit area. + */ + setHitArea(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], shape?: Phaser.Types.Input.InputConfiguration | any, callback?: Phaser.Types.Input.HitAreaCallback): Phaser.Input.InputPlugin; + + /** + * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Circle` shape, using + * the given coordinates and radius to control its position and size. + * @param gameObjects An array of Game Objects to set as having a circle hit area. + * @param x The center of the circle. + * @param y The center of the circle. + * @param radius The radius of the circle. + * @param callback The hit area callback. If undefined it uses Circle.Contains. + */ + setHitAreaCircle(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], x: number, y: number, radius: number, callback?: Phaser.Types.Input.HitAreaCallback): Phaser.Input.InputPlugin; + + /** + * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Ellipse` shape, using + * the given coordinates and dimensions to control its position and size. + * @param gameObjects An array of Game Objects to set as having an ellipse hit area. + * @param x The center of the ellipse. + * @param y The center of the ellipse. + * @param width The width of the ellipse. + * @param height The height of the ellipse. + * @param callback The hit area callback. If undefined it uses Ellipse.Contains. + */ + setHitAreaEllipse(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], x: number, y: number, width: number, height: number, callback?: Phaser.Types.Input.HitAreaCallback): Phaser.Input.InputPlugin; + + /** + * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Rectangle` shape, using + * the Game Objects texture frame to define the position and size of the hit area. + * @param gameObjects An array of Game Objects to set as having an ellipse hit area. + * @param callback The hit area callback. If undefined it uses Rectangle.Contains. + */ + setHitAreaFromTexture(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], callback?: Phaser.Types.Input.HitAreaCallback): Phaser.Input.InputPlugin; + + /** + * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Rectangle` shape, using + * the given coordinates and dimensions to control its position and size. + * @param gameObjects An array of Game Objects to set as having a rectangular hit area. + * @param x The top-left of the rectangle. + * @param y The top-left of the rectangle. + * @param width The width of the rectangle. + * @param height The height of the rectangle. + * @param callback The hit area callback. If undefined it uses Rectangle.Contains. + */ + setHitAreaRectangle(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], x: number, y: number, width: number, height: number, callback?: Phaser.Types.Input.HitAreaCallback): Phaser.Input.InputPlugin; + + /** + * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Triangle` shape, using + * the given coordinates to control the position of its points. + * @param gameObjects An array of Game Objects to set as having a triangular hit area. + * @param x1 The x coordinate of the first point of the triangle. + * @param y1 The y coordinate of the first point of the triangle. + * @param x2 The x coordinate of the second point of the triangle. + * @param y2 The y coordinate of the second point of the triangle. + * @param x3 The x coordinate of the third point of the triangle. + * @param y3 The y coordinate of the third point of the triangle. + * @param callback The hit area callback. If undefined it uses Triangle.Contains. + */ + setHitAreaTriangle(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, callback?: Phaser.Types.Input.HitAreaCallback): Phaser.Input.InputPlugin; + + /** + * Creates an Input Debug Shape for the given Game Object. + * + * The Game Object must have _already_ been enabled for input prior to calling this method. + * + * This is intended to assist you during development and debugging. + * + * Debug Shapes can only be created for Game Objects that are using standard Phaser Geometry for input, + * including: Circle, Ellipse, Line, Polygon, Rectangle and Triangle. + * + * Game Objects that are using their automatic hit areas are using Rectangles by default, so will also work. + * + * The Debug Shape is created and added to the display list and is then kept in sync with the Game Object + * it is connected with. Should you need to modify it yourself, such as to hide it, you can access it via + * the Game Object property: `GameObject.input.hitAreaDebug`. + * + * Calling this method on a Game Object that already has a Debug Shape will first destroy the old shape, + * before creating a new one. If you wish to remove the Debug Shape entirely, you should call the + * method `InputPlugin.removeDebug`. + * + * Note that the debug shape will only show the outline of the input area. If the input test is using a + * pixel perfect check, for example, then this is not displayed. If you are using a custom shape, that + * doesn't extend one of the base Phaser Geometry objects, as your hit area, then this method will not + * work. + * @param gameObject The Game Object to create the input debug shape for. + * @param color The outline color of the debug shape. Default 0x00ff00. + */ + enableDebug(gameObject: Phaser.GameObjects.GameObject, color?: number): Phaser.Input.InputPlugin; + + /** + * Removes an Input Debug Shape from the given Game Object. + * + * The shape is destroyed immediately and the `hitAreaDebug` property is set to `null`. + * @param gameObject The Game Object to remove the input debug shape from. + */ + removeDebug(gameObject: Phaser.GameObjects.GameObject): Phaser.Input.InputPlugin; + + /** + * Sets the Pointers to always poll. + * + * When a pointer is polled it runs a hit test to see which Game Objects are currently below it, + * or being interacted with it, regardless if the Pointer has actually moved or not. + * + * You should enable this if you want objects in your game to fire over / out events, and the objects + * are constantly moving, but the pointer may not have. Polling every frame has additional computation + * costs, especially if there are a large number of interactive objects in your game. + */ + setPollAlways(): Phaser.Input.InputPlugin; + + /** + * Sets the Pointers to only poll when they are moved or updated. + * + * When a pointer is polled it runs a hit test to see which Game Objects are currently below it, + * or being interacted with it. + */ + setPollOnMove(): Phaser.Input.InputPlugin; + + /** + * Sets the poll rate value. This is the amount of time that should have elapsed before a pointer + * will be polled again. See the `setPollAlways` and `setPollOnMove` methods. + * @param value The amount of time, in ms, that should elapsed before re-polling the pointers. + */ + setPollRate(value: number): Phaser.Input.InputPlugin; + + /** + * When set to `true` the global Input Manager will emulate DOM behavior by only emitting events from + * the top-most Scene in the Scene List. By default, if a Scene receives an input event it will then stop the event + * from flowing down to any Scenes below it in the Scene list. To disable this behavior call this method with `false`. + * @param value Set to `true` to stop processing input events on the Scene that receives it, or `false` to let the event continue down the Scene list. + */ + setGlobalTopOnly(value: boolean): Phaser.Input.InputPlugin; + + /** + * When set to `true` this Input Plugin will emulate DOM behavior by only emitting events from + * the top-most Game Objects in the Display List. + * + * If set to `false` it will emit events from all Game Objects below a Pointer, not just the top one. + * @param value `true` to only include the top-most Game Object, or `false` to include all Game Objects in a hit test. + */ + setTopOnly(value: boolean): Phaser.Input.InputPlugin; + + /** + * Given an array of Game Objects, sort the array and return it, so that the objects are in depth index order + * with the lowest at the bottom. + * @param gameObjects An array of Game Objects to be sorted. + */ + sortGameObjects(gameObjects: Phaser.GameObjects.GameObject[]): Phaser.GameObjects.GameObject[]; + + /** + * This method should be called from within an input event handler, such as `pointerdown`. + * + * When called, it stops the Input Manager from allowing _this specific event_ to be processed by any other Scene + * not yet handled in the scene list. + */ + stopPropagation(): Phaser.Input.InputPlugin; + + /** + * Adds new Pointer objects to the Input Manager. + * + * By default Phaser creates 2 pointer objects: `mousePointer` and `pointer1`. + * + * You can create more either by calling this method, or by setting the `input.activePointers` property + * in the Game Config, up to a maximum of 10 pointers. + * + * The first 10 pointers are available via the `InputPlugin.pointerX` properties, once they have been added + * via this method. + * @param quantity The number of new Pointers to create. A maximum of 10 is allowed in total. Default 1. + */ + addPointer(quantity?: integer): Phaser.Input.Pointer[]; + + /** + * Tells the Input system to set a custom cursor. + * + * This cursor will be the default cursor used when interacting with the game canvas. + * + * If an Interactive Object also sets a custom cursor, this is the cursor that is reset after its use. + * + * Any valid CSS cursor value is allowed, including paths to image files, i.e.: + * + * ```javascript + * this.input.setDefaultCursor('url(assets/cursors/sword.cur), pointer'); + * ``` + * + * Please read about the differences between browsers when it comes to the file formats and sizes they support: + * + * https://developer.mozilla.org/en-US/docs/Web/CSS/cursor + * https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_User_Interface/Using_URL_values_for_the_cursor_property + * + * It's up to you to pick a suitable cursor format that works across the range of browsers you need to support. + * @param cursor The CSS to be used when setting the default cursor. + */ + setDefaultCursor(cursor: string): Phaser.Input.InputPlugin; + + /** + * The x coordinates of the ActivePointer based on the first camera in the camera list. + * This is only safe to use if your game has just 1 non-transformed camera and doesn't use multi-touch. + */ + readonly x: number; + + /** + * The y coordinates of the ActivePointer based on the first camera in the camera list. + * This is only safe to use if your game has just 1 non-transformed camera and doesn't use multi-touch. + */ + readonly y: number; + + /** + * Are any mouse or touch pointers currently over the game canvas? + */ + readonly isOver: boolean; + + /** + * The mouse has its own unique Pointer object, which you can reference directly if making a _desktop specific game_. + * If you are supporting both desktop and touch devices then do not use this property, instead use `activePointer` + * which will always map to the most recently interacted pointer. + */ + readonly mousePointer: Phaser.Input.Pointer; + + /** + * The current active input Pointer. + */ + readonly activePointer: Phaser.Input.Pointer; + + /** + * A touch-based Pointer object. + * This will be `undefined` by default unless you add a new Pointer using `addPointer`. + */ + readonly pointer1: Phaser.Input.Pointer; + + /** + * A touch-based Pointer object. + * This will be `undefined` by default unless you add a new Pointer using `addPointer`. + */ + readonly pointer2: Phaser.Input.Pointer; + + /** + * A touch-based Pointer object. + * This will be `undefined` by default unless you add a new Pointer using `addPointer`. + */ + readonly pointer3: Phaser.Input.Pointer; + + /** + * A touch-based Pointer object. + * This will be `undefined` by default unless you add a new Pointer using `addPointer`. + */ + readonly pointer4: Phaser.Input.Pointer; + + /** + * A touch-based Pointer object. + * This will be `undefined` by default unless you add a new Pointer using `addPointer`. + */ + readonly pointer5: Phaser.Input.Pointer; + + /** + * A touch-based Pointer object. + * This will be `undefined` by default unless you add a new Pointer using `addPointer`. + */ + readonly pointer6: Phaser.Input.Pointer; + + /** + * A touch-based Pointer object. + * This will be `undefined` by default unless you add a new Pointer using `addPointer`. + */ + readonly pointer7: Phaser.Input.Pointer; + + /** + * A touch-based Pointer object. + * This will be `undefined` by default unless you add a new Pointer using `addPointer`. + */ + readonly pointer8: Phaser.Input.Pointer; + + /** + * A touch-based Pointer object. + * This will be `undefined` by default unless you add a new Pointer using `addPointer`. + */ + readonly pointer9: Phaser.Input.Pointer; + + /** + * A touch-based Pointer object. + * This will be `undefined` by default unless you add a new Pointer using `addPointer`. + */ + readonly pointer10: Phaser.Input.Pointer; + + /** + * An instance of the Keyboard Plugin class, if enabled via the `input.keyboard` Scene or Game Config property. + * Use this to create Key objects and listen for keyboard specific events. + */ + keyboard: Phaser.Input.Keyboard.KeyboardPlugin; + + } + + namespace InputPluginCache { + /** + * Static method called directly by the Core internal Plugins. + * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin) + * Plugin is the object to instantiate to create the plugin + * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input) + * @param key A reference used to get this plugin from the plugin cache. + * @param plugin The plugin to be stored. Should be the core object, not instantiated. + * @param mapping If this plugin is to be injected into the Input Plugin, this is the property key used. + * @param settingsKey The key in the Scene Settings to check to see if this plugin should install or not. + * @param configKey The key in the Game Config to check to see if this plugin should install or not. + */ + function register(key: string, plugin: Function, mapping: string, settingsKey: string, configKey: string): void; + + /** + * Returns the input plugin object from the cache based on the given key. + * @param key The key of the input plugin to get. + */ + function getCore(key: string): Phaser.Types.Input.InputPluginContainer; + + /** + * Installs all of the registered Input Plugins into the given target. + * @param target The target InputPlugin to install the plugins into. + */ + function install(target: Phaser.Input.InputPlugin): void; + + /** + * Removes an input plugin based on the given key. + * @param key The key of the input plugin to remove. + */ + function remove(key: string): void; + + } + + namespace Keyboard { + /** + * A KeyCombo will listen for a specific string of keys from the Keyboard, and when it receives them + * it will emit a `keycombomatch` event from the Keyboard Manager. + * + * The keys to be listened for can be defined as: + * + * A string (i.e. 'ATARI') + * An array of either integers (key codes) or strings, or a mixture of both + * An array of objects (such as Key objects) with a public 'keyCode' property + * + * For example, to listen for the Konami code (up, up, down, down, left, right, left, right, b, a, enter) + * you could pass the following array of key codes: + * + * ```javascript + * this.input.keyboard.createCombo([ 38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 13 ], { resetOnMatch: true }); + * + * this.input.keyboard.on('keycombomatch', function (event) { + * console.log('Konami Code entered!'); + * }); + * ``` + * + * Or, to listen for the user entering the word PHASER: + * + * ```javascript + * this.input.keyboard.createCombo('PHASER'); + * ``` + */ + class KeyCombo { /** - * Tatar SNES USB Controller Gamepad Configuration. - * USB Gamepad (STANDARD GAMEPAD Vendor: 0079 Product: 0011) + * + * @param keyboardPlugin A reference to the Keyboard Plugin. + * @param keys The keys that comprise this combo. + * @param config A Key Combo configuration object. */ - var SNES_USB: object; + constructor(keyboardPlugin: Phaser.Input.Keyboard.KeyboardPlugin, keys: string | integer[] | object[], config?: Phaser.Types.Input.Keyboard.KeyComboConfig); /** - * PlayStation DualShock 4 Gamepad Configuration. - * Sony PlayStation DualShock 4 (v2) wireless controller + * A reference to the Keyboard Manager */ - var DUALSHOCK_4: object; + manager: Phaser.Input.Keyboard.KeyboardPlugin; /** - * XBox 360 Gamepad Configuration. + * A flag that controls if this Key Combo is actively processing keys or not. */ - var XBOX_360: object; + enabled: boolean; + + /** + * An array of the keycodes that comprise this combo. + */ + keyCodes: any[]; + + /** + * The current keyCode the combo is waiting for. + */ + current: integer; + + /** + * The current index of the key being waited for in the 'keys' string. + */ + index: integer; + + /** + * The length of this combo (in keycodes) + */ + size: number; + + /** + * The time the previous key in the combo was matched. + */ + timeLastMatched: number; + + /** + * Has this Key Combo been matched yet? + */ + matched: boolean; + + /** + * The time the entire combo was matched. + */ + timeMatched: number; + + /** + * If they press the wrong key do we reset the combo? + */ + resetOnWrongKey: boolean; + + /** + * The max delay in ms between each key press. Above this the combo is reset. 0 means disabled. + */ + maxKeyDelay: integer; + + /** + * If previously matched and they press the first key of the combo again, will it reset? + */ + resetOnMatch: boolean; + + /** + * If the combo matches, will it delete itself? + */ + deleteOnMatch: boolean; + + /** + * How far complete is this combo? A value between 0 and 1. + */ + readonly progress: number; + + /** + * Destroys this Key Combo and all of its references. + */ + destroy(): void; } namespace Events { /** - * The Gamepad Button Down Event. + * The Global Key Down Event. * - * This event is dispatched by the Gamepad Plugin when a button has been pressed on any active Gamepad. + * This event is dispatched by the Keyboard Plugin when any key on the keyboard is pressed down. * - * Listen to this event from within a Scene using: `this.input.gamepad.on('down', listener)`. + * Listen to this event from within a Scene using: `this.input.keyboard.on('keydown', listener)`. * - * You can also listen for a DOWN event from a Gamepad instance. See the [GAMEPAD_BUTTON_DOWN]{@linkcode Phaser.Input.Gamepad.Events#event:GAMEPAD_BUTTON_DOWN} event for details. + * You can also listen for a specific key being pressed. See [Keyboard.Events.KEY_DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:KEY_DOWN} for details. + * + * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:DOWN} for details. + * + * _Note_: Many keyboards are unable to process certain combinations of keys due to hardware limitations known as ghosting. + * Read [this article on ghosting]{@link http://www.html5gamedevs.com/topic/4876-impossible-to-use-more-than-2-keyboard-input-buttons-at-the-same-time/} for details. + * + * Also, please be aware that some browser extensions can disable or override Phaser keyboard handling. + * For example, the Chrome extension vimium is known to disable Phaser from using the D key, while EverNote disables the backtick key. + * There are others. So, please check your extensions if you find you have specific keys that don't work. */ - const BUTTON_DOWN: any; + const ANY_KEY_DOWN: any; /** - * The Gamepad Button Up Event. + * The Global Key Up Event. * - * This event is dispatched by the Gamepad Plugin when a button has been released on any active Gamepad. + * This event is dispatched by the Keyboard Plugin when any key on the keyboard is released. * - * Listen to this event from within a Scene using: `this.input.gamepad.on('up', listener)`. + * Listen to this event from within a Scene using: `this.input.keyboard.on('keyup', listener)`. * - * You can also listen for an UP event from a Gamepad instance. See the [GAMEPAD_BUTTON_UP]{@linkcode Phaser.Input.Gamepad.Events#event:GAMEPAD_BUTTON_UP} event for details. + * You can also listen for a specific key being released. See [Keyboard.Events.KEY_UP]{@linkcode Phaser.Input.Keyboard.Events#event:KEY_UP} for details. + * + * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.UP]{@linkcode Phaser.Input.Keyboard.Events#event:UP} for details. */ - const BUTTON_UP: any; + const ANY_KEY_UP: any; /** - * The Gamepad Connected Event. + * The Key Combo Match Event. * - * This event is dispatched by the Gamepad Plugin when a Gamepad has been connected. + * This event is dispatched by the Keyboard Plugin when a [Key Combo]{@link Phaser.Input.Keyboard.KeyCombo} is matched. * - * Listen to this event from within a Scene using: `this.input.gamepad.once('connected', listener)`. + * Listen for this event from the Key Plugin after a combo has been created: * - * Note that the browser may require you to press a button on a gamepad before it will allow you to access it, - * this is for security reasons. However, it may also trust the page already, in which case you won't get the - * 'connected' event and instead should check `GamepadPlugin.total` to see if it thinks there are any gamepads - * already connected. + * ```javascript + * this.input.keyboard.createCombo([ 38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 13 ], { resetOnMatch: true }); + * + * this.input.keyboard.on('keycombomatch', function (event) { + * console.log('Konami Code entered!'); + * }); + * ``` */ - const CONNECTED: any; + const COMBO_MATCH: any; /** - * The Gamepad Disconnected Event. + * The Key Down Event. * - * This event is dispatched by the Gamepad Plugin when a Gamepad has been disconnected. + * This event is dispatched by a [Key]{@link Phaser.Input.Keyboard.Key} object when it is pressed. * - * Listen to this event from within a Scene using: `this.input.gamepad.once('disconnected', listener)`. + * Listen for this event from the Key object instance directly: + * + * ```javascript + * var spaceBar = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.SPACE); + * + * spaceBar.on('down', listener) + * ``` + * + * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_DOWN} for details. */ - const DISCONNECTED: any; + const DOWN: any; /** - * The Gamepad Button Down Event. + * The Key Down Event. * - * This event is dispatched by a Gamepad instance when a button has been pressed on it. + * This event is dispatched by the Keyboard Plugin when any key on the keyboard is pressed down. * - * Listen to this event from a Gamepad instance. Once way to get this is from the `pad1`, `pad2`, etc properties on the Gamepad Plugin: - * `this.input.gamepad.pad1.on('down', listener)`. + * Unlike the `ANY_KEY_DOWN` event, this one has a special dynamic event name. For example, to listen for the `A` key being pressed + * use the following from within a Scene: `this.input.keyboard.on('keydown-A', listener)`. You can replace the `-A` part of the event + * name with any valid [Key Code string]{@link Phaser.Input.Keyboard.KeyCodes}. For example, this will listen for the space bar: + * `this.input.keyboard.on('keydown-SPACE', listener)`. * - * Note that you will not receive any Gamepad button events until the browser considers the Gamepad as being 'connected'. + * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_DOWN} for details. * - * You can also listen for a DOWN event from the Gamepad Plugin. See the [BUTTON_DOWN]{@linkcode Phaser.Input.Gamepad.Events#event:BUTTON_DOWN} event for details. + * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:DOWN} for details. + * + * _Note_: Many keyboards are unable to process certain combinations of keys due to hardware limitations known as ghosting. + * Read [this article on ghosting]{@link http://www.html5gamedevs.com/topic/4876-impossible-to-use-more-than-2-keyboard-input-buttons-at-the-same-time/} for details. + * + * Also, please be aware that some browser extensions can disable or override Phaser keyboard handling. + * For example, the Chrome extension vimium is known to disable Phaser from using the D key, while EverNote disables the backtick key. + * There are others. So, please check your extensions if you find you have specific keys that don't work. */ - const GAMEPAD_BUTTON_DOWN: any; + const KEY_DOWN: any; /** - * The Gamepad Button Up Event. + * The Key Up Event. * - * This event is dispatched by a Gamepad instance when a button has been released on it. + * This event is dispatched by the Keyboard Plugin when any key on the keyboard is released. * - * Listen to this event from a Gamepad instance. Once way to get this is from the `pad1`, `pad2`, etc properties on the Gamepad Plugin: - * `this.input.gamepad.pad1.on('up', listener)`. + * Unlike the `ANY_KEY_UP` event, this one has a special dynamic event name. For example, to listen for the `A` key being released + * use the following from within a Scene: `this.input.keyboard.on('keyup-A', listener)`. You can replace the `-A` part of the event + * name with any valid [Key Code string]{@link Phaser.Input.Keyboard.KeyCodes}. For example, this will listen for the space bar: + * `this.input.keyboard.on('keyup-SPACE', listener)`. * - * Note that you will not receive any Gamepad button events until the browser considers the Gamepad as being 'connected'. + * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_UP]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_UP} for details. * - * You can also listen for an UP event from the Gamepad Plugin. See the [BUTTON_UP]{@linkcode Phaser.Input.Gamepad.Events#event:BUTTON_UP} event for details. + * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.UP]{@linkcode Phaser.Input.Keyboard.Events#event:UP} for details. */ - const GAMEPAD_BUTTON_UP: any; + const KEY_UP: any; + + /** + * The Key Up Event. + * + * This event is dispatched by a [Key]{@link Phaser.Input.Keyboard.Key} object when it is released. + * + * Listen for this event from the Key object instance directly: + * + * ```javascript + * var spaceBar = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.SPACE); + * + * spaceBar.on('up', listener) + * ``` + * + * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_UP]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_UP} for details. + */ + const UP: any; } - } - - namespace Keyboard { /** * The Keyboard Manager is a helper class that belongs to the global Input Manager. * @@ -43107,245 +43259,6 @@ declare namespace Phaser { } - /** - * A KeyCombo will listen for a specific string of keys from the Keyboard, and when it receives them - * it will emit a `keycombomatch` event from the Keyboard Manager. - * - * The keys to be listened for can be defined as: - * - * A string (i.e. 'ATARI') - * An array of either integers (key codes) or strings, or a mixture of both - * An array of objects (such as Key objects) with a public 'keyCode' property - * - * For example, to listen for the Konami code (up, up, down, down, left, right, left, right, b, a, enter) - * you could pass the following array of key codes: - * - * ```javascript - * this.input.keyboard.createCombo([ 38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 13 ], { resetOnMatch: true }); - * - * this.input.keyboard.on('keycombomatch', function (event) { - * console.log('Konami Code entered!'); - * }); - * ``` - * - * Or, to listen for the user entering the word PHASER: - * - * ```javascript - * this.input.keyboard.createCombo('PHASER'); - * ``` - */ - class KeyCombo { - /** - * - * @param keyboardPlugin A reference to the Keyboard Plugin. - * @param keys The keys that comprise this combo. - * @param config A Key Combo configuration object. - */ - constructor(keyboardPlugin: Phaser.Input.Keyboard.KeyboardPlugin, keys: string | integer[] | object[], config?: Phaser.Types.Input.Keyboard.KeyComboConfig); - - /** - * A reference to the Keyboard Manager - */ - manager: Phaser.Input.Keyboard.KeyboardPlugin; - - /** - * A flag that controls if this Key Combo is actively processing keys or not. - */ - enabled: boolean; - - /** - * An array of the keycodes that comprise this combo. - */ - keyCodes: any[]; - - /** - * The current keyCode the combo is waiting for. - */ - current: integer; - - /** - * The current index of the key being waited for in the 'keys' string. - */ - index: integer; - - /** - * The length of this combo (in keycodes) - */ - size: number; - - /** - * The time the previous key in the combo was matched. - */ - timeLastMatched: number; - - /** - * Has this Key Combo been matched yet? - */ - matched: boolean; - - /** - * The time the entire combo was matched. - */ - timeMatched: number; - - /** - * If they press the wrong key do we reset the combo? - */ - resetOnWrongKey: boolean; - - /** - * The max delay in ms between each key press. Above this the combo is reset. 0 means disabled. - */ - maxKeyDelay: integer; - - /** - * If previously matched and they press the first key of the combo again, will it reset? - */ - resetOnMatch: boolean; - - /** - * If the combo matches, will it delete itself? - */ - deleteOnMatch: boolean; - - /** - * How far complete is this combo? A value between 0 and 1. - */ - readonly progress: number; - - /** - * Destroys this Key Combo and all of its references. - */ - destroy(): void; - - } - - namespace Events { - /** - * The Global Key Down Event. - * - * This event is dispatched by the Keyboard Plugin when any key on the keyboard is pressed down. - * - * Listen to this event from within a Scene using: `this.input.keyboard.on('keydown', listener)`. - * - * You can also listen for a specific key being pressed. See [Keyboard.Events.KEY_DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:KEY_DOWN} for details. - * - * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:DOWN} for details. - * - * _Note_: Many keyboards are unable to process certain combinations of keys due to hardware limitations known as ghosting. - * Read [this article on ghosting]{@link http://www.html5gamedevs.com/topic/4876-impossible-to-use-more-than-2-keyboard-input-buttons-at-the-same-time/} for details. - * - * Also, please be aware that some browser extensions can disable or override Phaser keyboard handling. - * For example, the Chrome extension vimium is known to disable Phaser from using the D key, while EverNote disables the backtick key. - * There are others. So, please check your extensions if you find you have specific keys that don't work. - */ - const ANY_KEY_DOWN: any; - - /** - * The Global Key Up Event. - * - * This event is dispatched by the Keyboard Plugin when any key on the keyboard is released. - * - * Listen to this event from within a Scene using: `this.input.keyboard.on('keyup', listener)`. - * - * You can also listen for a specific key being released. See [Keyboard.Events.KEY_UP]{@linkcode Phaser.Input.Keyboard.Events#event:KEY_UP} for details. - * - * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.UP]{@linkcode Phaser.Input.Keyboard.Events#event:UP} for details. - */ - const ANY_KEY_UP: any; - - /** - * The Key Combo Match Event. - * - * This event is dispatched by the Keyboard Plugin when a [Key Combo]{@link Phaser.Input.Keyboard.KeyCombo} is matched. - * - * Listen for this event from the Key Plugin after a combo has been created: - * - * ```javascript - * this.input.keyboard.createCombo([ 38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 13 ], { resetOnMatch: true }); - * - * this.input.keyboard.on('keycombomatch', function (event) { - * console.log('Konami Code entered!'); - * }); - * ``` - */ - const COMBO_MATCH: any; - - /** - * The Key Down Event. - * - * This event is dispatched by a [Key]{@link Phaser.Input.Keyboard.Key} object when it is pressed. - * - * Listen for this event from the Key object instance directly: - * - * ```javascript - * var spaceBar = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.SPACE); - * - * spaceBar.on('down', listener) - * ``` - * - * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_DOWN} for details. - */ - const DOWN: any; - - /** - * The Key Down Event. - * - * This event is dispatched by the Keyboard Plugin when any key on the keyboard is pressed down. - * - * Unlike the `ANY_KEY_DOWN` event, this one has a special dynamic event name. For example, to listen for the `A` key being pressed - * use the following from within a Scene: `this.input.keyboard.on('keydown-A', listener)`. You can replace the `-A` part of the event - * name with any valid [Key Code string]{@link Phaser.Input.Keyboard.KeyCodes}. For example, this will listen for the space bar: - * `this.input.keyboard.on('keydown-SPACE', listener)`. - * - * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_DOWN} for details. - * - * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:DOWN} for details. - * - * _Note_: Many keyboards are unable to process certain combinations of keys due to hardware limitations known as ghosting. - * Read [this article on ghosting]{@link http://www.html5gamedevs.com/topic/4876-impossible-to-use-more-than-2-keyboard-input-buttons-at-the-same-time/} for details. - * - * Also, please be aware that some browser extensions can disable or override Phaser keyboard handling. - * For example, the Chrome extension vimium is known to disable Phaser from using the D key, while EverNote disables the backtick key. - * There are others. So, please check your extensions if you find you have specific keys that don't work. - */ - const KEY_DOWN: any; - - /** - * The Key Up Event. - * - * This event is dispatched by the Keyboard Plugin when any key on the keyboard is released. - * - * Unlike the `ANY_KEY_UP` event, this one has a special dynamic event name. For example, to listen for the `A` key being released - * use the following from within a Scene: `this.input.keyboard.on('keyup-A', listener)`. You can replace the `-A` part of the event - * name with any valid [Key Code string]{@link Phaser.Input.Keyboard.KeyCodes}. For example, this will listen for the space bar: - * `this.input.keyboard.on('keyup-SPACE', listener)`. - * - * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_UP]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_UP} for details. - * - * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.UP]{@linkcode Phaser.Input.Keyboard.Events#event:UP} for details. - */ - const KEY_UP: any; - - /** - * The Key Up Event. - * - * This event is dispatched by a [Key]{@link Phaser.Input.Keyboard.Key} object when it is released. - * - * Listen for this event from the Key object instance directly: - * - * ```javascript - * var spaceBar = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.SPACE); - * - * spaceBar.on('up', listener) - * ``` - * - * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_UP]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_UP} for details. - */ - const UP: any; - - } - /** * Returns `true` if the Key was pressed down within the `duration` value given, based on the current * game clock time. Or `false` if it either isn't down, or was pressed down longer ago than the given duration. @@ -44180,6 +44093,468 @@ declare namespace Phaser { } + /** + * A Pointer object encapsulates both mouse and touch input within Phaser. + * + * By default, Phaser will create 2 pointers for your game to use. If you require more, i.e. for a multi-touch + * game, then use the `InputPlugin.addPointer` method to do so, rather than instantiating this class directly, + * otherwise it won't be managed by the input system. + * + * You can reference the current active pointer via `InputPlugin.activePointer`. You can also use the properties + * `InputPlugin.pointer1` through to `pointer10`, for each pointer you have enabled in your game. + * + * The properties of this object are set by the Input Plugin during processing. This object is then sent in all + * input related events that the Input Plugin emits, so you can reference properties from it directly in your + * callbacks. + */ + class Pointer { + /** + * + * @param manager A reference to the Input Manager. + * @param id The internal ID of this Pointer. + */ + constructor(manager: Phaser.Input.InputManager, id: integer); + + /** + * A reference to the Input Manager. + */ + manager: Phaser.Input.InputManager; + + /** + * The internal ID of this Pointer. + */ + readonly id: integer; + + /** + * The most recent native DOM Event this Pointer has processed. + */ + event: TouchEvent | MouseEvent; + + /** + * The DOM element the Pointer was pressed down on, taken from the DOM event. + * In a default set-up this will be the Canvas that Phaser is rendering to, or the Window element. + */ + readonly downElement: any; + + /** + * The DOM element the Pointer was released on, taken from the DOM event. + * In a default set-up this will be the Canvas that Phaser is rendering to, or the Window element. + */ + readonly upElement: any; + + /** + * The camera the Pointer interacted with during its last update. + * + * A Pointer can only ever interact with one camera at once, which will be the top-most camera + * in the list should multiple cameras be positioned on-top of each other. + */ + camera: Phaser.Cameras.Scene2D.Camera; + + /** + * A read-only property that indicates which button was pressed, or released, on the pointer + * during the most recent event. It is only set during `up` and `down` events. + * + * On Touch devices the value is always 0. + * + * Users may change the configuration of buttons on their pointing device so that if an event's button property + * is zero, it may not have been caused by the button that is physically left–most on the pointing device; + * however, it should behave as if the left button was clicked in the standard button layout. + */ + readonly button: integer; + + /** + * 0: No button or un-initialized + * 1: Left button + * 2: Right button + * 4: Wheel button or middle button + * 8: 4th button (typically the "Browser Back" button) + * 16: 5th button (typically the "Browser Forward" button) + * + * For a mouse configured for left-handed use, the button actions are reversed. + * In this case, the values are read from right to left. + */ + buttons: integer; + + /** + * The position of the Pointer in screen space. + */ + readonly position: Phaser.Math.Vector2; + + /** + * The previous position of the Pointer in screen space. + * + * The old x and y values are stored in here during the InputManager.transformPointer call. + * + * Use the properties `velocity`, `angle` and `distance` to create your own gesture recognition. + */ + readonly prevPosition: Phaser.Math.Vector2; + + /** + * The current velocity of the Pointer, based on its current and previous positions. + * + * This value is smoothed out each frame, according to the `motionFactor` property. + * + * This property is updated whenever the Pointer moves, regardless of any button states. In other words, + * it changes based on movement alone - a button doesn't have to be pressed first. + */ + readonly velocity: Phaser.Math.Vector2; + + /** + * The current angle the Pointer is moving, in radians, based on its previous and current position. + * + * The angle is based on the old position facing to the current position. + * + * This property is updated whenever the Pointer moves, regardless of any button states. In other words, + * it changes based on movement alone - a button doesn't have to be pressed first. + */ + readonly angle: number; + + /** + * The distance the Pointer has moved, based on its previous and current position. + * + * This value is smoothed out each frame, according to the `motionFactor` property. + * + * This property is updated whenever the Pointer moves, regardless of any button states. In other words, + * it changes based on movement alone - a button doesn't have to be pressed first. + * + * If you need the total distance travelled since the primary buttons was pressed down, + * then use the `Pointer.getDistance` method. + */ + readonly distance: number; + + /** + * The smoothing factor to apply to the Pointer position. + * + * Due to their nature, pointer positions are inherently noisy. While this is fine for lots of games, if you need cleaner positions + * then you can set this value to apply an automatic smoothing to the positions as they are recorded. + * + * The default value of zero means 'no smoothing'. + * Set to a small value, such as 0.2, to apply an average level of smoothing between positions. You can do this by changing this + * value directly, or by setting the `input.smoothFactor` property in the Game Config. + * + * Positions are only smoothed when the pointer moves. If the primary button on this Pointer enters an Up or Down state, then the position + * is always precise, and not smoothed. + */ + smoothFactor: number; + + /** + * The factor applied to the motion smoothing each frame. + * + * This value is passed to the Smooth Step Interpolation that is used to calculate the velocity, + * angle and distance of the Pointer. It's applied every frame, until the midPoint reaches the current + * position of the Pointer. 0.2 provides a good average but can be increased if you need a + * quicker update and are working in a high performance environment. Never set this value to + * zero. + */ + motionFactor: number; + + /** + * The x position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with. + * + * If you wish to use this value _outside_ of an input event handler then you should update it first by calling + * the `Pointer.updateWorldPoint` method. + */ + worldX: number; + + /** + * The y position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with. + * + * If you wish to use this value _outside_ of an input event handler then you should update it first by calling + * the `Pointer.updateWorldPoint` method. + */ + worldY: number; + + /** + * Time when this Pointer was most recently moved (regardless of the state of its buttons, if any) + */ + moveTime: number; + + /** + * X coordinate of the Pointer when Button 1 (left button), or Touch, was pressed, used for dragging objects. + */ + downX: number; + + /** + * Y coordinate of the Pointer when Button 1 (left button), or Touch, was pressed, used for dragging objects. + */ + downY: number; + + /** + * Time when Button 1 (left button), or Touch, was pressed, used for dragging objects. + */ + downTime: number; + + /** + * X coordinate of the Pointer when Button 1 (left button), or Touch, was released, used for dragging objects. + */ + upX: number; + + /** + * Y coordinate of the Pointer when Button 1 (left button), or Touch, was released, used for dragging objects. + */ + upY: number; + + /** + * Time when Button 1 (left button), or Touch, was released, used for dragging objects. + */ + upTime: number; + + /** + * Is the primary button down? (usually button 0, the left mouse button) + */ + primaryDown: boolean; + + /** + * Is _any_ button on this pointer considered as being down? + */ + isDown: boolean; + + /** + * Did the previous input event come from a Touch input (true) or Mouse? (false) + */ + wasTouch: boolean; + + /** + * Did this Pointer get canceled by a touchcancel event? + * + * Note: "canceled" is the American-English spelling of "cancelled". Please don't submit PRs correcting it! + */ + wasCanceled: boolean; + + /** + * If the mouse is locked, the horizontal relative movement of the Pointer in pixels since last frame. + */ + movementX: number; + + /** + * If the mouse is locked, the vertical relative movement of the Pointer in pixels since last frame. + */ + movementY: number; + + /** + * The identifier property of the Pointer as set by the DOM event when this Pointer is started. + */ + identifier: number; + + /** + * The pointerId property of the Pointer as set by the DOM event when this Pointer is started. + * The browser can and will recycle this value. + */ + pointerId: number; + + /** + * An active Pointer is one that is currently pressed down on the display. + * A Mouse is always considered as active. + */ + active: boolean; + + /** + * Is this pointer Pointer Locked? + * + * Only a mouse pointer can be locked and it only becomes locked when requested via + * the browsers Pointer Lock API. + * + * You can request this by calling the `this.input.mouse.requestPointerLock()` method from + * a `pointerdown` or `pointerup` event handler. + */ + readonly locked: boolean; + + /** + * The horizontal scroll amount that occurred due to the user moving a mouse wheel or similar input device. + */ + deltaX: number; + + /** + * The vertical scroll amount that occurred due to the user moving a mouse wheel or similar input device. + * This value will typically be less than 0 if the user scrolls up and greater than zero if scrolling down. + */ + deltaY: number; + + /** + * The z-axis scroll amount that occurred due to the user moving a mouse wheel or similar input device. + */ + deltaZ: number; + + /** + * Takes a Camera and updates this Pointer's `worldX` and `worldY` values so they are + * the result of a translation through the given Camera. + * + * Note that the values will be automatically replaced the moment the Pointer is + * updated by an input event, such as a mouse move, so should be used immediately. + * @param camera The Camera which is being tested against. + */ + updateWorldPoint(camera: Phaser.Cameras.Scene2D.Camera): this; + + /** + * Takes a Camera and returns a Vector2 containing the translated position of this Pointer + * within that Camera. This can be used to convert this Pointers position into camera space. + * @param camera The Camera to use for the translation. + * @param output A Vector2-like object in which to store the translated position. + */ + positionToCamera(camera: Phaser.Cameras.Scene2D.Camera, output?: Phaser.Math.Vector2 | object): Phaser.Math.Vector2 | object; + + /** + * Checks to see if any buttons are being held down on this Pointer. + */ + noButtonDown(): boolean; + + /** + * Checks to see if the left button is being held down on this Pointer. + */ + leftButtonDown(): boolean; + + /** + * Checks to see if the right button is being held down on this Pointer. + */ + rightButtonDown(): boolean; + + /** + * Checks to see if the middle button is being held down on this Pointer. + */ + middleButtonDown(): boolean; + + /** + * Checks to see if the back button is being held down on this Pointer. + */ + backButtonDown(): boolean; + + /** + * Checks to see if the forward button is being held down on this Pointer. + */ + forwardButtonDown(): boolean; + + /** + * Checks to see if the left button was just released on this Pointer. + */ + leftButtonReleased(): boolean; + + /** + * Checks to see if the right button was just released on this Pointer. + */ + rightButtonReleased(): boolean; + + /** + * Checks to see if the middle button was just released on this Pointer. + */ + middleButtonReleased(): boolean; + + /** + * Checks to see if the back button was just released on this Pointer. + */ + backButtonReleased(): boolean; + + /** + * Checks to see if the forward button was just released on this Pointer. + */ + forwardButtonReleased(): boolean; + + /** + * If the Pointer has a button pressed down at the time this method is called, it will return the + * distance between the Pointer's `downX` and `downY` values and the current position. + * + * If no button is held down, it will return the last recorded distance, based on where + * the Pointer was when the button was released. + * + * If you wish to get the distance being travelled currently, based on the velocity of the Pointer, + * then see the `Pointer.distance` property. + */ + getDistance(): number; + + /** + * If the Pointer has a button pressed down at the time this method is called, it will return the + * horizontal distance between the Pointer's `downX` and `downY` values and the current position. + * + * If no button is held down, it will return the last recorded horizontal distance, based on where + * the Pointer was when the button was released. + */ + getDistanceX(): number; + + /** + * If the Pointer has a button pressed down at the time this method is called, it will return the + * vertical distance between the Pointer's `downX` and `downY` values and the current position. + * + * If no button is held down, it will return the last recorded vertical distance, based on where + * the Pointer was when the button was released. + */ + getDistanceY(): number; + + /** + * If the Pointer has a button pressed down at the time this method is called, it will return the + * duration since the button was pressed down. + * + * If no button is held down, it will return the last recorded duration, based on the time + * the Pointer button was released. + */ + getDuration(): number; + + /** + * If the Pointer has a button pressed down at the time this method is called, it will return the + * angle between the Pointer's `downX` and `downY` values and the current position. + * + * If no button is held down, it will return the last recorded angle, based on where + * the Pointer was when the button was released. + * + * The angle is based on the old position facing to the current position. + * + * If you wish to get the current angle, based on the velocity of the Pointer, then + * see the `Pointer.angle` property. + */ + getAngle(): number; + + /** + * Takes the previous and current Pointer positions and then generates an array of interpolated values between + * the two. The array will be populated up to the size of the `steps` argument. + * + * ```javaScript + * var points = pointer.getInterpolatedPosition(4); + * + * // points[0] = { x: 0, y: 0 } + * // points[1] = { x: 2, y: 1 } + * // points[2] = { x: 3, y: 2 } + * // points[3] = { x: 6, y: 3 } + * ``` + * + * Use this if you need to get smoothed values between the previous and current pointer positions. DOM pointer + * events can often fire faster than the main browser loop, and this will help you avoid janky movement + * especially if you have an object following a Pointer. + * + * Note that if you provide an output array it will only be populated up to the number of steps provided. + * It will not clear any previous data that may have existed beyond the range of the steps count. + * + * Internally it uses the Smooth Step interpolation calculation. + * @param steps The number of interpolation steps to use. Default 10. + * @param out An array to store the results in. If not provided a new one will be created. + */ + getInterpolatedPosition(steps?: integer, out?: any[]): any[]; + + /** + * Destroys this Pointer instance and resets its external references. + */ + destroy(): void; + + /** + * The x position of this Pointer. + * The value is in screen space. + * See `worldX` to get a camera converted position. + */ + x: number; + + /** + * The y position of this Pointer. + * The value is in screen space. + * See `worldY` to get a camera converted position. + */ + y: number; + + /** + * Time when this Pointer was most recently updated by a DOM Event. + * This comes directly from the `event.timeStamp` property. + * If no event has yet taken place, it will return zero. + */ + readonly time: number; + + } + namespace Touch { /** * The Touch Manager is a helper class that belongs to the Input Manager. @@ -44307,6 +44682,214 @@ declare namespace Phaser { } namespace Loader { + /** + * The Loader is idle. + */ + var LOADER_IDLE: integer; + + /** + * The Loader is actively loading. + */ + var LOADER_LOADING: integer; + + /** + * The Loader is processing files is has loaded. + */ + var LOADER_PROCESSING: integer; + + /** + * The Loader has completed loading and processing. + */ + var LOADER_COMPLETE: integer; + + /** + * The Loader is shutting down. + */ + var LOADER_SHUTDOWN: integer; + + /** + * The Loader has been destroyed. + */ + var LOADER_DESTROYED: integer; + + /** + * File is in the load queue but not yet started + */ + var FILE_PENDING: integer; + + /** + * File has been started to load by the loader (onLoad called) + */ + var FILE_LOADING: integer; + + /** + * File has loaded successfully, awaiting processing + */ + var FILE_LOADED: integer; + + /** + * File failed to load + */ + var FILE_FAILED: integer; + + /** + * File is being processed (onProcess callback) + */ + var FILE_PROCESSING: integer; + + /** + * The File has errored somehow during processing. + */ + var FILE_ERRORED: integer; + + /** + * File has finished processing. + */ + var FILE_COMPLETE: integer; + + /** + * File has been destroyed + */ + var FILE_DESTROYED: integer; + + /** + * File was populated from local data and doesn't need an HTTP request + */ + var FILE_POPULATED: integer; + + namespace Events { + /** + * The Loader Plugin Add File Event. + * + * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue. + * + * Listen to it from a Scene using: `this.load.on('addfile', listener)`. + * + * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them. + */ + const ADD: any; + + /** + * The Loader Plugin Complete Event. + * + * This event is dispatched when the Loader has fully processed everything in the load queue. + * By this point every loaded file will now be in its associated cache and ready for use. + * + * Listen to it from a Scene using: `this.load.on('complete', listener)`. + */ + const COMPLETE: any; + + /** + * The File Load Complete Event. + * + * This event is dispatched by the Loader Plugin when any file in the queue finishes loading. + * + * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`. + * + * You can also listen for the completion of a specific file. See the [FILE_KEY_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_KEY_COMPLETE} event. + */ + const FILE_COMPLETE: any; + + /** + * The File Load Complete Event. + * + * This event is dispatched by the Loader Plugin when any file in the queue finishes loading. + * + * It uses a special dynamic event name constructed from the key and type of the file. + * + * For example, if you have loaded an `image` with a key of `monster`, you can listen for it + * using the following: + * + * ```javascript + * this.load.on('filecomplete-image-monster', function (key, type, data) { + * // Your handler code + * }); + * ``` + * + * Or, if you have loaded a texture `atlas` with a key of `Level1`: + * + * ```javascript + * this.load.on('filecomplete-atlas-Level1', function (key, type, data) { + * // Your handler code + * }); + * ``` + * + * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`: + * + * ```javascript + * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) { + * // Your handler code + * }); + * ``` + * + * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event. + */ + const FILE_KEY_COMPLETE: any; + + /** + * The File Load Error Event. + * + * This event is dispatched by the Loader Plugin when a file fails to load. + * + * Listen to it from a Scene using: `this.load.on('loaderror', listener)`. + */ + const FILE_LOAD_ERROR: any; + + /** + * The File Load Event. + * + * This event is dispatched by the Loader Plugin when a file finishes loading, + * but _before_ it is processed and added to the internal Phaser caches. + * + * Listen to it from a Scene using: `this.load.on('load', listener)`. + */ + const FILE_LOAD: any; + + /** + * The File Load Progress Event. + * + * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and + * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen. + * + * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`. + */ + const FILE_PROGRESS: any; + + /** + * The Loader Plugin Post Process Event. + * + * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue. + * It is dispatched before the internal lists are cleared and each File is destroyed. + * + * Use this hook to perform any last minute processing of files that can only happen once the + * Loader has completed, but prior to it emitting the `complete` event. + * + * Listen to it from a Scene using: `this.load.on('postprocess', listener)`. + */ + const POST_PROCESS: any; + + /** + * The Loader Plugin Progress Event. + * + * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading. + * + * Listen to it from a Scene using: `this.load.on('progress', listener)`. + */ + const PROGRESS: any; + + /** + * The Loader Plugin Start Event. + * + * This event is dispatched when the Loader starts running. At this point load progress is zero. + * + * This event is dispatched even if there aren't any files in the load queue. + * + * Listen to it from a Scene using: `this.load.on('start', listener)`. + */ + const START: any; + + } + /** * The base File class used by all File Types that the Loader can support. * You shouldn't create an instance of a File directly, but should extend it with your own class, setting a custom type and processing methods. @@ -44511,6 +45094,871 @@ declare namespace Phaser { } + namespace FileTypes { + /** + * A single Animation JSON File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#animation method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#animation. + */ + class AnimationJSONFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param xhrSettings Extra XHR Settings specifically for this file. + * @param dataKey When the JSON file loads only this property will be stored in the Cache. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.JSONFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject, dataKey?: string); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + /** + * Called at the end of the load process, after the Loader has finished all files in its queue. + */ + onLoadComplete(): void; + + } + + /** + * A single JSON based Texture Atlas File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#atlas method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#atlas. + * + * https://www.codeandweb.com/texturepacker/tutorials/how-to-create-sprite-sheets-for-phaser3?source=photonstorm + */ + class AtlasJSONFile extends Phaser.Loader.MultiFile { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param textureURL The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". + * @param atlasURL The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param textureXhrSettings An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings. + * @param atlasXhrSettings An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig, textureURL?: string | string[], atlasURL?: string, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * A single XML based Texture Atlas File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#atlasXML method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#atlasXML. + */ + class AtlasXMLFile extends Phaser.Loader.MultiFile { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param textureURL The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". + * @param atlasURL The absolute or relative URL to load the texture atlas xml data file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was "alien" then the URL will be "alien.xml". + * @param textureXhrSettings An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings. + * @param atlasXhrSettings An XHR Settings configuration object for the atlas xml file. Used in replacement of the Loaders default XHR Settings. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig, textureURL?: string | string[], atlasURL?: string, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * A single Audio File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#audio method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#audio. + */ + class AudioFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param urlConfig The absolute or relative URL to load this file from in a config object. + * @param xhrSettings Extra XHR Settings specifically for this file. + * @param audioContext The AudioContext this file will use to process itself. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.AudioFileConfig, urlConfig?: any, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject, audioContext?: AudioContext); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + /** + * An Audio Sprite File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#audioSprite method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#audioSprite. + */ + class AudioSpriteFile extends Phaser.Loader.MultiFile { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param jsonURL The absolute or relative URL to load the json file from. Or a well formed JSON object to use instead. + * @param audioURL The absolute or relative URL to load the audio file from. If empty it will be obtained by parsing the JSON file. + * @param audioConfig The audio configuration options. + * @param audioXhrSettings An XHR Settings configuration object for the audio file. Used in replacement of the Loaders default XHR Settings. + * @param jsonXhrSettings An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig, jsonURL: string, audioURL?: Object, audioConfig?: any, audioXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, jsonXhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called by each File when it finishes loading. + * @param file The File that has completed processing. + */ + onFileComplete(file: Phaser.Loader.File): void; + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * A single Binary File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#binary method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#binary. + */ + class BinaryFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.bin`, i.e. if `key` was "alien" then the URL will be "alien.bin". + * @param xhrSettings Extra XHR Settings specifically for this file. + * @param dataType Optional type to cast the binary file to once loaded. For example, `Uint8Array`. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.BinaryFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject, dataType?: any); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + /** + * A single Bitmap Font based File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#bitmapFont method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#bitmapFont. + */ + class BitmapFontFile extends Phaser.Loader.MultiFile { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param textureURL The absolute or relative URL to load the font image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". + * @param fontDataURL The absolute or relative URL to load the font xml data file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was "alien" then the URL will be "alien.xml". + * @param textureXhrSettings An XHR Settings configuration object for the font image file. Used in replacement of the Loaders default XHR Settings. + * @param fontDataXhrSettings An XHR Settings configuration object for the font data xml file. Used in replacement of the Loaders default XHR Settings. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.BitmapFontFileConfig, textureURL?: string | string[], fontDataURL?: string, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, fontDataXhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * A single CSS File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#css method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#css. + */ + class CSSFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was "alien" then the URL will be "alien.js". + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.CSSFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + /** + * A single GLSL File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#glsl method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#glsl. + */ + class GLSLFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". + * @param shaderType The type of shader. Either `fragment` for a fragment shader, or `vertex` for a vertex shader. This is ignored if you load a shader bundle. Default 'fragment'. + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.GLSLFileConfig, url?: string, shaderType?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + /** + * Returns the name of the shader from the header block. + * @param headerSource The header data. + */ + getShaderName(headerSource: string[]): string; + + /** + * Returns the type of the shader from the header block. + * @param headerSource The header data. + */ + getShaderType(headerSource: string[]): string; + + /** + * Returns the shader uniforms from the header block. + * @param headerSource The header data. + */ + getShaderUniforms(headerSource: string[]): any; + + } + + /** + * A single Audio File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#audio method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#audio. + */ + class HTML5AudioFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param urlConfig The absolute or relative URL to load this file from. + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.AudioFileConfig, urlConfig?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called when the file finishes loading. + */ + onLoad(): void; + + /** + * Called if the file errors while loading. + */ + onError(): void; + + /** + * Called during the file load progress. Is sent a DOM ProgressEvent. + */ + onProgress(): void; + + /** + * Called by the Loader, starts the actual file downloading. + * During the load the methods onLoad, onError and onProgress are called, based on the XHR events. + * You shouldn't normally call this method directly, it's meant to be invoked by the Loader. + */ + load(): void; + + } + + /** + * A single HTML File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#html method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#html. + */ + class HTMLFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was "alien" then the URL will be "alien.html". + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.HTMLFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + /** + * A single HTML File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#htmlTexture method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#htmlTexture. + */ + class HTMLTextureFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". + * @param width The width of the texture the HTML will be rendered to. + * @param height The height of the texture the HTML will be rendered to. + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig, url?: string, width?: integer, height?: integer, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * A single Image File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image. + */ + class ImageFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". + * @param xhrSettings Extra XHR Settings specifically for this file. + * @param frameConfig The frame configuration object. Only provided for, and used by, Sprite Sheets. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.ImageFileConfig, url?: string | string[], xhrSettings?: Phaser.Types.Loader.XHRSettingsObject, frameConfig?: Phaser.Types.Loader.FileTypes.ImageFrameConfig); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * A single JSON File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json. + */ + class JSONFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param xhrSettings Extra XHR Settings specifically for this file. + * @param dataKey When the JSON file loads only this property will be stored in the Cache. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.JSONFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject, dataKey?: string); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + /** + * A single Multi Texture Atlas File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#multiatlas method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#multiatlas. + */ + class MultiAtlasFile extends Phaser.Loader.MultiFile { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key of the file. Must be unique within both the Loader and the Texture Manager. + * @param atlasURL The absolute or relative URL to load the multi atlas json file from. + * @param path Optional path to use when loading the textures defined in the atlas data. + * @param baseURL Optional Base URL to use when loading the textures defined in the atlas data. + * @param atlasXhrSettings Extra XHR Settings specifically for the atlas json file. + * @param textureXhrSettings Extra XHR Settings specifically for the texture files. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string, atlasURL?: string, path?: string, baseURL?: string, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called by each File when it finishes loading. + * @param file The File that has completed processing. + */ + onFileComplete(file: Phaser.Loader.File): void; + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * A Multi Script File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#scripts method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#scripts. + */ + class MultiScriptFile extends Phaser.Loader.MultiFile { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url An array of absolute or relative URLs to load the script files from. They are processed in the order given in the array. + * @param xhrSettings An XHR Settings configuration object for the script files. Used in replacement of the Loaders default XHR Settings. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.MultiScriptFileConfig, url?: string[], xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * A single JSON Pack File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#pack method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#pack. + */ + class PackFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param xhrSettings Extra XHR Settings specifically for this file. + * @param dataKey When the JSON file loads only this property will be stored in the Cache. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.PackFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject, dataKey?: string); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + /** + * A single Plugin Script File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#plugin method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#plugin. + */ + class PluginFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was "alien" then the URL will be "alien.js". + * @param start Automatically start the plugin after loading? Default false. + * @param mapping If this plugin is to be injected into the Scene, this is the property key used. + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.PluginFileConfig, url?: string, start?: boolean, mapping?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + /** + * An external Scene JavaScript File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#sceneFile method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#sceneFile. + */ + class SceneFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was "alien" then the URL will be "alien.js". + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.SceneFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * A single Scene Plugin Script File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#scenePlugin method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#scenePlugin. + */ + class ScenePluginFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was "alien" then the URL will be "alien.js". + * @param systemKey If this plugin is to be added to Scene.Systems, this is the property key for it. + * @param sceneKey If this plugin is to be added to the Scene, this is the property key for it. + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.ScenePluginFileConfig, url?: string, systemKey?: string, sceneKey?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + /** + * A single Script File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#script method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#script. + */ + class ScriptFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was "alien" then the URL will be "alien.js". + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.ScriptFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + /** + * A single Sprite Sheet Image File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#spritesheet method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spritesheet. + */ + class SpriteSheetFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". + * @param frameConfig The frame configuration object. + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig, url?: string | string[], frameConfig?: Phaser.Types.Loader.FileTypes.ImageFrameConfig, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * A single SVG File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#svg method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#svg. + */ + class SVGFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.svg`, i.e. if `key` was "alien" then the URL will be "alien.svg". + * @param svgConfig The svg size configuration object. + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.SVGFileConfig, url?: string, svgConfig?: Phaser.Types.Loader.FileTypes.SVGSizeConfig, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * A single Text File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text. + */ + class TextFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.TextFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + /** + * A single Tilemap CSV File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#tilemapCSV method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#tilemapCSV. + */ + class TilemapCSVFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.csv`, i.e. if `key` was "alien" then the URL will be "alien.csv". + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * A single Impact.js Tilemap JSON File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#tilemapImpact method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#tilemapImpact. + */ + class TilemapImpactFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * A single Tiled Tilemap JSON File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#tilemapTiledJSON method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#tilemapTiledJSON. + */ + class TilemapJSONFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * A single text file based Unity Texture Atlas File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#unityAtlas method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#unityAtlas. + */ + class UnityAtlasFile extends Phaser.Loader.MultiFile { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param textureURL The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". + * @param atlasURL The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". + * @param textureXhrSettings An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings. + * @param atlasXhrSettings An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig, textureURL?: string | string[], atlasURL?: string, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * A single Video File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#video method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#video. + */ + class VideoFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param urlConfig The absolute or relative URL to load this file from in a config object. + * @param loadEvent The load event to listen for when _not_ loading as a blob. Either 'loadeddata', 'canplay' or 'canplaythrough'. + * @param asBlob Load the video as a data blob, or via the Video element? + * @param noAudio Does the video have an audio track? If not you can enable auto-playing on it. + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.VideoFileConfig, urlConfig?: any, loadEvent?: string, asBlob?: boolean, noAudio?: boolean, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + /** + * Called by the Loader, starts the actual file downloading. + * During the load the methods onLoad, onError and onProgress are called, based on the XHR events. + * You shouldn't normally call this method directly, it's meant to be invoked by the Loader. + */ + load(): void; + + } + + /** + * A single XML File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#xml method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#xml. + */ + class XMLFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was "alien" then the URL will be "alien.xml". + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.XMLFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + } + namespace FileTypesManager { /** * Static method called when a LoaderPlugin is created. @@ -44576,335 +46024,6 @@ declare namespace Phaser { */ constructor(scene: Phaser.Scene); - /** - * The Scene which owns this Loader instance. - */ - scene: Phaser.Scene; - - /** - * A reference to the Scene Systems. - */ - systems: Phaser.Scenes.Systems; - - /** - * A reference to the global Cache Manager. - */ - cacheManager: Phaser.Cache.CacheManager; - - /** - * A reference to the global Texture Manager. - */ - textureManager: Phaser.Textures.TextureManager; - - /** - * A reference to the global Scene Manager. - */ - protected sceneManager: Phaser.Scenes.SceneManager; - - /** - * An optional prefix that is automatically prepended to the start of every file key. - * If prefix was `MENU.` and you load an image with the key 'Background' the resulting key would be `MENU.Background`. - * You can set this directly, or call `Loader.setPrefix()`. It will then affect every file added to the Loader - * from that point on. It does _not_ change any file already in the load queue. - */ - prefix: string; - - /** - * The value of `path`, if set, is placed before any _relative_ file path given. For example: - * - * ```javascript - * this.load.path = "images/sprites/"; - * this.load.image("ball", "ball.png"); - * this.load.image("tree", "level1/oaktree.png"); - * this.load.image("boom", "http://server.com/explode.png"); - * ``` - * - * Would load the `ball` file from `images/sprites/ball.png` and the tree from - * `images/sprites/level1/oaktree.png` but the file `boom` would load from the URL - * given as it's an absolute URL. - * - * Please note that the path is added before the filename but *after* the baseURL (if set.) - * - * If you set this property directly then it _must_ end with a "/". Alternatively, call `setPath()` and it'll do it for you. - */ - path: string; - - /** - * If you want to append a URL before the path of any asset you can set this here. - * - * Useful if allowing the asset base url to be configured outside of the game code. - * - * If you set this property directly then it _must_ end with a "/". Alternatively, call `setBaseURL()` and it'll do it for you. - */ - baseURL: string; - - /** - * The number of concurrent / parallel resources to try and fetch at once. - * - * Old browsers limit 6 requests per domain; modern ones, especially those with HTTP/2 don't limit it at all. - * - * The default is 32 but you can change this in your Game Config, or by changing this property before the Loader starts. - */ - maxParallelDownloads: integer; - - /** - * xhr specific global settings (can be overridden on a per-file basis) - */ - xhr: Phaser.Types.Loader.XHRSettingsObject; - - /** - * The crossOrigin value applied to loaded images. Very often this needs to be set to 'anonymous'. - */ - crossOrigin: string; - - /** - * The total number of files to load. It may not always be accurate because you may add to the Loader during the process - * of loading, especially if you load a Pack File. Therefore this value can change, but in most cases remains static. - */ - totalToLoad: integer; - - /** - * The progress of the current load queue, as a float value between 0 and 1. - * This is updated automatically as files complete loading. - * Note that it is possible for this value to go down again if you add content to the current load queue during a load. - */ - progress: number; - - /** - * Files are placed in this Set when they're added to the Loader via `addFile`. - * - * They are moved to the `inflight` Set when they start loading, and assuming a successful - * load, to the `queue` Set for further processing. - * - * By the end of the load process this Set will be empty. - */ - list: Phaser.Structs.Set; - - /** - * Files are stored in this Set while they're in the process of being loaded. - * - * Upon a successful load they are moved to the `queue` Set. - * - * By the end of the load process this Set will be empty. - */ - inflight: Phaser.Structs.Set; - - /** - * Files are stored in this Set while they're being processed. - * - * If the process is successful they are moved to their final destination, which could be - * a Cache or the Texture Manager. - * - * At the end of the load process this Set will be empty. - */ - queue: Phaser.Structs.Set; - - /** - * The total number of files that failed to load during the most recent load. - * This value is reset when you call `Loader.start`. - */ - totalFailed: integer; - - /** - * The total number of files that successfully loaded during the most recent load. - * This value is reset when you call `Loader.start`. - */ - totalComplete: integer; - - /** - * The current state of the Loader. - */ - readonly state: integer; - - /** - * If you want to append a URL before the path of any asset you can set this here. - * - * Useful if allowing the asset base url to be configured outside of the game code. - * - * Once a base URL is set it will affect every file loaded by the Loader from that point on. It does _not_ change any - * file _already_ being loaded. To reset it, call this method with no arguments. - * @param url The URL to use. Leave empty to reset. - */ - setBaseURL(url?: string): Phaser.Loader.LoaderPlugin; - - /** - * The value of `path`, if set, is placed before any _relative_ file path given. For example: - * - * ```javascript - * this.load.setPath("images/sprites/"); - * this.load.image("ball", "ball.png"); - * this.load.image("tree", "level1/oaktree.png"); - * this.load.image("boom", "http://server.com/explode.png"); - * ``` - * - * Would load the `ball` file from `images/sprites/ball.png` and the tree from - * `images/sprites/level1/oaktree.png` but the file `boom` would load from the URL - * given as it's an absolute URL. - * - * Please note that the path is added before the filename but *after* the baseURL (if set.) - * - * Once a path is set it will then affect every file added to the Loader from that point on. It does _not_ change any - * file _already_ in the load queue. To reset it, call this method with no arguments. - * @param path The path to use. Leave empty to reset. - */ - setPath(path?: string): Phaser.Loader.LoaderPlugin; - - /** - * An optional prefix that is automatically prepended to the start of every file key. - * - * If prefix was `MENU.` and you load an image with the key 'Background' the resulting key would be `MENU.Background`. - * - * Once a prefix is set it will then affect every file added to the Loader from that point on. It does _not_ change any - * file _already_ in the load queue. To reset it, call this method with no arguments. - * @param prefix The prefix to use. Leave empty to reset. - */ - setPrefix(prefix?: string): Phaser.Loader.LoaderPlugin; - - /** - * Sets the Cross Origin Resource Sharing value used when loading files. - * - * Files can override this value on a per-file basis by specifying an alternative `crossOrigin` value in their file config. - * - * Once CORs is set it will then affect every file loaded by the Loader from that point on, as long as they don't have - * their own CORs setting. To reset it, call this method with no arguments. - * - * For more details about CORs see https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS - * @param crossOrigin The value to use for the `crossOrigin` property in the load request. - */ - setCORS(crossOrigin?: string): Phaser.Loader.LoaderPlugin; - - /** - * Adds a file, or array of files, into the load queue. - * - * The file must be an instance of `Phaser.Loader.File`, or a class that extends it. The Loader will check that the key - * used by the file won't conflict with any other key either in the loader, the inflight queue or the target cache. - * If allowed it will then add the file into the pending list, read for the load to start. Or, if the load has already - * started, ready for the next batch of files to be pulled from the list to the inflight queue. - * - * You should not normally call this method directly, but rather use one of the Loader methods like `image` or `atlas`, - * however you can call this as long as the file given to it is well formed. - * @param file The file, or array of files, to be added to the load queue. - */ - addFile(file: Phaser.Loader.File | Phaser.Loader.File[]): void; - - /** - * Checks the key and type of the given file to see if it will conflict with anything already - * in a Cache, the Texture Manager, or the list or inflight queues. - * @param file The file to check the key of. - */ - keyExists(file: Phaser.Loader.File): boolean; - - /** - * Takes a well formed, fully parsed pack file object and adds its entries into the load queue. Usually you do not call - * this method directly, but instead use `Loader.pack` and supply a path to a JSON file that holds the - * pack data. However, if you've got the data prepared you can pass it to this method. - * - * You can also provide an optional key. If you do then it will only add the entries from that part of the pack into - * to the load queue. If not specified it will add all entries it finds. For more details about the pack file format - * see the `LoaderPlugin.pack` method. - * @param data The Pack File data to be parsed and each entry of it to added to the load queue. - * @param packKey An optional key to use from the pack file data. - */ - addPack(data: any, packKey?: string): boolean; - - /** - * Is the Loader actively loading, or processing loaded files? - */ - isLoading(): boolean; - - /** - * Is the Loader ready to start a new load? - */ - isReady(): boolean; - - /** - * Starts the Loader running. This will reset the progress and totals and then emit a `start` event. - * If there is nothing in the queue the Loader will immediately complete, otherwise it will start - * loading the first batch of files. - * - * The Loader is started automatically if the queue is populated within your Scenes `preload` method. - * - * However, outside of this, you need to call this method to start it. - * - * If the Loader is already running this method will simply return. - */ - start(): void; - - /** - * Called automatically during the load process. - * It updates the `progress` value and then emits a progress event, which you can use to - * display a loading bar in your game. - */ - updateProgress(): void; - - /** - * Called automatically during the load process. - */ - update(): void; - - /** - * An internal method called automatically by the XHRLoader belong to a File. - * - * This method will remove the given file from the inflight Set and update the load progress. - * If the file was successful its `onProcess` method is called, otherwise it is added to the delete queue. - * @param file The File that just finished loading, or errored during load. - * @param success `true` if the file loaded successfully, otherwise `false`. - */ - nextFile(file: Phaser.Loader.File, success: boolean): void; - - /** - * An internal method that is called automatically by the File when it has finished processing. - * - * If the process was successful, and the File isn't part of a MultiFile, its `addToCache` method is called. - * - * It this then removed from the queue. If there are no more files to load `loadComplete` is called. - * @param file The file that has finished processing. - */ - fileProcessComplete(file: Phaser.Loader.File): void; - - /** - * Called at the end when the load queue is exhausted and all files have either loaded or errored. - * By this point every loaded file will now be in its associated cache and ready for use. - * - * Also clears down the Sets, puts progress to 1 and clears the deletion queue. - */ - loadComplete(): void; - - /** - * Adds a File into the pending-deletion queue. - * @param file The File to be queued for deletion when the Loader completes. - */ - flagForRemoval(file: Phaser.Loader.File): void; - - /** - * Converts the given JSON data into a file that the browser then prompts you to download so you can save it locally. - * - * The data must be well formed JSON and ready-parsed, not a JavaScript object. - * @param data The JSON data, ready parsed. - * @param filename The name to save the JSON file as. Default file.json. - */ - saveJSON(data: any, filename?: string): Phaser.Loader.LoaderPlugin; - - /** - * Causes the browser to save the given data as a file to its default Downloads folder. - * - * Creates a DOM level anchor link, assigns it as being a `download` anchor, sets the href - * to be an ObjectURL based on the given data, and then invokes a click event. - * @param data The data to be saved. Will be passed through URL.createObjectURL. - * @param filename The filename to save the file as. Default file.json. - * @param filetype The file type to use when saving the file. Defaults to JSON. Default application/json. - */ - save(data: any, filename?: string, filetype?: string): Phaser.Loader.LoaderPlugin; - - /** - * Resets the Loader. - * - * This will clear all lists and reset the base URL, path and prefix. - * - * Warning: If the Loader is currently downloading files, or has files in its queue, they will be aborted. - */ - reset(): void; - /** * Adds an Animation JSON Data file, or array of Animation JSON files, to the current load queue. * @@ -46236,118 +47355,6 @@ declare namespace Phaser { */ plugin(key: string | Phaser.Types.Loader.FileTypes.PluginFileConfig | Phaser.Types.Loader.FileTypes.PluginFileConfig[], url?: string | Function, start?: boolean, mapping?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): Phaser.Loader.LoaderPlugin; - /** - * Adds an SVG File, or array of SVG Files, to the current load queue. When the files are loaded they - * will be rendered to bitmap textures and stored in the Texture Manager. - * - * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * - * ```javascript - * function preload () - * { - * this.load.svg('morty', 'images/Morty.svg'); - * } - * ``` - * - * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, - * or if it's already running, when the next free load slot becomes available. This happens automatically if you - * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued - * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. - * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the - * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been - * loaded. - * - * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. - * The key should be unique both in terms of files being loaded and files already present in the Texture Manager. - * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file - * then remove it from the Texture Manager first, before loading a new one. - * - * Instead of passing arguments you can pass a configuration object, such as: - * - * ```javascript - * this.load.svg({ - * key: 'morty', - * url: 'images/Morty.svg' - * }); - * ``` - * - * See the documentation for `Phaser.Types.Loader.FileTypes.SVGFileConfig` for more details. - * - * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key: - * - * ```javascript - * this.load.svg('morty', 'images/Morty.svg'); - * // and later in your game ... - * this.add.image(x, y, 'morty'); - * ``` - * - * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files - * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and - * this is what you would use to retrieve the image from the Texture Manager. - * - * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. - * - * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" - * and no URL is given then the Loader will set the URL to be "alien.html". It will always add `.html` as the extension, although - * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. - * - * You can optionally pass an SVG Resize Configuration object when you load an SVG file. By default the SVG will be rendered to a texture - * at the same size defined in the SVG file attributes. However, this isn't always desirable. You may wish to resize the SVG (either down - * or up) to improve texture clarity, or reduce texture memory consumption. You can either specify an exact width and height to resize - * the SVG to: - * - * ```javascript - * function preload () - * { - * this.load.svg('morty', 'images/Morty.svg', { width: 300, height: 600 }); - * } - * ``` - * - * Or when using a configuration object: - * - * ```javascript - * this.load.svg({ - * key: 'morty', - * url: 'images/Morty.svg', - * svgConfig: { - * width: 300, - * height: 600 - * } - * }); - * ``` - * - * Alternatively, you can just provide a scale factor instead: - * - * ```javascript - * function preload () - * { - * this.load.svg('morty', 'images/Morty.svg', { scale: 2.5 }); - * } - * ``` - * - * Or when using a configuration object: - * - * ```javascript - * this.load.svg({ - * key: 'morty', - * url: 'images/Morty.svg', - * svgConfig: { - * scale: 2.5 - * } - * }); - * ``` - * - * If scale, width and height values are all given, the scale has priority and the width and height values are ignored. - * - * Note: The ability to load this type of file will only be available if the SVG File type has been built into Phaser. - * It is available in the default build but can be excluded from custom builds. - * @param key The key to use for this file, or a file configuration object, or array of them. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.svg`, i.e. if `key` was "alien" then the URL will be "alien.svg". - * @param svgConfig The svg size configuration object. - * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. - */ - svg(key: string | Phaser.Types.Loader.FileTypes.SVGFileConfig | Phaser.Types.Loader.FileTypes.SVGFileConfig[], url?: string, svgConfig?: Phaser.Types.Loader.FileTypes.SVGSizeConfig, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): Phaser.Loader.LoaderPlugin; - /** * Adds an external Scene file, or array of Scene files, to the current load queue. * @@ -46647,6 +47654,118 @@ declare namespace Phaser { */ spritesheet(key: string | Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig | Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig[], url?: string, frameConfig?: Phaser.Types.Loader.FileTypes.ImageFrameConfig, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): Phaser.Loader.LoaderPlugin; + /** + * Adds an SVG File, or array of SVG Files, to the current load queue. When the files are loaded they + * will be rendered to bitmap textures and stored in the Texture Manager. + * + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: + * + * ```javascript + * function preload () + * { + * this.load.svg('morty', 'images/Morty.svg'); + * } + * ``` + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the Texture Manager. + * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file + * then remove it from the Texture Manager first, before loading a new one. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.svg({ + * key: 'morty', + * url: 'images/Morty.svg' + * }); + * ``` + * + * See the documentation for `Phaser.Types.Loader.FileTypes.SVGFileConfig` for more details. + * + * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key: + * + * ```javascript + * this.load.svg('morty', 'images/Morty.svg'); + * // and later in your game ... + * this.add.image(x, y, 'morty'); + * ``` + * + * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files + * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and + * this is what you would use to retrieve the image from the Texture Manager. + * + * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. + * + * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" + * and no URL is given then the Loader will set the URL to be "alien.html". It will always add `.html` as the extension, although + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * You can optionally pass an SVG Resize Configuration object when you load an SVG file. By default the SVG will be rendered to a texture + * at the same size defined in the SVG file attributes. However, this isn't always desirable. You may wish to resize the SVG (either down + * or up) to improve texture clarity, or reduce texture memory consumption. You can either specify an exact width and height to resize + * the SVG to: + * + * ```javascript + * function preload () + * { + * this.load.svg('morty', 'images/Morty.svg', { width: 300, height: 600 }); + * } + * ``` + * + * Or when using a configuration object: + * + * ```javascript + * this.load.svg({ + * key: 'morty', + * url: 'images/Morty.svg', + * svgConfig: { + * width: 300, + * height: 600 + * } + * }); + * ``` + * + * Alternatively, you can just provide a scale factor instead: + * + * ```javascript + * function preload () + * { + * this.load.svg('morty', 'images/Morty.svg', { scale: 2.5 }); + * } + * ``` + * + * Or when using a configuration object: + * + * ```javascript + * this.load.svg({ + * key: 'morty', + * url: 'images/Morty.svg', + * svgConfig: { + * scale: 2.5 + * } + * }); + * ``` + * + * If scale, width and height values are all given, the scale has priority and the width and height values are ignored. + * + * Note: The ability to load this type of file will only be available if the SVG File type has been built into Phaser. + * It is available in the default build but can be excluded from custom builds. + * @param key The key to use for this file, or a file configuration object, or array of them. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.svg`, i.e. if `key` was "alien" then the URL will be "alien.svg". + * @param svgConfig The svg size configuration object. + * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. + */ + svg(key: string | Phaser.Types.Loader.FileTypes.SVGFileConfig | Phaser.Types.Loader.FileTypes.SVGFileConfig[], url?: string, svgConfig?: Phaser.Types.Loader.FileTypes.SVGSizeConfig, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): Phaser.Loader.LoaderPlugin; + /** * Adds a Text file, or array of Text files, to the current load queue. * @@ -47116,6 +48235,335 @@ declare namespace Phaser { */ xml(key: string | Phaser.Types.Loader.FileTypes.XMLFileConfig | Phaser.Types.Loader.FileTypes.XMLFileConfig[], url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): Phaser.Loader.LoaderPlugin; + /** + * The Scene which owns this Loader instance. + */ + scene: Phaser.Scene; + + /** + * A reference to the Scene Systems. + */ + systems: Phaser.Scenes.Systems; + + /** + * A reference to the global Cache Manager. + */ + cacheManager: Phaser.Cache.CacheManager; + + /** + * A reference to the global Texture Manager. + */ + textureManager: Phaser.Textures.TextureManager; + + /** + * A reference to the global Scene Manager. + */ + protected sceneManager: Phaser.Scenes.SceneManager; + + /** + * An optional prefix that is automatically prepended to the start of every file key. + * If prefix was `MENU.` and you load an image with the key 'Background' the resulting key would be `MENU.Background`. + * You can set this directly, or call `Loader.setPrefix()`. It will then affect every file added to the Loader + * from that point on. It does _not_ change any file already in the load queue. + */ + prefix: string; + + /** + * The value of `path`, if set, is placed before any _relative_ file path given. For example: + * + * ```javascript + * this.load.path = "images/sprites/"; + * this.load.image("ball", "ball.png"); + * this.load.image("tree", "level1/oaktree.png"); + * this.load.image("boom", "http://server.com/explode.png"); + * ``` + * + * Would load the `ball` file from `images/sprites/ball.png` and the tree from + * `images/sprites/level1/oaktree.png` but the file `boom` would load from the URL + * given as it's an absolute URL. + * + * Please note that the path is added before the filename but *after* the baseURL (if set.) + * + * If you set this property directly then it _must_ end with a "/". Alternatively, call `setPath()` and it'll do it for you. + */ + path: string; + + /** + * If you want to append a URL before the path of any asset you can set this here. + * + * Useful if allowing the asset base url to be configured outside of the game code. + * + * If you set this property directly then it _must_ end with a "/". Alternatively, call `setBaseURL()` and it'll do it for you. + */ + baseURL: string; + + /** + * The number of concurrent / parallel resources to try and fetch at once. + * + * Old browsers limit 6 requests per domain; modern ones, especially those with HTTP/2 don't limit it at all. + * + * The default is 32 but you can change this in your Game Config, or by changing this property before the Loader starts. + */ + maxParallelDownloads: integer; + + /** + * xhr specific global settings (can be overridden on a per-file basis) + */ + xhr: Phaser.Types.Loader.XHRSettingsObject; + + /** + * The crossOrigin value applied to loaded images. Very often this needs to be set to 'anonymous'. + */ + crossOrigin: string; + + /** + * The total number of files to load. It may not always be accurate because you may add to the Loader during the process + * of loading, especially if you load a Pack File. Therefore this value can change, but in most cases remains static. + */ + totalToLoad: integer; + + /** + * The progress of the current load queue, as a float value between 0 and 1. + * This is updated automatically as files complete loading. + * Note that it is possible for this value to go down again if you add content to the current load queue during a load. + */ + progress: number; + + /** + * Files are placed in this Set when they're added to the Loader via `addFile`. + * + * They are moved to the `inflight` Set when they start loading, and assuming a successful + * load, to the `queue` Set for further processing. + * + * By the end of the load process this Set will be empty. + */ + list: Phaser.Structs.Set; + + /** + * Files are stored in this Set while they're in the process of being loaded. + * + * Upon a successful load they are moved to the `queue` Set. + * + * By the end of the load process this Set will be empty. + */ + inflight: Phaser.Structs.Set; + + /** + * Files are stored in this Set while they're being processed. + * + * If the process is successful they are moved to their final destination, which could be + * a Cache or the Texture Manager. + * + * At the end of the load process this Set will be empty. + */ + queue: Phaser.Structs.Set; + + /** + * The total number of files that failed to load during the most recent load. + * This value is reset when you call `Loader.start`. + */ + totalFailed: integer; + + /** + * The total number of files that successfully loaded during the most recent load. + * This value is reset when you call `Loader.start`. + */ + totalComplete: integer; + + /** + * The current state of the Loader. + */ + readonly state: integer; + + /** + * If you want to append a URL before the path of any asset you can set this here. + * + * Useful if allowing the asset base url to be configured outside of the game code. + * + * Once a base URL is set it will affect every file loaded by the Loader from that point on. It does _not_ change any + * file _already_ being loaded. To reset it, call this method with no arguments. + * @param url The URL to use. Leave empty to reset. + */ + setBaseURL(url?: string): Phaser.Loader.LoaderPlugin; + + /** + * The value of `path`, if set, is placed before any _relative_ file path given. For example: + * + * ```javascript + * this.load.setPath("images/sprites/"); + * this.load.image("ball", "ball.png"); + * this.load.image("tree", "level1/oaktree.png"); + * this.load.image("boom", "http://server.com/explode.png"); + * ``` + * + * Would load the `ball` file from `images/sprites/ball.png` and the tree from + * `images/sprites/level1/oaktree.png` but the file `boom` would load from the URL + * given as it's an absolute URL. + * + * Please note that the path is added before the filename but *after* the baseURL (if set.) + * + * Once a path is set it will then affect every file added to the Loader from that point on. It does _not_ change any + * file _already_ in the load queue. To reset it, call this method with no arguments. + * @param path The path to use. Leave empty to reset. + */ + setPath(path?: string): Phaser.Loader.LoaderPlugin; + + /** + * An optional prefix that is automatically prepended to the start of every file key. + * + * If prefix was `MENU.` and you load an image with the key 'Background' the resulting key would be `MENU.Background`. + * + * Once a prefix is set it will then affect every file added to the Loader from that point on. It does _not_ change any + * file _already_ in the load queue. To reset it, call this method with no arguments. + * @param prefix The prefix to use. Leave empty to reset. + */ + setPrefix(prefix?: string): Phaser.Loader.LoaderPlugin; + + /** + * Sets the Cross Origin Resource Sharing value used when loading files. + * + * Files can override this value on a per-file basis by specifying an alternative `crossOrigin` value in their file config. + * + * Once CORs is set it will then affect every file loaded by the Loader from that point on, as long as they don't have + * their own CORs setting. To reset it, call this method with no arguments. + * + * For more details about CORs see https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS + * @param crossOrigin The value to use for the `crossOrigin` property in the load request. + */ + setCORS(crossOrigin?: string): Phaser.Loader.LoaderPlugin; + + /** + * Adds a file, or array of files, into the load queue. + * + * The file must be an instance of `Phaser.Loader.File`, or a class that extends it. The Loader will check that the key + * used by the file won't conflict with any other key either in the loader, the inflight queue or the target cache. + * If allowed it will then add the file into the pending list, read for the load to start. Or, if the load has already + * started, ready for the next batch of files to be pulled from the list to the inflight queue. + * + * You should not normally call this method directly, but rather use one of the Loader methods like `image` or `atlas`, + * however you can call this as long as the file given to it is well formed. + * @param file The file, or array of files, to be added to the load queue. + */ + addFile(file: Phaser.Loader.File | Phaser.Loader.File[]): void; + + /** + * Checks the key and type of the given file to see if it will conflict with anything already + * in a Cache, the Texture Manager, or the list or inflight queues. + * @param file The file to check the key of. + */ + keyExists(file: Phaser.Loader.File): boolean; + + /** + * Takes a well formed, fully parsed pack file object and adds its entries into the load queue. Usually you do not call + * this method directly, but instead use `Loader.pack` and supply a path to a JSON file that holds the + * pack data. However, if you've got the data prepared you can pass it to this method. + * + * You can also provide an optional key. If you do then it will only add the entries from that part of the pack into + * to the load queue. If not specified it will add all entries it finds. For more details about the pack file format + * see the `LoaderPlugin.pack` method. + * @param data The Pack File data to be parsed and each entry of it to added to the load queue. + * @param packKey An optional key to use from the pack file data. + */ + addPack(data: any, packKey?: string): boolean; + + /** + * Is the Loader actively loading, or processing loaded files? + */ + isLoading(): boolean; + + /** + * Is the Loader ready to start a new load? + */ + isReady(): boolean; + + /** + * Starts the Loader running. This will reset the progress and totals and then emit a `start` event. + * If there is nothing in the queue the Loader will immediately complete, otherwise it will start + * loading the first batch of files. + * + * The Loader is started automatically if the queue is populated within your Scenes `preload` method. + * + * However, outside of this, you need to call this method to start it. + * + * If the Loader is already running this method will simply return. + */ + start(): void; + + /** + * Called automatically during the load process. + * It updates the `progress` value and then emits a progress event, which you can use to + * display a loading bar in your game. + */ + updateProgress(): void; + + /** + * Called automatically during the load process. + */ + update(): void; + + /** + * An internal method called automatically by the XHRLoader belong to a File. + * + * This method will remove the given file from the inflight Set and update the load progress. + * If the file was successful its `onProcess` method is called, otherwise it is added to the delete queue. + * @param file The File that just finished loading, or errored during load. + * @param success `true` if the file loaded successfully, otherwise `false`. + */ + nextFile(file: Phaser.Loader.File, success: boolean): void; + + /** + * An internal method that is called automatically by the File when it has finished processing. + * + * If the process was successful, and the File isn't part of a MultiFile, its `addToCache` method is called. + * + * It this then removed from the queue. If there are no more files to load `loadComplete` is called. + * @param file The file that has finished processing. + */ + fileProcessComplete(file: Phaser.Loader.File): void; + + /** + * Called at the end when the load queue is exhausted and all files have either loaded or errored. + * By this point every loaded file will now be in its associated cache and ready for use. + * + * Also clears down the Sets, puts progress to 1 and clears the deletion queue. + */ + loadComplete(): void; + + /** + * Adds a File into the pending-deletion queue. + * @param file The File to be queued for deletion when the Loader completes. + */ + flagForRemoval(file: Phaser.Loader.File): void; + + /** + * Converts the given JSON data into a file that the browser then prompts you to download so you can save it locally. + * + * The data must be well formed JSON and ready-parsed, not a JavaScript object. + * @param data The JSON data, ready parsed. + * @param filename The name to save the JSON file as. Default file.json. + */ + saveJSON(data: any, filename?: string): Phaser.Loader.LoaderPlugin; + + /** + * Causes the browser to save the given data as a file to its default Downloads folder. + * + * Creates a DOM level anchor link, assigns it as being a `download` anchor, sets the href + * to be an ObjectURL based on the given data, and then invokes a click event. + * @param data The data to be saved. Will be passed through URL.createObjectURL. + * @param filename The filename to save the file as. Default file.json. + * @param filetype The file type to use when saving the file. Defaults to JSON. Default application/json. + */ + save(data: any, filename?: string, filetype?: string): Phaser.Loader.LoaderPlugin; + + /** + * Resets the Loader. + * + * This will clear all lists and reset the base URL, path and prefix. + * + * Warning: If the Loader is currently downloading files, or has files in its queue, they will be aborted. + */ + reset(): void; + } /** @@ -47246,1082 +48694,121 @@ declare namespace Phaser { */ function XHRSettings(responseType?: XMLHttpRequestResponseType, async?: boolean, user?: string, password?: string, timeout?: integer): Phaser.Types.Loader.XHRSettingsObject; - /** - * The Loader is idle. - */ - var LOADER_IDLE: integer; - - /** - * The Loader is actively loading. - */ - var LOADER_LOADING: integer; - - /** - * The Loader is processing files is has loaded. - */ - var LOADER_PROCESSING: integer; - - /** - * The Loader has completed loading and processing. - */ - var LOADER_COMPLETE: integer; - - /** - * The Loader is shutting down. - */ - var LOADER_SHUTDOWN: integer; - - /** - * The Loader has been destroyed. - */ - var LOADER_DESTROYED: integer; - - /** - * File is in the load queue but not yet started - */ - var FILE_PENDING: integer; - - /** - * File has been started to load by the loader (onLoad called) - */ - var FILE_LOADING: integer; - - /** - * File has loaded successfully, awaiting processing - */ - var FILE_LOADED: integer; - - /** - * File failed to load - */ - var FILE_FAILED: integer; - - /** - * File is being processed (onProcess callback) - */ - var FILE_PROCESSING: integer; - - /** - * The File has errored somehow during processing. - */ - var FILE_ERRORED: integer; - - /** - * File has finished processing. - */ - var FILE_COMPLETE: integer; - - /** - * File has been destroyed - */ - var FILE_DESTROYED: integer; - - /** - * File was populated from local data and doesn't need an HTTP request - */ - var FILE_POPULATED: integer; - - namespace Events { - /** - * The Loader Plugin Add File Event. - * - * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue. - * - * Listen to it from a Scene using: `this.load.on('addfile', listener)`. - * - * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them. - */ - const ADD: any; - - /** - * The Loader Plugin Complete Event. - * - * This event is dispatched when the Loader has fully processed everything in the load queue. - * By this point every loaded file will now be in its associated cache and ready for use. - * - * Listen to it from a Scene using: `this.load.on('complete', listener)`. - */ - const COMPLETE: any; - - /** - * The File Load Complete Event. - * - * This event is dispatched by the Loader Plugin when any file in the queue finishes loading. - * - * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`. - * - * You can also listen for the completion of a specific file. See the [FILE_KEY_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_KEY_COMPLETE} event. - */ - const FILE_COMPLETE: any; - - /** - * The File Load Complete Event. - * - * This event is dispatched by the Loader Plugin when any file in the queue finishes loading. - * - * It uses a special dynamic event name constructed from the key and type of the file. - * - * For example, if you have loaded an `image` with a key of `monster`, you can listen for it - * using the following: - * - * ```javascript - * this.load.on('filecomplete-image-monster', function (key, type, data) { - * // Your handler code - * }); - * ``` - * - * Or, if you have loaded a texture `atlas` with a key of `Level1`: - * - * ```javascript - * this.load.on('filecomplete-atlas-Level1', function (key, type, data) { - * // Your handler code - * }); - * ``` - * - * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`: - * - * ```javascript - * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) { - * // Your handler code - * }); - * ``` - * - * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event. - */ - const FILE_KEY_COMPLETE: any; - - /** - * The File Load Error Event. - * - * This event is dispatched by the Loader Plugin when a file fails to load. - * - * Listen to it from a Scene using: `this.load.on('loaderror', listener)`. - */ - const FILE_LOAD_ERROR: any; - - /** - * The File Load Event. - * - * This event is dispatched by the Loader Plugin when a file finishes loading, - * but _before_ it is processed and added to the internal Phaser caches. - * - * Listen to it from a Scene using: `this.load.on('load', listener)`. - */ - const FILE_LOAD: any; - - /** - * The File Load Progress Event. - * - * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and - * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen. - * - * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`. - */ - const FILE_PROGRESS: any; - - /** - * The Loader Plugin Post Process Event. - * - * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue. - * It is dispatched before the internal lists are cleared and each File is destroyed. - * - * Use this hook to perform any last minute processing of files that can only happen once the - * Loader has completed, but prior to it emitting the `complete` event. - * - * Listen to it from a Scene using: `this.load.on('postprocess', listener)`. - */ - const POST_PROCESS: any; - - /** - * The Loader Plugin Progress Event. - * - * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading. - * - * Listen to it from a Scene using: `this.load.on('progress', listener)`. - */ - const PROGRESS: any; - - /** - * The Loader Plugin Start Event. - * - * This event is dispatched when the Loader starts running. At this point load progress is zero. - * - * This event is dispatched even if there aren't any files in the load queue. - * - * Listen to it from a Scene using: `this.load.on('start', listener)`. - */ - const START: any; - - } - - namespace FileTypes { - /** - * A single Animation JSON File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#animation method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#animation. - */ - class AnimationJSONFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". - * @param xhrSettings Extra XHR Settings specifically for this file. - * @param dataKey When the JSON file loads only this property will be stored in the Cache. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.JSONFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject, dataKey?: string); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - /** - * Called at the end of the load process, after the Loader has finished all files in its queue. - */ - onLoadComplete(): void; - - } - - /** - * A single JSON based Texture Atlas File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#atlas method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#atlas. - * - * https://www.codeandweb.com/texturepacker/tutorials/how-to-create-sprite-sheets-for-phaser3?source=photonstorm - */ - class AtlasJSONFile extends Phaser.Loader.MultiFile { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param textureURL The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". - * @param atlasURL The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". - * @param textureXhrSettings An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings. - * @param atlasXhrSettings An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig, textureURL?: string | string[], atlasURL?: string, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - } - - /** - * A single XML based Texture Atlas File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#atlasXML method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#atlasXML. - */ - class AtlasXMLFile extends Phaser.Loader.MultiFile { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param textureURL The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". - * @param atlasURL The absolute or relative URL to load the texture atlas xml data file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was "alien" then the URL will be "alien.xml". - * @param textureXhrSettings An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings. - * @param atlasXhrSettings An XHR Settings configuration object for the atlas xml file. Used in replacement of the Loaders default XHR Settings. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig, textureURL?: string | string[], atlasURL?: string, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - } - - /** - * A single Audio File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#audio method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#audio. - */ - class AudioFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param urlConfig The absolute or relative URL to load this file from in a config object. - * @param xhrSettings Extra XHR Settings specifically for this file. - * @param audioContext The AudioContext this file will use to process itself. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.AudioFileConfig, urlConfig?: any, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject, audioContext?: AudioContext); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - } - - /** - * An Audio Sprite File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#audioSprite method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#audioSprite. - */ - class AudioSpriteFile extends Phaser.Loader.MultiFile { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param jsonURL The absolute or relative URL to load the json file from. Or a well formed JSON object to use instead. - * @param audioURL The absolute or relative URL to load the audio file from. If empty it will be obtained by parsing the JSON file. - * @param audioConfig The audio configuration options. - * @param audioXhrSettings An XHR Settings configuration object for the audio file. Used in replacement of the Loaders default XHR Settings. - * @param jsonXhrSettings An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig, jsonURL: string, audioURL?: Object, audioConfig?: any, audioXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, jsonXhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called by each File when it finishes loading. - * @param file The File that has completed processing. - */ - onFileComplete(file: Phaser.Loader.File): void; - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - } - - /** - * A single Binary File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#binary method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#binary. - */ - class BinaryFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.bin`, i.e. if `key` was "alien" then the URL will be "alien.bin". - * @param xhrSettings Extra XHR Settings specifically for this file. - * @param dataType Optional type to cast the binary file to once loaded. For example, `Uint8Array`. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.BinaryFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject, dataType?: any); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - } - - /** - * A single Bitmap Font based File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#bitmapFont method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#bitmapFont. - */ - class BitmapFontFile extends Phaser.Loader.MultiFile { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param textureURL The absolute or relative URL to load the font image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". - * @param fontDataURL The absolute or relative URL to load the font xml data file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was "alien" then the URL will be "alien.xml". - * @param textureXhrSettings An XHR Settings configuration object for the font image file. Used in replacement of the Loaders default XHR Settings. - * @param fontDataXhrSettings An XHR Settings configuration object for the font data xml file. Used in replacement of the Loaders default XHR Settings. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.BitmapFontFileConfig, textureURL?: string | string[], fontDataURL?: string, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, fontDataXhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - } - - /** - * A single CSS File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#css method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#css. - */ - class CSSFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was "alien" then the URL will be "alien.js". - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.CSSFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - } - - /** - * A single GLSL File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#glsl method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#glsl. - */ - class GLSLFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". - * @param shaderType The type of shader. Either `fragment` for a fragment shader, or `vertex` for a vertex shader. This is ignored if you load a shader bundle. Default 'fragment'. - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.GLSLFileConfig, url?: string, shaderType?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - /** - * Returns the name of the shader from the header block. - * @param headerSource The header data. - */ - getShaderName(headerSource: string[]): string; - - /** - * Returns the type of the shader from the header block. - * @param headerSource The header data. - */ - getShaderType(headerSource: string[]): string; - - /** - * Returns the shader uniforms from the header block. - * @param headerSource The header data. - */ - getShaderUniforms(headerSource: string[]): any; - - } - - /** - * A single Audio File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#audio method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#audio. - */ - class HTML5AudioFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param urlConfig The absolute or relative URL to load this file from. - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.AudioFileConfig, urlConfig?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called when the file finishes loading. - */ - onLoad(): void; - - /** - * Called if the file errors while loading. - */ - onError(): void; - - /** - * Called during the file load progress. Is sent a DOM ProgressEvent. - */ - onProgress(): void; - - /** - * Called by the Loader, starts the actual file downloading. - * During the load the methods onLoad, onError and onProgress are called, based on the XHR events. - * You shouldn't normally call this method directly, it's meant to be invoked by the Loader. - */ - load(): void; - - } - - /** - * A single HTML File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#html method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#html. - */ - class HTMLFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was "alien" then the URL will be "alien.html". - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.HTMLFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - } - - /** - * A single HTML File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#htmlTexture method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#htmlTexture. - */ - class HTMLTextureFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". - * @param width The width of the texture the HTML will be rendered to. - * @param height The height of the texture the HTML will be rendered to. - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig, url?: string, width?: integer, height?: integer, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - } - - /** - * A single Image File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image. - */ - class ImageFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". - * @param xhrSettings Extra XHR Settings specifically for this file. - * @param frameConfig The frame configuration object. Only provided for, and used by, Sprite Sheets. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.ImageFileConfig, url?: string | string[], xhrSettings?: Phaser.Types.Loader.XHRSettingsObject, frameConfig?: Phaser.Types.Loader.FileTypes.ImageFrameConfig); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - } - - /** - * A single JSON File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json. - */ - class JSONFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". - * @param xhrSettings Extra XHR Settings specifically for this file. - * @param dataKey When the JSON file loads only this property will be stored in the Cache. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.JSONFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject, dataKey?: string); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - } - - /** - * A single Multi Texture Atlas File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#multiatlas method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#multiatlas. - */ - class MultiAtlasFile extends Phaser.Loader.MultiFile { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key of the file. Must be unique within both the Loader and the Texture Manager. - * @param atlasURL The absolute or relative URL to load the multi atlas json file from. - * @param path Optional path to use when loading the textures defined in the atlas data. - * @param baseURL Optional Base URL to use when loading the textures defined in the atlas data. - * @param atlasXhrSettings Extra XHR Settings specifically for the atlas json file. - * @param textureXhrSettings Extra XHR Settings specifically for the texture files. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string, atlasURL?: string, path?: string, baseURL?: string, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called by each File when it finishes loading. - * @param file The File that has completed processing. - */ - onFileComplete(file: Phaser.Loader.File): void; - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - } - - /** - * A Multi Script File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#scripts method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#scripts. - */ - class MultiScriptFile extends Phaser.Loader.MultiFile { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url An array of absolute or relative URLs to load the script files from. They are processed in the order given in the array. - * @param xhrSettings An XHR Settings configuration object for the script files. Used in replacement of the Loaders default XHR Settings. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.MultiScriptFileConfig, url?: string[], xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - } - - /** - * A single JSON Pack File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#pack method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#pack. - */ - class PackFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". - * @param xhrSettings Extra XHR Settings specifically for this file. - * @param dataKey When the JSON file loads only this property will be stored in the Cache. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.PackFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject, dataKey?: string); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - } - - /** - * A single Plugin Script File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#plugin method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#plugin. - */ - class PluginFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was "alien" then the URL will be "alien.js". - * @param start Automatically start the plugin after loading? Default false. - * @param mapping If this plugin is to be injected into the Scene, this is the property key used. - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.PluginFileConfig, url?: string, start?: boolean, mapping?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - } - - /** - * A single SVG File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#svg method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#svg. - */ - class SVGFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.svg`, i.e. if `key` was "alien" then the URL will be "alien.svg". - * @param svgConfig The svg size configuration object. - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.SVGFileConfig, url?: string, svgConfig?: Phaser.Types.Loader.FileTypes.SVGSizeConfig, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - } - - /** - * An external Scene JavaScript File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#sceneFile method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#sceneFile. - */ - class SceneFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was "alien" then the URL will be "alien.js". - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.SceneFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - } - - /** - * A single Scene Plugin Script File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#scenePlugin method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#scenePlugin. - */ - class ScenePluginFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was "alien" then the URL will be "alien.js". - * @param systemKey If this plugin is to be added to Scene.Systems, this is the property key for it. - * @param sceneKey If this plugin is to be added to the Scene, this is the property key for it. - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.ScenePluginFileConfig, url?: string, systemKey?: string, sceneKey?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - } - - /** - * A single Script File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#script method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#script. - */ - class ScriptFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was "alien" then the URL will be "alien.js". - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.ScriptFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - } - - /** - * A single Sprite Sheet Image File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#spritesheet method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spritesheet. - */ - class SpriteSheetFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". - * @param frameConfig The frame configuration object. - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig, url?: string | string[], frameConfig?: Phaser.Types.Loader.FileTypes.ImageFrameConfig, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - } - - /** - * A single Text File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text. - */ - class TextFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.TextFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - } - - /** - * A single Tilemap CSV File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#tilemapCSV method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#tilemapCSV. - */ - class TilemapCSVFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.csv`, i.e. if `key` was "alien" then the URL will be "alien.csv". - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - } - - /** - * A single Impact.js Tilemap JSON File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#tilemapImpact method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#tilemapImpact. - */ - class TilemapImpactFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - } - - /** - * A single Tiled Tilemap JSON File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#tilemapTiledJSON method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#tilemapTiledJSON. - */ - class TilemapJSONFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - } - - /** - * A single text file based Unity Texture Atlas File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#unityAtlas method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#unityAtlas. - */ - class UnityAtlasFile extends Phaser.Loader.MultiFile { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param textureURL The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". - * @param atlasURL The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". - * @param textureXhrSettings An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings. - * @param atlasXhrSettings An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig, textureURL?: string | string[], atlasURL?: string, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Adds this file to its target cache upon successful loading and processing. - */ - addToCache(): void; - - } - - /** - * A single Video File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#video method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#video. - */ - class VideoFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param urlConfig The absolute or relative URL to load this file from in a config object. - * @param loadEvent The load event to listen for when _not_ loading as a blob. Either 'loadeddata', 'canplay' or 'canplaythrough'. - * @param asBlob Load the video as a data blob, or via the Video element? - * @param noAudio Does the video have an audio track? If not you can enable auto-playing on it. - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.VideoFileConfig, urlConfig?: any, loadEvent?: string, asBlob?: boolean, noAudio?: boolean, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - /** - * Called by the Loader, starts the actual file downloading. - * During the load the methods onLoad, onError and onProgress are called, based on the XHR events. - * You shouldn't normally call this method directly, it's meant to be invoked by the Loader. - */ - load(): void; - - } - - /** - * A single XML File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#xml method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#xml. - */ - class XMLFile extends Phaser.Loader.File { - /** - * - * @param loader A reference to the Loader that is responsible for this file. - * @param key The key to use for this file, or a file configuration object. - * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was "alien" then the URL will be "alien.xml". - * @param xhrSettings Extra XHR Settings specifically for this file. - */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.XMLFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject); - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - */ - onProcess(): void; - - } - - } - } namespace Math { + namespace Angle { + /** + * Find the angle of a segment from (x1, y1) -> (x2, y2). + * @param x1 The x coordinate of the first point. + * @param y1 The y coordinate of the first point. + * @param x2 The x coordinate of the second point. + * @param y2 The y coordinate of the second point. + */ + function Between(x1: number, y1: number, x2: number, y2: number): number; + + /** + * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y). + * + * Calculates the angle of the vector from the first point to the second point. + * @param point1 The first point. + * @param point2 The second point. + */ + function BetweenPoints(point1: Phaser.Geom.Point | object, point2: Phaser.Geom.Point | object): number; + + /** + * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y). + * + * The difference between this method and {@link Phaser.Math.Angle.BetweenPoints} is that this assumes the y coordinate + * travels down the screen. + * @param point1 The first point. + * @param point2 The second point. + */ + function BetweenPointsY(point1: Phaser.Geom.Point | object, point2: Phaser.Geom.Point | object): number; + + /** + * Find the angle of a segment from (x1, y1) -> (x2, y2). + * + * The difference between this method and {@link Phaser.Math.Angle.Between} is that this assumes the y coordinate + * travels down the screen. + * @param x1 The x coordinate of the first point. + * @param y1 The y coordinate of the first point. + * @param x2 The x coordinate of the second point. + * @param y2 The y coordinate of the second point. + */ + function BetweenY(x1: number, y1: number, x2: number, y2: number): number; + + /** + * Takes an angle in Phasers default clockwise format and converts it so that + * 0 is North, 90 is West, 180 is South and 270 is East, + * therefore running counter-clockwise instead of clockwise. + * + * You can pass in the angle from a Game Object using: + * + * ```javascript + * var converted = CounterClockwise(gameobject.rotation); + * ``` + * + * All values for this function are in radians. + * @param angle The angle to convert, in radians. + */ + function CounterClockwise(angle: number): number; + + /** + * Normalize an angle to the [0, 2pi] range. + * @param angle The angle to normalize, in radians. + */ + function Normalize(angle: number): number; + + /** + * Reverse the given angle. + * @param angle The angle to reverse, in radians. + */ + function Reverse(angle: number): number; + + /** + * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call. + * @param currentAngle The current angle, in radians. + * @param targetAngle The target angle to rotate to, in radians. + * @param lerp The lerp value to add to the current angle. Default 0.05. + */ + function RotateTo(currentAngle: number, targetAngle: number, lerp?: number): number; + + /** + * Gets the shortest angle between `angle1` and `angle2`. + * + * Both angles must be in the range -180 to 180, which is the same clamped + * range that `sprite.angle` uses, so you can pass in two sprite angles to + * this method and get the shortest angle back between the two of them. + * + * The angle returned will be in the same range. If the returned angle is + * greater than 0 then it's a counter-clockwise rotation, if < 0 then it's + * a clockwise rotation. + * + * TODO: Wrap the angles in this function? + * @param angle1 The first angle in the range -180 to 180. + * @param angle2 The second angle in the range -180 to 180. + */ + function ShortestBetween(angle1: number, angle2: number): number; + + /** + * Wrap an angle. + * + * Wraps the angle to a value in the range of -PI to PI. + * @param angle The angle to wrap, in radians. + */ + function Wrap(angle: number): number; + + /** + * Wrap an angle in degrees. + * + * Wraps the angle to a value in the range of -180 to 180. + * @param angle The angle to wrap, in degrees. + */ + function WrapDegrees(angle: number): number; + + } + /** * Calculate the mean average of the given values. * @param values The values to average. @@ -48370,6 +48857,49 @@ declare namespace Phaser { */ function Clamp(value: number, min: number, max: number): number; + /** + * The value of PI * 2. + */ + var PI2: number; + + /** + * The value of PI * 0.5. + */ + var TAU: number; + + /** + * An epsilon value (1.0e-6) + */ + var EPSILON: number; + + /** + * For converting degrees to radians (PI / 180) + */ + var DEG_TO_RAD: number; + + /** + * For converting radians to degrees (180 / PI) + */ + var RAD_TO_DEG: number; + + /** + * An instance of the Random Number Generator. + * This is not set until the Game boots. + */ + var RND: Phaser.Math.RandomDataGenerator; + + /** + * The minimum safe integer this browser supports. + * We use a const for backward compatibility with Internet Explorer. + */ + var MIN_SAFE_INTEGER: number; + + /** + * The maximum safe integer this browser supports. + * We use a const for backward compatibility with Internet Explorer. + */ + var MAX_SAFE_INTEGER: number; + /** * Convert the given angle from degrees, to the equivalent angle in radians. * @param degrees The angle (in degrees) to convert to radians. @@ -48383,6 +48913,316 @@ declare namespace Phaser { */ function Difference(a: number, b: number): number; + namespace Distance { + /** + * Calculate the distance between two sets of coordinates (points). + * @param x1 The x coordinate of the first point. + * @param y1 The y coordinate of the first point. + * @param x2 The x coordinate of the second point. + * @param y2 The y coordinate of the second point. + */ + function Between(x1: number, y1: number, x2: number, y2: number): number; + + /** + * Calculate the distance between two points. + * @param a The first point. + * @param b The second point. + */ + function BetweenPoints(a: Phaser.Types.Math.Vector2Like, b: Phaser.Types.Math.Vector2Like): number; + + /** + * Calculate the squared distance between two points. + * @param a The first point. + * @param b The second point. + */ + function BetweenPointsSquared(a: Phaser.Types.Math.Vector2Like, b: Phaser.Types.Math.Vector2Like): number; + + /** + * Calculate the Chebyshev distance between two sets of coordinates (points). + * + * Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances. + * It's the effective distance when movement can be horizontal, vertical, or diagonal. + * @param x1 The x coordinate of the first point. + * @param y1 The y coordinate of the first point. + * @param x2 The x coordinate of the second point. + * @param y2 The y coordinate of the second point. + */ + function Chebyshev(x1: number, y1: number, x2: number, y2: number): number; + + /** + * Calculate the distance between two sets of coordinates (points) to the power of `pow`. + * @param x1 The x coordinate of the first point. + * @param y1 The y coordinate of the first point. + * @param x2 The x coordinate of the second point. + * @param y2 The y coordinate of the second point. + * @param pow The exponent. + */ + function Power(x1: number, y1: number, x2: number, y2: number, pow: number): number; + + /** + * Calculate the snake distance between two sets of coordinates (points). + * + * Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances. + * It's the effective distance when movement is allowed only horizontally or vertically (but not both). + * @param x1 The x coordinate of the first point. + * @param y1 The y coordinate of the first point. + * @param x2 The x coordinate of the second point. + * @param y2 The y coordinate of the second point. + */ + function Snake(x1: number, y1: number, x2: number, y2: number): number; + + /** + * Calculate the distance between two sets of coordinates (points), squared. + * @param x1 The x coordinate of the first point. + * @param y1 The y coordinate of the first point. + * @param x2 The x coordinate of the second point. + * @param y2 The y coordinate of the second point. + */ + function Squared(x1: number, y1: number, x2: number, y2: number): number; + + } + + namespace Easing { + namespace Back { + /** + * Back ease-in. + * @param v The value to be tweened. + * @param overshoot The overshoot amount. Default 1.70158. + */ + function In(v: number, overshoot?: number): number; + + /** + * Back ease-in/out. + * @param v The value to be tweened. + * @param overshoot The overshoot amount. Default 1.70158. + */ + function InOut(v: number, overshoot?: number): number; + + /** + * Back ease-out. + * @param v The value to be tweened. + * @param overshoot The overshoot amount. Default 1.70158. + */ + function Out(v: number, overshoot?: number): number; + + } + + namespace Bounce { + /** + * Bounce ease-in. + * @param v The value to be tweened. + */ + function In(v: number): number; + + /** + * Bounce ease-in/out. + * @param v The value to be tweened. + */ + function InOut(v: number): number; + + /** + * Bounce ease-out. + * @param v The value to be tweened. + */ + function Out(v: number): number; + + } + + namespace Circular { + /** + * Circular ease-in. + * @param v The value to be tweened. + */ + function In(v: number): number; + + /** + * Circular ease-in/out. + * @param v The value to be tweened. + */ + function InOut(v: number): number; + + /** + * Circular ease-out. + * @param v The value to be tweened. + */ + function Out(v: number): number; + + } + + namespace Cubic { + /** + * Cubic ease-in. + * @param v The value to be tweened. + */ + function In(v: number): number; + + /** + * Cubic ease-in/out. + * @param v The value to be tweened. + */ + function InOut(v: number): number; + + /** + * Cubic ease-out. + * @param v The value to be tweened. + */ + function Out(v: number): number; + + } + + namespace Elastic { + /** + * Elastic ease-in. + * @param v The value to be tweened. + * @param amplitude The amplitude of the elastic ease. Default 0.1. + * @param period Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles. Default 0.1. + */ + function In(v: number, amplitude?: number, period?: number): number; + + /** + * Elastic ease-in/out. + * @param v The value to be tweened. + * @param amplitude The amplitude of the elastic ease. Default 0.1. + * @param period Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles. Default 0.1. + */ + function InOut(v: number, amplitude?: number, period?: number): number; + + /** + * Elastic ease-out. + * @param v The value to be tweened. + * @param amplitude The amplitude of the elastic ease. Default 0.1. + * @param period Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles. Default 0.1. + */ + function Out(v: number, amplitude?: number, period?: number): number; + + } + + namespace Expo { + /** + * Exponential ease-in. + * @param v The value to be tweened. + */ + function In(v: number): number; + + /** + * Exponential ease-in/out. + * @param v The value to be tweened. + */ + function InOut(v: number): number; + + /** + * Exponential ease-out. + * @param v The value to be tweened. + */ + function Out(v: number): number; + + } + + namespace Linear { + /** + * Linear easing (no variation). + * @param v The value to be tweened. + */ + function Linear(v: number): number; + + } + + namespace Quadratic { + /** + * Quadratic ease-in. + * @param v The value to be tweened. + */ + function In(v: number): number; + + /** + * Quadratic ease-in/out. + * @param v The value to be tweened. + */ + function InOut(v: number): number; + + /** + * Quadratic ease-out. + * @param v The value to be tweened. + */ + function Out(v: number): number; + + } + + namespace Quartic { + /** + * Quartic ease-in. + * @param v The value to be tweened. + */ + function In(v: number): number; + + /** + * Quartic ease-in/out. + * @param v The value to be tweened. + */ + function InOut(v: number): number; + + /** + * Quartic ease-out. + * @param v The value to be tweened. + */ + function Out(v: number): number; + + } + + namespace Quintic { + /** + * Quintic ease-in. + * @param v The value to be tweened. + */ + function In(v: number): number; + + /** + * Quintic ease-in/out. + * @param v The value to be tweened. + */ + function InOut(v: number): number; + + /** + * Quintic ease-out. + * @param v The value to be tweened. + */ + function Out(v: number): number; + + } + + namespace Sine { + /** + * Sinusoidal ease-in. + * @param v The value to be tweened. + */ + function In(v: number): number; + + /** + * Sinusoidal ease-in/out. + * @param v The value to be tweened. + */ + function InOut(v: number): number; + + /** + * Sinusoidal ease-out. + * @param v The value to be tweened. + */ + function Out(v: number): number; + + } + + namespace Stepped { + /** + * Stepped easing. + * @param v The value to be tweened. + * @param steps The number of steps in the ease. Default 1. + */ + function Stepped(v: number, steps?: number): number; + + } + + } + /** * Calculates the factorial of a given number for integer values greater than 0. * @param value A positive integer to calculate the factorial of. @@ -48414,6 +49254,53 @@ declare namespace Phaser { */ function FromPercent(percent: number, min: number, max?: number): number; + namespace Fuzzy { + /** + * Calculate the fuzzy ceiling of the given value. + * @param value The value. + * @param epsilon The epsilon. Default 0.0001. + */ + function Ceil(value: number, epsilon?: number): number; + + /** + * Check whether the given values are fuzzily equal. + * + * Two numbers are fuzzily equal if their difference is less than `epsilon`. + * @param a The first value. + * @param b The second value. + * @param epsilon The epsilon. Default 0.0001. + */ + function Equal(a: number, b: number, epsilon?: number): boolean; + + /** + * Calculate the fuzzy floor of the given value. + * @param value The value. + * @param epsilon The epsilon. Default 0.0001. + */ + function Floor(value: number, epsilon?: number): number; + + /** + * Check whether `a` is fuzzily greater than `b`. + * + * `a` is fuzzily greater than `b` if it is more than `b - epsilon`. + * @param a The first value. + * @param b The second value. + * @param epsilon The epsilon. Default 0.0001. + */ + function GreaterThan(a: number, b: number, epsilon?: number): boolean; + + /** + * Check whether `a` is fuzzily less than `b`. + * + * `a` is fuzzily less than `b` if it is less than `b + epsilon`. + * @param a The first value. + * @param b The second value. + * @param epsilon The epsilon. Default 0.0001. + */ + function LessThan(a: number, b: number, epsilon?: number): boolean; + + } + /** * Calculate a per-ms speed from a distance and time (given in seconds). * @param distance The distance. @@ -48421,6 +49308,67 @@ declare namespace Phaser { */ function GetSpeed(distance: number, time: integer): number; + namespace Interpolation { + /** + * A bezier interpolation method. + * @param v The input array of values to interpolate between. + * @param k The percentage of interpolation, between 0 and 1. + */ + function Bezier(v: number[], k: number): number; + + /** + * A Catmull-Rom interpolation method. + * @param v The input array of values to interpolate between. + * @param k The percentage of interpolation, between 0 and 1. + */ + function CatmullRom(v: number[], k: number): number; + + /** + * A cubic bezier interpolation method. + * + * https://medium.com/@adrian_cooney/bezier-interpolation-13b68563313a + * @param t The percentage of interpolation, between 0 and 1. + * @param p0 The start point. + * @param p1 The first control point. + * @param p2 The second control point. + * @param p3 The end point. + */ + function CubicBezier(t: number, p0: number, p1: number, p2: number, p3: number): number; + + /** + * A linear interpolation method. + * @param v The input array of values to interpolate between. + * @param k The percentage of interpolation, between 0 and 1. + */ + function Linear(v: number[], k: number): number; + + /** + * A quadratic bezier interpolation method. + * @param t The percentage of interpolation, between 0 and 1. + * @param p0 The start point. + * @param p1 The control point. + * @param p2 The end point. + */ + function QuadraticBezier(t: number, p0: number, p1: number, p2: number): number; + + /** + * A Smoother Step interpolation method. + * @param t The percentage of interpolation, between 0 and 1. + * @param min The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'. + * @param max The maximum value, also known as the 'right edge', assumed greater than the 'left edge'. + */ + function SmootherStep(t: number, min: number, max: number): number; + + /** + * A Smooth Step interpolation method. + * @param t The percentage of interpolation, between 0 and 1. + * @param min The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'. + * @param max The maximum value, also known as the 'right edge', assumed greater than the 'left edge'. + */ + function SmoothStep(t: number, min: number, max: number): number; + + } + /** * Check if a given value is an even number. * @param value The number to perform the check with. @@ -48821,6 +49769,29 @@ declare namespace Phaser { */ function Percent(value: number, min: number, max?: number, upperMax?: number): number; + namespace Pow2 { + /** + * Returns the nearest power of 2 to the given `value`. + * @param value The value. + */ + function GetNext(value: number): integer; + + /** + * Checks if the given `width` and `height` are a power of two. + * Useful for checking texture dimensions. + * @param width The width. + * @param height The height. + */ + function IsSize(width: number, height: number): boolean; + + /** + * Tests the value and returns `true` if it is a power of two. + * @param value The value to check if it's a power of two. + */ + function IsValue(value: number): boolean; + + } + /** * A quaternion. */ @@ -49006,6 +49977,149 @@ declare namespace Phaser { */ function RadToDeg(radians: number): integer; + /** + * A seeded Random Data Generator. + * + * Access via `Phaser.Math.RND` which is an instance of this class pre-defined + * by Phaser. Or, create your own instance to use as you require. + * + * The `Math.RND` generator is seeded by the Game Config property value `seed`. + * If no such config property exists, a random number is used. + * + * If you create your own instance of this class you should provide a seed for it. + * If no seed is given it will use a 'random' one based on Date.now. + */ + class RandomDataGenerator { + /** + * + * @param seeds The seeds to use for the random number generator. + */ + constructor(seeds?: string | string[]); + + /** + * Signs to choose from. + */ + signs: number[]; + + /** + * Initialize the state of the random data generator. + * @param seeds The seeds to initialize the random data generator with. + */ + init(seeds: string | string[]): void; + + /** + * Reset the seed of the random data generator. + * + * _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. + */ + sow(seeds: string[]): void; + + /** + * Returns a random integer between 0 and 2^32. + */ + integer(): number; + + /** + * Returns a random real number between 0 and 1. + */ + frac(): number; + + /** + * Returns a random real number between 0 and 2^32. + */ + real(): 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. + */ + integerInRange(min: number, max: number): number; + + /** + * 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. + */ + between(min: number, max: number): 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. + */ + realInRange(min: number, max: number): number; + + /** + * Returns a random real number between -1 and 1. + */ + normal(): number; + + /** + * Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368 + */ + uuid(): string; + + /** + * Returns a random element from within the given array. + * @param array The array to pick a random element from. + */ + pick(array: T[]): T; + + /** + * Returns a sign to be used with multiplication operator. + */ + sign(): number; + + /** + * Returns a random element from within the given array, favoring the earlier entries. + * @param array The array to pick a random element from. + */ + weightedPick(array: T[]): T; + + /** + * 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. + */ + timestamp(min: number, max: number): number; + + /** + * Returns a random angle between -180 and 180. + */ + angle(): number; + + /** + * Returns a random rotation in radians, between -3.141 and 3.141 + */ + rotation(): number; + + /** + * Gets or Sets the state of the generator. This allows you to retain the values + * that the generator is using between games, i.e. in a game save file. + * + * To seed this generator with a previously saved state you can pass it as the + * `seed` value in your game config, or call this method directly after Phaser has booted. + * + * Call this method with no parameters to return the current state. + * + * If providing a state it should match the same format that this method + * returns, which is a string with a header `!rnd` followed by the `c`, + * `s0`, `s1` and `s2` values respectively, each comma-delimited. + * @param state Generator state to be set. + */ + state(state?: string): string; + + /** + * Shuffles the given array, using the current seed. + * @param array The array to be shuffled. + */ + shuffle(array?: T[]): T[]; + + } + /** * Compute a random unit vector. * @@ -49108,18 +50222,6 @@ declare namespace Phaser { */ function SinCosTableGenerator(length: number, sinAmp?: number, cosAmp?: number, frequency?: number): Phaser.Types.Math.SinCosTable; - /** - * Calculate a smooth interpolation percentage of `x` between `min` and `max`. - * - * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge, - * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial, - * between 0 and 1 otherwise. - * @param x The input value. - * @param min The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'. - * @param max The maximum value, also known as the 'right edge', assumed greater than the 'left edge'. - */ - function SmoothStep(x: number, min: number, max: number): number; - /** * Calculate a smoother interpolation percentage of `x` between `min` and `max`. * @@ -49135,11 +50237,61 @@ declare namespace Phaser { function SmootherStep(x: number, min: number, max: number): number; /** - * Returns a Vec2 containing the x and y position of the given index in a `width` x `height` sized grid. + * Calculate a smooth interpolation percentage of `x` between `min` and `max`. + * + * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge, + * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial, + * between 0 and 1 otherwise. + * @param x The input value. + * @param min The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'. + * @param max The maximum value, also known as the 'right edge', assumed greater than the 'left edge'. + */ + function SmoothStep(x: number, min: number, max: number): number; + + namespace Snap { + /** + * Snap a value to nearest grid slice, using ceil. + * + * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `15`. + * As will `14` snap to `15`... but `16` will snap to `20`. + * @param value The value to snap. + * @param gap The interval gap of the grid. + * @param start Optional starting offset for gap. Default 0. + * @param divide If `true` it will divide the snapped value by the gap before returning. Default false. + */ + function Ceil(value: number, gap: number, start?: number, divide?: boolean): number; + + /** + * Snap a value to nearest grid slice, using floor. + * + * 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 value The value to snap. + * @param gap The interval gap of the grid. + * @param start Optional starting offset for gap. Default 0. + * @param divide If `true` it will divide the snapped value by the gap before returning. Default false. + */ + function Floor(value: number, gap: number, start?: number, divide?: boolean): number; + + /** + * Snap a value to nearest grid slice, using rounding. + * + * 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 value The value to snap. + * @param gap The interval gap of the grid. + * @param start Optional starting offset for gap. Default 0. + * @param divide If `true` it will divide the snapped value by the gap before returning. Default false. + */ + function To(value: number, gap: number, start?: number, divide?: boolean): number; + + } + + /** + * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid. * * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2. * - * If the given index is out of range an empty Vec2 is returned. + * If the given index is out of range an empty Vector2 is returned. * @param index The position within the grid to get the x/y value for. * @param width The width of the grid. * @param height The height of the grid. @@ -49838,783 +50990,6 @@ declare namespace Phaser { */ function Wrap(value: number, min: number, max: number): number; - namespace Angle { - /** - * Find the angle of a segment from (x1, y1) -> (x2, y2). - * @param x1 The x coordinate of the first point. - * @param y1 The y coordinate of the first point. - * @param x2 The x coordinate of the second point. - * @param y2 The y coordinate of the second point. - */ - function Between(x1: number, y1: number, x2: number, y2: number): number; - - /** - * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y). - * - * Calculates the angle of the vector from the first point to the second point. - * @param point1 The first point. - * @param point2 The second point. - */ - function BetweenPoints(point1: Phaser.Geom.Point | object, point2: Phaser.Geom.Point | object): number; - - /** - * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y). - * - * The difference between this method and {@link Phaser.Math.Angle.BetweenPoints} is that this assumes the y coordinate - * travels down the screen. - * @param point1 The first point. - * @param point2 The second point. - */ - function BetweenPointsY(point1: Phaser.Geom.Point | object, point2: Phaser.Geom.Point | object): number; - - /** - * Find the angle of a segment from (x1, y1) -> (x2, y2). - * - * The difference between this method and {@link Phaser.Math.Angle.Between} is that this assumes the y coordinate - * travels down the screen. - * @param x1 The x coordinate of the first point. - * @param y1 The y coordinate of the first point. - * @param x2 The x coordinate of the second point. - * @param y2 The y coordinate of the second point. - */ - function BetweenY(x1: number, y1: number, x2: number, y2: number): number; - - /** - * Takes an angle in Phasers default clockwise format and converts it so that - * 0 is North, 90 is West, 180 is South and 270 is East, - * therefore running counter-clockwise instead of clockwise. - * - * You can pass in the angle from a Game Object using: - * - * ```javascript - * var converted = CounterClockwise(gameobject.rotation); - * ``` - * - * All values for this function are in radians. - * @param angle The angle to convert, in radians. - */ - function CounterClockwise(angle: number): number; - - /** - * Normalize an angle to the [0, 2pi] range. - * @param angle The angle to normalize, in radians. - */ - function Normalize(angle: number): number; - - /** - * Reverse the given angle. - * @param angle The angle to reverse, in radians. - */ - function Reverse(angle: number): number; - - /** - * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call. - * @param currentAngle The current angle, in radians. - * @param targetAngle The target angle to rotate to, in radians. - * @param lerp The lerp value to add to the current angle. Default 0.05. - */ - function RotateTo(currentAngle: number, targetAngle: number, lerp?: number): number; - - /** - * Gets the shortest angle between `angle1` and `angle2`. - * - * Both angles must be in the range -180 to 180, which is the same clamped - * range that `sprite.angle` uses, so you can pass in two sprite angles to - * this method and get the shortest angle back between the two of them. - * - * The angle returned will be in the same range. If the returned angle is - * greater than 0 then it's a counter-clockwise rotation, if < 0 then it's - * a clockwise rotation. - * - * TODO: Wrap the angles in this function? - * @param angle1 The first angle in the range -180 to 180. - * @param angle2 The second angle in the range -180 to 180. - */ - function ShortestBetween(angle1: number, angle2: number): number; - - /** - * Wrap an angle. - * - * Wraps the angle to a value in the range of -PI to PI. - * @param angle The angle to wrap, in radians. - */ - function Wrap(angle: number): number; - - /** - * Wrap an angle in degrees. - * - * Wraps the angle to a value in the range of -180 to 180. - * @param angle The angle to wrap, in degrees. - */ - function WrapDegrees(angle: number): number; - - } - - /** - * The value of PI * 2. - */ - var PI2: number; - - /** - * The value of PI * 0.5. - */ - var TAU: number; - - /** - * An epsilon value (1.0e-6) - */ - var EPSILON: number; - - /** - * For converting degrees to radians (PI / 180) - */ - var DEG_TO_RAD: number; - - /** - * For converting radians to degrees (180 / PI) - */ - var RAD_TO_DEG: number; - - /** - * An instance of the Random Number Generator. - * This is not set until the Game boots. - */ - var RND: Phaser.Math.RandomDataGenerator; - - /** - * The minimum safe integer this browser supports. - * We use a const for backward compatibility with Internet Explorer. - */ - var MIN_SAFE_INTEGER: number; - - /** - * The maximum safe integer this browser supports. - * We use a const for backward compatibility with Internet Explorer. - */ - var MAX_SAFE_INTEGER: number; - - namespace Distance { - /** - * Calculate the distance between two sets of coordinates (points). - * @param x1 The x coordinate of the first point. - * @param y1 The y coordinate of the first point. - * @param x2 The x coordinate of the second point. - * @param y2 The y coordinate of the second point. - */ - function Between(x1: number, y1: number, x2: number, y2: number): number; - - /** - * Calculate the distance between two points. - * @param a The first point. - * @param b The second point. - */ - function BetweenPoints(a: Phaser.Types.Math.Vector2Like, b: Phaser.Types.Math.Vector2Like): number; - - /** - * Calculate the squared distance between two points. - * @param a The first point. - * @param b The second point. - */ - function BetweenPointsSquared(a: Phaser.Types.Math.Vector2Like, b: Phaser.Types.Math.Vector2Like): number; - - /** - * Calculate the Chebyshev distance between two sets of coordinates (points). - * - * Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances. - * It's the effective distance when movement can be horizontal, vertical, or diagonal. - * @param x1 The x coordinate of the first point. - * @param y1 The y coordinate of the first point. - * @param x2 The x coordinate of the second point. - * @param y2 The y coordinate of the second point. - */ - function Chebyshev(x1: number, y1: number, x2: number, y2: number): number; - - /** - * Calculate the distance between two sets of coordinates (points) to the power of `pow`. - * @param x1 The x coordinate of the first point. - * @param y1 The y coordinate of the first point. - * @param x2 The x coordinate of the second point. - * @param y2 The y coordinate of the second point. - * @param pow The exponent. - */ - function Power(x1: number, y1: number, x2: number, y2: number, pow: number): number; - - /** - * Calculate the snake distance between two sets of coordinates (points). - * - * Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances. - * It's the effective distance when movement is allowed only horizontally or vertically (but not both). - * @param x1 The x coordinate of the first point. - * @param y1 The y coordinate of the first point. - * @param x2 The x coordinate of the second point. - * @param y2 The y coordinate of the second point. - */ - function Snake(x1: number, y1: number, x2: number, y2: number): number; - - /** - * Calculate the distance between two sets of coordinates (points), squared. - * @param x1 The x coordinate of the first point. - * @param y1 The y coordinate of the first point. - * @param x2 The x coordinate of the second point. - * @param y2 The y coordinate of the second point. - */ - function Squared(x1: number, y1: number, x2: number, y2: number): number; - - } - - namespace Easing { - namespace Back { - /** - * Back ease-in. - * @param v The value to be tweened. - * @param overshoot The overshoot amount. Default 1.70158. - */ - function In(v: number, overshoot?: number): number; - - /** - * Back ease-in/out. - * @param v The value to be tweened. - * @param overshoot The overshoot amount. Default 1.70158. - */ - function InOut(v: number, overshoot?: number): number; - - /** - * Back ease-out. - * @param v The value to be tweened. - * @param overshoot The overshoot amount. Default 1.70158. - */ - function Out(v: number, overshoot?: number): number; - - } - - namespace Bounce { - /** - * Bounce ease-in. - * @param v The value to be tweened. - */ - function In(v: number): number; - - /** - * Bounce ease-in/out. - * @param v The value to be tweened. - */ - function InOut(v: number): number; - - /** - * Bounce ease-out. - * @param v The value to be tweened. - */ - function Out(v: number): number; - - } - - namespace Circular { - /** - * Circular ease-in. - * @param v The value to be tweened. - */ - function In(v: number): number; - - /** - * Circular ease-in/out. - * @param v The value to be tweened. - */ - function InOut(v: number): number; - - /** - * Circular ease-out. - * @param v The value to be tweened. - */ - function Out(v: number): number; - - } - - namespace Cubic { - /** - * Cubic ease-in. - * @param v The value to be tweened. - */ - function In(v: number): number; - - /** - * Cubic ease-in/out. - * @param v The value to be tweened. - */ - function InOut(v: number): number; - - /** - * Cubic ease-out. - * @param v The value to be tweened. - */ - function Out(v: number): number; - - } - - namespace Elastic { - /** - * Elastic ease-in. - * @param v The value to be tweened. - * @param amplitude The amplitude of the elastic ease. Default 0.1. - * @param period Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles. Default 0.1. - */ - function In(v: number, amplitude?: number, period?: number): number; - - /** - * Elastic ease-in/out. - * @param v The value to be tweened. - * @param amplitude The amplitude of the elastic ease. Default 0.1. - * @param period Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles. Default 0.1. - */ - function InOut(v: number, amplitude?: number, period?: number): number; - - /** - * Elastic ease-out. - * @param v The value to be tweened. - * @param amplitude The amplitude of the elastic ease. Default 0.1. - * @param period Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles. Default 0.1. - */ - function Out(v: number, amplitude?: number, period?: number): number; - - } - - namespace Expo { - /** - * Exponential ease-in. - * @param v The value to be tweened. - */ - function In(v: number): number; - - /** - * Exponential ease-in/out. - * @param v The value to be tweened. - */ - function InOut(v: number): number; - - /** - * Exponential ease-out. - * @param v The value to be tweened. - */ - function Out(v: number): number; - - } - - namespace Linear { - /** - * Linear easing (no variation). - * @param v The value to be tweened. - */ - function Linear(v: number): number; - - } - - namespace Quadratic { - /** - * Quadratic ease-in. - * @param v The value to be tweened. - */ - function In(v: number): number; - - /** - * Quadratic ease-in/out. - * @param v The value to be tweened. - */ - function InOut(v: number): number; - - /** - * Quadratic ease-out. - * @param v The value to be tweened. - */ - function Out(v: number): number; - - } - - namespace Quartic { - /** - * Quartic ease-in. - * @param v The value to be tweened. - */ - function In(v: number): number; - - /** - * Quartic ease-in/out. - * @param v The value to be tweened. - */ - function InOut(v: number): number; - - /** - * Quartic ease-out. - * @param v The value to be tweened. - */ - function Out(v: number): number; - - } - - namespace Quintic { - /** - * Quintic ease-in. - * @param v The value to be tweened. - */ - function In(v: number): number; - - /** - * Quintic ease-in/out. - * @param v The value to be tweened. - */ - function InOut(v: number): number; - - /** - * Quintic ease-out. - * @param v The value to be tweened. - */ - function Out(v: number): number; - - } - - namespace Sine { - /** - * Sinusoidal ease-in. - * @param v The value to be tweened. - */ - function In(v: number): number; - - /** - * Sinusoidal ease-in/out. - * @param v The value to be tweened. - */ - function InOut(v: number): number; - - /** - * Sinusoidal ease-out. - * @param v The value to be tweened. - */ - function Out(v: number): number; - - } - - namespace Stepped { - /** - * Stepped easing. - * @param v The value to be tweened. - * @param steps The number of steps in the ease. Default 1. - */ - function Stepped(v: number, steps?: number): number; - - } - - } - - namespace Fuzzy { - /** - * Calculate the fuzzy ceiling of the given value. - * @param value The value. - * @param epsilon The epsilon. Default 0.0001. - */ - function Ceil(value: number, epsilon?: number): number; - - /** - * Check whether the given values are fuzzily equal. - * - * Two numbers are fuzzily equal if their difference is less than `epsilon`. - * @param a The first value. - * @param b The second value. - * @param epsilon The epsilon. Default 0.0001. - */ - function Equal(a: number, b: number, epsilon?: number): boolean; - - /** - * Calculate the fuzzy floor of the given value. - * @param value The value. - * @param epsilon The epsilon. Default 0.0001. - */ - function Floor(value: number, epsilon?: number): number; - - /** - * Check whether `a` is fuzzily greater than `b`. - * - * `a` is fuzzily greater than `b` if it is more than `b - epsilon`. - * @param a The first value. - * @param b The second value. - * @param epsilon The epsilon. Default 0.0001. - */ - function GreaterThan(a: number, b: number, epsilon?: number): boolean; - - /** - * Check whether `a` is fuzzily less than `b`. - * - * `a` is fuzzily less than `b` if it is less than `b + epsilon`. - * @param a The first value. - * @param b The second value. - * @param epsilon The epsilon. Default 0.0001. - */ - function LessThan(a: number, b: number, epsilon?: number): boolean; - - } - - namespace Interpolation { - /** - * A bezier interpolation method. - * @param v The input array of values to interpolate between. - * @param k The percentage of interpolation, between 0 and 1. - */ - function Bezier(v: number[], k: number): number; - - /** - * A Catmull-Rom interpolation method. - * @param v The input array of values to interpolate between. - * @param k The percentage of interpolation, between 0 and 1. - */ - function CatmullRom(v: number[], k: number): number; - - /** - * A cubic bezier interpolation method. - * - * https://medium.com/@adrian_cooney/bezier-interpolation-13b68563313a - * @param t The percentage of interpolation, between 0 and 1. - * @param p0 The start point. - * @param p1 The first control point. - * @param p2 The second control point. - * @param p3 The end point. - */ - function CubicBezier(t: number, p0: number, p1: number, p2: number, p3: number): number; - - /** - * A linear interpolation method. - * @param v The input array of values to interpolate between. - * @param k The percentage of interpolation, between 0 and 1. - */ - function Linear(v: number[], k: number): number; - - /** - * A quadratic bezier interpolation method. - * @param t The percentage of interpolation, between 0 and 1. - * @param p0 The start point. - * @param p1 The control point. - * @param p2 The end point. - */ - function QuadraticBezier(t: number, p0: number, p1: number, p2: number): number; - - /** - * A Smooth Step interpolation method. - * @param t The percentage of interpolation, between 0 and 1. - * @param min The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'. - * @param max The maximum value, also known as the 'right edge', assumed greater than the 'left edge'. - */ - function SmoothStep(t: number, min: number, max: number): number; - - /** - * A Smoother Step interpolation method. - * @param t The percentage of interpolation, between 0 and 1. - * @param min The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'. - * @param max The maximum value, also known as the 'right edge', assumed greater than the 'left edge'. - */ - function SmootherStep(t: number, min: number, max: number): number; - - } - - namespace Pow2 { - /** - * Returns the nearest power of 2 to the given `value`. - * @param value The value. - */ - function GetNext(value: number): integer; - - /** - * Checks if the given `width` and `height` are a power of two. - * Useful for checking texture dimensions. - * @param width The width. - * @param height The height. - */ - function IsSize(width: number, height: number): boolean; - - /** - * Tests the value and returns `true` if it is a power of two. - * @param value The value to check if it's a power of two. - */ - function IsValue(value: number): boolean; - - } - - /** - * A seeded Random Data Generator. - * - * Access via `Phaser.Math.RND` which is an instance of this class pre-defined - * by Phaser. Or, create your own instance to use as you require. - * - * The `Math.RND` generator is seeded by the Game Config property value `seed`. - * If no such config property exists, a random number is used. - * - * If you create your own instance of this class you should provide a seed for it. - * If no seed is given it will use a 'random' one based on Date.now. - */ - class RandomDataGenerator { - /** - * - * @param seeds The seeds to use for the random number generator. - */ - constructor(seeds?: string | string[]); - - /** - * Signs to choose from. - */ - signs: number[]; - - /** - * Initialize the state of the random data generator. - * @param seeds The seeds to initialize the random data generator with. - */ - init(seeds: string | string[]): void; - - /** - * Reset the seed of the random data generator. - * - * _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. - */ - sow(seeds: string[]): void; - - /** - * Returns a random integer between 0 and 2^32. - */ - integer(): number; - - /** - * Returns a random real number between 0 and 1. - */ - frac(): number; - - /** - * Returns a random real number between 0 and 2^32. - */ - real(): 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. - */ - integerInRange(min: number, max: number): number; - - /** - * 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. - */ - between(min: number, max: number): 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. - */ - realInRange(min: number, max: number): number; - - /** - * Returns a random real number between -1 and 1. - */ - normal(): number; - - /** - * Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368 - */ - uuid(): string; - - /** - * Returns a random element from within the given array. - * @param array The array to pick a random element from. - */ - pick(array: T[]): T; - - /** - * Returns a sign to be used with multiplication operator. - */ - sign(): number; - - /** - * Returns a random element from within the given array, favoring the earlier entries. - * @param array The array to pick a random element from. - */ - weightedPick(array: T[]): T; - - /** - * 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. - */ - timestamp(min: number, max: number): number; - - /** - * Returns a random angle between -180 and 180. - */ - angle(): number; - - /** - * Returns a random rotation in radians, between -3.141 and 3.141 - */ - rotation(): number; - - /** - * Gets or Sets the state of the generator. This allows you to retain the values - * that the generator is using between games, i.e. in a game save file. - * - * To seed this generator with a previously saved state you can pass it as the - * `seed` value in your game config, or call this method directly after Phaser has booted. - * - * Call this method with no parameters to return the current state. - * - * If providing a state it should match the same format that this method - * returns, which is a string with a header `!rnd` followed by the `c`, - * `s0`, `s1` and `s2` values respectively, each comma-delimited. - * @param state Generator state to be set. - */ - state(state?: string): string; - - /** - * Shuffles the given array, using the current seed. - * @param array The array to be shuffled. - */ - shuffle(array?: T[]): T[]; - - } - - namespace Snap { - /** - * Snap a value to nearest grid slice, using ceil. - * - * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `15`. - * As will `14` snap to `15`... but `16` will snap to `20`. - * @param value The value to snap. - * @param gap The interval gap of the grid. - * @param start Optional starting offset for gap. Default 0. - * @param divide If `true` it will divide the snapped value by the gap before returning. Default false. - */ - function Ceil(value: number, gap: number, start?: number, divide?: boolean): number; - - /** - * Snap a value to nearest grid slice, using floor. - * - * 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 value The value to snap. - * @param gap The interval gap of the grid. - * @param start Optional starting offset for gap. Default 0. - * @param divide If `true` it will divide the snapped value by the gap before returning. Default false. - */ - function Floor(value: number, gap: number, start?: number, divide?: boolean): number; - - /** - * Snap a value to nearest grid slice, using rounding. - * - * 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 value The value to snap. - * @param gap The interval gap of the grid. - * @param start Optional starting offset for gap. Default 0. - * @param divide If `true` it will divide the snapped value by the gap before returning. Default false. - */ - function To(value: number, gap: number, start?: number, divide?: boolean): number; - - } - } /** @@ -53438,6 +53813,8 @@ declare namespace Phaser { shift?: Phaser.Input.Keyboard.Key; }; + type KeyboardKeydownCallback = (event: KeyboardEvent)=>void; + type KeyComboConfig = { /** * If they press the wrong key do we reset the combo? @@ -53457,8 +53834,6 @@ declare namespace Phaser { deleteOnMatch?: boolean; }; - type KeyboardKeydownCallback = (event: KeyboardEvent)=>void; - } /** @@ -54059,44 +54434,6 @@ declare namespace Phaser { xhrSettings?: Phaser.Types.Loader.XHRSettingsObject; }; - type SVGFileConfig = { - /** - * The key of the file. Must be unique within both the Loader and the Texture Manager. - */ - key: string; - /** - * The absolute or relative URL to load the file from. - */ - url?: string; - /** - * The default file extension to use if no url is provided. - */ - extension?: string; - /** - * Extra XHR Settings specifically for this file. - */ - xhrSettings?: Phaser.Types.Loader.XHRSettingsObject; - /** - * The svg size configuration object. - */ - svgConfig?: Phaser.Types.Loader.FileTypes.SVGSizeConfig; - }; - - type SVGSizeConfig = { - /** - * An optional width. The SVG will be resized to this size before being rendered to a texture. - */ - width?: integer; - /** - * An optional height. The SVG will be resized to this size before being rendered to a texture. - */ - height?: integer; - /** - * An optional scale. If given it overrides the width / height properties. The SVG is scaled by the scale factor before being rendered to a texture. - */ - scale?: number; - }; - type SceneFileConfig = { /** * The key of the file. Must be unique within both the Loader and the Text Cache. @@ -54189,6 +54526,44 @@ declare namespace Phaser { xhrSettings?: Phaser.Types.Loader.XHRSettingsObject; }; + type SVGFileConfig = { + /** + * The key of the file. Must be unique within both the Loader and the Texture Manager. + */ + key: string; + /** + * The absolute or relative URL to load the file from. + */ + url?: string; + /** + * The default file extension to use if no url is provided. + */ + extension?: string; + /** + * Extra XHR Settings specifically for this file. + */ + xhrSettings?: Phaser.Types.Loader.XHRSettingsObject; + /** + * The svg size configuration object. + */ + svgConfig?: Phaser.Types.Loader.FileTypes.SVGSizeConfig; + }; + + type SVGSizeConfig = { + /** + * An optional width. The SVG will be resized to this size before being rendered to a texture. + */ + width?: integer; + /** + * An optional height. The SVG will be resized to this size before being rendered to a texture. + */ + height?: integer; + /** + * An optional scale. If given it overrides the width / height properties. The SVG is scaled by the scale factor before being rendered to a texture. + */ + scale?: number; + }; + type TextFileConfig = { /** * The key of the file. Must be unique within both the Loader and the Text Cache. @@ -55095,6 +55470,182 @@ declare namespace Phaser { } namespace Matter { + type MatterBody = MatterJS.Body | Phaser.GameObjects.GameObject | Phaser.Physics.Matter.Image | Phaser.Physics.Matter.Sprite | Phaser.Physics.Matter.TileBody; + + type MatterBodyConfig = { + /** + * An arbitrary string-based name to help identify this body. + */ + label?: string; + /** + * An array of bodies that make up this body. The first body in the array must always be a self reference to the current body instance. All bodies in the `parts` array together form a single rigid compound body. + */ + parts?: MatterJS.Body[]; + /** + * An object reserved for storing plugin-specific properties. + */ + plugin?: any; + /** + * A number specifying the angle of the body, in radians. + */ + angle?: number; + /** + * An array of `Vector` objects that specify the convex hull of the rigid body. These should be provided about the origin `(0, 0)`. + */ + vertices?: Phaser.Types.Math.Vector2Like[]; + /** + * A `Vector` that specifies the current world-space position of the body. + */ + position?: Phaser.Types.Math.Vector2Like; + /** + * A `Vector` that specifies the force to apply in the current step. It is zeroed after every `Body.update`. See also `Body.applyForce`. + */ + force?: Phaser.Types.Math.Vector2Like; + /** + * A `Number` that specifies the torque (turning force) to apply in the current step. It is zeroed after every `Body.update`. + */ + torque?: number; + /** + * A flag that indicates whether a body is a sensor. Sensor triggers collision events, but doesn't react with colliding body physically. + */ + isSensor?: boolean; + /** + * A flag that indicates whether a body is considered static. A static body can never change position or angle and is completely fixed. + */ + isStatic?: boolean; + /** + * A `Number` that defines the number of updates in which this body must have near-zero velocity before it is set as sleeping by the `Matter.Sleeping` module (if sleeping is enabled by the engine). + */ + sleepThreshold?: number; + /** + * A `Number` that defines the density of the body, that is its mass per unit area. If you pass the density via `Body.create` the `mass` property is automatically calculated for you based on the size (area) of the object. This is generally preferable to simply setting mass and allows for more intuitive definition of materials (e.g. rock has a higher density than wood). + */ + density?: number; + /** + * A `Number` that defines the restitution (elasticity) of the body. The value is always positive and is in the range `(0, 1)`. + */ + restitution?: number; + /** + * A `Number` that defines the friction of the body. The value is always positive and is in the range `(0, 1)`. A value of `0` means that the body may slide indefinitely. A value of `1` means the body may come to a stop almost instantly after a force is applied. + */ + friction?: number; + /** + * A `Number` that defines the static friction of the body (in the Coulomb friction model). A value of `0` means the body will never 'stick' when it is nearly stationary and only dynamic `friction` is used. The higher the value (e.g. `10`), the more force it will take to initially get the body moving when nearly stationary. This value is multiplied with the `friction` property to make it easier to change `friction` and maintain an appropriate amount of static friction. + */ + frictionStatic?: number; + /** + * A `Number` that defines the air friction of the body (air resistance). A value of `0` means the body will never slow as it moves through space. The higher the value, the faster a body slows when moving through space. + */ + frictionAir?: number; + /** + * An `Object` that specifies the collision filtering properties of this body. + */ + collisionFilter?: Phaser.Types.Physics.Matter.MatterCollisionFilter; + /** + * A `Number` that specifies a tolerance on how far a body is allowed to 'sink' or rotate into other bodies. Avoid changing this value unless you understand the purpose of `slop` in physics engines. The default should generally suffice, although very large bodies may require larger values for stable stacking. + */ + slop?: number; + /** + * A `Number` that allows per-body time scaling, e.g. a force-field where bodies inside are in slow-motion, while others are at full speed. + */ + timeScale?: number; + /** + * A number, or array of numbers, to chamfer the vertices of the body, or a full Chamfer configuration object. + */ + chamfer?: number | number[] | Phaser.Types.Physics.Matter.MatterChamferConfig; + /** + * The radius of this body if a circle. + */ + circleRadius?: number; + /** + * A `Number` that defines the mass of the body, although it may be more appropriate to specify the `density` property instead. If you modify this value, you must also modify the `body.inverseMass` property (`1 / mass`). + */ + mass?: number; + /** + * A `Number` that defines the inverse mass of the body (`1 / mass`). If you modify this value, you must also modify the `body.mass` property. + */ + inverseMass?: number; + /** + * A `Vector` that specifies the initial scale of the body. + */ + scale?: Phaser.Types.Math.Vector2Like; + /** + * A `Vector` that scales the influence of World gravity when applied to this body. + */ + gravityScale?: Phaser.Types.Math.Vector2Like; + /** + * A boolean that toggles if this body should ignore world gravity or not. + */ + ignoreGravity?: boolean; + /** + * A boolean that toggles if this body should ignore pointer / mouse constraints or not. + */ + ignorePointer?: boolean; + /** + * The Debug Render configuration object for this body. + */ + render?: Phaser.Types.Physics.Matter.MatterBodyRenderConfig; + /** + * A callback that is invoked when this Body starts colliding with any other Body. You can register callbacks by providing a function of type `( pair: Matter.Pair) => void`. + */ + onCollideCallback?: Function; + /** + * A callback that is invoked when this Body stops colliding with any other Body. You can register callbacks by providing a function of type `( pair: Matter.Pair) => void`. + */ + onCollideEndCallback?: Function; + /** + * A callback that is invoked for the duration that this Body is colliding with any other Body. You can register callbacks by providing a function of type `( pair: Matter.Pair) => void`. + */ + onCollideActiveCallback?: Function; + /** + * A collision callback dictionary used by the `Body.setOnCollideWith` function. + */ + onCollideWith?: any; + }; + + type MatterBodyRenderConfig = { + /** + * Should this body be rendered by the Debug Renderer? + */ + visible?: boolean; + /** + * The opacity of the body and all parts within it. + */ + opacity?: number; + /** + * The color value of the fill when rendering this body. + */ + fillColor?: number; + /** + * The opacity of the fill when rendering this body, a value between 0 and 1. + */ + fillOpacity?: number; + /** + * The color value of the line stroke when rendering this body. + */ + lineColor?: number; + /** + * The opacity of the line when rendering this body, a value between 0 and 1. + */ + lineOpacity?: number; + /** + * If rendering lines, the thickness of the line. + */ + lineThickness?: number; + /** + * Controls the offset between the body and the parent Game Object, if it has one. + */ + sprite?: object; + /** + * The horizontal offset between the body and the parent Game Object texture, if it has one. + */ + "sprite.xOffset"?: number; + /** + * The vertical offset between the body and the parent Game Object texture, if it has one. + */ + "sprite.yOffset"?: number; + }; + type MatterBodyTileOptions = { /** * Whether or not the newly created body should be made static. This defaults to true since typically tiles should not be moved. @@ -55106,6 +55657,25 @@ declare namespace Phaser { addToWorld?: boolean; }; + type MatterChamferConfig = { + /** + * A single number, or an array, to specify the radius for each vertex. + */ + radius?: number | number[]; + /** + * The quality of the chamfering. -1 means 'auto'. + */ + quality?: number; + /** + * The minimum quality of the chamfering. The higher this value, the more vertices are created. + */ + qualityMin?: number; + /** + * The maximum quality of the chamfering. The higher this value, the more vertices are created. + */ + qualityMax?: number; + }; + type MatterCollisionData = { /** * Have the pair collided or not? @@ -55142,19 +55712,19 @@ declare namespace Phaser { /** * The collision normal, facing away from Body A. */ - normal: vector; + normal: MatterJS.Vector; /** * The tangent of the collision normal. */ - tangent: vector; + tangent: MatterJS.Vector; /** * The penetration distances between the two bodies. */ - penetration: vector; + penetration: MatterJS.Vector; /** * An array of support points, either exactly one or two points. */ - supports: vector[]; + supports: MatterJS.Vector[]; /** * The resulting inverse mass from the collision. */ @@ -55177,6 +55747,43 @@ declare namespace Phaser { slop: number; }; + /** + * An `Object` that specifies the collision filtering properties of this body. + * + * Collisions between two bodies will obey the following rules: + * - If the two bodies have the same non-zero value of `collisionFilter.group`, + * they will always collide if the value is positive, and they will never collide + * if the value is negative. + * - If the two bodies have different values of `collisionFilter.group` or if one + * (or both) of the bodies has a value of 0, then the category/mask rules apply as follows: + * + * Each body belongs to a collision category, given by `collisionFilter.category`. This + * value is used as a bit field and the category should have only one bit set, meaning that + * the value of this property is a power of two in the range [1, 2^31]. Thus, there are 32 + * different collision categories available. + * + * Each body also defines a collision bitmask, given by `collisionFilter.mask` which specifies + * the categories it collides with (the value is the bitwise AND value of all these categories). + * + * Using the category/mask rules, two bodies `A` and `B` collide if each includes the other's + * category in its mask, i.e. `(categoryA & maskB) !== 0` and `(categoryB & maskA) !== 0` + * are both true. + */ + type MatterCollisionFilter = { + /** + * A bit field that specifies the collision category this body belongs to. The category value should have only one bit set, for example `0x0001`. This means there are up to 32 unique collision categories available. + */ + category?: number; + /** + * A bit mask that specifies the collision categories this body may collide with. + */ + mask?: number; + /** + * An Integer `Number`, that specifies the collision group this body belongs to. + */ + group?: number; + }; + type MatterCollisionPair = { /** * The unique auto-generated collision pair id. A combination of the body A and B IDs. @@ -55193,7 +55800,7 @@ declare namespace Phaser { /** * An array containing all of the active contacts between bodies A and B. */ - activeContacts: any[]; + activeContacts: MatterJS.Vector[]; /** * The amount of separation that occured between bodies A and B. */ @@ -55244,7 +55851,149 @@ declare namespace Phaser { slop: number; }; + type MatterConstraintConfig = { + /** + * An arbitrary string-based name to help identify this constraint. + */ + label?: string; + /** + * The first possible `Body` that this constraint is attached to. + */ + bodyA?: MatterJS.Body; + /** + * The second possible `Body` that this constraint is attached to. + */ + bodyB?: MatterJS.Body; + /** + * A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyA` if defined, otherwise a world-space position. + */ + pointA?: Phaser.Types.Math.Vector2Like; + /** + * A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyB` if defined, otherwise a world-space position. + */ + pointB?: Phaser.Types.Math.Vector2Like; + /** + * A `Number` that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts like a soft spring. + */ + stiffness?: number; + /** + * A `Number` that specifies the angular stiffness of the constraint. + */ + angularStiffness?: number; + /** + * The angleA of the constraint. If bodyA is set, the angle of bodyA is used instead. + */ + angleA?: number; + /** + * The angleB of the constraint. If bodyB is set, the angle of bodyB is used instead. + */ + angleB?: number; + /** + * A `Number` that specifies the damping of the constraint, i.e. the amount of resistance applied to each body based on their velocities to limit the amount of oscillation. Damping will only be apparent when the constraint also has a very low `stiffness`. A value of `0.1` means the constraint will apply heavy damping, resulting in little to no oscillation. A value of `0` means the constraint will apply no damping. + */ + damping?: number; + /** + * A `Number` that specifies the target resting length of the constraint. It is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. + */ + length?: number; + /** + * An object reserved for storing plugin-specific properties. + */ + plugin?: any; + /** + * The Debug Render configuration object for this constraint. + */ + render?: Phaser.Types.Physics.Matter.MatterConstraintRenderConfig; + }; + + type MatterConstraintRenderConfig = { + /** + * Should this constraint be rendered by the Debug Renderer? + */ + visible?: boolean; + /** + * If this constraint has anchors, should they be rendered? Pin constraints never have anchors. + */ + anchors?: boolean; + /** + * The color value of the line stroke when rendering this constraint. + */ + lineColor?: number; + /** + * The opacity of the line when rendering this constraint, a value between 0 and 1. + */ + lineOpacity?: number; + /** + * If rendering lines, the thickness of the line. + */ + lineThickness?: number; + /** + * The size of the circles drawn when rendering pin constraints. + */ + pinSize?: number; + /** + * The size of the circles drawn as the constraint anchors. + */ + anchorSize?: number; + /** + * The color value of constraint anchors. + */ + anchorColor?: number; + }; + type MatterDebugConfig = { + /** + * Render all of the body axes? + */ + showAxes?: boolean; + /** + * Render just a single body axis? + */ + showAngleIndicator?: boolean; + /** + * The color of the body angle / axes lines. + */ + angleColor?: boolean; + /** + * Render the broadphase grid? + */ + showBroadphase?: boolean; + /** + * The color of the broadphase grid. + */ + broadphaseColor?: boolean; + /** + * Render the bounds of the bodies in the world? + */ + showBounds?: boolean; + /** + * The color of the body bounds. + */ + boundsColor?: boolean; + /** + * Render the velocity of the bodies in the world? + */ + showVelocity?: boolean; + /** + * The color of the body velocity line. + */ + velocityColor?: boolean; + /** + * Render the collision points and normals for colliding pairs. + */ + showCollisions?: boolean; + /** + * The color of the collision points. + */ + collisionColor?: boolean; + /** + * Render lines showing the separation between bodies. + */ + showSeparation?: boolean; + /** + * The color of the body separation line. + */ + separationColor?: boolean; /** * Render the dynamic bodies in the world to the Graphics object? */ @@ -55253,22 +56002,10 @@ declare namespace Phaser { * Render the static bodies in the world to the Graphics object? */ showStaticBody?: boolean; - /** - * Render any sleeping bodies (dynamic or static) in the world to the Graphics object? - */ - showSleeping?: boolean; - /** - * Render all world constraints to the Graphics object? - */ - showJoint?: boolean; /** * When rendering bodies, render the internal edges as well? */ showInternalEdges?: boolean; - /** - * When rendering polygon bodies, render the convex hull as well? - */ - showConvexHulls?: boolean; /** * Render the bodies using a fill color. */ @@ -55305,6 +56042,10 @@ declare namespace Phaser { * The color value of the line stroke when rendering static bodies. */ staticLineColor?: number; + /** + * Render any sleeping bodies (dynamic or static) in the world to the Graphics object? + */ + showSleeping?: boolean; /** * The amount to multiply the opacity of sleeping static bodies by. */ @@ -55317,6 +56058,34 @@ declare namespace Phaser { * The color value of the line stroke when rendering sleeping dynamic bodies. */ sleepLineColor?: number; + /** + * Render bodies or body parts that are flagged as being a sensor? + */ + showSensors?: boolean; + /** + * The fill color when rendering body sensors. + */ + sensorFillColor?: number; + /** + * The line color when rendering body sensors. + */ + sensorLineColor?: number; + /** + * Render the position of non-static bodies? + */ + showPositions?: boolean; + /** + * The size of the rectangle drawn when rendering the body position. + */ + positionSize?: number; + /** + * The color value of the rectangle drawn when rendering the body position. + */ + positionColor?: number; + /** + * Render all world constraints to the Graphics object? + */ + showJoint?: boolean; /** * The color value of joints when `showJoint` is set. */ @@ -55349,6 +56118,10 @@ declare namespace Phaser { * The size of the circles drawn as the constraint anchors. */ anchorSize?: number; + /** + * When rendering polygon bodies, render the convex hull as well? + */ + showConvexHulls?: boolean; /** * The color value of hulls when `showConvexHulls` is set. */ @@ -55386,6 +56159,65 @@ declare namespace Phaser { deltaMax?: number; }; + type MatterSetBodyConfig = { + /** + * The shape type. Either `rectangle`, `circle`, `trapezoid`, `polygon`, `fromVertices`, `fromVerts` or `fromPhysicsEditor`. + */ + type?: string; + /** + * The horizontal world position to place the body at. + */ + x?: number; + /** + * The vertical world position to place the body at. + */ + y?: number; + /** + * The width of the body. + */ + width?: number; + /** + * The height of the body. + */ + height?: number; + /** + * The radius of the body. Used by `circle` and `polygon` shapes. + */ + radius?: number; + /** + * The max sizes of the body. Used by the `circle` shape. + */ + maxSides?: number; + /** + * Used by the `trapezoid` shape. The slope of the trapezoid. 0 creates a rectangle, while 1 creates a triangle. Positive values make the top side shorter, while negative values make the bottom side shorter. + */ + slope?: number; + /** + * Used by the `polygon` shape. The number of sides the polygon will have. + */ + sides?: number; + /** + * Used by the `fromVerts` shape. The vertices data. Either a path string or an array of vertices. + */ + verts?: string | any[]; + /** + * Used by the `fromVerts` shape. Flag internal edges (coincident part edges) + */ + flagInternal?: boolean; + /** + * Used by the `fromVerts` shape. Whether Matter.js will discard collinear edges (to improve performance). + */ + removeCollinear?: number; + /** + * Used by the `fromVerts` shape. During decomposition discard parts that have an area less than this. + */ + minimumArea?: number; + /** + * Should the new body be automatically added to the world? + */ + addToWorld?: boolean; + }; + type MatterTileOptions = { /** * An existing Matter body to be used instead of creating a new one. @@ -55403,9 +56235,9 @@ declare namespace Phaser { type MatterWorldConfig = { /** - * Sets {@link Phaser.Physics.Matter.World#gravity}. + * Sets {@link Phaser.Physics.Matter.World#gravity}. If `false` Gravity will be set to zero. */ - gravity?: Phaser.Types.Math.Vector2Like; + gravity?: Phaser.Types.Math.Vector2Like | boolean; /** * Should the world have bounds enabled by default? */ @@ -56939,15 +57771,19 @@ declare namespace Phaser { */ repeatCounter?: integer; /** - * Ease value data. + * The property value at the start of the ease. */ start?: number; /** - * Ease value data. + * The current propety value. */ current?: number; /** - * Ease value data. + * The previous property value. + */ + previous?: number; + /** + * The property value at the end of the ease. */ end?: number; /** @@ -58036,7 +58872,7 @@ declare namespace Phaser { /** * Sets whether this Body collides with the world boundary. * - * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Vec2 first. + * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Phaser.Math.Vector2 first. * @param value `true` if this body should collide with the world bounds, otherwise `false`. Default true. * @param bounceX If given this will be replace the `worldBounce.x` value. * @param bounceY If given this will be replace the `worldBounce.y` value. @@ -59533,7 +60369,7 @@ declare namespace Phaser { /** * Sets whether this Body collides with the world boundary. * - * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Vec2 first. + * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Phaser.Math.Vector2 first. * @param value `true` if this body should collide with the world bounds, otherwise `false`. Default true. * @param bounceX If given this will be replace the `worldBounce.x` value. * @param bounceY If given this will be replace the `worldBounce.y` value. @@ -60349,7 +61185,7 @@ declare namespace Phaser { /** * Sets whether this Body collides with the world boundary. * - * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Vec2 first. + * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Phaser.Math.Vector2 first. * @param value `true` if this body should collide with the world bounds, otherwise `false`. Default true. * @param bounceX If given this will be replace the `worldBounce.x` value. * @param bounceY If given this will be replace the `worldBounce.y` value. @@ -60651,6 +61487,530 @@ declare namespace Phaser { } + namespace Components { + /** + * Provides methods used for setting the acceleration properties of an Arcade Physics Body. + */ + interface Acceleration { + /** + * Sets the body's horizontal and vertical acceleration. If the vertical acceleration value is not provided, the vertical acceleration is set to the same value as the horizontal acceleration. + * @param x The horizontal acceleration + * @param y The vertical acceleration Default x. + */ + setAcceleration(x: number, y?: number): this; + /** + * Sets the body's horizontal acceleration. + * @param value The horizontal acceleration + */ + setAccelerationX(value: number): this; + /** + * Sets the body's vertical acceleration. + * @param value The vertical acceleration + */ + setAccelerationY(value: number): this; + } + + /** + * Provides methods used for setting the angular acceleration properties of an Arcade Physics Body. + */ + interface Angular { + /** + * Sets the angular velocity of the body. + * + * In Arcade Physics, bodies cannot rotate. They are always axis-aligned. + * However, they can have angular motion, which is passed on to the Game Object bound to the body, + * causing them to visually rotate, even though the body remains axis-aligned. + * @param value The amount of angular velocity. + */ + setAngularVelocity(value: number): this; + /** + * Sets the angular acceleration of the body. + * + * In Arcade Physics, bodies cannot rotate. They are always axis-aligned. + * However, they can have angular motion, which is passed on to the Game Object bound to the body, + * causing them to visually rotate, even though the body remains axis-aligned. + * @param value The amount of angular acceleration. + */ + setAngularAcceleration(value: number): this; + /** + * Sets the angular drag of the body. Drag is applied to the current velocity, providing a form of deceleration. + * @param value The amount of drag. + */ + setAngularDrag(value: number): this; + } + + /** + * Provides methods used for setting the bounce properties of an Arcade Physics Body. + */ + interface Bounce { + /** + * Sets the bounce values of this body. + * + * Bounce is the amount of restitution, or elasticity, the body has when it collides with another object. + * A value of 1 means that it will retain its full velocity after the rebound. A value of 0 means it will not rebound at all. + * @param x The amount of horizontal bounce to apply on collision. A float, typically between 0 and 1. + * @param y The amount of vertical bounce to apply on collision. A float, typically between 0 and 1. Default x. + */ + setBounce(x: number, y?: number): this; + /** + * Sets the horizontal bounce value for this body. + * @param value The amount of horizontal bounce to apply on collision. A float, typically between 0 and 1. + */ + setBounceX(value: number): this; + /** + * Sets the vertical bounce value for this body. + * @param value The amount of vertical bounce to apply on collision. A float, typically between 0 and 1. + */ + setBounceY(value: number): this; + /** + * Sets whether this Body collides with the world boundary. + * + * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Phaser.Math.Vector2 first. + * @param value `true` if this body should collide with the world bounds, otherwise `false`. Default true. + * @param bounceX If given this will be replace the `worldBounce.x` value. + * @param bounceY If given this will be replace the `worldBounce.y` value. + */ + setCollideWorldBounds(value?: boolean, bounceX?: number, bounceY?: number): this; + } + + /** + * Provides methods used for setting the debug properties of an Arcade Physics Body. + */ + interface Debug { + /** + * Sets the debug values of this body. + * + * Bodies will only draw their debug if debug has been enabled for Arcade Physics as a whole. + * Note that there is a performance cost in drawing debug displays. It should never be used in production. + * @param showBody Set to `true` to have this body render its outline to the debug display. + * @param showVelocity Set to `true` to have this body render a velocity marker to the debug display. + * @param bodyColor The color of the body outline when rendered to the debug display. + */ + setDebug(showBody: boolean, showVelocity: boolean, bodyColor: number): this; + /** + * Sets the color of the body outline when it renders to the debug display. + * @param value The color of the body outline when rendered to the debug display. + */ + setDebugBodyColor(value: number): this; + /** + * Set to `true` to have this body render its outline to the debug display. + */ + debugShowBody: boolean; + /** + * Set to `true` to have this body render a velocity marker to the debug display. + */ + debugShowVelocity: boolean; + /** + * The color of the body outline when it renders to the debug display. + */ + debugBodyColor: number; + } + + /** + * Provides methods used for setting the drag properties of an Arcade Physics Body. + */ + interface Drag { + /** + * Sets the body's horizontal and vertical drag. If the vertical drag value is not provided, the vertical drag is set to the same value as the horizontal drag. + * + * Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time. + * It is the absolute loss of velocity due to movement, in pixels per second squared. + * The x and y components are applied separately. + * + * When `useDamping` is true, this is 1 minus the damping factor. + * A value of 1 means the Body loses no velocity. + * A value of 0.95 means the Body loses 5% of its velocity per step. + * A value of 0.5 means the Body loses 50% of its velocity per step. + * + * Drag is applied only when `acceleration` is zero. + * @param x The amount of horizontal drag to apply. + * @param y The amount of vertical drag to apply. Default x. + */ + setDrag(x: number, y?: number): this; + /** + * Sets the body's horizontal drag. + * + * Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time. + * It is the absolute loss of velocity due to movement, in pixels per second squared. + * The x and y components are applied separately. + * + * When `useDamping` is true, this is 1 minus the damping factor. + * A value of 1 means the Body loses no velocity. + * A value of 0.95 means the Body loses 5% of its velocity per step. + * A value of 0.5 means the Body loses 50% of its velocity per step. + * + * Drag is applied only when `acceleration` is zero. + * @param value The amount of horizontal drag to apply. + */ + setDragX(value: number): this; + /** + * Sets the body's vertical drag. + * + * Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time. + * It is the absolute loss of velocity due to movement, in pixels per second squared. + * The x and y components are applied separately. + * + * When `useDamping` is true, this is 1 minus the damping factor. + * A value of 1 means the Body loses no velocity. + * A value of 0.95 means the Body loses 5% of its velocity per step. + * A value of 0.5 means the Body loses 50% of its velocity per step. + * + * Drag is applied only when `acceleration` is zero. + * @param value The amount of vertical drag to apply. + */ + setDragY(value: number): this; + /** + * If this Body is using `drag` for deceleration this function controls how the drag is applied. + * If set to `true` drag will use a damping effect rather than a linear approach. If you are + * creating a game where the Body moves freely at any angle (i.e. like the way the ship moves in + * the game Asteroids) then you will get a far smoother and more visually correct deceleration + * by using damping, avoiding the axis-drift that is prone with linear deceleration. + * + * If you enable this property then you should use far smaller `drag` values than with linear, as + * they are used as a multiplier on the velocity. Values such as 0.95 will give a nice slow + * deceleration, where-as smaller values, such as 0.5 will stop an object almost immediately. + * @param value `true` to use damping for deceleration, or `false` to use linear deceleration. + */ + setDamping(value: boolean): this; + } + + /** + * Provides methods used for setting the enable properties of an Arcade Physics Body. + */ + interface Enable { + /** + * Enables this Game Object's Body. + * @param reset Also reset the Body and place it at (x, y). + * @param x The horizontal position to place the Game Object and Body. + * @param y The horizontal position to place the Game Object and Body. + * @param enableGameObject Also activate this Game Object. + * @param showGameObject Also show this Game Object. + */ + enableBody(reset: boolean, x: number, y: number, enableGameObject: boolean, showGameObject: boolean): this; + /** + * Stops and disables this Game Object's Body. + * @param disableGameObject Also deactivate this Game Object. Default false. + * @param hideGameObject Also hide this Game Object. Default false. + */ + disableBody(disableGameObject?: boolean, hideGameObject?: boolean): this; + /** + * Syncs the Body's position and size with its parent Game Object. + * You don't need to call this for Dynamic Bodies, as it happens automatically. + * But for Static bodies it's a useful way of modifying the position of a Static Body + * in the Physics World, based on its Game Object. + */ + refreshBody(): this; + } + + /** + * Sets the friction (e.g. the amount of velocity reduced over time) of the physics body when moving horizontally in the X axis. The higher than friction, the faster the body will slow down once force stops being applied to it. + */ + interface Friction { + /** + * Sets the friction (e.g. the amount of velocity reduced over time) of the physics body when moving. + * The higher than friction, the faster the body will slow down once force stops being applied to it. + * @param x The amount of horizontal friction to apply. + * @param y The amount of vertical friction to apply. Default x. + */ + setFriction(x: number, y?: number): this; + /** + * Sets the friction (e.g. the amount of velocity reduced over time) of the physics body when moving horizontally in the X axis. + * The higher than friction, the faster the body will slow down once force stops being applied to it. + * @param x The amount of friction to apply. + */ + setFrictionX(x: number): this; + /** + * Sets the friction (e.g. the amount of velocity reduced over time) of the physics body when moving vertically in the Y axis. + * The higher than friction, the faster the body will slow down once force stops being applied to it. + * @param x The amount of friction to apply. + */ + setFrictionY(x: number): this; + } + + /** + * Provides methods for setting the gravity properties of an Arcade Physics Game Object. + * Should be applied as a mixin and not used directly. + */ + interface Gravity { + /** + * Set the X and Y values of the gravitational pull to act upon this Arcade Physics Game Object. Values can be positive or negative. Larger values result in a stronger effect. + * + * If only one value is provided, this value will be used for both the X and Y axis. + * @param x The gravitational force to be applied to the X-axis. + * @param y The gravitational force to be applied to the Y-axis. If this is not specified, the X value will be used. Default x. + */ + setGravity(x: number, y?: number): this; + /** + * Set the gravitational force to be applied to the X axis. Value can be positive or negative. Larger values result in a stronger effect. + * @param x The gravitational force to be applied to the X-axis. + */ + setGravityX(x: number): this; + /** + * Set the gravitational force to be applied to the Y axis. Value can be positive or negative. Larger values result in a stronger effect. + * @param y The gravitational force to be applied to the Y-axis. + */ + setGravityY(y: number): this; + } + + /** + * Provides methods used for setting the immovable properties of an Arcade Physics Body. + */ + interface Immovable { + /** + * Sets Whether this Body can be moved by collisions with another Body. + * @param value Sets if this body can be moved by collisions with another Body. Default true. + */ + setImmovable(value?: boolean): this; + } + + /** + * Provides methods used for setting the mass properties of an Arcade Physics Body. + */ + interface Mass { + /** + * Sets the mass of the physics body + * @param value New value for the mass of the body. + */ + setMass(value: number): this; + } + + /** + * This method will search the given circular area and return an array of all physics bodies that + * overlap with it. It can return either Dynamic, Static bodies or a mixture of both. + * + * A body only has to intersect with the search area to be considered, it doesn't have to be fully + * contained within it. + * + * If Arcade Physics is set to use the RTree (which it is by default) then the search is rather fast, + * otherwise the search is O(N) for Dynamic Bodies. + */ + interface OverlapCirc { + } + + /** + * This method will search the given rectangular area and return an array of all physics bodies that + * overlap with it. It can return either Dynamic, Static bodies or a mixture of both. + * + * A body only has to intersect with the search area to be considered, it doesn't have to be fully + * contained within it. + * + * If Arcade Physics is set to use the RTree (which it is by default) then the search for is extremely fast, + * otherwise the search is O(N) for Dynamic Bodies. + */ + interface OverlapRect { + } + + /** + * Provides methods for setting the size of an Arcade Physics Game Object. + * Should be applied as a mixin and not used directly. + */ + interface Size { + /** + * Sets the body offset. This allows you to adjust the difference between the center of the body + * and the x and y coordinates of the parent Game Object. + * @param x The amount to offset the body from the parent Game Object along the x-axis. + * @param y The amount to offset the body from the parent Game Object along the y-axis. Defaults to the value given for the x-axis. Default x. + */ + setOffset(x: number, y?: number): this; + /** + * Sets the size of this physics body. Setting the size does not adjust the dimensions + * of the parent Game Object. + * @param width The new width of the physics body, in pixels. + * @param height The new height of the physics body, in pixels. + * @param center Should the body be re-positioned so its center aligns with the parent Game Object? Default true. + */ + setSize(width: number, height: number, center?: boolean): this; + /** + * Sets this physics body to use a circle for collision instead of a rectangle. + * @param radius The radius of the physics body, in pixels. + * @param offsetX The amount to offset the body from the parent Game Object along the x-axis. + * @param offsetY The amount to offset the body from the parent Game Object along the y-axis. + */ + setCircle(radius: number, offsetX?: number, offsetY?: number): this; + } + + /** + * Provides methods for modifying the velocity of an Arcade Physics body. + * + * Should be applied as a mixin and not used directly. + */ + interface Velocity { + /** + * Sets the velocity of the Body. + * @param x The horizontal velocity of the body. Positive values move the body to the right, while negative values move it to the left. + * @param y The vertical velocity of the body. Positive values move the body down, while negative values move it up. Default x. + */ + setVelocity(x: number, y?: number): this; + /** + * Sets the horizontal component of the body's velocity. + * + * Positive values move the body to the right, while negative values move it to the left. + * @param x The new horizontal velocity. + */ + setVelocityX(x: number): this; + /** + * Sets the vertical component of the body's velocity. + * + * Positive values move the body down, while negative values move it up. + * @param y The new vertical velocity of the body. + */ + setVelocityY(y: number): this; + /** + * Sets the maximum velocity of the body. + * @param x The new maximum horizontal velocity. + * @param y The new maximum vertical velocity. Default x. + */ + setMaxVelocity(x: number, y?: number): this; + } + + } + + /** + * Dynamic Body. + */ + var DYNAMIC_BODY: number; + + /** + * Static Body. + */ + var STATIC_BODY: number; + + /** + * Arcade Physics Group containing Dynamic Bodies. + */ + var GROUP: number; + + /** + * A Tilemap Layer. + */ + var TILEMAPLAYER: number; + + /** + * Facing no direction (initial value). + */ + var FACING_NONE: number; + + /** + * Facing up. + */ + var FACING_UP: number; + + /** + * Facing down. + */ + var FACING_DOWN: number; + + /** + * Facing left. + */ + var FACING_LEFT: number; + + /** + * Facing right. + */ + var FACING_RIGHT: number; + + namespace Events { + /** + * The Arcade Physics World Collide Event. + * + * This event is dispatched by an Arcade Physics World instance if two bodies collide _and_ at least + * one of them has their [onCollide]{@link Phaser.Physics.Arcade.Body#onCollide} property set to `true`. + * + * It provides an alternative means to handling collide events rather than using the callback approach. + * + * Listen to it from a Scene using: `this.physics.world.on('collide', listener)`. + * + * Please note that 'collide' and 'overlap' are two different things in Arcade Physics. + */ + const COLLIDE: any; + + /** + * The Arcade Physics World Overlap Event. + * + * This event is dispatched by an Arcade Physics World instance if two bodies overlap _and_ at least + * one of them has their [onOverlap]{@link Phaser.Physics.Arcade.Body#onOverlap} property set to `true`. + * + * It provides an alternative means to handling overlap events rather than using the callback approach. + * + * Listen to it from a Scene using: `this.physics.world.on('overlap', listener)`. + * + * Please note that 'collide' and 'overlap' are two different things in Arcade Physics. + */ + const OVERLAP: any; + + /** + * The Arcade Physics World Pause Event. + * + * This event is dispatched by an Arcade Physics World instance when it is paused. + * + * Listen to it from a Scene using: `this.physics.world.on('pause', listener)`. + */ + const PAUSE: any; + + /** + * The Arcade Physics World Resume Event. + * + * This event is dispatched by an Arcade Physics World instance when it resumes from a paused state. + * + * Listen to it from a Scene using: `this.physics.world.on('resume', listener)`. + */ + const RESUME: any; + + /** + * The Arcade Physics Tile Collide Event. + * + * This event is dispatched by an Arcade Physics World instance if a body collides with a Tile _and_ + * has its [onCollide]{@link Phaser.Physics.Arcade.Body#onCollide} property set to `true`. + * + * It provides an alternative means to handling collide events rather than using the callback approach. + * + * Listen to it from a Scene using: `this.physics.world.on('tilecollide', listener)`. + * + * Please note that 'collide' and 'overlap' are two different things in Arcade Physics. + */ + const TILE_COLLIDE: any; + + /** + * The Arcade Physics Tile Overlap Event. + * + * This event is dispatched by an Arcade Physics World instance if a body overlaps with a Tile _and_ + * has its [onOverlap]{@link Phaser.Physics.Arcade.Body#onOverlap} property set to `true`. + * + * It provides an alternative means to handling overlap events rather than using the callback approach. + * + * Listen to it from a Scene using: `this.physics.world.on('tileoverlap', listener)`. + * + * Please note that 'collide' and 'overlap' are two different things in Arcade Physics. + */ + const TILE_OVERLAP: any; + + /** + * The Arcade Physics World Bounds Event. + * + * This event is dispatched by an Arcade Physics World instance if a body makes contact with the world bounds _and_ + * it has its [onWorldBounds]{@link Phaser.Physics.Arcade.Body#onWorldBounds} property set to `true`. + * + * It provides an alternative means to handling collide events rather than using the callback approach. + * + * Listen to it from a Scene using: `this.physics.world.on('worldbounds', listener)`. + */ + const WORLD_BOUNDS: any; + + /** + * The Arcade Physics World Step Event. + * + * This event is dispatched by an Arcade Physics World instance whenever a physics step is run. + * It is emitted _after_ the bodies and colliders have been updated. + * + * In high framerate settings this can be multiple times per game frame. + * + * Listen to it from a Scene using: `this.physics.world.on('worldstep', listener)`. + */ + const WORLD_STEP: any; + + } + /** * The Arcade Physics Factory allows you to easily create Arcade Physics enabled Game Objects. * Objects that are created by this Factory are automatically added to the physics world. @@ -61304,6 +62664,73 @@ declare namespace Phaser { } + namespace Tilemap { + /** + * A function to process the collision callbacks between a single tile and an Arcade Physics enabled Game Object. + * @param tile The Tile to process. + * @param sprite The Game Object to process with the Tile. + */ + function ProcessTileCallbacks(tile: Phaser.Tilemaps.Tile, sprite: Phaser.GameObjects.Sprite): 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. + */ + function ProcessTileSeparationX(body: Phaser.Physics.Arcade.Body, x: number): void; + + /** + * 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. + */ + function ProcessTileSeparationY(body: Phaser.Physics.Arcade.Body, y: number): void; + + /** + * The core separation function to separate a physics body and a tile. + * @param i The index of the tile within the map data. + * @param body The Body object to separate. + * @param tile The tile to collide against. + * @param tileWorldRect A rectangle-like object defining the dimensions of the tile. + * @param tilemapLayer The tilemapLayer to collide against. + * @param tileBias The tile bias value. Populated by the `World.TILE_BIAS` constant. + * @param isLayer Is this check coming from a TilemapLayer or an array of tiles? + */ + function SeparateTile(i: number, body: Phaser.Physics.Arcade.Body, tile: Phaser.Tilemaps.Tile, tileWorldRect: Phaser.Geom.Rectangle, tilemapLayer: Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer, tileBias: number, isLayer: boolean): boolean; + + /** + * Check the body against the given tile on the X axis. + * Used internally by the SeparateTile function. + * @param body The Body object to separate. + * @param tile The tile to check. + * @param tileLeft The left position of the tile within the tile world. + * @param tileRight The right position of the tile within the tile world. + * @param tileBias The tile bias value. Populated by the `World.TILE_BIAS` constant. + * @param isLayer Is this check coming from a TilemapLayer or an array of tiles? + */ + function TileCheckX(body: Phaser.Physics.Arcade.Body, tile: Phaser.Tilemaps.Tile, tileLeft: number, tileRight: number, tileBias: number, isLayer: boolean): number; + + /** + * Check the body against the given tile on the Y axis. + * Used internally by the SeparateTile function. + * @param body The Body object to separate. + * @param tile The tile to check. + * @param tileTop The top position of the tile within the tile world. + * @param tileBottom The bottom position of the tile within the tile world. + * @param tileBias The tile bias value. Populated by the `World.TILE_BIAS` constant. + * @param isLayer Is this check coming from a TilemapLayer or an array of tiles? + */ + function TileCheckY(body: Phaser.Physics.Arcade.Body, tile: Phaser.Tilemaps.Tile, tileTop: number, tileBottom: number, tileBias: number, isLayer: boolean): number; + + /** + * Checks for intersection between the given tile rectangle-like object and an Arcade Physics body. + * @param tileWorldRect A rectangle object that defines the tile placement in the world. + * @param body The body to check for intersection against. + */ + function TileIntersectsBody(tileWorldRect: Object, body: Phaser.Physics.Arcade.Body): boolean; + + } + /** * The Arcade Physics World. * @@ -61878,597 +63305,6 @@ declare namespace Phaser { } - namespace Components { - /** - * Provides methods used for setting the acceleration properties of an Arcade Physics Body. - */ - interface Acceleration { - /** - * Sets the body's horizontal and vertical acceleration. If the vertical acceleration value is not provided, the vertical acceleration is set to the same value as the horizontal acceleration. - * @param x The horizontal acceleration - * @param y The vertical acceleration Default x. - */ - setAcceleration(x: number, y?: number): this; - /** - * Sets the body's horizontal acceleration. - * @param value The horizontal acceleration - */ - setAccelerationX(value: number): this; - /** - * Sets the body's vertical acceleration. - * @param value The vertical acceleration - */ - setAccelerationY(value: number): this; - } - - /** - * Provides methods used for setting the angular acceleration properties of an Arcade Physics Body. - */ - interface Angular { - /** - * Sets the angular velocity of the body. - * - * In Arcade Physics, bodies cannot rotate. They are always axis-aligned. - * However, they can have angular motion, which is passed on to the Game Object bound to the body, - * causing them to visually rotate, even though the body remains axis-aligned. - * @param value The amount of angular velocity. - */ - setAngularVelocity(value: number): this; - /** - * Sets the angular acceleration of the body. - * - * In Arcade Physics, bodies cannot rotate. They are always axis-aligned. - * However, they can have angular motion, which is passed on to the Game Object bound to the body, - * causing them to visually rotate, even though the body remains axis-aligned. - * @param value The amount of angular acceleration. - */ - setAngularAcceleration(value: number): this; - /** - * Sets the angular drag of the body. Drag is applied to the current velocity, providing a form of deceleration. - * @param value The amount of drag. - */ - setAngularDrag(value: number): this; - } - - /** - * Provides methods used for setting the bounce properties of an Arcade Physics Body. - */ - interface Bounce { - /** - * Sets the bounce values of this body. - * - * Bounce is the amount of restitution, or elasticity, the body has when it collides with another object. - * A value of 1 means that it will retain its full velocity after the rebound. A value of 0 means it will not rebound at all. - * @param x The amount of horizontal bounce to apply on collision. A float, typically between 0 and 1. - * @param y The amount of vertical bounce to apply on collision. A float, typically between 0 and 1. Default x. - */ - setBounce(x: number, y?: number): this; - /** - * Sets the horizontal bounce value for this body. - * @param value The amount of horizontal bounce to apply on collision. A float, typically between 0 and 1. - */ - setBounceX(value: number): this; - /** - * Sets the vertical bounce value for this body. - * @param value The amount of vertical bounce to apply on collision. A float, typically between 0 and 1. - */ - setBounceY(value: number): this; - /** - * Sets whether this Body collides with the world boundary. - * - * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Vec2 first. - * @param value `true` if this body should collide with the world bounds, otherwise `false`. Default true. - * @param bounceX If given this will be replace the `worldBounce.x` value. - * @param bounceY If given this will be replace the `worldBounce.y` value. - */ - setCollideWorldBounds(value?: boolean, bounceX?: number, bounceY?: number): this; - } - - /** - * Provides methods used for setting the debug properties of an Arcade Physics Body. - */ - interface Debug { - /** - * Sets the debug values of this body. - * - * Bodies will only draw their debug if debug has been enabled for Arcade Physics as a whole. - * Note that there is a performance cost in drawing debug displays. It should never be used in production. - * @param showBody Set to `true` to have this body render its outline to the debug display. - * @param showVelocity Set to `true` to have this body render a velocity marker to the debug display. - * @param bodyColor The color of the body outline when rendered to the debug display. - */ - setDebug(showBody: boolean, showVelocity: boolean, bodyColor: number): this; - /** - * Sets the color of the body outline when it renders to the debug display. - * @param value The color of the body outline when rendered to the debug display. - */ - setDebugBodyColor(value: number): this; - /** - * Set to `true` to have this body render its outline to the debug display. - */ - debugShowBody: boolean; - /** - * Set to `true` to have this body render a velocity marker to the debug display. - */ - debugShowVelocity: boolean; - /** - * The color of the body outline when it renders to the debug display. - */ - debugBodyColor: number; - } - - /** - * Provides methods used for setting the drag properties of an Arcade Physics Body. - */ - interface Drag { - /** - * Sets the body's horizontal and vertical drag. If the vertical drag value is not provided, the vertical drag is set to the same value as the horizontal drag. - * - * Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time. - * It is the absolute loss of velocity due to movement, in pixels per second squared. - * The x and y components are applied separately. - * - * When `useDamping` is true, this is 1 minus the damping factor. - * A value of 1 means the Body loses no velocity. - * A value of 0.95 means the Body loses 5% of its velocity per step. - * A value of 0.5 means the Body loses 50% of its velocity per step. - * - * Drag is applied only when `acceleration` is zero. - * @param x The amount of horizontal drag to apply. - * @param y The amount of vertical drag to apply. Default x. - */ - setDrag(x: number, y?: number): this; - /** - * Sets the body's horizontal drag. - * - * Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time. - * It is the absolute loss of velocity due to movement, in pixels per second squared. - * The x and y components are applied separately. - * - * When `useDamping` is true, this is 1 minus the damping factor. - * A value of 1 means the Body loses no velocity. - * A value of 0.95 means the Body loses 5% of its velocity per step. - * A value of 0.5 means the Body loses 50% of its velocity per step. - * - * Drag is applied only when `acceleration` is zero. - * @param value The amount of horizontal drag to apply. - */ - setDragX(value: number): this; - /** - * Sets the body's vertical drag. - * - * Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time. - * It is the absolute loss of velocity due to movement, in pixels per second squared. - * The x and y components are applied separately. - * - * When `useDamping` is true, this is 1 minus the damping factor. - * A value of 1 means the Body loses no velocity. - * A value of 0.95 means the Body loses 5% of its velocity per step. - * A value of 0.5 means the Body loses 50% of its velocity per step. - * - * Drag is applied only when `acceleration` is zero. - * @param value The amount of vertical drag to apply. - */ - setDragY(value: number): this; - /** - * If this Body is using `drag` for deceleration this function controls how the drag is applied. - * If set to `true` drag will use a damping effect rather than a linear approach. If you are - * creating a game where the Body moves freely at any angle (i.e. like the way the ship moves in - * the game Asteroids) then you will get a far smoother and more visually correct deceleration - * by using damping, avoiding the axis-drift that is prone with linear deceleration. - * - * If you enable this property then you should use far smaller `drag` values than with linear, as - * they are used as a multiplier on the velocity. Values such as 0.95 will give a nice slow - * deceleration, where-as smaller values, such as 0.5 will stop an object almost immediately. - * @param value `true` to use damping for deceleration, or `false` to use linear deceleration. - */ - setDamping(value: boolean): this; - } - - /** - * Provides methods used for setting the enable properties of an Arcade Physics Body. - */ - interface Enable { - /** - * Enables this Game Object's Body. - * @param reset Also reset the Body and place it at (x, y). - * @param x The horizontal position to place the Game Object and Body. - * @param y The horizontal position to place the Game Object and Body. - * @param enableGameObject Also activate this Game Object. - * @param showGameObject Also show this Game Object. - */ - enableBody(reset: boolean, x: number, y: number, enableGameObject: boolean, showGameObject: boolean): this; - /** - * Stops and disables this Game Object's Body. - * @param disableGameObject Also deactivate this Game Object. Default false. - * @param hideGameObject Also hide this Game Object. Default false. - */ - disableBody(disableGameObject?: boolean, hideGameObject?: boolean): this; - /** - * Syncs the Body's position and size with its parent Game Object. - * You don't need to call this for Dynamic Bodies, as it happens automatically. - * But for Static bodies it's a useful way of modifying the position of a Static Body - * in the Physics World, based on its Game Object. - */ - refreshBody(): this; - } - - /** - * Sets the friction (e.g. the amount of velocity reduced over time) of the physics body when moving horizontally in the X axis. The higher than friction, the faster the body will slow down once force stops being applied to it. - */ - interface Friction { - /** - * Sets the friction (e.g. the amount of velocity reduced over time) of the physics body when moving. - * The higher than friction, the faster the body will slow down once force stops being applied to it. - * @param x The amount of horizontal friction to apply. - * @param y The amount of vertical friction to apply. Default x. - */ - setFriction(x: number, y?: number): this; - /** - * Sets the friction (e.g. the amount of velocity reduced over time) of the physics body when moving horizontally in the X axis. - * The higher than friction, the faster the body will slow down once force stops being applied to it. - * @param x The amount of friction to apply. - */ - setFrictionX(x: number): this; - /** - * Sets the friction (e.g. the amount of velocity reduced over time) of the physics body when moving vertically in the Y axis. - * The higher than friction, the faster the body will slow down once force stops being applied to it. - * @param x The amount of friction to apply. - */ - setFrictionY(x: number): this; - } - - /** - * Provides methods for setting the gravity properties of an Arcade Physics Game Object. - * Should be applied as a mixin and not used directly. - */ - interface Gravity { - /** - * Set the X and Y values of the gravitational pull to act upon this Arcade Physics Game Object. Values can be positive or negative. Larger values result in a stronger effect. - * - * If only one value is provided, this value will be used for both the X and Y axis. - * @param x The gravitational force to be applied to the X-axis. - * @param y The gravitational force to be applied to the Y-axis. If this is not specified, the X value will be used. Default x. - */ - setGravity(x: number, y?: number): this; - /** - * Set the gravitational force to be applied to the X axis. Value can be positive or negative. Larger values result in a stronger effect. - * @param x The gravitational force to be applied to the X-axis. - */ - setGravityX(x: number): this; - /** - * Set the gravitational force to be applied to the Y axis. Value can be positive or negative. Larger values result in a stronger effect. - * @param y The gravitational force to be applied to the Y-axis. - */ - setGravityY(y: number): this; - } - - /** - * Provides methods used for setting the immovable properties of an Arcade Physics Body. - */ - interface Immovable { - /** - * Sets Whether this Body can be moved by collisions with another Body. - * @param value Sets if this body can be moved by collisions with another Body. Default true. - */ - setImmovable(value?: boolean): this; - } - - /** - * Provides methods used for setting the mass properties of an Arcade Physics Body. - */ - interface Mass { - /** - * Sets the mass of the physics body - * @param value New value for the mass of the body. - */ - setMass(value: number): this; - } - - /** - * This method will search the given circular area and return an array of all physics bodies that - * overlap with it. It can return either Dynamic, Static bodies or a mixture of both. - * - * A body only has to intersect with the search area to be considered, it doesn't have to be fully - * contained within it. - * - * If Arcade Physics is set to use the RTree (which it is by default) then the search is rather fast, - * otherwise the search is O(N) for Dynamic Bodies. - */ - interface OverlapCirc { - } - - /** - * This method will search the given rectangular area and return an array of all physics bodies that - * overlap with it. It can return either Dynamic, Static bodies or a mixture of both. - * - * A body only has to intersect with the search area to be considered, it doesn't have to be fully - * contained within it. - * - * If Arcade Physics is set to use the RTree (which it is by default) then the search for is extremely fast, - * otherwise the search is O(N) for Dynamic Bodies. - */ - interface OverlapRect { - } - - /** - * Provides methods for setting the size of an Arcade Physics Game Object. - * Should be applied as a mixin and not used directly. - */ - interface Size { - /** - * Sets the body offset. This allows you to adjust the difference between the center of the body - * and the x and y coordinates of the parent Game Object. - * @param x The amount to offset the body from the parent Game Object along the x-axis. - * @param y The amount to offset the body from the parent Game Object along the y-axis. Defaults to the value given for the x-axis. Default x. - */ - setOffset(x: number, y?: number): this; - /** - * Sets the size of this physics body. Setting the size does not adjust the dimensions - * of the parent Game Object. - * @param width The new width of the physics body, in pixels. - * @param height The new height of the physics body, in pixels. - * @param center Should the body be re-positioned so its center aligns with the parent Game Object? Default true. - */ - setSize(width: number, height: number, center?: boolean): this; - /** - * Sets this physics body to use a circle for collision instead of a rectangle. - * @param radius The radius of the physics body, in pixels. - * @param offsetX The amount to offset the body from the parent Game Object along the x-axis. - * @param offsetY The amount to offset the body from the parent Game Object along the y-axis. - */ - setCircle(radius: number, offsetX?: number, offsetY?: number): this; - } - - /** - * Provides methods for modifying the velocity of an Arcade Physics body. - * - * Should be applied as a mixin and not used directly. - */ - interface Velocity { - /** - * Sets the velocity of the Body. - * @param x The horizontal velocity of the body. Positive values move the body to the right, while negative values move it to the left. - * @param y The vertical velocity of the body. Positive values move the body down, while negative values move it up. Default x. - */ - setVelocity(x: number, y?: number): this; - /** - * Sets the horizontal component of the body's velocity. - * - * Positive values move the body to the right, while negative values move it to the left. - * @param x The new horizontal velocity. - */ - setVelocityX(x: number): this; - /** - * Sets the vertical component of the body's velocity. - * - * Positive values move the body down, while negative values move it up. - * @param y The new vertical velocity of the body. - */ - setVelocityY(y: number): this; - /** - * Sets the maximum velocity of the body. - * @param x The new maximum horizontal velocity. - * @param y The new maximum vertical velocity. Default x. - */ - setMaxVelocity(x: number, y?: number): this; - } - - } - - /** - * Dynamic Body. - */ - var DYNAMIC_BODY: number; - - /** - * Static Body. - */ - var STATIC_BODY: number; - - /** - * Arcade Physics Group containing Dynamic Bodies. - */ - var GROUP: number; - - /** - * A Tilemap Layer. - */ - var TILEMAPLAYER: number; - - /** - * Facing no direction (initial value). - */ - var FACING_NONE: number; - - /** - * Facing up. - */ - var FACING_UP: number; - - /** - * Facing down. - */ - var FACING_DOWN: number; - - /** - * Facing left. - */ - var FACING_LEFT: number; - - /** - * Facing right. - */ - var FACING_RIGHT: number; - - namespace Events { - /** - * The Arcade Physics World Collide Event. - * - * This event is dispatched by an Arcade Physics World instance if two bodies collide _and_ at least - * one of them has their [onCollide]{@link Phaser.Physics.Arcade.Body#onCollide} property set to `true`. - * - * It provides an alternative means to handling collide events rather than using the callback approach. - * - * Listen to it from a Scene using: `this.physics.world.on('collide', listener)`. - * - * Please note that 'collide' and 'overlap' are two different things in Arcade Physics. - */ - const COLLIDE: any; - - /** - * The Arcade Physics World Overlap Event. - * - * This event is dispatched by an Arcade Physics World instance if two bodies overlap _and_ at least - * one of them has their [onOverlap]{@link Phaser.Physics.Arcade.Body#onOverlap} property set to `true`. - * - * It provides an alternative means to handling overlap events rather than using the callback approach. - * - * Listen to it from a Scene using: `this.physics.world.on('overlap', listener)`. - * - * Please note that 'collide' and 'overlap' are two different things in Arcade Physics. - */ - const OVERLAP: any; - - /** - * The Arcade Physics World Pause Event. - * - * This event is dispatched by an Arcade Physics World instance when it is paused. - * - * Listen to it from a Scene using: `this.physics.world.on('pause', listener)`. - */ - const PAUSE: any; - - /** - * The Arcade Physics World Resume Event. - * - * This event is dispatched by an Arcade Physics World instance when it resumes from a paused state. - * - * Listen to it from a Scene using: `this.physics.world.on('resume', listener)`. - */ - const RESUME: any; - - /** - * The Arcade Physics Tile Collide Event. - * - * This event is dispatched by an Arcade Physics World instance if a body collides with a Tile _and_ - * has its [onCollide]{@link Phaser.Physics.Arcade.Body#onCollide} property set to `true`. - * - * It provides an alternative means to handling collide events rather than using the callback approach. - * - * Listen to it from a Scene using: `this.physics.world.on('tilecollide', listener)`. - * - * Please note that 'collide' and 'overlap' are two different things in Arcade Physics. - */ - const TILE_COLLIDE: any; - - /** - * The Arcade Physics Tile Overlap Event. - * - * This event is dispatched by an Arcade Physics World instance if a body overlaps with a Tile _and_ - * has its [onOverlap]{@link Phaser.Physics.Arcade.Body#onOverlap} property set to `true`. - * - * It provides an alternative means to handling overlap events rather than using the callback approach. - * - * Listen to it from a Scene using: `this.physics.world.on('tileoverlap', listener)`. - * - * Please note that 'collide' and 'overlap' are two different things in Arcade Physics. - */ - const TILE_OVERLAP: any; - - /** - * The Arcade Physics World Bounds Event. - * - * This event is dispatched by an Arcade Physics World instance if a body makes contact with the world bounds _and_ - * it has its [onWorldBounds]{@link Phaser.Physics.Arcade.Body#onWorldBounds} property set to `true`. - * - * It provides an alternative means to handling collide events rather than using the callback approach. - * - * Listen to it from a Scene using: `this.physics.world.on('worldbounds', listener)`. - */ - const WORLD_BOUNDS: any; - - /** - * The Arcade Physics World Step Event. - * - * This event is dispatched by an Arcade Physics World instance whenever a physics step is run. - * It is emitted _after_ the bodies and colliders have been updated. - * - * In high framerate settings this can be multiple times per game frame. - * - * Listen to it from a Scene using: `this.physics.world.on('worldstep', listener)`. - */ - const WORLD_STEP: any; - - } - - namespace Tilemap { - /** - * A function to process the collision callbacks between a single tile and an Arcade Physics enabled Game Object. - * @param tile The Tile to process. - * @param sprite The Game Object to process with the Tile. - */ - function ProcessTileCallbacks(tile: Phaser.Tilemaps.Tile, sprite: Phaser.GameObjects.Sprite): 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. - */ - function ProcessTileSeparationX(body: Phaser.Physics.Arcade.Body, x: number): void; - - /** - * 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. - */ - function ProcessTileSeparationY(body: Phaser.Physics.Arcade.Body, y: number): void; - - /** - * The core separation function to separate a physics body and a tile. - * @param i The index of the tile within the map data. - * @param body The Body object to separate. - * @param tile The tile to collide against. - * @param tileWorldRect A rectangle-like object defining the dimensions of the tile. - * @param tilemapLayer The tilemapLayer to collide against. - * @param tileBias The tile bias value. Populated by the `World.TILE_BIAS` constant. - * @param isLayer Is this check coming from a TilemapLayer or an array of tiles? - */ - function SeparateTile(i: number, body: Phaser.Physics.Arcade.Body, tile: Phaser.Tilemaps.Tile, tileWorldRect: Phaser.Geom.Rectangle, tilemapLayer: Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer, tileBias: number, isLayer: boolean): boolean; - - /** - * Check the body against the given tile on the X axis. - * Used internally by the SeparateTile function. - * @param body The Body object to separate. - * @param tile The tile to check. - * @param tileLeft The left position of the tile within the tile world. - * @param tileRight The right position of the tile within the tile world. - * @param tileBias The tile bias value. Populated by the `World.TILE_BIAS` constant. - * @param isLayer Is this check coming from a TilemapLayer or an array of tiles? - */ - function TileCheckX(body: Phaser.Physics.Arcade.Body, tile: Phaser.Tilemaps.Tile, tileLeft: number, tileRight: number, tileBias: number, isLayer: boolean): number; - - /** - * Check the body against the given tile on the Y axis. - * Used internally by the SeparateTile function. - * @param body The Body object to separate. - * @param tile The tile to check. - * @param tileTop The top position of the tile within the tile world. - * @param tileBottom The bottom position of the tile within the tile world. - * @param tileBias The tile bias value. Populated by the `World.TILE_BIAS` constant. - * @param isLayer Is this check coming from a TilemapLayer or an array of tiles? - */ - function TileCheckY(body: Phaser.Physics.Arcade.Body, tile: Phaser.Tilemaps.Tile, tileTop: number, tileBottom: number, tileBias: number, isLayer: boolean): number; - - /** - * Checks for intersection between the given tile rectangle-like object and an Arcade Physics body. - * @param tileWorldRect A rectangle object that defines the tile placement in the world. - * @param body The body to check for intersection against. - */ - function TileIntersectsBody(tileWorldRect: Object, body: Phaser.Physics.Arcade.Body): boolean; - - } - } /** @@ -62842,6 +63678,325 @@ declare namespace Phaser { } + namespace Components { + /** + * The Impact Acceleration component. + * Should be applied as a mixin. + */ + interface Acceleration { + /** + * Sets the horizontal acceleration of this body. + * @param x The amount of acceleration to apply. + */ + setAccelerationX(x: number): this; + /** + * Sets the vertical acceleration of this body. + * @param y The amount of acceleration to apply. + */ + setAccelerationY(y: number): this; + /** + * Sets the horizontal and vertical acceleration of this body. + * @param x The amount of horizontal acceleration to apply. + * @param y The amount of vertical acceleration to apply. + */ + setAcceleration(x: number, y: number): this; + } + + /** + * The Impact Body Scale component. + * Should be applied as a mixin. + */ + interface BodyScale { + /** + * Sets the size of the physics body. + * @param width The width of the body in pixels. + * @param height The height of the body in pixels. Default width. + */ + setBodySize(width: number, height?: number): this; + /** + * Sets the scale of the physics body. + * @param scaleX The horizontal scale of the body. + * @param scaleY The vertical scale of the body. If not given, will use the horizontal scale value. + */ + setBodyScale(scaleX: number, scaleY?: number): this; + } + + /** + * The Impact Body Type component. + * Should be applied as a mixin. + */ + interface BodyType { + /** + * [description] + */ + getBodyType(): number; + /** + * [description] + */ + setTypeNone(): Phaser.GameObjects.GameObject; + /** + * [description] + */ + setTypeA(): Phaser.GameObjects.GameObject; + /** + * [description] + */ + setTypeB(): Phaser.GameObjects.GameObject; + } + + /** + * The Impact Bounce component. + * Should be applied as a mixin. + */ + interface Bounce { + /** + * Sets the impact physics bounce, or restitution, value. + * @param value A value between 0 (no rebound) and 1 (full rebound) + */ + setBounce(value: number): Phaser.GameObjects.GameObject; + /** + * Sets the minimum velocity the body is allowed to be moving to be considered for rebound. + * @param value The minimum allowed velocity. + */ + setMinBounceVelocity(value: number): Phaser.GameObjects.GameObject; + /** + * The bounce, or restitution, value of this body. + * A value between 0 (no rebound) and 1 (full rebound) + */ + bounce: number; + } + + /** + * The Impact Check Against component. + * Should be applied as a mixin. + */ + interface CheckAgainst { + /** + * [description] + */ + setAvsB(): Phaser.GameObjects.GameObject; + /** + * [description] + */ + setBvsA(): Phaser.GameObjects.GameObject; + /** + * [description] + */ + setCheckAgainstNone(): Phaser.GameObjects.GameObject; + /** + * [description] + */ + setCheckAgainstA(): Phaser.GameObjects.GameObject; + /** + * [description] + */ + setCheckAgainstB(): Phaser.GameObjects.GameObject; + /** + * [description] + */ + checkAgainst: number; + } + + /** + * The Impact Collides component. + * Should be applied as a mixin. + */ + interface Collides { + /** + * [description] + * @param callback [description] + * @param scope [description] + */ + setCollideCallback(callback: CollideCallback, scope: any): Phaser.GameObjects.GameObject; + /** + * [description] + */ + setCollidesNever(): Phaser.GameObjects.GameObject; + /** + * [description] + */ + setLiteCollision(): Phaser.GameObjects.GameObject; + /** + * [description] + */ + setPassiveCollision(): Phaser.GameObjects.GameObject; + /** + * [description] + */ + setActiveCollision(): Phaser.GameObjects.GameObject; + /** + * [description] + */ + setFixedCollision(): Phaser.GameObjects.GameObject; + /** + * [description] + */ + collides: number; + } + + /** + * The Impact Debug component. + * Should be applied as a mixin. + */ + interface Debug { + /** + * [description] + * @param showBody [description] + * @param showVelocity [description] + * @param bodyColor [description] + */ + setDebug(showBody: boolean, showVelocity: boolean, bodyColor: number): Phaser.GameObjects.GameObject; + /** + * [description] + * @param value [description] + */ + setDebugBodyColor(value: number): Phaser.GameObjects.GameObject; + /** + * [description] + */ + debugShowBody: boolean; + /** + * [description] + */ + debugShowVelocity: boolean; + /** + * [description] + */ + debugBodyColor: number; + } + + /** + * The Impact Friction component. + * Should be applied as a mixin. + */ + interface Friction { + /** + * [description] + * @param x [description] + */ + setFrictionX(x: number): Phaser.GameObjects.GameObject; + /** + * [description] + * @param y [description] + */ + setFrictionY(y: number): Phaser.GameObjects.GameObject; + /** + * [description] + * @param x [description] + * @param y [description] + */ + setFriction(x: number, y: number): Phaser.GameObjects.GameObject; + } + + /** + * The Impact Gravity component. + * Should be applied as a mixin. + */ + interface Gravity { + /** + * [description] + * @param value [description] + */ + setGravity(value: number): Phaser.GameObjects.GameObject; + /** + * [description] + */ + gravity: number; + } + + /** + * The Impact Offset component. + * Should be applied as a mixin. + */ + interface Offset { + /** + * [description] + * @param x [description] + * @param y [description] + * @param width [description] + * @param height [description] + */ + setOffset(x: number, y: number, width?: number, height?: number): Phaser.GameObjects.GameObject; + } + + /** + * The Impact Set Game Object component. + * Should be applied as a mixin. + */ + interface SetGameObject { + /** + * [description] + * @param gameObject [description] + * @param sync [description] Default true. + */ + setGameObject(gameObject: Phaser.GameObjects.GameObject, sync?: boolean): Phaser.GameObjects.GameObject; + /** + * [description] + */ + syncGameObject(): Phaser.GameObjects.GameObject; + } + + /** + * The Impact Velocity component. + * Should be applied as a mixin. + */ + interface Velocity { + /** + * Sets the horizontal velocity of the physics body. + * @param x The horizontal velocity value. + */ + setVelocityX(x: number): this; + /** + * Sets the vertical velocity of the physics body. + * @param y The vertical velocity value. + */ + setVelocityY(y: number): this; + /** + * Sets the horizontal and vertical velocities of the physics body. + * @param x The horizontal velocity value. + * @param y The vertical velocity value. If not given, defaults to the horizontal value. Default x. + */ + setVelocity(x: number, y?: number): this; + /** + * Sets the maximum velocity this body can travel at. + * @param x The maximum allowed horizontal velocity. + * @param y The maximum allowed vertical velocity. If not given, defaults to the horizontal value. Default x. + */ + setMaxVelocity(x: number, y?: number): this; + } + + } + + namespace Events { + /** + * The Impact Physics World Collide Event. + * + * This event is dispatched by an Impact Physics World instance if two bodies collide. + * + * Listen to it from a Scene using: `this.impact.world.on('collide', listener)`. + */ + const COLLIDE: any; + + /** + * The Impact Physics World Pause Event. + * + * This event is dispatched by an Impact Physics World instance when it is paused. + * + * Listen to it from a Scene using: `this.impact.world.on('pause', listener)`. + */ + const PAUSE: any; + + /** + * The Impact Physics World Resume Event. + * + * This event is dispatched by an Impact Physics World instance when it resumes from a paused state. + * + * Listen to it from a Scene using: `this.impact.world.on('resume', listener)`. + */ + const RESUME: any; + + } + /** * The Impact Physics Factory allows you to easily create Impact Physics enabled Game Objects. * Objects that are created by this Factory are automatically added to the physics world. @@ -65958,333 +67113,894 @@ declare namespace Phaser { } + } + + namespace Matter { + /** + * The Body Bounds class contains methods to help you extract the world coordinates from various points around + * the bounds of a Matter Body. Because Matter bodies are positioned based on their center of mass, and not a + * dimension based center, you often need to get the bounds coordinates in order to properly align them in the world. + * + * You can access this class via the MatterPhysics class from a Scene, i.e.: + * + * ```javascript + * this.matter.bodyBounds.getTopLeft(body); + * ``` + * + * See also the `MatterPhysics.alignBody` method. + */ + class BodyBounds { + /** + * A Vector2 that stores the temporary bounds center value during calculations by methods in this class. + */ + boundsCenter: Phaser.Math.Vector2; + + /** + * A Vector2 that stores the temporary center diff values during calculations by methods in this class. + */ + centerDiff: Phaser.Math.Vector2; + + /** + * Parses the given body to get the bounds diff values from it. + * + * They're stored in this class in the temporary properties `boundsCenter` and `centerDiff`. + * + * This method is called automatically by all other methods in this class. + * @param body The Body to get the bounds position from. + */ + parseBody(body: Phaser.Types.Physics.Matter.MatterBody): boolean; + + /** + * Takes a Body and returns the world coordinates of the top-left of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * @param body The Body to get the position from. + * @param x Optional horizontal offset to add to the returned coordinates. Default 0. + * @param y Optional vertical offset to add to the returned coordinates. Default 0. + */ + getTopLeft(body: Phaser.Types.Physics.Matter.MatterBody, x?: number, y?: number): Phaser.Math.Vector2 | false; + + /** + * Takes a Body and returns the world coordinates of the top-center of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * @param body The Body to get the position from. + * @param x Optional horizontal offset to add to the returned coordinates. Default 0. + * @param y Optional vertical offset to add to the returned coordinates. Default 0. + */ + getTopCenter(body: Phaser.Types.Physics.Matter.MatterBody, x?: number, y?: number): Phaser.Math.Vector2 | false; + + /** + * Takes a Body and returns the world coordinates of the top-right of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * @param body The Body to get the position from. + * @param x Optional horizontal offset to add to the returned coordinates. Default 0. + * @param y Optional vertical offset to add to the returned coordinates. Default 0. + */ + getTopRight(body: Phaser.Types.Physics.Matter.MatterBody, x?: number, y?: number): Phaser.Math.Vector2 | false; + + /** + * Takes a Body and returns the world coordinates of the left-center of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * @param body The Body to get the position from. + * @param x Optional horizontal offset to add to the returned coordinates. Default 0. + * @param y Optional vertical offset to add to the returned coordinates. Default 0. + */ + getLeftCenter(body: Phaser.Types.Physics.Matter.MatterBody, x?: number, y?: number): Phaser.Math.Vector2 | false; + + /** + * Takes a Body and returns the world coordinates of the center of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * @param body The Body to get the position from. + * @param x Optional horizontal offset to add to the returned coordinates. Default 0. + * @param y Optional vertical offset to add to the returned coordinates. Default 0. + */ + getCenter(body: Phaser.Types.Physics.Matter.MatterBody, x?: number, y?: number): Phaser.Math.Vector2 | false; + + /** + * Takes a Body and returns the world coordinates of the right-center of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * @param body The Body to get the position from. + * @param x Optional horizontal offset to add to the returned coordinates. Default 0. + * @param y Optional vertical offset to add to the returned coordinates. Default 0. + */ + getRightCenter(body: Phaser.Types.Physics.Matter.MatterBody, x?: number, y?: number): Phaser.Math.Vector2 | false; + + /** + * Takes a Body and returns the world coordinates of the bottom-left of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * @param body The Body to get the position from. + * @param x Optional horizontal offset to add to the returned coordinates. Default 0. + * @param y Optional vertical offset to add to the returned coordinates. Default 0. + */ + getBottomLeft(body: Phaser.Types.Physics.Matter.MatterBody, x?: number, y?: number): Phaser.Math.Vector2 | false; + + /** + * Takes a Body and returns the world coordinates of the bottom-center of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * @param body The Body to get the position from. + * @param x Optional horizontal offset to add to the returned coordinates. Default 0. + * @param y Optional vertical offset to add to the returned coordinates. Default 0. + */ + getBottomCenter(body: Phaser.Types.Physics.Matter.MatterBody, x?: number, y?: number): Phaser.Math.Vector2 | false; + + /** + * Takes a Body and returns the world coordinates of the bottom-right of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * @param body The Body to get the position from. + * @param x Optional horizontal offset to add to the returned coordinates. Default 0. + * @param y Optional vertical offset to add to the returned coordinates. Default 0. + */ + getBottomRight(body: Phaser.Types.Physics.Matter.MatterBody, x?: number, y?: number): Phaser.Math.Vector2 | false; + + } + namespace Components { /** - * The Impact Acceleration component. - * Should be applied as a mixin. - */ - interface Acceleration { - /** - * Sets the horizontal acceleration of this body. - * @param x The amount of acceleration to apply. - */ - setAccelerationX(x: number): this; - /** - * Sets the vertical acceleration of this body. - * @param y The amount of acceleration to apply. - */ - setAccelerationY(y: number): this; - /** - * Sets the horizontal and vertical acceleration of this body. - * @param x The amount of horizontal acceleration to apply. - * @param y The amount of vertical acceleration to apply. - */ - setAcceleration(x: number, y: number): this; - } - - /** - * The Impact Body Scale component. - * Should be applied as a mixin. - */ - interface BodyScale { - /** - * Sets the size of the physics body. - * @param width The width of the body in pixels. - * @param height The height of the body in pixels. Default width. - */ - setBodySize(width: number, height?: number): this; - /** - * Sets the scale of the physics body. - * @param scaleX The horizontal scale of the body. - * @param scaleY The vertical scale of the body. If not given, will use the horizontal scale value. - */ - setBodyScale(scaleX: number, scaleY?: number): this; - } - - /** - * The Impact Body Type component. - * Should be applied as a mixin. - */ - interface BodyType { - /** - * [description] - */ - getBodyType(): number; - /** - * [description] - */ - setTypeNone(): Phaser.GameObjects.GameObject; - /** - * [description] - */ - setTypeA(): Phaser.GameObjects.GameObject; - /** - * [description] - */ - setTypeB(): Phaser.GameObjects.GameObject; - } - - /** - * The Impact Bounce component. - * Should be applied as a mixin. + * A component to set restitution on objects. */ interface Bounce { /** - * Sets the impact physics bounce, or restitution, value. - * @param value A value between 0 (no rebound) and 1 (full rebound) + * Sets the restitution on the physics object. + * @param value A Number that defines the restitution (elasticity) of the body. The value is always positive and is in the range (0, 1). A value of 0 means collisions may be perfectly inelastic and no bouncing may occur. A value of 0.8 means the body may bounce back with approximately 80% of its kinetic energy. Note that collision response is based on pairs of bodies, and that restitution values are combined with the following formula: `Math.max(bodyA.restitution, bodyB.restitution)` */ setBounce(value: number): Phaser.GameObjects.GameObject; - /** - * Sets the minimum velocity the body is allowed to be moving to be considered for rebound. - * @param value The minimum allowed velocity. - */ - setMinBounceVelocity(value: number): Phaser.GameObjects.GameObject; - /** - * The bounce, or restitution, value of this body. - * A value between 0 (no rebound) and 1 (full rebound) - */ - bounce: number; } /** - * The Impact Check Against component. - * Should be applied as a mixin. + * Contains methods for changing the collision filter of a Matter Body. Should be used as a mixin and not called directly. */ - interface CheckAgainst { + interface Collision { /** - * [description] + * Sets the collision category of this Game Object's Matter Body. This number must be a power of two between 2^0 (= 1) and 2^31. + * Two bodies with different collision groups (see {@link #setCollisionGroup}) will only collide if their collision + * categories are included in their collision masks (see {@link #setCollidesWith}). + * @param value Unique category bitfield. */ - setAvsB(): Phaser.GameObjects.GameObject; + setCollisionCategory(value: number): Phaser.GameObjects.GameObject; /** - * [description] + * Sets the collision group of this Game Object's Matter Body. If this is zero or two Matter Bodies have different values, + * they will collide according to the usual rules (see {@link #setCollisionCategory} and {@link #setCollisionGroup}). + * If two Matter Bodies have the same positive value, they will always collide; if they have the same negative value, + * they will never collide. + * @param value Unique group index. */ - setBvsA(): Phaser.GameObjects.GameObject; + setCollisionGroup(value: number): Phaser.GameObjects.GameObject; /** - * [description] + * Sets the collision mask for this Game Object's Matter Body. Two Matter Bodies with different collision groups will only + * collide if each one includes the other's category in its mask based on a bitwise AND, i.e. `(categoryA & maskB) !== 0` + * and `(categoryB & maskA) !== 0` are both true. + * @param categories A unique category bitfield, or an array of them. */ - setCheckAgainstNone(): Phaser.GameObjects.GameObject; + setCollidesWith(categories: number | number[]): Phaser.GameObjects.GameObject; /** - * [description] + * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object. + * + * This does not change the bodies collision category, group or filter. Those must be set in addition + * to the callback. + * @param callback The callback to invoke when this body starts colliding with another. */ - setCheckAgainstA(): Phaser.GameObjects.GameObject; + setOnCollide(callback: Function): Phaser.GameObjects.GameObject; /** - * [description] + * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object. + * + * This does not change the bodies collision category, group or filter. Those must be set in addition + * to the callback. + * @param callback The callback to invoke when this body stops colliding with another. */ - setCheckAgainstB(): Phaser.GameObjects.GameObject; + setOnCollideEnd(callback: Function): Phaser.GameObjects.GameObject; /** - * [description] + * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object. + * + * This does not change the bodies collision category, group or filter. Those must be set in addition + * to the callback. + * @param callback The callback to invoke for the duration of this body colliding with another. */ - checkAgainst: number; + setOnCollideActive(callback: Function): Phaser.GameObjects.GameObject; + /** + * The callback is sent a reference to the other body, along with a `Phaser.Types.Physics.Matter.MatterCollisionData` object. + * + * This does not change the bodies collision category, group or filter. Those must be set in addition + * to the callback. + * @param body The body, or an array of bodies, to test for collisions with. + * @param callback The callback to invoke when this body collides with the given body or bodies. + */ + setOnCollideWith(body: MatterJS.Body | MatterJS.Body[], callback: Function): Phaser.GameObjects.GameObject; } /** - * The Impact Collides component. - * Should be applied as a mixin. + * A component to apply force to Matter.js bodies. */ - interface Collides { + interface Force { /** - * [description] - * @param callback [description] - * @param scope [description] + * Applies a force to a body. + * @param force A Vector that specifies the force to apply. */ - setCollideCallback(callback: CollideCallback, scope: any): Phaser.GameObjects.GameObject; + applyForce(force: Phaser.Math.Vector2): Phaser.GameObjects.GameObject; /** - * [description] + * Applies a force to a body from a given position. + * @param position The position in which the force comes from. + * @param force A Vector that specifies the force to apply. */ - setCollidesNever(): Phaser.GameObjects.GameObject; + applyForceFrom(position: Phaser.Math.Vector2, force: Phaser.Math.Vector2): Phaser.GameObjects.GameObject; /** - * [description] + * Apply thrust to the forward position of the body. + * + * Use very small values, such as 0.1, depending on the mass and required speed. + * @param speed A speed value to be applied to a directional force. */ - setLiteCollision(): Phaser.GameObjects.GameObject; + thrust(speed: number): Phaser.GameObjects.GameObject; /** - * [description] + * Apply thrust to the left position of the body. + * + * Use very small values, such as 0.1, depending on the mass and required speed. + * @param speed A speed value to be applied to a directional force. */ - setPassiveCollision(): Phaser.GameObjects.GameObject; + thrustLeft(speed: number): Phaser.GameObjects.GameObject; /** - * [description] + * Apply thrust to the right position of the body. + * + * Use very small values, such as 0.1, depending on the mass and required speed. + * @param speed A speed value to be applied to a directional force. */ - setActiveCollision(): Phaser.GameObjects.GameObject; + thrustRight(speed: number): Phaser.GameObjects.GameObject; /** - * [description] + * Apply thrust to the back position of the body. + * + * Use very small values, such as 0.1, depending on the mass and required speed. + * @param speed A speed value to be applied to a directional force. */ - setFixedCollision(): Phaser.GameObjects.GameObject; - /** - * [description] - */ - collides: number; + thrustBack(speed: number): Phaser.GameObjects.GameObject; } /** - * The Impact Debug component. - * Should be applied as a mixin. - */ - interface Debug { - /** - * [description] - * @param showBody [description] - * @param showVelocity [description] - * @param bodyColor [description] - */ - setDebug(showBody: boolean, showVelocity: boolean, bodyColor: number): Phaser.GameObjects.GameObject; - /** - * [description] - * @param value [description] - */ - setDebugBodyColor(value: number): Phaser.GameObjects.GameObject; - /** - * [description] - */ - debugShowBody: boolean; - /** - * [description] - */ - debugShowVelocity: boolean; - /** - * [description] - */ - debugBodyColor: number; - } - - /** - * The Impact Friction component. - * Should be applied as a mixin. + * Contains methods for changing the friction of a Game Object's Matter Body. Should be used a mixin, not called directly. */ interface Friction { /** - * [description] - * @param x [description] + * Sets new friction values for this Game Object's Matter Body. + * @param value The new friction of the body, between 0 and 1, where 0 allows the Body to slide indefinitely, while 1 allows it to stop almost immediately after a force is applied. + * @param air If provided, the new air resistance of the Body. The higher the value, the faster the Body will slow as it moves through space. 0 means the body has no air resistance. + * @param fstatic If provided, the new static friction of the Body. The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary. 0 means the body will never "stick" when it is nearly stationary. */ - setFrictionX(x: number): Phaser.GameObjects.GameObject; + setFriction(value: number, air?: number, fstatic?: number): Phaser.GameObjects.GameObject; /** - * [description] - * @param y [description] + * Sets a new air resistance for this Game Object's Matter Body. + * A value of 0 means the Body will never slow as it moves through space. + * The higher the value, the faster a Body slows when moving through space. + * @param value The new air resistance for the Body. */ - setFrictionY(y: number): Phaser.GameObjects.GameObject; + setFrictionAir(value: number): Phaser.GameObjects.GameObject; /** - * [description] - * @param x [description] - * @param y [description] + * Sets a new static friction for this Game Object's Matter Body. + * A value of 0 means the Body will never "stick" when it is nearly stationary. + * The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary. + * @param value The new static friction for the Body. */ - setFriction(x: number, y: number): Phaser.GameObjects.GameObject; + setFrictionStatic(value: number): Phaser.GameObjects.GameObject; } /** - * The Impact Gravity component. - * Should be applied as a mixin. + * A component to manipulate world gravity for Matter.js bodies. */ interface Gravity { /** - * [description] - * @param value [description] + * A togglable function for ignoring world gravity in real-time on the current body. + * @param value Set to true to ignore the effect of world gravity, or false to not ignore it. */ - setGravity(value: number): Phaser.GameObjects.GameObject; - /** - * [description] - */ - gravity: number; + setIgnoreGravity(value: boolean): Phaser.GameObjects.GameObject; } /** - * The Impact Offset component. - * Should be applied as a mixin. + * Allows accessing the mass, density, and center of mass of a Matter-enabled Game Object. Should be used as a mixin and not directly. */ - interface Offset { + interface Mass { /** - * [description] - * @param x [description] - * @param y [description] - * @param width [description] - * @param height [description] + * Sets the mass of the Game Object's Matter Body. + * @param value The new mass of the body. */ - setOffset(x: number, y: number, width?: number, height?: number): Phaser.GameObjects.GameObject; + setMass(value: number): Phaser.GameObjects.GameObject; + /** + * Sets density of the body. + * @param value The new density of the body. + */ + setDensity(value: number): Phaser.GameObjects.GameObject; + /** + * The body's center of mass. + * + * Calling this creates a new `Vector2 each time to avoid mutation. + * + * If you only need to read the value and won't change it, you can get it from `GameObject.body.centerOfMass`. + */ + readonly centerOfMass: Phaser.Math.Vector2; } /** - * The Impact Set Game Object component. - * Should be applied as a mixin. + * Enables a Matter-enabled Game Object to be a sensor. Should be used as a mixin and not directly. */ - interface SetGameObject { + interface Sensor { /** - * [description] - * @param gameObject [description] - * @param sync [description] Default true. + * Set the body belonging to this Game Object to be a sensor. + * Sensors trigger collision events, but don't react with colliding body physically. + * @param value `true` to set the body as a sensor, or `false` to disable it. */ - setGameObject(gameObject: Phaser.GameObjects.GameObject, sync?: boolean): Phaser.GameObjects.GameObject; + setSensor(value: boolean): Phaser.GameObjects.GameObject; /** - * [description] + * Is the body belonging to this Game Object a sensor or not? */ - syncGameObject(): Phaser.GameObjects.GameObject; + isSensor(): boolean; } /** - * The Impact Velocity component. - * Should be applied as a mixin. + * Enables a Matter-enabled Game Object to set its Body. Should be used as a mixin and not directly. + */ + interface SetBody { + /** + * Set the body on a Game Object to a rectangle. + * + * Calling this methods resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. + * @param width Width of the rectangle. + * @param height Height of the rectangle. + * @param options An optional Body configuration object that is used to set initial Body properties on creation. + */ + setRectangle(width: number, height: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): Phaser.GameObjects.GameObject; + /** + * Set the body on a Game Object to a circle. + * + * Calling this methods resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. + * @param radius The radius of the circle. + * @param options An optional Body configuration object that is used to set initial Body properties on creation. + */ + setCircle(radius: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): Phaser.GameObjects.GameObject; + /** + * Set the body on the Game Object to a polygon shape. + * + * Calling this methods resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. + * @param sides The number of sides the polygon will have. + * @param radius The "radius" of the polygon, i.e. the distance from its center to any vertex. This is also the radius of its circumcircle. + * @param options An optional Body configuration object that is used to set initial Body properties on creation. + */ + setPolygon(sides: number, radius: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): Phaser.GameObjects.GameObject; + /** + * Set the body on the Game Object to a trapezoid shape. + * + * Calling this methods resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. + * @param width The width of the trapezoid Body. + * @param height The height of the trapezoid Body. + * @param slope The slope of the trapezoid. 0 creates a rectangle, while 1 creates a triangle. Positive values make the top side shorter, while negative values make the bottom side shorter. + * @param options An optional Body configuration object that is used to set initial Body properties on creation. + */ + setTrapezoid(width: number, height: number, slope: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): Phaser.GameObjects.GameObject; + /** + * Set this Game Object to use the given existing Matter Body. + * + * The body is first removed from the world before being added to this Game Object. + * @param body The Body this Game Object should use. + * @param addToWorld Should the body be immediately added to the World? Default true. + */ + setExistingBody(body: MatterJS.Body, addToWorld?: boolean): Phaser.GameObjects.GameObject; + /** + * Set this Game Object to create and use a new Body based on the configuration object given. + * + * Calling this method resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. + * @param config Either a string, such as `circle`, or a Matter Set Body Configuration object. + * @param options An optional Body configuration object that is used to set initial Body properties on creation. + */ + setBody(config: string | Phaser.Types.Physics.Matter.MatterSetBodyConfig, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): Phaser.GameObjects.GameObject; + } + + /** + * Enables a Matter-enabled Game Object to be able to go to sleep. Should be used as a mixin and not directly. + */ + interface Sleep { + /** + * Sets this Body to sleep. + */ + setToSleep(): this; + /** + * Wakes this Body if asleep. + */ + setAwake(): this; + /** + * Sets the number of updates in which this body must have near-zero velocity before it is set as sleeping (if sleeping is enabled by the engine). + * @param value A `Number` that defines the number of updates in which this body must have near-zero velocity before it is set as sleeping. Default 60. + */ + setSleepThreshold(value?: number): this; + /** + * Enable sleep and wake events for this body. + * + * By default when a body goes to sleep, or wakes up, it will not emit any events. + * + * The events are emitted by the Matter World instance and can be listened to via + * the `SLEEP_START` and `SLEEP_END` events. + * @param start `true` if you want the sleep start event to be emitted for this body. + * @param end `true` if you want the sleep end event to be emitted for this body. + */ + setSleepEvents(start: boolean, end: boolean): this; + /** + * Enables or disables the Sleep Start event for this body. + * @param value `true` to enable the sleep event, or `false` to disable it. + */ + setSleepStartEvent(value: boolean): this; + /** + * Enables or disables the Sleep End event for this body. + * @param value `true` to enable the sleep event, or `false` to disable it. + */ + setSleepEndEvent(value: boolean): this; + } + + /** + * Provides methods used for getting and setting the static state of a physics body. + */ + interface Static { + /** + * Changes the physics body to be either static `true` or dynamic `false`. + * @param value `true` to set the body as being static, or `false` to make it dynamic. + */ + setStatic(value: boolean): Phaser.GameObjects.GameObject; + /** + * Returns `true` if the body is static, otherwise `false` for a dynamic body. + */ + isStatic(): boolean; + } + + /** + * Provides methods used for getting and setting the position, scale and rotation of a Game Object. + */ + interface Transform { + /** + * The x position of this Game Object. + */ + x: number; + /** + * The y position of this Game Object. + */ + y: number; + /** + * The horizontal scale of this Game Object. + */ + scaleX: number; + /** + * The vertical scale of this Game Object. + */ + scaleY: number; + /** + * Use `angle` to set or get rotation of the physics body associated to this GameObject. + * Unlike rotation, when using set the value can be in degrees, which will be converted to radians internally. + */ + angle: number; + /** + * Use `rotation` to set or get the rotation of the physics body associated with this GameObject. + * The value when set must be in radians. + */ + rotation: number; + /** + * Sets the position of the physics body along x and y axes. + * Both the parameters to this function are optional and if not passed any they default to 0. + * Velocity, angle, force etc. are unchanged. + * @param x The horizontal position of the body. Default 0. + * @param y The vertical position of the body. Default x. + */ + setPosition(x?: number, y?: number): this; + /** + * Immediately sets the angle of the Body. + * Angular velocity, position, force etc. are unchanged. + * @param radians The angle of the body, in radians. Default 0. + */ + setRotation(radians?: number): this; + /** + * Setting fixed rotation sets the Body inertia to Infinity, which stops it + * from being able to rotate when forces are applied to it. + */ + setFixedRotation(): this; + /** + * Immediately sets the angle of the Body. + * Angular velocity, position, force etc. are unchanged. + * @param degrees The angle to set, in degrees. Default 0. + */ + setAngle(degrees?: number): this; + /** + * Sets the scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. + * @param y The vertical scale of this Game Object. If not set it will use the x value. Default x. + * @param point The point (Vector2) from which scaling will occur. + */ + setScale(x?: number, y?: number, point?: Phaser.Math.Vector2): this; + } + + /** + * Contains methods for changing the velocity of a Matter Body. Should be used as a mixin and not called directly. */ interface Velocity { + /** + * Sets the angular velocity of the body instantly. + * Position, angle, force etc. are unchanged. + * @param value The angular velocity. + */ + setAngularVelocity(value: number): Phaser.GameObjects.GameObject; /** * Sets the horizontal velocity of the physics body. * @param x The horizontal velocity value. */ - setVelocityX(x: number): this; + setVelocityX(x: number): Phaser.GameObjects.GameObject; /** - * Sets the vertical velocity of the physics body. + * Sets vertical velocity of the physics body. * @param y The vertical velocity value. */ - setVelocityY(y: number): this; + setVelocityY(y: number): Phaser.GameObjects.GameObject; /** - * Sets the horizontal and vertical velocities of the physics body. + * Sets both the horizontal and vertical velocity of the physics body. * @param x The horizontal velocity value. - * @param y The vertical velocity value. If not given, defaults to the horizontal value. Default x. + * @param y The vertical velocity value, it can be either positive or negative. If not given, it will be the same as the `x` value. Default x. */ - setVelocity(x: number, y?: number): this; - /** - * Sets the maximum velocity this body can travel at. - * @param x The maximum allowed horizontal velocity. - * @param y The maximum allowed vertical velocity. If not given, defaults to the horizontal value. Default x. - */ - setMaxVelocity(x: number, y?: number): this; + setVelocity(x: number, y?: number): Phaser.GameObjects.GameObject; } } + namespace Matter { + } + namespace Events { - /** - * The Impact Physics World Collide Event. - * - * This event is dispatched by an Impact Physics World instance if two bodies collide. - * - * Listen to it from a Scene using: `this.impact.world.on('collide', listener)`. - */ - const COLLIDE: any; + type AfterAddEvent = { + /** + * An array of the object(s) that have been added. May be a single body, constraint, composite or a mixture of these. + */ + object: any[]; + /** + * The source object of the event. + */ + source: any; + /** + * The name of the event. + */ + name: string; + }; /** - * The Impact Physics World Pause Event. + * The Matter Physics After Add Event. * - * This event is dispatched by an Impact Physics World instance when it is paused. + * This event is dispatched by a Matter Physics World instance at the end of the process when a new Body + * or Constraint has just been added to the world. * - * Listen to it from a Scene using: `this.impact.world.on('pause', listener)`. + * Listen to it from a Scene using: `this.matter.world.on('afteradd', listener)`. + */ + const AFTER_ADD: any; + + type AfterRemoveEvent = { + /** + * An array of the object(s) that were removed. May be a single body, constraint, composite or a mixture of these. + */ + object: any[]; + /** + * The source object of the event. + */ + source: any; + /** + * The name of the event. + */ + name: string; + }; + + /** + * The Matter Physics After Remove Event. + * + * This event is dispatched by a Matter Physics World instance at the end of the process when a + * Body or Constraint was removed from the world. + * + * Listen to it from a Scene using: `this.matter.world.on('afterremove', listener)`. + */ + const AFTER_REMOVE: any; + + type AfterUpdateEvent = { + /** + * The Matter Engine `timing.timestamp` value for the event. + */ + timestamp: number; + /** + * The source object of the event. + */ + source: any; + /** + * The name of the event. + */ + name: string; + }; + + /** + * The Matter Physics After Update Event. + * + * This event is dispatched by a Matter Physics World instance after the engine has updated and all collision events have resolved. + * + * Listen to it from a Scene using: `this.matter.world.on('afterupdate', listener)`. + */ + const AFTER_UPDATE: any; + + type BeforeAddEvent = { + /** + * An array of the object(s) to be added. May be a single body, constraint, composite or a mixture of these. + */ + object: any[]; + /** + * The source object of the event. + */ + source: any; + /** + * The name of the event. + */ + name: string; + }; + + /** + * The Matter Physics Before Add Event. + * + * This event is dispatched by a Matter Physics World instance at the start of the process when a new Body + * or Constraint is being added to the world. + * + * Listen to it from a Scene using: `this.matter.world.on('beforeadd', listener)`. + */ + const BEFORE_ADD: any; + + type BeforeRemoveEvent = { + /** + * An array of the object(s) to be removed. May be a single body, constraint, composite or a mixture of these. + */ + object: any[]; + /** + * The source object of the event. + */ + source: any; + /** + * The name of the event. + */ + name: string; + }; + + /** + * The Matter Physics Before Remove Event. + * + * This event is dispatched by a Matter Physics World instance at the start of the process when a + * Body or Constraint is being removed from the world. + * + * Listen to it from a Scene using: `this.matter.world.on('beforeremove', listener)`. + */ + const BEFORE_REMOVE: any; + + type BeforeUpdateEvent = { + /** + * The Matter Engine `timing.timestamp` value for the event. + */ + timestamp: number; + /** + * The source object of the event. + */ + source: any; + /** + * The name of the event. + */ + name: string; + }; + + /** + * The Matter Physics Before Update Event. + * + * This event is dispatched by a Matter Physics World instance right before all the collision processing takes place. + * + * Listen to it from a Scene using: `this.matter.world.on('beforeupdate', listener)`. + */ + const BEFORE_UPDATE: any; + + type CollisionActiveEvent = { + /** + * A list of all affected pairs in the collision. + */ + pairs: Phaser.Types.Physics.Matter.MatterCollisionData[]; + /** + * The Matter Engine `timing.timestamp` value for the event. + */ + timestamp: number; + /** + * The source object of the event. + */ + source: any; + /** + * The name of the event. + */ + name: string; + }; + + /** + * The Matter Physics Collision Active Event. + * + * This event is dispatched by a Matter Physics World instance after the engine has updated. + * It provides a list of all pairs that are colliding in the current tick (if any). + * + * Listen to it from a Scene using: `this.matter.world.on('collisionactive', listener)`. + */ + const COLLISION_ACTIVE: any; + + type CollisionEndEvent = { + /** + * A list of all affected pairs in the collision. + */ + pairs: Phaser.Types.Physics.Matter.MatterCollisionData[]; + /** + * The Matter Engine `timing.timestamp` value for the event. + */ + timestamp: number; + /** + * The source object of the event. + */ + source: any; + /** + * The name of the event. + */ + name: string; + }; + + /** + * The Matter Physics Collision End Event. + * + * This event is dispatched by a Matter Physics World instance after the engine has updated. + * It provides a list of all pairs that have finished colliding in the current tick (if any). + * + * Listen to it from a Scene using: `this.matter.world.on('collisionend', listener)`. + */ + const COLLISION_END: any; + + type CollisionStartEvent = { + /** + * A list of all affected pairs in the collision. + */ + pairs: Phaser.Types.Physics.Matter.MatterCollisionData[]; + /** + * The Matter Engine `timing.timestamp` value for the event. + */ + timestamp: number; + /** + * The source object of the event. + */ + source: any; + /** + * The name of the event. + */ + name: string; + }; + + /** + * The Matter Physics Collision Start Event. + * + * This event is dispatched by a Matter Physics World instance after the engine has updated. + * It provides a list of all pairs that have started to collide in the current tick (if any). + * + * Listen to it from a Scene using: `this.matter.world.on('collisionstart', listener)`. + */ + const COLLISION_START: any; + + /** + * The Matter Physics Drag End Event. + * + * This event is dispatched by a Matter Physics World instance when a Pointer Constraint + * stops dragging a body. + * + * Listen to it from a Scene using: `this.matter.world.on('dragend', listener)`. + */ + const DRAG_END: any; + + /** + * The Matter Physics Drag Event. + * + * This event is dispatched by a Matter Physics World instance when a Pointer Constraint + * is actively dragging a body. It is emitted each time the pointer moves. + * + * Listen to it from a Scene using: `this.matter.world.on('drag', listener)`. + */ + const DRAG: any; + + /** + * The Matter Physics Drag Start Event. + * + * This event is dispatched by a Matter Physics World instance when a Pointer Constraint + * starts dragging a body. + * + * Listen to it from a Scene using: `this.matter.world.on('dragstart', listener)`. + */ + const DRAG_START: any; + + /** + * The Matter Physics World Pause Event. + * + * This event is dispatched by an Matter Physics World instance when it is paused. + * + * Listen to it from a Scene using: `this.matter.world.on('pause', listener)`. */ const PAUSE: any; /** - * The Impact Physics World Resume Event. + * The Matter Physics World Resume Event. * - * This event is dispatched by an Impact Physics World instance when it resumes from a paused state. + * This event is dispatched by an Matter Physics World instance when it resumes from a paused state. * - * Listen to it from a Scene using: `this.impact.world.on('resume', listener)`. + * Listen to it from a Scene using: `this.matter.world.on('resume', listener)`. */ const RESUME: any; - } + type SleepEndEvent = { + /** + * The source object of the event. + */ + source: any; + /** + * The name of the event. + */ + name: string; + }; - } + /** + * The Matter Physics Sleep End Event. + * + * This event is dispatched by a Matter Physics World instance when a Body stop sleeping. + * + * Listen to it from a Scene using: `this.matter.world.on('sleepend', listener)`. + */ + const SLEEP_END: any; + + type SleepStartEvent = { + /** + * The source object of the event. + */ + source: any; + /** + * The name of the event. + */ + name: string; + }; + + /** + * The Matter Physics Sleep Start Event. + * + * This event is dispatched by a Matter Physics World instance when a Body goes to sleep. + * + * Listen to it from a Scene using: `this.matter.world.on('sleepstart', listener)`. + */ + const SLEEP_START: any; - namespace Matter { - namespace Matter { } /** - * The Matter Factory can create different types of bodies and them to a physics world. + * The Matter Factory is responsible for quickly creating a variety of different types of + * bodies, constraints and Game Objects and adding them into the physics world. + * + * You access the factory from within a Scene using `add`: + * + * ```javascript + * this.matter.add.rectangle(x, y, width, height); + * ``` + * + * Use of the Factory is optional. All of the objects it creates can also be created + * directly via your own code or constructors. It is provided as a means to keep your + * code concise. */ class Factory { /** @@ -66314,30 +68030,30 @@ declare namespace Phaser { * @param y The Y coordinate of the center of the Body. * @param width The width of the Body. * @param height The height of the Body. - * @param options An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body. + * @param options An optional Body configuration object that is used to set initial Body properties on creation. */ - rectangle(x: number, y: number, width: number, height: number, options: object): MatterJS.Body; + rectangle(x: number, y: number, width: number, height: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): MatterJS.Body; /** * Creates a new rigid trapezoidal Body and adds it to the World. * @param x The X coordinate of the center of the Body. * @param y The Y coordinate of the center of the Body. - * @param width The width of the trapezoid of the Body. - * @param height The height of the trapezoid of the Body. + * @param width The width of the trapezoid Body. + * @param height The height of the trapezoid Body. * @param slope The slope of the trapezoid. 0 creates a rectangle, while 1 creates a triangle. Positive values make the top side shorter, while negative values make the bottom side shorter. - * @param options An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body. + * @param options An optional Body configuration object that is used to set initial Body properties on creation. */ - trapezoid(x: number, y: number, width: number, height: number, slope: number, options: object): MatterJS.Body; + trapezoid(x: number, y: number, width: number, height: number, slope: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): MatterJS.Body; /** * Creates a new rigid circular Body and adds it to the World. * @param x The X coordinate of the center of the Body. * @param y The Y coordinate of the center of the Body. * @param radius The radius of the circle. - * @param options An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body. + * @param options An optional Body configuration object that is used to set initial Body properties on creation. * @param maxSides The maximum amount of sides to use for the polygon which will approximate this circle. */ - circle(x: number, y: number, radius: number, options?: object, maxSides?: number): MatterJS.Body; + circle(x: number, y: number, radius: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig, maxSides?: number): MatterJS.Body; /** * Creates a new rigid polygonal Body and adds it to the World. @@ -66345,34 +68061,124 @@ declare namespace Phaser { * @param y The Y coordinate of the center of the Body. * @param sides The number of sides the polygon will have. * @param radius The "radius" of the polygon, i.e. the distance from its center to any vertex. This is also the radius of its circumcircle. - * @param options An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body. + * @param options An optional Body configuration object that is used to set initial Body properties on creation. */ - polygon(x: number, y: number, sides: number, radius: number, options: object): MatterJS.Body; + polygon(x: number, y: number, sides: number, radius: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): MatterJS.Body; /** * Creates a body using the supplied vertices (or an array containing multiple sets of vertices) and adds it to the World. * If the vertices are convex, they will pass through as supplied. Otherwise, if the vertices are concave, they will be decomposed. Note that this process is not guaranteed to support complex sets of vertices, e.g. ones with holes. * @param x The X coordinate of the center of the Body. * @param y The Y coordinate of the center of the Body. - * @param vertexSets [description] - * @param options [description] + * @param vertexSets The vertices data. Either a path string or an array of vertices. + * @param options An optional Body configuration object that is used to set initial Body properties on creation. * @param flagInternal Flag internal edges (coincident part edges) Default false. * @param removeCollinear Whether Matter.js will discard collinear edges (to improve performance). Default 0.01. * @param minimumArea During decomposition discard parts that have an area less than this. Default 10. */ - fromVertices(x: number, y: number, vertexSets: string | any[], options?: object, flagInternal?: boolean, removeCollinear?: number, minimumArea?: number): MatterJS.Body; + fromVertices(x: number, y: number, vertexSets: string | any[], options?: Phaser.Types.Physics.Matter.MatterBodyConfig, flagInternal?: boolean, removeCollinear?: number, minimumArea?: number): MatterJS.Body; /** - * **This function is still in development** + * Creates a body using data exported from the application PhysicsEditor (https://www.codeandweb.com/physicseditor) * - * Creates a body using the supplied body data, as provided by a JSON file. - * @param x The X coordinate of the body. - * @param y The Y coordinate of the body. - * @param data The body data object as parsed from the JSON body format. - * @param options Optional Matter body configuration object, as passed to `Body.create`. + * The PhysicsEditor file should be loaded as JSON: + * + * ```javascript + * preload () + * { + * this.load.json('vehicles', 'assets/vehicles.json); + * } + * + * create () + * { + * const vehicleShapes = this.cache.json.get('vehicles'); + * this.matter.add.fromPhysicsEditor(400, 300, vehicleShapes.truck); + * } + * ``` + * + * Do not pass the entire JSON file to this method, but instead pass one of the shapes contained within it. + * + * If you pas in an `options` object, any settings in there will override those in the PhysicsEditor config object. + * @param x The horizontal world location of the body. + * @param y The vertical world location of the body. + * @param config The JSON data exported from PhysicsEditor. + * @param options An optional Body configuration object that is used to set initial Body properties on creation. * @param addToWorld Should the newly created body be immediately added to the World? Default true. */ - fromJSON(x: number, y: number, data: object, options?: object, addToWorld?: boolean): MatterJS.Body; + fromPhysicsEditor(x: number, y: number, config: any, options?: Phaser.Types.Physics.Matter.MatterBodyConfig, addToWorld?: boolean): MatterJS.Body; + + /** + * Creates a body using the path data from an SVG file. + * + * SVG Parsing requires the pathseg polyfill from https://github.com/progers/pathseg + * + * The SVG file should be loaded as XML, as this method requires the ability to extract + * the path data from it. I.e.: + * + * ```javascript + * preload () + * { + * this.load.xml('face', 'assets/face.svg); + * } + * + * create () + * { + * this.matter.add.fromSVG(400, 300, this.cache.xml.get('face')); + * } + * ``` + * @param x The X coordinate of the body. + * @param y The Y coordinate of the body. + * @param xml The SVG Path data. + * @param scale Scale the vertices by this amount after creation. Default 1. + * @param options An optional Body configuration object that is used to set initial Body properties on creation. + * @param addToWorld Should the newly created body be immediately added to the World? Default true. + */ + fromSVG(x: number, y: number, xml: object, scale?: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig, addToWorld?: boolean): MatterJS.Body; + + /** + * Creates a body using the supplied physics data, as provided by a JSON file. + * + * The data file should be loaded as JSON: + * + * ```javascript + * preload () + * { + * this.load.json('ninjas', 'assets/ninjas.json); + * } + * + * create () + * { + * const ninjaShapes = this.cache.json.get('ninjas'); + * + * this.matter.add.fromJSON(400, 300, ninjaShapes.shinobi); + * } + * ``` + * + * Do not pass the entire JSON file to this method, but instead pass one of the shapes contained within it. + * + * If you pas in an `options` object, any settings in there will override those in the config object. + * + * The structure of the JSON file is as follows: + * + * ```text + * { + * 'generator_info': // The name of the application that created the JSON data + * 'shapeName': { + * 'type': // The type of body + * 'label': // Optional body label + * 'vertices': // An array, or an array of arrays, containing the vertex data in x/y object pairs + * } + * } + * ``` + * + * At the time of writing, only the Phaser Physics Tracer App exports in this format. + * @param x The X coordinate of the body. + * @param y The Y coordinate of the body. + * @param config The JSON physics data. + * @param options An optional Body configuration object that is used to set initial Body properties on creation. + * @param addToWorld Should the newly created body be immediately added to the World? Default true. + */ + fromJSON(x: number, y: number, config: any, options?: Phaser.Types.Physics.Matter.MatterBodyConfig, addToWorld?: boolean): MatterJS.Body; /** * Create a new composite containing Matter Image objects created in a grid arrangement. @@ -66385,12 +68191,13 @@ declare namespace Phaser { * @param rows The number of rows in the grid. * @param columnGap The distance between each column. Default 0. * @param rowGap The distance between each row. Default 0. - * @param options [description] + * @param options An optional Body configuration object that is used to set initial Body properties on creation. */ - imageStack(key: string, frame: string | integer, x: number, y: number, columns: number, rows: number, columnGap?: number, rowGap?: number, options?: object): MatterJS.Composite; + imageStack(key: string, frame: string | integer, x: number, y: number, columns: number, rows: number, columnGap?: number, rowGap?: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): MatterJS.Composite; /** * Create a new composite containing bodies created in the callback in a grid arrangement. + * * This function uses the body bounds to prevent overlaps. * @param x The horizontal position of this composite in the world. * @param y The vertical position of this composite in the world. @@ -66417,42 +68224,42 @@ declare namespace Phaser { /** * Chains all bodies in the given composite together using constraints. - * @param composite [description] - * @param xOffsetA [description] - * @param yOffsetA [description] - * @param xOffsetB [description] - * @param yOffsetB [description] - * @param options [description] + * @param composite The composite in which all bodies will be chained together sequentially. + * @param xOffsetA The horizontal offset of the BodyA constraint. This is a percentage based on the body size, not a world position. + * @param yOffsetA The vertical offset of the BodyA constraint. This is a percentage based on the body size, not a world position. + * @param xOffsetB The horizontal offset of the BodyB constraint. This is a percentage based on the body size, not a world position. + * @param yOffsetB The vertical offset of the BodyB constraint. This is a percentage based on the body size, not a world position. + * @param options An optional Constraint configuration object that is used to set initial Constraint properties on creation. */ - chain(composite: MatterJS.Composite, xOffsetA: number, yOffsetA: number, xOffsetB: number, yOffsetB: number, options: object): MatterJS.Composite; + chain(composite: MatterJS.Composite, xOffsetA: number, yOffsetA: number, xOffsetB: number, yOffsetB: number, options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.Composite; /** * Connects bodies in the composite with constraints in a grid pattern, with optional cross braces. - * @param composite [description] - * @param columns [description] - * @param rows [description] - * @param crossBrace [description] - * @param options [description] + * @param composite The composite in which all bodies will be chained together. + * @param columns The number of columns in the mesh. + * @param rows The number of rows in the mesh. + * @param crossBrace Create cross braces for the mesh as well? + * @param options An optional Constraint configuration object that is used to set initial Constraint properties on creation. */ - mesh(composite: MatterJS.Composite, columns: number, rows: number, crossBrace: boolean, options: object): MatterJS.Composite; + mesh(composite: MatterJS.Composite, columns: number, rows: number, crossBrace: boolean, options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.Composite; /** * Creates a composite with a Newton's Cradle setup of bodies and constraints. - * @param x [description] - * @param y [description] - * @param number [description] - * @param size [description] - * @param length [description] + * @param x The horizontal position of the start of the cradle. + * @param y The vertical position of the start of the cradle. + * @param number The number of balls in the cradle. + * @param size The radius of each ball in the cradle. + * @param length The length of the 'string' the balls hang from. */ newtonsCradle(x: number, y: number, number: number, size: number, length: number): MatterJS.Composite; /** * Creates a composite with simple car setup of bodies and constraints. - * @param x [description] - * @param y [description] - * @param width [description] - * @param height [description] - * @param wheelSize [description] + * @param x The horizontal position of the car in the world. + * @param y The vertical position of the car in the world. + * @param width The width of the car chasis. + * @param height The height of the car chasis. + * @param wheelSize The radius of the car wheels. */ car(x: number, y: number, width: number, height: number, wheelSize: number): MatterJS.Composite; @@ -66464,124 +68271,193 @@ declare namespace Phaser { * @param rows The number of rows in the Composite. * @param columnGap The distance between each column. * @param rowGap The distance between each row. - * @param crossBrace [description] + * @param crossBrace `true` to create cross braces between the bodies, or `false` to create just straight braces. * @param particleRadius The radius of this circlular composite. - * @param particleOptions [description] - * @param constraintOptions [description] + * @param particleOptions An optional Body configuration object that is used to set initial Body properties on creation. + * @param constraintOptions An optional Constraint configuration object that is used to set initial Constraint properties on creation. */ - softBody(x: number, y: number, columns: number, rows: number, columnGap: number, rowGap: number, crossBrace: boolean, particleRadius: number, particleOptions: object, constraintOptions: object): MatterJS.Composite; + softBody(x: number, y: number, columns: number, rows: number, columnGap: number, rowGap: number, crossBrace: boolean, particleRadius: number, particleOptions?: Phaser.Types.Physics.Matter.MatterBodyConfig, constraintOptions?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.Composite; /** - * [description] + * This method is an alias for `Factory.constraint`. + * + * Constraints (or joints) are used for specifying that a fixed distance must be maintained + * between two bodies, or a body and a fixed world-space position. + * + * The stiffness of constraints can be modified to create springs or elastic. + * + * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` + * value (e.g. `0.7` or above). + * + * If the constraint is unstable, try lowering the `stiffness` value and / or increasing + * `constraintIterations` within the Matter Config. + * + * For compound bodies, constraints must be applied to the parent body and not one of its parts. * @param bodyA The first possible `Body` that this constraint is attached to. * @param bodyB The second possible `Body` that this constraint is attached to. * @param length A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. * @param stiffness A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. Default 1. - * @param options [description] Default {}. + * @param options An optional Constraint configuration object that is used to set initial Constraint properties on creation. */ - joint(bodyA: MatterJS.Body, bodyB: MatterJS.Body, length?: number, stiffness?: number, options?: object): MatterJS.Constraint; + joint(bodyA: MatterJS.Body, bodyB: MatterJS.Body, length?: number, stiffness?: number, options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.Constraint; /** - * [description] + * This method is an alias for `Factory.constraint`. + * + * Constraints (or joints) are used for specifying that a fixed distance must be maintained + * between two bodies, or a body and a fixed world-space position. + * + * The stiffness of constraints can be modified to create springs or elastic. + * + * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` + * value (e.g. `0.7` or above). + * + * If the constraint is unstable, try lowering the `stiffness` value and / or increasing + * `constraintIterations` within the Matter Config. + * + * For compound bodies, constraints must be applied to the parent body and not one of its parts. * @param bodyA The first possible `Body` that this constraint is attached to. * @param bodyB The second possible `Body` that this constraint is attached to. * @param length A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. * @param stiffness A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. Default 1. - * @param options [description] Default {}. + * @param options An optional Constraint configuration object that is used to set initial Constraint properties on creation. */ - spring(bodyA: MatterJS.Body, bodyB: MatterJS.Body, length?: number, stiffness?: number, options?: object): MatterJS.Constraint; + spring(bodyA: MatterJS.Body, bodyB: MatterJS.Body, length?: number, stiffness?: number, options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.Constraint; /** - * [description] + * Constraints (or joints) are used for specifying that a fixed distance must be maintained + * between two bodies, or a body and a fixed world-space position. + * + * The stiffness of constraints can be modified to create springs or elastic. + * + * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` + * value (e.g. `0.7` or above). + * + * If the constraint is unstable, try lowering the `stiffness` value and / or increasing + * `constraintIterations` within the Matter Config. + * + * For compound bodies, constraints must be applied to the parent body and not one of its parts. * @param bodyA The first possible `Body` that this constraint is attached to. * @param bodyB The second possible `Body` that this constraint is attached to. * @param length A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. * @param stiffness A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. Default 1. - * @param options [description] Default {}. + * @param options An optional Constraint configuration object that is used to set initial Constraint properties on creation. */ - constraint(bodyA: MatterJS.Body, bodyB: MatterJS.Body, length?: number, stiffness?: number, options?: object): MatterJS.Constraint; + constraint(bodyA: MatterJS.Body, bodyB: MatterJS.Body, length?: number, stiffness?: number, options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.Constraint; /** - * [description] + * Constraints (or joints) are used for specifying that a fixed distance must be maintained + * between two bodies, or a body and a fixed world-space position. + * + * A world constraint has only one body, you should specify a `pointA` position in + * the constraint options parameter to attach the constraint to the world. + * + * The stiffness of constraints can be modified to create springs or elastic. + * + * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` + * value (e.g. `0.7` or above). + * + * If the constraint is unstable, try lowering the `stiffness` value and / or increasing + * `constraintIterations` within the Matter Config. + * + * For compound bodies, constraints must be applied to the parent body and not one of its parts. * @param body The Matter `Body` that this constraint is attached to. * @param length A number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. * @param stiffness A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. Default 1. - * @param options [description] Default {}. + * @param options An optional Constraint configuration object that is used to set initial Constraint properties on creation. */ - worldConstraint(body: MatterJS.Body, length?: number, stiffness?: number, options?: object): MatterJS.Constraint; + worldConstraint(body: MatterJS.Body, length?: number, stiffness?: number, options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.Constraint; /** - * [description] - * @param options [description] + * This method is an alias for `Factory.pointerConstraint`. + * + * A Pointer Constraint is a special type of constraint that allows you to click + * and drag bodies in a Matter World. It monitors the active Pointers in a Scene, + * and when one is pressed down it checks to see if that hit any part of any active + * body in the world. If it did, and the body has input enabled, it will begin to + * drag it until either released, or you stop it via the `stopDrag` method. + * + * You can adjust the stiffness, length and other properties of the constraint via + * the `options` object on creation. + * @param options An optional Constraint configuration object that is used to set initial Constraint properties on creation. */ - mouseSpring(options: object): MatterJS.Constraint; + mouseSpring(options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.Constraint; /** - * [description] - * @param options [description] + * A Pointer Constraint is a special type of constraint that allows you to click + * and drag bodies in a Matter World. It monitors the active Pointers in a Scene, + * and when one is pressed down it checks to see if that hit any part of any active + * body in the world. If it did, and the body has input enabled, it will begin to + * drag it until either released, or you stop it via the `stopDrag` method. + * + * You can adjust the stiffness, length and other properties of the constraint via + * the `options` object on creation. + * @param options An optional Constraint configuration object that is used to set initial Constraint properties on creation. */ - pointerConstraint(options: object): MatterJS.Constraint; + pointerConstraint(options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.Constraint; /** - * [description] + * Creates a Matter Physics Image Game Object. + * + * An Image is a light-weight Game Object useful for the display of static images in your game, + * such as logos, backgrounds, scenery or other non-animated elements. Images can have input + * events and physics bodies, or be tweened, tinted or scrolled. The main difference between an + * Image and a Sprite is that you cannot animate an Image as they do not have the Animation component. * @param x The horizontal position of this Game Object in the world. * @param y The vertical position of this Game Object in the world. * @param key The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. * @param frame An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value. - * @param options [description] Default {}. + * @param options An optional Body configuration object that is used to set initial Body properties on creation. */ - image(x: number, y: number, key: string, frame?: string | integer, options?: object): Phaser.Physics.Matter.Image; + image(x: number, y: number, key: string, frame?: string | integer, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): Phaser.Physics.Matter.Image; /** - * [description] - * @param tile [description] - * @param options [description] + * Creates a wrapper around a Tile that provides access to a corresponding Matter body. A tile can only + * have one Matter body associated with it. You can either pass in an existing Matter body for + * the tile or allow the constructor to create the corresponding body for you. If the Tile has a + * collision group (defined in Tiled), those shapes will be used to create the body. If not, the + * tile's rectangle bounding box will be used. + * + * The corresponding body will be accessible on the Tile itself via Tile.physics.matterBody. + * + * Note: not all Tiled collision shapes are supported. See + * Phaser.Physics.Matter.TileBody#setFromTileCollision for more information. + * @param tile The target tile that should have a Matter body. + * @param options Options to be used when creating the Matter body. */ - tileBody(tile: Phaser.Tilemaps.Tile, options: object): Phaser.Physics.Matter.TileBody; + tileBody(tile: Phaser.Tilemaps.Tile, options?: Phaser.Types.Physics.Matter.MatterTileOptions): Phaser.Physics.Matter.TileBody; /** - * [description] + * Creates a Matter Physics Sprite Game Object. + * + * A Sprite Game Object is used for the display of both static and animated images in your game. + * Sprites can have input events and physics bodies. They can also be tweened, tinted, scrolled + * and animated. + * + * The main difference between a Sprite and an Image Game Object is that you cannot animate Images. + * As such, Sprites take a fraction longer to process and have a larger API footprint due to the Animation + * Component. If you do not require animation then you can safely use Images to replace Sprites in all cases. * @param x The horizontal position of this Game Object in the world. * @param y The vertical position of this Game Object in the world. * @param key The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. * @param frame An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value. - * @param options [description] Default {}. + * @param options An optional Body configuration object that is used to set initial Body properties on creation. */ - sprite(x: number, y: number, key: string, frame?: string | integer, options?: object): Phaser.Physics.Matter.Sprite; + sprite(x: number, y: number, key: string, frame?: string | integer, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): Phaser.Physics.Matter.Sprite; /** - * [description] - * @param gameObject The Game Object to inject the Matter Body in to. + * Takes an existing Game Object and injects all of the Matter Components into it. + * + * This enables you to use component methods such as `setVelocity` or `isSensor` directly from + * this Game Object. + * + * You can also pass in either a Matter Body Configuration object, or a Matter Body instance + * to link with this Game Object. + * @param gameObject The Game Object to inject the Matter Components in to. * @param options A Matter Body configuration object, or an instance of a Matter Body. * @param addToWorld Add this Matter Body to the World? Default true. */ - gameObject(gameObject: Phaser.GameObjects.GameObject, options?: object | MatterJS.Body, addToWorld?: boolean): Phaser.GameObjects.GameObject; - - /** - * Instantly sets the linear velocity of the given body. Position, angle, force etc. are unchanged. - * - * See also `force`. - * @param body The Matter Body to set the velocity on. - * @param velocity The velocity to set. An object with public `x` and `y` components. - */ - velocity(body: MatterJS.Body, velocity: Phaser.Types.Math.Vector2Like): MatterJS.Body; - - /** - * Instantly sets the angular velocity of the given body. Position, angle, force etc. are unchanged. - * - * See also `force`. - * @param body The Matter Body to set the velocity on. - * @param velocity The angular velocity to set. - */ - angularVelocity(body: MatterJS.Body, velocity: number): MatterJS.Body; - - /** - * Applies a force to a body from a given world-space position, including resulting torque. - * @param body The Matter Body to set the force on. - * @param position The world position to apply the force from. An object with public `x` and `y` components. - * @param force The force to set. An object with public `x` and `y` components. - */ - force(body: MatterJS.Body, position: Phaser.Types.Math.Vector2Like, force: Phaser.Types.Math.Vector2Like): MatterJS.Body; + gameObject(gameObject: Phaser.GameObjects.GameObject, options?: Phaser.Types.Physics.Matter.MatterBodyConfig | MatterJS.Body, addToWorld?: boolean): Phaser.GameObjects.GameObject; /** * Destroys this Factory. @@ -66591,13 +68467,17 @@ declare namespace Phaser { } /** - * [description] + * A Matter Game Object is a generic object that allows you to combine any Phaser Game Object, + * including those you have extended or created yourself, with all of the Matter Components. + * + * This enables you to use component methods such as `setVelocity` or `isSensor` directly from + * this Game Object. * @param world The Matter world to add the body to. * @param gameObject The Game Object that will have the Matter body applied to it. * @param options A Matter Body configuration object, or an instance of a Matter Body. * @param addToWorld Should the newly created body be immediately added to the World? Default true. */ - function MatterGameObject(world: Phaser.Physics.Matter.World, gameObject: Phaser.GameObjects.GameObject, options?: object | MatterJS.Body, addToWorld?: boolean): Phaser.GameObjects.GameObject; + function MatterGameObject(world: Phaser.Physics.Matter.World, gameObject: Phaser.GameObjects.GameObject, options?: Phaser.Types.Physics.Matter.MatterBodyConfig | MatterJS.Body, addToWorld?: boolean): Phaser.GameObjects.GameObject; /** * A Matter Physics Image Game Object. @@ -66615,9 +68495,9 @@ declare namespace Phaser { * @param y The vertical position of this Game Object in the world. * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. * @param frame An optional frame from the Texture this Game Object is rendering with. - * @param options Matter.js configuration object. Default {}. + * @param options An optional Body configuration object that is used to set initial Body properties on creation. */ - constructor(world: Phaser.Physics.Matter.World, x: number, y: number, texture: string, frame?: string | integer, options?: object); + constructor(world: Phaser.Physics.Matter.World, x: number, y: number, texture: string, frame?: string | integer, options?: Phaser.Types.Physics.Matter.MatterBodyConfig); /** * A reference to the Matter.World instance that this body belongs to. @@ -67624,13 +69504,17 @@ declare namespace Phaser { setFriction(value: number, air?: number, fstatic?: number): Phaser.GameObjects.GameObject; /** - * Sets a new air resistance for this Game Object's Matter Body. A value of 0 means the Body will never slow as it moves through space. The higher the value, the faster a Body slows when moving through space. + * Sets a new air resistance for this Game Object's Matter Body. + * A value of 0 means the Body will never slow as it moves through space. + * The higher the value, the faster a Body slows when moving through space. * @param value The new air resistance for the Body. */ setFrictionAir(value: number): Phaser.GameObjects.GameObject; /** - * Sets a new static friction for this Game Object's Matter Body. A value of 0 means the Body will never "stick" when it is nearly stationary. The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary. + * Sets a new static friction for this Game Object's Matter Body. + * A value of 0 means the Body will never "stick" when it is nearly stationary. + * The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary. * @param value The new static friction for the Body. */ setFrictionStatic(value: number): Phaser.GameObjects.GameObject; @@ -67663,86 +69547,119 @@ declare namespace Phaser { readonly centerOfMass: Phaser.Math.Vector2; /** - * [description] - * @param value [description] + * Set the body belonging to this Game Object to be a sensor. + * Sensors trigger collision events, but don't react with colliding body physically. + * @param value `true` to set the body as a sensor, or `false` to disable it. */ setSensor(value: boolean): Phaser.GameObjects.GameObject; /** - * [description] + * Is the body belonging to this Game Object a sensor or not? */ isSensor(): boolean; /** * Set the body on a Game Object to a rectangle. + * + * Calling this methods resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. * @param width Width of the rectangle. * @param height Height of the rectangle. - * @param options [description] + * @param options An optional Body configuration object that is used to set initial Body properties on creation. */ - setRectangle(width: number, height: number, options: object): Phaser.GameObjects.GameObject; + setRectangle(width: number, height: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): Phaser.GameObjects.GameObject; /** - * [description] - * @param radius [description] - * @param options [description] + * Set the body on a Game Object to a circle. + * + * Calling this methods resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. + * @param radius The radius of the circle. + * @param options An optional Body configuration object that is used to set initial Body properties on creation. */ - setCircle(radius: number, options: object): Phaser.GameObjects.GameObject; + setCircle(radius: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): Phaser.GameObjects.GameObject; /** * Set the body on the Game Object to a polygon shape. - * @param radius The radius of the polygon. - * @param sides The amount of sides creating the polygon. - * @param options A matterjs config object. + * + * Calling this methods resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. + * @param sides The number of sides the polygon will have. + * @param radius The "radius" of the polygon, i.e. the distance from its center to any vertex. This is also the radius of its circumcircle. + * @param options An optional Body configuration object that is used to set initial Body properties on creation. */ - setPolygon(radius: number, sides: number, options: object): Phaser.GameObjects.GameObject; + setPolygon(sides: number, radius: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): Phaser.GameObjects.GameObject; /** - * Creates a new matterjs trapezoid body. - * @param width The width of the trapezoid. - * @param height The height of the trapezoid. - * @param slope The angle of slope for the trapezoid. - * @param options A matterjs config object for the body. + * Set the body on the Game Object to a trapezoid shape. + * + * Calling this methods resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. + * @param width The width of the trapezoid Body. + * @param height The height of the trapezoid Body. + * @param slope The slope of the trapezoid. 0 creates a rectangle, while 1 creates a triangle. Positive values make the top side shorter, while negative values make the bottom side shorter. + * @param options An optional Body configuration object that is used to set initial Body properties on creation. */ - setTrapezoid(width: number, height: number, slope: number, options: object): Phaser.GameObjects.GameObject; + setTrapezoid(width: number, height: number, slope: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): Phaser.GameObjects.GameObject; /** - * [description] - * @param body [description] - * @param addToWorld Should the newly created body be immediately added to the World? Default true. + * Set this Game Object to use the given existing Matter Body. + * + * The body is first removed from the world before being added to this Game Object. + * @param body The Body this Game Object should use. + * @param addToWorld Should the body be immediately added to the World? Default true. */ setExistingBody(body: MatterJS.Body, addToWorld?: boolean): Phaser.GameObjects.GameObject; /** - * [description] - * @param config [description] - * @param options [description] + * Set this Game Object to create and use a new Body based on the configuration object given. + * + * Calling this method resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. + * @param config Either a string, such as `circle`, or a Matter Set Body Configuration object. + * @param options An optional Body configuration object that is used to set initial Body properties on creation. */ - setBody(config: object, options: object): Phaser.GameObjects.GameObject; + setBody(config: string | Phaser.Types.Physics.Matter.MatterSetBodyConfig, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): Phaser.GameObjects.GameObject; /** - * [description] - * @param value [description] Default 60. + * Sets this Body to sleep. */ - setSleepThreshold(value?: number): Phaser.GameObjects.GameObject; + setToSleep(): this; /** - * [description] - * @param start [description] - * @param end [description] + * Wakes this Body if asleep. */ - setSleepEvents(start: boolean, end: boolean): Phaser.GameObjects.GameObject; + setAwake(): this; /** - * [description] - * @param value [description] + * Sets the number of updates in which this body must have near-zero velocity before it is set as sleeping (if sleeping is enabled by the engine). + * @param value A `Number` that defines the number of updates in which this body must have near-zero velocity before it is set as sleeping. Default 60. */ - setSleepStartEvent(value: boolean): Phaser.GameObjects.GameObject; + setSleepThreshold(value?: number): this; /** - * [description] - * @param value [description] + * Enable sleep and wake events for this body. + * + * By default when a body goes to sleep, or wakes up, it will not emit any events. + * + * The events are emitted by the Matter World instance and can be listened to via + * the `SLEEP_START` and `SLEEP_END` events. + * @param start `true` if you want the sleep start event to be emitted for this body. + * @param end `true` if you want the sleep end event to be emitted for this body. */ - setSleepEndEvent(value: boolean): Phaser.GameObjects.GameObject; + setSleepEvents(start: boolean, end: boolean): this; + + /** + * Enables or disables the Sleep Start event for this body. + * @param value `true` to enable the sleep event, or `false` to disable it. + */ + setSleepStartEvent(value: boolean): this; + + /** + * Enables or disables the Sleep End event for this body. + * @param value `true` to enable the sleep event, or `false` to disable it. + */ + setSleepEndEvent(value: boolean): this; /** * Changes the physics body to be either static `true` or dynamic `false`. @@ -67755,30 +69672,6 @@ declare namespace Phaser { */ isStatic(): boolean; - /** - * Returns the center x offset of the Body this Game Object is using. - * - * This is calculated by taking the difference between the center of the frame and the center of - * the physics body. If set, the `body.render.sprite.xOffset` value is then added to it. - * - * Use this when setting the Origin of a Physics Game Object post-creation, i.e.: - * - * `setOrigin(originX + centerOffsetX, originY + centerOffsetY)` - */ - readonly centerOffsetX: number; - - /** - * Returns the center y offset of the Body this Game Object is using. - * - * This is calculated by taking the difference between the center of the frame and the center of - * the physics body. If set, the `body.render.sprite.yOffset` value is then added to it. - * - * Use this when setting the Origin of a Physics Game Object post-creation, i.e.: - * - * `setOrigin(originX + centerOffsetX, originY + centerOffsetY)` - */ - readonly centerOffsetY: number; - /** * Setting fixed rotation sets the Body inertia to Infinity, which stops it * from being able to rotate when forces are applied to it. @@ -67786,8 +69679,9 @@ declare namespace Phaser { setFixedRotation(): this; /** - * [description] - * @param value [description] + * Sets the angular velocity of the body instantly. + * Position, angle, force etc. are unchanged. + * @param value The angular velocity. */ setAngularVelocity(value: number): Phaser.GameObjects.GameObject; @@ -67890,7 +69784,7 @@ declare namespace Phaser { world: Phaser.Physics.Matter.World; /** - * An instance of the Matter Factory. This class provides lots of functions for creatying a + * An instance of the Matter Factory. This class provides lots of functions for creating a * wide variety of physics objects and adds them automatically to the Matter World. * * You can use this class to cut-down on the amount of code required in your game, however, @@ -67899,6 +69793,12 @@ declare namespace Phaser { */ add: Phaser.Physics.Matter.Factory; + /** + * An instance of the Body Bounds class. This class contains functions used for getting the + * world position from various points around the bounds of a physics body. + */ + bodyBounds: Phaser.Physics.Matter.BodyBounds; + /** * A reference to the `Matter.Body` module. * @@ -68165,7 +70065,7 @@ declare namespace Phaser { * @param x The horizontal coordinate of the point. * @param y The vertical coordinate of the point. */ - containsPoint(body: MatterJS.Body | MatterJS.Body[], x: number, y: number): boolean; + containsPoint(body: Phaser.Types.Physics.Matter.MatterBody | Phaser.Types.Physics.Matter.MatterBody[], x: number, y: number): boolean; /** * Checks the given coordinates to see if any vertices of the given bodies contain it. @@ -68179,7 +70079,7 @@ declare namespace Phaser { * @param y The vertical coordinate of the point. * @param bodies An array of bodies to check. If not provided it will search all bodies in the world. */ - intersectPoint(x: number, y: number, bodies?: MatterJS.Body[]): MatterJS.Body[]; + intersectPoint(x: number, y: number, bodies?: Phaser.Types.Physics.Matter.MatterBody[]): Phaser.Types.Physics.Matter.MatterBody[]; /** * Checks the given rectangular area to see if any vertices of the given bodies intersect with it. @@ -68194,7 +70094,7 @@ declare namespace Phaser { * @param outside If `false` it checks for vertices inside the area, if `true` it checks for vertices outside the area. Default false. * @param bodies An array of bodies to check. If not provided it will search all bodies in the world. */ - intersectRect(x: number, y: number, width: number, height: number, outside?: boolean, bodies?: MatterJS.Body[]): MatterJS.Body[]; + intersectRect(x: number, y: number, width: number, height: number, outside?: boolean, bodies?: Phaser.Types.Physics.Matter.MatterBody[]): Phaser.Types.Physics.Matter.MatterBody[]; /** * Checks the given ray segment to see if any vertices of the given bodies intersect with it. @@ -68209,7 +70109,7 @@ declare namespace Phaser { * @param rayWidth The width of the ray segment. Default 1. * @param bodies An array of bodies to check. If not provided it will search all bodies in the world. */ - intersectRay(x1: number, y1: number, x2: number, y2: number, rayWidth?: number, bodies?: MatterJS.Body[]): MatterJS.Body[]; + intersectRay(x1: number, y1: number, x2: number, y2: number, rayWidth?: number, bodies?: Phaser.Types.Physics.Matter.MatterBody[]): Phaser.Types.Physics.Matter.MatterBody[]; /** * Checks the given Matter Body to see if it intersects with any of the given bodies. @@ -68218,7 +70118,7 @@ declare namespace Phaser { * @param body The target body. * @param bodies An array of bodies to check the target body against. If not provided it will search all bodies in the world. */ - intersectBody(body: MatterJS.Body, bodies?: MatterJS.Body[]): MatterJS.Body[]; + intersectBody(body: Phaser.Types.Physics.Matter.MatterBody, bodies?: Phaser.Types.Physics.Matter.MatterBody[]): Phaser.Types.Physics.Matter.MatterBody[]; /** * Checks to see if the target body, or an array of target bodies, intersects with any of the given bodies. @@ -68243,7 +70143,7 @@ declare namespace Phaser { * @param processCallback An optional callback function that lets you perform additional checks against the two bodies if they overlap. If this is set then `overlapCallback` will only be invoked if this callback returns `true`. * @param callbackContext The context, or scope, in which to run the callbacks. */ - overlap(target: MatterJS.Body | MatterJS.Body[], bodies?: MatterJS.Body[], overlapCallback?: ArcadePhysicsCallback, processCallback?: ArcadePhysicsCallback, callbackContext?: any): boolean; + overlap(target: Phaser.Types.Physics.Matter.MatterBody | Phaser.Types.Physics.Matter.MatterBody[], bodies?: Phaser.Types.Physics.Matter.MatterBody[], overlapCallback?: ArcadePhysicsCallback, processCallback?: ArcadePhysicsCallback, callbackContext?: any): boolean; /** * Sets the collision filter category of all given Matter Bodies to the given value. @@ -68255,7 +70155,7 @@ declare namespace Phaser { * @param bodies An array of bodies to update. If falsey it will use all bodies in the world. * @param value Unique category bitfield. */ - setCollisionCategory(bodies: MatterJS.Body[], value: number): this; + setCollisionCategory(bodies: Phaser.Types.Physics.Matter.MatterBody[], value: number): this; /** * Sets the collision filter group of all given Matter Bodies to the given value. @@ -68268,7 +70168,7 @@ declare namespace Phaser { * @param bodies An array of bodies to update. If falsey it will use all bodies in the world. * @param value Unique group index. */ - setCollisionGroup(bodies: MatterJS.Body[], value: number): this; + setCollisionGroup(bodies: Phaser.Types.Physics.Matter.MatterBody[], value: number): this; /** * Sets the collision filter mask of all given Matter Bodies to the given value. @@ -68279,7 +70179,7 @@ declare namespace Phaser { * @param bodies An array of bodies to update. If falsey it will use all bodies in the world. * @param categories A unique category bitfield, or an array of them. */ - setCollidesWith(bodies: MatterJS.Body[], categories: number | number[]): this; + setCollidesWith(bodies: Phaser.Types.Physics.Matter.MatterBody[], categories: number | number[]): this; /** * Takes an array and returns a new array made from all of the Matter Bodies found in the original array. @@ -68292,6 +70192,101 @@ declare namespace Phaser { */ getMatterBodies(bodies?: any[]): MatterJS.Body[]; + /** + * Sets both the horizontal and vertical linear velocity of the physics bodies. + * @param bodies Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param x The horizontal linear velocity value. + * @param y The vertical linear velocity value. + */ + setVelocity(bodies: Phaser.Types.Physics.Matter.MatterBody | Phaser.Types.Physics.Matter.MatterBody[], x: number, y: number): this; + + /** + * Sets just the horizontal linear velocity of the physics bodies. + * The vertical velocity of the body is unchanged. + * @param bodies Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param x The horizontal linear velocity value. + */ + setVelocityX(bodies: Phaser.Types.Physics.Matter.MatterBody | Phaser.Types.Physics.Matter.MatterBody[], x: number): this; + + /** + * Sets just the vertical linear velocity of the physics bodies. + * The horizontal velocity of the body is unchanged. + * @param bodies Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param y The vertical linear velocity value. + */ + setVelocityY(bodies: Phaser.Types.Physics.Matter.MatterBody | Phaser.Types.Physics.Matter.MatterBody[], y: number): this; + + /** + * Sets the angular velocity of the bodies instantly. + * Position, angle, force etc. are unchanged. + * @param bodies Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param value The angular velocity. + */ + setAngularVelocity(bodies: Phaser.Types.Physics.Matter.MatterBody | Phaser.Types.Physics.Matter.MatterBody[], value: number): this; + + /** + * Applies a force to a body, at the bodies current position, including resulting torque. + * @param bodies Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param force A Vector that specifies the force to apply. + */ + applyForce(bodies: Phaser.Types.Physics.Matter.MatterBody | Phaser.Types.Physics.Matter.MatterBody[], force: Phaser.Types.Math.Vector2Like): this; + + /** + * Applies a force to a body, from the given world position, including resulting torque. + * If no angle is given, the current body angle is used. + * + * Use very small speed values, such as 0.1, depending on the mass and required velocity. + * @param bodies Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param position A Vector that specifies the world-space position to apply the force at. + * @param speed A speed value to be applied to a directional force. + * @param angle The angle, in radians, to apply the force from. Leave undefined to use the current body angle. + */ + applyForceFromPosition(bodies: Phaser.Types.Physics.Matter.MatterBody | Phaser.Types.Physics.Matter.MatterBody[], position: Phaser.Types.Math.Vector2Like, speed: number, angle?: number): this; + + /** + * Apply a force to a body based on the given angle and speed. + * If no angle is given, the current body angle is used. + * + * Use very small speed values, such as 0.1, depending on the mass and required velocity. + * @param bodies Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param speed A speed value to be applied to a directional force. + * @param angle The angle, in radians, to apply the force from. Leave undefined to use the current body angle. + */ + applyForceFromAngle(bodies: Phaser.Types.Physics.Matter.MatterBody | Phaser.Types.Physics.Matter.MatterBody[], speed: number, angle?: number): this; + + /** + * Returns the length of the given constraint, which is the distance between the two points. + * @param constraint The constraint to get the length from. + */ + getConstraintLength(constraint: MatterJS.Constraint): number; + + /** + * Aligns a Body, or Matter Game Object, against the given coordinates. + * + * The alignment takes place using the body bounds, which take into consideration things + * like body scale and rotation. + * + * Although a Body has a `position` property, it is based on the center of mass for the body, + * not a dimension based center. This makes aligning bodies difficult, especially if they have + * rotated or scaled. This method will derive the correct position based on the body bounds and + * its center of mass offset, in order to align the body with the given coordinate. + * + * For example, if you wanted to align a body so it sat in the bottom-center of the + * Scene, and the world was 800 x 600 in size: + * + * ```javascript + * this.matter.alignBody(body, 400, 600, Phaser.Display.Align.BOTTOM_CENTER); + * ``` + * + * You pass in 400 for the x coordinate, because that is the center of the world, and 600 for + * the y coordinate, as that is the base of the world. + * @param body The Body to align. + * @param x The horizontal position to align the body to. + * @param y The vertical position to align the body to. + * @param align One of the `Phaser.Display.Align` constants, such as `Phaser.Display.Align.TOP_LEFT`. + */ + alignBody(body: Phaser.Types.Physics.Matter.MatterBody, x: number, y: number, align: integer): this; + } /** @@ -68313,9 +70308,9 @@ declare namespace Phaser { * @param y The vertical position of this Game Object in the world. * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. * @param frame An optional frame from the Texture this Game Object is rendering with. - * @param options Matter.js configuration object. Default {}. + * @param options An optional Body configuration object that is used to set initial Body properties on creation. */ - constructor(world: Phaser.Physics.Matter.World, x: number, y: number, texture: string, frame?: string | integer, options?: object); + constructor(world: Phaser.Physics.Matter.World, x: number, y: number, texture: string, frame?: string | integer, options?: Phaser.Types.Physics.Matter.MatterBodyConfig); /** * A reference to the Matter.World instance that this body belongs to. @@ -69322,13 +71317,17 @@ declare namespace Phaser { setFriction(value: number, air?: number, fstatic?: number): Phaser.GameObjects.GameObject; /** - * Sets a new air resistance for this Game Object's Matter Body. A value of 0 means the Body will never slow as it moves through space. The higher the value, the faster a Body slows when moving through space. + * Sets a new air resistance for this Game Object's Matter Body. + * A value of 0 means the Body will never slow as it moves through space. + * The higher the value, the faster a Body slows when moving through space. * @param value The new air resistance for the Body. */ setFrictionAir(value: number): Phaser.GameObjects.GameObject; /** - * Sets a new static friction for this Game Object's Matter Body. A value of 0 means the Body will never "stick" when it is nearly stationary. The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary. + * Sets a new static friction for this Game Object's Matter Body. + * A value of 0 means the Body will never "stick" when it is nearly stationary. + * The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary. * @param value The new static friction for the Body. */ setFrictionStatic(value: number): Phaser.GameObjects.GameObject; @@ -69361,86 +71360,119 @@ declare namespace Phaser { readonly centerOfMass: Phaser.Math.Vector2; /** - * [description] - * @param value [description] + * Set the body belonging to this Game Object to be a sensor. + * Sensors trigger collision events, but don't react with colliding body physically. + * @param value `true` to set the body as a sensor, or `false` to disable it. */ setSensor(value: boolean): Phaser.GameObjects.GameObject; /** - * [description] + * Is the body belonging to this Game Object a sensor or not? */ isSensor(): boolean; /** * Set the body on a Game Object to a rectangle. + * + * Calling this methods resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. * @param width Width of the rectangle. * @param height Height of the rectangle. - * @param options [description] + * @param options An optional Body configuration object that is used to set initial Body properties on creation. */ - setRectangle(width: number, height: number, options: object): Phaser.GameObjects.GameObject; + setRectangle(width: number, height: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): Phaser.GameObjects.GameObject; /** - * [description] - * @param radius [description] - * @param options [description] + * Set the body on a Game Object to a circle. + * + * Calling this methods resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. + * @param radius The radius of the circle. + * @param options An optional Body configuration object that is used to set initial Body properties on creation. */ - setCircle(radius: number, options: object): Phaser.GameObjects.GameObject; + setCircle(radius: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): Phaser.GameObjects.GameObject; /** * Set the body on the Game Object to a polygon shape. - * @param radius The radius of the polygon. - * @param sides The amount of sides creating the polygon. - * @param options A matterjs config object. + * + * Calling this methods resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. + * @param sides The number of sides the polygon will have. + * @param radius The "radius" of the polygon, i.e. the distance from its center to any vertex. This is also the radius of its circumcircle. + * @param options An optional Body configuration object that is used to set initial Body properties on creation. */ - setPolygon(radius: number, sides: number, options: object): Phaser.GameObjects.GameObject; + setPolygon(sides: number, radius: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): Phaser.GameObjects.GameObject; /** - * Creates a new matterjs trapezoid body. - * @param width The width of the trapezoid. - * @param height The height of the trapezoid. - * @param slope The angle of slope for the trapezoid. - * @param options A matterjs config object for the body. + * Set the body on the Game Object to a trapezoid shape. + * + * Calling this methods resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. + * @param width The width of the trapezoid Body. + * @param height The height of the trapezoid Body. + * @param slope The slope of the trapezoid. 0 creates a rectangle, while 1 creates a triangle. Positive values make the top side shorter, while negative values make the bottom side shorter. + * @param options An optional Body configuration object that is used to set initial Body properties on creation. */ - setTrapezoid(width: number, height: number, slope: number, options: object): Phaser.GameObjects.GameObject; + setTrapezoid(width: number, height: number, slope: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): Phaser.GameObjects.GameObject; /** - * [description] - * @param body [description] - * @param addToWorld Should the newly created body be immediately added to the World? Default true. + * Set this Game Object to use the given existing Matter Body. + * + * The body is first removed from the world before being added to this Game Object. + * @param body The Body this Game Object should use. + * @param addToWorld Should the body be immediately added to the World? Default true. */ setExistingBody(body: MatterJS.Body, addToWorld?: boolean): Phaser.GameObjects.GameObject; /** - * [description] - * @param config [description] - * @param options [description] + * Set this Game Object to create and use a new Body based on the configuration object given. + * + * Calling this method resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. + * @param config Either a string, such as `circle`, or a Matter Set Body Configuration object. + * @param options An optional Body configuration object that is used to set initial Body properties on creation. */ - setBody(config: object, options: object): Phaser.GameObjects.GameObject; + setBody(config: string | Phaser.Types.Physics.Matter.MatterSetBodyConfig, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): Phaser.GameObjects.GameObject; /** - * [description] - * @param value [description] Default 60. + * Sets this Body to sleep. */ - setSleepThreshold(value?: number): Phaser.GameObjects.GameObject; + setToSleep(): this; /** - * [description] - * @param start [description] - * @param end [description] + * Wakes this Body if asleep. */ - setSleepEvents(start: boolean, end: boolean): Phaser.GameObjects.GameObject; + setAwake(): this; /** - * [description] - * @param value [description] + * Sets the number of updates in which this body must have near-zero velocity before it is set as sleeping (if sleeping is enabled by the engine). + * @param value A `Number` that defines the number of updates in which this body must have near-zero velocity before it is set as sleeping. Default 60. */ - setSleepStartEvent(value: boolean): Phaser.GameObjects.GameObject; + setSleepThreshold(value?: number): this; /** - * [description] - * @param value [description] + * Enable sleep and wake events for this body. + * + * By default when a body goes to sleep, or wakes up, it will not emit any events. + * + * The events are emitted by the Matter World instance and can be listened to via + * the `SLEEP_START` and `SLEEP_END` events. + * @param start `true` if you want the sleep start event to be emitted for this body. + * @param end `true` if you want the sleep end event to be emitted for this body. */ - setSleepEndEvent(value: boolean): Phaser.GameObjects.GameObject; + setSleepEvents(start: boolean, end: boolean): this; + + /** + * Enables or disables the Sleep Start event for this body. + * @param value `true` to enable the sleep event, or `false` to disable it. + */ + setSleepStartEvent(value: boolean): this; + + /** + * Enables or disables the Sleep End event for this body. + * @param value `true` to enable the sleep event, or `false` to disable it. + */ + setSleepEndEvent(value: boolean): this; /** * Changes the physics body to be either static `true` or dynamic `false`. @@ -69453,30 +71485,6 @@ declare namespace Phaser { */ isStatic(): boolean; - /** - * Returns the center x offset of the Body this Game Object is using. - * - * This is calculated by taking the difference between the center of the frame and the center of - * the physics body. If set, the `body.render.sprite.xOffset` value is then added to it. - * - * Use this when setting the Origin of a Physics Game Object post-creation, i.e.: - * - * `setOrigin(originX + centerOffsetX, originY + centerOffsetY)` - */ - readonly centerOffsetX: number; - - /** - * Returns the center y offset of the Body this Game Object is using. - * - * This is calculated by taking the difference between the center of the frame and the center of - * the physics body. If set, the `body.render.sprite.yOffset` value is then added to it. - * - * Use this when setting the Origin of a Physics Game Object post-creation, i.e.: - * - * `setOrigin(originX + centerOffsetX, originY + centerOffsetY)` - */ - readonly centerOffsetY: number; - /** * Setting fixed rotation sets the Body inertia to Infinity, which stops it * from being able to rotate when forces are applied to it. @@ -69484,8 +71492,9 @@ declare namespace Phaser { setFixedRotation(): this; /** - * [description] - * @param value [description] + * Sets the angular velocity of the body instantly. + * Position, angle, force etc. are unchanged. + * @param value The angular velocity. */ setAngularVelocity(value: number): Phaser.GameObjects.GameObject; @@ -69525,7 +71534,7 @@ declare namespace Phaser { class TileBody implements Phaser.Physics.Matter.Components.Bounce, Phaser.Physics.Matter.Components.Collision, Phaser.Physics.Matter.Components.Friction, Phaser.Physics.Matter.Components.Gravity, Phaser.Physics.Matter.Components.Mass, Phaser.Physics.Matter.Components.Sensor, Phaser.Physics.Matter.Components.Sleep, Phaser.Physics.Matter.Components.Static { /** * - * @param world [description] + * @param world The Matter world instance this body belongs to. * @param tile The target tile that should have a Matter body. * @param options Options to be used when creating the Matter body. */ @@ -69656,13 +71665,17 @@ declare namespace Phaser { setFriction(value: number, air?: number, fstatic?: number): Phaser.GameObjects.GameObject; /** - * Sets a new air resistance for this Game Object's Matter Body. A value of 0 means the Body will never slow as it moves through space. The higher the value, the faster a Body slows when moving through space. + * Sets a new air resistance for this Game Object's Matter Body. + * A value of 0 means the Body will never slow as it moves through space. + * The higher the value, the faster a Body slows when moving through space. * @param value The new air resistance for the Body. */ setFrictionAir(value: number): Phaser.GameObjects.GameObject; /** - * Sets a new static friction for this Game Object's Matter Body. A value of 0 means the Body will never "stick" when it is nearly stationary. The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary. + * Sets a new static friction for this Game Object's Matter Body. + * A value of 0 means the Body will never "stick" when it is nearly stationary. + * The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary. * @param value The new static friction for the Body. */ setFrictionStatic(value: number): Phaser.GameObjects.GameObject; @@ -69695,40 +71708,56 @@ declare namespace Phaser { readonly centerOfMass: Phaser.Math.Vector2; /** - * [description] - * @param value [description] + * Set the body belonging to this Game Object to be a sensor. + * Sensors trigger collision events, but don't react with colliding body physically. + * @param value `true` to set the body as a sensor, or `false` to disable it. */ setSensor(value: boolean): Phaser.GameObjects.GameObject; /** - * [description] + * Is the body belonging to this Game Object a sensor or not? */ isSensor(): boolean; /** - * [description] - * @param value [description] Default 60. + * Sets this Body to sleep. */ - setSleepThreshold(value?: number): Phaser.GameObjects.GameObject; + setToSleep(): this; /** - * [description] - * @param start [description] - * @param end [description] + * Wakes this Body if asleep. */ - setSleepEvents(start: boolean, end: boolean): Phaser.GameObjects.GameObject; + setAwake(): this; /** - * [description] - * @param value [description] + * Sets the number of updates in which this body must have near-zero velocity before it is set as sleeping (if sleeping is enabled by the engine). + * @param value A `Number` that defines the number of updates in which this body must have near-zero velocity before it is set as sleeping. Default 60. */ - setSleepStartEvent(value: boolean): Phaser.GameObjects.GameObject; + setSleepThreshold(value?: number): this; /** - * [description] - * @param value [description] + * Enable sleep and wake events for this body. + * + * By default when a body goes to sleep, or wakes up, it will not emit any events. + * + * The events are emitted by the Matter World instance and can be listened to via + * the `SLEEP_START` and `SLEEP_END` events. + * @param start `true` if you want the sleep start event to be emitted for this body. + * @param end `true` if you want the sleep end event to be emitted for this body. */ - setSleepEndEvent(value: boolean): Phaser.GameObjects.GameObject; + setSleepEvents(start: boolean, end: boolean): this; + + /** + * Enables or disables the Sleep Start event for this body. + * @param value `true` to enable the sleep event, or `false` to disable it. + */ + setSleepStartEvent(value: boolean): this; + + /** + * Enables or disables the Sleep End event for this body. + * @param value `true` to enable the sleep event, or `false` to disable it. + */ + setSleepEndEvent(value: boolean): this; /** * Changes the physics body to be either static `true` or dynamic `false`. @@ -69750,26 +71779,75 @@ declare namespace Phaser { namespace PhysicsEditorParser { /** * Parses a body element exported by PhysicsEditor. - * @param x x position. - * @param y y position. - * @param w width. - * @param h height. - * @param config body configuration and fixture (child body) definitions. + * @param x The horizontal world location of the body. + * @param y The vertical world location of the body. + * @param config The body configuration and fixture (child body) definitions, as exported by PhysicsEditor. + * @param options An optional Body configuration object that is used to set initial Body properties on creation. */ - function parseBody(x: number, y: number, w: number, h: number, config: object): object; + function parseBody(x: number, y: number, config: object, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): MatterJS.Body; /** * Parses an element of the "fixtures" list exported by PhysicsEditor - * @param fixtureConfig the fixture object to parse + * @param fixtureConfig The fixture object to parse. */ - function parseFixture(fixtureConfig: object): object[]; + function parseFixture(fixtureConfig: object): MatterJS.Body[]; /** * Parses the "vertices" lists exported by PhysicsEditor. * @param vertexSets The vertex lists to parse. - * @param options Matter body options. + * @param options An optional Body configuration object that is used to set initial Body properties on creation. */ - function parseVertices(vertexSets: object, options: object): object[]; + function parseVertices(vertexSets: any[], options?: Phaser.Types.Physics.Matter.MatterBodyConfig): MatterJS.Body[]; + + } + + /** + * Creates a body using the supplied physics data, as provided by a JSON file. + * + * The data file should be loaded as JSON: + * + * ```javascript + * preload () + * { + * this.load.json('ninjas', 'assets/ninjas.json); + * } + * + * create () + * { + * const ninjaShapes = this.cache.json.get('ninjas'); + * + * this.matter.add.fromJSON(400, 300, ninjaShapes.shinobi); + * } + * ``` + * + * Do not pass the entire JSON file to this method, but instead pass one of the shapes contained within it. + * + * If you pas in an `options` object, any settings in there will override those in the config object. + * + * The structure of the JSON file is as follows: + * + * ```text + * { + * 'generator_info': // The name of the application that created the JSON data + * 'shapeName': { + * 'type': // The type of body + * 'label': // Optional body label + * 'vertices': // An array, or an array of arrays, containing the vertex data in x/y object pairs + * } + * } + * ``` + * + * At the time of writing, only the Phaser Physics Tracer App exports in this format. + */ + namespace PhysicsJSONParser { + /** + * Parses a body element from the given JSON data. + * @param x The horizontal world location of the body. + * @param y The vertical world location of the body. + * @param config The body configuration data. + * @param options An optional Body configuration object that is used to set initial Body properties on creation. + */ + function parseBody(x: number, y: number, config: object, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): MatterJS.Body; } @@ -70285,6 +72363,92 @@ declare namespace Phaser { */ getAllComposites(): MatterJS.Composite[]; + /** + * Renders the Engine Broadphase Controller Grid to the given Graphics instance. + * + * The debug renderer calls this method if the `showBroadphase` config value is set. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render the Grid to your own Graphics instance. + * @param grid The Matter Grid to be rendered. + * @param graphics The Graphics object to render to. + * @param lineColor The line color. + * @param lineOpacity The line opacity, between 0 and 1. + */ + renderGrid(grid: MatterJS.Grid, graphics: Phaser.GameObjects.Graphics, lineColor: number, lineOpacity: number): this; + + /** + * Renders the list of Pair separations to the given Graphics instance. + * + * The debug renderer calls this method if the `showSeparations` config value is set. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render the Grid to your own Graphics instance. + * @param pairs An array of Matter Pairs to be rendered. + * @param graphics The Graphics object to render to. + * @param lineColor The line color. + */ + renderSeparations(pairs: MatterJS.Pair[], graphics: Phaser.GameObjects.Graphics, lineColor: number): this; + + /** + * Renders the list of collision points and normals to the given Graphics instance. + * + * The debug renderer calls this method if the `showCollisions` config value is set. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render the Grid to your own Graphics instance. + * @param pairs An array of Matter Pairs to be rendered. + * @param graphics The Graphics object to render to. + * @param lineColor The line color. + */ + renderCollisions(pairs: MatterJS.Pair[], graphics: Phaser.GameObjects.Graphics, lineColor: number): this; + + /** + * Renders the bounds of an array of Bodies to the given Graphics instance. + * + * If the body is a compound body, it will render the bounds for the parent compound. + * + * The debug renderer calls this method if the `showBounds` config value is set. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render bounds to your own Graphics instance. + * @param bodies An array of bodies from the localWorld. + * @param graphics The Graphics object to render to. + * @param lineColor The line color. + * @param lineOpacity The line opacity, between 0 and 1. + */ + renderBodyBounds(bodies: any[], graphics: Phaser.GameObjects.Graphics, lineColor: number, lineOpacity: number): void; + + /** + * Renders either all axes, or a single axis indicator, for an array of Bodies, to the given Graphics instance. + * + * The debug renderer calls this method if the `showAxes` or `showAngleIndicator` config values are set. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render bounds to your own Graphics instance. + * @param bodies An array of bodies from the localWorld. + * @param graphics The Graphics object to render to. + * @param showAxes If `true` it will render all body axes. If `false` it will render a single axis indicator. + * @param lineColor The line color. + * @param lineOpacity The line opacity, between 0 and 1. + */ + renderBodyAxes(bodies: any[], graphics: Phaser.GameObjects.Graphics, showAxes: boolean, lineColor: number, lineOpacity: number): void; + + /** + * Renders a velocity indicator for an array of Bodies, to the given Graphics instance. + * + * The debug renderer calls this method if the `showVelocity` config value is set. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render bounds to your own Graphics instance. + * @param bodies An array of bodies from the localWorld. + * @param graphics The Graphics object to render to. + * @param lineColor The line color. + * @param lineOpacity The line opacity, between 0 and 1. + * @param lineThickness The line thickness. + */ + renderBodyVelocity(bodies: any[], graphics: Phaser.GameObjects.Graphics, lineColor: number, lineOpacity: number, lineThickness: number): void; + /** * Renders a single Matter Body to the given Phaser Graphics Game Object. * @@ -70358,726 +72522,6 @@ declare namespace Phaser { } - namespace Components { - /** - * A component to set restitution on objects. - */ - interface Bounce { - /** - * Sets the restitution on the physics object. - * @param value A Number that defines the restitution (elasticity) of the body. The value is always positive and is in the range (0, 1). A value of 0 means collisions may be perfectly inelastic and no bouncing may occur. A value of 0.8 means the body may bounce back with approximately 80% of its kinetic energy. Note that collision response is based on pairs of bodies, and that restitution values are combined with the following formula: `Math.max(bodyA.restitution, bodyB.restitution)` - */ - setBounce(value: number): Phaser.GameObjects.GameObject; - } - - /** - * Contains methods for changing the collision filter of a Matter Body. Should be used as a mixin and not called directly. - */ - interface Collision { - /** - * Sets the collision category of this Game Object's Matter Body. This number must be a power of two between 2^0 (= 1) and 2^31. - * Two bodies with different collision groups (see {@link #setCollisionGroup}) will only collide if their collision - * categories are included in their collision masks (see {@link #setCollidesWith}). - * @param value Unique category bitfield. - */ - setCollisionCategory(value: number): Phaser.GameObjects.GameObject; - /** - * Sets the collision group of this Game Object's Matter Body. If this is zero or two Matter Bodies have different values, - * they will collide according to the usual rules (see {@link #setCollisionCategory} and {@link #setCollisionGroup}). - * If two Matter Bodies have the same positive value, they will always collide; if they have the same negative value, - * they will never collide. - * @param value Unique group index. - */ - setCollisionGroup(value: number): Phaser.GameObjects.GameObject; - /** - * Sets the collision mask for this Game Object's Matter Body. Two Matter Bodies with different collision groups will only - * collide if each one includes the other's category in its mask based on a bitwise AND, i.e. `(categoryA & maskB) !== 0` - * and `(categoryB & maskA) !== 0` are both true. - * @param categories A unique category bitfield, or an array of them. - */ - setCollidesWith(categories: number | number[]): Phaser.GameObjects.GameObject; - /** - * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object. - * - * This does not change the bodies collision category, group or filter. Those must be set in addition - * to the callback. - * @param callback The callback to invoke when this body starts colliding with another. - */ - setOnCollide(callback: Function): Phaser.GameObjects.GameObject; - /** - * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object. - * - * This does not change the bodies collision category, group or filter. Those must be set in addition - * to the callback. - * @param callback The callback to invoke when this body stops colliding with another. - */ - setOnCollideEnd(callback: Function): Phaser.GameObjects.GameObject; - /** - * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object. - * - * This does not change the bodies collision category, group or filter. Those must be set in addition - * to the callback. - * @param callback The callback to invoke for the duration of this body colliding with another. - */ - setOnCollideActive(callback: Function): Phaser.GameObjects.GameObject; - /** - * The callback is sent a reference to the other body, along with a `Phaser.Types.Physics.Matter.MatterCollisionData` object. - * - * This does not change the bodies collision category, group or filter. Those must be set in addition - * to the callback. - * @param body The body, or an array of bodies, to test for collisions with. - * @param callback The callback to invoke when this body collides with the given body or bodies. - */ - setOnCollideWith(body: MatterJS.Body | MatterJS.Body[], callback: Function): Phaser.GameObjects.GameObject; - } - - /** - * A component to apply force to Matter.js bodies. - */ - interface Force { - /** - * Applies a force to a body. - * @param force A Vector that specifies the force to apply. - */ - applyForce(force: Phaser.Math.Vector2): Phaser.GameObjects.GameObject; - /** - * Applies a force to a body from a given position. - * @param position The position in which the force comes from. - * @param force A Vector that specifies the force to apply. - */ - applyForceFrom(position: Phaser.Math.Vector2, force: Phaser.Math.Vector2): Phaser.GameObjects.GameObject; - /** - * Apply thrust to the forward position of the body. - * - * Use very small values, such as 0.1, depending on the mass and required speed. - * @param speed A speed value to be applied to a directional force. - */ - thrust(speed: number): Phaser.GameObjects.GameObject; - /** - * Apply thrust to the left position of the body. - * - * Use very small values, such as 0.1, depending on the mass and required speed. - * @param speed A speed value to be applied to a directional force. - */ - thrustLeft(speed: number): Phaser.GameObjects.GameObject; - /** - * Apply thrust to the right position of the body. - * - * Use very small values, such as 0.1, depending on the mass and required speed. - * @param speed A speed value to be applied to a directional force. - */ - thrustRight(speed: number): Phaser.GameObjects.GameObject; - /** - * Apply thrust to the back position of the body. - * - * Use very small values, such as 0.1, depending on the mass and required speed. - * @param speed A speed value to be applied to a directional force. - */ - thrustBack(speed: number): Phaser.GameObjects.GameObject; - } - - /** - * Contains methods for changing the friction of a Game Object's Matter Body. Should be used a mixin, not called directly. - */ - interface Friction { - /** - * Sets new friction values for this Game Object's Matter Body. - * @param value The new friction of the body, between 0 and 1, where 0 allows the Body to slide indefinitely, while 1 allows it to stop almost immediately after a force is applied. - * @param air If provided, the new air resistance of the Body. The higher the value, the faster the Body will slow as it moves through space. 0 means the body has no air resistance. - * @param fstatic If provided, the new static friction of the Body. The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary. 0 means the body will never "stick" when it is nearly stationary. - */ - setFriction(value: number, air?: number, fstatic?: number): Phaser.GameObjects.GameObject; - /** - * Sets a new air resistance for this Game Object's Matter Body. A value of 0 means the Body will never slow as it moves through space. The higher the value, the faster a Body slows when moving through space. - * @param value The new air resistance for the Body. - */ - setFrictionAir(value: number): Phaser.GameObjects.GameObject; - /** - * Sets a new static friction for this Game Object's Matter Body. A value of 0 means the Body will never "stick" when it is nearly stationary. The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary. - * @param value The new static friction for the Body. - */ - setFrictionStatic(value: number): Phaser.GameObjects.GameObject; - } - - /** - * A component to manipulate world gravity for Matter.js bodies. - */ - interface Gravity { - /** - * A togglable function for ignoring world gravity in real-time on the current body. - * @param value Set to true to ignore the effect of world gravity, or false to not ignore it. - */ - setIgnoreGravity(value: boolean): Phaser.GameObjects.GameObject; - } - - /** - * Allows accessing the mass, density, and center of mass of a Matter-enabled Game Object. Should be used as a mixin and not directly. - */ - interface Mass { - /** - * Sets the mass of the Game Object's Matter Body. - * @param value The new mass of the body. - */ - setMass(value: number): Phaser.GameObjects.GameObject; - /** - * Sets density of the body. - * @param value The new density of the body. - */ - setDensity(value: number): Phaser.GameObjects.GameObject; - /** - * The body's center of mass. - * - * Calling this creates a new `Vector2 each time to avoid mutation. - * - * If you only need to read the value and won't change it, you can get it from `GameObject.body.centerOfMass`. - */ - readonly centerOfMass: Phaser.Math.Vector2; - } - - /** - * [description] - */ - interface Sensor { - /** - * [description] - * @param value [description] - */ - setSensor(value: boolean): Phaser.GameObjects.GameObject; - /** - * [description] - */ - isSensor(): boolean; - } - - /** - * [description] - */ - interface SetBody { - /** - * Set the body on a Game Object to a rectangle. - * @param width Width of the rectangle. - * @param height Height of the rectangle. - * @param options [description] - */ - setRectangle(width: number, height: number, options: object): Phaser.GameObjects.GameObject; - /** - * [description] - * @param radius [description] - * @param options [description] - */ - setCircle(radius: number, options: object): Phaser.GameObjects.GameObject; - /** - * Set the body on the Game Object to a polygon shape. - * @param radius The radius of the polygon. - * @param sides The amount of sides creating the polygon. - * @param options A matterjs config object. - */ - setPolygon(radius: number, sides: number, options: object): Phaser.GameObjects.GameObject; - /** - * Creates a new matterjs trapezoid body. - * @param width The width of the trapezoid. - * @param height The height of the trapezoid. - * @param slope The angle of slope for the trapezoid. - * @param options A matterjs config object for the body. - */ - setTrapezoid(width: number, height: number, slope: number, options: object): Phaser.GameObjects.GameObject; - /** - * [description] - * @param body [description] - * @param addToWorld Should the newly created body be immediately added to the World? Default true. - */ - setExistingBody(body: MatterJS.Body, addToWorld?: boolean): Phaser.GameObjects.GameObject; - /** - * [description] - * @param config [description] - * @param options [description] - */ - setBody(config: object, options: object): Phaser.GameObjects.GameObject; - } - - /** - * [description] - */ - interface Sleep { - /** - * [description] - * @param value [description] Default 60. - */ - setSleepThreshold(value?: number): Phaser.GameObjects.GameObject; - /** - * [description] - * @param start [description] - * @param end [description] - */ - setSleepEvents(start: boolean, end: boolean): Phaser.GameObjects.GameObject; - /** - * [description] - * @param value [description] - */ - setSleepStartEvent(value: boolean): Phaser.GameObjects.GameObject; - /** - * [description] - * @param value [description] - */ - setSleepEndEvent(value: boolean): Phaser.GameObjects.GameObject; - } - - /** - * Provides methods used for getting and setting the static state of a physics body. - */ - interface Static { - /** - * Changes the physics body to be either static `true` or dynamic `false`. - * @param value `true` to set the body as being static, or `false` to make it dynamic. - */ - setStatic(value: boolean): Phaser.GameObjects.GameObject; - /** - * Returns `true` if the body is static, otherwise `false` for a dynamic body. - */ - isStatic(): boolean; - } - - /** - * Provides methods used for getting and setting the position, scale and rotation of a Game Object. - */ - interface Transform { - /** - * The x position of this Game Object. - */ - x: number; - /** - * The y position of this Game Object. - */ - y: number; - /** - * The horizontal scale of this Game Object. - */ - scaleX: number; - /** - * The vertical scale of this Game Object. - */ - scaleY: number; - /** - * Use `angle` to set or get rotation of the physics body associated to this GameObject. - * Unlike rotation, when using set the value can be in degrees, which will be converted to radians internally. - */ - angle: number; - /** - * Use `rotation` to set or get the rotation of the physics body associated with this GameObject. - * The value when set must be in radians. - */ - rotation: number; - /** - * Returns the center x offset of the Body this Game Object is using. - * - * This is calculated by taking the difference between the center of the frame and the center of - * the physics body. If set, the `body.render.sprite.xOffset` value is then added to it. - * - * Use this when setting the Origin of a Physics Game Object post-creation, i.e.: - * - * `setOrigin(originX + centerOffsetX, originY + centerOffsetY)` - */ - readonly centerOffsetX: number; - /** - * Returns the center y offset of the Body this Game Object is using. - * - * This is calculated by taking the difference between the center of the frame and the center of - * the physics body. If set, the `body.render.sprite.yOffset` value is then added to it. - * - * Use this when setting the Origin of a Physics Game Object post-creation, i.e.: - * - * `setOrigin(originX + centerOffsetX, originY + centerOffsetY)` - */ - readonly centerOffsetY: number; - /** - * Sets the position of the physics body along x and y axes. - * Both the parameters to this function are optional and if not passed any they default to 0. - * Velocity, angle, force etc. are unchanged. - * @param x The horizontal position of the body. Default 0. - * @param y The vertical position of the body. Default x. - */ - setPosition(x?: number, y?: number): this; - /** - * Immediately sets the angle of the Body. - * Angular velocity, position, force etc. are unchanged. - * @param radians The angle of the body, in radians. Default 0. - */ - setRotation(radians?: number): this; - /** - * Setting fixed rotation sets the Body inertia to Infinity, which stops it - * from being able to rotate when forces are applied to it. - */ - setFixedRotation(): this; - /** - * Immediately sets the angle of the Body. - * Angular velocity, position, force etc. are unchanged. - * @param degrees The angle to set, in degrees. Default 0. - */ - setAngle(degrees?: number): this; - /** - * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. Default 1. - * @param y The vertical scale of this Game Object. If not set it will use the x value. Default x. - * @param point The point (Vector2) from which scaling will occur. - */ - setScale(x?: number, y?: number, point?: Phaser.Math.Vector2): this; - } - - /** - * [description] - */ - interface Velocity { - /** - * [description] - * @param value [description] - */ - setAngularVelocity(value: number): Phaser.GameObjects.GameObject; - /** - * Sets the horizontal velocity of the physics body. - * @param x The horizontal velocity value. - */ - setVelocityX(x: number): Phaser.GameObjects.GameObject; - /** - * Sets vertical velocity of the physics body. - * @param y The vertical velocity value. - */ - setVelocityY(y: number): Phaser.GameObjects.GameObject; - /** - * Sets both the horizontal and vertical velocity of the physics body. - * @param x The horizontal velocity value. - * @param y The vertical velocity value, it can be either positive or negative. If not given, it will be the same as the `x` value. Default x. - */ - setVelocity(x: number, y?: number): Phaser.GameObjects.GameObject; - } - - } - - namespace Events { - type AfterAddEvent = { - /** - * An array of the object(s) that have been added. May be a single body, constraint, composite or a mixture of these. - */ - object: any[]; - /** - * The source object of the event. - */ - source: any; - /** - * The name of the event. - */ - name: string; - }; - - /** - * The Matter Physics After Add Event. - * - * This event is dispatched by a Matter Physics World instance at the end of the process when a new Body - * or Constraint has just been added to the world. - * - * Listen to it from a Scene using: `this.matter.world.on('afteradd', listener)`. - */ - const AFTER_ADD: any; - - type AfterRemoveEvent = { - /** - * An array of the object(s) that were removed. May be a single body, constraint, composite or a mixture of these. - */ - object: any[]; - /** - * The source object of the event. - */ - source: any; - /** - * The name of the event. - */ - name: string; - }; - - /** - * The Matter Physics After Remove Event. - * - * This event is dispatched by a Matter Physics World instance at the end of the process when a - * Body or Constraint was removed from the world. - * - * Listen to it from a Scene using: `this.matter.world.on('afterremove', listener)`. - */ - const AFTER_REMOVE: any; - - type AfterUpdateEvent = { - /** - * The Matter Engine `timing.timestamp` value for the event. - */ - timestamp: number; - /** - * The source object of the event. - */ - source: any; - /** - * The name of the event. - */ - name: string; - }; - - /** - * The Matter Physics After Update Event. - * - * This event is dispatched by a Matter Physics World instance after the engine has updated and all collision events have resolved. - * - * Listen to it from a Scene using: `this.matter.world.on('afterupdate', listener)`. - */ - const AFTER_UPDATE: any; - - type BeforeAddEvent = { - /** - * An array of the object(s) to be added. May be a single body, constraint, composite or a mixture of these. - */ - object: any[]; - /** - * The source object of the event. - */ - source: any; - /** - * The name of the event. - */ - name: string; - }; - - /** - * The Matter Physics Before Add Event. - * - * This event is dispatched by a Matter Physics World instance at the start of the process when a new Body - * or Constraint is being added to the world. - * - * Listen to it from a Scene using: `this.matter.world.on('beforeadd', listener)`. - */ - const BEFORE_ADD: any; - - type BeforeRemoveEvent = { - /** - * An array of the object(s) to be removed. May be a single body, constraint, composite or a mixture of these. - */ - object: any[]; - /** - * The source object of the event. - */ - source: any; - /** - * The name of the event. - */ - name: string; - }; - - /** - * The Matter Physics Before Remove Event. - * - * This event is dispatched by a Matter Physics World instance at the start of the process when a - * Body or Constraint is being removed from the world. - * - * Listen to it from a Scene using: `this.matter.world.on('beforeremove', listener)`. - */ - const BEFORE_REMOVE: any; - - type BeforeUpdateEvent = { - /** - * The Matter Engine `timing.timestamp` value for the event. - */ - timestamp: number; - /** - * The source object of the event. - */ - source: any; - /** - * The name of the event. - */ - name: string; - }; - - /** - * The Matter Physics Before Update Event. - * - * This event is dispatched by a Matter Physics World instance right before all the collision processing takes place. - * - * Listen to it from a Scene using: `this.matter.world.on('beforeupdate', listener)`. - */ - const BEFORE_UPDATE: any; - - type CollisionActiveEvent = { - /** - * A list of all affected pairs in the collision. - */ - pairs: Phaser.Types.Physics.Matter.MatterCollisionData[]; - /** - * The Matter Engine `timing.timestamp` value for the event. - */ - timestamp: number; - /** - * The source object of the event. - */ - source: any; - /** - * The name of the event. - */ - name: string; - }; - - /** - * The Matter Physics Collision Active Event. - * - * This event is dispatched by a Matter Physics World instance after the engine has updated. - * It provides a list of all pairs that are colliding in the current tick (if any). - * - * Listen to it from a Scene using: `this.matter.world.on('collisionactive', listener)`. - */ - const COLLISION_ACTIVE: any; - - type CollisionEndEvent = { - /** - * A list of all affected pairs in the collision. - */ - pairs: Phaser.Types.Physics.Matter.MatterCollisionData[]; - /** - * The Matter Engine `timing.timestamp` value for the event. - */ - timestamp: number; - /** - * The source object of the event. - */ - source: any; - /** - * The name of the event. - */ - name: string; - }; - - /** - * The Matter Physics Collision End Event. - * - * This event is dispatched by a Matter Physics World instance after the engine has updated. - * It provides a list of all pairs that have finished colliding in the current tick (if any). - * - * Listen to it from a Scene using: `this.matter.world.on('collisionend', listener)`. - */ - const COLLISION_END: any; - - type CollisionStartEvent = { - /** - * A list of all affected pairs in the collision. - */ - pairs: Phaser.Types.Physics.Matter.MatterCollisionData[]; - /** - * The Matter Engine `timing.timestamp` value for the event. - */ - timestamp: number; - /** - * The source object of the event. - */ - source: any; - /** - * The name of the event. - */ - name: string; - }; - - /** - * The Matter Physics Collision Start Event. - * - * This event is dispatched by a Matter Physics World instance after the engine has updated. - * It provides a list of all pairs that have started to collide in the current tick (if any). - * - * Listen to it from a Scene using: `this.matter.world.on('collisionstart', listener)`. - */ - const COLLISION_START: any; - - /** - * The Matter Physics Drag End Event. - * - * This event is dispatched by a Matter Physics World instance when a Pointer Constraint - * stops dragging a body. - * - * Listen to it from a Scene using: `this.matter.world.on('dragend', listener)`. - */ - const DRAG_END: any; - - /** - * The Matter Physics Drag Event. - * - * This event is dispatched by a Matter Physics World instance when a Pointer Constraint - * is actively dragging a body. It is emitted each time the pointer moves. - * - * Listen to it from a Scene using: `this.matter.world.on('drag', listener)`. - */ - const DRAG: any; - - /** - * The Matter Physics Drag Start Event. - * - * This event is dispatched by a Matter Physics World instance when a Pointer Constraint - * starts dragging a body. - * - * Listen to it from a Scene using: `this.matter.world.on('dragstart', listener)`. - */ - const DRAG_START: any; - - /** - * The Matter Physics World Pause Event. - * - * This event is dispatched by an Matter Physics World instance when it is paused. - * - * Listen to it from a Scene using: `this.matter.world.on('pause', listener)`. - */ - const PAUSE: any; - - /** - * The Matter Physics World Resume Event. - * - * This event is dispatched by an Matter Physics World instance when it resumes from a paused state. - * - * Listen to it from a Scene using: `this.matter.world.on('resume', listener)`. - */ - const RESUME: any; - - type SleepEndEvent = { - /** - * The source object of the event. - */ - source: any; - /** - * The name of the event. - */ - name: string; - }; - - /** - * The Matter Physics Sleep End Event. - * - * This event is dispatched by a Matter Physics World instance when a Body stop sleeping. - * - * Listen to it from a Scene using: `this.matter.world.on('sleepend', listener)`. - */ - const SLEEP_END: any; - - type SleepStartEvent = { - /** - * The source object of the event. - */ - source: any; - /** - * The name of the event. - */ - name: string; - }; - - /** - * The Matter Physics Sleep Start Event. - * - * This event is dispatched by a Matter Physics World instance when a Body goes to sleep. - * - * Listen to it from a Scene using: `this.matter.world.on('sleepstart', listener)`. - */ - const SLEEP_START: any; - - } - } } @@ -71780,24 +73224,6 @@ declare namespace Phaser { XOR, } - /** - * Phaser Scale Modes. - */ - enum ScaleModes { - /** - * Default Scale Mode (Linear). - */ - DEFAULT, - /** - * Linear Scale Mode. - */ - LINEAR, - /** - * Nearest Scale Mode. - */ - NEAREST, - } - namespace Renderer { namespace Canvas { /** @@ -72081,6 +73507,600 @@ declare namespace Phaser { } namespace WebGL { + namespace Pipelines { + /** + * BitmapMaskPipeline handles all bitmap masking rendering in WebGL. It works by using + * sampling two texture on the fragment shader and using the fragment's alpha to clip the region. + * The config properties are: + * - game: Current game instance. + * - renderer: Current WebGL renderer. + * - topology: This indicates how the primitives are rendered. The default value is GL_TRIANGLES. + * Here is the full list of rendering primitives (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants). + * - vertShader: Source for vertex shader as a string. + * - fragShader: Source for fragment shader as a string. + * - vertexCapacity: The amount of vertices that shall be allocated + * - vertexSize: The size of a single vertex in bytes. + */ + class BitmapMaskPipeline extends Phaser.Renderer.WebGL.WebGLPipeline { + /** + * + * @param config Used for overriding shader an pipeline properties if extending this pipeline. + */ + constructor(config: object); + + /** + * Float32 view of the array buffer containing the pipeline's vertices. + */ + vertexViewF32: Float32Array; + + /** + * Size of the batch. + */ + maxQuads: number; + + /** + * Dirty flag to check if resolution properties need to be updated on the + * masking shader. + */ + resolutionDirty: boolean; + + /** + * Called every time the pipeline needs to be used. + * It binds all necessary resources. + */ + onBind(): this; + + /** + * [description] + * @param width [description] + * @param height [description] + * @param resolution [description] + */ + resize(width: number, height: number, resolution: number): this; + + /** + * Binds necessary resources and renders the mask to a separated framebuffer. + * The framebuffer for the masked object is also bound for further use. + * @param mask GameObject used as mask. + * @param maskedObject GameObject masked by the mask GameObject. + * @param camera [description] + */ + beginMask(mask: Phaser.GameObjects.GameObject, maskedObject: Phaser.GameObjects.GameObject, camera: Phaser.Cameras.Scene2D.Camera): void; + + /** + * The masked game objects framebuffer is unbound and its texture + * is bound together with the mask texture and the mask shader and + * a draw call with a single quad is processed. Here is where the + * masking effect is applied. + * @param mask GameObject used as a mask. + */ + endMask(mask: Phaser.GameObjects.GameObject): void; + + } + + /** + * Implements a model view projection matrices. + * Pipelines can implement this for doing 2D and 3D rendering. + */ + interface ModelViewProjection { + /** + * Dirty flag for checking if model matrix needs to be updated on GPU. + */ + modelMatrixDirty: boolean; + /** + * Dirty flag for checking if view matrix needs to be updated on GPU. + */ + viewMatrixDirty: boolean; + /** + * Dirty flag for checking if projection matrix needs to be updated on GPU. + */ + projectionMatrixDirty: boolean; + /** + * Model matrix + */ + modelMatrix: Float32Array; + /** + * View matrix + */ + viewMatrix: Float32Array; + /** + * Projection matrix + */ + projectionMatrix: Float32Array; + /** + * Initializes MVP matrices with an identity matrix + */ + mvpInit(): void; + /** + * If dirty flags are set then the matrices are uploaded to the GPU. + */ + mvpUpdate(): void; + /** + * Loads an identity matrix to the model matrix + */ + modelIdentity(): void; + /** + * Scale model matrix + * @param x The x component. + * @param y The y component. + * @param z The z component. + */ + modelScale(x: number, y: number, z: number): this; + /** + * Translate model matrix + * @param x The x component. + * @param y The y component. + * @param z The z component. + */ + modelTranslate(x: number, y: number, z: number): this; + /** + * Rotates the model matrix in the X axis. + * @param radians The amount to rotate by. + */ + modelRotateX(radians: number): this; + /** + * Rotates the model matrix in the Y axis. + * @param radians The amount to rotate by. + */ + modelRotateY(radians: number): this; + /** + * Rotates the model matrix in the Z axis. + * @param radians The amount to rotate by. + */ + modelRotateZ(radians: number): this; + /** + * Loads identity matrix into the view matrix + */ + viewIdentity(): this; + /** + * Scales view matrix + * @param x The x component. + * @param y The y component. + * @param z The z component. + */ + viewScale(x: number, y: number, z: number): this; + /** + * Translates view matrix + * @param x The x component. + * @param y The y component. + * @param z The z component. + */ + viewTranslate(x: number, y: number, z: number): this; + /** + * Rotates view matrix in the X axis. + * @param radians The amount to rotate by. + */ + viewRotateX(radians: number): this; + /** + * Rotates view matrix in the Y axis. + * @param radians The amount to rotate by. + */ + viewRotateY(radians: number): this; + /** + * Rotates view matrix in the Z axis. + * @param radians The amount to rotate by. + */ + viewRotateZ(radians: number): this; + /** + * Loads a 2D view matrix (3x2 matrix) into a 4x4 view matrix + * @param matrix2D The Matrix2D. + */ + viewLoad2D(matrix2D: Float32Array): this; + /** + * Copies a 4x4 matrix into the view matrix + * @param matrix The Matrix2D. + */ + viewLoad(matrix: Float32Array): this; + /** + * Loads identity matrix into the projection matrix. + */ + projIdentity(): this; + /** + * Sets up an orthographic projection matrix + * @param left The left value. + * @param right The right value. + * @param bottom The bottom value. + * @param top The top value. + * @param near The near value. + * @param far The far value. + */ + projOrtho(left: number, right: number, bottom: number, top: number, near: number, far: number): this; + /** + * Sets up a perspective projection matrix + * @param fovY The fov value. + * @param aspectRatio The aspectRatio value. + * @param near The near value. + * @param far The far value. + */ + projPersp(fovY: number, aspectRatio: number, near: number, far: number): this; + } + + /** + * ForwardDiffuseLightPipeline implements a forward rendering approach for 2D lights. + * This pipeline extends TextureTintPipeline so it implements all it's rendering functions + * and batching system. + */ + class ForwardDiffuseLightPipeline extends Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline { + /** + * + * @param config The configuration of the pipeline, same as the {@link Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline}. The fragment shader will be replaced with the lighting shader. + */ + constructor(config: object); + + /** + * This function sets all the needed resources for each camera pass. + * @param scene The Scene being rendered. + * @param camera The Scene Camera being rendered with. + */ + onRender(scene: Phaser.Scene, camera: Phaser.Cameras.Scene2D.Camera): this; + + /** + * Generic function for batching a textured quad + * @param gameObject Source GameObject + * @param texture Raw WebGLTexture associated with the quad + * @param textureWidth Real texture width + * @param textureHeight Real texture height + * @param srcX X coordinate of the quad + * @param srcY Y coordinate of the quad + * @param srcWidth Width of the quad + * @param srcHeight Height of the quad + * @param scaleX X component of scale + * @param scaleY Y component of scale + * @param rotation Rotation of the quad + * @param flipX Indicates if the quad is horizontally flipped + * @param flipY Indicates if the quad is vertically flipped + * @param scrollFactorX By which factor is the quad affected by the camera horizontal scroll + * @param scrollFactorY By which factor is the quad effected by the camera vertical scroll + * @param displayOriginX Horizontal origin in pixels + * @param displayOriginY Vertical origin in pixels + * @param frameX X coordinate of the texture frame + * @param frameY Y coordinate of the texture frame + * @param frameWidth Width of the texture frame + * @param frameHeight Height of the texture frame + * @param tintTL Tint for top left + * @param tintTR Tint for top right + * @param tintBL Tint for bottom left + * @param tintBR Tint for bottom right + * @param tintEffect The tint effect (0 for additive, 1 for replacement) + * @param uOffset Horizontal offset on texture coordinate + * @param vOffset Vertical offset on texture coordinate + * @param camera Current used camera + * @param parentTransformMatrix Parent container + */ + batchTexture(gameObject: Phaser.GameObjects.GameObject, texture: WebGLTexture, textureWidth: integer, textureHeight: integer, srcX: number, srcY: number, srcWidth: number, srcHeight: number, scaleX: number, scaleY: number, rotation: number, flipX: boolean, flipY: boolean, scrollFactorX: number, scrollFactorY: number, displayOriginX: number, displayOriginY: number, frameX: number, frameY: number, frameWidth: number, frameHeight: number, tintTL: integer, tintTR: integer, tintBL: integer, tintBR: integer, tintEffect: number, uOffset: number, vOffset: number, camera: Phaser.Cameras.Scene2D.Camera, parentTransformMatrix: Phaser.GameObjects.Components.TransformMatrix): void; + + /** + * Sets the Game Objects normal map as the active texture. + * @param gameObject The Game Object to update. + */ + setNormalMap(gameObject: Phaser.GameObjects.GameObject): void; + + /** + * Rotates the normal map vectors inversely by the given angle. + * Only works in 2D space. + * @param rotation The angle of rotation in radians. + */ + setNormalMapRotation(rotation: number): void; + + /** + * Takes a Sprite Game Object, or any object that extends it, which has a normal texture and adds it to the batch. + * @param sprite The texture-based Game Object to add to the batch. + * @param camera The Camera to use for the rendering transform. + * @param parentTransformMatrix The transform matrix of the parent container, if set. + */ + batchSprite(sprite: Phaser.GameObjects.Sprite, camera: Phaser.Cameras.Scene2D.Camera, parentTransformMatrix: Phaser.GameObjects.Components.TransformMatrix): void; + + } + + /** + * TextureTintPipeline implements the rendering infrastructure + * for displaying textured objects + * The config properties are: + * - game: Current game instance. + * - renderer: Current WebGL renderer. + * - topology: This indicates how the primitives are rendered. The default value is GL_TRIANGLES. + * Here is the full list of rendering primitives (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants). + * - vertShader: Source for vertex shader as a string. + * - fragShader: Source for fragment shader as a string. + * - vertexCapacity: The amount of vertices that shall be allocated + * - vertexSize: The size of a single vertex in bytes. + */ + class TextureTintPipeline extends Phaser.Renderer.WebGL.WebGLPipeline { + /** + * + * @param config The configuration options for this Texture Tint Pipeline, as described above. + */ + constructor(config: object); + + /** + * Float32 view of the array buffer containing the pipeline's vertices. + */ + vertexViewF32: Float32Array; + + /** + * Uint32 view of the array buffer containing the pipeline's vertices. + */ + vertexViewU32: Uint32Array; + + /** + * Size of the batch. + */ + maxQuads: integer; + + /** + * Collection of batch information + */ + batches: any[]; + + /** + * Called every time the pipeline needs to be used. + * It binds all necessary resources. + */ + onBind(): this; + + /** + * Resizes this pipeline and updates the projection. + * @param width The new width. + * @param height The new height. + * @param resolution The resolution. + */ + resize(width: number, height: number, resolution: number): this; + + /** + * Assigns a texture to the current batch. If a different texture is already set it creates a new batch object. + * @param texture WebGLTexture that will be assigned to the current batch. If not given uses blankTexture. + * @param unit Texture unit to which the texture needs to be bound. Default 0. + */ + setTexture2D(texture?: WebGLTexture, unit?: integer): Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline; + + /** + * Checks if the current batch has the same texture and texture unit, or if we need to create a new batch. + * @param texture WebGLTexture that will be assigned to the current batch. If not given uses blankTexture. + * @param unit Texture unit to which the texture needs to be bound. + */ + requireTextureBatch(texture: WebGLTexture, unit: integer): boolean; + + /** + * Creates a new batch object and pushes it to a batch array. + * The batch object contains information relevant to the current + * vertex batch like the offset in the vertex buffer, vertex count and + * the textures used by that batch. + * @param texture Optional WebGLTexture that will be assigned to the created batch. + * @param unit Texture unit to which the texture needs to be bound. + */ + pushBatch(texture: WebGLTexture, unit: integer): void; + + /** + * Uploads the vertex data and emits a draw call for the current batch of vertices. + */ + flush(): this; + + /** + * Takes a Sprite Game Object, or any object that extends it, and adds it to the batch. + * @param sprite The texture based Game Object to add to the batch. + * @param camera The Camera to use for the rendering transform. + * @param parentTransformMatrix The transform matrix of the parent container, if set. + */ + batchSprite(sprite: Phaser.GameObjects.Image | Phaser.GameObjects.Sprite, camera: Phaser.Cameras.Scene2D.Camera, parentTransformMatrix?: Phaser.GameObjects.Components.TransformMatrix): void; + + /** + * Adds the vertices data into the batch and flushes if full. + * + * Assumes 6 vertices in the following arrangement: + * + * ``` + * 0----3 + * |\ B| + * | \ | + * | \ | + * | A \| + * | \ + * 1----2 + * ``` + * + * Where tx0/ty0 = 0, tx1/ty1 = 1, tx2/ty2 = 2 and tx3/ty3 = 3 + * @param x0 The top-left x position. + * @param y0 The top-left y position. + * @param x1 The bottom-left x position. + * @param y1 The bottom-left y position. + * @param x2 The bottom-right x position. + * @param y2 The bottom-right y position. + * @param x3 The top-right x position. + * @param y3 The top-right y position. + * @param u0 UV u0 value. + * @param v0 UV v0 value. + * @param u1 UV u1 value. + * @param v1 UV v1 value. + * @param tintTL The top-left tint color value. + * @param tintTR The top-right tint color value. + * @param tintBL The bottom-left tint color value. + * @param tintBR The bottom-right tint color value. + * @param tintEffect The tint effect for the shader to use. + * @param texture WebGLTexture that will be assigned to the current batch if a flush occurs. + * @param unit Texture unit to which the texture needs to be bound. Default 0. + */ + batchQuad(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, u0: number, v0: number, u1: number, v1: number, tintTL: number, tintTR: number, tintBL: number, tintBR: number, tintEffect: number | boolean, texture?: WebGLTexture, unit?: integer): boolean; + + /** + * Adds the vertices data into the batch and flushes if full. + * + * Assumes 3 vertices in the following arrangement: + * + * ``` + * 0 + * |\ + * | \ + * | \ + * | \ + * | \ + * 1-----2 + * ``` + * @param x1 The bottom-left x position. + * @param y1 The bottom-left y position. + * @param x2 The bottom-right x position. + * @param y2 The bottom-right y position. + * @param x3 The top-right x position. + * @param y3 The top-right y position. + * @param u0 UV u0 value. + * @param v0 UV v0 value. + * @param u1 UV u1 value. + * @param v1 UV v1 value. + * @param tintTL The top-left tint color value. + * @param tintTR The top-right tint color value. + * @param tintBL The bottom-left tint color value. + * @param tintEffect The tint effect for the shader to use. + * @param texture WebGLTexture that will be assigned to the current batch if a flush occurs. + * @param unit Texture unit to which the texture needs to be bound. Default 0. + */ + batchTri(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, u0: number, v0: number, u1: number, v1: number, tintTL: number, tintTR: number, tintBL: number, tintEffect: number | boolean, texture?: WebGLTexture, unit?: integer): boolean; + + /** + * Generic function for batching a textured quad using argument values instead of a Game Object. + * @param gameObject Source GameObject. + * @param texture Raw WebGLTexture associated with the quad. + * @param textureWidth Real texture width. + * @param textureHeight Real texture height. + * @param srcX X coordinate of the quad. + * @param srcY Y coordinate of the quad. + * @param srcWidth Width of the quad. + * @param srcHeight Height of the quad. + * @param scaleX X component of scale. + * @param scaleY Y component of scale. + * @param rotation Rotation of the quad. + * @param flipX Indicates if the quad is horizontally flipped. + * @param flipY Indicates if the quad is vertically flipped. + * @param scrollFactorX By which factor is the quad affected by the camera horizontal scroll. + * @param scrollFactorY By which factor is the quad effected by the camera vertical scroll. + * @param displayOriginX Horizontal origin in pixels. + * @param displayOriginY Vertical origin in pixels. + * @param frameX X coordinate of the texture frame. + * @param frameY Y coordinate of the texture frame. + * @param frameWidth Width of the texture frame. + * @param frameHeight Height of the texture frame. + * @param tintTL Tint for top left. + * @param tintTR Tint for top right. + * @param tintBL Tint for bottom left. + * @param tintBR Tint for bottom right. + * @param tintEffect The tint effect. + * @param uOffset Horizontal offset on texture coordinate. + * @param vOffset Vertical offset on texture coordinate. + * @param camera Current used camera. + * @param parentTransformMatrix Parent container. + * @param skipFlip Skip the renderTexture check. Default false. + */ + batchTexture(gameObject: Phaser.GameObjects.GameObject, texture: WebGLTexture, textureWidth: integer, textureHeight: integer, srcX: number, srcY: number, srcWidth: number, srcHeight: number, scaleX: number, scaleY: number, rotation: number, flipX: boolean, flipY: boolean, scrollFactorX: number, scrollFactorY: number, displayOriginX: number, displayOriginY: number, frameX: number, frameY: number, frameWidth: number, frameHeight: number, tintTL: integer, tintTR: integer, tintBL: integer, tintBR: integer, tintEffect: number, uOffset: number, vOffset: number, camera: Phaser.Cameras.Scene2D.Camera, parentTransformMatrix: Phaser.GameObjects.Components.TransformMatrix, skipFlip?: boolean): void; + + /** + * Adds a Texture Frame into the batch for rendering. + * @param frame The Texture Frame to be rendered. + * @param x The horizontal position to render the texture at. + * @param y The vertical position to render the texture at. + * @param tint The tint color. + * @param alpha The alpha value. + * @param transformMatrix The Transform Matrix to use for the texture. + * @param parentTransformMatrix A parent Transform Matrix. + */ + batchTextureFrame(frame: Phaser.Textures.Frame, x: number, y: number, tint: number, alpha: number, transformMatrix: Phaser.GameObjects.Components.TransformMatrix, parentTransformMatrix?: Phaser.GameObjects.Components.TransformMatrix): void; + + /** + * Pushes a filled rectangle into the vertex batch. + * Rectangle has no transform values and isn't transformed into the local space. + * Used for directly batching untransformed rectangles, such as Camera background colors. + * @param x Horizontal top left coordinate of the rectangle. + * @param y Vertical top left coordinate of the rectangle. + * @param width Width of the rectangle. + * @param height Height of the rectangle. + * @param color Color of the rectangle to draw. + * @param alpha Alpha value of the rectangle to draw. + */ + drawFillRect(x: number, y: number, width: number, height: number, color: number, alpha: number): void; + + /** + * Pushes a filled rectangle into the vertex batch. + * Rectangle factors in the given transform matrices before adding to the batch. + * @param x Horizontal top left coordinate of the rectangle. + * @param y Vertical top left coordinate of the rectangle. + * @param width Width of the rectangle. + * @param height Height of the rectangle. + * @param currentMatrix The current transform. + * @param parentMatrix The parent transform. + */ + batchFillRect(x: number, y: number, width: number, height: number, currentMatrix: Phaser.GameObjects.Components.TransformMatrix, parentMatrix: Phaser.GameObjects.Components.TransformMatrix): void; + + /** + * Pushes a filled triangle into the vertex batch. + * Triangle factors in the given transform matrices before adding to the batch. + * @param x0 Point 0 x coordinate. + * @param y0 Point 0 y coordinate. + * @param x1 Point 1 x coordinate. + * @param y1 Point 1 y coordinate. + * @param x2 Point 2 x coordinate. + * @param y2 Point 2 y coordinate. + * @param currentMatrix The current transform. + * @param parentMatrix The parent transform. + */ + batchFillTriangle(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, currentMatrix: Phaser.GameObjects.Components.TransformMatrix, parentMatrix: Phaser.GameObjects.Components.TransformMatrix): void; + + /** + * Pushes a stroked triangle into the vertex batch. + * Triangle factors in the given transform matrices before adding to the batch. + * The triangle is created from 3 lines and drawn using the `batchStrokePath` method. + * @param x0 Point 0 x coordinate. + * @param y0 Point 0 y coordinate. + * @param x1 Point 1 x coordinate. + * @param y1 Point 1 y coordinate. + * @param x2 Point 2 x coordinate. + * @param y2 Point 2 y coordinate. + * @param lineWidth The width of the line in pixels. + * @param currentMatrix The current transform. + * @param parentMatrix The parent transform. + */ + batchStrokeTriangle(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, lineWidth: number, currentMatrix: Phaser.GameObjects.Components.TransformMatrix, parentMatrix: Phaser.GameObjects.Components.TransformMatrix): void; + + /** + * Adds the given path to the vertex batch for rendering. + * + * It works by taking the array of path data and then passing it through Earcut, which + * creates a list of polygons. Each polygon is then added to the batch. + * + * The path is always automatically closed because it's filled. + * @param path Collection of points that represent the path. + * @param currentMatrix The current transform. + * @param parentMatrix The parent transform. + */ + batchFillPath(path: any[], currentMatrix: Phaser.GameObjects.Components.TransformMatrix, parentMatrix: Phaser.GameObjects.Components.TransformMatrix): void; + + /** + * Adds the given path to the vertex batch for rendering. + * + * It works by taking the array of path data and calling `batchLine` for each section + * of the path. + * + * The path is optionally closed at the end. + * @param path Collection of points that represent the path. + * @param lineWidth The width of the line segments in pixels. + * @param pathOpen Indicates if the path should be closed or left open. + * @param currentMatrix The current transform. + * @param parentMatrix The parent transform. + */ + batchStrokePath(path: any[], lineWidth: number, pathOpen: boolean, currentMatrix: Phaser.GameObjects.Components.TransformMatrix, parentMatrix: Phaser.GameObjects.Components.TransformMatrix): void; + + /** + * Creates a quad and adds it to the vertex batch based on the given line values. + * @param ax X coordinate to the start of the line + * @param ay Y coordinate to the start of the line + * @param bx X coordinate to the end of the line + * @param by Y coordinate to the end of the line + * @param aLineWidth Width of the start of the line + * @param bLineWidth Width of the end of the line + * @param currentMatrix Parent matrix, generally used by containers + */ + batchLine(ax: number, ay: number, bx: number, by: number, aLineWidth: number, bLineWidth: number, currentMatrix: Float32Array): void; + + } + + } + namespace Utils { /** * Packs four floats on a range from 0.0 to 1.0 into a single Uint32 @@ -73307,605 +75327,203 @@ declare namespace Phaser { } - namespace Pipelines { - /** - * BitmapMaskPipeline handles all bitmap masking rendering in WebGL. It works by using - * sampling two texture on the fragment shader and using the fragment's alpha to clip the region. - * The config properties are: - * - game: Current game instance. - * - renderer: Current WebGL renderer. - * - topology: This indicates how the primitives are rendered. The default value is GL_TRIANGLES. - * Here is the full list of rendering primitives (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants). - * - vertShader: Source for vertex shader as a string. - * - fragShader: Source for fragment shader as a string. - * - vertexCapacity: The amount of vertices that shall be allocated - * - vertexSize: The size of a single vertex in bytes. - */ - class BitmapMaskPipeline extends Phaser.Renderer.WebGL.WebGLPipeline { - /** - * - * @param config Used for overriding shader an pipeline properties if extending this pipeline. - */ - constructor(config: object); - - /** - * Float32 view of the array buffer containing the pipeline's vertices. - */ - vertexViewF32: Float32Array; - - /** - * Size of the batch. - */ - maxQuads: number; - - /** - * Dirty flag to check if resolution properties need to be updated on the - * masking shader. - */ - resolutionDirty: boolean; - - /** - * Called every time the pipeline needs to be used. - * It binds all necessary resources. - */ - onBind(): this; - - /** - * [description] - * @param width [description] - * @param height [description] - * @param resolution [description] - */ - resize(width: number, height: number, resolution: number): this; - - /** - * Binds necessary resources and renders the mask to a separated framebuffer. - * The framebuffer for the masked object is also bound for further use. - * @param mask GameObject used as mask. - * @param maskedObject GameObject masked by the mask GameObject. - * @param camera [description] - */ - beginMask(mask: Phaser.GameObjects.GameObject, maskedObject: Phaser.GameObjects.GameObject, camera: Phaser.Cameras.Scene2D.Camera): void; - - /** - * The masked game objects framebuffer is unbound and its texture - * is bound together with the mask texture and the mask shader and - * a draw call with a single quad is processed. Here is where the - * masking effect is applied. - * @param mask GameObject used as a mask. - */ - endMask(mask: Phaser.GameObjects.GameObject): void; - - } - - /** - * ForwardDiffuseLightPipeline implements a forward rendering approach for 2D lights. - * This pipeline extends TextureTintPipeline so it implements all it's rendering functions - * and batching system. - */ - class ForwardDiffuseLightPipeline extends Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline { - /** - * - * @param config The configuration of the pipeline, same as the {@link Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline}. The fragment shader will be replaced with the lighting shader. - */ - constructor(config: object); - - /** - * This function sets all the needed resources for each camera pass. - * @param scene The Scene being rendered. - * @param camera The Scene Camera being rendered with. - */ - onRender(scene: Phaser.Scene, camera: Phaser.Cameras.Scene2D.Camera): this; - - /** - * Generic function for batching a textured quad - * @param gameObject Source GameObject - * @param texture Raw WebGLTexture associated with the quad - * @param textureWidth Real texture width - * @param textureHeight Real texture height - * @param srcX X coordinate of the quad - * @param srcY Y coordinate of the quad - * @param srcWidth Width of the quad - * @param srcHeight Height of the quad - * @param scaleX X component of scale - * @param scaleY Y component of scale - * @param rotation Rotation of the quad - * @param flipX Indicates if the quad is horizontally flipped - * @param flipY Indicates if the quad is vertically flipped - * @param scrollFactorX By which factor is the quad affected by the camera horizontal scroll - * @param scrollFactorY By which factor is the quad effected by the camera vertical scroll - * @param displayOriginX Horizontal origin in pixels - * @param displayOriginY Vertical origin in pixels - * @param frameX X coordinate of the texture frame - * @param frameY Y coordinate of the texture frame - * @param frameWidth Width of the texture frame - * @param frameHeight Height of the texture frame - * @param tintTL Tint for top left - * @param tintTR Tint for top right - * @param tintBL Tint for bottom left - * @param tintBR Tint for bottom right - * @param tintEffect The tint effect (0 for additive, 1 for replacement) - * @param uOffset Horizontal offset on texture coordinate - * @param vOffset Vertical offset on texture coordinate - * @param camera Current used camera - * @param parentTransformMatrix Parent container - */ - batchTexture(gameObject: Phaser.GameObjects.GameObject, texture: WebGLTexture, textureWidth: integer, textureHeight: integer, srcX: number, srcY: number, srcWidth: number, srcHeight: number, scaleX: number, scaleY: number, rotation: number, flipX: boolean, flipY: boolean, scrollFactorX: number, scrollFactorY: number, displayOriginX: number, displayOriginY: number, frameX: number, frameY: number, frameWidth: number, frameHeight: number, tintTL: integer, tintTR: integer, tintBL: integer, tintBR: integer, tintEffect: number, uOffset: number, vOffset: number, camera: Phaser.Cameras.Scene2D.Camera, parentTransformMatrix: Phaser.GameObjects.Components.TransformMatrix): void; - - /** - * Sets the Game Objects normal map as the active texture. - * @param gameObject The Game Object to update. - */ - setNormalMap(gameObject: Phaser.GameObjects.GameObject): void; - - /** - * Rotates the normal map vectors inversely by the given angle. - * Only works in 2D space. - * @param rotation The angle of rotation in radians. - */ - setNormalMapRotation(rotation: number): void; - - /** - * Takes a Sprite Game Object, or any object that extends it, which has a normal texture and adds it to the batch. - * @param sprite The texture-based Game Object to add to the batch. - * @param camera The Camera to use for the rendering transform. - * @param parentTransformMatrix The transform matrix of the parent container, if set. - */ - batchSprite(sprite: Phaser.GameObjects.Sprite, camera: Phaser.Cameras.Scene2D.Camera, parentTransformMatrix: Phaser.GameObjects.Components.TransformMatrix): void; - - } - - /** - * TextureTintPipeline implements the rendering infrastructure - * for displaying textured objects - * The config properties are: - * - game: Current game instance. - * - renderer: Current WebGL renderer. - * - topology: This indicates how the primitives are rendered. The default value is GL_TRIANGLES. - * Here is the full list of rendering primitives (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants). - * - vertShader: Source for vertex shader as a string. - * - fragShader: Source for fragment shader as a string. - * - vertexCapacity: The amount of vertices that shall be allocated - * - vertexSize: The size of a single vertex in bytes. - */ - class TextureTintPipeline extends Phaser.Renderer.WebGL.WebGLPipeline { - /** - * - * @param config The configuration options for this Texture Tint Pipeline, as described above. - */ - constructor(config: object); - - /** - * Float32 view of the array buffer containing the pipeline's vertices. - */ - vertexViewF32: Float32Array; - - /** - * Uint32 view of the array buffer containing the pipeline's vertices. - */ - vertexViewU32: Uint32Array; - - /** - * Size of the batch. - */ - maxQuads: integer; - - /** - * Collection of batch information - */ - batches: any[]; - - /** - * Called every time the pipeline needs to be used. - * It binds all necessary resources. - */ - onBind(): this; - - /** - * Resizes this pipeline and updates the projection. - * @param width The new width. - * @param height The new height. - * @param resolution The resolution. - */ - resize(width: number, height: number, resolution: number): this; - - /** - * Assigns a texture to the current batch. If a different texture is already set it creates a new batch object. - * @param texture WebGLTexture that will be assigned to the current batch. If not given uses blankTexture. - * @param unit Texture unit to which the texture needs to be bound. Default 0. - */ - setTexture2D(texture?: WebGLTexture, unit?: integer): Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline; - - /** - * Checks if the current batch has the same texture and texture unit, or if we need to create a new batch. - * @param texture WebGLTexture that will be assigned to the current batch. If not given uses blankTexture. - * @param unit Texture unit to which the texture needs to be bound. - */ - requireTextureBatch(texture: WebGLTexture, unit: integer): boolean; - - /** - * Creates a new batch object and pushes it to a batch array. - * The batch object contains information relevant to the current - * vertex batch like the offset in the vertex buffer, vertex count and - * the textures used by that batch. - * @param texture Optional WebGLTexture that will be assigned to the created batch. - * @param unit Texture unit to which the texture needs to be bound. - */ - pushBatch(texture: WebGLTexture, unit: integer): void; - - /** - * Uploads the vertex data and emits a draw call for the current batch of vertices. - */ - flush(): this; - - /** - * Takes a Sprite Game Object, or any object that extends it, and adds it to the batch. - * @param sprite The texture based Game Object to add to the batch. - * @param camera The Camera to use for the rendering transform. - * @param parentTransformMatrix The transform matrix of the parent container, if set. - */ - batchSprite(sprite: Phaser.GameObjects.Image | Phaser.GameObjects.Sprite, camera: Phaser.Cameras.Scene2D.Camera, parentTransformMatrix?: Phaser.GameObjects.Components.TransformMatrix): void; - - /** - * Adds the vertices data into the batch and flushes if full. - * - * Assumes 6 vertices in the following arrangement: - * - * ``` - * 0----3 - * |\ B| - * | \ | - * | \ | - * | A \| - * | \ - * 1----2 - * ``` - * - * Where tx0/ty0 = 0, tx1/ty1 = 1, tx2/ty2 = 2 and tx3/ty3 = 3 - * @param x0 The top-left x position. - * @param y0 The top-left y position. - * @param x1 The bottom-left x position. - * @param y1 The bottom-left y position. - * @param x2 The bottom-right x position. - * @param y2 The bottom-right y position. - * @param x3 The top-right x position. - * @param y3 The top-right y position. - * @param u0 UV u0 value. - * @param v0 UV v0 value. - * @param u1 UV u1 value. - * @param v1 UV v1 value. - * @param tintTL The top-left tint color value. - * @param tintTR The top-right tint color value. - * @param tintBL The bottom-left tint color value. - * @param tintBR The bottom-right tint color value. - * @param tintEffect The tint effect for the shader to use. - * @param texture WebGLTexture that will be assigned to the current batch if a flush occurs. - * @param unit Texture unit to which the texture needs to be bound. Default 0. - */ - batchQuad(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, u0: number, v0: number, u1: number, v1: number, tintTL: number, tintTR: number, tintBL: number, tintBR: number, tintEffect: number | boolean, texture?: WebGLTexture, unit?: integer): boolean; - - /** - * Adds the vertices data into the batch and flushes if full. - * - * Assumes 3 vertices in the following arrangement: - * - * ``` - * 0 - * |\ - * | \ - * | \ - * | \ - * | \ - * 1-----2 - * ``` - * @param x1 The bottom-left x position. - * @param y1 The bottom-left y position. - * @param x2 The bottom-right x position. - * @param y2 The bottom-right y position. - * @param x3 The top-right x position. - * @param y3 The top-right y position. - * @param u0 UV u0 value. - * @param v0 UV v0 value. - * @param u1 UV u1 value. - * @param v1 UV v1 value. - * @param tintTL The top-left tint color value. - * @param tintTR The top-right tint color value. - * @param tintBL The bottom-left tint color value. - * @param tintEffect The tint effect for the shader to use. - * @param texture WebGLTexture that will be assigned to the current batch if a flush occurs. - * @param unit Texture unit to which the texture needs to be bound. Default 0. - */ - batchTri(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, u0: number, v0: number, u1: number, v1: number, tintTL: number, tintTR: number, tintBL: number, tintEffect: number | boolean, texture?: WebGLTexture, unit?: integer): boolean; - - /** - * Generic function for batching a textured quad using argument values instead of a Game Object. - * @param gameObject Source GameObject. - * @param texture Raw WebGLTexture associated with the quad. - * @param textureWidth Real texture width. - * @param textureHeight Real texture height. - * @param srcX X coordinate of the quad. - * @param srcY Y coordinate of the quad. - * @param srcWidth Width of the quad. - * @param srcHeight Height of the quad. - * @param scaleX X component of scale. - * @param scaleY Y component of scale. - * @param rotation Rotation of the quad. - * @param flipX Indicates if the quad is horizontally flipped. - * @param flipY Indicates if the quad is vertically flipped. - * @param scrollFactorX By which factor is the quad affected by the camera horizontal scroll. - * @param scrollFactorY By which factor is the quad effected by the camera vertical scroll. - * @param displayOriginX Horizontal origin in pixels. - * @param displayOriginY Vertical origin in pixels. - * @param frameX X coordinate of the texture frame. - * @param frameY Y coordinate of the texture frame. - * @param frameWidth Width of the texture frame. - * @param frameHeight Height of the texture frame. - * @param tintTL Tint for top left. - * @param tintTR Tint for top right. - * @param tintBL Tint for bottom left. - * @param tintBR Tint for bottom right. - * @param tintEffect The tint effect. - * @param uOffset Horizontal offset on texture coordinate. - * @param vOffset Vertical offset on texture coordinate. - * @param camera Current used camera. - * @param parentTransformMatrix Parent container. - * @param skipFlip Skip the renderTexture check. Default false. - */ - batchTexture(gameObject: Phaser.GameObjects.GameObject, texture: WebGLTexture, textureWidth: integer, textureHeight: integer, srcX: number, srcY: number, srcWidth: number, srcHeight: number, scaleX: number, scaleY: number, rotation: number, flipX: boolean, flipY: boolean, scrollFactorX: number, scrollFactorY: number, displayOriginX: number, displayOriginY: number, frameX: number, frameY: number, frameWidth: number, frameHeight: number, tintTL: integer, tintTR: integer, tintBL: integer, tintBR: integer, tintEffect: number, uOffset: number, vOffset: number, camera: Phaser.Cameras.Scene2D.Camera, parentTransformMatrix: Phaser.GameObjects.Components.TransformMatrix, skipFlip?: boolean): void; - - /** - * Adds a Texture Frame into the batch for rendering. - * @param frame The Texture Frame to be rendered. - * @param x The horizontal position to render the texture at. - * @param y The vertical position to render the texture at. - * @param tint The tint color. - * @param alpha The alpha value. - * @param transformMatrix The Transform Matrix to use for the texture. - * @param parentTransformMatrix A parent Transform Matrix. - */ - batchTextureFrame(frame: Phaser.Textures.Frame, x: number, y: number, tint: number, alpha: number, transformMatrix: Phaser.GameObjects.Components.TransformMatrix, parentTransformMatrix?: Phaser.GameObjects.Components.TransformMatrix): void; - - /** - * Pushes a filled rectangle into the vertex batch. - * Rectangle has no transform values and isn't transformed into the local space. - * Used for directly batching untransformed rectangles, such as Camera background colors. - * @param x Horizontal top left coordinate of the rectangle. - * @param y Vertical top left coordinate of the rectangle. - * @param width Width of the rectangle. - * @param height Height of the rectangle. - * @param color Color of the rectangle to draw. - * @param alpha Alpha value of the rectangle to draw. - */ - drawFillRect(x: number, y: number, width: number, height: number, color: number, alpha: number): void; - - /** - * Pushes a filled rectangle into the vertex batch. - * Rectangle factors in the given transform matrices before adding to the batch. - * @param x Horizontal top left coordinate of the rectangle. - * @param y Vertical top left coordinate of the rectangle. - * @param width Width of the rectangle. - * @param height Height of the rectangle. - * @param currentMatrix The current transform. - * @param parentMatrix The parent transform. - */ - batchFillRect(x: number, y: number, width: number, height: number, currentMatrix: Phaser.GameObjects.Components.TransformMatrix, parentMatrix: Phaser.GameObjects.Components.TransformMatrix): void; - - /** - * Pushes a filled triangle into the vertex batch. - * Triangle factors in the given transform matrices before adding to the batch. - * @param x0 Point 0 x coordinate. - * @param y0 Point 0 y coordinate. - * @param x1 Point 1 x coordinate. - * @param y1 Point 1 y coordinate. - * @param x2 Point 2 x coordinate. - * @param y2 Point 2 y coordinate. - * @param currentMatrix The current transform. - * @param parentMatrix The parent transform. - */ - batchFillTriangle(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, currentMatrix: Phaser.GameObjects.Components.TransformMatrix, parentMatrix: Phaser.GameObjects.Components.TransformMatrix): void; - - /** - * Pushes a stroked triangle into the vertex batch. - * Triangle factors in the given transform matrices before adding to the batch. - * The triangle is created from 3 lines and drawn using the `batchStrokePath` method. - * @param x0 Point 0 x coordinate. - * @param y0 Point 0 y coordinate. - * @param x1 Point 1 x coordinate. - * @param y1 Point 1 y coordinate. - * @param x2 Point 2 x coordinate. - * @param y2 Point 2 y coordinate. - * @param lineWidth The width of the line in pixels. - * @param currentMatrix The current transform. - * @param parentMatrix The parent transform. - */ - batchStrokeTriangle(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, lineWidth: number, currentMatrix: Phaser.GameObjects.Components.TransformMatrix, parentMatrix: Phaser.GameObjects.Components.TransformMatrix): void; - - /** - * Adds the given path to the vertex batch for rendering. - * - * It works by taking the array of path data and then passing it through Earcut, which - * creates a list of polygons. Each polygon is then added to the batch. - * - * The path is always automatically closed because it's filled. - * @param path Collection of points that represent the path. - * @param currentMatrix The current transform. - * @param parentMatrix The parent transform. - */ - batchFillPath(path: any[], currentMatrix: Phaser.GameObjects.Components.TransformMatrix, parentMatrix: Phaser.GameObjects.Components.TransformMatrix): void; - - /** - * Adds the given path to the vertex batch for rendering. - * - * It works by taking the array of path data and calling `batchLine` for each section - * of the path. - * - * The path is optionally closed at the end. - * @param path Collection of points that represent the path. - * @param lineWidth The width of the line segments in pixels. - * @param pathOpen Indicates if the path should be closed or left open. - * @param currentMatrix The current transform. - * @param parentMatrix The parent transform. - */ - batchStrokePath(path: any[], lineWidth: number, pathOpen: boolean, currentMatrix: Phaser.GameObjects.Components.TransformMatrix, parentMatrix: Phaser.GameObjects.Components.TransformMatrix): void; - - /** - * Creates a quad and adds it to the vertex batch based on the given line values. - * @param ax X coordinate to the start of the line - * @param ay Y coordinate to the start of the line - * @param bx X coordinate to the end of the line - * @param by Y coordinate to the end of the line - * @param aLineWidth Width of the start of the line - * @param bLineWidth Width of the end of the line - * @param currentMatrix Parent matrix, generally used by containers - */ - batchLine(ax: number, ay: number, bx: number, by: number, aLineWidth: number, bLineWidth: number, currentMatrix: Float32Array): void; - - } - - /** - * Implements a model view projection matrices. - * Pipelines can implement this for doing 2D and 3D rendering. - */ - interface ModelViewProjection { - /** - * Dirty flag for checking if model matrix needs to be updated on GPU. - */ - modelMatrixDirty: boolean; - /** - * Dirty flag for checking if view matrix needs to be updated on GPU. - */ - viewMatrixDirty: boolean; - /** - * Dirty flag for checking if projection matrix needs to be updated on GPU. - */ - projectionMatrixDirty: boolean; - /** - * Model matrix - */ - modelMatrix: Float32Array; - /** - * View matrix - */ - viewMatrix: Float32Array; - /** - * Projection matrix - */ - projectionMatrix: Float32Array; - /** - * Initializes MVP matrices with an identity matrix - */ - mvpInit(): void; - /** - * If dirty flags are set then the matrices are uploaded to the GPU. - */ - mvpUpdate(): void; - /** - * Loads an identity matrix to the model matrix - */ - modelIdentity(): void; - /** - * Scale model matrix - * @param x The x component. - * @param y The y component. - * @param z The z component. - */ - modelScale(x: number, y: number, z: number): this; - /** - * Translate model matrix - * @param x The x component. - * @param y The y component. - * @param z The z component. - */ - modelTranslate(x: number, y: number, z: number): this; - /** - * Rotates the model matrix in the X axis. - * @param radians The amount to rotate by. - */ - modelRotateX(radians: number): this; - /** - * Rotates the model matrix in the Y axis. - * @param radians The amount to rotate by. - */ - modelRotateY(radians: number): this; - /** - * Rotates the model matrix in the Z axis. - * @param radians The amount to rotate by. - */ - modelRotateZ(radians: number): this; - /** - * Loads identity matrix into the view matrix - */ - viewIdentity(): this; - /** - * Scales view matrix - * @param x The x component. - * @param y The y component. - * @param z The z component. - */ - viewScale(x: number, y: number, z: number): this; - /** - * Translates view matrix - * @param x The x component. - * @param y The y component. - * @param z The z component. - */ - viewTranslate(x: number, y: number, z: number): this; - /** - * Rotates view matrix in the X axis. - * @param radians The amount to rotate by. - */ - viewRotateX(radians: number): this; - /** - * Rotates view matrix in the Y axis. - * @param radians The amount to rotate by. - */ - viewRotateY(radians: number): this; - /** - * Rotates view matrix in the Z axis. - * @param radians The amount to rotate by. - */ - viewRotateZ(radians: number): this; - /** - * Loads a 2D view matrix (3x2 matrix) into a 4x4 view matrix - * @param matrix2D The Matrix2D. - */ - viewLoad2D(matrix2D: Float32Array): this; - /** - * Copies a 4x4 matrix into the view matrix - * @param matrix The Matrix2D. - */ - viewLoad(matrix: Float32Array): this; - /** - * Loads identity matrix into the projection matrix. - */ - projIdentity(): this; - /** - * Sets up an orthographic projection matrix - * @param left The left value. - * @param right The right value. - * @param bottom The bottom value. - * @param top The top value. - * @param near The near value. - * @param far The far value. - */ - projOrtho(left: number, right: number, bottom: number, top: number, near: number, far: number): this; - /** - * Sets up a perspective projection matrix - * @param fovY The fov value. - * @param aspectRatio The aspectRatio value. - * @param near The near value. - * @param far The far value. - */ - projPersp(fovY: number, aspectRatio: number, near: number, far: number): this; - } - - } - } } + /** + * Phaser Scale Modes. + */ + enum ScaleModes { + /** + * Default Scale Mode (Linear). + */ + DEFAULT, + /** + * Linear Scale Mode. + */ + LINEAR, + /** + * Nearest Scale Mode. + */ + NEAREST, + } + namespace Scale { + /** + * Phaser Scale Manager constants for centering the game canvas. + */ + enum Center { + /** + * The game canvas is not centered within the parent by Phaser. + * You can still center it yourself via CSS. + */ + NO_CENTER, + /** + * The game canvas is centered both horizontally and vertically within the parent. + * To do this, the parent has to have a bounds that can be calculated and not be empty. + * + * Centering is achieved by setting the margin left and top properties of the + * game canvas, and does not factor in any other CSS styles you may have applied. + */ + CENTER_BOTH, + /** + * The game canvas is centered horizontally within the parent. + * To do this, the parent has to have a bounds that can be calculated and not be empty. + * + * Centering is achieved by setting the margin left and top properties of the + * game canvas, and does not factor in any other CSS styles you may have applied. + */ + CENTER_HORIZONTALLY, + /** + * The game canvas is centered both vertically within the parent. + * To do this, the parent has to have a bounds that can be calculated and not be empty. + * + * Centering is achieved by setting the margin left and top properties of the + * game canvas, and does not factor in any other CSS styles you may have applied. + */ + CENTER_VERTICALLY, + } + + /** + * Phaser Scale Manager constants for centering the game canvas. + * + * To find out what each mode does please see [Phaser.Scale.Center]{@link Phaser.Scale.Center}. + */ + type CenterType = Phaser.Scale.Center; + + /** + * Phaser Scale Manager constants for orientation. + */ + enum Orientation { + /** + * A landscape orientation. + */ + LANDSCAPE, + /** + * A portrait orientation. + */ + PORTRAIT, + } + + /** + * Phaser Scale Manager constants for orientation. + * + * To find out what each mode does please see [Phaser.Scale.Orientation]{@link Phaser.Scale.Orientation}. + */ + type OrientationType = Phaser.Scale.Orientation; + + /** + * Phaser Scale Manager constants for the different scale modes available. + */ + enum ScaleModes { + /** + * No scaling happens at all. The canvas is set to the size given in the game config and Phaser doesn't change it + * again from that point on. If you change the canvas size, either via CSS, or directly via code, then you need + * to call the Scale Managers `resize` method to give the new dimensions, or input events will stop working. + */ + NONE, + /** + * The height is automatically adjusted based on the width. + */ + WIDTH_CONTROLS_HEIGHT, + /** + * The width is automatically adjusted based on the height. + */ + HEIGHT_CONTROLS_WIDTH, + /** + * The width and height are automatically adjusted to fit inside the given target area, + * while keeping the aspect ratio. Depending on the aspect ratio there may be some space + * inside the area which is not covered. + */ + FIT, + /** + * The width and height are automatically adjusted to make the size cover the entire target + * area while keeping the aspect ratio. This may extend further out than the target size. + */ + ENVELOP, + /** + * The Canvas is resized to fit all available _parent_ space, regardless of aspect ratio. + */ + RESIZE, + } + + /** + * Phaser Scale Manager constants for the different scale modes available. + * + * To find out what each mode does please see [Phaser.Scale.ScaleModes]{@link Phaser.Scale.ScaleModes}. + */ + type ScaleModeType = Phaser.Scale.ScaleModes; + + /** + * Phaser Scale Manager constants for zoom modes. + */ + enum Zoom { + /** + * The game canvas will not be zoomed by Phaser. + */ + NO_ZOOM, + /** + * The game canvas will be 2x zoomed by Phaser. + */ + ZOOM_2X, + /** + * The game canvas will be 4x zoomed by Phaser. + */ + ZOOM_4X, + /** + * Calculate the zoom value based on the maximum multiplied game size that will + * fit into the parent, or browser window if no parent is set. + */ + MAX_ZOOM, + } + + /** + * Phaser Scale Manager constants for zoom modes. + * + * To find out what each mode does please see [Phaser.Scale.Zoom]{@link Phaser.Scale.Zoom}. + */ + type ZoomType = Phaser.Scale.Zoom; + + namespace Events { + /** + * The Scale Manager has successfully entered fullscreen mode. + */ + const ENTER_FULLSCREEN: any; + + /** + * The Scale Manager tried to enter fullscreen mode but failed. + */ + const FULLSCREEN_FAILED: any; + + /** + * The Scale Manager tried to enter fullscreen mode, but it is unsupported by the browser. + */ + const FULLSCREEN_UNSUPPORTED: any; + + /** + * The Scale Manager was in fullscreen mode, but has since left, either directly via game code, + * or via a user gestured, such as pressing the ESC key. + */ + const LEAVE_FULLSCREEN: any; + + /** + * The Scale Manager Orientation Change Event. + */ + const ORIENTATION_CHANGE: any; + + /** + * The Scale Manager Resize Event. + * + * This event is dispatched whenever the Scale Manager detects a resize event from the browser. + * It sends three parameters to the callback, each of them being Size components. You can read + * the `width`, `height`, `aspectRatio` and other properties of these components to help with + * scaling your own game content. + */ + const RESIZE: any; + + } + /** * The Scale Manager handles the scaling, resizing and alignment of the game canvas. * @@ -74443,180 +76061,6 @@ declare namespace Phaser { } - /** - * Phaser Scale Manager constants for centering the game canvas. - */ - enum Center { - /** - * The game canvas is not centered within the parent by Phaser. - * You can still center it yourself via CSS. - */ - NO_CENTER, - /** - * The game canvas is centered both horizontally and vertically within the parent. - * To do this, the parent has to have a bounds that can be calculated and not be empty. - * - * Centering is achieved by setting the margin left and top properties of the - * game canvas, and does not factor in any other CSS styles you may have applied. - */ - CENTER_BOTH, - /** - * The game canvas is centered horizontally within the parent. - * To do this, the parent has to have a bounds that can be calculated and not be empty. - * - * Centering is achieved by setting the margin left and top properties of the - * game canvas, and does not factor in any other CSS styles you may have applied. - */ - CENTER_HORIZONTALLY, - /** - * The game canvas is centered both vertically within the parent. - * To do this, the parent has to have a bounds that can be calculated and not be empty. - * - * Centering is achieved by setting the margin left and top properties of the - * game canvas, and does not factor in any other CSS styles you may have applied. - */ - CENTER_VERTICALLY, - } - - /** - * Phaser Scale Manager constants for centering the game canvas. - * - * To find out what each mode does please see [Phaser.Scale.Center]{@link Phaser.Scale.Center}. - */ - type CenterType = Phaser.Scale.Center; - - /** - * Phaser Scale Manager constants for orientation. - */ - enum Orientation { - /** - * A landscape orientation. - */ - LANDSCAPE, - /** - * A portrait orientation. - */ - PORTRAIT, - } - - /** - * Phaser Scale Manager constants for orientation. - * - * To find out what each mode does please see [Phaser.Scale.Orientation]{@link Phaser.Scale.Orientation}. - */ - type OrientationType = Phaser.Scale.Orientation; - - /** - * Phaser Scale Manager constants for the different scale modes available. - */ - enum ScaleModes { - /** - * No scaling happens at all. The canvas is set to the size given in the game config and Phaser doesn't change it - * again from that point on. If you change the canvas size, either via CSS, or directly via code, then you need - * to call the Scale Managers `resize` method to give the new dimensions, or input events will stop working. - */ - NONE, - /** - * The height is automatically adjusted based on the width. - */ - WIDTH_CONTROLS_HEIGHT, - /** - * The width is automatically adjusted based on the height. - */ - HEIGHT_CONTROLS_WIDTH, - /** - * The width and height are automatically adjusted to fit inside the given target area, - * while keeping the aspect ratio. Depending on the aspect ratio there may be some space - * inside the area which is not covered. - */ - FIT, - /** - * The width and height are automatically adjusted to make the size cover the entire target - * area while keeping the aspect ratio. This may extend further out than the target size. - */ - ENVELOP, - /** - * The Canvas is resized to fit all available _parent_ space, regardless of aspect ratio. - */ - RESIZE, - } - - /** - * Phaser Scale Manager constants for the different scale modes available. - * - * To find out what each mode does please see [Phaser.Scale.ScaleModes]{@link Phaser.Scale.ScaleModes}. - */ - type ScaleModeType = Phaser.Scale.ScaleModes; - - /** - * Phaser Scale Manager constants for zoom modes. - */ - enum Zoom { - /** - * The game canvas will not be zoomed by Phaser. - */ - NO_ZOOM, - /** - * The game canvas will be 2x zoomed by Phaser. - */ - ZOOM_2X, - /** - * The game canvas will be 4x zoomed by Phaser. - */ - ZOOM_4X, - /** - * Calculate the zoom value based on the maximum multiplied game size that will - * fit into the parent, or browser window if no parent is set. - */ - MAX_ZOOM, - } - - /** - * Phaser Scale Manager constants for zoom modes. - * - * To find out what each mode does please see [Phaser.Scale.Zoom]{@link Phaser.Scale.Zoom}. - */ - type ZoomType = Phaser.Scale.Zoom; - - namespace Events { - /** - * The Scale Manager has successfully entered fullscreen mode. - */ - const ENTER_FULLSCREEN: any; - - /** - * The Scale Manager tried to enter fullscreen mode but failed. - */ - const FULLSCREEN_FAILED: any; - - /** - * The Scale Manager tried to enter fullscreen mode, but it is unsupported by the browser. - */ - const FULLSCREEN_UNSUPPORTED: any; - - /** - * The Scale Manager was in fullscreen mode, but has since left, either directly via game code, - * or via a user gestured, such as pressing the ESC key. - */ - const LEAVE_FULLSCREEN: any; - - /** - * The Scale Manager Orientation Change Event. - */ - const ORIENTATION_CHANGE: any; - - /** - * The Scale Manager Resize Event. - * - * This event is dispatched whenever the Scale Manager detects a resize event from the browser. - * It sends three parameters to the callback, each of them being Size components. You can read - * the `width`, `height`, `aspectRatio` and other properties of these components to help with - * scaling your own game content. - */ - const RESIZE: any; - - } - /** * The game canvas is not centered within the parent by Phaser. * You can still center it yourself via CSS. @@ -74718,180 +76162,341 @@ declare namespace Phaser { } - /** - * A base Phaser.Scene class which can be extended for your own use. - * - * You can also define the optional methods {@link Phaser.Types.Scenes.SceneInitCallback init()}, {@link Phaser.Types.Scenes.ScenePreloadCallback preload()}, and {@link Phaser.Types.Scenes.SceneCreateCallback create()}. - */ - class Scene { - /** - * - * @param config Scene specific configuration settings. - */ - constructor(config: string | Phaser.Types.Scenes.SettingsConfig); - - /** - * The Scene Systems. You must never overwrite this property, or all hell will break lose. - */ - sys: Phaser.Scenes.Systems; - - /** - * A reference to the Phaser.Game instance. - * This property will only be available if defined in the Scene Injection Map. - */ - game: Phaser.Game; - - /** - * A reference to the global Animation Manager. - * This property will only be available if defined in the Scene Injection Map. - */ - anims: Phaser.Animations.AnimationManager; - - /** - * A reference to the global Cache. - * This property will only be available if defined in the Scene Injection Map. - */ - cache: Phaser.Cache.CacheManager; - - /** - * A reference to the game level Data Manager. - * This property will only be available if defined in the Scene Injection Map. - */ - registry: Phaser.Data.DataManager; - - /** - * A reference to the Sound Manager. - * This property will only be available if defined in the Scene Injection Map and the plugin is installed. - */ - sound: Phaser.Sound.BaseSoundManager; - - /** - * A reference to the Texture Manager. - * This property will only be available if defined in the Scene Injection Map. - */ - textures: Phaser.Textures.TextureManager; - - /** - * A scene level Event Emitter. - * This property will only be available if defined in the Scene Injection Map. - */ - events: Phaser.Events.EventEmitter; - - /** - * A scene level Camera System. - * This property will only be available if defined in the Scene Injection Map. - */ - cameras: Phaser.Cameras.Scene2D.CameraManager; - - /** - * A scene level Game Object Factory. - * This property will only be available if defined in the Scene Injection Map. - */ - add: Phaser.GameObjects.GameObjectFactory; - - /** - * A scene level Game Object Creator. - * This property will only be available if defined in the Scene Injection Map. - */ - make: Phaser.GameObjects.GameObjectCreator; - - /** - * A reference to the Scene Manager Plugin. - * This property will only be available if defined in the Scene Injection Map. - */ - scene: Phaser.Scenes.ScenePlugin; - - /** - * A scene level Game Object Display List. - * This property will only be available if defined in the Scene Injection Map. - */ - children: Phaser.GameObjects.DisplayList; - - /** - * A scene level Lights Manager Plugin. - * This property will only be available if defined in the Scene Injection Map and the plugin is installed. - */ - lights: Phaser.GameObjects.LightsManager; - - /** - * A scene level Data Manager Plugin. - * This property will only be available if defined in the Scene Injection Map and the plugin is installed. - */ - data: Phaser.Data.DataManager; - - /** - * A scene level Input Manager Plugin. - * This property will only be available if defined in the Scene Injection Map and the plugin is installed. - */ - input: Phaser.Input.InputPlugin; - - /** - * A scene level Loader Plugin. - * This property will only be available if defined in the Scene Injection Map and the plugin is installed. - */ - load: Phaser.Loader.LoaderPlugin; - - /** - * A scene level Time and Clock Plugin. - * This property will only be available if defined in the Scene Injection Map and the plugin is installed. - */ - time: Phaser.Time.Clock; - - /** - * A scene level Tween Manager Plugin. - * This property will only be available if defined in the Scene Injection Map and the plugin is installed. - */ - tweens: Phaser.Tweens.TweenManager; - - /** - * A scene level Arcade Physics Plugin. - * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured. - */ - physics: Phaser.Physics.Arcade.ArcadePhysics; - - /** - * A scene level Impact Physics Plugin. - * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured. - */ - impact: Phaser.Physics.Impact.ImpactPhysics; - - /** - * A scene level Matter Physics Plugin. - * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured. - */ - matter: Phaser.Physics.Matter.MatterPhysics; - - /** - * A scene level Facebook Instant Games Plugin. - * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured. - */ - facebook: Phaser.FacebookInstantGamesPlugin; - - /** - * A reference to the global Scale Manager. - * This property will only be available if defined in the Scene Injection Map. - */ - scale: Phaser.Scale.ScaleManager; - - /** - * A reference to the Plugin Manager. - * - * The Plugin Manager is a global system that allows plugins to register themselves with it, and can then install - * those plugins into Scenes as required. - */ - plugins: Phaser.Plugins.PluginManager; - - /** - * Should be overridden by your own Scenes. - * This method is called once per game step while the scene is running. - * @param time The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. - * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. - */ - update(time: number, delta: number): void; - - } - namespace Scenes { + /** + * Scene state. + */ + var PENDING: integer; + + /** + * Scene state. + */ + var INIT: integer; + + /** + * Scene state. + */ + var START: integer; + + /** + * Scene state. + */ + var LOADING: integer; + + /** + * Scene state. + */ + var CREATING: integer; + + /** + * Scene state. + */ + var RUNNING: integer; + + /** + * Scene state. + */ + var PAUSED: integer; + + /** + * Scene state. + */ + var SLEEPING: integer; + + /** + * Scene state. + */ + var SHUTDOWN: integer; + + /** + * Scene state. + */ + var DESTROYED: integer; + + namespace Events { + /** + * The Scene Systems Boot Event. + * + * This event is dispatched by a Scene during the Scene Systems boot process. Primarily used by Scene Plugins. + * + * Listen to it from a Scene using `this.scene.events.on('boot', listener)`. + */ + const BOOT: any; + + /** + * The Scene Create Event. + * + * This event is dispatched by a Scene after it has been created by the Scene Manager. + * + * If a Scene has a `create` method then this event is emitted _after_ that has run. + * + * If there is a transition, this event will be fired after the `TRANSITION_START` event. + * + * Listen to it from a Scene using `this.scene.events.on('create', listener)`. + */ + const CREATE: any; + + /** + * The Scene Systems Destroy Event. + * + * This event is dispatched by a Scene during the Scene Systems destroy process. + * + * Listen to it from a Scene using `this.scene.events.on('destroy', listener)`. + * + * You should destroy any resources that may be in use by your Scene in this event handler. + */ + const DESTROY: any; + + /** + * The Scene Systems Pause Event. + * + * This event is dispatched by a Scene when it is paused, either directly via the `pause` method, or as an + * action from another Scene. + * + * Listen to it from a Scene using `this.scene.events.on('pause', listener)`. + */ + const PAUSE: any; + + /** + * The Scene Systems Post Update Event. + * + * This event is dispatched by a Scene during the main game loop step. + * + * The event flow for a single step of a Scene is as follows: + * + * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE} + * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE} + * 3. The `Scene.update` method is called, if it exists + * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE} + * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to it from a Scene using `this.scene.events.on('postupdate', listener)`. + * + * A Scene will only run its step if it is active. + */ + const POST_UPDATE: any; + + /** + * The Scene Systems Pre Update Event. + * + * This event is dispatched by a Scene during the main game loop step. + * + * The event flow for a single step of a Scene is as follows: + * + * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE} + * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE} + * 3. The `Scene.update` method is called, if it exists + * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE} + * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to it from a Scene using `this.scene.events.on('preupdate', listener)`. + * + * A Scene will only run its step if it is active. + */ + const PRE_UPDATE: any; + + /** + * The Scene Systems Ready Event. + * + * This event is dispatched by a Scene during the Scene Systems start process. + * By this point in the process the Scene is now fully active and rendering. + * This event is meant for your game code to use, as all plugins have responded to the earlier 'start' event. + * + * Listen to it from a Scene using `this.scene.events.on('ready', listener)`. + */ + const READY: any; + + /** + * The Scene Systems Render Event. + * + * This event is dispatched by a Scene during the main game loop step. + * + * The event flow for a single step of a Scene is as follows: + * + * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE} + * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE} + * 3. The `Scene.update` method is called, if it exists + * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE} + * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to it from a Scene using `this.scene.events.on('render', listener)`. + * + * A Scene will only render if it is visible and active. + * By the time this event is dispatched, the Scene will have already been rendered. + */ + const RENDER: any; + + /** + * The Scene Systems Resume Event. + * + * This event is dispatched by a Scene when it is resumed from a paused state, either directly via the `resume` method, + * or as an action from another Scene. + * + * Listen to it from a Scene using `this.scene.events.on('resume', listener)`. + */ + const RESUME: any; + + /** + * The Scene Systems Shutdown Event. + * + * This event is dispatched by a Scene during the Scene Systems shutdown process. + * + * Listen to it from a Scene using `this.scene.events.on('shutdown', listener)`. + * + * You should free-up any resources that may be in use by your Scene in this event handler, on the understanding + * that the Scene may, at any time, become active again. A shutdown Scene is not 'destroyed', it's simply not + * currently active. Use the [DESTROY]{@linkcode Phaser.Scenes.Events#event:DESTROY} event to completely clear resources. + */ + const SHUTDOWN: any; + + /** + * The Scene Systems Sleep Event. + * + * This event is dispatched by a Scene when it is sent to sleep, either directly via the `sleep` method, + * or as an action from another Scene. + * + * Listen to it from a Scene using `this.scene.events.on('sleep', listener)`. + */ + const SLEEP: any; + + /** + * The Scene Systems Start Event. + * + * This event is dispatched by a Scene during the Scene Systems start process. Primarily used by Scene Plugins. + * + * Listen to it from a Scene using `this.scene.events.on('start', listener)`. + */ + const START: any; + + /** + * The Scene Transition Complete Event. + * + * This event is dispatched by the Target Scene of a transition. + * + * It happens when the transition process has completed. This occurs when the duration timer equals or exceeds the duration + * of the transition. + * + * Listen to it from a Scene using `this.scene.events.on('transitioncomplete', listener)`. + * + * The Scene Transition event flow is as follows: + * + * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event. + * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method. + * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ... + * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to. + * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes. + */ + const TRANSITION_COMPLETE: any; + + /** + * The Scene Transition Init Event. + * + * This event is dispatched by the Target Scene of a transition. + * + * It happens immediately after the `Scene.init` method is called. If the Scene does not have an `init` method, + * this event is not dispatched. + * + * Listen to it from a Scene using `this.scene.events.on('transitioninit', listener)`. + * + * The Scene Transition event flow is as follows: + * + * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event. + * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method. + * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ... + * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to. + * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes. + */ + const TRANSITION_INIT: any; + + /** + * The Scene Transition Out Event. + * + * This event is dispatched by a Scene when it initiates a transition to another Scene. + * + * Listen to it from a Scene using `this.scene.events.on('transitionout', listener)`. + * + * The Scene Transition event flow is as follows: + * + * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event. + * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method. + * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ... + * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to. + * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes. + */ + const TRANSITION_OUT: any; + + /** + * The Scene Transition Start Event. + * + * This event is dispatched by the Target Scene of a transition, only if that Scene was not asleep. + * + * It happens immediately after the `Scene.create` method is called. If the Scene does not have a `create` method, + * this event is dispatched anyway. + * + * If the Target Scene was sleeping then the [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} event is + * dispatched instead of this event. + * + * Listen to it from a Scene using `this.scene.events.on('transitionstart', listener)`. + * + * The Scene Transition event flow is as follows: + * + * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event. + * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method. + * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ... + * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to. + * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes. + */ + const TRANSITION_START: any; + + /** + * The Scene Transition Wake Event. + * + * This event is dispatched by the Target Scene of a transition, only if that Scene was asleep before + * the transition began. If the Scene was not asleep the [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} event is dispatched instead. + * + * Listen to it from a Scene using `this.scene.events.on('transitionwake', listener)`. + * + * The Scene Transition event flow is as follows: + * + * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event. + * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method. + * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ... + * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to. + * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes. + */ + const TRANSITION_WAKE: any; + + /** + * The Scene Systems Update Event. + * + * This event is dispatched by a Scene during the main game loop step. + * + * The event flow for a single step of a Scene is as follows: + * + * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE} + * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE} + * 3. The `Scene.update` method is called, if it exists + * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE} + * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to it from a Scene using `this.scene.events.on('update', listener)`. + * + * A Scene will only run its step if it is active. + */ + const UPDATE: any; + + /** + * The Scene Systems Wake Event. + * + * This event is dispatched by a Scene when it is woken from sleep, either directly via the `wake` method, + * or as an action from another Scene. + * + * Listen to it from a Scene using `this.scene.events.on('wake', listener)`. + */ + const WAKE: any; + + } + /** * Builds an array of which physics plugins should be activated for the given Scene. * @param sys The scene system to get the physics systems of. @@ -75221,6 +76826,8 @@ declare namespace Phaser { /** * Shutdown this Scene and run the given one. + * + * This will happen at the next Scene Manager update, not immediately. * @param key The Scene to start. * @param data The Scene data. */ @@ -75228,6 +76835,8 @@ declare namespace Phaser { /** * Restarts this Scene. + * + * This will happen at the next Scene Manager update, not immediately. * @param data The Scene data. */ restart(data?: object): Phaser.Scenes.ScenePlugin; @@ -75276,6 +76885,8 @@ declare namespace Phaser { /** * Launch the given Scene and run it in parallel with this one. + * + * This will happen at the next Scene Manager update, not immediately. * @param key The Scene to launch. * @param data The Scene data. */ @@ -75284,6 +76895,8 @@ declare namespace Phaser { /** * Runs the given Scene, but does not change the state of this Scene. * + * This will happen at the next Scene Manager update, not immediately. + * * If the given Scene is paused, it will resume it. If sleeping, it will wake it. * If not running at all, it will be started. * @@ -75296,6 +76909,8 @@ declare namespace Phaser { /** * Pause the Scene - this stops the update step from happening but it still renders. + * + * This will happen at the next Scene Manager update, not immediately. * @param key The Scene to pause. * @param data An optional data object that will be passed to the Scene and emitted in its pause event. */ @@ -75303,6 +76918,8 @@ declare namespace Phaser { /** * Resume the Scene - starts the update loop again. + * + * This will happen at the next Scene Manager update, not immediately. * @param key The Scene to resume. * @param data An optional data object that will be passed to the Scene and emitted in its resume event. */ @@ -75310,6 +76927,8 @@ declare namespace Phaser { /** * Makes the Scene sleep (no update, no render) but doesn't shutdown. + * + * This will happen at the next Scene Manager update, not immediately. * @param key The Scene to put to sleep. * @param data An optional data object that will be passed to the Scene and emitted in its sleep event. */ @@ -75317,6 +76936,8 @@ declare namespace Phaser { /** * Makes the Scene wake-up (starts update and render) + * + * This will happen at the next Scene Manager update, not immediately. * @param key The Scene to wake up. * @param data An optional data object that will be passed to the Scene and emitted in its wake event. */ @@ -75325,16 +76946,15 @@ declare namespace Phaser { /** * Makes this Scene sleep then starts the Scene given. * - * No checks are made to see if an instance of the given Scene is already running. - * Because Scenes in Phaser are non-exclusive, you are allowed to run multiple - * instances of them _at the same time_. This means, calling this function - * may launch another instance of the requested Scene if it's already running. + * This will happen at the next Scene Manager update, not immediately. * @param key The Scene to start. */ switch(key: string): Phaser.Scenes.ScenePlugin; /** * Shutdown the Scene, clearing display list, timers, etc. + * + * This happens at the next Scene Manager update, not immediately. * @param key The Scene to stop. * @param data Optional data object to pass to Scene.Systems.shutdown. */ @@ -75412,7 +77032,7 @@ declare namespace Phaser { * The Scene is removed from the local scenes array, it's key is cleared from the keys * cache and Scene.Systems.destroy is then called on it. * - * If the SceneManager is processing the Scenes when this method is called it wil + * If the SceneManager is processing the Scenes when this method is called it will * queue the operation for the next update sequence. * @param key The Scene to be removed. */ @@ -75777,339 +77397,178 @@ declare namespace Phaser { } + } + + /** + * A base Phaser.Scene class which can be extended for your own use. + * + * You can also define the optional methods {@link Phaser.Types.Scenes.SceneInitCallback init()}, {@link Phaser.Types.Scenes.ScenePreloadCallback preload()}, and {@link Phaser.Types.Scenes.SceneCreateCallback create()}. + */ + class Scene { /** - * Scene state. + * + * @param config Scene specific configuration settings. */ - var PENDING: integer; + constructor(config: string | Phaser.Types.Scenes.SettingsConfig); /** - * Scene state. + * The Scene Systems. You must never overwrite this property, or all hell will break lose. */ - var INIT: integer; + sys: Phaser.Scenes.Systems; /** - * Scene state. + * A reference to the Phaser.Game instance. + * This property will only be available if defined in the Scene Injection Map. */ - var START: integer; + game: Phaser.Game; /** - * Scene state. + * A reference to the global Animation Manager. + * This property will only be available if defined in the Scene Injection Map. */ - var LOADING: integer; + anims: Phaser.Animations.AnimationManager; /** - * Scene state. + * A reference to the global Cache. + * This property will only be available if defined in the Scene Injection Map. */ - var CREATING: integer; + cache: Phaser.Cache.CacheManager; /** - * Scene state. + * A reference to the game level Data Manager. + * This property will only be available if defined in the Scene Injection Map. */ - var RUNNING: integer; + registry: Phaser.Data.DataManager; /** - * Scene state. + * A reference to the Sound Manager. + * This property will only be available if defined in the Scene Injection Map and the plugin is installed. */ - var PAUSED: integer; + sound: Phaser.Sound.BaseSoundManager; /** - * Scene state. + * A reference to the Texture Manager. + * This property will only be available if defined in the Scene Injection Map. */ - var SLEEPING: integer; + textures: Phaser.Textures.TextureManager; /** - * Scene state. + * A scene level Event Emitter. + * This property will only be available if defined in the Scene Injection Map. */ - var SHUTDOWN: integer; + events: Phaser.Events.EventEmitter; /** - * Scene state. + * A scene level Camera System. + * This property will only be available if defined in the Scene Injection Map. */ - var DESTROYED: integer; + cameras: Phaser.Cameras.Scene2D.CameraManager; - namespace Events { - /** - * The Scene Systems Boot Event. - * - * This event is dispatched by a Scene during the Scene Systems boot process. Primarily used by Scene Plugins. - * - * Listen to it from a Scene using `this.scene.events.on('boot', listener)`. - */ - const BOOT: any; + /** + * A scene level Game Object Factory. + * This property will only be available if defined in the Scene Injection Map. + */ + add: Phaser.GameObjects.GameObjectFactory; - /** - * The Scene Create Event. - * - * This event is dispatched by a Scene after it has been created by the Scene Manager. - * - * If a Scene has a `create` method then this event is emitted _after_ that has run. - * - * If there is a transition, this event will be fired after the `TRANSITION_START` event. - * - * Listen to it from a Scene using `this.scene.events.on('create', listener)`. - */ - const CREATE: any; + /** + * A scene level Game Object Creator. + * This property will only be available if defined in the Scene Injection Map. + */ + make: Phaser.GameObjects.GameObjectCreator; - /** - * The Scene Systems Destroy Event. - * - * This event is dispatched by a Scene during the Scene Systems destroy process. - * - * Listen to it from a Scene using `this.scene.events.on('destroy', listener)`. - * - * You should destroy any resources that may be in use by your Scene in this event handler. - */ - const DESTROY: any; + /** + * A reference to the Scene Manager Plugin. + * This property will only be available if defined in the Scene Injection Map. + */ + scene: Phaser.Scenes.ScenePlugin; - /** - * The Scene Systems Pause Event. - * - * This event is dispatched by a Scene when it is paused, either directly via the `pause` method, or as an - * action from another Scene. - * - * Listen to it from a Scene using `this.scene.events.on('pause', listener)`. - */ - const PAUSE: any; + /** + * A scene level Game Object Display List. + * This property will only be available if defined in the Scene Injection Map. + */ + children: Phaser.GameObjects.DisplayList; - /** - * The Scene Systems Post Update Event. - * - * This event is dispatched by a Scene during the main game loop step. - * - * The event flow for a single step of a Scene is as follows: - * - * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE} - * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE} - * 3. The `Scene.update` method is called, if it exists - * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE} - * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} - * - * Listen to it from a Scene using `this.scene.events.on('postupdate', listener)`. - * - * A Scene will only run its step if it is active. - */ - const POST_UPDATE: any; + /** + * A scene level Lights Manager Plugin. + * This property will only be available if defined in the Scene Injection Map and the plugin is installed. + */ + lights: Phaser.GameObjects.LightsManager; - /** - * The Scene Systems Pre Update Event. - * - * This event is dispatched by a Scene during the main game loop step. - * - * The event flow for a single step of a Scene is as follows: - * - * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE} - * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE} - * 3. The `Scene.update` method is called, if it exists - * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE} - * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} - * - * Listen to it from a Scene using `this.scene.events.on('preupdate', listener)`. - * - * A Scene will only run its step if it is active. - */ - const PRE_UPDATE: any; + /** + * A scene level Data Manager Plugin. + * This property will only be available if defined in the Scene Injection Map and the plugin is installed. + */ + data: Phaser.Data.DataManager; - /** - * The Scene Systems Ready Event. - * - * This event is dispatched by a Scene during the Scene Systems start process. - * By this point in the process the Scene is now fully active and rendering. - * This event is meant for your game code to use, as all plugins have responded to the earlier 'start' event. - * - * Listen to it from a Scene using `this.scene.events.on('ready', listener)`. - */ - const READY: any; + /** + * A scene level Input Manager Plugin. + * This property will only be available if defined in the Scene Injection Map and the plugin is installed. + */ + input: Phaser.Input.InputPlugin; - /** - * The Scene Systems Render Event. - * - * This event is dispatched by a Scene during the main game loop step. - * - * The event flow for a single step of a Scene is as follows: - * - * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE} - * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE} - * 3. The `Scene.update` method is called, if it exists - * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE} - * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} - * - * Listen to it from a Scene using `this.scene.events.on('render', listener)`. - * - * A Scene will only render if it is visible and active. - * By the time this event is dispatched, the Scene will have already been rendered. - */ - const RENDER: any; + /** + * A scene level Loader Plugin. + * This property will only be available if defined in the Scene Injection Map and the plugin is installed. + */ + load: Phaser.Loader.LoaderPlugin; - /** - * The Scene Systems Resume Event. - * - * This event is dispatched by a Scene when it is resumed from a paused state, either directly via the `resume` method, - * or as an action from another Scene. - * - * Listen to it from a Scene using `this.scene.events.on('resume', listener)`. - */ - const RESUME: any; + /** + * A scene level Time and Clock Plugin. + * This property will only be available if defined in the Scene Injection Map and the plugin is installed. + */ + time: Phaser.Time.Clock; - /** - * The Scene Systems Shutdown Event. - * - * This event is dispatched by a Scene during the Scene Systems shutdown process. - * - * Listen to it from a Scene using `this.scene.events.on('shutdown', listener)`. - * - * You should free-up any resources that may be in use by your Scene in this event handler, on the understanding - * that the Scene may, at any time, become active again. A shutdown Scene is not 'destroyed', it's simply not - * currently active. Use the [DESTROY]{@linkcode Phaser.Scenes.Events#event:DESTROY} event to completely clear resources. - */ - const SHUTDOWN: any; + /** + * A scene level Tween Manager Plugin. + * This property will only be available if defined in the Scene Injection Map and the plugin is installed. + */ + tweens: Phaser.Tweens.TweenManager; - /** - * The Scene Systems Sleep Event. - * - * This event is dispatched by a Scene when it is sent to sleep, either directly via the `sleep` method, - * or as an action from another Scene. - * - * Listen to it from a Scene using `this.scene.events.on('sleep', listener)`. - */ - const SLEEP: any; + /** + * A scene level Arcade Physics Plugin. + * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured. + */ + physics: Phaser.Physics.Arcade.ArcadePhysics; - /** - * The Scene Systems Start Event. - * - * This event is dispatched by a Scene during the Scene Systems start process. Primarily used by Scene Plugins. - * - * Listen to it from a Scene using `this.scene.events.on('start', listener)`. - */ - const START: any; + /** + * A scene level Impact Physics Plugin. + * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured. + */ + impact: Phaser.Physics.Impact.ImpactPhysics; - /** - * The Scene Transition Complete Event. - * - * This event is dispatched by the Target Scene of a transition. - * - * It happens when the transition process has completed. This occurs when the duration timer equals or exceeds the duration - * of the transition. - * - * Listen to it from a Scene using `this.scene.events.on('transitioncomplete', listener)`. - * - * The Scene Transition event flow is as follows: - * - * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event. - * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method. - * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ... - * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to. - * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes. - */ - const TRANSITION_COMPLETE: any; + /** + * A scene level Matter Physics Plugin. + * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured. + */ + matter: Phaser.Physics.Matter.MatterPhysics; - /** - * The Scene Transition Init Event. - * - * This event is dispatched by the Target Scene of a transition. - * - * It happens immediately after the `Scene.init` method is called. If the Scene does not have an `init` method, - * this event is not dispatched. - * - * Listen to it from a Scene using `this.scene.events.on('transitioninit', listener)`. - * - * The Scene Transition event flow is as follows: - * - * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event. - * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method. - * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ... - * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to. - * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes. - */ - const TRANSITION_INIT: any; + /** + * A scene level Facebook Instant Games Plugin. + * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured. + */ + facebook: Phaser.FacebookInstantGamesPlugin; - /** - * The Scene Transition Out Event. - * - * This event is dispatched by a Scene when it initiates a transition to another Scene. - * - * Listen to it from a Scene using `this.scene.events.on('transitionout', listener)`. - * - * The Scene Transition event flow is as follows: - * - * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event. - * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method. - * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ... - * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to. - * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes. - */ - const TRANSITION_OUT: any; + /** + * A reference to the global Scale Manager. + * This property will only be available if defined in the Scene Injection Map. + */ + scale: Phaser.Scale.ScaleManager; - /** - * The Scene Transition Start Event. - * - * This event is dispatched by the Target Scene of a transition, only if that Scene was not asleep. - * - * It happens immediately after the `Scene.create` method is called. If the Scene does not have a `create` method, - * this event is dispatched anyway. - * - * If the Target Scene was sleeping then the [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} event is - * dispatched instead of this event. - * - * Listen to it from a Scene using `this.scene.events.on('transitionstart', listener)`. - * - * The Scene Transition event flow is as follows: - * - * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event. - * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method. - * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ... - * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to. - * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes. - */ - const TRANSITION_START: any; + /** + * A reference to the Plugin Manager. + * + * The Plugin Manager is a global system that allows plugins to register themselves with it, and can then install + * those plugins into Scenes as required. + */ + plugins: Phaser.Plugins.PluginManager; - /** - * The Scene Transition Wake Event. - * - * This event is dispatched by the Target Scene of a transition, only if that Scene was asleep before - * the transition began. If the Scene was not asleep the [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} event is dispatched instead. - * - * Listen to it from a Scene using `this.scene.events.on('transitionwake', listener)`. - * - * The Scene Transition event flow is as follows: - * - * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event. - * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method. - * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ... - * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to. - * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes. - */ - const TRANSITION_WAKE: any; - - /** - * The Scene Systems Update Event. - * - * This event is dispatched by a Scene during the main game loop step. - * - * The event flow for a single step of a Scene is as follows: - * - * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE} - * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE} - * 3. The `Scene.update` method is called, if it exists - * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE} - * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} - * - * Listen to it from a Scene using `this.scene.events.on('update', listener)`. - * - * A Scene will only run its step if it is active. - */ - const UPDATE: any; - - /** - * The Scene Systems Wake Event. - * - * This event is dispatched by a Scene when it is woken from sleep, either directly via the `wake` method, - * or as an action from another Scene. - * - * Listen to it from a Scene using `this.scene.events.on('wake', listener)`. - */ - const WAKE: any; - - } + /** + * Should be overridden by your own Scenes. + * This method is called once per game step while the scene is running. + * @param time The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. + * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. + */ + update(time: number, delta: number): void; } @@ -76307,8 +77766,9 @@ declare namespace Phaser { addAudioSprite(key: string, config?: Phaser.Types.Sound.SoundConfig): Phaser.Sound.HTML5AudioSound | Phaser.Sound.WebAudioSound; /** - * Enables playing sound on the fly without the need to keep a reference to it. - * Sound will auto destroy once its playback ends. + * Adds a new sound to the sound manager and plays it. + * The sound will be automatically removed (destroyed) once playback ends. + * This lets you play a new sound on the fly without the need to keep a reference to it. * @param key Asset key for the sound. * @param extra An optional additional object containing settings to be applied to the sound. It could be either config or marker object. */ @@ -76416,14 +77876,6 @@ declare namespace Phaser { } - /** - * Creates a Web Audio, HTML5 Audio or No Audio Sound Manager based on config and device settings. - * - * Be aware of https://developers.google.com/web/updates/2017/09/autoplay-policy-changes - * @param game Reference to the current game instance. - */ - function SoundManagerCreator(game: Phaser.Game): void; - namespace Events { /** * The Sound Complete Event. @@ -77021,6 +78473,14 @@ declare namespace Phaser { } + /** + * Creates a Web Audio, HTML5 Audio or No Audio Sound Manager based on config and device settings. + * + * Be aware of https://developers.google.com/web/updates/2017/09/autoplay-policy-changes + * @param game Reference to the current game instance. + */ + function SoundManagerCreator(game: Phaser.Game): void; + /** * Web Audio API implementation of the sound. */ @@ -77251,6 +78711,31 @@ declare namespace Phaser { } namespace Structs { + namespace Events { + /** + * The Process Queue Add Event. + * + * This event is dispatched by a Process Queue when a new item is successfully moved to its active list. + * + * You will most commonly see this used by a Scene's Update List when a new Game Object has been added. + * + * In that instance, listen to this event from within a Scene using: `this.sys.updateList.on('add', listener)`. + */ + const PROCESS_QUEUE_ADD: any; + + /** + * The Process Queue Remove Event. + * + * This event is dispatched by a Process Queue when a new item is successfully removed from its active list. + * + * You will most commonly see this used by a Scene's Update List when a Game Object has been removed. + * + * In that instance, listen to this event from within a Scene using: `this.sys.updateList.on('remove', listener)`. + */ + const PROCESS_QUEUE_REMOVE: any; + + } + /** * List is a generic implementation of an ordered list which contains utility methods for retrieving, manipulating, and iterating items. */ @@ -78141,31 +79626,6 @@ declare namespace Phaser { } - namespace Events { - /** - * The Process Queue Add Event. - * - * This event is dispatched by a Process Queue when a new item is successfully moved to its active list. - * - * You will most commonly see this used by a Scene's Update List when a new Game Object has been added. - * - * In that instance, listen to this event from within a Scene using: `this.sys.updateList.on('add', listener)`. - */ - const PROCESS_QUEUE_ADD: any; - - /** - * The Process Queue Remove Event. - * - * This event is dispatched by a Process Queue when a new item is successfully removed from its active list. - * - * You will most commonly see this used by a Scene's Update List when a Game Object has been removed. - * - * In that instance, listen to this event from within a Scene using: `this.sys.updateList.on('remove', listener)`. - */ - const PROCESS_QUEUE_REMOVE: any; - - } - } namespace Textures { @@ -78385,6 +79845,75 @@ declare namespace Phaser { } + /** + * Filter Types. + */ + enum FilterMode { + /** + * Linear filter type. + */ + LINEAR, + /** + * Nearest neighbor filter type. + */ + NEAREST, + } + + namespace Events { + /** + * The Texture Add Event. + * + * This event is dispatched by the Texture Manager when a texture is added to it. + * + * Listen to this event from within a Scene using: `this.textures.on('addtexture', listener)`. + */ + const ADD: any; + + /** + * The Texture Load Error Event. + * + * This event is dispatched by the Texture Manager when a texture it requested to load failed. + * This only happens when base64 encoded textures fail. All other texture types are loaded via the Loader Plugin. + * + * Listen to this event from within a Scene using: `this.textures.on('onerror', listener)`. + */ + const ERROR: any; + + /** + * The Texture Load Event. + * + * This event is dispatched by the Texture Manager when a texture has finished loading on it. + * This only happens for base64 encoded textures. All other texture types are loaded via the Loader Plugin. + * + * Listen to this event from within a Scene using: `this.textures.on('onload', listener)`. + * + * This event is dispatched after the [ADD]{@linkcode Phaser.Textures.Events#event:ADD} event. + */ + const LOAD: any; + + /** + * This internal event signifies that the Texture Manager is now ready and the Game can continue booting. + * + * When a Phaser Game instance is booting for the first time, the Texture Manager has to wait on a couple of non-blocking + * async events before it's fully ready to carry on. When those complete the Texture Manager emits this event via the Game + * instance, which tells the Game to carry on booting. + */ + const READY: any; + + /** + * The Texture Remove Event. + * + * This event is dispatched by the Texture Manager when a texture is removed from it. + * + * Listen to this event from within a Scene using: `this.textures.on('removetexture', listener)`. + * + * If you have any Game Objects still using the removed texture, they will start throwing + * errors the next time they try to render. Be sure to clear all use of the texture in this event handler. + */ + const REMOVE: any; + + } + /** * A Frame is a section of a Texture. */ @@ -78643,6 +80172,19 @@ declare namespace Phaser { } + /** + * Linear filter type. + */ + const LINEAR: integer; + + /** + * Nearest Neighbor filter type. + */ + const NEAREST: integer; + + namespace Parsers { + } + /** * A Texture consists of a source, usually an Image from the Cache, and a collection of Frames. * The Frames represent the different areas of the Texture. For example a texture atlas @@ -79279,91 +80821,1290 @@ declare namespace Phaser { } - /** - * Filter Types. - */ - enum FilterMode { - /** - * Linear filter type. - */ - LINEAR, - /** - * Nearest neighbor filter type. - */ - NEAREST, - } - - namespace Events { - /** - * The Texture Add Event. - * - * This event is dispatched by the Texture Manager when a texture is added to it. - * - * Listen to this event from within a Scene using: `this.textures.on('addtexture', listener)`. - */ - const ADD: any; - - /** - * The Texture Load Error Event. - * - * This event is dispatched by the Texture Manager when a texture it requested to load failed. - * This only happens when base64 encoded textures fail. All other texture types are loaded via the Loader Plugin. - * - * Listen to this event from within a Scene using: `this.textures.on('onerror', listener)`. - */ - const ERROR: any; - - /** - * The Texture Load Event. - * - * This event is dispatched by the Texture Manager when a texture has finished loading on it. - * This only happens for base64 encoded textures. All other texture types are loaded via the Loader Plugin. - * - * Listen to this event from within a Scene using: `this.textures.on('onload', listener)`. - * - * This event is dispatched after the [ADD]{@linkcode Phaser.Textures.Events#event:ADD} event. - */ - const LOAD: any; - - /** - * This internal event signifies that the Texture Manager is now ready and the Game can continue booting. - * - * When a Phaser Game instance is booting for the first time, the Texture Manager has to wait on a couple of non-blocking - * async events before it's fully ready to carry on. When those complete the Texture Manager emits this event via the Game - * instance, which tells the Game to carry on booting. - */ - const READY: any; - - /** - * The Texture Remove Event. - * - * This event is dispatched by the Texture Manager when a texture is removed from it. - * - * Listen to this event from within a Scene using: `this.textures.on('removetexture', listener)`. - * - * If you have any Game Objects still using the removed texture, they will start throwing - * errors the next time they try to render. Be sure to clear all use of the texture in this event handler. - */ - const REMOVE: any; - - } - - /** - * Linear filter type. - */ - const LINEAR: integer; - - /** - * Nearest Neighbor filter type. - */ - const NEAREST: integer; - - namespace Parsers { - } - } namespace Tilemaps { + namespace Components { + } + + /** + * A Dynamic Tilemap Layer is a Game Object that renders LayerData from a Tilemap when used in combination + * with one, or more, Tilesets. + * + * A Dynamic Tilemap Layer trades some speed for being able to apply powerful effects. Unlike a + * Static Tilemap Layer, you can apply per-tile effects like tint or alpha, and you can change the + * tiles in a DynamicTilemapLayer. + * + * Use this over a Static Tilemap Layer when you need those features. + */ + class DynamicTilemapLayer extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.ComputedSize, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { + /** + * + * @param scene The Scene to which this Game Object belongs. + * @param tilemap The Tilemap this layer is a part of. + * @param layerIndex The index of the LayerData associated with this layer. + * @param tileset The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object. + * @param x The world x position where the top left of this layer will be placed. Default 0. + * @param y The world y position where the top left of this layer will be placed. Default 0. + */ + constructor(scene: Phaser.Scene, tilemap: Phaser.Tilemaps.Tilemap, layerIndex: integer, tileset: string | string[] | Phaser.Tilemaps.Tileset | Phaser.Tilemaps.Tileset[], x?: number, y?: number); + + /** + * Used internally by physics system to perform fast type checks. + */ + readonly isTilemap: boolean; + + /** + * The Tilemap that this layer is a part of. + */ + tilemap: Phaser.Tilemaps.Tilemap; + + /** + * The index of the LayerData associated with this layer. + */ + layerIndex: integer; + + /** + * The LayerData associated with this layer. LayerData can only be associated with one + * tilemap layer. + */ + layer: Phaser.Tilemaps.LayerData; + + /** + * The Tileset/s associated with this layer. + * + * As of Phaser 3.14 this property is now an array of Tileset objects, previously it was a single reference. + */ + tileset: Phaser.Tilemaps.Tileset[]; + + /** + * Used internally with the canvas render. This holds the tiles that are visible within the + * camera. + */ + culledTiles: any[]; + + /** + * You can control if the Cameras should cull tiles before rendering them or not. + * By default the camera will try to cull the tiles in this layer, to avoid over-drawing to the renderer. + * + * However, there are some instances when you may wish to disable this, and toggling this flag allows + * you to do so. Also see `setSkipCull` for a chainable method that does the same thing. + */ + skipCull: boolean; + + /** + * The total number of tiles drawn by the renderer in the last frame. + */ + readonly tilesDrawn: integer; + + /** + * The total number of tiles in this layer. Updated every frame. + */ + readonly tilesTotal: integer; + + /** + * The amount of extra tiles to add into the cull rectangle when calculating its horizontal size. + * + * See the method `setCullPadding` for more details. + */ + cullPaddingX: integer; + + /** + * The amount of extra tiles to add into the cull rectangle when calculating its vertical size. + * + * See the method `setCullPadding` for more details. + */ + cullPaddingY: integer; + + /** + * The callback that is invoked when the tiles are culled. + * + * By default it will call `TilemapComponents.CullTiles` but you can override this to call any function you like. + * + * It will be sent 3 arguments: + * + * 1. The Phaser.Tilemaps.LayerData object for this Layer + * 2. The Camera that is culling the layer. You can check its `dirty` property to see if it has changed since the last cull. + * 3. A reference to the `culledTiles` array, which should be used to store the tiles you want rendered. + * + * See the `TilemapComponents.CullTiles` source code for details on implementing your own culling system. + */ + cullCallback: Function; + + /** + * An array holding the mapping between the tile indexes and the tileset they belong to. + */ + gidMap: Phaser.Tilemaps.Tileset[]; + + /** + * Sets the rendering (draw) order of the tiles in this layer. + * + * The default is 'right-down', meaning it will order the tiles starting from the top-left, + * drawing to the right and then moving down to the next row. + * + * The draw orders are: + * + * 0 = right-down + * 1 = left-down + * 2 = right-up + * 3 = left-up + * + * Setting the render order does not change the tiles or how they are stored in the layer, + * it purely impacts the order in which they are rendered. + * + * You can provide either an integer (0 to 3), or the string version of the order. + * @param renderOrder The render (draw) order value. Either an integer between 0 and 3, or a string: 'right-down', 'left-down', 'right-up' or 'left-up'. + */ + setRenderOrder(renderOrder: integer | string): this; + + /** + * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting + * faces are used internally for optimizing collisions against tiles. This method is mostly used + * internally to optimize recalculating faces when only one tile has been changed. + * @param tileX The x coordinate. + * @param tileY The y coordinate. + */ + calculateFacesAt(tileX: integer, tileY: integer): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Calculates interesting faces within the rectangular area specified (in tile coordinates) of the + * layer. Interesting faces are used internally for optimizing collisions against tiles. This method + * is mostly used internally. + * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. + * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. + */ + calculateFacesWithin(tileX?: integer, tileY?: integer, width?: integer, height?: integer): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Creates a Sprite for every object matching the given tile indexes in the layer. You can + * optionally specify if each tile will be replaced with a new tile after the Sprite has been + * 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 indexes 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 leave the tiles unchanged. If an array is given, it is assumed to be a + * one-to-one mapping with the indexes array. + * @param spriteConfig The config object to pass into the Sprite creator (i.e. + * scene.make.sprite). + * @param scene The Scene to create the Sprites within. Default scene the map is within. + * @param camera The Camera to use when determining the world XY Default main camera. + */ + createFromTiles(indexes: integer | any[], replacements: integer | any[], spriteConfig: Phaser.Types.GameObjects.Sprite.SpriteConfig, scene?: Phaser.Scene, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.GameObjects.Sprite[]; + + /** + * Returns the tiles in the given layer that are within the cameras viewport. + * This is used internally. + * @param camera The Camera to run the cull check against. + */ + cull(camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile[]; + + /** + * Copies the tiles in the source rectangular area to a new destination (all specified in tile + * coordinates) within the layer. This copies all tile properties & recalculates collision + * information in the destination region. + * @param srcTileX The x coordinate of the area to copy from, in tiles, not pixels. + * @param srcTileY The y coordinate of the area to copy from, in tiles, not pixels. + * @param width The width of the area to copy, in tiles, not pixels. + * @param height The height of the area to copy, in tiles, not pixels. + * @param destTileX The x coordinate of the area to copy to, in tiles, not pixels. + * @param destTileY The y coordinate of the area to copy to, in tiles, not pixels. + * @param recalculateFaces `true` if the faces data should be recalculated. Default true. + */ + copy(srcTileX: integer, srcTileY: integer, width: integer, height: integer, destTileX: integer, destTileY: integer, recalculateFaces?: boolean): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Destroys this DynamicTilemapLayer and removes its link to the associated LayerData. + * @param removeFromTilemap Remove this layer from the parent Tilemap? Default true. + */ + destroy(removeFromTilemap?: boolean): void; + + /** + * Sets the tiles in the given rectangular area (in tile coordinates) of the layer with the + * specified index. Tiles will be set to collide if the given index is a colliding index. + * Collision information in the region will be recalculated. + * @param index The tile index to fill the area with. + * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. + * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. + * @param recalculateFaces `true` if the faces data should be recalculated. Default true. + */ + fill(index: integer, tileX?: integer, tileY?: integer, width?: integer, height?: integer, recalculateFaces?: boolean): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given + * filter callback function. Any tiles that pass the filter test (i.e. where the callback returns + * true) will returned as a new array. Similar to Array.prototype.Filter in vanilla JS. + * @param callback The callback. Each tile in the given area will be passed to this + * callback as the first and only parameter. The callback should return true for tiles that pass the + * filter. + * @param context The context under which the callback should be run. + * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area to filter. Default 0. + * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area to filter. Default 0. + * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. + * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. + * @param filteringOptions Optional filters to apply when getting the tiles. + */ + filterTiles(callback: Function, context?: object, tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions): Phaser.Tilemaps.Tile[]; + + /** + * Searches the entire map layer for the first tile matching the given index, then returns that Tile + * object. If no match is found, it returns null. 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 traveling 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. + */ + findByIndex(index: integer, skip?: integer, reverse?: boolean): Phaser.Tilemaps.Tile; + + /** + * Find the first tile in the given rectangular area (in tile coordinates) of the layer that + * satisfies the provided testing function. I.e. finds the first tile for which `callback` returns + * true. Similar to Array.prototype.find in vanilla JS. + * @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 tileX The left most tile index (in tile coordinates) to use as the origin of the area to search. Default 0. + * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area to search. Default 0. + * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. + * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. + * @param filteringOptions Optional filters to apply when getting the tiles. + */ + findTile(callback: FindTileCallback, context?: object, tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions): Phaser.Tilemaps.Tile; + + /** + * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given + * callback. Similar to Array.prototype.forEach in vanilla JS. + * @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 tileX The left most tile index (in tile coordinates) to use as the origin of the area to search. Default 0. + * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area to search. Default 0. + * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. + * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. + * @param filteringOptions Optional filters to apply when getting the tiles. + */ + forEachTile(callback: EachTileCallback, context?: object, tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Gets a tile at the given tile coordinates from the given layer. + * @param tileX X position to get the tile from (given in tile units, not pixels). + * @param tileY Y position to get the tile from (given in tile units, not pixels). + * @param nonNull If true getTile won't return null for empty tiles, but a Tile object with an index of -1. Default false. + */ + getTileAt(tileX: integer, tileY: integer, nonNull?: boolean): Phaser.Tilemaps.Tile; + + /** + * Gets a tile at the given world coordinates from the given layer. + * @param worldX X position to get the tile from (given in pixels) + * @param worldY Y position to get the tile from (given in pixels) + * @param nonNull If true, function won't return null for empty tiles, but a Tile object with an index of -1. Default false. + * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. + */ + getTileAtWorldXY(worldX: number, worldY: number, nonNull?: boolean, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile; + + /** + * Gets the tiles in the given rectangular area (in tile coordinates) of the layer. + * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. + * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. + * @param filteringOptions Optional filters to apply when getting the tiles. + */ + getTilesWithin(tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions): Phaser.Tilemaps.Tile[]; + + /** + * Gets the tiles that overlap with the given shape in the given layer. The shape must be a Circle, + * Line, Rectangle or Triangle. The shape should be in world coordinates. + * @param shape A shape in world (pixel) coordinates + * @param filteringOptions Optional filters to apply when getting the tiles. + * @param camera The Camera to use when factoring in which tiles to return. Default main camera. + */ + getTilesWithinShape(shape: Phaser.Geom.Circle | Phaser.Geom.Line | Phaser.Geom.Rectangle | Phaser.Geom.Triangle, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile[]; + + /** + * Gets the tiles in the given rectangular area (in world coordinates) of the layer. + * @param worldX The world x coordinate for the top-left of the area. + * @param worldY The world y coordinate for the top-left of the area. + * @param width The width of the area. + * @param height The height of the area. + * @param filteringOptions Optional filters to apply when getting the tiles. + * @param camera The Camera to use when factoring in which tiles to return. Default main camera. + */ + getTilesWithinWorldXY(worldX: number, worldY: number, width: number, height: number, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile[]; + + /** + * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns + * false if there is no tile or if the tile at that location has an index of -1. + * @param tileX The x coordinate, in tiles, not pixels. + * @param tileY The y coordinate, in tiles, not pixels. + */ + hasTileAt(tileX: integer, tileY: integer): boolean; + + /** + * Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns + * false if there is no tile or if the tile at that location has an index of -1. + * @param worldX The x coordinate, in pixels. + * @param worldY The y coordinate, in pixels. + * @param camera The Camera to use when factoring in which tiles to return. Default main camera. + */ + hasTileAtWorldXY(worldX: number, worldY: number, camera?: Phaser.Cameras.Scene2D.Camera): boolean; + + /** + * Puts a tile at the given tile coordinates in the specified layer. You can pass in either an index + * or a Tile object. If you pass in a Tile, all attributes will be copied over to the specified + * location. If you pass in an index, only the index at the specified location will be changed. + * Collision information will be recalculated at the specified location. + * @param tile The index of this tile to set or a Tile object. + * @param tileX The x coordinate, in tiles, not pixels. + * @param tileY The y coordinate, in tiles, not pixels. + * @param recalculateFaces `true` if the faces data should be recalculated. Default true. + */ + putTileAt(tile: integer | Phaser.Tilemaps.Tile, tileX: integer, tileY: integer, recalculateFaces?: boolean): Phaser.Tilemaps.Tile; + + /** + * Puts a tile at the given world coordinates (pixels) in the specified layer. You can pass in either + * an index or a Tile object. If you pass in a Tile, all attributes will be copied over to the + * specified location. If you pass in an index, only the index at the specified location will be + * changed. Collision information will be recalculated at the specified location. + * @param tile The index of this tile to set or a Tile object. + * @param worldX The x coordinate, in pixels. + * @param worldY The y coordinate, in pixels. + * @param recalculateFaces `true` if the faces data should be recalculated. Default true. + * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. + */ + putTileAtWorldXY(tile: integer | Phaser.Tilemaps.Tile, worldX: number, worldY: number, recalculateFaces?: boolean, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile; + + /** + * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified + * layer. The array can be composed of either tile indexes or Tile objects. If you pass in a Tile, + * all attributes will be copied over to the specified location. If you pass in an index, only the + * index at the specified location will be changed. Collision information will be recalculated + * within the region tiles were changed. + * @param tile A row (array) or grid (2D array) of Tiles or tile indexes to place. + * @param tileX The x coordinate, in tiles, not pixels. + * @param tileY The y coordinate, in tiles, not pixels. + * @param recalculateFaces `true` if the faces data should be recalculated. Default true. + */ + putTilesAt(tile: integer[] | integer[][] | Phaser.Tilemaps.Tile[] | Phaser.Tilemaps.Tile[][], tileX: integer, tileY: integer, recalculateFaces?: boolean): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the + * specified layer. Each tile will receive a new index. If an array of indexes is passed in, then + * those will be used for randomly assigning new tile indexes. If an array is not provided, the + * indexes found within the region (excluding -1) will be used for randomly assigning new tile + * indexes. This method only modifies tile indexes and does not change collision information. + * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. + * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. + * @param indexes An array of indexes to randomly draw from during randomization. + */ + randomize(tileX?: integer, tileY?: integer, width?: integer, height?: integer, indexes?: integer[]): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Removes the tile at the given tile coordinates in the specified layer and updates the layer's + * collision information. + * @param tileX The x coordinate, in tiles, not pixels. + * @param tileY The y coordinate, in tiles, not pixels. + * @param replaceWithNull If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1. Default true. + * @param recalculateFaces `true` if the faces data should be recalculated. Default true. + */ + removeTileAt(tileX: integer, tileY: integer, replaceWithNull?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.Tile; + + /** + * Removes the tile at the given world coordinates in the specified layer and updates the layer's + * collision information. + * @param worldX The x coordinate, in pixels. + * @param worldY The y coordinate, in pixels. + * @param replaceWithNull If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1. Default true. + * @param recalculateFaces `true` if the faces data should be recalculated. Default true. + * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. + */ + removeTileAtWorldXY(worldX: number, worldY: number, replaceWithNull?: boolean, recalculateFaces?: boolean, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile; + + /** + * Draws a debug representation of the layer to the given Graphics. This is helpful when you want to + * get a quick idea of which of your tiles are colliding and which have interesting faces. The tiles + * are drawn starting at (0, 0) in the Graphics, allowing you to place the debug representation + * wherever you want on the screen. + * @param graphics The target Graphics object to draw upon. + * @param styleConfig An object specifying the colors to use for the debug drawing. + */ + renderDebug(graphics: Phaser.GameObjects.Graphics, styleConfig: Phaser.Types.Tilemaps.StyleConfig): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching + * `findIndex` and updates their index to match `newIndex`. This only modifies the index and does + * not change collision information. + * @param findIndex The index of the tile to search for. + * @param newIndex The index of the tile to replace it with. + * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. + * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. + */ + replaceByIndex(findIndex: integer, newIndex: integer, tileX?: integer, tileY?: integer, width?: integer, height?: integer): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * You can control if the Cameras should cull tiles before rendering them or not. + * By default the camera will try to cull the tiles in this layer, to avoid over-drawing to the renderer. + * + * However, there are some instances when you may wish to disable this. + * @param value Set to `true` to stop culling tiles. Set to `false` to enable culling again. Default true. + */ + setSkipCull(value?: boolean): this; + + /** + * When a Camera culls the tiles in this layer it does so using its view into the world, building up a + * rectangle inside which the tiles must exist or they will be culled. Sometimes you may need to expand the size + * of this 'cull rectangle', especially if you plan on rotating the Camera viewing the layer. Do so + * by providing the padding values. The values given are in tiles, not pixels. So if the tile width was 32px + * and you set `paddingX` to be 4, it would add 32px x 4 to the cull rectangle (adjusted for scale) + * @param paddingX The amount of extra horizontal tiles to add to the cull check padding. Default 1. + * @param paddingY The amount of extra vertical tiles to add to the cull check padding. Default 1. + */ + setCullPadding(paddingX?: integer, paddingY?: integer): this; + + /** + * Sets collision on the given tile or tiles within a layer by index. 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). + * + * If no layer specified, the map's current layer is used. + * @param indexes Either a single tile index, or an array of tile indexes. + * @param collides If true it will enable collision. If false it will clear collision. Default true. + * @param recalculateFaces Whether or not to recalculate the tile faces after the update. Default true. + * @param updateLayer If true, updates the current tiles on the layer. Set to + * false if no tiles have been placed for significant performance boost. Default true. + */ + setCollision(indexes: integer | any[], collides?: boolean, recalculateFaces?: boolean, updateLayer?: boolean): Phaser.Tilemaps.Tilemap; + + /** + * Sets collision on a range of tiles in a layer whose index is between the specified `start` and + * `stop` (inclusive). 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 recalculateFaces Whether or not to recalculate the tile faces after the update. Default true. + */ + setCollisionBetween(start: integer, stop: integer, collides?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property + * that matches the given properties object, its collision flag will be set. The `collides` + * parameter controls if collision will be enabled (true) or disabled (false). Passing in + * `{ collides: true }` would update the collision flag on any tiles with a "collides" property that + * has a value of true. Any tile that doesn't have "collides" set to true will be ignored. You can + * also use an array of values, e.g. `{ types: ["stone", "lava", "sand" ] }`. If a tile has a + * "types" property that matches any of those values, its collision flag will be updated. + * @param properties An object with tile properties and corresponding values that should be checked. + * @param collides If true it will enable collision. If false it will clear collision. Default true. + * @param recalculateFaces Whether or not to recalculate the tile faces after the update. Default true. + */ + setCollisionByProperty(properties: object, collides?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Sets collision on all tiles in the given layer, except for tiles that have an index specified in + * the given array. The `collides` parameter controls if collision will be enabled (true) or + * disabled (false). + * @param indexes An array of the tile indexes to not be counted for collision. + * @param collides If true it will enable collision. If false it will clear collision. Default true. + * @param recalculateFaces Whether or not to recalculate the tile faces after the update. Default true. + */ + setCollisionByExclusion(indexes: integer[], collides?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Sets collision on the tiles within a layer by checking each tiles collision group data + * (typically defined in Tiled within the tileset collision editor). If any objects are found within + * a tiles collision group, the tile's colliding information will be set. The `collides` parameter + * controls if collision will be enabled (true) or disabled (false). + * @param collides If true it will enable collision. If false it will clear collision. Default true. + * @param recalculateFaces Whether or not to recalculate the tile faces after the update. Default true. + */ + setCollisionFromCollisionGroup(collides?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Sets a global collision callback for the given tile index within the layer. This will affect all + * tiles on this layer that have the same index. 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. + */ + setTileIndexCallback(indexes: integer | integer[], callback: Function, callbackContext: object): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Sets a collision callback for the given rectangular area (in tile coordinates) within the layer. + * If a callback is already set for the tile index it will be replaced. Set the callback to null to + * remove it. + * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. + * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. + * @param callback The callback that will be invoked when the tile is collided with. + * @param callbackContext The context under which the callback is called. + */ + setTileLocationCallback(tileX?: integer, tileY?: integer, width?: integer, height?: integer, callback?: Function, callbackContext?: object): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given + * layer. It will only randomize the tiles in that area, so if they're all the same nothing will + * appear to have changed! This method only modifies tile indexes and does not change collision + * information. + * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. + * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. + */ + shuffle(tileX?: integer, tileY?: integer, width?: integer, height?: integer): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching + * `indexA` and swaps then with `indexB`. This only modifies the index and does not change collision + * information. + * @param tileA First tile index. + * @param tileB Second tile index. + * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. + * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. + */ + swapByIndex(tileA: integer, tileB: integer, tileX?: integer, tileY?: integer, width?: integer, height?: integer): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Converts from tile X coordinates (tile units) to world X coordinates (pixels), factoring in the + * layers position, scale and scroll. + * @param tileX The x coordinate, in tiles, not pixels. + * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. + */ + tileToWorldX(tileX: integer, camera?: Phaser.Cameras.Scene2D.Camera): number; + + /** + * Converts from tile Y coordinates (tile units) to world Y coordinates (pixels), factoring in the + * layers position, scale and scroll. + * @param tileY The y coordinate, in tiles, not pixels. + * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. + */ + tileToWorldY(tileY: integer, camera?: Phaser.Cameras.Scene2D.Camera): number; + + /** + * Converts from tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the + * layers position, scale and scroll. This will return a new Vector2 object or update the given + * `point` object. + * @param tileX The x coordinate, in tiles, not pixels. + * @param tileY The y coordinate, in tiles, not pixels. + * @param point A Vector2 to store the coordinates in. If not given a new Vector2 is created. + * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. + */ + tileToWorldXY(tileX: integer, tileY: integer, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2; + + /** + * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the + * specified layer. Each tile will receive a new index. New indexes are drawn from the given + * weightedIndexes array. An example weighted array: + * + * [ + * { index: 6, weight: 4 }, // Probability of index 6 is 4 / 8 + * { index: 7, weight: 2 }, // Probability of index 7 would be 2 / 8 + * { index: 8, weight: 1.5 }, // Probability of index 8 would be 1.5 / 8 + * { index: 26, weight: 0.5 } // Probability of index 27 would be 0.5 / 8 + * ] + * + * The probability of any index being choose is (the index's weight) / (sum of all weights). This + * method only modifies tile indexes and does not change collision information. + * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. + * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. + * @param weightedIndexes An array of objects to randomly draw from during + * randomization. They should be in the form: { index: 0, weight: 4 } or + * { index: [0, 1], weight: 4 } if you wish to draw from multiple tile indexes. + */ + weightedRandomize(tileX?: integer, tileY?: integer, width?: integer, height?: integer, weightedIndexes?: object[]): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Converts from world X coordinates (pixels) to tile X coordinates (tile units), factoring in the + * layers position, scale and scroll. + * @param worldX The x coordinate to be converted, in pixels, not tiles. + * @param snapToFloor Whether or not to round the tile coordinate down to the nearest integer. Default true. + * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. + */ + worldToTileX(worldX: number, snapToFloor?: boolean, camera?: Phaser.Cameras.Scene2D.Camera): number; + + /** + * Converts from world Y coordinates (pixels) to tile Y coordinates (tile units), factoring in the + * layers position, scale and scroll. + * @param worldY The y coordinate to be converted, in pixels, not tiles. + * @param snapToFloor Whether or not to round the tile coordinate down to the nearest integer. Default true. + * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. + */ + worldToTileY(worldY: number, snapToFloor?: boolean, camera?: Phaser.Cameras.Scene2D.Camera): number; + + /** + * Converts from world XY coordinates (pixels) to tile XY coordinates (tile units), factoring in the + * layers position, scale and scroll. This will return a new Vector2 object or update the given + * `point` object. + * @param worldX The x coordinate to be converted, in pixels, not tiles. + * @param worldY The y coordinate to be converted, in pixels, not tiles. + * @param snapToFloor Whether or not to round the tile coordinate down to the nearest integer. Default true. + * @param point A Vector2 to store the coordinates in. If not given a new Vector2 is created. + * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. + */ + worldToTileXY(worldX: number, worldY: number, snapToFloor?: boolean, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2; + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. + * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. + * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. + */ + setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopLeft: number; + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopRight: number; + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomLeft: number; + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomRight: number; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * * ERASE + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + */ + blendMode: Phaser.BlendModes | string; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * * ERASE (only works when rendering to a framebuffer, like a Render Texture) + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency in which blend modes + * are used. + * @param value The BlendMode value. Either a string or a CONST. + */ + setBlendMode(value: string | Phaser.BlendModes): this; + + /** + * The native (un-scaled) width of this Game Object. + * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayWidth` property. + */ + width: number; + + /** + * The native (un-scaled) height of this Game Object. + * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayHeight` property. + */ + height: number; + + /** + * The displayed width of this Game Object. + * + * This value takes into account the scale factor. + * + * Setting this value will adjust the Game Object's scale property. + */ + displayWidth: number; + + /** + * The displayed height of this Game Object. + * + * This value takes into account the scale factor. + * + * Setting this value will adjust the Game Object's scale property. + */ + displayHeight: number; + + /** + * Sets the internal size of this Game Object, as used for frame or physics body creation. + * + * This will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or call the + * `setDisplaySize` method, which is the same thing as changing the scale but allows you + * to do so by giving pixel values. + * + * If you have enabled this Game Object for input, changing the size will _not_ change the + * size of the hit area. To do this you should adjust the `input.hitArea` object directly. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setSize(width: number, height: number): this; + + /** + * Sets the display size of this Game Object. + * + * Calling this will adjust the scale. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setDisplaySize(width: number, height: number): this; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + */ + depth: number; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * @param value The depth of this Game Object. + */ + setDepth(value: integer): this; + + /** + * The horizontally flipped state of the Game Object. + * + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + */ + flipX: boolean; + + /** + * The vertically flipped state of the Game Object. + * + * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + */ + flipY: boolean; + + /** + * Toggles the horizontal flipped state of this Game Object. + * + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + */ + toggleFlipX(): this; + + /** + * Toggles the vertical flipped state of this Game Object. + */ + toggleFlipY(): this; + + /** + * Sets the horizontal flipped state of this Game Object. + * + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipX(value: boolean): this; + + /** + * Sets the vertical flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipY(value: boolean): this; + + /** + * Sets the horizontal and vertical flipped state of this Game Object. + * + * A Game Object that is flipped will render inversed on the flipped axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * @param y The horizontal flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlip(x: boolean, y: boolean): this; + + /** + * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. + */ + resetFlip(): this; + + /** + * Gets the center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + */ + getCenter(output?: O): O; + + /** + * Gets the top-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the top-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopCenter(output?: O, includeParent?: boolean): O; + + /** + * Gets the top-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the left-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getLeftCenter(output?: O, includeParent?: boolean): O; + + /** + * Gets the right-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getRightCenter(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomCenter(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bounds of this Game Object, regardless of origin. + * The values are stored and returned in a Rectangle, or Rectangle-like, object. + * @param output An object to store the values in. If not provided a new Rectangle will be created. + */ + getBounds(output?: O): O; + + /** + * The horizontal origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the left of the Game Object. + */ + originX: number; + + /** + * The vertical origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the top of the Game Object. + */ + originY: number; + + /** + * The horizontal display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginX: number; + + /** + * The vertical display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginY: number; + + /** + * Sets the origin of this Game Object. + * + * The values are given in the range 0 to 1. + * @param x The horizontal origin value. Default 0.5. + * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x. + */ + setOrigin(x?: number, y?: number): this; + + /** + * Sets the origin of this Game Object based on the Pivot values in its Frame. + */ + setOriginFromFrame(): this; + + /** + * Sets the display origin of this Game Object. + * The difference between this and setting the origin is that you can use pixel values for setting the display origin. + * @param x The horizontal display origin value. Default 0. + * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x. + */ + setDisplayOrigin(x?: number, y?: number): this; + + /** + * Updates the Display Origin cached values internally stored on this Game Object. + * You don't usually call this directly, but it is exposed for edge-cases where you may. + */ + updateDisplayOrigin(): this; + + /** + * The initial WebGL pipeline of this Game Object. + */ + defaultPipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * The current WebGL pipeline of this Game Object. + */ + pipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * This should only be called during the instantiation of the Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. Defaults to the Texture Tint Pipeline. Default TextureTintPipeline. + */ + initPipeline(pipelineName?: string): boolean; + + /** + * Sets the active WebGL Pipeline of this Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + setPipeline(pipelineName: string): this; + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + */ + resetPipeline(): boolean; + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + */ + getPipelineName(): string; + + /** + * The horizontal scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * + * Please be aware that scroll factor values other than 1 are not taken in to consideration when + * calculating physics collisions. Bodies always collide based on their world position, but changing + * the scroll factor is a visual adjustment to where the textures are rendered, which can offset + * them from physics bodies if not accounted for in your code. + */ + scrollFactorX: number; + + /** + * The vertical scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * + * Please be aware that scroll factor values other than 1 are not taken in to consideration when + * calculating physics collisions. Bodies always collide based on their world position, but changing + * the scroll factor is a visual adjustment to where the textures are rendered, which can offset + * them from physics bodies if not accounted for in your code. + */ + scrollFactorY: number; + + /** + * Sets the scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * + * Please be aware that scroll factor values other than 1 are not taken in to consideration when + * calculating physics collisions. Bodies always collide based on their world position, but changing + * the scroll factor is a visual adjustment to where the textures are rendered, which can offset + * them from physics bodies if not accounted for in your code. + * @param x The horizontal scroll factor of this Game Object. + * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. + */ + setScrollFactor(x: number, y?: number): this; + + /** + * The x position of this Game Object. + */ + x: number; + + /** + * The y position of this Game Object. + */ + y: number; + + /** + * The z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. + */ + z: number; + + /** + * The w position of this Game Object. + */ + w: number; + + /** + * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object + * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`. + * + * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this + * isn't the case, use the `scaleX` or `scaleY` properties instead. + */ + scale: number; + + /** + * The horizontal scale of this Game Object. + */ + scaleX: number; + + /** + * The vertical scale of this Game Object. + */ + scaleY: number; + + /** + * The angle of this Game Object as expressed in degrees. + * + * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left + * and -90 is up. + * + * If you prefer to work in radians, see the `rotation` property instead. + */ + angle: integer; + + /** + * The angle of this Game Object in radians. + * + * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left + * and -90 is up. + * + * If you prefer to work in degrees, see the `angle` property instead. + */ + rotation: number; + + /** + * Sets the position of this Game Object. + * @param x The x position of this Game Object. Default 0. + * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. + * @param z The z position of this Game Object. Default 0. + * @param w The w position of this Game Object. Default 0. + */ + setPosition(x?: number, y?: number, z?: number, w?: number): this; + + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * @param x The x position of the top-left of the random area. Default 0. + * @param y The y position of the top-left of the random area. Default 0. + * @param width The width of the random area. + * @param height The height of the random area. + */ + setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; + + /** + * Sets the rotation of this Game Object. + * @param radians The rotation of this Game Object, in radians. Default 0. + */ + setRotation(radians?: number): this; + + /** + * Sets the angle of this Game Object. + * @param degrees The rotation of this Game Object, in degrees. Default 0. + */ + setAngle(degrees?: number): this; + + /** + * Sets the scale of this Game Object. + * @param x The horizontal scale of this Game Object. + * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. + */ + setScale(x: number, y?: number): this; + + /** + * Sets the x position of this Game Object. + * @param value The x position of this Game Object. Default 0. + */ + setX(value?: number): this; + + /** + * Sets the y position of this Game Object. + * @param value The y position of this Game Object. Default 0. + */ + setY(value?: number): this; + + /** + * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. + * @param value The z position of this Game Object. Default 0. + */ + setZ(value?: number): this; + + /** + * Sets the w position of this Game Object. + * @param value The w position of this Game Object. Default 0. + */ + setW(value?: number): this; + + /** + * Gets the local transform matrix for this Game Object. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * @param tempMatrix The matrix to populate with the values from this Game Object. + * @param parentMatrix A temporary matrix to hold parent values during the calculations. + */ + getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Gets the sum total rotation of all of this Game Objects parent Containers. + * + * The returned value is in radians and will be zero if this Game Object has no parent container. + */ + getParentRotation(): number; + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + */ + visible: boolean; + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): this; + + } + namespace Formats { /** * CSV Map Type @@ -79468,6 +82209,473 @@ declare namespace Phaser { } + /** + * A class for representing data about about a layer in a map. Maps are parsed from CSV, Tiled, + * etc. into this format. Tilemap, StaticTilemapLayer and DynamicTilemapLayer have a reference + * to this data and use it to look up and perform operations on tiles. + */ + class LayerData { + /** + * + * @param config [description] + */ + constructor(config?: object); + + /** + * The name of the layer, if specified in Tiled. + */ + name: string; + + /** + * The x offset of where to draw from the top left + */ + x: number; + + /** + * The y offset of where to draw from the top left + */ + y: number; + + /** + * The width in tile of the layer. + */ + width: number; + + /** + * The height in tiles of the layer. + */ + height: number; + + /** + * The pixel width of the tiles. + */ + tileWidth: number; + + /** + * The pixel height of the tiles. + */ + tileHeight: number; + + /** + * [description] + */ + baseTileWidth: number; + + /** + * [description] + */ + baseTileHeight: number; + + /** + * The width in pixels of the entire layer. + */ + widthInPixels: number; + + /** + * The height in pixels of the entire layer. + */ + heightInPixels: number; + + /** + * [description] + */ + alpha: number; + + /** + * [description] + */ + visible: boolean; + + /** + * Layer specific properties (can be specified in Tiled) + */ + properties: object; + + /** + * [description] + */ + indexes: any[]; + + /** + * [description] + */ + collideIndexes: any[]; + + /** + * [description] + */ + callbacks: any[]; + + /** + * [description] + */ + bodies: any[]; + + /** + * An array of the tile indexes + */ + data: Phaser.Tilemaps.Tile[][]; + + /** + * [description] + */ + tilemapLayer: Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer; + + } + + /** + * A class for representing data about a map. Maps are parsed from CSV, Tiled, etc. into this + * format. A Tilemap object get a copy of this data and then unpacks the needed properties into + * itself. + */ + class MapData { + /** + * + * @param config The Map configuration object. + */ + constructor(config?: Phaser.Types.Tilemaps.MapDataConfig); + + /** + * The key in the Phaser cache that corresponds to the loaded tilemap data. + */ + name: string; + + /** + * The width of the entire tilemap. + */ + width: number; + + /** + * The height of the entire tilemap. + */ + height: number; + + /** + * If the map is infinite or not. + */ + infinite: boolean; + + /** + * The width of the tiles. + */ + tileWidth: number; + + /** + * The height of the tiles. + */ + tileHeight: number; + + /** + * The width in pixels of the entire tilemap. + */ + widthInPixels: number; + + /** + * The height in pixels of the entire tilemap. + */ + heightInPixels: number; + + /** + * [description] + */ + format: integer; + + /** + * The orientation of the map data (i.e. orthogonal, isometric, hexagonal), default 'orthogonal'. + */ + orientation: string; + + /** + * Determines the draw order of tilemap. Default is right-down + * + * 0, or 'right-down' + * 1, or 'left-down' + * 2, or 'right-up' + * 3, or 'left-up' + */ + renderOrder: string; + + /** + * The version of the map data (as specified in Tiled). + */ + version: string; + + /** + * Map specific properties (can be specified in Tiled) + */ + properties: object; + + /** + * An array with all the layers configured to the MapData. + */ + layers: Phaser.Tilemaps.LayerData[] | Phaser.Tilemaps.ObjectLayer; + + /** + * An array of Tiled Image Layers. + */ + images: any[]; + + /** + * An object of Tiled Object Layers. + */ + objects: object; + + /** + * An object of collision data. Must be created as physics object or will return undefined. + */ + collision: object; + + /** + * An array of Tilesets. + */ + tilesets: Phaser.Tilemaps.Tileset[]; + + /** + * The collection of images the map uses(specified in Tiled) + */ + imageCollections: any[]; + + /** + * [description] + */ + tiles: any[]; + + } + + /** + * A class for representing a Tiled object layer in a map. This mirrors the structure of a Tiled + * object layer, except: + * - "x" & "y" properties are ignored since these cannot be changed in Tiled. + * - "offsetx" & "offsety" are applied to the individual object coordinates directly, so they + * are ignored as well. + * - "draworder" is ignored. + */ + class ObjectLayer { + /** + * + * @param config The data for the layer from the Tiled JSON object. + */ + constructor(config?: Phaser.Types.Tilemaps.ObjectLayerConfig); + + /** + * The name of the Object Layer. + */ + name: string; + + /** + * The opacity of the layer, between 0 and 1. + */ + opacity: number; + + /** + * The custom properties defined on the Object Layer, keyed by their name. + */ + properties: object; + + /** + * The type of each custom property defined on the Object Layer, keyed by its name. + */ + propertyTypes: object; + + /** + * The type of the layer, which should be `objectgroup`. + */ + type: string; + + /** + * Whether the layer is shown (`true`) or hidden (`false`). + */ + visible: boolean; + + /** + * An array of all objects on this Object Layer. + * + * Each Tiled object corresponds to a JavaScript object in this array. It has an `id` (unique), + * `name` (as assigned in Tiled), `type` (as assigned in Tiled), `rotation` (in clockwise degrees), + * `properties` (if any), `visible` state (`true` if visible, `false` otherwise), + * `x` and `y` coordinates (in pixels, relative to the tilemap), and a `width` and `height` (in pixels). + * + * An object tile has a `gid` property (GID of the represented tile), a `flippedHorizontal` property, + * a `flippedVertical` property, and `flippedAntiDiagonal` property. + * The {@link http://docs.mapeditor.org/en/latest/reference/tmx-map-format/|Tiled documentation} contains + * information on flipping and rotation. + * + * Polylines have a `polyline` property, which is an array of objects corresponding to points, + * where each point has an `x` property and a `y` property. Polygons have an identically structured + * array in their `polygon` property. Text objects have a `text` property with the text's properties. + * + * Rectangles and ellipses have a `rectangle` or `ellipse` property set to `true`. + */ + objects: Phaser.Types.Tilemaps.TiledObject[]; + + } + + namespace Parsers { + namespace Impact { + /** + * [description] + * @param json [description] + * @param insertNull [description] + */ + function ParseTileLayers(json: object, insertNull: boolean): any[]; + + /** + * [description] + * @param json [description] + */ + function ParseTilesets(json: object): any[]; + + /** + * Parses a Weltmeister JSON object into a new MapData object. + * @param name The name of the tilemap, used to set the name on the MapData. + * @param json The Weltmeister JSON object. + * @param insertNull Controls how empty tiles, tiles with an index of -1, in the map + * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty + * location will get a Tile object with an index of -1. If you've a large sparsely populated map and + * the tile data doesn't need to change then setting this value to `true` will help with memory + * consumption. However if your map is small or you need to update the tiles dynamically, then leave + * the default value set. + */ + function ParseWeltmeister(name: string, json: object, insertNull: boolean): object; + + } + + /** + * Parses raw data of a given Tilemap format into a new MapData object. If no recognized data format + * is found, returns `null`. When loading from CSV or a 2D array, you should specify the tileWidth & + * tileHeight. When parsing from a map from Tiled, the tileWidth & tileHeight will be pulled from + * the map data. + * @param name The name of the tilemap, used to set the name on the MapData. + * @param mapFormat See ../Formats.js. + * @param data 2D array, CSV string or Tiled JSON object. + * @param tileWidth The width of a tile in pixels. Required for 2D array and CSV, but + * ignored for Tiled JSON. + * @param tileHeight The height of a tile in pixels. Required for 2D array and CSV, but + * ignored for Tiled JSON. + * @param insertNull Controls how empty tiles, tiles with an index of -1, in the map + * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty + * location will get a Tile object with an index of -1. If you've a large sparsely populated map and + * the tile data doesn't need to change then setting this value to `true` will help with memory + * consumption. However if your map is small or you need to update the tiles dynamically, then leave + * the default value set. + */ + function Parse(name: string, mapFormat: integer, data: integer[][] | string | object, tileWidth: integer, tileHeight: integer, insertNull: boolean): Phaser.Tilemaps.MapData; + + /** + * Parses a 2D array of tile indexes into a new MapData object with a single layer. + * @param name The name of the tilemap, used to set the name on the MapData. + * @param data 2D array, CSV string or Tiled JSON object. + * @param tileWidth The width of a tile in pixels. + * @param tileHeight The height of a tile in pixels. + * @param insertNull Controls how empty tiles, tiles with an index of -1, in the map + * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty + * location will get a Tile object with an index of -1. If you've a large sparsely populated map and + * the tile data doesn't need to change then setting this value to `true` will help with memory + * consumption. However if your map is small or you need to update the tiles dynamically, then leave + * the default value set. + */ + function Parse2DArray(name: string, data: integer[][], tileWidth: integer, tileHeight: integer, insertNull: boolean): Phaser.Tilemaps.MapData; + + /** + * Parses a CSV string of tile indexes into a new MapData object with a single layer. + * @param name The name of the tilemap, used to set the name on the MapData. + * @param data CSV string of tile indexes. + * @param tileWidth The width of a tile in pixels. + * @param tileHeight The height of a tile in pixels. + * @param insertNull Controls how empty tiles, tiles with an index of -1, in the map + * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty + * location will get a Tile object with an index of -1. If you've a large sparsely populated map and + * the tile data doesn't need to change then setting this value to `true` will help with memory + * consumption. However if your map is small or you need to update the tiles dynamically, then leave + * the default value set. + */ + function ParseCSV(name: string, data: string, tileWidth: integer, tileHeight: integer, insertNull: boolean): Phaser.Tilemaps.MapData; + + namespace Tiled { + /** + * Copy properties from tileset to tiles. + * @param mapData [description] + */ + function AssignTileProperties(mapData: Phaser.Tilemaps.MapData): void; + + /** + * Decode base-64 encoded data, for example as exported by Tiled. + * @param data Base-64 encoded data to decode. + */ + function Base64Decode(data: object): any[]; + + /** + * Master list of tiles -> x, y, index in tileset. + * @param mapData [description] + */ + function BuildTilesetIndex(mapData: Phaser.Tilemaps.MapData): any[]; + + /** + * Parse a Tiled group layer and create a state object for inheriting. + * @param json The Tiled JSON object. + * @param currentl The current group layer from the Tiled JSON file. + * @param parentstate The state of the parent group (if any). + */ + function CreateGroupLayer(json: object, currentl?: object, parentstate?: object): object; + + /** + * See Tiled documentation on tile flipping: + * http://docs.mapeditor.org/en/latest/reference/tmx-map-format/ + * @param gid [description] + */ + function ParseGID(gid: number): object; + + /** + * Parses a Tiled JSON object into an array of objects with details about the image layers. + * @param json The Tiled JSON object. + */ + function ParseImageLayers(json: object): any[]; + + /** + * Parses a Tiled JSON object into a new MapData object. + * @param name The name of the tilemap, used to set the name on the MapData. + * @param json The Tiled JSON object. + * @param insertNull Controls how empty tiles, tiles with an index of -1, in the map + * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty + * location will get a Tile object with an index of -1. If you've a large sparsely populated map and + * the tile data doesn't need to change then setting this value to `true` will help with memory + * consumption. However if your map is small or you need to update the tiles dynamically, then leave + * the default value set. + */ + function ParseJSONTiled(name: string, json: object, insertNull: boolean): Phaser.Tilemaps.MapData; + + /** + * Convert a Tiled object to an internal parsed object normalising and copying properties over, while applying optional x and y offsets. The parsed object will always have the properties `id`, `name`, `type`, `rotation`, `properties`, `visible`, `x`, `y`, `width` and `height`. Other properties will be added according to the object type (such as text, polyline, gid etc.) + * @param tiledObject Tiled object to convert to an internal parsed object normalising and copying properties over. + * @param offsetX Optional additional offset to apply to the object's x property. Defaults to 0. Default 0. + * @param offsetY Optional additional offset to apply to the object's y property. Defaults to 0. Default 0. + */ + function ParseObject(tiledObject: object, offsetX?: number, offsetY?: number): object; + + /** + * Parses a Tiled JSON object into an array of ObjectLayer objects. + * @param json The Tiled JSON object. + */ + function ParseObjectLayers(json: object): any[]; + + /** + * Parses all tilemap layers in a Tiled JSON object into new LayerData objects. + * @param json The Tiled JSON object. + * @param insertNull Controls how empty tiles, tiles with an index of -1, in the map + * data are handled (see {@link Phaser.Tilemaps.Parsers.Tiled.ParseJSONTiled}). + */ + function ParseTileLayers(json: object, insertNull: boolean): Phaser.Tilemaps.LayerData[]; + + /** + * Tilesets and Image Collections + * @param json [description] + */ + function ParseTilesets(json: object): object; + + } + + } + /** * Create a Tilemap from the given key or data. If neither is given, make a blank Tilemap. When * loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing from @@ -79490,6 +82698,1163 @@ declare namespace Phaser { */ function ParseToTilemap(scene: Phaser.Scene, key?: string, tileWidth?: integer, tileHeight?: integer, width?: integer, height?: integer, data?: integer[][], insertNull?: boolean): Phaser.Tilemaps.Tilemap; + /** + * A Static Tilemap Layer is a Game Object that renders LayerData from a Tilemap when used in combination + * with one, or more, Tilesets. + * + * A Static Tilemap Layer is optimized for rendering speed over flexibility. You cannot apply per-tile + * effects like tint or alpha, or change the tiles or tilesets the layer uses. + * + * Use a Static Tilemap Layer instead of a Dynamic Tilemap Layer when you don't need tile manipulation features. + */ + class StaticTilemapLayer extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.ComputedSize, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible, Phaser.GameObjects.Components.ScrollFactor { + /** + * + * @param scene The Scene to which this Game Object belongs. + * @param tilemap The Tilemap this layer is a part of. + * @param layerIndex The index of the LayerData associated with this layer. + * @param tileset The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object. + * @param x The world x position where the top left of this layer will be placed. Default 0. + * @param y The world y position where the top left of this layer will be placed. Default 0. + */ + constructor(scene: Phaser.Scene, tilemap: Phaser.Tilemaps.Tilemap, layerIndex: integer, tileset: string | string[] | Phaser.Tilemaps.Tileset | Phaser.Tilemaps.Tileset[], x?: number, y?: number); + + /** + * Used internally by physics system to perform fast type checks. + */ + readonly isTilemap: boolean; + + /** + * The Tilemap that this layer is a part of. + */ + tilemap: Phaser.Tilemaps.Tilemap; + + /** + * The index of the LayerData associated with this layer. + */ + layerIndex: integer; + + /** + * The LayerData associated with this layer. LayerData can only be associated with one + * tilemap layer. + */ + layer: Phaser.Tilemaps.LayerData; + + /** + * The Tileset/s associated with this layer. + * + * As of Phaser 3.14 this property is now an array of Tileset objects, previously it was a single reference. + */ + tileset: Phaser.Tilemaps.Tileset[]; + + /** + * Used internally by the Canvas renderer. + * This holds the tiles that are visible within the camera in the last frame. + */ + culledTiles: any[]; + + /** + * Canvas only. + * + * You can control if the Cameras should cull tiles before rendering them or not. + * By default the camera will try to cull the tiles in this layer, to avoid over-drawing to the renderer. + * + * However, there are some instances when you may wish to disable this, and toggling this flag allows + * you to do so. Also see `setSkipCull` for a chainable method that does the same thing. + */ + skipCull: boolean; + + /** + * Canvas only. + * + * The total number of tiles drawn by the renderer in the last frame. + * + * This only works when rending with Canvas. + */ + readonly tilesDrawn: integer; + + /** + * Canvas only. + * + * The total number of tiles in this layer. Updated every frame. + */ + readonly tilesTotal: integer; + + /** + * Canvas only. + * + * The amount of extra tiles to add into the cull rectangle when calculating its horizontal size. + * + * See the method `setCullPadding` for more details. + */ + cullPaddingX: integer; + + /** + * Canvas only. + * + * The amount of extra tiles to add into the cull rectangle when calculating its vertical size. + * + * See the method `setCullPadding` for more details. + */ + cullPaddingY: integer; + + /** + * Canvas only. + * + * The callback that is invoked when the tiles are culled. + * + * By default it will call `TilemapComponents.CullTiles` but you can override this to call any function you like. + * + * It will be sent 3 arguments: + * + * 1. The Phaser.Tilemaps.LayerData object for this Layer + * 2. The Camera that is culling the layer. You can check its `dirty` property to see if it has changed since the last cull. + * 3. A reference to the `culledTiles` array, which should be used to store the tiles you want rendered. + * + * See the `TilemapComponents.CullTiles` source code for details on implementing your own culling system. + */ + cullCallback: Function; + + /** + * An array holding the mapping between the tile indexes and the tileset they belong to. + */ + gidMap: Phaser.Tilemaps.Tileset[]; + + /** + * Upload the tile data to a VBO. + * @param camera The camera to render to. + * @param tilesetIndex The tileset index. + */ + upload(camera: Phaser.Cameras.Scene2D.Camera, tilesetIndex: integer): Phaser.Tilemaps.StaticTilemapLayer; + + /** + * Sets the rendering (draw) order of the tiles in this layer. + * + * The default is 'right-down', meaning it will order the tiles starting from the top-left, + * drawing to the right and then moving down to the next row. + * + * The draw orders are: + * + * 0 = right-down + * 1 = left-down + * 2 = right-up + * 3 = left-up + * + * Setting the render order does not change the tiles or how they are stored in the layer, + * it purely impacts the order in which they are rendered. + * + * You can provide either an integer (0 to 3), or the string version of the order. + * @param renderOrder The render (draw) order value. Either an integer between 0 and 3, or a string: 'right-down', 'left-down', 'right-up' or 'left-up'. + */ + setRenderOrder(renderOrder: integer | string): this; + + /** + * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting + * faces are used internally for optimizing collisions against tiles. This method is mostly used + * internally to optimize recalculating faces when only one tile has been changed. + * @param tileX The x coordinate. + * @param tileY The y coordinate. + */ + calculateFacesAt(tileX: integer, tileY: integer): Phaser.Tilemaps.StaticTilemapLayer; + + /** + * Calculates interesting faces within the rectangular area specified (in tile coordinates) of the + * layer. Interesting faces are used internally for optimizing collisions against tiles. This method + * is mostly used internally. + * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. + * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. + */ + calculateFacesWithin(tileX?: integer, tileY?: integer, width?: integer, height?: integer): Phaser.Tilemaps.StaticTilemapLayer; + + /** + * Creates a Sprite for every object matching the given tile indexes in the layer. You can + * optionally specify if each tile will be replaced with a new tile after the Sprite has been + * 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 indexes 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 leave the tiles unchanged. If an array is given, it is assumed to be a + * one-to-one mapping with the indexes array. + * @param spriteConfig The config object to pass into the Sprite creator (i.e. + * scene.make.sprite). + * @param scene The Scene to create the Sprites within. Default scene the map is within. + * @param camera The Camera to use when determining the world XY Default main camera. + */ + createFromTiles(indexes: integer | any[], replacements: integer | any[], spriteConfig: Phaser.Types.GameObjects.Sprite.SpriteConfig, scene?: Phaser.Scene, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.GameObjects.Sprite[]; + + /** + * Returns the tiles in the given layer that are within the cameras viewport. + * This is used internally. + * @param camera The Camera to run the cull check against. + */ + cull(camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile[]; + + /** + * Canvas only. + * + * You can control if the Cameras should cull tiles before rendering them or not. + * By default the camera will try to cull the tiles in this layer, to avoid over-drawing to the renderer. + * + * However, there are some instances when you may wish to disable this. + * @param value Set to `true` to stop culling tiles. Set to `false` to enable culling again. Default true. + */ + setSkipCull(value?: boolean): this; + + /** + * Canvas only. + * + * When a Camera culls the tiles in this layer it does so using its view into the world, building up a + * rectangle inside which the tiles must exist or they will be culled. Sometimes you may need to expand the size + * of this 'cull rectangle', especially if you plan on rotating the Camera viewing the layer. Do so + * by providing the padding values. The values given are in tiles, not pixels. So if the tile width was 32px + * and you set `paddingX` to be 4, it would add 32px x 4 to the cull rectangle (adjusted for scale) + * @param paddingX The amount of extra horizontal tiles to add to the cull check padding. Default 1. + * @param paddingY The amount of extra vertical tiles to add to the cull check padding. Default 1. + */ + setCullPadding(paddingX?: integer, paddingY?: integer): this; + + /** + * Searches the entire map layer for the first tile matching the given index, then returns that Tile + * object. If no match is found, it returns null. 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 traveling 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. + */ + findByIndex(index: integer, skip?: integer, reverse?: boolean): Phaser.Tilemaps.Tile; + + /** + * Find the first tile in the given rectangular area (in tile coordinates) of the layer that + * satisfies the provided testing function. I.e. finds the first tile for which `callback` returns + * true. Similar to Array.prototype.find in vanilla JS. + * @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 tileX The left most tile index (in tile coordinates) to use as the origin of the area to filter. Default 0. + * @param tileY The topmost tile index (in tile coordinates) to use as the origin of the area to filter. Default 0. + * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. + * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. + * @param filteringOptions Optional filters to apply when getting the tiles. + */ + findTile(callback: Function, context?: object, tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions): Phaser.Tilemaps.Tile; + + /** + * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given + * filter callback function. Any tiles that pass the filter test (i.e. where the callback returns + * true) will returned as a new array. Similar to Array.prototype.Filter in vanilla JS. + * @param callback The callback. Each tile in the given area will be passed to this + * callback as the first and only parameter. The callback should return true for tiles that pass the + * filter. + * @param context The context under which the callback should be run. + * @param tileX The leftmost tile index (in tile coordinates) to use as the origin of the area to filter. Default 0. + * @param tileY The topmost tile index (in tile coordinates) to use as the origin of the area to filter. Default 0. + * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. + * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. + * @param filteringOptions Optional filters to apply when getting the tiles. + */ + filterTiles(callback: Function, context?: object, tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions): Phaser.Tilemaps.Tile[]; + + /** + * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given + * callback. Similar to Array.prototype.forEach in vanilla JS. + * @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 tileX The leftmost tile index (in tile coordinates) to use as the origin of the area to filter. Default 0. + * @param tileY The topmost tile index (in tile coordinates) to use as the origin of the area to filter. Default 0. + * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. + * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. + * @param filteringOptions Optional filters to apply when getting the tiles. + */ + forEachTile(callback: Function, context?: object, tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions): Phaser.Tilemaps.StaticTilemapLayer; + + /** + * Gets a tile at the given tile coordinates from the given layer. + * @param tileX X position to get the tile from (given in tile units, not pixels). + * @param tileY Y position to get the tile from (given in tile units, not pixels). + * @param nonNull If true getTile won't return null for empty tiles, but a Tile + * object with an index of -1. Default false. + */ + getTileAt(tileX: integer, tileY: integer, nonNull?: boolean): Phaser.Tilemaps.Tile; + + /** + * Gets a tile at the given world coordinates from the given layer. + * @param worldX X position to get the tile from (given in pixels) + * @param worldY Y position to get the tile from (given in pixels) + * @param nonNull If true, function won't return null for empty tiles, but a Tile + * object with an index of -1. Default false. + * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. + */ + getTileAtWorldXY(worldX: number, worldY: number, nonNull?: boolean, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile; + + /** + * Gets the tiles in the given rectangular area (in tile coordinates) of the layer. + * @param tileX The leftmost tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param tileY The topmost tile index (in tile coordinates) to use as the origin of the area. Default 0. + * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. + * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. + * @param filteringOptions Optional filters to apply when getting the tiles. + */ + getTilesWithin(tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions): Phaser.Tilemaps.Tile[]; + + /** + * Gets the tiles in the given rectangular area (in world coordinates) of the layer. + * @param worldX The leftmost tile index (in tile coordinates) to use as the origin of the area to filter. + * @param worldY The topmost tile index (in tile coordinates) to use as the origin of the area to filter. + * @param width How many tiles wide from the `tileX` index the area will be. + * @param height How many tiles high from the `tileY` index the area will be. + * @param filteringOptions Optional filters to apply when getting the tiles. + * @param camera The Camera to use when factoring in which tiles to return. Default main camera. + */ + getTilesWithinWorldXY(worldX: number, worldY: number, width: number, height: number, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile[]; + + /** + * Gets the tiles that overlap with the given shape in the given layer. The shape must be a Circle, + * Line, Rectangle or Triangle. The shape should be in world coordinates. + * @param shape A shape in world (pixel) coordinates + * @param filteringOptions Optional filters to apply when getting the tiles. + * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. + */ + getTilesWithinShape(shape: Phaser.Geom.Circle | Phaser.Geom.Line | Phaser.Geom.Rectangle | Phaser.Geom.Triangle, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile[]; + + /** + * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns + * false if there is no tile or if the tile at that location has an index of -1. + * @param tileX X position to get the tile from in tile coordinates. + * @param tileY Y position to get the tile from in tile coordinates. + */ + hasTileAt(tileX: integer, tileY: integer): boolean; + + /** + * Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns + * false if there is no tile or if the tile at that location has an index of -1. + * @param worldX The X coordinate of the world position. + * @param worldY The Y coordinate of the world position. + * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. + */ + hasTileAtWorldXY(worldX: number, worldY: number, camera?: Phaser.Cameras.Scene2D.Camera): boolean; + + /** + * Draws a debug representation of the layer to the given Graphics. This is helpful when you want to + * get a quick idea of which of your tiles are colliding and which have interesting faces. The tiles + * are drawn starting at (0, 0) in the Graphics, allowing you to place the debug representation + * wherever you want on the screen. + * @param graphics The target Graphics object to draw upon. + * @param styleConfig An object specifying the colors to use for the debug drawing. + */ + renderDebug(graphics: Phaser.GameObjects.Graphics, styleConfig: Phaser.Types.Tilemaps.StyleConfig): Phaser.Tilemaps.StaticTilemapLayer; + + /** + * Sets collision on the given tile or tiles within a layer by index. 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 indexes. + * @param collides If true it will enable collision. If false it will clear + * collision. Default true. + * @param recalculateFaces Whether or not to recalculate the tile faces after the + * update. Default true. + * @param updateLayer If true, updates the current tiles on the layer. Set to + * false if no tiles have been placed for significant performance boost. Default true. + */ + setCollision(indexes: integer | any[], collides?: boolean, recalculateFaces?: boolean, updateLayer?: boolean): Phaser.Tilemaps.StaticTilemapLayer; + + /** + * Sets collision on a range of tiles in a layer whose index is between the specified `start` and + * `stop` (inclusive). 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 recalculateFaces Whether or not to recalculate the tile faces after the + * update. Default true. + */ + setCollisionBetween(start: integer, stop: integer, collides?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.StaticTilemapLayer; + + /** + * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property + * that matches the given properties object, its collision flag will be set. The `collides` + * parameter controls if collision will be enabled (true) or disabled (false). Passing in + * `{ collides: true }` would update the collision flag on any tiles with a "collides" property that + * has a value of true. Any tile that doesn't have "collides" set to true will be ignored. You can + * also use an array of values, e.g. `{ types: ["stone", "lava", "sand" ] }`. If a tile has a + * "types" property that matches any of those values, its collision flag will be updated. + * @param properties An object with tile properties and corresponding values that should + * be checked. + * @param collides If true it will enable collision. If false it will clear + * collision. Default true. + * @param recalculateFaces Whether or not to recalculate the tile faces after the + * update. Default true. + */ + setCollisionByProperty(properties: object, collides?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.StaticTilemapLayer; + + /** + * Sets collision on all tiles in the given layer, except for tiles that have an index specified in + * the given array. The `collides` parameter controls if collision will be enabled (true) or + * disabled (false). + * @param indexes An array of the tile indexes to not be counted for collision. + * @param collides If true it will enable collision. If false it will clear + * collision. Default true. + * @param recalculateFaces Whether or not to recalculate the tile faces after the + * update. Default true. + */ + setCollisionByExclusion(indexes: integer[], collides?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.StaticTilemapLayer; + + /** + * Sets a global collision callback for the given tile index within the layer. This will affect all + * tiles on this layer that have the same index. 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. + */ + setTileIndexCallback(indexes: integer | any[], callback: Function, callbackContext: object): Phaser.Tilemaps.StaticTilemapLayer; + + /** + * Sets collision on the tiles within a layer by checking each tiles collision group data + * (typically defined in Tiled within the tileset collision editor). If any objects are found within + * a tiles collision group, the tile's colliding information will be set. The `collides` parameter + * controls if collision will be enabled (true) or disabled (false). + * @param collides If true it will enable collision. If false it will clear + * collision. Default true. + * @param recalculateFaces Whether or not to recalculate the tile faces after the + * update. Default true. + */ + setCollisionFromCollisionGroup(collides?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.StaticTilemapLayer; + + /** + * Sets a collision callback for the given rectangular area (in tile coordinates) within the layer. + * If a callback is already set for the tile index it will be replaced. Set the callback to null to + * remove it. + * @param tileX The leftmost tile index (in tile coordinates) to use as the origin of the area. + * @param tileY The topmost tile index (in tile coordinates) to use as the origin of the area. + * @param width How many tiles wide from the `tileX` index the area will be. + * @param height How many tiles tall from the `tileY` index the area will be. + * @param callback The callback that will be invoked when the tile is collided with. + * @param callbackContext The context under which the callback is called. + */ + setTileLocationCallback(tileX: integer, tileY: integer, width: integer, height: integer, callback: Function, callbackContext?: object): Phaser.Tilemaps.StaticTilemapLayer; + + /** + * Converts from tile X coordinates (tile units) to world X coordinates (pixels), factoring in the + * layers position, scale and scroll. + * @param tileX The X coordinate, in tile coordinates. + * @param camera The Camera to use when calculating the world values from the tile index. Default main camera. + */ + tileToWorldX(tileX: integer, camera?: Phaser.Cameras.Scene2D.Camera): number; + + /** + * Converts from tile Y coordinates (tile units) to world Y coordinates (pixels), factoring in the + * layers position, scale and scroll. + * @param tileY The Y coordinate, in tile coordinates. + * @param camera The Camera to use when calculating the world values from the tile index. Default main camera. + */ + tileToWorldY(tileY: integer, camera?: Phaser.Cameras.Scene2D.Camera): number; + + /** + * Converts from tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the + * layers position, scale and scroll. This will return a new Vector2 object or update the given + * `point` object. + * @param tileX The X coordinate, in tile coordinates. + * @param tileY The Y coordinate, in tile coordinates. + * @param point A Vector2 to store the coordinates in. If not given, a new Vector2 is created. + * @param camera The Camera to use when calculating the world values from the tile index. Default main camera. + */ + tileToWorldXY(tileX: integer, tileY: integer, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2; + + /** + * Converts from world X coordinates (pixels) to tile X coordinates (tile units), factoring in the + * layers position, scale and scroll. + * @param worldX The X coordinate, in world pixels. + * @param snapToFloor Whether or not to round the tile coordinate down to the + * nearest integer. Default true. + * @param camera The Camera to use when calculating the tile index from the world values.] Default main camera. + */ + worldToTileX(worldX: number, snapToFloor?: boolean, camera?: Phaser.Cameras.Scene2D.Camera): number; + + /** + * Converts from world Y coordinates (pixels) to tile Y coordinates (tile units), factoring in the + * layers position, scale and scroll. + * @param worldY The Y coordinate, in world pixels. + * @param snapToFloor Whether or not to round the tile coordinate down to the + * nearest integer. Default true. + * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. + */ + worldToTileY(worldY: number, snapToFloor?: boolean, camera?: Phaser.Cameras.Scene2D.Camera): number; + + /** + * Converts from world XY coordinates (pixels) to tile XY coordinates (tile units), factoring in the + * layers position, scale and scroll. This will return a new Vector2 object or update the given + * `point` object. + * @param worldX The X coordinate, in world pixels. + * @param worldY The Y coordinate, in world pixels. + * @param snapToFloor Whether or not to round the tile coordinate down to the + * nearest integer. Default true. + * @param point A Vector2 to store the coordinates in. If not given, a new Vector2 is created. + * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. + */ + worldToTileXY(worldX: number, worldY: number, snapToFloor?: boolean, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2; + + /** + * Destroys this StaticTilemapLayer and removes its link to the associated LayerData. + * @param removeFromTilemap Remove this layer from the parent Tilemap? Default true. + */ + destroy(removeFromTilemap?: boolean): void; + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. + * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. + * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. + */ + setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopLeft: number; + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopRight: number; + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomLeft: number; + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomRight: number; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * * ERASE + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + */ + blendMode: Phaser.BlendModes | string; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * * ERASE (only works when rendering to a framebuffer, like a Render Texture) + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency in which blend modes + * are used. + * @param value The BlendMode value. Either a string or a CONST. + */ + setBlendMode(value: string | Phaser.BlendModes): this; + + /** + * The native (un-scaled) width of this Game Object. + * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayWidth` property. + */ + width: number; + + /** + * The native (un-scaled) height of this Game Object. + * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayHeight` property. + */ + height: number; + + /** + * The displayed width of this Game Object. + * + * This value takes into account the scale factor. + * + * Setting this value will adjust the Game Object's scale property. + */ + displayWidth: number; + + /** + * The displayed height of this Game Object. + * + * This value takes into account the scale factor. + * + * Setting this value will adjust the Game Object's scale property. + */ + displayHeight: number; + + /** + * Sets the internal size of this Game Object, as used for frame or physics body creation. + * + * This will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or call the + * `setDisplaySize` method, which is the same thing as changing the scale but allows you + * to do so by giving pixel values. + * + * If you have enabled this Game Object for input, changing the size will _not_ change the + * size of the hit area. To do this you should adjust the `input.hitArea` object directly. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setSize(width: number, height: number): this; + + /** + * Sets the display size of this Game Object. + * + * Calling this will adjust the scale. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setDisplaySize(width: number, height: number): this; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + */ + depth: number; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * @param value The depth of this Game Object. + */ + setDepth(value: integer): this; + + /** + * The horizontally flipped state of the Game Object. + * + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + */ + flipX: boolean; + + /** + * The vertically flipped state of the Game Object. + * + * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + */ + flipY: boolean; + + /** + * Toggles the horizontal flipped state of this Game Object. + * + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + */ + toggleFlipX(): this; + + /** + * Toggles the vertical flipped state of this Game Object. + */ + toggleFlipY(): this; + + /** + * Sets the horizontal flipped state of this Game Object. + * + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipX(value: boolean): this; + + /** + * Sets the vertical flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipY(value: boolean): this; + + /** + * Sets the horizontal and vertical flipped state of this Game Object. + * + * A Game Object that is flipped will render inversed on the flipped axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * @param y The horizontal flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlip(x: boolean, y: boolean): this; + + /** + * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. + */ + resetFlip(): this; + + /** + * Gets the center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + */ + getCenter(output?: O): O; + + /** + * Gets the top-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the top-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopCenter(output?: O, includeParent?: boolean): O; + + /** + * Gets the top-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the left-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getLeftCenter(output?: O, includeParent?: boolean): O; + + /** + * Gets the right-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getRightCenter(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomCenter(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bounds of this Game Object, regardless of origin. + * The values are stored and returned in a Rectangle, or Rectangle-like, object. + * @param output An object to store the values in. If not provided a new Rectangle will be created. + */ + getBounds(output?: O): O; + + /** + * The horizontal origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the left of the Game Object. + */ + originX: number; + + /** + * The vertical origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the top of the Game Object. + */ + originY: number; + + /** + * The horizontal display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginX: number; + + /** + * The vertical display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginY: number; + + /** + * Sets the origin of this Game Object. + * + * The values are given in the range 0 to 1. + * @param x The horizontal origin value. Default 0.5. + * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x. + */ + setOrigin(x?: number, y?: number): this; + + /** + * Sets the origin of this Game Object based on the Pivot values in its Frame. + */ + setOriginFromFrame(): this; + + /** + * Sets the display origin of this Game Object. + * The difference between this and setting the origin is that you can use pixel values for setting the display origin. + * @param x The horizontal display origin value. Default 0. + * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x. + */ + setDisplayOrigin(x?: number, y?: number): this; + + /** + * Updates the Display Origin cached values internally stored on this Game Object. + * You don't usually call this directly, but it is exposed for edge-cases where you may. + */ + updateDisplayOrigin(): this; + + /** + * The initial WebGL pipeline of this Game Object. + */ + defaultPipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * The current WebGL pipeline of this Game Object. + */ + pipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * This should only be called during the instantiation of the Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. Defaults to the Texture Tint Pipeline. Default TextureTintPipeline. + */ + initPipeline(pipelineName?: string): boolean; + + /** + * Sets the active WebGL Pipeline of this Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + setPipeline(pipelineName: string): this; + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + */ + resetPipeline(): boolean; + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + */ + getPipelineName(): string; + + /** + * The x position of this Game Object. + */ + x: number; + + /** + * The y position of this Game Object. + */ + y: number; + + /** + * The z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. + */ + z: number; + + /** + * The w position of this Game Object. + */ + w: number; + + /** + * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object + * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`. + * + * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this + * isn't the case, use the `scaleX` or `scaleY` properties instead. + */ + scale: number; + + /** + * The horizontal scale of this Game Object. + */ + scaleX: number; + + /** + * The vertical scale of this Game Object. + */ + scaleY: number; + + /** + * The angle of this Game Object as expressed in degrees. + * + * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left + * and -90 is up. + * + * If you prefer to work in radians, see the `rotation` property instead. + */ + angle: integer; + + /** + * The angle of this Game Object in radians. + * + * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left + * and -90 is up. + * + * If you prefer to work in degrees, see the `angle` property instead. + */ + rotation: number; + + /** + * Sets the position of this Game Object. + * @param x The x position of this Game Object. Default 0. + * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. + * @param z The z position of this Game Object. Default 0. + * @param w The w position of this Game Object. Default 0. + */ + setPosition(x?: number, y?: number, z?: number, w?: number): this; + + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * @param x The x position of the top-left of the random area. Default 0. + * @param y The y position of the top-left of the random area. Default 0. + * @param width The width of the random area. + * @param height The height of the random area. + */ + setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; + + /** + * Sets the rotation of this Game Object. + * @param radians The rotation of this Game Object, in radians. Default 0. + */ + setRotation(radians?: number): this; + + /** + * Sets the angle of this Game Object. + * @param degrees The rotation of this Game Object, in degrees. Default 0. + */ + setAngle(degrees?: number): this; + + /** + * Sets the scale of this Game Object. + * @param x The horizontal scale of this Game Object. + * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. + */ + setScale(x: number, y?: number): this; + + /** + * Sets the x position of this Game Object. + * @param value The x position of this Game Object. Default 0. + */ + setX(value?: number): this; + + /** + * Sets the y position of this Game Object. + * @param value The y position of this Game Object. Default 0. + */ + setY(value?: number): this; + + /** + * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. + * @param value The z position of this Game Object. Default 0. + */ + setZ(value?: number): this; + + /** + * Sets the w position of this Game Object. + * @param value The w position of this Game Object. Default 0. + */ + setW(value?: number): this; + + /** + * Gets the local transform matrix for this Game Object. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * @param tempMatrix The matrix to populate with the values from this Game Object. + * @param parentMatrix A temporary matrix to hold parent values during the calculations. + */ + getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Gets the sum total rotation of all of this Game Objects parent Containers. + * + * The returned value is in radians and will be zero if this Game Object has no parent container. + */ + getParentRotation(): number; + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + */ + visible: boolean; + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): this; + + /** + * The horizontal scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * + * Please be aware that scroll factor values other than 1 are not taken in to consideration when + * calculating physics collisions. Bodies always collide based on their world position, but changing + * the scroll factor is a visual adjustment to where the textures are rendered, which can offset + * them from physics bodies if not accounted for in your code. + */ + scrollFactorX: number; + + /** + * The vertical scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * + * Please be aware that scroll factor values other than 1 are not taken in to consideration when + * calculating physics collisions. Bodies always collide based on their world position, but changing + * the scroll factor is a visual adjustment to where the textures are rendered, which can offset + * them from physics bodies if not accounted for in your code. + */ + scrollFactorY: number; + + /** + * Sets the scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * + * Please be aware that scroll factor values other than 1 are not taken in to consideration when + * calculating physics collisions. Bodies always collide based on their world position, but changing + * the scroll factor is a visual adjustment to where the textures are rendered, which can offset + * them from physics bodies if not accounted for in your code. + * @param x The horizontal scroll factor of this Game Object. + * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. + */ + setScrollFactor(x: number, y?: number): this; + + } + /** * A Tile is a representation of a single tile within the Tilemap. This is a lightweight data * representation, so its position information is stored without factoring in scroll, layer @@ -81136,2911 +85501,6 @@ declare namespace Phaser { } - namespace Components { - } - - /** - * A Dynamic Tilemap Layer is a Game Object that renders LayerData from a Tilemap when used in combination - * with one, or more, Tilesets. - * - * A Dynamic Tilemap Layer trades some speed for being able to apply powerful effects. Unlike a - * Static Tilemap Layer, you can apply per-tile effects like tint or alpha, and you can change the - * tiles in a DynamicTilemapLayer. - * - * Use this over a Static Tilemap Layer when you need those features. - */ - class DynamicTilemapLayer extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.ComputedSize, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { - /** - * - * @param scene The Scene to which this Game Object belongs. - * @param tilemap The Tilemap this layer is a part of. - * @param layerIndex The index of the LayerData associated with this layer. - * @param tileset The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object. - * @param x The world x position where the top left of this layer will be placed. Default 0. - * @param y The world y position where the top left of this layer will be placed. Default 0. - */ - constructor(scene: Phaser.Scene, tilemap: Phaser.Tilemaps.Tilemap, layerIndex: integer, tileset: string | string[] | Phaser.Tilemaps.Tileset | Phaser.Tilemaps.Tileset[], x?: number, y?: number); - - /** - * Used internally by physics system to perform fast type checks. - */ - readonly isTilemap: boolean; - - /** - * The Tilemap that this layer is a part of. - */ - tilemap: Phaser.Tilemaps.Tilemap; - - /** - * The index of the LayerData associated with this layer. - */ - layerIndex: integer; - - /** - * The LayerData associated with this layer. LayerData can only be associated with one - * tilemap layer. - */ - layer: Phaser.Tilemaps.LayerData; - - /** - * The Tileset/s associated with this layer. - * - * As of Phaser 3.14 this property is now an array of Tileset objects, previously it was a single reference. - */ - tileset: Phaser.Tilemaps.Tileset[]; - - /** - * Used internally with the canvas render. This holds the tiles that are visible within the - * camera. - */ - culledTiles: any[]; - - /** - * You can control if the Cameras should cull tiles before rendering them or not. - * By default the camera will try to cull the tiles in this layer, to avoid over-drawing to the renderer. - * - * However, there are some instances when you may wish to disable this, and toggling this flag allows - * you to do so. Also see `setSkipCull` for a chainable method that does the same thing. - */ - skipCull: boolean; - - /** - * The total number of tiles drawn by the renderer in the last frame. - */ - readonly tilesDrawn: integer; - - /** - * The total number of tiles in this layer. Updated every frame. - */ - readonly tilesTotal: integer; - - /** - * The amount of extra tiles to add into the cull rectangle when calculating its horizontal size. - * - * See the method `setCullPadding` for more details. - */ - cullPaddingX: integer; - - /** - * The amount of extra tiles to add into the cull rectangle when calculating its vertical size. - * - * See the method `setCullPadding` for more details. - */ - cullPaddingY: integer; - - /** - * The callback that is invoked when the tiles are culled. - * - * By default it will call `TilemapComponents.CullTiles` but you can override this to call any function you like. - * - * It will be sent 3 arguments: - * - * 1. The Phaser.Tilemaps.LayerData object for this Layer - * 2. The Camera that is culling the layer. You can check its `dirty` property to see if it has changed since the last cull. - * 3. A reference to the `culledTiles` array, which should be used to store the tiles you want rendered. - * - * See the `TilemapComponents.CullTiles` source code for details on implementing your own culling system. - */ - cullCallback: Function; - - /** - * An array holding the mapping between the tile indexes and the tileset they belong to. - */ - gidMap: Phaser.Tilemaps.Tileset[]; - - /** - * Sets the rendering (draw) order of the tiles in this layer. - * - * The default is 'right-down', meaning it will order the tiles starting from the top-left, - * drawing to the right and then moving down to the next row. - * - * The draw orders are: - * - * 0 = right-down - * 1 = left-down - * 2 = right-up - * 3 = left-up - * - * Setting the render order does not change the tiles or how they are stored in the layer, - * it purely impacts the order in which they are rendered. - * - * You can provide either an integer (0 to 3), or the string version of the order. - * @param renderOrder The render (draw) order value. Either an integer between 0 and 3, or a string: 'right-down', 'left-down', 'right-up' or 'left-up'. - */ - setRenderOrder(renderOrder: integer | string): this; - - /** - * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting - * faces are used internally for optimizing collisions against tiles. This method is mostly used - * internally to optimize recalculating faces when only one tile has been changed. - * @param tileX The x coordinate. - * @param tileY The y coordinate. - */ - calculateFacesAt(tileX: integer, tileY: integer): Phaser.Tilemaps.DynamicTilemapLayer; - - /** - * Calculates interesting faces within the rectangular area specified (in tile coordinates) of the - * layer. Interesting faces are used internally for optimizing collisions against tiles. This method - * is mostly used internally. - * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. - * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. - */ - calculateFacesWithin(tileX?: integer, tileY?: integer, width?: integer, height?: integer): Phaser.Tilemaps.DynamicTilemapLayer; - - /** - * Creates a Sprite for every object matching the given tile indexes in the layer. You can - * optionally specify if each tile will be replaced with a new tile after the Sprite has been - * 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 indexes 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 leave the tiles unchanged. If an array is given, it is assumed to be a - * one-to-one mapping with the indexes array. - * @param spriteConfig The config object to pass into the Sprite creator (i.e. - * scene.make.sprite). - * @param scene The Scene to create the Sprites within. Default scene the map is within. - * @param camera The Camera to use when determining the world XY Default main camera. - */ - createFromTiles(indexes: integer | any[], replacements: integer | any[], spriteConfig: Phaser.Types.GameObjects.Sprite.SpriteConfig, scene?: Phaser.Scene, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.GameObjects.Sprite[]; - - /** - * Returns the tiles in the given layer that are within the cameras viewport. - * This is used internally. - * @param camera The Camera to run the cull check against. - */ - cull(camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile[]; - - /** - * Copies the tiles in the source rectangular area to a new destination (all specified in tile - * coordinates) within the layer. This copies all tile properties & recalculates collision - * information in the destination region. - * @param srcTileX The x coordinate of the area to copy from, in tiles, not pixels. - * @param srcTileY The y coordinate of the area to copy from, in tiles, not pixels. - * @param width The width of the area to copy, in tiles, not pixels. - * @param height The height of the area to copy, in tiles, not pixels. - * @param destTileX The x coordinate of the area to copy to, in tiles, not pixels. - * @param destTileY The y coordinate of the area to copy to, in tiles, not pixels. - * @param recalculateFaces `true` if the faces data should be recalculated. Default true. - */ - copy(srcTileX: integer, srcTileY: integer, width: integer, height: integer, destTileX: integer, destTileY: integer, recalculateFaces?: boolean): Phaser.Tilemaps.DynamicTilemapLayer; - - /** - * Destroys this DynamicTilemapLayer and removes its link to the associated LayerData. - * @param removeFromTilemap Remove this layer from the parent Tilemap? Default true. - */ - destroy(removeFromTilemap?: boolean): void; - - /** - * Sets the tiles in the given rectangular area (in tile coordinates) of the layer with the - * specified index. Tiles will be set to collide if the given index is a colliding index. - * Collision information in the region will be recalculated. - * @param index The tile index to fill the area with. - * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. - * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. - * @param recalculateFaces `true` if the faces data should be recalculated. Default true. - */ - fill(index: integer, tileX?: integer, tileY?: integer, width?: integer, height?: integer, recalculateFaces?: boolean): Phaser.Tilemaps.DynamicTilemapLayer; - - /** - * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given - * filter callback function. Any tiles that pass the filter test (i.e. where the callback returns - * true) will returned as a new array. Similar to Array.prototype.Filter in vanilla JS. - * @param callback The callback. Each tile in the given area will be passed to this - * callback as the first and only parameter. The callback should return true for tiles that pass the - * filter. - * @param context The context under which the callback should be run. - * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area to filter. Default 0. - * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area to filter. Default 0. - * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. - * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. - * @param filteringOptions Optional filters to apply when getting the tiles. - */ - filterTiles(callback: Function, context?: object, tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions): Phaser.Tilemaps.Tile[]; - - /** - * Searches the entire map layer for the first tile matching the given index, then returns that Tile - * object. If no match is found, it returns null. 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 traveling 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. - */ - findByIndex(index: integer, skip?: integer, reverse?: boolean): Phaser.Tilemaps.Tile; - - /** - * Find the first tile in the given rectangular area (in tile coordinates) of the layer that - * satisfies the provided testing function. I.e. finds the first tile for which `callback` returns - * true. Similar to Array.prototype.find in vanilla JS. - * @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 tileX The left most tile index (in tile coordinates) to use as the origin of the area to search. Default 0. - * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area to search. Default 0. - * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. - * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. - * @param filteringOptions Optional filters to apply when getting the tiles. - */ - findTile(callback: FindTileCallback, context?: object, tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions): Phaser.Tilemaps.Tile; - - /** - * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given - * callback. Similar to Array.prototype.forEach in vanilla JS. - * @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 tileX The left most tile index (in tile coordinates) to use as the origin of the area to search. Default 0. - * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area to search. Default 0. - * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. - * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. - * @param filteringOptions Optional filters to apply when getting the tiles. - */ - forEachTile(callback: EachTileCallback, context?: object, tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions): Phaser.Tilemaps.DynamicTilemapLayer; - - /** - * Gets a tile at the given tile coordinates from the given layer. - * @param tileX X position to get the tile from (given in tile units, not pixels). - * @param tileY Y position to get the tile from (given in tile units, not pixels). - * @param nonNull If true getTile won't return null for empty tiles, but a Tile object with an index of -1. Default false. - */ - getTileAt(tileX: integer, tileY: integer, nonNull?: boolean): Phaser.Tilemaps.Tile; - - /** - * Gets a tile at the given world coordinates from the given layer. - * @param worldX X position to get the tile from (given in pixels) - * @param worldY Y position to get the tile from (given in pixels) - * @param nonNull If true, function won't return null for empty tiles, but a Tile object with an index of -1. Default false. - * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. - */ - getTileAtWorldXY(worldX: number, worldY: number, nonNull?: boolean, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile; - - /** - * Gets the tiles in the given rectangular area (in tile coordinates) of the layer. - * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. - * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. - * @param filteringOptions Optional filters to apply when getting the tiles. - */ - getTilesWithin(tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions): Phaser.Tilemaps.Tile[]; - - /** - * Gets the tiles that overlap with the given shape in the given layer. The shape must be a Circle, - * Line, Rectangle or Triangle. The shape should be in world coordinates. - * @param shape A shape in world (pixel) coordinates - * @param filteringOptions Optional filters to apply when getting the tiles. - * @param camera The Camera to use when factoring in which tiles to return. Default main camera. - */ - getTilesWithinShape(shape: Phaser.Geom.Circle | Phaser.Geom.Line | Phaser.Geom.Rectangle | Phaser.Geom.Triangle, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile[]; - - /** - * Gets the tiles in the given rectangular area (in world coordinates) of the layer. - * @param worldX The world x coordinate for the top-left of the area. - * @param worldY The world y coordinate for the top-left of the area. - * @param width The width of the area. - * @param height The height of the area. - * @param filteringOptions Optional filters to apply when getting the tiles. - * @param camera The Camera to use when factoring in which tiles to return. Default main camera. - */ - getTilesWithinWorldXY(worldX: number, worldY: number, width: number, height: number, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile[]; - - /** - * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns - * false if there is no tile or if the tile at that location has an index of -1. - * @param tileX The x coordinate, in tiles, not pixels. - * @param tileY The y coordinate, in tiles, not pixels. - */ - hasTileAt(tileX: integer, tileY: integer): boolean; - - /** - * Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns - * false if there is no tile or if the tile at that location has an index of -1. - * @param worldX The x coordinate, in pixels. - * @param worldY The y coordinate, in pixels. - * @param camera The Camera to use when factoring in which tiles to return. Default main camera. - */ - hasTileAtWorldXY(worldX: number, worldY: number, camera?: Phaser.Cameras.Scene2D.Camera): boolean; - - /** - * Puts a tile at the given tile coordinates in the specified layer. You can pass in either an index - * or a Tile object. If you pass in a Tile, all attributes will be copied over to the specified - * location. If you pass in an index, only the index at the specified location will be changed. - * Collision information will be recalculated at the specified location. - * @param tile The index of this tile to set or a Tile object. - * @param tileX The x coordinate, in tiles, not pixels. - * @param tileY The y coordinate, in tiles, not pixels. - * @param recalculateFaces `true` if the faces data should be recalculated. Default true. - */ - putTileAt(tile: integer | Phaser.Tilemaps.Tile, tileX: integer, tileY: integer, recalculateFaces?: boolean): Phaser.Tilemaps.Tile; - - /** - * Puts a tile at the given world coordinates (pixels) in the specified layer. You can pass in either - * an index or a Tile object. If you pass in a Tile, all attributes will be copied over to the - * specified location. If you pass in an index, only the index at the specified location will be - * changed. Collision information will be recalculated at the specified location. - * @param tile The index of this tile to set or a Tile object. - * @param worldX The x coordinate, in pixels. - * @param worldY The y coordinate, in pixels. - * @param recalculateFaces `true` if the faces data should be recalculated. Default true. - * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. - */ - putTileAtWorldXY(tile: integer | Phaser.Tilemaps.Tile, worldX: number, worldY: number, recalculateFaces?: boolean, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile; - - /** - * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified - * layer. The array can be composed of either tile indexes or Tile objects. If you pass in a Tile, - * all attributes will be copied over to the specified location. If you pass in an index, only the - * index at the specified location will be changed. Collision information will be recalculated - * within the region tiles were changed. - * @param tile A row (array) or grid (2D array) of Tiles or tile indexes to place. - * @param tileX The x coordinate, in tiles, not pixels. - * @param tileY The y coordinate, in tiles, not pixels. - * @param recalculateFaces `true` if the faces data should be recalculated. Default true. - */ - putTilesAt(tile: integer[] | integer[][] | Phaser.Tilemaps.Tile[] | Phaser.Tilemaps.Tile[][], tileX: integer, tileY: integer, recalculateFaces?: boolean): Phaser.Tilemaps.DynamicTilemapLayer; - - /** - * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the - * specified layer. Each tile will receive a new index. If an array of indexes is passed in, then - * those will be used for randomly assigning new tile indexes. If an array is not provided, the - * indexes found within the region (excluding -1) will be used for randomly assigning new tile - * indexes. This method only modifies tile indexes and does not change collision information. - * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. - * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. - * @param indexes An array of indexes to randomly draw from during randomization. - */ - randomize(tileX?: integer, tileY?: integer, width?: integer, height?: integer, indexes?: integer[]): Phaser.Tilemaps.DynamicTilemapLayer; - - /** - * Removes the tile at the given tile coordinates in the specified layer and updates the layer's - * collision information. - * @param tileX The x coordinate, in tiles, not pixels. - * @param tileY The y coordinate, in tiles, not pixels. - * @param replaceWithNull If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1. Default true. - * @param recalculateFaces `true` if the faces data should be recalculated. Default true. - */ - removeTileAt(tileX: integer, tileY: integer, replaceWithNull?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.Tile; - - /** - * Removes the tile at the given world coordinates in the specified layer and updates the layer's - * collision information. - * @param worldX The x coordinate, in pixels. - * @param worldY The y coordinate, in pixels. - * @param replaceWithNull If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1. Default true. - * @param recalculateFaces `true` if the faces data should be recalculated. Default true. - * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. - */ - removeTileAtWorldXY(worldX: number, worldY: number, replaceWithNull?: boolean, recalculateFaces?: boolean, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile; - - /** - * Draws a debug representation of the layer to the given Graphics. This is helpful when you want to - * get a quick idea of which of your tiles are colliding and which have interesting faces. The tiles - * are drawn starting at (0, 0) in the Graphics, allowing you to place the debug representation - * wherever you want on the screen. - * @param graphics The target Graphics object to draw upon. - * @param styleConfig An object specifying the colors to use for the debug drawing. - */ - renderDebug(graphics: Phaser.GameObjects.Graphics, styleConfig: Phaser.Types.Tilemaps.StyleConfig): Phaser.Tilemaps.DynamicTilemapLayer; - - /** - * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching - * `findIndex` and updates their index to match `newIndex`. This only modifies the index and does - * not change collision information. - * @param findIndex The index of the tile to search for. - * @param newIndex The index of the tile to replace it with. - * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. - * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. - */ - replaceByIndex(findIndex: integer, newIndex: integer, tileX?: integer, tileY?: integer, width?: integer, height?: integer): Phaser.Tilemaps.DynamicTilemapLayer; - - /** - * You can control if the Cameras should cull tiles before rendering them or not. - * By default the camera will try to cull the tiles in this layer, to avoid over-drawing to the renderer. - * - * However, there are some instances when you may wish to disable this. - * @param value Set to `true` to stop culling tiles. Set to `false` to enable culling again. Default true. - */ - setSkipCull(value?: boolean): this; - - /** - * When a Camera culls the tiles in this layer it does so using its view into the world, building up a - * rectangle inside which the tiles must exist or they will be culled. Sometimes you may need to expand the size - * of this 'cull rectangle', especially if you plan on rotating the Camera viewing the layer. Do so - * by providing the padding values. The values given are in tiles, not pixels. So if the tile width was 32px - * and you set `paddingX` to be 4, it would add 32px x 4 to the cull rectangle (adjusted for scale) - * @param paddingX The amount of extra horizontal tiles to add to the cull check padding. Default 1. - * @param paddingY The amount of extra vertical tiles to add to the cull check padding. Default 1. - */ - setCullPadding(paddingX?: integer, paddingY?: integer): this; - - /** - * Sets collision on the given tile or tiles within a layer by index. 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). - * - * If no layer specified, the map's current layer is used. - * @param indexes Either a single tile index, or an array of tile indexes. - * @param collides If true it will enable collision. If false it will clear collision. Default true. - * @param recalculateFaces Whether or not to recalculate the tile faces after the update. Default true. - * @param updateLayer If true, updates the current tiles on the layer. Set to - * false if no tiles have been placed for significant performance boost. Default true. - */ - setCollision(indexes: integer | any[], collides?: boolean, recalculateFaces?: boolean, updateLayer?: boolean): Phaser.Tilemaps.Tilemap; - - /** - * Sets collision on a range of tiles in a layer whose index is between the specified `start` and - * `stop` (inclusive). 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 recalculateFaces Whether or not to recalculate the tile faces after the update. Default true. - */ - setCollisionBetween(start: integer, stop: integer, collides?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.DynamicTilemapLayer; - - /** - * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property - * that matches the given properties object, its collision flag will be set. The `collides` - * parameter controls if collision will be enabled (true) or disabled (false). Passing in - * `{ collides: true }` would update the collision flag on any tiles with a "collides" property that - * has a value of true. Any tile that doesn't have "collides" set to true will be ignored. You can - * also use an array of values, e.g. `{ types: ["stone", "lava", "sand" ] }`. If a tile has a - * "types" property that matches any of those values, its collision flag will be updated. - * @param properties An object with tile properties and corresponding values that should be checked. - * @param collides If true it will enable collision. If false it will clear collision. Default true. - * @param recalculateFaces Whether or not to recalculate the tile faces after the update. Default true. - */ - setCollisionByProperty(properties: object, collides?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.DynamicTilemapLayer; - - /** - * Sets collision on all tiles in the given layer, except for tiles that have an index specified in - * the given array. The `collides` parameter controls if collision will be enabled (true) or - * disabled (false). - * @param indexes An array of the tile indexes to not be counted for collision. - * @param collides If true it will enable collision. If false it will clear collision. Default true. - * @param recalculateFaces Whether or not to recalculate the tile faces after the update. Default true. - */ - setCollisionByExclusion(indexes: integer[], collides?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.DynamicTilemapLayer; - - /** - * Sets collision on the tiles within a layer by checking each tiles collision group data - * (typically defined in Tiled within the tileset collision editor). If any objects are found within - * a tiles collision group, the tile's colliding information will be set. The `collides` parameter - * controls if collision will be enabled (true) or disabled (false). - * @param collides If true it will enable collision. If false it will clear collision. Default true. - * @param recalculateFaces Whether or not to recalculate the tile faces after the update. Default true. - */ - setCollisionFromCollisionGroup(collides?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.DynamicTilemapLayer; - - /** - * Sets a global collision callback for the given tile index within the layer. This will affect all - * tiles on this layer that have the same index. 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. - */ - setTileIndexCallback(indexes: integer | integer[], callback: Function, callbackContext: object): Phaser.Tilemaps.DynamicTilemapLayer; - - /** - * Sets a collision callback for the given rectangular area (in tile coordinates) within the layer. - * If a callback is already set for the tile index it will be replaced. Set the callback to null to - * remove it. - * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. - * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. - * @param callback The callback that will be invoked when the tile is collided with. - * @param callbackContext The context under which the callback is called. - */ - setTileLocationCallback(tileX?: integer, tileY?: integer, width?: integer, height?: integer, callback?: Function, callbackContext?: object): Phaser.Tilemaps.DynamicTilemapLayer; - - /** - * Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given - * layer. It will only randomize the tiles in that area, so if they're all the same nothing will - * appear to have changed! This method only modifies tile indexes and does not change collision - * information. - * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. - * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. - */ - shuffle(tileX?: integer, tileY?: integer, width?: integer, height?: integer): Phaser.Tilemaps.DynamicTilemapLayer; - - /** - * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching - * `indexA` and swaps then with `indexB`. This only modifies the index and does not change collision - * information. - * @param tileA First tile index. - * @param tileB Second tile index. - * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. - * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. - */ - swapByIndex(tileA: integer, tileB: integer, tileX?: integer, tileY?: integer, width?: integer, height?: integer): Phaser.Tilemaps.DynamicTilemapLayer; - - /** - * Converts from tile X coordinates (tile units) to world X coordinates (pixels), factoring in the - * layers position, scale and scroll. - * @param tileX The x coordinate, in tiles, not pixels. - * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. - */ - tileToWorldX(tileX: integer, camera?: Phaser.Cameras.Scene2D.Camera): number; - - /** - * Converts from tile Y coordinates (tile units) to world Y coordinates (pixels), factoring in the - * layers position, scale and scroll. - * @param tileY The y coordinate, in tiles, not pixels. - * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. - */ - tileToWorldY(tileY: integer, camera?: Phaser.Cameras.Scene2D.Camera): number; - - /** - * Converts from tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the - * layers position, scale and scroll. This will return a new Vector2 object or update the given - * `point` object. - * @param tileX The x coordinate, in tiles, not pixels. - * @param tileY The y coordinate, in tiles, not pixels. - * @param point A Vector2 to store the coordinates in. If not given a new Vector2 is created. - * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. - */ - tileToWorldXY(tileX: integer, tileY: integer, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2; - - /** - * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the - * specified layer. Each tile will receive a new index. New indexes are drawn from the given - * weightedIndexes array. An example weighted array: - * - * [ - * { index: 6, weight: 4 }, // Probability of index 6 is 4 / 8 - * { index: 7, weight: 2 }, // Probability of index 7 would be 2 / 8 - * { index: 8, weight: 1.5 }, // Probability of index 8 would be 1.5 / 8 - * { index: 26, weight: 0.5 } // Probability of index 27 would be 0.5 / 8 - * ] - * - * The probability of any index being choose is (the index's weight) / (sum of all weights). This - * method only modifies tile indexes and does not change collision information. - * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. - * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. - * @param weightedIndexes An array of objects to randomly draw from during - * randomization. They should be in the form: { index: 0, weight: 4 } or - * { index: [0, 1], weight: 4 } if you wish to draw from multiple tile indexes. - */ - weightedRandomize(tileX?: integer, tileY?: integer, width?: integer, height?: integer, weightedIndexes?: object[]): Phaser.Tilemaps.DynamicTilemapLayer; - - /** - * Converts from world X coordinates (pixels) to tile X coordinates (tile units), factoring in the - * layers position, scale and scroll. - * @param worldX The x coordinate to be converted, in pixels, not tiles. - * @param snapToFloor Whether or not to round the tile coordinate down to the nearest integer. Default true. - * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. - */ - worldToTileX(worldX: number, snapToFloor?: boolean, camera?: Phaser.Cameras.Scene2D.Camera): number; - - /** - * Converts from world Y coordinates (pixels) to tile Y coordinates (tile units), factoring in the - * layers position, scale and scroll. - * @param worldY The y coordinate to be converted, in pixels, not tiles. - * @param snapToFloor Whether or not to round the tile coordinate down to the nearest integer. Default true. - * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. - */ - worldToTileY(worldY: number, snapToFloor?: boolean, camera?: Phaser.Cameras.Scene2D.Camera): number; - - /** - * Converts from world XY coordinates (pixels) to tile XY coordinates (tile units), factoring in the - * layers position, scale and scroll. This will return a new Vector2 object or update the given - * `point` object. - * @param worldX The x coordinate to be converted, in pixels, not tiles. - * @param worldY The y coordinate to be converted, in pixels, not tiles. - * @param snapToFloor Whether or not to round the tile coordinate down to the nearest integer. Default true. - * @param point A Vector2 to store the coordinates in. If not given a new Vector2 is created. - * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. - */ - worldToTileXY(worldX: number, worldY: number, snapToFloor?: boolean, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2; - - /** - * Clears all alpha values associated with this Game Object. - * - * Immediately sets the alpha levels back to 1 (fully opaque). - */ - clearAlpha(): this; - - /** - * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. - * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. - * - * If your game is running under WebGL you can optionally specify four different alpha values, each of which - * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. - * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. - * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. - * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. - * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. - */ - setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; - - /** - * The alpha value of the Game Object. - * - * This is a global value, impacting the entire Game Object, not just a region of it. - */ - alpha: number; - - /** - * The alpha value starting from the top-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopLeft: number; - - /** - * The alpha value starting from the top-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopRight: number; - - /** - * The alpha value starting from the bottom-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomLeft: number; - - /** - * The alpha value starting from the bottom-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomRight: number; - - /** - * Sets the Blend Mode being used by this Game Object. - * - * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) - * - * Under WebGL only the following Blend Modes are available: - * - * * ADD - * * MULTIPLY - * * SCREEN - * * ERASE - * - * Canvas has more available depending on browser support. - * - * You can also create your own custom Blend Modes in WebGL. - * - * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending - * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these - * reasons try to be careful about the construction of your Scene and the frequency of which blend modes - * are used. - */ - blendMode: Phaser.BlendModes | string; - - /** - * Sets the Blend Mode being used by this Game Object. - * - * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) - * - * Under WebGL only the following Blend Modes are available: - * - * * ADD - * * MULTIPLY - * * SCREEN - * * ERASE (only works when rendering to a framebuffer, like a Render Texture) - * - * Canvas has more available depending on browser support. - * - * You can also create your own custom Blend Modes in WebGL. - * - * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending - * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these - * reasons try to be careful about the construction of your Scene and the frequency in which blend modes - * are used. - * @param value The BlendMode value. Either a string or a CONST. - */ - setBlendMode(value: string | Phaser.BlendModes): this; - - /** - * The native (un-scaled) width of this Game Object. - * - * Changing this value will not change the size that the Game Object is rendered in-game. - * For that you need to either set the scale of the Game Object (`setScale`) or use - * the `displayWidth` property. - */ - width: number; - - /** - * The native (un-scaled) height of this Game Object. - * - * Changing this value will not change the size that the Game Object is rendered in-game. - * For that you need to either set the scale of the Game Object (`setScale`) or use - * the `displayHeight` property. - */ - height: number; - - /** - * The displayed width of this Game Object. - * - * This value takes into account the scale factor. - * - * Setting this value will adjust the Game Object's scale property. - */ - displayWidth: number; - - /** - * The displayed height of this Game Object. - * - * This value takes into account the scale factor. - * - * Setting this value will adjust the Game Object's scale property. - */ - displayHeight: number; - - /** - * Sets the internal size of this Game Object, as used for frame or physics body creation. - * - * This will not change the size that the Game Object is rendered in-game. - * For that you need to either set the scale of the Game Object (`setScale`) or call the - * `setDisplaySize` method, which is the same thing as changing the scale but allows you - * to do so by giving pixel values. - * - * If you have enabled this Game Object for input, changing the size will _not_ change the - * size of the hit area. To do this you should adjust the `input.hitArea` object directly. - * @param width The width of this Game Object. - * @param height The height of this Game Object. - */ - setSize(width: number, height: number): this; - - /** - * Sets the display size of this Game Object. - * - * Calling this will adjust the scale. - * @param width The width of this Game Object. - * @param height The height of this Game Object. - */ - setDisplaySize(width: number, height: number): this; - - /** - * The depth of this Game Object within the Scene. - * - * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order - * of Game Objects, without actually moving their position in the display list. - * - * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth - * value will always render in front of one with a lower value. - * - * Setting the depth will queue a depth sort event within the Scene. - */ - depth: number; - - /** - * The depth of this Game Object within the Scene. - * - * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order - * of Game Objects, without actually moving their position in the display list. - * - * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth - * value will always render in front of one with a lower value. - * - * Setting the depth will queue a depth sort event within the Scene. - * @param value The depth of this Game Object. - */ - setDepth(value: integer): this; - - /** - * The horizontally flipped state of the Game Object. - * - * A Game Object that is flipped horizontally will render inversed on the horizontal axis. - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - */ - flipX: boolean; - - /** - * The vertically flipped state of the Game Object. - * - * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - */ - flipY: boolean; - - /** - * Toggles the horizontal flipped state of this Game Object. - * - * A Game Object that is flipped horizontally will render inversed on the horizontal axis. - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - */ - toggleFlipX(): this; - - /** - * Toggles the vertical flipped state of this Game Object. - */ - toggleFlipY(): this; - - /** - * Sets the horizontal flipped state of this Game Object. - * - * A Game Object that is flipped horizontally will render inversed on the horizontal axis. - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * @param value The flipped state. `false` for no flip, or `true` to be flipped. - */ - setFlipX(value: boolean): this; - - /** - * Sets the vertical flipped state of this Game Object. - * @param value The flipped state. `false` for no flip, or `true` to be flipped. - */ - setFlipY(value: boolean): this; - - /** - * Sets the horizontal and vertical flipped state of this Game Object. - * - * A Game Object that is flipped will render inversed on the flipped axis. - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped. - * @param y The horizontal flipped state. `false` for no flip, or `true` to be flipped. - */ - setFlip(x: boolean, y: boolean): this; - - /** - * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. - */ - resetFlip(): this; - - /** - * Gets the center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - */ - getCenter(output?: O): O; - - /** - * Gets the top-left corner coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getTopLeft(output?: O, includeParent?: boolean): O; - - /** - * Gets the top-center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getTopCenter(output?: O, includeParent?: boolean): O; - - /** - * Gets the top-right corner coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getTopRight(output?: O, includeParent?: boolean): O; - - /** - * Gets the left-center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getLeftCenter(output?: O, includeParent?: boolean): O; - - /** - * Gets the right-center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getRightCenter(output?: O, includeParent?: boolean): O; - - /** - * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getBottomLeft(output?: O, includeParent?: boolean): O; - - /** - * Gets the bottom-center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getBottomCenter(output?: O, includeParent?: boolean): O; - - /** - * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getBottomRight(output?: O, includeParent?: boolean): O; - - /** - * Gets the bounds of this Game Object, regardless of origin. - * The values are stored and returned in a Rectangle, or Rectangle-like, object. - * @param output An object to store the values in. If not provided a new Rectangle will be created. - */ - getBounds(output?: O): O; - - /** - * The horizontal origin of this Game Object. - * The origin maps the relationship between the size and position of the Game Object. - * The default value is 0.5, meaning all Game Objects are positioned based on their center. - * Setting the value to 0 means the position now relates to the left of the Game Object. - */ - originX: number; - - /** - * The vertical origin of this Game Object. - * The origin maps the relationship between the size and position of the Game Object. - * The default value is 0.5, meaning all Game Objects are positioned based on their center. - * Setting the value to 0 means the position now relates to the top of the Game Object. - */ - originY: number; - - /** - * The horizontal display origin of this Game Object. - * The origin is a normalized value between 0 and 1. - * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. - */ - displayOriginX: number; - - /** - * The vertical display origin of this Game Object. - * The origin is a normalized value between 0 and 1. - * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. - */ - displayOriginY: number; - - /** - * Sets the origin of this Game Object. - * - * The values are given in the range 0 to 1. - * @param x The horizontal origin value. Default 0.5. - * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x. - */ - setOrigin(x?: number, y?: number): this; - - /** - * Sets the origin of this Game Object based on the Pivot values in its Frame. - */ - setOriginFromFrame(): this; - - /** - * Sets the display origin of this Game Object. - * The difference between this and setting the origin is that you can use pixel values for setting the display origin. - * @param x The horizontal display origin value. Default 0. - * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x. - */ - setDisplayOrigin(x?: number, y?: number): this; - - /** - * Updates the Display Origin cached values internally stored on this Game Object. - * You don't usually call this directly, but it is exposed for edge-cases where you may. - */ - updateDisplayOrigin(): this; - - /** - * The initial WebGL pipeline of this Game Object. - */ - defaultPipeline: Phaser.Renderer.WebGL.WebGLPipeline; - - /** - * The current WebGL pipeline of this Game Object. - */ - pipeline: Phaser.Renderer.WebGL.WebGLPipeline; - - /** - * Sets the initial WebGL Pipeline of this Game Object. - * This should only be called during the instantiation of the Game Object. - * @param pipelineName The name of the pipeline to set on this Game Object. Defaults to the Texture Tint Pipeline. Default TextureTintPipeline. - */ - initPipeline(pipelineName?: string): boolean; - - /** - * Sets the active WebGL Pipeline of this Game Object. - * @param pipelineName The name of the pipeline to set on this Game Object. - */ - setPipeline(pipelineName: string): this; - - /** - * Resets the WebGL Pipeline of this Game Object back to the default it was created with. - */ - resetPipeline(): boolean; - - /** - * Gets the name of the WebGL Pipeline this Game Object is currently using. - */ - getPipelineName(): string; - - /** - * The horizontal scroll factor of this Game Object. - * - * The scroll factor controls the influence of the movement of a Camera upon this Game Object. - * - * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. - * It does not change the Game Objects actual position values. - * - * A value of 1 means it will move exactly in sync with a camera. - * A value of 0 means it will not move at all, even if the camera moves. - * Other values control the degree to which the camera movement is mapped to this Game Object. - * - * Please be aware that scroll factor values other than 1 are not taken in to consideration when - * calculating physics collisions. Bodies always collide based on their world position, but changing - * the scroll factor is a visual adjustment to where the textures are rendered, which can offset - * them from physics bodies if not accounted for in your code. - */ - scrollFactorX: number; - - /** - * The vertical scroll factor of this Game Object. - * - * The scroll factor controls the influence of the movement of a Camera upon this Game Object. - * - * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. - * It does not change the Game Objects actual position values. - * - * A value of 1 means it will move exactly in sync with a camera. - * A value of 0 means it will not move at all, even if the camera moves. - * Other values control the degree to which the camera movement is mapped to this Game Object. - * - * Please be aware that scroll factor values other than 1 are not taken in to consideration when - * calculating physics collisions. Bodies always collide based on their world position, but changing - * the scroll factor is a visual adjustment to where the textures are rendered, which can offset - * them from physics bodies if not accounted for in your code. - */ - scrollFactorY: number; - - /** - * Sets the scroll factor of this Game Object. - * - * The scroll factor controls the influence of the movement of a Camera upon this Game Object. - * - * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. - * It does not change the Game Objects actual position values. - * - * A value of 1 means it will move exactly in sync with a camera. - * A value of 0 means it will not move at all, even if the camera moves. - * Other values control the degree to which the camera movement is mapped to this Game Object. - * - * Please be aware that scroll factor values other than 1 are not taken in to consideration when - * calculating physics collisions. Bodies always collide based on their world position, but changing - * the scroll factor is a visual adjustment to where the textures are rendered, which can offset - * them from physics bodies if not accounted for in your code. - * @param x The horizontal scroll factor of this Game Object. - * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. - */ - setScrollFactor(x: number, y?: number): this; - - /** - * The x position of this Game Object. - */ - x: number; - - /** - * The y position of this Game Object. - */ - y: number; - - /** - * The z position of this Game Object. - * - * Note: The z position does not control the rendering order of 2D Game Objects. Use - * {@link Phaser.GameObjects.Components.Depth#depth} instead. - */ - z: number; - - /** - * The w position of this Game Object. - */ - w: number; - - /** - * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object - * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`. - * - * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this - * isn't the case, use the `scaleX` or `scaleY` properties instead. - */ - scale: number; - - /** - * The horizontal scale of this Game Object. - */ - scaleX: number; - - /** - * The vertical scale of this Game Object. - */ - scaleY: number; - - /** - * The angle of this Game Object as expressed in degrees. - * - * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left - * and -90 is up. - * - * If you prefer to work in radians, see the `rotation` property instead. - */ - angle: integer; - - /** - * The angle of this Game Object in radians. - * - * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left - * and -90 is up. - * - * If you prefer to work in degrees, see the `angle` property instead. - */ - rotation: number; - - /** - * Sets the position of this Game Object. - * @param x The x position of this Game Object. Default 0. - * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. - * @param z The z position of this Game Object. Default 0. - * @param w The w position of this Game Object. Default 0. - */ - setPosition(x?: number, y?: number, z?: number, w?: number): this; - - /** - * Sets the position of this Game Object to be a random position within the confines of - * the given area. - * - * If no area is specified a random position between 0 x 0 and the game width x height is used instead. - * - * The position does not factor in the size of this Game Object, meaning that only the origin is - * guaranteed to be within the area. - * @param x The x position of the top-left of the random area. Default 0. - * @param y The y position of the top-left of the random area. Default 0. - * @param width The width of the random area. - * @param height The height of the random area. - */ - setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; - - /** - * Sets the rotation of this Game Object. - * @param radians The rotation of this Game Object, in radians. Default 0. - */ - setRotation(radians?: number): this; - - /** - * Sets the angle of this Game Object. - * @param degrees The rotation of this Game Object, in degrees. Default 0. - */ - setAngle(degrees?: number): this; - - /** - * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. - * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. - */ - setScale(x: number, y?: number): this; - - /** - * Sets the x position of this Game Object. - * @param value The x position of this Game Object. Default 0. - */ - setX(value?: number): this; - - /** - * Sets the y position of this Game Object. - * @param value The y position of this Game Object. Default 0. - */ - setY(value?: number): this; - - /** - * Sets the z position of this Game Object. - * - * Note: The z position does not control the rendering order of 2D Game Objects. Use - * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. - * @param value The z position of this Game Object. Default 0. - */ - setZ(value?: number): this; - - /** - * Sets the w position of this Game Object. - * @param value The w position of this Game Object. Default 0. - */ - setW(value?: number): this; - - /** - * Gets the local transform matrix for this Game Object. - * @param tempMatrix The matrix to populate with the values from this Game Object. - */ - getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; - - /** - * Gets the world transform matrix for this Game Object, factoring in any parent Containers. - * @param tempMatrix The matrix to populate with the values from this Game Object. - * @param parentMatrix A temporary matrix to hold parent values during the calculations. - */ - getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; - - /** - * Gets the sum total rotation of all of this Game Objects parent Containers. - * - * The returned value is in radians and will be zero if this Game Object has no parent container. - */ - getParentRotation(): number; - - /** - * The visible state of the Game Object. - * - * An invisible Game Object will skip rendering, but will still process update logic. - */ - visible: boolean; - - /** - * Sets the visibility of this Game Object. - * - * An invisible Game Object will skip rendering, but will still process update logic. - * @param value The visible state of the Game Object. - */ - setVisible(value: boolean): this; - - } - - /** - * A class for representing data about about a layer in a map. Maps are parsed from CSV, Tiled, - * etc. into this format. Tilemap, StaticTilemapLayer and DynamicTilemapLayer have a reference - * to this data and use it to look up and perform operations on tiles. - */ - class LayerData { - /** - * - * @param config [description] - */ - constructor(config?: object); - - /** - * The name of the layer, if specified in Tiled. - */ - name: string; - - /** - * The x offset of where to draw from the top left - */ - x: number; - - /** - * The y offset of where to draw from the top left - */ - y: number; - - /** - * The width in tile of the layer. - */ - width: number; - - /** - * The height in tiles of the layer. - */ - height: number; - - /** - * The pixel width of the tiles. - */ - tileWidth: number; - - /** - * The pixel height of the tiles. - */ - tileHeight: number; - - /** - * [description] - */ - baseTileWidth: number; - - /** - * [description] - */ - baseTileHeight: number; - - /** - * The width in pixels of the entire layer. - */ - widthInPixels: number; - - /** - * The height in pixels of the entire layer. - */ - heightInPixels: number; - - /** - * [description] - */ - alpha: number; - - /** - * [description] - */ - visible: boolean; - - /** - * Layer specific properties (can be specified in Tiled) - */ - properties: object; - - /** - * [description] - */ - indexes: any[]; - - /** - * [description] - */ - collideIndexes: any[]; - - /** - * [description] - */ - callbacks: any[]; - - /** - * [description] - */ - bodies: any[]; - - /** - * An array of the tile indexes - */ - data: Phaser.Tilemaps.Tile[][]; - - /** - * [description] - */ - tilemapLayer: Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer; - - } - - /** - * A class for representing data about a map. Maps are parsed from CSV, Tiled, etc. into this - * format. A Tilemap object get a copy of this data and then unpacks the needed properties into - * itself. - */ - class MapData { - /** - * - * @param config The Map configuration object. - */ - constructor(config?: Phaser.Types.Tilemaps.MapDataConfig); - - /** - * The key in the Phaser cache that corresponds to the loaded tilemap data. - */ - name: string; - - /** - * The width of the entire tilemap. - */ - width: number; - - /** - * The height of the entire tilemap. - */ - height: number; - - /** - * If the map is infinite or not. - */ - infinite: boolean; - - /** - * The width of the tiles. - */ - tileWidth: number; - - /** - * The height of the tiles. - */ - tileHeight: number; - - /** - * The width in pixels of the entire tilemap. - */ - widthInPixels: number; - - /** - * The height in pixels of the entire tilemap. - */ - heightInPixels: number; - - /** - * [description] - */ - format: integer; - - /** - * The orientation of the map data (i.e. orthogonal, isometric, hexagonal), default 'orthogonal'. - */ - orientation: string; - - /** - * Determines the draw order of tilemap. Default is right-down - * - * 0, or 'right-down' - * 1, or 'left-down' - * 2, or 'right-up' - * 3, or 'left-up' - */ - renderOrder: string; - - /** - * The version of the map data (as specified in Tiled). - */ - version: string; - - /** - * Map specific properties (can be specified in Tiled) - */ - properties: object; - - /** - * An array with all the layers configured to the MapData. - */ - layers: Phaser.Tilemaps.LayerData[] | Phaser.Tilemaps.ObjectLayer; - - /** - * An array of Tiled Image Layers. - */ - images: any[]; - - /** - * An object of Tiled Object Layers. - */ - objects: object; - - /** - * An object of collision data. Must be created as physics object or will return undefined. - */ - collision: object; - - /** - * An array of Tilesets. - */ - tilesets: Phaser.Tilemaps.Tileset[]; - - /** - * The collection of images the map uses(specified in Tiled) - */ - imageCollections: any[]; - - /** - * [description] - */ - tiles: any[]; - - } - - /** - * A class for representing a Tiled object layer in a map. This mirrors the structure of a Tiled - * object layer, except: - * - "x" & "y" properties are ignored since these cannot be changed in Tiled. - * - "offsetx" & "offsety" are applied to the individual object coordinates directly, so they - * are ignored as well. - * - "draworder" is ignored. - */ - class ObjectLayer { - /** - * - * @param config The data for the layer from the Tiled JSON object. - */ - constructor(config?: Phaser.Types.Tilemaps.ObjectLayerConfig); - - /** - * The name of the Object Layer. - */ - name: string; - - /** - * The opacity of the layer, between 0 and 1. - */ - opacity: number; - - /** - * The custom properties defined on the Object Layer, keyed by their name. - */ - properties: object; - - /** - * The type of each custom property defined on the Object Layer, keyed by its name. - */ - propertyTypes: object; - - /** - * The type of the layer, which should be `objectgroup`. - */ - type: string; - - /** - * Whether the layer is shown (`true`) or hidden (`false`). - */ - visible: boolean; - - /** - * An array of all objects on this Object Layer. - * - * Each Tiled object corresponds to a JavaScript object in this array. It has an `id` (unique), - * `name` (as assigned in Tiled), `type` (as assigned in Tiled), `rotation` (in clockwise degrees), - * `properties` (if any), `visible` state (`true` if visible, `false` otherwise), - * `x` and `y` coordinates (in pixels, relative to the tilemap), and a `width` and `height` (in pixels). - * - * An object tile has a `gid` property (GID of the represented tile), a `flippedHorizontal` property, - * a `flippedVertical` property, and `flippedAntiDiagonal` property. - * The {@link http://docs.mapeditor.org/en/latest/reference/tmx-map-format/|Tiled documentation} contains - * information on flipping and rotation. - * - * Polylines have a `polyline` property, which is an array of objects corresponding to points, - * where each point has an `x` property and a `y` property. Polygons have an identically structured - * array in their `polygon` property. Text objects have a `text` property with the text's properties. - * - * Rectangles and ellipses have a `rectangle` or `ellipse` property set to `true`. - */ - objects: Phaser.Types.Tilemaps.TiledObject[]; - - } - - namespace Parsers { - /** - * Parses raw data of a given Tilemap format into a new MapData object. If no recognized data format - * is found, returns `null`. When loading from CSV or a 2D array, you should specify the tileWidth & - * tileHeight. When parsing from a map from Tiled, the tileWidth & tileHeight will be pulled from - * the map data. - * @param name The name of the tilemap, used to set the name on the MapData. - * @param mapFormat See ../Formats.js. - * @param data 2D array, CSV string or Tiled JSON object. - * @param tileWidth The width of a tile in pixels. Required for 2D array and CSV, but - * ignored for Tiled JSON. - * @param tileHeight The height of a tile in pixels. Required for 2D array and CSV, but - * ignored for Tiled JSON. - * @param insertNull Controls how empty tiles, tiles with an index of -1, in the map - * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty - * location will get a Tile object with an index of -1. If you've a large sparsely populated map and - * the tile data doesn't need to change then setting this value to `true` will help with memory - * consumption. However if your map is small or you need to update the tiles dynamically, then leave - * the default value set. - */ - function Parse(name: string, mapFormat: integer, data: integer[][] | string | object, tileWidth: integer, tileHeight: integer, insertNull: boolean): Phaser.Tilemaps.MapData; - - /** - * Parses a 2D array of tile indexes into a new MapData object with a single layer. - * @param name The name of the tilemap, used to set the name on the MapData. - * @param data 2D array, CSV string or Tiled JSON object. - * @param tileWidth The width of a tile in pixels. - * @param tileHeight The height of a tile in pixels. - * @param insertNull Controls how empty tiles, tiles with an index of -1, in the map - * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty - * location will get a Tile object with an index of -1. If you've a large sparsely populated map and - * the tile data doesn't need to change then setting this value to `true` will help with memory - * consumption. However if your map is small or you need to update the tiles dynamically, then leave - * the default value set. - */ - function Parse2DArray(name: string, data: integer[][], tileWidth: integer, tileHeight: integer, insertNull: boolean): Phaser.Tilemaps.MapData; - - /** - * Parses a CSV string of tile indexes into a new MapData object with a single layer. - * @param name The name of the tilemap, used to set the name on the MapData. - * @param data CSV string of tile indexes. - * @param tileWidth The width of a tile in pixels. - * @param tileHeight The height of a tile in pixels. - * @param insertNull Controls how empty tiles, tiles with an index of -1, in the map - * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty - * location will get a Tile object with an index of -1. If you've a large sparsely populated map and - * the tile data doesn't need to change then setting this value to `true` will help with memory - * consumption. However if your map is small or you need to update the tiles dynamically, then leave - * the default value set. - */ - function ParseCSV(name: string, data: string, tileWidth: integer, tileHeight: integer, insertNull: boolean): Phaser.Tilemaps.MapData; - - namespace Impact { - /** - * [description] - * @param json [description] - * @param insertNull [description] - */ - function ParseTileLayers(json: object, insertNull: boolean): any[]; - - /** - * [description] - * @param json [description] - */ - function ParseTilesets(json: object): any[]; - - /** - * Parses a Weltmeister JSON object into a new MapData object. - * @param name The name of the tilemap, used to set the name on the MapData. - * @param json The Weltmeister JSON object. - * @param insertNull Controls how empty tiles, tiles with an index of -1, in the map - * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty - * location will get a Tile object with an index of -1. If you've a large sparsely populated map and - * the tile data doesn't need to change then setting this value to `true` will help with memory - * consumption. However if your map is small or you need to update the tiles dynamically, then leave - * the default value set. - */ - function ParseWeltmeister(name: string, json: object, insertNull: boolean): object; - - } - - namespace Tiled { - /** - * Copy properties from tileset to tiles. - * @param mapData [description] - */ - function AssignTileProperties(mapData: Phaser.Tilemaps.MapData): void; - - /** - * Decode base-64 encoded data, for example as exported by Tiled. - * @param data Base-64 encoded data to decode. - */ - function Base64Decode(data: object): any[]; - - /** - * Master list of tiles -> x, y, index in tileset. - * @param mapData [description] - */ - function BuildTilesetIndex(mapData: Phaser.Tilemaps.MapData): any[]; - - /** - * Parse a Tiled group layer and create a state object for inheriting. - * @param json The Tiled JSON object. - * @param currentl The current group layer from the Tiled JSON file. - * @param parentstate The state of the parent group (if any). - */ - function CreateGroupLayer(json: object, currentl?: object, parentstate?: object): object; - - /** - * See Tiled documentation on tile flipping: - * http://docs.mapeditor.org/en/latest/reference/tmx-map-format/ - * @param gid [description] - */ - function ParseGID(gid: number): object; - - /** - * Parses a Tiled JSON object into an array of objects with details about the image layers. - * @param json The Tiled JSON object. - */ - function ParseImageLayers(json: object): any[]; - - /** - * Parses a Tiled JSON object into a new MapData object. - * @param name The name of the tilemap, used to set the name on the MapData. - * @param json The Tiled JSON object. - * @param insertNull Controls how empty tiles, tiles with an index of -1, in the map - * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty - * location will get a Tile object with an index of -1. If you've a large sparsely populated map and - * the tile data doesn't need to change then setting this value to `true` will help with memory - * consumption. However if your map is small or you need to update the tiles dynamically, then leave - * the default value set. - */ - function ParseJSONTiled(name: string, json: object, insertNull: boolean): Phaser.Tilemaps.MapData; - - /** - * Convert a Tiled object to an internal parsed object normalising and copying properties over, while applying optional x and y offsets. The parsed object will always have the properties `id`, `name`, `type`, `rotation`, `properties`, `visible`, `x`, `y`, `width` and `height`. Other properties will be added according to the object type (such as text, polyline, gid etc.) - * @param tiledObject Tiled object to convert to an internal parsed object normalising and copying properties over. - * @param offsetX Optional additional offset to apply to the object's x property. Defaults to 0. Default 0. - * @param offsetY Optional additional offset to apply to the object's y property. Defaults to 0. Default 0. - */ - function ParseObject(tiledObject: object, offsetX?: number, offsetY?: number): object; - - /** - * Parses a Tiled JSON object into an array of ObjectLayer objects. - * @param json The Tiled JSON object. - */ - function ParseObjectLayers(json: object): any[]; - - /** - * Parses all tilemap layers in a Tiled JSON object into new LayerData objects. - * @param json The Tiled JSON object. - * @param insertNull Controls how empty tiles, tiles with an index of -1, in the map - * data are handled (see {@link Phaser.Tilemaps.Parsers.Tiled.ParseJSONTiled}). - */ - function ParseTileLayers(json: object, insertNull: boolean): Phaser.Tilemaps.LayerData[]; - - /** - * Tilesets and Image Collections - * @param json [description] - */ - function ParseTilesets(json: object): object; - - } - - } - - /** - * A Static Tilemap Layer is a Game Object that renders LayerData from a Tilemap when used in combination - * with one, or more, Tilesets. - * - * A Static Tilemap Layer is optimized for rendering speed over flexibility. You cannot apply per-tile - * effects like tint or alpha, or change the tiles or tilesets the layer uses. - * - * Use a Static Tilemap Layer instead of a Dynamic Tilemap Layer when you don't need tile manipulation features. - */ - class StaticTilemapLayer extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.ComputedSize, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible, Phaser.GameObjects.Components.ScrollFactor { - /** - * - * @param scene The Scene to which this Game Object belongs. - * @param tilemap The Tilemap this layer is a part of. - * @param layerIndex The index of the LayerData associated with this layer. - * @param tileset The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object. - * @param x The world x position where the top left of this layer will be placed. Default 0. - * @param y The world y position where the top left of this layer will be placed. Default 0. - */ - constructor(scene: Phaser.Scene, tilemap: Phaser.Tilemaps.Tilemap, layerIndex: integer, tileset: string | string[] | Phaser.Tilemaps.Tileset | Phaser.Tilemaps.Tileset[], x?: number, y?: number); - - /** - * Used internally by physics system to perform fast type checks. - */ - readonly isTilemap: boolean; - - /** - * The Tilemap that this layer is a part of. - */ - tilemap: Phaser.Tilemaps.Tilemap; - - /** - * The index of the LayerData associated with this layer. - */ - layerIndex: integer; - - /** - * The LayerData associated with this layer. LayerData can only be associated with one - * tilemap layer. - */ - layer: Phaser.Tilemaps.LayerData; - - /** - * The Tileset/s associated with this layer. - * - * As of Phaser 3.14 this property is now an array of Tileset objects, previously it was a single reference. - */ - tileset: Phaser.Tilemaps.Tileset[]; - - /** - * Used internally by the Canvas renderer. - * This holds the tiles that are visible within the camera in the last frame. - */ - culledTiles: any[]; - - /** - * Canvas only. - * - * You can control if the Cameras should cull tiles before rendering them or not. - * By default the camera will try to cull the tiles in this layer, to avoid over-drawing to the renderer. - * - * However, there are some instances when you may wish to disable this, and toggling this flag allows - * you to do so. Also see `setSkipCull` for a chainable method that does the same thing. - */ - skipCull: boolean; - - /** - * Canvas only. - * - * The total number of tiles drawn by the renderer in the last frame. - * - * This only works when rending with Canvas. - */ - readonly tilesDrawn: integer; - - /** - * Canvas only. - * - * The total number of tiles in this layer. Updated every frame. - */ - readonly tilesTotal: integer; - - /** - * Canvas only. - * - * The amount of extra tiles to add into the cull rectangle when calculating its horizontal size. - * - * See the method `setCullPadding` for more details. - */ - cullPaddingX: integer; - - /** - * Canvas only. - * - * The amount of extra tiles to add into the cull rectangle when calculating its vertical size. - * - * See the method `setCullPadding` for more details. - */ - cullPaddingY: integer; - - /** - * Canvas only. - * - * The callback that is invoked when the tiles are culled. - * - * By default it will call `TilemapComponents.CullTiles` but you can override this to call any function you like. - * - * It will be sent 3 arguments: - * - * 1. The Phaser.Tilemaps.LayerData object for this Layer - * 2. The Camera that is culling the layer. You can check its `dirty` property to see if it has changed since the last cull. - * 3. A reference to the `culledTiles` array, which should be used to store the tiles you want rendered. - * - * See the `TilemapComponents.CullTiles` source code for details on implementing your own culling system. - */ - cullCallback: Function; - - /** - * An array holding the mapping between the tile indexes and the tileset they belong to. - */ - gidMap: Phaser.Tilemaps.Tileset[]; - - /** - * Upload the tile data to a VBO. - * @param camera The camera to render to. - * @param tilesetIndex The tileset index. - */ - upload(camera: Phaser.Cameras.Scene2D.Camera, tilesetIndex: integer): Phaser.Tilemaps.StaticTilemapLayer; - - /** - * Sets the rendering (draw) order of the tiles in this layer. - * - * The default is 'right-down', meaning it will order the tiles starting from the top-left, - * drawing to the right and then moving down to the next row. - * - * The draw orders are: - * - * 0 = right-down - * 1 = left-down - * 2 = right-up - * 3 = left-up - * - * Setting the render order does not change the tiles or how they are stored in the layer, - * it purely impacts the order in which they are rendered. - * - * You can provide either an integer (0 to 3), or the string version of the order. - * @param renderOrder The render (draw) order value. Either an integer between 0 and 3, or a string: 'right-down', 'left-down', 'right-up' or 'left-up'. - */ - setRenderOrder(renderOrder: integer | string): this; - - /** - * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting - * faces are used internally for optimizing collisions against tiles. This method is mostly used - * internally to optimize recalculating faces when only one tile has been changed. - * @param tileX The x coordinate. - * @param tileY The y coordinate. - */ - calculateFacesAt(tileX: integer, tileY: integer): Phaser.Tilemaps.StaticTilemapLayer; - - /** - * Calculates interesting faces within the rectangular area specified (in tile coordinates) of the - * layer. Interesting faces are used internally for optimizing collisions against tiles. This method - * is mostly used internally. - * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. - * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. - */ - calculateFacesWithin(tileX?: integer, tileY?: integer, width?: integer, height?: integer): Phaser.Tilemaps.StaticTilemapLayer; - - /** - * Creates a Sprite for every object matching the given tile indexes in the layer. You can - * optionally specify if each tile will be replaced with a new tile after the Sprite has been - * 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 indexes 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 leave the tiles unchanged. If an array is given, it is assumed to be a - * one-to-one mapping with the indexes array. - * @param spriteConfig The config object to pass into the Sprite creator (i.e. - * scene.make.sprite). - * @param scene The Scene to create the Sprites within. Default scene the map is within. - * @param camera The Camera to use when determining the world XY Default main camera. - */ - createFromTiles(indexes: integer | any[], replacements: integer | any[], spriteConfig: Phaser.Types.GameObjects.Sprite.SpriteConfig, scene?: Phaser.Scene, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.GameObjects.Sprite[]; - - /** - * Returns the tiles in the given layer that are within the cameras viewport. - * This is used internally. - * @param camera The Camera to run the cull check against. - */ - cull(camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile[]; - - /** - * Canvas only. - * - * You can control if the Cameras should cull tiles before rendering them or not. - * By default the camera will try to cull the tiles in this layer, to avoid over-drawing to the renderer. - * - * However, there are some instances when you may wish to disable this. - * @param value Set to `true` to stop culling tiles. Set to `false` to enable culling again. Default true. - */ - setSkipCull(value?: boolean): this; - - /** - * Canvas only. - * - * When a Camera culls the tiles in this layer it does so using its view into the world, building up a - * rectangle inside which the tiles must exist or they will be culled. Sometimes you may need to expand the size - * of this 'cull rectangle', especially if you plan on rotating the Camera viewing the layer. Do so - * by providing the padding values. The values given are in tiles, not pixels. So if the tile width was 32px - * and you set `paddingX` to be 4, it would add 32px x 4 to the cull rectangle (adjusted for scale) - * @param paddingX The amount of extra horizontal tiles to add to the cull check padding. Default 1. - * @param paddingY The amount of extra vertical tiles to add to the cull check padding. Default 1. - */ - setCullPadding(paddingX?: integer, paddingY?: integer): this; - - /** - * Searches the entire map layer for the first tile matching the given index, then returns that Tile - * object. If no match is found, it returns null. 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 traveling 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. - */ - findByIndex(index: integer, skip?: integer, reverse?: boolean): Phaser.Tilemaps.Tile; - - /** - * Find the first tile in the given rectangular area (in tile coordinates) of the layer that - * satisfies the provided testing function. I.e. finds the first tile for which `callback` returns - * true. Similar to Array.prototype.find in vanilla JS. - * @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 tileX The left most tile index (in tile coordinates) to use as the origin of the area to filter. Default 0. - * @param tileY The topmost tile index (in tile coordinates) to use as the origin of the area to filter. Default 0. - * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. - * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. - * @param filteringOptions Optional filters to apply when getting the tiles. - */ - findTile(callback: Function, context?: object, tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions): Phaser.Tilemaps.Tile; - - /** - * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given - * filter callback function. Any tiles that pass the filter test (i.e. where the callback returns - * true) will returned as a new array. Similar to Array.prototype.Filter in vanilla JS. - * @param callback The callback. Each tile in the given area will be passed to this - * callback as the first and only parameter. The callback should return true for tiles that pass the - * filter. - * @param context The context under which the callback should be run. - * @param tileX The leftmost tile index (in tile coordinates) to use as the origin of the area to filter. Default 0. - * @param tileY The topmost tile index (in tile coordinates) to use as the origin of the area to filter. Default 0. - * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. - * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. - * @param filteringOptions Optional filters to apply when getting the tiles. - */ - filterTiles(callback: Function, context?: object, tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions): Phaser.Tilemaps.Tile[]; - - /** - * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given - * callback. Similar to Array.prototype.forEach in vanilla JS. - * @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 tileX The leftmost tile index (in tile coordinates) to use as the origin of the area to filter. Default 0. - * @param tileY The topmost tile index (in tile coordinates) to use as the origin of the area to filter. Default 0. - * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. - * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. - * @param filteringOptions Optional filters to apply when getting the tiles. - */ - forEachTile(callback: Function, context?: object, tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions): Phaser.Tilemaps.StaticTilemapLayer; - - /** - * Gets a tile at the given tile coordinates from the given layer. - * @param tileX X position to get the tile from (given in tile units, not pixels). - * @param tileY Y position to get the tile from (given in tile units, not pixels). - * @param nonNull If true getTile won't return null for empty tiles, but a Tile - * object with an index of -1. Default false. - */ - getTileAt(tileX: integer, tileY: integer, nonNull?: boolean): Phaser.Tilemaps.Tile; - - /** - * Gets a tile at the given world coordinates from the given layer. - * @param worldX X position to get the tile from (given in pixels) - * @param worldY Y position to get the tile from (given in pixels) - * @param nonNull If true, function won't return null for empty tiles, but a Tile - * object with an index of -1. Default false. - * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. - */ - getTileAtWorldXY(worldX: number, worldY: number, nonNull?: boolean, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile; - - /** - * Gets the tiles in the given rectangular area (in tile coordinates) of the layer. - * @param tileX The leftmost tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param tileY The topmost tile index (in tile coordinates) to use as the origin of the area. Default 0. - * @param width How many tiles wide from the `tileX` index the area will be. Default max width based on tileX. - * @param height How many tiles tall from the `tileY` index the area will be. Default max height based on tileY. - * @param filteringOptions Optional filters to apply when getting the tiles. - */ - getTilesWithin(tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions): Phaser.Tilemaps.Tile[]; - - /** - * Gets the tiles in the given rectangular area (in world coordinates) of the layer. - * @param worldX The leftmost tile index (in tile coordinates) to use as the origin of the area to filter. - * @param worldY The topmost tile index (in tile coordinates) to use as the origin of the area to filter. - * @param width How many tiles wide from the `tileX` index the area will be. - * @param height How many tiles high from the `tileY` index the area will be. - * @param filteringOptions Optional filters to apply when getting the tiles. - * @param camera The Camera to use when factoring in which tiles to return. Default main camera. - */ - getTilesWithinWorldXY(worldX: number, worldY: number, width: number, height: number, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile[]; - - /** - * Gets the tiles that overlap with the given shape in the given layer. The shape must be a Circle, - * Line, Rectangle or Triangle. The shape should be in world coordinates. - * @param shape A shape in world (pixel) coordinates - * @param filteringOptions Optional filters to apply when getting the tiles. - * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. - */ - getTilesWithinShape(shape: Phaser.Geom.Circle | Phaser.Geom.Line | Phaser.Geom.Rectangle | Phaser.Geom.Triangle, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile[]; - - /** - * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns - * false if there is no tile or if the tile at that location has an index of -1. - * @param tileX X position to get the tile from in tile coordinates. - * @param tileY Y position to get the tile from in tile coordinates. - */ - hasTileAt(tileX: integer, tileY: integer): boolean; - - /** - * Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns - * false if there is no tile or if the tile at that location has an index of -1. - * @param worldX The X coordinate of the world position. - * @param worldY The Y coordinate of the world position. - * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. - */ - hasTileAtWorldXY(worldX: number, worldY: number, camera?: Phaser.Cameras.Scene2D.Camera): boolean; - - /** - * Draws a debug representation of the layer to the given Graphics. This is helpful when you want to - * get a quick idea of which of your tiles are colliding and which have interesting faces. The tiles - * are drawn starting at (0, 0) in the Graphics, allowing you to place the debug representation - * wherever you want on the screen. - * @param graphics The target Graphics object to draw upon. - * @param styleConfig An object specifying the colors to use for the debug drawing. - */ - renderDebug(graphics: Phaser.GameObjects.Graphics, styleConfig: Phaser.Types.Tilemaps.StyleConfig): Phaser.Tilemaps.StaticTilemapLayer; - - /** - * Sets collision on the given tile or tiles within a layer by index. 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 indexes. - * @param collides If true it will enable collision. If false it will clear - * collision. Default true. - * @param recalculateFaces Whether or not to recalculate the tile faces after the - * update. Default true. - * @param updateLayer If true, updates the current tiles on the layer. Set to - * false if no tiles have been placed for significant performance boost. Default true. - */ - setCollision(indexes: integer | any[], collides?: boolean, recalculateFaces?: boolean, updateLayer?: boolean): Phaser.Tilemaps.StaticTilemapLayer; - - /** - * Sets collision on a range of tiles in a layer whose index is between the specified `start` and - * `stop` (inclusive). 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 recalculateFaces Whether or not to recalculate the tile faces after the - * update. Default true. - */ - setCollisionBetween(start: integer, stop: integer, collides?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.StaticTilemapLayer; - - /** - * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property - * that matches the given properties object, its collision flag will be set. The `collides` - * parameter controls if collision will be enabled (true) or disabled (false). Passing in - * `{ collides: true }` would update the collision flag on any tiles with a "collides" property that - * has a value of true. Any tile that doesn't have "collides" set to true will be ignored. You can - * also use an array of values, e.g. `{ types: ["stone", "lava", "sand" ] }`. If a tile has a - * "types" property that matches any of those values, its collision flag will be updated. - * @param properties An object with tile properties and corresponding values that should - * be checked. - * @param collides If true it will enable collision. If false it will clear - * collision. Default true. - * @param recalculateFaces Whether or not to recalculate the tile faces after the - * update. Default true. - */ - setCollisionByProperty(properties: object, collides?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.StaticTilemapLayer; - - /** - * Sets collision on all tiles in the given layer, except for tiles that have an index specified in - * the given array. The `collides` parameter controls if collision will be enabled (true) or - * disabled (false). - * @param indexes An array of the tile indexes to not be counted for collision. - * @param collides If true it will enable collision. If false it will clear - * collision. Default true. - * @param recalculateFaces Whether or not to recalculate the tile faces after the - * update. Default true. - */ - setCollisionByExclusion(indexes: integer[], collides?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.StaticTilemapLayer; - - /** - * Sets a global collision callback for the given tile index within the layer. This will affect all - * tiles on this layer that have the same index. 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. - */ - setTileIndexCallback(indexes: integer | any[], callback: Function, callbackContext: object): Phaser.Tilemaps.StaticTilemapLayer; - - /** - * Sets collision on the tiles within a layer by checking each tiles collision group data - * (typically defined in Tiled within the tileset collision editor). If any objects are found within - * a tiles collision group, the tile's colliding information will be set. The `collides` parameter - * controls if collision will be enabled (true) or disabled (false). - * @param collides If true it will enable collision. If false it will clear - * collision. Default true. - * @param recalculateFaces Whether or not to recalculate the tile faces after the - * update. Default true. - */ - setCollisionFromCollisionGroup(collides?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.StaticTilemapLayer; - - /** - * Sets a collision callback for the given rectangular area (in tile coordinates) within the layer. - * If a callback is already set for the tile index it will be replaced. Set the callback to null to - * remove it. - * @param tileX The leftmost tile index (in tile coordinates) to use as the origin of the area. - * @param tileY The topmost tile index (in tile coordinates) to use as the origin of the area. - * @param width How many tiles wide from the `tileX` index the area will be. - * @param height How many tiles tall from the `tileY` index the area will be. - * @param callback The callback that will be invoked when the tile is collided with. - * @param callbackContext The context under which the callback is called. - */ - setTileLocationCallback(tileX: integer, tileY: integer, width: integer, height: integer, callback: Function, callbackContext?: object): Phaser.Tilemaps.StaticTilemapLayer; - - /** - * Converts from tile X coordinates (tile units) to world X coordinates (pixels), factoring in the - * layers position, scale and scroll. - * @param tileX The X coordinate, in tile coordinates. - * @param camera The Camera to use when calculating the world values from the tile index. Default main camera. - */ - tileToWorldX(tileX: integer, camera?: Phaser.Cameras.Scene2D.Camera): number; - - /** - * Converts from tile Y coordinates (tile units) to world Y coordinates (pixels), factoring in the - * layers position, scale and scroll. - * @param tileY The Y coordinate, in tile coordinates. - * @param camera The Camera to use when calculating the world values from the tile index. Default main camera. - */ - tileToWorldY(tileY: integer, camera?: Phaser.Cameras.Scene2D.Camera): number; - - /** - * Converts from tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the - * layers position, scale and scroll. This will return a new Vector2 object or update the given - * `point` object. - * @param tileX The X coordinate, in tile coordinates. - * @param tileY The Y coordinate, in tile coordinates. - * @param point A Vector2 to store the coordinates in. If not given, a new Vector2 is created. - * @param camera The Camera to use when calculating the world values from the tile index. Default main camera. - */ - tileToWorldXY(tileX: integer, tileY: integer, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2; - - /** - * Converts from world X coordinates (pixels) to tile X coordinates (tile units), factoring in the - * layers position, scale and scroll. - * @param worldX The X coordinate, in world pixels. - * @param snapToFloor Whether or not to round the tile coordinate down to the - * nearest integer. Default true. - * @param camera The Camera to use when calculating the tile index from the world values.] Default main camera. - */ - worldToTileX(worldX: number, snapToFloor?: boolean, camera?: Phaser.Cameras.Scene2D.Camera): number; - - /** - * Converts from world Y coordinates (pixels) to tile Y coordinates (tile units), factoring in the - * layers position, scale and scroll. - * @param worldY The Y coordinate, in world pixels. - * @param snapToFloor Whether or not to round the tile coordinate down to the - * nearest integer. Default true. - * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. - */ - worldToTileY(worldY: number, snapToFloor?: boolean, camera?: Phaser.Cameras.Scene2D.Camera): number; - - /** - * Converts from world XY coordinates (pixels) to tile XY coordinates (tile units), factoring in the - * layers position, scale and scroll. This will return a new Vector2 object or update the given - * `point` object. - * @param worldX The X coordinate, in world pixels. - * @param worldY The Y coordinate, in world pixels. - * @param snapToFloor Whether or not to round the tile coordinate down to the - * nearest integer. Default true. - * @param point A Vector2 to store the coordinates in. If not given, a new Vector2 is created. - * @param camera The Camera to use when calculating the tile index from the world values. Default main camera. - */ - worldToTileXY(worldX: number, worldY: number, snapToFloor?: boolean, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2; - - /** - * Destroys this StaticTilemapLayer and removes its link to the associated LayerData. - * @param removeFromTilemap Remove this layer from the parent Tilemap? Default true. - */ - destroy(removeFromTilemap?: boolean): void; - - /** - * Clears all alpha values associated with this Game Object. - * - * Immediately sets the alpha levels back to 1 (fully opaque). - */ - clearAlpha(): this; - - /** - * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. - * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. - * - * If your game is running under WebGL you can optionally specify four different alpha values, each of which - * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. - * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. - * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. - * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. - * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. - */ - setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; - - /** - * The alpha value of the Game Object. - * - * This is a global value, impacting the entire Game Object, not just a region of it. - */ - alpha: number; - - /** - * The alpha value starting from the top-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopLeft: number; - - /** - * The alpha value starting from the top-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaTopRight: number; - - /** - * The alpha value starting from the bottom-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomLeft: number; - - /** - * The alpha value starting from the bottom-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - */ - alphaBottomRight: number; - - /** - * Sets the Blend Mode being used by this Game Object. - * - * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) - * - * Under WebGL only the following Blend Modes are available: - * - * * ADD - * * MULTIPLY - * * SCREEN - * * ERASE - * - * Canvas has more available depending on browser support. - * - * You can also create your own custom Blend Modes in WebGL. - * - * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending - * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these - * reasons try to be careful about the construction of your Scene and the frequency of which blend modes - * are used. - */ - blendMode: Phaser.BlendModes | string; - - /** - * Sets the Blend Mode being used by this Game Object. - * - * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) - * - * Under WebGL only the following Blend Modes are available: - * - * * ADD - * * MULTIPLY - * * SCREEN - * * ERASE (only works when rendering to a framebuffer, like a Render Texture) - * - * Canvas has more available depending on browser support. - * - * You can also create your own custom Blend Modes in WebGL. - * - * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending - * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these - * reasons try to be careful about the construction of your Scene and the frequency in which blend modes - * are used. - * @param value The BlendMode value. Either a string or a CONST. - */ - setBlendMode(value: string | Phaser.BlendModes): this; - - /** - * The native (un-scaled) width of this Game Object. - * - * Changing this value will not change the size that the Game Object is rendered in-game. - * For that you need to either set the scale of the Game Object (`setScale`) or use - * the `displayWidth` property. - */ - width: number; - - /** - * The native (un-scaled) height of this Game Object. - * - * Changing this value will not change the size that the Game Object is rendered in-game. - * For that you need to either set the scale of the Game Object (`setScale`) or use - * the `displayHeight` property. - */ - height: number; - - /** - * The displayed width of this Game Object. - * - * This value takes into account the scale factor. - * - * Setting this value will adjust the Game Object's scale property. - */ - displayWidth: number; - - /** - * The displayed height of this Game Object. - * - * This value takes into account the scale factor. - * - * Setting this value will adjust the Game Object's scale property. - */ - displayHeight: number; - - /** - * Sets the internal size of this Game Object, as used for frame or physics body creation. - * - * This will not change the size that the Game Object is rendered in-game. - * For that you need to either set the scale of the Game Object (`setScale`) or call the - * `setDisplaySize` method, which is the same thing as changing the scale but allows you - * to do so by giving pixel values. - * - * If you have enabled this Game Object for input, changing the size will _not_ change the - * size of the hit area. To do this you should adjust the `input.hitArea` object directly. - * @param width The width of this Game Object. - * @param height The height of this Game Object. - */ - setSize(width: number, height: number): this; - - /** - * Sets the display size of this Game Object. - * - * Calling this will adjust the scale. - * @param width The width of this Game Object. - * @param height The height of this Game Object. - */ - setDisplaySize(width: number, height: number): this; - - /** - * The depth of this Game Object within the Scene. - * - * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order - * of Game Objects, without actually moving their position in the display list. - * - * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth - * value will always render in front of one with a lower value. - * - * Setting the depth will queue a depth sort event within the Scene. - */ - depth: number; - - /** - * The depth of this Game Object within the Scene. - * - * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order - * of Game Objects, without actually moving their position in the display list. - * - * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth - * value will always render in front of one with a lower value. - * - * Setting the depth will queue a depth sort event within the Scene. - * @param value The depth of this Game Object. - */ - setDepth(value: integer): this; - - /** - * The horizontally flipped state of the Game Object. - * - * A Game Object that is flipped horizontally will render inversed on the horizontal axis. - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - */ - flipX: boolean; - - /** - * The vertically flipped state of the Game Object. - * - * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - */ - flipY: boolean; - - /** - * Toggles the horizontal flipped state of this Game Object. - * - * A Game Object that is flipped horizontally will render inversed on the horizontal axis. - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - */ - toggleFlipX(): this; - - /** - * Toggles the vertical flipped state of this Game Object. - */ - toggleFlipY(): this; - - /** - * Sets the horizontal flipped state of this Game Object. - * - * A Game Object that is flipped horizontally will render inversed on the horizontal axis. - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * @param value The flipped state. `false` for no flip, or `true` to be flipped. - */ - setFlipX(value: boolean): this; - - /** - * Sets the vertical flipped state of this Game Object. - * @param value The flipped state. `false` for no flip, or `true` to be flipped. - */ - setFlipY(value: boolean): this; - - /** - * Sets the horizontal and vertical flipped state of this Game Object. - * - * A Game Object that is flipped will render inversed on the flipped axis. - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped. - * @param y The horizontal flipped state. `false` for no flip, or `true` to be flipped. - */ - setFlip(x: boolean, y: boolean): this; - - /** - * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. - */ - resetFlip(): this; - - /** - * Gets the center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - */ - getCenter(output?: O): O; - - /** - * Gets the top-left corner coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getTopLeft(output?: O, includeParent?: boolean): O; - - /** - * Gets the top-center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getTopCenter(output?: O, includeParent?: boolean): O; - - /** - * Gets the top-right corner coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getTopRight(output?: O, includeParent?: boolean): O; - - /** - * Gets the left-center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getLeftCenter(output?: O, includeParent?: boolean): O; - - /** - * Gets the right-center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getRightCenter(output?: O, includeParent?: boolean): O; - - /** - * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getBottomLeft(output?: O, includeParent?: boolean): O; - - /** - * Gets the bottom-center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getBottomCenter(output?: O, includeParent?: boolean): O; - - /** - * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * @param output An object to store the values in. If not provided a new Vector2 will be created. - * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. - */ - getBottomRight(output?: O, includeParent?: boolean): O; - - /** - * Gets the bounds of this Game Object, regardless of origin. - * The values are stored and returned in a Rectangle, or Rectangle-like, object. - * @param output An object to store the values in. If not provided a new Rectangle will be created. - */ - getBounds(output?: O): O; - - /** - * The horizontal origin of this Game Object. - * The origin maps the relationship between the size and position of the Game Object. - * The default value is 0.5, meaning all Game Objects are positioned based on their center. - * Setting the value to 0 means the position now relates to the left of the Game Object. - */ - originX: number; - - /** - * The vertical origin of this Game Object. - * The origin maps the relationship between the size and position of the Game Object. - * The default value is 0.5, meaning all Game Objects are positioned based on their center. - * Setting the value to 0 means the position now relates to the top of the Game Object. - */ - originY: number; - - /** - * The horizontal display origin of this Game Object. - * The origin is a normalized value between 0 and 1. - * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. - */ - displayOriginX: number; - - /** - * The vertical display origin of this Game Object. - * The origin is a normalized value between 0 and 1. - * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. - */ - displayOriginY: number; - - /** - * Sets the origin of this Game Object. - * - * The values are given in the range 0 to 1. - * @param x The horizontal origin value. Default 0.5. - * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x. - */ - setOrigin(x?: number, y?: number): this; - - /** - * Sets the origin of this Game Object based on the Pivot values in its Frame. - */ - setOriginFromFrame(): this; - - /** - * Sets the display origin of this Game Object. - * The difference between this and setting the origin is that you can use pixel values for setting the display origin. - * @param x The horizontal display origin value. Default 0. - * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x. - */ - setDisplayOrigin(x?: number, y?: number): this; - - /** - * Updates the Display Origin cached values internally stored on this Game Object. - * You don't usually call this directly, but it is exposed for edge-cases where you may. - */ - updateDisplayOrigin(): this; - - /** - * The initial WebGL pipeline of this Game Object. - */ - defaultPipeline: Phaser.Renderer.WebGL.WebGLPipeline; - - /** - * The current WebGL pipeline of this Game Object. - */ - pipeline: Phaser.Renderer.WebGL.WebGLPipeline; - - /** - * Sets the initial WebGL Pipeline of this Game Object. - * This should only be called during the instantiation of the Game Object. - * @param pipelineName The name of the pipeline to set on this Game Object. Defaults to the Texture Tint Pipeline. Default TextureTintPipeline. - */ - initPipeline(pipelineName?: string): boolean; - - /** - * Sets the active WebGL Pipeline of this Game Object. - * @param pipelineName The name of the pipeline to set on this Game Object. - */ - setPipeline(pipelineName: string): this; - - /** - * Resets the WebGL Pipeline of this Game Object back to the default it was created with. - */ - resetPipeline(): boolean; - - /** - * Gets the name of the WebGL Pipeline this Game Object is currently using. - */ - getPipelineName(): string; - - /** - * The x position of this Game Object. - */ - x: number; - - /** - * The y position of this Game Object. - */ - y: number; - - /** - * The z position of this Game Object. - * - * Note: The z position does not control the rendering order of 2D Game Objects. Use - * {@link Phaser.GameObjects.Components.Depth#depth} instead. - */ - z: number; - - /** - * The w position of this Game Object. - */ - w: number; - - /** - * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object - * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`. - * - * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this - * isn't the case, use the `scaleX` or `scaleY` properties instead. - */ - scale: number; - - /** - * The horizontal scale of this Game Object. - */ - scaleX: number; - - /** - * The vertical scale of this Game Object. - */ - scaleY: number; - - /** - * The angle of this Game Object as expressed in degrees. - * - * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left - * and -90 is up. - * - * If you prefer to work in radians, see the `rotation` property instead. - */ - angle: integer; - - /** - * The angle of this Game Object in radians. - * - * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left - * and -90 is up. - * - * If you prefer to work in degrees, see the `angle` property instead. - */ - rotation: number; - - /** - * Sets the position of this Game Object. - * @param x The x position of this Game Object. Default 0. - * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. - * @param z The z position of this Game Object. Default 0. - * @param w The w position of this Game Object. Default 0. - */ - setPosition(x?: number, y?: number, z?: number, w?: number): this; - - /** - * Sets the position of this Game Object to be a random position within the confines of - * the given area. - * - * If no area is specified a random position between 0 x 0 and the game width x height is used instead. - * - * The position does not factor in the size of this Game Object, meaning that only the origin is - * guaranteed to be within the area. - * @param x The x position of the top-left of the random area. Default 0. - * @param y The y position of the top-left of the random area. Default 0. - * @param width The width of the random area. - * @param height The height of the random area. - */ - setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; - - /** - * Sets the rotation of this Game Object. - * @param radians The rotation of this Game Object, in radians. Default 0. - */ - setRotation(radians?: number): this; - - /** - * Sets the angle of this Game Object. - * @param degrees The rotation of this Game Object, in degrees. Default 0. - */ - setAngle(degrees?: number): this; - - /** - * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. - * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. - */ - setScale(x: number, y?: number): this; - - /** - * Sets the x position of this Game Object. - * @param value The x position of this Game Object. Default 0. - */ - setX(value?: number): this; - - /** - * Sets the y position of this Game Object. - * @param value The y position of this Game Object. Default 0. - */ - setY(value?: number): this; - - /** - * Sets the z position of this Game Object. - * - * Note: The z position does not control the rendering order of 2D Game Objects. Use - * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. - * @param value The z position of this Game Object. Default 0. - */ - setZ(value?: number): this; - - /** - * Sets the w position of this Game Object. - * @param value The w position of this Game Object. Default 0. - */ - setW(value?: number): this; - - /** - * Gets the local transform matrix for this Game Object. - * @param tempMatrix The matrix to populate with the values from this Game Object. - */ - getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; - - /** - * Gets the world transform matrix for this Game Object, factoring in any parent Containers. - * @param tempMatrix The matrix to populate with the values from this Game Object. - * @param parentMatrix A temporary matrix to hold parent values during the calculations. - */ - getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; - - /** - * Gets the sum total rotation of all of this Game Objects parent Containers. - * - * The returned value is in radians and will be zero if this Game Object has no parent container. - */ - getParentRotation(): number; - - /** - * The visible state of the Game Object. - * - * An invisible Game Object will skip rendering, but will still process update logic. - */ - visible: boolean; - - /** - * Sets the visibility of this Game Object. - * - * An invisible Game Object will skip rendering, but will still process update logic. - * @param value The visible state of the Game Object. - */ - setVisible(value: boolean): this; - - /** - * The horizontal scroll factor of this Game Object. - * - * The scroll factor controls the influence of the movement of a Camera upon this Game Object. - * - * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. - * It does not change the Game Objects actual position values. - * - * A value of 1 means it will move exactly in sync with a camera. - * A value of 0 means it will not move at all, even if the camera moves. - * Other values control the degree to which the camera movement is mapped to this Game Object. - * - * Please be aware that scroll factor values other than 1 are not taken in to consideration when - * calculating physics collisions. Bodies always collide based on their world position, but changing - * the scroll factor is a visual adjustment to where the textures are rendered, which can offset - * them from physics bodies if not accounted for in your code. - */ - scrollFactorX: number; - - /** - * The vertical scroll factor of this Game Object. - * - * The scroll factor controls the influence of the movement of a Camera upon this Game Object. - * - * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. - * It does not change the Game Objects actual position values. - * - * A value of 1 means it will move exactly in sync with a camera. - * A value of 0 means it will not move at all, even if the camera moves. - * Other values control the degree to which the camera movement is mapped to this Game Object. - * - * Please be aware that scroll factor values other than 1 are not taken in to consideration when - * calculating physics collisions. Bodies always collide based on their world position, but changing - * the scroll factor is a visual adjustment to where the textures are rendered, which can offset - * them from physics bodies if not accounted for in your code. - */ - scrollFactorY: number; - - /** - * Sets the scroll factor of this Game Object. - * - * The scroll factor controls the influence of the movement of a Camera upon this Game Object. - * - * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. - * It does not change the Game Objects actual position values. - * - * A value of 1 means it will move exactly in sync with a camera. - * A value of 0 means it will not move at all, even if the camera moves. - * Other values control the degree to which the camera movement is mapped to this Game Object. - * - * Please be aware that scroll factor values other than 1 are not taken in to consideration when - * calculating physics collisions. Bodies always collide based on their world position, but changing - * the scroll factor is a visual adjustment to where the textures are rendered, which can offset - * them from physics bodies if not accounted for in your code. - * @param x The horizontal scroll factor of this Game Object. - * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. - */ - setScrollFactor(x: number, y?: number): this; - - } - } namespace Time { @@ -84255,487 +85715,6 @@ declare namespace Phaser { } namespace Tweens { - /** - * A Timeline combines multiple Tweens into one. Its overall behavior is otherwise similar to a single Tween. - * - * The Timeline updates all of its Tweens simultaneously. Its methods allow you to easily build a sequence - * of Tweens (each one starting after the previous one) or run multiple Tweens at once during given parts of the Timeline. - */ - class Timeline extends Phaser.Events.EventEmitter { - /** - * - * @param manager The Tween Manager which owns this Timeline. - */ - constructor(manager: Phaser.Tweens.TweenManager); - - /** - * The Tween Manager which owns this Timeline. - */ - manager: Phaser.Tweens.TweenManager; - - /** - * A constant value which allows this Timeline to be easily identified as one. - */ - isTimeline: boolean; - - /** - * An array of Tween objects, each containing a unique property and target being tweened. - */ - data: any[]; - - /** - * The cached size of the data array. - */ - totalData: number; - - /** - * If true then duration, delay, etc values are all frame totals, rather than ms. - */ - useFrames: boolean; - - /** - * Scales the time applied to this Timeline. A value of 1 runs in real-time. A value of 0.5 runs 50% slower, and so on. - * Value isn't used when calculating total duration of the Timeline, it's a run-time delta adjustment only. - */ - timeScale: number; - - /** - * Loop this Timeline? Can be -1 for an infinite loop, or an integer. - * When enabled it will play through ALL Tweens again (use Tween.repeat to loop a single tween) - */ - loop: number; - - /** - * Time in ms/frames before this Timeline loops. - */ - loopDelay: number; - - /** - * How many loops are left to run? - */ - loopCounter: number; - - /** - * Time in ms/frames before the 'onComplete' event fires. This never fires if loop = true (as it never completes) - */ - completeDelay: number; - - /** - * Countdown timer value, as used by `loopDelay` and `completeDelay`. - */ - countdown: number; - - /** - * The current state of the Timeline. - */ - state: integer; - - /** - * Does the Timeline start off paused? (if so it needs to be started with Timeline.play) - */ - paused: boolean; - - /** - * Elapsed time in ms/frames of this run through of the Timeline. - */ - elapsed: number; - - /** - * Total elapsed time in ms/frames of the entire Timeline, including looping. - */ - totalElapsed: number; - - /** - * Time in ms/frames for the whole Timeline to play through once, excluding loop amounts and loop delays. - */ - duration: number; - - /** - * Value between 0 and 1. The amount of progress through the Timeline, _excluding loops_. - */ - progress: number; - - /** - * Time in ms/frames for all Tweens in this Timeline to complete (including looping) - */ - totalDuration: number; - - /** - * Value between 0 and 1. The amount through the entire Timeline, including looping. - */ - totalProgress: number; - - /** - * An object containing the different Tween callback functions. - * - * You can either set these in the Tween config, or by calling the `Tween.setCallback` method. - * - * `onComplete` When the Timeline finishes playback fully or `Timeline.stop` is called. Never invoked if timeline is set to repeat infinitely. - * `onLoop` When a Timeline loops. - * `onStart` When the Timeline starts playing. - * `onUpdate` When a Timeline updates a child Tween. - * `onYoyo` When a Timeline starts a yoyo. - */ - callbacks: object; - - /** - * The context in which all callbacks are invoked. - */ - callbackScope: any; - - /** - * Internal method that will emit a Timeline based Event and invoke the given callback. - * @param event The Event to be dispatched. - * @param callback The callback to be invoked. Can be `null` or `undefined` to skip invocation. - */ - dispatchTimelineEvent(event: Phaser.Types.Tweens.Event, callback: Function): void; - - /** - * Sets the value of the time scale applied to this Timeline. A value of 1 runs in real-time. - * A value of 0.5 runs 50% slower, and so on. - * - * The value isn't used when calculating total duration of the tween, it's a run-time delta adjustment only. - * @param value The time scale value to set. - */ - setTimeScale(value: number): this; - - /** - * Gets the value of the time scale applied to this Timeline. A value of 1 runs in real-time. - * A value of 0.5 runs 50% slower, and so on. - */ - getTimeScale(): number; - - /** - * Check whether or not the Timeline is playing. - */ - isPlaying(): boolean; - - /** - * Creates a new Tween, based on the given Tween Config, and adds it to this Timeline. - * @param config The configuration object for the Tween. - */ - add(config: Phaser.Types.Tweens.TweenBuilderConfig | object): this; - - /** - * Adds an existing Tween to this Timeline. - * @param tween The Tween to be added to this Timeline. - */ - queue(tween: Phaser.Tweens.Tween): this; - - /** - * Checks whether a Tween has an offset value. - * @param tween The Tween to check. - */ - hasOffset(tween: Phaser.Tweens.Tween): boolean; - - /** - * Checks whether the offset value is a number or a directive that is relative to previous tweens. - * @param value The offset value to be evaluated. - */ - isOffsetAbsolute(value: number): boolean; - - /** - * Checks if the offset is a relative value rather than an absolute one. - * If the value is just a number, this returns false. - * @param value The offset value to be evaluated. - */ - isOffsetRelative(value: string): boolean; - - /** - * Parses the relative offset value, returning a positive or negative number. - * @param value The relative offset, in the format of '-=500', for example. The first character determines whether it will be a positive or negative number. Spacing matters here. - * @param base The value to use as the offset. - */ - getRelativeOffset(value: string, base: number): number; - - /** - * Calculates the total duration of the timeline. - * - * Computes all tween durations and returns the full duration of the timeline. - * - * The resulting number is stored in the timeline, not as a return value. - */ - calcDuration(): void; - - /** - * Initializes the timeline, which means all Tweens get their init() called, and the total duration will be computed. - * Returns a boolean indicating whether the timeline is auto-started or not. - */ - init(): boolean; - - /** - * Resets all of the timeline's tweens back to their initial states. - * The boolean parameter indicates whether tweens that are looping should reset as well, or not. - * @param resetFromLoop If `true`, resets all looping tweens to their initial values. - */ - resetTweens(resetFromLoop: boolean): void; - - /** - * Sets a callback for the Timeline. - * @param type The internal type of callback to set. - * @param callback Timeline allows multiple tweens to be linked together to create a streaming sequence. - * @param params The parameters to pass to the callback. - * @param scope The context scope of the callback. - */ - setCallback(type: string, callback: Function, params?: any[], scope?: object): this; - - /** - * Passed a Tween to the Tween Manager and requests it be made active. - * @param tween The tween object to make active. - */ - makeActive(tween: Phaser.Tweens.Tween): Phaser.Tweens.TweenManager; - - /** - * Starts playing the Timeline. - */ - play(): void; - - /** - * Updates the Timeline's `state` and fires callbacks and events. - */ - nextState(): void; - - /** - * Returns 'true' if this Timeline has finished and should be removed from the Tween Manager. - * Otherwise, returns false. - * @param timestamp The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. - * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. - */ - update(timestamp: number, delta: number): boolean; - - /** - * Stops the Timeline immediately, whatever stage of progress it is at and flags it for removal by the TweenManager. - */ - stop(): void; - - /** - * Pauses the Timeline, retaining its internal state. - * - * Calling this on a Timeline that is already paused has no effect and fires no event. - */ - pause(): this; - - /** - * Resumes a paused Timeline from where it was when it was paused. - * - * Calling this on a Timeline that isn't paused has no effect and fires no event. - */ - resume(): this; - - /** - * Checks if any of the Tweens in this Timeline as operating on the target object. - * - * Returns `false` if no Tweens operate on the target object. - * @param target The target to check all Tweens against. - */ - hasTarget(target: object): boolean; - - /** - * Stops all the Tweens in the Timeline immediately, whatever stage of progress they are at and flags - * them for removal by the TweenManager. - */ - destroy(): void; - - } - - /** - * The Tween Manager is a default Scene Plugin which controls and updates Tweens and Timelines. - */ - class TweenManager { - /** - * - * @param scene The Scene which owns this Tween Manager. - */ - constructor(scene: Phaser.Scene); - - /** - * The Scene which owns this Tween Manager. - */ - scene: Phaser.Scene; - - /** - * The Systems object of the Scene which owns this Tween Manager. - */ - systems: Phaser.Scenes.Systems; - - /** - * The time scale of the Tween Manager. - * - * This value scales the time delta between two frames, thus influencing the speed of time for all Tweens owned by this Tween Manager. - */ - timeScale: number; - - /** - * Create a Tween Timeline and return it, but do NOT add it to the active or pending Tween lists. - * @param config The configuration object for the Timeline and its Tweens. - */ - createTimeline(config?: Phaser.Types.Tweens.TimelineBuilderConfig): Phaser.Tweens.Timeline; - - /** - * Create a Tween Timeline and add it to the active Tween list/ - * @param config The configuration object for the Timeline and its Tweens. - */ - timeline(config?: Phaser.Types.Tweens.TimelineBuilderConfig): Phaser.Tweens.Timeline; - - /** - * Create a Tween and return it, but do NOT add it to the active or pending Tween lists. - * @param config The configuration object for the Tween. - */ - create(config: Phaser.Types.Tweens.TweenBuilderConfig | object): Phaser.Tweens.Tween; - - /** - * Create a Tween and add it to the active Tween list. - * @param config The configuration object for the Tween. - */ - add(config: Phaser.Types.Tweens.TweenBuilderConfig | object): Phaser.Tweens.Tween; - - /** - * Add an existing tween into the active Tween list. - * @param tween The Tween to add. - */ - existing(tween: Phaser.Tweens.Tween): Phaser.Tweens.TweenManager; - - /** - * Create a Number Tween and add it to the active Tween list. - * @param config The configuration object for the Number Tween. - */ - addCounter(config: Phaser.Types.Tweens.NumberTweenBuilderConfig): Phaser.Tweens.Tween; - - /** - * Creates a Stagger function to be used by a Tween property. - * - * The stagger function will allow you to stagger changes to the value of the property across all targets of the tween. - * - * This is only worth using if the tween has multiple targets. - * - * The following will stagger the delay by 100ms across all targets of the tween, causing them to scale down to 0.2 - * over the duration specified: - * - * ```javascript - * this.tweens.add({ - * targets: [ ... ], - * scale: 0.2, - * ease: 'linear', - * duration: 1000, - * delay: this.tweens.stagger(100) - * }); - * ``` - * - * The following will stagger the delay by 500ms across all targets of the tween using a 10 x 6 grid, staggering - * from the center out, using a cubic ease. - * - * ```javascript - * this.tweens.add({ - * targets: [ ... ], - * scale: 0.2, - * ease: 'linear', - * duration: 1000, - * delay: this.tweens.stagger(500, { grid: [ 10, 6 ], from: 'center', ease: 'cubic.out' }) - * }); - * ``` - * @param config The configuration object for the Stagger function. - */ - stagger(config: Phaser.Types.Tweens.StaggerConfig): Function; - - /** - * Updates the Tween Manager's internal lists at the start of the frame. - * - * This method will return immediately if no changes have been indicated. - */ - preUpdate(): void; - - /** - * Updates all Tweens and Timelines of the Tween Manager. - * @param timestamp The current time in milliseconds. - * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. - */ - update(timestamp: number, delta: number): void; - - /** - * Removes the given tween from the Tween Manager, regardless of its state (pending or active). - * @param tween The Tween to be removed. - */ - remove(tween: Phaser.Tweens.Tween): Phaser.Tweens.TweenManager; - - /** - * Checks if a Tween or Timeline is active and adds it to the Tween Manager at the start of the frame if it isn't. - * @param tween The Tween to check. - */ - makeActive(tween: Phaser.Tweens.Tween): Phaser.Tweens.TweenManager; - - /** - * Passes all Tweens to the given callback. - * @param callback The function to call. - * @param scope The scope (`this` object) to call the function with. - * @param args The arguments to pass into the function. Its first argument will always be the Tween currently being iterated. - */ - each(callback: Function, scope?: object, ...args: any[]): void; - - /** - * Returns an array of all active Tweens and Timelines in the Tween Manager. - */ - getAllTweens(): Phaser.Tweens.Tween[]; - - /** - * Returns the scale of the time delta for all Tweens and Timelines owned by this Tween Manager. - */ - getGlobalTimeScale(): number; - - /** - * Returns an array of all Tweens or Timelines in the Tween Manager which affect the given target or array of targets. - * @param target The target to look for. Provide an array to look for multiple targets. - */ - getTweensOf(target: object | any[]): Phaser.Tweens.Tween[]; - - /** - * Checks if the given object is being affected by a playing Tween. - * @param target target Phaser.Tweens.Tween object - */ - isTweening(target: object): boolean; - - /** - * Stops all Tweens in this Tween Manager. They will be removed at the start of the frame. - */ - killAll(): Phaser.Tweens.TweenManager; - - /** - * Stops all Tweens which affect the given target or array of targets. The Tweens will be removed from the Tween Manager at the start of the frame. - * @param target The target to look for. Provide an array to look for multiple targets. - */ - killTweensOf(target: object | any[]): Phaser.Tweens.TweenManager; - - /** - * Pauses all Tweens in this Tween Manager. - */ - pauseAll(): Phaser.Tweens.TweenManager; - - /** - * Resumes all Tweens in this Tween Manager. - */ - resumeAll(): Phaser.Tweens.TweenManager; - - /** - * Sets a new scale of the time delta for this Tween Manager. - * - * The time delta is the time elapsed between two consecutive frames and influences the speed of time for this Tween Manager and all Tweens it owns. Values higher than 1 increase the speed of time, while values smaller than 1 decrease it. A value of 0 freezes time and is effectively equivalent to pausing all Tweens. - * @param value The new scale of the time delta, where 1 is the normal speed. - */ - setGlobalTimeScale(value: number): Phaser.Tweens.TweenManager; - - /** - * The Scene that owns this plugin is shutting down. - * We need to kill and reset all internal properties as well as stop listening to Scene events. - */ - shutdown(): void; - - /** - * The Scene that owns this plugin is being destroyed. - * We need to shutdown and then kill off all external references. - */ - destroy(): void; - - } - namespace Builders { /** * Retrieves the value of the given key from an object. @@ -85176,6 +86155,374 @@ declare namespace Phaser { } + /** + * A Timeline combines multiple Tweens into one. Its overall behavior is otherwise similar to a single Tween. + * + * The Timeline updates all of its Tweens simultaneously. Its methods allow you to easily build a sequence + * of Tweens (each one starting after the previous one) or run multiple Tweens at once during given parts of the Timeline. + */ + class Timeline extends Phaser.Events.EventEmitter { + /** + * + * @param manager The Tween Manager which owns this Timeline. + */ + constructor(manager: Phaser.Tweens.TweenManager); + + /** + * The Tween Manager which owns this Timeline. + */ + manager: Phaser.Tweens.TweenManager; + + /** + * A constant value which allows this Timeline to be easily identified as one. + */ + isTimeline: boolean; + + /** + * An array of Tween objects, each containing a unique property and target being tweened. + */ + data: any[]; + + /** + * The cached size of the data array. + */ + totalData: number; + + /** + * If true then duration, delay, etc values are all frame totals, rather than ms. + */ + useFrames: boolean; + + /** + * Scales the time applied to this Timeline. A value of 1 runs in real-time. A value of 0.5 runs 50% slower, and so on. + * Value isn't used when calculating total duration of the Timeline, it's a run-time delta adjustment only. + */ + timeScale: number; + + /** + * Loop this Timeline? Can be -1 for an infinite loop, or an integer. + * When enabled it will play through ALL Tweens again (use Tween.repeat to loop a single tween) + */ + loop: number; + + /** + * Time in ms/frames before this Timeline loops. + */ + loopDelay: number; + + /** + * How many loops are left to run? + */ + loopCounter: number; + + /** + * Time in ms/frames before the 'onComplete' event fires. This never fires if loop = true (as it never completes) + */ + completeDelay: number; + + /** + * Countdown timer value, as used by `loopDelay` and `completeDelay`. + */ + countdown: number; + + /** + * The current state of the Timeline. + */ + state: integer; + + /** + * Does the Timeline start off paused? (if so it needs to be started with Timeline.play) + */ + paused: boolean; + + /** + * Elapsed time in ms/frames of this run through of the Timeline. + */ + elapsed: number; + + /** + * Total elapsed time in ms/frames of the entire Timeline, including looping. + */ + totalElapsed: number; + + /** + * Time in ms/frames for the whole Timeline to play through once, excluding loop amounts and loop delays. + */ + duration: number; + + /** + * Value between 0 and 1. The amount of progress through the Timeline, _excluding loops_. + */ + progress: number; + + /** + * Time in ms/frames for all Tweens in this Timeline to complete (including looping) + */ + totalDuration: number; + + /** + * Value between 0 and 1. The amount through the entire Timeline, including looping. + */ + totalProgress: number; + + /** + * An object containing the different Tween callback functions. + * + * You can either set these in the Tween config, or by calling the `Tween.setCallback` method. + * + * `onComplete` When the Timeline finishes playback fully or `Timeline.stop` is called. Never invoked if timeline is set to repeat infinitely. + * `onLoop` When a Timeline loops. + * `onStart` When the Timeline starts playing. + * `onUpdate` When a Timeline updates a child Tween. + * `onYoyo` When a Timeline starts a yoyo. + */ + callbacks: object; + + /** + * The context in which all callbacks are invoked. + */ + callbackScope: any; + + /** + * Internal method that will emit a Timeline based Event and invoke the given callback. + * @param event The Event to be dispatched. + * @param callback The callback to be invoked. Can be `null` or `undefined` to skip invocation. + */ + dispatchTimelineEvent(event: Phaser.Types.Tweens.Event, callback: Function): void; + + /** + * Sets the value of the time scale applied to this Timeline. A value of 1 runs in real-time. + * A value of 0.5 runs 50% slower, and so on. + * + * The value isn't used when calculating total duration of the tween, it's a run-time delta adjustment only. + * @param value The time scale value to set. + */ + setTimeScale(value: number): this; + + /** + * Gets the value of the time scale applied to this Timeline. A value of 1 runs in real-time. + * A value of 0.5 runs 50% slower, and so on. + */ + getTimeScale(): number; + + /** + * Check whether or not the Timeline is playing. + */ + isPlaying(): boolean; + + /** + * Creates a new Tween, based on the given Tween Config, and adds it to this Timeline. + * @param config The configuration object for the Tween. + */ + add(config: Phaser.Types.Tweens.TweenBuilderConfig | object): this; + + /** + * Adds an existing Tween to this Timeline. + * @param tween The Tween to be added to this Timeline. + */ + queue(tween: Phaser.Tweens.Tween): this; + + /** + * Checks whether a Tween has an offset value. + * @param tween The Tween to check. + */ + hasOffset(tween: Phaser.Tweens.Tween): boolean; + + /** + * Checks whether the offset value is a number or a directive that is relative to previous tweens. + * @param value The offset value to be evaluated. + */ + isOffsetAbsolute(value: number): boolean; + + /** + * Checks if the offset is a relative value rather than an absolute one. + * If the value is just a number, this returns false. + * @param value The offset value to be evaluated. + */ + isOffsetRelative(value: string): boolean; + + /** + * Parses the relative offset value, returning a positive or negative number. + * @param value The relative offset, in the format of '-=500', for example. The first character determines whether it will be a positive or negative number. Spacing matters here. + * @param base The value to use as the offset. + */ + getRelativeOffset(value: string, base: number): number; + + /** + * Calculates the total duration of the timeline. + * + * Computes all tween durations and returns the full duration of the timeline. + * + * The resulting number is stored in the timeline, not as a return value. + */ + calcDuration(): void; + + /** + * Initializes the timeline, which means all Tweens get their init() called, and the total duration will be computed. + * Returns a boolean indicating whether the timeline is auto-started or not. + */ + init(): boolean; + + /** + * Resets all of the timeline's tweens back to their initial states. + * The boolean parameter indicates whether tweens that are looping should reset as well, or not. + * @param resetFromLoop If `true`, resets all looping tweens to their initial values. + */ + resetTweens(resetFromLoop: boolean): void; + + /** + * Sets a callback for the Timeline. + * @param type The internal type of callback to set. + * @param callback Timeline allows multiple tweens to be linked together to create a streaming sequence. + * @param params The parameters to pass to the callback. + * @param scope The context scope of the callback. + */ + setCallback(type: string, callback: Function, params?: any[], scope?: object): this; + + /** + * Passed a Tween to the Tween Manager and requests it be made active. + * @param tween The tween object to make active. + */ + makeActive(tween: Phaser.Tweens.Tween): Phaser.Tweens.TweenManager; + + /** + * Starts playing the Timeline. + */ + play(): void; + + /** + * Updates the Timeline's `state` and fires callbacks and events. + */ + nextState(): void; + + /** + * Returns 'true' if this Timeline has finished and should be removed from the Tween Manager. + * Otherwise, returns false. + * @param timestamp The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. + * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. + */ + update(timestamp: number, delta: number): boolean; + + /** + * Stops the Timeline immediately, whatever stage of progress it is at and flags it for removal by the TweenManager. + */ + stop(): void; + + /** + * Pauses the Timeline, retaining its internal state. + * + * Calling this on a Timeline that is already paused has no effect and fires no event. + */ + pause(): this; + + /** + * Resumes a paused Timeline from where it was when it was paused. + * + * Calling this on a Timeline that isn't paused has no effect and fires no event. + */ + resume(): this; + + /** + * Checks if any of the Tweens in this Timeline as operating on the target object. + * + * Returns `false` if no Tweens operate on the target object. + * @param target The target to check all Tweens against. + */ + hasTarget(target: object): boolean; + + /** + * Stops all the Tweens in the Timeline immediately, whatever stage of progress they are at and flags + * them for removal by the TweenManager. + */ + destroy(): void; + + } + + /** + * TweenData state. + */ + var CREATED: integer; + + /** + * TweenData state. + */ + var INIT: integer; + + /** + * TweenData state. + */ + var DELAY: integer; + + /** + * TweenData state. + */ + var OFFSET_DELAY: integer; + + /** + * TweenData state. + */ + var PENDING_RENDER: integer; + + /** + * TweenData state. + */ + var PLAYING_FORWARD: integer; + + /** + * TweenData state. + */ + var PLAYING_BACKWARD: integer; + + /** + * TweenData state. + */ + var HOLD_DELAY: integer; + + /** + * TweenData state. + */ + var REPEAT_DELAY: integer; + + /** + * TweenData state. + */ + var COMPLETE: integer; + + /** + * Tween state. + */ + var PENDING_ADD: integer; + + /** + * Tween state. + */ + var PAUSED: integer; + + /** + * Tween state. + */ + var LOOP_DELAY: integer; + + /** + * Tween state. + */ + var ACTIVE: integer; + + /** + * Tween state. + */ + var COMPLETE_DELAY: integer; + + /** + * Tween state. + */ + var PENDING_REMOVE: integer; + + /** + * Tween state. + */ + var REMOVED: integer; + /** * A Tween is able to manipulate the properties of one or more objects to any given value, based * on a duration and type of ease. They are rarely instantiated directly and instead should be @@ -85588,101 +86935,206 @@ declare namespace Phaser { function TweenData(target: any, index: integer, key: string, getEnd: Function, getStart: Function, getActive: Function, ease: Function, delay: number, duration: number, yoyo: boolean, hold: number, repeat: number, repeatDelay: number, flipX: boolean, flipY: boolean): Phaser.Types.Tweens.TweenDataConfig; /** - * TweenData state. + * The Tween Manager is a default Scene Plugin which controls and updates Tweens and Timelines. */ - var CREATED: integer; + class TweenManager { + /** + * + * @param scene The Scene which owns this Tween Manager. + */ + constructor(scene: Phaser.Scene); - /** - * TweenData state. - */ - var INIT: integer; + /** + * The Scene which owns this Tween Manager. + */ + scene: Phaser.Scene; - /** - * TweenData state. - */ - var DELAY: integer; + /** + * The Systems object of the Scene which owns this Tween Manager. + */ + systems: Phaser.Scenes.Systems; - /** - * TweenData state. - */ - var OFFSET_DELAY: integer; + /** + * The time scale of the Tween Manager. + * + * This value scales the time delta between two frames, thus influencing the speed of time for all Tweens owned by this Tween Manager. + */ + timeScale: number; - /** - * TweenData state. - */ - var PENDING_RENDER: integer; + /** + * Create a Tween Timeline and return it, but do NOT add it to the active or pending Tween lists. + * @param config The configuration object for the Timeline and its Tweens. + */ + createTimeline(config?: Phaser.Types.Tweens.TimelineBuilderConfig): Phaser.Tweens.Timeline; - /** - * TweenData state. - */ - var PLAYING_FORWARD: integer; + /** + * Create a Tween Timeline and add it to the active Tween list/ + * @param config The configuration object for the Timeline and its Tweens. + */ + timeline(config?: Phaser.Types.Tweens.TimelineBuilderConfig): Phaser.Tweens.Timeline; - /** - * TweenData state. - */ - var PLAYING_BACKWARD: integer; + /** + * Create a Tween and return it, but do NOT add it to the active or pending Tween lists. + * @param config The configuration object for the Tween. + */ + create(config: Phaser.Types.Tweens.TweenBuilderConfig | object): Phaser.Tweens.Tween; - /** - * TweenData state. - */ - var HOLD_DELAY: integer; + /** + * Create a Tween and add it to the active Tween list. + * @param config The configuration object for the Tween. + */ + add(config: Phaser.Types.Tweens.TweenBuilderConfig | object): Phaser.Tweens.Tween; - /** - * TweenData state. - */ - var REPEAT_DELAY: integer; + /** + * Add an existing tween into the active Tween list. + * @param tween The Tween to add. + */ + existing(tween: Phaser.Tweens.Tween): Phaser.Tweens.TweenManager; - /** - * TweenData state. - */ - var COMPLETE: integer; + /** + * Create a Number Tween and add it to the active Tween list. + * @param config The configuration object for the Number Tween. + */ + addCounter(config: Phaser.Types.Tweens.NumberTweenBuilderConfig): Phaser.Tweens.Tween; - /** - * Tween state. - */ - var PENDING_ADD: integer; + /** + * Creates a Stagger function to be used by a Tween property. + * + * The stagger function will allow you to stagger changes to the value of the property across all targets of the tween. + * + * This is only worth using if the tween has multiple targets. + * + * The following will stagger the delay by 100ms across all targets of the tween, causing them to scale down to 0.2 + * over the duration specified: + * + * ```javascript + * this.tweens.add({ + * targets: [ ... ], + * scale: 0.2, + * ease: 'linear', + * duration: 1000, + * delay: this.tweens.stagger(100) + * }); + * ``` + * + * The following will stagger the delay by 500ms across all targets of the tween using a 10 x 6 grid, staggering + * from the center out, using a cubic ease. + * + * ```javascript + * this.tweens.add({ + * targets: [ ... ], + * scale: 0.2, + * ease: 'linear', + * duration: 1000, + * delay: this.tweens.stagger(500, { grid: [ 10, 6 ], from: 'center', ease: 'cubic.out' }) + * }); + * ``` + * @param config The configuration object for the Stagger function. + */ + stagger(config: Phaser.Types.Tweens.StaggerConfig): Function; - /** - * Tween state. - */ - var PAUSED: integer; + /** + * Updates the Tween Manager's internal lists at the start of the frame. + * + * This method will return immediately if no changes have been indicated. + */ + preUpdate(): void; - /** - * Tween state. - */ - var LOOP_DELAY: integer; + /** + * Updates all Tweens and Timelines of the Tween Manager. + * @param timestamp The current time in milliseconds. + * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. + */ + update(timestamp: number, delta: number): void; - /** - * Tween state. - */ - var ACTIVE: integer; + /** + * Removes the given tween from the Tween Manager, regardless of its state (pending or active). + * @param tween The Tween to be removed. + */ + remove(tween: Phaser.Tweens.Tween): Phaser.Tweens.TweenManager; - /** - * Tween state. - */ - var COMPLETE_DELAY: integer; + /** + * Checks if a Tween or Timeline is active and adds it to the Tween Manager at the start of the frame if it isn't. + * @param tween The Tween to check. + */ + makeActive(tween: Phaser.Tweens.Tween): Phaser.Tweens.TweenManager; - /** - * Tween state. - */ - var PENDING_REMOVE: integer; + /** + * Passes all Tweens to the given callback. + * @param callback The function to call. + * @param scope The scope (`this` object) to call the function with. + * @param args The arguments to pass into the function. Its first argument will always be the Tween currently being iterated. + */ + each(callback: Function, scope?: object, ...args: any[]): void; - /** - * Tween state. - */ - var REMOVED: integer; + /** + * Returns an array of all active Tweens and Timelines in the Tween Manager. + */ + getAllTweens(): Phaser.Tweens.Tween[]; + + /** + * Returns the scale of the time delta for all Tweens and Timelines owned by this Tween Manager. + */ + getGlobalTimeScale(): number; + + /** + * Returns an array of all Tweens or Timelines in the Tween Manager which affect the given target or array of targets. + * @param target The target to look for. Provide an array to look for multiple targets. + */ + getTweensOf(target: object | any[]): Phaser.Tweens.Tween[]; + + /** + * Checks if the given object is being affected by a playing Tween. + * @param target target Phaser.Tweens.Tween object + */ + isTweening(target: object): boolean; + + /** + * Stops all Tweens in this Tween Manager. They will be removed at the start of the frame. + */ + killAll(): Phaser.Tweens.TweenManager; + + /** + * Stops all Tweens which affect the given target or array of targets. The Tweens will be removed from the Tween Manager at the start of the frame. + * @param target The target to look for. Provide an array to look for multiple targets. + */ + killTweensOf(target: object | any[]): Phaser.Tweens.TweenManager; + + /** + * Pauses all Tweens in this Tween Manager. + */ + pauseAll(): Phaser.Tweens.TweenManager; + + /** + * Resumes all Tweens in this Tween Manager. + */ + resumeAll(): Phaser.Tweens.TweenManager; + + /** + * Sets a new scale of the time delta for this Tween Manager. + * + * The time delta is the time elapsed between two consecutive frames and influences the speed of time for this Tween Manager and all Tweens it owns. Values higher than 1 increase the speed of time, while values smaller than 1 decrease it. A value of 0 freezes time and is effectively equivalent to pausing all Tweens. + * @param value The new scale of the time delta, where 1 is the normal speed. + */ + setGlobalTimeScale(value: number): Phaser.Tweens.TweenManager; + + /** + * The Scene that owns this plugin is shutting down. + * We need to kill and reset all internal properties as well as stop listening to Scene events. + */ + shutdown(): void; + + /** + * The Scene that owns this plugin is being destroyed. + * We need to shutdown and then kill off all external references. + */ + destroy(): void; + + } } namespace Utils { - /** - * A NOOP (No Operation) callback function. - * - * Used internally by Phaser when it's more expensive to determine if a callback exists - * than it is to just invoke an empty function. - */ - function NOOP(): void; - namespace Array { /** * Adds the given item, or array of items, to the array. @@ -85817,6 +87269,84 @@ declare namespace Phaser { */ function GetRandom(array: any[], startIndex?: integer, length?: integer): any; + namespace Matrix { + /** + * Checks if an array can be used as a matrix. + * + * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows) have the same length. There must be at least two rows: + * + * ``` + * [ + * [ 1, 1, 1, 1, 1, 1 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 2, 0, 1, 2, 0, 4 ], + * [ 2, 0, 3, 4, 0, 4 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 3, 3, 3, 3, 3, 3 ] + * ] + * ``` + * @param matrix The array to check. + */ + function CheckMatrix(matrix?: T[][]): boolean; + + /** + * Generates a string (which you can pass to console.log) from the given Array Matrix. + * @param matrix A 2-dimensional array. + */ + function MatrixToString(matrix?: T[][]): string; + + /** + * Reverses the columns in the given Array Matrix. + * @param matrix The array matrix to reverse the columns for. + */ + function ReverseColumns(matrix?: T[][]): T[][]; + + /** + * Reverses the rows in the given Array Matrix. + * @param matrix The array matrix to reverse the rows for. + */ + function ReverseRows(matrix?: T[][]): T[][]; + + /** + * Rotates the array matrix 180 degrees. + * @param matrix The array to rotate. + */ + function Rotate180(matrix?: T[][]): T[][]; + + /** + * Rotates the array matrix to the left (or 90 degrees) + * @param matrix The array to rotate. + */ + function RotateLeft(matrix?: T[][]): T[][]; + + /** + * Rotates the array matrix based on the given rotation value. + * + * The value can be given in degrees: 90, -90, 270, -270 or 180, + * or a string command: `rotateLeft`, `rotateRight` or `rotate180`. + * + * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}. + * @param matrix The array to rotate. + * @param direction The amount to rotate the matrix by. Default 90. + */ + function RotateMatrix(matrix?: T[][], direction?: number | string): T[][]; + + /** + * Rotates the array matrix to the left (or -90 degrees) + * @param matrix The array to rotate. + */ + function RotateRight(matrix?: T[][]): T[][]; + + /** + * Transposes the elements of the given matrix (array of arrays). + * + * The transpose of a matrix is a new matrix whose rows are the columns of the original. + * @param array The array matrix to transpose. + */ + function TransposeMatrix(array?: T[][]): T[][]; + + } + /** * Moves the given array element down one place in the array. * The array is modified in-place. @@ -86081,84 +87611,6 @@ declare namespace Phaser { */ function Swap(array: any[], item1: any, item2: any): any[]; - namespace Matrix { - /** - * Checks if an array can be used as a matrix. - * - * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows) have the same length. There must be at least two rows: - * - * ``` - * [ - * [ 1, 1, 1, 1, 1, 1 ], - * [ 2, 0, 0, 0, 0, 4 ], - * [ 2, 0, 1, 2, 0, 4 ], - * [ 2, 0, 3, 4, 0, 4 ], - * [ 2, 0, 0, 0, 0, 4 ], - * [ 3, 3, 3, 3, 3, 3 ] - * ] - * ``` - * @param matrix The array to check. - */ - function CheckMatrix(matrix?: T[][]): boolean; - - /** - * Generates a string (which you can pass to console.log) from the given Array Matrix. - * @param matrix A 2-dimensional array. - */ - function MatrixToString(matrix?: T[][]): string; - - /** - * Reverses the columns in the given Array Matrix. - * @param matrix The array matrix to reverse the columns for. - */ - function ReverseColumns(matrix?: T[][]): T[][]; - - /** - * Reverses the rows in the given Array Matrix. - * @param matrix The array matrix to reverse the rows for. - */ - function ReverseRows(matrix?: T[][]): T[][]; - - /** - * Rotates the array matrix 180 degrees. - * @param matrix The array to rotate. - */ - function Rotate180(matrix?: T[][]): T[][]; - - /** - * Rotates the array matrix to the left (or 90 degrees) - * @param matrix The array to rotate. - */ - function RotateLeft(matrix?: T[][]): T[][]; - - /** - * Rotates the array matrix based on the given rotation value. - * - * The value can be given in degrees: 90, -90, 270, -270 or 180, - * or a string command: `rotateLeft`, `rotateRight` or `rotate180`. - * - * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}. - * @param matrix The array to rotate. - * @param direction The amount to rotate the matrix by. Default 90. - */ - function RotateMatrix(matrix?: T[][], direction?: number | string): T[][]; - - /** - * Rotates the array matrix to the left (or -90 degrees) - * @param matrix The array to rotate. - */ - function RotateRight(matrix?: T[][]): T[][]; - - /** - * Transposes the elements of the given matrix (array of arrays). - * - * The transpose of a matrix is a new matrix whose rows are the columns of the original. - * @param array The array matrix to transpose. - */ - function TransposeMatrix(array?: T[][]): T[][]; - - } - } namespace Base64 { @@ -86181,6 +87633,14 @@ declare namespace Phaser { } + /** + * A NOOP (No Operation) callback function. + * + * Used internally by Phaser when it's more expensive to determine if a callback exists + * than it is to just invoke an empty function. + */ + function NOOP(): void; + namespace Objects { /** * Shallow Object Clone. Will not clone nested objects. @@ -86381,6 +87841,12 @@ declare namespace Phaser { */ function Reverse(string: string): string; + /** + * Capitalizes the first letter of a string if there is one. + * @param str The string to capitalize. + */ + function UppercaseFirst(str: string): string; + /** * Creates and returns an RFC4122 version 4 compliant UUID. * @@ -86389,12 +87855,6 @@ declare namespace Phaser { */ function UUID(): string; - /** - * Capitalizes the first letter of a string if there is one. - * @param str The string to capitalize. - */ - function UppercaseFirst(str: string): string; - } } @@ -87296,66 +88756,6 @@ declare type ArcadePhysicsCallback = (object1: Phaser.GameObjects.GameObject, ob declare type CollideCallback = (body: Phaser.Physics.Impact.Body, other: Phaser.Physics.Impact.Body, axis: string)=>void; -declare namespace MatterJS { - /** - * The `Matter.Body` module contains methods for creating and manipulating body models. - * A `Matter.Body` is a rigid body that can be simulated by a `Matter.Engine`. - * Factories for commonly used body configurations (such as rectangles, circles and other polygons) can be found in the module `Matter.Bodies`. - */ - class Body { - } - - /** - * The `Matter.Bodies` module contains factory methods for creating rigid body models - * with commonly used body configurations (such as rectangles, circles and other polygons). - */ - class Bodies { - } - - /** - * The `Matter.Composite` module contains methods for creating and manipulating composite bodies. - * A composite body is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`, therefore composites form a tree structure. - * It is important to use the functions in this module to modify composites, rather than directly modifying their properties. - * Note that the `Matter.World` object is also a type of `Matter.Composite` and as such all composite methods here can also operate on a `Matter.World`. - */ - class Composite { - } - - /** - * The `Matter.World` module contains methods for creating and manipulating the world composite. - * A `Matter.World` is a `Matter.Composite` body, which is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`. - * A `Matter.World` has a few additional properties including `gravity` and `bounds`. - * It is important to use the functions in the `Matter.Composite` module to modify the world composite, rather than directly modifying its properties. - * There are also a few methods here that alias those in `Matter.Composite` for easier readability. - */ - class World extends MatterJS.Composite { - } - - /** - * The `Matter.Constraint` module contains methods for creating and manipulating constraints. - * Constraints are used for specifying that a fixed distance must be maintained between two bodies (or a body and a fixed world-space position). - * The stiffness of constraints can be modified to create springs or elastic. - */ - class Constraint { - } - - /** - * The `Matter.Engine` module contains methods for creating and manipulating engines. - * An engine is a controller that manages updating the simulation of the world. - */ - class Engine { - } - - /** - * The `Matter.Vertices` module contains methods for creating and manipulating sets of vertices. - * A set of vertices is an array of `Matter.Vector` with additional indexing properties inserted by `Vertices.create`. - * A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull). - */ - class Vertices { - } - -} - declare type WebGLContextCallback = (renderer: Phaser.Renderer.WebGL.WebGLRenderer)=>void; declare type EachListCallback = (item: I, ...args: any[])=>void; @@ -87366,14 +88766,14 @@ declare type EachSetCallback = (entry: E, index: number)=>void; declare type EachTextureCallback = (texture: Phaser.Textures.Texture, ...args: any[])=>void; -declare type TilemapFilterCallback = (value: Phaser.GameObjects.GameObject, index: number, array: Phaser.GameObjects.GameObject[])=>void; - -declare type TilemapFindCallback = (value: Phaser.GameObjects.GameObject, index: number, array: Phaser.GameObjects.GameObject[])=>void; - declare type FindTileCallback = (value: Phaser.Tilemaps.Tile, index: integer, array: Phaser.Tilemaps.Tile[])=>void; declare type EachTileCallback = (value: Phaser.Tilemaps.Tile, index: integer, array: Phaser.Tilemaps.Tile[])=>void; +declare type TilemapFilterCallback = (value: Phaser.GameObjects.GameObject, index: number, array: Phaser.GameObjects.GameObject[])=>void; + +declare type TilemapFindCallback = (value: Phaser.GameObjects.GameObject, index: number, array: Phaser.GameObjects.GameObject[])=>void; + /** * Extends the given `myClass` object's prototype with the properties of `definition`. * @param ctor The constructor object to mix into. From 1c6e8df43678e3f8fbd91d678b21923399a94e3b Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 13 Jan 2020 17:10:19 +0000 Subject: [PATCH 144/189] Update MatterPhysics.js --- src/physics/matter-js/MatterPhysics.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/physics/matter-js/MatterPhysics.js b/src/physics/matter-js/MatterPhysics.js index daa9659b4..802949fa0 100644 --- a/src/physics/matter-js/MatterPhysics.js +++ b/src/physics/matter-js/MatterPhysics.js @@ -290,7 +290,7 @@ var MatterPhysics = new Class({ /** * A reference to the `Matter.Bodies` module. * - * The `Matter.Bodies` module contains factory methods for creating rigid body models + * The `Matter.Bodies` module contains factory methods for creating rigid bodies * with commonly used body configurations (such as rectangles, circles and other polygons). * * @name Phaser.Physics.Matter.MatterPhysics#bodies From 66b6624a440e66f584cc516e58f4f8242cf9ea39 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 13 Jan 2020 17:10:33 +0000 Subject: [PATCH 145/189] Tidying up --- types/matter.d.ts | 3938 ++++++++++++++++++++------------------------- 1 file changed, 1746 insertions(+), 2192 deletions(-) diff --git a/types/matter.d.ts b/types/matter.d.ts index 2a6127f78..7e56d0ce0 100644 --- a/types/matter.d.ts +++ b/types/matter.d.ts @@ -7,272 +7,173 @@ // Piotr Pietrzak , // Richard Davey -export = MatterJS; -export as namespace MatterJS; - declare namespace MatterJS { - /** - * Installs the given plugins on the `Matter` namespace. - * This is a short-hand for `Plugin.use`, see it for more information. - * Call this function once at the start of your code, with all of the plugins you wish to install as arguments. - * Avoid calling this function multiple times unless you intend to manually control installation order. - * @method use - * @param ...plugin {Function} The plugin(s) to install on `base` (multi-argument). - */ - export function use(...plugins: (Plugin | string)[]): void; - /** - * The `Matter.Axes` module contains methods for creating and manipulating sets of axes. - * - * @class Axes - */ - export class Axes { - /** - * Creates a new set of axes from the given vertices. - * @method fromVertices - * @param {vertices} vertices - * @return {axes} A new axes from the given vertices - */ - static fromVertices(vertices: Array): Array; - /** - * Rotates a set of axes by the given angle. - * @method rotate - * @param {axes} axes - * @param {number} angle - */ - static rotate(axes: Array, angle: number): void; - } + // -------------------------------------------------------------- + // Interfaces + // -------------------------------------------------------------- + + export interface IChamfer { - interface IChamfer { radius?: number | Array; quality?: number; qualityMin?: number; qualityMax?: number; + } - interface IChamferableBodyDefinition extends IBodyDefinition { + export interface IChamferableBodyDefinition extends IBodyDefinition { + chamfer?: IChamfer; - } - /** - * The `Matter.Bodies` module contains factory methods for creating rigid body models - * with commonly used body configurations (such as rectangles, circles and other polygons). - * - * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). - * - * @class Bodies - */ - export class Bodies { - /** - * Creates a new rigid body model with a circle hull. - * The options parameter is an object that specifies any properties you wish to override the defaults. - * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. - * @method circle - * @param {number} x - * @param {number} y - * @param {number} radius - * @param {object} [options] - * @param {number} [maxSides] - * @return {body} A new circle body - */ - static circle(x: number, y: number, radius: number, options?: IBodyDefinition, maxSides?: number): Body; - - /** - * Creates a new rigid body model with a regular polygon hull with the given number of sides. - * The options parameter is an object that specifies any properties you wish to override the defaults. - * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. - * @method polygon - * @param {number} x - * @param {number} y - * @param {number} sides - * @param {number} radius - * @param {object} [options] - * @return {body} A new regular polygon body - */ - static polygon(x: number, y: number, sides: number, radius: number, options?: IChamferableBodyDefinition): Body; - - /** - * Creates a new rigid body model with a rectangle hull. - * The options parameter is an object that specifies any properties you wish to override the defaults. - * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. - * @method rectangle - * @param {number} x - * @param {number} y - * @param {number} width - * @param {number} height - * @param {object} [options] - * @return {body} A new rectangle body - */ - static rectangle(x: number, y: number, width: number, height: number, options?: IChamferableBodyDefinition): Body; - - /** - * Creates a new rigid body model with a trapezoid hull. - * The options parameter is an object that specifies any properties you wish to override the defaults. - * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. - * @method trapezoid - * @param {number} x - * @param {number} y - * @param {number} width - * @param {number} height - * @param {number} slope - * @param {object} [options] - * @return {body} A new trapezoid body - */ - static trapezoid(x: number, y: number, width: number, height: number, slope: number, options?: IChamferableBodyDefinition): Body; - /** - * Creates a body using the supplied vertices (or an array containing multiple sets of vertices). - * If the vertices are convex, they will pass through as supplied. - * Otherwise if the vertices are concave, they will be decomposed if [poly-decomp.js](https://github.com/schteppe/poly-decomp.js) is available. - * Note that this process is not guaranteed to support complex sets of vertices (e.g. those with holes may fail). - * By default the decomposition will discard collinear edges (to improve performance). - * It can also optionally discard any parts that have an area less than `minimumArea`. - * If the vertices can not be decomposed, the result will fall back to using the convex hull. - * The options parameter is an object that specifies any `Matter.Body` properties you wish to override the defaults. - * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. - * @method fromVertices - * @param {number} x - * @param {number} y - * @param [[vector]] vertexSets - * @param {object} [options] - * @param {bool} [flagInternal=false] - * @param {number} [removeCollinear=0.01] - * @param {number} [minimumArea=10] - * @return {body} - */ - static fromVertices(x: number, y: number, vertexSets: Array>, options?: IBodyDefinition, flagInternal?: boolean, removeCollinear?: number, minimumArea?: number): Body; } export interface IBodyDefinition { + /** * A `Number` specifying the angle of the body, in radians. * - * @property angle - * @type number - * @default 0 - */ + * @property angle + * @type number + * @default 0 + */ angle?: number; + /** * A `Number` that _measures_ the current angular speed of the body after the last `Body.update`. It is read-only and always positive (it's the magnitude of `body.angularVelocity`). * - * @readOnly - * @property angularSpeed - * @type number - * @default 0 - */ + * @readOnly + * @property angularSpeed + * @type number + * @default 0 + */ angularSpeed?: number; + /** * A `Number` that _measures_ the current angular velocity of the body after the last `Body.update`. It is read-only. * If you need to modify a body's angular velocity directly, you should apply a torque or simply change the body's `angle` (as the engine uses position-Verlet integration). * - * @readOnly - * @property angularVelocity - * @type number - * @default 0 - */ + * @readOnly + * @property angularVelocity + * @type number + * @default 0 + */ angularVelocity?: number; + /** * A `Number` that _measures_ the area of the body's convex hull, calculated at creation by `Body.create`. * - * @property area - * @type string - * @default - */ + * @property area + * @type string + * @default + */ area?: number; + /** * An array of unique axis vectors (edge normals) used for collision detection. * These are automatically calculated from the given convex hull (`vertices` array) in `Body.create`. * They are constantly updated by `Body.update` during the simulation. * - * @property axes - * @type vector[] - */ + * @property axes + * @type vector[] + */ axes?: Array; + /** * A `Bounds` object that defines the AABB region for the body. * It is automatically calculated from the given convex hull (`vertices` array) in `Body.create` and constantly updated by `Body.update` during simulation. * - * @property bounds - * @type bounds - */ - bounds?: Bounds; + * @property bounds + * @type bounds + */ + bounds?: IBound; + /** * A `Number` that defines the density of the body, that is its mass per unit area. * If you pass the density via `Body.create` the `mass` property is automatically calculated for you based on the size (area) of the object. * This is generally preferable to simply setting mass and allows for more intuitive definition of materials (e.g. rock has a higher density than wood). * - * @property density - * @type number - * @default 0.001 - */ + * @property density + * @type number + * @default 0.001 + */ density?: number; + /** * A `Vector` that specifies the force to apply in the current step. It is zeroed after every `Body.update`. See also `Body.applyForce`. - * - * @property force - * @type vector - * @default { x: 0, y: 0 } - */ + * + * @property force + * @type vector + * @default { x: 0, y: 0 } + */ force?: Vector; + /** * A `Number` that defines the friction of the body. The value is always positive and is in the range `(0, 1)`. - * A value of `0` means that the body may slide indefinitely. - * A value of `1` means the body may come to a stop almost instantly after a force is applied. - * - * The effects of the value may be non-linear. - * High values may be unstable depending on the body. - * The engine uses a Coulomb friction model including static and kinetic friction. - * Note that collision response is based on _pairs_ of bodies, and that `friction` values are _combined_ with the following formula: - * - * Math.min(bodyA.friction, bodyB.friction) - * - * @property friction - * @type number - * @default 0.1 - */ + * A value of `0` means that the body may slide indefinitely. + * A value of `1` means the body may come to a stop almost instantly after a force is applied. + * + * The effects of the value may be non-linear. + * High values may be unstable depending on the body. + * The engine uses a Coulomb friction model including static and kinetic friction. + * Note that collision response is based on _pairs_ of bodies, and that `friction` values are _combined_ with the following formula: + * + * Math.min(bodyA.friction, bodyB.friction) + * + * @property friction + * @type number + * @default 0.1 + */ friction?: number; + /** * A `Number` that defines the air friction of the body (air resistance). * A value of `0` means the body will never slow as it moves through space. * The higher the value, the faster a body slows when moving through space. * The effects of the value are non-linear. * - * @property frictionAir - * @type number - * @default 0.01 - */ + * @property frictionAir + * @type number + * @default 0.01 + */ frictionAir?: number; + /** * An integer `Number` uniquely identifying number generated in `Body.create` by `Common.nextId`. * - * @property id - * @type number - */ + * @property id + * @type number + */ id?: number; + /** * A `Number` that defines the moment of inertia (i.e. second moment of area) of the body. * It is automatically calculated from the given convex hull (`vertices` array) and density in `Body.create`. * If you modify this value, you must also modify the `body.inverseInertia` property (`1 / inertia`). * - * @property inertia - * @type number - */ + * @property inertia + * @type number + */ inertia?: number; + /** * A `Number` that defines the inverse moment of inertia of the body (`1 / inertia`). * If you modify this value, you must also modify the `body.inertia` property. * - * @property inverseInertia - * @type number - */ + * @property inverseInertia + * @type number + */ inverseInertia?: number; + /** * A `Number` that defines the inverse mass of the body (`1 / mass`). * If you modify this value, you must also modify the `body.mass` property. * - * @property inverseMass - * @type number - */ + * @property inverseMass + * @type number + */ inverseMass?: number; + /** * A flag that indicates whether a body is a sensor. Sensor triggers collision events, but doesn't react with colliding body physically. * @@ -281,155 +182,171 @@ declare namespace MatterJS { * @default false */ isSensor?: boolean; + /** * A flag that indicates whether the body is considered sleeping. A sleeping body acts similar to a static body, except it is only temporary and can be awoken. * If you need to set a body as sleeping, you should use `Sleeping.set` as this requires more than just setting this flag. * - * @property isSleeping - * @type boolean - * @default false - */ + * @property isSleeping + * @type boolean + * @default false + */ isSleeping?: boolean; + /** * A flag that indicates whether a body is considered static. A static body can never change position or angle and is completely fixed. * If you need to set a body as static after its creation, you should use `Body.setStatic` as this requires more than just setting this flag. * - * @property isStatic - * @type boolean - * @default false - */ + * @property isStatic + * @type boolean + * @default false + */ isStatic?: boolean; + /** * An arbitrary `String` name to help the user identify and manage bodies. * - * @property label - * @type string - * @default "Body" - */ - + * @property label + * @type string + * @default "Body" + */ label?: string; + /** * A `Number` that defines the mass of the body, although it may be more appropriate to specify the `density` property instead. * If you modify this value, you must also modify the `body.inverseMass` property (`1 / mass`). * - * @property mass - * @type number - */ + * @property mass + * @type number + */ mass?: number; + /** * A `Number` that _measures_ the amount of movement a body currently has (a combination of `speed` and `angularSpeed`). It is read-only and always positive. - * It is used and updated by the `Matter.Sleeping` module during simulation to decide if a body has come to rest. - * - * @readOnly - * @property motion - * @type number - * @default 0 - */ + * It is used and updated by the `Matter.Sleeping` module during simulation to decide if a body has come to rest. + * + * @readOnly + * @property motion + * @type number + * @default 0 + */ motion?: number; + /** * A `Vector` that specifies the current world-space position of the body. * - * @property position - * @type vector - * @default { x: 0, y: */ + * @property position + * @type vector + */ position?: Vector; + /** * An `Object` that defines the rendering properties to be consumed by the module `Matter.Render`. - * - * @property render - * @type object - */ + * + * @property render + * @type object + */ render?: IBodyRenderOptions; + /** * A `Number` that defines the restitution (elasticity) of the body. The value is always positive and is in the range `(0, 1)`. * A value of `0` means collisions may be perfectly inelastic and no bouncing may occur. * A value of `0.8` means the body may bounce back with approximately 80% of its kinetic energy. * Note that collision response is based on _pairs_ of bodies, and that `restitution` values are _combined_ with the following formula: * - * Math.max(bodyA.restitution, bodyB.restitution) - * - * @property restitution - * @type number - * @default 0 - */ + * Math.max(bodyA.restitution, bodyB.restitution) + * + * @property restitution + * @type number + * @default 0 + */ restitution?: number; + /** * A `Number` that defines the number of updates in which this body must have near-zero velocity before it is set as sleeping by the `Matter.Sleeping` module (if sleeping is enabled by the engine). * - * @property sleepThreshold - * @type number - * @default 60 - */ + * @property sleepThreshold + * @type number + * @default 60 + */ sleepThreshold?: number; + /** * A `Number` that specifies a tolerance on how far a body is allowed to 'sink' or rotate into other bodies. * Avoid changing this value unless you understand the purpose of `slop` in physics engines. * The default should generally suffice, although very large bodies may require larger values for stable stacking. * - * @property slop - * @type number - * @default 0.05 - */ + * @property slop + * @type number + * @default 0.05 + */ slop?: number; + /** * A `Number` that _measures_ the current speed of the body after the last `Body.update`. It is read-only and always positive (it's the magnitude of `body.velocity`). * - * @readOnly - * @property speed - * @type number - * @default 0 - */ + * @readOnly + * @property speed + * @type number + * @default 0 + */ speed?: number; + /** * A `Number` that allows per-body time scaling, e.g. a force-field where bodies inside are in slow-motion, while others are at full speed. - * - * @property timeScale - * @type number - * @default 1 - */ + * + * @property timeScale + * @type number + * @default 1 + */ timeScale?: number; + /** * A `Number` that specifies the torque (turning force) to apply in the current step. It is zeroed after every `Body.update`. - * - * @property torque - * @type number - * @default 0 - */ + * + * @property torque + * @type number + * @default 0 + */ torque?: number; + /** * A `String` denoting the type of object. - * - * @property type - * @type string - * @default "body" - */ + * + * @property type + * @type string + * @default "body" + */ type?: string; + /** * A `Vector` that _measures_ the current velocity of the body after the last `Body.update`. It is read-only. * If you need to modify a body's velocity directly, you should either apply a force or simply change the body's `position` (as the engine uses position-Verlet integration). * - * @readOnly - * @property velocity - * @type vector - * @default { x: 0, y: 0 } - */ + * @readOnly + * @property velocity + * @type vector + * @default { x: 0, y: 0 } + */ velocity?: Vector; + /** * An array of `Vector` objects that specify the convex hull of the rigid body. * These should be provided about the origin `(0, 0)`. E.g. * - * [{ x: 0, y: 0 }, { x: 25, y: 50 }, { x: 50, y: 0 }] - * - * When passed via `Body.create`, the vertices are translated relative to `body.position` (i.e. world-space, and constantly updated by `Body.update` during simulation). - * The `Vector` objects are also augmented with additional properties required for efficient collision detection. - * - * Other properties such as `inertia` and `bounds` are automatically calculated from the passed vertices (unless provided via `options`). - * Concave hulls are not currently supported. The module `Matter.Vertices` contains useful methods for working with vertices. - * - * @property vertices - * @type vector[] - */ + * [{ x: 0, y: 0 }, { x: 25, y: 50 }, { x: 50, y: 0 }] + * + * When passed via `Body.create`, the vertices are translated relative to `body.position` (i.e. world-space, and constantly updated by `Body.update` during simulation). + * The `Vector` objects are also augmented with additional properties required for efficient collision detection. + * + * Other properties such as `inertia` and `bounds` are automatically calculated from the passed vertices (unless provided via `options`). + * Concave hulls are not currently supported. The module `Matter.Vertices` contains useful methods for working with vertices. + * + * @property vertices + * @type vector[] + */ vertices?: Array; + /** * An array of bodies that make up this body. * The first body in the array must always be a self reference to the current body instance. @@ -438,57 +355,72 @@ declare namespace MatterJS { * Parts themselves should never be added to a `World`, only the parent body should be. * Use `Body.setParts` when setting parts to ensure correct updates of all properties. * - * @property parts - * @type body[] - */ + * @property parts + * @type body[] + */ parts?: Array; + /** * A self reference if the body is _not_ a part of another body. * Otherwise this is a reference to the body that this is a part of. * See `body.parts`. * - * @property parent - * @type body - */ + * @property parent + * @type body + */ parent?: Body; + /** * A `Number` that defines the static friction of the body (in the Coulomb friction model). * A value of `0` means the body will never 'stick' when it is nearly stationary and only dynamic `friction` is used. * The higher the value (e.g. `10`), the more force it will take to initially get the body moving when nearly stationary. * This value is multiplied with the `friction` property to make it easier to change `friction` and maintain an appropriate amount of static friction. * - * @property frictionStatic - * @type number - * @default 0.5 - */ + * @property frictionStatic + * @type number + * @default 0.5 + */ frictionStatic?: number; + /** * An `Object` that specifies the collision filtering properties of this body. * - * Collisions between two bodies will obey the following rules: - * - If the two bodies have the same non-zero value of `collisionFilter.group`, - * they will always collide if the value is positive, and they will never collide - * if the value is negative. - * - If the two bodies have different values of `collisionFilter.group` or if one - * (or both) of the bodies has a value of 0, then the category/mask rules apply as follows: - * - * Each body belongs to a collision category, given by `collisionFilter.category`. This - * value is used as a bit field and the category should have only one bit set, meaning that - * the value of this property is a power of two in the range [1, 2^31]. Thus, there are 32 - * different collision categories available. - * - * Each body also defines a collision bitmask, given by `collisionFilter.mask` which specifies - * the categories it collides with (the value is the bitwise AND value of all these categories). - * - * Using the category/mask rules, two bodies `A` and `B` collide if each includes the other's - * category in its mask, i.e. `(categoryA & maskB) !== 0` and `(categoryB & maskA) !== 0` - * are both true. - * - * @property collisionFilter - * @type object - */ + * Collisions between two bodies will obey the following rules: + * - If the two bodies have the same non-zero value of `collisionFilter.group`, + * they will always collide if the value is positive, and they will never collide + * if the value is negative. + * - If the two bodies have different values of `collisionFilter.group` or if one + * (or both) of the bodies has a value of 0, then the category/mask rules apply as follows: + * + * Each body belongs to a collision category, given by `collisionFilter.category`. This + * value is used as a bit field and the category should have only one bit set, meaning that + * the value of this property is a power of two in the range [1, 2^31]. Thus, there are 32 + * different collision categories available. + * + * Each body also defines a collision bitmask, given by `collisionFilter.mask` which specifies + * the categories it collides with (the value is the bitwise AND value of all these categories). + * + * Using the category/mask rules, two bodies `A` and `B` collide if each includes the other's + * category in its mask, i.e. `(categoryA & maskB) !== 0` and `(categoryB & maskA) !== 0` + * are both true. + * + * @property collisionFilter + * @type object + */ collisionFilter?: ICollisionFilter; + gameObject?: any; + scale?: Vector; + centerOfMass?: Vector; + centerOffset?: Vector; + gravityScale?: Vector; + ignoreGravity?: boolean; + ignorePointer?: boolean; + onCollideCallback?: Function; + onCollideEndCallback?: Function; + onCollideActiveCallback?: Function; + onCollideWith?: any; + } export interface IBodyRenderOptions { @@ -496,692 +428,102 @@ declare namespace MatterJS { /** * A flag that indicates if the body should be rendered. * - * @property render.visible - * @type boolean - * @default true - */ - visible?: boolean; - - /** - * An `Object` that defines the sprite properties to use when rendering, if any. - * - * @property render.sprite - * @type object - */ - sprite?: IBodyRenderOptionsSprite; - - /** - * A String that defines the fill style to use when rendering the body (if a sprite is not defined). It is the same as when using a canvas, so it accepts CSS style property values. - Default: a random colour - */ - fillStyle?: string; - - /** - * A Number that defines the line width to use when rendering the body outline (if a sprite is not defined). A value of 0 means no outline will be rendered. - Default: 1.5 - */ - lineWidth?: number; - - /** - * A String that defines the stroke style to use when rendering the body outline (if a sprite is not defined). It is the same as when using a canvas, so it accepts CSS style property values. - Default: a random colour - */ - strokeStyle?: string; - + * @property render.visible + * @type boolean + * @default true + */ + visible: boolean; /* * Sets the opacity. 1.0 is fully opaque. 0.0 is fully translucent */ - opacity?: number; + opacity: number; + + /** + * An `Object` that defines the sprite properties to use when rendering, if any. + * + * @property render.sprite + * @type object + */ + sprite?: IBodyRenderOptionsSprite; + + fillColor?: number; + fillOpacity?: number; + lineColor?: number; + lineOpacity?: number; + lineThickness?: number; + } export interface IBodyRenderOptionsSprite { - /** - * An `String` that defines the path to the image to use as the sprite texture, if any. - * - * @property render.sprite.texture - * @type string - */ - texture: string; /** * A `Number` that defines the scaling in the x-axis for the sprite, if any. * - * @property render.sprite.xScale - * @type number - * @default 1 - */ - xScale: number; + * @property render.sprite.xOffset + * @type number + * @default 0 + */ + xOffset: number; /** * A `Number` that defines the scaling in the y-axis for the sprite, if any. * - * @property render.sprite.yScale - * @type number - * @default 1 - */ - yScale: number; - } - - /** - * The `Matter.Body` module contains methods for creating and manipulating body models. - * A `Matter.Body` is a rigid body that can be simulated by a `Matter.Engine`. - * Factories for commonly used body configurations (such as rectangles, circles and other polygons) can be found in the module `Matter.Bodies`. - * - * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). - - * @class Body - */ - export class Body { - /** - * Applies a force to a body from a given world-space position, including resulting torque. - * @method applyForce - * @param {body} body - * @param {vector} position - * @param {vector} force + * @property render.sprite.yOffset + * @type number + * @default 0 */ - static applyForce(body: Body, position: Vector, force: Vector): void; - - /** - * Creates a new rigid body model. The options parameter is an object that specifies any properties you wish to override the defaults. - * All properties have default values, and many are pre-calculated automatically based on other properties. - * See the properties section below for detailed information on what you can pass via the `options` object. - * @method create - * @param {} options - * @return {body} body - */ - static create(options: IBodyDefinition): Body; - /** - * Rotates a body by a given angle relative to its current angle, without imparting any angular velocity. - * @method rotate - * @param {body} body - * @param {number} rotation - */ - static rotate(body: Body, rotation: number): void; - /** - * Returns the next unique group index for which bodies will collide. - * If `isNonColliding` is `true`, returns the next unique group index for which bodies will _not_ collide. - * See `body.collisionFilter` for more information. - * @method nextGroup - * @param {bool} [isNonColliding=false] - * @return {Number} Unique group index - */ - static nextGroup(isNonColliding: boolean): number; - /** - * Returns the next unique category bitfield (starting after the initial default category `0x0001`). - * There are 32 available. See `body.collisionFilter` for more information. - * @method nextCategory - * @return {Number} Unique category bitfield - */ - static nextCategory(): number; - /** - * Given a property and a value (or map of), sets the property(s) on the body, using the appropriate setter functions if they exist. - * Prefer to use the actual setter functions in performance critical situations. - * @method set - * @param {body} body - * @param {} settings A property name (or map of properties and values) to set on the body. - * @param {} value The value to set if `settings` is a single property name. - */ - static set(body: Body, settings: any, value?: any): void; - /** - * Sets the mass of the body. Inverse mass and density are automatically updated to reflect the change. - * @method setMass - * @param {body} body - * @param {number} mass - */ - static setMass(body: Body, mass: number): void; - /** - * Sets the density of the body. Mass is automatically updated to reflect the change. - * @method setDensity - * @param {body} body - * @param {number} density - */ - static setDensity(body: Body, density: number): void; - /** - * Sets the moment of inertia (i.e. second moment of area) of the body of the body. - * Inverse inertia is automatically updated to reflect the change. Mass is not changed. - * @method setInertia - * @param {body} body - * @param {number} inertia - */ - static setInertia(body: Body, interna: number): void; - /** - * Sets the body's vertices and updates body properties accordingly, including inertia, area and mass (with respect to `body.density`). - * Vertices will be automatically transformed to be orientated around their centre of mass as the origin. - * They are then automatically translated to world space based on `body.position`. - * - * The `vertices` argument should be passed as an array of `Matter.Vector` points (or a `Matter.Vertices` array). - * Vertices must form a convex hull, concave hulls are not supported. - * - * @method setVertices - * @param {body} body - * @param {vector[]} vertices - */ - static setVertices(body: Body, vertices: Array): void; - /** - * Sets the parts of the `body` and updates mass, inertia and centroid. - * Each part will have its parent set to `body`. - * By default the convex hull will be automatically computed and set on `body`, unless `autoHull` is set to `false.` - * Note that this method will ensure that the first part in `body.parts` will always be the `body`. - * @method setParts - * @param {body} body - * @param [body] parts - * @param {bool} [autoHull=true] - */ - static setParts(body: Body, parts: Body[], autoHull?: boolean): void; - /** - * Sets the position of the body instantly. Velocity, angle, force etc. are unchanged. - * @method setPosition - * @param {body} body - * @param {vector} position - */ - static setPosition(body: Body, position: Vector): void; - /** - * Sets the angle of the body instantly. Angular velocity, position, force etc. are unchanged. - * @method setAngle - * @param {body} body - * @param {number} angle - */ - static setAngle(body: Body, angle: number): void; - /** - * Sets the linear velocity of the body instantly. Position, angle, force etc. are unchanged. See also `Body.applyForce`. - * @method setVelocity - * @param {body} body - * @param {vector} velocity - */ - static setVelocity(body: Body, velocity: Vector): void; - /** - * Sets the angular velocity of the body instantly. Position, angle, force etc. are unchanged. See also `Body.applyForce`. - * @method setAngularVelocity - * @param {body} body - * @param {number} velocity - */ - static setAngularVelocity(body: Body, velocity: number): void; - - - - /** - * Sets the body as static, including isStatic flag and setting mass and inertia to Infinity. - * @method setStatic - * @param {body} body - * @param {bool} isStatic - */ - static setStatic(body: Body, isStatic: boolean): void; - - /** - * Scales the body, including updating physical properties (mass, area, axes, inertia), from a world-space point (default is body centre). - * @method scale - * @param {body} body - * @param {number} scaleX - * @param {number} scaleY - * @param {vector} [point] - */ - static scale(body: Body, scaleX: number, scaleY: number, point?: Vector): void; - - /** - * Moves a body by a given vector relative to its current position, without imparting any velocity. - * @method translate - * @param {body} body - * @param {vector} translation - */ - static translate(body: Body, translation: Vector): void; - - /** - * Performs a simulation step for the given `body`, including updating position and angle using Verlet integration. - * @method update - * @param {body} body - * @param {number} deltaTime - * @param {number} timeScale - * @param {number} correction - */ - static update(body: Body, deltaTime: number, timeScale: number, correction: number): void; - - /** - * A `Number` specifying the angle of the body, in radians. - * - * @property angle - * @type number - * @default 0 - */ - angle: number; - /** - * A `Number` that _measures_ the current angular speed of the body after the last `Body.update`. It is read-only and always positive (it's the magnitude of `body.angularVelocity`). - * - * @readOnly - * @property angularSpeed - * @type number - * @default 0 - */ - angularSpeed: number; - /** - * A `Number` that _measures_ the current angular velocity of the body after the last `Body.update`. It is read-only. - * If you need to modify a body's angular velocity directly, you should apply a torque or simply change the body's `angle` (as the engine uses position-Verlet integration). - * - * @readOnly - * @property angularVelocity - * @type number - * @default 0 - */ - angularVelocity: number; - /** - * A `Number` that _measures_ the area of the body's convex hull, calculated at creation by `Body.create`. - * - * @property area - * @type string - * @default - */ - area: number; - /** - * An array of unique axis vectors (edge normals) used for collision detection. - * These are automatically calculated from the given convex hull (`vertices` array) in `Body.create`. - * They are constantly updated by `Body.update` during the simulation. - * - * @property axes - * @type vector[] - */ - axes: Array; - /** - * A `Bounds` object that defines the AABB region for the body. - * It is automatically calculated from the given convex hull (`vertices` array) in `Body.create` and constantly updated by `Body.update` during simulation. - * - * @property bounds - * @type bounds - */ - bounds: Bounds; - /** - * A `Number` that defines the density of the body, that is its mass per unit area. - * If you pass the density via `Body.create` the `mass` property is automatically calculated for you based on the size (area) of the object. - * This is generally preferable to simply setting mass and allows for more intuitive definition of materials (e.g. rock has a higher density than wood). - * - * @property density - * @type number - * @default 0.001 - */ - density: number; - /** - * A `Vector` that specifies the force to apply in the current step. It is zeroed after every `Body.update`. See also `Body.applyForce`. - * - * @property force - * @type vector - * @default { x: 0, y: 0 } - */ - force: Vector; - /** - * A `Number` that defines the friction of the body. The value is always positive and is in the range `(0, 1)`. - * A value of `0` means that the body may slide indefinitely. - * A value of `1` means the body may come to a stop almost instantly after a force is applied. - * - * The effects of the value may be non-linear. - * High values may be unstable depending on the body. - * The engine uses a Coulomb friction model including static and kinetic friction. - * Note that collision response is based on _pairs_ of bodies, and that `friction` values are _combined_ with the following formula: - * - * Math.min(bodyA.friction, bodyB.friction) - * - * @property friction - * @type number - * @default 0.1 - */ - friction: number; - /** - * A `Number` that defines the air friction of the body (air resistance). - * A value of `0` means the body will never slow as it moves through space. - * The higher the value, the faster a body slows when moving through space. - * The effects of the value are non-linear. - * - * @property frictionAir - * @type number - * @default 0.01 - */ - frictionAir: number; - /** - * An integer `Number` uniquely identifying number generated in `Body.create` by `Common.nextId`. - * - * @property id - * @type number - */ - id: number; - /** - * A `Number` that defines the moment of inertia (i.e. second moment of area) of the body. - * It is automatically calculated from the given convex hull (`vertices` array) and density in `Body.create`. - * If you modify this value, you must also modify the `body.inverseInertia` property (`1 / inertia`). - * - * @property inertia - * @type number - */ - inertia: number; - /** - * A `Number` that defines the inverse moment of inertia of the body (`1 / inertia`). - * If you modify this value, you must also modify the `body.inertia` property. - * - * @property inverseInertia - * @type number - */ - inverseInertia: number; - /** - * A `Number` that defines the inverse mass of the body (`1 / mass`). - * If you modify this value, you must also modify the `body.mass` property. - * - * @property inverseMass - * @type number - */ - inverseMass: number; - /** - * A flag that indicates whether the body is considered sleeping. A sleeping body acts similar to a static body, except it is only temporary and can be awoken. - * If you need to set a body as sleeping, you should use `Sleeping.set` as this requires more than just setting this flag. - * - * @property isSleeping - * @type boolean - * @default false - */ - isSleeping: boolean; - /** - * A flag that indicates whether a body is considered static. A static body can never change position or angle and is completely fixed. - * If you need to set a body as static after its creation, you should use `Body.setStatic` as this requires more than just setting this flag. - * - * @property isStatic - * @type boolean - * @default false - */ - isStatic: boolean; - /** - * A flag that indicates whether a body is a sensor. Sensor triggers collision events, but doesn't react with colliding body physically. - * - * @property isSensor - * @type boolean - * @default false - */ - isSensor: boolean; - /** - * An arbitrary `String` name to help the user identify and manage bodies. - * - * @property label - * @type string - * @default "Body" - */ - - label: string; - /** - * A `Number` that defines the mass of the body, although it may be more appropriate to specify the `density` property instead. - * If you modify this value, you must also modify the `body.inverseMass` property (`1 / mass`). - * - * @property mass - * @type number - */ - mass: number; - /** - * A `Number` that _measures_ the amount of movement a body currently has (a combination of `speed` and `angularSpeed`). It is read-only and always positive. - * It is used and updated by the `Matter.Sleeping` module during simulation to decide if a body has come to rest. - * - * @readOnly - * @property motion - * @type number - * @default 0 - */ - motion: number; - /** - * A `Vector` that specifies the current world-space position of the body. - * - * @property position - * @type vector - * @default { x: 0, y: */ - position: Vector; - /** - * An `Object` that defines the rendering properties to be consumed by the module `Matter.Render`. - * - * @property render - * @type object - */ - render: IBodyRenderOptions; - /** - * A `Number` that defines the restitution (elasticity) of the body. The value is always positive and is in the range `(0, 1)`. - * A value of `0` means collisions may be perfectly inelastic and no bouncing may occur. - * A value of `0.8` means the body may bounce back with approximately 80% of its kinetic energy. - * Note that collision response is based on _pairs_ of bodies, and that `restitution` values are _combined_ with the following formula: - * - * Math.max(bodyA.restitution, bodyB.restitution) - * - * @property restitution - * @type number - * @default 0 - */ - restitution: number; - /** - * A `Number` that defines the number of updates in which this body must have near-zero velocity before it is set as sleeping by the `Matter.Sleeping` module (if sleeping is enabled by the engine). - * - * @property sleepThreshold - * @type number - * @default 60 - */ - sleepThreshold: number; - /** - * A `Number` that specifies a tolerance on how far a body is allowed to 'sink' or rotate into other bodies. - * Avoid changing this value unless you understand the purpose of `slop` in physics engines. - * The default should generally suffice, although very large bodies may require larger values for stable stacking. - * - * @property slop - * @type number - * @default 0.05 - */ - slop: number; - /** - * A `Number` that _measures_ the current speed of the body after the last `Body.update`. It is read-only and always positive (it's the magnitude of `body.velocity`). - * - * @readOnly - * @property speed - * @type number - * @default 0 - */ - speed: number; - /** - * A `Number` that allows per-body time scaling, e.g. a force-field where bodies inside are in slow-motion, while others are at full speed. - * - * @property timeScale - * @type number - * @default 1 - */ - timeScale: number; - /** - * A `Number` that specifies the torque (turning force) to apply in the current step. It is zeroed after every `Body.update`. - * - * @property torque - * @type number - * @default 0 - */ - torque: number; - /** - * A `String` denoting the type of object. - * - * @property type - * @type string - * @default "body" - */ - type: string; - /** - * A `Vector` that _measures_ the current velocity of the body after the last `Body.update`. It is read-only. - * If you need to modify a body's velocity directly, you should either apply a force or simply change the body's `position` (as the engine uses position-Verlet integration). - * - * @readOnly - * @property velocity - * @type vector - * @default { x: 0, y: 0 } - */ - velocity: Vector; - /** - * An array of `Vector` objects that specify the convex hull of the rigid body. - * These should be provided about the origin `(0, 0)`. E.g. - * - * [{ x: 0, y: 0 }, { x: 25, y: 50 }, { x: 50, y: 0 }] - * - * When passed via `Body.create`, the vertices are translated relative to `body.position` (i.e. world-space, and constantly updated by `Body.update` during simulation). - * The `Vector` objects are also augmented with additional properties required for efficient collision detection. - * - * Other properties such as `inertia` and `bounds` are automatically calculated from the passed vertices (unless provided via `options`). - * Concave hulls are not currently supported. The module `Matter.Vertices` contains useful methods for working with vertices. - * - * @property vertices - * @type vector[] - */ - vertices: Array; - /** - * An array of bodies that make up this body. - * The first body in the array must always be a self reference to the current body instance. - * All bodies in the `parts` array together form a single rigid compound body. - * Parts are allowed to overlap, have gaps or holes or even form concave bodies. - * Parts themselves should never be added to a `World`, only the parent body should be. - * Use `Body.setParts` when setting parts to ensure correct updates of all properties. - * - * @property parts - * @type body[] - */ - parts: Array; - /** - * A self reference if the body is _not_ a part of another body. - * Otherwise this is a reference to the body that this is a part of. - * See `body.parts`. - * - * @property parent - * @type body - */ - parent: Body; - /** - * A `Number` that defines the static friction of the body (in the Coulomb friction model). - * A value of `0` means the body will never 'stick' when it is nearly stationary and only dynamic `friction` is used. - * The higher the value (e.g. `10`), the more force it will take to initially get the body moving when nearly stationary. - * This value is multiplied with the `friction` property to make it easier to change `friction` and maintain an appropriate amount of static friction. - * - * @property frictionStatic - * @type number - * @default 0.5 - */ - frictionStatic: number; - /** - * An `Object` that specifies the collision filtering properties of this body. - * - * Collisions between two bodies will obey the following rules: - * - If the two bodies have the same non-zero value of `collisionFilter.group`, - * they will always collide if the value is positive, and they will never collide - * if the value is negative. - * - If the two bodies have different values of `collisionFilter.group` or if one - * (or both) of the bodies has a value of 0, then the category/mask rules apply as follows: - * - * Each body belongs to a collision category, given by `collisionFilter.category`. This - * value is used as a bit field and the category should have only one bit set, meaning that - * the value of this property is a power of two in the range [1, 2^31]. Thus, there are 32 - * different collision categories available. - * - * Each body also defines a collision bitmask, given by `collisionFilter.mask` which specifies - * the categories it collides with (the value is the bitwise AND value of all these categories). - * - * Using the category/mask rules, two bodies `A` and `B` collide if each includes the other's - * category in its mask, i.e. `(categoryA & maskB) !== 0` and `(categoryB & maskA) !== 0` - * are both true. - * - * @property collisionFilter - * @type object - */ - collisionFilter: ICollisionFilter; - + yOffset: number; } export interface IBound { + min: { x: number, y: number } max: { x: number, y: number } - } - /** - * The `Matter.Bounds` module contains methods for creating and manipulating axis-aligned bounding boxes (AABB). - * - * @class Bounds - */ - export class Bounds { - /** - * Creates a new axis-aligned bounding box (AABB) for the given vertices. - * @method create - * @param {vertices} vertices - * @return {bounds} A new bounds object - */ - static create (vertices: Vertices): Bounds; - /** - * Updates bounds using the given vertices and extends the bounds given a velocity. - * @method update - * @param {bounds} bounds - * @param {vertices} vertices - * @param {vector} velocity - */ - static update(bounds: Bounds, vertices: Vertices, velocity: Vector): void; - /** - * Returns true if the bounds contains the given point. - * @method contains - * @param {bounds} bounds - * @param {vector} point - * @return {boolean} True if the bounds contain the point, otherwise false - */ - static contains(bounds: Bounds, point: Vector): boolean; - /** - * Returns true if the two bounds intersect. - * @method overlaps - * @param {bounds} boundsA - * @param {bounds} boundsB - * @return {boolean} True if the bounds overlap, otherwise false - */ - static overlaps(boundsA: Bounds, boundsB: Bounds): boolean; - /** - * Translates the bounds by the given vector. - * @method translate - * @param {bounds} bounds - * @param {vector} vector - */ - static translate(bounds: Bounds, vector: Vector): void; - /** - * Shifts the bounds to the given position. - * @method shift - * @param {bounds} bounds - * @param {vector} position - */ - static shift(bounds: Bounds, position: Vector): void; } export interface ICompositeDefinition { + /** * An array of `Body` that are _direct_ children of this composite. * To add or remove bodies you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property. * If you wish to recursively find all descendants, you should use the `Composite.allBodies` method. * - * @property bodies - * @type body[] - * @default [] - */ - bodies?: Array; + * @property bodies + * @type body[] + * @default [] + */ + bodies?: Array; /** * An array of `Composite` that are _direct_ children of this composite. * To add or remove composites you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property. * If you wish to recursively find all descendants, you should use the `Composite.allComposites` method. * - * @property composites - * @type composite[] - * @default [] - */ - composites?: Array; + * @property composites + * @type composite[] + * @default [] + */ + composites?: Array; /** * An array of `Constraint` that are _direct_ children of this composite. * To add or remove constraints you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property. * If you wish to recursively find all descendants, you should use the `Composite.allConstraints` method. * - * @property constraints - * @type constraint[] - * @default [] - */ - constraints?: Array; + * @property constraints + * @type constraint[] + * @default [] + */ + constraints?: Array; /** * An integer `Number` uniquely identifying number generated in `Composite.create` by `Common.nextId`. * - * @property id - * @type number - */ + * @property id + * @type number + */ id?: number; /** @@ -1189,443 +531,110 @@ declare namespace MatterJS { * Most `Matter.Composite` methods will automatically set this flag to `true` to inform the engine of changes to be handled. * If you need to change it manually, you should use the `Composite.setModified` method. * - * @property isModified - * @type boolean - * @default false - */ + * @property isModified + * @type boolean + * @default false + */ isModified?: boolean; /** * An arbitrary `String` name to help the user identify and manage composites. * - * @property label - * @type string - * @default "Composite" - */ + * @property label + * @type string + * @default "Composite" + */ label?: string; /** - * The `Composite` that is the parent of this composite. It is automatically managed by the `Matter.Composite` methods. - * - * @property parent - * @type composite - * @default null - */ + * The `Composite` that is the parent of this composite. It is automatically managed by the `Matter.Composite` methods. + * + * @property parent + * @type composite + * @default null + */ parent?: Composite; /** * A `String` denoting the type of object. * - * @property type - * @type string - * @default "composite" - */ + * @property type + * @type string + * @default "composite" + */ type?: String; } - /** - * The `Matter.Composite` module contains methods for creating and manipulating composite bodies. - * A composite body is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`, therefore composites form a tree structure. - * It is important to use the functions in this module to modify composites, rather than directly modifying their properties. - * Note that the `Matter.World` object is also a type of `Matter.Composite` and as such all composite methods here can also operate on a `Matter.World`. - * - * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). - * - * @class Composite - */ - export class Composite { - /** - * Generic add function. Adds one or many body(s), constraint(s) or a composite(s) to the given composite. - * Triggers `beforeAdd` and `afterAdd` events on the `composite`. - * @method add - * @param {composite} composite - * @param {} object - * @return {composite} The original composite with the objects added - */ - static add(composite: Composite, object: Body | Composite | Constraint): Composite; - - /** - * Returns all bodies in the given composite, including all bodies in its children, recursively. - * @method allBodies - * @param {composite} composite - * @return {body[]} All the bodies - */ - static allBodies(composite: Composite): Array; - - /** - * Returns all composites in the given composite, including all composites in its children, recursively. - * @method allComposites - * @param {composite} composite - * @return {composite[]} All the composites - */ - static allComposites(composite: Composite): Array; - - /** - * Returns all constraints in the given composite, including all constraints in its children, recursively. - * @method allConstraints - * @param {composite} composite - * @return {constraint[]} All the constraints - */ - static allConstraints(composite: Composite): Array; - - /** - * Removes all bodies, constraints and composites from the given composite. - * Optionally clearing its children recursively. - * @method clear - * @param {composite} composite - * @param {boolean} keepStatic - * @param {boolean} [deep=false] - */ - static clear(composite: Composite, keepStatic: boolean, deep?: boolean): void; - - /** - * Creates a new composite. The options parameter is an object that specifies any properties you wish to override the defaults. - * See the properites section below for detailed information on what you can pass via the `options` object. - * @method create - * @param {} [options] - * @return {composite} A new composite - */ - static create(options?: ICompositeDefinition): Composite; - - /** - * Searches the composite recursively for an object matching the type and id supplied, null if not found. - * @method get - * @param {composite} composite - * @param {number} id - * @param {string} type - * @return {object} The requested object, if found - */ - static get(composite: Composite, id: number, type: string): Body | Composite | Constraint; - - /** - * Moves the given object(s) from compositeA to compositeB (equal to a remove followed by an add). - * @method move - * @param {compositeA} compositeA - * @param {object[]} objects - * @param {compositeB} compositeB - * @return {composite} Returns compositeA - */ - static move(compositeA: Composite, objects: Array, compositeB: Composite): Composite; - - /** - * Assigns new ids for all objects in the composite, recursively. - * @method rebase - * @param {composite} composite - * @return {composite} Returns composite - */ - static rebase(composite: Composite): Composite; - - /** - * Generic remove function. Removes one or many body(s), constraint(s) or a composite(s) to the given composite. - * Optionally searching its children recursively. - * Triggers `beforeRemove` and `afterRemove` events on the `composite`. - * @method remove - * @param {composite} composite - * @param {} object - * @param {boolean} [deep=false] - * @return {composite} The original composite with the objects removed - */ - static remove(composite: Composite, object: Body | Composite | Constraint, deep?: boolean): Composite; - - - - /** - * Sets the composite's `isModified` flag. - * If `updateParents` is true, all parents will be set (default: false). - * If `updateChildren` is true, all children will be set (default: false). - * @method setModified - * @param {composite} composite - * @param {boolean} isModified - * @param {boolean} [updateParents=false] - * @param {boolean} [updateChildren=false] - */ - static setModified(composite: Composite, isModified: boolean, updateParents?: boolean, updateChildren?: boolean): void; - /** - * Translates all children in the composite by a given vector relative to their current positions, - * without imparting any velocity. - * @method translate - * @param {composite} composite - * @param {vector} translation - * @param {bool} [recursive=true] - */ - static translate(composite: Composite, translation: Vector, recursive?: boolean): void; - /** - * Rotates all children in the composite by a given angle about the given point, without imparting any angular velocity. - * @method rotate - * @param {composite} composite - * @param {number} rotation - * @param {vector} point - * @param {bool} [recursive=true] - */ - static rotate(composite: Composite, rotation: number, point: Vector, recursive?: boolean): void; - /** - * Scales all children in the composite, including updating physical properties (mass, area, axes, inertia), from a world-space point. - * @method scale - * @param {composite} composite - * @param {number} scaleX - * @param {number} scaleY - * @param {vector} point - * @param {bool} [recursive=true] - */ - static scale(composite: Composite, scaleX: number, scaleY: number, point: Vector, recursive?: boolean): void; - - - /** - * An array of `Body` that are _direct_ children of this composite. - * To add or remove bodies you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property. - * If you wish to recursively find all descendants, you should use the `Composite.allBodies` method. - * - * @property bodies - * @type body[] - * @default [] - */ - bodies: Array; - - /** - * An array of `Composite` that are _direct_ children of this composite. - * To add or remove composites you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property. - * If you wish to recursively find all descendants, you should use the `Composite.allComposites` method. - * - * @property composites - * @type composite[] - * @default [] - */ - composites: Array; - - /** - * An array of `Constraint` that are _direct_ children of this composite. - * To add or remove constraints you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property. - * If you wish to recursively find all descendants, you should use the `Composite.allConstraints` method. - * - * @property constraints - * @type constraint[] - * @default [] - */ - constraints: Array; - - /** - * An integer `Number` uniquely identifying number generated in `Composite.create` by `Common.nextId`. - * - * @property id - * @type number - */ - id: number; - - /** - * A flag that specifies whether the composite has been modified during the current step. - * Most `Matter.Composite` methods will automatically set this flag to `true` to inform the engine of changes to be handled. - * If you need to change it manually, you should use the `Composite.setModified` method. - * - * @property isModified - * @type boolean - * @default false - */ - isModified: boolean; - - /** - * An arbitrary `String` name to help the user identify and manage composites. - * - * @property label - * @type string - * @default "Composite" - */ - label: string; - - /** - * The `Composite` that is the parent of this composite. It is automatically managed by the `Matter.Composite` methods. - * - * @property parent - * @type composite - * @default null - */ - parent: Composite; - - /** - * A `String` denoting the type of object. - * - * @property type - * @type string - * @default "composite" - */ - type: String; - - } - - /** - * The `Matter.Composites` module contains factory methods for creating composite bodies - * with commonly used configurations (such as stacks and chains). - * - * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). - * - * @class Composites - */ - export class Composites { - /** - * Creates a composite with simple car setup of bodies and constraints. - * @method car - * @param {number} xx - * @param {number} yy - * @param {number} width - * @param {number} height - * @param {number} wheelSize - * @return {composite} A new composite car body - */ - static car(xx: number, yy: number, width: number, height: number, wheelSize: number): Composite; - - /** - * Chains all bodies in the given composite together using constraints. - * @method chain - * @param {composite} composite - * @param {number} xOffsetA - * @param {number} yOffsetA - * @param {number} xOffsetB - * @param {number} yOffsetB - * @param {object} options - * @return {composite} A new composite containing objects chained together with constraints - */ - static chain(composite: Composite, xOffsetA: number, yOffsetA: number, xOffsetB: number, yOffsetB: number, options: any): Composite; - - /** - * Connects bodies in the composite with constraints in a grid pattern, with optional cross braces. - * @method mesh - * @param {composite} composite - * @param {number} columns - * @param {number} rows - * @param {boolean} crossBrace - * @param {object} options - * @return {composite} The composite containing objects meshed together with constraints - */ - static mesh(composite: Composite, columns: number, rows: number, crossBrace: boolean, options: any): Composite; - - /** - * Creates a composite with a Newton's Cradle setup of bodies and constraints. - * @method newtonsCradle - * @param {number} xx - * @param {number} yy - * @param {number} number - * @param {number} size - * @param {number} length - * @return {composite} A new composite newtonsCradle body - */ - newtonsCradle(xx: number, yy: number, _number: number, size: number, length: number): Composite; - - /** - * Create a new composite containing bodies created in the callback in a pyramid arrangement. - * This function uses the body's bounds to prevent overlaps. - * @method pyramid - * @param {number} xx - * @param {number} yy - * @param {number} columns - * @param {number} rows - * @param {number} columnGap - * @param {number} rowGap - * @param {function} callback - * @return {composite} A new composite containing objects created in the callback - */ - static pyramid(xx: number, yy: number, columns: number, rows: number, columnGap: number, rowGap: number, callback: Function): Composite; - - /** - * Creates a simple soft body like object. - * @method softBody - * @param {number} xx - * @param {number} yy - * @param {number} columns - * @param {number} rows - * @param {number} columnGap - * @param {number} rowGap - * @param {boolean} crossBrace - * @param {number} particleRadius - * @param {} particleOptions - * @param {} constraintOptions - * @return {composite} A new composite softBody - */ - static softBody(xx: number, yy: number, columns: number, rows: number, columnGap: number, rowGap: number, crossBrace: boolean, particleRadius: number, particleOptions: any, constraintOptions: any): Composite; - - /** - * Create a new composite containing bodies created in the callback in a grid arrangement. - * This function uses the body's bounds to prevent overlaps. - * @method stack - * @param {number} xx - * @param {number} yy - * @param {number} columns - * @param {number} rows - * @param {number} columnGap - * @param {number} rowGap - * @param {function} callback - * @return {composite} A new composite containing objects created in the callback - */ - static stack(xx: number, yy: number, columns: number, rows: number, columnGap: number, rowGap: number, callback: Function): Composite; - } - export interface IConstraintDefinition { + /** * The first possible `Body` that this constraint is attached to. * - * @property bodyA - * @type body - * @default null - */ - bodyA?: Body; + * @property bodyA + * @type body + * @default null + */ + bodyA?: IBodyDefinition; /** * The second possible `Body` that this constraint is attached to. * - * @property bodyB - * @type body - * @default null - */ - bodyB?: Body; + * @property bodyB + * @type body + * @default null + */ + bodyB?: IBodyDefinition; /** * An integer `Number` uniquely identifying number generated in `Composite.create` by `Common.nextId`. * - * @property id - * @type number - */ + * @property id + * @type number + */ id?: number; /** * An arbitrary `String` name to help the user identify and manage bodies. * - * @property label - * @type string - * @default "Constraint" - */ + * @property label + * @type string + * @default "Constraint" + */ label?: string; /** * A `Number` that specifies the target resting length of the constraint. * It is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. * - * @property length - * @type number - */ + * @property length + * @type number + */ length?: number; /** * A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyA` if defined, otherwise a world-space position. * - * @property pointA - * @type vector - * @default { x: 0, y: 0 } - */ + * @property pointA + * @type vector + * @default { x: 0, y: 0 } + */ pointA?: Vector; /** * A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyA` if defined, otherwise a world-space position. * - * @property pointB - * @type vector - * @default { x: 0, y: 0 } - */ + * @property pointB + * @type vector + * @default { x: 0, y: 0 } + */ pointB?: Vector; /** * An `Object` that defines the rendering properties to be consumed by the module `Matter.Render`. * - * @property render - * @type object - */ + * @property render + * @type object + */ render?: IConstraintRenderDefinition; /** @@ -1633,10 +642,10 @@ declare namespace MatterJS { * A value of `1` means the constraint should be very stiff. * A value of `0.2` means the constraint acts like a soft spring. * - * @property stiffness - * @type number - * @default 1 - */ + * @property stiffness + * @type number + * @default 1 + */ stiffness?: number; /** @@ -1655,577 +664,184 @@ declare namespace MatterJS { /** * A `String` denoting the type of object. * - * @property type - * @type string - * @default "constraint" - */ + * @property type + * @type string + * @default "constraint" + */ type?: string; + } export interface IConstraintRenderDefinition { + /** * A `Number` that defines the line width to use when rendering the constraint outline. * A value of `0` means no outline will be rendered. * - * @property render.lineWidth - * @type number - * @default 2 - */ + * @property render.lineWidth + * @type number + * @default 2 + */ lineWidth: number; /** * A `String` that defines the stroke style to use when rendering the constraint outline. * It is the same as when using a canvas, so it accepts CSS style property values. * - * @property render.strokeStyle - * @type string - * @default a random colour - */ + * @property render.strokeStyle + * @type string + * @default a random colour + */ strokeStyle: string; /** * A flag that indicates if the constraint should be rendered. * - * @property render.visible - * @type boolean - * @default true - */ + * @property render.visible + * @type boolean + * @default true + */ visible: boolean; } - - /** - * The `Matter.Constraint` module contains methods for creating and manipulating constraints. - * Constraints are used for specifying that a fixed distance must be maintained between two bodies (or a body and a fixed world-space position). - * The stiffness of constraints can be modified to create springs or elastic. - * - * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). - * - * @class Constraint - */ - export class Constraint { - /** - * Creates a new constraint. - * All properties have default values, and many are pre-calculated automatically based on other properties. - * See the properties section below for detailed information on what you can pass via the `options` object. - * @method create - * @param {} options - * @return {constraint} constraint - */ - static create(options: IConstraintDefinition): Constraint; - - /** - * The first possible `Body` that this constraint is attached to. - * - * @property bodyA - * @type body - * @default null - */ - bodyA: Body; - - /** - * The second possible `Body` that this constraint is attached to. - * - * @property bodyB - * @type body - * @default null - */ - bodyB: Body; - - /** - * An integer `Number` uniquely identifying number generated in `Composite.create` by `Common.nextId`. - * - * @property id - * @type number - */ - id: number; - - /** - * An arbitrary `String` name to help the user identify and manage bodies. - * - * @property label - * @type string - * @default "Constraint" - */ - label: string; - - /** - * A `Number` that specifies the target resting length of the constraint. - * It is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. - * - * @property length - * @type number - */ - length: number; - - /** - * A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyA` if defined, otherwise a world-space position. - * - * @property pointA - * @type vector - * @default { x: 0, y: 0 } - */ - pointA: Vector; - - /** - * A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyA` if defined, otherwise a world-space position. - * - * @property pointB - * @type vector - * @default { x: 0, y: 0 } - */ - pointB: Vector; - - /** - * An `Object` that defines the rendering properties to be consumed by the module `Matter.Render`. - * - * @property render - * @type object - */ - render: IConstraintRenderDefinition; - - /** - * A `Number` that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. - * A value of `1` means the constraint should be very stiff. - * A value of `0.2` means the constraint acts like a soft spring. - * - * @property stiffness - * @type number - * @default 1 - */ - stiffness: number; - - /** - * A `Number` that specifies the damping of the constraint, - * i.e. the amount of resistance applied to each body based on their velocities to limit the amount of oscillation. - * Damping will only be apparent when the constraint also has a very low `stiffness`. - * A value of `0.1` means the constraint will apply heavy damping, resulting in little to no oscillation. - * A value of `0` means the constraint will apply no damping. - * - * @property damping - * @type number - * @default 0 - */ - damping: number; - - /** - * A `String` denoting the type of object. - * - * @property type - * @type string - * @default "constraint" - */ - type: string; - } - - - export interface IEngineDefinition { + /** * An integer `Number` that specifies the number of position iterations to perform each update. * The higher the value, the higher quality the simulation will be at the expense of performance. * - * @property positionIterations - * @type number - * @default 6 - */ + * @property positionIterations + * @type number + * @default 6 + */ positionIterations?: number; + /** * An integer `Number` that specifies the number of velocity iterations to perform each update. * The higher the value, the higher quality the simulation will be at the expense of performance. * - * @property velocityIterations - * @type number - * @default 4 - */ + * @property velocityIterations + * @type number + * @default 4 + */ velocityIterations?: number; + /** * An integer `Number` that specifies the number of constraint iterations to perform each update. * The higher the value, the higher quality the simulation will be at the expense of performance. * The default value of `2` is usually very adequate. * - * @property constraintIterations - * @type number - * @default 2 - */ + * @property constraintIterations + * @type number + * @default 2 + */ constraintIterations?: number; - + /** * A flag that specifies whether the engine should allow sleeping via the `Matter.Sleeping` module. * Sleeping can improve stability and performance, but often at the expense of accuracy. * - * @property enableSleeping - * @type boolean - * @default false - */ + * @property enableSleeping + * @type boolean + * @default false + */ enableSleeping?: boolean; + /** * An `Object` containing properties regarding the timing systems of the engine. - * - * @property timing - * @type object - */ + * + * @property timing + * @type object + */ timing?: IEngineTimingOptions; + /** * An instance of a broadphase controller. The default value is a `Matter.Grid` instance created by `Engine.create`. * - * @property broadphase - * @type grid - * @default a Matter.Grid instance - */ + * @property broadphase + * @type grid + * @default a Matter.Grid instance + */ grid?: Grid; + /** * A `World` composite object that will contain all simulated bodies and constraints. * - * @property world - * @type world - * @default a Matter.World instance - */ + * @property world + * @type world + * @default a Matter.World instance + */ world?: World; } export interface IEngineTimingOptions { + /** * A `Number` that specifies the global scaling factor of time for all bodies. * A value of `0` freezes the simulation. * A value of `0.1` gives a slow-motion effect. * A value of `1.2` gives a speed-up effect. * - * @property timing.timeScale - * @type number - * @default 1 - */ + * @property timing.timeScale + * @type number + * @default 1 + */ timeScale: number; /** * A `Number` that specifies the current simulation-time in milliseconds starting from `0`. * It is incremented on every `Engine.update` by the given `delta` argument. * - * @property timing.timestamp - * @type number - * @default 0 - */ + * @property timing.timestamp + * @type number + * @default 0 + */ timestamp: number; - } - - /** - * The `Matter.Engine` module contains methods for creating and manipulating engines. - * An engine is a controller that manages updating the simulation of the world. - * See `Matter.Runner` for an optional game loop utility. - * - * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). - * - * @class Engine - */ - export class Engine { - /** - * Clears the engine including the world, pairs and broadphase. - * @method clear - * @param {engine} engine - */ - static clear(engine: Engine): void; - - /** - * Creates a new engine. The options parameter is an object that specifies any properties you wish to override the defaults. - * All properties have default values, and many are pre-calculated automatically based on other properties. - * See the properties section below for detailed information on what you can pass via the `options` object. - * @method create - * @param {HTMLElement} element - * @param {object} [options] - * @return {engine} engine - * @deprecated - */ - static create(element?: HTMLElement | IEngineDefinition, options?: IEngineDefinition): Engine; - - /** - * Creates a new engine. The options parameter is an object that specifies any properties you wish to override the defaults. - * All properties have default values, and many are pre-calculated automatically based on other properties. - * See the properties section below for detailed information on what you can pass via the `options` object. - * @method create - * @param {object} [options] - * @return {engine} engine - * @deprecated - */ - static create(options?: IEngineDefinition): Engine; - - /** - * Merges two engines by keeping the configuration of `engineA` but replacing the world with the one from `engineB`. - * @method merge - * @param {engine} engineA - * @param {engine} engineB - */ - static merge(engineA: Engine, engineB: Engine): void; - - - /** - * Moves the simulation forward in time by `delta` ms. - * The `correction` argument is an optional `Number` that specifies the time correction factor to apply to the update. - * This can help improve the accuracy of the simulation in cases where `delta` is changing between updates. - * The value of `correction` is defined as `delta / lastDelta`, i.e. the percentage change of `delta` over the last step. - * Therefore the value is always `1` (no correction) when `delta` constant (or when no correction is desired, which is the default). - * See the paper on Time Corrected Verlet for more information. - * - * Triggers `beforeUpdate` and `afterUpdate` events. - * Triggers `collisionStart`, `collisionActive` and `collisionEnd` events. - * @method update - * @param {engine} engine - * @param {number} [delta=16.666] - * @param {number} [correction=1] - */ - static update(engine: Engine, delta?: number, correction?: number): Engine; - - /** - * An alias for `Runner.run`, see `Matter.Runner` for more information. - * @method run - * @param {engine} engine - */ - static run(enige: Engine): void; - - /** - * An instance of a broadphase controller. The default value is a `Matter.Grid` instance created by `Engine.create`. - * - * @property broadphase - * @type grid - * @default a Matter.Grid instance - */ - broadphase: Grid; - /** - * An integer `Number` that specifies the number of constraint iterations to perform each update. - * The higher the value, the higher quality the simulation will be at the expense of performance. - * The default value of `2` is usually very adequate. - * - * @property constraintIterations - * @type number - * @default 2 - */ - constraintIterations: number; - - /** - * A flag that specifies whether the engine is running or not. - */ - enabled: boolean; - - /** - * A flag that specifies whether the engine should allow sleeping via the `Matter.Sleeping` module. - * Sleeping can improve stability and performance, but often at the expense of accuracy. - * - * @property enableSleeping - * @type boolean - * @default false - */ - enableSleeping: boolean; - - /** - * Collision pair set for this `Engine`. - */ - pairs: any; - - /** - * An integer `Number` that specifies the number of position iterations to perform each update. - * The higher the value, the higher quality the simulation will be at the expense of performance. - * - * @property positionIterations - * @type number - * @default 6 - */ - positionIterations: number; - - /** - * An `Object` containing properties regarding the timing systems of the engine. - * - * @property timing - * @type object - */ - timing: IEngineTimingOptions; - - /** - * An integer `Number` that specifies the number of velocity iterations to perform each update. - * The higher the value, the higher quality the simulation will be at the expense of performance. - * - * @property velocityIterations - * @type number - * @default 4 - */ - velocityIterations: number; - - /** - * A `World` composite object that will contain all simulated bodies and constraints. - * - * @property world - * @type world - * @default a Matter.World instance - */ - world: World; - } - - - export interface IGridDefinition { - - } - - /** - * The `Matter.Grid` module contains methods for creating and manipulating collision broadphase grid structures. - * - * @class Grid - */ - export class Grid { - /** - * Creates a new grid. - * @method create - * @param {} options - * @return {grid} A new grid - */ - static create(options?: IGridDefinition): Grid; - - /** - * Updates the grid. - * @method update - * @param {grid} grid - * @param {body[]} bodies - * @param {engine} engine - * @param {boolean} forceUpdate - */ - static update(grid: Grid, bodies: Array, engine: Engine, forceUpdate: boolean): void; - - /** - * Clears the grid. - * @method clear - * @param {grid} grid - */ - static clear(grid: Grid): void; } export interface IMouseConstraintDefinition { + /** * The `Constraint` object that is used to move the body during interaction. * - * @property constraint - * @type constraint - */ + * @property constraint + * @type constraint + */ constraint?: Constraint; /** - * An `Object` that specifies the collision filter properties. - * The collision filter allows the user to define which types of body this mouse constraint can interact with. - * See `body.collisionFilter` for more information. - * - * @property collisionFilter - * @type object - */ + * An `Object` that specifies the collision filter properties. + * The collision filter allows the user to define which types of body this mouse constraint can interact with. + * See `body.collisionFilter` for more information. + * + * @property collisionFilter + * @type object + */ collisionFilter?: ICollisionFilter; /** * The `Body` that is currently being moved by the user, or `null` if no body. * - * @property body - * @type body - * @default null - */ - body?: Body; - - /** - * The `Mouse` instance in use. If not supplied in `MouseConstraint.create`, one will be created. - * - * @property mouse - * @type mouse - * @default mouse - */ - mouse?: Mouse; + * @property body + * @type body + * @default null + */ + body?: IBodyDefinition; /** * A `String` denoting the type of object. * - * @property type - * @type string - * @default "constraint" - */ - + * @property type + * @type string + * @default "constraint" + */ type?: string; + } - /** - * The `Matter.MouseConstraint` module contains methods for creating mouse constraints. - * Mouse constraints are used for allowing user interaction, providing the ability to move bodies via the mouse or touch. - * - * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). - * - * @class MouseConstraint - */ - export class MouseConstraint { - /** - * Creates a new mouse constraint. - * All properties have default values, and many are pre-calculated automatically based on other properties. - * See the properties section below for detailed information on what you can pass via the `options` object. - * @method create - * @param {engine} engine - * @param {} options - * @return {MouseConstraint} A new MouseConstraint - */ - static create(engine: Engine, options?: IMouseConstraintDefinition): MouseConstraint; - - /** - * The `Constraint` object that is used to move the body during interaction. - * - * @property constraint - * @type constraint - */ - constraint: Constraint; - - /** - * An `Object` that specifies the collision filter properties. - * The collision filter allows the user to define which types of body this mouse constraint can interact with. - * See `body.collisionFilter` for more information. - * - * @property collisionFilter - * @type object - */ - collisionFilter: ICollisionFilter; - - /** - * The `Body` that is currently being moved by the user, or `null` if no body. - * - * @property body - * @type body - * @default null - */ - body: Body; - - /** - * The `Mouse` instance in use. If not supplied in `MouseConstraint.create`, one will be created. - * - * @property mouse - * @type mouse - * @default mouse - */ - mouse: Mouse; - - /** - * A `String` denoting the type of object. - * - * @property type - * @type string - * @default "constraint" - */ - - type: string; - } - - /** - * The `Matter.Pairs` module contains methods for creating and manipulating collision pair sets. - * - * @class Pairs - */ - export class Pairs { - /** - * Clears the given pairs structure. - * @method clear - * @param {pairs} pairs - * @return {pairs} pairs - */ - static clear(pairs: any): any; - } + export interface IGridDefinition {} export interface IPair { id: number; @@ -2283,11 +899,1037 @@ declare namespace MatterJS { slop: number; } + export interface ICollisionFilter { + + category: number; + mask: number; + group: number; + + } + + export interface IRunnerOptions { + + /** + * A `Boolean` that specifies if the runner should use a fixed timestep (otherwise it is variable). + * If timing is fixed, then the apparent simulation speed will change depending on the frame rate (but behaviour will be deterministic). + * If the timing is variable, then the apparent simulation speed will be constant (approximately, but at the cost of determininism). + * + * @property isFixed + * @type boolean + * @default false + */ + isFixed?: boolean; + + /** + * A `Number` that specifies the time step between updates in milliseconds. + * If `engine.timing.isFixed` is set to `true`, then `delta` is fixed. + * If it is `false`, then `delta` can dynamically change to maintain the correct apparent simulation speed. + * + * @property delta + * @type number + * @default 1000 / 60 + */ + delta?: number; + } + + interface IWorldDefinition extends ICompositeDefinition { + + gravity?: Gravity; + bounds?: IBound; + + } + + interface Gravity extends Vector { + + scale: number; + + } + + export interface IEvent { + + /** + * The name of the event + */ + name: string; + + /** + * The source object of the event + */ + source: T; + + } + + export interface IEventComposite extends IEvent { + + /** + * EventObjects (may be a single body, constraint, composite or a mixed array of these) + */ + object: any; + + } + + export interface IEventTimestamped extends IEvent { + + /** + * The engine.timing.timestamp of the event + */ + timestamp: number; + + } + + export interface IEventCollision extends IEventTimestamped { + + /** + * The collision pair + */ + pairs: Array; + + } + + // -------------------------------------------------------------- + // Modules + // -------------------------------------------------------------- + /** - * The `Matter.Pair` module contains methods for creating and manipulating collision pairs. + * Installs the given plugins on the `Matter` namespace. + * This is a short-hand for `Plugin.use`, see it for more information. + * Call this function once at the start of your code, with all of the plugins you wish to install as arguments. + * Avoid calling this function multiple times unless you intend to manually control installation order. + * @method use + * @param ...plugin {Function} The plugin(s) to install on `base` (multi-argument). + */ + export function use(...plugins: (Plugin | string)[]): void; + + /** + * The `Matter.Axes` module contains methods for creating and manipulating sets of axes. + * + * @class Axes + */ + export class Axes { + + /** + * Creates a new set of axes from the given vertices. + * @method fromVertices + * @param {vertices} vertices + * @return {axes} A new axes from the given vertices + */ + static fromVertices (vertices: Array): Array; + + /** + * Rotates a set of axes by the given angle. + * @method rotate + * @param {axes} axes + * @param {number} angle + */ + static rotate (axes: Array, angle: number): void; + + } + + export class AxesPhaserFactory { + + /** + * Creates a new set of axes from the given vertices. + * @method fromVertices + * @param {vertices} vertices + * @return {axes} A new axes from the given vertices + */ + fromVertices (vertices: Array): Array; + + /** + * Rotates a set of axes by the given angle. + * @method rotate + * @param {axes} axes + * @param {number} angle + */ + rotate (axes: Array, angle: number): void; + + } + + /** + * The `Matter.Bodies` module contains factory methods for creating rigid body models + * with commonly used body configurations (such as rectangles, circles and other polygons). + * + * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). + * + * @class Bodies + */ + export class Bodies { + + /** + * Creates a new rigid body model with a circle hull. + * The options parameter is an object that specifies any properties you wish to override the defaults. + * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. + * @method circle + * @param {number} x + * @param {number} y + * @param {number} radius + * @param {object} [options] + * @param {number} [maxSides] + * @return {body} A new circle body + */ + static circle (x: number, y: number, radius: number, options?: IBodyDefinition, maxSides?: number): IBodyDefinition; + + /** + * Creates a new rigid body model with a regular polygon hull with the given number of sides. + * The options parameter is an object that specifies any properties you wish to override the defaults. + * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. + * @method polygon + * @param {number} x + * @param {number} y + * @param {number} sides + * @param {number} radius + * @param {object} [options] + * @return {body} A new regular polygon body + */ + static polygon (x: number, y: number, sides: number, radius: number, options?: IChamferableBodyDefinition): IBodyDefinition; + + /** + * Creates a new rigid body model with a rectangle hull. + * The options parameter is an object that specifies any properties you wish to override the defaults. + * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. + * @method rectangle + * @param {number} x + * @param {number} y + * @param {number} width + * @param {number} height + * @param {object} [options] + * @return {body} A new rectangle body + */ + static rectangle (x: number, y: number, width: number, height: number, options?: IChamferableBodyDefinition): IBodyDefinition; + + /** + * Creates a new rigid body model with a trapezoid hull. + * The options parameter is an object that specifies any properties you wish to override the defaults. + * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. + * @method trapezoid + * @param {number} x + * @param {number} y + * @param {number} width + * @param {number} height + * @param {number} slope + * @param {object} [options] + * @return {body} A new trapezoid body + */ + trapezoid (x: number, y: number, width: number, height: number, slope: number, options?: IChamferableBodyDefinition): IBodyDefinition; + + /** + * Creates a body using the supplied vertices (or an array containing multiple sets of vertices). + * If the vertices are convex, they will pass through as supplied. + * Otherwise if the vertices are concave, they will be decomposed if [poly-decomp.js](https://github.com/schteppe/poly-decomp.js) is available. + * Note that this process is not guaranteed to support complex sets of vertices (e.g. those with holes may fail). + * By default the decomposition will discard collinear edges (to improve performance). + * It can also optionally discard any parts that have an area less than `minimumArea`. + * If the vertices can not be decomposed, the result will fall back to using the convex hull. + * The options parameter is an object that specifies any `Matter.Body` properties you wish to override the defaults. + * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. + * @method fromVertices + * @param {number} x + * @param {number} y + * @param [[vector]] vertexSets + * @param {object} [options] + * @param {bool} [flagInternal=false] + * @param {number} [removeCollinear=0.01] + * @param {number} [minimumArea=10] + * @return {body} + */ + fromVertices (x: number, y: number, vertexSets: Array>, options?: IBodyDefinition, flagInternal?: boolean, removeCollinear?: number, minimumArea?: number): IBodyDefinition; + } + + /** + * The `Matter.Body` module contains methods for creating and manipulating body models. + * A `Matter.Body` is a rigid body that can be simulated by a `Matter.Engine`. + * Factories for commonly used body configurations (such as rectangles, circles and other polygons) can be found in the module `Matter.Bodies`. + * + * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). + * + * @class Body + */ + export class Body { + + /** + * Applies a force to a body from a given world-space position, including resulting torque. + * @method applyForce + * @param {body} body + * @param {vector} position + * @param {vector} force + */ + static applyForce (body: IBodyDefinition, position: Vector, force: Vector): void; + + /** + * Creates a new rigid body model. The options parameter is an object that specifies any properties you wish to override the defaults. + * All properties have default values, and many are pre-calculated automatically based on other properties. + * See the properties section below for detailed information on what you can pass via the `options` object. + * @method create + * @param {} options + * @return {body} body + */ + static create (options: IBodyDefinition): Body; + + /** + * Rotates a body by a given angle relative to its current angle, without imparting any angular velocity. + * @method rotate + * @param {body} body + * @param {number} rotation + */ + static rotate (body: IBodyDefinition, rotation: number): void; + + /** + * Returns the next unique group index for which bodies will collide. + * If `isNonColliding` is `true`, returns the next unique group index for which bodies will _not_ collide. + * See `body.collisionFilter` for more information. + * @method nextGroup + * @param {bool} [isNonColliding=false] + * @return {Number} Unique group index + */ + static nextGroup (isNonColliding: boolean): number; + + /** + * Returns the next unique category bitfield (starting after the initial default category `0x0001`). + * There are 32 available. See `body.collisionFilter` for more information. + * @method nextCategory + * @return {Number} Unique category bitfield + */ + static nextCategory (): number; + + /** + * Given a property and a value (or map of), sets the property(s) on the body, using the appropriate setter functions if they exist. + * Prefer to use the actual setter functions in performance critical situations. + * @method set + * @param {body} body + * @param {} settings A property name (or map of properties and values) to set on the body. + * @param {} value The value to set if `settings` is a single property name. + */ + static set (body: IBodyDefinition, settings: any, value?: any): void; + + /** + * Sets the mass of the body. Inverse mass and density are automatically updated to reflect the change. + * @method setMass + * @param {body} body + * @param {number} mass + */ + static setMass (body: IBodyDefinition, mass: number): void; + + /** + * Sets the density of the body. Mass is automatically updated to reflect the change. + * @method setDensity + * @param {body} body + * @param {number} density + */ + static setDensity (body: IBodyDefinition, density: number): void; + + /** + * Sets the moment of inertia (i.e. second moment of area) of the body of the body. + * Inverse inertia is automatically updated to reflect the change. Mass is not changed. + * @method setInertia + * @param {body} body + * @param {number} inertia + */ + static setInertia (body: IBodyDefinition, inertia: number): void; + + /** + * Sets the body's vertices and updates body properties accordingly, including inertia, area and mass (with respect to `body.density`). + * Vertices will be automatically transformed to be orientated around their centre of mass as the origin. + * They are then automatically translated to world space based on `body.position`. + * + * The `vertices` argument should be passed as an array of `Matter.Vector` points (or a `Matter.Vertices` array). + * Vertices must form a convex hull, concave hulls are not supported. + * + * @method setVertices + * @param {body} body + * @param {vector[]} vertices + */ + static setVertices (body: IBodyDefinition, vertices: Array): void; + + /** + * Sets the parts of the `body` and updates mass, inertia and centroid. + * Each part will have its parent set to `body`. + * By default the convex hull will be automatically computed and set on `body`, unless `autoHull` is set to `false.` + * Note that this method will ensure that the first part in `body.parts` will always be the `body`. + * @method setParts + * @param {body} body + * @param [body] parts + * @param {bool} [autoHull=true] + */ + static setParts (body: IBodyDefinition, parts: IBodyDefinition[], autoHull?: boolean): void; + + /** + * Sets the position of the body instantly. Velocity, angle, force etc. are unchanged. + * @method setPosition + * @param {body} body + * @param {vector} position + */ + static setPosition (body: IBodyDefinition, position: Vector): void; + + /** + * Sets the angle of the body instantly. Angular velocity, position, force etc. are unchanged. + * @method setAngle + * @param {body} body + * @param {number} angle + */ + static setAngle (body: IBodyDefinition, angle: number): void; + + /** + * Sets the linear velocity of the body instantly. Position, angle, force etc. are unchanged. See also `Body.applyForce`. + * @method setVelocity + * @param {body} body + * @param {vector} velocity + */ + static setVelocity (body: IBodyDefinition, velocity: Vector): void; + + /** + * Sets the angular velocity of the body instantly. Position, angle, force etc. are unchanged. See also `Body.applyForce`. + * @method setAngularVelocity + * @param {body} body + * @param {number} velocity + */ + static setAngularVelocity (body: IBodyDefinition, velocity: number): void; + + /** + * Sets the body as static, including isStatic flag and setting mass and inertia to Infinity. + * @method setStatic + * @param {body} body + * @param {bool} isStatic + */ + static setStatic (body: IBodyDefinition, isStatic: boolean): void; + + /** + * Scales the body, including updating physical properties (mass, area, axes, inertia), from a world-space point (default is body centre). + * @method scale + * @param {body} body + * @param {number} scaleX + * @param {number} scaleY + * @param {vector} [point] + */ + static scale (body: IBodyDefinition, scaleX: number, scaleY: number, point?: Vector): void; + + /** + * Moves a body by a given vector relative to its current position, without imparting any velocity. + * @method translate + * @param {body} body + * @param {vector} translation + */ + static translate (body: IBodyDefinition, translation: Vector): void; + + /** + * Performs a simulation step for the given `body`, including updating position and angle using Verlet integration. + * @method update + * @param {body} body + * @param {number} deltaTime + * @param {number} timeScale + * @param {number} correction + */ + static update (body: IBodyDefinition, deltaTime: number, timeScale: number, correction: number): void; + + } + + /** + * The `Matter.Bounds` module contains methods for creating and manipulating axis-aligned bounding boxes (AABB). * - * @class Pair + * @class Bounds */ + export class Bounds { + + /** + * Creates a new axis-aligned bounding box (AABB) for the given vertices. + * @method create + * @param {vertices} vertices + * @return {IBound} A new bounds object + */ + static create (vertices: Vertices): IBound; + + /** + * Updates bounds using the given vertices and extends the bounds given a velocity. + * @method update + * @param {IBound} bounds + * @param {vertices} vertices + * @param {vector} velocity + */ + static update (bounds: IBound, vertices: Vertices, velocity: Vector): void; + + /** + * Returns true if the bounds contains the given point. + * @method contains + * @param {IBound} bounds + * @param {vector} point + * @return {boolean} True if the bounds contain the point, otherwise false + */ + static contains (bounds: IBound, point: Vector): boolean; + + /** + * Returns true if the two bounds intersect. + * @method overlaps + * @param {IBound} boundsA + * @param {IBound} boundsB + * @return {boolean} True if the bounds overlap, otherwise false + */ + static overlaps (boundsA: IBound, boundsB: IBound): boolean; + + /** + * Translates the bounds by the given vector. + * @method translate + * @param {IBound} bounds + * @param {vector} vector + */ + static translate (bounds: IBound, vector: Vector): void; + + /** + * Shifts the bounds to the given position. + * @method shift + * @param {IBound} bounds + * @param {vector} position + */ + static shift (bounds: IBound, position: Vector): void; + + } + + /** + * The `Matter.Composite` module contains methods for creating and manipulating composite bodies. + * A composite body is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`, therefore composites form a tree structure. + * It is important to use the functions in this module to modify composites, rather than directly modifying their properties. + * Note that the `Matter.World` object is also a type of `Matter.Composite` and as such all composite methods here can also operate on a `Matter.World`. + * + * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). + * + * @class Composite + */ + export class Composite { + + /** + * Generic add function. Adds one or many body(s), constraint(s) or a composite(s) to the given composite. + * Triggers `beforeAdd` and `afterAdd` events on the `composite`. + * @method add + * @param {ICompositeDefinition} composite + * @param {} object + * @return {composite} The original composite with the objects added + */ + static add (composite: ICompositeDefinition, object: IBodyDefinition | ICompositeDefinition | IConstraintDefinition): ICompositeDefinition; + + /** + * Returns all bodies in the given composite, including all bodies in its children, recursively. + * @method allBodies + * @param {composite} composite + * @return {body[]} All the bodies + */ + static allBodies (composite: ICompositeDefinition): Array; + + /** + * Returns all composites in the given composite, including all composites in its children, recursively. + * @method allComposites + * @param {composite} composite + * @return {composite[]} All the composites + */ + static allComposites (composite: ICompositeDefinition): Array; + + /** + * Returns all constraints in the given composite, including all constraints in its children, recursively. + * @method allConstraints + * @param {composite} composite + * @return {constraint[]} All the constraints + */ + static allConstraints (composite: ICompositeDefinition): Array; + + /** + * Removes all bodies, constraints and composites from the given composite. + * Optionally clearing its children recursively. + * @method clear + * @param {composite} composite + * @param {boolean} keepStatic + * @param {boolean} [deep=false] + */ + static clear (composite: ICompositeDefinition, keepStatic: boolean, deep?: boolean): void; + + /** + * Creates a new composite. The options parameter is an object that specifies any properties you wish to override the defaults. + * See the properites section below for detailed information on what you can pass via the `options` object. + * @method create + * @param {} [options] + * @return {composite} A new composite + */ + static create (options?: ICompositeDefinition): ICompositeDefinition; + + /** + * Searches the composite recursively for an object matching the type and id supplied, null if not found. + * @method get + * @param {composite} composite + * @param {number} id + * @param {string} type + * @return {object} The requested object, if found + */ + static get (composite: ICompositeDefinition, id: number, type: string): IBodyDefinition | ICompositeDefinition | IConstraintDefinition; + + /** + * Moves the given object(s) from compositeA to compositeB (equal to a remove followed by an add). + * @method move + * @param {compositeA} compositeA + * @param {object[]} objects + * @param {compositeB} compositeB + * @return {composite} Returns compositeA + */ + static move (compositeA: ICompositeDefinition, objects: Array, compositeB: ICompositeDefinition): ICompositeDefinition; + + /** + * Assigns new ids for all objects in the composite, recursively. + * @method rebase + * @param {composite} composite + * @return {composite} Returns composite + */ + static rebase (composite: ICompositeDefinition): ICompositeDefinition; + + /** + * Generic remove function. Removes one or many body(s), constraint(s) or a composite(s) to the given composite. + * Optionally searching its children recursively. + * Triggers `beforeRemove` and `afterRemove` events on the `composite`. + * @method remove + * @param {composite} composite + * @param {} object + * @param {boolean} [deep=false] + * @return {composite} The original composite with the objects removed + */ + static remove (composite: ICompositeDefinition, object: IBodyDefinition | ICompositeDefinition | IConstraintDefinition, deep?: boolean): ICompositeDefinition; + + /** + * Sets the composite's `isModified` flag. + * If `updateParents` is true, all parents will be set (default: false). + * If `updateChildren` is true, all children will be set (default: false). + * @method setModified + * @param {composite} composite + * @param {boolean} isModified + * @param {boolean} [updateParents=false] + * @param {boolean} [updateChildren=false] + */ + static setModified (composite: ICompositeDefinition, isModified: boolean, updateParents?: boolean, updateChildren?: boolean): void; + + /** + * Translates all children in the composite by a given vector relative to their current positions, + * without imparting any velocity. + * @method translate + * @param {composite} composite + * @param {vector} translation + * @param {bool} [recursive=true] + */ + static translate (composite: ICompositeDefinition, translation: Vector, recursive?: boolean): void; + + /** + * Rotates all children in the composite by a given angle about the given point, without imparting any angular velocity. + * @method rotate + * @param {composite} composite + * @param {number} rotation + * @param {vector} point + * @param {bool} [recursive=true] + */ + static rotate (composite: ICompositeDefinition, rotation: number, point: Vector, recursive?: boolean): void; + + /** + * Scales all children in the composite, including updating physical properties (mass, area, axes, inertia), from a world-space point. + * @method scale + * @param {composite} composite + * @param {number} scaleX + * @param {number} scaleY + * @param {vector} point + * @param {bool} [recursive=true] + */ + static scale (composite: ICompositeDefinition, scaleX: number, scaleY: number, point: Vector, recursive?: boolean): void; + + } + + /** + * The `Matter.Composites` module contains factory methods for creating composite bodies + * with commonly used configurations (such as stacks and chains). + * + * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). + * + * @class Composites + */ + export class Composites { + + /** + * Creates a composite with simple car setup of bodies and constraints. + * @method car + * @param {number} xx + * @param {number} yy + * @param {number} width + * @param {number} height + * @param {number} wheelSize + * @return {composite} A new composite car body + */ + car (xx: number, yy: number, width: number, height: number, wheelSize: number): ICompositeDefinition; + + /** + * Chains all bodies in the given composite together using constraints. + * @method chain + * @param {composite} composite + * @param {number} xOffsetA + * @param {number} yOffsetA + * @param {number} xOffsetB + * @param {number} yOffsetB + * @param {object} options + * @return {composite} A new composite containing objects chained together with constraints + */ + chain (composite: ICompositeDefinition, xOffsetA: number, yOffsetA: number, xOffsetB: number, yOffsetB: number, options: any): ICompositeDefinition; + + /** + * Connects bodies in the composite with constraints in a grid pattern, with optional cross braces. + * @method mesh + * @param {composite} composite + * @param {number} columns + * @param {number} rows + * @param {boolean} crossBrace + * @param {object} options + * @return {composite} The composite containing objects meshed together with constraints + */ + mesh (composite: ICompositeDefinition, columns: number, rows: number, crossBrace: boolean, options: any): ICompositeDefinition; + + /** + * Creates a composite with a Newton's Cradle setup of bodies and constraints. + * @method newtonsCradle + * @param {number} xx + * @param {number} yy + * @param {number} number + * @param {number} size + * @param {number} length + * @return {composite} A new composite newtonsCradle body + */ + newtonsCradle (xx: number, yy: number, number: number, size: number, length: number): ICompositeDefinition; + + /** + * Create a new composite containing bodies created in the callback in a pyramid arrangement. + * This function uses the body's bounds to prevent overlaps. + * @method pyramid + * @param {number} xx + * @param {number} yy + * @param {number} columns + * @param {number} rows + * @param {number} columnGap + * @param {number} rowGap + * @param {function} callback + * @return {composite} A new composite containing objects created in the callback + */ + pyramid (xx: number, yy: number, columns: number, rows: number, columnGap: number, rowGap: number, callback: Function): ICompositeDefinition; + + /** + * Creates a simple soft body like object. + * @method softBody + * @param {number} xx + * @param {number} yy + * @param {number} columns + * @param {number} rows + * @param {number} columnGap + * @param {number} rowGap + * @param {boolean} crossBrace + * @param {number} particleRadius + * @param {} particleOptions + * @param {} constraintOptions + * @return {composite} A new composite softBody + */ + softBody (xx: number, yy: number, columns: number, rows: number, columnGap: number, rowGap: number, crossBrace: boolean, particleRadius: number, particleOptions: any, constraintOptions: any): ICompositeDefinition; + + /** + * Create a new composite containing bodies created in the callback in a grid arrangement. + * This function uses the body's bounds to prevent overlaps. + * @method stack + * @param {number} xx + * @param {number} yy + * @param {number} columns + * @param {number} rows + * @param {number} columnGap + * @param {number} rowGap + * @param {function} callback + * @return {composite} A new composite containing objects created in the callback + */ + stack (xx: number, yy: number, columns: number, rows: number, columnGap: number, rowGap: number, callback: Function): ICompositeDefinition; + + } + + /** + * The `Matter.Constraint` module contains methods for creating and manipulating constraints. + * Constraints are used for specifying that a fixed distance must be maintained between two bodies (or a body and a fixed world-space position). + * The stiffness of constraints can be modified to create springs or elastic. + * + * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). + * + * @class Constraint + */ + export class Constraint { + + /** + * Creates a new constraint. + * All properties have default values, and many are pre-calculated automatically based on other properties. + * See the properties section below for detailed information on what you can pass via the `options` object. + * @method create + * @param {} options + * @return {constraint} constraint + */ + static create (options: IConstraintDefinition): IConstraintDefinition; + + } + + /** + * The `Matter.Engine` module contains methods for creating and manipulating engines. + * An engine is a controller that manages updating the simulation of the world. + * See `Matter.Runner` for an optional game loop utility. + * + * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). + * + * @class Engine + */ + export class Engine { + + /** + * Clears the engine including the world, pairs and broadphase. + * @method clear + * @param {engine} engine + */ + static clear (engine: Engine): void; + + /** + * Creates a new engine. The options parameter is an object that specifies any properties you wish to override the defaults. + * All properties have default values, and many are pre-calculated automatically based on other properties. + * See the properties section below for detailed information on what you can pass via the `options` object. + * @method create + * @param {HTMLElement} element + * @param {object} [options] + * @return {engine} engine + * @deprecated + */ + static create (element?: HTMLElement | IEngineDefinition, options?: IEngineDefinition): Engine; + + /** + * Creates a new engine. The options parameter is an object that specifies any properties you wish to override the defaults. + * All properties have default values, and many are pre-calculated automatically based on other properties. + * See the properties section below for detailed information on what you can pass via the `options` object. + * @method create + * @param {object} [options] + * @return {engine} engine + * @deprecated + */ + static create (options?: IEngineDefinition): Engine; + + /** + * Merges two engines by keeping the configuration of `engineA` but replacing the world with the one from `engineB`. + * @method merge + * @param {engine} engineA + * @param {engine} engineB + */ + static merge (engineA: Engine, engineB: Engine): void; + + /** + * Moves the simulation forward in time by `delta` ms. + * The `correction` argument is an optional `Number` that specifies the time correction factor to apply to the update. + * This can help improve the accuracy of the simulation in cases where `delta` is changing between updates. + * The value of `correction` is defined as `delta / lastDelta`, i.e. the percentage change of `delta` over the last step. + * Therefore the value is always `1` (no correction) when `delta` constant (or when no correction is desired, which is the default). + * See the paper on Time Corrected Verlet for more information. + * + * Triggers `beforeUpdate` and `afterUpdate` events. + * Triggers `collisionStart`, `collisionActive` and `collisionEnd` events. + * @method update + * @param {engine} engine + * @param {number} [delta=16.666] + * @param {number} [correction=1] + */ + static update (engine: Engine, delta?: number, correction?: number): Engine; + + /** + * An alias for `Runner.run`, see `Matter.Runner` for more information. + * @method run + * @param {engine} engine + */ + static run (engine: Engine): void; + + /** + * An instance of a broadphase controller. The default value is a `Matter.Grid` instance created by `Engine.create`. + * + * @property broadphase + * @type grid + * @default a Matter.Grid instance + */ + broadphase: Grid; + + /** + * An integer `Number` that specifies the number of constraint iterations to perform each update. + * The higher the value, the higher quality the simulation will be at the expense of performance. + * The default value of `2` is usually very adequate. + * + * @property constraintIterations + * @type number + * @default 2 + */ + constraintIterations: number; + + /** + * A flag that specifies whether the engine is running or not. + */ + enabled: boolean; + + /** + * A flag that specifies whether the engine should allow sleeping via the `Matter.Sleeping` module. + * Sleeping can improve stability and performance, but often at the expense of accuracy. + * + * @property enableSleeping + * @type boolean + * @default false + */ + enableSleeping: boolean; + + /** + * Collision pair set for this `Engine`. + */ + pairs: any; + + /** + * An integer `Number` that specifies the number of position iterations to perform each update. + * The higher the value, the higher quality the simulation will be at the expense of performance. + * + * @property positionIterations + * @type number + * @default 6 + */ + positionIterations: number; + + /** + * An `Object` containing properties regarding the timing systems of the engine. + * + * @property timing + * @type object + */ + timing: IEngineTimingOptions; + + /** + * An integer `Number` that specifies the number of velocity iterations to perform each update. + * The higher the value, the higher quality the simulation will be at the expense of performance. + * + * @property velocityIterations + * @type number + * @default 4 + */ + velocityIterations: number; + + /** + * A `World` composite object that will contain all simulated bodies and constraints. + * + * @property world + * @type world + * @default a Matter.World instance + */ + world: World; + + } + + /** + * The `Matter.Grid` module contains methods for creating and manipulating collision broadphase grid structures. + * + * @class Grid + */ + export class Grid { + + /** + * Creates a new grid. + * @method create + * @param {} options + * @return {grid} A new grid + */ + static create (options?: IGridDefinition): Grid; + + /** + * Updates the grid. + * @method update + * @param {grid} grid + * @param {body[]} bodies + * @param {engine} engine + * @param {boolean} forceUpdate + */ + static update (grid: Grid, bodies: Array, engine: Engine, forceUpdate: boolean): void; + + /** + * Clears the grid. + * @method clear + * @param {grid} grid + */ + static clear (grid: Grid): void; + + } + + /** + * The `Matter.MouseConstraint` module contains methods for creating mouse constraints. + * Mouse constraints are used for allowing user interaction, providing the ability to move bodies via the mouse or touch. + * + * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). + * + * @class MouseConstraint + */ + export class MouseConstraint { + + /** + * Creates a new mouse constraint. + * All properties have default values, and many are pre-calculated automatically based on other properties. + * See the properties section below for detailed information on what you can pass via the `options` object. + * @method create + * @param {engine} engine + * @param {} options + * @return {MouseConstraint} A new MouseConstraint + */ + static create (engine: Engine, options?: IMouseConstraintDefinition): MouseConstraint; + + /** + * The `Constraint` object that is used to move the body during interaction. + * + * @property constraint + * @type constraint + */ + constraint: IConstraintDefinition; + + /** + * An `Object` that specifies the collision filter properties. + * The collision filter allows the user to define which types of body this mouse constraint can interact with. + * See `body.collisionFilter` for more information. + * + * @property collisionFilter + * @type object + */ + collisionFilter: ICollisionFilter; + + /** + * The `Body` that is currently being moved by the user, or `null` if no body. + * + * @property body + * @type body + * @default null + */ + body: IBodyDefinition; + + /** + * A `String` denoting the type of object. + * + * @property type + * @type string + * @default "constraint" + */ + + type: string; + + } + + /** + * The `Matter.Pairs` module contains methods for creating and manipulating collision pair sets. + * + * @class Pairs + */ + export class Pairs { + + /** + * Clears the given pairs structure. + * @method clear + * @param {pairs} pairs + * @return {pairs} pairs + */ + static clear (pairs: any): any; + } + + /** + * The `Matter.Pair` module contains methods for creating and manipulating collision pairs. + * + * @class Pair + */ export class Pair { /** @@ -2297,7 +1939,7 @@ declare namespace MatterJS { * @param {number} timestamp * @return {IPair} A new pair */ - static create(collision: ICollisionData, timestamp: number): any; + static create (collision: ICollisionData, timestamp: number): IPair; /** * Updates a pair given a collision. @@ -2324,7 +1966,7 @@ declare namespace MatterJS { * @param {Body} bodyB * @return {string} Unique pairId */ - static id (bodyA: Body, bodyB: Body): string; + static id (bodyA: IBodyDefinition, bodyB: IBodyDefinition): string; } @@ -2377,14 +2019,14 @@ declare namespace MatterJS { * @param {body[]} bodies * @param {number} timeScale */ - static solvePosition (pairs: IPair[], bodies: Body[], timeScale: number): void; + static solvePosition (pairs: IPair[], bodies: IBodyDefinition[], timeScale: number): void; /** * Apply position resolution. * @method postSolvePosition * @param {body[]} bodies */ - static postSolvePosition (bodies: Body[]): void; + static postSolvePosition (bodies: IBodyDefinition[]): void; /** * Prepare pairs for velocity solving. @@ -2419,18 +2061,19 @@ declare namespace MatterJS { * @param {ICollisionData} previousCollision * @return {ICollisionData} collision */ - static collides (bodyA: Body, bodyB: Body, previousCollision: ICollisionData): ICollisionData + static collides (bodyA: IBodyDefinition, bodyB: IBodyDefinition, previousCollision: ICollisionData): ICollisionData } /** - * The `Matter.Query` module contains methods for performing collision queries. - * - * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). - * - * @class Query - */ + * The `Matter.Query` module contains methods for performing collision queries. + * + * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). + * + * @class Query + */ export class Query { + /** * Casts a ray segment against a set of bodies and returns all collisions, ray width is optional. Intersection points are not provided. * @method ray @@ -2440,7 +2083,7 @@ declare namespace MatterJS { * @param {number} [rayWidth] * @return {object[]} Collisions */ - static ray(bodies: Array, startPoint: Vector, endPoint: Vector, rayWidth?: number): Array; + static ray (bodies: Array, startPoint: Vector, endPoint: Vector, rayWidth?: number): Array; /** * Returns all bodies whose bounds are inside (or outside if set) the given set of bounds, from the given set of bodies. @@ -2450,7 +2093,7 @@ declare namespace MatterJS { * @param {bool} [outside=false] * @return {body[]} The bodies matching the query */ - static region(bodies: Array, bounds: Bounds, outside?: boolean): Array; + static region (bodies: Array, bounds: Bounds, outside?: boolean): Array; /** * Returns all bodies whose vertices contain the given point, from the given set of bodies. @@ -2459,64 +2102,45 @@ declare namespace MatterJS { * @param {vector} point * @return {body[]} The bodies matching the query */ - static point(bodies: Array, point: Vector): Array; - } + static point (bodies: Array, point: Vector): Array; - export interface IRunnerOptions { - /** - * A `Boolean` that specifies if the runner should use a fixed timestep (otherwise it is variable). - * If timing is fixed, then the apparent simulation speed will change depending on the frame rate (but behaviour will be deterministic). - * If the timing is variable, then the apparent simulation speed will be constant (approximately, but at the cost of determininism). - * - * @property isFixed - * @type boolean - * @default false - */ - isFixed?: boolean; - - /** - * A `Number` that specifies the time step between updates in milliseconds. - * If `engine.timing.isFixed` is set to `true`, then `delta` is fixed. - * If it is `false`, then `delta` can dynamically change to maintain the correct apparent simulation speed. - * - * @property delta - * @type number - * @default 1000 / 60 - */ - delta?: number; } /** - * The `Matter.Runner` module is an optional utility which provides a game loop, - * that handles updating and rendering a `Matter.Engine` for you within a browser. - * It is intended for demo and testing purposes, but may be adequate for simple games. - * If you are using your own game loop instead, then you do not need the `Matter.Runner` module. - * Instead just call `Engine.update(engine, delta)` in your own loop. - * Note that the method `Engine.run` is an alias for `Runner.run`. - * - * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). - * - * @class Runner - */ + * The `Matter.Runner` module is an optional utility which provides a game loop, + * that handles updating and rendering a `Matter.Engine` for you within a browser. + * It is intended for demo and testing purposes, but may be adequate for simple games. + * If you are using your own game loop instead, then you do not need the `Matter.Runner` module. + * Instead just call `Engine.update(engine, delta)` in your own loop. + * Note that the method `Engine.run` is an alias for `Runner.run`. + * + * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). + * + * @class Runner + */ export class Runner { + /** * Creates a new Runner. The options parameter is an object that specifies any properties you wish to override the defaults. * @method create * @param {} options */ - static create(options:IRunnerOptions): Runner; + static create (options:IRunnerOptions): Runner; + /** * Continuously ticks a `Matter.Engine` by calling `Runner.tick` on the `requestAnimationFrame` event. * @method run * @param {engine} engine */ - static run(runner: Runner, engine: Engine): Runner; + static run (runner: Runner, engine: Engine): Runner; + /** - * Continuously ticks a `Matter.Engine` by calling `Runner.tick` on the `requestAnimationFrame` event. - * @method run - * @param {engine} engine - */ - static run(engine: Engine): Runner; + * Continuously ticks a `Matter.Engine` by calling `Runner.tick` on the `requestAnimationFrame` event. + * @method run + * @param {engine} engine + */ + static run (engine: Engine): Runner; + /** * A game loop utility that updates the engine and renderer by one step (a 'tick'). * Features delta smoothing, time correction and fixed or dynamic timing. @@ -2527,29 +2151,31 @@ declare namespace MatterJS { * @param {engine} engine * @param {number} time */ - static tick(runner: Runner, engine: Engine, time: number): void; + static tick (runner: Runner, engine: Engine, time: number): void; + /** * Ends execution of `Runner.run` on the given `runner`, by canceling the animation frame request event loop. * If you wish to only temporarily pause the engine, see `engine.enabled` instead. * @method stop * @param {runner} runner */ - static stop(runner: Runner): void; + static stop (runner: Runner): void; + /** * Alias for `Runner.run`. - * @method start - * @param {runner} runner - * @param {engine} engine - */ - static start(runner: Runner, engine: Engine): void; + * @method start + * @param {runner} runner + * @param {engine} engine + */ + static start (runner: Runner, engine: Engine): void; /** * A flag that specifies whether the runner is running or not. * - * @property enabled - * @type boolean - * @default true - */ + * @property enabled + * @type boolean + * @default true + */ enabled: boolean; /** @@ -2557,10 +2183,10 @@ declare namespace MatterJS { * If timing is fixed, then the apparent simulation speed will change depending on the frame rate (but behaviour will be deterministic). * If the timing is variable, then the apparent simulation speed will be constant (approximately, but at the cost of determininism). * - * @property isFixed - * @type boolean - * @default false - */ + * @property isFixed + * @type boolean + * @default false + */ isFixed: boolean; /** @@ -2568,30 +2194,34 @@ declare namespace MatterJS { * If `engine.timing.isFixed` is set to `true`, then `delta` is fixed. * If it is `false`, then `delta` can dynamically change to maintain the correct apparent simulation speed. * - * @property delta - * @type number - * @default 1000 / 60 - */ + * @property delta + * @type number + * @default 1000 / 60 + */ delta: number; + } /** - * The `Matter.Sleeping` module contains methods to manage the sleeping state of bodies. - * - * @class Sleeping - */ + * The `Matter.Sleeping` module contains methods to manage the sleeping state of bodies. + * + * @class Sleeping + */ export class Sleeping { - static set(body: Body, isSleeping: boolean): void; + + static set (body: IBodyDefinition, isSleeping: boolean): void; + } /** - * The `Matter.Svg` module contains methods for converting SVG images into an array of vector points. - * - * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). - * - * @class Svg - */ + * The `Matter.Svg` module contains methods for converting SVG images into an array of vector points. + * + * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). + * + * @class Svg + */ export class Svg { + /** * Converts an SVG path into an array of vector points. * If the input path forms a concave shape, you must decompose the result into convex parts before use. @@ -2602,7 +2232,8 @@ declare namespace MatterJS { * @param {Number} [sampleLength=15] * @return {Vector[]} points */ - static pathToVertices(path: SVGPathElement, sampleLength: number): Array; + static pathToVertices (path: SVGPathElement, sampleLength: number): Array; + } /** @@ -2636,7 +2267,6 @@ declare namespace MatterJS { */ static clone(vector: Vector): Vector; - /** * Returns the cross-product of three vectors. * @method cross3 @@ -2775,22 +2405,23 @@ declare namespace MatterJS { } /** - * The `Matter.Vertices` module contains methods for creating and manipulating sets of vertices. - * A set of vertices is an array of `Matter.Vector` with additional indexing properties inserted by `Vertices.create`. - * A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull). - * - * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). - * - * @class Vertices - */ + * The `Matter.Vertices` module contains methods for creating and manipulating sets of vertices. + * A set of vertices is an array of `Matter.Vector` with additional indexing properties inserted by `Vertices.create`. + * A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull). + * + * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). + * + * @class Vertices + */ export class Vertices { + /** * Returns the average (mean) of the set of vertices. * @method mean * @param {vertices} vertices * @return {vector} The average point */ - static mean(vertices: Array): Array; + mean (vertices: Array): Array; /** * Sorts the input vertices into clockwise order in place. @@ -2798,7 +2429,7 @@ declare namespace MatterJS { * @param {vertices} vertices * @return {vertices} vertices */ - static clockwiseSort(vertices: Array): Array; + clockwiseSort (vertices: Array): Array; /** * Returns true if the vertices form a convex shape (vertices must be in clockwise order). @@ -2806,7 +2437,7 @@ declare namespace MatterJS { * @param {vertices} vertices * @return {bool} `true` if the `vertices` are convex, `false` if not (or `null` if not computable). */ - static isConvex(vertices: Array): boolean; + isConvex (vertices: Array): boolean; /** * Returns the convex hull of the input vertices as a new array of points. @@ -2814,7 +2445,7 @@ declare namespace MatterJS { * @param {vertices} vertices * @return [vertex] vertices */ - static hull(vertices: Array): Array; + hull (vertices: Array): Array; /** * Returns the area of the set of vertices. @@ -2823,7 +2454,7 @@ declare namespace MatterJS { * @param {bool} signed * @return {number} The area */ - static area(vertices: Array, signed: boolean): number; + area (vertices: Array, signed: boolean): number; /** * Returns the centre (centroid) of the set of vertices. @@ -2831,7 +2462,7 @@ declare namespace MatterJS { * @param {vertices} vertices * @return {vector} The centre point */ - static centre(vertices: Array): Vector; + centre (vertices: Array): Vector; /** * Chamfers a set of vertices by giving them rounded corners, returns a new set of vertices. @@ -2843,8 +2474,7 @@ declare namespace MatterJS { * @param {number} qualityMin * @param {number} qualityMax */ - static chamfer(vertices: Array, radius: number | Array, quality: number, qualityMin: number, qualityMax: number): void; - + chamfer (vertices: Array, radius: number | Array, quality: number, qualityMin: number, qualityMax: number): void; /** * Returns `true` if the `point` is inside the set of `vertices`. @@ -2853,24 +2483,24 @@ declare namespace MatterJS { * @param {vector} point * @return {boolean} True if the vertices contains point, otherwise false */ - static contains(vertices: Array, point: Vector): boolean; + contains (vertices: Array, point: Vector): boolean; /** * Creates a new set of `Matter.Body` compatible vertices. * The `points` argument accepts an array of `Matter.Vector` points orientated around the origin `(0, 0)`, for example: * - * [{ x: 0, y: 0 }, { x: 25, y: 50 }, { x: 50, y: 0 }] - * - * The `Vertices.create` method returns a new array of vertices, which are similar to Matter.Vector objects, - * but with some additional references required for efficient collision detection routines. - * - * Note that the `body` argument is not optional, a `Matter.Body` reference must be provided. - * - * @method create - * @param {vector[]} points - * @param {body} body - */ - static create(points: Array, body: Body): void; + * [{ x: 0, y: 0 }, { x: 25, y: 50 }, { x: 50, y: 0 }] + * + * The `Vertices.create` method returns a new array of vertices, which are similar to Matter.Vector objects, + * but with some additional references required for efficient collision detection routines. + * + * Note that the `body` argument is not optional, a `Matter.Body` reference must be provided. + * + * @method create + * @param {vector[]} points + * @param {body} body + */ + create (points: Array, body: Body): void; /** * Parses a string containing ordered x y pairs separated by spaces (and optionally commas), @@ -2881,7 +2511,7 @@ declare namespace MatterJS { * @param {body} body * @return {vertices} vertices */ - static fromPath(path: string, body: Body): Array; + fromPath (path: string, body: Body): Array; /** * Returns the moment of inertia (second moment of area) of the set of vertices given the total mass. @@ -2890,7 +2520,7 @@ declare namespace MatterJS { * @param {number} mass * @return {number} The polygon's moment of inertia */ - static inertia(vertices: Array, mass: number): number; + inertia (vertices: Array, mass: number): number; /** * Rotates the set of vertices in-place. @@ -2899,7 +2529,7 @@ declare namespace MatterJS { * @param {number} angle * @param {vector} point */ - static rotate(vertices: Array, angle: number, point: Vector): void; + rotate (vertices: Array, angle: number, point: Vector): void; /** * Scales the vertices from a point (default is centre) in-place. @@ -2909,7 +2539,7 @@ declare namespace MatterJS { * @param {number} scaleY * @param {vector} point */ - static scale(vertices: Array, scaleX: number, scaleY: number, point: Vector): void; + scale (vertices: Array, scaleX: number, scaleY: number, point: Vector): void; /** * Translates the set of vertices in-place. @@ -2918,38 +2548,30 @@ declare namespace MatterJS { * @param {vector} vector * @param {number} scalar */ - static translate(vertices: Array, vector: Vector, scalar: number): void; - } - - interface IWorldDefinition extends ICompositeDefinition { - gravity?: Gravity; - bounds?: Bounds; - } - - interface Gravity extends Vector { - scale: number; + translate (vertices: Array, vector: Vector, scalar: number): void; } /** - * The `Matter.World` module contains methods for creating and manipulating the world composite. - * A `Matter.World` is a `Matter.Composite` body, which is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`. - * A `Matter.World` has a few additional properties including `gravity` and `bounds`. - * It is important to use the functions in the `Matter.Composite` module to modify the world composite, rather than directly modifying its properties. - * There are also a few methods here that alias those in `Matter.Composite` for easier readability. - * - * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). - * - * @class World - * @extends Composite - */ - export class World extends Composite { + * The `Matter.World` module contains methods for creating and manipulating the world composite. + * A `Matter.World` is a `Matter.Composite` body, which is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`. + * A `Matter.World` has a few additional properties including `gravity` and `bounds`. + * It is important to use the functions in the `Matter.Composite` module to modify the world composite, rather than directly modifying its properties. + * There are also a few methods here that alias those in `Matter.Composite` for easier readability. + * + * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). + * + * @class World + * @extends Composite + */ + export class World { + /** * Add objects or arrays of objects of types: Body, Constraint, Composite * @param world * @param body * @returns world */ - static add(world: World, body: Body | Array | Composite | Array | Constraint | Array | MouseConstraint): World; + static add (world: World, body: IBodyDefinition | Array | ICompositeDefinition | Array | IConstraintDefinition | Array | MouseConstraint): World; /** * An alias for Composite.addBody since World is also a Composite @@ -2958,7 +2580,7 @@ declare namespace MatterJS { * @param {body} body * @return {world} The original world with the body added */ - static addBody(world: World, body: Body): World; + static addBody (world: World, body: IBodyDefinition): World; /** * An alias for Composite.add since World is also a Composite @@ -2967,7 +2589,7 @@ declare namespace MatterJS { * @param {composite} composite * @return {world} The original world with the objects from composite added */ - static addComposite(world: World, composite: Composite): World; + static addComposite (world: World, composite: ICompositeDefinition): World; /** * An alias for Composite.addConstraint since World is also a Composite @@ -2976,7 +2598,7 @@ declare namespace MatterJS { * @param {constraint} constraint * @return {world} The original world with the constraint added */ - static addConstraint(world: World, constraint: Constraint): World; + static addConstraint (world: World, constraint: IConstraintDefinition): World; /** * An alias for Composite.clear since World is also a Composite @@ -2984,7 +2606,7 @@ declare namespace MatterJS { * @param {world} world * @param {boolean} keepStatic */ - static clear(world: World, keepStatic: boolean): void; + static clear (world: World, keepStatic: boolean): void; /** * Creates a new world composite. The options parameter is an object that specifies any properties you wish to override the defaults. @@ -2994,257 +2616,193 @@ declare namespace MatterJS { * @param {} options * @return {world} A new world */ - static create(options: IWorldDefinition): World; + static create (options: IWorldDefinition): World; gravity: Gravity; bounds: Bounds; } - export interface ICollisionFilter { - category: number; - mask: number; - group: number; - } - - export interface IMousePoint { - x: number; - y: number; - } - - export class Mouse { - static create(element: HTMLElement): Mouse; - static setElement(mouse: Mouse, element: HTMLElement): void; - static clearSourceEvents(mouse: Mouse): void; - static setOffset(mouse: Mouse, offset: Vector): void; - static setScale(mouse: Mouse, scale: Vector): void; - - element: HTMLElement; - absolute: IMousePoint; - position: IMousePoint; - mousedownPosition: IMousePoint; - mouseupPosition: IMousePoint; - offset: IMousePoint; - scale: IMousePoint; - wheelDelta: number; - button: number; - pixelRatio: number; - } - - export interface IEvent { - /** - * The name of the event - */ - name: string; - /** - * The source object of the event - */ - source: T; - } - - export interface IEventComposite extends IEvent { - /** - * EventObjects (may be a single body, constraint, composite or a mixed array of these) - */ - object: any; - } - - export interface IEventTimestamped extends IEvent { - /** - * The engine.timing.timestamp of the event - */ - timestamp: number; - } - - export interface IEventCollision extends IEventTimestamped { - /** - * The collision pair - */ - pairs: Array; - } - - export class Events { /** - * Fired when a body starts sleeping (where `this` is the body). - * - * @event sleepStart - * @this {body} The body that has started sleeping - * @param {} event An event object - * @param {} event.source The source object of the event - * @param {} event.name The name of the event - */ - static on(obj: Body, name: "sleepStart", callback: (e: IEvent) => void): void; + * Fired when a body starts sleeping (where `this` is the body). + * + * @event sleepStart + * @this {body} The body that has started sleeping + * @param {} event An event object + * @param {} event.source The source object of the event + * @param {} event.name The name of the event + */ + static on (obj: Body, name: "sleepStart", callback: (e: IEvent) => void): void; + /** * Fired when a body ends sleeping (where `this` is the body). * - * @event sleepEnd - * @this {body} The body that has ended sleeping - * @param {} event An event object - * @param {} event.source The source object of the event - * @param {} event.name The name of the event - */ - static on(obj: Body, name: "sleepEnd", callback: (e: IEvent) => void): void; + * @event sleepEnd + * @this {body} The body that has ended sleeping + * @param {} event An event object + * @param {} event.source The source object of the event + * @param {} event.name The name of the event + */ + static on (obj: Body, name: "sleepEnd", callback: (e: IEvent) => void): void; /** - * Fired when a call to `Composite.add` is made, before objects have been added. - * - * @event beforeAdd - * @param {} event An event object - * @param {} event.object The object(s) to be added (may be a single body, constraint, composite or a mixed array of these) - * @param {} event.source The source object of the event - * @param {} event.name The name of the event - */ - static on(obj: Engine, name: "beforeAdd", callback: (e: IEventComposite) => void): void; + * Fired when a call to `Composite.add` is made, before objects have been added. + * + * @event beforeAdd + * @param {} event An event object + * @param {} event.object The object(s) to be added (may be a single body, constraint, composite or a mixed array of these) + * @param {} event.source The source object of the event + * @param {} event.name The name of the event + */ + static on (obj: Engine, name: "beforeAdd", callback: (e: IEventComposite) => void): void; /** * Fired when a call to `Composite.add` is made, after objects have been added. - * - * @event afterAdd - * @param {} event An event object - * @param {} event.object The object(s) that have been added (may be a single body, constraint, composite or a mixed array of these) - * @param {} event.source The source object of the event - * @param {} event.name The name of the event - */ - static on(obj: Engine, name: "afterAdd", callback: (e: IEventComposite) => void): void; + * + * @event afterAdd + * @param {} event An event object + * @param {} event.object The object(s) that have been added (may be a single body, constraint, composite or a mixed array of these) + * @param {} event.source The source object of the event + * @param {} event.name The name of the event + */ + static on (obj: Engine, name: "afterAdd", callback: (e: IEventComposite) => void): void; /** - * Fired when a call to `Composite.remove` is made, before objects have been removed. - * - * @event beforeRemove - * @param {} event An event object - * @param {} event.object The object(s) to be removed (may be a single body, constraint, composite or a mixed array of these) - * @param {} event.source The source object of the event - * @param {} event.name The name of the event - */ - static on(obj: Engine, name: "beforeRemove", callback: (e: IEventComposite) => void): void; + * Fired when a call to `Composite.remove` is made, before objects have been removed. + * + * @event beforeRemove + * @param {} event An event object + * @param {} event.object The object(s) to be removed (may be a single body, constraint, composite or a mixed array of these) + * @param {} event.source The source object of the event + * @param {} event.name The name of the event + */ + static on (obj: Engine, name: "beforeRemove", callback: (e: IEventComposite) => void): void; /** - * Fired when a call to `Composite.remove` is made, after objects have been removed. - * - * @event afterRemove - * @param {} event An event object - * @param {} event.object The object(s) that have been removed (may be a single body, constraint, composite or a mixed array of these) - * @param {} event.source The source object of the event - * @param {} event.name The name of the event - */ - static on(obj: Engine, name: "afterRemove", callback: (e: IEventComposite) => void): void; - + * Fired when a call to `Composite.remove` is made, after objects have been removed. + * + * @event afterRemove + * @param {} event An event object + * @param {} event.object The object(s) that have been removed (may be a single body, constraint, composite or a mixed array of these) + * @param {} event.source The source object of the event + * @param {} event.name The name of the event + */ + static on (obj: Engine, name: "afterRemove", callback: (e: IEventComposite) => void): void; /** - * Fired after engine update and all collision events - * - * @event afterUpdate - * @param {} event An event object - * @param {number} event.timestamp The engine.timing.timestamp of the event - * @param {} event.source The source object of the event - * @param {} event.name The name of the event - */ - static on(obj: Engine, name: "afterUpdate", callback: (e: IEventTimestamped) => void): void; + * Fired after engine update and all collision events + * + * @event afterUpdate + * @param {} event An event object + * @param {number} event.timestamp The engine.timing.timestamp of the event + * @param {} event.source The source object of the event + * @param {} event.name The name of the event + */ + static on (obj: Engine, name: "afterUpdate", callback: (e: IEventTimestamped) => void): void; /** - * Fired just before an update - * - * @event beforeUpdate - * @param {} event An event object - * @param {number} event.timestamp The engine.timing.timestamp of the event - * @param {} event.source The source object of the event - * @param {} event.name The name of the event - */ - static on(obj: Engine, name: "beforeUpdate", callback: (e: IEventTimestamped) => void): void; + * Fired just before an update + * + * @event beforeUpdate + * @param {} event An event object + * @param {number} event.timestamp The engine.timing.timestamp of the event + * @param {} event.source The source object of the event + * @param {} event.name The name of the event + */ + static on (obj: Engine, name: "beforeUpdate", callback: (e: IEventTimestamped) => void): void; /** - * Fired after engine update, provides a list of all pairs that are colliding in the current tick (if any) - * - * @event collisionActive - * @param {} event An event object - * @param {} event.pairs List of affected pairs - * @param {number} event.timestamp The engine.timing.timestamp of the event - * @param {} event.source The source object of the event - * @param {} event.name The name of the event - */ - static on(obj: Engine, name: "collisionActive", callback: (e: IEventCollision) => void): void; - + * Fired after engine update, provides a list of all pairs that are colliding in the current tick (if any) + * + * @event collisionActive + * @param {} event An event object + * @param {} event.pairs List of affected pairs + * @param {number} event.timestamp The engine.timing.timestamp of the event + * @param {} event.source The source object of the event + * @param {} event.name The name of the event + */ + static on (obj: Engine, name: "collisionActive", callback: (e: IEventCollision) => void): void; /** - * Fired after engine update, provides a list of all pairs that have ended collision in the current tick (if any) - * - * @event collisionEnd - * @param {} event An event object - * @param {} event.pairs List of affected pairs - * @param {number} event.timestamp The engine.timing.timestamp of the event - * @param {} event.source The source object of the event - * @param {} event.name The name of the event - */ - static on(obj: Engine, name: "collisionEnd", callback: (e: IEventCollision) => void): void; + * Fired after engine update, provides a list of all pairs that have ended collision in the current tick (if any) + * + * @event collisionEnd + * @param {} event An event object + * @param {} event.pairs List of affected pairs + * @param {number} event.timestamp The engine.timing.timestamp of the event + * @param {} event.source The source object of the event + * @param {} event.name The name of the event + */ + static on (obj: Engine, name: "collisionEnd", callback: (e: IEventCollision) => void): void; /** - * Fired after engine update, provides a list of all pairs that have started to collide in the current tick (if any) - * - * @event collisionStart - * @param {} event An event object - * @param {} event.pairs List of affected pairs - * @param {number} event.timestamp The engine.timing.timestamp of the event - * @param {} event.source The source object of the event - * @param {} event.name The name of the event - */ - static on(obj: Engine, name: "collisionStart", callback: (e: IEventCollision) => void): void; + * Fired after engine update, provides a list of all pairs that have started to collide in the current tick (if any) + * + * @event collisionStart + * @param {} event An event object + * @param {} event.pairs List of affected pairs + * @param {number} event.timestamp The engine.timing.timestamp of the event + * @param {} event.source The source object of the event + * @param {} event.name The name of the event + */ + static on (obj: Engine, name: "collisionStart", callback: (e: IEventCollision) => void): void; /** - * Fired at the start of a tick, before any updates to the engine or timing - * - * @event beforeTick - * @param {} event An event object - * @param {number} event.timestamp The engine.timing.timestamp of the event - * @param {} event.source The source object of the event - * @param {} event.name The name of the event - */ - static on(obj: Engine, name: "beforeTick", callback: (e: IEventTimestamped) => void): void; + * Fired at the start of a tick, before any updates to the engine or timing + * + * @event beforeTick + * @param {} event An event object + * @param {number} event.timestamp The engine.timing.timestamp of the event + * @param {} event.source The source object of the event + * @param {} event.name The name of the event + */ + static on (obj: Engine, name: "beforeTick", callback: (e: IEventTimestamped) => void): void; /** * Fired after engine timing updated, but just before update - * - * @event tick - * @param {} event An event object - * @param {number} event.timestamp The engine.timing.timestamp of the event - * @param {} event.source The source object of the event - * @param {} event.name The name of the event - */ - static on(obj: Engine, name: "tick", callback: (e: IEventTimestamped) => void): void; + * + * @event tick + * @param {} event An event object + * @param {number} event.timestamp The engine.timing.timestamp of the event + * @param {} event.source The source object of the event + * @param {} event.name The name of the event + */ + static on (obj: Engine, name: "tick", callback: (e: IEventTimestamped) => void): void; /** - * Fired at the end of a tick, after engine update and after rendering - * - * @event afterTick - * @param {} event An event object - * @param {number} event.timestamp The engine.timing.timestamp of the event - * @param {} event.source The source object of the event - * @param {} event.name The name of the event - */ - static on(obj: Engine, name: "afterTick", callback: (e: IEventTimestamped) => void): void; + * Fired at the end of a tick, after engine update and after rendering + * + * @event afterTick + * @param {} event An event object + * @param {number} event.timestamp The engine.timing.timestamp of the event + * @param {} event.source The source object of the event + * @param {} event.name The name of the event + */ + static on (obj: Engine, name: "afterTick", callback: (e: IEventTimestamped) => void): void; /** - * Fired before rendering - * - * @event beforeRender - * @param {} event An event object - * @param {number} event.timestamp The engine.timing.timestamp of the event - * @param {} event.source The source object of the event - * @param {} event.name The name of the event - */ - static on(obj: Engine, name: "beforeRender", callback: (e: IEventTimestamped) => void): void; + * Fired before rendering + * + * @event beforeRender + * @param {} event An event object + * @param {number} event.timestamp The engine.timing.timestamp of the event + * @param {} event.source The source object of the event + * @param {} event.name The name of the event + */ + static on (obj: Engine, name: "beforeRender", callback: (e: IEventTimestamped) => void): void; /** - * Fired after rendering - * - * @event afterRender - * @param {} event An event object - * @param {number} event.timestamp The engine.timing.timestamp of the event - * @param {} event.source The source object of the event - * @param {} event.name The name of the event - */ - static on(obj: Engine, name: "afterRender", callback: (e: IEventTimestamped) => void): void; + * Fired after rendering + * + * @event afterRender + * @param {} event An event object + * @param {number} event.timestamp The engine.timing.timestamp of the event + * @param {} event.source The source object of the event + * @param {} event.name The name of the event + */ + static on (obj: Engine, name: "afterRender", callback: (e: IEventTimestamped) => void): void; /** * Fired when the mouse is down (or a touch has started) during the last step @@ -3252,7 +2810,7 @@ declare namespace MatterJS { * @param name * @param callback */ - static on(obj: MouseConstraint, name: "mousedown", callback: (e: any) => void): void; + static on (obj: MouseConstraint, name: "mousedown", callback: (e: any) => void): void; /** * Fired when the mouse has moved (or a touch moves) during the last step @@ -3260,7 +2818,7 @@ declare namespace MatterJS { * @param name * @param callback */ - static on(obj: MouseConstraint, name: "mousemove", callback: (e: any) => void): void; + static on (obj: MouseConstraint, name: "mousemove", callback: (e: any) => void): void; /** * Fired when the mouse is up (or a touch has ended) during the last step @@ -3268,36 +2826,34 @@ declare namespace MatterJS { * @param name * @param callback */ - static on(obj: MouseConstraint, name: "mouseup", callback: (e: any) => void): void; + static on (obj: MouseConstraint, name: "mouseup", callback: (e: any) => void): void; - - static on(obj: any, name: string, callback: (e: any) => void): void; + static on (obj: any, name: string, callback: (e: any) => void): void; /** * Removes the given event callback. If no callback, clears all callbacks in eventNames. If no eventNames, clears all events. * - * @param obj - * @param eventName - * @param callback - */ + * @param obj + * @param eventName + * @param callback + */ static off(obj: any, eventName: string, callback: (e: any) => void): void; /** * Fires all the callbacks subscribed to the given object's eventName, in the order they subscribed, if any. * - * @param object - * @param eventNames - * @param event - */ + * @param object + * @param eventNames + * @param event + */ static trigger(object: any, eventNames: string, event?: (e: any) => void): void; } - type Dependency = {name: string, range: string} - | {name: string, version: string} - | string; + type Dependency = {name: string, range: string} | {name: string, version: string} | string; export class Plugin { + name: string; version: string; install: () => void; @@ -3309,7 +2865,7 @@ declare namespace MatterJS { * @param plugin {} The plugin to register. * @return {object} The plugin. */ - static register(plugin: Plugin): Plugin; + static register (plugin: Plugin): Plugin; /** * Resolves a dependency to a plugin object from the registry if it exists. @@ -3318,7 +2874,7 @@ declare namespace MatterJS { * @param dependency {string} The dependency. * @return {object} The plugin if resolved, otherwise `undefined`. */ - static resolve(dependency: string): Plugin | undefined; + static resolve (dependency: string): Plugin | undefined; /** * Returns `true` if the object meets the minimum standard to be considered a plugin. @@ -3330,7 +2886,7 @@ declare namespace MatterJS { * @param obj {} The obj to test. * @return {boolean} `true` if the object can be considered a plugin otherwise `false`. */ - static isPlugin(obj: {}): boolean; + static isPlugin (obj: {}): boolean; /** * Returns a pretty printed plugin name and version. @@ -3338,7 +2894,7 @@ declare namespace MatterJS { * @param plugin {} The plugin. * @return {string} Pretty printed plugin name and version. */ - static toString(plugin: string | Plugin): string; + static toString (plugin: string | Plugin): string; /** * Returns `true` if `plugin.for` is applicable to `module` by comparing against `module.name` and `module.version`. @@ -3349,7 +2905,7 @@ declare namespace MatterJS { * @param module {} The module. * @return {boolean} `true` if `plugin.for` is applicable to `module`, otherwise `false`. */ - static isFor(plugin: Plugin, module: {name?: string, [_: string]: any}): boolean; + static isFor (plugin: Plugin, module: {name?: string, [_: string]: any}): boolean; /** * Installs the plugins by calling `plugin.install` on each plugin specified in `plugins` if passed, otherwise `module.uses`. @@ -3367,10 +2923,7 @@ declare namespace MatterJS { * @param module {} The module install plugins on. * @param [plugins=module.uses] {} The plugins to install on module (optional, defaults to `module.uses`). */ - static use( - module: {uses?: (Plugin | string)[]; [_: string]: any}, - plugins: (Plugin | string)[] - ): void; + static use (module: {uses?: (Plugin | string)[]; [_: string]: any}, plugins: (Plugin | string)[]): void; /** * Recursively finds all of a module's dependencies and returns a flat dependency graph. @@ -3378,10 +2931,7 @@ declare namespace MatterJS { * @param module {} The module. * @return {object} A dependency graph. */ - static dependencies( - module: Dependency, - tracked?: {[_: string]: string[]} - ): {[_: string]: string[]} | string | undefined + static dependencies (module: Dependency, tracked?: {[_: string]: string[]}): {[_: string]: string[]} | string | undefined /** * Parses a dependency string into its components. @@ -3392,7 +2942,7 @@ declare namespace MatterJS { * @param dependency {string} The dependency of the format `'module-name'` or `'module-name@version'`. * @return {object} The dependency parsed into its components. */ - static dependencyParse(dependency: Dependency) : {name: string, range: string}; + static dependencyParse (dependency: Dependency) : {name: string, range: string}; /** * Parses a version string into its components. @@ -3408,7 +2958,7 @@ declare namespace MatterJS { * @param range {string} The version string. * @return {object} The version range parsed into its components. */ - static versionParse(range: string) : { + static versionParse (range: string) : { isRange: boolean, version: string, range: string, @@ -3427,7 +2977,11 @@ declare namespace MatterJS { * @param range {string} The range string. * @return {boolean} `true` if `version` satisfies `range`, otherwise `false`. */ - static versionSatisfies(version: string, range: string): boolean; + static versionSatisfies (version: string, range: string): boolean; } } + +declare module 'matter' { + export = MatterJS; +} From 47ae9eaadcf4b5b5b0890257424ba4b6f466f913 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 13 Jan 2020 22:35:40 +0000 Subject: [PATCH 146/189] Exposed StaggerBuilder and added missing param to JSDocs --- src/tweens/TweenManager.js | 1 + src/tweens/builders/index.js | 1 + src/tweens/typedefs/TweenBuilderConfig.js | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tweens/TweenManager.js b/src/tweens/TweenManager.js index 6a4cf6f09..7aea97718 100644 --- a/src/tweens/TweenManager.js +++ b/src/tweens/TweenManager.js @@ -300,6 +300,7 @@ var TweenManager = new Class({ * @method Phaser.Tweens.TweenManager#stagger * @since 3.19.0 * + * @param {(number|number[])} value - The amount to stagger by, or an array containing two elements representing the min and max values to stagger between. * @param {Phaser.Types.Tweens.StaggerConfig} config - The configuration object for the Stagger function. * * @return {function} The stagger function. diff --git a/src/tweens/builders/index.js b/src/tweens/builders/index.js index 3cb7d341e..1bdc23e9f 100644 --- a/src/tweens/builders/index.js +++ b/src/tweens/builders/index.js @@ -18,6 +18,7 @@ module.exports = { GetTweens: require('./GetTweens'), GetValueOp: require('./GetValueOp'), NumberTweenBuilder: require('./NumberTweenBuilder'), + StaggerBuilder: require('./StaggerBuilder'), TimelineBuilder: require('./TimelineBuilder'), TweenBuilder: require('./TweenBuilder') diff --git a/src/tweens/typedefs/TweenBuilderConfig.js b/src/tweens/typedefs/TweenBuilderConfig.js index df1726517..a764b5cce 100644 --- a/src/tweens/typedefs/TweenBuilderConfig.js +++ b/src/tweens/typedefs/TweenBuilderConfig.js @@ -3,7 +3,7 @@ * @since 3.18.0 * * @property {any} targets - The object, or an array of objects, to run the tween on. - * @property {number} [delay=0] - The number of milliseconds to delay before the tween will start. + * @property {(number|function)} [delay=0] - The number of milliseconds to delay before the tween will start. * @property {number} [duration=1000] - The duration of the tween in milliseconds. * @property {(string|function)} [ease='Power0'] - The easing equation to use for the tween. * @property {array} [easeParams] - Optional easing parameters. From 40e798ab3cfbc0bd01a51aa0be93fc6d0409949f Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 14 Jan 2020 14:59:32 +0000 Subject: [PATCH 147/189] Improving Matter defs --- types/matter.d.ts | 1584 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 1530 insertions(+), 54 deletions(-) diff --git a/types/matter.d.ts b/types/matter.d.ts index 7e56d0ce0..b30cdaaa2 100644 --- a/types/matter.d.ts +++ b/types/matter.d.ts @@ -1,6 +1,4 @@ -// Type definitions for Matter.js as used by Phaser 3 -// -// Project: https://github.com/liabru/matter-js +// Type definitions specifically for Matter.js as used by Phaser 3 // // Definitions by: Ivane Gegia , // David Asmuth , @@ -13,7 +11,7 @@ declare namespace MatterJS { // Interfaces // -------------------------------------------------------------- - export interface IChamfer { + interface IChamfer { radius?: number | Array; quality?: number; @@ -22,13 +20,13 @@ declare namespace MatterJS { } - export interface IChamferableBodyDefinition extends IBodyDefinition { + interface IChamferableBodyDefinition extends IBodyDefinition { chamfer?: IChamfer; } - export interface IBodyDefinition { + interface IBodyDefinition { /** * A `Number` specifying the angle of the body, in radians. @@ -423,7 +421,7 @@ declare namespace MatterJS { } - export interface IBodyRenderOptions { + interface IBodyRenderOptions { /** * A flag that indicates if the body should be rendered. @@ -455,7 +453,7 @@ declare namespace MatterJS { } - export interface IBodyRenderOptionsSprite { + interface IBodyRenderOptionsSprite { /** * A `Number` that defines the scaling in the x-axis for the sprite, if any. @@ -476,14 +474,14 @@ declare namespace MatterJS { yOffset: number; } - export interface IBound { + interface IBound { min: { x: number, y: number } max: { x: number, y: number } } - export interface ICompositeDefinition { + interface ICompositeDefinition { /** * An array of `Body` that are _direct_ children of this composite. @@ -565,7 +563,7 @@ declare namespace MatterJS { type?: String; } - export interface IConstraintDefinition { + interface IConstraintDefinition { /** * The first possible `Body` that this constraint is attached to. @@ -672,7 +670,7 @@ declare namespace MatterJS { } - export interface IConstraintRenderDefinition { + interface IConstraintRenderDefinition { /** * A `Number` that defines the line width to use when rendering the constraint outline. @@ -704,7 +702,7 @@ declare namespace MatterJS { visible: boolean; } - export interface IEngineDefinition { + interface IEngineDefinition { /** * An integer `Number` that specifies the number of position iterations to perform each update. @@ -775,7 +773,7 @@ declare namespace MatterJS { } - export interface IEngineTimingOptions { + interface IEngineTimingOptions { /** * A `Number` that specifies the global scaling factor of time for all bodies. @@ -801,7 +799,7 @@ declare namespace MatterJS { } - export interface IMouseConstraintDefinition { + interface IMouseConstraintDefinition { /** * The `Constraint` object that is used to move the body during interaction. @@ -841,9 +839,9 @@ declare namespace MatterJS { } - export interface IGridDefinition {} + interface IGridDefinition {} - export interface IPair { + interface IPair { id: number; bodyA: Body; bodyB: Body; @@ -860,7 +858,7 @@ declare namespace MatterJS { slop: number; } - export interface ICollisionData { + interface ICollisionData { collided: boolean; bodyA: Body; bodyB: Body; @@ -880,7 +878,7 @@ declare namespace MatterJS { slop: number; } - export interface ICollisionPair { + interface ICollisionPair { id: string; bodyA: Body; bodyB: Body; @@ -899,7 +897,7 @@ declare namespace MatterJS { slop: number; } - export interface ICollisionFilter { + interface ICollisionFilter { category: number; mask: number; @@ -907,7 +905,7 @@ declare namespace MatterJS { } - export interface IRunnerOptions { + interface IRunnerOptions { /** * A `Boolean` that specifies if the runner should use a fixed timestep (otherwise it is variable). @@ -945,7 +943,7 @@ declare namespace MatterJS { } - export interface IEvent { + interface IEvent { /** * The name of the event @@ -959,7 +957,7 @@ declare namespace MatterJS { } - export interface IEventComposite extends IEvent { + interface IEventComposite extends IEvent { /** * EventObjects (may be a single body, constraint, composite or a mixed array of these) @@ -968,7 +966,7 @@ declare namespace MatterJS { } - export interface IEventTimestamped extends IEvent { + interface IEventTimestamped extends IEvent { /** * The engine.timing.timestamp of the event @@ -977,7 +975,7 @@ declare namespace MatterJS { } - export interface IEventCollision extends IEventTimestamped { + interface IEventCollision extends IEventTimestamped { /** * The collision pair @@ -986,6 +984,405 @@ declare namespace MatterJS { } + type BodyType = { + + /** + * An integer `Number` uniquely identifying number generated in `Body.create` by `Common.nextId`. + * + * @property id + * @type number + */ + id: number; + + /** + * A `String` denoting the type of object. + * + * @property type + * @type string + * @default "body" + * @readOnly + */ + type: string; + + /** + * An arbitrary `String` name to help the user identify and manage bodies. + * + * @property label + * @type string + * @default "Body" + */ + label: string; + + /** + * An array of bodies that make up this body. + * The first body in the array must always be a self reference to the current body instance. + * All bodies in the `parts` array together form a single rigid compound body. + * Parts are allowed to overlap, have gaps or holes or even form concave bodies. + * Parts themselves should never be added to a `World`, only the parent body should be. + * Use `Body.setParts` when setting parts to ensure correct updates of all properties. + * + * @property parts + * @type body[] + */ + parts: BodyType[]; + + /** + * An object reserved for storing plugin-specific properties. + * + * @property plugin + * @type {} + */ + plugin: any; + + /** + * A self reference if the body is _not_ a part of another body. + * Otherwise this is a reference to the body that this is a part of. + * See `body.parts`. + * + * @property parent + * @type body + */ + parent: BodyType; + + /** + * A `Number` specifying the angle of the body, in radians. + * + * @property angle + * @type number + * @default 0 + */ + angle: number; + + /** + * An array of `Vector` objects that specify the convex hull of the rigid body. + * These should be provided about the origin `(0, 0)`. E.g. + * + * [{ x: 0, y: 0 }, { x: 25, y: 50 }, { x: 50, y: 0 }] + * + * When passed via `Body.create`, the vertices are translated relative to `body.position` (i.e. world-space, and constantly updated by `Body.update` during simulation). + * The `Vector` objects are also augmented with additional properties required for efficient collision detection. + * + * Other properties such as `inertia` and `bounds` are automatically calculated from the passed vertices (unless provided via `options`). + * Concave hulls are not currently supported. The module `Matter.Vertices` contains useful methods for working with vertices. + * + * @property vertices + * @type vector[] + */ + vertices?: Vector[]; + + /** + * A `Vector` that specifies the current world-space position of the body. + * + * @property position + * @type vector + * @default { x: 0, y: 0 } + */ + position: Vector; + + /** + * A `Vector` that specifies the force to apply in the current step. It is zeroed after every `Body.update`. See also `Body.applyForce`. + * + * @property force + * @type vector + * @default { x: 0, y: 0 } + */ + force: Vector; + + /** + * A `Number` that specifies the torque (turning force) to apply in the current step. It is zeroed after every `Body.update`. + * + * @property torque + * @type number + * @default 0 + */ + torque: number; + + /** + * A `Vector` that specifies the position impulse. + * + * @property positionImpulse + * @type vector + * @default { x: 0, y: 0 } + */ + positionImpulse: Vector; + + /** + * A `Vector` that specifies the previous position impulse. + * + * @property previousPositionImpulse + * @type vector + * @default { x: 0, y: 0 } + */ + previousPositionImpulse: Vector; + + /** + * A `Vector` that specifies the constraint impulse. + * + * @property constraintImpulse + * @type vector + * @default { x: 0, y: 0 } + */ + constraintImpulse: Vector; + + /** + * The total number of contacts. + * + * @property totalContacts + * @type number + * @default 0 + */ + totalContacts: number; + + /** + * A `Number` that _measures_ the current speed of the body after the last `Body.update`. It is read-only and always positive (it's the magnitude of `body.velocity`). + * + * @readOnly + * @property speed + * @type number + * @default 0 + */ + speed: number; + + /** + * A `Number` that _measures_ the current angular speed of the body after the last `Body.update`. It is read-only and always positive (it's the magnitude of `body.angularVelocity`). + * + * @readOnly + * @property angularSpeed + * @type number + * @default 0 + */ + angularSpeed: number; + + /** + * A `Vector` that _measures_ the current velocity of the body after the last `Body.update`. It is read-only. + * If you need to modify a body's velocity directly, you should either apply a force or simply change the body's `position` (as the engine uses position-Verlet integration). + * + * @readOnly + * @property velocity + * @type vector + * @default { x: 0, y: 0 } + */ + velocity: Vector; + + /** + * A `Number` that _measures_ the current angular velocity of the body after the last `Body.update`. It is read-only. + * If you need to modify a body's angular velocity directly, you should apply a torque or simply change the body's `angle` (as the engine uses position-Verlet integration). + * + * @readOnly + * @property angularVelocity + * @type number + * @default 0 + */ + angularVelocity: number; + + /** + * A flag that indicates whether a body is a sensor. Sensor triggers collision events, but doesn't react with colliding body physically. + * + * @property isSensor + * @type boolean + * @default false + */ + isSensor: boolean; + + /** + * A flag that indicates whether a body is considered static. A static body can never change position or angle and is completely fixed. + * If you need to set a body as static after its creation, you should use `Body.setStatic` as this requires more than just setting this flag. + * + * @property isStatic + * @type boolean + * @default false + */ + isStatic: boolean; + + /** + * A flag that indicates whether the body is considered sleeping. A sleeping body acts similar to a static body, except it is only temporary and can be awoken. + * If you need to set a body as sleeping, you should use `Sleeping.set` as this requires more than just setting this flag. + * + * @property isSleeping + * @type boolean + * @default false + */ + isSleeping: boolean; + + /** + * A `Number` that _measures_ the amount of movement a body currently has (a combination of `speed` and `angularSpeed`). It is read-only and always positive. + * It is used and updated by the `Matter.Sleeping` module during simulation to decide if a body has come to rest. + * + * @readOnly + * @property motion + * @type number + * @default 0 + */ + motion: number; + + /** + * A `Number` that defines the number of updates in which this body must have near-zero velocity before it is set as sleeping by the `Matter.Sleeping` module (if sleeping is enabled by the engine). + * + * @property sleepThreshold + * @type number + * @default 60 + */ + sleepThreshold: number; + + /** + * A `Number` that defines the density of the body, that is its mass per unit area. + * If you pass the density via `Body.create` the `mass` property is automatically calculated for you based on the size (area) of the object. + * This is generally preferable to simply setting mass and allows for more intuitive definition of materials (e.g. rock has a higher density than wood). + * + * @property density + * @type number + * @default 0.001 + */ + density: number; + + /** + * A `Number` that defines the restitution (elasticity) of the body. The value is always positive and is in the range `(0, 1)`. + * A value of `0` means collisions may be perfectly inelastic and no bouncing may occur. + * A value of `0.8` means the body may bounce back with approximately 80% of its kinetic energy. + * Note that collision response is based on _pairs_ of bodies, and that `restitution` values are _combined_ with the following formula: + * + * Math.max(bodyA.restitution, bodyB.restitution) + * + * @property restitution + * @type number + * @default 0 + */ + restitution: number; + + /** + * A `Number` that defines the friction of the body. The value is always positive and is in the range `(0, 1)`. + * A value of `0` means that the body may slide indefinitely. + * A value of `1` means the body may come to a stop almost instantly after a force is applied. + * + * The effects of the value may be non-linear. + * High values may be unstable depending on the body. + * The engine uses a Coulomb friction model including static and kinetic friction. + * Note that collision response is based on _pairs_ of bodies, and that `friction` values are _combined_ with the following formula: + * + * Math.min(bodyA.friction, bodyB.friction) + * + * @property friction + * @type number + * @default 0.1 + */ + friction: number; + + /** + * A `Number` that defines the static friction of the body (in the Coulomb friction model). + * A value of `0` means the body will never 'stick' when it is nearly stationary and only dynamic `friction` is used. + * The higher the value (e.g. `10`), the more force it will take to initially get the body moving when nearly stationary. + * This value is multiplied with the `friction` property to make it easier to change `friction` and maintain an appropriate amount of static friction. + * + * @property frictionStatic + * @type number + * @default 0.5 + */ + frictionStatic: number; + + /** + * A `Number` that defines the air friction of the body (air resistance). + * A value of `0` means the body will never slow as it moves through space. + * The higher the value, the faster a body slows when moving through space. + * The effects of the value are non-linear. + * + * @property frictionAir + * @type number + * @default 0.01 + */ + frictionAir: number; + + /** + * An `Object` that specifies the collision filtering properties of this body. + * + * Collisions between two bodies will obey the following rules: + * - If the two bodies have the same non-zero value of `collisionFilter.group`, + * they will always collide if the value is positive, and they will never collide + * if the value is negative. + * - If the two bodies have different values of `collisionFilter.group` or if one + * (or both) of the bodies has a value of 0, then the category/mask rules apply as follows: + * + * Each body belongs to a collision category, given by `collisionFilter.category`. This + * value is used as a bit field and the category should have only one bit set, meaning that + * the value of this property is a power of two in the range [1, 2^31]. Thus, there are 32 + * different collision categories available. + * + * Each body also defines a collision bitmask, given by `collisionFilter.mask` which specifies + * the categories it collides with (the value is the bitwise AND value of all these categories). + * + * Using the category/mask rules, two bodies `A` and `B` collide if each includes the other's + * category in its mask, i.e. `(categoryA & maskB) !== 0` and `(categoryB & maskA) !== 0` + * are both true. + * + * @property collisionFilter + * @type object + */ + collisionFilter: ICollisionFilter; + + /** + * A `Number` that specifies a tolerance on how far a body is allowed to 'sink' or rotate into other bodies. + * Avoid changing this value unless you understand the purpose of `slop` in physics engines. + * The default should generally suffice, although very large bodies may require larger values for stable stacking. + * + * @property slop + * @type number + * @default 0.05 + */ + slop: number; + + /** + * A `Number` that allows per-body time scaling, e.g. a force-field where bodies inside are in slow-motion, while others are at full speed. + * + * @property timeScale + * @type number + * @default 1 + */ + timeScale: number; + + /** + * Holds Body event handlers. + * + * @property events + * @type any + */ + events?: any; + + /** + * A `Bounds` object that defines the AABB region for the body. + * It is automatically calculated from the given convex hull (`vertices` array) in `Body.create` and constantly updated by `Body.update` during simulation. + * + * @property bounds + * @type bounds + */ + bounds: IBound; + + /** + * A Chamfer object, if this Body has them. + * + * @property chamfer + * @type any + */ + chamfer?: IChamfer; + + /** + * The radius of this Body, if it's a circle. + * + * @property circleRadius + * @type number + * @default 0 + */ + circleRadius: number; + + /** + * A `Vector` that specifies the previous position. + * + * @property positionPrev + * @type vector + * @default { x: 0, y: 0 } + */ + positionPrev: Vector; + + }; + // -------------------------------------------------------------- // Modules // -------------------------------------------------------------- @@ -998,14 +1395,14 @@ declare namespace MatterJS { * @method use * @param ...plugin {Function} The plugin(s) to install on `base` (multi-argument). */ - export function use(...plugins: (Plugin | string)[]): void; + function use (...plugins: (Plugin | string)[]): void; /** * The `Matter.Axes` module contains methods for creating and manipulating sets of axes. * * @class Axes */ - export class Axes { + class Axes { /** * Creates a new set of axes from the given vertices. @@ -1025,7 +1422,7 @@ declare namespace MatterJS { } - export class AxesPhaserFactory { + class AxesFactory { /** * Creates a new set of axes from the given vertices. @@ -1050,10 +1447,8 @@ declare namespace MatterJS { * with commonly used body configurations (such as rectangles, circles and other polygons). * * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). - * - * @class Bodies */ - export class Bodies { + class Bodies { /** * Creates a new rigid body model with a circle hull. @@ -1097,6 +1492,88 @@ declare namespace MatterJS { */ static rectangle (x: number, y: number, width: number, height: number, options?: IChamferableBodyDefinition): IBodyDefinition; + /** + * Creates a new rigid body model with a trapezoid hull. + * The options parameter is an object that specifies any properties you wish to override the defaults. + * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. + * @method trapezoid + * @param {number} x + * @param {number} y + * @param {number} width + * @param {number} height + * @param {number} slope + * @param {object} [options] + * @return {body} A new trapezoid body + */ + static trapezoid (x: number, y: number, width: number, height: number, slope: number, options?: IChamferableBodyDefinition): IBodyDefinition; + + /** + * Creates a body using the supplied vertices (or an array containing multiple sets of vertices). + * If the vertices are convex, they will pass through as supplied. + * Otherwise if the vertices are concave, they will be decomposed if [poly-decomp.js](https://github.com/schteppe/poly-decomp.js) is available. + * Note that this process is not guaranteed to support complex sets of vertices (e.g. those with holes may fail). + * By default the decomposition will discard collinear edges (to improve performance). + * It can also optionally discard any parts that have an area less than `minimumArea`. + * If the vertices can not be decomposed, the result will fall back to using the convex hull. + * The options parameter is an object that specifies any `Matter.Body` properties you wish to override the defaults. + * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. + * @method fromVertices + * @param {number} x + * @param {number} y + * @param [[vector]] vertexSets + * @param {object} [options] + * @param {bool} [flagInternal=false] + * @param {number} [removeCollinear=0.01] + * @param {number} [minimumArea=10] + * @return {body} + */ + static fromVertices (x: number, y: number, vertexSets: Array>, options?: IBodyDefinition, flagInternal?: boolean, removeCollinear?: number, minimumArea?: number): IBodyDefinition; + } + + class BodiesFactory { + + /** + * Creates a new rigid body model with a circle hull. + * The options parameter is an object that specifies any properties you wish to override the defaults. + * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. + * @method circle + * @param {number} x + * @param {number} y + * @param {number} radius + * @param {object} [options] + * @param {number} [maxSides] + * @return {body} A new circle body + */ + circle (x: number, y: number, radius: number, options?: IBodyDefinition, maxSides?: number): IBodyDefinition; + + /** + * Creates a new rigid body model with a regular polygon hull with the given number of sides. + * The options parameter is an object that specifies any properties you wish to override the defaults. + * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. + * @method polygon + * @param {number} x + * @param {number} y + * @param {number} sides + * @param {number} radius + * @param {object} [options] + * @return {body} A new regular polygon body + */ + polygon (x: number, y: number, sides: number, radius: number, options?: IChamferableBodyDefinition): IBodyDefinition; + + /** + * Creates a new rigid body model with a rectangle hull. + * The options parameter is an object that specifies any properties you wish to override the defaults. + * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. + * @method rectangle + * @param {number} x + * @param {number} y + * @param {number} width + * @param {number} height + * @param {object} [options] + * @return {body} A new rectangle body + */ + rectangle (x: number, y: number, width: number, height: number, options?: IChamferableBodyDefinition): IBodyDefinition; + /** * Creates a new rigid body model with a trapezoid hull. * The options parameter is an object that specifies any properties you wish to override the defaults. @@ -1144,7 +1621,7 @@ declare namespace MatterJS { * * @class Body */ - export class Body { + class Body { /** * Applies a force to a body from a given world-space position, including resulting torque. @@ -1322,12 +1799,190 @@ declare namespace MatterJS { } + class BodyFactory { + + /** + * Applies a force to a body from a given world-space position, including resulting torque. + * @method applyForce + * @param {body} body + * @param {vector} position + * @param {vector} force + */ + applyForce (body: IBodyDefinition, position: Vector, force: Vector): void; + + /** + * Creates a new rigid body model. The options parameter is an object that specifies any properties you wish to override the defaults. + * All properties have default values, and many are pre-calculated automatically based on other properties. + * See the properties section below for detailed information on what you can pass via the `options` object. + * @method create + * @param {} options + * @return {body} body + */ + create (options: IBodyDefinition): Body; + + /** + * Rotates a body by a given angle relative to its current angle, without imparting any angular velocity. + * @method rotate + * @param {body} body + * @param {number} rotation + */ + rotate (body: IBodyDefinition, rotation: number): void; + + /** + * Returns the next unique group index for which bodies will collide. + * If `isNonColliding` is `true`, returns the next unique group index for which bodies will _not_ collide. + * See `body.collisionFilter` for more information. + * @method nextGroup + * @param {bool} [isNonColliding=false] + * @return {Number} Unique group index + */ + nextGroup (isNonColliding: boolean): number; + + /** + * Returns the next unique category bitfield (starting after the initial default category `0x0001`). + * There are 32 available. See `body.collisionFilter` for more information. + * @method nextCategory + * @return {Number} Unique category bitfield + */ + nextCategory (): number; + + /** + * Given a property and a value (or map of), sets the property(s) on the body, using the appropriate setter functions if they exist. + * Prefer to use the actual setter functions in performance critical situations. + * @method set + * @param {body} body + * @param {} settings A property name (or map of properties and values) to set on the body. + * @param {} value The value to set if `settings` is a single property name. + */ + set (body: IBodyDefinition, settings: any, value?: any): void; + + /** + * Sets the mass of the body. Inverse mass and density are automatically updated to reflect the change. + * @method setMass + * @param {body} body + * @param {number} mass + */ + setMass (body: IBodyDefinition, mass: number): void; + + /** + * Sets the density of the body. Mass is automatically updated to reflect the change. + * @method setDensity + * @param {body} body + * @param {number} density + */ + setDensity (body: IBodyDefinition, density: number): void; + + /** + * Sets the moment of inertia (i.e. second moment of area) of the body of the body. + * Inverse inertia is automatically updated to reflect the change. Mass is not changed. + * @method setInertia + * @param {body} body + * @param {number} inertia + */ + setInertia (body: IBodyDefinition, inertia: number): void; + + /** + * Sets the body's vertices and updates body properties accordingly, including inertia, area and mass (with respect to `body.density`). + * Vertices will be automatically transformed to be orientated around their centre of mass as the origin. + * They are then automatically translated to world space based on `body.position`. + * + * The `vertices` argument should be passed as an array of `Matter.Vector` points (or a `Matter.Vertices` array). + * Vertices must form a convex hull, concave hulls are not supported. + * + * @method setVertices + * @param {body} body + * @param {vector[]} vertices + */ + setVertices (body: IBodyDefinition, vertices: Array): void; + + /** + * Sets the parts of the `body` and updates mass, inertia and centroid. + * Each part will have its parent set to `body`. + * By default the convex hull will be automatically computed and set on `body`, unless `autoHull` is set to `false.` + * Note that this method will ensure that the first part in `body.parts` will always be the `body`. + * @method setParts + * @param {body} body + * @param [body] parts + * @param {bool} [autoHull=true] + */ + setParts (body: IBodyDefinition, parts: IBodyDefinition[], autoHull?: boolean): void; + + /** + * Sets the position of the body instantly. Velocity, angle, force etc. are unchanged. + * @method setPosition + * @param {body} body + * @param {vector} position + */ + setPosition (body: IBodyDefinition, position: Vector): void; + + /** + * Sets the angle of the body instantly. Angular velocity, position, force etc. are unchanged. + * @method setAngle + * @param {body} body + * @param {number} angle + */ + setAngle (body: IBodyDefinition, angle: number): void; + + /** + * Sets the linear velocity of the body instantly. Position, angle, force etc. are unchanged. See also `Body.applyForce`. + * @method setVelocity + * @param {body} body + * @param {vector} velocity + */ + setVelocity (body: IBodyDefinition, velocity: Vector): void; + + /** + * Sets the angular velocity of the body instantly. Position, angle, force etc. are unchanged. See also `Body.applyForce`. + * @method setAngularVelocity + * @param {body} body + * @param {number} velocity + */ + setAngularVelocity (body: IBodyDefinition, velocity: number): void; + + /** + * Sets the body as static, including isStatic flag and setting mass and inertia to Infinity. + * @method setStatic + * @param {body} body + * @param {bool} isStatic + */ + setStatic (body: IBodyDefinition, isStatic: boolean): void; + + /** + * Scales the body, including updating physical properties (mass, area, axes, inertia), from a world-space point (default is body centre). + * @method scale + * @param {body} body + * @param {number} scaleX + * @param {number} scaleY + * @param {vector} [point] + */ + scale (body: IBodyDefinition, scaleX: number, scaleY: number, point?: Vector): void; + + /** + * Moves a body by a given vector relative to its current position, without imparting any velocity. + * @method translate + * @param {body} body + * @param {vector} translation + */ + translate (body: IBodyDefinition, translation: Vector): void; + + /** + * Performs a simulation step for the given `body`, including updating position and angle using Verlet integration. + * @method update + * @param {body} body + * @param {number} deltaTime + * @param {number} timeScale + * @param {number} correction + */ + update (body: IBodyDefinition, deltaTime: number, timeScale: number, correction: number): void; + + } + /** * The `Matter.Bounds` module contains methods for creating and manipulating axis-aligned bounding boxes (AABB). * * @class Bounds */ - export class Bounds { + class Bounds { /** * Creates a new axis-aligned bounding box (AABB) for the given vertices. @@ -1382,6 +2037,61 @@ declare namespace MatterJS { } + class BoundsFactory { + + /** + * Creates a new axis-aligned bounding box (AABB) for the given vertices. + * @method create + * @param {vertices} vertices + * @return {IBound} A new bounds object + */ + create (vertices: Vertices): IBound; + + /** + * Updates bounds using the given vertices and extends the bounds given a velocity. + * @method update + * @param {IBound} bounds + * @param {vertices} vertices + * @param {vector} velocity + */ + update (bounds: IBound, vertices: Vertices, velocity: Vector): void; + + /** + * Returns true if the bounds contains the given point. + * @method contains + * @param {IBound} bounds + * @param {vector} point + * @return {boolean} True if the bounds contain the point, otherwise false + */ + contains (bounds: IBound, point: Vector): boolean; + + /** + * Returns true if the two bounds intersect. + * @method overlaps + * @param {IBound} boundsA + * @param {IBound} boundsB + * @return {boolean} True if the bounds overlap, otherwise false + */ + overlaps (boundsA: IBound, boundsB: IBound): boolean; + + /** + * Translates the bounds by the given vector. + * @method translate + * @param {IBound} bounds + * @param {vector} vector + */ + translate (bounds: IBound, vector: Vector): void; + + /** + * Shifts the bounds to the given position. + * @method shift + * @param {IBound} bounds + * @param {vector} position + */ + shift (bounds: IBound, position: Vector): void; + + } + /** * The `Matter.Composite` module contains methods for creating and manipulating composite bodies. * A composite body is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`, therefore composites form a tree structure. @@ -1392,7 +2102,7 @@ declare namespace MatterJS { * * @class Composite */ - export class Composite { + class Composite { /** * Generic add function. Adds one or many body(s), constraint(s) or a composite(s) to the given composite. @@ -1532,6 +2242,146 @@ declare namespace MatterJS { } + class CompositeFactory { + + /** + * Generic add function. Adds one or many body(s), constraint(s) or a composite(s) to the given composite. + * Triggers `beforeAdd` and `afterAdd` events on the `composite`. + * @method add + * @param {ICompositeDefinition} composite + * @param {} object + * @return {composite} The original composite with the objects added + */ + add (composite: ICompositeDefinition, object: IBodyDefinition | ICompositeDefinition | IConstraintDefinition): ICompositeDefinition; + + /** + * Returns all bodies in the given composite, including all bodies in its children, recursively. + * @method allBodies + * @param {composite} composite + * @return {body[]} All the bodies + */ + allBodies (composite: ICompositeDefinition): Array; + + /** + * Returns all composites in the given composite, including all composites in its children, recursively. + * @method allComposites + * @param {composite} composite + * @return {composite[]} All the composites + */ + allComposites (composite: ICompositeDefinition): Array; + + /** + * Returns all constraints in the given composite, including all constraints in its children, recursively. + * @method allConstraints + * @param {composite} composite + * @return {constraint[]} All the constraints + */ + allConstraints (composite: ICompositeDefinition): Array; + + /** + * Removes all bodies, constraints and composites from the given composite. + * Optionally clearing its children recursively. + * @method clear + * @param {composite} composite + * @param {boolean} keepStatic + * @param {boolean} [deep=false] + */ + clear (composite: ICompositeDefinition, keepStatic: boolean, deep?: boolean): void; + + /** + * Creates a new composite. The options parameter is an object that specifies any properties you wish to override the defaults. + * See the properites section below for detailed information on what you can pass via the `options` object. + * @method create + * @param {} [options] + * @return {composite} A new composite + */ + create (options?: ICompositeDefinition): ICompositeDefinition; + + /** + * Searches the composite recursively for an object matching the type and id supplied, null if not found. + * @method get + * @param {composite} composite + * @param {number} id + * @param {string} type + * @return {object} The requested object, if found + */ + get (composite: ICompositeDefinition, id: number, type: string): IBodyDefinition | ICompositeDefinition | IConstraintDefinition; + + /** + * Moves the given object(s) from compositeA to compositeB (equal to a remove followed by an add). + * @method move + * @param {compositeA} compositeA + * @param {object[]} objects + * @param {compositeB} compositeB + * @return {composite} Returns compositeA + */ + move (compositeA: ICompositeDefinition, objects: Array, compositeB: ICompositeDefinition): ICompositeDefinition; + + /** + * Assigns new ids for all objects in the composite, recursively. + * @method rebase + * @param {composite} composite + * @return {composite} Returns composite + */ + rebase (composite: ICompositeDefinition): ICompositeDefinition; + + /** + * Generic remove function. Removes one or many body(s), constraint(s) or a composite(s) to the given composite. + * Optionally searching its children recursively. + * Triggers `beforeRemove` and `afterRemove` events on the `composite`. + * @method remove + * @param {composite} composite + * @param {} object + * @param {boolean} [deep=false] + * @return {composite} The original composite with the objects removed + */ + remove (composite: ICompositeDefinition, object: IBodyDefinition | ICompositeDefinition | IConstraintDefinition, deep?: boolean): ICompositeDefinition; + + /** + * Sets the composite's `isModified` flag. + * If `updateParents` is true, all parents will be set (default: false). + * If `updateChildren` is true, all children will be set (default: false). + * @method setModified + * @param {composite} composite + * @param {boolean} isModified + * @param {boolean} [updateParents=false] + * @param {boolean} [updateChildren=false] + */ + setModified (composite: ICompositeDefinition, isModified: boolean, updateParents?: boolean, updateChildren?: boolean): void; + + /** + * Translates all children in the composite by a given vector relative to their current positions, + * without imparting any velocity. + * @method translate + * @param {composite} composite + * @param {vector} translation + * @param {bool} [recursive=true] + */ + translate (composite: ICompositeDefinition, translation: Vector, recursive?: boolean): void; + + /** + * Rotates all children in the composite by a given angle about the given point, without imparting any angular velocity. + * @method rotate + * @param {composite} composite + * @param {number} rotation + * @param {vector} point + * @param {bool} [recursive=true] + */ + rotate (composite: ICompositeDefinition, rotation: number, point: Vector, recursive?: boolean): void; + + /** + * Scales all children in the composite, including updating physical properties (mass, area, axes, inertia), from a world-space point. + * @method scale + * @param {composite} composite + * @param {number} scaleX + * @param {number} scaleY + * @param {vector} point + * @param {bool} [recursive=true] + */ + scale (composite: ICompositeDefinition, scaleX: number, scaleY: number, point: Vector, recursive?: boolean): void; + + } + /** * The `Matter.Composites` module contains factory methods for creating composite bodies * with commonly used configurations (such as stacks and chains). @@ -1540,7 +2390,107 @@ declare namespace MatterJS { * * @class Composites */ - export class Composites { + class Composites { + + /** + * Creates a composite with simple car setup of bodies and constraints. + * @method car + * @param {number} xx + * @param {number} yy + * @param {number} width + * @param {number} height + * @param {number} wheelSize + * @return {composite} A new composite car body + */ + static car (xx: number, yy: number, width: number, height: number, wheelSize: number): ICompositeDefinition; + + /** + * Chains all bodies in the given composite together using constraints. + * @method chain + * @param {composite} composite + * @param {number} xOffsetA + * @param {number} yOffsetA + * @param {number} xOffsetB + * @param {number} yOffsetB + * @param {object} options + * @return {composite} A new composite containing objects chained together with constraints + */ + static chain (composite: ICompositeDefinition, xOffsetA: number, yOffsetA: number, xOffsetB: number, yOffsetB: number, options: any): ICompositeDefinition; + + /** + * Connects bodies in the composite with constraints in a grid pattern, with optional cross braces. + * @method mesh + * @param {composite} composite + * @param {number} columns + * @param {number} rows + * @param {boolean} crossBrace + * @param {object} options + * @return {composite} The composite containing objects meshed together with constraints + */ + static mesh (composite: ICompositeDefinition, columns: number, rows: number, crossBrace: boolean, options: any): ICompositeDefinition; + + /** + * Creates a composite with a Newton's Cradle setup of bodies and constraints. + * @method newtonsCradle + * @param {number} xx + * @param {number} yy + * @param {number} number + * @param {number} size + * @param {number} length + * @return {composite} A new composite newtonsCradle body + */ + static newtonsCradle (xx: number, yy: number, number: number, size: number, length: number): ICompositeDefinition; + + /** + * Create a new composite containing bodies created in the callback in a pyramid arrangement. + * This function uses the body's bounds to prevent overlaps. + * @method pyramid + * @param {number} xx + * @param {number} yy + * @param {number} columns + * @param {number} rows + * @param {number} columnGap + * @param {number} rowGap + * @param {function} callback + * @return {composite} A new composite containing objects created in the callback + */ + static pyramid (xx: number, yy: number, columns: number, rows: number, columnGap: number, rowGap: number, callback: Function): ICompositeDefinition; + + /** + * Creates a simple soft body like object. + * @method softBody + * @param {number} xx + * @param {number} yy + * @param {number} columns + * @param {number} rows + * @param {number} columnGap + * @param {number} rowGap + * @param {boolean} crossBrace + * @param {number} particleRadius + * @param {} particleOptions + * @param {} constraintOptions + * @return {composite} A new composite softBody + */ + static softBody (xx: number, yy: number, columns: number, rows: number, columnGap: number, rowGap: number, crossBrace: boolean, particleRadius: number, particleOptions: any, constraintOptions: any): ICompositeDefinition; + + /** + * Create a new composite containing bodies created in the callback in a grid arrangement. + * This function uses the body's bounds to prevent overlaps. + * @method stack + * @param {number} xx + * @param {number} yy + * @param {number} columns + * @param {number} rows + * @param {number} columnGap + * @param {number} rowGap + * @param {function} callback + * @return {composite} A new composite containing objects created in the callback + */ + static stack (xx: number, yy: number, columns: number, rows: number, columnGap: number, rowGap: number, callback: Function): ICompositeDefinition; + + } + + class CompositesFactory { /** * Creates a composite with simple car setup of bodies and constraints. @@ -1649,7 +2599,7 @@ declare namespace MatterJS { * * @class Constraint */ - export class Constraint { + class Constraint { /** * Creates a new constraint. @@ -1663,6 +2613,20 @@ declare namespace MatterJS { } + class ConstraintFactory { + + /** + * Creates a new constraint. + * All properties have default values, and many are pre-calculated automatically based on other properties. + * See the properties section below for detailed information on what you can pass via the `options` object. + * @method create + * @param {} options + * @return {constraint} constraint + */ + create (options: IConstraintDefinition): IConstraintDefinition; + + } + /** * The `Matter.Engine` module contains methods for creating and manipulating engines. * An engine is a controller that manages updating the simulation of the world. @@ -1672,7 +2636,7 @@ declare namespace MatterJS { * * @class Engine */ - export class Engine { + class Engine { /** * Clears the engine including the world, pairs and broadphase. @@ -1820,7 +2784,7 @@ declare namespace MatterJS { * * @class Grid */ - export class Grid { + class Grid { /** * Creates a new grid. @@ -1849,6 +2813,35 @@ declare namespace MatterJS { } + class GridFactory { + + /** + * Creates a new grid. + * @method create + * @param {} options + * @return {grid} A new grid + */ + create (options?: IGridDefinition): Grid; + + /** + * Updates the grid. + * @method update + * @param {grid} grid + * @param {body[]} bodies + * @param {engine} engine + * @param {boolean} forceUpdate + */ + update (grid: Grid, bodies: Array, engine: Engine, forceUpdate: boolean): void; + + /** + * Clears the grid. + * @method clear + * @param {grid} grid + */ + clear (grid: Grid): void; + + } + /** * The `Matter.MouseConstraint` module contains methods for creating mouse constraints. * Mouse constraints are used for allowing user interaction, providing the ability to move bodies via the mouse or touch. @@ -1857,7 +2850,7 @@ declare namespace MatterJS { * * @class MouseConstraint */ - export class MouseConstraint { + class MouseConstraint { /** * Creates a new mouse constraint. @@ -1914,7 +2907,7 @@ declare namespace MatterJS { * * @class Pairs */ - export class Pairs { + class Pairs { /** * Clears the given pairs structure. @@ -1925,12 +2918,23 @@ declare namespace MatterJS { static clear (pairs: any): any; } + class PairsFactory { + + /** + * Clears the given pairs structure. + * @method clear + * @param {pairs} pairs + * @return {pairs} pairs + */ + clear (pairs: any): any; + } + /** * The `Matter.Pair` module contains methods for creating and manipulating collision pairs. * * @class Pair */ - export class Pair { + class Pair { /** * Creates a pair. @@ -1970,12 +2974,52 @@ declare namespace MatterJS { } + class PairFactory { + + /** + * Creates a pair. + * @method create + * @param {ICollisionData} collision + * @param {number} timestamp + * @return {IPair} A new pair + */ + create (collision: ICollisionData, timestamp: number): IPair; + + /** + * Updates a pair given a collision. + * @method update + * @param {IPair} pair + * @param {ICollisionData} collision + * @param {number} timestamp + */ + update (pair: IPair, collision: ICollisionData, timestamp: number): void; + + /** + * Set a pair as active or inactive. + * @method setActive + * @param {IPair} pair + * @param {boolean} isActive + * @param {number} timestamp + */ + setActive (pair: IPair, isActive: boolean, timestamp: number): void; + + /** + * Get the id for the given pair. + * @method id + * @param {Body} bodyA + * @param {Body} bodyB + * @return {string} Unique pairId + */ + id (bodyA: IBodyDefinition, bodyB: IBodyDefinition): string; + + } + /** * The `Matter.Detector` module contains methods for detecting collisions given a set of pairs. * * @class Detector */ - export class Detector { + class Detector { /** * Finds all collisions given a list of pairs. @@ -1998,12 +3042,35 @@ declare namespace MatterJS { } + class DetectorFactory { + + /** + * Finds all collisions given a list of pairs. + * @method collisions + * @param {pair[]} broadphasePairs + * @param {engine} engine + * @return {ICollisionData[]} collisions + */ + collisions (broadphasePairs: IPair[], engine: Engine): ICollisionData[]; + + /** + * Returns `true` if both supplied collision filters will allow a collision to occur. + * See `body.collisionFilter` for more information. + * @method canCollide + * @param {} filterA + * @param {} filterB + * @return {bool} `true` if collision can occur + */ + canCollide (filterA: ICollisionFilter, filterB: ICollisionFilter): boolean; + + } + /** * The `Matter.Resolver` module contains methods for resolving collision pairs. * * @class Resolver */ - export class Resolver { + class Resolver { /** * Prepare pairs for position solving. @@ -2045,13 +3112,54 @@ declare namespace MatterJS { } + class ResolverFactory { + + /** + * Prepare pairs for position solving. + * @method preSolvePosition + * @param {pair[]} pairs + */ + preSolvePosition (pairs: IPair[]): void; + + /** + * Find a solution for pair positions. + * @method solvePosition + * @param {pair[]} pairs + * @param {body[]} bodies + * @param {number} timeScale + */ + solvePosition (pairs: IPair[], bodies: IBodyDefinition[], timeScale: number): void; + + /** + * Apply position resolution. + * @method postSolvePosition + * @param {body[]} bodies + */ + postSolvePosition (bodies: IBodyDefinition[]): void; + + /** + * Prepare pairs for velocity solving. + * @method preSolveVelocity + * @param {pair[]} pairs + */ + preSolveVelocity (pairs: IPair[]): void; + + /** + * Find a solution for pair velocities. + * @method solveVelocity + * @param {pair[]} pairs + * @param {number} timeScale + */ + solveVelocity (pairs: IPair[], timeScale: number): void; + + } + /** * The `Matter.SAT` module contains methods for detecting collisions using the Separating Axis Theorem. * * @class SAT */ - - export class SAT { + class SAT { /** * Detect collision between two bodies using the Separating Axis Theorem. @@ -2065,6 +3173,20 @@ declare namespace MatterJS { } + class SATFactory { + + /** + * Detect collision between two bodies using the Separating Axis Theorem. + * @method collides + * @param {body} bodyA + * @param {body} bodyB + * @param {ICollisionData} previousCollision + * @return {ICollisionData} collision + */ + collides (bodyA: IBodyDefinition, bodyB: IBodyDefinition, previousCollision: ICollisionData): ICollisionData + + } + /** * The `Matter.Query` module contains methods for performing collision queries. * @@ -2072,7 +3194,7 @@ declare namespace MatterJS { * * @class Query */ - export class Query { + class Query { /** * Casts a ray segment against a set of bodies and returns all collisions, ray width is optional. Intersection points are not provided. @@ -2106,6 +3228,40 @@ declare namespace MatterJS { } + class QueryFactory { + + /** + * Casts a ray segment against a set of bodies and returns all collisions, ray width is optional. Intersection points are not provided. + * @method ray + * @param {body[]} bodies + * @param {vector} startPoint + * @param {vector} endPoint + * @param {number} [rayWidth] + * @return {object[]} Collisions + */ + ray (bodies: Array, startPoint: Vector, endPoint: Vector, rayWidth?: number): Array; + + /** + * Returns all bodies whose bounds are inside (or outside if set) the given set of bounds, from the given set of bodies. + * @method region + * @param {body[]} bodies + * @param {bounds} bounds + * @param {bool} [outside=false] + * @return {body[]} The bodies matching the query + */ + region (bodies: Array, bounds: Bounds, outside?: boolean): Array; + + /** + * Returns all bodies whose vertices contain the given point, from the given set of bodies. + * @method point + * @param {body[]} bodies + * @param {vector} point + * @return {body[]} The bodies matching the query + */ + point (bodies: Array, point: Vector): Array; + + } + /** * The `Matter.Runner` module is an optional utility which provides a game loop, * that handles updating and rendering a `Matter.Engine` for you within a browser. @@ -2118,7 +3274,7 @@ declare namespace MatterJS { * * @class Runner */ - export class Runner { + class Runner { /** * Creates a new Runner. The options parameter is an object that specifies any properties you wish to override the defaults. @@ -2207,12 +3363,18 @@ declare namespace MatterJS { * * @class Sleeping */ - export class Sleeping { + class Sleeping { static set (body: IBodyDefinition, isSleeping: boolean): void; } + class SleepingFactory { + + set (body: IBodyDefinition, isSleeping: boolean): void; + + } + /** * The `Matter.Svg` module contains methods for converting SVG images into an array of vector points. * @@ -2220,7 +3382,7 @@ declare namespace MatterJS { * * @class Svg */ - export class Svg { + class Svg { /** * Converts an SVG path into an array of vector points. @@ -2236,6 +3398,22 @@ declare namespace MatterJS { } + class SvgFactory { + + /** + * Converts an SVG path into an array of vector points. + * If the input path forms a concave shape, you must decompose the result into convex parts before use. + * See `Bodies.fromVertices` which provides support for this. + * Note that this function is not guaranteed to support complex paths (such as those with holes). + * @method pathToVertices + * @param {SVGPathElement} path + * @param {Number} [sampleLength=15] + * @return {Vector[]} points + */ + pathToVertices (path: SVGPathElement, sampleLength: number): Array; + + } + /** * The `Matter.Vector` module contains methods for creating and manipulating vectors. * Vectors are the basis of all the geometry related operations in the engine. @@ -2245,7 +3423,7 @@ declare namespace MatterJS { * * @class Vector */ - export class Vector { + class Vector { x: number; y: number; @@ -2402,6 +3580,164 @@ declare namespace MatterJS { * @return {vector} A new vector of vectorA and vectorB subtracted */ static sub(vectorA: Vector, vectorB: Vector, optional?: Vector): Vector; + + } + + class VectorFactory { + + /** + * Creates a new vector. + * @method create + * @param {number} x + * @param {number} y + * @return {vector} A new vector + */ + create(x?: number, y?: number): Vector; + + /** + * Returns a new vector with `x` and `y` copied from the given `vector`. + * @method clone + * @param {vector} vector + * @return {vector} A new cloned vector + */ + clone(vector: Vector): Vector; + + /** + * Returns the cross-product of three vectors. + * @method cross3 + * @param {vector} vectorA + * @param {vector} vectorB + * @param {vector} vectorC + * @return {number} The cross product of the three vectors + */ + cross3(vectorA: Vector, vectorB: Vector, vectorC: Vector):number; + + /** + * Adds the two vectors. + * @method add + * @param {vector} vectorA + * @param {vector} vectorB + * @param {vector} [output] + * @return {vector} A new vector of vectorA and vectorB added + */ + add(vectorA: Vector, vectorB: Vector, output?: Vector): Vector; + + /** + * Returns the angle in radians between the two vectors relative to the x-axis. + * @method angle + * @param {vector} vectorA + * @param {vector} vectorB + * @return {number} The angle in radians + */ + angle(vectorA: Vector, vectorB: Vector): number; + + /** + * Returns the cross-product of two vectors. + * @method cross + * @param {vector} vectorA + * @param {vector} vectorB + * @return {number} The cross product of the two vectors + */ + cross(vectorA: Vector, vectorB: Vector): number; + + /** + * Divides a vector and a scalar. + * @method div + * @param {vector} vector + * @param {number} scalar + * @return {vector} A new vector divided by scalar + */ + div(vector: Vector, scalar: number): Vector; + + /** + * Returns the dot-product of two vectors. + * @method dot + * @param {vector} vectorA + * @param {vector} vectorB + * @return {number} The dot product of the two vectors + */ + dot(vectorA: Vector, vectorB: Vector): Number; + + /** + * Returns the magnitude (length) of a vector. + * @method magnitude + * @param {vector} vector + * @return {number} The magnitude of the vector + */ + magnitude(vector: Vector): number; + + /** + * Returns the magnitude (length) of a vector (therefore saving a `sqrt` operation). + * @method magnitudeSquared + * @param {vector} vector + * @return {number} The squared magnitude of the vector + */ + magnitudeSquared(vector: Vector): number; + + /** + * Multiplies a vector and a scalar. + * @method mult + * @param {vector} vector + * @param {number} scalar + * @return {vector} A new vector multiplied by scalar + */ + mult(vector: Vector, scalar: number): Vector; + + /** + * Negates both components of a vector such that it points in the opposite direction. + * @method neg + * @param {vector} vector + * @return {vector} The negated vector + */ + neg(vector: Vector): Vector; + + /** + * Normalises a vector (such that its magnitude is `1`). + * @method normalise + * @param {vector} vector + * @return {vector} A new vector normalised + */ + normalise(vector: Vector): Vector; + + /** + * Returns the perpendicular vector. Set `negate` to true for the perpendicular in the opposite direction. + * @method perp + * @param {vector} vector + * @param {bool} [negate=false] + * @return {vector} The perpendicular vector + */ + perp(vector: Vector, negate?: boolean): Vector; + + /** + * Rotates the vector about (0, 0) by specified angle. + * @method rotate + * @param {vector} vector + * @param {number} angle + * @return {vector} A new vector rotated about (0, 0) + */ + rotate(vector: Vector, angle: number): Vector; + + /** + * Rotates the vector about a specified point by specified angle. + * @method rotateAbout + * @param {vector} vector + * @param {number} angle + * @param {vector} point + * @param {vector} [output] + * @return {vector} A new vector rotated about the point + */ + rotateAbout(vector: Vector, angle: number, point: Vector, output?: Vector): Vector; + + /** + * Subtracts the two vectors. + * @method sub + * @param {vector} vectorA + * @param {vector} vectorB + * @param {vector} [output] + * @return {vector} A new vector of vectorA and vectorB subtracted + */ + sub(vectorA: Vector, vectorB: Vector, optional?: Vector): Vector; + } /** @@ -2413,7 +3749,146 @@ declare namespace MatterJS { * * @class Vertices */ - export class Vertices { + class Vertices { + + /** + * Returns the average (mean) of the set of vertices. + * @method mean + * @param {vertices} vertices + * @return {vector} The average point + */ + static mean (vertices: Array): Array; + + /** + * Sorts the input vertices into clockwise order in place. + * @method clockwiseSort + * @param {vertices} vertices + * @return {vertices} vertices + */ + static clockwiseSort (vertices: Array): Array; + + /** + * Returns true if the vertices form a convex shape (vertices must be in clockwise order). + * @method isConvex + * @param {vertices} vertices + * @return {bool} `true` if the `vertices` are convex, `false` if not (or `null` if not computable). + */ + static isConvex (vertices: Array): boolean; + + /** + * Returns the convex hull of the input vertices as a new array of points. + * @method hull + * @param {vertices} vertices + * @return [vertex] vertices + */ + static hull (vertices: Array): Array; + + /** + * Returns the area of the set of vertices. + * @method area + * @param {vertices} vertices + * @param {bool} signed + * @return {number} The area + */ + static area (vertices: Array, signed: boolean): number; + + /** + * Returns the centre (centroid) of the set of vertices. + * @method centre + * @param {vertices} vertices + * @return {vector} The centre point + */ + static centre (vertices: Array): Vector; + + /** + * Chamfers a set of vertices by giving them rounded corners, returns a new set of vertices. + * The radius parameter is a single number or an array to specify the radius for each vertex. + * @method chamfer + * @param {vertices} vertices + * @param {number[]} radius + * @param {number} quality + * @param {number} qualityMin + * @param {number} qualityMax + */ + static chamfer (vertices: Array, radius: number | Array, quality: number, qualityMin: number, qualityMax: number): void; + + /** + * Returns `true` if the `point` is inside the set of `vertices`. + * @method contains + * @param {vertices} vertices + * @param {vector} point + * @return {boolean} True if the vertices contains point, otherwise false + */ + static contains (vertices: Array, point: Vector): boolean; + + /** + * Creates a new set of `Matter.Body` compatible vertices. + * The `points` argument accepts an array of `Matter.Vector` points orientated around the origin `(0, 0)`, for example: + * + * [{ x: 0, y: 0 }, { x: 25, y: 50 }, { x: 50, y: 0 }] + * + * The `Vertices.create` method returns a new array of vertices, which are similar to Matter.Vector objects, + * but with some additional references required for efficient collision detection routines. + * + * Note that the `body` argument is not optional, a `Matter.Body` reference must be provided. + * + * @method create + * @param {vector[]} points + * @param {body} body + */ + static create (points: Array, body: Body): void; + + /** + * Parses a string containing ordered x y pairs separated by spaces (and optionally commas), + * into a `Matter.Vertices` object for the given `Matter.Body`. + * For parsing SVG paths, see `Svg.pathToVertices`. + * @method fromPath + * @param {string} path + * @param {body} body + * @return {vertices} vertices + */ + static fromPath (path: string, body: Body): Array; + + /** + * Returns the moment of inertia (second moment of area) of the set of vertices given the total mass. + * @method inertia + * @param {vertices} vertices + * @param {number} mass + * @return {number} The polygon's moment of inertia + */ + static inertia (vertices: Array, mass: number): number; + + /** + * Rotates the set of vertices in-place. + * @method rotate + * @param {vertices} vertices + * @param {number} angle + * @param {vector} point + */ + static rotate (vertices: Array, angle: number, point: Vector): void; + + /** + * Scales the vertices from a point (default is centre) in-place. + * @method scale + * @param {vertices} vertices + * @param {number} scaleX + * @param {number} scaleY + * @param {vector} point + */ + static scale (vertices: Array, scaleX: number, scaleY: number, point: Vector): void; + + /** + * Translates the set of vertices in-place. + * @method translate + * @param {vertices} vertices + * @param {vector} vector + * @param {number} scalar + */ + static translate (vertices: Array, vector: Vector, scalar: number): void; + + } + + class VerticesFactory { /** * Returns the average (mean) of the set of vertices. @@ -2549,6 +4024,7 @@ declare namespace MatterJS { * @param {number} scalar */ translate (vertices: Array, vector: Vector, scalar: number): void; + } /** @@ -2563,7 +4039,7 @@ declare namespace MatterJS { * @class World * @extends Composite */ - export class World { + class World { /** * Add objects or arrays of objects of types: Body, Constraint, Composite @@ -2623,7 +4099,7 @@ declare namespace MatterJS { } - export class Events { + class Events { /** * Fired when a body starts sleeping (where `this` is the body). @@ -2852,7 +4328,7 @@ declare namespace MatterJS { type Dependency = {name: string, range: string} | {name: string, version: string} | string; - export class Plugin { + class Plugin { name: string; version: string; From 91e59ab39aeca7415918e0e71f465aed7a32c6f8 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 14 Jan 2020 14:59:35 +0000 Subject: [PATCH 148/189] Update MatterPhysics.js --- src/physics/matter-js/MatterPhysics.js | 36 +++++++++++++------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/physics/matter-js/MatterPhysics.js b/src/physics/matter-js/MatterPhysics.js index 802949fa0..8197a8b47 100644 --- a/src/physics/matter-js/MatterPhysics.js +++ b/src/physics/matter-js/MatterPhysics.js @@ -172,7 +172,7 @@ var MatterPhysics = new Class({ * Factories for commonly used body configurations (such as rectangles, circles and other polygons) can be found in the `Bodies` module. * * @name Phaser.Physics.Matter.MatterPhysics#body - * @type {MatterJS.Body} + * @type {MatterJS.BodyFactory} * @since 3.18.0 */ this.body = Body; @@ -186,7 +186,7 @@ var MatterPhysics = new Class({ * Note that the `Matter.World` object is also a type of `Matter.Composite` and as such all composite methods here can also operate on a `Matter.World`. * * @name Phaser.Physics.Matter.MatterPhysics#composite - * @type {MatterJS.Composite} + * @type {MatterJS.CompositeFactory} * @since 3.22.0 */ this.composite = Composite; @@ -199,7 +199,7 @@ var MatterPhysics = new Class({ * The `Matter.Detector` module contains methods for detecting collisions given a set of pairs. * * @name Phaser.Physics.Matter.MatterPhysics#detector - * @type {MatterJS.Detector} + * @type {MatterJS.DetectorFactory} * @since 3.22.0 */ this.detector = Detector; @@ -210,7 +210,7 @@ var MatterPhysics = new Class({ * The `Matter.Grid` module contains methods for creating and manipulating collision broadphase grid structures. * * @name Phaser.Physics.Matter.MatterPhysics#grid - * @type {MatterJS.Grid} + * @type {MatterJS.GridFactory} * @since 3.22.0 */ this.grid = Grid; @@ -221,7 +221,7 @@ var MatterPhysics = new Class({ * The `Matter.Pair` module contains methods for creating and manipulating collision pairs. * * @name Phaser.Physics.Matter.MatterPhysics#pair - * @type {MatterJS.Pair} + * @type {MatterJS.PairFactory} * @since 3.22.0 */ this.pair = Pair; @@ -232,7 +232,7 @@ var MatterPhysics = new Class({ * The `Matter.Pairs` module contains methods for creating and manipulating collision pair sets. * * @name Phaser.Physics.Matter.MatterPhysics#pairs - * @type {MatterJS.Pairs} + * @type {MatterJS.PairsFactory} * @since 3.22.0 */ this.pairs = Pairs; @@ -243,7 +243,7 @@ var MatterPhysics = new Class({ * The `Matter.Query` module contains methods for performing collision queries. * * @name Phaser.Physics.Matter.MatterPhysics#query - * @type {MatterJS.Query} + * @type {MatterJS.QueryFactory} * @since 3.22.0 */ this.query = Query; @@ -254,7 +254,7 @@ var MatterPhysics = new Class({ * The `Matter.Resolver` module contains methods for resolving collision pairs. * * @name Phaser.Physics.Matter.MatterPhysics#resolver - * @type {MatterJS.Resolver} + * @type {MatterJS.ResolverFactory} * @since 3.22.0 */ this.resolver = Resolver; @@ -265,7 +265,7 @@ var MatterPhysics = new Class({ * The `Matter.SAT` module contains methods for detecting collisions using the Separating Axis Theorem. * * @name Phaser.Physics.Matter.MatterPhysics#sat - * @type {MatterJS.SAT} + * @type {MatterJS.SATFactory} * @since 3.22.0 */ this.sat = SAT; @@ -280,7 +280,7 @@ var MatterPhysics = new Class({ * The stiffness of constraints can be modified to create springs or elastic. * * @name Phaser.Physics.Matter.MatterPhysics#constraint - * @type {MatterJS.Constraint} + * @type {MatterJS.ConstraintFactory} * @since 3.22.0 */ this.constraint = Constraint; @@ -294,7 +294,7 @@ var MatterPhysics = new Class({ * with commonly used body configurations (such as rectangles, circles and other polygons). * * @name Phaser.Physics.Matter.MatterPhysics#bodies - * @type {MatterJS.Bodies} + * @type {MatterJS.BodiesFactory} * @since 3.18.0 */ this.bodies = Bodies; @@ -306,7 +306,7 @@ var MatterPhysics = new Class({ * with commonly used configurations (such as stacks and chains). * * @name Phaser.Physics.Matter.MatterPhysics#composites - * @type {MatterJS.Composites} + * @type {MatterJS.CompositesFactory} * @since 3.22.0 */ this.composites = Composites; @@ -319,7 +319,7 @@ var MatterPhysics = new Class({ * The `Matter.Axes` module contains methods for creating and manipulating sets of axes. * * @name Phaser.Physics.Matter.MatterPhysics#axes - * @type {MatterJS.Axes} + * @type {MatterJS.AxesFactory} * @since 3.22.0 */ this.axes = Axes; @@ -330,7 +330,7 @@ var MatterPhysics = new Class({ * The `Matter.Bounds` module contains methods for creating and manipulating axis-aligned bounding boxes (AABB). * * @name Phaser.Physics.Matter.MatterPhysics#bounds - * @type {MatterJS.Bounds} + * @type {MatterJS.BoundsFactory} * @since 3.22.0 */ this.bounds = Bounds; @@ -343,7 +343,7 @@ var MatterPhysics = new Class({ * To use this module you also need the SVGPathSeg polyfill: https://github.com/progers/pathseg * * @name Phaser.Physics.Matter.MatterPhysics#svg - * @type {MatterJS.Svg} + * @type {MatterJS.SvgFactory} * @since 3.22.0 */ this.svg = Svg; @@ -356,7 +356,7 @@ var MatterPhysics = new Class({ * A `Matter.Vector` object is of the form `{ x: 0, y: 0 }`. * * @name Phaser.Physics.Matter.MatterPhysics#vector - * @type {MatterJS.Vector} + * @type {MatterJS.VectorFactory} * @since 3.22.0 */ this.vector = Vector; @@ -369,7 +369,7 @@ var MatterPhysics = new Class({ * A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull). * * @name Phaser.Physics.Matter.MatterPhysics#vertices - * @type {MatterJS.Vertices} + * @type {MatterJS.VerticesFactory} * @since 3.22.0 */ this.vertices = Vertices; @@ -382,7 +382,7 @@ var MatterPhysics = new Class({ * A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull). * * @name Phaser.Physics.Matter.MatterPhysics#verts - * @type {MatterJS.Vertices} + * @type {MatterJS.VerticesFactory} * @since 3.14.0 */ this.verts = Vertices; From f15ef8648e557670eab77869d74360ac5cdcf82a Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 14 Jan 2020 17:11:07 +0000 Subject: [PATCH 149/189] Lots of type fixes --- src/physics/matter-js/Factory.js | 62 +- src/physics/matter-js/MatterPhysics.js | 4 +- src/physics/matter-js/MatterTileBody.js | 2 +- src/physics/matter-js/PhysicsEditorParser.js | 6 +- src/physics/matter-js/PhysicsJSONParser.js | 2 +- src/physics/matter-js/PointerConstraint.js | 8 +- src/physics/matter-js/World.js | 24 +- src/physics/matter-js/components/SetBody.js | 2 +- .../events/COLLISION_ACTIVE_EVENT.js | 4 +- .../matter-js/events/COLLISION_END_EVENT.js | 4 +- .../matter-js/events/COLLISION_START_EVENT.js | 4 +- .../matter-js/events/DRAG_END_EVENT.js | 2 +- src/physics/matter-js/events/DRAG_EVENT.js | 2 +- .../matter-js/events/DRAG_START_EVENT.js | 4 +- .../matter-js/events/SLEEP_END_EVENT.js | 2 +- .../matter-js/events/SLEEP_START_EVENT.js | 2 +- src/physics/matter-js/lib/body/Body.js | 5 +- src/physics/matter-js/typedefs/MatterBody.js | 2 +- .../matter-js/typedefs/MatterBodyConfig.js | 2 +- .../matter-js/typedefs/MatterCollisionData.js | 10 +- .../matter-js/typedefs/MatterCollisionPair.js | 4 +- .../typedefs/MatterConstraintConfig.js | 4 +- .../matter-js/typedefs/MatterTileOptions.js | 2 +- types/matter.d.ts | 1044 +++++++++++++---- 24 files changed, 883 insertions(+), 324 deletions(-) diff --git a/src/physics/matter-js/Factory.js b/src/physics/matter-js/Factory.js index 44b2c97d2..600dd749f 100644 --- a/src/physics/matter-js/Factory.js +++ b/src/physics/matter-js/Factory.js @@ -86,7 +86,7 @@ var Factory = new Class({ * @param {number} height - The height of the Body. * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * - * @return {MatterJS.Body} A Matter JS Body. + * @return {MatterJS.BodyType} A Matter JS Body. */ rectangle: function (x, y, width, height, options) { @@ -110,7 +110,7 @@ var Factory = new Class({ * @param {number} slope - The slope of the trapezoid. 0 creates a rectangle, while 1 creates a triangle. Positive values make the top side shorter, while negative values make the bottom side shorter. * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * - * @return {MatterJS.Body} A Matter JS Body. + * @return {MatterJS.BodyType} A Matter JS Body. */ trapezoid: function (x, y, width, height, slope, options) { @@ -133,7 +133,7 @@ var Factory = new Class({ * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * @param {number} [maxSides] - The maximum amount of sides to use for the polygon which will approximate this circle. * - * @return {MatterJS.Body} A Matter JS Body. + * @return {MatterJS.BodyType} A Matter JS Body. */ circle: function (x, y, radius, options, maxSides) { @@ -156,7 +156,7 @@ var Factory = new Class({ * @param {number} radius - The "radius" of the polygon, i.e. the distance from its center to any vertex. This is also the radius of its circumcircle. * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * - * @return {MatterJS.Body} A Matter JS Body. + * @return {MatterJS.BodyType} A Matter JS Body. */ polygon: function (x, y, sides, radius, options) { @@ -182,7 +182,7 @@ var Factory = new Class({ * @param {number} [removeCollinear=0.01] - Whether Matter.js will discard collinear edges (to improve performance). * @param {number} [minimumArea=10] - During decomposition discard parts that have an area less than this. * - * @return {MatterJS.Body} A Matter JS Body. + * @return {MatterJS.BodyType} A Matter JS Body. */ fromVertices: function (x, y, vertexSets, options, flagInternal, removeCollinear, minimumArea) { @@ -229,7 +229,7 @@ var Factory = new Class({ * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * @param {boolean} [addToWorld=true] - Should the newly created body be immediately added to the World? * - * @return {MatterJS.Body} A Matter JS Body. + * @return {MatterJS.BodyType} A Matter JS Body. */ fromPhysicsEditor: function (x, y, config, options, addToWorld) { @@ -275,7 +275,7 @@ var Factory = new Class({ * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * @param {boolean} [addToWorld=true] - Should the newly created body be immediately added to the World? * - * @return {MatterJS.Body} A Matter JS Body. + * @return {MatterJS.BodyType} A Matter JS Body. */ fromSVG: function (x, y, xml, scale, options, addToWorld) { @@ -355,7 +355,7 @@ var Factory = new Class({ * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * @param {boolean} [addToWorld=true] - Should the newly created body be immediately added to the World? * - * @return {MatterJS.Body} A Matter JS Body. + * @return {MatterJS.BodyType} A Matter JS Body. */ fromJSON: function (x, y, config, options, addToWorld) { @@ -389,7 +389,7 @@ var Factory = new Class({ * @param {number} [rowGap=0] - The distance between each row. * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * - * @return {MatterJS.Composite} A Matter JS Composite Stack. + * @return {MatterJS.CompositeType} A Matter JS Composite Stack. */ imageStack: function (key, frame, x, y, columns, rows, columnGap, rowGap, options) { @@ -432,7 +432,7 @@ var Factory = new Class({ * @param {number} rowGap - The distance between each row. * @param {function} callback - The callback that creates the stack. * - * @return {MatterJS.Composite} A new composite containing objects created in the callback. + * @return {MatterJS.CompositeType} A new composite containing objects created in the callback. */ stack: function (x, y, columns, rows, columnGap, rowGap, callback) { @@ -458,7 +458,7 @@ var Factory = new Class({ * @param {number} rowGap - The distance between each row. * @param {function} callback - The callback function to be invoked. * - * @return {MatterJS.Composite} A Matter JS Composite pyramid. + * @return {MatterJS.CompositeType} A Matter JS Composite pyramid. */ pyramid: function (x, y, columns, rows, columnGap, rowGap, callback) { @@ -475,14 +475,14 @@ var Factory = new Class({ * @method Phaser.Physics.Matter.Factory#chain * @since 3.0.0 * - * @param {MatterJS.Composite} composite - The composite in which all bodies will be chained together sequentially. + * @param {MatterJS.CompositeType} composite - The composite in which all bodies will be chained together sequentially. * @param {number} xOffsetA - The horizontal offset of the BodyA constraint. This is a percentage based on the body size, not a world position. * @param {number} yOffsetA - The vertical offset of the BodyA constraint. This is a percentage based on the body size, not a world position. * @param {number} xOffsetB - The horizontal offset of the BodyB constraint. This is a percentage based on the body size, not a world position. * @param {number} yOffsetB - The vertical offset of the BodyB constraint. This is a percentage based on the body size, not a world position. * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * - * @return {MatterJS.Composite} The original composite that was passed to this method. + * @return {MatterJS.CompositeType} The original composite that was passed to this method. */ chain: function (composite, xOffsetA, yOffsetA, xOffsetB, yOffsetB, options) { @@ -495,13 +495,13 @@ var Factory = new Class({ * @method Phaser.Physics.Matter.Factory#mesh * @since 3.0.0 * - * @param {MatterJS.Composite} composite - The composite in which all bodies will be chained together. + * @param {MatterJS.CompositeType} composite - The composite in which all bodies will be chained together. * @param {number} columns - The number of columns in the mesh. * @param {number} rows - The number of rows in the mesh. * @param {boolean} crossBrace - Create cross braces for the mesh as well? * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * - * @return {MatterJS.Composite} The original composite that was passed to this method. + * @return {MatterJS.CompositeType} The original composite that was passed to this method. */ mesh: function (composite, columns, rows, crossBrace, options) { @@ -520,7 +520,7 @@ var Factory = new Class({ * @param {number} size - The radius of each ball in the cradle. * @param {number} length - The length of the 'string' the balls hang from. * - * @return {MatterJS.Composite} A Newton's cradle composite. + * @return {MatterJS.CompositeType} A Newton's cradle composite. */ newtonsCradle: function (x, y, number, size, length) { @@ -543,7 +543,7 @@ var Factory = new Class({ * @param {number} height - The height of the car chasis. * @param {number} wheelSize - The radius of the car wheels. * - * @return {MatterJS.Composite} A new composite car body. + * @return {MatterJS.CompositeType} A new composite car body. */ car: function (x, y, width, height, wheelSize) { @@ -571,7 +571,7 @@ var Factory = new Class({ * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [particleOptions] - An optional Body configuration object that is used to set initial Body properties on creation. * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [constraintOptions] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * - * @return {MatterJS.Composite} A new composite simple soft body. + * @return {MatterJS.CompositeType} A new composite simple soft body. */ softBody: function (x, y, columns, rows, columnGap, rowGap, crossBrace, particleRadius, particleOptions, constraintOptions) { @@ -601,13 +601,13 @@ var Factory = new Class({ * @method Phaser.Physics.Matter.Factory#joint * @since 3.0.0 * - * @param {MatterJS.Body} bodyA - The first possible `Body` that this constraint is attached to. - * @param {MatterJS.Body} bodyB - The second possible `Body` that this constraint is attached to. + * @param {MatterJS.BodyType} bodyA - The first possible `Body` that this constraint is attached to. + * @param {MatterJS.BodyType} bodyB - The second possible `Body` that this constraint is attached to. * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * - * @return {MatterJS.Constraint} A Matter JS Constraint. + * @return {MatterJS.ConstraintType} A Matter JS Constraint. */ joint: function (bodyA, bodyB, length, stiffness, options) { @@ -633,13 +633,13 @@ var Factory = new Class({ * @method Phaser.Physics.Matter.Factory#spring * @since 3.0.0 * - * @param {MatterJS.Body} bodyA - The first possible `Body` that this constraint is attached to. - * @param {MatterJS.Body} bodyB - The second possible `Body` that this constraint is attached to. + * @param {MatterJS.BodyType} bodyA - The first possible `Body` that this constraint is attached to. + * @param {MatterJS.BodyType} bodyB - The second possible `Body` that this constraint is attached to. * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * - * @return {MatterJS.Constraint} A Matter JS Constraint. + * @return {MatterJS.ConstraintType} A Matter JS Constraint. */ spring: function (bodyA, bodyB, length, stiffness, options) { @@ -663,13 +663,13 @@ var Factory = new Class({ * @method Phaser.Physics.Matter.Factory#constraint * @since 3.0.0 * - * @param {MatterJS.Body} bodyA - The first possible `Body` that this constraint is attached to. - * @param {MatterJS.Body} bodyB - The second possible `Body` that this constraint is attached to. + * @param {MatterJS.BodyType} bodyA - The first possible `Body` that this constraint is attached to. + * @param {MatterJS.BodyType} bodyB - The second possible `Body` that this constraint is attached to. * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * - * @return {MatterJS.Constraint} A Matter JS Constraint. + * @return {MatterJS.ConstraintType} A Matter JS Constraint. */ constraint: function (bodyA, bodyB, length, stiffness, options) { @@ -713,12 +713,12 @@ var Factory = new Class({ * @method Phaser.Physics.Matter.Factory#worldConstraint * @since 3.0.0 * - * @param {MatterJS.Body} body - The Matter `Body` that this constraint is attached to. + * @param {MatterJS.BodyType} body - The Matter `Body` that this constraint is attached to. * @param {number} [length] - A number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * - * @return {MatterJS.Constraint} A Matter JS Constraint. + * @return {MatterJS.ConstraintType} A Matter JS Constraint. */ worldConstraint: function (body, length, stiffness, options) { @@ -758,7 +758,7 @@ var Factory = new Class({ * * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * - * @return {MatterJS.Constraint} A Matter JS Constraint. + * @return {MatterJS.ConstraintType} A Matter JS Constraint. */ mouseSpring: function (options) { @@ -780,7 +780,7 @@ var Factory = new Class({ * * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * - * @return {MatterJS.Constraint} A Matter JS Constraint. + * @return {MatterJS.ConstraintType} A Matter JS Constraint. */ pointerConstraint: function (options) { diff --git a/src/physics/matter-js/MatterPhysics.js b/src/physics/matter-js/MatterPhysics.js index 8197a8b47..0484503f0 100644 --- a/src/physics/matter-js/MatterPhysics.js +++ b/src/physics/matter-js/MatterPhysics.js @@ -1044,7 +1044,7 @@ var MatterPhysics = new Class({ * * @param {array} [bodies] - An array of objects to extract the bodies from. If falsey, it will return all bodies in the world. * - * @return {MatterJS.Body[]} An array of native Matter Body objects. + * @return {MatterJS.BodyType[]} An array of native Matter Body objects. */ getMatterBodies: function (bodies) { @@ -1290,7 +1290,7 @@ var MatterPhysics = new Class({ * @method Phaser.Physics.Matter.MatterPhysics#getConstraintLength * @since 3.22.0 * - * @param {MatterJS.Constraint} constraint - The constraint to get the length from. + * @param {MatterJS.ConstraintType} constraint - The constraint to get the length from. * * @return {number} The length of the constraint. */ diff --git a/src/physics/matter-js/MatterTileBody.js b/src/physics/matter-js/MatterTileBody.js index 2debe357a..ad54e6408 100644 --- a/src/physics/matter-js/MatterTileBody.js +++ b/src/physics/matter-js/MatterTileBody.js @@ -243,7 +243,7 @@ var MatterTileBody = new Class({ * @method Phaser.Physics.Matter.TileBody#setBody * @since 3.0.0 * - * @param {MatterJS.Body} body - The new Matter body to use. + * @param {MatterJS.BodyType} body - The new Matter body to use. * @param {boolean} [addToWorld=true] - Whether or not to add the body to the Matter world. * * @return {Phaser.Physics.Matter.TileBody} This TileBody object. diff --git a/src/physics/matter-js/PhysicsEditorParser.js b/src/physics/matter-js/PhysicsEditorParser.js index 390bc9a5e..2d3e79070 100644 --- a/src/physics/matter-js/PhysicsEditorParser.js +++ b/src/physics/matter-js/PhysicsEditorParser.js @@ -32,7 +32,7 @@ var PhysicsEditorParser = { * @param {object} config - The body configuration and fixture (child body) definitions, as exported by PhysicsEditor. * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * - * @return {MatterJS.Body} A compound Matter JS Body. + * @return {MatterJS.BodyType} A compound Matter JS Body. */ parseBody: function (x, y, config, options) { @@ -75,7 +75,7 @@ var PhysicsEditorParser = { * * @param {object} fixtureConfig - The fixture object to parse. * - * @return {MatterJS.Body[]} - An array of Matter JS Bodies. + * @return {MatterJS.BodyType[]} - An array of Matter JS Bodies. */ parseFixture: function (fixtureConfig) { @@ -110,7 +110,7 @@ var PhysicsEditorParser = { * @param {array} vertexSets - The vertex lists to parse. * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * - * @return {MatterJS.Body[]} - An array of Matter JS Bodies. + * @return {MatterJS.BodyType[]} - An array of Matter JS Bodies. */ parseVertices: function (vertexSets, options) { diff --git a/src/physics/matter-js/PhysicsJSONParser.js b/src/physics/matter-js/PhysicsJSONParser.js index 473764542..8687c4ec6 100644 --- a/src/physics/matter-js/PhysicsJSONParser.js +++ b/src/physics/matter-js/PhysicsJSONParser.js @@ -61,7 +61,7 @@ var PhysicsJSONParser = { * @param {object} config - The body configuration data. * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * - * @return {MatterJS.Body} A Matter JS Body. + * @return {MatterJS.BodyType} A Matter JS Body. */ parseBody: function (x, y, config, options) { diff --git a/src/physics/matter-js/PointerConstraint.js b/src/physics/matter-js/PointerConstraint.js index 9fb3ca7a1..dd4443eea 100644 --- a/src/physics/matter-js/PointerConstraint.js +++ b/src/physics/matter-js/PointerConstraint.js @@ -125,7 +125,7 @@ var PointerConstraint = new Class({ * The body that is currently being dragged, if any. * * @name Phaser.Physics.Matter.PointerConstraint#body - * @type {?MatterJS.Body} + * @type {?MatterJS.BodyType} * @since 3.16.2 */ this.body = null; @@ -134,7 +134,7 @@ var PointerConstraint = new Class({ * The part of the body that was clicked on to start the drag. * * @name Phaser.Physics.Matter.PointerConstraint#part - * @type {?MatterJS.Body} + * @type {?MatterJS.BodyType} * @since 3.16.2 */ this.part = null; @@ -143,7 +143,7 @@ var PointerConstraint = new Class({ * The native Matter Constraint that is used to attach to bodies. * * @name Phaser.Physics.Matter.PointerConstraint#constraint - * @type {MatterJS.Constraint} + * @type {MatterJS.ConstraintType} * @since 3.0.0 */ this.constraint = Constraint.create(Merge(options, defaults)); @@ -239,7 +239,7 @@ var PointerConstraint = new Class({ * @method Phaser.Physics.Matter.PointerConstraint#hitTestBody * @since 3.16.2 * - * @param {MatterJS.Body} body - The Matter Body to check. + * @param {MatterJS.BodyType} body - The Matter Body to check. * @param {Phaser.Math.Vector2} position - A translated hit test position. * * @return {boolean} `true` if a part of the body was hit, otherwise `false`. diff --git a/src/physics/matter-js/World.js b/src/physics/matter-js/World.js index 853bfa631..5616b42de 100644 --- a/src/physics/matter-js/World.js +++ b/src/physics/matter-js/World.js @@ -354,7 +354,7 @@ var World = new Class({ * @method Phaser.Physics.Matter.World#setCompositeRenderStyle * @since 3.22.0 * - * @param {MatterJS.Composite} composite - The Matter Composite to set the render style on. + * @param {MatterJS.CompositeType} composite - The Matter Composite to set the render style on. * * @return {this} This Matter World instance for method chaining. */ @@ -408,7 +408,7 @@ var World = new Class({ * @method Phaser.Physics.Matter.World#setBodyRenderStyle * @since 3.22.0 * - * @param {MatterJS.Body} body - The Matter Body to set the render style on. + * @param {MatterJS.BodyType} body - The Matter Body to set the render style on. * @param {number} [lineColor] - The line color. If `null` it will use the World Debug Config value. * @param {number} [lineOpacity] - The line opacity, between 0 and 1. If `null` it will use the World Debug Config value. * @param {number} [lineThickness] - The line thickness. If `null` it will use the World Debug Config value. @@ -494,7 +494,7 @@ var World = new Class({ * @method Phaser.Physics.Matter.World#setConstraintRenderStyle * @since 3.22.0 * - * @param {MatterJS.Constraint} constraint - The Matter Constraint to set the render style on. + * @param {MatterJS.ConstraintType} constraint - The Matter Constraint to set the render style on. * @param {number} [lineColor] - The line color. If `null` it will use the World Debug Config value. * @param {number} [lineOpacity] - The line opacity, between 0 and 1. If `null` it will use the World Debug Config value. * @param {number} [lineThickness] - The line thickness. If `null` it will use the World Debug Config value. @@ -886,7 +886,7 @@ var World = new Class({ * @param {number} height - The height of the body. * @param {object} options - Optional Matter configuration object. * - * @return {MatterJS.Body} The Matter.js body that was created. + * @return {MatterJS.BodyType} The Matter.js body that was created. */ create: function (x, y, width, height, options) { @@ -960,7 +960,7 @@ var World = new Class({ * @method Phaser.Physics.Matter.World#removeConstraint * @since 3.0.0 * - * @param {(MatterJS.Constraint|MatterJS.Constraint[])} constraint - A Matter JS Constraint, or an array of constraints, to be removed. + * @param {(MatterJS.ConstraintType|MatterJS.ConstraintType[])} constraint - A Matter JS Constraint, or an array of constraints, to be removed. * @param {boolean} [deep=false] - Optionally search the objects children and recursively remove those as well. * * @return {this} This Matter World object. @@ -1244,7 +1244,7 @@ var World = new Class({ * * @param {(MatterJS.Body|Phaser.GameObjects.GameObject)} body - The Matter Body, or Game Object, to search for within the world. * - * @return {MatterJS.Body[]} An array of all the Matter JS Bodies in this World. + * @return {MatterJS.BodyType[]} An array of all the Matter JS Bodies in this World. */ has: function (body) { @@ -1259,7 +1259,7 @@ var World = new Class({ * @method Phaser.Physics.Matter.World#getAllBodies * @since 3.22.0 * - * @return {MatterJS.Body[]} An array of all the Matter JS Bodies in this World. + * @return {MatterJS.BodyType[]} An array of all the Matter JS Bodies in this World. */ getAllBodies: function () { @@ -1272,7 +1272,7 @@ var World = new Class({ * @method Phaser.Physics.Matter.World#getAllConstraints * @since 3.22.0 * - * @return {MatterJS.Constraint[]} An array of all the Matter JS Constraints in this World. + * @return {MatterJS.ConstraintType[]} An array of all the Matter JS Constraints in this World. */ getAllConstraints: function () { @@ -1285,7 +1285,7 @@ var World = new Class({ * @method Phaser.Physics.Matter.World#getAllComposites * @since 3.22.0 * - * @return {MatterJS.Composite[]} An array of all the Matter JS Composites in this World. + * @return {MatterJS.CompositeType[]} An array of all the Matter JS Composites in this World. */ getAllComposites: function () { @@ -1851,7 +1851,7 @@ var World = new Class({ * @method Phaser.Physics.Matter.World#renderBody * @since 3.22.0 * - * @param {MatterJS.Body} body - The Matter Body to be rendered. + * @param {MatterJS.BodyType} body - The Matter Body to be rendered. * @param {Phaser.GameObjects.Graphics} graphics - The Graphics object to render to. * @param {boolean} showInternalEdges - Render internal edges of the polygon? * @param {number} [lineColor] - The line color. @@ -1988,7 +1988,7 @@ var World = new Class({ * @method Phaser.Physics.Matter.World#renderConvexHull * @since 3.22.0 * - * @param {MatterJS.Body} body - The Matter Body to be rendered. + * @param {MatterJS.BodyType} body - The Matter Body to be rendered. * @param {Phaser.GameObjects.Graphics} graphics - The Graphics object to render to. * @param {number} hullColor - The color used to render the hull. * @param {number} [lineThickness=1] - The hull line thickness. @@ -2066,7 +2066,7 @@ var World = new Class({ * @method Phaser.Physics.Matter.World#renderConstraint * @since 3.22.0 * - * @param {MatterJS.Constraint} constraint - The Matter Constraint to render. + * @param {MatterJS.ConstraintType} constraint - The Matter Constraint to render. * @param {Phaser.GameObjects.Graphics} graphics - The Graphics object to render to. * @param {number} lineColor - The line color. * @param {number} lineOpacity - The line opacity, between 0 and 1. diff --git a/src/physics/matter-js/components/SetBody.js b/src/physics/matter-js/components/SetBody.js index e2a2b6ed9..b7528873e 100644 --- a/src/physics/matter-js/components/SetBody.js +++ b/src/physics/matter-js/components/SetBody.js @@ -108,7 +108,7 @@ var SetBody = { * @method Phaser.Physics.Matter.Components.SetBody#setExistingBody * @since 3.0.0 * - * @param {MatterJS.Body} body - The Body this Game Object should use. + * @param {MatterJS.BodyType} body - The Body this Game Object should use. * @param {boolean} [addToWorld=true] - Should the body be immediately added to the World? * * @return {Phaser.GameObjects.GameObject} This Game Object. diff --git a/src/physics/matter-js/events/COLLISION_ACTIVE_EVENT.js b/src/physics/matter-js/events/COLLISION_ACTIVE_EVENT.js index 72b920ca3..8cbaebac8 100644 --- a/src/physics/matter-js/events/COLLISION_ACTIVE_EVENT.js +++ b/src/physics/matter-js/events/COLLISION_ACTIVE_EVENT.js @@ -25,7 +25,7 @@ * @since 3.0.0 * * @param {Phaser.Physics.Matter.Events.CollisionActiveEvent} event - The Collision Event object. - * @param {MatterJS.Body} bodyA - The first body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. - * @param {MatterJS.Body} bodyB - The second body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. + * @param {MatterJS.BodyType} bodyA - The first body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. + * @param {MatterJS.BodyType} bodyB - The second body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. */ module.exports = 'collisionactive'; diff --git a/src/physics/matter-js/events/COLLISION_END_EVENT.js b/src/physics/matter-js/events/COLLISION_END_EVENT.js index 7face7a9f..1052ce99f 100644 --- a/src/physics/matter-js/events/COLLISION_END_EVENT.js +++ b/src/physics/matter-js/events/COLLISION_END_EVENT.js @@ -25,7 +25,7 @@ * @since 3.0.0 * * @param {Phaser.Physics.Matter.Events.CollisionEndEvent} event - The Collision Event object. - * @param {MatterJS.Body} bodyA - The first body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. - * @param {MatterJS.Body} bodyB - The second body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. + * @param {MatterJS.BodyType} bodyA - The first body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. + * @param {MatterJS.BodyType} bodyB - The second body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. */ module.exports = 'collisionend'; diff --git a/src/physics/matter-js/events/COLLISION_START_EVENT.js b/src/physics/matter-js/events/COLLISION_START_EVENT.js index 6d9d7720b..8a863b6a2 100644 --- a/src/physics/matter-js/events/COLLISION_START_EVENT.js +++ b/src/physics/matter-js/events/COLLISION_START_EVENT.js @@ -25,7 +25,7 @@ * @since 3.0.0 * * @param {Phaser.Physics.Matter.Events.CollisionStartEvent} event - The Collision Event object. - * @param {MatterJS.Body} bodyA - The first body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. - * @param {MatterJS.Body} bodyB - The second body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. + * @param {MatterJS.BodyType} bodyA - The first body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. + * @param {MatterJS.BodyType} bodyB - The second body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. */ module.exports = 'collisionstart'; diff --git a/src/physics/matter-js/events/DRAG_END_EVENT.js b/src/physics/matter-js/events/DRAG_END_EVENT.js index af044d287..60d7801a9 100644 --- a/src/physics/matter-js/events/DRAG_END_EVENT.js +++ b/src/physics/matter-js/events/DRAG_END_EVENT.js @@ -15,7 +15,7 @@ * @event Phaser.Physics.Matter.Events#DRAG_END * @since 3.16.2 * - * @param {MatterJS.Body} body - The Body that has stopped being dragged. This is a Matter Body, not a Phaser Game Object. + * @param {MatterJS.BodyType} body - The Body that has stopped being dragged. This is a Matter Body, not a Phaser Game Object. * @param {Phaser.Physics.Matter.PointerConstraint} constraint - The Pointer Constraint that was dragging the body. */ module.exports = 'dragend'; diff --git a/src/physics/matter-js/events/DRAG_EVENT.js b/src/physics/matter-js/events/DRAG_EVENT.js index 8da56ab06..05e412d17 100644 --- a/src/physics/matter-js/events/DRAG_EVENT.js +++ b/src/physics/matter-js/events/DRAG_EVENT.js @@ -15,7 +15,7 @@ * @event Phaser.Physics.Matter.Events#DRAG * @since 3.16.2 * - * @param {MatterJS.Body} body - The Body that is being dragged. This is a Matter Body, not a Phaser Game Object. + * @param {MatterJS.BodyType} body - The Body that is being dragged. This is a Matter Body, not a Phaser Game Object. * @param {Phaser.Physics.Matter.PointerConstraint} constraint - The Pointer Constraint that is dragging the body. */ module.exports = 'drag'; diff --git a/src/physics/matter-js/events/DRAG_START_EVENT.js b/src/physics/matter-js/events/DRAG_START_EVENT.js index 0264a4649..bef16d85d 100644 --- a/src/physics/matter-js/events/DRAG_START_EVENT.js +++ b/src/physics/matter-js/events/DRAG_START_EVENT.js @@ -15,8 +15,8 @@ * @event Phaser.Physics.Matter.Events#DRAG_START * @since 3.16.2 * - * @param {MatterJS.Body} body - The Body that has started being dragged. This is a Matter Body, not a Phaser Game Object. - * @param {MatterJS.Body} part - The part of the body that was clicked on. + * @param {MatterJS.BodyType} body - The Body that has started being dragged. This is a Matter Body, not a Phaser Game Object. + * @param {MatterJS.BodyType} part - The part of the body that was clicked on. * @param {Phaser.Physics.Matter.PointerConstraint} constraint - The Pointer Constraint that is dragging the body. */ module.exports = 'dragstart'; diff --git a/src/physics/matter-js/events/SLEEP_END_EVENT.js b/src/physics/matter-js/events/SLEEP_END_EVENT.js index 59895e187..5d42180a5 100644 --- a/src/physics/matter-js/events/SLEEP_END_EVENT.js +++ b/src/physics/matter-js/events/SLEEP_END_EVENT.js @@ -22,6 +22,6 @@ * @since 3.0.0 * * @param {Phaser.Physics.Matter.Events.SleepEndEvent} event - The Sleep Event object. - * @param {MatterJS.Body} body - The body that has stopped sleeping. + * @param {MatterJS.BodyType} body - The body that has stopped sleeping. */ module.exports = 'sleepend'; diff --git a/src/physics/matter-js/events/SLEEP_START_EVENT.js b/src/physics/matter-js/events/SLEEP_START_EVENT.js index e11f99028..d702d50a9 100644 --- a/src/physics/matter-js/events/SLEEP_START_EVENT.js +++ b/src/physics/matter-js/events/SLEEP_START_EVENT.js @@ -22,6 +22,6 @@ * @since 3.0.0 * * @param {Phaser.Physics.Matter.Events.SleepStartEvent} event - The Sleep Event object. - * @param {MatterJS.Body} body - The body that has gone to sleep. + * @param {MatterJS.BodyType} body - The body that has gone to sleep. */ module.exports = 'sleepstart'; diff --git a/src/physics/matter-js/lib/body/Body.js b/src/physics/matter-js/lib/body/Body.js index 1988a458e..1b84a99ba 100644 --- a/src/physics/matter-js/lib/body/Body.js +++ b/src/physics/matter-js/lib/body/Body.js @@ -83,6 +83,7 @@ var Axes = require('../geometry/Axes'); mass: 0, inverseMass: 0, inertia: 0, + inverseInertia: 0, _original: null, render: { visible: true, @@ -1234,7 +1235,7 @@ var Axes = require('../geometry/Axes'); */ /** - * A value that defines the fill opqcity to use when rendering the body. + * A value that defines the fill opacity to use when rendering the body. * * @property render.fillOpacity * @type number @@ -1248,7 +1249,7 @@ var Axes = require('../geometry/Axes'); */ /** - * A value that defines the line opqcity to use when rendering the body. + * A value that defines the line opacity to use when rendering the body. * * @property render.lineOpacity * @type number diff --git a/src/physics/matter-js/typedefs/MatterBody.js b/src/physics/matter-js/typedefs/MatterBody.js index 58a6af601..2ae5dbc3a 100644 --- a/src/physics/matter-js/typedefs/MatterBody.js +++ b/src/physics/matter-js/typedefs/MatterBody.js @@ -1,4 +1,4 @@ /** - * @typedef {(MatterJS.Body|Phaser.GameObjects.GameObject|Phaser.Physics.Matter.Image|Phaser.Physics.Matter.Sprite|Phaser.Physics.Matter.TileBody)} Phaser.Types.Physics.Matter.MatterBody + * @typedef {(MatterJS.BodyType|Phaser.GameObjects.GameObject|Phaser.Physics.Matter.Image|Phaser.Physics.Matter.Sprite|Phaser.Physics.Matter.TileBody)} Phaser.Types.Physics.Matter.MatterBody * @since 3.22.0 */ diff --git a/src/physics/matter-js/typedefs/MatterBodyConfig.js b/src/physics/matter-js/typedefs/MatterBodyConfig.js index c8af45cf8..a9f328730 100644 --- a/src/physics/matter-js/typedefs/MatterBodyConfig.js +++ b/src/physics/matter-js/typedefs/MatterBodyConfig.js @@ -3,7 +3,7 @@ * @since 3.22.0 * * @property {string} [label='Body'] - An arbitrary string-based name to help identify this body. - * @property {MatterJS.Body[]} [parts] - An array of bodies that make up this body. The first body in the array must always be a self reference to the current body instance. All bodies in the `parts` array together form a single rigid compound body. + * @property {MatterJS.BodyType[]} [parts] - An array of bodies that make up this body. The first body in the array must always be a self reference to the current body instance. All bodies in the `parts` array together form a single rigid compound body. * @property {any} [plugin] - An object reserved for storing plugin-specific properties. * @property {number} [angle=0] - A number specifying the angle of the body, in radians. * @property {Phaser.Types.Math.Vector2Like[]} [vertices=null] - An array of `Vector` objects that specify the convex hull of the rigid body. These should be provided about the origin `(0, 0)`. diff --git a/src/physics/matter-js/typedefs/MatterCollisionData.js b/src/physics/matter-js/typedefs/MatterCollisionData.js index 88d5ea880..96e6d38f4 100644 --- a/src/physics/matter-js/typedefs/MatterCollisionData.js +++ b/src/physics/matter-js/typedefs/MatterCollisionData.js @@ -3,13 +3,13 @@ * @since 3.22.0 * * @property {boolean} collided - Have the pair collided or not? - * @property {MatterJS.Body} bodyA - A reference to the first body involved in the collision. - * @property {MatterJS.Body} bodyB - A reference to the second body involved in the collision. - * @property {MatterJS.Body} axisBody - A reference to the dominant axis body. + * @property {MatterJS.BodyType} bodyA - A reference to the first body involved in the collision. + * @property {MatterJS.BodyType} bodyB - A reference to the second body involved in the collision. + * @property {MatterJS.BodyType} axisBody - A reference to the dominant axis body. * @property {number} axisNumber - The index of the dominant collision axis vector (edge normal) * @property {number} depth - The depth of the collision on the minimum overlap. - * @property {MatterJS.Body} parentA - A reference to the parent of Body A, or to Body A itself if it has no parent. - * @property {MatterJS.Body} parentB - A reference to the parent of Body B, or to Body B itself if it has no parent. + * @property {MatterJS.BodyType} parentA - A reference to the parent of Body A, or to Body A itself if it has no parent. + * @property {MatterJS.BodyType} parentB - A reference to the parent of Body B, or to Body B itself if it has no parent. * @property {MatterJS.Vector} normal - The collision normal, facing away from Body A. * @property {MatterJS.Vector} tangent - The tangent of the collision normal. * @property {MatterJS.Vector} penetration - The penetration distances between the two bodies. diff --git a/src/physics/matter-js/typedefs/MatterCollisionPair.js b/src/physics/matter-js/typedefs/MatterCollisionPair.js index 9a97e4593..7b46e7555 100644 --- a/src/physics/matter-js/typedefs/MatterCollisionPair.js +++ b/src/physics/matter-js/typedefs/MatterCollisionPair.js @@ -3,8 +3,8 @@ * @since 3.22.0 * * @property {string} id - The unique auto-generated collision pair id. A combination of the body A and B IDs. - * @property {MatterJS.Body} bodyA - A reference to the first body involved in the collision. - * @property {MatterJS.Body} bodyB - A reference to the second body involved in the collision. + * @property {MatterJS.BodyType} bodyA - A reference to the first body involved in the collision. + * @property {MatterJS.BodyType} bodyB - A reference to the second body involved in the collision. * @property {MatterJS.Vector[]} activeContacts - An array containing all of the active contacts between bodies A and B. * @property {number} separation - The amount of separation that occured between bodies A and B. * @property {boolean} isActive - Is the collision still active or not? diff --git a/src/physics/matter-js/typedefs/MatterConstraintConfig.js b/src/physics/matter-js/typedefs/MatterConstraintConfig.js index 96fdb4e46..9345dae08 100644 --- a/src/physics/matter-js/typedefs/MatterConstraintConfig.js +++ b/src/physics/matter-js/typedefs/MatterConstraintConfig.js @@ -3,8 +3,8 @@ * @since 3.22.0 * * @property {string} [label='Constraint'] - An arbitrary string-based name to help identify this constraint. - * @property {MatterJS.Body} [bodyA] - The first possible `Body` that this constraint is attached to. - * @property {MatterJS.Body} [bodyB] - The second possible `Body` that this constraint is attached to. + * @property {MatterJS.BodyType} [bodyA] - The first possible `Body` that this constraint is attached to. + * @property {MatterJS.BodyType} [bodyB] - The second possible `Body` that this constraint is attached to. * @property {Phaser.Types.Math.Vector2Like} [pointA] - A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyA` if defined, otherwise a world-space position. * @property {Phaser.Types.Math.Vector2Like} [pointB] - A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyB` if defined, otherwise a world-space position. * @property {number} [stiffness=1] - A `Number` that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts like a soft spring. diff --git a/src/physics/matter-js/typedefs/MatterTileOptions.js b/src/physics/matter-js/typedefs/MatterTileOptions.js index 67a83fa2d..9dbe7838a 100644 --- a/src/physics/matter-js/typedefs/MatterTileOptions.js +++ b/src/physics/matter-js/typedefs/MatterTileOptions.js @@ -2,7 +2,7 @@ * @typedef {object} Phaser.Types.Physics.Matter.MatterTileOptions * @since 3.0.0 * - * @property {MatterJS.Body} [body=null] - An existing Matter body to be used instead of creating a new one. + * @property {MatterJS.BodyType} [body=null] - An existing Matter body to be used instead of creating a new one. * @property {boolean} [isStatic=true] - Whether or not the newly created body should be made static. This defaults to true since typically tiles should not be moved. * @property {boolean} [addToWorld=true] - Whether or not to add the newly created body (or existing body if options.body is used) to the Matter world. */ diff --git a/types/matter.d.ts b/types/matter.d.ts index b30cdaaa2..5c30dea7e 100644 --- a/types/matter.d.ts +++ b/types/matter.d.ts @@ -135,14 +135,6 @@ declare namespace MatterJS { * @default 0.01 */ frictionAir?: number; - - /** - * An integer `Number` uniquely identifying number generated in `Body.create` by `Common.nextId`. - * - * @property id - * @type number - */ - id?: number; /** * A `Number` that defines the moment of inertia (i.e. second moment of area) of the body. @@ -356,7 +348,7 @@ declare namespace MatterJS { * @property parts * @type body[] */ - parts?: Array; + parts?: Array; /** * A self reference if the body is _not_ a part of another body. @@ -366,7 +358,7 @@ declare namespace MatterJS { * @property parent * @type body */ - parent?: Body; + parent?: BodyType; /** * A `Number` that defines the static friction of the body (in the Coulomb friction model). @@ -407,16 +399,81 @@ declare namespace MatterJS { */ collisionFilter?: ICollisionFilter; + /** + * A reference to the Phaser Game Object this body belongs to, if any. + * + * @property gameObject + * @type Phaser.GameObjects.GameObject + */ gameObject?: any; - scale?: Vector; - centerOfMass?: Vector; - centerOffset?: Vector; + + /** + * Scale the influence of World gravity when applied to this body. + * + * @property gravityScale + * @type vector + * @default { x: 1, y: 1 } + */ gravityScale?: Vector; + + /** + * Will this Body ignore World gravity during the Engine update? + * + * @property ignoreGravity + * @type boolean + * @default false + */ ignoreGravity?: boolean; + + /** + * Will this Body ignore Phaser Pointer input events? + * + * @property ignorePointer + * @type boolean + * @default false + */ ignorePointer?: boolean; + + /** + * A callback that is invoked when this Body starts colliding with any other Body. + * + * You can register callbacks by providing a function of type `( pair: Matter.Pair) => void`. + * + * @property onCollideCallback + * @type function + * @default null + */ onCollideCallback?: Function; + + /** + * A callback that is invoked when this Body stops colliding with any other Body. + * + * You can register callbacks by providing a function of type `( pair: Matter.Pair) => void`. + * + * @property onCollideEndCallback + * @type function + * @default null + */ onCollideEndCallback?: Function; + + /** + * A callback that is invoked for the duration that this Body is colliding with any other Body. + * + * You can register callbacks by providing a function of type `( pair: Matter.Pair) => void`. + * + * @property onCollideActiveCallback + * @type function + * @default null + */ onCollideActiveCallback?: Function; + + /** + * A collision callback dictionary used by the `Body.setOnCollideWith` function. + * + * @property onCollideWith + * @type object + * @default null + */ onCollideWith?: any; } @@ -426,29 +483,67 @@ declare namespace MatterJS { /** * A flag that indicates if the body should be rendered. * - * @property render.visible + * @property visible * @type boolean * @default true */ - visible: boolean; + visible?: boolean; - /* - * Sets the opacity. 1.0 is fully opaque. 0.0 is fully translucent + /** + * Sets the opacity. 1.0 is fully opaque. 0.0 is fully translucent. + * + * @property opacity + * @type number + * @default 1 */ - opacity: number; + opacity?: number; /** * An `Object` that defines the sprite properties to use when rendering, if any. * - * @property render.sprite + * @property sprite * @type object */ sprite?: IBodyRenderOptionsSprite; + /** + * A hex color value that defines the fill color to use when rendering the body. + * + * @property fillColor + * @type number + */ fillColor?: number; + + /** + * A value that defines the fill opacity to use when rendering the body. + * + * @property fillOpacity + * @type number + */ fillOpacity?: number; + + /** + * A hex color value that defines the line color to use when rendering the body. + * + * @property lineColor + * @type number + */ lineColor?: number; + + /** + * A value that defines the line opacity to use when rendering the body. + * + * @property lineOpacity + * @type number + */ lineOpacity?: number; + + /** + * A `Number` that defines the line width to use when rendering the body outline. + * + * @property lineThickness + * @type number + */ lineThickness?: number; } @@ -458,7 +553,7 @@ declare namespace MatterJS { /** * A `Number` that defines the scaling in the x-axis for the sprite, if any. * - * @property render.sprite.xOffset + * @property xOffset * @type number * @default 0 */ @@ -467,7 +562,7 @@ declare namespace MatterJS { /** * A `Number` that defines the scaling in the y-axis for the sprite, if any. * - * @property render.sprite.yOffset + * @property yOffset * @type number * @default 0 */ @@ -492,7 +587,7 @@ declare namespace MatterJS { * @type body[] * @default [] */ - bodies?: Array; + bodies?: Array; /** * An array of `Composite` that are _direct_ children of this composite. @@ -503,7 +598,7 @@ declare namespace MatterJS { * @type composite[] * @default [] */ - composites?: Array; + composites?: Array; /** * An array of `Constraint` that are _direct_ children of this composite. @@ -514,7 +609,7 @@ declare namespace MatterJS { * @type constraint[] * @default [] */ - constraints?: Array; + constraints?: Array; /** * An integer `Number` uniquely identifying number generated in `Composite.create` by `Common.nextId`. @@ -551,7 +646,7 @@ declare namespace MatterJS { * @type composite * @default null */ - parent?: Composite; + parent?: CompositeType; /** * A `String` denoting the type of object. @@ -560,7 +655,8 @@ declare namespace MatterJS { * @type string * @default "composite" */ - type?: String; + type?: string; + } interface IConstraintDefinition { @@ -672,34 +768,81 @@ declare namespace MatterJS { interface IConstraintRenderDefinition { - /** - * A `Number` that defines the line width to use when rendering the constraint outline. - * A value of `0` means no outline will be rendered. - * - * @property render.lineWidth - * @type number - * @default 2 - */ - lineWidth: number; - - /** - * A `String` that defines the stroke style to use when rendering the constraint outline. - * It is the same as when using a canvas, so it accepts CSS style property values. - * - * @property render.strokeStyle - * @type string - * @default a random colour - */ - strokeStyle: string; - /** * A flag that indicates if the constraint should be rendered. * - * @property render.visible + * @property visible * @type boolean * @default true */ - visible: boolean; + visible?: boolean; + + /** + * The type of constraint. + * + * @property type + * @type string + * @default 'line' + */ + type?: string; + + /** + * A flag that indicates if the constraint anchors should be rendered. + * + * @property anchors + * @type boolean + * @default true + */ + anchors?: boolean; + + /** + * A hex color value that defines the line color to use when rendering the body. + * + * @property lineColor + * @type number + */ + lineColor?: number; + + /** + * A value that defines the line opacity to use when rendering the body. + * + * @property lineOpacity + * @type number + */ + lineOpacity?: number; + + /** + * A `Number` that defines the line width to use when rendering the body outline. + * + * @property lineThickness + * @type number + */ + lineThickness?: number; + + /** + * The size of the pins during rendering. + * + * @property pinSize + * @type number + */ + pinSize?: number; + + /** + * A hex color value that defines the color to use when rendering the anchors. + * + * @property anchorColor + * @type number + */ + anchorColor?: number; + + /** + * The size of the anchors during rendering. + * + * @property anchorSize + * @type number + */ + anchorSize?: number; + } interface IEngineDefinition { @@ -807,7 +950,7 @@ declare namespace MatterJS { * @property constraint * @type constraint */ - constraint?: Constraint; + constraint?: ConstraintType; /** * An `Object` that specifies the collision filter properties. @@ -826,7 +969,7 @@ declare namespace MatterJS { * @type body * @default null */ - body?: IBodyDefinition; + body?: BodyType; /** * A `String` denoting the type of object. @@ -842,6 +985,7 @@ declare namespace MatterJS { interface IGridDefinition {} interface IPair { + id: number; bodyA: Body; bodyB: Body; @@ -856,9 +1000,11 @@ declare namespace MatterJS { frictionStatic: number; restitution: number; slop: number; + } interface ICollisionData { + collided: boolean; bodyA: Body; bodyB: Body; @@ -876,9 +1022,11 @@ declare namespace MatterJS { frictionStatic: number; restitution: number; slop: number; + } interface ICollisionPair { + id: string; bodyA: Body; bodyB: Body; @@ -895,6 +1043,7 @@ declare namespace MatterJS { frictionStatic: number; restitution: number; slop: number; + } interface ICollisionFilter { @@ -984,6 +1133,244 @@ declare namespace MatterJS { } + // -------------------------------------------------------------- + // Types + // -------------------------------------------------------------- + + type CompositeType = { + + /** + * An integer `Number` uniquely identifying number generated in `Composite.create` by `Common.nextId`. + * + * @property id + * @type number + */ + id: number; + + /** + * A `String` denoting the type of object. + * + * @property type + * @type string + * @default "composite" + */ + type: string; + + /** + * The `Composite` that is the parent of this composite. It is automatically managed by the `Matter.Composite` methods. + * + * @property parent + * @type composite + * @default null + */ + parent?: CompositeType; + + /** + * A flag that specifies whether the composite has been modified during the current step. + * Most `Matter.Composite` methods will automatically set this flag to `true` to inform the engine of changes to be handled. + * If you need to change it manually, you should use the `Composite.setModified` method. + * + * @property isModified + * @type boolean + * @default false + */ + isModified: boolean; + + /** + * An array of `Body` that are _direct_ children of this composite. + * To add or remove bodies you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property. + * If you wish to recursively find all descendants, you should use the `Composite.allBodies` method. + * + * @property bodies + * @type body[] + * @default [] + */ + bodies: Array; + + /** + * An array of `Constraint` that are _direct_ children of this composite. + * To add or remove constraints you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property. + * If you wish to recursively find all descendants, you should use the `Composite.allConstraints` method. + * + * @property constraints + * @type constraint[] + * @default [] + */ + constraints: Array; + + /** + * An array of `Composite` that are _direct_ children of this composite. + * To add or remove composites you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property. + * If you wish to recursively find all descendants, you should use the `Composite.allComposites` method. + * + * @property composites + * @type composite[] + * @default [] + */ + composites: Array; + + /** + * An arbitrary `String` name to help the user identify and manage composites. + * + * @property label + * @type string + * @default "Composite" + */ + label: string; + + /** + * An object reserved for storing plugin-specific properties. + * + * @property plugin + * @type {} + */ + plugin: any; + + } + + type ConstraintType = { + + /** + * The first possible `Body` that this constraint is attached to. + * + * @property bodyA + * @type body + * @default null + */ + bodyA?: BodyType; + + /** + * The second possible `Body` that this constraint is attached to. + * + * @property bodyB + * @type body + * @default null + */ + bodyB?: BodyType; + + /** + * A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyA` if defined, otherwise a world-space position. + * + * @property pointA + * @type vector + * @default { x: 0, y: 0 } + */ + pointA: Vector; + + /** + * A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyB` if defined, otherwise a world-space position. + * + * @property pointB + * @type vector + * @default { x: 0, y: 0 } + */ + pointA: Vector; + + /** + * A `Number` that specifies the target resting length of the constraint. + * It is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. + * + * @property length + * @type number + */ + length: number; + + /** + * An integer `Number` uniquely identifying number generated in `Composite.create` by `Common.nextId`. + * + * @property id + * @type number + */ + id: number; + + /** + * An arbitrary `String` name to help the user identify and manage bodies. + * + * @property label + * @type string + * @default "Constraint" + */ + label: string; + + /** + * A `String` denoting the type of object. + * + * @property type + * @type string + * @default "constraint" + * @readOnly + */ + type: string; + + /** + * A `Number` that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. + * A value of `1` means the constraint should be very stiff. + * A value of `0.2` means the constraint acts like a soft spring. + * + * @property stiffness + * @type number + * @default 1 + */ + stiffness: number; + + /** + * A `Number` that specifies the damping of the constraint, + * i.e. the amount of resistance applied to each body based on their velocities to limit the amount of oscillation. + * Damping will only be apparent when the constraint also has a very low `stiffness`. + * A value of `0.1` means the constraint will apply heavy damping, resulting in little to no oscillation. + * A value of `0` means the constraint will apply no damping. + * + * @property damping + * @type number + * @default 0 + */ + damping: number; + + /** + * A `Number` that specifies the angular stiffness of the constraint. + * + * @property angularStiffness + * @type number + * @default 0 + */ + angularStiffness: number; + + /** + * Either the angle of BodyA, or a config value. + * + * @property angleA + * @type number + * @default 0 + */ + angleA: number; + + /** + * Either the angle of BodyB, or a config value. + * + * @property angleB + * @type number + * @default 0 + */ + angleB: number; + + /** + * An object reserved for storing plugin-specific properties. + * + * @property plugin + * @type {} + */ + plugin: any; + + /** + * An `Object` that defines the rendering properties to be consumed by the module `Matter.Render`. + * + * @property render + * @type object + */ + render: IConstraintRenderDefinition; + + }; + type BodyType = { /** @@ -1034,16 +1421,6 @@ declare namespace MatterJS { */ plugin: any; - /** - * A self reference if the body is _not_ a part of another body. - * Otherwise this is a reference to the body that this is a part of. - * See `body.parts`. - * - * @property parent - * @type body - */ - parent: BodyType; - /** * A `Number` specifying the angle of the body, in radians. * @@ -1381,6 +1758,211 @@ declare namespace MatterJS { */ positionPrev: Vector; + /** + * The previous angle. + * + * @property anglePrev + * @type number + * @default 0 + */ + anglePrev: number; + + /** + * A self reference if the body is _not_ a part of another body. + * Otherwise this is a reference to the body that this is a part of. + * See `body.parts`. + * + * @property parent + * @type body + */ + parent: BodyType; + + /** + * An array of unique axis vectors (edge normals) used for collision detection. + * These are automatically calculated from the given convex hull (`vertices` array) in `Body.create`. + * They are constantly updated by `Body.update` during the simulation. + * + * @property axes + * @type vector[] + */ + axes?: Array; + + /** + * A `Number` that _measures_ the area of the body's convex hull, calculated at creation by `Body.create`. + * + * @property area + * @type number + * @default + */ + area: number; + + /** + * A `Number` that defines the mass of the body, although it may be more appropriate to specify the `density` property instead. + * If you modify this value, you must also modify the `body.inverseMass` property (`1 / mass`). + * + * @property mass + * @type number + */ + mass: number; + + /** + * A `Number` that defines the inverse mass of the body (`1 / mass`). + * If you modify this value, you must also modify the `body.mass` property. + * + * @property inverseMass + * @type number + */ + inverseMass: number; + + /** + * A `Number` that defines the moment of inertia (i.e. second moment of area) of the body. + * It is automatically calculated from the given convex hull (`vertices` array) and density in `Body.create`. + * If you modify this value, you must also modify the `body.inverseInertia` property (`1 / inertia`). + * + * @property inertia + * @type number + */ + inertia: number; + + /** + * A `Number` that defines the inverse moment of inertia of the body (`1 / inertia`). + * If you modify this value, you must also modify the `body.inertia` property. + * + * @property inverseInertia + * @type number + */ + inverseInertia: number; + + /** + * Holds the original friction, mass, etc values from when this Body was made static. + * + * @property _original + * @type any + */ + _original: any; + + /** + * An `Object` that defines the rendering properties to be consumed by the module `Matter.Render`. + * + * @property render + * @type object + */ + render: IBodyRenderOptions; + + /** + * A reference to the Phaser Game Object this body belongs to, if any. + * + * @property gameObject + * @type Phaser.GameObjects.GameObject + */ + gameObject?: any; + + /** + * The scale of the Body. + * + * @property scale + * @readonly + * @type vector + * @default { x: 1, y: 1 } + */ + scale: Vector; + + /** + * The center of mass of the Body. + * + * @property centerOfMass + * @type vector + * @default { x: 0, y: 0 } + */ + centerOfMass: Vector; + + /** + * The center of the body in pixel values. + * Used by Phaser for texture aligment. + * + * @property centerOffset + * @type vector + * @default { x: 0, y: 0 } + */ + centerOffset: Vector; + + /** + * Scale the influence of World gravity when applied to this body. + * + * @property gravityScale + * @type vector + * @default { x: 1, y: 1 } + */ + gravityScale: Vector; + + /** + * Will this Body ignore World gravity during the Engine update? + * + * @property ignoreGravity + * @type boolean + * @default false + */ + ignoreGravity: boolean; + + /** + * Will this Body ignore Phaser Pointer input events? + * + * @property ignorePointer + * @type boolean + * @default false + */ + ignorePointer: boolean; + + /** + * A callback that is invoked when this Body starts colliding with any other Body. + * + * You can register callbacks by providing a function of type `( pair: Matter.Pair) => void`. + * + * @property onCollideCallback + * @type function + * @default null + */ + onCollideCallback?: Function; + + /** + * A callback that is invoked when this Body stops colliding with any other Body. + * + * You can register callbacks by providing a function of type `( pair: Matter.Pair) => void`. + * + * @property onCollideEndCallback + * @type function + * @default null + */ + onCollideEndCallback?: Function; + + /** + * A callback that is invoked for the duration that this Body is colliding with any other Body. + * + * You can register callbacks by providing a function of type `( pair: Matter.Pair) => void`. + * + * @property onCollideActiveCallback + * @type function + * @default null + */ + onCollideActiveCallback?: Function; + + /** + * A collision callback dictionary used by the `Body.setOnCollideWith` function. + * + * @property onCollideWith + * @type object + * @default null + */ + onCollideWith?: any; + + /** + * Sets the onCollideWith callback. + * + * @property setOnCollideWith + * @type Function + */ + setOnCollideWith: (body: BodyType, callback: Function) => BodyType; + }; // -------------------------------------------------------------- @@ -1462,7 +2044,7 @@ declare namespace MatterJS { * @param {number} [maxSides] * @return {body} A new circle body */ - static circle (x: number, y: number, radius: number, options?: IBodyDefinition, maxSides?: number): IBodyDefinition; + static circle (x: number, y: number, radius: number, options?: IBodyDefinition, maxSides?: number): BodyType; /** * Creates a new rigid body model with a regular polygon hull with the given number of sides. @@ -1476,7 +2058,7 @@ declare namespace MatterJS { * @param {object} [options] * @return {body} A new regular polygon body */ - static polygon (x: number, y: number, sides: number, radius: number, options?: IChamferableBodyDefinition): IBodyDefinition; + static polygon (x: number, y: number, sides: number, radius: number, options?: IChamferableBodyDefinition): BodyType; /** * Creates a new rigid body model with a rectangle hull. @@ -1490,7 +2072,7 @@ declare namespace MatterJS { * @param {object} [options] * @return {body} A new rectangle body */ - static rectangle (x: number, y: number, width: number, height: number, options?: IChamferableBodyDefinition): IBodyDefinition; + static rectangle (x: number, y: number, width: number, height: number, options?: IChamferableBodyDefinition): BodyType; /** * Creates a new rigid body model with a trapezoid hull. @@ -1505,7 +2087,7 @@ declare namespace MatterJS { * @param {object} [options] * @return {body} A new trapezoid body */ - static trapezoid (x: number, y: number, width: number, height: number, slope: number, options?: IChamferableBodyDefinition): IBodyDefinition; + static trapezoid (x: number, y: number, width: number, height: number, slope: number, options?: IChamferableBodyDefinition): BodyType; /** * Creates a body using the supplied vertices (or an array containing multiple sets of vertices). @@ -1527,7 +2109,7 @@ declare namespace MatterJS { * @param {number} [minimumArea=10] * @return {body} */ - static fromVertices (x: number, y: number, vertexSets: Array>, options?: IBodyDefinition, flagInternal?: boolean, removeCollinear?: number, minimumArea?: number): IBodyDefinition; + static fromVertices (x: number, y: number, vertexSets: Array>, options?: IBodyDefinition, flagInternal?: boolean, removeCollinear?: number, minimumArea?: number): BodyType; } class BodiesFactory { @@ -1544,7 +2126,7 @@ declare namespace MatterJS { * @param {number} [maxSides] * @return {body} A new circle body */ - circle (x: number, y: number, radius: number, options?: IBodyDefinition, maxSides?: number): IBodyDefinition; + circle (x: number, y: number, radius: number, options?: IBodyDefinition, maxSides?: number): BodyType; /** * Creates a new rigid body model with a regular polygon hull with the given number of sides. @@ -1558,7 +2140,7 @@ declare namespace MatterJS { * @param {object} [options] * @return {body} A new regular polygon body */ - polygon (x: number, y: number, sides: number, radius: number, options?: IChamferableBodyDefinition): IBodyDefinition; + polygon (x: number, y: number, sides: number, radius: number, options?: IChamferableBodyDefinition): BodyType; /** * Creates a new rigid body model with a rectangle hull. @@ -1572,7 +2154,7 @@ declare namespace MatterJS { * @param {object} [options] * @return {body} A new rectangle body */ - rectangle (x: number, y: number, width: number, height: number, options?: IChamferableBodyDefinition): IBodyDefinition; + rectangle (x: number, y: number, width: number, height: number, options?: IChamferableBodyDefinition): BodyType; /** * Creates a new rigid body model with a trapezoid hull. @@ -1587,7 +2169,7 @@ declare namespace MatterJS { * @param {object} [options] * @return {body} A new trapezoid body */ - trapezoid (x: number, y: number, width: number, height: number, slope: number, options?: IChamferableBodyDefinition): IBodyDefinition; + trapezoid (x: number, y: number, width: number, height: number, slope: number, options?: IChamferableBodyDefinition): BodyType; /** * Creates a body using the supplied vertices (or an array containing multiple sets of vertices). @@ -1609,7 +2191,7 @@ declare namespace MatterJS { * @param {number} [minimumArea=10] * @return {body} */ - fromVertices (x: number, y: number, vertexSets: Array>, options?: IBodyDefinition, flagInternal?: boolean, removeCollinear?: number, minimumArea?: number): IBodyDefinition; + fromVertices (x: number, y: number, vertexSets: Array>, options?: IBodyDefinition, flagInternal?: boolean, removeCollinear?: number, minimumArea?: number): BodyType; } /** @@ -1630,7 +2212,7 @@ declare namespace MatterJS { * @param {vector} position * @param {vector} force */ - static applyForce (body: IBodyDefinition, position: Vector, force: Vector): void; + static applyForce (body: BodyType, position: Vector, force: Vector): void; /** * Creates a new rigid body model. The options parameter is an object that specifies any properties you wish to override the defaults. @@ -1640,7 +2222,7 @@ declare namespace MatterJS { * @param {} options * @return {body} body */ - static create (options: IBodyDefinition): Body; + static create (options: IChamferableBodyDefinition): Body; /** * Rotates a body by a given angle relative to its current angle, without imparting any angular velocity. @@ -1648,7 +2230,7 @@ declare namespace MatterJS { * @param {body} body * @param {number} rotation */ - static rotate (body: IBodyDefinition, rotation: number): void; + static rotate (body: BodyType, rotation: number): void; /** * Returns the next unique group index for which bodies will collide. @@ -1676,7 +2258,7 @@ declare namespace MatterJS { * @param {} settings A property name (or map of properties and values) to set on the body. * @param {} value The value to set if `settings` is a single property name. */ - static set (body: IBodyDefinition, settings: any, value?: any): void; + static set (body: BodyType, settings: any, value?: any): void; /** * Sets the mass of the body. Inverse mass and density are automatically updated to reflect the change. @@ -1684,7 +2266,7 @@ declare namespace MatterJS { * @param {body} body * @param {number} mass */ - static setMass (body: IBodyDefinition, mass: number): void; + static setMass (body: BodyType, mass: number): void; /** * Sets the density of the body. Mass is automatically updated to reflect the change. @@ -1692,7 +2274,7 @@ declare namespace MatterJS { * @param {body} body * @param {number} density */ - static setDensity (body: IBodyDefinition, density: number): void; + static setDensity (body: BodyType, density: number): void; /** * Sets the moment of inertia (i.e. second moment of area) of the body of the body. @@ -1701,7 +2283,7 @@ declare namespace MatterJS { * @param {body} body * @param {number} inertia */ - static setInertia (body: IBodyDefinition, inertia: number): void; + static setInertia (body: BodyType, inertia: number): void; /** * Sets the body's vertices and updates body properties accordingly, including inertia, area and mass (with respect to `body.density`). @@ -1715,7 +2297,7 @@ declare namespace MatterJS { * @param {body} body * @param {vector[]} vertices */ - static setVertices (body: IBodyDefinition, vertices: Array): void; + static setVertices (body: BodyType, vertices: Array): void; /** * Sets the parts of the `body` and updates mass, inertia and centroid. @@ -1727,7 +2309,7 @@ declare namespace MatterJS { * @param [body] parts * @param {bool} [autoHull=true] */ - static setParts (body: IBodyDefinition, parts: IBodyDefinition[], autoHull?: boolean): void; + static setParts (body: BodyType, parts: BodyType[], autoHull?: boolean): void; /** * Sets the position of the body instantly. Velocity, angle, force etc. are unchanged. @@ -1735,7 +2317,7 @@ declare namespace MatterJS { * @param {body} body * @param {vector} position */ - static setPosition (body: IBodyDefinition, position: Vector): void; + static setPosition (body: BodyType, position: Vector): void; /** * Sets the angle of the body instantly. Angular velocity, position, force etc. are unchanged. @@ -1743,7 +2325,7 @@ declare namespace MatterJS { * @param {body} body * @param {number} angle */ - static setAngle (body: IBodyDefinition, angle: number): void; + static setAngle (body: BodyType, angle: number): void; /** * Sets the linear velocity of the body instantly. Position, angle, force etc. are unchanged. See also `Body.applyForce`. @@ -1751,7 +2333,7 @@ declare namespace MatterJS { * @param {body} body * @param {vector} velocity */ - static setVelocity (body: IBodyDefinition, velocity: Vector): void; + static setVelocity (body: BodyType, velocity: Vector): void; /** * Sets the angular velocity of the body instantly. Position, angle, force etc. are unchanged. See also `Body.applyForce`. @@ -1759,7 +2341,7 @@ declare namespace MatterJS { * @param {body} body * @param {number} velocity */ - static setAngularVelocity (body: IBodyDefinition, velocity: number): void; + static setAngularVelocity (body: BodyType, velocity: number): void; /** * Sets the body as static, including isStatic flag and setting mass and inertia to Infinity. @@ -1767,7 +2349,7 @@ declare namespace MatterJS { * @param {body} body * @param {bool} isStatic */ - static setStatic (body: IBodyDefinition, isStatic: boolean): void; + static setStatic (body: BodyType, isStatic: boolean): void; /** * Scales the body, including updating physical properties (mass, area, axes, inertia), from a world-space point (default is body centre). @@ -1777,7 +2359,7 @@ declare namespace MatterJS { * @param {number} scaleY * @param {vector} [point] */ - static scale (body: IBodyDefinition, scaleX: number, scaleY: number, point?: Vector): void; + static scale (body: BodyType, scaleX: number, scaleY: number, point?: Vector): void; /** * Moves a body by a given vector relative to its current position, without imparting any velocity. @@ -1785,7 +2367,7 @@ declare namespace MatterJS { * @param {body} body * @param {vector} translation */ - static translate (body: IBodyDefinition, translation: Vector): void; + static translate (body: BodyType, translation: Vector): void; /** * Performs a simulation step for the given `body`, including updating position and angle using Verlet integration. @@ -1795,7 +2377,7 @@ declare namespace MatterJS { * @param {number} timeScale * @param {number} correction */ - static update (body: IBodyDefinition, deltaTime: number, timeScale: number, correction: number): void; + static update (body: BodyType, deltaTime: number, timeScale: number, correction: number): void; } @@ -1808,7 +2390,7 @@ declare namespace MatterJS { * @param {vector} position * @param {vector} force */ - applyForce (body: IBodyDefinition, position: Vector, force: Vector): void; + applyForce (body: BodyType, position: Vector, force: Vector): void; /** * Creates a new rigid body model. The options parameter is an object that specifies any properties you wish to override the defaults. @@ -1818,7 +2400,7 @@ declare namespace MatterJS { * @param {} options * @return {body} body */ - create (options: IBodyDefinition): Body; + create (options: IChamferableBodyDefinition): BodyType; /** * Rotates a body by a given angle relative to its current angle, without imparting any angular velocity. @@ -1826,7 +2408,7 @@ declare namespace MatterJS { * @param {body} body * @param {number} rotation */ - rotate (body: IBodyDefinition, rotation: number): void; + rotate (body: BodyType, rotation: number): void; /** * Returns the next unique group index for which bodies will collide. @@ -1854,7 +2436,7 @@ declare namespace MatterJS { * @param {} settings A property name (or map of properties and values) to set on the body. * @param {} value The value to set if `settings` is a single property name. */ - set (body: IBodyDefinition, settings: any, value?: any): void; + set (body: BodyType, settings: any, value?: any): void; /** * Sets the mass of the body. Inverse mass and density are automatically updated to reflect the change. @@ -1862,7 +2444,7 @@ declare namespace MatterJS { * @param {body} body * @param {number} mass */ - setMass (body: IBodyDefinition, mass: number): void; + setMass (body: BodyType, mass: number): void; /** * Sets the density of the body. Mass is automatically updated to reflect the change. @@ -1870,7 +2452,7 @@ declare namespace MatterJS { * @param {body} body * @param {number} density */ - setDensity (body: IBodyDefinition, density: number): void; + setDensity (body: BodyType, density: number): void; /** * Sets the moment of inertia (i.e. second moment of area) of the body of the body. @@ -1879,7 +2461,7 @@ declare namespace MatterJS { * @param {body} body * @param {number} inertia */ - setInertia (body: IBodyDefinition, inertia: number): void; + setInertia (body: BodyType, inertia: number): void; /** * Sets the body's vertices and updates body properties accordingly, including inertia, area and mass (with respect to `body.density`). @@ -1893,7 +2475,7 @@ declare namespace MatterJS { * @param {body} body * @param {vector[]} vertices */ - setVertices (body: IBodyDefinition, vertices: Array): void; + setVertices (body: BodyType, vertices: Array): void; /** * Sets the parts of the `body` and updates mass, inertia and centroid. @@ -1905,7 +2487,7 @@ declare namespace MatterJS { * @param [body] parts * @param {bool} [autoHull=true] */ - setParts (body: IBodyDefinition, parts: IBodyDefinition[], autoHull?: boolean): void; + setParts (body: BodyType, parts: BodyType[], autoHull?: boolean): void; /** * Sets the position of the body instantly. Velocity, angle, force etc. are unchanged. @@ -1913,7 +2495,7 @@ declare namespace MatterJS { * @param {body} body * @param {vector} position */ - setPosition (body: IBodyDefinition, position: Vector): void; + setPosition (body: BodyType, position: Vector): void; /** * Sets the angle of the body instantly. Angular velocity, position, force etc. are unchanged. @@ -1921,7 +2503,7 @@ declare namespace MatterJS { * @param {body} body * @param {number} angle */ - setAngle (body: IBodyDefinition, angle: number): void; + setAngle (body: BodyType, angle: number): void; /** * Sets the linear velocity of the body instantly. Position, angle, force etc. are unchanged. See also `Body.applyForce`. @@ -1929,7 +2511,7 @@ declare namespace MatterJS { * @param {body} body * @param {vector} velocity */ - setVelocity (body: IBodyDefinition, velocity: Vector): void; + setVelocity (body: BodyType, velocity: Vector): void; /** * Sets the angular velocity of the body instantly. Position, angle, force etc. are unchanged. See also `Body.applyForce`. @@ -1937,7 +2519,7 @@ declare namespace MatterJS { * @param {body} body * @param {number} velocity */ - setAngularVelocity (body: IBodyDefinition, velocity: number): void; + setAngularVelocity (body: BodyType, velocity: number): void; /** * Sets the body as static, including isStatic flag and setting mass and inertia to Infinity. @@ -1945,7 +2527,7 @@ declare namespace MatterJS { * @param {body} body * @param {bool} isStatic */ - setStatic (body: IBodyDefinition, isStatic: boolean): void; + setStatic (body: BodyType, isStatic: boolean): void; /** * Scales the body, including updating physical properties (mass, area, axes, inertia), from a world-space point (default is body centre). @@ -1955,7 +2537,7 @@ declare namespace MatterJS { * @param {number} scaleY * @param {vector} [point] */ - scale (body: IBodyDefinition, scaleX: number, scaleY: number, point?: Vector): void; + scale (body: BodyType, scaleX: number, scaleY: number, point?: Vector): void; /** * Moves a body by a given vector relative to its current position, without imparting any velocity. @@ -1963,7 +2545,7 @@ declare namespace MatterJS { * @param {body} body * @param {vector} translation */ - translate (body: IBodyDefinition, translation: Vector): void; + translate (body: BodyType, translation: Vector): void; /** * Performs a simulation step for the given `body`, including updating position and angle using Verlet integration. @@ -1973,7 +2555,7 @@ declare namespace MatterJS { * @param {number} timeScale * @param {number} correction */ - update (body: IBodyDefinition, deltaTime: number, timeScale: number, correction: number): void; + update (body: BodyType, deltaTime: number, timeScale: number, correction: number): void; } @@ -2112,7 +2694,7 @@ declare namespace MatterJS { * @param {} object * @return {composite} The original composite with the objects added */ - static add (composite: ICompositeDefinition, object: IBodyDefinition | ICompositeDefinition | IConstraintDefinition): ICompositeDefinition; + static add (composite: CompositeType, object: BodyType | CompositeType | ConstraintType): CompositeType; /** * Returns all bodies in the given composite, including all bodies in its children, recursively. @@ -2120,7 +2702,7 @@ declare namespace MatterJS { * @param {composite} composite * @return {body[]} All the bodies */ - static allBodies (composite: ICompositeDefinition): Array; + static allBodies (composite: CompositeType): Array; /** * Returns all composites in the given composite, including all composites in its children, recursively. @@ -2128,7 +2710,7 @@ declare namespace MatterJS { * @param {composite} composite * @return {composite[]} All the composites */ - static allComposites (composite: ICompositeDefinition): Array; + static allComposites (composite: CompositeType): Array; /** * Returns all constraints in the given composite, including all constraints in its children, recursively. @@ -2136,7 +2718,7 @@ declare namespace MatterJS { * @param {composite} composite * @return {constraint[]} All the constraints */ - static allConstraints (composite: ICompositeDefinition): Array; + static allConstraints (composite: CompositeType): Array; /** * Removes all bodies, constraints and composites from the given composite. @@ -2146,7 +2728,7 @@ declare namespace MatterJS { * @param {boolean} keepStatic * @param {boolean} [deep=false] */ - static clear (composite: ICompositeDefinition, keepStatic: boolean, deep?: boolean): void; + static clear (composite: CompositeType, keepStatic: boolean, deep?: boolean): void; /** * Creates a new composite. The options parameter is an object that specifies any properties you wish to override the defaults. @@ -2155,7 +2737,7 @@ declare namespace MatterJS { * @param {} [options] * @return {composite} A new composite */ - static create (options?: ICompositeDefinition): ICompositeDefinition; + static create (options?: ICompositeDefinition): CompositeType; /** * Searches the composite recursively for an object matching the type and id supplied, null if not found. @@ -2165,7 +2747,7 @@ declare namespace MatterJS { * @param {string} type * @return {object} The requested object, if found */ - static get (composite: ICompositeDefinition, id: number, type: string): IBodyDefinition | ICompositeDefinition | IConstraintDefinition; + static get (composite: CompositeType, id: number, type: string): BodyType | CompositeType | ConstraintType; /** * Moves the given object(s) from compositeA to compositeB (equal to a remove followed by an add). @@ -2175,7 +2757,7 @@ declare namespace MatterJS { * @param {compositeB} compositeB * @return {composite} Returns compositeA */ - static move (compositeA: ICompositeDefinition, objects: Array, compositeB: ICompositeDefinition): ICompositeDefinition; + static move (compositeA: CompositeType, objects: Array, compositeB: CompositeType): CompositeType; /** * Assigns new ids for all objects in the composite, recursively. @@ -2183,7 +2765,7 @@ declare namespace MatterJS { * @param {composite} composite * @return {composite} Returns composite */ - static rebase (composite: ICompositeDefinition): ICompositeDefinition; + static rebase (composite: CompositeType): CompositeType; /** * Generic remove function. Removes one or many body(s), constraint(s) or a composite(s) to the given composite. @@ -2195,7 +2777,7 @@ declare namespace MatterJS { * @param {boolean} [deep=false] * @return {composite} The original composite with the objects removed */ - static remove (composite: ICompositeDefinition, object: IBodyDefinition | ICompositeDefinition | IConstraintDefinition, deep?: boolean): ICompositeDefinition; + static remove (composite: CompositeType, object: BodyType | CompositeType | ConstraintType, deep?: boolean): CompositeType; /** * Sets the composite's `isModified` flag. @@ -2207,7 +2789,7 @@ declare namespace MatterJS { * @param {boolean} [updateParents=false] * @param {boolean} [updateChildren=false] */ - static setModified (composite: ICompositeDefinition, isModified: boolean, updateParents?: boolean, updateChildren?: boolean): void; + static setModified (composite: CompositeType, isModified: boolean, updateParents?: boolean, updateChildren?: boolean): void; /** * Translates all children in the composite by a given vector relative to their current positions, @@ -2217,7 +2799,7 @@ declare namespace MatterJS { * @param {vector} translation * @param {bool} [recursive=true] */ - static translate (composite: ICompositeDefinition, translation: Vector, recursive?: boolean): void; + static translate (composite: CompositeType, translation: Vector, recursive?: boolean): void; /** * Rotates all children in the composite by a given angle about the given point, without imparting any angular velocity. @@ -2227,7 +2809,7 @@ declare namespace MatterJS { * @param {vector} point * @param {bool} [recursive=true] */ - static rotate (composite: ICompositeDefinition, rotation: number, point: Vector, recursive?: boolean): void; + static rotate (composite: CompositeType, rotation: number, point: Vector, recursive?: boolean): void; /** * Scales all children in the composite, including updating physical properties (mass, area, axes, inertia), from a world-space point. @@ -2238,7 +2820,7 @@ declare namespace MatterJS { * @param {vector} point * @param {bool} [recursive=true] */ - static scale (composite: ICompositeDefinition, scaleX: number, scaleY: number, point: Vector, recursive?: boolean): void; + static scale (composite: CompositeType, scaleX: number, scaleY: number, point: Vector, recursive?: boolean): void; } @@ -2252,7 +2834,7 @@ declare namespace MatterJS { * @param {} object * @return {composite} The original composite with the objects added */ - add (composite: ICompositeDefinition, object: IBodyDefinition | ICompositeDefinition | IConstraintDefinition): ICompositeDefinition; + add (composite: CompositeType, object: BodyType | CompositeType | ConstraintType): CompositeType; /** * Returns all bodies in the given composite, including all bodies in its children, recursively. @@ -2260,7 +2842,7 @@ declare namespace MatterJS { * @param {composite} composite * @return {body[]} All the bodies */ - allBodies (composite: ICompositeDefinition): Array; + allBodies (composite: CompositeType): Array; /** * Returns all composites in the given composite, including all composites in its children, recursively. @@ -2268,7 +2850,7 @@ declare namespace MatterJS { * @param {composite} composite * @return {composite[]} All the composites */ - allComposites (composite: ICompositeDefinition): Array; + allComposites (composite: CompositeType): Array; /** * Returns all constraints in the given composite, including all constraints in its children, recursively. @@ -2276,7 +2858,7 @@ declare namespace MatterJS { * @param {composite} composite * @return {constraint[]} All the constraints */ - allConstraints (composite: ICompositeDefinition): Array; + allConstraints (composite: CompositeType): Array; /** * Removes all bodies, constraints and composites from the given composite. @@ -2286,7 +2868,7 @@ declare namespace MatterJS { * @param {boolean} keepStatic * @param {boolean} [deep=false] */ - clear (composite: ICompositeDefinition, keepStatic: boolean, deep?: boolean): void; + clear (composite: CompositeType, keepStatic: boolean, deep?: boolean): void; /** * Creates a new composite. The options parameter is an object that specifies any properties you wish to override the defaults. @@ -2295,7 +2877,7 @@ declare namespace MatterJS { * @param {} [options] * @return {composite} A new composite */ - create (options?: ICompositeDefinition): ICompositeDefinition; + create (options?: ICompositeDefinition): CompositeType; /** * Searches the composite recursively for an object matching the type and id supplied, null if not found. @@ -2305,7 +2887,7 @@ declare namespace MatterJS { * @param {string} type * @return {object} The requested object, if found */ - get (composite: ICompositeDefinition, id: number, type: string): IBodyDefinition | ICompositeDefinition | IConstraintDefinition; + get (composite: CompositeType, id: number, type: string): BodyType | CompositeType | ConstraintType; /** * Moves the given object(s) from compositeA to compositeB (equal to a remove followed by an add). @@ -2315,7 +2897,7 @@ declare namespace MatterJS { * @param {compositeB} compositeB * @return {composite} Returns compositeA */ - move (compositeA: ICompositeDefinition, objects: Array, compositeB: ICompositeDefinition): ICompositeDefinition; + move (compositeA: CompositeType, objects: Array, compositeB: CompositeType): CompositeType; /** * Assigns new ids for all objects in the composite, recursively. @@ -2323,7 +2905,7 @@ declare namespace MatterJS { * @param {composite} composite * @return {composite} Returns composite */ - rebase (composite: ICompositeDefinition): ICompositeDefinition; + rebase (composite: CompositeType): CompositeType; /** * Generic remove function. Removes one or many body(s), constraint(s) or a composite(s) to the given composite. @@ -2335,7 +2917,7 @@ declare namespace MatterJS { * @param {boolean} [deep=false] * @return {composite} The original composite with the objects removed */ - remove (composite: ICompositeDefinition, object: IBodyDefinition | ICompositeDefinition | IConstraintDefinition, deep?: boolean): ICompositeDefinition; + remove (composite: CompositeType, object: BodyType | CompositeType | ConstraintType, deep?: boolean): CompositeType; /** * Sets the composite's `isModified` flag. @@ -2347,7 +2929,7 @@ declare namespace MatterJS { * @param {boolean} [updateParents=false] * @param {boolean} [updateChildren=false] */ - setModified (composite: ICompositeDefinition, isModified: boolean, updateParents?: boolean, updateChildren?: boolean): void; + setModified (composite: CompositeType, isModified: boolean, updateParents?: boolean, updateChildren?: boolean): void; /** * Translates all children in the composite by a given vector relative to their current positions, @@ -2357,7 +2939,7 @@ declare namespace MatterJS { * @param {vector} translation * @param {bool} [recursive=true] */ - translate (composite: ICompositeDefinition, translation: Vector, recursive?: boolean): void; + translate (composite: CompositeType, translation: Vector, recursive?: boolean): void; /** * Rotates all children in the composite by a given angle about the given point, without imparting any angular velocity. @@ -2367,7 +2949,7 @@ declare namespace MatterJS { * @param {vector} point * @param {bool} [recursive=true] */ - rotate (composite: ICompositeDefinition, rotation: number, point: Vector, recursive?: boolean): void; + rotate (composite: CompositeType, rotation: number, point: Vector, recursive?: boolean): void; /** * Scales all children in the composite, including updating physical properties (mass, area, axes, inertia), from a world-space point. @@ -2378,7 +2960,7 @@ declare namespace MatterJS { * @param {vector} point * @param {bool} [recursive=true] */ - scale (composite: ICompositeDefinition, scaleX: number, scaleY: number, point: Vector, recursive?: boolean): void; + scale (composite: CompositeType, scaleX: number, scaleY: number, point: Vector, recursive?: boolean): void; } @@ -2402,7 +2984,7 @@ declare namespace MatterJS { * @param {number} wheelSize * @return {composite} A new composite car body */ - static car (xx: number, yy: number, width: number, height: number, wheelSize: number): ICompositeDefinition; + static car (xx: number, yy: number, width: number, height: number, wheelSize: number): CompositeType; /** * Chains all bodies in the given composite together using constraints. @@ -2415,7 +2997,7 @@ declare namespace MatterJS { * @param {object} options * @return {composite} A new composite containing objects chained together with constraints */ - static chain (composite: ICompositeDefinition, xOffsetA: number, yOffsetA: number, xOffsetB: number, yOffsetB: number, options: any): ICompositeDefinition; + static chain (composite: CompositeType, xOffsetA: number, yOffsetA: number, xOffsetB: number, yOffsetB: number, options: any): CompositeType; /** * Connects bodies in the composite with constraints in a grid pattern, with optional cross braces. @@ -2427,7 +3009,7 @@ declare namespace MatterJS { * @param {object} options * @return {composite} The composite containing objects meshed together with constraints */ - static mesh (composite: ICompositeDefinition, columns: number, rows: number, crossBrace: boolean, options: any): ICompositeDefinition; + static mesh (composite: CompositeType, columns: number, rows: number, crossBrace: boolean, options: any): CompositeType; /** * Creates a composite with a Newton's Cradle setup of bodies and constraints. @@ -2439,7 +3021,7 @@ declare namespace MatterJS { * @param {number} length * @return {composite} A new composite newtonsCradle body */ - static newtonsCradle (xx: number, yy: number, number: number, size: number, length: number): ICompositeDefinition; + static newtonsCradle (xx: number, yy: number, number: number, size: number, length: number): CompositeType; /** * Create a new composite containing bodies created in the callback in a pyramid arrangement. @@ -2454,7 +3036,7 @@ declare namespace MatterJS { * @param {function} callback * @return {composite} A new composite containing objects created in the callback */ - static pyramid (xx: number, yy: number, columns: number, rows: number, columnGap: number, rowGap: number, callback: Function): ICompositeDefinition; + static pyramid (xx: number, yy: number, columns: number, rows: number, columnGap: number, rowGap: number, callback: Function): CompositeType; /** * Creates a simple soft body like object. @@ -2471,7 +3053,7 @@ declare namespace MatterJS { * @param {} constraintOptions * @return {composite} A new composite softBody */ - static softBody (xx: number, yy: number, columns: number, rows: number, columnGap: number, rowGap: number, crossBrace: boolean, particleRadius: number, particleOptions: any, constraintOptions: any): ICompositeDefinition; + static softBody (xx: number, yy: number, columns: number, rows: number, columnGap: number, rowGap: number, crossBrace: boolean, particleRadius: number, particleOptions: any, constraintOptions: any): CompositeType; /** * Create a new composite containing bodies created in the callback in a grid arrangement. @@ -2486,7 +3068,7 @@ declare namespace MatterJS { * @param {function} callback * @return {composite} A new composite containing objects created in the callback */ - static stack (xx: number, yy: number, columns: number, rows: number, columnGap: number, rowGap: number, callback: Function): ICompositeDefinition; + static stack (xx: number, yy: number, columns: number, rows: number, columnGap: number, rowGap: number, callback: Function): CompositeType; } @@ -2502,7 +3084,7 @@ declare namespace MatterJS { * @param {number} wheelSize * @return {composite} A new composite car body */ - car (xx: number, yy: number, width: number, height: number, wheelSize: number): ICompositeDefinition; + car (xx: number, yy: number, width: number, height: number, wheelSize: number): CompositeType; /** * Chains all bodies in the given composite together using constraints. @@ -2515,7 +3097,7 @@ declare namespace MatterJS { * @param {object} options * @return {composite} A new composite containing objects chained together with constraints */ - chain (composite: ICompositeDefinition, xOffsetA: number, yOffsetA: number, xOffsetB: number, yOffsetB: number, options: any): ICompositeDefinition; + chain (composite: CompositeType, xOffsetA: number, yOffsetA: number, xOffsetB: number, yOffsetB: number, options: any): CompositeType; /** * Connects bodies in the composite with constraints in a grid pattern, with optional cross braces. @@ -2527,7 +3109,7 @@ declare namespace MatterJS { * @param {object} options * @return {composite} The composite containing objects meshed together with constraints */ - mesh (composite: ICompositeDefinition, columns: number, rows: number, crossBrace: boolean, options: any): ICompositeDefinition; + mesh (composite: CompositeType, columns: number, rows: number, crossBrace: boolean, options: any): CompositeType; /** * Creates a composite with a Newton's Cradle setup of bodies and constraints. @@ -2539,7 +3121,7 @@ declare namespace MatterJS { * @param {number} length * @return {composite} A new composite newtonsCradle body */ - newtonsCradle (xx: number, yy: number, number: number, size: number, length: number): ICompositeDefinition; + newtonsCradle (xx: number, yy: number, number: number, size: number, length: number): CompositeType; /** * Create a new composite containing bodies created in the callback in a pyramid arrangement. @@ -2554,7 +3136,7 @@ declare namespace MatterJS { * @param {function} callback * @return {composite} A new composite containing objects created in the callback */ - pyramid (xx: number, yy: number, columns: number, rows: number, columnGap: number, rowGap: number, callback: Function): ICompositeDefinition; + pyramid (xx: number, yy: number, columns: number, rows: number, columnGap: number, rowGap: number, callback: Function): CompositeType; /** * Creates a simple soft body like object. @@ -2571,7 +3153,7 @@ declare namespace MatterJS { * @param {} constraintOptions * @return {composite} A new composite softBody */ - softBody (xx: number, yy: number, columns: number, rows: number, columnGap: number, rowGap: number, crossBrace: boolean, particleRadius: number, particleOptions: any, constraintOptions: any): ICompositeDefinition; + softBody (xx: number, yy: number, columns: number, rows: number, columnGap: number, rowGap: number, crossBrace: boolean, particleRadius: number, particleOptions: any, constraintOptions: any): CompositeType; /** * Create a new composite containing bodies created in the callback in a grid arrangement. @@ -2586,7 +3168,7 @@ declare namespace MatterJS { * @param {function} callback * @return {composite} A new composite containing objects created in the callback */ - stack (xx: number, yy: number, columns: number, rows: number, columnGap: number, rowGap: number, callback: Function): ICompositeDefinition; + stack (xx: number, yy: number, columns: number, rows: number, columnGap: number, rowGap: number, callback: Function): CompositeType; } @@ -2609,7 +3191,7 @@ declare namespace MatterJS { * @param {} options * @return {constraint} constraint */ - static create (options: IConstraintDefinition): IConstraintDefinition; + static create (options: IConstraintDefinition): ConstraintType; } @@ -2623,7 +3205,7 @@ declare namespace MatterJS { * @param {} options * @return {constraint} constraint */ - create (options: IConstraintDefinition): IConstraintDefinition; + create (options: IConstraintDefinition): ConstraintType; } @@ -2802,7 +3384,7 @@ declare namespace MatterJS { * @param {engine} engine * @param {boolean} forceUpdate */ - static update (grid: Grid, bodies: Array, engine: Engine, forceUpdate: boolean): void; + static update (grid: Grid, bodies: Array, engine: Engine, forceUpdate: boolean): void; /** * Clears the grid. @@ -2831,7 +3413,7 @@ declare namespace MatterJS { * @param {engine} engine * @param {boolean} forceUpdate */ - update (grid: Grid, bodies: Array, engine: Engine, forceUpdate: boolean): void; + update (grid: Grid, bodies: Array, engine: Engine, forceUpdate: boolean): void; /** * Clears the grid. @@ -2869,7 +3451,7 @@ declare namespace MatterJS { * @property constraint * @type constraint */ - constraint: IConstraintDefinition; + constraint: ConstraintType; /** * An `Object` that specifies the collision filter properties. @@ -2888,7 +3470,7 @@ declare namespace MatterJS { * @type body * @default null */ - body: IBodyDefinition; + body: BodyType; /** * A `String` denoting the type of object. @@ -2897,7 +3479,6 @@ declare namespace MatterJS { * @type string * @default "constraint" */ - type: string; } @@ -2970,7 +3551,7 @@ declare namespace MatterJS { * @param {Body} bodyB * @return {string} Unique pairId */ - static id (bodyA: IBodyDefinition, bodyB: IBodyDefinition): string; + static id (bodyA: BodyType, bodyB: BodyType): string; } @@ -3010,7 +3591,7 @@ declare namespace MatterJS { * @param {Body} bodyB * @return {string} Unique pairId */ - id (bodyA: IBodyDefinition, bodyB: IBodyDefinition): string; + id (bodyA: BodyType, bodyB: BodyType): string; } @@ -3086,14 +3667,14 @@ declare namespace MatterJS { * @param {body[]} bodies * @param {number} timeScale */ - static solvePosition (pairs: IPair[], bodies: IBodyDefinition[], timeScale: number): void; + static solvePosition (pairs: IPair[], bodies: BodyType[], timeScale: number): void; /** * Apply position resolution. * @method postSolvePosition * @param {body[]} bodies */ - static postSolvePosition (bodies: IBodyDefinition[]): void; + static postSolvePosition (bodies: BodyType[]): void; /** * Prepare pairs for velocity solving. @@ -3128,14 +3709,14 @@ declare namespace MatterJS { * @param {body[]} bodies * @param {number} timeScale */ - solvePosition (pairs: IPair[], bodies: IBodyDefinition[], timeScale: number): void; + solvePosition (pairs: IPair[], bodies: BodyType[], timeScale: number): void; /** * Apply position resolution. * @method postSolvePosition * @param {body[]} bodies */ - postSolvePosition (bodies: IBodyDefinition[]): void; + postSolvePosition (bodies: BodyType[]): void; /** * Prepare pairs for velocity solving. @@ -3169,7 +3750,7 @@ declare namespace MatterJS { * @param {ICollisionData} previousCollision * @return {ICollisionData} collision */ - static collides (bodyA: IBodyDefinition, bodyB: IBodyDefinition, previousCollision: ICollisionData): ICollisionData + static collides (bodyA: BodyType, bodyB: BodyType, previousCollision: ICollisionData): ICollisionData; } @@ -3183,7 +3764,7 @@ declare namespace MatterJS { * @param {ICollisionData} previousCollision * @return {ICollisionData} collision */ - collides (bodyA: IBodyDefinition, bodyB: IBodyDefinition, previousCollision: ICollisionData): ICollisionData + collides (bodyA: BodyType, bodyB: BodyType, previousCollision: ICollisionData): ICollisionData; } @@ -3205,7 +3786,7 @@ declare namespace MatterJS { * @param {number} [rayWidth] * @return {object[]} Collisions */ - static ray (bodies: Array, startPoint: Vector, endPoint: Vector, rayWidth?: number): Array; + static ray (bodies: Array, startPoint: Vector, endPoint: Vector, rayWidth?: number): Array; /** * Returns all bodies whose bounds are inside (or outside if set) the given set of bounds, from the given set of bodies. @@ -3215,7 +3796,7 @@ declare namespace MatterJS { * @param {bool} [outside=false] * @return {body[]} The bodies matching the query */ - static region (bodies: Array, bounds: Bounds, outside?: boolean): Array; + static region (bodies: Array, bounds: Bounds, outside?: boolean): Array; /** * Returns all bodies whose vertices contain the given point, from the given set of bodies. @@ -3224,7 +3805,7 @@ declare namespace MatterJS { * @param {vector} point * @return {body[]} The bodies matching the query */ - static point (bodies: Array, point: Vector): Array; + static point (bodies: Array, point: Vector): Array; } @@ -3239,7 +3820,7 @@ declare namespace MatterJS { * @param {number} [rayWidth] * @return {object[]} Collisions */ - ray (bodies: Array, startPoint: Vector, endPoint: Vector, rayWidth?: number): Array; + ray (bodies: Array, startPoint: Vector, endPoint: Vector, rayWidth?: number): Array; /** * Returns all bodies whose bounds are inside (or outside if set) the given set of bounds, from the given set of bodies. @@ -3249,7 +3830,7 @@ declare namespace MatterJS { * @param {bool} [outside=false] * @return {body[]} The bodies matching the query */ - region (bodies: Array, bounds: Bounds, outside?: boolean): Array; + region (bodies: Array, bounds: Bounds, outside?: boolean): Array; /** * Returns all bodies whose vertices contain the given point, from the given set of bodies. @@ -3258,7 +3839,7 @@ declare namespace MatterJS { * @param {vector} point * @return {body[]} The bodies matching the query */ - point (bodies: Array, point: Vector): Array; + point (bodies: Array, point: Vector): Array; } @@ -3281,7 +3862,7 @@ declare namespace MatterJS { * @method create * @param {} options */ - static create (options:IRunnerOptions): Runner; + static create (options: IRunnerOptions): Runner; /** * Continuously ticks a `Matter.Engine` by calling `Runner.tick` on the `requestAnimationFrame` event. @@ -3365,13 +3946,13 @@ declare namespace MatterJS { */ class Sleeping { - static set (body: IBodyDefinition, isSleeping: boolean): void; + static set (body: BodyType, isSleeping: boolean): void; } class SleepingFactory { - set (body: IBodyDefinition, isSleeping: boolean): void; + set (body: BodyType, isSleeping: boolean): void; } @@ -3435,7 +4016,7 @@ declare namespace MatterJS { * @param {number} y * @return {vector} A new vector */ - static create(x?: number, y?: number): Vector; + static create (x?: number, y?: number): Vector; /** * Returns a new vector with `x` and `y` copied from the given `vector`. @@ -3443,7 +4024,7 @@ declare namespace MatterJS { * @param {vector} vector * @return {vector} A new cloned vector */ - static clone(vector: Vector): Vector; + static clone (vector: Vector): Vector; /** * Returns the cross-product of three vectors. @@ -3453,7 +4034,7 @@ declare namespace MatterJS { * @param {vector} vectorC * @return {number} The cross product of the three vectors */ - static cross3(vectorA: Vector, vectorB: Vector, vectorC: Vector):number; + static cross3 (vectorA: Vector, vectorB: Vector, vectorC: Vector): number; /** * Adds the two vectors. @@ -3463,7 +4044,7 @@ declare namespace MatterJS { * @param {vector} [output] * @return {vector} A new vector of vectorA and vectorB added */ - static add(vectorA: Vector, vectorB: Vector, output?: Vector): Vector; + static add (vectorA: Vector, vectorB: Vector, output?: Vector): Vector; /** * Returns the angle in radians between the two vectors relative to the x-axis. @@ -3472,7 +4053,7 @@ declare namespace MatterJS { * @param {vector} vectorB * @return {number} The angle in radians */ - static angle(vectorA: Vector, vectorB: Vector): number; + static angle (vectorA: Vector, vectorB: Vector): number; /** * Returns the cross-product of two vectors. @@ -3481,7 +4062,7 @@ declare namespace MatterJS { * @param {vector} vectorB * @return {number} The cross product of the two vectors */ - static cross(vectorA: Vector, vectorB: Vector): number; + static cross (vectorA: Vector, vectorB: Vector): number; /** * Divides a vector and a scalar. @@ -3490,7 +4071,7 @@ declare namespace MatterJS { * @param {number} scalar * @return {vector} A new vector divided by scalar */ - static div(vector: Vector, scalar: number): Vector; + static div (vector: Vector, scalar: number): Vector; /** * Returns the dot-product of two vectors. @@ -3499,7 +4080,7 @@ declare namespace MatterJS { * @param {vector} vectorB * @return {number} The dot product of the two vectors */ - static dot(vectorA: Vector, vectorB: Vector): Number; + static dot (vectorA: Vector, vectorB: Vector): Number; /** * Returns the magnitude (length) of a vector. @@ -3507,7 +4088,7 @@ declare namespace MatterJS { * @param {vector} vector * @return {number} The magnitude of the vector */ - static magnitude(vector: Vector): number; + static magnitude (vector: Vector): number; /** * Returns the magnitude (length) of a vector (therefore saving a `sqrt` operation). @@ -3515,7 +4096,7 @@ declare namespace MatterJS { * @param {vector} vector * @return {number} The squared magnitude of the vector */ - static magnitudeSquared(vector: Vector): number; + static magnitudeSquared (vector: Vector): number; /** * Multiplies a vector and a scalar. @@ -3524,7 +4105,7 @@ declare namespace MatterJS { * @param {number} scalar * @return {vector} A new vector multiplied by scalar */ - static mult(vector: Vector, scalar: number): Vector; + static mult (vector: Vector, scalar: number): Vector; /** * Negates both components of a vector such that it points in the opposite direction. @@ -3532,7 +4113,7 @@ declare namespace MatterJS { * @param {vector} vector * @return {vector} The negated vector */ - static neg(vector: Vector): Vector; + static neg (vector: Vector): Vector; /** * Normalises a vector (such that its magnitude is `1`). @@ -3540,7 +4121,7 @@ declare namespace MatterJS { * @param {vector} vector * @return {vector} A new vector normalised */ - static normalise(vector: Vector): Vector; + static normalise (vector: Vector): Vector; /** * Returns the perpendicular vector. Set `negate` to true for the perpendicular in the opposite direction. @@ -3549,7 +4130,7 @@ declare namespace MatterJS { * @param {bool} [negate=false] * @return {vector} The perpendicular vector */ - static perp(vector: Vector, negate?: boolean): Vector; + static perp (vector: Vector, negate?: boolean): Vector; /** * Rotates the vector about (0, 0) by specified angle. @@ -3558,7 +4139,7 @@ declare namespace MatterJS { * @param {number} angle * @return {vector} A new vector rotated about (0, 0) */ - static rotate(vector: Vector, angle: number): Vector; + static rotate (vector: Vector, angle: number): Vector; /** * Rotates the vector about a specified point by specified angle. @@ -3569,7 +4150,7 @@ declare namespace MatterJS { * @param {vector} [output] * @return {vector} A new vector rotated about the point */ - static rotateAbout(vector: Vector, angle: number, point: Vector, output?: Vector): Vector; + static rotateAbout (vector: Vector, angle: number, point: Vector, output?: Vector): Vector; /** * Subtracts the two vectors. @@ -3579,7 +4160,7 @@ declare namespace MatterJS { * @param {vector} [output] * @return {vector} A new vector of vectorA and vectorB subtracted */ - static sub(vectorA: Vector, vectorB: Vector, optional?: Vector): Vector; + static sub (vectorA: Vector, vectorB: Vector, optional?: Vector): Vector; } @@ -3592,7 +4173,7 @@ declare namespace MatterJS { * @param {number} y * @return {vector} A new vector */ - create(x?: number, y?: number): Vector; + create (x?: number, y?: number): Vector; /** * Returns a new vector with `x` and `y` copied from the given `vector`. @@ -3600,7 +4181,7 @@ declare namespace MatterJS { * @param {vector} vector * @return {vector} A new cloned vector */ - clone(vector: Vector): Vector; + clone (vector: Vector): Vector; /** * Returns the cross-product of three vectors. @@ -3610,7 +4191,7 @@ declare namespace MatterJS { * @param {vector} vectorC * @return {number} The cross product of the three vectors */ - cross3(vectorA: Vector, vectorB: Vector, vectorC: Vector):number; + cross3 (vectorA: Vector, vectorB: Vector, vectorC: Vector): number; /** * Adds the two vectors. @@ -3620,7 +4201,7 @@ declare namespace MatterJS { * @param {vector} [output] * @return {vector} A new vector of vectorA and vectorB added */ - add(vectorA: Vector, vectorB: Vector, output?: Vector): Vector; + add (vectorA: Vector, vectorB: Vector, output?: Vector): Vector; /** * Returns the angle in radians between the two vectors relative to the x-axis. @@ -3629,7 +4210,7 @@ declare namespace MatterJS { * @param {vector} vectorB * @return {number} The angle in radians */ - angle(vectorA: Vector, vectorB: Vector): number; + angle (vectorA: Vector, vectorB: Vector): number; /** * Returns the cross-product of two vectors. @@ -3638,7 +4219,7 @@ declare namespace MatterJS { * @param {vector} vectorB * @return {number} The cross product of the two vectors */ - cross(vectorA: Vector, vectorB: Vector): number; + cross (vectorA: Vector, vectorB: Vector): number; /** * Divides a vector and a scalar. @@ -3647,7 +4228,7 @@ declare namespace MatterJS { * @param {number} scalar * @return {vector} A new vector divided by scalar */ - div(vector: Vector, scalar: number): Vector; + div (vector: Vector, scalar: number): Vector; /** * Returns the dot-product of two vectors. @@ -3656,7 +4237,7 @@ declare namespace MatterJS { * @param {vector} vectorB * @return {number} The dot product of the two vectors */ - dot(vectorA: Vector, vectorB: Vector): Number; + dot (vectorA: Vector, vectorB: Vector): number; /** * Returns the magnitude (length) of a vector. @@ -3664,7 +4245,7 @@ declare namespace MatterJS { * @param {vector} vector * @return {number} The magnitude of the vector */ - magnitude(vector: Vector): number; + magnitude (vector: Vector): number; /** * Returns the magnitude (length) of a vector (therefore saving a `sqrt` operation). @@ -3672,7 +4253,7 @@ declare namespace MatterJS { * @param {vector} vector * @return {number} The squared magnitude of the vector */ - magnitudeSquared(vector: Vector): number; + magnitudeSquared (vector: Vector): number; /** * Multiplies a vector and a scalar. @@ -3681,7 +4262,7 @@ declare namespace MatterJS { * @param {number} scalar * @return {vector} A new vector multiplied by scalar */ - mult(vector: Vector, scalar: number): Vector; + mult (vector: Vector, scalar: number): Vector; /** * Negates both components of a vector such that it points in the opposite direction. @@ -3689,7 +4270,7 @@ declare namespace MatterJS { * @param {vector} vector * @return {vector} The negated vector */ - neg(vector: Vector): Vector; + neg (vector: Vector): Vector; /** * Normalises a vector (such that its magnitude is `1`). @@ -3697,7 +4278,7 @@ declare namespace MatterJS { * @param {vector} vector * @return {vector} A new vector normalised */ - normalise(vector: Vector): Vector; + normalise (vector: Vector): Vector; /** * Returns the perpendicular vector. Set `negate` to true for the perpendicular in the opposite direction. @@ -3706,7 +4287,7 @@ declare namespace MatterJS { * @param {bool} [negate=false] * @return {vector} The perpendicular vector */ - perp(vector: Vector, negate?: boolean): Vector; + perp (vector: Vector, negate?: boolean): Vector; /** * Rotates the vector about (0, 0) by specified angle. @@ -3715,7 +4296,7 @@ declare namespace MatterJS { * @param {number} angle * @return {vector} A new vector rotated about (0, 0) */ - rotate(vector: Vector, angle: number): Vector; + rotate (vector: Vector, angle: number): Vector; /** * Rotates the vector about a specified point by specified angle. @@ -3726,7 +4307,7 @@ declare namespace MatterJS { * @param {vector} [output] * @return {vector} A new vector rotated about the point */ - rotateAbout(vector: Vector, angle: number, point: Vector, output?: Vector): Vector; + rotateAbout (vector: Vector, angle: number, point: Vector, output?: Vector): Vector; /** * Subtracts the two vectors. @@ -3736,7 +4317,7 @@ declare namespace MatterJS { * @param {vector} [output] * @return {vector} A new vector of vectorA and vectorB subtracted */ - sub(vectorA: Vector, vectorB: Vector, optional?: Vector): Vector; + sub (vectorA: Vector, vectorB: Vector, optional?: Vector): Vector; } @@ -3836,7 +4417,7 @@ declare namespace MatterJS { * @param {vector[]} points * @param {body} body */ - static create (points: Array, body: Body): void; + static create (points: Array, body: BodyType): Array; /** * Parses a string containing ordered x y pairs separated by spaces (and optionally commas), @@ -3847,7 +4428,7 @@ declare namespace MatterJS { * @param {body} body * @return {vertices} vertices */ - static fromPath (path: string, body: Body): Array; + static fromPath (path: string, body: BodyType): Array; /** * Returns the moment of inertia (second moment of area) of the set of vertices given the total mass. @@ -3975,7 +4556,7 @@ declare namespace MatterJS { * @param {vector[]} points * @param {body} body */ - create (points: Array, body: Body): void; + create (points: Array, body: BodyType): Array; /** * Parses a string containing ordered x y pairs separated by spaces (and optionally commas), @@ -3986,7 +4567,7 @@ declare namespace MatterJS { * @param {body} body * @return {vertices} vertices */ - fromPath (path: string, body: Body): Array; + fromPath (path: string, body: BodyType): Array; /** * Returns the moment of inertia (second moment of area) of the set of vertices given the total mass. @@ -4047,7 +4628,7 @@ declare namespace MatterJS { * @param body * @returns world */ - static add (world: World, body: IBodyDefinition | Array | ICompositeDefinition | Array | IConstraintDefinition | Array | MouseConstraint): World; + static add (world: World, body: BodyType | Array | CompositeType | Array | ConstraintType | Array | MouseConstraint): World; /** * An alias for Composite.addBody since World is also a Composite @@ -4056,7 +4637,7 @@ declare namespace MatterJS { * @param {body} body * @return {world} The original world with the body added */ - static addBody (world: World, body: IBodyDefinition): World; + static addBody (world: World, body: BodyType): World; /** * An alias for Composite.add since World is also a Composite @@ -4065,7 +4646,7 @@ declare namespace MatterJS { * @param {composite} composite * @return {world} The original world with the objects from composite added */ - static addComposite (world: World, composite: ICompositeDefinition): World; + static addComposite (world: World, composite: CompositeType): World; /** * An alias for Composite.addConstraint since World is also a Composite @@ -4074,7 +4655,7 @@ declare namespace MatterJS { * @param {constraint} constraint * @return {world} The original world with the constraint added */ - static addConstraint (world: World, constraint: IConstraintDefinition): World; + static addConstraint (world: World, constraint: ConstraintType): World; /** * An alias for Composite.clear since World is also a Composite @@ -4095,6 +4676,7 @@ declare namespace MatterJS { static create (options: IWorldDefinition): World; gravity: Gravity; + bounds: Bounds; } @@ -4110,7 +4692,7 @@ declare namespace MatterJS { * @param {} event.source The source object of the event * @param {} event.name The name of the event */ - static on (obj: Body, name: "sleepStart", callback: (e: IEvent) => void): void; + static on (obj: BodyType, name: "sleepStart", callback: (e: IEvent) => void): void; /** * Fired when a body ends sleeping (where `this` is the body). @@ -4121,7 +4703,7 @@ declare namespace MatterJS { * @param {} event.source The source object of the event * @param {} event.name The name of the event */ - static on (obj: Body, name: "sleepEnd", callback: (e: IEvent) => void): void; + static on (obj: BodyType, name: "sleepEnd", callback: (e: IEvent) => void): void; /** * Fired when a call to `Composite.add` is made, before objects have been added. @@ -4132,7 +4714,7 @@ declare namespace MatterJS { * @param {} event.source The source object of the event * @param {} event.name The name of the event */ - static on (obj: Engine, name: "beforeAdd", callback: (e: IEventComposite) => void): void; + static on (obj: Engine, name: "beforeAdd", callback: (e: IEventComposite) => void): void; /** * Fired when a call to `Composite.add` is made, after objects have been added. @@ -4143,7 +4725,7 @@ declare namespace MatterJS { * @param {} event.source The source object of the event * @param {} event.name The name of the event */ - static on (obj: Engine, name: "afterAdd", callback: (e: IEventComposite) => void): void; + static on (obj: Engine, name: "afterAdd", callback: (e: IEventComposite) => void): void; /** * Fired when a call to `Composite.remove` is made, before objects have been removed. @@ -4154,7 +4736,7 @@ declare namespace MatterJS { * @param {} event.source The source object of the event * @param {} event.name The name of the event */ - static on (obj: Engine, name: "beforeRemove", callback: (e: IEventComposite) => void): void; + static on (obj: Engine, name: "beforeRemove", callback: (e: IEventComposite) => void): void; /** * Fired when a call to `Composite.remove` is made, after objects have been removed. @@ -4165,7 +4747,7 @@ declare namespace MatterJS { * @param {} event.source The source object of the event * @param {} event.name The name of the event */ - static on (obj: Engine, name: "afterRemove", callback: (e: IEventComposite) => void): void; + static on (obj: Engine, name: "afterRemove", callback: (e: IEventComposite) => void): void; /** * Fired after engine update and all collision events @@ -4280,30 +4862,6 @@ declare namespace MatterJS { */ static on (obj: Engine, name: "afterRender", callback: (e: IEventTimestamped) => void): void; - /** - * Fired when the mouse is down (or a touch has started) during the last step - * @param obj - * @param name - * @param callback - */ - static on (obj: MouseConstraint, name: "mousedown", callback: (e: any) => void): void; - - /** - * Fired when the mouse has moved (or a touch moves) during the last step - * @param obj - * @param name - * @param callback - */ - static on (obj: MouseConstraint, name: "mousemove", callback: (e: any) => void): void; - - /** - * Fired when the mouse is up (or a touch has ended) during the last step - * @param obj - * @param name - * @param callback - */ - static on (obj: MouseConstraint, name: "mouseup", callback: (e: any) => void): void; - static on (obj: any, name: string, callback: (e: any) => void): void; /** @@ -4407,7 +4965,7 @@ declare namespace MatterJS { * @param module {} The module. * @return {object} A dependency graph. */ - static dependencies (module: Dependency, tracked?: {[_: string]: string[]}): {[_: string]: string[]} | string | undefined + static dependencies (module: Dependency, tracked?: {[_: string]: string[]}): {[_: string]: string[]} | string | undefined; /** * Parses a dependency string into its components. From a72668b4198af97eac0e75c94957bf9c58d5f13d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 14 Jan 2020 17:15:11 +0000 Subject: [PATCH 150/189] Regenerated with new Matter types --- types/phaser.d.ts | 163 +++++++++++++++++++++++----------------------- 1 file changed, 82 insertions(+), 81 deletions(-) diff --git a/types/phaser.d.ts b/types/phaser.d.ts index fbb0bafb7..4a01f8707 100644 --- a/types/phaser.d.ts +++ b/types/phaser.d.ts @@ -55470,7 +55470,7 @@ declare namespace Phaser { } namespace Matter { - type MatterBody = MatterJS.Body | Phaser.GameObjects.GameObject | Phaser.Physics.Matter.Image | Phaser.Physics.Matter.Sprite | Phaser.Physics.Matter.TileBody; + type MatterBody = MatterJS.BodyType | Phaser.GameObjects.GameObject | Phaser.Physics.Matter.Image | Phaser.Physics.Matter.Sprite | Phaser.Physics.Matter.TileBody; type MatterBodyConfig = { /** @@ -55480,7 +55480,7 @@ declare namespace Phaser { /** * An array of bodies that make up this body. The first body in the array must always be a self reference to the current body instance. All bodies in the `parts` array together form a single rigid compound body. */ - parts?: MatterJS.Body[]; + parts?: MatterJS.BodyType[]; /** * An object reserved for storing plugin-specific properties. */ @@ -55684,15 +55684,15 @@ declare namespace Phaser { /** * A reference to the first body involved in the collision. */ - bodyA: MatterJS.Body; + bodyA: MatterJS.BodyType; /** * A reference to the second body involved in the collision. */ - bodyB: MatterJS.Body; + bodyB: MatterJS.BodyType; /** * A reference to the dominant axis body. */ - axisBody: MatterJS.Body; + axisBody: MatterJS.BodyType; /** * The index of the dominant collision axis vector (edge normal) */ @@ -55704,11 +55704,11 @@ declare namespace Phaser { /** * A reference to the parent of Body A, or to Body A itself if it has no parent. */ - parentA: MatterJS.Body; + parentA: MatterJS.BodyType; /** * A reference to the parent of Body B, or to Body B itself if it has no parent. */ - parentB: MatterJS.Body; + parentB: MatterJS.BodyType; /** * The collision normal, facing away from Body A. */ @@ -55792,11 +55792,11 @@ declare namespace Phaser { /** * A reference to the first body involved in the collision. */ - bodyA: MatterJS.Body; + bodyA: MatterJS.BodyType; /** * A reference to the second body involved in the collision. */ - bodyB: MatterJS.Body; + bodyB: MatterJS.BodyType; /** * An array containing all of the active contacts between bodies A and B. */ @@ -55859,11 +55859,11 @@ declare namespace Phaser { /** * The first possible `Body` that this constraint is attached to. */ - bodyA?: MatterJS.Body; + bodyA?: MatterJS.BodyType; /** * The second possible `Body` that this constraint is attached to. */ - bodyB?: MatterJS.Body; + bodyB?: MatterJS.BodyType; /** * A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyA` if defined, otherwise a world-space position. */ @@ -56222,7 +56222,7 @@ declare namespace Phaser { /** * An existing Matter body to be used instead of creating a new one. */ - body?: MatterJS.Body; + body?: MatterJS.BodyType; /** * Whether or not the newly created body should be made static. This defaults to true since typically tiles should not be moved. */ @@ -57538,7 +57538,7 @@ declare namespace Phaser { /** * The number of milliseconds to delay before the tween will start. */ - delay?: number; + delay?: number | Function; /** * The duration of the tween in milliseconds. */ @@ -67498,7 +67498,7 @@ declare namespace Phaser { * @param body The Body this Game Object should use. * @param addToWorld Should the body be immediately added to the World? Default true. */ - setExistingBody(body: MatterJS.Body, addToWorld?: boolean): Phaser.GameObjects.GameObject; + setExistingBody(body: MatterJS.BodyType, addToWorld?: boolean): Phaser.GameObjects.GameObject; /** * Set this Game Object to create and use a new Body based on the configuration object given. * @@ -68032,7 +68032,7 @@ declare namespace Phaser { * @param height The height of the Body. * @param options An optional Body configuration object that is used to set initial Body properties on creation. */ - rectangle(x: number, y: number, width: number, height: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): MatterJS.Body; + rectangle(x: number, y: number, width: number, height: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): MatterJS.BodyType; /** * Creates a new rigid trapezoidal Body and adds it to the World. @@ -68043,7 +68043,7 @@ declare namespace Phaser { * @param slope The slope of the trapezoid. 0 creates a rectangle, while 1 creates a triangle. Positive values make the top side shorter, while negative values make the bottom side shorter. * @param options An optional Body configuration object that is used to set initial Body properties on creation. */ - trapezoid(x: number, y: number, width: number, height: number, slope: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): MatterJS.Body; + trapezoid(x: number, y: number, width: number, height: number, slope: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): MatterJS.BodyType; /** * Creates a new rigid circular Body and adds it to the World. @@ -68053,7 +68053,7 @@ declare namespace Phaser { * @param options An optional Body configuration object that is used to set initial Body properties on creation. * @param maxSides The maximum amount of sides to use for the polygon which will approximate this circle. */ - circle(x: number, y: number, radius: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig, maxSides?: number): MatterJS.Body; + circle(x: number, y: number, radius: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig, maxSides?: number): MatterJS.BodyType; /** * Creates a new rigid polygonal Body and adds it to the World. @@ -68063,7 +68063,7 @@ declare namespace Phaser { * @param radius The "radius" of the polygon, i.e. the distance from its center to any vertex. This is also the radius of its circumcircle. * @param options An optional Body configuration object that is used to set initial Body properties on creation. */ - polygon(x: number, y: number, sides: number, radius: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): MatterJS.Body; + polygon(x: number, y: number, sides: number, radius: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): MatterJS.BodyType; /** * Creates a body using the supplied vertices (or an array containing multiple sets of vertices) and adds it to the World. @@ -68076,7 +68076,7 @@ declare namespace Phaser { * @param removeCollinear Whether Matter.js will discard collinear edges (to improve performance). Default 0.01. * @param minimumArea During decomposition discard parts that have an area less than this. Default 10. */ - fromVertices(x: number, y: number, vertexSets: string | any[], options?: Phaser.Types.Physics.Matter.MatterBodyConfig, flagInternal?: boolean, removeCollinear?: number, minimumArea?: number): MatterJS.Body; + fromVertices(x: number, y: number, vertexSets: string | any[], options?: Phaser.Types.Physics.Matter.MatterBodyConfig, flagInternal?: boolean, removeCollinear?: number, minimumArea?: number): MatterJS.BodyType; /** * Creates a body using data exported from the application PhysicsEditor (https://www.codeandweb.com/physicseditor) @@ -68105,7 +68105,7 @@ declare namespace Phaser { * @param options An optional Body configuration object that is used to set initial Body properties on creation. * @param addToWorld Should the newly created body be immediately added to the World? Default true. */ - fromPhysicsEditor(x: number, y: number, config: any, options?: Phaser.Types.Physics.Matter.MatterBodyConfig, addToWorld?: boolean): MatterJS.Body; + fromPhysicsEditor(x: number, y: number, config: any, options?: Phaser.Types.Physics.Matter.MatterBodyConfig, addToWorld?: boolean): MatterJS.BodyType; /** * Creates a body using the path data from an SVG file. @@ -68133,7 +68133,7 @@ declare namespace Phaser { * @param options An optional Body configuration object that is used to set initial Body properties on creation. * @param addToWorld Should the newly created body be immediately added to the World? Default true. */ - fromSVG(x: number, y: number, xml: object, scale?: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig, addToWorld?: boolean): MatterJS.Body; + fromSVG(x: number, y: number, xml: object, scale?: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig, addToWorld?: boolean): MatterJS.BodyType; /** * Creates a body using the supplied physics data, as provided by a JSON file. @@ -68178,7 +68178,7 @@ declare namespace Phaser { * @param options An optional Body configuration object that is used to set initial Body properties on creation. * @param addToWorld Should the newly created body be immediately added to the World? Default true. */ - fromJSON(x: number, y: number, config: any, options?: Phaser.Types.Physics.Matter.MatterBodyConfig, addToWorld?: boolean): MatterJS.Body; + fromJSON(x: number, y: number, config: any, options?: Phaser.Types.Physics.Matter.MatterBodyConfig, addToWorld?: boolean): MatterJS.BodyType; /** * Create a new composite containing Matter Image objects created in a grid arrangement. @@ -68193,7 +68193,7 @@ declare namespace Phaser { * @param rowGap The distance between each row. Default 0. * @param options An optional Body configuration object that is used to set initial Body properties on creation. */ - imageStack(key: string, frame: string | integer, x: number, y: number, columns: number, rows: number, columnGap?: number, rowGap?: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): MatterJS.Composite; + imageStack(key: string, frame: string | integer, x: number, y: number, columns: number, rows: number, columnGap?: number, rowGap?: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): MatterJS.CompositeType; /** * Create a new composite containing bodies created in the callback in a grid arrangement. @@ -68207,7 +68207,7 @@ declare namespace Phaser { * @param rowGap The distance between each row. * @param callback The callback that creates the stack. */ - stack(x: number, y: number, columns: number, rows: number, columnGap: number, rowGap: number, callback: Function): MatterJS.Composite; + stack(x: number, y: number, columns: number, rows: number, columnGap: number, rowGap: number, callback: Function): MatterJS.CompositeType; /** * Create a new composite containing bodies created in the callback in a pyramid arrangement. @@ -68220,7 +68220,7 @@ declare namespace Phaser { * @param rowGap The distance between each row. * @param callback The callback function to be invoked. */ - pyramid(x: number, y: number, columns: number, rows: number, columnGap: number, rowGap: number, callback: Function): MatterJS.Composite; + pyramid(x: number, y: number, columns: number, rows: number, columnGap: number, rowGap: number, callback: Function): MatterJS.CompositeType; /** * Chains all bodies in the given composite together using constraints. @@ -68231,7 +68231,7 @@ declare namespace Phaser { * @param yOffsetB The vertical offset of the BodyB constraint. This is a percentage based on the body size, not a world position. * @param options An optional Constraint configuration object that is used to set initial Constraint properties on creation. */ - chain(composite: MatterJS.Composite, xOffsetA: number, yOffsetA: number, xOffsetB: number, yOffsetB: number, options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.Composite; + chain(composite: MatterJS.CompositeType, xOffsetA: number, yOffsetA: number, xOffsetB: number, yOffsetB: number, options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.CompositeType; /** * Connects bodies in the composite with constraints in a grid pattern, with optional cross braces. @@ -68241,7 +68241,7 @@ declare namespace Phaser { * @param crossBrace Create cross braces for the mesh as well? * @param options An optional Constraint configuration object that is used to set initial Constraint properties on creation. */ - mesh(composite: MatterJS.Composite, columns: number, rows: number, crossBrace: boolean, options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.Composite; + mesh(composite: MatterJS.CompositeType, columns: number, rows: number, crossBrace: boolean, options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.CompositeType; /** * Creates a composite with a Newton's Cradle setup of bodies and constraints. @@ -68251,7 +68251,7 @@ declare namespace Phaser { * @param size The radius of each ball in the cradle. * @param length The length of the 'string' the balls hang from. */ - newtonsCradle(x: number, y: number, number: number, size: number, length: number): MatterJS.Composite; + newtonsCradle(x: number, y: number, number: number, size: number, length: number): MatterJS.CompositeType; /** * Creates a composite with simple car setup of bodies and constraints. @@ -68261,7 +68261,7 @@ declare namespace Phaser { * @param height The height of the car chasis. * @param wheelSize The radius of the car wheels. */ - car(x: number, y: number, width: number, height: number, wheelSize: number): MatterJS.Composite; + car(x: number, y: number, width: number, height: number, wheelSize: number): MatterJS.CompositeType; /** * Creates a simple soft body like object. @@ -68276,7 +68276,7 @@ declare namespace Phaser { * @param particleOptions An optional Body configuration object that is used to set initial Body properties on creation. * @param constraintOptions An optional Constraint configuration object that is used to set initial Constraint properties on creation. */ - softBody(x: number, y: number, columns: number, rows: number, columnGap: number, rowGap: number, crossBrace: boolean, particleRadius: number, particleOptions?: Phaser.Types.Physics.Matter.MatterBodyConfig, constraintOptions?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.Composite; + softBody(x: number, y: number, columns: number, rows: number, columnGap: number, rowGap: number, crossBrace: boolean, particleRadius: number, particleOptions?: Phaser.Types.Physics.Matter.MatterBodyConfig, constraintOptions?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.CompositeType; /** * This method is an alias for `Factory.constraint`. @@ -68299,7 +68299,7 @@ declare namespace Phaser { * @param stiffness A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. Default 1. * @param options An optional Constraint configuration object that is used to set initial Constraint properties on creation. */ - joint(bodyA: MatterJS.Body, bodyB: MatterJS.Body, length?: number, stiffness?: number, options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.Constraint; + joint(bodyA: MatterJS.BodyType, bodyB: MatterJS.BodyType, length?: number, stiffness?: number, options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.ConstraintType; /** * This method is an alias for `Factory.constraint`. @@ -68322,7 +68322,7 @@ declare namespace Phaser { * @param stiffness A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. Default 1. * @param options An optional Constraint configuration object that is used to set initial Constraint properties on creation. */ - spring(bodyA: MatterJS.Body, bodyB: MatterJS.Body, length?: number, stiffness?: number, options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.Constraint; + spring(bodyA: MatterJS.BodyType, bodyB: MatterJS.BodyType, length?: number, stiffness?: number, options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.ConstraintType; /** * Constraints (or joints) are used for specifying that a fixed distance must be maintained @@ -68343,7 +68343,7 @@ declare namespace Phaser { * @param stiffness A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. Default 1. * @param options An optional Constraint configuration object that is used to set initial Constraint properties on creation. */ - constraint(bodyA: MatterJS.Body, bodyB: MatterJS.Body, length?: number, stiffness?: number, options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.Constraint; + constraint(bodyA: MatterJS.BodyType, bodyB: MatterJS.BodyType, length?: number, stiffness?: number, options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.ConstraintType; /** * Constraints (or joints) are used for specifying that a fixed distance must be maintained @@ -68366,7 +68366,7 @@ declare namespace Phaser { * @param stiffness A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. Default 1. * @param options An optional Constraint configuration object that is used to set initial Constraint properties on creation. */ - worldConstraint(body: MatterJS.Body, length?: number, stiffness?: number, options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.Constraint; + worldConstraint(body: MatterJS.BodyType, length?: number, stiffness?: number, options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.ConstraintType; /** * This method is an alias for `Factory.pointerConstraint`. @@ -68381,7 +68381,7 @@ declare namespace Phaser { * the `options` object on creation. * @param options An optional Constraint configuration object that is used to set initial Constraint properties on creation. */ - mouseSpring(options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.Constraint; + mouseSpring(options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.ConstraintType; /** * A Pointer Constraint is a special type of constraint that allows you to click @@ -68394,7 +68394,7 @@ declare namespace Phaser { * the `options` object on creation. * @param options An optional Constraint configuration object that is used to set initial Constraint properties on creation. */ - pointerConstraint(options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.Constraint; + pointerConstraint(options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.ConstraintType; /** * Creates a Matter Physics Image Game Object. @@ -69609,7 +69609,7 @@ declare namespace Phaser { * @param body The Body this Game Object should use. * @param addToWorld Should the body be immediately added to the World? Default true. */ - setExistingBody(body: MatterJS.Body, addToWorld?: boolean): Phaser.GameObjects.GameObject; + setExistingBody(body: MatterJS.BodyType, addToWorld?: boolean): Phaser.GameObjects.GameObject; /** * Set this Game Object to create and use a new Body based on the configuration object given. @@ -69806,7 +69806,7 @@ declare namespace Phaser { * A `Matter.Body` is a rigid body that can be simulated by a `Matter.Engine`. * Factories for commonly used body configurations (such as rectangles, circles and other polygons) can be found in the `Bodies` module. */ - body: MatterJS.Body; + body: MatterJS.BodyFactory; /** * A reference to the `Matter.Composite` module. @@ -69816,56 +69816,56 @@ declare namespace Phaser { * It is important to use the functions in this module to modify composites, rather than directly modifying their properties. * Note that the `Matter.World` object is also a type of `Matter.Composite` and as such all composite methods here can also operate on a `Matter.World`. */ - composite: MatterJS.Composite; + composite: MatterJS.CompositeFactory; /** * A reference to the `Matter.Detector` module. * * The `Matter.Detector` module contains methods for detecting collisions given a set of pairs. */ - detector: MatterJS.Detector; + detector: MatterJS.DetectorFactory; /** * A reference to the `Matter.Grid` module. * * The `Matter.Grid` module contains methods for creating and manipulating collision broadphase grid structures. */ - grid: MatterJS.Grid; + grid: MatterJS.GridFactory; /** * A reference to the `Matter.Pair` module. * * The `Matter.Pair` module contains methods for creating and manipulating collision pairs. */ - pair: MatterJS.Pair; + pair: MatterJS.PairFactory; /** * A reference to the `Matter.Pairs` module. * * The `Matter.Pairs` module contains methods for creating and manipulating collision pair sets. */ - pairs: MatterJS.Pairs; + pairs: MatterJS.PairsFactory; /** * A reference to the `Matter.Query` module. * * The `Matter.Query` module contains methods for performing collision queries. */ - query: MatterJS.Query; + query: MatterJS.QueryFactory; /** * A reference to the `Matter.Resolver` module. * * The `Matter.Resolver` module contains methods for resolving collision pairs. */ - resolver: MatterJS.Resolver; + resolver: MatterJS.ResolverFactory; /** * A reference to the `Matter.SAT` module. * * The `Matter.SAT` module contains methods for detecting collisions using the Separating Axis Theorem. */ - sat: MatterJS.SAT; + sat: MatterJS.SATFactory; /** * A reference to the `Matter.Constraint` module. @@ -69874,15 +69874,15 @@ declare namespace Phaser { * Constraints are used for specifying that a fixed distance must be maintained between two bodies (or a body and a fixed world-space position). * The stiffness of constraints can be modified to create springs or elastic. */ - constraint: MatterJS.Constraint; + constraint: MatterJS.ConstraintFactory; /** * A reference to the `Matter.Bodies` module. * - * The `Matter.Bodies` module contains factory methods for creating rigid body models + * The `Matter.Bodies` module contains factory methods for creating rigid bodies * with commonly used body configurations (such as rectangles, circles and other polygons). */ - bodies: MatterJS.Bodies; + bodies: MatterJS.BodiesFactory; /** * A reference to the `Matter.Composites` module. @@ -69890,21 +69890,21 @@ declare namespace Phaser { * The `Matter.Composites` module contains factory methods for creating composite bodies * with commonly used configurations (such as stacks and chains). */ - composites: MatterJS.Composites; + composites: MatterJS.CompositesFactory; /** * A reference to the `Matter.Axes` module. * * The `Matter.Axes` module contains methods for creating and manipulating sets of axes. */ - axes: MatterJS.Axes; + axes: MatterJS.AxesFactory; /** * A reference to the `Matter.Bounds` module. * * The `Matter.Bounds` module contains methods for creating and manipulating axis-aligned bounding boxes (AABB). */ - bounds: MatterJS.Bounds; + bounds: MatterJS.BoundsFactory; /** * A reference to the `Matter.Svg` module. @@ -69913,7 +69913,7 @@ declare namespace Phaser { * * To use this module you also need the SVGPathSeg polyfill: https://github.com/progers/pathseg */ - svg: MatterJS.Svg; + svg: MatterJS.SvgFactory; /** * A reference to the `Matter.Vector` module. @@ -69922,7 +69922,7 @@ declare namespace Phaser { * Vectors are the basis of all the geometry related operations in the engine. * A `Matter.Vector` object is of the form `{ x: 0, y: 0 }`. */ - vector: MatterJS.Vector; + vector: MatterJS.VectorFactory; /** * A reference to the `Matter.Vertices` module. @@ -69931,7 +69931,7 @@ declare namespace Phaser { * A set of vertices is an array of `Matter.Vector` with additional indexing properties inserted by `Vertices.create`. * A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull). */ - vertices: MatterJS.Vertices; + vertices: MatterJS.VerticesFactory; /** * A reference to the `Matter.Vertices` module. @@ -69940,7 +69940,7 @@ declare namespace Phaser { * A set of vertices is an array of `Matter.Vector` with additional indexing properties inserted by `Vertices.create`. * A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull). */ - verts: MatterJS.Vertices; + verts: MatterJS.VerticesFactory; /** * This internal method is called when this class starts and retrieves the final Matter World Config. @@ -70190,7 +70190,7 @@ declare namespace Phaser { * If the `bodies` argument is falsey, it will return all bodies in the world. * @param bodies An array of objects to extract the bodies from. If falsey, it will return all bodies in the world. */ - getMatterBodies(bodies?: any[]): MatterJS.Body[]; + getMatterBodies(bodies?: any[]): MatterJS.BodyType[]; /** * Sets both the horizontal and vertical linear velocity of the physics bodies. @@ -70258,7 +70258,7 @@ declare namespace Phaser { * Returns the length of the given constraint, which is the distance between the two points. * @param constraint The constraint to get the length from. */ - getConstraintLength(constraint: MatterJS.Constraint): number; + getConstraintLength(constraint: MatterJS.ConstraintType): number; /** * Aligns a Body, or Matter Game Object, against the given coordinates. @@ -71422,7 +71422,7 @@ declare namespace Phaser { * @param body The Body this Game Object should use. * @param addToWorld Should the body be immediately added to the World? Default true. */ - setExistingBody(body: MatterJS.Body, addToWorld?: boolean): Phaser.GameObjects.GameObject; + setExistingBody(body: MatterJS.BodyType, addToWorld?: boolean): Phaser.GameObjects.GameObject; /** * Set this Game Object to create and use a new Body based on the configuration object given. @@ -71576,7 +71576,7 @@ declare namespace Phaser { * @param body The new Matter body to use. * @param addToWorld Whether or not to add the body to the Matter world. Default true. */ - setBody(body: MatterJS.Body, addToWorld?: boolean): Phaser.Physics.Matter.TileBody; + setBody(body: MatterJS.BodyType, addToWorld?: boolean): Phaser.Physics.Matter.TileBody; /** * Removes the current body from the TileBody and from the Matter world @@ -71784,20 +71784,20 @@ declare namespace Phaser { * @param config The body configuration and fixture (child body) definitions, as exported by PhysicsEditor. * @param options An optional Body configuration object that is used to set initial Body properties on creation. */ - function parseBody(x: number, y: number, config: object, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): MatterJS.Body; + function parseBody(x: number, y: number, config: object, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): MatterJS.BodyType; /** * Parses an element of the "fixtures" list exported by PhysicsEditor * @param fixtureConfig The fixture object to parse. */ - function parseFixture(fixtureConfig: object): MatterJS.Body[]; + function parseFixture(fixtureConfig: object): MatterJS.BodyType[]; /** * Parses the "vertices" lists exported by PhysicsEditor. * @param vertexSets The vertex lists to parse. * @param options An optional Body configuration object that is used to set initial Body properties on creation. */ - function parseVertices(vertexSets: any[], options?: Phaser.Types.Physics.Matter.MatterBodyConfig): MatterJS.Body[]; + function parseVertices(vertexSets: any[], options?: Phaser.Types.Physics.Matter.MatterBodyConfig): MatterJS.BodyType[]; } @@ -71847,7 +71847,7 @@ declare namespace Phaser { * @param config The body configuration data. * @param options An optional Body configuration object that is used to set initial Body properties on creation. */ - function parseBody(x: number, y: number, config: object, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): MatterJS.Body; + function parseBody(x: number, y: number, config: object, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): MatterJS.BodyType; } @@ -71909,17 +71909,17 @@ declare namespace Phaser { /** * The body that is currently being dragged, if any. */ - body: MatterJS.Body; + body: MatterJS.BodyType; /** * The part of the body that was clicked on to start the drag. */ - part: MatterJS.Body; + part: MatterJS.BodyType; /** * The native Matter Constraint that is used to attach to bodies. */ - constraint: MatterJS.Constraint; + constraint: MatterJS.ConstraintType; /** * A Pointer has been pressed down onto the Scene. @@ -71951,7 +71951,7 @@ declare namespace Phaser { * @param body The Matter Body to check. * @param position A translated hit test position. */ - hitTestBody(body: MatterJS.Body, position: Phaser.Math.Vector2): boolean; + hitTestBody(body: MatterJS.BodyType, position: Phaser.Math.Vector2): boolean; /** * Internal update handler. Called in the Matter BEFORE_UPDATE step. @@ -72102,7 +72102,7 @@ declare namespace Phaser { * `setConstraintRenderStyle` methods accordingly. * @param composite The Matter Composite to set the render style on. */ - setCompositeRenderStyle(composite: MatterJS.Composite): this; + setCompositeRenderStyle(composite: MatterJS.CompositeType): this; /** * Sets the debug render style for the given Matter Body. @@ -72121,7 +72121,7 @@ declare namespace Phaser { * @param fillColor The fill color. If `null` it will use the World Debug Config value. * @param fillOpacity The fill opacity, between 0 and 1. If `null` it will use the World Debug Config value. */ - setBodyRenderStyle(body: MatterJS.Body, lineColor?: number, lineOpacity?: number, lineThickness?: number, fillColor?: number, fillOpacity?: number): this; + setBodyRenderStyle(body: MatterJS.BodyType, lineColor?: number, lineOpacity?: number, lineThickness?: number, fillColor?: number, fillOpacity?: number): this; /** * Sets the debug render style for the given Matter Constraint. @@ -72141,7 +72141,7 @@ declare namespace Phaser { * @param anchorColor The color used when rendering this constraints anchors. If `null` it will use the World Debug Config value. * @param anchorSize The size of the anchor circle, if this constraint has anchors. If `null` it will use the World Debug Config value. */ - setConstraintRenderStyle(constraint: MatterJS.Constraint, lineColor?: number, lineOpacity?: number, lineThickness?: number, pinSize?: number, anchorColor?: number, anchorSize?: number): this; + setConstraintRenderStyle(constraint: MatterJS.ConstraintType, lineColor?: number, lineOpacity?: number, lineThickness?: number, pinSize?: number, anchorColor?: number, anchorSize?: number): this; /** * This internal method acts as a proxy between all of the Matter JS events and then re-emits them @@ -72215,7 +72215,7 @@ declare namespace Phaser { * @param height The height of the body. * @param options Optional Matter configuration object. */ - create(x: number, y: number, width: number, height: number, options: object): MatterJS.Body; + create(x: number, y: number, width: number, height: number, options: object): MatterJS.BodyType; /** * Adds a Matter JS object, or array of objects, to the world. @@ -72245,7 +72245,7 @@ declare namespace Phaser { * @param constraint A Matter JS Constraint, or an array of constraints, to be removed. * @param deep Optionally search the objects children and recursively remove those as well. Default false. */ - removeConstraint(constraint: MatterJS.Constraint | MatterJS.Constraint[], deep?: boolean): this; + removeConstraint(constraint: MatterJS.ConstraintType | MatterJS.ConstraintType[], deep?: boolean): this; /** * Adds `MatterTileBody` instances for all the colliding tiles within the given tilemap layer. @@ -72346,22 +72346,22 @@ declare namespace Phaser { * Returns `true` if the given body can be found within the World. * @param body The Matter Body, or Game Object, to search for within the world. */ - has(body: MatterJS.Body | Phaser.GameObjects.GameObject): MatterJS.Body[]; + has(body: MatterJS.Body | Phaser.GameObjects.GameObject): MatterJS.BodyType[]; /** * Returns all the bodies in the Matter World, including all bodies in children, recursively. */ - getAllBodies(): MatterJS.Body[]; + getAllBodies(): MatterJS.BodyType[]; /** * Returns all the constraints in the Matter World, including all constraints in children, recursively. */ - getAllConstraints(): MatterJS.Constraint[]; + getAllConstraints(): MatterJS.ConstraintType[]; /** * Returns all the composites in the Matter World, including all composites in children, recursively. */ - getAllComposites(): MatterJS.Composite[]; + getAllComposites(): MatterJS.CompositeType[]; /** * Renders the Engine Broadphase Controller Grid to the given Graphics instance. @@ -72466,7 +72466,7 @@ declare namespace Phaser { * @param fillColor The fill color. * @param fillOpacity The fill opacity, between 0 and 1. */ - renderBody(body: MatterJS.Body, graphics: Phaser.GameObjects.Graphics, showInternalEdges: boolean, lineColor?: number, lineOpacity?: number, lineThickness?: number, fillColor?: number, fillOpacity?: number): this; + renderBody(body: MatterJS.BodyType, graphics: Phaser.GameObjects.Graphics, showInternalEdges: boolean, lineColor?: number, lineOpacity?: number, lineThickness?: number, fillColor?: number, fillOpacity?: number): this; /** * Renders the Convex Hull for a single Matter Body to the given Phaser Graphics Game Object. @@ -72478,7 +72478,7 @@ declare namespace Phaser { * @param hullColor The color used to render the hull. * @param lineThickness The hull line thickness. Default 1. */ - renderConvexHull(body: MatterJS.Body, graphics: Phaser.GameObjects.Graphics, hullColor: number, lineThickness?: number): this; + renderConvexHull(body: MatterJS.BodyType, graphics: Phaser.GameObjects.Graphics, hullColor: number, lineThickness?: number): this; /** * Renders a single Matter Constraint, such as a Pin or a Spring, to the given Phaser Graphics Game Object. @@ -72494,7 +72494,7 @@ declare namespace Phaser { * @param anchorColor The color used when rendering this constraints anchors. Set to `null` to not render anchors. * @param anchorSize The size of the anchor circle, if this constraint has anchors and is rendering them. */ - renderConstraint(constraint: MatterJS.Constraint, graphics: Phaser.GameObjects.Graphics, lineColor: number, lineOpacity: number, lineThickness: number, pinSize: number, anchorColor: number, anchorSize: number): this; + renderConstraint(constraint: MatterJS.ConstraintType, graphics: Phaser.GameObjects.Graphics, lineColor: number, lineOpacity: number, lineThickness: number, pinSize: number, anchorColor: number, anchorSize: number): this; /** * Resets the internal collision IDs that Matter.JS uses for Body collision groups. @@ -87029,9 +87029,10 @@ declare namespace Phaser { * delay: this.tweens.stagger(500, { grid: [ 10, 6 ], from: 'center', ease: 'cubic.out' }) * }); * ``` + * @param value The amount to stagger by, or an array containing two elements representing the min and max values to stagger between. * @param config The configuration object for the Stagger function. */ - stagger(config: Phaser.Types.Tweens.StaggerConfig): Function; + stagger(value: number | number[], config: Phaser.Types.Tweens.StaggerConfig): Function; /** * Updates the Tween Manager's internal lists at the start of the frame. From 6a35f2c52ebbee3fbabf578c99d3a63bf022b90d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 14 Jan 2020 17:42:55 +0000 Subject: [PATCH 151/189] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 164360a94..4cd554fbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ All of the following are specific to the Matter Physics implementation used by P #### Matter Physics New Features * Matter Physics now has 100% JSDoc coverage! Woohoo :) +* Matter Physics now has brand new TypeScript defs included in the `types` folder :) * `MatterDebugConfig` is a new configuration object that contains all of the following new Matter debug settings: * `showAxes`- Render all of the body axes? * `showAngleIndicator`- Render just a single body axis? From 32c01038e0e8b183f966b3759bddb5452ae752da Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 14 Jan 2020 22:16:41 +0000 Subject: [PATCH 152/189] `FacebookInstantGamesPlugin.showAd` and `showVideo` will now break out of the ad iteration search once a valid ad has been found and called. Previously, it would carry on interating if the async didn't complete quickly. Fix #4888 --- plugins/fbinstant/src/FacebookInstantGamesPlugin.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/fbinstant/src/FacebookInstantGamesPlugin.js b/plugins/fbinstant/src/FacebookInstantGamesPlugin.js index 98639eb28..4332132e9 100644 --- a/plugins/fbinstant/src/FacebookInstantGamesPlugin.js +++ b/plugins/fbinstant/src/FacebookInstantGamesPlugin.js @@ -2148,6 +2148,8 @@ var FacebookInstantGamesPlugin = new Class({ _this.emit('adshowerror', e, ad); }); + + break; } } @@ -2197,6 +2199,8 @@ var FacebookInstantGamesPlugin = new Class({ _this.emit('adshowerror', e, ad); }); + + break; } } From a068af2845a0250a1963e10e2cfe4ec728f305f4 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 14 Jan 2020 22:16:44 +0000 Subject: [PATCH 153/189] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cd554fbf..c491918d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -229,6 +229,7 @@ All of the following are specific to the Matter Physics implementation used by P * External calls to the Fullscreen API using `element.requestFullscreen()` would be blocked by the Scale Manager. The Scale Manager will no longer call `stopFullScreen` should it be triggered outside of Phaser (thanks @AdamXA) * The `Tilemaps.Tile.tint` property wasn't working correctly as it expected the colors in the wrong order (BGR instead of RGB). It will now expect them in the correct RGB order (thanks @Aedalus @plissken2013es) * The `ScaleManager.destroy` method wasn't being called when the Game `DESTROY` event was dispatched, causing minor gc to build up. The destroy method will now be called properly on game destruction. Fix #4944 (thanks @sunshineuoow) +* `FacebookInstantGamesPlugin.showAd` and `showVideo` will now break out of the ad iteration search once a valid ad has been found and called. Previously, it would carry on interating if the async didn't complete quickly. Fix #4888 (thanks @east62687) ### Examples, Documentation and TypeScript From a81c2ea1328d2d04534b8cbc137a1111a9e797bb Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 14 Jan 2020 22:42:14 +0000 Subject: [PATCH 154/189] When playing an Animation, if you were to play another, then pause it, then play another the internal `_paused` wouldn't get reset, preventing you from them pausing the animations from that point on. You can now play and pause animations at will. Fix #4835 --- src/gameobjects/components/Animation.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gameobjects/components/Animation.js b/src/gameobjects/components/Animation.js index 6d023ee8a..35924d529 100644 --- a/src/gameobjects/components/Animation.js +++ b/src/gameobjects/components/Animation.js @@ -526,6 +526,8 @@ var Animation = new Class({ this.forward = true; this._reverse = false; + this._paused = false; + this._wasPlaying = true; return this._startAnimation(key, startFrame); }, From 178a4929ab1e48ddfd62d7a9dfb54a02bfe06084 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 14 Jan 2020 22:42:16 +0000 Subject: [PATCH 155/189] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c491918d9..aac8c6d19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -230,6 +230,7 @@ All of the following are specific to the Matter Physics implementation used by P * The `Tilemaps.Tile.tint` property wasn't working correctly as it expected the colors in the wrong order (BGR instead of RGB). It will now expect them in the correct RGB order (thanks @Aedalus @plissken2013es) * The `ScaleManager.destroy` method wasn't being called when the Game `DESTROY` event was dispatched, causing minor gc to build up. The destroy method will now be called properly on game destruction. Fix #4944 (thanks @sunshineuoow) * `FacebookInstantGamesPlugin.showAd` and `showVideo` will now break out of the ad iteration search once a valid ad has been found and called. Previously, it would carry on interating if the async didn't complete quickly. Fix #4888 (thanks @east62687) +* When playing an Animation, if you were to play another, then pause it, then play another the internal `_paused` wouldn't get reset, preventing you from them pausing the animations from that point on. You can now play and pause animations at will. Fix #4835 (thanks @murteira) ### Examples, Documentation and TypeScript From fb7f66838acc190b93fc63a833da954d6e7aa430 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 14 Jan 2020 22:45:55 +0000 Subject: [PATCH 156/189] Marked width/height as readonly and added docs. Fix #4806 --- src/physics/arcade/Body.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/physics/arcade/Body.js b/src/physics/arcade/Body.js index c39597f5d..3ca732eee 100644 --- a/src/physics/arcade/Body.js +++ b/src/physics/arcade/Body.js @@ -190,7 +190,7 @@ var Body = new Class({ this.rotation = gameObject.angle; /** - * The Body's rotation, in degrees, during the previous step. + * The Body rotation, in degrees, during the previous step. * * @name Phaser.Physics.Arcade.Body#preRotation * @type {number} @@ -199,22 +199,26 @@ var Body = new Class({ this.preRotation = gameObject.angle; /** - * The width of the Body's boundary, in pixels. - * If the Body is circular, this is also the Body's diameter. + * The width of the Body boundary, in pixels. + * If the Body is circular, this is also the diameter. + * If you wish to change the width use the `Body.setSize` method. * * @name Phaser.Physics.Arcade.Body#width * @type {number} + * @readonly * @default 64 * @since 3.0.0 */ this.width = width; /** - * The height of the Body's boundary, in pixels. - * If the Body is circular, this is also the Body's diameter. + * The height of the Body boundary, in pixels. + * If the Body is circular, this is also the diameter. + * If you wish to change the height use the `Body.setSize` method. * * @name Phaser.Physics.Arcade.Body#height * @type {number} + * @readonly * @default 64 * @since 3.0.0 */ From 847abb0ef2de7f46b697d0870044ca003d24b9d5 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 14 Jan 2020 23:29:14 +0000 Subject: [PATCH 157/189] `Scene.Systems.getData` is a new method that will return any data that was sent to the Scene by another Scene, i.e. during a `run` or `launch` command. You can access it via `this.sys.getData()` from within your Scene. --- src/scene/Systems.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/scene/Systems.js b/src/scene/Systems.js index 0781ba3ad..a3524004c 100644 --- a/src/scene/Systems.js +++ b/src/scene/Systems.js @@ -535,6 +535,22 @@ var Systems = new Class({ return this; }, + /** + * Returns any data that was sent to this Scene by another Scene. + * + * The data is also passed to `Scene.init` and in various Scene events, but + * you can access it at any point via this method. + * + * @method Phaser.Scenes.Systems#getData + * @since 3.22.0 + * + * @return {any} + */ + getData: function () + { + return this.settings.data; + }, + /** * Is this Scene sleeping? * From 08c4ab0e4cde82c92533811e3db5088408d88cd8 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 14 Jan 2020 23:55:21 +0000 Subject: [PATCH 158/189] Added `internalCreateCallback` and `internalRemoveCallback` to a Group --- src/gameobjects/group/Group.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/gameobjects/group/Group.js b/src/gameobjects/group/Group.js index ad38211b3..65c7ad8ce 100644 --- a/src/gameobjects/group/Group.js +++ b/src/gameobjects/group/Group.js @@ -214,6 +214,28 @@ var Group = new Class({ */ this.createMultipleCallback = GetFastValue(config, 'createMultipleCallback', null); + /** + * A function to be called when adding or creating group members. + * For internal use only by a Group, or any class that extends it. + * + * @name Phaser.GameObjects.Group#internalCreateCallback + * @type {?Phaser.Types.GameObjects.Group.GroupCallback} + * @private + * @since 3.22.0 + */ + this.internalCreateCallback = null; + + /** + * A function to be called when removing group members. + * For internal use only by a Group, or any class that extends it. + * + * @name Phaser.GameObjects.Group#internalRemoveCallback + * @type {?Phaser.Types.GameObjects.Group.GroupCallback} + * @private + * @since 3.22.0 + */ + this.internalRemoveCallback = null; + if (config) { this.createMultiple(config); @@ -512,6 +534,11 @@ var Group = new Class({ this.children.set(child); + if (this.internalCreateCallback) + { + this.internalCreateCallback.call(this, child); + } + if (this.createCallback) { this.createCallback.call(this, child); @@ -586,6 +613,11 @@ var Group = new Class({ this.children.delete(child); + if (this.internalRemoveCallback) + { + this.internalRemoveCallback.call(this, child); + } + if (this.removeCallback) { this.removeCallback.call(this, child); From c3940e15c6e13af41f32b0f48e92e8162567c697 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 14 Jan 2020 23:57:48 +0000 Subject: [PATCH 159/189] `PhysicsGroup` now uses the new `internalCreateCallback` and `internalRemoveCallback` to handle its body creation and destruction, allowing you to use your own `createCallback` and `removeCallback` as defined in the Group config. Fix #4420 #4657 #4822 --- src/physics/arcade/PhysicsGroup.js | 31 ++++++------------------------ 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/src/physics/arcade/PhysicsGroup.js b/src/physics/arcade/PhysicsGroup.js index 2fcbee44f..01f9b8544 100644 --- a/src/physics/arcade/PhysicsGroup.js +++ b/src/physics/arcade/PhysicsGroup.js @@ -38,42 +38,20 @@ var PhysicsGroup = new Class({ function PhysicsGroup (world, scene, children, config) { - if (!children && !config) - { - config = { - createCallback: this.createCallbackHandler, - removeCallback: this.removeCallbackHandler - }; - } - else if (IsPlainObject(children)) + if (IsPlainObject(children)) { // children is a plain object, so swizzle them: config = children; children = null; - - config.createCallback = this.createCallbackHandler; - config.removeCallback = this.removeCallbackHandler; } else if (Array.isArray(children) && IsPlainObject(children[0])) { // children is an array of plain objects config = children[0]; - - var _this = this; - - children.forEach(function (singleConfig) - { - singleConfig.createCallback = _this.createCallbackHandler; - singleConfig.removeCallback = _this.removeCallbackHandler; - }); } - else + else if (config === undefined || children === undefined) { - // config is not defined and children is not a plain object nor an array of plain objects - config = { - createCallback: this.createCallbackHandler, - removeCallback: this.removeCallbackHandler - }; + config = {}; } /** @@ -147,6 +125,9 @@ var PhysicsGroup = new Class({ Group.call(this, scene, children, config); + this.internalCreateCallback = this.createCallbackHandler; + this.internalRemoveCallback = this.removeCallbackHandler; + /** * A textual representation of this Game Object. * Used internally by Phaser but is available for your own custom classes to populate. From ec2f103c09d8558c439478e313ed100226286f7d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 14 Jan 2020 23:57:51 +0000 Subject: [PATCH 160/189] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aac8c6d19..ad9db5cfb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -200,6 +200,9 @@ All of the following are specific to the Matter Physics implementation used by P * `ParticleEmitterManager.removeEmitter` is a new method that will remove the given emitter from the manager, if the emitter belongs to it (thanks @samme) * `AlphaSingle` is a new Game Object Component that allows a Game Object to set its alpha values, but only as a single uniform value, not on a per-quad basis. * `Actions.AlignTo` (in combination with the new `Display.Align.To.QuickSet` function) allows you to align an array of Game Objects so they sit next to each other, one at a time. The first item isn't moved, the second is moved to sit next to the first, and so on. You can align them using any of the alignment constants (thanks @samme) +* `Scene.Systems.getData` is a new method that will return any data that was sent to the Scene by another Scene, i.e. during a `run` or `launch` command. You can access it via `this.sys.getData()` from within your Scene. +* `Group.internalCreateCallback` is a new optional callback that is invoked whenever a child is added to a Group. This is the same as `createCallback` except it's only for use by the parent class, allowing a parent to invoke a creation callback and for you to still provide one via the Group config. +* `Group.internalRemoveCallback` is a new optional callback that is invoked whenever a child is removed from a Group. This is the same as `removeCallback` except it's only for use by the parent class, allowing a parent to invoke a callback and for you to still provide one via the Group config. ### Updates @@ -218,6 +221,7 @@ All of the following are specific to the Matter Physics implementation used by P * The `TWEEN_UPDATE` event now sends two new parameters to the handler: `current` and `previous` which contain the current and previous property values. * During `collideSpriteVsGroup` checks it will now skip bodies that are disabled to save doing a `contains` test (thanks @samme) * `Display.Align.In.QuickSet` now accepts `LEFT_BOTTOM` as `BOTTOM_LEFT`, `LEFT_TOP` as `TOP_LEFT`, `RIGHT_BOTTOM` as `BOTTOM_RIGHT` and `RIGHT_TOP` as `TOP_RIGHT`. Fix #4927 (thanks @zaniar) +* `PhysicsGroup` now uses the new `internalCreateCallback` and `internalRemoveCallback` to handle its body creation and destruction, allowing you to use your own `createCallback` and `removeCallback` as defined in the Group config. Fix #4420 #4657 #4822 (thanks @S4n60w3n @kendistiller @scrubperson) ### Bug Fixes From 1ccfd8d68b3a483a8c3d71fb9b4ecf131b12ee4e Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 15 Jan 2020 00:31:57 +0000 Subject: [PATCH 161/189] In `Actions.GridAlign` if you set `width` to -1 it would align the items vertically, instead of horizontally. It now aligns them horizontally if `width` is set, or vertically if `height` is set. Fix #4899 --- src/actions/GridAlign.js | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/src/actions/GridAlign.js b/src/actions/GridAlign.js index e08a64727..b6ef9219c 100644 --- a/src/actions/GridAlign.js +++ b/src/actions/GridAlign.js @@ -30,10 +30,15 @@ var GridAlign = function (items, options) { if (options === undefined) { options = {}; } + var widthSet = options.hasOwnProperty('width'); + var heightSet = options.hasOwnProperty('height'); + var width = GetFastValue(options, 'width', -1); var height = GetFastValue(options, 'height', -1); + var cellWidth = GetFastValue(options, 'cellWidth', 1); var cellHeight = GetFastValue(options, 'cellHeight', cellWidth); + var position = GetFastValue(options, 'position', CONST.TOP_LEFT); var x = GetFastValue(options, 'x', 0); var y = GetFastValue(options, 'y', 0); @@ -50,31 +55,15 @@ var GridAlign = function (items, options) { AlignIn(items[i], tempZone, position); - if (width === -1) + if (widthSet && width === -1) { // We keep laying them out horizontally until we've done them all - cy += cellHeight; - tempZone.y += cellHeight; - - if (cy === h) - { - cy = 0; - tempZone.x += cellWidth; - tempZone.y = y; - } + tempZone.x += cellWidth; } - else if (height === -1) + else if (heightSet && height === -1) { // We keep laying them out vertically until we've done them all - cx += cellWidth; - tempZone.x += cellWidth; - - if (cx === w) - { - cx = 0; - tempZone.x = x; - tempZone.y += cellHeight; - } + tempZone.y += cellHeight; } else { From aed51569a48f2fd17b4b9d44c0b93d44fe6c0b71 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 15 Jan 2020 00:32:00 +0000 Subject: [PATCH 162/189] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad9db5cfb..f9059f5fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -235,6 +235,7 @@ All of the following are specific to the Matter Physics implementation used by P * The `ScaleManager.destroy` method wasn't being called when the Game `DESTROY` event was dispatched, causing minor gc to build up. The destroy method will now be called properly on game destruction. Fix #4944 (thanks @sunshineuoow) * `FacebookInstantGamesPlugin.showAd` and `showVideo` will now break out of the ad iteration search once a valid ad has been found and called. Previously, it would carry on interating if the async didn't complete quickly. Fix #4888 (thanks @east62687) * When playing an Animation, if you were to play another, then pause it, then play another the internal `_paused` wouldn't get reset, preventing you from them pausing the animations from that point on. You can now play and pause animations at will. Fix #4835 (thanks @murteira) +* In `Actions.GridAlign` if you set `width` to -1 it would align the items vertically, instead of horizontally. It now aligns them horizontally if `width` is set, or vertically if `height` is set. Fix #4899 (thanks @BenjaVR) ### Examples, Documentation and TypeScript From 3d144bd99e560bcf55a73b0d3d9931bbc8979e93 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 15 Jan 2020 10:29:09 +0000 Subject: [PATCH 163/189] JSDoc update. Fix #4955 --- src/sound/SoundManagerCreator.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sound/SoundManagerCreator.js b/src/sound/SoundManagerCreator.js index 84f456265..0e1b7d7b1 100644 --- a/src/sound/SoundManagerCreator.js +++ b/src/sound/SoundManagerCreator.js @@ -18,6 +18,8 @@ var WebAudioSoundManager = require('./webaudio/WebAudioSoundManager'); * @since 3.0.0 * * @param {Phaser.Game} game - Reference to the current game instance. + * + * @return {(Phaser.Sound.HTML5AudioSoundManager|Phaser.Sound.WebAudioSoundManager|Phaser.Sound.NoAudioSoundManager)} The Sound Manager instance that was created. */ var SoundManagerCreator = { From d419428604013cda5f6f330f6eeec1da24fa1ea4 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 15 Jan 2020 10:29:12 +0000 Subject: [PATCH 164/189] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9059f5fc..67a6fe94c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -241,7 +241,7 @@ All of the following are specific to the Matter Physics implementation used by P My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs: -@fselcukcan Bambosh @louisth @hexus @javigaralva @samme @BeLi4L @jcyuan @javigaralva @T-Grave @bramp @Chnapy @dranitski +@fselcukcan Bambosh @louisth @hexus @javigaralva @samme @BeLi4L @jcyuan @javigaralva @T-Grave @bramp @Chnapy @dranitski @RollinSafary The Matter TypeScript defs have been updated to include lots of missing classes, removed some redundant elements and general fixes. The Phaser TypeScript defs now reference the Matter defs directly and no longer try to parse them from the JSDocs. This allows the `MatterJS` namespace to work in TypeScript projects without any compilation warnings. From 90c8825ddb3717b0114782130ead04350fb8080e Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 15 Jan 2020 10:42:56 +0000 Subject: [PATCH 165/189] A `PathFollower` with a very short duration would often not end in the correct place, which is the very end of the Path, due to the tween handling the movement not running one final update when the tween was complete. It will now always end at the final point of the path, no matter how short the duration. Fix #4950 --- src/gameobjects/components/PathFollower.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/gameobjects/components/PathFollower.js b/src/gameobjects/components/PathFollower.js index 6d8cdbd67..f963d8f7b 100644 --- a/src/gameobjects/components/PathFollower.js +++ b/src/gameobjects/components/PathFollower.js @@ -344,15 +344,24 @@ var PathFollower = { if (tween) { var tweenData = tween.data[0]; + var pathVector = this.pathVector; - if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD) + if (tweenData.state !== TWEEN_CONST.COMPLETE) + { + this.path.getPoint(1, pathVector); + + pathVector.add(this.pathOffset); + + this.setPosition(pathVector.x, pathVector.y); + + return; + } + else if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD) { // If delayed, etc then bail out return; } - var pathVector = this.pathVector; - this.path.getPoint(tween.getValue(), pathVector); pathVector.add(this.pathOffset); From f3a91c1f547577a9165dbbbe6d2c65eb417a8444 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 15 Jan 2020 10:42:59 +0000 Subject: [PATCH 166/189] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67a6fe94c..bf601f574 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -236,6 +236,7 @@ All of the following are specific to the Matter Physics implementation used by P * `FacebookInstantGamesPlugin.showAd` and `showVideo` will now break out of the ad iteration search once a valid ad has been found and called. Previously, it would carry on interating if the async didn't complete quickly. Fix #4888 (thanks @east62687) * When playing an Animation, if you were to play another, then pause it, then play another the internal `_paused` wouldn't get reset, preventing you from them pausing the animations from that point on. You can now play and pause animations at will. Fix #4835 (thanks @murteira) * In `Actions.GridAlign` if you set `width` to -1 it would align the items vertically, instead of horizontally. It now aligns them horizontally if `width` is set, or vertically if `height` is set. Fix #4899 (thanks @BenjaVR) +* A `PathFollower` with a very short duration would often not end in the correct place, which is the very end of the Path, due to the tween handling the movement not running one final update when the tween was complete. It will now always end at the final point of the path, no matter how short the duration. Fix #4950 (thanks @bramp) ### Examples, Documentation and TypeScript From 867a11b30bf7ddd4cff72ba88e77526bc1848ad6 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 15 Jan 2020 11:15:09 +0000 Subject: [PATCH 167/189] `DOMElement` has a new private method `handleSceneEvent` which will handle toggling the display setting of the element when a Scene sleeps and wakes. A DOM Element will now listen for the Scene sleep and wake events. These event listeners are removed in the `preDestroy` method. --- src/gameobjects/domelement/DOMElement.js | 27 ++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/gameobjects/domelement/DOMElement.js b/src/gameobjects/domelement/DOMElement.js index 0371b8a13..30fc2c626 100644 --- a/src/gameobjects/domelement/DOMElement.js +++ b/src/gameobjects/domelement/DOMElement.js @@ -10,6 +10,7 @@ var DOMElementRender = require('./DOMElementRender'); var GameObject = require('../GameObject'); var IsPlainObject = require('../../utils/object/IsPlainObject'); var RemoveFromDOM = require('../../dom/RemoveFromDOM'); +var SCENE_EVENTS = require('../../scene/events'); var Vector4 = require('../../math/Vector4'); /** @@ -280,6 +281,29 @@ var DOMElement = new Class({ { this.setElement(element, style, innerText); } + + scene.sys.events.on(SCENE_EVENTS.SLEEP, this.handleSceneEvent, this); + scene.sys.events.on(SCENE_EVENTS.WAKE, this.handleSceneEvent, this); + }, + + /** + * Handles a Scene Sleep and Wake event. + * + * @method Phaser.GameObjects.DOMElement#handleSceneEvent + * @private + * @since 3.22.0 + * + * @param {Phaser.Scenes.Systems} sys - The Scene Systems. + */ + handleSceneEvent: function (sys) + { + var node = this.node; + var style = node.style; + + if (node) + { + style.display = (sys.settings.visible) ? 'block' : 'none'; + } }, /** @@ -934,6 +958,9 @@ var DOMElement = new Class({ preDestroy: function () { this.removeElement(); + + this.scene.sys.events.off(SCENE_EVENTS.SLEEP, this.handleSceneEvent, this); + this.scene.sys.events.off(SCENE_EVENTS.WAKE, this.handleSceneEvent, this); } }); From e1a6214c9b804ee7d69535202c36c712cffc6aee Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 15 Jan 2020 11:15:23 +0000 Subject: [PATCH 168/189] A `DOMElement` will now set the display mode to 'none' during its render if the Scene in which it belongs is no longer visible. --- src/gameobjects/domelement/DOMElementCSSRenderer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gameobjects/domelement/DOMElementCSSRenderer.js b/src/gameobjects/domelement/DOMElementCSSRenderer.js index 00a55058e..54750fba6 100644 --- a/src/gameobjects/domelement/DOMElementCSSRenderer.js +++ b/src/gameobjects/domelement/DOMElementCSSRenderer.js @@ -26,8 +26,9 @@ var DOMElementCSSRenderer = function (renderer, src, interpolationPercentage, ca { var node = src.node; var style = node.style; + var settings = src.scene.sys.settings; - if (!node || !style || GameObject.RENDER_MASK !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || (src.parentContainer && !src.parentContainer.willRender())) + if (!node || !style || !settings.visible || GameObject.RENDER_MASK !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || (src.parentContainer && !src.parentContainer.willRender())) { if (node) { From 57defcdb9b1bd413e522f4eb868f5726d9bb718a Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 15 Jan 2020 11:15:30 +0000 Subject: [PATCH 169/189] Typo --- src/scene/Systems.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scene/Systems.js b/src/scene/Systems.js index a3524004c..de1961aea 100644 --- a/src/scene/Systems.js +++ b/src/scene/Systems.js @@ -480,8 +480,8 @@ var Systems = new Class({ /** * Send this Scene to sleep. * - * A sleeping Scene doesn't run it's update step or render anything, but it also isn't shut down - * or have any of its systems or children removed, meaning it can be re-activated at any point and + * A sleeping Scene doesn't run its update step or render anything, but it also isn't shut down + * or has any of its systems or children removed, meaning it can be re-activated at any point and * will carry on from where it left off. It also keeps everything in memory and events and callbacks * from other Scenes may still invoke changes within it, so be careful what is left active. * From 494cc51b31102dbcc55c785e60a26d36ab7e2790 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 15 Jan 2020 11:16:33 +0000 Subject: [PATCH 170/189] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf601f574..322ba40e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -222,6 +222,8 @@ All of the following are specific to the Matter Physics implementation used by P * During `collideSpriteVsGroup` checks it will now skip bodies that are disabled to save doing a `contains` test (thanks @samme) * `Display.Align.In.QuickSet` now accepts `LEFT_BOTTOM` as `BOTTOM_LEFT`, `LEFT_TOP` as `TOP_LEFT`, `RIGHT_BOTTOM` as `BOTTOM_RIGHT` and `RIGHT_TOP` as `TOP_RIGHT`. Fix #4927 (thanks @zaniar) * `PhysicsGroup` now uses the new `internalCreateCallback` and `internalRemoveCallback` to handle its body creation and destruction, allowing you to use your own `createCallback` and `removeCallback` as defined in the Group config. Fix #4420 #4657 #4822 (thanks @S4n60w3n @kendistiller @scrubperson) +* `DOMElement` has a new private method `handleSceneEvent` which will handle toggling the display setting of the element when a Scene sleeps and wakes. A DOM Element will now listen for the Scene sleep and wake events. These event listeners are removed in the `preDestroy` method. +* A `DOMElement` will now set the display mode to 'none' during its render if the Scene in which it belongs is no longer visible. ### Bug Fixes @@ -237,6 +239,7 @@ All of the following are specific to the Matter Physics implementation used by P * When playing an Animation, if you were to play another, then pause it, then play another the internal `_paused` wouldn't get reset, preventing you from them pausing the animations from that point on. You can now play and pause animations at will. Fix #4835 (thanks @murteira) * In `Actions.GridAlign` if you set `width` to -1 it would align the items vertically, instead of horizontally. It now aligns them horizontally if `width` is set, or vertically if `height` is set. Fix #4899 (thanks @BenjaVR) * A `PathFollower` with a very short duration would often not end in the correct place, which is the very end of the Path, due to the tween handling the movement not running one final update when the tween was complete. It will now always end at the final point of the path, no matter how short the duration. Fix #4950 (thanks @bramp) +* A `DOMElement` would still remain visible even if the Scene in which it belongs to was sent to sleep. A sleeping Scene shouldn't render anything. DOM Elements will now respond to sleep and wake events from their parent Scene. Fix #4870 (thanks @peonmodel) ### Examples, Documentation and TypeScript From d636189cf7d4b5f4a43e3484ce56f79ed14bfc62 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 15 Jan 2020 11:30:08 +0000 Subject: [PATCH 171/189] Fixed JSDoc param type. Fix #4815 --- src/loader/filetypes/MultiAtlasFile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/loader/filetypes/MultiAtlasFile.js b/src/loader/filetypes/MultiAtlasFile.js index fbdb747fe..77f277437 100644 --- a/src/loader/filetypes/MultiAtlasFile.js +++ b/src/loader/filetypes/MultiAtlasFile.js @@ -27,7 +27,7 @@ var MultiFile = require('../MultiFile.js'); * @since 3.7.0 * * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file. - * @param {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager. + * @param {(string|Phaser.Types.Loader.FileTypes.MultiAtlasFileConfig)} key - The key of the file. Must be unique within both the Loader and the Texture Manager. Or a config object. * @param {string} [atlasURL] - The absolute or relative URL to load the multi atlas json file from. * @param {string} [path] - Optional path to use when loading the textures defined in the atlas data. * @param {string} [baseURL] - Optional Base URL to use when loading the textures defined in the atlas data. From 09a6f554efa881db44648ab2da3bf903ac7129e9 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 15 Jan 2020 11:30:10 +0000 Subject: [PATCH 172/189] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 322ba40e1..e2c36923b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -245,7 +245,7 @@ All of the following are specific to the Matter Physics implementation used by P My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs: -@fselcukcan Bambosh @louisth @hexus @javigaralva @samme @BeLi4L @jcyuan @javigaralva @T-Grave @bramp @Chnapy @dranitski @RollinSafary +@fselcukcan Bambosh @louisth @hexus @javigaralva @samme @BeLi4L @jcyuan @javigaralva @T-Grave @bramp @Chnapy @dranitski @RollinSafary @xense The Matter TypeScript defs have been updated to include lots of missing classes, removed some redundant elements and general fixes. The Phaser TypeScript defs now reference the Matter defs directly and no longer try to parse them from the JSDocs. This allows the `MatterJS` namespace to work in TypeScript projects without any compilation warnings. From d5644cf97787823a864c7df5241715efb4252f04 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 15 Jan 2020 11:36:11 +0000 Subject: [PATCH 173/189] If a config object was passed to `MultiAtlasFile` it expected the atlas URL to be in the `url` property, however the docs and file config expected it in `atlasURL`. You can now use either of these properties to declare the url. Fix #4815 --- src/loader/filetypes/MultiAtlasFile.js | 11 ++++++++++- src/loader/filetypes/typedefs/MultiAtlasFileConfig.js | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/loader/filetypes/MultiAtlasFile.js b/src/loader/filetypes/MultiAtlasFile.js index 77f277437..f8e1cbac3 100644 --- a/src/loader/filetypes/MultiAtlasFile.js +++ b/src/loader/filetypes/MultiAtlasFile.js @@ -47,7 +47,16 @@ var MultiAtlasFile = new Class({ var config = key; key = GetFastValue(config, 'key'); - atlasURL = GetFastValue(config, 'url'); + + if (GetFastValue(config, 'url', false)) + { + atlasURL = GetFastValue(config, 'url'); + } + else + { + atlasURL = GetFastValue(config, 'atlasURL'); + } + atlasXhrSettings = GetFastValue(config, 'xhrSettings'); path = GetFastValue(config, 'path'); baseURL = GetFastValue(config, 'baseURL'); diff --git a/src/loader/filetypes/typedefs/MultiAtlasFileConfig.js b/src/loader/filetypes/typedefs/MultiAtlasFileConfig.js index 7de30f2df..4dcfc071a 100644 --- a/src/loader/filetypes/typedefs/MultiAtlasFileConfig.js +++ b/src/loader/filetypes/typedefs/MultiAtlasFileConfig.js @@ -3,6 +3,7 @@ * * @property {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager. * @property {string} [atlasURL] - The absolute or relative URL to load the multi atlas json file from. Or, a well formed JSON object. + * @property {string} [url] - An alias for 'atlasURL'. If given, it overrides anything set in 'atlasURL'. * @property {string} [atlasExtension='json'] - The default file extension to use for the atlas json if no url is provided. * @property {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - Extra XHR Settings specifically for the atlas json file. * @property {string} [path] - Optional path to use when loading the textures defined in the atlas data. From 537dd4d311c6c81fed2637b146931b44e6dbb50a Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 15 Jan 2020 11:36:14 +0000 Subject: [PATCH 174/189] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2c36923b..a24ee4ce8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -240,6 +240,7 @@ All of the following are specific to the Matter Physics implementation used by P * In `Actions.GridAlign` if you set `width` to -1 it would align the items vertically, instead of horizontally. It now aligns them horizontally if `width` is set, or vertically if `height` is set. Fix #4899 (thanks @BenjaVR) * A `PathFollower` with a very short duration would often not end in the correct place, which is the very end of the Path, due to the tween handling the movement not running one final update when the tween was complete. It will now always end at the final point of the path, no matter how short the duration. Fix #4950 (thanks @bramp) * A `DOMElement` would still remain visible even if the Scene in which it belongs to was sent to sleep. A sleeping Scene shouldn't render anything. DOM Elements will now respond to sleep and wake events from their parent Scene. Fix #4870 (thanks @peonmodel) +* If a config object was passed to `MultiAtlasFile` it expected the atlas URL to be in the `url` property, however the docs and file config expected it in `atlasURL`. You can now use either of these properties to declare the url. Fix #4815 (thanks @xense) ### Examples, Documentation and TypeScript From ff65e69cd1ce8ef207c2199114b7dce4c1905a45 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 15 Jan 2020 12:07:09 +0000 Subject: [PATCH 175/189] Changed copyright date to 2020 --- src/actions/AlignTo.js | 2 +- src/actions/Angle.js | 2 +- src/actions/Call.js | 2 +- src/actions/GetFirst.js | 2 +- src/actions/GetLast.js | 2 +- src/actions/GridAlign.js | 2 +- src/actions/IncAlpha.js | 2 +- src/actions/IncX.js | 2 +- src/actions/IncXY.js | 2 +- src/actions/IncY.js | 2 +- src/actions/PlaceOnCircle.js | 2 +- src/actions/PlaceOnEllipse.js | 2 +- src/actions/PlaceOnLine.js | 2 +- src/actions/PlaceOnRectangle.js | 2 +- src/actions/PlaceOnTriangle.js | 2 +- src/actions/PlayAnimation.js | 2 +- src/actions/PropertyValueInc.js | 2 +- src/actions/PropertyValueSet.js | 2 +- src/actions/RandomCircle.js | 2 +- src/actions/RandomEllipse.js | 2 +- src/actions/RandomLine.js | 2 +- src/actions/RandomRectangle.js | 2 +- src/actions/RandomTriangle.js | 2 +- src/actions/Rotate.js | 2 +- src/actions/RotateAround.js | 2 +- src/actions/RotateAroundDistance.js | 2 +- src/actions/ScaleX.js | 2 +- src/actions/ScaleXY.js | 2 +- src/actions/ScaleY.js | 2 +- src/actions/SetAlpha.js | 2 +- src/actions/SetBlendMode.js | 2 +- src/actions/SetDepth.js | 2 +- src/actions/SetHitArea.js | 2 +- src/actions/SetOrigin.js | 2 +- src/actions/SetRotation.js | 2 +- src/actions/SetScale.js | 2 +- src/actions/SetScaleX.js | 2 +- src/actions/SetScaleY.js | 2 +- src/actions/SetScrollFactor.js | 2 +- src/actions/SetScrollFactorX.js | 2 +- src/actions/SetScrollFactorY.js | 2 +- src/actions/SetTint.js | 2 +- src/actions/SetVisible.js | 2 +- src/actions/SetX.js | 2 +- src/actions/SetXY.js | 2 +- src/actions/SetY.js | 2 +- src/actions/ShiftPosition.js | 2 +- src/actions/Shuffle.js | 2 +- src/actions/SmoothStep.js | 2 +- src/actions/SmootherStep.js | 2 +- src/actions/Spread.js | 2 +- src/actions/ToggleVisible.js | 2 +- src/actions/WrapInRectangle.js | 2 +- src/actions/index.js | 2 +- src/actions/typedefs/index.js | 2 +- src/animations/Animation.js | 2 +- src/animations/AnimationFrame.js | 2 +- src/animations/AnimationManager.js | 2 +- src/animations/events/ADD_ANIMATION_EVENT.js | 2 +- src/animations/events/ANIMATION_COMPLETE_EVENT.js | 2 +- src/animations/events/ANIMATION_REPEAT_EVENT.js | 2 +- src/animations/events/ANIMATION_RESTART_EVENT.js | 2 +- src/animations/events/ANIMATION_START_EVENT.js | 2 +- src/animations/events/PAUSE_ALL_EVENT.js | 2 +- src/animations/events/REMOVE_ANIMATION_EVENT.js | 2 +- src/animations/events/RESUME_ALL_EVENT.js | 2 +- src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js | 2 +- src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js | 2 +- src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js | 2 +- src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js | 2 +- src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js | 2 +- src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js | 2 +- src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js | 2 +- src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js | 2 +- src/animations/events/SPRITE_ANIMATION_START_EVENT.js | 2 +- src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js | 2 +- src/animations/events/index.js | 2 +- src/animations/index.js | 2 +- src/animations/typedefs/index.js | 2 +- src/cache/BaseCache.js | 2 +- src/cache/CacheManager.js | 2 +- src/cache/events/ADD_EVENT.js | 2 +- src/cache/events/REMOVE_EVENT.js | 2 +- src/cache/events/index.js | 2 +- src/cache/index.js | 2 +- src/cameras/2d/BaseCamera.js | 2 +- src/cameras/2d/Camera.js | 2 +- src/cameras/2d/CameraManager.js | 2 +- src/cameras/2d/effects/Fade.js | 2 +- src/cameras/2d/effects/Flash.js | 2 +- src/cameras/2d/effects/Pan.js | 2 +- src/cameras/2d/effects/Shake.js | 2 +- src/cameras/2d/effects/Zoom.js | 2 +- src/cameras/2d/effects/index.js | 2 +- src/cameras/2d/events/DESTROY_EVENT.js | 2 +- src/cameras/2d/events/FADE_IN_COMPLETE_EVENT.js | 2 +- src/cameras/2d/events/FADE_IN_START_EVENT.js | 2 +- src/cameras/2d/events/FADE_OUT_COMPLETE_EVENT.js | 2 +- src/cameras/2d/events/FADE_OUT_START_EVENT.js | 2 +- src/cameras/2d/events/FLASH_COMPLETE_EVENT.js | 2 +- src/cameras/2d/events/FLASH_START_EVENT.js | 2 +- src/cameras/2d/events/PAN_COMPLETE_EVENT.js | 2 +- src/cameras/2d/events/PAN_START_EVENT.js | 2 +- src/cameras/2d/events/POST_RENDER_EVENT.js | 2 +- src/cameras/2d/events/PRE_RENDER_EVENT.js | 2 +- src/cameras/2d/events/SHAKE_COMPLETE_EVENT.js | 2 +- src/cameras/2d/events/SHAKE_START_EVENT.js | 2 +- src/cameras/2d/events/ZOOM_COMPLETE_EVENT.js | 2 +- src/cameras/2d/events/ZOOM_START_EVENT.js | 2 +- src/cameras/2d/events/index.js | 2 +- src/cameras/2d/index.js | 2 +- src/cameras/2d/typedefs/index.js | 2 +- src/cameras/controls/FixedKeyControl.js | 2 +- src/cameras/controls/SmoothedKeyControl.js | 2 +- src/cameras/controls/index.js | 2 +- src/cameras/controls/typedefs/index.js | 2 +- src/cameras/index.js | 2 +- src/const.js | 2 +- src/core/Config.js | 2 +- src/core/CreateRenderer.js | 2 +- src/core/DebugHeader.js | 2 +- src/core/Game.js | 2 +- src/core/TimeStep.js | 2 +- src/core/VisibilityHandler.js | 2 +- src/core/events/BLUR_EVENT.js | 2 +- src/core/events/BOOT_EVENT.js | 2 +- src/core/events/CONTEXT_LOST_EVENT.js | 2 +- src/core/events/CONTEXT_RESTORED_EVENT.js | 2 +- src/core/events/DESTROY_EVENT.js | 2 +- src/core/events/FOCUS_EVENT.js | 2 +- src/core/events/HIDDEN_EVENT.js | 2 +- src/core/events/PAUSE_EVENT.js | 2 +- src/core/events/POST_RENDER_EVENT.js | 2 +- src/core/events/POST_STEP_EVENT.js | 2 +- src/core/events/PRE_RENDER_EVENT.js | 2 +- src/core/events/PRE_STEP_EVENT.js | 2 +- src/core/events/READY_EVENT.js | 2 +- src/core/events/RESUME_EVENT.js | 2 +- src/core/events/STEP_EVENT.js | 2 +- src/core/events/VISIBLE_EVENT.js | 2 +- src/core/events/index.js | 2 +- src/core/index.js | 2 +- src/core/typedefs/index.js | 2 +- src/create/GenerateTexture.js | 2 +- src/create/index.js | 2 +- src/create/palettes/Arne16.js | 2 +- src/create/palettes/C64.js | 2 +- src/create/palettes/CGA.js | 2 +- src/create/palettes/JMP.js | 2 +- src/create/palettes/MSX.js | 2 +- src/create/palettes/index.js | 2 +- src/create/typedefs/index.js | 2 +- src/curves/CubicBezierCurve.js | 2 +- src/curves/Curve.js | 2 +- src/curves/EllipseCurve.js | 2 +- src/curves/LineCurve.js | 2 +- src/curves/QuadraticBezierCurve.js | 2 +- src/curves/SplineCurve.js | 2 +- src/curves/index.js | 2 +- src/curves/path/MoveTo.js | 2 +- src/curves/path/Path.js | 2 +- src/curves/typedefs/index.js | 2 +- src/data/DataManager.js | 2 +- src/data/DataManagerPlugin.js | 2 +- src/data/events/CHANGE_DATA_EVENT.js | 2 +- src/data/events/CHANGE_DATA_KEY_EVENT.js | 2 +- src/data/events/REMOVE_DATA_EVENT.js | 2 +- src/data/events/SET_DATA_EVENT.js | 2 +- src/data/events/index.js | 2 +- src/data/index.js | 2 +- src/device/Audio.js | 2 +- src/device/Browser.js | 2 +- src/device/CanvasFeatures.js | 2 +- src/device/Features.js | 2 +- src/device/Fullscreen.js | 2 +- src/device/Input.js | 2 +- src/device/OS.js | 2 +- src/device/Video.js | 2 +- src/device/index.js | 2 +- src/display/align/const.js | 2 +- src/display/align/in/BottomCenter.js | 2 +- src/display/align/in/BottomLeft.js | 2 +- src/display/align/in/BottomRight.js | 2 +- src/display/align/in/Center.js | 2 +- src/display/align/in/LeftCenter.js | 2 +- src/display/align/in/QuickSet.js | 2 +- src/display/align/in/RightCenter.js | 2 +- src/display/align/in/TopCenter.js | 2 +- src/display/align/in/TopLeft.js | 2 +- src/display/align/in/TopRight.js | 2 +- src/display/align/in/index.js | 2 +- src/display/align/index.js | 2 +- src/display/align/to/BottomCenter.js | 2 +- src/display/align/to/BottomLeft.js | 2 +- src/display/align/to/BottomRight.js | 2 +- src/display/align/to/LeftBottom.js | 2 +- src/display/align/to/LeftCenter.js | 2 +- src/display/align/to/LeftTop.js | 2 +- src/display/align/to/QuickSet.js | 2 +- src/display/align/to/RightBottom.js | 2 +- src/display/align/to/RightCenter.js | 2 +- src/display/align/to/RightTop.js | 2 +- src/display/align/to/TopCenter.js | 2 +- src/display/align/to/TopLeft.js | 2 +- src/display/align/to/TopRight.js | 2 +- src/display/align/to/index.js | 2 +- src/display/bounds/CenterOn.js | 2 +- src/display/bounds/GetBottom.js | 2 +- src/display/bounds/GetCenterX.js | 2 +- src/display/bounds/GetCenterY.js | 2 +- src/display/bounds/GetLeft.js | 2 +- src/display/bounds/GetOffsetX.js | 2 +- src/display/bounds/GetOffsetY.js | 2 +- src/display/bounds/GetRight.js | 2 +- src/display/bounds/GetTop.js | 2 +- src/display/bounds/SetBottom.js | 2 +- src/display/bounds/SetCenterX.js | 2 +- src/display/bounds/SetCenterY.js | 2 +- src/display/bounds/SetLeft.js | 2 +- src/display/bounds/SetRight.js | 2 +- src/display/bounds/SetTop.js | 2 +- src/display/bounds/index.js | 2 +- src/display/canvas/CanvasInterpolation.js | 2 +- src/display/canvas/CanvasPool.js | 2 +- src/display/canvas/Smoothing.js | 2 +- src/display/canvas/TouchAction.js | 2 +- src/display/canvas/UserSelect.js | 2 +- src/display/canvas/index.js | 2 +- src/display/color/Color.js | 2 +- src/display/color/ColorToRGBA.js | 2 +- src/display/color/ComponentToHex.js | 2 +- src/display/color/GetColor.js | 2 +- src/display/color/GetColor32.js | 2 +- src/display/color/HSLToColor.js | 2 +- src/display/color/HSVColorWheel.js | 2 +- src/display/color/HSVToRGB.js | 2 +- src/display/color/HexStringToColor.js | 2 +- src/display/color/HueToComponent.js | 2 +- src/display/color/IntegerToColor.js | 2 +- src/display/color/IntegerToRGB.js | 2 +- src/display/color/Interpolate.js | 2 +- src/display/color/ObjectToColor.js | 2 +- src/display/color/RGBStringToColor.js | 2 +- src/display/color/RGBToHSV.js | 2 +- src/display/color/RGBToString.js | 2 +- src/display/color/RandomRGB.js | 2 +- src/display/color/ValueToColor.js | 2 +- src/display/color/index.js | 2 +- src/display/index.js | 2 +- src/display/mask/BitmapMask.js | 2 +- src/display/mask/GeometryMask.js | 2 +- src/display/mask/index.js | 2 +- src/display/shader/BaseShader.js | 2 +- src/dom/AddToDOM.js | 2 +- src/dom/CreateDOMContainer.js | 2 +- src/dom/DOMContentLoaded.js | 2 +- src/dom/GetInnerHeight.js | 2 +- src/dom/GetScreenOrientation.js | 2 +- src/dom/GetTarget.js | 2 +- src/dom/ParseXML.js | 2 +- src/dom/RemoveFromDOM.js | 2 +- src/dom/RequestAnimationFrame.js | 2 +- src/dom/index.js | 2 +- src/events/EventEmitter.js | 2 +- src/events/index.js | 2 +- src/gameobjects/BuildGameObject.js | 2 +- src/gameobjects/BuildGameObjectAnimation.js | 2 +- src/gameobjects/DisplayList.js | 2 +- src/gameobjects/GameObject.js | 2 +- src/gameobjects/GameObjectCreator.js | 2 +- src/gameobjects/GameObjectFactory.js | 2 +- src/gameobjects/UpdateList.js | 2 +- src/gameobjects/bitmaptext/GetBitmapTextSize.js | 2 +- src/gameobjects/bitmaptext/ParseFromAtlas.js | 2 +- src/gameobjects/bitmaptext/ParseRetroFont.js | 2 +- src/gameobjects/bitmaptext/ParseXMLBitmapFont.js | 2 +- src/gameobjects/bitmaptext/RetroFont.js | 2 +- src/gameobjects/bitmaptext/const.js | 2 +- src/gameobjects/bitmaptext/dynamic/DynamicBitmapText.js | 2 +- .../bitmaptext/dynamic/DynamicBitmapTextCanvasRenderer.js | 2 +- src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCreator.js | 2 +- src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextFactory.js | 2 +- src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextRender.js | 2 +- .../bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js | 2 +- src/gameobjects/bitmaptext/static/BitmapText.js | 2 +- src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js | 2 +- src/gameobjects/bitmaptext/static/BitmapTextCreator.js | 2 +- src/gameobjects/bitmaptext/static/BitmapTextFactory.js | 2 +- src/gameobjects/bitmaptext/static/BitmapTextRender.js | 2 +- src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js | 2 +- src/gameobjects/bitmaptext/typedefs/index.js | 2 +- src/gameobjects/blitter/Blitter.js | 2 +- src/gameobjects/blitter/BlitterCanvasRenderer.js | 2 +- src/gameobjects/blitter/BlitterCreator.js | 2 +- src/gameobjects/blitter/BlitterFactory.js | 2 +- src/gameobjects/blitter/BlitterRender.js | 2 +- src/gameobjects/blitter/BlitterWebGLRenderer.js | 2 +- src/gameobjects/blitter/Bob.js | 2 +- src/gameobjects/components/Alpha.js | 2 +- src/gameobjects/components/AlphaSingle.js | 2 +- src/gameobjects/components/Animation.js | 2 +- src/gameobjects/components/BlendMode.js | 2 +- src/gameobjects/components/ComputedSize.js | 2 +- src/gameobjects/components/Crop.js | 2 +- src/gameobjects/components/Depth.js | 2 +- src/gameobjects/components/Flip.js | 2 +- src/gameobjects/components/GetBounds.js | 2 +- src/gameobjects/components/Mask.js | 2 +- src/gameobjects/components/Origin.js | 2 +- src/gameobjects/components/PathFollower.js | 2 +- src/gameobjects/components/Pipeline.js | 2 +- src/gameobjects/components/ScrollFactor.js | 2 +- src/gameobjects/components/Size.js | 2 +- src/gameobjects/components/Texture.js | 2 +- src/gameobjects/components/TextureCrop.js | 2 +- src/gameobjects/components/Tint.js | 2 +- src/gameobjects/components/ToJSON.js | 2 +- src/gameobjects/components/Transform.js | 2 +- src/gameobjects/components/TransformMatrix.js | 2 +- src/gameobjects/components/Visible.js | 2 +- src/gameobjects/components/index.js | 2 +- src/gameobjects/container/Container.js | 2 +- src/gameobjects/container/ContainerCanvasRenderer.js | 2 +- src/gameobjects/container/ContainerCreator.js | 2 +- src/gameobjects/container/ContainerFactory.js | 2 +- src/gameobjects/container/ContainerRender.js | 2 +- src/gameobjects/container/ContainerWebGLRenderer.js | 2 +- src/gameobjects/domelement/CSSBlendModes.js | 2 +- src/gameobjects/domelement/DOMElement.js | 2 +- src/gameobjects/domelement/DOMElementCSSRenderer.js | 2 +- src/gameobjects/domelement/DOMElementFactory.js | 2 +- src/gameobjects/domelement/DOMElementRender.js | 2 +- src/gameobjects/events/DESTROY_EVENT.js | 2 +- src/gameobjects/events/VIDEO_COMPLETE_EVENT.js | 2 +- src/gameobjects/events/VIDEO_CREATED_EVENT.js | 2 +- src/gameobjects/events/VIDEO_ERROR_EVENT.js | 2 +- src/gameobjects/events/VIDEO_LOOP_EVENT.js | 2 +- src/gameobjects/events/VIDEO_PLAY_EVENT.js | 2 +- src/gameobjects/events/VIDEO_SEEKED_EVENT.js | 2 +- src/gameobjects/events/VIDEO_SEEKING_EVENT.js | 2 +- src/gameobjects/events/VIDEO_STOP_EVENT.js | 2 +- src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js | 2 +- src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js | 2 +- src/gameobjects/events/index.js | 2 +- src/gameobjects/extern/Extern.js | 2 +- src/gameobjects/extern/ExternFactory.js | 2 +- src/gameobjects/extern/ExternRender.js | 2 +- src/gameobjects/extern/ExternWebGLRenderer.js | 2 +- src/gameobjects/graphics/Commands.js | 2 +- src/gameobjects/graphics/Graphics.js | 2 +- src/gameobjects/graphics/GraphicsCanvasRenderer.js | 2 +- src/gameobjects/graphics/GraphicsCreator.js | 2 +- src/gameobjects/graphics/GraphicsFactory.js | 2 +- src/gameobjects/graphics/GraphicsRender.js | 2 +- src/gameobjects/graphics/GraphicsWebGLRenderer.js | 2 +- src/gameobjects/graphics/typedefs/index.js | 2 +- src/gameobjects/group/Group.js | 2 +- src/gameobjects/group/GroupCreator.js | 2 +- src/gameobjects/group/GroupFactory.js | 2 +- src/gameobjects/group/typedefs/index.js | 2 +- src/gameobjects/image/Image.js | 2 +- src/gameobjects/image/ImageCanvasRenderer.js | 2 +- src/gameobjects/image/ImageCreator.js | 2 +- src/gameobjects/image/ImageFactory.js | 2 +- src/gameobjects/image/ImageRender.js | 2 +- src/gameobjects/image/ImageWebGLRenderer.js | 2 +- src/gameobjects/index.js | 2 +- src/gameobjects/lights/Light.js | 2 +- src/gameobjects/lights/LightsManager.js | 2 +- src/gameobjects/lights/LightsPlugin.js | 2 +- src/gameobjects/mesh/Mesh.js | 2 +- src/gameobjects/mesh/MeshCanvasRenderer.js | 2 +- src/gameobjects/mesh/MeshCreator.js | 2 +- src/gameobjects/mesh/MeshFactory.js | 2 +- src/gameobjects/mesh/MeshRender.js | 2 +- src/gameobjects/mesh/MeshWebGLRenderer.js | 2 +- src/gameobjects/particles/EmitterOp.js | 2 +- src/gameobjects/particles/GravityWell.js | 2 +- src/gameobjects/particles/Particle.js | 2 +- src/gameobjects/particles/ParticleEmitter.js | 2 +- src/gameobjects/particles/ParticleEmitterManager.js | 2 +- src/gameobjects/particles/ParticleManagerCanvasRenderer.js | 2 +- src/gameobjects/particles/ParticleManagerCreator.js | 2 +- src/gameobjects/particles/ParticleManagerFactory.js | 2 +- src/gameobjects/particles/ParticleManagerRender.js | 2 +- src/gameobjects/particles/ParticleManagerWebGLRenderer.js | 2 +- src/gameobjects/particles/index.js | 2 +- src/gameobjects/particles/typedefs/index.js | 2 +- src/gameobjects/particles/zones/DeathZone.js | 2 +- src/gameobjects/particles/zones/EdgeZone.js | 2 +- src/gameobjects/particles/zones/RandomZone.js | 2 +- src/gameobjects/particles/zones/index.js | 2 +- src/gameobjects/pathfollower/PathFollower.js | 2 +- src/gameobjects/pathfollower/PathFollowerFactory.js | 2 +- src/gameobjects/pathfollower/typedefs/index.js | 2 +- src/gameobjects/quad/Quad.js | 2 +- src/gameobjects/quad/QuadCreator.js | 2 +- src/gameobjects/quad/QuadFactory.js | 2 +- src/gameobjects/rendertexture/RenderTexture.js | 2 +- src/gameobjects/rendertexture/RenderTextureCanvasRenderer.js | 2 +- src/gameobjects/rendertexture/RenderTextureCreator.js | 2 +- src/gameobjects/rendertexture/RenderTextureFactory.js | 2 +- src/gameobjects/rendertexture/RenderTextureRender.js | 2 +- src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js | 2 +- src/gameobjects/rendertexture/typedefs/index.js | 2 +- src/gameobjects/shader/Shader.js | 2 +- src/gameobjects/shader/ShaderCanvasRenderer.js | 2 +- src/gameobjects/shader/ShaderCreator.js | 2 +- src/gameobjects/shader/ShaderFactory.js | 2 +- src/gameobjects/shader/ShaderRender.js | 2 +- src/gameobjects/shader/ShaderWebGLRenderer.js | 2 +- src/gameobjects/shape/FillPathWebGL.js | 2 +- src/gameobjects/shape/FillStyleCanvas.js | 2 +- src/gameobjects/shape/LineStyleCanvas.js | 2 +- src/gameobjects/shape/Shape.js | 2 +- src/gameobjects/shape/StrokePathWebGL.js | 2 +- src/gameobjects/shape/arc/Arc.js | 2 +- src/gameobjects/shape/arc/ArcCanvasRenderer.js | 2 +- src/gameobjects/shape/arc/ArcFactory.js | 2 +- src/gameobjects/shape/arc/ArcRender.js | 2 +- src/gameobjects/shape/arc/ArcWebGLRenderer.js | 2 +- src/gameobjects/shape/curve/Curve.js | 2 +- src/gameobjects/shape/curve/CurveCanvasRenderer.js | 2 +- src/gameobjects/shape/curve/CurveFactory.js | 2 +- src/gameobjects/shape/curve/CurveRender.js | 2 +- src/gameobjects/shape/curve/CurveWebGLRenderer.js | 2 +- src/gameobjects/shape/ellipse/Ellipse.js | 2 +- src/gameobjects/shape/ellipse/EllipseCanvasRenderer.js | 2 +- src/gameobjects/shape/ellipse/EllipseFactory.js | 2 +- src/gameobjects/shape/ellipse/EllipseRender.js | 2 +- src/gameobjects/shape/ellipse/EllipseWebGLRenderer.js | 2 +- src/gameobjects/shape/grid/Grid.js | 2 +- src/gameobjects/shape/grid/GridCanvasRenderer.js | 2 +- src/gameobjects/shape/grid/GridFactory.js | 2 +- src/gameobjects/shape/grid/GridRender.js | 2 +- src/gameobjects/shape/grid/GridWebGLRenderer.js | 2 +- src/gameobjects/shape/isobox/IsoBox.js | 2 +- src/gameobjects/shape/isobox/IsoBoxCanvasRenderer.js | 2 +- src/gameobjects/shape/isobox/IsoBoxFactory.js | 2 +- src/gameobjects/shape/isobox/IsoBoxRender.js | 2 +- src/gameobjects/shape/isobox/IsoBoxWebGLRenderer.js | 2 +- src/gameobjects/shape/isotriangle/IsoTriangle.js | 2 +- src/gameobjects/shape/isotriangle/IsoTriangleCanvasRenderer.js | 2 +- src/gameobjects/shape/isotriangle/IsoTriangleFactory.js | 2 +- src/gameobjects/shape/isotriangle/IsoTriangleRender.js | 2 +- src/gameobjects/shape/isotriangle/IsoTriangleWebGLRenderer.js | 2 +- src/gameobjects/shape/line/Line.js | 2 +- src/gameobjects/shape/line/LineCanvasRenderer.js | 2 +- src/gameobjects/shape/line/LineFactory.js | 2 +- src/gameobjects/shape/line/LineRender.js | 2 +- src/gameobjects/shape/line/LineWebGLRenderer.js | 2 +- src/gameobjects/shape/polygon/Polygon.js | 2 +- src/gameobjects/shape/polygon/PolygonCanvasRenderer.js | 2 +- src/gameobjects/shape/polygon/PolygonFactory.js | 2 +- src/gameobjects/shape/polygon/PolygonRender.js | 2 +- src/gameobjects/shape/polygon/PolygonWebGLRenderer.js | 2 +- src/gameobjects/shape/rectangle/Rectangle.js | 2 +- src/gameobjects/shape/rectangle/RectangleCanvasRenderer.js | 2 +- src/gameobjects/shape/rectangle/RectangleFactory.js | 2 +- src/gameobjects/shape/rectangle/RectangleRender.js | 2 +- src/gameobjects/shape/rectangle/RectangleWebGLRenderer.js | 2 +- src/gameobjects/shape/star/Star.js | 2 +- src/gameobjects/shape/star/StarCanvasRenderer.js | 2 +- src/gameobjects/shape/star/StarFactory.js | 2 +- src/gameobjects/shape/star/StarRender.js | 2 +- src/gameobjects/shape/star/StarWebGLRenderer.js | 2 +- src/gameobjects/shape/triangle/Triangle.js | 2 +- src/gameobjects/shape/triangle/TriangleCanvasRenderer.js | 2 +- src/gameobjects/shape/triangle/TriangleFactory.js | 2 +- src/gameobjects/shape/triangle/TriangleRender.js | 2 +- src/gameobjects/shape/triangle/TriangleWebGLRenderer.js | 2 +- src/gameobjects/sprite/Sprite.js | 2 +- src/gameobjects/sprite/SpriteCanvasRenderer.js | 2 +- src/gameobjects/sprite/SpriteCreator.js | 2 +- src/gameobjects/sprite/SpriteFactory.js | 2 +- src/gameobjects/sprite/SpriteRender.js | 2 +- src/gameobjects/sprite/SpriteWebGLRenderer.js | 2 +- src/gameobjects/sprite/typedefs/index.js | 2 +- src/gameobjects/text/GetTextSize.js | 2 +- src/gameobjects/text/MeasureText.js | 2 +- src/gameobjects/text/TextStyle.js | 2 +- src/gameobjects/text/static/Text.js | 2 +- src/gameobjects/text/static/TextCanvasRenderer.js | 2 +- src/gameobjects/text/static/TextCreator.js | 2 +- src/gameobjects/text/static/TextFactory.js | 2 +- src/gameobjects/text/static/TextRender.js | 2 +- src/gameobjects/text/static/TextWebGLRenderer.js | 2 +- src/gameobjects/text/typedefs/index.js | 2 +- src/gameobjects/tilesprite/TileSprite.js | 2 +- src/gameobjects/tilesprite/TileSpriteCanvasRenderer.js | 2 +- src/gameobjects/tilesprite/TileSpriteCreator.js | 2 +- src/gameobjects/tilesprite/TileSpriteFactory.js | 2 +- src/gameobjects/tilesprite/TileSpriteRender.js | 2 +- src/gameobjects/tilesprite/TileSpriteWebGLRenderer.js | 2 +- src/gameobjects/tilesprite/typedefs/index.js | 2 +- src/gameobjects/typedefs/index.js | 2 +- src/gameobjects/video/Video.js | 2 +- src/gameobjects/video/VideoCanvasRenderer.js | 2 +- src/gameobjects/video/VideoCreator.js | 2 +- src/gameobjects/video/VideoFactory.js | 2 +- src/gameobjects/video/VideoRender.js | 2 +- src/gameobjects/video/VideoWebGLRenderer.js | 2 +- src/gameobjects/zone/Zone.js | 2 +- src/gameobjects/zone/ZoneCreator.js | 2 +- src/gameobjects/zone/ZoneFactory.js | 2 +- src/geom/circle/Area.js | 2 +- src/geom/circle/Circle.js | 2 +- src/geom/circle/Circumference.js | 2 +- src/geom/circle/CircumferencePoint.js | 2 +- src/geom/circle/Clone.js | 2 +- src/geom/circle/Contains.js | 2 +- src/geom/circle/ContainsPoint.js | 2 +- src/geom/circle/ContainsRect.js | 2 +- src/geom/circle/CopyFrom.js | 2 +- src/geom/circle/Equals.js | 2 +- src/geom/circle/GetBounds.js | 2 +- src/geom/circle/GetPoint.js | 2 +- src/geom/circle/GetPoints.js | 2 +- src/geom/circle/Offset.js | 2 +- src/geom/circle/OffsetPoint.js | 2 +- src/geom/circle/Random.js | 2 +- src/geom/circle/index.js | 2 +- src/geom/const.js | 2 +- src/geom/ellipse/Area.js | 2 +- src/geom/ellipse/Circumference.js | 2 +- src/geom/ellipse/CircumferencePoint.js | 2 +- src/geom/ellipse/Clone.js | 2 +- src/geom/ellipse/Contains.js | 2 +- src/geom/ellipse/ContainsPoint.js | 2 +- src/geom/ellipse/ContainsRect.js | 2 +- src/geom/ellipse/CopyFrom.js | 2 +- src/geom/ellipse/Ellipse.js | 2 +- src/geom/ellipse/Equals.js | 2 +- src/geom/ellipse/GetBounds.js | 2 +- src/geom/ellipse/GetPoint.js | 2 +- src/geom/ellipse/GetPoints.js | 2 +- src/geom/ellipse/Offset.js | 2 +- src/geom/ellipse/OffsetPoint.js | 2 +- src/geom/ellipse/Random.js | 2 +- src/geom/ellipse/index.js | 2 +- src/geom/index.js | 2 +- src/geom/intersects/CircleToCircle.js | 2 +- src/geom/intersects/CircleToRectangle.js | 2 +- src/geom/intersects/GetCircleToCircle.js | 2 +- src/geom/intersects/GetCircleToRectangle.js | 2 +- src/geom/intersects/GetLineToCircle.js | 2 +- src/geom/intersects/GetLineToRectangle.js | 2 +- src/geom/intersects/GetRectangleIntersection.js | 2 +- src/geom/intersects/GetRectangleToRectangle.js | 2 +- src/geom/intersects/GetRectangleToTriangle.js | 2 +- src/geom/intersects/GetTriangleToCircle.js | 2 +- src/geom/intersects/GetTriangleToLine.js | 2 +- src/geom/intersects/GetTriangleToTriangle.js | 2 +- src/geom/intersects/LineToCircle.js | 2 +- src/geom/intersects/LineToLine.js | 2 +- src/geom/intersects/LineToRectangle.js | 2 +- src/geom/intersects/PointToLine.js | 2 +- src/geom/intersects/PointToLineSegment.js | 2 +- src/geom/intersects/RectangleToRectangle.js | 2 +- src/geom/intersects/RectangleToTriangle.js | 2 +- src/geom/intersects/RectangleToValues.js | 2 +- src/geom/intersects/TriangleToCircle.js | 2 +- src/geom/intersects/TriangleToLine.js | 2 +- src/geom/intersects/TriangleToTriangle.js | 2 +- src/geom/intersects/index.js | 2 +- src/geom/line/Angle.js | 2 +- src/geom/line/BresenhamPoints.js | 2 +- src/geom/line/CenterOn.js | 2 +- src/geom/line/Clone.js | 2 +- src/geom/line/CopyFrom.js | 2 +- src/geom/line/Equals.js | 2 +- src/geom/line/Extend.js | 2 +- src/geom/line/GetMidPoint.js | 2 +- src/geom/line/GetNearestPoint.js | 2 +- src/geom/line/GetNormal.js | 2 +- src/geom/line/GetPoint.js | 2 +- src/geom/line/GetPoints.js | 2 +- src/geom/line/GetShortestDistance.js | 2 +- src/geom/line/Height.js | 2 +- src/geom/line/Length.js | 2 +- src/geom/line/Line.js | 2 +- src/geom/line/NormalAngle.js | 2 +- src/geom/line/NormalX.js | 2 +- src/geom/line/NormalY.js | 2 +- src/geom/line/Offset.js | 2 +- src/geom/line/PerpSlope.js | 2 +- src/geom/line/Random.js | 2 +- src/geom/line/ReflectAngle.js | 2 +- src/geom/line/Rotate.js | 2 +- src/geom/line/RotateAroundPoint.js | 2 +- src/geom/line/RotateAroundXY.js | 2 +- src/geom/line/SetToAngle.js | 2 +- src/geom/line/Slope.js | 2 +- src/geom/line/Width.js | 2 +- src/geom/line/index.js | 2 +- src/geom/point/Ceil.js | 2 +- src/geom/point/Clone.js | 2 +- src/geom/point/CopyFrom.js | 2 +- src/geom/point/Equals.js | 2 +- src/geom/point/Floor.js | 2 +- src/geom/point/GetCentroid.js | 2 +- src/geom/point/GetMagnitude.js | 2 +- src/geom/point/GetMagnitudeSq.js | 2 +- src/geom/point/GetRectangleFromPoints.js | 2 +- src/geom/point/Interpolate.js | 2 +- src/geom/point/Invert.js | 2 +- src/geom/point/Negative.js | 2 +- src/geom/point/Point.js | 2 +- src/geom/point/Project.js | 2 +- src/geom/point/ProjectUnit.js | 2 +- src/geom/point/SetMagnitude.js | 2 +- src/geom/point/index.js | 2 +- src/geom/polygon/Clone.js | 2 +- src/geom/polygon/Contains.js | 2 +- src/geom/polygon/ContainsPoint.js | 2 +- src/geom/polygon/Earcut.js | 2 +- src/geom/polygon/GetAABB.js | 2 +- src/geom/polygon/GetNumberArray.js | 2 +- src/geom/polygon/GetPoints.js | 2 +- src/geom/polygon/Perimeter.js | 2 +- src/geom/polygon/Polygon.js | 2 +- src/geom/polygon/Reverse.js | 2 +- src/geom/polygon/Smooth.js | 2 +- src/geom/polygon/index.js | 2 +- src/geom/rectangle/Area.js | 2 +- src/geom/rectangle/Ceil.js | 2 +- src/geom/rectangle/CeilAll.js | 2 +- src/geom/rectangle/CenterOn.js | 2 +- src/geom/rectangle/Clone.js | 2 +- src/geom/rectangle/Contains.js | 2 +- src/geom/rectangle/ContainsPoint.js | 2 +- src/geom/rectangle/ContainsRect.js | 2 +- src/geom/rectangle/CopyFrom.js | 2 +- src/geom/rectangle/Decompose.js | 2 +- src/geom/rectangle/Equals.js | 2 +- src/geom/rectangle/FitInside.js | 2 +- src/geom/rectangle/FitOutside.js | 2 +- src/geom/rectangle/Floor.js | 2 +- src/geom/rectangle/FloorAll.js | 2 +- src/geom/rectangle/FromPoints.js | 2 +- src/geom/rectangle/GetAspectRatio.js | 2 +- src/geom/rectangle/GetCenter.js | 2 +- src/geom/rectangle/GetPoint.js | 2 +- src/geom/rectangle/GetPoints.js | 2 +- src/geom/rectangle/GetSize.js | 2 +- src/geom/rectangle/Inflate.js | 2 +- src/geom/rectangle/Intersection.js | 2 +- src/geom/rectangle/MarchingAnts.js | 2 +- src/geom/rectangle/MergePoints.js | 2 +- src/geom/rectangle/MergeRect.js | 2 +- src/geom/rectangle/MergeXY.js | 2 +- src/geom/rectangle/Offset.js | 2 +- src/geom/rectangle/OffsetPoint.js | 2 +- src/geom/rectangle/Overlaps.js | 2 +- src/geom/rectangle/Perimeter.js | 2 +- src/geom/rectangle/PerimeterPoint.js | 2 +- src/geom/rectangle/Random.js | 2 +- src/geom/rectangle/RandomOutside.js | 2 +- src/geom/rectangle/Rectangle.js | 2 +- src/geom/rectangle/SameDimensions.js | 2 +- src/geom/rectangle/Scale.js | 2 +- src/geom/rectangle/Union.js | 2 +- src/geom/rectangle/index.js | 2 +- src/geom/triangle/Area.js | 2 +- src/geom/triangle/BuildEquilateral.js | 2 +- src/geom/triangle/BuildFromPolygon.js | 2 +- src/geom/triangle/BuildRight.js | 2 +- src/geom/triangle/CenterOn.js | 2 +- src/geom/triangle/Centroid.js | 2 +- src/geom/triangle/CircumCenter.js | 2 +- src/geom/triangle/CircumCircle.js | 2 +- src/geom/triangle/Clone.js | 2 +- src/geom/triangle/Contains.js | 2 +- src/geom/triangle/ContainsArray.js | 2 +- src/geom/triangle/ContainsPoint.js | 2 +- src/geom/triangle/CopyFrom.js | 2 +- src/geom/triangle/Decompose.js | 2 +- src/geom/triangle/Equals.js | 2 +- src/geom/triangle/GetPoint.js | 2 +- src/geom/triangle/GetPoints.js | 2 +- src/geom/triangle/InCenter.js | 2 +- src/geom/triangle/Offset.js | 2 +- src/geom/triangle/Perimeter.js | 2 +- src/geom/triangle/Random.js | 2 +- src/geom/triangle/Rotate.js | 2 +- src/geom/triangle/RotateAroundPoint.js | 2 +- src/geom/triangle/RotateAroundXY.js | 2 +- src/geom/triangle/Triangle.js | 2 +- src/geom/triangle/index.js | 2 +- src/input/CreateInteractiveObject.js | 2 +- src/input/CreatePixelPerfectHandler.js | 2 +- src/input/InputManager.js | 2 +- src/input/InputPlugin.js | 2 +- src/input/InputPluginCache.js | 2 +- src/input/Pointer.js | 2 +- src/input/const.js | 2 +- src/input/events/BOOT_EVENT.js | 2 +- src/input/events/DESTROY_EVENT.js | 2 +- src/input/events/DRAG_END_EVENT.js | 2 +- src/input/events/DRAG_ENTER_EVENT.js | 2 +- src/input/events/DRAG_EVENT.js | 2 +- src/input/events/DRAG_LEAVE_EVENT.js | 2 +- src/input/events/DRAG_OVER_EVENT.js | 2 +- src/input/events/DRAG_START_EVENT.js | 2 +- src/input/events/DROP_EVENT.js | 2 +- src/input/events/GAMEOBJECT_DOWN_EVENT.js | 2 +- src/input/events/GAMEOBJECT_DRAG_END_EVENT.js | 2 +- src/input/events/GAMEOBJECT_DRAG_ENTER_EVENT.js | 2 +- src/input/events/GAMEOBJECT_DRAG_EVENT.js | 2 +- src/input/events/GAMEOBJECT_DRAG_LEAVE_EVENT.js | 2 +- src/input/events/GAMEOBJECT_DRAG_OVER_EVENT.js | 2 +- src/input/events/GAMEOBJECT_DRAG_START_EVENT.js | 2 +- src/input/events/GAMEOBJECT_DROP_EVENT.js | 2 +- src/input/events/GAMEOBJECT_MOVE_EVENT.js | 2 +- src/input/events/GAMEOBJECT_OUT_EVENT.js | 2 +- src/input/events/GAMEOBJECT_OVER_EVENT.js | 2 +- src/input/events/GAMEOBJECT_POINTER_DOWN_EVENT.js | 2 +- src/input/events/GAMEOBJECT_POINTER_MOVE_EVENT.js | 2 +- src/input/events/GAMEOBJECT_POINTER_OUT_EVENT.js | 2 +- src/input/events/GAMEOBJECT_POINTER_OVER_EVENT.js | 2 +- src/input/events/GAMEOBJECT_POINTER_UP_EVENT.js | 2 +- src/input/events/GAMEOBJECT_POINTER_WHEEL_EVENT.js | 2 +- src/input/events/GAMEOBJECT_UP_EVENT.js | 2 +- src/input/events/GAMEOBJECT_WHEEL_EVENT.js | 2 +- src/input/events/GAME_OUT_EVENT.js | 2 +- src/input/events/GAME_OVER_EVENT.js | 2 +- src/input/events/MANAGER_BOOT_EVENT.js | 2 +- src/input/events/MANAGER_PROCESS_EVENT.js | 2 +- src/input/events/MANAGER_UPDATE_EVENT.js | 2 +- src/input/events/POINTERLOCK_CHANGE_EVENT.js | 2 +- src/input/events/POINTER_DOWN_EVENT.js | 2 +- src/input/events/POINTER_DOWN_OUTSIDE_EVENT.js | 2 +- src/input/events/POINTER_MOVE_EVENT.js | 2 +- src/input/events/POINTER_OUT_EVENT.js | 2 +- src/input/events/POINTER_OVER_EVENT.js | 2 +- src/input/events/POINTER_UP_EVENT.js | 2 +- src/input/events/POINTER_UP_OUTSIDE_EVENT.js | 2 +- src/input/events/POINTER_WHEEL_EVENT.js | 2 +- src/input/events/PRE_UPDATE_EVENT.js | 2 +- src/input/events/SHUTDOWN_EVENT.js | 2 +- src/input/events/START_EVENT.js | 2 +- src/input/events/UPDATE_EVENT.js | 2 +- src/input/events/index.js | 2 +- src/input/gamepad/Axis.js | 2 +- src/input/gamepad/Button.js | 2 +- src/input/gamepad/Gamepad.js | 2 +- src/input/gamepad/GamepadPlugin.js | 2 +- src/input/gamepad/configs/SNES_USB_Controller.js | 2 +- src/input/gamepad/configs/Sony_PlayStation_DualShock_4.js | 2 +- src/input/gamepad/configs/XBox360_Controller.js | 2 +- src/input/gamepad/configs/index.js | 2 +- src/input/gamepad/events/BUTTON_DOWN_EVENT.js | 2 +- src/input/gamepad/events/BUTTON_UP_EVENT.js | 2 +- src/input/gamepad/events/CONNECTED_EVENT.js | 2 +- src/input/gamepad/events/DISCONNECTED_EVENT.js | 2 +- src/input/gamepad/events/GAMEPAD_BUTTON_DOWN_EVENT.js | 2 +- src/input/gamepad/events/GAMEPAD_BUTTON_UP_EVENT.js | 2 +- src/input/gamepad/events/index.js | 2 +- src/input/gamepad/index.js | 2 +- src/input/gamepad/typedefs/index.js | 2 +- src/input/index.js | 2 +- src/input/keyboard/KeyboardManager.js | 2 +- src/input/keyboard/KeyboardPlugin.js | 2 +- src/input/keyboard/combo/AdvanceKeyCombo.js | 2 +- src/input/keyboard/combo/KeyCombo.js | 2 +- src/input/keyboard/combo/ProcessKeyCombo.js | 2 +- src/input/keyboard/combo/ResetKeyCombo.js | 2 +- src/input/keyboard/events/ANY_KEY_DOWN_EVENT.js | 2 +- src/input/keyboard/events/ANY_KEY_UP_EVENT.js | 2 +- src/input/keyboard/events/COMBO_MATCH_EVENT.js | 2 +- src/input/keyboard/events/DOWN_EVENT.js | 2 +- src/input/keyboard/events/KEY_DOWN_EVENT.js | 2 +- src/input/keyboard/events/KEY_UP_EVENT.js | 2 +- src/input/keyboard/events/UP_EVENT.js | 2 +- src/input/keyboard/events/index.js | 2 +- src/input/keyboard/index.js | 2 +- src/input/keyboard/keys/DownDuration.js | 2 +- src/input/keyboard/keys/JustDown.js | 2 +- src/input/keyboard/keys/JustUp.js | 2 +- src/input/keyboard/keys/Key.js | 2 +- src/input/keyboard/keys/KeyCodes.js | 2 +- src/input/keyboard/keys/KeyMap.js | 2 +- src/input/keyboard/keys/UpDuration.js | 2 +- src/input/keyboard/typedefs/index.js | 2 +- src/input/mouse/MouseManager.js | 2 +- src/input/mouse/index.js | 2 +- src/input/touch/TouchManager.js | 2 +- src/input/touch/index.js | 2 +- src/input/typedefs/EventData.js | 2 +- src/input/typedefs/index.js | 2 +- src/loader/File.js | 2 +- src/loader/FileTypesManager.js | 2 +- src/loader/GetURL.js | 2 +- src/loader/LoaderPlugin.js | 2 +- src/loader/MergeXHRSettings.js | 2 +- src/loader/MultiFile.js | 2 +- src/loader/XHRLoader.js | 2 +- src/loader/XHRSettings.js | 2 +- src/loader/const.js | 2 +- src/loader/events/ADD_EVENT.js | 2 +- src/loader/events/COMPLETE_EVENT.js | 2 +- src/loader/events/FILE_COMPLETE_EVENT.js | 2 +- src/loader/events/FILE_KEY_COMPLETE_EVENT.js | 2 +- src/loader/events/FILE_LOAD_ERROR_EVENT.js | 2 +- src/loader/events/FILE_LOAD_EVENT.js | 2 +- src/loader/events/FILE_PROGRESS_EVENT.js | 2 +- src/loader/events/POST_PROCESS_EVENT.js | 2 +- src/loader/events/PROGRESS_EVENT.js | 2 +- src/loader/events/START_EVENT.js | 2 +- src/loader/events/index.js | 2 +- src/loader/filetypes/AnimationJSONFile.js | 2 +- src/loader/filetypes/AtlasJSONFile.js | 2 +- src/loader/filetypes/AtlasXMLFile.js | 2 +- src/loader/filetypes/AudioFile.js | 2 +- src/loader/filetypes/AudioSpriteFile.js | 2 +- src/loader/filetypes/BinaryFile.js | 2 +- src/loader/filetypes/BitmapFontFile.js | 2 +- src/loader/filetypes/CSSFile.js | 2 +- src/loader/filetypes/GLSLFile.js | 2 +- src/loader/filetypes/HTML5AudioFile.js | 2 +- src/loader/filetypes/HTMLFile.js | 2 +- src/loader/filetypes/HTMLTextureFile.js | 2 +- src/loader/filetypes/ImageFile.js | 2 +- src/loader/filetypes/JSONFile.js | 2 +- src/loader/filetypes/MultiAtlasFile.js | 2 +- src/loader/filetypes/MultiScriptFile.js | 2 +- src/loader/filetypes/PackFile.js | 2 +- src/loader/filetypes/PluginFile.js | 2 +- src/loader/filetypes/SVGFile.js | 2 +- src/loader/filetypes/SceneFile.js | 2 +- src/loader/filetypes/ScenePluginFile.js | 2 +- src/loader/filetypes/ScriptFile.js | 2 +- src/loader/filetypes/SpriteSheetFile.js | 2 +- src/loader/filetypes/TextFile.js | 2 +- src/loader/filetypes/TilemapCSVFile.js | 2 +- src/loader/filetypes/TilemapImpactFile.js | 2 +- src/loader/filetypes/TilemapJSONFile.js | 2 +- src/loader/filetypes/UnityAtlasFile.js | 2 +- src/loader/filetypes/VideoFile.js | 2 +- src/loader/filetypes/XMLFile.js | 2 +- src/loader/filetypes/index.js | 2 +- src/loader/filetypes/typedefs/index.js | 2 +- src/loader/index.js | 2 +- src/loader/typedefs/index.js | 2 +- src/math/Average.js | 2 +- src/math/Bernstein.js | 2 +- src/math/Between.js | 2 +- src/math/CatmullRom.js | 2 +- src/math/CeilTo.js | 2 +- src/math/Clamp.js | 2 +- src/math/DegToRad.js | 2 +- src/math/Difference.js | 2 +- src/math/Factorial.js | 2 +- src/math/FloatBetween.js | 2 +- src/math/FloorTo.js | 2 +- src/math/FromPercent.js | 2 +- src/math/GetSpeed.js | 2 +- src/math/IsEven.js | 2 +- src/math/IsEvenStrict.js | 2 +- src/math/Linear.js | 2 +- src/math/Matrix3.js | 2 +- src/math/Matrix4.js | 2 +- src/math/MaxAdd.js | 2 +- src/math/MinSub.js | 2 +- src/math/Percent.js | 2 +- src/math/Quaternion.js | 2 +- src/math/RadToDeg.js | 2 +- src/math/RandomXY.js | 2 +- src/math/RandomXYZ.js | 2 +- src/math/RandomXYZW.js | 2 +- src/math/Rotate.js | 2 +- src/math/RotateAround.js | 2 +- src/math/RotateAroundDistance.js | 2 +- src/math/RotateVec3.js | 2 +- src/math/RoundAwayFromZero.js | 2 +- src/math/RoundTo.js | 2 +- src/math/SinCosTableGenerator.js | 2 +- src/math/SmoothStep.js | 2 +- src/math/SmootherStep.js | 2 +- src/math/ToXY.js | 2 +- src/math/TransformXY.js | 2 +- src/math/Vector2.js | 2 +- src/math/Vector3.js | 2 +- src/math/Vector4.js | 2 +- src/math/Within.js | 2 +- src/math/Wrap.js | 2 +- src/math/angle/Between.js | 2 +- src/math/angle/BetweenPoints.js | 2 +- src/math/angle/BetweenPointsY.js | 2 +- src/math/angle/BetweenY.js | 2 +- src/math/angle/CounterClockwise.js | 2 +- src/math/angle/Normalize.js | 2 +- src/math/angle/Reverse.js | 2 +- src/math/angle/RotateTo.js | 2 +- src/math/angle/ShortestBetween.js | 2 +- src/math/angle/Wrap.js | 2 +- src/math/angle/WrapDegrees.js | 2 +- src/math/angle/index.js | 2 +- src/math/const.js | 2 +- src/math/distance/DistanceBetween.js | 2 +- src/math/distance/DistanceBetweenPoints.js | 2 +- src/math/distance/DistanceBetweenPointsSquared.js | 2 +- src/math/distance/DistanceChebyshev.js | 2 +- src/math/distance/DistancePower.js | 2 +- src/math/distance/DistanceSnake.js | 2 +- src/math/distance/DistanceSquared.js | 2 +- src/math/distance/index.js | 2 +- src/math/easing/EaseMap.js | 2 +- src/math/easing/back/In.js | 2 +- src/math/easing/back/InOut.js | 2 +- src/math/easing/back/Out.js | 2 +- src/math/easing/back/index.js | 2 +- src/math/easing/bounce/In.js | 2 +- src/math/easing/bounce/InOut.js | 2 +- src/math/easing/bounce/Out.js | 2 +- src/math/easing/bounce/index.js | 2 +- src/math/easing/circular/In.js | 2 +- src/math/easing/circular/InOut.js | 2 +- src/math/easing/circular/Out.js | 2 +- src/math/easing/circular/index.js | 2 +- src/math/easing/cubic/In.js | 2 +- src/math/easing/cubic/InOut.js | 2 +- src/math/easing/cubic/Out.js | 2 +- src/math/easing/cubic/index.js | 2 +- src/math/easing/elastic/In.js | 2 +- src/math/easing/elastic/InOut.js | 2 +- src/math/easing/elastic/Out.js | 2 +- src/math/easing/elastic/index.js | 2 +- src/math/easing/expo/In.js | 2 +- src/math/easing/expo/InOut.js | 2 +- src/math/easing/expo/Out.js | 2 +- src/math/easing/expo/index.js | 2 +- src/math/easing/index.js | 2 +- src/math/easing/linear/Linear.js | 2 +- src/math/easing/linear/index.js | 2 +- src/math/easing/quadratic/In.js | 2 +- src/math/easing/quadratic/InOut.js | 2 +- src/math/easing/quadratic/Out.js | 2 +- src/math/easing/quadratic/index.js | 2 +- src/math/easing/quartic/In.js | 2 +- src/math/easing/quartic/InOut.js | 2 +- src/math/easing/quartic/Out.js | 2 +- src/math/easing/quartic/index.js | 2 +- src/math/easing/quintic/In.js | 2 +- src/math/easing/quintic/InOut.js | 2 +- src/math/easing/quintic/Out.js | 2 +- src/math/easing/quintic/index.js | 2 +- src/math/easing/sine/In.js | 2 +- src/math/easing/sine/InOut.js | 2 +- src/math/easing/sine/Out.js | 2 +- src/math/easing/sine/index.js | 2 +- src/math/easing/stepped/Stepped.js | 2 +- src/math/easing/stepped/index.js | 2 +- src/math/fuzzy/Ceil.js | 2 +- src/math/fuzzy/Equal.js | 2 +- src/math/fuzzy/Floor.js | 2 +- src/math/fuzzy/GreaterThan.js | 2 +- src/math/fuzzy/LessThan.js | 2 +- src/math/fuzzy/index.js | 2 +- src/math/index.js | 2 +- src/math/interpolation/BezierInterpolation.js | 2 +- src/math/interpolation/CatmullRomInterpolation.js | 2 +- src/math/interpolation/CubicBezierInterpolation.js | 2 +- src/math/interpolation/LinearInterpolation.js | 2 +- src/math/interpolation/QuadraticBezierInterpolation.js | 2 +- src/math/interpolation/SmoothStepInterpolation.js | 2 +- src/math/interpolation/SmootherStepInterpolation.js | 2 +- src/math/interpolation/index.js | 2 +- src/math/pow2/GetPowerOfTwo.js | 2 +- src/math/pow2/IsSizePowerOfTwo.js | 2 +- src/math/pow2/IsValuePowerOfTwo.js | 2 +- src/math/pow2/index.js | 2 +- src/math/random-data-generator/RandomDataGenerator.js | 2 +- src/math/snap/SnapCeil.js | 2 +- src/math/snap/SnapFloor.js | 2 +- src/math/snap/SnapTo.js | 2 +- src/math/snap/index.js | 2 +- src/math/typedefs/index.js | 2 +- src/phaser-arcade-physics.js | 2 +- src/phaser-core.js | 2 +- src/phaser.js | 2 +- src/physics/arcade/ArcadeImage.js | 2 +- src/physics/arcade/ArcadePhysics.js | 2 +- src/physics/arcade/ArcadeSprite.js | 2 +- src/physics/arcade/Body.js | 2 +- src/physics/arcade/Collider.js | 2 +- src/physics/arcade/Factory.js | 2 +- src/physics/arcade/GetOverlapX.js | 2 +- src/physics/arcade/GetOverlapY.js | 2 +- src/physics/arcade/PhysicsGroup.js | 2 +- src/physics/arcade/SeparateX.js | 2 +- src/physics/arcade/SeparateY.js | 2 +- src/physics/arcade/StaticBody.js | 2 +- src/physics/arcade/StaticPhysicsGroup.js | 2 +- src/physics/arcade/World.js | 2 +- src/physics/arcade/components/Acceleration.js | 2 +- src/physics/arcade/components/Angular.js | 2 +- src/physics/arcade/components/Bounce.js | 2 +- src/physics/arcade/components/Debug.js | 2 +- src/physics/arcade/components/Drag.js | 2 +- src/physics/arcade/components/Enable.js | 2 +- src/physics/arcade/components/Friction.js | 2 +- src/physics/arcade/components/Gravity.js | 2 +- src/physics/arcade/components/Immovable.js | 2 +- src/physics/arcade/components/Mass.js | 2 +- src/physics/arcade/components/Size.js | 2 +- src/physics/arcade/components/Velocity.js | 2 +- src/physics/arcade/components/index.js | 2 +- src/physics/arcade/const.js | 2 +- src/physics/arcade/events/COLLIDE_EVENT.js | 2 +- src/physics/arcade/events/OVERLAP_EVENT.js | 2 +- src/physics/arcade/events/PAUSE_EVENT.js | 2 +- src/physics/arcade/events/RESUME_EVENT.js | 2 +- src/physics/arcade/events/TILE_COLLIDE_EVENT.js | 2 +- src/physics/arcade/events/TILE_OVERLAP_EVENT.js | 2 +- src/physics/arcade/events/WORLD_BOUNDS_EVENT.js | 2 +- src/physics/arcade/events/WORLD_STEP_EVENT.js | 2 +- src/physics/arcade/events/index.js | 2 +- src/physics/arcade/index.js | 2 +- src/physics/arcade/tilemap/ProcessTileCallbacks.js | 2 +- src/physics/arcade/tilemap/ProcessTileSeparationX.js | 2 +- src/physics/arcade/tilemap/ProcessTileSeparationY.js | 2 +- src/physics/arcade/tilemap/SeparateTile.js | 2 +- src/physics/arcade/tilemap/TileCheckX.js | 2 +- src/physics/arcade/tilemap/TileCheckY.js | 2 +- src/physics/arcade/tilemap/TileIntersectsBody.js | 2 +- src/physics/arcade/typedefs/index.js | 2 +- src/physics/impact/Body.js | 2 +- src/physics/impact/COLLIDES.js | 2 +- src/physics/impact/CollisionMap.js | 2 +- src/physics/impact/DefaultDefs.js | 2 +- src/physics/impact/Factory.js | 2 +- src/physics/impact/GetVelocity.js | 2 +- src/physics/impact/ImpactBody.js | 2 +- src/physics/impact/ImpactImage.js | 2 +- src/physics/impact/ImpactPhysics.js | 2 +- src/physics/impact/ImpactSprite.js | 2 +- src/physics/impact/SeparateX.js | 2 +- src/physics/impact/SeparateY.js | 2 +- src/physics/impact/Solver.js | 2 +- src/physics/impact/TYPE.js | 2 +- src/physics/impact/UpdateMotion.js | 2 +- src/physics/impact/World.js | 2 +- src/physics/impact/components/Acceleration.js | 2 +- src/physics/impact/components/BodyScale.js | 2 +- src/physics/impact/components/BodyType.js | 2 +- src/physics/impact/components/Bounce.js | 2 +- src/physics/impact/components/CheckAgainst.js | 2 +- src/physics/impact/components/Collides.js | 2 +- src/physics/impact/components/Debug.js | 2 +- src/physics/impact/components/Friction.js | 2 +- src/physics/impact/components/Gravity.js | 2 +- src/physics/impact/components/Offset.js | 2 +- src/physics/impact/components/SetGameObject.js | 2 +- src/physics/impact/components/Velocity.js | 2 +- src/physics/impact/components/index.js | 2 +- src/physics/impact/events/COLLIDE_EVENT.js | 2 +- src/physics/impact/events/PAUSE_EVENT.js | 2 +- src/physics/impact/events/RESUME_EVENT.js | 2 +- src/physics/impact/events/index.js | 2 +- src/physics/impact/index.js | 2 +- src/physics/impact/typedefs/index.js | 2 +- src/physics/index.js | 2 +- src/physics/matter-js/BodyBounds.js | 2 +- src/physics/matter-js/CustomMain.js | 2 +- src/physics/matter-js/Factory.js | 2 +- src/physics/matter-js/MatterGameObject.js | 2 +- src/physics/matter-js/MatterImage.js | 2 +- src/physics/matter-js/MatterPhysics.js | 2 +- src/physics/matter-js/MatterSprite.js | 2 +- src/physics/matter-js/MatterTileBody.js | 2 +- src/physics/matter-js/PhysicsEditorParser.js | 2 +- src/physics/matter-js/PhysicsJSONParser.js | 2 +- src/physics/matter-js/PointerConstraint.js | 2 +- src/physics/matter-js/World.js | 2 +- src/physics/matter-js/components/Bounce.js | 2 +- src/physics/matter-js/components/Collision.js | 2 +- src/physics/matter-js/components/Force.js | 2 +- src/physics/matter-js/components/Friction.js | 2 +- src/physics/matter-js/components/Gravity.js | 2 +- src/physics/matter-js/components/Mass.js | 2 +- src/physics/matter-js/components/Sensor.js | 2 +- src/physics/matter-js/components/SetBody.js | 2 +- src/physics/matter-js/components/Sleep.js | 2 +- src/physics/matter-js/components/Static.js | 2 +- src/physics/matter-js/components/Transform.js | 2 +- src/physics/matter-js/components/Velocity.js | 2 +- src/physics/matter-js/components/index.js | 2 +- src/physics/matter-js/events/AFTER_ADD_EVENT.js | 2 +- src/physics/matter-js/events/AFTER_REMOVE_EVENT.js | 2 +- src/physics/matter-js/events/AFTER_UPDATE_EVENT.js | 2 +- src/physics/matter-js/events/BEFORE_ADD_EVENT.js | 2 +- src/physics/matter-js/events/BEFORE_REMOVE_EVENT.js | 2 +- src/physics/matter-js/events/BEFORE_UPDATE_EVENT.js | 2 +- src/physics/matter-js/events/COLLISION_ACTIVE_EVENT.js | 2 +- src/physics/matter-js/events/COLLISION_END_EVENT.js | 2 +- src/physics/matter-js/events/COLLISION_START_EVENT.js | 2 +- src/physics/matter-js/events/DRAG_END_EVENT.js | 2 +- src/physics/matter-js/events/DRAG_EVENT.js | 2 +- src/physics/matter-js/events/DRAG_START_EVENT.js | 2 +- src/physics/matter-js/events/PAUSE_EVENT.js | 2 +- src/physics/matter-js/events/RESUME_EVENT.js | 2 +- src/physics/matter-js/events/SLEEP_END_EVENT.js | 2 +- src/physics/matter-js/events/SLEEP_START_EVENT.js | 2 +- src/physics/matter-js/events/index.js | 2 +- src/physics/matter-js/index.js | 2 +- src/physics/matter-js/typedefs/index.js | 2 +- src/plugins/BasePlugin.js | 2 +- src/plugins/DefaultPlugins.js | 2 +- src/plugins/PluginCache.js | 2 +- src/plugins/PluginManager.js | 2 +- src/plugins/ScenePlugin.js | 2 +- src/plugins/index.js | 2 +- src/plugins/typedefs/index.js | 2 +- src/renderer/BlendModes.js | 2 +- src/renderer/ScaleModes.js | 2 +- src/renderer/canvas/CanvasRenderer.js | 2 +- src/renderer/canvas/index.js | 2 +- src/renderer/canvas/utils/GetBlendModes.js | 2 +- src/renderer/canvas/utils/SetTransform.js | 2 +- src/renderer/index.js | 2 +- src/renderer/snapshot/CanvasSnapshot.js | 2 +- src/renderer/snapshot/WebGLSnapshot.js | 2 +- src/renderer/snapshot/index.js | 2 +- src/renderer/snapshot/typedefs/index.js | 2 +- src/renderer/webgl/Utils.js | 2 +- src/renderer/webgl/WebGLPipeline.js | 2 +- src/renderer/webgl/WebGLRenderer.js | 2 +- src/renderer/webgl/index.js | 2 +- src/renderer/webgl/pipelines/BitmapMaskPipeline.js | 2 +- src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js | 2 +- src/renderer/webgl/pipelines/TextureTintPipeline.js | 2 +- src/renderer/webgl/pipelines/components/ModelViewProjection.js | 2 +- src/renderer/webgl/pipelines/index.js | 2 +- src/scale/ScaleManager.js | 2 +- src/scale/const/CENTER_CONST.js | 2 +- src/scale/const/ORIENTATION_CONST.js | 2 +- src/scale/const/SCALE_MODE_CONST.js | 2 +- src/scale/const/ZOOM_CONST.js | 2 +- src/scale/const/index.js | 2 +- src/scale/events/ENTER_FULLSCREEN_EVENT.js | 2 +- src/scale/events/FULLSCREEN_FAILED_EVENT.js | 2 +- src/scale/events/FULLSCREEN_UNSUPPORTED_EVENT.js | 2 +- src/scale/events/LEAVE_FULLSCREEN_EVENT.js | 2 +- src/scale/events/ORIENTATION_CHANGE_EVENT.js | 2 +- src/scale/events/RESIZE_EVENT.js | 2 +- src/scale/events/index.js | 2 +- src/scale/index.js | 2 +- src/scene/GetPhysicsPlugins.js | 2 +- src/scene/GetScenePlugins.js | 2 +- src/scene/InjectionMap.js | 2 +- src/scene/Scene.js | 2 +- src/scene/SceneManager.js | 2 +- src/scene/ScenePlugin.js | 2 +- src/scene/Settings.js | 2 +- src/scene/Systems.js | 2 +- src/scene/const.js | 2 +- src/scene/events/BOOT_EVENT.js | 2 +- src/scene/events/CREATE_EVENT.js | 2 +- src/scene/events/DESTROY_EVENT.js | 2 +- src/scene/events/PAUSE_EVENT.js | 2 +- src/scene/events/POST_UPDATE_EVENT.js | 2 +- src/scene/events/PRE_UPDATE_EVENT.js | 2 +- src/scene/events/READY_EVENT.js | 2 +- src/scene/events/RENDER_EVENT.js | 2 +- src/scene/events/RESUME_EVENT.js | 2 +- src/scene/events/SHUTDOWN_EVENT.js | 2 +- src/scene/events/SLEEP_EVENT.js | 2 +- src/scene/events/START_EVENT.js | 2 +- src/scene/events/TRANSITION_COMPLETE_EVENT.js | 2 +- src/scene/events/TRANSITION_INIT_EVENT.js | 2 +- src/scene/events/TRANSITION_OUT_EVENT.js | 2 +- src/scene/events/TRANSITION_START_EVENT.js | 2 +- src/scene/events/TRANSITION_WAKE_EVENT.js | 2 +- src/scene/events/UPDATE_EVENT.js | 2 +- src/scene/events/WAKE_EVENT.js | 2 +- src/scene/events/index.js | 2 +- src/scene/index.js | 2 +- src/scene/typedefs/index.js | 2 +- src/sound/BaseSound.js | 2 +- src/sound/BaseSoundManager.js | 2 +- src/sound/SoundManagerCreator.js | 2 +- src/sound/events/COMPLETE_EVENT.js | 2 +- src/sound/events/DECODED_ALL_EVENT.js | 2 +- src/sound/events/DECODED_EVENT.js | 2 +- src/sound/events/DESTROY_EVENT.js | 2 +- src/sound/events/DETUNE_EVENT.js | 2 +- src/sound/events/GLOBAL_DETUNE_EVENT.js | 2 +- src/sound/events/GLOBAL_MUTE_EVENT.js | 2 +- src/sound/events/GLOBAL_RATE_EVENT.js | 2 +- src/sound/events/GLOBAL_VOLUME_EVENT.js | 2 +- src/sound/events/LOOPED_EVENT.js | 2 +- src/sound/events/LOOP_EVENT.js | 2 +- src/sound/events/MUTE_EVENT.js | 2 +- src/sound/events/PAUSE_ALL_EVENT.js | 2 +- src/sound/events/PAUSE_EVENT.js | 2 +- src/sound/events/PLAY_EVENT.js | 2 +- src/sound/events/RATE_EVENT.js | 2 +- src/sound/events/RESUME_ALL_EVENT.js | 2 +- src/sound/events/RESUME_EVENT.js | 2 +- src/sound/events/SEEK_EVENT.js | 2 +- src/sound/events/STOP_ALL_EVENT.js | 2 +- src/sound/events/STOP_EVENT.js | 2 +- src/sound/events/UNLOCKED_EVENT.js | 2 +- src/sound/events/VOLUME_EVENT.js | 2 +- src/sound/events/index.js | 2 +- src/sound/html5/HTML5AudioSound.js | 2 +- src/sound/html5/HTML5AudioSoundManager.js | 2 +- src/sound/index.js | 2 +- src/sound/noaudio/NoAudioSound.js | 2 +- src/sound/noaudio/NoAudioSoundManager.js | 2 +- src/sound/typedefs/index.js | 2 +- src/sound/webaudio/WebAudioSound.js | 2 +- src/sound/webaudio/WebAudioSoundManager.js | 2 +- src/structs/List.js | 2 +- src/structs/Map.js | 2 +- src/structs/ProcessQueue.js | 2 +- src/structs/RTree.js | 2 +- src/structs/Set.js | 2 +- src/structs/Size.js | 2 +- src/structs/events/PROCESS_QUEUE_ADD_EVENT.js | 2 +- src/structs/events/PROCESS_QUEUE_REMOVE_EVENT.js | 2 +- src/structs/events/index.js | 2 +- src/structs/index.js | 2 +- src/textures/CanvasTexture.js | 2 +- src/textures/Frame.js | 2 +- src/textures/Texture.js | 2 +- src/textures/TextureManager.js | 2 +- src/textures/TextureSource.js | 2 +- src/textures/const.js | 2 +- src/textures/events/ADD_EVENT.js | 2 +- src/textures/events/ERROR_EVENT.js | 2 +- src/textures/events/LOAD_EVENT.js | 2 +- src/textures/events/READY_EVENT.js | 2 +- src/textures/events/REMOVE_EVENT.js | 2 +- src/textures/events/index.js | 2 +- src/textures/index.js | 2 +- src/textures/parsers/AtlasXML.js | 2 +- src/textures/parsers/Canvas.js | 2 +- src/textures/parsers/Image.js | 2 +- src/textures/parsers/JSONArray.js | 2 +- src/textures/parsers/JSONHash.js | 2 +- src/textures/parsers/SpriteSheet.js | 2 +- src/textures/parsers/SpriteSheetFromAtlas.js | 2 +- src/textures/parsers/UnityYAML.js | 2 +- src/textures/parsers/index.js | 2 +- src/textures/typedefs/index.js | 2 +- src/tilemaps/Formats.js | 2 +- src/tilemaps/ImageCollection.js | 2 +- src/tilemaps/ParseToTilemap.js | 2 +- src/tilemaps/Tile.js | 2 +- src/tilemaps/Tilemap.js | 2 +- src/tilemaps/TilemapCreator.js | 2 +- src/tilemaps/TilemapFactory.js | 2 +- src/tilemaps/Tileset.js | 2 +- src/tilemaps/components/CalculateFacesAt.js | 2 +- src/tilemaps/components/CalculateFacesWithin.js | 2 +- src/tilemaps/components/Copy.js | 2 +- src/tilemaps/components/CreateFromTiles.js | 2 +- src/tilemaps/components/CullTiles.js | 2 +- src/tilemaps/components/Fill.js | 2 +- src/tilemaps/components/FilterTiles.js | 2 +- src/tilemaps/components/FindByIndex.js | 2 +- src/tilemaps/components/FindTile.js | 2 +- src/tilemaps/components/ForEachTile.js | 2 +- src/tilemaps/components/GetTileAt.js | 2 +- src/tilemaps/components/GetTileAtWorldXY.js | 2 +- src/tilemaps/components/GetTilesWithin.js | 2 +- src/tilemaps/components/GetTilesWithinShape.js | 2 +- src/tilemaps/components/GetTilesWithinWorldXY.js | 2 +- src/tilemaps/components/HasTileAt.js | 2 +- src/tilemaps/components/HasTileAtWorldXY.js | 2 +- src/tilemaps/components/IsInLayerBounds.js | 2 +- src/tilemaps/components/PutTileAt.js | 2 +- src/tilemaps/components/PutTileAtWorldXY.js | 2 +- src/tilemaps/components/PutTilesAt.js | 2 +- src/tilemaps/components/Randomize.js | 2 +- src/tilemaps/components/RemoveTileAt.js | 2 +- src/tilemaps/components/RemoveTileAtWorldXY.js | 2 +- src/tilemaps/components/RenderDebug.js | 2 +- src/tilemaps/components/ReplaceByIndex.js | 2 +- src/tilemaps/components/SetCollision.js | 2 +- src/tilemaps/components/SetCollisionBetween.js | 2 +- src/tilemaps/components/SetCollisionByExclusion.js | 2 +- src/tilemaps/components/SetCollisionByProperty.js | 2 +- src/tilemaps/components/SetCollisionFromCollisionGroup.js | 2 +- src/tilemaps/components/SetLayerCollisionIndex.js | 2 +- src/tilemaps/components/SetTileCollision.js | 2 +- src/tilemaps/components/SetTileIndexCallback.js | 2 +- src/tilemaps/components/SetTileLocationCallback.js | 2 +- src/tilemaps/components/Shuffle.js | 2 +- src/tilemaps/components/SwapByIndex.js | 2 +- src/tilemaps/components/TileToWorldX.js | 2 +- src/tilemaps/components/TileToWorldXY.js | 2 +- src/tilemaps/components/TileToWorldY.js | 2 +- src/tilemaps/components/WeightedRandomize.js | 2 +- src/tilemaps/components/WorldToTileX.js | 2 +- src/tilemaps/components/WorldToTileXY.js | 2 +- src/tilemaps/components/WorldToTileY.js | 2 +- src/tilemaps/components/index.js | 2 +- src/tilemaps/dynamiclayer/DynamicTilemapLayer.js | 2 +- src/tilemaps/dynamiclayer/DynamicTilemapLayerCanvasRenderer.js | 2 +- src/tilemaps/dynamiclayer/DynamicTilemapLayerRender.js | 2 +- src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js | 2 +- src/tilemaps/index.js | 2 +- src/tilemaps/mapdata/LayerData.js | 2 +- src/tilemaps/mapdata/MapData.js | 2 +- src/tilemaps/mapdata/ObjectLayer.js | 2 +- src/tilemaps/parsers/Parse.js | 2 +- src/tilemaps/parsers/Parse2DArray.js | 2 +- src/tilemaps/parsers/ParseCSV.js | 2 +- src/tilemaps/parsers/impact/ParseTileLayers.js | 2 +- src/tilemaps/parsers/impact/ParseTilesets.js | 2 +- src/tilemaps/parsers/impact/ParseWeltmeister.js | 2 +- src/tilemaps/parsers/impact/index.js | 2 +- src/tilemaps/parsers/index.js | 2 +- src/tilemaps/parsers/tiled/AssignTileProperties.js | 2 +- src/tilemaps/parsers/tiled/Base64Decode.js | 2 +- src/tilemaps/parsers/tiled/BuildTilesetIndex.js | 2 +- src/tilemaps/parsers/tiled/CreateGroupLayer.js | 2 +- src/tilemaps/parsers/tiled/ParseGID.js | 2 +- src/tilemaps/parsers/tiled/ParseImageLayers.js | 2 +- src/tilemaps/parsers/tiled/ParseJSONTiled.js | 2 +- src/tilemaps/parsers/tiled/ParseObject.js | 2 +- src/tilemaps/parsers/tiled/ParseObjectLayers.js | 2 +- src/tilemaps/parsers/tiled/ParseTileLayers.js | 2 +- src/tilemaps/parsers/tiled/ParseTilesets.js | 2 +- src/tilemaps/parsers/tiled/index.js | 2 +- src/tilemaps/staticlayer/StaticTilemapLayer.js | 2 +- src/tilemaps/staticlayer/StaticTilemapLayerCanvasRenderer.js | 2 +- src/tilemaps/staticlayer/StaticTilemapLayerRender.js | 2 +- src/tilemaps/staticlayer/StaticTilemapLayerWebGLRenderer.js | 2 +- src/tilemaps/typedefs/index.js | 2 +- src/time/Clock.js | 2 +- src/time/TimerEvent.js | 2 +- src/time/index.js | 2 +- src/time/typedefs/index.js | 2 +- src/tweens/Timeline.js | 2 +- src/tweens/TweenManager.js | 2 +- src/tweens/builders/GetBoolean.js | 2 +- src/tweens/builders/GetEaseFunction.js | 2 +- src/tweens/builders/GetNewValue.js | 2 +- src/tweens/builders/GetProps.js | 2 +- src/tweens/builders/GetTargets.js | 2 +- src/tweens/builders/GetTweens.js | 2 +- src/tweens/builders/GetValueOp.js | 2 +- src/tweens/builders/NumberTweenBuilder.js | 2 +- src/tweens/builders/StaggerBuilder.js | 2 +- src/tweens/builders/TimelineBuilder.js | 2 +- src/tweens/builders/TweenBuilder.js | 2 +- src/tweens/builders/index.js | 2 +- src/tweens/events/TIMELINE_COMPLETE_EVENT.js | 2 +- src/tweens/events/TIMELINE_LOOP_EVENT.js | 2 +- src/tweens/events/TIMELINE_PAUSE_EVENT.js | 2 +- src/tweens/events/TIMELINE_RESUME_EVENT.js | 2 +- src/tweens/events/TIMELINE_START_EVENT.js | 2 +- src/tweens/events/TIMELINE_UPDATE_EVENT.js | 2 +- src/tweens/events/TWEEN_ACTIVE_EVENT.js | 2 +- src/tweens/events/TWEEN_COMPLETE_EVENT.js | 2 +- src/tweens/events/TWEEN_LOOP_EVENT.js | 2 +- src/tweens/events/TWEEN_REPEAT_EVENT.js | 2 +- src/tweens/events/TWEEN_START_EVENT.js | 2 +- src/tweens/events/TWEEN_UPDATE_EVENT.js | 2 +- src/tweens/events/TWEEN_YOYO_EVENT.js | 2 +- src/tweens/events/index.js | 2 +- src/tweens/index.js | 2 +- src/tweens/tween/Defaults.js | 2 +- src/tweens/tween/ReservedProps.js | 2 +- src/tweens/tween/Tween.js | 2 +- src/tweens/tween/TweenData.js | 2 +- src/tweens/tween/const.js | 2 +- src/tweens/typedefs/index.js | 2 +- src/utils/Class.js | 2 +- src/utils/NOOP.js | 2 +- src/utils/array/Add.js | 2 +- src/utils/array/AddAt.js | 2 +- src/utils/array/BringToTop.js | 2 +- src/utils/array/CountAllMatching.js | 2 +- src/utils/array/Each.js | 2 +- src/utils/array/EachInRange.js | 2 +- src/utils/array/FindClosestInSorted.js | 2 +- src/utils/array/GetAll.js | 2 +- src/utils/array/GetFirst.js | 2 +- src/utils/array/GetRandom.js | 2 +- src/utils/array/MoveDown.js | 2 +- src/utils/array/MoveTo.js | 2 +- src/utils/array/MoveUp.js | 2 +- src/utils/array/NumberArray.js | 2 +- src/utils/array/NumberArrayStep.js | 2 +- src/utils/array/QuickSelect.js | 2 +- src/utils/array/Range.js | 2 +- src/utils/array/Remove.js | 2 +- src/utils/array/RemoveAt.js | 2 +- src/utils/array/RemoveBetween.js | 2 +- src/utils/array/RemoveRandomElement.js | 2 +- src/utils/array/Replace.js | 2 +- src/utils/array/RotateLeft.js | 2 +- src/utils/array/RotateRight.js | 2 +- src/utils/array/SafeRange.js | 2 +- src/utils/array/SendToBack.js | 2 +- src/utils/array/SetAll.js | 2 +- src/utils/array/Shuffle.js | 2 +- src/utils/array/SpliceOne.js | 2 +- src/utils/array/StableSort.js | 2 +- src/utils/array/Swap.js | 2 +- src/utils/array/index.js | 2 +- src/utils/array/matrix/CheckMatrix.js | 2 +- src/utils/array/matrix/MatrixToString.js | 2 +- src/utils/array/matrix/ReverseColumns.js | 2 +- src/utils/array/matrix/ReverseRows.js | 2 +- src/utils/array/matrix/Rotate180.js | 2 +- src/utils/array/matrix/RotateLeft.js | 2 +- src/utils/array/matrix/RotateMatrix.js | 2 +- src/utils/array/matrix/RotateRight.js | 2 +- src/utils/array/matrix/TransposeMatrix.js | 2 +- src/utils/array/matrix/index.js | 2 +- src/utils/base64/ArrayBufferToBase64.js | 2 +- src/utils/base64/Base64ToArrayBuffer.js | 2 +- src/utils/base64/index.js | 2 +- src/utils/index.js | 2 +- src/utils/object/Clone.js | 2 +- src/utils/object/Extend.js | 2 +- src/utils/object/GetAdvancedValue.js | 2 +- src/utils/object/GetFastValue.js | 2 +- src/utils/object/GetMinMaxValue.js | 2 +- src/utils/object/GetValue.js | 2 +- src/utils/object/HasAll.js | 2 +- src/utils/object/HasAny.js | 2 +- src/utils/object/HasValue.js | 2 +- src/utils/object/IsPlainObject.js | 2 +- src/utils/object/Merge.js | 2 +- src/utils/object/MergeRight.js | 2 +- src/utils/object/Pick.js | 2 +- src/utils/object/SetValue.js | 2 +- src/utils/object/index.js | 2 +- src/utils/string/Format.js | 2 +- src/utils/string/Pad.js | 2 +- src/utils/string/Reverse.js | 2 +- src/utils/string/UUID.js | 2 +- src/utils/string/UppercaseFirst.js | 2 +- src/utils/string/index.js | 2 +- 1441 files changed, 1441 insertions(+), 1441 deletions(-) diff --git a/src/actions/AlignTo.js b/src/actions/AlignTo.js index e71fa8c1d..088679357 100644 --- a/src/actions/AlignTo.js +++ b/src/actions/AlignTo.js @@ -1,6 +1,6 @@ /** * @author samme - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/Angle.js b/src/actions/Angle.js index e7522bca1..65601e693 100644 --- a/src/actions/Angle.js +++ b/src/actions/Angle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/Call.js b/src/actions/Call.js index af24a6450..403bdc150 100644 --- a/src/actions/Call.js +++ b/src/actions/Call.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/GetFirst.js b/src/actions/GetFirst.js index 65508f1c3..65c632fc1 100644 --- a/src/actions/GetFirst.js +++ b/src/actions/GetFirst.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/GetLast.js b/src/actions/GetLast.js index 1d459680b..4de1e6e1d 100644 --- a/src/actions/GetLast.js +++ b/src/actions/GetLast.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/GridAlign.js b/src/actions/GridAlign.js index b6ef9219c..c7aa00ffd 100644 --- a/src/actions/GridAlign.js +++ b/src/actions/GridAlign.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/IncAlpha.js b/src/actions/IncAlpha.js index b9c40a26c..c391f45fc 100644 --- a/src/actions/IncAlpha.js +++ b/src/actions/IncAlpha.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/IncX.js b/src/actions/IncX.js index 123b294c9..3ded566a8 100644 --- a/src/actions/IncX.js +++ b/src/actions/IncX.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/IncXY.js b/src/actions/IncXY.js index 7317466f7..1174cf227 100644 --- a/src/actions/IncXY.js +++ b/src/actions/IncXY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/IncY.js b/src/actions/IncY.js index 3cc8c4a40..3f7af5ffe 100644 --- a/src/actions/IncY.js +++ b/src/actions/IncY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/PlaceOnCircle.js b/src/actions/PlaceOnCircle.js index 2a81f8dce..687dad837 100644 --- a/src/actions/PlaceOnCircle.js +++ b/src/actions/PlaceOnCircle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/PlaceOnEllipse.js b/src/actions/PlaceOnEllipse.js index dd382b2cf..0d5e49206 100644 --- a/src/actions/PlaceOnEllipse.js +++ b/src/actions/PlaceOnEllipse.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/PlaceOnLine.js b/src/actions/PlaceOnLine.js index 99583d4b7..025cc2e45 100644 --- a/src/actions/PlaceOnLine.js +++ b/src/actions/PlaceOnLine.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/PlaceOnRectangle.js b/src/actions/PlaceOnRectangle.js index 00b70e97f..c70de95a2 100644 --- a/src/actions/PlaceOnRectangle.js +++ b/src/actions/PlaceOnRectangle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/PlaceOnTriangle.js b/src/actions/PlaceOnTriangle.js index 182ea7931..e935cddd0 100644 --- a/src/actions/PlaceOnTriangle.js +++ b/src/actions/PlaceOnTriangle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/PlayAnimation.js b/src/actions/PlayAnimation.js index 5ee5a3447..f708b19f1 100644 --- a/src/actions/PlayAnimation.js +++ b/src/actions/PlayAnimation.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/PropertyValueInc.js b/src/actions/PropertyValueInc.js index eb27e050a..31de3db64 100644 --- a/src/actions/PropertyValueInc.js +++ b/src/actions/PropertyValueInc.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/PropertyValueSet.js b/src/actions/PropertyValueSet.js index 6c88ee160..f80287417 100644 --- a/src/actions/PropertyValueSet.js +++ b/src/actions/PropertyValueSet.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/RandomCircle.js b/src/actions/RandomCircle.js index 6e91b88f3..5038e8f44 100644 --- a/src/actions/RandomCircle.js +++ b/src/actions/RandomCircle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/RandomEllipse.js b/src/actions/RandomEllipse.js index c432d8cda..0b8a97b77 100644 --- a/src/actions/RandomEllipse.js +++ b/src/actions/RandomEllipse.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/RandomLine.js b/src/actions/RandomLine.js index 526aeb269..44220a435 100644 --- a/src/actions/RandomLine.js +++ b/src/actions/RandomLine.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/RandomRectangle.js b/src/actions/RandomRectangle.js index bcd972f6d..4abec349c 100644 --- a/src/actions/RandomRectangle.js +++ b/src/actions/RandomRectangle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/RandomTriangle.js b/src/actions/RandomTriangle.js index e64f58f7f..091202cf3 100644 --- a/src/actions/RandomTriangle.js +++ b/src/actions/RandomTriangle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/Rotate.js b/src/actions/Rotate.js index 509b81935..0c93ae668 100644 --- a/src/actions/Rotate.js +++ b/src/actions/Rotate.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/RotateAround.js b/src/actions/RotateAround.js index 2a63e81d5..6978dfc2f 100644 --- a/src/actions/RotateAround.js +++ b/src/actions/RotateAround.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/RotateAroundDistance.js b/src/actions/RotateAroundDistance.js index 0c0bfc62e..724c33537 100644 --- a/src/actions/RotateAroundDistance.js +++ b/src/actions/RotateAroundDistance.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/ScaleX.js b/src/actions/ScaleX.js index ccfd9d159..209967ed7 100644 --- a/src/actions/ScaleX.js +++ b/src/actions/ScaleX.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/ScaleXY.js b/src/actions/ScaleXY.js index 3b541346d..0d9182a3b 100644 --- a/src/actions/ScaleXY.js +++ b/src/actions/ScaleXY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/ScaleY.js b/src/actions/ScaleY.js index 2b36ccf35..2193165f4 100644 --- a/src/actions/ScaleY.js +++ b/src/actions/ScaleY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/SetAlpha.js b/src/actions/SetAlpha.js index 743160d85..0f867e084 100644 --- a/src/actions/SetAlpha.js +++ b/src/actions/SetAlpha.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/SetBlendMode.js b/src/actions/SetBlendMode.js index b92e6f7d1..bb4997732 100644 --- a/src/actions/SetBlendMode.js +++ b/src/actions/SetBlendMode.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/SetDepth.js b/src/actions/SetDepth.js index 2e7634394..5d2854d1e 100644 --- a/src/actions/SetDepth.js +++ b/src/actions/SetDepth.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/SetHitArea.js b/src/actions/SetHitArea.js index 29c1f1295..5024dc42f 100644 --- a/src/actions/SetHitArea.js +++ b/src/actions/SetHitArea.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/SetOrigin.js b/src/actions/SetOrigin.js index 086ed3e4f..6983e4563 100644 --- a/src/actions/SetOrigin.js +++ b/src/actions/SetOrigin.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/SetRotation.js b/src/actions/SetRotation.js index a880d2745..d3c5b36ce 100644 --- a/src/actions/SetRotation.js +++ b/src/actions/SetRotation.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/SetScale.js b/src/actions/SetScale.js index a8e94319c..78daccd20 100644 --- a/src/actions/SetScale.js +++ b/src/actions/SetScale.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/SetScaleX.js b/src/actions/SetScaleX.js index a371fa199..ef2c40859 100644 --- a/src/actions/SetScaleX.js +++ b/src/actions/SetScaleX.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/SetScaleY.js b/src/actions/SetScaleY.js index b8ad6735e..296ff919a 100644 --- a/src/actions/SetScaleY.js +++ b/src/actions/SetScaleY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/SetScrollFactor.js b/src/actions/SetScrollFactor.js index a0c21bdbd..4598e7c40 100644 --- a/src/actions/SetScrollFactor.js +++ b/src/actions/SetScrollFactor.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/SetScrollFactorX.js b/src/actions/SetScrollFactorX.js index fbaa7820b..e39b64dcd 100644 --- a/src/actions/SetScrollFactorX.js +++ b/src/actions/SetScrollFactorX.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/SetScrollFactorY.js b/src/actions/SetScrollFactorY.js index 1fc6d6e24..fe2a9fca2 100644 --- a/src/actions/SetScrollFactorY.js +++ b/src/actions/SetScrollFactorY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/SetTint.js b/src/actions/SetTint.js index c312b6de4..ce687138b 100644 --- a/src/actions/SetTint.js +++ b/src/actions/SetTint.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/SetVisible.js b/src/actions/SetVisible.js index 2664d1979..9f9ad347e 100644 --- a/src/actions/SetVisible.js +++ b/src/actions/SetVisible.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/SetX.js b/src/actions/SetX.js index 512c62bc7..3216a9393 100644 --- a/src/actions/SetX.js +++ b/src/actions/SetX.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/SetXY.js b/src/actions/SetXY.js index 8e721d8f1..3bb4f964e 100644 --- a/src/actions/SetXY.js +++ b/src/actions/SetXY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/SetY.js b/src/actions/SetY.js index c23c56d8f..9c96b97b7 100644 --- a/src/actions/SetY.js +++ b/src/actions/SetY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/ShiftPosition.js b/src/actions/ShiftPosition.js index ef815cd6b..9e0c16b32 100644 --- a/src/actions/ShiftPosition.js +++ b/src/actions/ShiftPosition.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/Shuffle.js b/src/actions/Shuffle.js index 105816492..933beac68 100644 --- a/src/actions/Shuffle.js +++ b/src/actions/Shuffle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/SmoothStep.js b/src/actions/SmoothStep.js index 8df36122a..b97396cb5 100644 --- a/src/actions/SmoothStep.js +++ b/src/actions/SmoothStep.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/SmootherStep.js b/src/actions/SmootherStep.js index 0c68d9ff8..0fb21d781 100644 --- a/src/actions/SmootherStep.js +++ b/src/actions/SmootherStep.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/Spread.js b/src/actions/Spread.js index eef8fd67e..61e87bf18 100644 --- a/src/actions/Spread.js +++ b/src/actions/Spread.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/ToggleVisible.js b/src/actions/ToggleVisible.js index b7b4234cd..294013797 100644 --- a/src/actions/ToggleVisible.js +++ b/src/actions/ToggleVisible.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/WrapInRectangle.js b/src/actions/WrapInRectangle.js index 29bac9bc0..63e74c2d7 100644 --- a/src/actions/WrapInRectangle.js +++ b/src/actions/WrapInRectangle.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @author samme - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/index.js b/src/actions/index.js index 16fcbaf92..e7bc94c72 100644 --- a/src/actions/index.js +++ b/src/actions/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/actions/typedefs/index.js b/src/actions/typedefs/index.js index 79012818f..dd8bb2e75 100644 --- a/src/actions/typedefs/index.js +++ b/src/actions/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/animations/Animation.js b/src/animations/Animation.js index d2c0fb883..0502b7c0f 100644 --- a/src/animations/Animation.js +++ b/src/animations/Animation.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/animations/AnimationFrame.js b/src/animations/AnimationFrame.js index 40d227a30..49b4dc752 100644 --- a/src/animations/AnimationFrame.js +++ b/src/animations/AnimationFrame.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/animations/AnimationManager.js b/src/animations/AnimationManager.js index 5ffd0db6c..9a56d3d42 100644 --- a/src/animations/AnimationManager.js +++ b/src/animations/AnimationManager.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/animations/events/ADD_ANIMATION_EVENT.js b/src/animations/events/ADD_ANIMATION_EVENT.js index 5c1ab9a4f..1c288cbfe 100644 --- a/src/animations/events/ADD_ANIMATION_EVENT.js +++ b/src/animations/events/ADD_ANIMATION_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/animations/events/ANIMATION_COMPLETE_EVENT.js b/src/animations/events/ANIMATION_COMPLETE_EVENT.js index 199110a58..0c36c0d72 100644 --- a/src/animations/events/ANIMATION_COMPLETE_EVENT.js +++ b/src/animations/events/ANIMATION_COMPLETE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/animations/events/ANIMATION_REPEAT_EVENT.js b/src/animations/events/ANIMATION_REPEAT_EVENT.js index d1b9fa825..d79dcde80 100644 --- a/src/animations/events/ANIMATION_REPEAT_EVENT.js +++ b/src/animations/events/ANIMATION_REPEAT_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/animations/events/ANIMATION_RESTART_EVENT.js b/src/animations/events/ANIMATION_RESTART_EVENT.js index 075026d81..e959a464b 100644 --- a/src/animations/events/ANIMATION_RESTART_EVENT.js +++ b/src/animations/events/ANIMATION_RESTART_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/animations/events/ANIMATION_START_EVENT.js b/src/animations/events/ANIMATION_START_EVENT.js index c13205e74..8d65cb818 100644 --- a/src/animations/events/ANIMATION_START_EVENT.js +++ b/src/animations/events/ANIMATION_START_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/animations/events/PAUSE_ALL_EVENT.js b/src/animations/events/PAUSE_ALL_EVENT.js index 446b66be3..b4ba939d7 100644 --- a/src/animations/events/PAUSE_ALL_EVENT.js +++ b/src/animations/events/PAUSE_ALL_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/animations/events/REMOVE_ANIMATION_EVENT.js b/src/animations/events/REMOVE_ANIMATION_EVENT.js index b7fdffc83..c37de03d6 100644 --- a/src/animations/events/REMOVE_ANIMATION_EVENT.js +++ b/src/animations/events/REMOVE_ANIMATION_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/animations/events/RESUME_ALL_EVENT.js b/src/animations/events/RESUME_ALL_EVENT.js index 96d7ed53b..c02f43028 100644 --- a/src/animations/events/RESUME_ALL_EVENT.js +++ b/src/animations/events/RESUME_ALL_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js b/src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js index ea2717868..20e8fdb4b 100644 --- a/src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js +++ b/src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js b/src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js index aa259b6e8..a2ecb569c 100644 --- a/src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js +++ b/src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js b/src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js index 198566935..a20169d05 100644 --- a/src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js +++ b/src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js b/src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js index 52b2ccc3e..da94d76bb 100644 --- a/src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js +++ b/src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js b/src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js index aeb06fb67..65454deea 100644 --- a/src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js +++ b/src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js b/src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js index a2ef63d87..2b21e5804 100644 --- a/src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js +++ b/src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js b/src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js index 7d4d4e4ed..23ca4f3eb 100644 --- a/src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js +++ b/src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js b/src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js index 951d03562..7f88df85e 100644 --- a/src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js +++ b/src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/animations/events/SPRITE_ANIMATION_START_EVENT.js b/src/animations/events/SPRITE_ANIMATION_START_EVENT.js index d07c8c3f7..f1e3eb390 100644 --- a/src/animations/events/SPRITE_ANIMATION_START_EVENT.js +++ b/src/animations/events/SPRITE_ANIMATION_START_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js b/src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js index 25561fc50..0bf94225f 100644 --- a/src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js +++ b/src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/animations/events/index.js b/src/animations/events/index.js index 1bbd3094d..4882d1f66 100644 --- a/src/animations/events/index.js +++ b/src/animations/events/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/animations/index.js b/src/animations/index.js index 01c81a4d4..ec66713ec 100644 --- a/src/animations/index.js +++ b/src/animations/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/animations/typedefs/index.js b/src/animations/typedefs/index.js index be585c89e..b20cd2c49 100644 --- a/src/animations/typedefs/index.js +++ b/src/animations/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cache/BaseCache.js b/src/cache/BaseCache.js index 87cec5e1d..fa5291356 100644 --- a/src/cache/BaseCache.js +++ b/src/cache/BaseCache.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cache/CacheManager.js b/src/cache/CacheManager.js index b8607e848..16f96be72 100644 --- a/src/cache/CacheManager.js +++ b/src/cache/CacheManager.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cache/events/ADD_EVENT.js b/src/cache/events/ADD_EVENT.js index 6f677081d..78d1d0bec 100644 --- a/src/cache/events/ADD_EVENT.js +++ b/src/cache/events/ADD_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cache/events/REMOVE_EVENT.js b/src/cache/events/REMOVE_EVENT.js index fb58e85cf..5f57d76f4 100644 --- a/src/cache/events/REMOVE_EVENT.js +++ b/src/cache/events/REMOVE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cache/events/index.js b/src/cache/events/index.js index 1d51ca5b9..11a2b0880 100644 --- a/src/cache/events/index.js +++ b/src/cache/events/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cache/index.js b/src/cache/index.js index 84e568678..45db4eff9 100644 --- a/src/cache/index.js +++ b/src/cache/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/2d/BaseCamera.js b/src/cameras/2d/BaseCamera.js index ad44cabfd..837ab9799 100644 --- a/src/cameras/2d/BaseCamera.js +++ b/src/cameras/2d/BaseCamera.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/2d/Camera.js b/src/cameras/2d/Camera.js index ff1d423cd..72c069e03 100644 --- a/src/cameras/2d/Camera.js +++ b/src/cameras/2d/Camera.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/2d/CameraManager.js b/src/cameras/2d/CameraManager.js index 47bb02f51..db7ea3806 100644 --- a/src/cameras/2d/CameraManager.js +++ b/src/cameras/2d/CameraManager.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/2d/effects/Fade.js b/src/cameras/2d/effects/Fade.js index b2007434f..408258e18 100644 --- a/src/cameras/2d/effects/Fade.js +++ b/src/cameras/2d/effects/Fade.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/2d/effects/Flash.js b/src/cameras/2d/effects/Flash.js index 779b6ff5a..409573547 100644 --- a/src/cameras/2d/effects/Flash.js +++ b/src/cameras/2d/effects/Flash.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/2d/effects/Pan.js b/src/cameras/2d/effects/Pan.js index 9140c695b..9868c4830 100644 --- a/src/cameras/2d/effects/Pan.js +++ b/src/cameras/2d/effects/Pan.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/2d/effects/Shake.js b/src/cameras/2d/effects/Shake.js index 5872048a0..e172de008 100644 --- a/src/cameras/2d/effects/Shake.js +++ b/src/cameras/2d/effects/Shake.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/2d/effects/Zoom.js b/src/cameras/2d/effects/Zoom.js index e0333a48b..6d3888f0d 100644 --- a/src/cameras/2d/effects/Zoom.js +++ b/src/cameras/2d/effects/Zoom.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/2d/effects/index.js b/src/cameras/2d/effects/index.js index 2ba245a43..5aab10b1d 100644 --- a/src/cameras/2d/effects/index.js +++ b/src/cameras/2d/effects/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/2d/events/DESTROY_EVENT.js b/src/cameras/2d/events/DESTROY_EVENT.js index 67dc01188..80175e07a 100644 --- a/src/cameras/2d/events/DESTROY_EVENT.js +++ b/src/cameras/2d/events/DESTROY_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/2d/events/FADE_IN_COMPLETE_EVENT.js b/src/cameras/2d/events/FADE_IN_COMPLETE_EVENT.js index 291f1fdc7..3ce221956 100644 --- a/src/cameras/2d/events/FADE_IN_COMPLETE_EVENT.js +++ b/src/cameras/2d/events/FADE_IN_COMPLETE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/2d/events/FADE_IN_START_EVENT.js b/src/cameras/2d/events/FADE_IN_START_EVENT.js index b1f0983dc..fcf55f777 100644 --- a/src/cameras/2d/events/FADE_IN_START_EVENT.js +++ b/src/cameras/2d/events/FADE_IN_START_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/2d/events/FADE_OUT_COMPLETE_EVENT.js b/src/cameras/2d/events/FADE_OUT_COMPLETE_EVENT.js index 9c6c8bf06..1794376c8 100644 --- a/src/cameras/2d/events/FADE_OUT_COMPLETE_EVENT.js +++ b/src/cameras/2d/events/FADE_OUT_COMPLETE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/2d/events/FADE_OUT_START_EVENT.js b/src/cameras/2d/events/FADE_OUT_START_EVENT.js index 6fdfb7dae..1804bf91b 100644 --- a/src/cameras/2d/events/FADE_OUT_START_EVENT.js +++ b/src/cameras/2d/events/FADE_OUT_START_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/2d/events/FLASH_COMPLETE_EVENT.js b/src/cameras/2d/events/FLASH_COMPLETE_EVENT.js index 83d873483..f4d6aaad3 100644 --- a/src/cameras/2d/events/FLASH_COMPLETE_EVENT.js +++ b/src/cameras/2d/events/FLASH_COMPLETE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/2d/events/FLASH_START_EVENT.js b/src/cameras/2d/events/FLASH_START_EVENT.js index 2fb3e58a9..4934b7a03 100644 --- a/src/cameras/2d/events/FLASH_START_EVENT.js +++ b/src/cameras/2d/events/FLASH_START_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/2d/events/PAN_COMPLETE_EVENT.js b/src/cameras/2d/events/PAN_COMPLETE_EVENT.js index 2f9e702ea..7e65955fd 100644 --- a/src/cameras/2d/events/PAN_COMPLETE_EVENT.js +++ b/src/cameras/2d/events/PAN_COMPLETE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/2d/events/PAN_START_EVENT.js b/src/cameras/2d/events/PAN_START_EVENT.js index 68fc8e7ef..60b71e691 100644 --- a/src/cameras/2d/events/PAN_START_EVENT.js +++ b/src/cameras/2d/events/PAN_START_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/2d/events/POST_RENDER_EVENT.js b/src/cameras/2d/events/POST_RENDER_EVENT.js index 2681d219c..40fe8cb76 100644 --- a/src/cameras/2d/events/POST_RENDER_EVENT.js +++ b/src/cameras/2d/events/POST_RENDER_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/2d/events/PRE_RENDER_EVENT.js b/src/cameras/2d/events/PRE_RENDER_EVENT.js index 92fa8fe95..9e02ee873 100644 --- a/src/cameras/2d/events/PRE_RENDER_EVENT.js +++ b/src/cameras/2d/events/PRE_RENDER_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/2d/events/SHAKE_COMPLETE_EVENT.js b/src/cameras/2d/events/SHAKE_COMPLETE_EVENT.js index 90f54be27..188a9ed10 100644 --- a/src/cameras/2d/events/SHAKE_COMPLETE_EVENT.js +++ b/src/cameras/2d/events/SHAKE_COMPLETE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/2d/events/SHAKE_START_EVENT.js b/src/cameras/2d/events/SHAKE_START_EVENT.js index cf9b1d85a..08614f75f 100644 --- a/src/cameras/2d/events/SHAKE_START_EVENT.js +++ b/src/cameras/2d/events/SHAKE_START_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/2d/events/ZOOM_COMPLETE_EVENT.js b/src/cameras/2d/events/ZOOM_COMPLETE_EVENT.js index 888aa170a..243936dc2 100644 --- a/src/cameras/2d/events/ZOOM_COMPLETE_EVENT.js +++ b/src/cameras/2d/events/ZOOM_COMPLETE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/2d/events/ZOOM_START_EVENT.js b/src/cameras/2d/events/ZOOM_START_EVENT.js index 4e6b8d4ae..02cf9e0b3 100644 --- a/src/cameras/2d/events/ZOOM_START_EVENT.js +++ b/src/cameras/2d/events/ZOOM_START_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/2d/events/index.js b/src/cameras/2d/events/index.js index 911aabbf1..a9aa5c4a4 100644 --- a/src/cameras/2d/events/index.js +++ b/src/cameras/2d/events/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/2d/index.js b/src/cameras/2d/index.js index 90e00f733..5ca74e54e 100644 --- a/src/cameras/2d/index.js +++ b/src/cameras/2d/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/2d/typedefs/index.js b/src/cameras/2d/typedefs/index.js index e7710a38d..d5aa6d1b7 100644 --- a/src/cameras/2d/typedefs/index.js +++ b/src/cameras/2d/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/controls/FixedKeyControl.js b/src/cameras/controls/FixedKeyControl.js index 747b90ee1..bac758e75 100644 --- a/src/cameras/controls/FixedKeyControl.js +++ b/src/cameras/controls/FixedKeyControl.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/controls/SmoothedKeyControl.js b/src/cameras/controls/SmoothedKeyControl.js index 6984fb1fe..7916e9e20 100644 --- a/src/cameras/controls/SmoothedKeyControl.js +++ b/src/cameras/controls/SmoothedKeyControl.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/controls/index.js b/src/cameras/controls/index.js index 97d8e240c..f93ebb552 100644 --- a/src/cameras/controls/index.js +++ b/src/cameras/controls/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/controls/typedefs/index.js b/src/cameras/controls/typedefs/index.js index 99d973d4d..6a28e6b28 100644 --- a/src/cameras/controls/typedefs/index.js +++ b/src/cameras/controls/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/cameras/index.js b/src/cameras/index.js index 64469548e..5ee2b99cf 100644 --- a/src/cameras/index.js +++ b/src/cameras/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/const.js b/src/const.js index b1b618302..b5092eb38 100644 --- a/src/const.js +++ b/src/const.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/core/Config.js b/src/core/Config.js index efdea6df8..3c6e99bc8 100644 --- a/src/core/Config.js +++ b/src/core/Config.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/core/CreateRenderer.js b/src/core/CreateRenderer.js index d15f56bf4..29f1aed7b 100644 --- a/src/core/CreateRenderer.js +++ b/src/core/CreateRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/core/DebugHeader.js b/src/core/DebugHeader.js index b1f5395c9..6b73761c0 100644 --- a/src/core/DebugHeader.js +++ b/src/core/DebugHeader.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/core/Game.js b/src/core/Game.js index 5d5a39876..be64554f2 100644 --- a/src/core/Game.js +++ b/src/core/Game.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/core/TimeStep.js b/src/core/TimeStep.js index b949fd345..fb2846691 100644 --- a/src/core/TimeStep.js +++ b/src/core/TimeStep.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/core/VisibilityHandler.js b/src/core/VisibilityHandler.js index 863dc988a..84e92fdbf 100644 --- a/src/core/VisibilityHandler.js +++ b/src/core/VisibilityHandler.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/core/events/BLUR_EVENT.js b/src/core/events/BLUR_EVENT.js index b6b8073e8..70ed78c88 100644 --- a/src/core/events/BLUR_EVENT.js +++ b/src/core/events/BLUR_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/core/events/BOOT_EVENT.js b/src/core/events/BOOT_EVENT.js index 61ab1a688..a0c0d98e0 100644 --- a/src/core/events/BOOT_EVENT.js +++ b/src/core/events/BOOT_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/core/events/CONTEXT_LOST_EVENT.js b/src/core/events/CONTEXT_LOST_EVENT.js index c6f551bd4..b02b36590 100644 --- a/src/core/events/CONTEXT_LOST_EVENT.js +++ b/src/core/events/CONTEXT_LOST_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/core/events/CONTEXT_RESTORED_EVENT.js b/src/core/events/CONTEXT_RESTORED_EVENT.js index eca9238e4..013aafa4f 100644 --- a/src/core/events/CONTEXT_RESTORED_EVENT.js +++ b/src/core/events/CONTEXT_RESTORED_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/core/events/DESTROY_EVENT.js b/src/core/events/DESTROY_EVENT.js index 1e9631ee9..b85a912ad 100644 --- a/src/core/events/DESTROY_EVENT.js +++ b/src/core/events/DESTROY_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/core/events/FOCUS_EVENT.js b/src/core/events/FOCUS_EVENT.js index 2619713d1..d8ca467a0 100644 --- a/src/core/events/FOCUS_EVENT.js +++ b/src/core/events/FOCUS_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/core/events/HIDDEN_EVENT.js b/src/core/events/HIDDEN_EVENT.js index d033e66e8..85954c80e 100644 --- a/src/core/events/HIDDEN_EVENT.js +++ b/src/core/events/HIDDEN_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/core/events/PAUSE_EVENT.js b/src/core/events/PAUSE_EVENT.js index 30e203dcd..658c26063 100644 --- a/src/core/events/PAUSE_EVENT.js +++ b/src/core/events/PAUSE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/core/events/POST_RENDER_EVENT.js b/src/core/events/POST_RENDER_EVENT.js index a4a6c0b6f..80ed9b758 100644 --- a/src/core/events/POST_RENDER_EVENT.js +++ b/src/core/events/POST_RENDER_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/core/events/POST_STEP_EVENT.js b/src/core/events/POST_STEP_EVENT.js index e46ee21c1..2e4eb6957 100644 --- a/src/core/events/POST_STEP_EVENT.js +++ b/src/core/events/POST_STEP_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/core/events/PRE_RENDER_EVENT.js b/src/core/events/PRE_RENDER_EVENT.js index e9e9e5759..9f62ae71d 100644 --- a/src/core/events/PRE_RENDER_EVENT.js +++ b/src/core/events/PRE_RENDER_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/core/events/PRE_STEP_EVENT.js b/src/core/events/PRE_STEP_EVENT.js index e48e266f9..2c3eaafe8 100644 --- a/src/core/events/PRE_STEP_EVENT.js +++ b/src/core/events/PRE_STEP_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/core/events/READY_EVENT.js b/src/core/events/READY_EVENT.js index 58c9865c7..41ae33171 100644 --- a/src/core/events/READY_EVENT.js +++ b/src/core/events/READY_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/core/events/RESUME_EVENT.js b/src/core/events/RESUME_EVENT.js index f176ef803..bd9b2bafe 100644 --- a/src/core/events/RESUME_EVENT.js +++ b/src/core/events/RESUME_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/core/events/STEP_EVENT.js b/src/core/events/STEP_EVENT.js index d1baed27d..02a93f4ea 100644 --- a/src/core/events/STEP_EVENT.js +++ b/src/core/events/STEP_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/core/events/VISIBLE_EVENT.js b/src/core/events/VISIBLE_EVENT.js index 7b375f874..1382bd9db 100644 --- a/src/core/events/VISIBLE_EVENT.js +++ b/src/core/events/VISIBLE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/core/events/index.js b/src/core/events/index.js index 61a4d83cf..825dbea89 100644 --- a/src/core/events/index.js +++ b/src/core/events/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/core/index.js b/src/core/index.js index 96beb242f..1c0422af3 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/core/typedefs/index.js b/src/core/typedefs/index.js index 9378d0abe..ebc550130 100644 --- a/src/core/typedefs/index.js +++ b/src/core/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/create/GenerateTexture.js b/src/create/GenerateTexture.js index a7b8ef326..3176e89a8 100644 --- a/src/create/GenerateTexture.js +++ b/src/create/GenerateTexture.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/create/index.js b/src/create/index.js index 4aa391c6b..f59f89beb 100644 --- a/src/create/index.js +++ b/src/create/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/create/palettes/Arne16.js b/src/create/palettes/Arne16.js index 0c5dc5421..2f21e8f25 100644 --- a/src/create/palettes/Arne16.js +++ b/src/create/palettes/Arne16.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/create/palettes/C64.js b/src/create/palettes/C64.js index ad3a91fef..4f2fd057d 100644 --- a/src/create/palettes/C64.js +++ b/src/create/palettes/C64.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/create/palettes/CGA.js b/src/create/palettes/CGA.js index 7c9f2dfa7..dcdd25a42 100644 --- a/src/create/palettes/CGA.js +++ b/src/create/palettes/CGA.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/create/palettes/JMP.js b/src/create/palettes/JMP.js index 4369d128e..0744994c5 100644 --- a/src/create/palettes/JMP.js +++ b/src/create/palettes/JMP.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/create/palettes/MSX.js b/src/create/palettes/MSX.js index 10cb14d0c..a7e248bb8 100644 --- a/src/create/palettes/MSX.js +++ b/src/create/palettes/MSX.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/create/palettes/index.js b/src/create/palettes/index.js index 68d73eb78..df1666f47 100644 --- a/src/create/palettes/index.js +++ b/src/create/palettes/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/create/typedefs/index.js b/src/create/typedefs/index.js index 7b181fade..ef13d33bd 100644 --- a/src/create/typedefs/index.js +++ b/src/create/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/curves/CubicBezierCurve.js b/src/curves/CubicBezierCurve.js index f78fa4757..231200479 100644 --- a/src/curves/CubicBezierCurve.js +++ b/src/curves/CubicBezierCurve.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/curves/Curve.js b/src/curves/Curve.js index c343bb131..8d0fe02f6 100644 --- a/src/curves/Curve.js +++ b/src/curves/Curve.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/curves/EllipseCurve.js b/src/curves/EllipseCurve.js index 5330163ec..b0b2d3972 100644 --- a/src/curves/EllipseCurve.js +++ b/src/curves/EllipseCurve.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/curves/LineCurve.js b/src/curves/LineCurve.js index fb9dea4c1..3b38d4725 100644 --- a/src/curves/LineCurve.js +++ b/src/curves/LineCurve.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/curves/QuadraticBezierCurve.js b/src/curves/QuadraticBezierCurve.js index 910fd1611..5dd513c9a 100644 --- a/src/curves/QuadraticBezierCurve.js +++ b/src/curves/QuadraticBezierCurve.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/curves/SplineCurve.js b/src/curves/SplineCurve.js index 8c813b7f8..0a0ad1aa9 100644 --- a/src/curves/SplineCurve.js +++ b/src/curves/SplineCurve.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/curves/index.js b/src/curves/index.js index 597554d5c..1b0e4ad22 100644 --- a/src/curves/index.js +++ b/src/curves/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/curves/path/MoveTo.js b/src/curves/path/MoveTo.js index 125d8d758..d6e237749 100644 --- a/src/curves/path/MoveTo.js +++ b/src/curves/path/MoveTo.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/curves/path/Path.js b/src/curves/path/Path.js index 83b78d757..91d1de709 100644 --- a/src/curves/path/Path.js +++ b/src/curves/path/Path.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/curves/typedefs/index.js b/src/curves/typedefs/index.js index 182829e15..ed8807be1 100644 --- a/src/curves/typedefs/index.js +++ b/src/curves/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/data/DataManager.js b/src/data/DataManager.js index 1fe8836d0..5bc295e8d 100644 --- a/src/data/DataManager.js +++ b/src/data/DataManager.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/data/DataManagerPlugin.js b/src/data/DataManagerPlugin.js index b75ec4078..3245a536d 100644 --- a/src/data/DataManagerPlugin.js +++ b/src/data/DataManagerPlugin.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/data/events/CHANGE_DATA_EVENT.js b/src/data/events/CHANGE_DATA_EVENT.js index 84a0f3a78..ca9219315 100644 --- a/src/data/events/CHANGE_DATA_EVENT.js +++ b/src/data/events/CHANGE_DATA_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/data/events/CHANGE_DATA_KEY_EVENT.js b/src/data/events/CHANGE_DATA_KEY_EVENT.js index 54eab5ab8..93be4bc31 100644 --- a/src/data/events/CHANGE_DATA_KEY_EVENT.js +++ b/src/data/events/CHANGE_DATA_KEY_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/data/events/REMOVE_DATA_EVENT.js b/src/data/events/REMOVE_DATA_EVENT.js index 6bbbce88a..7e0e5c9a2 100644 --- a/src/data/events/REMOVE_DATA_EVENT.js +++ b/src/data/events/REMOVE_DATA_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/data/events/SET_DATA_EVENT.js b/src/data/events/SET_DATA_EVENT.js index 77d2ca1f6..aa03c6c56 100644 --- a/src/data/events/SET_DATA_EVENT.js +++ b/src/data/events/SET_DATA_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/data/events/index.js b/src/data/events/index.js index 0523c301d..11c85b5e4 100644 --- a/src/data/events/index.js +++ b/src/data/events/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/data/index.js b/src/data/index.js index b0e1cc23d..a1406eba1 100644 --- a/src/data/index.js +++ b/src/data/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/device/Audio.js b/src/device/Audio.js index 57c6607ea..2fbc77106 100644 --- a/src/device/Audio.js +++ b/src/device/Audio.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/device/Browser.js b/src/device/Browser.js index 5cbb29d68..c0001acf8 100644 --- a/src/device/Browser.js +++ b/src/device/Browser.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/device/CanvasFeatures.js b/src/device/CanvasFeatures.js index 66773362b..bae09698b 100644 --- a/src/device/CanvasFeatures.js +++ b/src/device/CanvasFeatures.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/device/Features.js b/src/device/Features.js index b0913f024..b9aa06723 100644 --- a/src/device/Features.js +++ b/src/device/Features.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/device/Fullscreen.js b/src/device/Fullscreen.js index 8957f1b7d..5def34cd2 100644 --- a/src/device/Fullscreen.js +++ b/src/device/Fullscreen.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/device/Input.js b/src/device/Input.js index 71e41ef80..986dc541c 100644 --- a/src/device/Input.js +++ b/src/device/Input.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/device/OS.js b/src/device/OS.js index fea9267ad..f672eb48a 100644 --- a/src/device/OS.js +++ b/src/device/OS.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/device/Video.js b/src/device/Video.js index 3e4ba379e..2bf08cb29 100644 --- a/src/device/Video.js +++ b/src/device/Video.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/device/index.js b/src/device/index.js index ee0a10441..98b5af2c4 100644 --- a/src/device/index.js +++ b/src/device/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/align/const.js b/src/display/align/const.js index 3af3cd141..2c25019af 100644 --- a/src/display/align/const.js +++ b/src/display/align/const.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/align/in/BottomCenter.js b/src/display/align/in/BottomCenter.js index 3eac78b04..fd4271dd9 100644 --- a/src/display/align/in/BottomCenter.js +++ b/src/display/align/in/BottomCenter.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/align/in/BottomLeft.js b/src/display/align/in/BottomLeft.js index 422295946..b0bc69953 100644 --- a/src/display/align/in/BottomLeft.js +++ b/src/display/align/in/BottomLeft.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/align/in/BottomRight.js b/src/display/align/in/BottomRight.js index d8c02a255..d5f729e6c 100644 --- a/src/display/align/in/BottomRight.js +++ b/src/display/align/in/BottomRight.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/align/in/Center.js b/src/display/align/in/Center.js index fecb55883..5179e4505 100644 --- a/src/display/align/in/Center.js +++ b/src/display/align/in/Center.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/align/in/LeftCenter.js b/src/display/align/in/LeftCenter.js index def192413..f00bec9e8 100644 --- a/src/display/align/in/LeftCenter.js +++ b/src/display/align/in/LeftCenter.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/align/in/QuickSet.js b/src/display/align/in/QuickSet.js index 408539b72..8d65a4b41 100644 --- a/src/display/align/in/QuickSet.js +++ b/src/display/align/in/QuickSet.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/align/in/RightCenter.js b/src/display/align/in/RightCenter.js index 942994f0d..47f2711cc 100644 --- a/src/display/align/in/RightCenter.js +++ b/src/display/align/in/RightCenter.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/align/in/TopCenter.js b/src/display/align/in/TopCenter.js index 9f1956200..2d8f734e7 100644 --- a/src/display/align/in/TopCenter.js +++ b/src/display/align/in/TopCenter.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/align/in/TopLeft.js b/src/display/align/in/TopLeft.js index 7d6879f85..12246f906 100644 --- a/src/display/align/in/TopLeft.js +++ b/src/display/align/in/TopLeft.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/align/in/TopRight.js b/src/display/align/in/TopRight.js index 5c42537f0..c544dd9e2 100644 --- a/src/display/align/in/TopRight.js +++ b/src/display/align/in/TopRight.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/align/in/index.js b/src/display/align/in/index.js index 1078b48d5..adb9a29cc 100644 --- a/src/display/align/in/index.js +++ b/src/display/align/in/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/align/index.js b/src/display/align/index.js index 34d035190..61286cbe1 100644 --- a/src/display/align/index.js +++ b/src/display/align/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/align/to/BottomCenter.js b/src/display/align/to/BottomCenter.js index 5acf69ff0..615d58b41 100644 --- a/src/display/align/to/BottomCenter.js +++ b/src/display/align/to/BottomCenter.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/align/to/BottomLeft.js b/src/display/align/to/BottomLeft.js index 76b9ed842..0c8874a9b 100644 --- a/src/display/align/to/BottomLeft.js +++ b/src/display/align/to/BottomLeft.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/align/to/BottomRight.js b/src/display/align/to/BottomRight.js index 80eb861fb..b4969dbf6 100644 --- a/src/display/align/to/BottomRight.js +++ b/src/display/align/to/BottomRight.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/align/to/LeftBottom.js b/src/display/align/to/LeftBottom.js index 49cadeace..6991236f2 100644 --- a/src/display/align/to/LeftBottom.js +++ b/src/display/align/to/LeftBottom.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/align/to/LeftCenter.js b/src/display/align/to/LeftCenter.js index 428e6871e..09d05a101 100644 --- a/src/display/align/to/LeftCenter.js +++ b/src/display/align/to/LeftCenter.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/align/to/LeftTop.js b/src/display/align/to/LeftTop.js index 3a78aff92..8dafc8dbf 100644 --- a/src/display/align/to/LeftTop.js +++ b/src/display/align/to/LeftTop.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/align/to/QuickSet.js b/src/display/align/to/QuickSet.js index 12a0c4ccb..5df6df89e 100644 --- a/src/display/align/to/QuickSet.js +++ b/src/display/align/to/QuickSet.js @@ -1,6 +1,6 @@ /** * @author samme - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/align/to/RightBottom.js b/src/display/align/to/RightBottom.js index db62a01c9..7c6e2e708 100644 --- a/src/display/align/to/RightBottom.js +++ b/src/display/align/to/RightBottom.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/align/to/RightCenter.js b/src/display/align/to/RightCenter.js index a3465c970..92d3babde 100644 --- a/src/display/align/to/RightCenter.js +++ b/src/display/align/to/RightCenter.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/align/to/RightTop.js b/src/display/align/to/RightTop.js index 604e645d1..89bc01286 100644 --- a/src/display/align/to/RightTop.js +++ b/src/display/align/to/RightTop.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/align/to/TopCenter.js b/src/display/align/to/TopCenter.js index b003ffee2..5b393b0dd 100644 --- a/src/display/align/to/TopCenter.js +++ b/src/display/align/to/TopCenter.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/align/to/TopLeft.js b/src/display/align/to/TopLeft.js index d1d63dd28..88662607e 100644 --- a/src/display/align/to/TopLeft.js +++ b/src/display/align/to/TopLeft.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/align/to/TopRight.js b/src/display/align/to/TopRight.js index e50228718..6019165ce 100644 --- a/src/display/align/to/TopRight.js +++ b/src/display/align/to/TopRight.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/align/to/index.js b/src/display/align/to/index.js index 1fe488b5b..8f7dffdc4 100644 --- a/src/display/align/to/index.js +++ b/src/display/align/to/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/bounds/CenterOn.js b/src/display/bounds/CenterOn.js index 75cc02ef8..ea3820c75 100644 --- a/src/display/bounds/CenterOn.js +++ b/src/display/bounds/CenterOn.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/bounds/GetBottom.js b/src/display/bounds/GetBottom.js index 679793073..e404b13ca 100644 --- a/src/display/bounds/GetBottom.js +++ b/src/display/bounds/GetBottom.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/bounds/GetCenterX.js b/src/display/bounds/GetCenterX.js index 687e99486..05b16d6bc 100644 --- a/src/display/bounds/GetCenterX.js +++ b/src/display/bounds/GetCenterX.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/bounds/GetCenterY.js b/src/display/bounds/GetCenterY.js index 4d3c516fd..924538381 100644 --- a/src/display/bounds/GetCenterY.js +++ b/src/display/bounds/GetCenterY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/bounds/GetLeft.js b/src/display/bounds/GetLeft.js index fe1100727..c57e32766 100644 --- a/src/display/bounds/GetLeft.js +++ b/src/display/bounds/GetLeft.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/bounds/GetOffsetX.js b/src/display/bounds/GetOffsetX.js index 7c0c49caf..be57b14a9 100644 --- a/src/display/bounds/GetOffsetX.js +++ b/src/display/bounds/GetOffsetX.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/bounds/GetOffsetY.js b/src/display/bounds/GetOffsetY.js index be3d42426..a61eced71 100644 --- a/src/display/bounds/GetOffsetY.js +++ b/src/display/bounds/GetOffsetY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/bounds/GetRight.js b/src/display/bounds/GetRight.js index ccad14c41..d38fcc6d6 100644 --- a/src/display/bounds/GetRight.js +++ b/src/display/bounds/GetRight.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/bounds/GetTop.js b/src/display/bounds/GetTop.js index deb4b9726..db338d698 100644 --- a/src/display/bounds/GetTop.js +++ b/src/display/bounds/GetTop.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/bounds/SetBottom.js b/src/display/bounds/SetBottom.js index beb1d42ff..643b5ad33 100644 --- a/src/display/bounds/SetBottom.js +++ b/src/display/bounds/SetBottom.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/bounds/SetCenterX.js b/src/display/bounds/SetCenterX.js index 1d9811962..7fd454aae 100644 --- a/src/display/bounds/SetCenterX.js +++ b/src/display/bounds/SetCenterX.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/bounds/SetCenterY.js b/src/display/bounds/SetCenterY.js index 0e16ab17f..4a225ec2b 100644 --- a/src/display/bounds/SetCenterY.js +++ b/src/display/bounds/SetCenterY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/bounds/SetLeft.js b/src/display/bounds/SetLeft.js index f1c8dcce2..95fd46811 100644 --- a/src/display/bounds/SetLeft.js +++ b/src/display/bounds/SetLeft.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/bounds/SetRight.js b/src/display/bounds/SetRight.js index 26f5afa1d..cfd986750 100644 --- a/src/display/bounds/SetRight.js +++ b/src/display/bounds/SetRight.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/bounds/SetTop.js b/src/display/bounds/SetTop.js index 98ff025c8..ba9a755e8 100644 --- a/src/display/bounds/SetTop.js +++ b/src/display/bounds/SetTop.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/bounds/index.js b/src/display/bounds/index.js index 9fd5996f0..5f82d731b 100644 --- a/src/display/bounds/index.js +++ b/src/display/bounds/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/canvas/CanvasInterpolation.js b/src/display/canvas/CanvasInterpolation.js index 759a56cfc..d38d31cc0 100644 --- a/src/display/canvas/CanvasInterpolation.js +++ b/src/display/canvas/CanvasInterpolation.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/canvas/CanvasPool.js b/src/display/canvas/CanvasPool.js index 13f0e48b2..2054c8216 100644 --- a/src/display/canvas/CanvasPool.js +++ b/src/display/canvas/CanvasPool.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/canvas/Smoothing.js b/src/display/canvas/Smoothing.js index 9f17253d4..93af63077 100644 --- a/src/display/canvas/Smoothing.js +++ b/src/display/canvas/Smoothing.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/canvas/TouchAction.js b/src/display/canvas/TouchAction.js index 8127ea4a5..24f97e86a 100644 --- a/src/display/canvas/TouchAction.js +++ b/src/display/canvas/TouchAction.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/canvas/UserSelect.js b/src/display/canvas/UserSelect.js index fc55812c4..20e6a93e2 100644 --- a/src/display/canvas/UserSelect.js +++ b/src/display/canvas/UserSelect.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/canvas/index.js b/src/display/canvas/index.js index c37dfdcfa..eb5d57096 100644 --- a/src/display/canvas/index.js +++ b/src/display/canvas/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/color/Color.js b/src/display/color/Color.js index c74349066..d9301e8f3 100644 --- a/src/display/color/Color.js +++ b/src/display/color/Color.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/color/ColorToRGBA.js b/src/display/color/ColorToRGBA.js index 3260b83df..dfc3998f8 100644 --- a/src/display/color/ColorToRGBA.js +++ b/src/display/color/ColorToRGBA.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/color/ComponentToHex.js b/src/display/color/ComponentToHex.js index 7411db08c..7081c9c7f 100644 --- a/src/display/color/ComponentToHex.js +++ b/src/display/color/ComponentToHex.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/color/GetColor.js b/src/display/color/GetColor.js index 18885ee09..e4ec84048 100644 --- a/src/display/color/GetColor.js +++ b/src/display/color/GetColor.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/color/GetColor32.js b/src/display/color/GetColor32.js index 279d0f415..a7a9db0a2 100644 --- a/src/display/color/GetColor32.js +++ b/src/display/color/GetColor32.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/color/HSLToColor.js b/src/display/color/HSLToColor.js index a0159c5c1..1e64591ce 100644 --- a/src/display/color/HSLToColor.js +++ b/src/display/color/HSLToColor.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/color/HSVColorWheel.js b/src/display/color/HSVColorWheel.js index 1b033f058..ca00c82b7 100644 --- a/src/display/color/HSVColorWheel.js +++ b/src/display/color/HSVColorWheel.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/color/HSVToRGB.js b/src/display/color/HSVToRGB.js index f31936d5e..702864ef6 100644 --- a/src/display/color/HSVToRGB.js +++ b/src/display/color/HSVToRGB.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/color/HexStringToColor.js b/src/display/color/HexStringToColor.js index b82deb52d..0cabced5b 100644 --- a/src/display/color/HexStringToColor.js +++ b/src/display/color/HexStringToColor.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/color/HueToComponent.js b/src/display/color/HueToComponent.js index 0d6ddf3f0..0387429a2 100644 --- a/src/display/color/HueToComponent.js +++ b/src/display/color/HueToComponent.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/color/IntegerToColor.js b/src/display/color/IntegerToColor.js index fedf8e5a1..8a51c9fd9 100644 --- a/src/display/color/IntegerToColor.js +++ b/src/display/color/IntegerToColor.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/color/IntegerToRGB.js b/src/display/color/IntegerToRGB.js index 87cffee05..d6943df8b 100644 --- a/src/display/color/IntegerToRGB.js +++ b/src/display/color/IntegerToRGB.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/color/Interpolate.js b/src/display/color/Interpolate.js index 7246a55dc..22b4d6f25 100644 --- a/src/display/color/Interpolate.js +++ b/src/display/color/Interpolate.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/color/ObjectToColor.js b/src/display/color/ObjectToColor.js index 338f32a05..6a4bfe5ce 100644 --- a/src/display/color/ObjectToColor.js +++ b/src/display/color/ObjectToColor.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/color/RGBStringToColor.js b/src/display/color/RGBStringToColor.js index 3d4a6d643..5ef3c7d4c 100644 --- a/src/display/color/RGBStringToColor.js +++ b/src/display/color/RGBStringToColor.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/color/RGBToHSV.js b/src/display/color/RGBToHSV.js index bb897eaf9..75429fcca 100644 --- a/src/display/color/RGBToHSV.js +++ b/src/display/color/RGBToHSV.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/color/RGBToString.js b/src/display/color/RGBToString.js index 12480bdfa..b1df7931b 100644 --- a/src/display/color/RGBToString.js +++ b/src/display/color/RGBToString.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/color/RandomRGB.js b/src/display/color/RandomRGB.js index 6278eb46f..00c60006f 100644 --- a/src/display/color/RandomRGB.js +++ b/src/display/color/RandomRGB.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/color/ValueToColor.js b/src/display/color/ValueToColor.js index e70690d67..6d03b2169 100644 --- a/src/display/color/ValueToColor.js +++ b/src/display/color/ValueToColor.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/color/index.js b/src/display/color/index.js index 641594a90..b4231fe9d 100644 --- a/src/display/color/index.js +++ b/src/display/color/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/index.js b/src/display/index.js index 7d2362b9d..dbe567976 100644 --- a/src/display/index.js +++ b/src/display/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/mask/BitmapMask.js b/src/display/mask/BitmapMask.js index c2e460a41..0e51cc8f3 100644 --- a/src/display/mask/BitmapMask.js +++ b/src/display/mask/BitmapMask.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/mask/GeometryMask.js b/src/display/mask/GeometryMask.js index 42920f346..3281eddee 100644 --- a/src/display/mask/GeometryMask.js +++ b/src/display/mask/GeometryMask.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/mask/index.js b/src/display/mask/index.js index 5db156b43..eb3f26fd9 100644 --- a/src/display/mask/index.js +++ b/src/display/mask/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/display/shader/BaseShader.js b/src/display/shader/BaseShader.js index dfba20053..4a06ee495 100644 --- a/src/display/shader/BaseShader.js +++ b/src/display/shader/BaseShader.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/dom/AddToDOM.js b/src/dom/AddToDOM.js index 0c445be14..a201dcf7d 100644 --- a/src/dom/AddToDOM.js +++ b/src/dom/AddToDOM.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/dom/CreateDOMContainer.js b/src/dom/CreateDOMContainer.js index 9d52b1a7c..67cb806fe 100644 --- a/src/dom/CreateDOMContainer.js +++ b/src/dom/CreateDOMContainer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/dom/DOMContentLoaded.js b/src/dom/DOMContentLoaded.js index 3c1183328..adb6ccf9b 100644 --- a/src/dom/DOMContentLoaded.js +++ b/src/dom/DOMContentLoaded.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/dom/GetInnerHeight.js b/src/dom/GetInnerHeight.js index 5ecbcc6d7..cd9992014 100644 --- a/src/dom/GetInnerHeight.js +++ b/src/dom/GetInnerHeight.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/dom/GetScreenOrientation.js b/src/dom/GetScreenOrientation.js index 00f71834b..08df9795e 100644 --- a/src/dom/GetScreenOrientation.js +++ b/src/dom/GetScreenOrientation.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/dom/GetTarget.js b/src/dom/GetTarget.js index d04c2473b..4dbeab10e 100644 --- a/src/dom/GetTarget.js +++ b/src/dom/GetTarget.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/dom/ParseXML.js b/src/dom/ParseXML.js index 00903acf4..275a8c9ed 100644 --- a/src/dom/ParseXML.js +++ b/src/dom/ParseXML.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/dom/RemoveFromDOM.js b/src/dom/RemoveFromDOM.js index 2a1e929f1..4f8534d4e 100644 --- a/src/dom/RemoveFromDOM.js +++ b/src/dom/RemoveFromDOM.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/dom/RequestAnimationFrame.js b/src/dom/RequestAnimationFrame.js index 17c37edf8..f6655a3af 100644 --- a/src/dom/RequestAnimationFrame.js +++ b/src/dom/RequestAnimationFrame.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/dom/index.js b/src/dom/index.js index ecc2e2410..b7f1c7f1f 100644 --- a/src/dom/index.js +++ b/src/dom/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/events/EventEmitter.js b/src/events/EventEmitter.js index cabbf4b7f..8e16a56e9 100644 --- a/src/events/EventEmitter.js +++ b/src/events/EventEmitter.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/events/index.js b/src/events/index.js index 35c5d5d2f..dd19e5cdd 100644 --- a/src/events/index.js +++ b/src/events/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/BuildGameObject.js b/src/gameobjects/BuildGameObject.js index 093f0a7a7..e86b6d44f 100644 --- a/src/gameobjects/BuildGameObject.js +++ b/src/gameobjects/BuildGameObject.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/BuildGameObjectAnimation.js b/src/gameobjects/BuildGameObjectAnimation.js index f763fcc8d..9ed0283ae 100644 --- a/src/gameobjects/BuildGameObjectAnimation.js +++ b/src/gameobjects/BuildGameObjectAnimation.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/DisplayList.js b/src/gameobjects/DisplayList.js index 66d87f4c2..fc4437411 100644 --- a/src/gameobjects/DisplayList.js +++ b/src/gameobjects/DisplayList.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/GameObject.js b/src/gameobjects/GameObject.js index fb07ac67d..c21b49d60 100644 --- a/src/gameobjects/GameObject.js +++ b/src/gameobjects/GameObject.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/GameObjectCreator.js b/src/gameobjects/GameObjectCreator.js index 9d95c9632..368bf3656 100644 --- a/src/gameobjects/GameObjectCreator.js +++ b/src/gameobjects/GameObjectCreator.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/GameObjectFactory.js b/src/gameobjects/GameObjectFactory.js index 52c654fa6..bcbf4c1f3 100644 --- a/src/gameobjects/GameObjectFactory.js +++ b/src/gameobjects/GameObjectFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/UpdateList.js b/src/gameobjects/UpdateList.js index 4f25fa83a..f9721230f 100644 --- a/src/gameobjects/UpdateList.js +++ b/src/gameobjects/UpdateList.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/bitmaptext/GetBitmapTextSize.js b/src/gameobjects/bitmaptext/GetBitmapTextSize.js index e08ef040c..41f12c887 100644 --- a/src/gameobjects/bitmaptext/GetBitmapTextSize.js +++ b/src/gameobjects/bitmaptext/GetBitmapTextSize.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/bitmaptext/ParseFromAtlas.js b/src/gameobjects/bitmaptext/ParseFromAtlas.js index 35bddc89b..e33728918 100644 --- a/src/gameobjects/bitmaptext/ParseFromAtlas.js +++ b/src/gameobjects/bitmaptext/ParseFromAtlas.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/bitmaptext/ParseRetroFont.js b/src/gameobjects/bitmaptext/ParseRetroFont.js index 905028b82..3234881a9 100644 --- a/src/gameobjects/bitmaptext/ParseRetroFont.js +++ b/src/gameobjects/bitmaptext/ParseRetroFont.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/bitmaptext/ParseXMLBitmapFont.js b/src/gameobjects/bitmaptext/ParseXMLBitmapFont.js index 5738865a2..b8ba6bcfb 100644 --- a/src/gameobjects/bitmaptext/ParseXMLBitmapFont.js +++ b/src/gameobjects/bitmaptext/ParseXMLBitmapFont.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/bitmaptext/RetroFont.js b/src/gameobjects/bitmaptext/RetroFont.js index bdc289ca3..45d2a5f75 100644 --- a/src/gameobjects/bitmaptext/RetroFont.js +++ b/src/gameobjects/bitmaptext/RetroFont.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/bitmaptext/const.js b/src/gameobjects/bitmaptext/const.js index 400febcb9..ce02e7731 100644 --- a/src/gameobjects/bitmaptext/const.js +++ b/src/gameobjects/bitmaptext/const.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/bitmaptext/dynamic/DynamicBitmapText.js b/src/gameobjects/bitmaptext/dynamic/DynamicBitmapText.js index 2c0d0faed..613e4e377 100644 --- a/src/gameobjects/bitmaptext/dynamic/DynamicBitmapText.js +++ b/src/gameobjects/bitmaptext/dynamic/DynamicBitmapText.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCanvasRenderer.js b/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCanvasRenderer.js index 213da5c17..c42997bd3 100644 --- a/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCanvasRenderer.js +++ b/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCanvasRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCreator.js b/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCreator.js index c900be2a9..ce66f9edf 100644 --- a/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCreator.js +++ b/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCreator.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextFactory.js b/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextFactory.js index 515d49111..efc3083ec 100644 --- a/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextFactory.js +++ b/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextRender.js b/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextRender.js index 4f330bdf3..498350a92 100644 --- a/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextRender.js +++ b/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextRender.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js b/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js index eb7dff87e..ee4595094 100644 --- a/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js +++ b/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/bitmaptext/static/BitmapText.js b/src/gameobjects/bitmaptext/static/BitmapText.js index 867c0068d..7ade82888 100644 --- a/src/gameobjects/bitmaptext/static/BitmapText.js +++ b/src/gameobjects/bitmaptext/static/BitmapText.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js b/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js index e438b066f..571203019 100644 --- a/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js +++ b/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/bitmaptext/static/BitmapTextCreator.js b/src/gameobjects/bitmaptext/static/BitmapTextCreator.js index b8273bf10..79ce10c85 100644 --- a/src/gameobjects/bitmaptext/static/BitmapTextCreator.js +++ b/src/gameobjects/bitmaptext/static/BitmapTextCreator.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/bitmaptext/static/BitmapTextFactory.js b/src/gameobjects/bitmaptext/static/BitmapTextFactory.js index e69f1bb96..bcbf72455 100644 --- a/src/gameobjects/bitmaptext/static/BitmapTextFactory.js +++ b/src/gameobjects/bitmaptext/static/BitmapTextFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/bitmaptext/static/BitmapTextRender.js b/src/gameobjects/bitmaptext/static/BitmapTextRender.js index 57e5c14b9..01daa7969 100644 --- a/src/gameobjects/bitmaptext/static/BitmapTextRender.js +++ b/src/gameobjects/bitmaptext/static/BitmapTextRender.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js b/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js index cc52ec01d..8b38ab5df 100644 --- a/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js +++ b/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/bitmaptext/typedefs/index.js b/src/gameobjects/bitmaptext/typedefs/index.js index 75c07406d..b45c35b32 100644 --- a/src/gameobjects/bitmaptext/typedefs/index.js +++ b/src/gameobjects/bitmaptext/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/blitter/Blitter.js b/src/gameobjects/blitter/Blitter.js index 4d05c4aa6..9ec7966a9 100644 --- a/src/gameobjects/blitter/Blitter.js +++ b/src/gameobjects/blitter/Blitter.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/blitter/BlitterCanvasRenderer.js b/src/gameobjects/blitter/BlitterCanvasRenderer.js index 1f8751be0..029f747fe 100644 --- a/src/gameobjects/blitter/BlitterCanvasRenderer.js +++ b/src/gameobjects/blitter/BlitterCanvasRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/blitter/BlitterCreator.js b/src/gameobjects/blitter/BlitterCreator.js index 981875d4e..f7ed4a09e 100644 --- a/src/gameobjects/blitter/BlitterCreator.js +++ b/src/gameobjects/blitter/BlitterCreator.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/blitter/BlitterFactory.js b/src/gameobjects/blitter/BlitterFactory.js index eedbf8635..d7f70b114 100644 --- a/src/gameobjects/blitter/BlitterFactory.js +++ b/src/gameobjects/blitter/BlitterFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/blitter/BlitterRender.js b/src/gameobjects/blitter/BlitterRender.js index e9e9e8a29..7e8e0ace9 100644 --- a/src/gameobjects/blitter/BlitterRender.js +++ b/src/gameobjects/blitter/BlitterRender.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/blitter/BlitterWebGLRenderer.js b/src/gameobjects/blitter/BlitterWebGLRenderer.js index 3ad9d297f..a3538914b 100644 --- a/src/gameobjects/blitter/BlitterWebGLRenderer.js +++ b/src/gameobjects/blitter/BlitterWebGLRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/blitter/Bob.js b/src/gameobjects/blitter/Bob.js index 0e8876348..064395a6a 100644 --- a/src/gameobjects/blitter/Bob.js +++ b/src/gameobjects/blitter/Bob.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/components/Alpha.js b/src/gameobjects/components/Alpha.js index 1af2e2ec6..6c48edcdb 100644 --- a/src/gameobjects/components/Alpha.js +++ b/src/gameobjects/components/Alpha.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/components/AlphaSingle.js b/src/gameobjects/components/AlphaSingle.js index d792a6ac4..8aaac608b 100644 --- a/src/gameobjects/components/AlphaSingle.js +++ b/src/gameobjects/components/AlphaSingle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/components/Animation.js b/src/gameobjects/components/Animation.js index 35924d529..5c58515d1 100644 --- a/src/gameobjects/components/Animation.js +++ b/src/gameobjects/components/Animation.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/components/BlendMode.js b/src/gameobjects/components/BlendMode.js index f3db229d3..f868f6bb0 100644 --- a/src/gameobjects/components/BlendMode.js +++ b/src/gameobjects/components/BlendMode.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/components/ComputedSize.js b/src/gameobjects/components/ComputedSize.js index 24eef8746..909bffd29 100644 --- a/src/gameobjects/components/ComputedSize.js +++ b/src/gameobjects/components/ComputedSize.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/components/Crop.js b/src/gameobjects/components/Crop.js index 9b4aa0d16..18d858aab 100644 --- a/src/gameobjects/components/Crop.js +++ b/src/gameobjects/components/Crop.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/components/Depth.js b/src/gameobjects/components/Depth.js index b3504a340..ec47d257b 100644 --- a/src/gameobjects/components/Depth.js +++ b/src/gameobjects/components/Depth.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/components/Flip.js b/src/gameobjects/components/Flip.js index 1d1469fdf..14441493d 100644 --- a/src/gameobjects/components/Flip.js +++ b/src/gameobjects/components/Flip.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/components/GetBounds.js b/src/gameobjects/components/GetBounds.js index a803bca58..89bbc3661 100644 --- a/src/gameobjects/components/GetBounds.js +++ b/src/gameobjects/components/GetBounds.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/components/Mask.js b/src/gameobjects/components/Mask.js index bc8f298b1..790dc521d 100644 --- a/src/gameobjects/components/Mask.js +++ b/src/gameobjects/components/Mask.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/components/Origin.js b/src/gameobjects/components/Origin.js index 43b03092a..6f724ca91 100644 --- a/src/gameobjects/components/Origin.js +++ b/src/gameobjects/components/Origin.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/components/PathFollower.js b/src/gameobjects/components/PathFollower.js index f963d8f7b..f54f34541 100644 --- a/src/gameobjects/components/PathFollower.js +++ b/src/gameobjects/components/PathFollower.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/components/Pipeline.js b/src/gameobjects/components/Pipeline.js index bc965b979..4b58cd98e 100644 --- a/src/gameobjects/components/Pipeline.js +++ b/src/gameobjects/components/Pipeline.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/components/ScrollFactor.js b/src/gameobjects/components/ScrollFactor.js index 0e098ac58..396862727 100644 --- a/src/gameobjects/components/ScrollFactor.js +++ b/src/gameobjects/components/ScrollFactor.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/components/Size.js b/src/gameobjects/components/Size.js index dbc1a18d1..3f8aefb56 100644 --- a/src/gameobjects/components/Size.js +++ b/src/gameobjects/components/Size.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/components/Texture.js b/src/gameobjects/components/Texture.js index 12daa130d..b0978a2fb 100644 --- a/src/gameobjects/components/Texture.js +++ b/src/gameobjects/components/Texture.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/components/TextureCrop.js b/src/gameobjects/components/TextureCrop.js index 829ccd38e..ba7361786 100644 --- a/src/gameobjects/components/TextureCrop.js +++ b/src/gameobjects/components/TextureCrop.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/components/Tint.js b/src/gameobjects/components/Tint.js index 339d40b7a..f790064bc 100644 --- a/src/gameobjects/components/Tint.js +++ b/src/gameobjects/components/Tint.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/components/ToJSON.js b/src/gameobjects/components/ToJSON.js index 36eac0c66..3081afff0 100644 --- a/src/gameobjects/components/ToJSON.js +++ b/src/gameobjects/components/ToJSON.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/components/Transform.js b/src/gameobjects/components/Transform.js index 3b58f8acc..0ed851b59 100644 --- a/src/gameobjects/components/Transform.js +++ b/src/gameobjects/components/Transform.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/components/TransformMatrix.js b/src/gameobjects/components/TransformMatrix.js index d58fbdec1..1c9caa45e 100644 --- a/src/gameobjects/components/TransformMatrix.js +++ b/src/gameobjects/components/TransformMatrix.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/components/Visible.js b/src/gameobjects/components/Visible.js index 311c7eb66..6ee626d00 100644 --- a/src/gameobjects/components/Visible.js +++ b/src/gameobjects/components/Visible.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/components/index.js b/src/gameobjects/components/index.js index 0ce1f32bc..1a04d2eee 100644 --- a/src/gameobjects/components/index.js +++ b/src/gameobjects/components/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/container/Container.js b/src/gameobjects/container/Container.js index 14d929ad1..f09762fcf 100644 --- a/src/gameobjects/container/Container.js +++ b/src/gameobjects/container/Container.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/container/ContainerCanvasRenderer.js b/src/gameobjects/container/ContainerCanvasRenderer.js index f7452618a..88bfbef87 100644 --- a/src/gameobjects/container/ContainerCanvasRenderer.js +++ b/src/gameobjects/container/ContainerCanvasRenderer.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/container/ContainerCreator.js b/src/gameobjects/container/ContainerCreator.js index ab1814cbe..21b2f5fb2 100644 --- a/src/gameobjects/container/ContainerCreator.js +++ b/src/gameobjects/container/ContainerCreator.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/container/ContainerFactory.js b/src/gameobjects/container/ContainerFactory.js index c6faec01d..d50d870d8 100644 --- a/src/gameobjects/container/ContainerFactory.js +++ b/src/gameobjects/container/ContainerFactory.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/container/ContainerRender.js b/src/gameobjects/container/ContainerRender.js index 6d89694d3..2d6709041 100644 --- a/src/gameobjects/container/ContainerRender.js +++ b/src/gameobjects/container/ContainerRender.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/container/ContainerWebGLRenderer.js b/src/gameobjects/container/ContainerWebGLRenderer.js index 258224373..6e41ffb19 100644 --- a/src/gameobjects/container/ContainerWebGLRenderer.js +++ b/src/gameobjects/container/ContainerWebGLRenderer.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/domelement/CSSBlendModes.js b/src/gameobjects/domelement/CSSBlendModes.js index 467aa8ebd..88610d428 100644 --- a/src/gameobjects/domelement/CSSBlendModes.js +++ b/src/gameobjects/domelement/CSSBlendModes.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/domelement/DOMElement.js b/src/gameobjects/domelement/DOMElement.js index 30fc2c626..414946a17 100644 --- a/src/gameobjects/domelement/DOMElement.js +++ b/src/gameobjects/domelement/DOMElement.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/domelement/DOMElementCSSRenderer.js b/src/gameobjects/domelement/DOMElementCSSRenderer.js index 54750fba6..b229ce187 100644 --- a/src/gameobjects/domelement/DOMElementCSSRenderer.js +++ b/src/gameobjects/domelement/DOMElementCSSRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/domelement/DOMElementFactory.js b/src/gameobjects/domelement/DOMElementFactory.js index 290b0dd69..e4fc9fe23 100644 --- a/src/gameobjects/domelement/DOMElementFactory.js +++ b/src/gameobjects/domelement/DOMElementFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/domelement/DOMElementRender.js b/src/gameobjects/domelement/DOMElementRender.js index 7f6b7c09b..0c2bfd4d7 100644 --- a/src/gameobjects/domelement/DOMElementRender.js +++ b/src/gameobjects/domelement/DOMElementRender.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/events/DESTROY_EVENT.js b/src/gameobjects/events/DESTROY_EVENT.js index 88ad1086c..a86bfcd30 100644 --- a/src/gameobjects/events/DESTROY_EVENT.js +++ b/src/gameobjects/events/DESTROY_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js b/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js index e79857c82..13ac38f59 100644 --- a/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js +++ b/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/events/VIDEO_CREATED_EVENT.js b/src/gameobjects/events/VIDEO_CREATED_EVENT.js index fb307bf2e..cf9890446 100644 --- a/src/gameobjects/events/VIDEO_CREATED_EVENT.js +++ b/src/gameobjects/events/VIDEO_CREATED_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/events/VIDEO_ERROR_EVENT.js b/src/gameobjects/events/VIDEO_ERROR_EVENT.js index 0c63f464b..934a844b3 100644 --- a/src/gameobjects/events/VIDEO_ERROR_EVENT.js +++ b/src/gameobjects/events/VIDEO_ERROR_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/events/VIDEO_LOOP_EVENT.js b/src/gameobjects/events/VIDEO_LOOP_EVENT.js index c935dec4e..0609e75b5 100644 --- a/src/gameobjects/events/VIDEO_LOOP_EVENT.js +++ b/src/gameobjects/events/VIDEO_LOOP_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/events/VIDEO_PLAY_EVENT.js b/src/gameobjects/events/VIDEO_PLAY_EVENT.js index c29438fcc..3a251b3b8 100644 --- a/src/gameobjects/events/VIDEO_PLAY_EVENT.js +++ b/src/gameobjects/events/VIDEO_PLAY_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/events/VIDEO_SEEKED_EVENT.js b/src/gameobjects/events/VIDEO_SEEKED_EVENT.js index 3a0a5382e..bf440c2bb 100644 --- a/src/gameobjects/events/VIDEO_SEEKED_EVENT.js +++ b/src/gameobjects/events/VIDEO_SEEKED_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/events/VIDEO_SEEKING_EVENT.js b/src/gameobjects/events/VIDEO_SEEKING_EVENT.js index 84f4e189b..d31f8ccb0 100644 --- a/src/gameobjects/events/VIDEO_SEEKING_EVENT.js +++ b/src/gameobjects/events/VIDEO_SEEKING_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/events/VIDEO_STOP_EVENT.js b/src/gameobjects/events/VIDEO_STOP_EVENT.js index d2902936b..1db3c8275 100644 --- a/src/gameobjects/events/VIDEO_STOP_EVENT.js +++ b/src/gameobjects/events/VIDEO_STOP_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js b/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js index 37daa0590..de97a3213 100644 --- a/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js +++ b/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js b/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js index ab4c8b48a..11e221b13 100644 --- a/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js +++ b/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/events/index.js b/src/gameobjects/events/index.js index e1f9584e9..7a237c690 100644 --- a/src/gameobjects/events/index.js +++ b/src/gameobjects/events/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/extern/Extern.js b/src/gameobjects/extern/Extern.js index 9748641da..1fceab854 100644 --- a/src/gameobjects/extern/Extern.js +++ b/src/gameobjects/extern/Extern.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/extern/ExternFactory.js b/src/gameobjects/extern/ExternFactory.js index dcfe7a208..269e5b968 100644 --- a/src/gameobjects/extern/ExternFactory.js +++ b/src/gameobjects/extern/ExternFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/extern/ExternRender.js b/src/gameobjects/extern/ExternRender.js index 5f2780031..a9dd107c8 100644 --- a/src/gameobjects/extern/ExternRender.js +++ b/src/gameobjects/extern/ExternRender.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/extern/ExternWebGLRenderer.js b/src/gameobjects/extern/ExternWebGLRenderer.js index 60ca9bf5b..a4ebb4b95 100644 --- a/src/gameobjects/extern/ExternWebGLRenderer.js +++ b/src/gameobjects/extern/ExternWebGLRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/graphics/Commands.js b/src/gameobjects/graphics/Commands.js index 763a44f2f..494156f70 100644 --- a/src/gameobjects/graphics/Commands.js +++ b/src/gameobjects/graphics/Commands.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/graphics/Graphics.js b/src/gameobjects/graphics/Graphics.js index deb8c98c9..1dad06250 100644 --- a/src/gameobjects/graphics/Graphics.js +++ b/src/gameobjects/graphics/Graphics.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/graphics/GraphicsCanvasRenderer.js b/src/gameobjects/graphics/GraphicsCanvasRenderer.js index 183225e52..fad524de4 100644 --- a/src/gameobjects/graphics/GraphicsCanvasRenderer.js +++ b/src/gameobjects/graphics/GraphicsCanvasRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/graphics/GraphicsCreator.js b/src/gameobjects/graphics/GraphicsCreator.js index d4ea6eb92..0437ba08c 100644 --- a/src/gameobjects/graphics/GraphicsCreator.js +++ b/src/gameobjects/graphics/GraphicsCreator.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/graphics/GraphicsFactory.js b/src/gameobjects/graphics/GraphicsFactory.js index c444baacf..ad19b5fbb 100644 --- a/src/gameobjects/graphics/GraphicsFactory.js +++ b/src/gameobjects/graphics/GraphicsFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/graphics/GraphicsRender.js b/src/gameobjects/graphics/GraphicsRender.js index 95bea6d07..08e845a4c 100644 --- a/src/gameobjects/graphics/GraphicsRender.js +++ b/src/gameobjects/graphics/GraphicsRender.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/graphics/GraphicsWebGLRenderer.js b/src/gameobjects/graphics/GraphicsWebGLRenderer.js index 984b8ee81..b0e8217a8 100644 --- a/src/gameobjects/graphics/GraphicsWebGLRenderer.js +++ b/src/gameobjects/graphics/GraphicsWebGLRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/graphics/typedefs/index.js b/src/gameobjects/graphics/typedefs/index.js index c047b71cc..618f783bb 100644 --- a/src/gameobjects/graphics/typedefs/index.js +++ b/src/gameobjects/graphics/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/group/Group.js b/src/gameobjects/group/Group.js index 65c7ad8ce..16d399b5e 100644 --- a/src/gameobjects/group/Group.js +++ b/src/gameobjects/group/Group.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/group/GroupCreator.js b/src/gameobjects/group/GroupCreator.js index 9cb3e9663..7e3046e81 100644 --- a/src/gameobjects/group/GroupCreator.js +++ b/src/gameobjects/group/GroupCreator.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/group/GroupFactory.js b/src/gameobjects/group/GroupFactory.js index e3632da0e..9abcf6ccd 100644 --- a/src/gameobjects/group/GroupFactory.js +++ b/src/gameobjects/group/GroupFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/group/typedefs/index.js b/src/gameobjects/group/typedefs/index.js index 790297fa9..1b10eea4b 100644 --- a/src/gameobjects/group/typedefs/index.js +++ b/src/gameobjects/group/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/image/Image.js b/src/gameobjects/image/Image.js index 96fb17589..f87a6e1f5 100644 --- a/src/gameobjects/image/Image.js +++ b/src/gameobjects/image/Image.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/image/ImageCanvasRenderer.js b/src/gameobjects/image/ImageCanvasRenderer.js index e1978509a..1c044bded 100644 --- a/src/gameobjects/image/ImageCanvasRenderer.js +++ b/src/gameobjects/image/ImageCanvasRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/image/ImageCreator.js b/src/gameobjects/image/ImageCreator.js index 98dc5bb7c..a9487f96e 100644 --- a/src/gameobjects/image/ImageCreator.js +++ b/src/gameobjects/image/ImageCreator.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/image/ImageFactory.js b/src/gameobjects/image/ImageFactory.js index 8c06409bd..8335defa5 100644 --- a/src/gameobjects/image/ImageFactory.js +++ b/src/gameobjects/image/ImageFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/image/ImageRender.js b/src/gameobjects/image/ImageRender.js index b7ba9d8eb..e42de7c5d 100644 --- a/src/gameobjects/image/ImageRender.js +++ b/src/gameobjects/image/ImageRender.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/image/ImageWebGLRenderer.js b/src/gameobjects/image/ImageWebGLRenderer.js index 83f697681..95170b109 100644 --- a/src/gameobjects/image/ImageWebGLRenderer.js +++ b/src/gameobjects/image/ImageWebGLRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/index.js b/src/gameobjects/index.js index 6488b60f9..f87e9488a 100644 --- a/src/gameobjects/index.js +++ b/src/gameobjects/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/lights/Light.js b/src/gameobjects/lights/Light.js index 787cbfae2..626cc5f46 100644 --- a/src/gameobjects/lights/Light.js +++ b/src/gameobjects/lights/Light.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/lights/LightsManager.js b/src/gameobjects/lights/LightsManager.js index b67a5ed54..cedd23787 100644 --- a/src/gameobjects/lights/LightsManager.js +++ b/src/gameobjects/lights/LightsManager.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/lights/LightsPlugin.js b/src/gameobjects/lights/LightsPlugin.js index ca0633bac..3ef48403e 100644 --- a/src/gameobjects/lights/LightsPlugin.js +++ b/src/gameobjects/lights/LightsPlugin.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/mesh/Mesh.js b/src/gameobjects/mesh/Mesh.js index fa78ff54f..302328849 100644 --- a/src/gameobjects/mesh/Mesh.js +++ b/src/gameobjects/mesh/Mesh.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/mesh/MeshCanvasRenderer.js b/src/gameobjects/mesh/MeshCanvasRenderer.js index b908ead6f..09cf824f5 100644 --- a/src/gameobjects/mesh/MeshCanvasRenderer.js +++ b/src/gameobjects/mesh/MeshCanvasRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/mesh/MeshCreator.js b/src/gameobjects/mesh/MeshCreator.js index 53b1922c4..43b6d5ab1 100644 --- a/src/gameobjects/mesh/MeshCreator.js +++ b/src/gameobjects/mesh/MeshCreator.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/mesh/MeshFactory.js b/src/gameobjects/mesh/MeshFactory.js index 6b3a44e19..c83e1da44 100644 --- a/src/gameobjects/mesh/MeshFactory.js +++ b/src/gameobjects/mesh/MeshFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/mesh/MeshRender.js b/src/gameobjects/mesh/MeshRender.js index 9fb1e6911..de2a7c04c 100644 --- a/src/gameobjects/mesh/MeshRender.js +++ b/src/gameobjects/mesh/MeshRender.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/mesh/MeshWebGLRenderer.js b/src/gameobjects/mesh/MeshWebGLRenderer.js index 9b587239f..7c374633d 100644 --- a/src/gameobjects/mesh/MeshWebGLRenderer.js +++ b/src/gameobjects/mesh/MeshWebGLRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/particles/EmitterOp.js b/src/gameobjects/particles/EmitterOp.js index c26001a6d..d5d1f92ef 100644 --- a/src/gameobjects/particles/EmitterOp.js +++ b/src/gameobjects/particles/EmitterOp.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/particles/GravityWell.js b/src/gameobjects/particles/GravityWell.js index 922df5fbf..6b69fbc15 100644 --- a/src/gameobjects/particles/GravityWell.js +++ b/src/gameobjects/particles/GravityWell.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/particles/Particle.js b/src/gameobjects/particles/Particle.js index 0de4c2b07..0ba4dd268 100644 --- a/src/gameobjects/particles/Particle.js +++ b/src/gameobjects/particles/Particle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/particles/ParticleEmitter.js b/src/gameobjects/particles/ParticleEmitter.js index 8a509f117..1e7aab866 100644 --- a/src/gameobjects/particles/ParticleEmitter.js +++ b/src/gameobjects/particles/ParticleEmitter.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/particles/ParticleEmitterManager.js b/src/gameobjects/particles/ParticleEmitterManager.js index db3919301..7343d2d9c 100644 --- a/src/gameobjects/particles/ParticleEmitterManager.js +++ b/src/gameobjects/particles/ParticleEmitterManager.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/particles/ParticleManagerCanvasRenderer.js b/src/gameobjects/particles/ParticleManagerCanvasRenderer.js index af558f9ce..8ff328033 100644 --- a/src/gameobjects/particles/ParticleManagerCanvasRenderer.js +++ b/src/gameobjects/particles/ParticleManagerCanvasRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/particles/ParticleManagerCreator.js b/src/gameobjects/particles/ParticleManagerCreator.js index 11a22015f..38272f7f8 100644 --- a/src/gameobjects/particles/ParticleManagerCreator.js +++ b/src/gameobjects/particles/ParticleManagerCreator.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/particles/ParticleManagerFactory.js b/src/gameobjects/particles/ParticleManagerFactory.js index 58d50cf75..0781f2258 100644 --- a/src/gameobjects/particles/ParticleManagerFactory.js +++ b/src/gameobjects/particles/ParticleManagerFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/particles/ParticleManagerRender.js b/src/gameobjects/particles/ParticleManagerRender.js index ab397d8bc..defbc212f 100644 --- a/src/gameobjects/particles/ParticleManagerRender.js +++ b/src/gameobjects/particles/ParticleManagerRender.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/particles/ParticleManagerWebGLRenderer.js b/src/gameobjects/particles/ParticleManagerWebGLRenderer.js index 690a3d30e..036f8103e 100644 --- a/src/gameobjects/particles/ParticleManagerWebGLRenderer.js +++ b/src/gameobjects/particles/ParticleManagerWebGLRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/particles/index.js b/src/gameobjects/particles/index.js index 44adc60bb..1e25f1cc9 100644 --- a/src/gameobjects/particles/index.js +++ b/src/gameobjects/particles/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/particles/typedefs/index.js b/src/gameobjects/particles/typedefs/index.js index 37fdeb82a..a476a464e 100644 --- a/src/gameobjects/particles/typedefs/index.js +++ b/src/gameobjects/particles/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/particles/zones/DeathZone.js b/src/gameobjects/particles/zones/DeathZone.js index 600d0d275..81fb9675e 100644 --- a/src/gameobjects/particles/zones/DeathZone.js +++ b/src/gameobjects/particles/zones/DeathZone.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/particles/zones/EdgeZone.js b/src/gameobjects/particles/zones/EdgeZone.js index 8b9569459..64ffced66 100644 --- a/src/gameobjects/particles/zones/EdgeZone.js +++ b/src/gameobjects/particles/zones/EdgeZone.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/particles/zones/RandomZone.js b/src/gameobjects/particles/zones/RandomZone.js index c0bbdaf9f..72fd05e4f 100644 --- a/src/gameobjects/particles/zones/RandomZone.js +++ b/src/gameobjects/particles/zones/RandomZone.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/particles/zones/index.js b/src/gameobjects/particles/zones/index.js index 2446efaa8..890dbdaf5 100644 --- a/src/gameobjects/particles/zones/index.js +++ b/src/gameobjects/particles/zones/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/pathfollower/PathFollower.js b/src/gameobjects/pathfollower/PathFollower.js index 66ffaf494..677344ddd 100644 --- a/src/gameobjects/pathfollower/PathFollower.js +++ b/src/gameobjects/pathfollower/PathFollower.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/pathfollower/PathFollowerFactory.js b/src/gameobjects/pathfollower/PathFollowerFactory.js index c625c7e4c..b3f389217 100644 --- a/src/gameobjects/pathfollower/PathFollowerFactory.js +++ b/src/gameobjects/pathfollower/PathFollowerFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/pathfollower/typedefs/index.js b/src/gameobjects/pathfollower/typedefs/index.js index 1f228704c..191dd49ae 100644 --- a/src/gameobjects/pathfollower/typedefs/index.js +++ b/src/gameobjects/pathfollower/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/quad/Quad.js b/src/gameobjects/quad/Quad.js index d5db81d24..a3aedd83c 100644 --- a/src/gameobjects/quad/Quad.js +++ b/src/gameobjects/quad/Quad.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/quad/QuadCreator.js b/src/gameobjects/quad/QuadCreator.js index 7bb732ded..df7d56e99 100644 --- a/src/gameobjects/quad/QuadCreator.js +++ b/src/gameobjects/quad/QuadCreator.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/quad/QuadFactory.js b/src/gameobjects/quad/QuadFactory.js index 7d5118255..42c1dd32e 100644 --- a/src/gameobjects/quad/QuadFactory.js +++ b/src/gameobjects/quad/QuadFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/rendertexture/RenderTexture.js b/src/gameobjects/rendertexture/RenderTexture.js index 31e3c9c18..60fc85c46 100644 --- a/src/gameobjects/rendertexture/RenderTexture.js +++ b/src/gameobjects/rendertexture/RenderTexture.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/rendertexture/RenderTextureCanvasRenderer.js b/src/gameobjects/rendertexture/RenderTextureCanvasRenderer.js index ab0e3d71d..19a93466e 100644 --- a/src/gameobjects/rendertexture/RenderTextureCanvasRenderer.js +++ b/src/gameobjects/rendertexture/RenderTextureCanvasRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/rendertexture/RenderTextureCreator.js b/src/gameobjects/rendertexture/RenderTextureCreator.js index 09023a40b..71d5ce953 100644 --- a/src/gameobjects/rendertexture/RenderTextureCreator.js +++ b/src/gameobjects/rendertexture/RenderTextureCreator.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/rendertexture/RenderTextureFactory.js b/src/gameobjects/rendertexture/RenderTextureFactory.js index 6c8664ede..5b58e80d3 100644 --- a/src/gameobjects/rendertexture/RenderTextureFactory.js +++ b/src/gameobjects/rendertexture/RenderTextureFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/rendertexture/RenderTextureRender.js b/src/gameobjects/rendertexture/RenderTextureRender.js index 533ae338f..dad7fe392 100644 --- a/src/gameobjects/rendertexture/RenderTextureRender.js +++ b/src/gameobjects/rendertexture/RenderTextureRender.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js b/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js index 3a0fbe103..e0119f60f 100644 --- a/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js +++ b/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/rendertexture/typedefs/index.js b/src/gameobjects/rendertexture/typedefs/index.js index 910c8286d..9f907b444 100644 --- a/src/gameobjects/rendertexture/typedefs/index.js +++ b/src/gameobjects/rendertexture/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shader/Shader.js b/src/gameobjects/shader/Shader.js index 2fd065e85..c969d788c 100644 --- a/src/gameobjects/shader/Shader.js +++ b/src/gameobjects/shader/Shader.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shader/ShaderCanvasRenderer.js b/src/gameobjects/shader/ShaderCanvasRenderer.js index f923e92cd..8dc97d372 100644 --- a/src/gameobjects/shader/ShaderCanvasRenderer.js +++ b/src/gameobjects/shader/ShaderCanvasRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shader/ShaderCreator.js b/src/gameobjects/shader/ShaderCreator.js index d039ca287..f9a80950a 100644 --- a/src/gameobjects/shader/ShaderCreator.js +++ b/src/gameobjects/shader/ShaderCreator.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shader/ShaderFactory.js b/src/gameobjects/shader/ShaderFactory.js index 64b2f28bc..ab7497726 100644 --- a/src/gameobjects/shader/ShaderFactory.js +++ b/src/gameobjects/shader/ShaderFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shader/ShaderRender.js b/src/gameobjects/shader/ShaderRender.js index 08eb418d3..df6389671 100644 --- a/src/gameobjects/shader/ShaderRender.js +++ b/src/gameobjects/shader/ShaderRender.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shader/ShaderWebGLRenderer.js b/src/gameobjects/shader/ShaderWebGLRenderer.js index 5fbaef4cf..f1103b64e 100644 --- a/src/gameobjects/shader/ShaderWebGLRenderer.js +++ b/src/gameobjects/shader/ShaderWebGLRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/FillPathWebGL.js b/src/gameobjects/shape/FillPathWebGL.js index 49fe39edf..12f72c2e0 100644 --- a/src/gameobjects/shape/FillPathWebGL.js +++ b/src/gameobjects/shape/FillPathWebGL.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/FillStyleCanvas.js b/src/gameobjects/shape/FillStyleCanvas.js index 7a6bc18ca..ad89cbf7a 100644 --- a/src/gameobjects/shape/FillStyleCanvas.js +++ b/src/gameobjects/shape/FillStyleCanvas.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/LineStyleCanvas.js b/src/gameobjects/shape/LineStyleCanvas.js index b3ad5d093..e8b801bcf 100644 --- a/src/gameobjects/shape/LineStyleCanvas.js +++ b/src/gameobjects/shape/LineStyleCanvas.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/Shape.js b/src/gameobjects/shape/Shape.js index 6db575b08..82c452a0b 100644 --- a/src/gameobjects/shape/Shape.js +++ b/src/gameobjects/shape/Shape.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/StrokePathWebGL.js b/src/gameobjects/shape/StrokePathWebGL.js index f2ff0731a..88c12f546 100644 --- a/src/gameobjects/shape/StrokePathWebGL.js +++ b/src/gameobjects/shape/StrokePathWebGL.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/arc/Arc.js b/src/gameobjects/shape/arc/Arc.js index b5b5e1afd..ee80e43a7 100644 --- a/src/gameobjects/shape/arc/Arc.js +++ b/src/gameobjects/shape/arc/Arc.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/arc/ArcCanvasRenderer.js b/src/gameobjects/shape/arc/ArcCanvasRenderer.js index 4e302edf8..4048fae88 100644 --- a/src/gameobjects/shape/arc/ArcCanvasRenderer.js +++ b/src/gameobjects/shape/arc/ArcCanvasRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/arc/ArcFactory.js b/src/gameobjects/shape/arc/ArcFactory.js index 535d44530..aa760a132 100644 --- a/src/gameobjects/shape/arc/ArcFactory.js +++ b/src/gameobjects/shape/arc/ArcFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/arc/ArcRender.js b/src/gameobjects/shape/arc/ArcRender.js index 71e7935bb..35989616e 100644 --- a/src/gameobjects/shape/arc/ArcRender.js +++ b/src/gameobjects/shape/arc/ArcRender.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/arc/ArcWebGLRenderer.js b/src/gameobjects/shape/arc/ArcWebGLRenderer.js index 4b7fe5a11..48c61034f 100644 --- a/src/gameobjects/shape/arc/ArcWebGLRenderer.js +++ b/src/gameobjects/shape/arc/ArcWebGLRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/curve/Curve.js b/src/gameobjects/shape/curve/Curve.js index 016d47ca1..b4c7342bd 100644 --- a/src/gameobjects/shape/curve/Curve.js +++ b/src/gameobjects/shape/curve/Curve.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/curve/CurveCanvasRenderer.js b/src/gameobjects/shape/curve/CurveCanvasRenderer.js index 2fdd15bb4..639c85b63 100644 --- a/src/gameobjects/shape/curve/CurveCanvasRenderer.js +++ b/src/gameobjects/shape/curve/CurveCanvasRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/curve/CurveFactory.js b/src/gameobjects/shape/curve/CurveFactory.js index 4a0757314..2b8ff9572 100644 --- a/src/gameobjects/shape/curve/CurveFactory.js +++ b/src/gameobjects/shape/curve/CurveFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/curve/CurveRender.js b/src/gameobjects/shape/curve/CurveRender.js index 0ce54a8bc..5d4334faf 100644 --- a/src/gameobjects/shape/curve/CurveRender.js +++ b/src/gameobjects/shape/curve/CurveRender.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/curve/CurveWebGLRenderer.js b/src/gameobjects/shape/curve/CurveWebGLRenderer.js index c767b5d6c..228b62f14 100644 --- a/src/gameobjects/shape/curve/CurveWebGLRenderer.js +++ b/src/gameobjects/shape/curve/CurveWebGLRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/ellipse/Ellipse.js b/src/gameobjects/shape/ellipse/Ellipse.js index d56286cc9..793fefdef 100644 --- a/src/gameobjects/shape/ellipse/Ellipse.js +++ b/src/gameobjects/shape/ellipse/Ellipse.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/ellipse/EllipseCanvasRenderer.js b/src/gameobjects/shape/ellipse/EllipseCanvasRenderer.js index 1b2dfdb05..c8b8487fa 100644 --- a/src/gameobjects/shape/ellipse/EllipseCanvasRenderer.js +++ b/src/gameobjects/shape/ellipse/EllipseCanvasRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/ellipse/EllipseFactory.js b/src/gameobjects/shape/ellipse/EllipseFactory.js index 9c9ff8d91..1bb925288 100644 --- a/src/gameobjects/shape/ellipse/EllipseFactory.js +++ b/src/gameobjects/shape/ellipse/EllipseFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/ellipse/EllipseRender.js b/src/gameobjects/shape/ellipse/EllipseRender.js index ae81d50e3..4dccf0998 100644 --- a/src/gameobjects/shape/ellipse/EllipseRender.js +++ b/src/gameobjects/shape/ellipse/EllipseRender.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/ellipse/EllipseWebGLRenderer.js b/src/gameobjects/shape/ellipse/EllipseWebGLRenderer.js index 0715a21e0..df8b51272 100644 --- a/src/gameobjects/shape/ellipse/EllipseWebGLRenderer.js +++ b/src/gameobjects/shape/ellipse/EllipseWebGLRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/grid/Grid.js b/src/gameobjects/shape/grid/Grid.js index a8f95eafd..f4f1cfd5d 100644 --- a/src/gameobjects/shape/grid/Grid.js +++ b/src/gameobjects/shape/grid/Grid.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/grid/GridCanvasRenderer.js b/src/gameobjects/shape/grid/GridCanvasRenderer.js index fd02d59b3..c797aebd7 100644 --- a/src/gameobjects/shape/grid/GridCanvasRenderer.js +++ b/src/gameobjects/shape/grid/GridCanvasRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/grid/GridFactory.js b/src/gameobjects/shape/grid/GridFactory.js index 31de24330..45932f6b6 100644 --- a/src/gameobjects/shape/grid/GridFactory.js +++ b/src/gameobjects/shape/grid/GridFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/grid/GridRender.js b/src/gameobjects/shape/grid/GridRender.js index 7219e4067..a66a60549 100644 --- a/src/gameobjects/shape/grid/GridRender.js +++ b/src/gameobjects/shape/grid/GridRender.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/grid/GridWebGLRenderer.js b/src/gameobjects/shape/grid/GridWebGLRenderer.js index 5583855b6..ed26fa305 100644 --- a/src/gameobjects/shape/grid/GridWebGLRenderer.js +++ b/src/gameobjects/shape/grid/GridWebGLRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/isobox/IsoBox.js b/src/gameobjects/shape/isobox/IsoBox.js index 64486cac4..8e6bd80e3 100644 --- a/src/gameobjects/shape/isobox/IsoBox.js +++ b/src/gameobjects/shape/isobox/IsoBox.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/isobox/IsoBoxCanvasRenderer.js b/src/gameobjects/shape/isobox/IsoBoxCanvasRenderer.js index 3ea33dd90..651da129e 100644 --- a/src/gameobjects/shape/isobox/IsoBoxCanvasRenderer.js +++ b/src/gameobjects/shape/isobox/IsoBoxCanvasRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/isobox/IsoBoxFactory.js b/src/gameobjects/shape/isobox/IsoBoxFactory.js index 954e1843e..00a670b59 100644 --- a/src/gameobjects/shape/isobox/IsoBoxFactory.js +++ b/src/gameobjects/shape/isobox/IsoBoxFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/isobox/IsoBoxRender.js b/src/gameobjects/shape/isobox/IsoBoxRender.js index c0c205e80..e057bb1c1 100644 --- a/src/gameobjects/shape/isobox/IsoBoxRender.js +++ b/src/gameobjects/shape/isobox/IsoBoxRender.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/isobox/IsoBoxWebGLRenderer.js b/src/gameobjects/shape/isobox/IsoBoxWebGLRenderer.js index 431f0ddf2..91ca1b749 100644 --- a/src/gameobjects/shape/isobox/IsoBoxWebGLRenderer.js +++ b/src/gameobjects/shape/isobox/IsoBoxWebGLRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/isotriangle/IsoTriangle.js b/src/gameobjects/shape/isotriangle/IsoTriangle.js index 6d5b0e5d8..8df8346dd 100644 --- a/src/gameobjects/shape/isotriangle/IsoTriangle.js +++ b/src/gameobjects/shape/isotriangle/IsoTriangle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/isotriangle/IsoTriangleCanvasRenderer.js b/src/gameobjects/shape/isotriangle/IsoTriangleCanvasRenderer.js index 5b3af1d92..866b28ae8 100644 --- a/src/gameobjects/shape/isotriangle/IsoTriangleCanvasRenderer.js +++ b/src/gameobjects/shape/isotriangle/IsoTriangleCanvasRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/isotriangle/IsoTriangleFactory.js b/src/gameobjects/shape/isotriangle/IsoTriangleFactory.js index ce7ce173a..5fc16bbaa 100644 --- a/src/gameobjects/shape/isotriangle/IsoTriangleFactory.js +++ b/src/gameobjects/shape/isotriangle/IsoTriangleFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/isotriangle/IsoTriangleRender.js b/src/gameobjects/shape/isotriangle/IsoTriangleRender.js index 357c97955..494738ced 100644 --- a/src/gameobjects/shape/isotriangle/IsoTriangleRender.js +++ b/src/gameobjects/shape/isotriangle/IsoTriangleRender.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/isotriangle/IsoTriangleWebGLRenderer.js b/src/gameobjects/shape/isotriangle/IsoTriangleWebGLRenderer.js index 6202c16c5..1c7e5e884 100644 --- a/src/gameobjects/shape/isotriangle/IsoTriangleWebGLRenderer.js +++ b/src/gameobjects/shape/isotriangle/IsoTriangleWebGLRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/line/Line.js b/src/gameobjects/shape/line/Line.js index 359dda578..38296113d 100644 --- a/src/gameobjects/shape/line/Line.js +++ b/src/gameobjects/shape/line/Line.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/line/LineCanvasRenderer.js b/src/gameobjects/shape/line/LineCanvasRenderer.js index dbc562950..01a504f74 100644 --- a/src/gameobjects/shape/line/LineCanvasRenderer.js +++ b/src/gameobjects/shape/line/LineCanvasRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/line/LineFactory.js b/src/gameobjects/shape/line/LineFactory.js index e3240b0a5..0f2da4aef 100644 --- a/src/gameobjects/shape/line/LineFactory.js +++ b/src/gameobjects/shape/line/LineFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/line/LineRender.js b/src/gameobjects/shape/line/LineRender.js index 9dfd46843..8a8e2a83e 100644 --- a/src/gameobjects/shape/line/LineRender.js +++ b/src/gameobjects/shape/line/LineRender.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/line/LineWebGLRenderer.js b/src/gameobjects/shape/line/LineWebGLRenderer.js index 66eab7618..a8b26536d 100644 --- a/src/gameobjects/shape/line/LineWebGLRenderer.js +++ b/src/gameobjects/shape/line/LineWebGLRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/polygon/Polygon.js b/src/gameobjects/shape/polygon/Polygon.js index 7c63b8494..971ead967 100644 --- a/src/gameobjects/shape/polygon/Polygon.js +++ b/src/gameobjects/shape/polygon/Polygon.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/polygon/PolygonCanvasRenderer.js b/src/gameobjects/shape/polygon/PolygonCanvasRenderer.js index 996cbb8fa..2662b4fa7 100644 --- a/src/gameobjects/shape/polygon/PolygonCanvasRenderer.js +++ b/src/gameobjects/shape/polygon/PolygonCanvasRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/polygon/PolygonFactory.js b/src/gameobjects/shape/polygon/PolygonFactory.js index 451632a84..d0c03aac6 100644 --- a/src/gameobjects/shape/polygon/PolygonFactory.js +++ b/src/gameobjects/shape/polygon/PolygonFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/polygon/PolygonRender.js b/src/gameobjects/shape/polygon/PolygonRender.js index f2c4995f6..5e4897f1c 100644 --- a/src/gameobjects/shape/polygon/PolygonRender.js +++ b/src/gameobjects/shape/polygon/PolygonRender.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/polygon/PolygonWebGLRenderer.js b/src/gameobjects/shape/polygon/PolygonWebGLRenderer.js index b0ee8635f..cd41ef81f 100644 --- a/src/gameobjects/shape/polygon/PolygonWebGLRenderer.js +++ b/src/gameobjects/shape/polygon/PolygonWebGLRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/rectangle/Rectangle.js b/src/gameobjects/shape/rectangle/Rectangle.js index 5f6375556..f4e6b815e 100644 --- a/src/gameobjects/shape/rectangle/Rectangle.js +++ b/src/gameobjects/shape/rectangle/Rectangle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/rectangle/RectangleCanvasRenderer.js b/src/gameobjects/shape/rectangle/RectangleCanvasRenderer.js index 8ee0bc0bd..02a3e52d4 100644 --- a/src/gameobjects/shape/rectangle/RectangleCanvasRenderer.js +++ b/src/gameobjects/shape/rectangle/RectangleCanvasRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/rectangle/RectangleFactory.js b/src/gameobjects/shape/rectangle/RectangleFactory.js index 6638c1128..41ffb1b6c 100644 --- a/src/gameobjects/shape/rectangle/RectangleFactory.js +++ b/src/gameobjects/shape/rectangle/RectangleFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/rectangle/RectangleRender.js b/src/gameobjects/shape/rectangle/RectangleRender.js index ef92d2924..188fa6632 100644 --- a/src/gameobjects/shape/rectangle/RectangleRender.js +++ b/src/gameobjects/shape/rectangle/RectangleRender.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/rectangle/RectangleWebGLRenderer.js b/src/gameobjects/shape/rectangle/RectangleWebGLRenderer.js index 2108d5583..1773dc3e7 100644 --- a/src/gameobjects/shape/rectangle/RectangleWebGLRenderer.js +++ b/src/gameobjects/shape/rectangle/RectangleWebGLRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/star/Star.js b/src/gameobjects/shape/star/Star.js index f6bde9e42..a0bd489b6 100644 --- a/src/gameobjects/shape/star/Star.js +++ b/src/gameobjects/shape/star/Star.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/star/StarCanvasRenderer.js b/src/gameobjects/shape/star/StarCanvasRenderer.js index 8f0307626..834be1bab 100644 --- a/src/gameobjects/shape/star/StarCanvasRenderer.js +++ b/src/gameobjects/shape/star/StarCanvasRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/star/StarFactory.js b/src/gameobjects/shape/star/StarFactory.js index 31b03bff6..5d621acf4 100644 --- a/src/gameobjects/shape/star/StarFactory.js +++ b/src/gameobjects/shape/star/StarFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/star/StarRender.js b/src/gameobjects/shape/star/StarRender.js index 45775d40b..966db1331 100644 --- a/src/gameobjects/shape/star/StarRender.js +++ b/src/gameobjects/shape/star/StarRender.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/star/StarWebGLRenderer.js b/src/gameobjects/shape/star/StarWebGLRenderer.js index c36667217..054fd6cc5 100644 --- a/src/gameobjects/shape/star/StarWebGLRenderer.js +++ b/src/gameobjects/shape/star/StarWebGLRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/triangle/Triangle.js b/src/gameobjects/shape/triangle/Triangle.js index d96e8e47e..d4446df6f 100644 --- a/src/gameobjects/shape/triangle/Triangle.js +++ b/src/gameobjects/shape/triangle/Triangle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/triangle/TriangleCanvasRenderer.js b/src/gameobjects/shape/triangle/TriangleCanvasRenderer.js index e338f4a01..dd577aafa 100644 --- a/src/gameobjects/shape/triangle/TriangleCanvasRenderer.js +++ b/src/gameobjects/shape/triangle/TriangleCanvasRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/triangle/TriangleFactory.js b/src/gameobjects/shape/triangle/TriangleFactory.js index 0b811a4b8..c5505a15c 100644 --- a/src/gameobjects/shape/triangle/TriangleFactory.js +++ b/src/gameobjects/shape/triangle/TriangleFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/triangle/TriangleRender.js b/src/gameobjects/shape/triangle/TriangleRender.js index 7b65b9fee..d92eba5cd 100644 --- a/src/gameobjects/shape/triangle/TriangleRender.js +++ b/src/gameobjects/shape/triangle/TriangleRender.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/shape/triangle/TriangleWebGLRenderer.js b/src/gameobjects/shape/triangle/TriangleWebGLRenderer.js index b5ca44bab..9b6a1a1c6 100644 --- a/src/gameobjects/shape/triangle/TriangleWebGLRenderer.js +++ b/src/gameobjects/shape/triangle/TriangleWebGLRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/sprite/Sprite.js b/src/gameobjects/sprite/Sprite.js index f033cdd1d..a6d6ecf47 100644 --- a/src/gameobjects/sprite/Sprite.js +++ b/src/gameobjects/sprite/Sprite.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/sprite/SpriteCanvasRenderer.js b/src/gameobjects/sprite/SpriteCanvasRenderer.js index c3d830013..39d8f05c7 100644 --- a/src/gameobjects/sprite/SpriteCanvasRenderer.js +++ b/src/gameobjects/sprite/SpriteCanvasRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/sprite/SpriteCreator.js b/src/gameobjects/sprite/SpriteCreator.js index d653afcbe..1129522d4 100644 --- a/src/gameobjects/sprite/SpriteCreator.js +++ b/src/gameobjects/sprite/SpriteCreator.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/sprite/SpriteFactory.js b/src/gameobjects/sprite/SpriteFactory.js index d1a6dfa3a..1db62f293 100644 --- a/src/gameobjects/sprite/SpriteFactory.js +++ b/src/gameobjects/sprite/SpriteFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/sprite/SpriteRender.js b/src/gameobjects/sprite/SpriteRender.js index 11683ae95..5a4fcbeca 100644 --- a/src/gameobjects/sprite/SpriteRender.js +++ b/src/gameobjects/sprite/SpriteRender.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/sprite/SpriteWebGLRenderer.js b/src/gameobjects/sprite/SpriteWebGLRenderer.js index 319fdc2cf..93ed5ee9d 100644 --- a/src/gameobjects/sprite/SpriteWebGLRenderer.js +++ b/src/gameobjects/sprite/SpriteWebGLRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/sprite/typedefs/index.js b/src/gameobjects/sprite/typedefs/index.js index 8f6520bac..21cbeda72 100644 --- a/src/gameobjects/sprite/typedefs/index.js +++ b/src/gameobjects/sprite/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/text/GetTextSize.js b/src/gameobjects/text/GetTextSize.js index 82fa15ae4..af1626b8c 100644 --- a/src/gameobjects/text/GetTextSize.js +++ b/src/gameobjects/text/GetTextSize.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/text/MeasureText.js b/src/gameobjects/text/MeasureText.js index 8b94ea7f3..331542861 100644 --- a/src/gameobjects/text/MeasureText.js +++ b/src/gameobjects/text/MeasureText.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/text/TextStyle.js b/src/gameobjects/text/TextStyle.js index 1b846a10d..18336afc8 100644 --- a/src/gameobjects/text/TextStyle.js +++ b/src/gameobjects/text/TextStyle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/text/static/Text.js b/src/gameobjects/text/static/Text.js index ba91806f2..699c78252 100644 --- a/src/gameobjects/text/static/Text.js +++ b/src/gameobjects/text/static/Text.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/text/static/TextCanvasRenderer.js b/src/gameobjects/text/static/TextCanvasRenderer.js index 5f813f4b0..87cb99856 100644 --- a/src/gameobjects/text/static/TextCanvasRenderer.js +++ b/src/gameobjects/text/static/TextCanvasRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/text/static/TextCreator.js b/src/gameobjects/text/static/TextCreator.js index e33bfbc80..2baedc2ca 100644 --- a/src/gameobjects/text/static/TextCreator.js +++ b/src/gameobjects/text/static/TextCreator.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/text/static/TextFactory.js b/src/gameobjects/text/static/TextFactory.js index 1344cdd4e..d639aae23 100644 --- a/src/gameobjects/text/static/TextFactory.js +++ b/src/gameobjects/text/static/TextFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/text/static/TextRender.js b/src/gameobjects/text/static/TextRender.js index e91cb7ebe..a48d3935f 100644 --- a/src/gameobjects/text/static/TextRender.js +++ b/src/gameobjects/text/static/TextRender.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/text/static/TextWebGLRenderer.js b/src/gameobjects/text/static/TextWebGLRenderer.js index b96abcf24..70d379422 100644 --- a/src/gameobjects/text/static/TextWebGLRenderer.js +++ b/src/gameobjects/text/static/TextWebGLRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/text/typedefs/index.js b/src/gameobjects/text/typedefs/index.js index 5369fff1c..70c06926c 100644 --- a/src/gameobjects/text/typedefs/index.js +++ b/src/gameobjects/text/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/tilesprite/TileSprite.js b/src/gameobjects/tilesprite/TileSprite.js index 2cc0b59a8..d58fd5a90 100644 --- a/src/gameobjects/tilesprite/TileSprite.js +++ b/src/gameobjects/tilesprite/TileSprite.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/tilesprite/TileSpriteCanvasRenderer.js b/src/gameobjects/tilesprite/TileSpriteCanvasRenderer.js index 054b99d8e..cf5012867 100644 --- a/src/gameobjects/tilesprite/TileSpriteCanvasRenderer.js +++ b/src/gameobjects/tilesprite/TileSpriteCanvasRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/tilesprite/TileSpriteCreator.js b/src/gameobjects/tilesprite/TileSpriteCreator.js index 8595688ae..2407f1b9a 100644 --- a/src/gameobjects/tilesprite/TileSpriteCreator.js +++ b/src/gameobjects/tilesprite/TileSpriteCreator.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/tilesprite/TileSpriteFactory.js b/src/gameobjects/tilesprite/TileSpriteFactory.js index d1aff5f5b..679897ac8 100644 --- a/src/gameobjects/tilesprite/TileSpriteFactory.js +++ b/src/gameobjects/tilesprite/TileSpriteFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/tilesprite/TileSpriteRender.js b/src/gameobjects/tilesprite/TileSpriteRender.js index 840347040..7960eaf21 100644 --- a/src/gameobjects/tilesprite/TileSpriteRender.js +++ b/src/gameobjects/tilesprite/TileSpriteRender.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/tilesprite/TileSpriteWebGLRenderer.js b/src/gameobjects/tilesprite/TileSpriteWebGLRenderer.js index a3c761a1c..5d9545633 100644 --- a/src/gameobjects/tilesprite/TileSpriteWebGLRenderer.js +++ b/src/gameobjects/tilesprite/TileSpriteWebGLRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/tilesprite/typedefs/index.js b/src/gameobjects/tilesprite/typedefs/index.js index ee20b48bd..906ba37cb 100644 --- a/src/gameobjects/tilesprite/typedefs/index.js +++ b/src/gameobjects/tilesprite/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/typedefs/index.js b/src/gameobjects/typedefs/index.js index 4ff6d5859..081574801 100644 --- a/src/gameobjects/typedefs/index.js +++ b/src/gameobjects/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/video/Video.js b/src/gameobjects/video/Video.js index 200b32cc2..82ae064cb 100644 --- a/src/gameobjects/video/Video.js +++ b/src/gameobjects/video/Video.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/video/VideoCanvasRenderer.js b/src/gameobjects/video/VideoCanvasRenderer.js index d158d2577..d5b1e979d 100644 --- a/src/gameobjects/video/VideoCanvasRenderer.js +++ b/src/gameobjects/video/VideoCanvasRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/video/VideoCreator.js b/src/gameobjects/video/VideoCreator.js index 32aa8aa8d..d30bd1c51 100644 --- a/src/gameobjects/video/VideoCreator.js +++ b/src/gameobjects/video/VideoCreator.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/video/VideoFactory.js b/src/gameobjects/video/VideoFactory.js index 162512430..98d7b7999 100644 --- a/src/gameobjects/video/VideoFactory.js +++ b/src/gameobjects/video/VideoFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/video/VideoRender.js b/src/gameobjects/video/VideoRender.js index bae40a1e4..129a17ba7 100644 --- a/src/gameobjects/video/VideoRender.js +++ b/src/gameobjects/video/VideoRender.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/video/VideoWebGLRenderer.js b/src/gameobjects/video/VideoWebGLRenderer.js index 2d436ceff..5b13e5fd7 100644 --- a/src/gameobjects/video/VideoWebGLRenderer.js +++ b/src/gameobjects/video/VideoWebGLRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/zone/Zone.js b/src/gameobjects/zone/Zone.js index bbafbe1bd..b9c1459c3 100644 --- a/src/gameobjects/zone/Zone.js +++ b/src/gameobjects/zone/Zone.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/zone/ZoneCreator.js b/src/gameobjects/zone/ZoneCreator.js index 5abd8797a..2b2ba09da 100644 --- a/src/gameobjects/zone/ZoneCreator.js +++ b/src/gameobjects/zone/ZoneCreator.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/gameobjects/zone/ZoneFactory.js b/src/gameobjects/zone/ZoneFactory.js index 914f81d36..b8b6d5d24 100644 --- a/src/gameobjects/zone/ZoneFactory.js +++ b/src/gameobjects/zone/ZoneFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/circle/Area.js b/src/geom/circle/Area.js index 38079c1f0..be2d4887c 100644 --- a/src/geom/circle/Area.js +++ b/src/geom/circle/Area.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/circle/Circle.js b/src/geom/circle/Circle.js index b357a679b..34ca17847 100644 --- a/src/geom/circle/Circle.js +++ b/src/geom/circle/Circle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/circle/Circumference.js b/src/geom/circle/Circumference.js index 14741f0a7..73044976d 100644 --- a/src/geom/circle/Circumference.js +++ b/src/geom/circle/Circumference.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/circle/CircumferencePoint.js b/src/geom/circle/CircumferencePoint.js index 356a01194..8866ceaa0 100644 --- a/src/geom/circle/CircumferencePoint.js +++ b/src/geom/circle/CircumferencePoint.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/circle/Clone.js b/src/geom/circle/Clone.js index bd1752306..c2a010f99 100644 --- a/src/geom/circle/Clone.js +++ b/src/geom/circle/Clone.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/circle/Contains.js b/src/geom/circle/Contains.js index e9ada651b..18ea913c9 100644 --- a/src/geom/circle/Contains.js +++ b/src/geom/circle/Contains.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/circle/ContainsPoint.js b/src/geom/circle/ContainsPoint.js index b6ddcfff2..940c86f14 100644 --- a/src/geom/circle/ContainsPoint.js +++ b/src/geom/circle/ContainsPoint.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/circle/ContainsRect.js b/src/geom/circle/ContainsRect.js index bd0580f54..f428c2b54 100644 --- a/src/geom/circle/ContainsRect.js +++ b/src/geom/circle/ContainsRect.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/circle/CopyFrom.js b/src/geom/circle/CopyFrom.js index 17a0a411d..fad7c223e 100644 --- a/src/geom/circle/CopyFrom.js +++ b/src/geom/circle/CopyFrom.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/circle/Equals.js b/src/geom/circle/Equals.js index 60e9fa9b3..bac237bad 100644 --- a/src/geom/circle/Equals.js +++ b/src/geom/circle/Equals.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/circle/GetBounds.js b/src/geom/circle/GetBounds.js index a54f2cff6..c234217bf 100644 --- a/src/geom/circle/GetBounds.js +++ b/src/geom/circle/GetBounds.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/circle/GetPoint.js b/src/geom/circle/GetPoint.js index bc9cea147..698db939a 100644 --- a/src/geom/circle/GetPoint.js +++ b/src/geom/circle/GetPoint.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/circle/GetPoints.js b/src/geom/circle/GetPoints.js index 12577fa80..34974cbbb 100644 --- a/src/geom/circle/GetPoints.js +++ b/src/geom/circle/GetPoints.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/circle/Offset.js b/src/geom/circle/Offset.js index a58bde0e1..8bc4175d5 100644 --- a/src/geom/circle/Offset.js +++ b/src/geom/circle/Offset.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/circle/OffsetPoint.js b/src/geom/circle/OffsetPoint.js index f98353b8b..de9938859 100644 --- a/src/geom/circle/OffsetPoint.js +++ b/src/geom/circle/OffsetPoint.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/circle/Random.js b/src/geom/circle/Random.js index 5104c852e..e75218779 100644 --- a/src/geom/circle/Random.js +++ b/src/geom/circle/Random.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/circle/index.js b/src/geom/circle/index.js index f9c1bcd7f..2c47dc3a0 100644 --- a/src/geom/circle/index.js +++ b/src/geom/circle/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/const.js b/src/geom/const.js index 94fb6172f..5988b0db2 100644 --- a/src/geom/const.js +++ b/src/geom/const.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/ellipse/Area.js b/src/geom/ellipse/Area.js index aa16dd2e9..bb5cb15b2 100644 --- a/src/geom/ellipse/Area.js +++ b/src/geom/ellipse/Area.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/ellipse/Circumference.js b/src/geom/ellipse/Circumference.js index 7f204bc9a..75fe314c6 100644 --- a/src/geom/ellipse/Circumference.js +++ b/src/geom/ellipse/Circumference.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/ellipse/CircumferencePoint.js b/src/geom/ellipse/CircumferencePoint.js index 21bc290b9..a3ce6df65 100644 --- a/src/geom/ellipse/CircumferencePoint.js +++ b/src/geom/ellipse/CircumferencePoint.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/ellipse/Clone.js b/src/geom/ellipse/Clone.js index 24a8d4c78..17657fd4f 100644 --- a/src/geom/ellipse/Clone.js +++ b/src/geom/ellipse/Clone.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/ellipse/Contains.js b/src/geom/ellipse/Contains.js index 55a68b0a0..e0ace630d 100644 --- a/src/geom/ellipse/Contains.js +++ b/src/geom/ellipse/Contains.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/ellipse/ContainsPoint.js b/src/geom/ellipse/ContainsPoint.js index 9fc3959a0..4260d0ebb 100644 --- a/src/geom/ellipse/ContainsPoint.js +++ b/src/geom/ellipse/ContainsPoint.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/ellipse/ContainsRect.js b/src/geom/ellipse/ContainsRect.js index 5498522d0..f3427889a 100644 --- a/src/geom/ellipse/ContainsRect.js +++ b/src/geom/ellipse/ContainsRect.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/ellipse/CopyFrom.js b/src/geom/ellipse/CopyFrom.js index 1f1a38e20..6e0374235 100644 --- a/src/geom/ellipse/CopyFrom.js +++ b/src/geom/ellipse/CopyFrom.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/ellipse/Ellipse.js b/src/geom/ellipse/Ellipse.js index 80c23c114..ff6ec4fc5 100644 --- a/src/geom/ellipse/Ellipse.js +++ b/src/geom/ellipse/Ellipse.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/ellipse/Equals.js b/src/geom/ellipse/Equals.js index 4d731eeac..6395d9daa 100644 --- a/src/geom/ellipse/Equals.js +++ b/src/geom/ellipse/Equals.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/ellipse/GetBounds.js b/src/geom/ellipse/GetBounds.js index 3d38544cf..141ce5c8a 100644 --- a/src/geom/ellipse/GetBounds.js +++ b/src/geom/ellipse/GetBounds.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/ellipse/GetPoint.js b/src/geom/ellipse/GetPoint.js index a9b6592a1..7a1242600 100644 --- a/src/geom/ellipse/GetPoint.js +++ b/src/geom/ellipse/GetPoint.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/ellipse/GetPoints.js b/src/geom/ellipse/GetPoints.js index 79eefebf1..ebe1cb435 100644 --- a/src/geom/ellipse/GetPoints.js +++ b/src/geom/ellipse/GetPoints.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/ellipse/Offset.js b/src/geom/ellipse/Offset.js index 9be2344b0..a2089241e 100644 --- a/src/geom/ellipse/Offset.js +++ b/src/geom/ellipse/Offset.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/ellipse/OffsetPoint.js b/src/geom/ellipse/OffsetPoint.js index 06cf61cab..2309cc0f5 100644 --- a/src/geom/ellipse/OffsetPoint.js +++ b/src/geom/ellipse/OffsetPoint.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/ellipse/Random.js b/src/geom/ellipse/Random.js index 660f71fb8..0008fc7ed 100644 --- a/src/geom/ellipse/Random.js +++ b/src/geom/ellipse/Random.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/ellipse/index.js b/src/geom/ellipse/index.js index 69768b325..be7226eaa 100644 --- a/src/geom/ellipse/index.js +++ b/src/geom/ellipse/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/index.js b/src/geom/index.js index 96b3d4dce..2208184af 100644 --- a/src/geom/index.js +++ b/src/geom/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/intersects/CircleToCircle.js b/src/geom/intersects/CircleToCircle.js index 9c459f063..567abb25d 100644 --- a/src/geom/intersects/CircleToCircle.js +++ b/src/geom/intersects/CircleToCircle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/intersects/CircleToRectangle.js b/src/geom/intersects/CircleToRectangle.js index 96c46659f..3afd9f2a9 100644 --- a/src/geom/intersects/CircleToRectangle.js +++ b/src/geom/intersects/CircleToRectangle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/intersects/GetCircleToCircle.js b/src/geom/intersects/GetCircleToCircle.js index 40fefe2ce..b241a908d 100644 --- a/src/geom/intersects/GetCircleToCircle.js +++ b/src/geom/intersects/GetCircleToCircle.js @@ -1,7 +1,7 @@ /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/intersects/GetCircleToRectangle.js b/src/geom/intersects/GetCircleToRectangle.js index 926d63e14..edd7fc59e 100644 --- a/src/geom/intersects/GetCircleToRectangle.js +++ b/src/geom/intersects/GetCircleToRectangle.js @@ -1,7 +1,7 @@ /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/intersects/GetLineToCircle.js b/src/geom/intersects/GetLineToCircle.js index d49fb1c90..fa59407e3 100644 --- a/src/geom/intersects/GetLineToCircle.js +++ b/src/geom/intersects/GetLineToCircle.js @@ -1,7 +1,7 @@ /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/intersects/GetLineToRectangle.js b/src/geom/intersects/GetLineToRectangle.js index d46272d72..859866b29 100644 --- a/src/geom/intersects/GetLineToRectangle.js +++ b/src/geom/intersects/GetLineToRectangle.js @@ -1,7 +1,7 @@ /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/intersects/GetRectangleIntersection.js b/src/geom/intersects/GetRectangleIntersection.js index e3f9725f9..9949b8143 100644 --- a/src/geom/intersects/GetRectangleIntersection.js +++ b/src/geom/intersects/GetRectangleIntersection.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/intersects/GetRectangleToRectangle.js b/src/geom/intersects/GetRectangleToRectangle.js index 605df3a60..28f0808d9 100644 --- a/src/geom/intersects/GetRectangleToRectangle.js +++ b/src/geom/intersects/GetRectangleToRectangle.js @@ -1,7 +1,7 @@ /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/intersects/GetRectangleToTriangle.js b/src/geom/intersects/GetRectangleToTriangle.js index c0b357ef9..e574f7d44 100644 --- a/src/geom/intersects/GetRectangleToTriangle.js +++ b/src/geom/intersects/GetRectangleToTriangle.js @@ -1,7 +1,7 @@ /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/intersects/GetTriangleToCircle.js b/src/geom/intersects/GetTriangleToCircle.js index e531cdccd..bf7877342 100644 --- a/src/geom/intersects/GetTriangleToCircle.js +++ b/src/geom/intersects/GetTriangleToCircle.js @@ -1,7 +1,7 @@ /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/intersects/GetTriangleToLine.js b/src/geom/intersects/GetTriangleToLine.js index 7be827156..1490c1b7d 100644 --- a/src/geom/intersects/GetTriangleToLine.js +++ b/src/geom/intersects/GetTriangleToLine.js @@ -1,7 +1,7 @@ /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/intersects/GetTriangleToTriangle.js b/src/geom/intersects/GetTriangleToTriangle.js index d2f5cc91c..01e759ba9 100644 --- a/src/geom/intersects/GetTriangleToTriangle.js +++ b/src/geom/intersects/GetTriangleToTriangle.js @@ -1,7 +1,7 @@ /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/intersects/LineToCircle.js b/src/geom/intersects/LineToCircle.js index d0bbc2c43..5c31b3cb7 100644 --- a/src/geom/intersects/LineToCircle.js +++ b/src/geom/intersects/LineToCircle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/intersects/LineToLine.js b/src/geom/intersects/LineToLine.js index 7b91feb91..5a7a60a3e 100644 --- a/src/geom/intersects/LineToLine.js +++ b/src/geom/intersects/LineToLine.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/intersects/LineToRectangle.js b/src/geom/intersects/LineToRectangle.js index d6dcc6bd6..dd483f23b 100644 --- a/src/geom/intersects/LineToRectangle.js +++ b/src/geom/intersects/LineToRectangle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/intersects/PointToLine.js b/src/geom/intersects/PointToLine.js index 06383f7a3..e783fe496 100644 --- a/src/geom/intersects/PointToLine.js +++ b/src/geom/intersects/PointToLine.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @author Florian Mertens - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/intersects/PointToLineSegment.js b/src/geom/intersects/PointToLineSegment.js index 724a343d5..bda719df1 100644 --- a/src/geom/intersects/PointToLineSegment.js +++ b/src/geom/intersects/PointToLineSegment.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/intersects/RectangleToRectangle.js b/src/geom/intersects/RectangleToRectangle.js index 6a8887945..6f7a04620 100644 --- a/src/geom/intersects/RectangleToRectangle.js +++ b/src/geom/intersects/RectangleToRectangle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/intersects/RectangleToTriangle.js b/src/geom/intersects/RectangleToTriangle.js index 8acf5fca2..7ddfb5a1b 100644 --- a/src/geom/intersects/RectangleToTriangle.js +++ b/src/geom/intersects/RectangleToTriangle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/intersects/RectangleToValues.js b/src/geom/intersects/RectangleToValues.js index 9efa02e15..e6668c906 100644 --- a/src/geom/intersects/RectangleToValues.js +++ b/src/geom/intersects/RectangleToValues.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/intersects/TriangleToCircle.js b/src/geom/intersects/TriangleToCircle.js index 302c0c331..7a8e6f271 100644 --- a/src/geom/intersects/TriangleToCircle.js +++ b/src/geom/intersects/TriangleToCircle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/intersects/TriangleToLine.js b/src/geom/intersects/TriangleToLine.js index 1aa3477ff..ea15569d8 100644 --- a/src/geom/intersects/TriangleToLine.js +++ b/src/geom/intersects/TriangleToLine.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/intersects/TriangleToTriangle.js b/src/geom/intersects/TriangleToTriangle.js index 72f73b6a5..69ae8421a 100644 --- a/src/geom/intersects/TriangleToTriangle.js +++ b/src/geom/intersects/TriangleToTriangle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/intersects/index.js b/src/geom/intersects/index.js index 3d9d39b1f..e5e9c656b 100644 --- a/src/geom/intersects/index.js +++ b/src/geom/intersects/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/line/Angle.js b/src/geom/line/Angle.js index de6a1270d..772fb79de 100644 --- a/src/geom/line/Angle.js +++ b/src/geom/line/Angle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/line/BresenhamPoints.js b/src/geom/line/BresenhamPoints.js index 6070f3182..5192320b0 100644 --- a/src/geom/line/BresenhamPoints.js +++ b/src/geom/line/BresenhamPoints.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/line/CenterOn.js b/src/geom/line/CenterOn.js index b76ac4ab7..d425336bd 100644 --- a/src/geom/line/CenterOn.js +++ b/src/geom/line/CenterOn.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/line/Clone.js b/src/geom/line/Clone.js index cc8d80be9..993648c14 100644 --- a/src/geom/line/Clone.js +++ b/src/geom/line/Clone.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/line/CopyFrom.js b/src/geom/line/CopyFrom.js index b9aa4e655..382e37803 100644 --- a/src/geom/line/CopyFrom.js +++ b/src/geom/line/CopyFrom.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/line/Equals.js b/src/geom/line/Equals.js index fda6434af..1f596ba45 100644 --- a/src/geom/line/Equals.js +++ b/src/geom/line/Equals.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/line/Extend.js b/src/geom/line/Extend.js index 9508acbc3..a2634967e 100644 --- a/src/geom/line/Extend.js +++ b/src/geom/line/Extend.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/line/GetMidPoint.js b/src/geom/line/GetMidPoint.js index 33d326f07..87e802778 100644 --- a/src/geom/line/GetMidPoint.js +++ b/src/geom/line/GetMidPoint.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/line/GetNearestPoint.js b/src/geom/line/GetNearestPoint.js index 71b1c7c06..0bf695059 100644 --- a/src/geom/line/GetNearestPoint.js +++ b/src/geom/line/GetNearestPoint.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @author Florian Mertens - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/line/GetNormal.js b/src/geom/line/GetNormal.js index 759140513..ce62b7b02 100644 --- a/src/geom/line/GetNormal.js +++ b/src/geom/line/GetNormal.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/line/GetPoint.js b/src/geom/line/GetPoint.js index 397fb0b3d..c66cfbb76 100644 --- a/src/geom/line/GetPoint.js +++ b/src/geom/line/GetPoint.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/line/GetPoints.js b/src/geom/line/GetPoints.js index 28d748639..a7cbb5952 100644 --- a/src/geom/line/GetPoints.js +++ b/src/geom/line/GetPoints.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/line/GetShortestDistance.js b/src/geom/line/GetShortestDistance.js index af0194659..0087bcc6b 100644 --- a/src/geom/line/GetShortestDistance.js +++ b/src/geom/line/GetShortestDistance.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @author Florian Mertens - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/line/Height.js b/src/geom/line/Height.js index fd4603c74..f35bdd09e 100644 --- a/src/geom/line/Height.js +++ b/src/geom/line/Height.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/line/Length.js b/src/geom/line/Length.js index b4333d02b..116623f47 100644 --- a/src/geom/line/Length.js +++ b/src/geom/line/Length.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/line/Line.js b/src/geom/line/Line.js index e99817234..4114e5e38 100644 --- a/src/geom/line/Line.js +++ b/src/geom/line/Line.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/line/NormalAngle.js b/src/geom/line/NormalAngle.js index a843eb403..80eda7992 100644 --- a/src/geom/line/NormalAngle.js +++ b/src/geom/line/NormalAngle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/line/NormalX.js b/src/geom/line/NormalX.js index 41bff3529..8c3de902c 100644 --- a/src/geom/line/NormalX.js +++ b/src/geom/line/NormalX.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/line/NormalY.js b/src/geom/line/NormalY.js index c21d0d48e..23e5fea92 100644 --- a/src/geom/line/NormalY.js +++ b/src/geom/line/NormalY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/line/Offset.js b/src/geom/line/Offset.js index 23ed9fdd6..f38f1d443 100644 --- a/src/geom/line/Offset.js +++ b/src/geom/line/Offset.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/line/PerpSlope.js b/src/geom/line/PerpSlope.js index 24b8439a1..8a82aadec 100644 --- a/src/geom/line/PerpSlope.js +++ b/src/geom/line/PerpSlope.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/line/Random.js b/src/geom/line/Random.js index 73b3e1d59..f56db0223 100644 --- a/src/geom/line/Random.js +++ b/src/geom/line/Random.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/line/ReflectAngle.js b/src/geom/line/ReflectAngle.js index df1de6025..af90f37d7 100644 --- a/src/geom/line/ReflectAngle.js +++ b/src/geom/line/ReflectAngle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/line/Rotate.js b/src/geom/line/Rotate.js index 62cc98280..7afcb30f5 100644 --- a/src/geom/line/Rotate.js +++ b/src/geom/line/Rotate.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/line/RotateAroundPoint.js b/src/geom/line/RotateAroundPoint.js index 1222943bf..894355bf2 100644 --- a/src/geom/line/RotateAroundPoint.js +++ b/src/geom/line/RotateAroundPoint.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/line/RotateAroundXY.js b/src/geom/line/RotateAroundXY.js index 7350ad7a0..63669f6b3 100644 --- a/src/geom/line/RotateAroundXY.js +++ b/src/geom/line/RotateAroundXY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/line/SetToAngle.js b/src/geom/line/SetToAngle.js index 3507c12c9..cc061a1df 100644 --- a/src/geom/line/SetToAngle.js +++ b/src/geom/line/SetToAngle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/line/Slope.js b/src/geom/line/Slope.js index d0024b9be..8b0b77278 100644 --- a/src/geom/line/Slope.js +++ b/src/geom/line/Slope.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/line/Width.js b/src/geom/line/Width.js index d68b12212..83d78b6ee 100644 --- a/src/geom/line/Width.js +++ b/src/geom/line/Width.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/line/index.js b/src/geom/line/index.js index 001fc31a6..95fddf221 100644 --- a/src/geom/line/index.js +++ b/src/geom/line/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/point/Ceil.js b/src/geom/point/Ceil.js index 9bc077595..a39101e68 100644 --- a/src/geom/point/Ceil.js +++ b/src/geom/point/Ceil.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/point/Clone.js b/src/geom/point/Clone.js index f76fef8de..9d7249fc0 100644 --- a/src/geom/point/Clone.js +++ b/src/geom/point/Clone.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/point/CopyFrom.js b/src/geom/point/CopyFrom.js index 009f5ea86..e71112e39 100644 --- a/src/geom/point/CopyFrom.js +++ b/src/geom/point/CopyFrom.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/point/Equals.js b/src/geom/point/Equals.js index a4058a8f4..3084664ae 100644 --- a/src/geom/point/Equals.js +++ b/src/geom/point/Equals.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/point/Floor.js b/src/geom/point/Floor.js index 0f712a484..d158f17a0 100644 --- a/src/geom/point/Floor.js +++ b/src/geom/point/Floor.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/point/GetCentroid.js b/src/geom/point/GetCentroid.js index ac31c42c5..db460048e 100644 --- a/src/geom/point/GetCentroid.js +++ b/src/geom/point/GetCentroid.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/point/GetMagnitude.js b/src/geom/point/GetMagnitude.js index 56601752e..07fae43fc 100644 --- a/src/geom/point/GetMagnitude.js +++ b/src/geom/point/GetMagnitude.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/point/GetMagnitudeSq.js b/src/geom/point/GetMagnitudeSq.js index 033235944..dd80db75b 100644 --- a/src/geom/point/GetMagnitudeSq.js +++ b/src/geom/point/GetMagnitudeSq.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/point/GetRectangleFromPoints.js b/src/geom/point/GetRectangleFromPoints.js index 1d0b3d95a..bea998048 100644 --- a/src/geom/point/GetRectangleFromPoints.js +++ b/src/geom/point/GetRectangleFromPoints.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/point/Interpolate.js b/src/geom/point/Interpolate.js index d8afd2339..2048868a8 100644 --- a/src/geom/point/Interpolate.js +++ b/src/geom/point/Interpolate.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/point/Invert.js b/src/geom/point/Invert.js index 7f5bc0a0c..698dcdcc4 100644 --- a/src/geom/point/Invert.js +++ b/src/geom/point/Invert.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/point/Negative.js b/src/geom/point/Negative.js index 4b521f6fd..a013d869f 100644 --- a/src/geom/point/Negative.js +++ b/src/geom/point/Negative.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/point/Point.js b/src/geom/point/Point.js index 184e57a02..43d0aaea1 100644 --- a/src/geom/point/Point.js +++ b/src/geom/point/Point.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/point/Project.js b/src/geom/point/Project.js index 46f2fd9d7..7446f2be9 100644 --- a/src/geom/point/Project.js +++ b/src/geom/point/Project.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/point/ProjectUnit.js b/src/geom/point/ProjectUnit.js index 8db566910..e8a013820 100644 --- a/src/geom/point/ProjectUnit.js +++ b/src/geom/point/ProjectUnit.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/point/SetMagnitude.js b/src/geom/point/SetMagnitude.js index 1200c5b8f..ef4f907b3 100644 --- a/src/geom/point/SetMagnitude.js +++ b/src/geom/point/SetMagnitude.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/point/index.js b/src/geom/point/index.js index d2e5279ec..53c1cd950 100644 --- a/src/geom/point/index.js +++ b/src/geom/point/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/polygon/Clone.js b/src/geom/polygon/Clone.js index 762f2ebb8..5d314dac4 100644 --- a/src/geom/polygon/Clone.js +++ b/src/geom/polygon/Clone.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/polygon/Contains.js b/src/geom/polygon/Contains.js index f4dc95955..fada1a347 100644 --- a/src/geom/polygon/Contains.js +++ b/src/geom/polygon/Contains.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/polygon/ContainsPoint.js b/src/geom/polygon/ContainsPoint.js index f6dd37c0b..ce23aa20c 100644 --- a/src/geom/polygon/ContainsPoint.js +++ b/src/geom/polygon/ContainsPoint.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/polygon/Earcut.js b/src/geom/polygon/Earcut.js index 7f3a5614a..e4babbf1e 100644 --- a/src/geom/polygon/Earcut.js +++ b/src/geom/polygon/Earcut.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/polygon/GetAABB.js b/src/geom/polygon/GetAABB.js index be71876e9..36a93f799 100644 --- a/src/geom/polygon/GetAABB.js +++ b/src/geom/polygon/GetAABB.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/polygon/GetNumberArray.js b/src/geom/polygon/GetNumberArray.js index 4936cf81c..b039b05b8 100644 --- a/src/geom/polygon/GetNumberArray.js +++ b/src/geom/polygon/GetNumberArray.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/polygon/GetPoints.js b/src/geom/polygon/GetPoints.js index ef0a6dca7..2a0310496 100644 --- a/src/geom/polygon/GetPoints.js +++ b/src/geom/polygon/GetPoints.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/polygon/Perimeter.js b/src/geom/polygon/Perimeter.js index e3b9a4b42..bd6d5587f 100644 --- a/src/geom/polygon/Perimeter.js +++ b/src/geom/polygon/Perimeter.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/polygon/Polygon.js b/src/geom/polygon/Polygon.js index 0d7098722..72568bd0f 100644 --- a/src/geom/polygon/Polygon.js +++ b/src/geom/polygon/Polygon.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/polygon/Reverse.js b/src/geom/polygon/Reverse.js index 4c5c58b27..354e133a6 100644 --- a/src/geom/polygon/Reverse.js +++ b/src/geom/polygon/Reverse.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/polygon/Smooth.js b/src/geom/polygon/Smooth.js index 0138f3210..3e77d9889 100644 --- a/src/geom/polygon/Smooth.js +++ b/src/geom/polygon/Smooth.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @author Igor Ognichenko - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/polygon/index.js b/src/geom/polygon/index.js index dc6ff6e22..a928bccef 100644 --- a/src/geom/polygon/index.js +++ b/src/geom/polygon/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/Area.js b/src/geom/rectangle/Area.js index 9851dcc8e..fb13b7c29 100644 --- a/src/geom/rectangle/Area.js +++ b/src/geom/rectangle/Area.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/Ceil.js b/src/geom/rectangle/Ceil.js index c6eb60488..dd6ad15f3 100644 --- a/src/geom/rectangle/Ceil.js +++ b/src/geom/rectangle/Ceil.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/CeilAll.js b/src/geom/rectangle/CeilAll.js index 2ca725ace..3b65d994e 100644 --- a/src/geom/rectangle/CeilAll.js +++ b/src/geom/rectangle/CeilAll.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/CenterOn.js b/src/geom/rectangle/CenterOn.js index b96415571..f1bb3298e 100644 --- a/src/geom/rectangle/CenterOn.js +++ b/src/geom/rectangle/CenterOn.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/Clone.js b/src/geom/rectangle/Clone.js index 2354a7c32..a7d50a4e4 100644 --- a/src/geom/rectangle/Clone.js +++ b/src/geom/rectangle/Clone.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/Contains.js b/src/geom/rectangle/Contains.js index 385e138fc..382a8d2f4 100644 --- a/src/geom/rectangle/Contains.js +++ b/src/geom/rectangle/Contains.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/ContainsPoint.js b/src/geom/rectangle/ContainsPoint.js index 5d158f86a..fe3761578 100644 --- a/src/geom/rectangle/ContainsPoint.js +++ b/src/geom/rectangle/ContainsPoint.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/ContainsRect.js b/src/geom/rectangle/ContainsRect.js index c68697c68..979a2ee07 100644 --- a/src/geom/rectangle/ContainsRect.js +++ b/src/geom/rectangle/ContainsRect.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/CopyFrom.js b/src/geom/rectangle/CopyFrom.js index 13b78c5da..2db18a759 100644 --- a/src/geom/rectangle/CopyFrom.js +++ b/src/geom/rectangle/CopyFrom.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/Decompose.js b/src/geom/rectangle/Decompose.js index d5278afba..ad331ff98 100644 --- a/src/geom/rectangle/Decompose.js +++ b/src/geom/rectangle/Decompose.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/Equals.js b/src/geom/rectangle/Equals.js index 62dd16038..a8a7c037e 100644 --- a/src/geom/rectangle/Equals.js +++ b/src/geom/rectangle/Equals.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/FitInside.js b/src/geom/rectangle/FitInside.js index 89c68c159..cc4c5a3c5 100644 --- a/src/geom/rectangle/FitInside.js +++ b/src/geom/rectangle/FitInside.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/FitOutside.js b/src/geom/rectangle/FitOutside.js index 89432cc85..4bc148c01 100644 --- a/src/geom/rectangle/FitOutside.js +++ b/src/geom/rectangle/FitOutside.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/Floor.js b/src/geom/rectangle/Floor.js index 32404faaf..8f79186cb 100644 --- a/src/geom/rectangle/Floor.js +++ b/src/geom/rectangle/Floor.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/FloorAll.js b/src/geom/rectangle/FloorAll.js index f19c020d5..c5c48fcb2 100644 --- a/src/geom/rectangle/FloorAll.js +++ b/src/geom/rectangle/FloorAll.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/FromPoints.js b/src/geom/rectangle/FromPoints.js index 768ae83e1..4cf816736 100644 --- a/src/geom/rectangle/FromPoints.js +++ b/src/geom/rectangle/FromPoints.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/GetAspectRatio.js b/src/geom/rectangle/GetAspectRatio.js index 59297ba38..155023155 100644 --- a/src/geom/rectangle/GetAspectRatio.js +++ b/src/geom/rectangle/GetAspectRatio.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/GetCenter.js b/src/geom/rectangle/GetCenter.js index 46b846b2c..af8d98793 100644 --- a/src/geom/rectangle/GetCenter.js +++ b/src/geom/rectangle/GetCenter.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/GetPoint.js b/src/geom/rectangle/GetPoint.js index e9a7cd553..af659fe52 100644 --- a/src/geom/rectangle/GetPoint.js +++ b/src/geom/rectangle/GetPoint.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/GetPoints.js b/src/geom/rectangle/GetPoints.js index 08131bcca..942d3fa1c 100644 --- a/src/geom/rectangle/GetPoints.js +++ b/src/geom/rectangle/GetPoints.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/GetSize.js b/src/geom/rectangle/GetSize.js index 77169fa61..bdfaa6cc4 100644 --- a/src/geom/rectangle/GetSize.js +++ b/src/geom/rectangle/GetSize.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/Inflate.js b/src/geom/rectangle/Inflate.js index 5e25edcf2..cbf12e200 100644 --- a/src/geom/rectangle/Inflate.js +++ b/src/geom/rectangle/Inflate.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/Intersection.js b/src/geom/rectangle/Intersection.js index 71d2ac870..fc7357163 100644 --- a/src/geom/rectangle/Intersection.js +++ b/src/geom/rectangle/Intersection.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/MarchingAnts.js b/src/geom/rectangle/MarchingAnts.js index e00d9eae1..bac6f1f97 100644 --- a/src/geom/rectangle/MarchingAnts.js +++ b/src/geom/rectangle/MarchingAnts.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/MergePoints.js b/src/geom/rectangle/MergePoints.js index bd02e049b..d3544cc3b 100644 --- a/src/geom/rectangle/MergePoints.js +++ b/src/geom/rectangle/MergePoints.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/MergeRect.js b/src/geom/rectangle/MergeRect.js index 17ec36a3a..448a77ab4 100644 --- a/src/geom/rectangle/MergeRect.js +++ b/src/geom/rectangle/MergeRect.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/MergeXY.js b/src/geom/rectangle/MergeXY.js index ca4372a8e..1f4f51d0c 100644 --- a/src/geom/rectangle/MergeXY.js +++ b/src/geom/rectangle/MergeXY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/Offset.js b/src/geom/rectangle/Offset.js index c389e7c86..f70882059 100644 --- a/src/geom/rectangle/Offset.js +++ b/src/geom/rectangle/Offset.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/OffsetPoint.js b/src/geom/rectangle/OffsetPoint.js index 2654fb66e..b06e8965f 100644 --- a/src/geom/rectangle/OffsetPoint.js +++ b/src/geom/rectangle/OffsetPoint.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/Overlaps.js b/src/geom/rectangle/Overlaps.js index a35cbf9e0..b595d6521 100644 --- a/src/geom/rectangle/Overlaps.js +++ b/src/geom/rectangle/Overlaps.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/Perimeter.js b/src/geom/rectangle/Perimeter.js index f86593215..68eaf0d4b 100644 --- a/src/geom/rectangle/Perimeter.js +++ b/src/geom/rectangle/Perimeter.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/PerimeterPoint.js b/src/geom/rectangle/PerimeterPoint.js index 318047222..48c913bfc 100644 --- a/src/geom/rectangle/PerimeterPoint.js +++ b/src/geom/rectangle/PerimeterPoint.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/Random.js b/src/geom/rectangle/Random.js index fd03e70d1..713956116 100644 --- a/src/geom/rectangle/Random.js +++ b/src/geom/rectangle/Random.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/RandomOutside.js b/src/geom/rectangle/RandomOutside.js index f41e19383..19682f4d1 100644 --- a/src/geom/rectangle/RandomOutside.js +++ b/src/geom/rectangle/RandomOutside.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/Rectangle.js b/src/geom/rectangle/Rectangle.js index d061e0ae9..3b5fd7d61 100644 --- a/src/geom/rectangle/Rectangle.js +++ b/src/geom/rectangle/Rectangle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/SameDimensions.js b/src/geom/rectangle/SameDimensions.js index 7f3af5190..64fc94659 100644 --- a/src/geom/rectangle/SameDimensions.js +++ b/src/geom/rectangle/SameDimensions.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/Scale.js b/src/geom/rectangle/Scale.js index b181b4744..efbbcc174 100644 --- a/src/geom/rectangle/Scale.js +++ b/src/geom/rectangle/Scale.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/Union.js b/src/geom/rectangle/Union.js index ab1d5208e..6ac609c91 100644 --- a/src/geom/rectangle/Union.js +++ b/src/geom/rectangle/Union.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/rectangle/index.js b/src/geom/rectangle/index.js index d3bc77303..35c9e1a22 100644 --- a/src/geom/rectangle/index.js +++ b/src/geom/rectangle/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/triangle/Area.js b/src/geom/triangle/Area.js index 400fc9d01..bf06dad21 100644 --- a/src/geom/triangle/Area.js +++ b/src/geom/triangle/Area.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/triangle/BuildEquilateral.js b/src/geom/triangle/BuildEquilateral.js index 1df526c62..1e8563052 100644 --- a/src/geom/triangle/BuildEquilateral.js +++ b/src/geom/triangle/BuildEquilateral.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/triangle/BuildFromPolygon.js b/src/geom/triangle/BuildFromPolygon.js index 163fd7ad4..e0c46e09f 100644 --- a/src/geom/triangle/BuildFromPolygon.js +++ b/src/geom/triangle/BuildFromPolygon.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/triangle/BuildRight.js b/src/geom/triangle/BuildRight.js index 07f77d5f5..5d7578fb9 100644 --- a/src/geom/triangle/BuildRight.js +++ b/src/geom/triangle/BuildRight.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/triangle/CenterOn.js b/src/geom/triangle/CenterOn.js index 16ab3aae0..53b6d7a97 100644 --- a/src/geom/triangle/CenterOn.js +++ b/src/geom/triangle/CenterOn.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/triangle/Centroid.js b/src/geom/triangle/Centroid.js index 9062015fd..3cec6d16c 100644 --- a/src/geom/triangle/Centroid.js +++ b/src/geom/triangle/Centroid.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/triangle/CircumCenter.js b/src/geom/triangle/CircumCenter.js index b960c76d5..cad696ed0 100644 --- a/src/geom/triangle/CircumCenter.js +++ b/src/geom/triangle/CircumCenter.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/triangle/CircumCircle.js b/src/geom/triangle/CircumCircle.js index d8c1336bf..b98ca0d15 100644 --- a/src/geom/triangle/CircumCircle.js +++ b/src/geom/triangle/CircumCircle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/triangle/Clone.js b/src/geom/triangle/Clone.js index bff6222e7..a7e6f553e 100644 --- a/src/geom/triangle/Clone.js +++ b/src/geom/triangle/Clone.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/triangle/Contains.js b/src/geom/triangle/Contains.js index 1eff78ec7..236795d6f 100644 --- a/src/geom/triangle/Contains.js +++ b/src/geom/triangle/Contains.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/triangle/ContainsArray.js b/src/geom/triangle/ContainsArray.js index f9a5bd6d6..e8df0fde7 100644 --- a/src/geom/triangle/ContainsArray.js +++ b/src/geom/triangle/ContainsArray.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/triangle/ContainsPoint.js b/src/geom/triangle/ContainsPoint.js index ce16b3b05..d641ac4f6 100644 --- a/src/geom/triangle/ContainsPoint.js +++ b/src/geom/triangle/ContainsPoint.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/triangle/CopyFrom.js b/src/geom/triangle/CopyFrom.js index 30cc9cfa7..a42a24432 100644 --- a/src/geom/triangle/CopyFrom.js +++ b/src/geom/triangle/CopyFrom.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/triangle/Decompose.js b/src/geom/triangle/Decompose.js index c4cb01fbe..5114cbe50 100644 --- a/src/geom/triangle/Decompose.js +++ b/src/geom/triangle/Decompose.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/triangle/Equals.js b/src/geom/triangle/Equals.js index 775f91258..98a6ef408 100644 --- a/src/geom/triangle/Equals.js +++ b/src/geom/triangle/Equals.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/triangle/GetPoint.js b/src/geom/triangle/GetPoint.js index ae05cfc3e..546ea200a 100644 --- a/src/geom/triangle/GetPoint.js +++ b/src/geom/triangle/GetPoint.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/triangle/GetPoints.js b/src/geom/triangle/GetPoints.js index ed7821afc..373b1234b 100644 --- a/src/geom/triangle/GetPoints.js +++ b/src/geom/triangle/GetPoints.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/triangle/InCenter.js b/src/geom/triangle/InCenter.js index 59377864c..154cc80c1 100644 --- a/src/geom/triangle/InCenter.js +++ b/src/geom/triangle/InCenter.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/triangle/Offset.js b/src/geom/triangle/Offset.js index 748ea6c3e..b774a255d 100644 --- a/src/geom/triangle/Offset.js +++ b/src/geom/triangle/Offset.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/triangle/Perimeter.js b/src/geom/triangle/Perimeter.js index b3cb7c38a..6bf7e62b3 100644 --- a/src/geom/triangle/Perimeter.js +++ b/src/geom/triangle/Perimeter.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/triangle/Random.js b/src/geom/triangle/Random.js index 289cbd132..9796e9175 100644 --- a/src/geom/triangle/Random.js +++ b/src/geom/triangle/Random.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/triangle/Rotate.js b/src/geom/triangle/Rotate.js index a4067ff9f..820c4afd2 100644 --- a/src/geom/triangle/Rotate.js +++ b/src/geom/triangle/Rotate.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/triangle/RotateAroundPoint.js b/src/geom/triangle/RotateAroundPoint.js index 610182bad..c440469c8 100644 --- a/src/geom/triangle/RotateAroundPoint.js +++ b/src/geom/triangle/RotateAroundPoint.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/triangle/RotateAroundXY.js b/src/geom/triangle/RotateAroundXY.js index 656ca2186..515a7e5a9 100644 --- a/src/geom/triangle/RotateAroundXY.js +++ b/src/geom/triangle/RotateAroundXY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/triangle/Triangle.js b/src/geom/triangle/Triangle.js index aab068f22..769663820 100644 --- a/src/geom/triangle/Triangle.js +++ b/src/geom/triangle/Triangle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/geom/triangle/index.js b/src/geom/triangle/index.js index 3f46a3fb6..050f8a177 100644 --- a/src/geom/triangle/index.js +++ b/src/geom/triangle/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/CreateInteractiveObject.js b/src/input/CreateInteractiveObject.js index 5440dbe41..2c9df433e 100644 --- a/src/input/CreateInteractiveObject.js +++ b/src/input/CreateInteractiveObject.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/CreatePixelPerfectHandler.js b/src/input/CreatePixelPerfectHandler.js index ae2742087..d975d6d36 100644 --- a/src/input/CreatePixelPerfectHandler.js +++ b/src/input/CreatePixelPerfectHandler.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/InputManager.js b/src/input/InputManager.js index a1024a2d8..3dbaceeac 100644 --- a/src/input/InputManager.js +++ b/src/input/InputManager.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/InputPlugin.js b/src/input/InputPlugin.js index 5c9a16ab0..4764d6411 100644 --- a/src/input/InputPlugin.js +++ b/src/input/InputPlugin.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/InputPluginCache.js b/src/input/InputPluginCache.js index cf1b1fd5f..37a2f1c15 100644 --- a/src/input/InputPluginCache.js +++ b/src/input/InputPluginCache.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/Pointer.js b/src/input/Pointer.js index 7cce4d36a..3c2ee6fa7 100644 --- a/src/input/Pointer.js +++ b/src/input/Pointer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/const.js b/src/input/const.js index ad6bfdb1b..757b4c2a8 100644 --- a/src/input/const.js +++ b/src/input/const.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/BOOT_EVENT.js b/src/input/events/BOOT_EVENT.js index 347df324e..7988d335a 100644 --- a/src/input/events/BOOT_EVENT.js +++ b/src/input/events/BOOT_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/DESTROY_EVENT.js b/src/input/events/DESTROY_EVENT.js index 9d7abbb5a..9c6dc29c7 100644 --- a/src/input/events/DESTROY_EVENT.js +++ b/src/input/events/DESTROY_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/DRAG_END_EVENT.js b/src/input/events/DRAG_END_EVENT.js index 227be6349..421e27d73 100644 --- a/src/input/events/DRAG_END_EVENT.js +++ b/src/input/events/DRAG_END_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/DRAG_ENTER_EVENT.js b/src/input/events/DRAG_ENTER_EVENT.js index 2327ea6cf..bb956571c 100644 --- a/src/input/events/DRAG_ENTER_EVENT.js +++ b/src/input/events/DRAG_ENTER_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/DRAG_EVENT.js b/src/input/events/DRAG_EVENT.js index 3154a5d99..730d725d2 100644 --- a/src/input/events/DRAG_EVENT.js +++ b/src/input/events/DRAG_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/DRAG_LEAVE_EVENT.js b/src/input/events/DRAG_LEAVE_EVENT.js index 1d32bc36e..29c8c3de7 100644 --- a/src/input/events/DRAG_LEAVE_EVENT.js +++ b/src/input/events/DRAG_LEAVE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/DRAG_OVER_EVENT.js b/src/input/events/DRAG_OVER_EVENT.js index 566265e96..915e89ee0 100644 --- a/src/input/events/DRAG_OVER_EVENT.js +++ b/src/input/events/DRAG_OVER_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/DRAG_START_EVENT.js b/src/input/events/DRAG_START_EVENT.js index 1436e2ea0..36f8bd812 100644 --- a/src/input/events/DRAG_START_EVENT.js +++ b/src/input/events/DRAG_START_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/DROP_EVENT.js b/src/input/events/DROP_EVENT.js index d0ac225b2..92569eeaa 100644 --- a/src/input/events/DROP_EVENT.js +++ b/src/input/events/DROP_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/GAMEOBJECT_DOWN_EVENT.js b/src/input/events/GAMEOBJECT_DOWN_EVENT.js index e6155411d..0a1bec816 100644 --- a/src/input/events/GAMEOBJECT_DOWN_EVENT.js +++ b/src/input/events/GAMEOBJECT_DOWN_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/GAMEOBJECT_DRAG_END_EVENT.js b/src/input/events/GAMEOBJECT_DRAG_END_EVENT.js index bec93e97a..fffc52d17 100644 --- a/src/input/events/GAMEOBJECT_DRAG_END_EVENT.js +++ b/src/input/events/GAMEOBJECT_DRAG_END_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/GAMEOBJECT_DRAG_ENTER_EVENT.js b/src/input/events/GAMEOBJECT_DRAG_ENTER_EVENT.js index b46dac40c..437becdab 100644 --- a/src/input/events/GAMEOBJECT_DRAG_ENTER_EVENT.js +++ b/src/input/events/GAMEOBJECT_DRAG_ENTER_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/GAMEOBJECT_DRAG_EVENT.js b/src/input/events/GAMEOBJECT_DRAG_EVENT.js index f8b041978..47f44de4a 100644 --- a/src/input/events/GAMEOBJECT_DRAG_EVENT.js +++ b/src/input/events/GAMEOBJECT_DRAG_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/GAMEOBJECT_DRAG_LEAVE_EVENT.js b/src/input/events/GAMEOBJECT_DRAG_LEAVE_EVENT.js index c076b7c98..e20f718df 100644 --- a/src/input/events/GAMEOBJECT_DRAG_LEAVE_EVENT.js +++ b/src/input/events/GAMEOBJECT_DRAG_LEAVE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/GAMEOBJECT_DRAG_OVER_EVENT.js b/src/input/events/GAMEOBJECT_DRAG_OVER_EVENT.js index 20f980bf4..8a1a0df39 100644 --- a/src/input/events/GAMEOBJECT_DRAG_OVER_EVENT.js +++ b/src/input/events/GAMEOBJECT_DRAG_OVER_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/GAMEOBJECT_DRAG_START_EVENT.js b/src/input/events/GAMEOBJECT_DRAG_START_EVENT.js index dab1843f0..1032e427a 100644 --- a/src/input/events/GAMEOBJECT_DRAG_START_EVENT.js +++ b/src/input/events/GAMEOBJECT_DRAG_START_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/GAMEOBJECT_DROP_EVENT.js b/src/input/events/GAMEOBJECT_DROP_EVENT.js index 250da9262..6b1df4ff1 100644 --- a/src/input/events/GAMEOBJECT_DROP_EVENT.js +++ b/src/input/events/GAMEOBJECT_DROP_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/GAMEOBJECT_MOVE_EVENT.js b/src/input/events/GAMEOBJECT_MOVE_EVENT.js index 120658c02..f1f017ad8 100644 --- a/src/input/events/GAMEOBJECT_MOVE_EVENT.js +++ b/src/input/events/GAMEOBJECT_MOVE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/GAMEOBJECT_OUT_EVENT.js b/src/input/events/GAMEOBJECT_OUT_EVENT.js index e9ddf3f93..c12279211 100644 --- a/src/input/events/GAMEOBJECT_OUT_EVENT.js +++ b/src/input/events/GAMEOBJECT_OUT_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/GAMEOBJECT_OVER_EVENT.js b/src/input/events/GAMEOBJECT_OVER_EVENT.js index 6496fe6d2..0e9e16054 100644 --- a/src/input/events/GAMEOBJECT_OVER_EVENT.js +++ b/src/input/events/GAMEOBJECT_OVER_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/GAMEOBJECT_POINTER_DOWN_EVENT.js b/src/input/events/GAMEOBJECT_POINTER_DOWN_EVENT.js index 5b16953aa..475942944 100644 --- a/src/input/events/GAMEOBJECT_POINTER_DOWN_EVENT.js +++ b/src/input/events/GAMEOBJECT_POINTER_DOWN_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/GAMEOBJECT_POINTER_MOVE_EVENT.js b/src/input/events/GAMEOBJECT_POINTER_MOVE_EVENT.js index c219f5899..d8afbd534 100644 --- a/src/input/events/GAMEOBJECT_POINTER_MOVE_EVENT.js +++ b/src/input/events/GAMEOBJECT_POINTER_MOVE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/GAMEOBJECT_POINTER_OUT_EVENT.js b/src/input/events/GAMEOBJECT_POINTER_OUT_EVENT.js index 59e7d5442..7be5150c9 100644 --- a/src/input/events/GAMEOBJECT_POINTER_OUT_EVENT.js +++ b/src/input/events/GAMEOBJECT_POINTER_OUT_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/GAMEOBJECT_POINTER_OVER_EVENT.js b/src/input/events/GAMEOBJECT_POINTER_OVER_EVENT.js index c86f9870a..6e4c837f8 100644 --- a/src/input/events/GAMEOBJECT_POINTER_OVER_EVENT.js +++ b/src/input/events/GAMEOBJECT_POINTER_OVER_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/GAMEOBJECT_POINTER_UP_EVENT.js b/src/input/events/GAMEOBJECT_POINTER_UP_EVENT.js index f774c56b0..6f3098518 100644 --- a/src/input/events/GAMEOBJECT_POINTER_UP_EVENT.js +++ b/src/input/events/GAMEOBJECT_POINTER_UP_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/GAMEOBJECT_POINTER_WHEEL_EVENT.js b/src/input/events/GAMEOBJECT_POINTER_WHEEL_EVENT.js index 70904ef95..6c4b6b8fe 100644 --- a/src/input/events/GAMEOBJECT_POINTER_WHEEL_EVENT.js +++ b/src/input/events/GAMEOBJECT_POINTER_WHEEL_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/GAMEOBJECT_UP_EVENT.js b/src/input/events/GAMEOBJECT_UP_EVENT.js index 46afeed6c..e8f473b41 100644 --- a/src/input/events/GAMEOBJECT_UP_EVENT.js +++ b/src/input/events/GAMEOBJECT_UP_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/GAMEOBJECT_WHEEL_EVENT.js b/src/input/events/GAMEOBJECT_WHEEL_EVENT.js index 9ff84615d..d4297da0a 100644 --- a/src/input/events/GAMEOBJECT_WHEEL_EVENT.js +++ b/src/input/events/GAMEOBJECT_WHEEL_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/GAME_OUT_EVENT.js b/src/input/events/GAME_OUT_EVENT.js index 86fed0a87..539742ff8 100644 --- a/src/input/events/GAME_OUT_EVENT.js +++ b/src/input/events/GAME_OUT_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/GAME_OVER_EVENT.js b/src/input/events/GAME_OVER_EVENT.js index afb50f0d3..bb76e00b3 100644 --- a/src/input/events/GAME_OVER_EVENT.js +++ b/src/input/events/GAME_OVER_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/MANAGER_BOOT_EVENT.js b/src/input/events/MANAGER_BOOT_EVENT.js index 2ab91ec00..da42a8749 100644 --- a/src/input/events/MANAGER_BOOT_EVENT.js +++ b/src/input/events/MANAGER_BOOT_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/MANAGER_PROCESS_EVENT.js b/src/input/events/MANAGER_PROCESS_EVENT.js index 387971133..aa2c8b422 100644 --- a/src/input/events/MANAGER_PROCESS_EVENT.js +++ b/src/input/events/MANAGER_PROCESS_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/MANAGER_UPDATE_EVENT.js b/src/input/events/MANAGER_UPDATE_EVENT.js index 5c64cef36..f58acc77b 100644 --- a/src/input/events/MANAGER_UPDATE_EVENT.js +++ b/src/input/events/MANAGER_UPDATE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/POINTERLOCK_CHANGE_EVENT.js b/src/input/events/POINTERLOCK_CHANGE_EVENT.js index a308d46a5..90a5926d3 100644 --- a/src/input/events/POINTERLOCK_CHANGE_EVENT.js +++ b/src/input/events/POINTERLOCK_CHANGE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/POINTER_DOWN_EVENT.js b/src/input/events/POINTER_DOWN_EVENT.js index 0a9a7ffb9..e9116d427 100644 --- a/src/input/events/POINTER_DOWN_EVENT.js +++ b/src/input/events/POINTER_DOWN_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/POINTER_DOWN_OUTSIDE_EVENT.js b/src/input/events/POINTER_DOWN_OUTSIDE_EVENT.js index fd362cbfc..5290c45a9 100644 --- a/src/input/events/POINTER_DOWN_OUTSIDE_EVENT.js +++ b/src/input/events/POINTER_DOWN_OUTSIDE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/POINTER_MOVE_EVENT.js b/src/input/events/POINTER_MOVE_EVENT.js index 1db9ab62f..3ae600009 100644 --- a/src/input/events/POINTER_MOVE_EVENT.js +++ b/src/input/events/POINTER_MOVE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/POINTER_OUT_EVENT.js b/src/input/events/POINTER_OUT_EVENT.js index e0b959822..9dbd61e05 100644 --- a/src/input/events/POINTER_OUT_EVENT.js +++ b/src/input/events/POINTER_OUT_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/POINTER_OVER_EVENT.js b/src/input/events/POINTER_OVER_EVENT.js index 6aadc3015..1304784f5 100644 --- a/src/input/events/POINTER_OVER_EVENT.js +++ b/src/input/events/POINTER_OVER_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/POINTER_UP_EVENT.js b/src/input/events/POINTER_UP_EVENT.js index ab47ab62a..05ce8fe49 100644 --- a/src/input/events/POINTER_UP_EVENT.js +++ b/src/input/events/POINTER_UP_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/POINTER_UP_OUTSIDE_EVENT.js b/src/input/events/POINTER_UP_OUTSIDE_EVENT.js index 3680e9ac1..c0dece412 100644 --- a/src/input/events/POINTER_UP_OUTSIDE_EVENT.js +++ b/src/input/events/POINTER_UP_OUTSIDE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/POINTER_WHEEL_EVENT.js b/src/input/events/POINTER_WHEEL_EVENT.js index 40f37f5dd..c902588ee 100644 --- a/src/input/events/POINTER_WHEEL_EVENT.js +++ b/src/input/events/POINTER_WHEEL_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/PRE_UPDATE_EVENT.js b/src/input/events/PRE_UPDATE_EVENT.js index e5151746a..9c37ccba4 100644 --- a/src/input/events/PRE_UPDATE_EVENT.js +++ b/src/input/events/PRE_UPDATE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/SHUTDOWN_EVENT.js b/src/input/events/SHUTDOWN_EVENT.js index 08f9ebb20..8ed7b30a3 100644 --- a/src/input/events/SHUTDOWN_EVENT.js +++ b/src/input/events/SHUTDOWN_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/START_EVENT.js b/src/input/events/START_EVENT.js index 8eed0fc42..1395adb41 100644 --- a/src/input/events/START_EVENT.js +++ b/src/input/events/START_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/UPDATE_EVENT.js b/src/input/events/UPDATE_EVENT.js index 2edab80a9..a95fc9b21 100644 --- a/src/input/events/UPDATE_EVENT.js +++ b/src/input/events/UPDATE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/events/index.js b/src/input/events/index.js index 68e4eef96..d1e19bfb4 100644 --- a/src/input/events/index.js +++ b/src/input/events/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/gamepad/Axis.js b/src/input/gamepad/Axis.js index be170181a..c56db03e5 100644 --- a/src/input/gamepad/Axis.js +++ b/src/input/gamepad/Axis.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/gamepad/Button.js b/src/input/gamepad/Button.js index 067d70ce5..734a39e41 100644 --- a/src/input/gamepad/Button.js +++ b/src/input/gamepad/Button.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/gamepad/Gamepad.js b/src/input/gamepad/Gamepad.js index ff8505346..52e8ae57c 100644 --- a/src/input/gamepad/Gamepad.js +++ b/src/input/gamepad/Gamepad.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/gamepad/GamepadPlugin.js b/src/input/gamepad/GamepadPlugin.js index 801a05cd3..50c72a5d1 100644 --- a/src/input/gamepad/GamepadPlugin.js +++ b/src/input/gamepad/GamepadPlugin.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/gamepad/configs/SNES_USB_Controller.js b/src/input/gamepad/configs/SNES_USB_Controller.js index 84b7058bb..bb13dae70 100644 --- a/src/input/gamepad/configs/SNES_USB_Controller.js +++ b/src/input/gamepad/configs/SNES_USB_Controller.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/gamepad/configs/Sony_PlayStation_DualShock_4.js b/src/input/gamepad/configs/Sony_PlayStation_DualShock_4.js index 185877140..3ce9d5aa0 100644 --- a/src/input/gamepad/configs/Sony_PlayStation_DualShock_4.js +++ b/src/input/gamepad/configs/Sony_PlayStation_DualShock_4.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/gamepad/configs/XBox360_Controller.js b/src/input/gamepad/configs/XBox360_Controller.js index c927d7c0b..271e1c7be 100644 --- a/src/input/gamepad/configs/XBox360_Controller.js +++ b/src/input/gamepad/configs/XBox360_Controller.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/gamepad/configs/index.js b/src/input/gamepad/configs/index.js index 639d184b1..4f5e763aa 100644 --- a/src/input/gamepad/configs/index.js +++ b/src/input/gamepad/configs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/gamepad/events/BUTTON_DOWN_EVENT.js b/src/input/gamepad/events/BUTTON_DOWN_EVENT.js index aaecc19ae..64a9a543e 100644 --- a/src/input/gamepad/events/BUTTON_DOWN_EVENT.js +++ b/src/input/gamepad/events/BUTTON_DOWN_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/gamepad/events/BUTTON_UP_EVENT.js b/src/input/gamepad/events/BUTTON_UP_EVENT.js index 88c5d3e29..7993a40f0 100644 --- a/src/input/gamepad/events/BUTTON_UP_EVENT.js +++ b/src/input/gamepad/events/BUTTON_UP_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/gamepad/events/CONNECTED_EVENT.js b/src/input/gamepad/events/CONNECTED_EVENT.js index 286a429cf..c39ba4a15 100644 --- a/src/input/gamepad/events/CONNECTED_EVENT.js +++ b/src/input/gamepad/events/CONNECTED_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/gamepad/events/DISCONNECTED_EVENT.js b/src/input/gamepad/events/DISCONNECTED_EVENT.js index 442a775b8..7b67d621c 100644 --- a/src/input/gamepad/events/DISCONNECTED_EVENT.js +++ b/src/input/gamepad/events/DISCONNECTED_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/gamepad/events/GAMEPAD_BUTTON_DOWN_EVENT.js b/src/input/gamepad/events/GAMEPAD_BUTTON_DOWN_EVENT.js index 7be189ef3..47336c46d 100644 --- a/src/input/gamepad/events/GAMEPAD_BUTTON_DOWN_EVENT.js +++ b/src/input/gamepad/events/GAMEPAD_BUTTON_DOWN_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/gamepad/events/GAMEPAD_BUTTON_UP_EVENT.js b/src/input/gamepad/events/GAMEPAD_BUTTON_UP_EVENT.js index b5ba31e0b..5db6a16bb 100644 --- a/src/input/gamepad/events/GAMEPAD_BUTTON_UP_EVENT.js +++ b/src/input/gamepad/events/GAMEPAD_BUTTON_UP_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/gamepad/events/index.js b/src/input/gamepad/events/index.js index 390ff21f7..ba8fdbf09 100644 --- a/src/input/gamepad/events/index.js +++ b/src/input/gamepad/events/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/gamepad/index.js b/src/input/gamepad/index.js index d5ae7b780..c9f0b2b1a 100644 --- a/src/input/gamepad/index.js +++ b/src/input/gamepad/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/gamepad/typedefs/index.js b/src/input/gamepad/typedefs/index.js index 6f8b9135b..d95114b58 100644 --- a/src/input/gamepad/typedefs/index.js +++ b/src/input/gamepad/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/index.js b/src/input/index.js index 946380d68..144fa8f86 100644 --- a/src/input/index.js +++ b/src/input/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/keyboard/KeyboardManager.js b/src/input/keyboard/KeyboardManager.js index 5079fb8a3..063743e5f 100644 --- a/src/input/keyboard/KeyboardManager.js +++ b/src/input/keyboard/KeyboardManager.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/keyboard/KeyboardPlugin.js b/src/input/keyboard/KeyboardPlugin.js index 8e59775d8..ab5bc5d91 100644 --- a/src/input/keyboard/KeyboardPlugin.js +++ b/src/input/keyboard/KeyboardPlugin.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/keyboard/combo/AdvanceKeyCombo.js b/src/input/keyboard/combo/AdvanceKeyCombo.js index e6d79aae1..b60b4d0bd 100644 --- a/src/input/keyboard/combo/AdvanceKeyCombo.js +++ b/src/input/keyboard/combo/AdvanceKeyCombo.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/keyboard/combo/KeyCombo.js b/src/input/keyboard/combo/KeyCombo.js index 99852d7de..8ad1b5d61 100644 --- a/src/input/keyboard/combo/KeyCombo.js +++ b/src/input/keyboard/combo/KeyCombo.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/keyboard/combo/ProcessKeyCombo.js b/src/input/keyboard/combo/ProcessKeyCombo.js index f8f4a70ea..bb5fe93d3 100644 --- a/src/input/keyboard/combo/ProcessKeyCombo.js +++ b/src/input/keyboard/combo/ProcessKeyCombo.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/keyboard/combo/ResetKeyCombo.js b/src/input/keyboard/combo/ResetKeyCombo.js index 9e227696c..72088e238 100644 --- a/src/input/keyboard/combo/ResetKeyCombo.js +++ b/src/input/keyboard/combo/ResetKeyCombo.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/keyboard/events/ANY_KEY_DOWN_EVENT.js b/src/input/keyboard/events/ANY_KEY_DOWN_EVENT.js index 7059de7dc..68a27620a 100644 --- a/src/input/keyboard/events/ANY_KEY_DOWN_EVENT.js +++ b/src/input/keyboard/events/ANY_KEY_DOWN_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/keyboard/events/ANY_KEY_UP_EVENT.js b/src/input/keyboard/events/ANY_KEY_UP_EVENT.js index 3bd902144..c3a38b3e9 100644 --- a/src/input/keyboard/events/ANY_KEY_UP_EVENT.js +++ b/src/input/keyboard/events/ANY_KEY_UP_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/keyboard/events/COMBO_MATCH_EVENT.js b/src/input/keyboard/events/COMBO_MATCH_EVENT.js index 32e4773b7..8d3199f7f 100644 --- a/src/input/keyboard/events/COMBO_MATCH_EVENT.js +++ b/src/input/keyboard/events/COMBO_MATCH_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/keyboard/events/DOWN_EVENT.js b/src/input/keyboard/events/DOWN_EVENT.js index 7717cff68..24d9b7b1d 100644 --- a/src/input/keyboard/events/DOWN_EVENT.js +++ b/src/input/keyboard/events/DOWN_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/keyboard/events/KEY_DOWN_EVENT.js b/src/input/keyboard/events/KEY_DOWN_EVENT.js index bad7fe369..911a6c402 100644 --- a/src/input/keyboard/events/KEY_DOWN_EVENT.js +++ b/src/input/keyboard/events/KEY_DOWN_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/keyboard/events/KEY_UP_EVENT.js b/src/input/keyboard/events/KEY_UP_EVENT.js index c5a7438f6..55065f213 100644 --- a/src/input/keyboard/events/KEY_UP_EVENT.js +++ b/src/input/keyboard/events/KEY_UP_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/keyboard/events/UP_EVENT.js b/src/input/keyboard/events/UP_EVENT.js index 686b42b83..126d916e7 100644 --- a/src/input/keyboard/events/UP_EVENT.js +++ b/src/input/keyboard/events/UP_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/keyboard/events/index.js b/src/input/keyboard/events/index.js index e206c5b01..3eca6a61e 100644 --- a/src/input/keyboard/events/index.js +++ b/src/input/keyboard/events/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/keyboard/index.js b/src/input/keyboard/index.js index 41ef6bced..67225ba20 100644 --- a/src/input/keyboard/index.js +++ b/src/input/keyboard/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/keyboard/keys/DownDuration.js b/src/input/keyboard/keys/DownDuration.js index 7d795c364..84d55ae73 100644 --- a/src/input/keyboard/keys/DownDuration.js +++ b/src/input/keyboard/keys/DownDuration.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/keyboard/keys/JustDown.js b/src/input/keyboard/keys/JustDown.js index e9ce91611..89f34fe99 100644 --- a/src/input/keyboard/keys/JustDown.js +++ b/src/input/keyboard/keys/JustDown.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/keyboard/keys/JustUp.js b/src/input/keyboard/keys/JustUp.js index 7fc8a8d45..97bc3b894 100644 --- a/src/input/keyboard/keys/JustUp.js +++ b/src/input/keyboard/keys/JustUp.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/keyboard/keys/Key.js b/src/input/keyboard/keys/Key.js index 3db5e8c17..cceed0d1c 100644 --- a/src/input/keyboard/keys/Key.js +++ b/src/input/keyboard/keys/Key.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/keyboard/keys/KeyCodes.js b/src/input/keyboard/keys/KeyCodes.js index 77b06d987..1744bef66 100644 --- a/src/input/keyboard/keys/KeyCodes.js +++ b/src/input/keyboard/keys/KeyCodes.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/keyboard/keys/KeyMap.js b/src/input/keyboard/keys/KeyMap.js index 430265f43..3f90e0816 100644 --- a/src/input/keyboard/keys/KeyMap.js +++ b/src/input/keyboard/keys/KeyMap.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/keyboard/keys/UpDuration.js b/src/input/keyboard/keys/UpDuration.js index ffe3c50d7..edb402c83 100644 --- a/src/input/keyboard/keys/UpDuration.js +++ b/src/input/keyboard/keys/UpDuration.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/keyboard/typedefs/index.js b/src/input/keyboard/typedefs/index.js index 79303b9d0..159297c1b 100644 --- a/src/input/keyboard/typedefs/index.js +++ b/src/input/keyboard/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/mouse/MouseManager.js b/src/input/mouse/MouseManager.js index eebc6d8b5..eb5f7e0b7 100644 --- a/src/input/mouse/MouseManager.js +++ b/src/input/mouse/MouseManager.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/mouse/index.js b/src/input/mouse/index.js index 33374f02c..a5ff433ab 100644 --- a/src/input/mouse/index.js +++ b/src/input/mouse/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/touch/TouchManager.js b/src/input/touch/TouchManager.js index 93bf4440f..472de4dab 100644 --- a/src/input/touch/TouchManager.js +++ b/src/input/touch/TouchManager.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/touch/index.js b/src/input/touch/index.js index 89ca6190f..097c1bc7a 100644 --- a/src/input/touch/index.js +++ b/src/input/touch/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/typedefs/EventData.js b/src/input/typedefs/EventData.js index 62abd2a2e..664589337 100644 --- a/src/input/typedefs/EventData.js +++ b/src/input/typedefs/EventData.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/input/typedefs/index.js b/src/input/typedefs/index.js index be05435df..96498d6a9 100644 --- a/src/input/typedefs/index.js +++ b/src/input/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/File.js b/src/loader/File.js index f1154a688..12b088c91 100644 --- a/src/loader/File.js +++ b/src/loader/File.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/FileTypesManager.js b/src/loader/FileTypesManager.js index 43db938c8..ec1d68109 100644 --- a/src/loader/FileTypesManager.js +++ b/src/loader/FileTypesManager.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/GetURL.js b/src/loader/GetURL.js index 25f3b8690..4e3ed3ce5 100644 --- a/src/loader/GetURL.js +++ b/src/loader/GetURL.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/LoaderPlugin.js b/src/loader/LoaderPlugin.js index c4cf0d122..fb9c99917 100644 --- a/src/loader/LoaderPlugin.js +++ b/src/loader/LoaderPlugin.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/MergeXHRSettings.js b/src/loader/MergeXHRSettings.js index 070d96938..62ca3671b 100644 --- a/src/loader/MergeXHRSettings.js +++ b/src/loader/MergeXHRSettings.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/MultiFile.js b/src/loader/MultiFile.js index 40f0d1011..5eb37bf3d 100644 --- a/src/loader/MultiFile.js +++ b/src/loader/MultiFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/XHRLoader.js b/src/loader/XHRLoader.js index 3ccf4f960..a41c1f7b1 100644 --- a/src/loader/XHRLoader.js +++ b/src/loader/XHRLoader.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/XHRSettings.js b/src/loader/XHRSettings.js index f32678477..5d51f9ea4 100644 --- a/src/loader/XHRSettings.js +++ b/src/loader/XHRSettings.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/const.js b/src/loader/const.js index 5f6971bc3..5796fab53 100644 --- a/src/loader/const.js +++ b/src/loader/const.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/events/ADD_EVENT.js b/src/loader/events/ADD_EVENT.js index 49dda4560..d6aaaa124 100644 --- a/src/loader/events/ADD_EVENT.js +++ b/src/loader/events/ADD_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/events/COMPLETE_EVENT.js b/src/loader/events/COMPLETE_EVENT.js index 0fffb23fe..107c6cf0a 100644 --- a/src/loader/events/COMPLETE_EVENT.js +++ b/src/loader/events/COMPLETE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/events/FILE_COMPLETE_EVENT.js b/src/loader/events/FILE_COMPLETE_EVENT.js index 1c3d0e498..29b369626 100644 --- a/src/loader/events/FILE_COMPLETE_EVENT.js +++ b/src/loader/events/FILE_COMPLETE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/events/FILE_KEY_COMPLETE_EVENT.js b/src/loader/events/FILE_KEY_COMPLETE_EVENT.js index d2b8cd5df..45fc30087 100644 --- a/src/loader/events/FILE_KEY_COMPLETE_EVENT.js +++ b/src/loader/events/FILE_KEY_COMPLETE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/events/FILE_LOAD_ERROR_EVENT.js b/src/loader/events/FILE_LOAD_ERROR_EVENT.js index 1fd691c4e..a9aba5f09 100644 --- a/src/loader/events/FILE_LOAD_ERROR_EVENT.js +++ b/src/loader/events/FILE_LOAD_ERROR_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/events/FILE_LOAD_EVENT.js b/src/loader/events/FILE_LOAD_EVENT.js index f3cd21fc9..7f300f425 100644 --- a/src/loader/events/FILE_LOAD_EVENT.js +++ b/src/loader/events/FILE_LOAD_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/events/FILE_PROGRESS_EVENT.js b/src/loader/events/FILE_PROGRESS_EVENT.js index 8422671aa..9a98b4bf6 100644 --- a/src/loader/events/FILE_PROGRESS_EVENT.js +++ b/src/loader/events/FILE_PROGRESS_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/events/POST_PROCESS_EVENT.js b/src/loader/events/POST_PROCESS_EVENT.js index a5f68a16b..875f70f2d 100644 --- a/src/loader/events/POST_PROCESS_EVENT.js +++ b/src/loader/events/POST_PROCESS_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/events/PROGRESS_EVENT.js b/src/loader/events/PROGRESS_EVENT.js index 929063f79..0099c77ab 100644 --- a/src/loader/events/PROGRESS_EVENT.js +++ b/src/loader/events/PROGRESS_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/events/START_EVENT.js b/src/loader/events/START_EVENT.js index 633a09285..e5748b3e0 100644 --- a/src/loader/events/START_EVENT.js +++ b/src/loader/events/START_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/events/index.js b/src/loader/events/index.js index f48537b67..6c8a6fb40 100644 --- a/src/loader/events/index.js +++ b/src/loader/events/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/AnimationJSONFile.js b/src/loader/filetypes/AnimationJSONFile.js index 82fdbae8c..7213f46b5 100644 --- a/src/loader/filetypes/AnimationJSONFile.js +++ b/src/loader/filetypes/AnimationJSONFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/AtlasJSONFile.js b/src/loader/filetypes/AtlasJSONFile.js index b0bc645bc..b7227d867 100644 --- a/src/loader/filetypes/AtlasJSONFile.js +++ b/src/loader/filetypes/AtlasJSONFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/AtlasXMLFile.js b/src/loader/filetypes/AtlasXMLFile.js index 27ca6d551..4572e5a10 100644 --- a/src/loader/filetypes/AtlasXMLFile.js +++ b/src/loader/filetypes/AtlasXMLFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/AudioFile.js b/src/loader/filetypes/AudioFile.js index 303004a92..e023715f8 100644 --- a/src/loader/filetypes/AudioFile.js +++ b/src/loader/filetypes/AudioFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/AudioSpriteFile.js b/src/loader/filetypes/AudioSpriteFile.js index da9b47c1b..456fa2f03 100644 --- a/src/loader/filetypes/AudioSpriteFile.js +++ b/src/loader/filetypes/AudioSpriteFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/BinaryFile.js b/src/loader/filetypes/BinaryFile.js index 878ceecc9..d36b39629 100644 --- a/src/loader/filetypes/BinaryFile.js +++ b/src/loader/filetypes/BinaryFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/BitmapFontFile.js b/src/loader/filetypes/BitmapFontFile.js index b9806237c..4b8cbdbc5 100644 --- a/src/loader/filetypes/BitmapFontFile.js +++ b/src/loader/filetypes/BitmapFontFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/CSSFile.js b/src/loader/filetypes/CSSFile.js index 2e51dc455..919d247f1 100644 --- a/src/loader/filetypes/CSSFile.js +++ b/src/loader/filetypes/CSSFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/GLSLFile.js b/src/loader/filetypes/GLSLFile.js index 2df9e36da..7789e6e8e 100644 --- a/src/loader/filetypes/GLSLFile.js +++ b/src/loader/filetypes/GLSLFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/HTML5AudioFile.js b/src/loader/filetypes/HTML5AudioFile.js index 0c8344215..21ed6c941 100644 --- a/src/loader/filetypes/HTML5AudioFile.js +++ b/src/loader/filetypes/HTML5AudioFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/HTMLFile.js b/src/loader/filetypes/HTMLFile.js index 15653e605..c88b97f04 100644 --- a/src/loader/filetypes/HTMLFile.js +++ b/src/loader/filetypes/HTMLFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/HTMLTextureFile.js b/src/loader/filetypes/HTMLTextureFile.js index b9825ff60..9c9b81298 100644 --- a/src/loader/filetypes/HTMLTextureFile.js +++ b/src/loader/filetypes/HTMLTextureFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/ImageFile.js b/src/loader/filetypes/ImageFile.js index 3b028b47b..460f0cb71 100644 --- a/src/loader/filetypes/ImageFile.js +++ b/src/loader/filetypes/ImageFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/JSONFile.js b/src/loader/filetypes/JSONFile.js index 62573978f..39f22b46d 100644 --- a/src/loader/filetypes/JSONFile.js +++ b/src/loader/filetypes/JSONFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/MultiAtlasFile.js b/src/loader/filetypes/MultiAtlasFile.js index f8e1cbac3..46d21e08c 100644 --- a/src/loader/filetypes/MultiAtlasFile.js +++ b/src/loader/filetypes/MultiAtlasFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/MultiScriptFile.js b/src/loader/filetypes/MultiScriptFile.js index 41be48866..c61d908c1 100644 --- a/src/loader/filetypes/MultiScriptFile.js +++ b/src/loader/filetypes/MultiScriptFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/PackFile.js b/src/loader/filetypes/PackFile.js index 3ac9ee593..2aa1d0366 100644 --- a/src/loader/filetypes/PackFile.js +++ b/src/loader/filetypes/PackFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/PluginFile.js b/src/loader/filetypes/PluginFile.js index 455a92853..4a7f13261 100644 --- a/src/loader/filetypes/PluginFile.js +++ b/src/loader/filetypes/PluginFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/SVGFile.js b/src/loader/filetypes/SVGFile.js index 527c7cbb9..5e08f74f0 100644 --- a/src/loader/filetypes/SVGFile.js +++ b/src/loader/filetypes/SVGFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/SceneFile.js b/src/loader/filetypes/SceneFile.js index 34a55341c..c10ba960e 100644 --- a/src/loader/filetypes/SceneFile.js +++ b/src/loader/filetypes/SceneFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/ScenePluginFile.js b/src/loader/filetypes/ScenePluginFile.js index 798a44f02..5e6edf40a 100644 --- a/src/loader/filetypes/ScenePluginFile.js +++ b/src/loader/filetypes/ScenePluginFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/ScriptFile.js b/src/loader/filetypes/ScriptFile.js index cdf88f4cb..726f1d33d 100644 --- a/src/loader/filetypes/ScriptFile.js +++ b/src/loader/filetypes/ScriptFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/SpriteSheetFile.js b/src/loader/filetypes/SpriteSheetFile.js index af515ac49..31bd204b6 100644 --- a/src/loader/filetypes/SpriteSheetFile.js +++ b/src/loader/filetypes/SpriteSheetFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/TextFile.js b/src/loader/filetypes/TextFile.js index 3bc1aab6f..123165c02 100644 --- a/src/loader/filetypes/TextFile.js +++ b/src/loader/filetypes/TextFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/TilemapCSVFile.js b/src/loader/filetypes/TilemapCSVFile.js index ba04c6307..65a008aec 100644 --- a/src/loader/filetypes/TilemapCSVFile.js +++ b/src/loader/filetypes/TilemapCSVFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/TilemapImpactFile.js b/src/loader/filetypes/TilemapImpactFile.js index 5ac53873e..da4c7cc42 100644 --- a/src/loader/filetypes/TilemapImpactFile.js +++ b/src/loader/filetypes/TilemapImpactFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/TilemapJSONFile.js b/src/loader/filetypes/TilemapJSONFile.js index ca3f4f836..f8a6b74ce 100644 --- a/src/loader/filetypes/TilemapJSONFile.js +++ b/src/loader/filetypes/TilemapJSONFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/UnityAtlasFile.js b/src/loader/filetypes/UnityAtlasFile.js index 7a62f8085..8412be05d 100644 --- a/src/loader/filetypes/UnityAtlasFile.js +++ b/src/loader/filetypes/UnityAtlasFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/VideoFile.js b/src/loader/filetypes/VideoFile.js index 107743ff2..a014192da 100644 --- a/src/loader/filetypes/VideoFile.js +++ b/src/loader/filetypes/VideoFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/XMLFile.js b/src/loader/filetypes/XMLFile.js index 7d1ccc32e..31484ceab 100644 --- a/src/loader/filetypes/XMLFile.js +++ b/src/loader/filetypes/XMLFile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/index.js b/src/loader/filetypes/index.js index 932d58a4e..0dcd88de1 100644 --- a/src/loader/filetypes/index.js +++ b/src/loader/filetypes/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/filetypes/typedefs/index.js b/src/loader/filetypes/typedefs/index.js index ddcef6132..9993b8210 100644 --- a/src/loader/filetypes/typedefs/index.js +++ b/src/loader/filetypes/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/index.js b/src/loader/index.js index 880561bb8..d1c83460e 100644 --- a/src/loader/index.js +++ b/src/loader/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/loader/typedefs/index.js b/src/loader/typedefs/index.js index 43e1ddec3..5c58ffa11 100644 --- a/src/loader/typedefs/index.js +++ b/src/loader/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/Average.js b/src/math/Average.js index 36665d575..d846323bf 100644 --- a/src/math/Average.js +++ b/src/math/Average.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/Bernstein.js b/src/math/Bernstein.js index f5aca84d4..8cbf7d874 100644 --- a/src/math/Bernstein.js +++ b/src/math/Bernstein.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/Between.js b/src/math/Between.js index 8a222c078..bd4101f99 100644 --- a/src/math/Between.js +++ b/src/math/Between.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/CatmullRom.js b/src/math/CatmullRom.js index 1734ddb5c..23e850e61 100644 --- a/src/math/CatmullRom.js +++ b/src/math/CatmullRom.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/CeilTo.js b/src/math/CeilTo.js index c5b667907..675875923 100644 --- a/src/math/CeilTo.js +++ b/src/math/CeilTo.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/Clamp.js b/src/math/Clamp.js index 216b33b13..4f3a6e848 100644 --- a/src/math/Clamp.js +++ b/src/math/Clamp.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/DegToRad.js b/src/math/DegToRad.js index be38e1a8a..5fd989c20 100644 --- a/src/math/DegToRad.js +++ b/src/math/DegToRad.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/Difference.js b/src/math/Difference.js index feebc8409..41a5a83c1 100644 --- a/src/math/Difference.js +++ b/src/math/Difference.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/Factorial.js b/src/math/Factorial.js index 31bc12dbb..61f38bcef 100644 --- a/src/math/Factorial.js +++ b/src/math/Factorial.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/FloatBetween.js b/src/math/FloatBetween.js index bbaefabd3..86a406978 100644 --- a/src/math/FloatBetween.js +++ b/src/math/FloatBetween.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/FloorTo.js b/src/math/FloorTo.js index b8742c888..15ad4a8a7 100644 --- a/src/math/FloorTo.js +++ b/src/math/FloorTo.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/FromPercent.js b/src/math/FromPercent.js index b5f2bd862..8fb150514 100644 --- a/src/math/FromPercent.js +++ b/src/math/FromPercent.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/GetSpeed.js b/src/math/GetSpeed.js index e8e92eec0..0c21b7e48 100644 --- a/src/math/GetSpeed.js +++ b/src/math/GetSpeed.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/IsEven.js b/src/math/IsEven.js index 72a2909fb..736bdba22 100644 --- a/src/math/IsEven.js +++ b/src/math/IsEven.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/IsEvenStrict.js b/src/math/IsEvenStrict.js index 524658685..d7003c87d 100644 --- a/src/math/IsEvenStrict.js +++ b/src/math/IsEvenStrict.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/Linear.js b/src/math/Linear.js index ac3873a54..f7c242004 100644 --- a/src/math/Linear.js +++ b/src/math/Linear.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/Matrix3.js b/src/math/Matrix3.js index d91f6b223..2ef79d9bf 100644 --- a/src/math/Matrix3.js +++ b/src/math/Matrix3.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/Matrix4.js b/src/math/Matrix4.js index 4e38a22a2..066e83403 100644 --- a/src/math/Matrix4.js +++ b/src/math/Matrix4.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/MaxAdd.js b/src/math/MaxAdd.js index 77fd89b4f..512d43d60 100644 --- a/src/math/MaxAdd.js +++ b/src/math/MaxAdd.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/MinSub.js b/src/math/MinSub.js index a6a0427ff..5eb3bbf64 100644 --- a/src/math/MinSub.js +++ b/src/math/MinSub.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/Percent.js b/src/math/Percent.js index c54b6d735..94296e289 100644 --- a/src/math/Percent.js +++ b/src/math/Percent.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/Quaternion.js b/src/math/Quaternion.js index eaccb2ebb..6da0fa259 100644 --- a/src/math/Quaternion.js +++ b/src/math/Quaternion.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/RadToDeg.js b/src/math/RadToDeg.js index cf52bd845..18674cd0b 100644 --- a/src/math/RadToDeg.js +++ b/src/math/RadToDeg.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/RandomXY.js b/src/math/RandomXY.js index 4815d0ba7..7b9d0c12f 100644 --- a/src/math/RandomXY.js +++ b/src/math/RandomXY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/RandomXYZ.js b/src/math/RandomXYZ.js index e885cda1b..1f28ab787 100644 --- a/src/math/RandomXYZ.js +++ b/src/math/RandomXYZ.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/RandomXYZW.js b/src/math/RandomXYZW.js index 9576dafb4..4a59fe19b 100644 --- a/src/math/RandomXYZW.js +++ b/src/math/RandomXYZW.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/Rotate.js b/src/math/Rotate.js index 41e6c93f4..09876dd16 100644 --- a/src/math/Rotate.js +++ b/src/math/Rotate.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/RotateAround.js b/src/math/RotateAround.js index e3f78ecdd..7874d5608 100644 --- a/src/math/RotateAround.js +++ b/src/math/RotateAround.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/RotateAroundDistance.js b/src/math/RotateAroundDistance.js index d37754422..81fc2266b 100644 --- a/src/math/RotateAroundDistance.js +++ b/src/math/RotateAroundDistance.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/RotateVec3.js b/src/math/RotateVec3.js index 5750955aa..bcc4005d3 100644 --- a/src/math/RotateVec3.js +++ b/src/math/RotateVec3.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/RoundAwayFromZero.js b/src/math/RoundAwayFromZero.js index 9c7e65b62..ab67ccf0b 100644 --- a/src/math/RoundAwayFromZero.js +++ b/src/math/RoundAwayFromZero.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/RoundTo.js b/src/math/RoundTo.js index 159ddac81..eff8f4a2f 100644 --- a/src/math/RoundTo.js +++ b/src/math/RoundTo.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/SinCosTableGenerator.js b/src/math/SinCosTableGenerator.js index 7f683559d..319c0c72d 100644 --- a/src/math/SinCosTableGenerator.js +++ b/src/math/SinCosTableGenerator.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/SmoothStep.js b/src/math/SmoothStep.js index 15873c3d7..666982fa9 100644 --- a/src/math/SmoothStep.js +++ b/src/math/SmoothStep.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/SmootherStep.js b/src/math/SmootherStep.js index f978e9a3c..5a642eb5f 100644 --- a/src/math/SmootherStep.js +++ b/src/math/SmootherStep.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/ToXY.js b/src/math/ToXY.js index d22205527..be5a67cca 100644 --- a/src/math/ToXY.js +++ b/src/math/ToXY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/TransformXY.js b/src/math/TransformXY.js index c312966b7..bfe7ea7f1 100644 --- a/src/math/TransformXY.js +++ b/src/math/TransformXY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/Vector2.js b/src/math/Vector2.js index 5a77fdb1c..d254fa151 100644 --- a/src/math/Vector2.js +++ b/src/math/Vector2.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/Vector3.js b/src/math/Vector3.js index d2461fe57..f22b37155 100644 --- a/src/math/Vector3.js +++ b/src/math/Vector3.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/Vector4.js b/src/math/Vector4.js index 16eb468b2..5fba6bce7 100644 --- a/src/math/Vector4.js +++ b/src/math/Vector4.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/Within.js b/src/math/Within.js index 13b985ac1..00d8fa959 100644 --- a/src/math/Within.js +++ b/src/math/Within.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/Wrap.js b/src/math/Wrap.js index ed2d85886..7bf6a2d8d 100644 --- a/src/math/Wrap.js +++ b/src/math/Wrap.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/angle/Between.js b/src/math/angle/Between.js index 0bc7b72dc..e8d8f8cd0 100644 --- a/src/math/angle/Between.js +++ b/src/math/angle/Between.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/angle/BetweenPoints.js b/src/math/angle/BetweenPoints.js index e8aeca982..e5ecfa45d 100644 --- a/src/math/angle/BetweenPoints.js +++ b/src/math/angle/BetweenPoints.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/angle/BetweenPointsY.js b/src/math/angle/BetweenPointsY.js index 89778227c..ed25a53dc 100644 --- a/src/math/angle/BetweenPointsY.js +++ b/src/math/angle/BetweenPointsY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/angle/BetweenY.js b/src/math/angle/BetweenY.js index 83accd911..997c632fb 100644 --- a/src/math/angle/BetweenY.js +++ b/src/math/angle/BetweenY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/angle/CounterClockwise.js b/src/math/angle/CounterClockwise.js index ce9f6bb2a..3d20c3ad3 100644 --- a/src/math/angle/CounterClockwise.js +++ b/src/math/angle/CounterClockwise.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/angle/Normalize.js b/src/math/angle/Normalize.js index 0b2815a8f..495243f2e 100644 --- a/src/math/angle/Normalize.js +++ b/src/math/angle/Normalize.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/angle/Reverse.js b/src/math/angle/Reverse.js index 8d14b4d3a..6d0aa73e9 100644 --- a/src/math/angle/Reverse.js +++ b/src/math/angle/Reverse.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/angle/RotateTo.js b/src/math/angle/RotateTo.js index c001cc09f..43f5aaf0e 100644 --- a/src/math/angle/RotateTo.js +++ b/src/math/angle/RotateTo.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/angle/ShortestBetween.js b/src/math/angle/ShortestBetween.js index bccba73ec..78f14e62e 100644 --- a/src/math/angle/ShortestBetween.js +++ b/src/math/angle/ShortestBetween.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/angle/Wrap.js b/src/math/angle/Wrap.js index ce2e98346..c4accbcb6 100644 --- a/src/math/angle/Wrap.js +++ b/src/math/angle/Wrap.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/angle/WrapDegrees.js b/src/math/angle/WrapDegrees.js index f109c8f65..3e5784914 100644 --- a/src/math/angle/WrapDegrees.js +++ b/src/math/angle/WrapDegrees.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/angle/index.js b/src/math/angle/index.js index 54a9eada2..5ff8d9e53 100644 --- a/src/math/angle/index.js +++ b/src/math/angle/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/const.js b/src/math/const.js index 894ff455f..e1824cdef 100644 --- a/src/math/const.js +++ b/src/math/const.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/distance/DistanceBetween.js b/src/math/distance/DistanceBetween.js index 9fda89342..a82ea25b5 100644 --- a/src/math/distance/DistanceBetween.js +++ b/src/math/distance/DistanceBetween.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/distance/DistanceBetweenPoints.js b/src/math/distance/DistanceBetweenPoints.js index 3eb866350..93fe82d37 100644 --- a/src/math/distance/DistanceBetweenPoints.js +++ b/src/math/distance/DistanceBetweenPoints.js @@ -1,6 +1,6 @@ /** * @author samme - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/distance/DistanceBetweenPointsSquared.js b/src/math/distance/DistanceBetweenPointsSquared.js index 8c6526fc8..bea07156f 100644 --- a/src/math/distance/DistanceBetweenPointsSquared.js +++ b/src/math/distance/DistanceBetweenPointsSquared.js @@ -1,6 +1,6 @@ /** * @author samme - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/distance/DistanceChebyshev.js b/src/math/distance/DistanceChebyshev.js index 5d70129ff..6952fb4f4 100644 --- a/src/math/distance/DistanceChebyshev.js +++ b/src/math/distance/DistanceChebyshev.js @@ -1,6 +1,6 @@ /** * @author samme - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/distance/DistancePower.js b/src/math/distance/DistancePower.js index a179e6026..892497aac 100644 --- a/src/math/distance/DistancePower.js +++ b/src/math/distance/DistancePower.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/distance/DistanceSnake.js b/src/math/distance/DistanceSnake.js index 538dcc039..b5235174e 100644 --- a/src/math/distance/DistanceSnake.js +++ b/src/math/distance/DistanceSnake.js @@ -1,6 +1,6 @@ /** * @author samme - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/distance/DistanceSquared.js b/src/math/distance/DistanceSquared.js index 01414ee9a..28ff22733 100644 --- a/src/math/distance/DistanceSquared.js +++ b/src/math/distance/DistanceSquared.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/distance/index.js b/src/math/distance/index.js index c23baa313..432dc569d 100644 --- a/src/math/distance/index.js +++ b/src/math/distance/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/EaseMap.js b/src/math/easing/EaseMap.js index f6cfd1782..a7f742395 100644 --- a/src/math/easing/EaseMap.js +++ b/src/math/easing/EaseMap.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/back/In.js b/src/math/easing/back/In.js index 0a668803d..ed96041d7 100644 --- a/src/math/easing/back/In.js +++ b/src/math/easing/back/In.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/back/InOut.js b/src/math/easing/back/InOut.js index 8ced13b08..ccbdbc364 100644 --- a/src/math/easing/back/InOut.js +++ b/src/math/easing/back/InOut.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/back/Out.js b/src/math/easing/back/Out.js index da82f3c88..e5cb02cff 100644 --- a/src/math/easing/back/Out.js +++ b/src/math/easing/back/Out.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/back/index.js b/src/math/easing/back/index.js index c6a4cba06..1a743967d 100644 --- a/src/math/easing/back/index.js +++ b/src/math/easing/back/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/bounce/In.js b/src/math/easing/bounce/In.js index 773876adf..7285451cf 100644 --- a/src/math/easing/bounce/In.js +++ b/src/math/easing/bounce/In.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/bounce/InOut.js b/src/math/easing/bounce/InOut.js index 1db66bf86..eb995b160 100644 --- a/src/math/easing/bounce/InOut.js +++ b/src/math/easing/bounce/InOut.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/bounce/Out.js b/src/math/easing/bounce/Out.js index b6551dc9b..2b6fc9cbe 100644 --- a/src/math/easing/bounce/Out.js +++ b/src/math/easing/bounce/Out.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/bounce/index.js b/src/math/easing/bounce/index.js index 86fdae1a5..7df070ae3 100644 --- a/src/math/easing/bounce/index.js +++ b/src/math/easing/bounce/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/circular/In.js b/src/math/easing/circular/In.js index 9e5d217f3..d3fab741a 100644 --- a/src/math/easing/circular/In.js +++ b/src/math/easing/circular/In.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/circular/InOut.js b/src/math/easing/circular/InOut.js index 288e9cced..1db2492e7 100644 --- a/src/math/easing/circular/InOut.js +++ b/src/math/easing/circular/InOut.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/circular/Out.js b/src/math/easing/circular/Out.js index 04772dbc8..d95dedfe1 100644 --- a/src/math/easing/circular/Out.js +++ b/src/math/easing/circular/Out.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/circular/index.js b/src/math/easing/circular/index.js index 01f490bc7..d7bbc72f6 100644 --- a/src/math/easing/circular/index.js +++ b/src/math/easing/circular/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/cubic/In.js b/src/math/easing/cubic/In.js index 80ca09c0b..ebefde8c2 100644 --- a/src/math/easing/cubic/In.js +++ b/src/math/easing/cubic/In.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/cubic/InOut.js b/src/math/easing/cubic/InOut.js index 4b30e001b..85ccf3de0 100644 --- a/src/math/easing/cubic/InOut.js +++ b/src/math/easing/cubic/InOut.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/cubic/Out.js b/src/math/easing/cubic/Out.js index baa950729..621e100e5 100644 --- a/src/math/easing/cubic/Out.js +++ b/src/math/easing/cubic/Out.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/cubic/index.js b/src/math/easing/cubic/index.js index d05c1a490..441b7fe46 100644 --- a/src/math/easing/cubic/index.js +++ b/src/math/easing/cubic/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/elastic/In.js b/src/math/easing/elastic/In.js index 8d71afcee..c4c125810 100644 --- a/src/math/easing/elastic/In.js +++ b/src/math/easing/elastic/In.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/elastic/InOut.js b/src/math/easing/elastic/InOut.js index 34542bfa0..01e410d08 100644 --- a/src/math/easing/elastic/InOut.js +++ b/src/math/easing/elastic/InOut.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/elastic/Out.js b/src/math/easing/elastic/Out.js index 681b8ecb4..4d22b0234 100644 --- a/src/math/easing/elastic/Out.js +++ b/src/math/easing/elastic/Out.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/elastic/index.js b/src/math/easing/elastic/index.js index 8f5355a16..30bbe34d5 100644 --- a/src/math/easing/elastic/index.js +++ b/src/math/easing/elastic/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/expo/In.js b/src/math/easing/expo/In.js index 4d99821b5..cfad035e5 100644 --- a/src/math/easing/expo/In.js +++ b/src/math/easing/expo/In.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/expo/InOut.js b/src/math/easing/expo/InOut.js index bd6b05840..21f58960a 100644 --- a/src/math/easing/expo/InOut.js +++ b/src/math/easing/expo/InOut.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/expo/Out.js b/src/math/easing/expo/Out.js index 58c5e9b94..8915b0088 100644 --- a/src/math/easing/expo/Out.js +++ b/src/math/easing/expo/Out.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/expo/index.js b/src/math/easing/expo/index.js index 6cbcf3988..00bf463a1 100644 --- a/src/math/easing/expo/index.js +++ b/src/math/easing/expo/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/index.js b/src/math/easing/index.js index 3ea7fc017..d75d9f942 100644 --- a/src/math/easing/index.js +++ b/src/math/easing/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/linear/Linear.js b/src/math/easing/linear/Linear.js index e166f0c89..939f63997 100644 --- a/src/math/easing/linear/Linear.js +++ b/src/math/easing/linear/Linear.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/linear/index.js b/src/math/easing/linear/index.js index df2eb13e1..776bc03a2 100644 --- a/src/math/easing/linear/index.js +++ b/src/math/easing/linear/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/quadratic/In.js b/src/math/easing/quadratic/In.js index 2315443fc..49de22428 100644 --- a/src/math/easing/quadratic/In.js +++ b/src/math/easing/quadratic/In.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/quadratic/InOut.js b/src/math/easing/quadratic/InOut.js index 0f08b7494..1971f2d5c 100644 --- a/src/math/easing/quadratic/InOut.js +++ b/src/math/easing/quadratic/InOut.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/quadratic/Out.js b/src/math/easing/quadratic/Out.js index e9606dd8c..ac17bc135 100644 --- a/src/math/easing/quadratic/Out.js +++ b/src/math/easing/quadratic/Out.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/quadratic/index.js b/src/math/easing/quadratic/index.js index 963e14e78..7474a5b25 100644 --- a/src/math/easing/quadratic/index.js +++ b/src/math/easing/quadratic/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/quartic/In.js b/src/math/easing/quartic/In.js index 1dc3fd867..84eaae530 100644 --- a/src/math/easing/quartic/In.js +++ b/src/math/easing/quartic/In.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/quartic/InOut.js b/src/math/easing/quartic/InOut.js index 6f6063ade..607228040 100644 --- a/src/math/easing/quartic/InOut.js +++ b/src/math/easing/quartic/InOut.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/quartic/Out.js b/src/math/easing/quartic/Out.js index ada982b98..5693179ab 100644 --- a/src/math/easing/quartic/Out.js +++ b/src/math/easing/quartic/Out.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/quartic/index.js b/src/math/easing/quartic/index.js index 55ab3418b..5550895b4 100644 --- a/src/math/easing/quartic/index.js +++ b/src/math/easing/quartic/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/quintic/In.js b/src/math/easing/quintic/In.js index 4d84fea35..23ad6ae6c 100644 --- a/src/math/easing/quintic/In.js +++ b/src/math/easing/quintic/In.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/quintic/InOut.js b/src/math/easing/quintic/InOut.js index b3140779f..2c6daf11b 100644 --- a/src/math/easing/quintic/InOut.js +++ b/src/math/easing/quintic/InOut.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/quintic/Out.js b/src/math/easing/quintic/Out.js index 79177d664..03b37c99f 100644 --- a/src/math/easing/quintic/Out.js +++ b/src/math/easing/quintic/Out.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/quintic/index.js b/src/math/easing/quintic/index.js index 3b8854448..24a0d4c75 100644 --- a/src/math/easing/quintic/index.js +++ b/src/math/easing/quintic/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/sine/In.js b/src/math/easing/sine/In.js index 9d0512ad9..4e5cf8392 100644 --- a/src/math/easing/sine/In.js +++ b/src/math/easing/sine/In.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/sine/InOut.js b/src/math/easing/sine/InOut.js index 73b12f0fa..d265e6406 100644 --- a/src/math/easing/sine/InOut.js +++ b/src/math/easing/sine/InOut.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/sine/Out.js b/src/math/easing/sine/Out.js index ae4c9e504..4b61be5a8 100644 --- a/src/math/easing/sine/Out.js +++ b/src/math/easing/sine/Out.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/sine/index.js b/src/math/easing/sine/index.js index fa1aa2604..fe563be57 100644 --- a/src/math/easing/sine/index.js +++ b/src/math/easing/sine/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/stepped/Stepped.js b/src/math/easing/stepped/Stepped.js index b9aca0835..1004d3a13 100644 --- a/src/math/easing/stepped/Stepped.js +++ b/src/math/easing/stepped/Stepped.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/easing/stepped/index.js b/src/math/easing/stepped/index.js index 249305af6..82bcdee2d 100644 --- a/src/math/easing/stepped/index.js +++ b/src/math/easing/stepped/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/fuzzy/Ceil.js b/src/math/fuzzy/Ceil.js index 1284eb719..f5a8e2863 100644 --- a/src/math/fuzzy/Ceil.js +++ b/src/math/fuzzy/Ceil.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/fuzzy/Equal.js b/src/math/fuzzy/Equal.js index 7bb2e8a24..919b18418 100644 --- a/src/math/fuzzy/Equal.js +++ b/src/math/fuzzy/Equal.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/fuzzy/Floor.js b/src/math/fuzzy/Floor.js index 972f6eca4..4f0138b1c 100644 --- a/src/math/fuzzy/Floor.js +++ b/src/math/fuzzy/Floor.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/fuzzy/GreaterThan.js b/src/math/fuzzy/GreaterThan.js index 144534603..459b2b283 100644 --- a/src/math/fuzzy/GreaterThan.js +++ b/src/math/fuzzy/GreaterThan.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/fuzzy/LessThan.js b/src/math/fuzzy/LessThan.js index b62d7b3eb..24e6c8ff8 100644 --- a/src/math/fuzzy/LessThan.js +++ b/src/math/fuzzy/LessThan.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/fuzzy/index.js b/src/math/fuzzy/index.js index b34f8d65e..a7be5b777 100644 --- a/src/math/fuzzy/index.js +++ b/src/math/fuzzy/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/index.js b/src/math/index.js index 9625f4971..11a3b1350 100644 --- a/src/math/index.js +++ b/src/math/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/interpolation/BezierInterpolation.js b/src/math/interpolation/BezierInterpolation.js index 9cc4526ee..48a6d9ac0 100644 --- a/src/math/interpolation/BezierInterpolation.js +++ b/src/math/interpolation/BezierInterpolation.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/interpolation/CatmullRomInterpolation.js b/src/math/interpolation/CatmullRomInterpolation.js index 3f167a678..f95a9a9d7 100644 --- a/src/math/interpolation/CatmullRomInterpolation.js +++ b/src/math/interpolation/CatmullRomInterpolation.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/interpolation/CubicBezierInterpolation.js b/src/math/interpolation/CubicBezierInterpolation.js index b1c6dae24..97f715c11 100644 --- a/src/math/interpolation/CubicBezierInterpolation.js +++ b/src/math/interpolation/CubicBezierInterpolation.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/interpolation/LinearInterpolation.js b/src/math/interpolation/LinearInterpolation.js index 75e808500..ac1016e7c 100644 --- a/src/math/interpolation/LinearInterpolation.js +++ b/src/math/interpolation/LinearInterpolation.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/interpolation/QuadraticBezierInterpolation.js b/src/math/interpolation/QuadraticBezierInterpolation.js index f35607948..5df3be18f 100644 --- a/src/math/interpolation/QuadraticBezierInterpolation.js +++ b/src/math/interpolation/QuadraticBezierInterpolation.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/interpolation/SmoothStepInterpolation.js b/src/math/interpolation/SmoothStepInterpolation.js index 79988cea2..832c9543b 100644 --- a/src/math/interpolation/SmoothStepInterpolation.js +++ b/src/math/interpolation/SmoothStepInterpolation.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/interpolation/SmootherStepInterpolation.js b/src/math/interpolation/SmootherStepInterpolation.js index 037852ff4..a4aede0ed 100644 --- a/src/math/interpolation/SmootherStepInterpolation.js +++ b/src/math/interpolation/SmootherStepInterpolation.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/interpolation/index.js b/src/math/interpolation/index.js index 92f277f7f..c073729f0 100644 --- a/src/math/interpolation/index.js +++ b/src/math/interpolation/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/pow2/GetPowerOfTwo.js b/src/math/pow2/GetPowerOfTwo.js index 60cb4d2d6..5d581d7cc 100644 --- a/src/math/pow2/GetPowerOfTwo.js +++ b/src/math/pow2/GetPowerOfTwo.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/pow2/IsSizePowerOfTwo.js b/src/math/pow2/IsSizePowerOfTwo.js index f8321dce4..2d280967d 100644 --- a/src/math/pow2/IsSizePowerOfTwo.js +++ b/src/math/pow2/IsSizePowerOfTwo.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/pow2/IsValuePowerOfTwo.js b/src/math/pow2/IsValuePowerOfTwo.js index 7cfefe157..40ab861fd 100644 --- a/src/math/pow2/IsValuePowerOfTwo.js +++ b/src/math/pow2/IsValuePowerOfTwo.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/pow2/index.js b/src/math/pow2/index.js index 09ba3e499..8eccd11c4 100644 --- a/src/math/pow2/index.js +++ b/src/math/pow2/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/random-data-generator/RandomDataGenerator.js b/src/math/random-data-generator/RandomDataGenerator.js index d9f56294d..a0fffd2bf 100644 --- a/src/math/random-data-generator/RandomDataGenerator.js +++ b/src/math/random-data-generator/RandomDataGenerator.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/snap/SnapCeil.js b/src/math/snap/SnapCeil.js index 66b75ef8c..61f984ed9 100644 --- a/src/math/snap/SnapCeil.js +++ b/src/math/snap/SnapCeil.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/snap/SnapFloor.js b/src/math/snap/SnapFloor.js index fe1ce5e05..ab607a5c7 100644 --- a/src/math/snap/SnapFloor.js +++ b/src/math/snap/SnapFloor.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/snap/SnapTo.js b/src/math/snap/SnapTo.js index 929060267..d0de1dcf6 100644 --- a/src/math/snap/SnapTo.js +++ b/src/math/snap/SnapTo.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/snap/index.js b/src/math/snap/index.js index 140bbc52e..d793b9fdd 100644 --- a/src/math/snap/index.js +++ b/src/math/snap/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/math/typedefs/index.js b/src/math/typedefs/index.js index b954516e0..7800ca27d 100644 --- a/src/math/typedefs/index.js +++ b/src/math/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/phaser-arcade-physics.js b/src/phaser-arcade-physics.js index 08ce53fad..d33ebc11d 100644 --- a/src/phaser-arcade-physics.js +++ b/src/phaser-arcade-physics.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/phaser-core.js b/src/phaser-core.js index 1d548a36b..512d78118 100644 --- a/src/phaser-core.js +++ b/src/phaser-core.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/phaser.js b/src/phaser.js index 934ab9e70..e0635c19e 100644 --- a/src/phaser.js +++ b/src/phaser.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/ArcadeImage.js b/src/physics/arcade/ArcadeImage.js index 48549fc27..2bab27da0 100644 --- a/src/physics/arcade/ArcadeImage.js +++ b/src/physics/arcade/ArcadeImage.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/ArcadePhysics.js b/src/physics/arcade/ArcadePhysics.js index 326c38185..4c9bc8158 100644 --- a/src/physics/arcade/ArcadePhysics.js +++ b/src/physics/arcade/ArcadePhysics.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/ArcadeSprite.js b/src/physics/arcade/ArcadeSprite.js index 24262f7f1..5d579afee 100644 --- a/src/physics/arcade/ArcadeSprite.js +++ b/src/physics/arcade/ArcadeSprite.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/Body.js b/src/physics/arcade/Body.js index 3ca732eee..5291dfcc2 100644 --- a/src/physics/arcade/Body.js +++ b/src/physics/arcade/Body.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @author Benjamin D. Richards - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/Collider.js b/src/physics/arcade/Collider.js index 0915142dc..87cca7b84 100644 --- a/src/physics/arcade/Collider.js +++ b/src/physics/arcade/Collider.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/Factory.js b/src/physics/arcade/Factory.js index d521c968b..d972c0742 100644 --- a/src/physics/arcade/Factory.js +++ b/src/physics/arcade/Factory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/GetOverlapX.js b/src/physics/arcade/GetOverlapX.js index 31b7d988c..16de46997 100644 --- a/src/physics/arcade/GetOverlapX.js +++ b/src/physics/arcade/GetOverlapX.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/GetOverlapY.js b/src/physics/arcade/GetOverlapY.js index 6a2e28d39..a4112b76b 100644 --- a/src/physics/arcade/GetOverlapY.js +++ b/src/physics/arcade/GetOverlapY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/PhysicsGroup.js b/src/physics/arcade/PhysicsGroup.js index 01f9b8544..25c34f327 100644 --- a/src/physics/arcade/PhysicsGroup.js +++ b/src/physics/arcade/PhysicsGroup.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/SeparateX.js b/src/physics/arcade/SeparateX.js index c593f2744..35b7d2acf 100644 --- a/src/physics/arcade/SeparateX.js +++ b/src/physics/arcade/SeparateX.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/SeparateY.js b/src/physics/arcade/SeparateY.js index c5180aece..12b153715 100644 --- a/src/physics/arcade/SeparateY.js +++ b/src/physics/arcade/SeparateY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/StaticBody.js b/src/physics/arcade/StaticBody.js index f65b90e4b..dab4ef63b 100644 --- a/src/physics/arcade/StaticBody.js +++ b/src/physics/arcade/StaticBody.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/StaticPhysicsGroup.js b/src/physics/arcade/StaticPhysicsGroup.js index aad5c94c3..016f581ec 100644 --- a/src/physics/arcade/StaticPhysicsGroup.js +++ b/src/physics/arcade/StaticPhysicsGroup.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/World.js b/src/physics/arcade/World.js index 0185d3316..72766aa6f 100644 --- a/src/physics/arcade/World.js +++ b/src/physics/arcade/World.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/components/Acceleration.js b/src/physics/arcade/components/Acceleration.js index e8ae808d7..8cc2a2aeb 100644 --- a/src/physics/arcade/components/Acceleration.js +++ b/src/physics/arcade/components/Acceleration.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/components/Angular.js b/src/physics/arcade/components/Angular.js index 10db6dd37..0f502f387 100644 --- a/src/physics/arcade/components/Angular.js +++ b/src/physics/arcade/components/Angular.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/components/Bounce.js b/src/physics/arcade/components/Bounce.js index 904c8a1bd..f2d556694 100644 --- a/src/physics/arcade/components/Bounce.js +++ b/src/physics/arcade/components/Bounce.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/components/Debug.js b/src/physics/arcade/components/Debug.js index 9305686d9..dd3545ac4 100644 --- a/src/physics/arcade/components/Debug.js +++ b/src/physics/arcade/components/Debug.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/components/Drag.js b/src/physics/arcade/components/Drag.js index 727fee57c..441cc079a 100644 --- a/src/physics/arcade/components/Drag.js +++ b/src/physics/arcade/components/Drag.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/components/Enable.js b/src/physics/arcade/components/Enable.js index df57638da..16a10612b 100644 --- a/src/physics/arcade/components/Enable.js +++ b/src/physics/arcade/components/Enable.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/components/Friction.js b/src/physics/arcade/components/Friction.js index c18c2f02e..a89d68b8f 100644 --- a/src/physics/arcade/components/Friction.js +++ b/src/physics/arcade/components/Friction.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/components/Gravity.js b/src/physics/arcade/components/Gravity.js index 5a9f6b8a6..1f21858ec 100644 --- a/src/physics/arcade/components/Gravity.js +++ b/src/physics/arcade/components/Gravity.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/components/Immovable.js b/src/physics/arcade/components/Immovable.js index 02f0b6bc1..613e05309 100644 --- a/src/physics/arcade/components/Immovable.js +++ b/src/physics/arcade/components/Immovable.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/components/Mass.js b/src/physics/arcade/components/Mass.js index 7ec318e05..a56c7d596 100644 --- a/src/physics/arcade/components/Mass.js +++ b/src/physics/arcade/components/Mass.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/components/Size.js b/src/physics/arcade/components/Size.js index cfbcc9c42..ca000e8a3 100644 --- a/src/physics/arcade/components/Size.js +++ b/src/physics/arcade/components/Size.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/components/Velocity.js b/src/physics/arcade/components/Velocity.js index 03d52e16b..2e78ffedf 100644 --- a/src/physics/arcade/components/Velocity.js +++ b/src/physics/arcade/components/Velocity.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/components/index.js b/src/physics/arcade/components/index.js index 1b0367c68..e6123aa88 100644 --- a/src/physics/arcade/components/index.js +++ b/src/physics/arcade/components/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/const.js b/src/physics/arcade/const.js index 1f330ea12..a80a5f1b9 100644 --- a/src/physics/arcade/const.js +++ b/src/physics/arcade/const.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/events/COLLIDE_EVENT.js b/src/physics/arcade/events/COLLIDE_EVENT.js index 4f057780f..fc1b14c32 100644 --- a/src/physics/arcade/events/COLLIDE_EVENT.js +++ b/src/physics/arcade/events/COLLIDE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/events/OVERLAP_EVENT.js b/src/physics/arcade/events/OVERLAP_EVENT.js index 29fd2b67e..ec42658ba 100644 --- a/src/physics/arcade/events/OVERLAP_EVENT.js +++ b/src/physics/arcade/events/OVERLAP_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/events/PAUSE_EVENT.js b/src/physics/arcade/events/PAUSE_EVENT.js index ade79c6c1..71db1e140 100644 --- a/src/physics/arcade/events/PAUSE_EVENT.js +++ b/src/physics/arcade/events/PAUSE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/events/RESUME_EVENT.js b/src/physics/arcade/events/RESUME_EVENT.js index 0e220c439..b12f0a977 100644 --- a/src/physics/arcade/events/RESUME_EVENT.js +++ b/src/physics/arcade/events/RESUME_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/events/TILE_COLLIDE_EVENT.js b/src/physics/arcade/events/TILE_COLLIDE_EVENT.js index 971375095..1e948b827 100644 --- a/src/physics/arcade/events/TILE_COLLIDE_EVENT.js +++ b/src/physics/arcade/events/TILE_COLLIDE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/events/TILE_OVERLAP_EVENT.js b/src/physics/arcade/events/TILE_OVERLAP_EVENT.js index 05e0b2a3b..64fcbd82b 100644 --- a/src/physics/arcade/events/TILE_OVERLAP_EVENT.js +++ b/src/physics/arcade/events/TILE_OVERLAP_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/events/WORLD_BOUNDS_EVENT.js b/src/physics/arcade/events/WORLD_BOUNDS_EVENT.js index 8c2652845..b2f4ba019 100644 --- a/src/physics/arcade/events/WORLD_BOUNDS_EVENT.js +++ b/src/physics/arcade/events/WORLD_BOUNDS_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/events/WORLD_STEP_EVENT.js b/src/physics/arcade/events/WORLD_STEP_EVENT.js index e9191048d..dc404d7a6 100644 --- a/src/physics/arcade/events/WORLD_STEP_EVENT.js +++ b/src/physics/arcade/events/WORLD_STEP_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/events/index.js b/src/physics/arcade/events/index.js index e724d2ca8..1150eaae8 100644 --- a/src/physics/arcade/events/index.js +++ b/src/physics/arcade/events/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/index.js b/src/physics/arcade/index.js index 95b030540..c6298153f 100644 --- a/src/physics/arcade/index.js +++ b/src/physics/arcade/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/tilemap/ProcessTileCallbacks.js b/src/physics/arcade/tilemap/ProcessTileCallbacks.js index a50769ac2..4f91076c9 100644 --- a/src/physics/arcade/tilemap/ProcessTileCallbacks.js +++ b/src/physics/arcade/tilemap/ProcessTileCallbacks.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/tilemap/ProcessTileSeparationX.js b/src/physics/arcade/tilemap/ProcessTileSeparationX.js index 51c38088f..a9a6b4250 100644 --- a/src/physics/arcade/tilemap/ProcessTileSeparationX.js +++ b/src/physics/arcade/tilemap/ProcessTileSeparationX.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/tilemap/ProcessTileSeparationY.js b/src/physics/arcade/tilemap/ProcessTileSeparationY.js index d79278c89..820d0922c 100644 --- a/src/physics/arcade/tilemap/ProcessTileSeparationY.js +++ b/src/physics/arcade/tilemap/ProcessTileSeparationY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/tilemap/SeparateTile.js b/src/physics/arcade/tilemap/SeparateTile.js index 778bf57be..e9bc03b7f 100644 --- a/src/physics/arcade/tilemap/SeparateTile.js +++ b/src/physics/arcade/tilemap/SeparateTile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/tilemap/TileCheckX.js b/src/physics/arcade/tilemap/TileCheckX.js index ae6a21f21..c6f65b793 100644 --- a/src/physics/arcade/tilemap/TileCheckX.js +++ b/src/physics/arcade/tilemap/TileCheckX.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/tilemap/TileCheckY.js b/src/physics/arcade/tilemap/TileCheckY.js index 0f9d88768..5129a646c 100644 --- a/src/physics/arcade/tilemap/TileCheckY.js +++ b/src/physics/arcade/tilemap/TileCheckY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/tilemap/TileIntersectsBody.js b/src/physics/arcade/tilemap/TileIntersectsBody.js index 894d2e7a9..9fbd2ba2f 100644 --- a/src/physics/arcade/tilemap/TileIntersectsBody.js +++ b/src/physics/arcade/tilemap/TileIntersectsBody.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/arcade/typedefs/index.js b/src/physics/arcade/typedefs/index.js index 07020cfa6..10e9c7e8b 100644 --- a/src/physics/arcade/typedefs/index.js +++ b/src/physics/arcade/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/Body.js b/src/physics/impact/Body.js index 2aa1a3e1b..d4e51c002 100644 --- a/src/physics/impact/Body.js +++ b/src/physics/impact/Body.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/COLLIDES.js b/src/physics/impact/COLLIDES.js index 2120811ac..c454a69d5 100644 --- a/src/physics/impact/COLLIDES.js +++ b/src/physics/impact/COLLIDES.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/CollisionMap.js b/src/physics/impact/CollisionMap.js index 76862ea08..c3e221835 100644 --- a/src/physics/impact/CollisionMap.js +++ b/src/physics/impact/CollisionMap.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/DefaultDefs.js b/src/physics/impact/DefaultDefs.js index 113725298..0a7392307 100644 --- a/src/physics/impact/DefaultDefs.js +++ b/src/physics/impact/DefaultDefs.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/Factory.js b/src/physics/impact/Factory.js index 79ed52c17..ac8035a51 100644 --- a/src/physics/impact/Factory.js +++ b/src/physics/impact/Factory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/GetVelocity.js b/src/physics/impact/GetVelocity.js index fc2f1d389..30f8c0b15 100644 --- a/src/physics/impact/GetVelocity.js +++ b/src/physics/impact/GetVelocity.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/ImpactBody.js b/src/physics/impact/ImpactBody.js index fd638b867..c22c0d64a 100644 --- a/src/physics/impact/ImpactBody.js +++ b/src/physics/impact/ImpactBody.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/ImpactImage.js b/src/physics/impact/ImpactImage.js index 18b9c7de7..0f15a478c 100644 --- a/src/physics/impact/ImpactImage.js +++ b/src/physics/impact/ImpactImage.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/ImpactPhysics.js b/src/physics/impact/ImpactPhysics.js index 28a710eda..593ed9ed6 100644 --- a/src/physics/impact/ImpactPhysics.js +++ b/src/physics/impact/ImpactPhysics.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/ImpactSprite.js b/src/physics/impact/ImpactSprite.js index 8ee896ce2..aac3254e1 100644 --- a/src/physics/impact/ImpactSprite.js +++ b/src/physics/impact/ImpactSprite.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/SeparateX.js b/src/physics/impact/SeparateX.js index ab50114a5..06f88e6b0 100644 --- a/src/physics/impact/SeparateX.js +++ b/src/physics/impact/SeparateX.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/SeparateY.js b/src/physics/impact/SeparateY.js index e4243e7e9..d8f40ce13 100644 --- a/src/physics/impact/SeparateY.js +++ b/src/physics/impact/SeparateY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/Solver.js b/src/physics/impact/Solver.js index ac9dc5ede..9e10fd1b9 100644 --- a/src/physics/impact/Solver.js +++ b/src/physics/impact/Solver.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/TYPE.js b/src/physics/impact/TYPE.js index 14dc71ce6..1b3609cc3 100644 --- a/src/physics/impact/TYPE.js +++ b/src/physics/impact/TYPE.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/UpdateMotion.js b/src/physics/impact/UpdateMotion.js index 6e4249c51..c2241c2d0 100644 --- a/src/physics/impact/UpdateMotion.js +++ b/src/physics/impact/UpdateMotion.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/World.js b/src/physics/impact/World.js index f22cd9343..9acfba637 100644 --- a/src/physics/impact/World.js +++ b/src/physics/impact/World.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/components/Acceleration.js b/src/physics/impact/components/Acceleration.js index 9f0ba17bd..6ca198159 100644 --- a/src/physics/impact/components/Acceleration.js +++ b/src/physics/impact/components/Acceleration.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/components/BodyScale.js b/src/physics/impact/components/BodyScale.js index e8a42cceb..119849cbe 100644 --- a/src/physics/impact/components/BodyScale.js +++ b/src/physics/impact/components/BodyScale.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/components/BodyType.js b/src/physics/impact/components/BodyType.js index 2d0bb4dc5..efd4548da 100644 --- a/src/physics/impact/components/BodyType.js +++ b/src/physics/impact/components/BodyType.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/components/Bounce.js b/src/physics/impact/components/Bounce.js index d80fb129b..567f99c54 100644 --- a/src/physics/impact/components/Bounce.js +++ b/src/physics/impact/components/Bounce.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/components/CheckAgainst.js b/src/physics/impact/components/CheckAgainst.js index 21edcd027..5c62b4d58 100644 --- a/src/physics/impact/components/CheckAgainst.js +++ b/src/physics/impact/components/CheckAgainst.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/components/Collides.js b/src/physics/impact/components/Collides.js index c3c55cfa3..7a8a6f9fb 100644 --- a/src/physics/impact/components/Collides.js +++ b/src/physics/impact/components/Collides.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/components/Debug.js b/src/physics/impact/components/Debug.js index aa69d76b5..5796e757f 100644 --- a/src/physics/impact/components/Debug.js +++ b/src/physics/impact/components/Debug.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/components/Friction.js b/src/physics/impact/components/Friction.js index 46fb21fd0..c9118194a 100644 --- a/src/physics/impact/components/Friction.js +++ b/src/physics/impact/components/Friction.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/components/Gravity.js b/src/physics/impact/components/Gravity.js index 54a8b83e6..9748492c3 100644 --- a/src/physics/impact/components/Gravity.js +++ b/src/physics/impact/components/Gravity.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/components/Offset.js b/src/physics/impact/components/Offset.js index e7218680e..0f4b732de 100644 --- a/src/physics/impact/components/Offset.js +++ b/src/physics/impact/components/Offset.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/components/SetGameObject.js b/src/physics/impact/components/SetGameObject.js index bb035102c..0a9498879 100644 --- a/src/physics/impact/components/SetGameObject.js +++ b/src/physics/impact/components/SetGameObject.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/components/Velocity.js b/src/physics/impact/components/Velocity.js index 6605dcd2b..d5542dbdd 100644 --- a/src/physics/impact/components/Velocity.js +++ b/src/physics/impact/components/Velocity.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/components/index.js b/src/physics/impact/components/index.js index 35a703729..a96a5a25c 100644 --- a/src/physics/impact/components/index.js +++ b/src/physics/impact/components/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/events/COLLIDE_EVENT.js b/src/physics/impact/events/COLLIDE_EVENT.js index 1ac7b5707..40a9cdb3d 100644 --- a/src/physics/impact/events/COLLIDE_EVENT.js +++ b/src/physics/impact/events/COLLIDE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/events/PAUSE_EVENT.js b/src/physics/impact/events/PAUSE_EVENT.js index 5f69f0b4a..19a430887 100644 --- a/src/physics/impact/events/PAUSE_EVENT.js +++ b/src/physics/impact/events/PAUSE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/events/RESUME_EVENT.js b/src/physics/impact/events/RESUME_EVENT.js index 25c35ea44..c3de2ff33 100644 --- a/src/physics/impact/events/RESUME_EVENT.js +++ b/src/physics/impact/events/RESUME_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/events/index.js b/src/physics/impact/events/index.js index 66d71165f..d67d7d392 100644 --- a/src/physics/impact/events/index.js +++ b/src/physics/impact/events/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/index.js b/src/physics/impact/index.js index c42f75722..f55a42b69 100644 --- a/src/physics/impact/index.js +++ b/src/physics/impact/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/impact/typedefs/index.js b/src/physics/impact/typedefs/index.js index 9975199fa..725199d1b 100644 --- a/src/physics/impact/typedefs/index.js +++ b/src/physics/impact/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/index.js b/src/physics/index.js index 92fc9df5b..5d17cac35 100644 --- a/src/physics/index.js +++ b/src/physics/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/BodyBounds.js b/src/physics/matter-js/BodyBounds.js index 36e8722f6..7ccc6fc7f 100644 --- a/src/physics/matter-js/BodyBounds.js +++ b/src/physics/matter-js/BodyBounds.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/CustomMain.js b/src/physics/matter-js/CustomMain.js index f9b46b8f4..09c3d3061 100644 --- a/src/physics/matter-js/CustomMain.js +++ b/src/physics/matter-js/CustomMain.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/Factory.js b/src/physics/matter-js/Factory.js index 600dd749f..8851832aa 100644 --- a/src/physics/matter-js/Factory.js +++ b/src/physics/matter-js/Factory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/MatterGameObject.js b/src/physics/matter-js/MatterGameObject.js index cf9dfab81..a5726cb24 100644 --- a/src/physics/matter-js/MatterGameObject.js +++ b/src/physics/matter-js/MatterGameObject.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/MatterImage.js b/src/physics/matter-js/MatterImage.js index a6a9c054d..0184cae22 100644 --- a/src/physics/matter-js/MatterImage.js +++ b/src/physics/matter-js/MatterImage.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/MatterPhysics.js b/src/physics/matter-js/MatterPhysics.js index 0484503f0..a93444404 100644 --- a/src/physics/matter-js/MatterPhysics.js +++ b/src/physics/matter-js/MatterPhysics.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/MatterSprite.js b/src/physics/matter-js/MatterSprite.js index 8d8e3831b..e04ed61fa 100644 --- a/src/physics/matter-js/MatterSprite.js +++ b/src/physics/matter-js/MatterSprite.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/MatterTileBody.js b/src/physics/matter-js/MatterTileBody.js index ad54e6408..f578c76a4 100644 --- a/src/physics/matter-js/MatterTileBody.js +++ b/src/physics/matter-js/MatterTileBody.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/PhysicsEditorParser.js b/src/physics/matter-js/PhysicsEditorParser.js index 2d3e79070..978a72aa5 100644 --- a/src/physics/matter-js/PhysicsEditorParser.js +++ b/src/physics/matter-js/PhysicsEditorParser.js @@ -2,7 +2,7 @@ * @author Joachim Grill * @author Richard Davey * @copyright 2018 CodeAndWeb GmbH - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/PhysicsJSONParser.js b/src/physics/matter-js/PhysicsJSONParser.js index 8687c4ec6..7c9aa3622 100644 --- a/src/physics/matter-js/PhysicsJSONParser.js +++ b/src/physics/matter-js/PhysicsJSONParser.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/PointerConstraint.js b/src/physics/matter-js/PointerConstraint.js index dd4443eea..87c89f7df 100644 --- a/src/physics/matter-js/PointerConstraint.js +++ b/src/physics/matter-js/PointerConstraint.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/World.js b/src/physics/matter-js/World.js index 5616b42de..35264015c 100644 --- a/src/physics/matter-js/World.js +++ b/src/physics/matter-js/World.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/components/Bounce.js b/src/physics/matter-js/components/Bounce.js index eb6843b18..c0b1c6bf7 100644 --- a/src/physics/matter-js/components/Bounce.js +++ b/src/physics/matter-js/components/Bounce.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/components/Collision.js b/src/physics/matter-js/components/Collision.js index 80e191bee..a538de061 100644 --- a/src/physics/matter-js/components/Collision.js +++ b/src/physics/matter-js/components/Collision.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/components/Force.js b/src/physics/matter-js/components/Force.js index 7073d9e07..87fbac383 100644 --- a/src/physics/matter-js/components/Force.js +++ b/src/physics/matter-js/components/Force.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/components/Friction.js b/src/physics/matter-js/components/Friction.js index 1f6d687c7..4e0595d1f 100644 --- a/src/physics/matter-js/components/Friction.js +++ b/src/physics/matter-js/components/Friction.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/components/Gravity.js b/src/physics/matter-js/components/Gravity.js index 994618500..3180fc970 100644 --- a/src/physics/matter-js/components/Gravity.js +++ b/src/physics/matter-js/components/Gravity.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/components/Mass.js b/src/physics/matter-js/components/Mass.js index 2574ca3db..3b10ece78 100644 --- a/src/physics/matter-js/components/Mass.js +++ b/src/physics/matter-js/components/Mass.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/components/Sensor.js b/src/physics/matter-js/components/Sensor.js index f678554ee..6ff17db18 100644 --- a/src/physics/matter-js/components/Sensor.js +++ b/src/physics/matter-js/components/Sensor.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/components/SetBody.js b/src/physics/matter-js/components/SetBody.js index b7528873e..7c4230cc9 100644 --- a/src/physics/matter-js/components/SetBody.js +++ b/src/physics/matter-js/components/SetBody.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/components/Sleep.js b/src/physics/matter-js/components/Sleep.js index 4bb242c7e..8ab26708a 100644 --- a/src/physics/matter-js/components/Sleep.js +++ b/src/physics/matter-js/components/Sleep.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/components/Static.js b/src/physics/matter-js/components/Static.js index 34450150e..0358c4078 100644 --- a/src/physics/matter-js/components/Static.js +++ b/src/physics/matter-js/components/Static.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/components/Transform.js b/src/physics/matter-js/components/Transform.js index 6d8a36055..e7934460f 100644 --- a/src/physics/matter-js/components/Transform.js +++ b/src/physics/matter-js/components/Transform.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/components/Velocity.js b/src/physics/matter-js/components/Velocity.js index 09e0b91f1..619719787 100644 --- a/src/physics/matter-js/components/Velocity.js +++ b/src/physics/matter-js/components/Velocity.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/components/index.js b/src/physics/matter-js/components/index.js index c891a6b80..56c6e87f9 100644 --- a/src/physics/matter-js/components/index.js +++ b/src/physics/matter-js/components/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/events/AFTER_ADD_EVENT.js b/src/physics/matter-js/events/AFTER_ADD_EVENT.js index 50e079677..4a73e419b 100644 --- a/src/physics/matter-js/events/AFTER_ADD_EVENT.js +++ b/src/physics/matter-js/events/AFTER_ADD_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/events/AFTER_REMOVE_EVENT.js b/src/physics/matter-js/events/AFTER_REMOVE_EVENT.js index 0eee29f53..f745ced80 100644 --- a/src/physics/matter-js/events/AFTER_REMOVE_EVENT.js +++ b/src/physics/matter-js/events/AFTER_REMOVE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/events/AFTER_UPDATE_EVENT.js b/src/physics/matter-js/events/AFTER_UPDATE_EVENT.js index ef18c1965..999aba1d5 100644 --- a/src/physics/matter-js/events/AFTER_UPDATE_EVENT.js +++ b/src/physics/matter-js/events/AFTER_UPDATE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/events/BEFORE_ADD_EVENT.js b/src/physics/matter-js/events/BEFORE_ADD_EVENT.js index 0bef5b1a4..a97d2f0de 100644 --- a/src/physics/matter-js/events/BEFORE_ADD_EVENT.js +++ b/src/physics/matter-js/events/BEFORE_ADD_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/events/BEFORE_REMOVE_EVENT.js b/src/physics/matter-js/events/BEFORE_REMOVE_EVENT.js index 78924affd..d263e7475 100644 --- a/src/physics/matter-js/events/BEFORE_REMOVE_EVENT.js +++ b/src/physics/matter-js/events/BEFORE_REMOVE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/events/BEFORE_UPDATE_EVENT.js b/src/physics/matter-js/events/BEFORE_UPDATE_EVENT.js index 90db5505b..3cf763a35 100644 --- a/src/physics/matter-js/events/BEFORE_UPDATE_EVENT.js +++ b/src/physics/matter-js/events/BEFORE_UPDATE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/events/COLLISION_ACTIVE_EVENT.js b/src/physics/matter-js/events/COLLISION_ACTIVE_EVENT.js index 8cbaebac8..a272652a9 100644 --- a/src/physics/matter-js/events/COLLISION_ACTIVE_EVENT.js +++ b/src/physics/matter-js/events/COLLISION_ACTIVE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/events/COLLISION_END_EVENT.js b/src/physics/matter-js/events/COLLISION_END_EVENT.js index 1052ce99f..543618135 100644 --- a/src/physics/matter-js/events/COLLISION_END_EVENT.js +++ b/src/physics/matter-js/events/COLLISION_END_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/events/COLLISION_START_EVENT.js b/src/physics/matter-js/events/COLLISION_START_EVENT.js index 8a863b6a2..9a0ce1105 100644 --- a/src/physics/matter-js/events/COLLISION_START_EVENT.js +++ b/src/physics/matter-js/events/COLLISION_START_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/events/DRAG_END_EVENT.js b/src/physics/matter-js/events/DRAG_END_EVENT.js index 60d7801a9..e01eed8cf 100644 --- a/src/physics/matter-js/events/DRAG_END_EVENT.js +++ b/src/physics/matter-js/events/DRAG_END_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/events/DRAG_EVENT.js b/src/physics/matter-js/events/DRAG_EVENT.js index 05e412d17..103c7ac3d 100644 --- a/src/physics/matter-js/events/DRAG_EVENT.js +++ b/src/physics/matter-js/events/DRAG_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/events/DRAG_START_EVENT.js b/src/physics/matter-js/events/DRAG_START_EVENT.js index bef16d85d..7eaa0ba1b 100644 --- a/src/physics/matter-js/events/DRAG_START_EVENT.js +++ b/src/physics/matter-js/events/DRAG_START_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/events/PAUSE_EVENT.js b/src/physics/matter-js/events/PAUSE_EVENT.js index e381e458d..dba8f5553 100644 --- a/src/physics/matter-js/events/PAUSE_EVENT.js +++ b/src/physics/matter-js/events/PAUSE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/events/RESUME_EVENT.js b/src/physics/matter-js/events/RESUME_EVENT.js index ceaae32c0..23cb25304 100644 --- a/src/physics/matter-js/events/RESUME_EVENT.js +++ b/src/physics/matter-js/events/RESUME_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/events/SLEEP_END_EVENT.js b/src/physics/matter-js/events/SLEEP_END_EVENT.js index 5d42180a5..eab024c97 100644 --- a/src/physics/matter-js/events/SLEEP_END_EVENT.js +++ b/src/physics/matter-js/events/SLEEP_END_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/events/SLEEP_START_EVENT.js b/src/physics/matter-js/events/SLEEP_START_EVENT.js index d702d50a9..70b4a2242 100644 --- a/src/physics/matter-js/events/SLEEP_START_EVENT.js +++ b/src/physics/matter-js/events/SLEEP_START_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/events/index.js b/src/physics/matter-js/events/index.js index 324adbc9b..6697df1b9 100644 --- a/src/physics/matter-js/events/index.js +++ b/src/physics/matter-js/events/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/index.js b/src/physics/matter-js/index.js index ddfdc06e4..ec2ff8b4b 100644 --- a/src/physics/matter-js/index.js +++ b/src/physics/matter-js/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/physics/matter-js/typedefs/index.js b/src/physics/matter-js/typedefs/index.js index 2c9a6ebba..ee3bae2e3 100644 --- a/src/physics/matter-js/typedefs/index.js +++ b/src/physics/matter-js/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/plugins/BasePlugin.js b/src/plugins/BasePlugin.js index f27d66852..ccb38fedb 100644 --- a/src/plugins/BasePlugin.js +++ b/src/plugins/BasePlugin.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2019 Photon Storm Ltd. +* @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ diff --git a/src/plugins/DefaultPlugins.js b/src/plugins/DefaultPlugins.js index e8294a5d2..8558c2932 100644 --- a/src/plugins/DefaultPlugins.js +++ b/src/plugins/DefaultPlugins.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/plugins/PluginCache.js b/src/plugins/PluginCache.js index c6a4747de..7a6b92818 100644 --- a/src/plugins/PluginCache.js +++ b/src/plugins/PluginCache.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/plugins/PluginManager.js b/src/plugins/PluginManager.js index b0fea4a2f..40d502abc 100644 --- a/src/plugins/PluginManager.js +++ b/src/plugins/PluginManager.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/plugins/ScenePlugin.js b/src/plugins/ScenePlugin.js index aab3b7201..fb4130d70 100644 --- a/src/plugins/ScenePlugin.js +++ b/src/plugins/ScenePlugin.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2019 Photon Storm Ltd. +* @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ diff --git a/src/plugins/index.js b/src/plugins/index.js index 193748dad..8e4b5ef7b 100644 --- a/src/plugins/index.js +++ b/src/plugins/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/plugins/typedefs/index.js b/src/plugins/typedefs/index.js index 5330aeb68..b0087b40c 100644 --- a/src/plugins/typedefs/index.js +++ b/src/plugins/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/renderer/BlendModes.js b/src/renderer/BlendModes.js index 86d06fcd7..7aa4ae668 100644 --- a/src/renderer/BlendModes.js +++ b/src/renderer/BlendModes.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/renderer/ScaleModes.js b/src/renderer/ScaleModes.js index 7ff359897..92d1a3af6 100644 --- a/src/renderer/ScaleModes.js +++ b/src/renderer/ScaleModes.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/renderer/canvas/CanvasRenderer.js b/src/renderer/canvas/CanvasRenderer.js index a77b5bc22..2a270e064 100644 --- a/src/renderer/canvas/CanvasRenderer.js +++ b/src/renderer/canvas/CanvasRenderer.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/renderer/canvas/index.js b/src/renderer/canvas/index.js index 2bf6ae7e5..da088d3c8 100644 --- a/src/renderer/canvas/index.js +++ b/src/renderer/canvas/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/renderer/canvas/utils/GetBlendModes.js b/src/renderer/canvas/utils/GetBlendModes.js index 7aa23ecdc..9b5830a30 100644 --- a/src/renderer/canvas/utils/GetBlendModes.js +++ b/src/renderer/canvas/utils/GetBlendModes.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/renderer/canvas/utils/SetTransform.js b/src/renderer/canvas/utils/SetTransform.js index d989f8263..4849b0fa7 100644 --- a/src/renderer/canvas/utils/SetTransform.js +++ b/src/renderer/canvas/utils/SetTransform.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/renderer/index.js b/src/renderer/index.js index 8568c477b..51347ea77 100644 --- a/src/renderer/index.js +++ b/src/renderer/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/renderer/snapshot/CanvasSnapshot.js b/src/renderer/snapshot/CanvasSnapshot.js index ba96559a6..76a523bcb 100644 --- a/src/renderer/snapshot/CanvasSnapshot.js +++ b/src/renderer/snapshot/CanvasSnapshot.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/renderer/snapshot/WebGLSnapshot.js b/src/renderer/snapshot/WebGLSnapshot.js index c36b67ae7..d587e2e47 100644 --- a/src/renderer/snapshot/WebGLSnapshot.js +++ b/src/renderer/snapshot/WebGLSnapshot.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/renderer/snapshot/index.js b/src/renderer/snapshot/index.js index 44f83e7dd..67299651a 100644 --- a/src/renderer/snapshot/index.js +++ b/src/renderer/snapshot/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/renderer/snapshot/typedefs/index.js b/src/renderer/snapshot/typedefs/index.js index f8aa7af6a..4d13c21f1 100644 --- a/src/renderer/snapshot/typedefs/index.js +++ b/src/renderer/snapshot/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/renderer/webgl/Utils.js b/src/renderer/webgl/Utils.js index 99b23089f..d551fead0 100644 --- a/src/renderer/webgl/Utils.js +++ b/src/renderer/webgl/Utils.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/renderer/webgl/WebGLPipeline.js b/src/renderer/webgl/WebGLPipeline.js index f4778bbfd..42c13c711 100644 --- a/src/renderer/webgl/WebGLPipeline.js +++ b/src/renderer/webgl/WebGLPipeline.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/renderer/webgl/WebGLRenderer.js b/src/renderer/webgl/WebGLRenderer.js index 804dcc0c7..cdd00152b 100644 --- a/src/renderer/webgl/WebGLRenderer.js +++ b/src/renderer/webgl/WebGLRenderer.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/renderer/webgl/index.js b/src/renderer/webgl/index.js index 0a2747351..f28c4ba41 100644 --- a/src/renderer/webgl/index.js +++ b/src/renderer/webgl/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/renderer/webgl/pipelines/BitmapMaskPipeline.js b/src/renderer/webgl/pipelines/BitmapMaskPipeline.js index 2ca8632f2..998814a0a 100644 --- a/src/renderer/webgl/pipelines/BitmapMaskPipeline.js +++ b/src/renderer/webgl/pipelines/BitmapMaskPipeline.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js b/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js index bfa904025..f62a667b1 100644 --- a/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js +++ b/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/renderer/webgl/pipelines/TextureTintPipeline.js b/src/renderer/webgl/pipelines/TextureTintPipeline.js index 63c6fc9e9..5615062f6 100644 --- a/src/renderer/webgl/pipelines/TextureTintPipeline.js +++ b/src/renderer/webgl/pipelines/TextureTintPipeline.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/renderer/webgl/pipelines/components/ModelViewProjection.js b/src/renderer/webgl/pipelines/components/ModelViewProjection.js index 2f38bdcd4..df36a1cdd 100644 --- a/src/renderer/webgl/pipelines/components/ModelViewProjection.js +++ b/src/renderer/webgl/pipelines/components/ModelViewProjection.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/renderer/webgl/pipelines/index.js b/src/renderer/webgl/pipelines/index.js index 847d0f223..70bfe0b29 100644 --- a/src/renderer/webgl/pipelines/index.js +++ b/src/renderer/webgl/pipelines/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scale/ScaleManager.js b/src/scale/ScaleManager.js index e4c4797e5..5f9934dad 100644 --- a/src/scale/ScaleManager.js +++ b/src/scale/ScaleManager.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scale/const/CENTER_CONST.js b/src/scale/const/CENTER_CONST.js index 7ed6f5a95..46f89c540 100644 --- a/src/scale/const/CENTER_CONST.js +++ b/src/scale/const/CENTER_CONST.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scale/const/ORIENTATION_CONST.js b/src/scale/const/ORIENTATION_CONST.js index e57d80788..a166acd02 100644 --- a/src/scale/const/ORIENTATION_CONST.js +++ b/src/scale/const/ORIENTATION_CONST.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scale/const/SCALE_MODE_CONST.js b/src/scale/const/SCALE_MODE_CONST.js index 0175d623e..1924f110e 100644 --- a/src/scale/const/SCALE_MODE_CONST.js +++ b/src/scale/const/SCALE_MODE_CONST.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scale/const/ZOOM_CONST.js b/src/scale/const/ZOOM_CONST.js index 8ce7c318b..c2e57b064 100644 --- a/src/scale/const/ZOOM_CONST.js +++ b/src/scale/const/ZOOM_CONST.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scale/const/index.js b/src/scale/const/index.js index c47666723..4513124cb 100644 --- a/src/scale/const/index.js +++ b/src/scale/const/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scale/events/ENTER_FULLSCREEN_EVENT.js b/src/scale/events/ENTER_FULLSCREEN_EVENT.js index 120353e37..b0762a88a 100644 --- a/src/scale/events/ENTER_FULLSCREEN_EVENT.js +++ b/src/scale/events/ENTER_FULLSCREEN_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scale/events/FULLSCREEN_FAILED_EVENT.js b/src/scale/events/FULLSCREEN_FAILED_EVENT.js index 6bebdf32f..aea4c6072 100644 --- a/src/scale/events/FULLSCREEN_FAILED_EVENT.js +++ b/src/scale/events/FULLSCREEN_FAILED_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scale/events/FULLSCREEN_UNSUPPORTED_EVENT.js b/src/scale/events/FULLSCREEN_UNSUPPORTED_EVENT.js index 0e4bbd4b9..195eb4c64 100644 --- a/src/scale/events/FULLSCREEN_UNSUPPORTED_EVENT.js +++ b/src/scale/events/FULLSCREEN_UNSUPPORTED_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scale/events/LEAVE_FULLSCREEN_EVENT.js b/src/scale/events/LEAVE_FULLSCREEN_EVENT.js index acd37d9a7..e2bac6560 100644 --- a/src/scale/events/LEAVE_FULLSCREEN_EVENT.js +++ b/src/scale/events/LEAVE_FULLSCREEN_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scale/events/ORIENTATION_CHANGE_EVENT.js b/src/scale/events/ORIENTATION_CHANGE_EVENT.js index ef1707502..c83e98d39 100644 --- a/src/scale/events/ORIENTATION_CHANGE_EVENT.js +++ b/src/scale/events/ORIENTATION_CHANGE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scale/events/RESIZE_EVENT.js b/src/scale/events/RESIZE_EVENT.js index 8e908ed5f..cbee53336 100644 --- a/src/scale/events/RESIZE_EVENT.js +++ b/src/scale/events/RESIZE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scale/events/index.js b/src/scale/events/index.js index 9e610cd95..b6e206074 100644 --- a/src/scale/events/index.js +++ b/src/scale/events/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scale/index.js b/src/scale/index.js index 8a10df695..5455feb2e 100644 --- a/src/scale/index.js +++ b/src/scale/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/GetPhysicsPlugins.js b/src/scene/GetPhysicsPlugins.js index 75f6ac555..d12aca86c 100644 --- a/src/scene/GetPhysicsPlugins.js +++ b/src/scene/GetPhysicsPlugins.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/GetScenePlugins.js b/src/scene/GetScenePlugins.js index bb817481d..d3b3fd16b 100644 --- a/src/scene/GetScenePlugins.js +++ b/src/scene/GetScenePlugins.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/InjectionMap.js b/src/scene/InjectionMap.js index 3ba379bd3..1d5cec1d5 100644 --- a/src/scene/InjectionMap.js +++ b/src/scene/InjectionMap.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/Scene.js b/src/scene/Scene.js index 0d4a5ba99..5c1bfdfed 100644 --- a/src/scene/Scene.js +++ b/src/scene/Scene.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/SceneManager.js b/src/scene/SceneManager.js index eb489896c..cc4fd73b6 100644 --- a/src/scene/SceneManager.js +++ b/src/scene/SceneManager.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/ScenePlugin.js b/src/scene/ScenePlugin.js index 61a30a5d0..ad01d6cde 100644 --- a/src/scene/ScenePlugin.js +++ b/src/scene/ScenePlugin.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/Settings.js b/src/scene/Settings.js index 80b186ac1..d53e866d1 100644 --- a/src/scene/Settings.js +++ b/src/scene/Settings.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/Systems.js b/src/scene/Systems.js index de1961aea..48ebddb42 100644 --- a/src/scene/Systems.js +++ b/src/scene/Systems.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/const.js b/src/scene/const.js index 42c833c0c..d461d476e 100644 --- a/src/scene/const.js +++ b/src/scene/const.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/events/BOOT_EVENT.js b/src/scene/events/BOOT_EVENT.js index 610f0bc66..c016257ad 100644 --- a/src/scene/events/BOOT_EVENT.js +++ b/src/scene/events/BOOT_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/events/CREATE_EVENT.js b/src/scene/events/CREATE_EVENT.js index 61bc8a52b..eaf00f246 100644 --- a/src/scene/events/CREATE_EVENT.js +++ b/src/scene/events/CREATE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/events/DESTROY_EVENT.js b/src/scene/events/DESTROY_EVENT.js index f7ec30978..86cb018b4 100644 --- a/src/scene/events/DESTROY_EVENT.js +++ b/src/scene/events/DESTROY_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/events/PAUSE_EVENT.js b/src/scene/events/PAUSE_EVENT.js index 769f7a3fd..6f9926964 100644 --- a/src/scene/events/PAUSE_EVENT.js +++ b/src/scene/events/PAUSE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/events/POST_UPDATE_EVENT.js b/src/scene/events/POST_UPDATE_EVENT.js index c3f1d762b..967f7ea02 100644 --- a/src/scene/events/POST_UPDATE_EVENT.js +++ b/src/scene/events/POST_UPDATE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/events/PRE_UPDATE_EVENT.js b/src/scene/events/PRE_UPDATE_EVENT.js index be6d83108..f0b8f02bc 100644 --- a/src/scene/events/PRE_UPDATE_EVENT.js +++ b/src/scene/events/PRE_UPDATE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/events/READY_EVENT.js b/src/scene/events/READY_EVENT.js index a6ad711c6..ebfb11bea 100644 --- a/src/scene/events/READY_EVENT.js +++ b/src/scene/events/READY_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/events/RENDER_EVENT.js b/src/scene/events/RENDER_EVENT.js index 19b80b1e8..3120fb598 100644 --- a/src/scene/events/RENDER_EVENT.js +++ b/src/scene/events/RENDER_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/events/RESUME_EVENT.js b/src/scene/events/RESUME_EVENT.js index 52e2f5eeb..a3f3a0467 100644 --- a/src/scene/events/RESUME_EVENT.js +++ b/src/scene/events/RESUME_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/events/SHUTDOWN_EVENT.js b/src/scene/events/SHUTDOWN_EVENT.js index 732ec641a..c315330f8 100644 --- a/src/scene/events/SHUTDOWN_EVENT.js +++ b/src/scene/events/SHUTDOWN_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/events/SLEEP_EVENT.js b/src/scene/events/SLEEP_EVENT.js index 771434864..f2dc6735e 100644 --- a/src/scene/events/SLEEP_EVENT.js +++ b/src/scene/events/SLEEP_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/events/START_EVENT.js b/src/scene/events/START_EVENT.js index 5d5d896fa..9fed5e886 100644 --- a/src/scene/events/START_EVENT.js +++ b/src/scene/events/START_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/events/TRANSITION_COMPLETE_EVENT.js b/src/scene/events/TRANSITION_COMPLETE_EVENT.js index 4955ea7a9..8951ad520 100644 --- a/src/scene/events/TRANSITION_COMPLETE_EVENT.js +++ b/src/scene/events/TRANSITION_COMPLETE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/events/TRANSITION_INIT_EVENT.js b/src/scene/events/TRANSITION_INIT_EVENT.js index 50b201464..f77f301b9 100644 --- a/src/scene/events/TRANSITION_INIT_EVENT.js +++ b/src/scene/events/TRANSITION_INIT_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/events/TRANSITION_OUT_EVENT.js b/src/scene/events/TRANSITION_OUT_EVENT.js index 88a838454..74084cd5b 100644 --- a/src/scene/events/TRANSITION_OUT_EVENT.js +++ b/src/scene/events/TRANSITION_OUT_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/events/TRANSITION_START_EVENT.js b/src/scene/events/TRANSITION_START_EVENT.js index 7ea7c6de8..cd6c15e98 100644 --- a/src/scene/events/TRANSITION_START_EVENT.js +++ b/src/scene/events/TRANSITION_START_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/events/TRANSITION_WAKE_EVENT.js b/src/scene/events/TRANSITION_WAKE_EVENT.js index 7edf02d8f..71637628b 100644 --- a/src/scene/events/TRANSITION_WAKE_EVENT.js +++ b/src/scene/events/TRANSITION_WAKE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/events/UPDATE_EVENT.js b/src/scene/events/UPDATE_EVENT.js index 2a29ef454..bfaf6d87a 100644 --- a/src/scene/events/UPDATE_EVENT.js +++ b/src/scene/events/UPDATE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/events/WAKE_EVENT.js b/src/scene/events/WAKE_EVENT.js index 5b9893541..258361285 100644 --- a/src/scene/events/WAKE_EVENT.js +++ b/src/scene/events/WAKE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/events/index.js b/src/scene/events/index.js index a803188be..78d88e885 100644 --- a/src/scene/events/index.js +++ b/src/scene/events/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/index.js b/src/scene/index.js index 407cd7c05..3367e2dab 100644 --- a/src/scene/index.js +++ b/src/scene/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/scene/typedefs/index.js b/src/scene/typedefs/index.js index b9563f9d8..52fa2e234 100644 --- a/src/scene/typedefs/index.js +++ b/src/scene/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/BaseSound.js b/src/sound/BaseSound.js index 24322b4c6..e2bd3cedb 100644 --- a/src/sound/BaseSound.js +++ b/src/sound/BaseSound.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/BaseSoundManager.js b/src/sound/BaseSoundManager.js index e582833ec..72d222e85 100644 --- a/src/sound/BaseSoundManager.js +++ b/src/sound/BaseSoundManager.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/SoundManagerCreator.js b/src/sound/SoundManagerCreator.js index 0e1b7d7b1..46c5ec590 100644 --- a/src/sound/SoundManagerCreator.js +++ b/src/sound/SoundManagerCreator.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/events/COMPLETE_EVENT.js b/src/sound/events/COMPLETE_EVENT.js index 88944be92..c2c54b494 100644 --- a/src/sound/events/COMPLETE_EVENT.js +++ b/src/sound/events/COMPLETE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/events/DECODED_ALL_EVENT.js b/src/sound/events/DECODED_ALL_EVENT.js index b086495ca..bfef313f8 100644 --- a/src/sound/events/DECODED_ALL_EVENT.js +++ b/src/sound/events/DECODED_ALL_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/events/DECODED_EVENT.js b/src/sound/events/DECODED_EVENT.js index 69c532fc8..abb3ed56e 100644 --- a/src/sound/events/DECODED_EVENT.js +++ b/src/sound/events/DECODED_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/events/DESTROY_EVENT.js b/src/sound/events/DESTROY_EVENT.js index 7c8cd9cf3..2ddc5b513 100644 --- a/src/sound/events/DESTROY_EVENT.js +++ b/src/sound/events/DESTROY_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/events/DETUNE_EVENT.js b/src/sound/events/DETUNE_EVENT.js index 8f5cd828a..aac3b4076 100644 --- a/src/sound/events/DETUNE_EVENT.js +++ b/src/sound/events/DETUNE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/events/GLOBAL_DETUNE_EVENT.js b/src/sound/events/GLOBAL_DETUNE_EVENT.js index 0d93f255c..c8d09861a 100644 --- a/src/sound/events/GLOBAL_DETUNE_EVENT.js +++ b/src/sound/events/GLOBAL_DETUNE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/events/GLOBAL_MUTE_EVENT.js b/src/sound/events/GLOBAL_MUTE_EVENT.js index 1b3339192..7b9164e69 100644 --- a/src/sound/events/GLOBAL_MUTE_EVENT.js +++ b/src/sound/events/GLOBAL_MUTE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/events/GLOBAL_RATE_EVENT.js b/src/sound/events/GLOBAL_RATE_EVENT.js index 55f4f258e..5a43b2364 100644 --- a/src/sound/events/GLOBAL_RATE_EVENT.js +++ b/src/sound/events/GLOBAL_RATE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/events/GLOBAL_VOLUME_EVENT.js b/src/sound/events/GLOBAL_VOLUME_EVENT.js index 8dcdb5323..ec86a707b 100644 --- a/src/sound/events/GLOBAL_VOLUME_EVENT.js +++ b/src/sound/events/GLOBAL_VOLUME_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/events/LOOPED_EVENT.js b/src/sound/events/LOOPED_EVENT.js index 7d31d6e6d..337b927e6 100644 --- a/src/sound/events/LOOPED_EVENT.js +++ b/src/sound/events/LOOPED_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/events/LOOP_EVENT.js b/src/sound/events/LOOP_EVENT.js index 8716e9277..fa2e375b0 100644 --- a/src/sound/events/LOOP_EVENT.js +++ b/src/sound/events/LOOP_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/events/MUTE_EVENT.js b/src/sound/events/MUTE_EVENT.js index 2708c7455..f0589c514 100644 --- a/src/sound/events/MUTE_EVENT.js +++ b/src/sound/events/MUTE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/events/PAUSE_ALL_EVENT.js b/src/sound/events/PAUSE_ALL_EVENT.js index 7a58aac42..7f406978f 100644 --- a/src/sound/events/PAUSE_ALL_EVENT.js +++ b/src/sound/events/PAUSE_ALL_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/events/PAUSE_EVENT.js b/src/sound/events/PAUSE_EVENT.js index 78ea4b674..9f5b9ad26 100644 --- a/src/sound/events/PAUSE_EVENT.js +++ b/src/sound/events/PAUSE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/events/PLAY_EVENT.js b/src/sound/events/PLAY_EVENT.js index 4c0a7bcfc..0dfe868ba 100644 --- a/src/sound/events/PLAY_EVENT.js +++ b/src/sound/events/PLAY_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/events/RATE_EVENT.js b/src/sound/events/RATE_EVENT.js index f0563c04c..d15e0b150 100644 --- a/src/sound/events/RATE_EVENT.js +++ b/src/sound/events/RATE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/events/RESUME_ALL_EVENT.js b/src/sound/events/RESUME_ALL_EVENT.js index e7facbe59..a2d36cdc8 100644 --- a/src/sound/events/RESUME_ALL_EVENT.js +++ b/src/sound/events/RESUME_ALL_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/events/RESUME_EVENT.js b/src/sound/events/RESUME_EVENT.js index ac28eda50..5fa1aad40 100644 --- a/src/sound/events/RESUME_EVENT.js +++ b/src/sound/events/RESUME_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/events/SEEK_EVENT.js b/src/sound/events/SEEK_EVENT.js index 580771ff7..2fe9164d2 100644 --- a/src/sound/events/SEEK_EVENT.js +++ b/src/sound/events/SEEK_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/events/STOP_ALL_EVENT.js b/src/sound/events/STOP_ALL_EVENT.js index 1bdecc96d..b69d0c9f4 100644 --- a/src/sound/events/STOP_ALL_EVENT.js +++ b/src/sound/events/STOP_ALL_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/events/STOP_EVENT.js b/src/sound/events/STOP_EVENT.js index a8ca53731..dcebca4c8 100644 --- a/src/sound/events/STOP_EVENT.js +++ b/src/sound/events/STOP_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/events/UNLOCKED_EVENT.js b/src/sound/events/UNLOCKED_EVENT.js index 00636a8b2..889267748 100644 --- a/src/sound/events/UNLOCKED_EVENT.js +++ b/src/sound/events/UNLOCKED_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/events/VOLUME_EVENT.js b/src/sound/events/VOLUME_EVENT.js index 4e064b78d..8e5e4c92f 100644 --- a/src/sound/events/VOLUME_EVENT.js +++ b/src/sound/events/VOLUME_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/events/index.js b/src/sound/events/index.js index 3721841dc..139bb2461 100644 --- a/src/sound/events/index.js +++ b/src/sound/events/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/html5/HTML5AudioSound.js b/src/sound/html5/HTML5AudioSound.js index 97d06f1bb..f72d6716f 100644 --- a/src/sound/html5/HTML5AudioSound.js +++ b/src/sound/html5/HTML5AudioSound.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/html5/HTML5AudioSoundManager.js b/src/sound/html5/HTML5AudioSoundManager.js index baba93395..d4735ff37 100644 --- a/src/sound/html5/HTML5AudioSoundManager.js +++ b/src/sound/html5/HTML5AudioSoundManager.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/index.js b/src/sound/index.js index 720da3f2c..888bf7b7b 100644 --- a/src/sound/index.js +++ b/src/sound/index.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/noaudio/NoAudioSound.js b/src/sound/noaudio/NoAudioSound.js index b6604242c..5878d4019 100644 --- a/src/sound/noaudio/NoAudioSound.js +++ b/src/sound/noaudio/NoAudioSound.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/noaudio/NoAudioSoundManager.js b/src/sound/noaudio/NoAudioSoundManager.js index fb3c61584..b8c81fb28 100644 --- a/src/sound/noaudio/NoAudioSoundManager.js +++ b/src/sound/noaudio/NoAudioSoundManager.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/typedefs/index.js b/src/sound/typedefs/index.js index e87fd6d6e..f8fa08519 100644 --- a/src/sound/typedefs/index.js +++ b/src/sound/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/webaudio/WebAudioSound.js b/src/sound/webaudio/WebAudioSound.js index e149eeec1..fd8e25fdd 100644 --- a/src/sound/webaudio/WebAudioSound.js +++ b/src/sound/webaudio/WebAudioSound.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/sound/webaudio/WebAudioSoundManager.js b/src/sound/webaudio/WebAudioSoundManager.js index d259afcf4..a17471c7a 100644 --- a/src/sound/webaudio/WebAudioSoundManager.js +++ b/src/sound/webaudio/WebAudioSoundManager.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/structs/List.js b/src/structs/List.js index 4a0a1b9df..2e54e0cba 100644 --- a/src/structs/List.js +++ b/src/structs/List.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/structs/Map.js b/src/structs/Map.js index 4dfc7a63d..28ab15b22 100644 --- a/src/structs/Map.js +++ b/src/structs/Map.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/structs/ProcessQueue.js b/src/structs/ProcessQueue.js index d7ce359bb..d1831fd0d 100644 --- a/src/structs/ProcessQueue.js +++ b/src/structs/ProcessQueue.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/structs/RTree.js b/src/structs/RTree.js index be2c6f253..01bb5be09 100644 --- a/src/structs/RTree.js +++ b/src/structs/RTree.js @@ -1,7 +1,7 @@ /** * @author Vladimir Agafonkin * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/structs/Set.js b/src/structs/Set.js index 1a38b2f56..b2911a8cb 100644 --- a/src/structs/Set.js +++ b/src/structs/Set.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/structs/Size.js b/src/structs/Size.js index a9e70e74d..97c895d5f 100644 --- a/src/structs/Size.js +++ b/src/structs/Size.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/structs/events/PROCESS_QUEUE_ADD_EVENT.js b/src/structs/events/PROCESS_QUEUE_ADD_EVENT.js index 8a2f2ffa9..f3db6729e 100644 --- a/src/structs/events/PROCESS_QUEUE_ADD_EVENT.js +++ b/src/structs/events/PROCESS_QUEUE_ADD_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/structs/events/PROCESS_QUEUE_REMOVE_EVENT.js b/src/structs/events/PROCESS_QUEUE_REMOVE_EVENT.js index c6c0e3c85..707f8ee63 100644 --- a/src/structs/events/PROCESS_QUEUE_REMOVE_EVENT.js +++ b/src/structs/events/PROCESS_QUEUE_REMOVE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/structs/events/index.js b/src/structs/events/index.js index 1745d6515..47aff897d 100644 --- a/src/structs/events/index.js +++ b/src/structs/events/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/structs/index.js b/src/structs/index.js index 15fada13f..5de1cb78a 100644 --- a/src/structs/index.js +++ b/src/structs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/textures/CanvasTexture.js b/src/textures/CanvasTexture.js index 997420c99..fd85fa131 100644 --- a/src/textures/CanvasTexture.js +++ b/src/textures/CanvasTexture.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/textures/Frame.js b/src/textures/Frame.js index 47756c249..24dd8e73b 100644 --- a/src/textures/Frame.js +++ b/src/textures/Frame.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/textures/Texture.js b/src/textures/Texture.js index e63b349d6..f74626152 100644 --- a/src/textures/Texture.js +++ b/src/textures/Texture.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/textures/TextureManager.js b/src/textures/TextureManager.js index 90b147c8a..7372bfcaa 100644 --- a/src/textures/TextureManager.js +++ b/src/textures/TextureManager.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/textures/TextureSource.js b/src/textures/TextureSource.js index 645382d2c..bba227cae 100644 --- a/src/textures/TextureSource.js +++ b/src/textures/TextureSource.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/textures/const.js b/src/textures/const.js index 93d63bd62..1b7e56873 100644 --- a/src/textures/const.js +++ b/src/textures/const.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/textures/events/ADD_EVENT.js b/src/textures/events/ADD_EVENT.js index aecfdf918..af6ffeb2f 100644 --- a/src/textures/events/ADD_EVENT.js +++ b/src/textures/events/ADD_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/textures/events/ERROR_EVENT.js b/src/textures/events/ERROR_EVENT.js index 6007e9245..2c3cb4c33 100644 --- a/src/textures/events/ERROR_EVENT.js +++ b/src/textures/events/ERROR_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/textures/events/LOAD_EVENT.js b/src/textures/events/LOAD_EVENT.js index 57269f348..be11c553d 100644 --- a/src/textures/events/LOAD_EVENT.js +++ b/src/textures/events/LOAD_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/textures/events/READY_EVENT.js b/src/textures/events/READY_EVENT.js index 09801bdd7..cb99ee565 100644 --- a/src/textures/events/READY_EVENT.js +++ b/src/textures/events/READY_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/textures/events/REMOVE_EVENT.js b/src/textures/events/REMOVE_EVENT.js index d4f235fc9..736ee1b3b 100644 --- a/src/textures/events/REMOVE_EVENT.js +++ b/src/textures/events/REMOVE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/textures/events/index.js b/src/textures/events/index.js index 6298a64c0..d7040a71a 100644 --- a/src/textures/events/index.js +++ b/src/textures/events/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/textures/index.js b/src/textures/index.js index 2b54b8d0b..0c3e1c92a 100644 --- a/src/textures/index.js +++ b/src/textures/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/textures/parsers/AtlasXML.js b/src/textures/parsers/AtlasXML.js index 8483d2110..18a1b3aae 100644 --- a/src/textures/parsers/AtlasXML.js +++ b/src/textures/parsers/AtlasXML.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/textures/parsers/Canvas.js b/src/textures/parsers/Canvas.js index 29513f8f5..479e20a4d 100644 --- a/src/textures/parsers/Canvas.js +++ b/src/textures/parsers/Canvas.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/textures/parsers/Image.js b/src/textures/parsers/Image.js index 83f6e5e30..16d497dbd 100644 --- a/src/textures/parsers/Image.js +++ b/src/textures/parsers/Image.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/textures/parsers/JSONArray.js b/src/textures/parsers/JSONArray.js index 7fc0361b9..aac072b42 100644 --- a/src/textures/parsers/JSONArray.js +++ b/src/textures/parsers/JSONArray.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/textures/parsers/JSONHash.js b/src/textures/parsers/JSONHash.js index baebfd150..844e11558 100644 --- a/src/textures/parsers/JSONHash.js +++ b/src/textures/parsers/JSONHash.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/textures/parsers/SpriteSheet.js b/src/textures/parsers/SpriteSheet.js index 2c97780a2..23bffc2ca 100644 --- a/src/textures/parsers/SpriteSheet.js +++ b/src/textures/parsers/SpriteSheet.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/textures/parsers/SpriteSheetFromAtlas.js b/src/textures/parsers/SpriteSheetFromAtlas.js index 034bf5db5..04d98d460 100644 --- a/src/textures/parsers/SpriteSheetFromAtlas.js +++ b/src/textures/parsers/SpriteSheetFromAtlas.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/textures/parsers/UnityYAML.js b/src/textures/parsers/UnityYAML.js index 5c922ee54..fdbb4ed80 100644 --- a/src/textures/parsers/UnityYAML.js +++ b/src/textures/parsers/UnityYAML.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/textures/parsers/index.js b/src/textures/parsers/index.js index f3bc9964b..f8792146f 100644 --- a/src/textures/parsers/index.js +++ b/src/textures/parsers/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/textures/typedefs/index.js b/src/textures/typedefs/index.js index df1682006..26dd8aa3c 100644 --- a/src/textures/typedefs/index.js +++ b/src/textures/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/Formats.js b/src/tilemaps/Formats.js index a18dc24df..778df8922 100644 --- a/src/tilemaps/Formats.js +++ b/src/tilemaps/Formats.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/ImageCollection.js b/src/tilemaps/ImageCollection.js index e3bf56829..aceb1ccde 100644 --- a/src/tilemaps/ImageCollection.js +++ b/src/tilemaps/ImageCollection.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/ParseToTilemap.js b/src/tilemaps/ParseToTilemap.js index de823c43d..851d13295 100644 --- a/src/tilemaps/ParseToTilemap.js +++ b/src/tilemaps/ParseToTilemap.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/Tile.js b/src/tilemaps/Tile.js index 1f7bf439a..21f1c9e34 100644 --- a/src/tilemaps/Tile.js +++ b/src/tilemaps/Tile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/Tilemap.js b/src/tilemaps/Tilemap.js index 2660a9d72..1170dd522 100644 --- a/src/tilemaps/Tilemap.js +++ b/src/tilemaps/Tilemap.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/TilemapCreator.js b/src/tilemaps/TilemapCreator.js index 4fdb53b9b..639301561 100644 --- a/src/tilemaps/TilemapCreator.js +++ b/src/tilemaps/TilemapCreator.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/TilemapFactory.js b/src/tilemaps/TilemapFactory.js index 7fe67c0a0..e61148b2c 100644 --- a/src/tilemaps/TilemapFactory.js +++ b/src/tilemaps/TilemapFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/Tileset.js b/src/tilemaps/Tileset.js index 033cf1125..260720b33 100644 --- a/src/tilemaps/Tileset.js +++ b/src/tilemaps/Tileset.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/CalculateFacesAt.js b/src/tilemaps/components/CalculateFacesAt.js index 6decf57cd..23fb2314d 100644 --- a/src/tilemaps/components/CalculateFacesAt.js +++ b/src/tilemaps/components/CalculateFacesAt.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/CalculateFacesWithin.js b/src/tilemaps/components/CalculateFacesWithin.js index f9a50b029..3bb10047a 100644 --- a/src/tilemaps/components/CalculateFacesWithin.js +++ b/src/tilemaps/components/CalculateFacesWithin.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/Copy.js b/src/tilemaps/components/Copy.js index fc552a6b5..e28bff680 100644 --- a/src/tilemaps/components/Copy.js +++ b/src/tilemaps/components/Copy.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/CreateFromTiles.js b/src/tilemaps/components/CreateFromTiles.js index 285ecf563..ca09f147d 100644 --- a/src/tilemaps/components/CreateFromTiles.js +++ b/src/tilemaps/components/CreateFromTiles.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/CullTiles.js b/src/tilemaps/components/CullTiles.js index d009ea35f..8d400f2e7 100644 --- a/src/tilemaps/components/CullTiles.js +++ b/src/tilemaps/components/CullTiles.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/Fill.js b/src/tilemaps/components/Fill.js index e2dc3f70d..545d80a22 100644 --- a/src/tilemaps/components/Fill.js +++ b/src/tilemaps/components/Fill.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/FilterTiles.js b/src/tilemaps/components/FilterTiles.js index 2094cfc3a..a8ed61193 100644 --- a/src/tilemaps/components/FilterTiles.js +++ b/src/tilemaps/components/FilterTiles.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/FindByIndex.js b/src/tilemaps/components/FindByIndex.js index 779049c6c..bb7ef8499 100644 --- a/src/tilemaps/components/FindByIndex.js +++ b/src/tilemaps/components/FindByIndex.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/FindTile.js b/src/tilemaps/components/FindTile.js index 53c7331df..d23229ea2 100644 --- a/src/tilemaps/components/FindTile.js +++ b/src/tilemaps/components/FindTile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/ForEachTile.js b/src/tilemaps/components/ForEachTile.js index 3b294afdd..0ea6c0b10 100644 --- a/src/tilemaps/components/ForEachTile.js +++ b/src/tilemaps/components/ForEachTile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/GetTileAt.js b/src/tilemaps/components/GetTileAt.js index 1c1f8e233..10bc3c657 100644 --- a/src/tilemaps/components/GetTileAt.js +++ b/src/tilemaps/components/GetTileAt.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/GetTileAtWorldXY.js b/src/tilemaps/components/GetTileAtWorldXY.js index b39a5a11f..f5632a44d 100644 --- a/src/tilemaps/components/GetTileAtWorldXY.js +++ b/src/tilemaps/components/GetTileAtWorldXY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/GetTilesWithin.js b/src/tilemaps/components/GetTilesWithin.js index 4e451e495..0a9e43b5e 100644 --- a/src/tilemaps/components/GetTilesWithin.js +++ b/src/tilemaps/components/GetTilesWithin.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/GetTilesWithinShape.js b/src/tilemaps/components/GetTilesWithinShape.js index 04121193d..0220b3160 100644 --- a/src/tilemaps/components/GetTilesWithinShape.js +++ b/src/tilemaps/components/GetTilesWithinShape.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/GetTilesWithinWorldXY.js b/src/tilemaps/components/GetTilesWithinWorldXY.js index cbfb514fd..ec4be5fa6 100644 --- a/src/tilemaps/components/GetTilesWithinWorldXY.js +++ b/src/tilemaps/components/GetTilesWithinWorldXY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/HasTileAt.js b/src/tilemaps/components/HasTileAt.js index 77ac9ab80..a87e87fe8 100644 --- a/src/tilemaps/components/HasTileAt.js +++ b/src/tilemaps/components/HasTileAt.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/HasTileAtWorldXY.js b/src/tilemaps/components/HasTileAtWorldXY.js index 784a6c9dc..5face02c9 100644 --- a/src/tilemaps/components/HasTileAtWorldXY.js +++ b/src/tilemaps/components/HasTileAtWorldXY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/IsInLayerBounds.js b/src/tilemaps/components/IsInLayerBounds.js index 344f00452..fa2dd2428 100644 --- a/src/tilemaps/components/IsInLayerBounds.js +++ b/src/tilemaps/components/IsInLayerBounds.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/PutTileAt.js b/src/tilemaps/components/PutTileAt.js index 9a0f8638e..ba7a03e29 100644 --- a/src/tilemaps/components/PutTileAt.js +++ b/src/tilemaps/components/PutTileAt.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/PutTileAtWorldXY.js b/src/tilemaps/components/PutTileAtWorldXY.js index 39bbf17a3..fc6b97dc4 100644 --- a/src/tilemaps/components/PutTileAtWorldXY.js +++ b/src/tilemaps/components/PutTileAtWorldXY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/PutTilesAt.js b/src/tilemaps/components/PutTilesAt.js index b9b32ae91..6ab2335f0 100644 --- a/src/tilemaps/components/PutTilesAt.js +++ b/src/tilemaps/components/PutTilesAt.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/Randomize.js b/src/tilemaps/components/Randomize.js index 500f66206..84f835823 100644 --- a/src/tilemaps/components/Randomize.js +++ b/src/tilemaps/components/Randomize.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/RemoveTileAt.js b/src/tilemaps/components/RemoveTileAt.js index a982e6795..d9af5dca6 100644 --- a/src/tilemaps/components/RemoveTileAt.js +++ b/src/tilemaps/components/RemoveTileAt.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/RemoveTileAtWorldXY.js b/src/tilemaps/components/RemoveTileAtWorldXY.js index 28bd3caf3..f491d166e 100644 --- a/src/tilemaps/components/RemoveTileAtWorldXY.js +++ b/src/tilemaps/components/RemoveTileAtWorldXY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/RenderDebug.js b/src/tilemaps/components/RenderDebug.js index c96e5eb6e..6d429772d 100644 --- a/src/tilemaps/components/RenderDebug.js +++ b/src/tilemaps/components/RenderDebug.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/ReplaceByIndex.js b/src/tilemaps/components/ReplaceByIndex.js index f8da2a8f9..6ecba2d35 100644 --- a/src/tilemaps/components/ReplaceByIndex.js +++ b/src/tilemaps/components/ReplaceByIndex.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/SetCollision.js b/src/tilemaps/components/SetCollision.js index 13bb021e6..6d437e89a 100644 --- a/src/tilemaps/components/SetCollision.js +++ b/src/tilemaps/components/SetCollision.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/SetCollisionBetween.js b/src/tilemaps/components/SetCollisionBetween.js index 3a5132ea5..0781728a0 100644 --- a/src/tilemaps/components/SetCollisionBetween.js +++ b/src/tilemaps/components/SetCollisionBetween.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/SetCollisionByExclusion.js b/src/tilemaps/components/SetCollisionByExclusion.js index 612882e4c..5bde401f8 100644 --- a/src/tilemaps/components/SetCollisionByExclusion.js +++ b/src/tilemaps/components/SetCollisionByExclusion.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/SetCollisionByProperty.js b/src/tilemaps/components/SetCollisionByProperty.js index 776b35cef..b3b887d29 100644 --- a/src/tilemaps/components/SetCollisionByProperty.js +++ b/src/tilemaps/components/SetCollisionByProperty.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/SetCollisionFromCollisionGroup.js b/src/tilemaps/components/SetCollisionFromCollisionGroup.js index d50bbca83..a2e103365 100644 --- a/src/tilemaps/components/SetCollisionFromCollisionGroup.js +++ b/src/tilemaps/components/SetCollisionFromCollisionGroup.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/SetLayerCollisionIndex.js b/src/tilemaps/components/SetLayerCollisionIndex.js index a02fa0eec..6b1e4dd17 100644 --- a/src/tilemaps/components/SetLayerCollisionIndex.js +++ b/src/tilemaps/components/SetLayerCollisionIndex.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/SetTileCollision.js b/src/tilemaps/components/SetTileCollision.js index 27a19dbba..94f13193b 100644 --- a/src/tilemaps/components/SetTileCollision.js +++ b/src/tilemaps/components/SetTileCollision.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/SetTileIndexCallback.js b/src/tilemaps/components/SetTileIndexCallback.js index 7857049d8..0608641e6 100644 --- a/src/tilemaps/components/SetTileIndexCallback.js +++ b/src/tilemaps/components/SetTileIndexCallback.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/SetTileLocationCallback.js b/src/tilemaps/components/SetTileLocationCallback.js index 1deda6bf4..c97eb9cc8 100644 --- a/src/tilemaps/components/SetTileLocationCallback.js +++ b/src/tilemaps/components/SetTileLocationCallback.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/Shuffle.js b/src/tilemaps/components/Shuffle.js index cb63d153a..ab51df45e 100644 --- a/src/tilemaps/components/Shuffle.js +++ b/src/tilemaps/components/Shuffle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/SwapByIndex.js b/src/tilemaps/components/SwapByIndex.js index 80297cd44..bd74cadde 100644 --- a/src/tilemaps/components/SwapByIndex.js +++ b/src/tilemaps/components/SwapByIndex.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/TileToWorldX.js b/src/tilemaps/components/TileToWorldX.js index 97654412a..8381ec586 100644 --- a/src/tilemaps/components/TileToWorldX.js +++ b/src/tilemaps/components/TileToWorldX.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/TileToWorldXY.js b/src/tilemaps/components/TileToWorldXY.js index 0822d5d96..b2fd83adf 100644 --- a/src/tilemaps/components/TileToWorldXY.js +++ b/src/tilemaps/components/TileToWorldXY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/TileToWorldY.js b/src/tilemaps/components/TileToWorldY.js index 88fa8089f..d3bcd6e0b 100644 --- a/src/tilemaps/components/TileToWorldY.js +++ b/src/tilemaps/components/TileToWorldY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/WeightedRandomize.js b/src/tilemaps/components/WeightedRandomize.js index a30acaf00..8dbd3d672 100644 --- a/src/tilemaps/components/WeightedRandomize.js +++ b/src/tilemaps/components/WeightedRandomize.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/WorldToTileX.js b/src/tilemaps/components/WorldToTileX.js index cfbc2a2bf..09cb73ad3 100644 --- a/src/tilemaps/components/WorldToTileX.js +++ b/src/tilemaps/components/WorldToTileX.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/WorldToTileXY.js b/src/tilemaps/components/WorldToTileXY.js index 424c2161c..7f315e583 100644 --- a/src/tilemaps/components/WorldToTileXY.js +++ b/src/tilemaps/components/WorldToTileXY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/WorldToTileY.js b/src/tilemaps/components/WorldToTileY.js index 37124f8de..bf4eeb6d9 100644 --- a/src/tilemaps/components/WorldToTileY.js +++ b/src/tilemaps/components/WorldToTileY.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/components/index.js b/src/tilemaps/components/index.js index 96efb7777..8f16bcd4b 100644 --- a/src/tilemaps/components/index.js +++ b/src/tilemaps/components/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/dynamiclayer/DynamicTilemapLayer.js b/src/tilemaps/dynamiclayer/DynamicTilemapLayer.js index 7d3d110a7..a5116a963 100644 --- a/src/tilemaps/dynamiclayer/DynamicTilemapLayer.js +++ b/src/tilemaps/dynamiclayer/DynamicTilemapLayer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/dynamiclayer/DynamicTilemapLayerCanvasRenderer.js b/src/tilemaps/dynamiclayer/DynamicTilemapLayerCanvasRenderer.js index 1a78b83f7..faad36f12 100644 --- a/src/tilemaps/dynamiclayer/DynamicTilemapLayerCanvasRenderer.js +++ b/src/tilemaps/dynamiclayer/DynamicTilemapLayerCanvasRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/dynamiclayer/DynamicTilemapLayerRender.js b/src/tilemaps/dynamiclayer/DynamicTilemapLayerRender.js index b5eca2265..e0b9089c3 100644 --- a/src/tilemaps/dynamiclayer/DynamicTilemapLayerRender.js +++ b/src/tilemaps/dynamiclayer/DynamicTilemapLayerRender.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js b/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js index 1855afbd6..2d6929626 100644 --- a/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js +++ b/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/index.js b/src/tilemaps/index.js index d9060c2e3..5f9b119c1 100644 --- a/src/tilemaps/index.js +++ b/src/tilemaps/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/mapdata/LayerData.js b/src/tilemaps/mapdata/LayerData.js index 8425fbb72..f000b90b2 100644 --- a/src/tilemaps/mapdata/LayerData.js +++ b/src/tilemaps/mapdata/LayerData.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/mapdata/MapData.js b/src/tilemaps/mapdata/MapData.js index 60759b766..4e572699d 100644 --- a/src/tilemaps/mapdata/MapData.js +++ b/src/tilemaps/mapdata/MapData.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/mapdata/ObjectLayer.js b/src/tilemaps/mapdata/ObjectLayer.js index d02ed4733..fe6c042b2 100644 --- a/src/tilemaps/mapdata/ObjectLayer.js +++ b/src/tilemaps/mapdata/ObjectLayer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/parsers/Parse.js b/src/tilemaps/parsers/Parse.js index 4bb05adac..b40ae6b3a 100644 --- a/src/tilemaps/parsers/Parse.js +++ b/src/tilemaps/parsers/Parse.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/parsers/Parse2DArray.js b/src/tilemaps/parsers/Parse2DArray.js index d0e3cab6c..3eaad6ec0 100644 --- a/src/tilemaps/parsers/Parse2DArray.js +++ b/src/tilemaps/parsers/Parse2DArray.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/parsers/ParseCSV.js b/src/tilemaps/parsers/ParseCSV.js index eb42c5761..8fafd5c1b 100644 --- a/src/tilemaps/parsers/ParseCSV.js +++ b/src/tilemaps/parsers/ParseCSV.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/parsers/impact/ParseTileLayers.js b/src/tilemaps/parsers/impact/ParseTileLayers.js index 545b31108..1368846ed 100644 --- a/src/tilemaps/parsers/impact/ParseTileLayers.js +++ b/src/tilemaps/parsers/impact/ParseTileLayers.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/parsers/impact/ParseTilesets.js b/src/tilemaps/parsers/impact/ParseTilesets.js index 3a15fd762..c2d076afc 100644 --- a/src/tilemaps/parsers/impact/ParseTilesets.js +++ b/src/tilemaps/parsers/impact/ParseTilesets.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/parsers/impact/ParseWeltmeister.js b/src/tilemaps/parsers/impact/ParseWeltmeister.js index 136e7cf3e..ccc0a4239 100644 --- a/src/tilemaps/parsers/impact/ParseWeltmeister.js +++ b/src/tilemaps/parsers/impact/ParseWeltmeister.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/parsers/impact/index.js b/src/tilemaps/parsers/impact/index.js index 658b4aa56..685ac101b 100644 --- a/src/tilemaps/parsers/impact/index.js +++ b/src/tilemaps/parsers/impact/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/parsers/index.js b/src/tilemaps/parsers/index.js index 91473510d..08fd4064b 100644 --- a/src/tilemaps/parsers/index.js +++ b/src/tilemaps/parsers/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/parsers/tiled/AssignTileProperties.js b/src/tilemaps/parsers/tiled/AssignTileProperties.js index d10100308..9b1de71dc 100644 --- a/src/tilemaps/parsers/tiled/AssignTileProperties.js +++ b/src/tilemaps/parsers/tiled/AssignTileProperties.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/parsers/tiled/Base64Decode.js b/src/tilemaps/parsers/tiled/Base64Decode.js index 64986cd25..dc04be944 100644 --- a/src/tilemaps/parsers/tiled/Base64Decode.js +++ b/src/tilemaps/parsers/tiled/Base64Decode.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/parsers/tiled/BuildTilesetIndex.js b/src/tilemaps/parsers/tiled/BuildTilesetIndex.js index b815dce97..8738af92d 100644 --- a/src/tilemaps/parsers/tiled/BuildTilesetIndex.js +++ b/src/tilemaps/parsers/tiled/BuildTilesetIndex.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/parsers/tiled/CreateGroupLayer.js b/src/tilemaps/parsers/tiled/CreateGroupLayer.js index 3a54c55f2..2c7b11b2a 100644 --- a/src/tilemaps/parsers/tiled/CreateGroupLayer.js +++ b/src/tilemaps/parsers/tiled/CreateGroupLayer.js @@ -1,6 +1,6 @@ /** * @author Seth Berrier - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/parsers/tiled/ParseGID.js b/src/tilemaps/parsers/tiled/ParseGID.js index d6b31d686..f32e295c6 100644 --- a/src/tilemaps/parsers/tiled/ParseGID.js +++ b/src/tilemaps/parsers/tiled/ParseGID.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/parsers/tiled/ParseImageLayers.js b/src/tilemaps/parsers/tiled/ParseImageLayers.js index 829e6c1c3..e8743f3a6 100644 --- a/src/tilemaps/parsers/tiled/ParseImageLayers.js +++ b/src/tilemaps/parsers/tiled/ParseImageLayers.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/parsers/tiled/ParseJSONTiled.js b/src/tilemaps/parsers/tiled/ParseJSONTiled.js index f0fb829ed..702652bc7 100644 --- a/src/tilemaps/parsers/tiled/ParseJSONTiled.js +++ b/src/tilemaps/parsers/tiled/ParseJSONTiled.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/parsers/tiled/ParseObject.js b/src/tilemaps/parsers/tiled/ParseObject.js index 6d2f95276..f067a99f3 100644 --- a/src/tilemaps/parsers/tiled/ParseObject.js +++ b/src/tilemaps/parsers/tiled/ParseObject.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/parsers/tiled/ParseObjectLayers.js b/src/tilemaps/parsers/tiled/ParseObjectLayers.js index a71e69b22..2492b47e0 100644 --- a/src/tilemaps/parsers/tiled/ParseObjectLayers.js +++ b/src/tilemaps/parsers/tiled/ParseObjectLayers.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/parsers/tiled/ParseTileLayers.js b/src/tilemaps/parsers/tiled/ParseTileLayers.js index a0c53197f..6c96de68a 100644 --- a/src/tilemaps/parsers/tiled/ParseTileLayers.js +++ b/src/tilemaps/parsers/tiled/ParseTileLayers.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/parsers/tiled/ParseTilesets.js b/src/tilemaps/parsers/tiled/ParseTilesets.js index a04d61b55..491af546c 100644 --- a/src/tilemaps/parsers/tiled/ParseTilesets.js +++ b/src/tilemaps/parsers/tiled/ParseTilesets.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/parsers/tiled/index.js b/src/tilemaps/parsers/tiled/index.js index 8b8e3788a..9f047d9dd 100644 --- a/src/tilemaps/parsers/tiled/index.js +++ b/src/tilemaps/parsers/tiled/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/staticlayer/StaticTilemapLayer.js b/src/tilemaps/staticlayer/StaticTilemapLayer.js index cf16c7934..4b921a2b3 100644 --- a/src/tilemaps/staticlayer/StaticTilemapLayer.js +++ b/src/tilemaps/staticlayer/StaticTilemapLayer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/staticlayer/StaticTilemapLayerCanvasRenderer.js b/src/tilemaps/staticlayer/StaticTilemapLayerCanvasRenderer.js index 0554201e1..2f2400f09 100644 --- a/src/tilemaps/staticlayer/StaticTilemapLayerCanvasRenderer.js +++ b/src/tilemaps/staticlayer/StaticTilemapLayerCanvasRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/staticlayer/StaticTilemapLayerRender.js b/src/tilemaps/staticlayer/StaticTilemapLayerRender.js index dc7d83419..765475025 100644 --- a/src/tilemaps/staticlayer/StaticTilemapLayerRender.js +++ b/src/tilemaps/staticlayer/StaticTilemapLayerRender.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/staticlayer/StaticTilemapLayerWebGLRenderer.js b/src/tilemaps/staticlayer/StaticTilemapLayerWebGLRenderer.js index 448310b2e..97ce164bf 100644 --- a/src/tilemaps/staticlayer/StaticTilemapLayerWebGLRenderer.js +++ b/src/tilemaps/staticlayer/StaticTilemapLayerWebGLRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tilemaps/typedefs/index.js b/src/tilemaps/typedefs/index.js index 7fe2c498d..35db8d257 100644 --- a/src/tilemaps/typedefs/index.js +++ b/src/tilemaps/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/time/Clock.js b/src/time/Clock.js index 44d317b89..38613e440 100644 --- a/src/time/Clock.js +++ b/src/time/Clock.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/time/TimerEvent.js b/src/time/TimerEvent.js index 59cf85e66..5e47d649b 100644 --- a/src/time/TimerEvent.js +++ b/src/time/TimerEvent.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/time/index.js b/src/time/index.js index 604122c06..82569d1b4 100644 --- a/src/time/index.js +++ b/src/time/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/time/typedefs/index.js b/src/time/typedefs/index.js index 0525e4d87..5e7502821 100644 --- a/src/time/typedefs/index.js +++ b/src/time/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/Timeline.js b/src/tweens/Timeline.js index 0c44e76c5..977849a49 100644 --- a/src/tweens/Timeline.js +++ b/src/tweens/Timeline.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/TweenManager.js b/src/tweens/TweenManager.js index 7aea97718..e36d9c92e 100644 --- a/src/tweens/TweenManager.js +++ b/src/tweens/TweenManager.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/builders/GetBoolean.js b/src/tweens/builders/GetBoolean.js index eaeb4f603..7de2bd46e 100644 --- a/src/tweens/builders/GetBoolean.js +++ b/src/tweens/builders/GetBoolean.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/builders/GetEaseFunction.js b/src/tweens/builders/GetEaseFunction.js index 37c6615fe..9f841a581 100644 --- a/src/tweens/builders/GetEaseFunction.js +++ b/src/tweens/builders/GetEaseFunction.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/builders/GetNewValue.js b/src/tweens/builders/GetNewValue.js index 8f5971752..0db1a09a6 100644 --- a/src/tweens/builders/GetNewValue.js +++ b/src/tweens/builders/GetNewValue.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/builders/GetProps.js b/src/tweens/builders/GetProps.js index 51951d987..805a31d8f 100644 --- a/src/tweens/builders/GetProps.js +++ b/src/tweens/builders/GetProps.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/builders/GetTargets.js b/src/tweens/builders/GetTargets.js index 423ba63f8..d59a85d3a 100644 --- a/src/tweens/builders/GetTargets.js +++ b/src/tweens/builders/GetTargets.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/builders/GetTweens.js b/src/tweens/builders/GetTweens.js index 827c78f18..2a22413bf 100644 --- a/src/tweens/builders/GetTweens.js +++ b/src/tweens/builders/GetTweens.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/builders/GetValueOp.js b/src/tweens/builders/GetValueOp.js index 012c7ad81..0ffea67bc 100644 --- a/src/tweens/builders/GetValueOp.js +++ b/src/tweens/builders/GetValueOp.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/builders/NumberTweenBuilder.js b/src/tweens/builders/NumberTweenBuilder.js index f5455b7df..dce16f939 100644 --- a/src/tweens/builders/NumberTweenBuilder.js +++ b/src/tweens/builders/NumberTweenBuilder.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/builders/StaggerBuilder.js b/src/tweens/builders/StaggerBuilder.js index 30a772256..1ba8f1de8 100644 --- a/src/tweens/builders/StaggerBuilder.js +++ b/src/tweens/builders/StaggerBuilder.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/builders/TimelineBuilder.js b/src/tweens/builders/TimelineBuilder.js index 752ea3702..3a554a61f 100644 --- a/src/tweens/builders/TimelineBuilder.js +++ b/src/tweens/builders/TimelineBuilder.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/builders/TweenBuilder.js b/src/tweens/builders/TweenBuilder.js index 8949a99db..3287eaa02 100644 --- a/src/tweens/builders/TweenBuilder.js +++ b/src/tweens/builders/TweenBuilder.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/builders/index.js b/src/tweens/builders/index.js index 1bdc23e9f..00c22a0fe 100644 --- a/src/tweens/builders/index.js +++ b/src/tweens/builders/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/events/TIMELINE_COMPLETE_EVENT.js b/src/tweens/events/TIMELINE_COMPLETE_EVENT.js index b0f422628..9d0b9b495 100644 --- a/src/tweens/events/TIMELINE_COMPLETE_EVENT.js +++ b/src/tweens/events/TIMELINE_COMPLETE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/events/TIMELINE_LOOP_EVENT.js b/src/tweens/events/TIMELINE_LOOP_EVENT.js index c9e60c6f6..402f4af89 100644 --- a/src/tweens/events/TIMELINE_LOOP_EVENT.js +++ b/src/tweens/events/TIMELINE_LOOP_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/events/TIMELINE_PAUSE_EVENT.js b/src/tweens/events/TIMELINE_PAUSE_EVENT.js index d328c073b..b2e74994b 100644 --- a/src/tweens/events/TIMELINE_PAUSE_EVENT.js +++ b/src/tweens/events/TIMELINE_PAUSE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/events/TIMELINE_RESUME_EVENT.js b/src/tweens/events/TIMELINE_RESUME_EVENT.js index c61d772c7..e05896652 100644 --- a/src/tweens/events/TIMELINE_RESUME_EVENT.js +++ b/src/tweens/events/TIMELINE_RESUME_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/events/TIMELINE_START_EVENT.js b/src/tweens/events/TIMELINE_START_EVENT.js index 950eada22..33f19bdca 100644 --- a/src/tweens/events/TIMELINE_START_EVENT.js +++ b/src/tweens/events/TIMELINE_START_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/events/TIMELINE_UPDATE_EVENT.js b/src/tweens/events/TIMELINE_UPDATE_EVENT.js index b7c9b1544..0d6bccb69 100644 --- a/src/tweens/events/TIMELINE_UPDATE_EVENT.js +++ b/src/tweens/events/TIMELINE_UPDATE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/events/TWEEN_ACTIVE_EVENT.js b/src/tweens/events/TWEEN_ACTIVE_EVENT.js index c80982ec6..b7a0f9f47 100644 --- a/src/tweens/events/TWEEN_ACTIVE_EVENT.js +++ b/src/tweens/events/TWEEN_ACTIVE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/events/TWEEN_COMPLETE_EVENT.js b/src/tweens/events/TWEEN_COMPLETE_EVENT.js index c6174cf25..e3f81d3c0 100644 --- a/src/tweens/events/TWEEN_COMPLETE_EVENT.js +++ b/src/tweens/events/TWEEN_COMPLETE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/events/TWEEN_LOOP_EVENT.js b/src/tweens/events/TWEEN_LOOP_EVENT.js index c8e924c41..bd08dcb55 100644 --- a/src/tweens/events/TWEEN_LOOP_EVENT.js +++ b/src/tweens/events/TWEEN_LOOP_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/events/TWEEN_REPEAT_EVENT.js b/src/tweens/events/TWEEN_REPEAT_EVENT.js index 62eaf24b2..e45e49d7c 100644 --- a/src/tweens/events/TWEEN_REPEAT_EVENT.js +++ b/src/tweens/events/TWEEN_REPEAT_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/events/TWEEN_START_EVENT.js b/src/tweens/events/TWEEN_START_EVENT.js index 874986d9f..c2e140063 100644 --- a/src/tweens/events/TWEEN_START_EVENT.js +++ b/src/tweens/events/TWEEN_START_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/events/TWEEN_UPDATE_EVENT.js b/src/tweens/events/TWEEN_UPDATE_EVENT.js index b27f7f740..c128a7a15 100644 --- a/src/tweens/events/TWEEN_UPDATE_EVENT.js +++ b/src/tweens/events/TWEEN_UPDATE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/events/TWEEN_YOYO_EVENT.js b/src/tweens/events/TWEEN_YOYO_EVENT.js index aa1a97199..75c3b967a 100644 --- a/src/tweens/events/TWEEN_YOYO_EVENT.js +++ b/src/tweens/events/TWEEN_YOYO_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/events/index.js b/src/tweens/events/index.js index dafd4690e..5822c6fa7 100644 --- a/src/tweens/events/index.js +++ b/src/tweens/events/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/index.js b/src/tweens/index.js index ea85a119f..e6ddd953d 100644 --- a/src/tweens/index.js +++ b/src/tweens/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/tween/Defaults.js b/src/tweens/tween/Defaults.js index be3b2cfad..27fe29ab9 100644 --- a/src/tweens/tween/Defaults.js +++ b/src/tweens/tween/Defaults.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/tween/ReservedProps.js b/src/tweens/tween/ReservedProps.js index 60ab5221c..8da523bf6 100644 --- a/src/tweens/tween/ReservedProps.js +++ b/src/tweens/tween/ReservedProps.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/tween/Tween.js b/src/tweens/tween/Tween.js index c90640a79..3e991516e 100644 --- a/src/tweens/tween/Tween.js +++ b/src/tweens/tween/Tween.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/tween/TweenData.js b/src/tweens/tween/TweenData.js index 73873911b..eeda85af7 100644 --- a/src/tweens/tween/TweenData.js +++ b/src/tweens/tween/TweenData.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/tween/const.js b/src/tweens/tween/const.js index 16a9deba7..abdbfd750 100644 --- a/src/tweens/tween/const.js +++ b/src/tweens/tween/const.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/tweens/typedefs/index.js b/src/tweens/typedefs/index.js index 29afa3f88..7bf3557e6 100644 --- a/src/tweens/typedefs/index.js +++ b/src/tweens/typedefs/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/Class.js b/src/utils/Class.js index a3c63232d..b1d6eec83 100644 --- a/src/utils/Class.js +++ b/src/utils/Class.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/NOOP.js b/src/utils/NOOP.js index c4c44660c..f4a4bead6 100644 --- a/src/utils/NOOP.js +++ b/src/utils/NOOP.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/Add.js b/src/utils/array/Add.js index 1f8e05c86..8ad2ca732 100644 --- a/src/utils/array/Add.js +++ b/src/utils/array/Add.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/AddAt.js b/src/utils/array/AddAt.js index 987e85016..ff48f0237 100644 --- a/src/utils/array/AddAt.js +++ b/src/utils/array/AddAt.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/BringToTop.js b/src/utils/array/BringToTop.js index 5e4eb5363..49c257533 100644 --- a/src/utils/array/BringToTop.js +++ b/src/utils/array/BringToTop.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/CountAllMatching.js b/src/utils/array/CountAllMatching.js index 2ef4d63ac..a5bac87cd 100644 --- a/src/utils/array/CountAllMatching.js +++ b/src/utils/array/CountAllMatching.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/Each.js b/src/utils/array/Each.js index cce170ed5..bf3aa8a6e 100644 --- a/src/utils/array/Each.js +++ b/src/utils/array/Each.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/EachInRange.js b/src/utils/array/EachInRange.js index 7236dfbae..404a2ea61 100644 --- a/src/utils/array/EachInRange.js +++ b/src/utils/array/EachInRange.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/FindClosestInSorted.js b/src/utils/array/FindClosestInSorted.js index b699b4a7a..30ce0f5cb 100644 --- a/src/utils/array/FindClosestInSorted.js +++ b/src/utils/array/FindClosestInSorted.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/GetAll.js b/src/utils/array/GetAll.js index 8ff1186b3..f765c91f6 100644 --- a/src/utils/array/GetAll.js +++ b/src/utils/array/GetAll.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/GetFirst.js b/src/utils/array/GetFirst.js index f06df02a7..902bcf65b 100644 --- a/src/utils/array/GetFirst.js +++ b/src/utils/array/GetFirst.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/GetRandom.js b/src/utils/array/GetRandom.js index 1356d72b9..9c1564e75 100644 --- a/src/utils/array/GetRandom.js +++ b/src/utils/array/GetRandom.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/MoveDown.js b/src/utils/array/MoveDown.js index b456f994e..ca94cd0dd 100644 --- a/src/utils/array/MoveDown.js +++ b/src/utils/array/MoveDown.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/MoveTo.js b/src/utils/array/MoveTo.js index da8814833..885e2927d 100644 --- a/src/utils/array/MoveTo.js +++ b/src/utils/array/MoveTo.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/MoveUp.js b/src/utils/array/MoveUp.js index 321a5af05..793608ade 100644 --- a/src/utils/array/MoveUp.js +++ b/src/utils/array/MoveUp.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/NumberArray.js b/src/utils/array/NumberArray.js index 0f86590fc..9e46efe8b 100644 --- a/src/utils/array/NumberArray.js +++ b/src/utils/array/NumberArray.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/NumberArrayStep.js b/src/utils/array/NumberArrayStep.js index 5cc68f92a..a17bed252 100644 --- a/src/utils/array/NumberArrayStep.js +++ b/src/utils/array/NumberArrayStep.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/QuickSelect.js b/src/utils/array/QuickSelect.js index 92f347473..1cd5e50cd 100644 --- a/src/utils/array/QuickSelect.js +++ b/src/utils/array/QuickSelect.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/Range.js b/src/utils/array/Range.js index fe89fafdd..4ba2d804b 100644 --- a/src/utils/array/Range.js +++ b/src/utils/array/Range.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/Remove.js b/src/utils/array/Remove.js index d7cb88239..edaab09c6 100644 --- a/src/utils/array/Remove.js +++ b/src/utils/array/Remove.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/RemoveAt.js b/src/utils/array/RemoveAt.js index 82bc0a4b2..83dca5c63 100644 --- a/src/utils/array/RemoveAt.js +++ b/src/utils/array/RemoveAt.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/RemoveBetween.js b/src/utils/array/RemoveBetween.js index 4e25a2982..5ef45c2eb 100644 --- a/src/utils/array/RemoveBetween.js +++ b/src/utils/array/RemoveBetween.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/RemoveRandomElement.js b/src/utils/array/RemoveRandomElement.js index e76228abd..113243f52 100644 --- a/src/utils/array/RemoveRandomElement.js +++ b/src/utils/array/RemoveRandomElement.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/Replace.js b/src/utils/array/Replace.js index d68c1d5a6..aab5fd2e9 100644 --- a/src/utils/array/Replace.js +++ b/src/utils/array/Replace.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/RotateLeft.js b/src/utils/array/RotateLeft.js index 77b7df1f7..9e706c4c7 100644 --- a/src/utils/array/RotateLeft.js +++ b/src/utils/array/RotateLeft.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/RotateRight.js b/src/utils/array/RotateRight.js index 317e459f3..783495688 100644 --- a/src/utils/array/RotateRight.js +++ b/src/utils/array/RotateRight.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/SafeRange.js b/src/utils/array/SafeRange.js index a79fbdb63..6a7400305 100644 --- a/src/utils/array/SafeRange.js +++ b/src/utils/array/SafeRange.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/SendToBack.js b/src/utils/array/SendToBack.js index 166ce697d..97834c3b1 100644 --- a/src/utils/array/SendToBack.js +++ b/src/utils/array/SendToBack.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/SetAll.js b/src/utils/array/SetAll.js index bdd43d280..db1e3b4f1 100644 --- a/src/utils/array/SetAll.js +++ b/src/utils/array/SetAll.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/Shuffle.js b/src/utils/array/Shuffle.js index a06330082..6ee815587 100644 --- a/src/utils/array/Shuffle.js +++ b/src/utils/array/Shuffle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/SpliceOne.js b/src/utils/array/SpliceOne.js index 8b83b2af1..4ac0175d2 100644 --- a/src/utils/array/SpliceOne.js +++ b/src/utils/array/SpliceOne.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/StableSort.js b/src/utils/array/StableSort.js index 924b17068..7a7812bcb 100644 --- a/src/utils/array/StableSort.js +++ b/src/utils/array/StableSort.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/Swap.js b/src/utils/array/Swap.js index cbe2f964b..3b95f33e3 100644 --- a/src/utils/array/Swap.js +++ b/src/utils/array/Swap.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/index.js b/src/utils/array/index.js index fb6ed012b..035f62ebd 100644 --- a/src/utils/array/index.js +++ b/src/utils/array/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/matrix/CheckMatrix.js b/src/utils/array/matrix/CheckMatrix.js index 3500c1cd1..82b63ac6a 100644 --- a/src/utils/array/matrix/CheckMatrix.js +++ b/src/utils/array/matrix/CheckMatrix.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/matrix/MatrixToString.js b/src/utils/array/matrix/MatrixToString.js index 95ef302ca..0b2602cd0 100644 --- a/src/utils/array/matrix/MatrixToString.js +++ b/src/utils/array/matrix/MatrixToString.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/matrix/ReverseColumns.js b/src/utils/array/matrix/ReverseColumns.js index 1e422ee73..b9aebed49 100644 --- a/src/utils/array/matrix/ReverseColumns.js +++ b/src/utils/array/matrix/ReverseColumns.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/matrix/ReverseRows.js b/src/utils/array/matrix/ReverseRows.js index 7199f64da..7488ed5c1 100644 --- a/src/utils/array/matrix/ReverseRows.js +++ b/src/utils/array/matrix/ReverseRows.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/matrix/Rotate180.js b/src/utils/array/matrix/Rotate180.js index 02bc97979..88455978f 100644 --- a/src/utils/array/matrix/Rotate180.js +++ b/src/utils/array/matrix/Rotate180.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/matrix/RotateLeft.js b/src/utils/array/matrix/RotateLeft.js index 46aea2230..d42599ec0 100644 --- a/src/utils/array/matrix/RotateLeft.js +++ b/src/utils/array/matrix/RotateLeft.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/matrix/RotateMatrix.js b/src/utils/array/matrix/RotateMatrix.js index 10e84485c..696b32bcd 100644 --- a/src/utils/array/matrix/RotateMatrix.js +++ b/src/utils/array/matrix/RotateMatrix.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/matrix/RotateRight.js b/src/utils/array/matrix/RotateRight.js index 0c74e6f4b..f88a16eec 100644 --- a/src/utils/array/matrix/RotateRight.js +++ b/src/utils/array/matrix/RotateRight.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/matrix/TransposeMatrix.js b/src/utils/array/matrix/TransposeMatrix.js index 2091bcee9..ec8326995 100644 --- a/src/utils/array/matrix/TransposeMatrix.js +++ b/src/utils/array/matrix/TransposeMatrix.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/array/matrix/index.js b/src/utils/array/matrix/index.js index ad41add97..85ce156f8 100644 --- a/src/utils/array/matrix/index.js +++ b/src/utils/array/matrix/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/base64/ArrayBufferToBase64.js b/src/utils/base64/ArrayBufferToBase64.js index 8fc3e3466..79ee1768f 100644 --- a/src/utils/base64/ArrayBufferToBase64.js +++ b/src/utils/base64/ArrayBufferToBase64.js @@ -1,7 +1,7 @@ /** * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/base64/Base64ToArrayBuffer.js b/src/utils/base64/Base64ToArrayBuffer.js index 85ade9635..0a9b97110 100644 --- a/src/utils/base64/Base64ToArrayBuffer.js +++ b/src/utils/base64/Base64ToArrayBuffer.js @@ -1,7 +1,7 @@ /** * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/base64/index.js b/src/utils/base64/index.js index 51edeed07..d52ccece2 100644 --- a/src/utils/base64/index.js +++ b/src/utils/base64/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/index.js b/src/utils/index.js index cda9f7c27..8f34d0e3f 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/object/Clone.js b/src/utils/object/Clone.js index eeae4d9f2..f82b161a4 100644 --- a/src/utils/object/Clone.js +++ b/src/utils/object/Clone.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/object/Extend.js b/src/utils/object/Extend.js index e5c27e9a2..53641ee0f 100644 --- a/src/utils/object/Extend.js +++ b/src/utils/object/Extend.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/object/GetAdvancedValue.js b/src/utils/object/GetAdvancedValue.js index 61b39d930..222362729 100644 --- a/src/utils/object/GetAdvancedValue.js +++ b/src/utils/object/GetAdvancedValue.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/object/GetFastValue.js b/src/utils/object/GetFastValue.js index e7c27e2cf..c7163b06d 100644 --- a/src/utils/object/GetFastValue.js +++ b/src/utils/object/GetFastValue.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/object/GetMinMaxValue.js b/src/utils/object/GetMinMaxValue.js index 97e24e484..9bc49d7a4 100644 --- a/src/utils/object/GetMinMaxValue.js +++ b/src/utils/object/GetMinMaxValue.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/object/GetValue.js b/src/utils/object/GetValue.js index c629b2660..26ff0ba5a 100644 --- a/src/utils/object/GetValue.js +++ b/src/utils/object/GetValue.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/object/HasAll.js b/src/utils/object/HasAll.js index a9509f206..4ddd97106 100644 --- a/src/utils/object/HasAll.js +++ b/src/utils/object/HasAll.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/object/HasAny.js b/src/utils/object/HasAny.js index b16aae61e..f7dfa93d0 100644 --- a/src/utils/object/HasAny.js +++ b/src/utils/object/HasAny.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/object/HasValue.js b/src/utils/object/HasValue.js index 3cd413410..9a8085774 100644 --- a/src/utils/object/HasValue.js +++ b/src/utils/object/HasValue.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/object/IsPlainObject.js b/src/utils/object/IsPlainObject.js index 16f62d84e..9ab025365 100644 --- a/src/utils/object/IsPlainObject.js +++ b/src/utils/object/IsPlainObject.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/object/Merge.js b/src/utils/object/Merge.js index a54760b96..48aa963d9 100644 --- a/src/utils/object/Merge.js +++ b/src/utils/object/Merge.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/object/MergeRight.js b/src/utils/object/MergeRight.js index 6d2692485..ce5825b26 100644 --- a/src/utils/object/MergeRight.js +++ b/src/utils/object/MergeRight.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/object/Pick.js b/src/utils/object/Pick.js index 1a25931bc..5bd377c26 100644 --- a/src/utils/object/Pick.js +++ b/src/utils/object/Pick.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/object/SetValue.js b/src/utils/object/SetValue.js index 161e4b364..c62157081 100644 --- a/src/utils/object/SetValue.js +++ b/src/utils/object/SetValue.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/object/index.js b/src/utils/object/index.js index 8df368644..2e27dadbe 100644 --- a/src/utils/object/index.js +++ b/src/utils/object/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/string/Format.js b/src/utils/string/Format.js index f7e2b9773..0aaae0993 100644 --- a/src/utils/string/Format.js +++ b/src/utils/string/Format.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/string/Pad.js b/src/utils/string/Pad.js index 6d2a9d6bc..d8e5c609e 100644 --- a/src/utils/string/Pad.js +++ b/src/utils/string/Pad.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/string/Reverse.js b/src/utils/string/Reverse.js index 8b34cb70a..22bfeba63 100644 --- a/src/utils/string/Reverse.js +++ b/src/utils/string/Reverse.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/string/UUID.js b/src/utils/string/UUID.js index 8671b33e7..37c2518be 100644 --- a/src/utils/string/UUID.js +++ b/src/utils/string/UUID.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/string/UppercaseFirst.js b/src/utils/string/UppercaseFirst.js index c93134386..e19e3b36d 100644 --- a/src/utils/string/UppercaseFirst.js +++ b/src/utils/string/UppercaseFirst.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/src/utils/string/index.js b/src/utils/string/index.js index 5f9ab781e..94ed8e12f 100644 --- a/src/utils/string/index.js +++ b/src/utils/string/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ From b46776a2c0a623bf2078b533cf29d02d24663fc0 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 15 Jan 2020 12:07:18 +0000 Subject: [PATCH 176/189] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a24ee4ce8..82d34bc22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log -## Version 3.22 - Kohaku - January 13th 2020 +## Version 3.22 - Kohaku - January 15th 2020 ### Matter Physics From 22d5c7a69e3090f36a795764979f1d1a48d4f2d4 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 15 Jan 2020 12:12:28 +0000 Subject: [PATCH 177/189] Fixed property name --- types/matter.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/matter.d.ts b/types/matter.d.ts index 5c30dea7e..49e02eeb0 100644 --- a/types/matter.d.ts +++ b/types/matter.d.ts @@ -1264,7 +1264,7 @@ declare namespace MatterJS { * @type vector * @default { x: 0, y: 0 } */ - pointA: Vector; + pointB: Vector; /** * A `Number` that specifies the target resting length of the constraint. From 8a741e2c621885abcfe90afd4b8ee17673b9b4b8 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 15 Jan 2020 12:12:39 +0000 Subject: [PATCH 178/189] 3.22 release defs --- types/phaser.d.ts | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/types/phaser.d.ts b/types/phaser.d.ts index 4a01f8707..67d6b1f41 100644 --- a/types/phaser.d.ts +++ b/types/phaser.d.ts @@ -45531,14 +45531,14 @@ declare namespace Phaser { /** * * @param loader A reference to the Loader that is responsible for this file. - * @param key The key of the file. Must be unique within both the Loader and the Texture Manager. + * @param key The key of the file. Must be unique within both the Loader and the Texture Manager. Or a config object. * @param atlasURL The absolute or relative URL to load the multi atlas json file from. * @param path Optional path to use when loading the textures defined in the atlas data. * @param baseURL Optional Base URL to use when loading the textures defined in the atlas data. * @param atlasXhrSettings Extra XHR Settings specifically for the atlas json file. * @param textureXhrSettings Extra XHR Settings specifically for the texture files. */ - constructor(loader: Phaser.Loader.LoaderPlugin, key: string, atlasURL?: string, path?: string, baseURL?: string, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject); + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.MultiAtlasFileConfig, atlasURL?: string, path?: string, baseURL?: string, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject); /** * Called by each File when it finishes loading. @@ -54343,6 +54343,10 @@ declare namespace Phaser { * The absolute or relative URL to load the multi atlas json file from. Or, a well formed JSON object. */ atlasURL?: string; + /** + * An alias for 'atlasURL'. If given, it overrides anything set in 'atlasURL'. + */ + url?: string; /** * The default file extension to use for the atlas json if no url is provided. */ @@ -60694,21 +60698,23 @@ declare namespace Phaser { rotation: number; /** - * The Body's rotation, in degrees, during the previous step. + * The Body rotation, in degrees, during the previous step. */ preRotation: number; /** - * The width of the Body's boundary, in pixels. - * If the Body is circular, this is also the Body's diameter. + * The width of the Body boundary, in pixels. + * If the Body is circular, this is also the diameter. + * If you wish to change the width use the `Body.setSize` method. */ - width: number; + readonly width: number; /** - * The height of the Body's boundary, in pixels. - * If the Body is circular, this is also the Body's diameter. + * The height of the Body boundary, in pixels. + * If the Body is circular, this is also the diameter. + * If you wish to change the height use the `Body.setSize` method. */ - height: number; + readonly height: number; /** * The unscaled width of the Body, in source pixels, as set by setSize(). @@ -77313,8 +77319,8 @@ declare namespace Phaser { /** * Send this Scene to sleep. * - * A sleeping Scene doesn't run it's update step or render anything, but it also isn't shut down - * or have any of its systems or children removed, meaning it can be re-activated at any point and + * A sleeping Scene doesn't run its update step or render anything, but it also isn't shut down + * or has any of its systems or children removed, meaning it can be re-activated at any point and * will carry on from where it left off. It also keeps everything in memory and events and callbacks * from other Scenes may still invoke changes within it, so be careful what is left active. * @param data A data object that will be passed in the 'sleep' event. @@ -77327,6 +77333,14 @@ declare namespace Phaser { */ wake(data?: object): Phaser.Scenes.Systems; + /** + * Returns any data that was sent to this Scene by another Scene. + * + * The data is also passed to `Scene.init` and in various Scene events, but + * you can access it at any point via this method. + */ + getData(): any; + /** * Is this Scene sleeping? */ @@ -78479,7 +78493,7 @@ declare namespace Phaser { * Be aware of https://developers.google.com/web/updates/2017/09/autoplay-policy-changes * @param game Reference to the current game instance. */ - function SoundManagerCreator(game: Phaser.Game): void; + function SoundManagerCreator(game: Phaser.Game): Phaser.Sound.HTML5AudioSoundManager | Phaser.Sound.WebAudioSoundManager | Phaser.Sound.NoAudioSoundManager; /** * Web Audio API implementation of the sound. From 8a22bae1b40df2e7b1947ae1506549ff0c8b2306 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 15 Jan 2020 12:25:36 +0000 Subject: [PATCH 179/189] Update README.md --- README.md | 339 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 249 insertions(+), 90 deletions(-) diff --git a/README.md b/README.md index faa8bc484..499a001ed 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Thousands of developers from indie and multi-national digital agencies, and univ **Learn:** [API Docs](https://photonstorm.github.io/phaser3-docs/index.html), [Support Forum][forum] and [StackOverflow](https://stackoverflow.com/questions/tagged/phaser-framework)
**Code:** 1700+ [Examples](https://phaser.io/examples) (source available in this [repo][examples])
**Read:** The [Phaser World](#newsletter) Newsletter
-**Chat:** [Slack](https://phaser.io/community/slack) and [Discord](https://phaser.io/community/discord)
+**Chat:** [Discord](https://phaser.io/community/discord) and [Slack](https://phaser.io/community/slack)
**Extend:** With [Phaser Plugins](https://phaser.io/shop/plugins)
**Be awesome:** [Support](#support) the future of Phaser
@@ -22,23 +22,21 @@ Grab the source and join the fun!
-> 22nd November 2019 +> 15th January 2020 -Welcome to the release of Phaser 3.21. This version continues our efforts to keep Phaser 3 updated and enhanced, including lots of great new features, updates and bug fixes. New in 3.21 is the ability for you to directly set the mipmap filter levels the WebGL Renderer uses when creating textures. Any valid WebGL1 filter is allowed and you can set the filter in your game config, or at runtime, as needed. This gives you far more control over the quality of highly scaled textures. +We're excited to announce the release of Phaser 3.22, the first of many in the year 2020. The main focus of 3.22 is all the work we've done on Matter Physics integration. Matter has been supported in Phaser since the first release, yet there were lots of things we wanted to do with it to make development life easier. 3.22 brings all of these to the front, including powerful new visual debugging options such as rendering contacts, velocity, the broadphase grid, sensors, joints and more. Matter also now has 100% JSDoc and TypeScripy coverage and I spent a long time rebuilding the TypeScript defs by hand, in order to make them as accurate as possible. -Also new in 3.21 is the ability to soft-wrap BitmapText objects, based on a fixed pixel width. You can also define the wrapping character to be used. Arcade Physics has updates including `overlapCirc` which allows you to return all bodies (both dynamic and static) that intersect the given circular region. The Tilemap system has been updated to support Group Layers, which were introduced in a recent update of the Tiled Map Editor. These, along with Infinite Tilemaps, are now parsed correctly. +As well as docs and defs there are stacks of handy new methods, including intersection tests such as `intersectPoint`, `intersectRay`, `overlap` and more. New Body level collision callbacks allow you to filter collided pairs a lot more quickly now, combined with new collision events and data type defs to give you all the information you need when resolving. There are now functions to create bodies from SVG data, JSON data or Physics Editor data directly, new Body alignment features and of course bug fixes. -As usual, there's more: Including lots of new Group features, several new Actions for setting scroll factors, the ability to run at a fixed frame rate under setTimeout, a new method that lets you rebind the Web Audio Context (handy for PWA environments), fixes for drag distances and we even fixed a few IE9 (yes, really!) compatibility issues. +It's not all about Matter Physics, though. Thanks to the community, there are new Math Distance functions such as Chebyshev, Snake and Squared Points. You can now tint particles as they're emitted, Physics Groups finally let you use your own creation and removal callbacks and plenty more besides. There are, of course, lots of bug fixes too and I've done my best to address some of the most important ones. The documentation has improved yet again and with every release the TypeScript defs get stronger and stronger. So, as usual, please do spend some time digging through the [Change Log](#changelog). I assure you, it's worth while :) -As usual, it doesn't end here. There are plenty more fixes, features and updates across the API. You'll find loads more great new features, updates and fixes. So, as usual, please do spend some time digging through the [Change Log](#changelog). I assure you, it's worth while :) - -It was really great to receive a bunch of quality Pull Requests from the Phaser community, many of which found their way into 3.21. The past few versions have seen a lot of significant improvements, from comprehensive Spine support, to full Video playback, it's been an exciting few months. Things traditionally get a little more quiet around this time of the year but we're planning out 3.22 already and continuing to work through the issues list. During this time, we're also working hard on Phaser 4. You can follow development progress of both on the Phaser Patreon. +With 3.22 released I will now be taking some time to carry on with Phaser 4 development, while planning out the 3.23 release as well. Even though Phaser 4 is in build I will fully support Phaser 3 for the foreseeable future. You can follow the development progress of both versions on the Phaser Patreon. As usual, I'd like to send a massive thank-you to everyone who supports Phaser on Patreon (and now even GitHub Sponsors, too!) Your continued backing keeps allowing me to work on Phaser full-time and this great new releases is the very real result of that. If you've ever considered becoming a backer, now is the perfect time! If you'd like to stay abreast of developments then I publish my [Developer Logs](https://phaser.io/phaser3/devlog) in the [Phaser World](https://phaser.io/community/newsletter) newsletter. Subscribe to stay in touch and get all the latest news from the core team and the wider community. -You can also follow Phaser on [Twitter](https://twitter.com/phaser_) and chat with fellow Phaser devs in our [Slack](https://phaser.io/community/slack) and [Discord](https://phaser.io/community/discord) channels. +You can also follow Phaser on [Twitter](https://twitter.com/phaser_) and chat with fellow Phaser devs in our [Discord](https://phaser.io/community/discord) and [Slack](https://phaser.io/community/slack) channels. Phaser 3 wouldn't have been possible without the fantastic support of the community and Patreon. Thank you to everyone who supports our work, who shares our belief in the future of HTML5 gaming, and Phaser's role in that. @@ -200,13 +198,13 @@ We've 3 tutorials related to Facebook Instant Games and Phaser: A special build of Phaser with the Facebook Instant Games Plugin ready-enabled is [available on jsDelivr](https://www.jsdelivr.com/projects/phaser). Include the following in your html: ```html - + ``` or the minified version: ```html - + ``` The build files are in the git repository in the `dist` folder, and you can also include the plugin in custom builds. @@ -223,7 +221,7 @@ Create an `index.html` page locally and paste the following code into it: - + @@ -334,96 +332,257 @@ You can then run `webpack` to create a development build in the `build` folder w # Change Log -## Version 3.21.0 - Senku - 22nd November 2019 +## Version 3.22 - Kohaku - January 15th 2020 + +### Matter Physics + +All of the following are specific to the Matter Physics implementation used by Phaser: + +#### Matter Physics New Features + +* Matter Physics now has 100% JSDoc coverage! Woohoo :) +* Matter Physics now has brand new TypeScript defs included in the `types` folder :) +* `MatterDebugConfig` is a new configuration object that contains all of the following new Matter debug settings: +* `showAxes`- Render all of the body axes? +* `showAngleIndicator`- Render just a single body axis? +* `angleColor`- The color of the body angle / axes lines. +* `showBroadphase`- Render the broadphase grid? +* `broadphaseColor`- The color of the broadphase grid. +* `showBounds`- Render the bounds of the bodies in the world? +* `boundsColor`- The color of the body bounds. +* `showVelocity`- Render the velocity of the bodies in the world? +* `velocityColor`- The color of the body velocity line. +* `showCollisions`- Render the collision points and normals for colliding pairs. +* `collisionColor`- The color of the collision points. +* `showSeparation`- Render lines showing the separation between bodies. +* `separationColor`- The color of the body separation line. +* `showBody`- Render the dynamic bodies in the world to the Graphics object? +* `showStaticBody`- Render the static bodies in the world to the Graphics object? +* `showInternalEdges`- When rendering bodies, render the internal edges as well? +* `renderFill`- Render the bodies using a fill color. +* `renderLine`- Render the bodies using a line stroke. +* `fillColor`- The color value of the fill when rendering dynamic bodies. +* `fillOpacity`- The opacity of the fill when rendering dynamic bodies, a value between 0 and 1. +* `lineColor`- The color value of the line stroke when rendering dynamic bodies. +* `lineOpacity`- The opacity of the line when rendering dynamic bodies, a value between 0 and 1. +* `lineThickness`- If rendering lines, the thickness of the line. +* `staticFillColor`- The color value of the fill when rendering static bodies. +* `staticLineColor`- The color value of the line stroke when rendering static bodies. +* `showSleeping`- Render any sleeping bodies (dynamic or static) in the world to the Graphics object? +* `staticBodySleepOpacity`] - The amount to multiply the opacity of sleeping static bodies by. +* `sleepFillColor`- The color value of the fill when rendering sleeping dynamic bodies. +* `sleepLineColor`- The color value of the line stroke when rendering sleeping dynamic bodies. +* `showSensors`- Render bodies or body parts that are flagged as being a sensor? +* `sensorFillColor`- The fill color when rendering body sensors. +* `sensorLineColor`- The line color when rendering body sensors. +* `showPositions`- Render the position of non-static bodies? +* `positionSize`- The size of the rectangle drawn when rendering the body position. +* `positionColor`- The color value of the rectangle drawn when rendering the body position. +* `showJoint`- Render all world constraints to the Graphics object? +* `jointColor`- The color value of joints when `showJoint` is set. +* `jointLineOpacity`- The line opacity when rendering joints, a value between 0 and 1. +* `jointLineThickness`- The line thickness when rendering joints. +* `pinSize`- The size of the circles drawn when rendering pin constraints. +* `pinColor`- The color value of the circles drawn when rendering pin constraints. +* `springColor`- The color value of spring constraints. +* `anchorColor`- The color value of constraint anchors. +* `anchorSize`- The size of the circles drawn as the constraint anchors. +* `showConvexHulls`- When rendering polygon bodies, render the convex hull as well? +* `hullColor`- The color value of hulls when `showConvexHulls` is set. +* `World.renderBody` is a new method that will render a single Matter Body to the given Graphics object. This is used internally during debug rendering but is also public. This allows you to control which bodies are rendered and to which Graphics object, should you wish to use them in-game and not just during debugging. +* `World.renderConstraint` is a new method that will render a single Matter Constraint, such as a pin or a spring, to the given Graphics object. This is used internally during debug rendering but is also public. This allows you to control which constraints are rendered and to which Graphics object, should you wish to use them in-game and not just during debugging. +* `World.renderConvexHull` is a new method that will render the convex hull of a single Matter Body, to the given Graphics object. This is used internally during debug rendering but is also public. This allows you to control which hulls are rendered and to which Graphics object, should you wish to use them in-game and not just during debugging. +* `World.renderGrid` is a new method that will render the broadphase Grid to the given graphics instance. +* `World.renderBodyBounds` is a new method that will render the bounds of all the given bodies to the given graphics instance. +* `World.renderBodyAxes` is a new method that will render the axes of all the given bodies to the given graphics instance. +* `World.renderBodyVelocity` is a new method that will render a velocity line for all the given bodies to the given graphics instance. +* `World.renderSeparations` is a new method that will render the separations in the current pairs list to the given graphics instance. +* `World.renderCollisions` is a new method that will render the collision points and normals in the current pairs list to the given graphics instance. +* `World.getAllBodies` is a new method that will return all bodies in the Matter World. +* `World.getAllConstraints` is a new method that will return all constraints in the Matter World. +* `World.getAllComposites` is a new method that will return all composites in the Matter World. +* `MatterPhysics.composite` is a new reference to the `Matter.Composite` module for easy access from within a Scene. +* `MatterPhysics.detector` is a new reference to the `Matter.Dectector` module for easy access from within a Scene. +* `MatterPhysics.grid` is a new reference to the `Matter.Grid` module for easy access from within a Scene. +* `MatterPhysics.pair` is a new reference to the `Matter.Pair` module for easy access from within a Scene. +* `MatterPhysics.pairs` is a new reference to the `Matter.Pairs` module for easy access from within a Scene. +* `MatterPhysics.query` is a new reference to the `Matter.Query` module for easy access from within a Scene. +* `MatterPhysics.resolver` is a new reference to the `Matter.Resolver` module for easy access from within a Scene. +* `MatterPhysics.sat` is a new reference to the `Matter.SAT` module for easy access from within a Scene. +* `MatterPhysics.constraint` is a new reference to the `Matter.Constraint` module for easy access from within a Scene. +* `MatterPhysics.composites` is a new reference to the `Matter.Composites` module for easy access from within a Scene. +* `MatterPhysics.axes` is a new reference to the `Matter.Axes` module for easy access from within a Scene. +* `MatterPhysics.bounds` is a new reference to the `Matter.Bounds` module for easy access from within a Scene. +* `MatterPhysics.svg` is a new reference to the `Matter.Svg` module for easy access from within a Scene. +* `MatterPhysics.vector` is a new reference to the `Matter.Vector` module for easy access from within a Scene. +* `MatterPhysics.vertices` is a new reference to the `Matter.Vertices` module for easy access from within a Scene. +* `BEFORE_ADD` is a new Event dispatched by `Matter.World` when a Body or Constraint is about to be added to the World. +* `AFTER_ADD` is a new Event dispatched by `Matter.World` when a Body or Constraint has been added to the World. +* `BEFORE_REMOVE` is a new Event dispatched by `Matter.World` when a Body or Constraint is about to be removed from the World. +* `AFTER_REMOVE` is a new Event dispatched by `Matter.World` when a Body or Constraint has been removed from the World. +* `Body.render.lineOpacity` is a new property on the Matter Body object that allows for custom debug rendering. +* `Body.render.lineThickness` is a new property on the Matter Body object that allows for custom debug rendering. +* `Body.render.fillOpacity` is a new property on the Matter Body object that allows for custom debug rendering. +* `World.setCompositeRenderStyle` is a new method that lets you quickly set the render style values on the children of the given compposite. +* `World.setBodyRenderStyle` is a new method that lets you quickly set the render style values on the given Body. +* `World.setConstraintRenderStyle` is a new method that lets you quickly set the render style values on the given Constraint. +* You can now set `restingThresh` in the Matter Configuration file to adjust the Resolver property. +* You can now set `restingThreshTangent` in the Matter Configuration file to adjust the Resolver property. +* You can now set `positionDampen` in the Matter Configuration file to adjust the Resolver property. +* You can now set `positionWarming` in the Matter Configuration file to adjust the Resolver property. +* You can now set `frictionNormalMultiplier` in the Matter Configuration file to adjust the Resolver property. +* `MatterPhysics.containsPoint` is a new method that returns a boolean if any of the given bodies intersect with the given point. +* `MatterPhysics.intersectPoint` is a new method that checks which bodies intersect with the given point and returns them. +* `MatterPhysics.intersectRect` is a new method that checks which bodies intersect with the given rectangular area, and returns them. Optionally, it can check which bodies are outside of the area. +* `MatterPhysics.intersectRay` is a new method that checks which bodies intersect with the given ray segment and returns them. Optionally, you can set the width of the ray. +* `MatterPhysics.intersectBody` is a new method that checks which bodies intersect with the given body and returns them. If the bodies are set to not collide this can be used as an overlaps check. +* `MatterPhysics.overlap` is a new method that takes a target body and checks to see if it overlaps with any of the bodies given. If they do, optional `process` and `overlap` callbacks are invoked, passing the overlapping bodies to them, along with additional collision data. +* `MatterPhysics.setCollisionCategory` is a new method that will set the collision filter category to the value given, on all of the bodies given. This allows you to easily set the category on bodies that don't have a Phaser Matter Collision component. +* `MatterPhysics.setCollisionGroup` is a new method that will set the collision filter group to the value given, on all of the bodies given. This allows you to easily set the group on bodies that don't have a Phaser Matter Collision component. +* `MatterPhysics.setCollidesWith` is a new method that will set the collision filter mask to the value given, on all of the bodies given. This allows you to easily set the filter mask on bodies that don't have a Phaser Matter Collision component. +* `Matter.Body.centerOfMass` is a new vec2 property added to the Matter Body object that retains the center of mass coordinates when the Body is first created, or has parts added to it. These are float values, derived from the body position and bounds. +* `Matter.Body.centerOffset` is a new vec2 property added to the Matter Body object that retains the center offset coordinates when the Body is first created, or has parts added to it. These are pixel values. +* `Constraint.pointAWorld` is a new method added to Matter that returns the world-space position of `constraint.pointA`, accounting for `constraint.bodyA`. +* `Constraint.pointBWorld` is a new method added to Matter that returns the world-space position of `constraint.pointB`, accounting for `constraint.bodyB`. +* `Body.setCentre` is a new method added to Matter that allows you to set the center of mass of a Body (please note the English spelling of this function.) +* `Body.scale` is a new read-only vector that holds the most recent scale values as passed to `Body.scale`. +* `Matter.Bodies.flagCoincidentParts` is a new function that will flags all internal edges (coincident parts) on an array of body parts. This was previously part of the `fromVertices` function, but has been made external for outside use. +* `Matter.getMatterBodies` is a new function that will return an array of Matter JS Bodies from the given input array, which can be Matter Game Objects, or any class that extends them. +* `Matter.World.has` is a new method that will take a Matter Body, or Game Object, and search the world for it. If found, it will return `true`. +* Matter now has the option to use the Runner that it ships with. The Matter Runner operates in two modes: fixed and variable. In the fixed mode, the Matter Engine updates at a fixed delta value every frame (which is what Phaser has used since the first version). In variable mode, the delta will be smoothed and capped each frame to keep the simulation constant, but at the cost of determininism. You can configure the runner by setting the `runner` property in the Matter Config object, both of which are fully covered with JSDocs. As of 3.22 the runner is now used by default in variable (non-fixed) mode. If you wish to return to the previous behavior, set `runner: { isFixed: true }`. +* `Body.onCollideCallback` is a new Matter Body property that can point to a callback to invoke when the body starts colliding. +* `Body.onCollideEndCallback` is a new Matter Body property that can point to a callback to invoke when the body stops colliding. +* `Body.onCollideActiveCallback` is a new Matter Body property that can point to a callback to invoke for the duration the body is colliding. +* `Body.onCollideWith` is a new Matter Body property that holds a mapping between bodies and collision callbacks. +* `MatterGameObject.setOnCollide` is a new method available on any Matter Game Object, that sets a callback that is invoked when the body collides with another. +* `MatterGameObject.setOnCollideEnd` is a new method available on any Matter Game Object, that sets a callback that is invoked when the body stops colliding. +* `MatterGameObject.setOnCollideActive` is a new method available on any Matter Game Object, that sets a callback which is invoked for the duration of the bodies collision with another. +* `MatterGameObject.setOnCollideWith` is a new method available on any Matter Game Object, that allows you to set a callback to be invoked whenever the body collides with another specific body, or array of bodies. +* `Body.gravityScale` is a new vector property that allows you to scale the effect of world gravity on a specific Body. +* `MatterPhysics._tempVec2` is a new private internal vector used for velocity and force calculations. +* `MatterPhysics.setVelocity` is a new method that will set both the horizontal and vertical linear velocity of the given physics bodies. This can be used on all Matter bodies, not just those created via the factory. +* `MatterPhysics.setVelocityX` is a new method that will set the horizontal linear velocity of the given physics bodies. This can be used on all Matter bodies, not just those created via the factory. +* `MatterPhysics.setVelocityY` is a new method that will set the vertical linear velocity of the given physics bodies. This can be used on all Matter bodies, not just those created via the factory. +* `MatterPhysics.setAngularVelocity` is a new method that will set the angular velocity of the given physics bodies. This can be used on all Matter bodies, not just those created via the factory. +* `MatterPhysics.applyForce` is a new method that applies a force to a body, at the bodies current position, including resulting torque. This can be used on all Matter bodies, not just those created via the factory. +* `MatterPhysics.applyForceFromPosition` is a new method that applies a force to a body from the given world position, including resulting torque. If no angle is given, the current body angle is used. This can be used on all Matter bodies, not just those created via the factory. +* `MatterPhysics.fromSVG` is a new method that allows you to create a Body from the given SVG path data. +* The `Matter.Factory.velocity` method has been removed. Please now use `MatterPhysics.setVelocity` instead. +* The `Matter.Factory.angularVelocity` method has been removed. Please now use `MatterPhysics.setAngularVelocity` instead. +* The `Matter.Factory.force` method has been removed. Please now use `MatterPhysics.applyForce` instead. +* `MatterBodyConfig` is a new type def that contains all of the Body configuration properties. This is now used through-out the JSDocs to aid in code-completion. +* `MatterBodyRenderConfig` is a new type def that contains all of the Body debug rendering configuration properties. This is now used through-out the JSDocs to aid in code-completion. +* `MatterChamferConfig` is a new type def that contains all of the chamfer configuration properties. This is now used through-out the JSDocs to aid in code-completion. +* `MatterCollisionFilter` is a new type def that contains all of the collision configuration properties. This is now used through-out the JSDocs to aid in code-completion. +* `MatterConstraintConfig` is a new type def that contains all of the constraint configuration properties. This is now used through-out the JSDocs to aid in code-completion. +* `MatterConstraintRenderConfig` is a new type def that contains all of the Constraint debug rendering configuration properties. This is now used through-out the JSDocs to aid in code-completion. +* `MatterSetBodyConfig` is a new type def that contains all of the Constraint debug rendering configuration properties. This is now used through-out the JSDocs to aid in code-completion. +* `MatterPhysics.getConstraintLength` is a new method that will return the length of the given constraint, as this is something you cannot get from the constraint properties directly. +* `MatterPhysics.alignBody` is a new method that will align a Body, or Matter Game Object, against the given coordinates, using the given alignment constant. For example, this allows you to easily position a body to the `BOTTOM_LEFT`, or `TOP_CENTER`, or a coordinate. Alignment is based on the body bounds. +* `Phaser.Types.Physics.Matter.MatterBody` is a new type def that contains all of the valid Matter Body objects. This is now used through-out the JSDocs to aid in code-completion. +* `Matter.BodyBounds` is a new class that contains methods to help you extract world coordinates from various points around the bounds of a Matter Body. Because Matter bodies are positioned based on their center of mass, and not a dimension based center, you often need to get the bounds coordinates in order to properly align them in the world. You can access this new class via `this.matter.bodyBounds`. +* The method signature for `Matter.PhysicsEditorParser.parseBody` has changed. It now takes `(x, y, config, options)` and no longer has `width` and `height` parameters. Please see the updated documentation for more details if you were calling this method directly. +* `MatterPhysics.fromPhysicsEditor` is a new method that allows you to create a Matter Body based on the given PhysicsEditor shape data. Previously, you could only using PhysicsEditor data with a Matter Game Object, but now you can create a body directly using it. +* `Matter.PhysicsJSONParser` is a new parser that will create Matter bodies from JSON physics data files. Currently onto the Phaser Physics Tracer app exports in this format, but details are published in the JSDocs, so any app can do so. +* `Matter.Factory.fromJSON` is a new method that will create a body from a JSON physics data file. +* The `SetBody` Matter component can now automatically use shapes created in the Phaser Physics Tracer App in the JSON data format. +* `Matter.Components.Sleep.setToSleep` is a new method available on any Matter Game Object that will send the body to sleep, if Engine sleeping has been enabled. +* `Matter.Components.Sleep.setAwake` is a new method available on any Matter Game Object that will awake a body from sleep, if Engine sleeping has been enabled. + +#### Matter Physics Updates + +* The `debug` property in the Matter World Config is now a `MatterDebugConfig` option instead of a boolean. However, if a boolean is given, it will use the default debug config values. +* The following `MatterWorldConfig` options have now been removed: `debugShowBody`, `debugShowStaticBody`, `debugBodyColor`, `debugBodyFillColor`, `debugStaticBodyColor`, `debugShowJoint`, `debugJointColor`, `debugWireframes`, `debugShowInternalEdges`, `debugShowConvexHulls`, `debugConvexHullColor` and `debugShowSleeping`. These can all be set via the new `MatterDebugConfig` object instead. +* The object `World.defaults` has been removed. Defaults are now access via `World.debugDefaults`. +* `World.renderBodies` has been rewritten to cache commonly-used values and avoid a situation when a single body would be rendered twice. +* The private method `World.renderConvexHulls` has been removed as it's no longer used internally. +* The private method `World.renderWireframes` has been removed as it's no longer used internally. +* The method `World.fromPath` has been removed. This was never used internally and you can get the same results by calling `Vertices.fromPath`. +* The `World.setBounds` argument `thickness` now defaults to 64, not 128, to keep it matching the Matter World Config. +* The `Body.render.fillStyle` property that existed on the Matter Body object has been removed and replaced with `fillColor`. +* The `Body.render.strokeStyle` property that existed on the Matter Body object has been removed and replaced with `lineColor`. +* `Matter.Body.render.sprite.xOffset` and `yOffset` are no longer set to anything when a Body is created. They are left as zero, or you can override them in the Body config, in which case the value is added to the sprite origin offset during a call to `setExistingBody`. +* The `Matter.Mass.centerOfMass` component property now returns the pre-calculated Body `centerOfMass` property, which is much more accurate than the previous bounds offset value. +* `Matter.setExistingBody`, which is called interally whenever a Body is set on a Game Object, now uses the new `centerOffset` values to ensure that the texture frame is correctly centered based on the center of mass, not the Body bounds, allowing for much more accurate body to texture mapping with complex multi-part compound bodies. +* The `Matter.PhysicsEditorParser` has been updated so it no longer needs to set the render offsets, and instead uses the center of mass values. +* If the `Matter.Body` config doesn't contain a `position` property, it will now default to using `Vertices.centre(body.vertices)` as the position. In most cases, this is what you need, so it saves having to pass it in the config object. +* Bumped Matter Plugin versions to avoid console logs from Common.info and Common.warn. +* `PhysicsEditorParser.parseVertices` now uses `Bodies.flagCoincidentParts` to avoid duplicating code. +* `MatterGameObject` has a new optional boolean constructor parameter `addToWorld` which lets you control if the Body should be added to the world or not. Useful for toggling off should you be merging pre-existing bodies with Game Objects. +* The `Matter.SetBody.setExistingBody` function, which all Matter Game Objects have, has a new parameter `addToWorld` which allows you to control when the body is added to the Matter world should you not require it immediately. It will also only add the body to the world if it doesn't already exist within it, or any of its composites. +* `PointerConstraint` has been recoded so that when pressed down, it only polls the World for a body hit test during the next game update. This stops it coming out of sync with the state of the world. Use of the constraint remains the same as before. +* You can now set `gravity: false` in your Matter Config and it will reset gravity from the defaults to zero. +* The internal Matter `Composite.setModified` function will now emit a `compositeModified` event, which the Matter World listens for, if debug draw is enabled, so it can update the composite children render styles. +* `Matter.PhysicsEditorParser.parseBody` can now accept a MatterBodyConfig file as a 4th parameter. This allows you to set Body properties when the body is created, overriding whatever values may have been set in the PhysicsEditor JSON. + +#### Matter Physics Bug Fixes + +* Due to the rewrite of the debug rendering, it is now possible to render _just_ constraints, where-as before this was only possible if bodies were being rendered as well. Fix #4880 (thanks @roberto257) +* `Matter.PhysicsEditorParser` had a bug where it would allow fixtures with non-clockwise sorted vertices through, which would break pointer constraint interaction with these bodies. The parser now sorts the vertices properly. Fix #4261 (thanks @Sanchez3) ### New Features -* You can now specify the mipmap filter level to be used when creating WebGL textures. This can be set in the Game Config using the new `mipmapFilter` property, which is a string, such as 'NEAREST_MIPMAP_NEAREST'. Or, you can set the new `WebGLRenderer.mipmapFilter` property to a valid GLenum. If you set it on the renderer, it will only impact any textures loaded _after_ it has been set, so do so in your Scene `init` method if you want it to be used for textures you're about to load. By changing the mipmap level you can drastically improve the quality when reducing large textures. Please note, due to WebGL1 limitations, this only works on power-of-two sized textures. It also works on textures created from Canvas, Videos or RenderTextures. -* `BitmapText.setMaxWidth` is a new method that allows you to set a maximum width (in pixels) for the BitmapText to take up when rendering. Lines of text longer than `maxWidth` will be wrapped, based on whitespace, to the next line. This allows you to do word-wrapping on BitmapText objects, something only previously possible on Text objects. -* `BitmapText.wordWrapCharCode` is a new property that works with `setMaxWidth` that allows you to control which character code causes a line-wrap. By default it is 32 (a space character). -* `ArcadePhysics.closest` now has an optional `targets` argument. The targets can be any Arcade Physics Game Object, Body or Static Body and it will return only the closet target from those given (thanks @samme) -* `ArcadePhysics.furthest` now has an optional `targets` argument. The targets can be any Arcade Physics Game Object, Body or Static Body and it will return only the furthest target from those given (thanks @samme) -* `Tilemaps.Parsers.Tiled.CreateGroupLayer` is a new function that parses a Tiled group layer and adds in support for Tiled layer groups (introduced in Tiled 1.2.0). Feature #4099 (thanks @Babeetlebum @Olliebrown) -* The Tilemap system now supports infinite Tilemaps from the Tiled map editor (thanks @Olliebrown) -* `Tilemap.getImageLayerNames` is a new method that returns a list of all valid imagelayer names loaded in the Tilemap (thanks @Olliebrown) -* `Tilemap.getObjectLayerNames` is a new method that returns a list of all valid objectgroup names loaded in the Tilemap (thanks @Olliebrown) -* `Tilemap.getTileLayerNames` is a new method that returns a list of all valid tilelayer names loaded in the Tilemap (thanks @Olliebrown) -* When `forceSetTimeOut` is set to `true` in the Game Config, you can now set the target frame rate by setting the `fps.target` value (thanks @pavels) -* Videos can now be loaded from a data URI, allowing for base64 encoded videos to be used in the Loader instead of file based ones. Although, as with all base64 encoded data, we strongly recommend against this (thanks @apasov) -* `Math.MIN_SAFE_INTEGER` is a new math const that stores the minimum safe integer for browsers that don't provide this, such as IE (thanks @jronn) -* `Math.MAX_SAFE_INTEGER` is a new math const that stores the maximum safe integer for browsers that don't provide this, such as IE (thanks @jronn) -* `KeyCodes.NUMPAD_ADD` has been added to the keycodes list (thanks @Martin-Antonov) -* `KeyCodes.NUMPAD_SUBTRACT` has been added to the keycodes list (thanks @Martin-Antonov) -* `Video.removeVideoElementOnDestroy` is a new boolean property that allows you to control if the Video element is removed from the DOM when the Video Game Object is destroyed. -* `Actions.SetScrollFactor` is a new Action that will set the scroll factor on an array of Game Objects, including stepped incremental changes per item (thanks @rexrainbow) -* `Actions.SetScrollFactorX` is a new Action that will set the horizontal scroll factor on an array of Game Objects, including stepped incremental changes per item (thanks @rexrainbow) -* `Actions.SetScrollFactorY` is a new Action that will set the horizontal scroll factor on an array of Game Objects, including stepped incremental changes per item (thanks @rexrainbow) -* The `Group` config object now supports use of the `setScrollFactor` property to set the value on each child of the Group (thanks @rexrainbow) -* `Group.propertyValueSet` is a new method that sets a given property on each Group member (thanks @rexrainbow) -* `Group.propertyValueInc` is a new method that adds an amount to a given property on each Group member (thanks @rexrainbow) -* `Group.setX` is a new method that sets the x coordinate on each Group member (thanks @rexrainbow) -* `Group.setY` is a new method that sets the y coordinate on each Group member (thanks @rexrainbow) -* `Group.setXY` is a new method that sets the x and y coordinate on each Group member (thanks @rexrainbow) -* `Group.incX` is a new method that increments the x coordinate on each Group member (thanks @rexrainbow) -* `Group.incY` is a new method that increments the y coordinate on each Group member (thanks @rexrainbow) -* `Group.incXY` is a new method that increments the x and y coordinate on each Group member (thanks @rexrainbow) -* `Group.shiftPosition` is a new method that iterates the Group members and shifts the position of each to the previous members position (thanks @rexrainbow) -* `Group.angle` is a new method that sets the angle property on each Group member (thanks @rexrainbow) -* `Group.rotate` is a new method that sets the rotation property on each Group member (thanks @rexrainbow) -* `Group.rotateAround` is a new method that rotates each Group member around the given point, by the given angle (thanks @rexrainbow) -* `Group.rotateAroundDistance` is a new method that rotates each Group member around the given point, by the given angle and distance (thanks @rexrainbow) -* `Group.setAlpha` is a new method that sets the alpha property on each Group member (thanks @rexrainbow) -* `Group.setTint` is a new method that sets the tint property on each Group member (thanks @rexrainbow) -* `Group.setOrigin` is a new method that sets the origin property on each Group member (thanks @rexrainbow) -* `Group.scaleX` is a new method that sets the x scale on each Group member (thanks @rexrainbow) -* `Group.scaleY` is a new method that sets the y scale on each Group member (thanks @rexrainbow) -* `Group.scaleXY` is a new method that sets the x and y scale on each Group member (thanks @rexrainbow) -* `Group.setBlendMode` is a new method that sets the blend mode on each Group member (thanks @rexrainbow) -* `Group.setHitArea` is a new method that passes all Group members to the Input Plugin to enable them for input (thanks @rexrainbow) -* `Group.shuffle` is a new method that shuffles all of the Group members in place (thanks @rexrainbow) -* `Group.setVisible` is a new method that sets the visible state on each Group member (thanks @rexrainbow) -* `WebAudioSoundManager.setAudioContext` is a new method that allows you to set the Sound Manager Audio Context to a different context instance. It will also disconnect and re-create the gain nodes on the new context. -* `Group.type` is a new property that holds a string-based name of the Game Object type, as with other GO's (thanks @samme) -* `Arade.Group.type` is a new property that holds a string-based name of the Game Object type, as with other GO's (thanks @samme) -* `Arcade.StaticGroup.type` is a new property that holds a string-based name of the Game Object type, as with other GO's (thanks @samme) -* `ArcadePhysics.overlapCirc` is a new method that allows you to return an array of all Arcade Physics bodies that overlap with the given circular area of the world. It can return either dynamic or static bodies, or a mixture of both (thanks @samme) +* `TimeStep.smoothStep` is a new boolean property that controls if any delta smoothing takes place during the game step. Delta smoothing has been enabled in Phaser since the first version and helps avoid delta spikes and dips, especially after loss of focus. However, you can now easily toggle if this happens via this property and the corresponding `FPSConfig` property. +* `Phaser.Math.Distance.BetweenPoints` is a new function that will return the distance between two Vector2-like objects (thanks @samme) +* `Phaser.Math.Distance.BetweenPointsSquared` is a new function that will return the squared distance between two Vector2-like objects (thanks @samme) +* `Phaser.Math.Distance.Chebyshev` is a new function that will return the Chebyshev (or chessboard) distance between two Vector2-like objects (thanks @samme) +* `Phaser.Math.Distance.Snake` is a new function that will return the rectilinear distance between two Vector2-like objects (thanks @samme) +* `ParticleEmitter.setTint` is a new method that will set the tint of emitted particles for the given Emitter only (thanks @samme) +* `ParticleEmitter.remove` is a new method that will remove the Emitter from its Emitter Manager (thanks @samme) +* `ParticleEmitterManager.removeEmitter` is a new method that will remove the given emitter from the manager, if the emitter belongs to it (thanks @samme) +* `AlphaSingle` is a new Game Object Component that allows a Game Object to set its alpha values, but only as a single uniform value, not on a per-quad basis. +* `Actions.AlignTo` (in combination with the new `Display.Align.To.QuickSet` function) allows you to align an array of Game Objects so they sit next to each other, one at a time. The first item isn't moved, the second is moved to sit next to the first, and so on. You can align them using any of the alignment constants (thanks @samme) +* `Scene.Systems.getData` is a new method that will return any data that was sent to the Scene by another Scene, i.e. during a `run` or `launch` command. You can access it via `this.sys.getData()` from within your Scene. +* `Group.internalCreateCallback` is a new optional callback that is invoked whenever a child is added to a Group. This is the same as `createCallback` except it's only for use by the parent class, allowing a parent to invoke a creation callback and for you to still provide one via the Group config. +* `Group.internalRemoveCallback` is a new optional callback that is invoked whenever a child is removed from a Group. This is the same as `removeCallback` except it's only for use by the parent class, allowing a parent to invoke a callback and for you to still provide one via the Group config. ### Updates -* `Curve.getPoints` can now take an optional array as the 3rd parameter in which to store the points results (thanks @rexrainbow) -* `Line.arcLengthDivisions` now overrides the default Curve value and is set to 1 to optimize the amount of points returned for a Line curve (thanks @rexrainbow) -* `ArcadePhysics.closest` will now no longer ever return the source in the target results (thanks @samme) -* `ArcadePhysics.furthest` will now no longer ever return the source in the target results (thanks @samme) -* `RequestAnimationFrame.target` is a new property that controls the fps rate (in ms) when setTimeout is used (thanks @pavels) -* The `WebAudioSoundManager.unlock` method will now listen for `keydown` events in order to unlock the Audio Context, as well as touch and pointer events, making it more accessible (thanks Nick Tipping) -* The `requestAnimationFrame` polyfill no longer expects a Browserify environment and uses `window` through-out, it also no longer adds in the same as performance.now does. -* `BitmapText.getTextBounds` didn't reset the dirty flag, causing the `GetBitmapTextSize` function to be called every time the Bitmap Text was rendered. With enough text objects on-screen this could negatively impact performance. The flag is now reset every time the bounds are recalculated. +* `Body.deltaXFinal` is a new method on Arcade Physics Bodies that will return the final change in the horizontal position of the body, as based on all the steps that took place this frame. This property is calculated during the `postUpdate` phase, so must be listened for accordingly (thanks Bambosh) +* `Body.deltaYFinal` is a new method on Arcade Physics Bodies that will return the final change in the vertical position of the body, as based on all the steps that took place this frame. This property is calculated during the `postUpdate` phase, so must be listened for accordingly (thanks Bambosh) +* `Body._tx` is a new internal private var, holding the Arcade Physics Body combined total delta x value. +* `Body._ty` is a new internal private var, holding the Arcade Physics Body combined total delta y value. +* `LineCurve.getUtoTmapping` has been updated to return `u` directly to avoid calculations as it's identical to `t` in a Line (thanks @rexrainbow) +* `Curve.getSpacedPoints` will now take an optional array as the 3rd parameter to store the points results in (thanks @rexrainbow) +* Trying to play or resume an audio file with an incorrect key will now throw a runtime error, instead of a console warning (thanks @samme) +* The `Shape` Game Object now uses the AlphaSingle component, allowing you to uniformly set the alpha of the shape, rather than a quad alpha, which never worked for Shape objects. +* The `Container` Game Object now uses the AlphaSingle component, allowing you to uniformly set the alpha of the container, rather than a quad alpha, which never worked consistently across Container children. Fix #4916 (thanks @laineus) +* The `DOMElement` Game Object now uses the AlphaSingle component, allowing you to uniformly set the alpha of the element, rather than a quad alpha, which never worked for these objects. +* The `Graphics` Game Object now uses the AlphaSingle component, allowing you to uniformly set the alpha of the element, rather than a quad alpha, which never worked for these objects. +* `TweenData` has a new property called `previous` which holds the eased property value prior to the update. +* The `TWEEN_UPDATE` event now sends two new parameters to the handler: `current` and `previous` which contain the current and previous property values. +* During `collideSpriteVsGroup` checks it will now skip bodies that are disabled to save doing a `contains` test (thanks @samme) +* `Display.Align.In.QuickSet` now accepts `LEFT_BOTTOM` as `BOTTOM_LEFT`, `LEFT_TOP` as `TOP_LEFT`, `RIGHT_BOTTOM` as `BOTTOM_RIGHT` and `RIGHT_TOP` as `TOP_RIGHT`. Fix #4927 (thanks @zaniar) +* `PhysicsGroup` now uses the new `internalCreateCallback` and `internalRemoveCallback` to handle its body creation and destruction, allowing you to use your own `createCallback` and `removeCallback` as defined in the Group config. Fix #4420 #4657 #4822 (thanks @S4n60w3n @kendistiller @scrubperson) +* `DOMElement` has a new private method `handleSceneEvent` which will handle toggling the display setting of the element when a Scene sleeps and wakes. A DOM Element will now listen for the Scene sleep and wake events. These event listeners are removed in the `preDestroy` method. +* A `DOMElement` will now set the display mode to 'none' during its render if the Scene in which it belongs is no longer visible. ### Bug Fixes -* The Spine Plugin was not clearing down the resize event listener in WebGL, causing it to still fire even if the Scene was closed. Fix #4808 (thanks @RollinSafary) -* When a game is created with the HEADLESS renderer, `Game.destroy()` had no effect and the game kept on running. Now it destroys itself properly. Fix #4804 (thanks @samme) -* `DOM.GetScreenOrientation` was returning the wrong consts from the Scale Manager (thanks @jcyuan) -* When using `Input.enableDebug` on Game Objects it would not render the debug graphic correctly if the hit area had been offset. It now adjusts the debug correctly for all common hit-area geometry types. Fix #4722 (thanks @HaoboZ @Olliebrown) -* Light2D was not properly working for DynamicTilemapLayers due to a change in the way tilesets were stored, throwing an Uncaught TypeError at runtime. This is now handled correctly. Fix #4167 #4079 (thanks @koljakutschera @blackjack26 @kainage) -* `Input.dragDistanceThreshold` was not working correctly since 3.18, snapping to the wrong drag state unless the time threshold was also set. Fix #4667 (thanks @muliawanw @Olliebrown) -* `Tilemap.convertLayerToStatic` would throw an error when used multiple times, due to an error with the layer index count. Fix #4737 (thanks @Olliebrown @Vegita2) -* The `Tween` class now uses a cached MAX_SAFE_INTEGER making it compatible with Internet Explorer (thanks @jronn) -* The `StaggerBuilder` class now uses a cached MAX_SAFE_INTEGER making it compatible with Internet Explorer (thanks @jronn) -* The `Rectangle.FromPoints` function now uses a cached MIN_SAFE_INTEGER making it compatible with Internet Explorer (thanks @jronn) -* The `Video` class now uses a cached MIN_SAFE_INTEGER making it compatible with Internet Explorer (thanks @jronn) -* The `Path` class now uses a cached MIN_SAFE_INTEGER making it compatible with Internet Explorer (thanks @jronn) -* `Video.destroy` has been renamed to `Video.preDestroy`, so that it now destroys properly like all other Game Objects. Fix #4821 (thanks @rexrainbow) -* The Video Game Object will now check to see if the browser supports the `HTMLVideoElement` before creating one (thanks @jcyuan) -* The `DOM.GetScreenOrientation` functions would return out-dated consts (thanks @jcyuan) -* When calling `TileSprite.setTexture` or `setFrame`, if the new frame size didn't match the old one, the new fill pattern would become distorted and the `potWidth` and `potHeight` values would be incorrect. -* Timeline callbacks with extra parameters like `onStart` would miss the first parameter when the callback was invoked. Fix #4810 (thanks @samme) +* BitmapText with a `maxWidth` set wouldn't update the text correctly if it was modified post-creation. You can now update the text and/or width independantly and it'll update correctly. Fix #4881 (thanks @oxguy3) +* Text objects will no longer add any white-space when word-wrapping if the last line is only one word long. Fix #4867 (thanks @gaamoo @rexrainbow) +* When `Game.destroy` is running, Scenes are now destroyed _before_ plugins, avoiding bugs when closing down plugins and deleting Render Textures. Fix #4849 #4876 (thanks @rexrainbow @siyuanqiao) +* The `Mesh` and `Quad` Game Objects have had the `GetBounds` component removed as it cannot operate on a Mesh as they don't have origins. Fix #4902 (thanks @samme) +* Setting `lineSpacing` in the Text Game Object style config would set the value but not apply it to the Text, leaving you to call `updateText` yourself. If set, it's now applied on instantiation. Fix #4901 (thanks @FantaZZ) +* External calls to the Fullscreen API using `element.requestFullscreen()` would be blocked by the Scale Manager. The Scale Manager will no longer call `stopFullScreen` should it be triggered outside of Phaser (thanks @AdamXA) +* The `Tilemaps.Tile.tint` property wasn't working correctly as it expected the colors in the wrong order (BGR instead of RGB). It will now expect them in the correct RGB order (thanks @Aedalus @plissken2013es) +* The `ScaleManager.destroy` method wasn't being called when the Game `DESTROY` event was dispatched, causing minor gc to build up. The destroy method will now be called properly on game destruction. Fix #4944 (thanks @sunshineuoow) +* `FacebookInstantGamesPlugin.showAd` and `showVideo` will now break out of the ad iteration search once a valid ad has been found and called. Previously, it would carry on interating if the async didn't complete quickly. Fix #4888 (thanks @east62687) +* When playing an Animation, if you were to play another, then pause it, then play another the internal `_paused` wouldn't get reset, preventing you from them pausing the animations from that point on. You can now play and pause animations at will. Fix #4835 (thanks @murteira) +* In `Actions.GridAlign` if you set `width` to -1 it would align the items vertically, instead of horizontally. It now aligns them horizontally if `width` is set, or vertically if `height` is set. Fix #4899 (thanks @BenjaVR) +* A `PathFollower` with a very short duration would often not end in the correct place, which is the very end of the Path, due to the tween handling the movement not running one final update when the tween was complete. It will now always end at the final point of the path, no matter how short the duration. Fix #4950 (thanks @bramp) +* A `DOMElement` would still remain visible even if the Scene in which it belongs to was sent to sleep. A sleeping Scene shouldn't render anything. DOM Elements will now respond to sleep and wake events from their parent Scene. Fix #4870 (thanks @peonmodel) +* If a config object was passed to `MultiAtlasFile` it expected the atlas URL to be in the `url` property, however the docs and file config expected it in `atlasURL`. You can now use either of these properties to declare the url. Fix #4815 (thanks @xense) ### Examples, Documentation and TypeScript My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs: -@samme (for contributing loads of new Arcade Physics examples) @dranitski @jcyuan @RollinSafary @ilyaryabchinski @jsoref @jcyuan @ghclark2 +@fselcukcan Bambosh @louisth @hexus @javigaralva @samme @BeLi4L @jcyuan @javigaralva @T-Grave @bramp @Chnapy @dranitski @RollinSafary @xense + +The Matter TypeScript defs have been updated to include lots of missing classes, removed some redundant elements and general fixes. The Phaser TypeScript defs now reference the Matter defs directly and no longer try to parse them from the JSDocs. This allows the `MatterJS` namespace to work in TypeScript projects without any compilation warnings. + +The Spine Plugin now has new TypeScript defs in the `types` folder thanks to @supertommy Please see the complete [Change Log](https://github.com/photonstorm/phaser/blob/master/CHANGELOG.md) for previous releases. @@ -454,8 +613,8 @@ All rights reserved. "Above all, video games are meant to be just one thing: fun. Fun for everyone." - Satoru Iwata -[get-js]: https://github.com/photonstorm/phaser/releases/download/v3.21.0/phaser.js -[get-minjs]: https://github.com/photonstorm/phaser/releases/download/v3.21.0/phaser.min.js +[get-js]: https://github.com/photonstorm/phaser/releases/download/v3.22.0/phaser.js +[get-minjs]: https://github.com/photonstorm/phaser/releases/download/v3.22.0/phaser.min.js [clone-http]: https://github.com/photonstorm/phaser.git [clone-ssh]: git@github.com:photonstorm/phaser.git [clone-ghwin]: github-windows://openRepo/https://github.com/photonstorm/phaser From 4a6b2087f77221f9d69e881d700f01b9f620590c Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 15 Jan 2020 12:45:59 +0000 Subject: [PATCH 180/189] Fixed internal callback handlers --- src/gameobjects/group/Group.js | 4 +-- src/physics/arcade/PhysicsGroup.js | 31 +++++++++++++++++++----- src/physics/arcade/StaticPhysicsGroup.js | 12 ++++----- 3 files changed, 33 insertions(+), 14 deletions(-) diff --git a/src/gameobjects/group/Group.js b/src/gameobjects/group/Group.js index 16d399b5e..b2d4f2937 100644 --- a/src/gameobjects/group/Group.js +++ b/src/gameobjects/group/Group.js @@ -223,7 +223,7 @@ var Group = new Class({ * @private * @since 3.22.0 */ - this.internalCreateCallback = null; + this.internalCreateCallback = GetFastValue(config, 'internalCreateCallback', null); /** * A function to be called when removing group members. @@ -234,7 +234,7 @@ var Group = new Class({ * @private * @since 3.22.0 */ - this.internalRemoveCallback = null; + this.internalRemoveCallback = GetFastValue(config, 'internalRemoveCallback', null); if (config) { diff --git a/src/physics/arcade/PhysicsGroup.js b/src/physics/arcade/PhysicsGroup.js index 25c34f327..0ec12d832 100644 --- a/src/physics/arcade/PhysicsGroup.js +++ b/src/physics/arcade/PhysicsGroup.js @@ -38,20 +38,42 @@ var PhysicsGroup = new Class({ function PhysicsGroup (world, scene, children, config) { - if (IsPlainObject(children)) + if (!children && !config) + { + config = { + internalCreateCallback: this.createCallbackHandler, + internalRemoveCallback: this.removeCallbackHandler + }; + } + else if (IsPlainObject(children)) { // children is a plain object, so swizzle them: config = children; children = null; + + config.internalCreateCallback = this.createCallbackHandler; + config.internalRemoveCallback = this.removeCallbackHandler; } else if (Array.isArray(children) && IsPlainObject(children[0])) { // children is an array of plain objects config = children[0]; + + var _this = this; + + children.forEach(function (singleConfig) + { + singleConfig.internalCreateCallback = _this.createCallbackHandler; + singleConfig.internalRemoveCallback = _this.removeCallbackHandler; + }); } - else if (config === undefined || children === undefined) + else { - config = {}; + // config is not defined and children is not a plain object nor an array of plain objects + config = { + internalCreateCallback: this.createCallbackHandler, + internalRemoveCallback: this.removeCallbackHandler + }; } /** @@ -125,9 +147,6 @@ var PhysicsGroup = new Class({ Group.call(this, scene, children, config); - this.internalCreateCallback = this.createCallbackHandler; - this.internalRemoveCallback = this.removeCallbackHandler; - /** * A textual representation of this Game Object. * Used internally by Phaser but is available for your own custom classes to populate. diff --git a/src/physics/arcade/StaticPhysicsGroup.js b/src/physics/arcade/StaticPhysicsGroup.js index 016f581ec..a5ff2821a 100644 --- a/src/physics/arcade/StaticPhysicsGroup.js +++ b/src/physics/arcade/StaticPhysicsGroup.js @@ -41,8 +41,8 @@ var StaticPhysicsGroup = new Class({ if (!children && !config) { config = { - createCallback: this.createCallbackHandler, - removeCallback: this.removeCallbackHandler, + internalCreateCallback: this.createCallbackHandler, + internalRemoveCallback: this.removeCallbackHandler, createMultipleCallback: this.createMultipleCallbackHandler, classType: ArcadeSprite }; @@ -53,8 +53,8 @@ var StaticPhysicsGroup = new Class({ config = children; children = null; - config.createCallback = this.createCallbackHandler; - config.removeCallback = this.removeCallbackHandler; + config.internalCreateCallback = this.createCallbackHandler; + config.internalRemoveCallback = this.removeCallbackHandler; config.createMultipleCallback = this.createMultipleCallbackHandler; config.classType = GetFastValue(config, 'classType', ArcadeSprite); } @@ -66,8 +66,8 @@ var StaticPhysicsGroup = new Class({ config.forEach(function (singleConfig) { - singleConfig.createCallback = this.createCallbackHandler; - singleConfig.removeCallback = this.removeCallbackHandler; + singleConfig.internalCreateCallback = this.createCallbackHandler; + singleConfig.internalRemoveCallback = this.removeCallbackHandler; singleConfig.createMultipleCallback = this.createMultipleCallbackHandler; singleConfig.classType = GetFastValue(singleConfig, 'classType', ArcadeSprite); }); From 85873d2958ba70344c9b5efd3c642e6799af9b6f Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 15 Jan 2020 13:03:56 +0000 Subject: [PATCH 181/189] 3.22 Release --- dist/phaser-arcade-physics.js | 13126 +++++----- dist/phaser-arcade-physics.min.js | 2 +- dist/phaser-facebook-instant-games.js | 27235 +++++++++++--------- dist/phaser-facebook-instant-games.min.js | 2 +- dist/phaser.js | 26341 +++++++++++-------- dist/phaser.min.js | 2 +- 6 files changed, 37916 insertions(+), 28792 deletions(-) diff --git a/dist/phaser-arcade-physics.js b/dist/phaser-arcade-physics.js index 1328df1ed..ce25cd167 100644 --- a/dist/phaser-arcade-physics.js +++ b/dist/phaser-arcade-physics.js @@ -91,7 +91,7 @@ return /******/ (function(modules) { // webpackBootstrap /******/ /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 1439); +/******/ return __webpack_require__(__webpack_require__.s = 1453); /******/ }) /************************************************************************/ /******/ ([ @@ -100,7 +100,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -354,7 +354,7 @@ module.exports = Class; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -381,7 +381,7 @@ module.exports = NOOP; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -424,7 +424,7 @@ module.exports = GetFastValue; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1063,7 +1063,7 @@ module.exports = Vector2; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1156,13 +1156,13 @@ module.exports = Point; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var PluginCache = __webpack_require__(21); -var SceneEvents = __webpack_require__(22); +var PluginCache = __webpack_require__(23); +var SceneEvents = __webpack_require__(19); /** * @classdesc @@ -1218,7 +1218,7 @@ var GameObjectFactory = new Class({ /** * A reference to the Scene Update List. * - * @name Phaser.GameObjects.GameObjectFactory#updateList; + * @name Phaser.GameObjects.GameObjectFactory#updateList * @type {Phaser.GameObjects.UpdateList} * @protected * @since 3.0.0 @@ -1261,14 +1261,14 @@ var GameObjectFactory = new Class({ /** * Adds an existing Game Object to this Scene. - * + * * If the Game Object renders, it will be added to the Display List. * If it has a `preUpdate` method, it will be added to the Update List. * * @method Phaser.GameObjects.GameObjectFactory#existing * @since 3.0.0 * - * @param {Phaser.GameObjects.GameObject} child - The child to be added to this Scene. + * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group)} child - The child to be added to this Scene. * * @return {Phaser.GameObjects.GameObject} The Game Object that was added. */ @@ -1323,8 +1323,19 @@ var GameObjectFactory = new Class({ }); -// Static method called directly by the Game Object factory functions - +/** + * Static method called directly by the Game Object factory functions. + * With this method you can register a custom GameObject factory in the GameObjectFactory, + * providing a name (`factoryType`) and the constructor (`factoryFunction`) in order + * to be called when you call to Phaser.Scene.add[ factoryType ] method. + * + * @method Phaser.GameObjects.GameObjectFactory.register + * @static + * @since 3.0.0 + * + * @param {string} factoryType - The key of the factory that you will use to call to Phaser.Scene.add[ factoryType ] method. + * @param {function} factoryFunction - The constructor function to be called when you invoke to the Phaser.Scene.add method. + */ GameObjectFactory.register = function (factoryType, factoryFunction) { if (!GameObjectFactory.prototype.hasOwnProperty(factoryType)) @@ -1333,6 +1344,17 @@ GameObjectFactory.register = function (factoryType, factoryFunction) } }; +/** + * Static method called directly by the Game Object factory functions. + * With this method you can remove a custom GameObject factory registered in the GameObjectFactory, + * providing a its `factoryType`. + * + * @method Phaser.GameObjects.GameObjectFactory.remove + * @static + * @since 3.0.0 + * + * @param {string} factoryType - The key of the factory that you want to remove from the GameObjectFactory. + */ GameObjectFactory.remove = function (factoryType) { if (GameObjectFactory.prototype.hasOwnProperty(factoryType)) @@ -1352,7 +1374,7 @@ module.exports = GameObjectFactory; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1423,7 +1445,7 @@ module.exports = GetValue; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1479,7 +1501,7 @@ module.exports = IsPlainObject; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1892,7 +1914,7 @@ if (true) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2026,17 +2048,17 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Contains = __webpack_require__(47); -var GetPoint = __webpack_require__(147); -var GetPoints = __webpack_require__(257); +var GetPoint = __webpack_require__(149); +var GetPoints = __webpack_require__(271); var GEOM_CONST = __webpack_require__(46); -var Line = __webpack_require__(55); -var Random = __webpack_require__(150); +var Line = __webpack_require__(56); +var Random = __webpack_require__(152); /** * @classdesc @@ -2537,7 +2559,7 @@ module.exports = Rectangle; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2547,27 +2569,28 @@ module.exports = Rectangle; module.exports = { - Alpha: __webpack_require__(252), - Animation: __webpack_require__(484), - BlendMode: __webpack_require__(255), - ComputedSize: __webpack_require__(527), - Crop: __webpack_require__(528), - Depth: __webpack_require__(256), - Flip: __webpack_require__(529), - GetBounds: __webpack_require__(530), - Mask: __webpack_require__(260), - Origin: __webpack_require__(547), - PathFollower: __webpack_require__(548), - Pipeline: __webpack_require__(151), - ScrollFactor: __webpack_require__(263), - Size: __webpack_require__(549), - Texture: __webpack_require__(550), - TextureCrop: __webpack_require__(551), - Tint: __webpack_require__(552), - ToJSON: __webpack_require__(264), - Transform: __webpack_require__(265), + Alpha: __webpack_require__(527), + AlphaSingle: __webpack_require__(266), + Animation: __webpack_require__(498), + BlendMode: __webpack_require__(269), + ComputedSize: __webpack_require__(546), + Crop: __webpack_require__(547), + Depth: __webpack_require__(270), + Flip: __webpack_require__(548), + GetBounds: __webpack_require__(549), + Mask: __webpack_require__(274), + Origin: __webpack_require__(566), + PathFollower: __webpack_require__(567), + Pipeline: __webpack_require__(153), + ScrollFactor: __webpack_require__(277), + Size: __webpack_require__(568), + Texture: __webpack_require__(569), + TextureCrop: __webpack_require__(570), + Tint: __webpack_require__(571), + ToJSON: __webpack_require__(278), + Transform: __webpack_require__(279), TransformMatrix: __webpack_require__(32), - Visible: __webpack_require__(266) + Visible: __webpack_require__(280) }; @@ -2578,7 +2601,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2670,13 +2693,13 @@ module.exports = MATH_CONST; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var ComponentsToJSON = __webpack_require__(264); -var DataManager = __webpack_require__(111); +var ComponentsToJSON = __webpack_require__(278); +var DataManager = __webpack_require__(113); var EventEmitter = __webpack_require__(9); var Events = __webpack_require__(90); @@ -2731,7 +2754,7 @@ var GameObject = new Class({ * * Phaser itself will never modify this value, although plugins may do so. * - * Use this property to track the state of a Game Object during its lifetime. For example, it could move from + * Use this property to track the state of a Game Object during its lifetime. For example, it could change from * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons. * If you need to store complex data about your Game Object, look at using the Data Component instead. @@ -3311,11 +3334,11 @@ module.exports = GameObject; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH = __webpack_require__(166); +var MATH = __webpack_require__(168); var GetValue = __webpack_require__(6); /** @@ -3398,13 +3421,13 @@ module.exports = GetAdvancedValue; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var PluginCache = __webpack_require__(21); -var SceneEvents = __webpack_require__(22); +var PluginCache = __webpack_require__(23); +var SceneEvents = __webpack_require__(19); /** * @classdesc @@ -3461,7 +3484,7 @@ var GameObjectCreator = new Class({ /** * A reference to the Scene Update List. * - * @name Phaser.GameObjects.GameObjectCreator#updateList; + * @name Phaser.GameObjects.GameObjectCreator#updateList * @type {Phaser.GameObjects.UpdateList} * @protected * @since 3.0.0 @@ -3566,7 +3589,7 @@ module.exports = GameObjectCreator; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3665,7 +3688,7 @@ module.exports = Extend; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3675,33 +3698,72 @@ module.exports = Extend; module.exports = { - BLUR: __webpack_require__(531), - BOOT: __webpack_require__(532), - CONTEXT_LOST: __webpack_require__(533), - CONTEXT_RESTORED: __webpack_require__(534), - DESTROY: __webpack_require__(535), - FOCUS: __webpack_require__(536), - HIDDEN: __webpack_require__(537), - PAUSE: __webpack_require__(538), - POST_RENDER: __webpack_require__(539), - POST_STEP: __webpack_require__(540), - PRE_RENDER: __webpack_require__(541), - PRE_STEP: __webpack_require__(542), - READY: __webpack_require__(543), - RESUME: __webpack_require__(544), - STEP: __webpack_require__(545), - VISIBLE: __webpack_require__(546) + BLUR: __webpack_require__(550), + BOOT: __webpack_require__(551), + CONTEXT_LOST: __webpack_require__(552), + CONTEXT_RESTORED: __webpack_require__(553), + DESTROY: __webpack_require__(554), + FOCUS: __webpack_require__(555), + HIDDEN: __webpack_require__(556), + PAUSE: __webpack_require__(557), + POST_RENDER: __webpack_require__(558), + POST_STEP: __webpack_require__(559), + PRE_RENDER: __webpack_require__(560), + PRE_STEP: __webpack_require__(561), + READY: __webpack_require__(562), + RESUME: __webpack_require__(563), + STEP: __webpack_require__(564), + VISIBLE: __webpack_require__(565) }; /***/ }), /* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Scenes.Events + */ + +module.exports = { + + BOOT: __webpack_require__(700), + CREATE: __webpack_require__(701), + DESTROY: __webpack_require__(702), + PAUSE: __webpack_require__(703), + POST_UPDATE: __webpack_require__(704), + PRE_UPDATE: __webpack_require__(705), + READY: __webpack_require__(706), + RENDER: __webpack_require__(707), + RESUME: __webpack_require__(708), + SHUTDOWN: __webpack_require__(709), + SLEEP: __webpack_require__(710), + START: __webpack_require__(711), + TRANSITION_COMPLETE: __webpack_require__(712), + TRANSITION_INIT: __webpack_require__(713), + TRANSITION_OUT: __webpack_require__(714), + TRANSITION_START: __webpack_require__(715), + TRANSITION_WAKE: __webpack_require__(716), + UPDATE: __webpack_require__(717), + WAKE: __webpack_require__(718) + +}; + + +/***/ }), +/* 20 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3848,23 +3910,23 @@ module.exports = FILE_CONST; /***/ }), -/* 20 */ +/* 21 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); +var CONST = __webpack_require__(20); var Events = __webpack_require__(81); var GetFastValue = __webpack_require__(2); -var GetURL = __webpack_require__(132); -var MergeXHRSettings = __webpack_require__(211); -var XHRLoader = __webpack_require__(433); -var XHRSettings = __webpack_require__(133); +var GetURL = __webpack_require__(134); +var MergeXHRSettings = __webpack_require__(212); +var XHRLoader = __webpack_require__(447); +var XHRSettings = __webpack_require__(135); /** * @classdesc @@ -4389,12 +4451,42 @@ module.exports = File; /***/ }), -/* 21 */ +/* 22 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Force a value within the boundaries by clamping it to the range `min`, `max`. + * + * @function Phaser.Math.Clamp + * @since 3.0.0 + * + * @param {number} value - The value to be clamped. + * @param {number} min - The minimum bounds. + * @param {number} max - The maximum bounds. + * + * @return {number} The clamped value. + */ +var Clamp = function (value, min, max) +{ + return Math.max(min, Math.min(max, value)); +}; + +module.exports = Clamp; + + +/***/ }), +/* 23 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4597,82 +4689,13 @@ PluginCache.destroyCustomPlugins = function () module.exports = PluginCache; -/***/ }), -/* 22 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Scenes.Events - */ - -module.exports = { - - BOOT: __webpack_require__(681), - CREATE: __webpack_require__(682), - DESTROY: __webpack_require__(683), - PAUSE: __webpack_require__(684), - POST_UPDATE: __webpack_require__(685), - PRE_UPDATE: __webpack_require__(686), - READY: __webpack_require__(687), - RENDER: __webpack_require__(688), - RESUME: __webpack_require__(689), - SHUTDOWN: __webpack_require__(690), - SLEEP: __webpack_require__(691), - START: __webpack_require__(692), - TRANSITION_COMPLETE: __webpack_require__(693), - TRANSITION_INIT: __webpack_require__(694), - TRANSITION_OUT: __webpack_require__(695), - TRANSITION_START: __webpack_require__(696), - TRANSITION_WAKE: __webpack_require__(697), - UPDATE: __webpack_require__(698), - WAKE: __webpack_require__(699) - -}; - - -/***/ }), -/* 23 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Force a value within the boundaries by clamping it to the range `min`, `max`. - * - * @function Phaser.Math.Clamp - * @since 3.0.0 - * - * @param {number} value - The value to be clamped. - * @param {number} min - The minimum bounds. - * @param {number} max - The maximum bounds. - * - * @return {number} The clamped value. - */ -var Clamp = function (value, min, max) -{ - return Math.max(min, Math.min(max, value)); -}; - -module.exports = Clamp; - - /***/ }), /* 24 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4756,7 +4779,7 @@ module.exports = GetTilesWithin; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4823,12 +4846,12 @@ module.exports = PropertyValueSet; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var CONST = __webpack_require__(29); -var Smoothing = __webpack_require__(162); +var Smoothing = __webpack_require__(164); // The pool into which the canvas elements are placed. var pool = []; @@ -5084,7 +5107,7 @@ module.exports = CanvasPool(); /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -5172,7 +5195,7 @@ module.exports = SetTransform; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -5300,7 +5323,7 @@ module.exports = BuildGameObject; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -5320,11 +5343,11 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.21.0', + VERSION: '3.22.0', BlendModes: __webpack_require__(52), - ScaleModes: __webpack_require__(230), + ScaleModes: __webpack_require__(231), /** * AUTO Detect Renderer. @@ -5438,14 +5461,14 @@ module.exports = CONST; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var Line = __webpack_require__(55); +var Line = __webpack_require__(56); /** * @classdesc @@ -5458,7 +5481,7 @@ var Line = __webpack_require__(55); * @constructor * @since 3.13.0 * - * @extends Phaser.GameObjects.Components.Alpha + * @extends Phaser.GameObjects.Components.AlphaSingle * @extends Phaser.GameObjects.Components.BlendMode * @extends Phaser.GameObjects.Components.ComputedSize * @extends Phaser.GameObjects.Components.Depth @@ -5479,7 +5502,7 @@ var Shape = new Class({ Extends: GameObject, Mixins: [ - Components.Alpha, + Components.AlphaSingle, Components.BlendMode, Components.ComputedSize, Components.Depth, @@ -5738,7 +5761,7 @@ module.exports = Shape; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -5793,7 +5816,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -6761,15 +6784,15 @@ module.exports = TransformMatrix; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var GetColor = __webpack_require__(160); -var GetColor32 = __webpack_require__(278); -var HSVToRGB = __webpack_require__(161); -var RGBToHSV = __webpack_require__(279); +var GetColor = __webpack_require__(162); +var GetColor32 = __webpack_require__(292); +var HSVToRGB = __webpack_require__(163); +var RGBToHSV = __webpack_require__(293); /** * @namespace Phaser.Display.Color @@ -7624,7 +7647,7 @@ module.exports = Color; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7691,7 +7714,7 @@ module.exports = PropertyValueInc; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7721,7 +7744,7 @@ module.exports = DegToRad; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7759,7 +7782,7 @@ module.exports = FillStyleCanvas; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7787,14 +7810,14 @@ module.exports = GetBottom; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * Positions the Game Object so that the bottom of its bounds aligns with the given coordinate. + * Positions the Game Object so that the top of its bounds aligns with the given coordinate. * - * @function Phaser.Display.Bounds.SetBottom + * @function Phaser.Display.Bounds.SetTop * @since 3.0.0 * * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] @@ -7804,14 +7827,14 @@ module.exports = GetBottom; * * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned. */ -var SetBottom = function (gameObject, value) +var SetTop = function (gameObject, value) { - gameObject.y = (value - gameObject.height) + (gameObject.height * gameObject.originY); + gameObject.y = value + (gameObject.height * gameObject.originY); return gameObject; }; -module.exports = SetBottom; +module.exports = SetTop; /***/ }), @@ -7820,7 +7843,7 @@ module.exports = SetBottom; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7848,7 +7871,7 @@ module.exports = GetLeft; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7881,7 +7904,7 @@ module.exports = SetLeft; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7909,7 +7932,7 @@ module.exports = GetRight; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7942,7 +7965,40 @@ module.exports = SetRight; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Positions the Game Object so that the bottom of its bounds aligns with the given coordinate. + * + * @function Phaser.Display.Bounds.SetBottom + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned. + * @param {number} value - The coordinate to position the Game Object bounds on. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned. + */ +var SetBottom = function (gameObject, value) +{ + gameObject.y = (value - gameObject.height) + (gameObject.height * gameObject.originY); + + return gameObject; +}; + +module.exports = SetBottom; + + +/***/ }), +/* 45 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7964,46 +8020,13 @@ var GetTop = function (gameObject) module.exports = GetTop; -/***/ }), -/* 45 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Positions the Game Object so that the top of its bounds aligns with the given coordinate. - * - * @function Phaser.Display.Bounds.SetTop - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned. - * @param {number} value - The coordinate to position the Game Object bounds on. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned. - */ -var SetTop = function (gameObject, value) -{ - gameObject.y = value + (gameObject.height * gameObject.originY); - - return gameObject; -}; - -module.exports = SetTop; - - /***/ }), /* 46 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8083,7 +8106,7 @@ module.exports = GEOM_CONST; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8118,7 +8141,7 @@ module.exports = Contains; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8128,21 +8151,21 @@ module.exports = Contains; module.exports = { - DESTROY: __webpack_require__(622), - FADE_IN_COMPLETE: __webpack_require__(623), - FADE_IN_START: __webpack_require__(624), - FADE_OUT_COMPLETE: __webpack_require__(625), - FADE_OUT_START: __webpack_require__(626), - FLASH_COMPLETE: __webpack_require__(627), - FLASH_START: __webpack_require__(628), - PAN_COMPLETE: __webpack_require__(629), - PAN_START: __webpack_require__(630), - POST_RENDER: __webpack_require__(631), - PRE_RENDER: __webpack_require__(632), - SHAKE_COMPLETE: __webpack_require__(633), - SHAKE_START: __webpack_require__(634), - ZOOM_COMPLETE: __webpack_require__(635), - ZOOM_START: __webpack_require__(636) + DESTROY: __webpack_require__(641), + FADE_IN_COMPLETE: __webpack_require__(642), + FADE_IN_START: __webpack_require__(643), + FADE_OUT_COMPLETE: __webpack_require__(644), + FADE_OUT_START: __webpack_require__(645), + FLASH_COMPLETE: __webpack_require__(646), + FLASH_START: __webpack_require__(647), + PAN_COMPLETE: __webpack_require__(648), + PAN_START: __webpack_require__(649), + POST_RENDER: __webpack_require__(650), + PRE_RENDER: __webpack_require__(651), + SHAKE_COMPLETE: __webpack_require__(652), + SHAKE_START: __webpack_require__(653), + ZOOM_COMPLETE: __webpack_require__(654), + ZOOM_START: __webpack_require__(655) }; @@ -8153,7 +8176,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8191,7 +8214,7 @@ module.exports = LineStyleCanvas; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8320,11 +8343,11 @@ module.exports = CONST; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(137); +var GetTileAt = __webpack_require__(138); var GetTilesWithin = __webpack_require__(24); /** @@ -8386,7 +8409,7 @@ module.exports = CalculateFacesWithin; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8721,11 +8744,45 @@ module.exports = { /***/ }), /* 53 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the distance between two sets of coordinates (points). + * + * @function Phaser.Math.Distance.Between + * @since 3.0.0 + * + * @param {number} x1 - The x coordinate of the first point. + * @param {number} y1 - The y coordinate of the first point. + * @param {number} x2 - The x coordinate of the second point. + * @param {number} y2 - The y coordinate of the second point. + * + * @return {number} The distance between each point. + */ +var DistanceBetween = function (x1, y1, x2, y2) +{ + var dx = x1 - x2; + var dy = y1 - y2; + + return Math.sqrt(dx * dx + dy * dy); +}; + +module.exports = DistanceBetween; + + +/***/ }), +/* 54 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8735,63 +8792,63 @@ module.exports = { module.exports = { - BOOT: __webpack_require__(803), - DESTROY: __webpack_require__(804), - DRAG_END: __webpack_require__(805), - DRAG_ENTER: __webpack_require__(806), - DRAG: __webpack_require__(807), - DRAG_LEAVE: __webpack_require__(808), - DRAG_OVER: __webpack_require__(809), - DRAG_START: __webpack_require__(810), - DROP: __webpack_require__(811), - GAME_OUT: __webpack_require__(812), - GAME_OVER: __webpack_require__(813), - GAMEOBJECT_DOWN: __webpack_require__(814), - GAMEOBJECT_DRAG_END: __webpack_require__(815), - GAMEOBJECT_DRAG_ENTER: __webpack_require__(816), - GAMEOBJECT_DRAG: __webpack_require__(817), - GAMEOBJECT_DRAG_LEAVE: __webpack_require__(818), - GAMEOBJECT_DRAG_OVER: __webpack_require__(819), - GAMEOBJECT_DRAG_START: __webpack_require__(820), - GAMEOBJECT_DROP: __webpack_require__(821), - GAMEOBJECT_MOVE: __webpack_require__(822), - GAMEOBJECT_OUT: __webpack_require__(823), - GAMEOBJECT_OVER: __webpack_require__(824), - GAMEOBJECT_POINTER_DOWN: __webpack_require__(825), - GAMEOBJECT_POINTER_MOVE: __webpack_require__(826), - GAMEOBJECT_POINTER_OUT: __webpack_require__(827), - GAMEOBJECT_POINTER_OVER: __webpack_require__(828), - GAMEOBJECT_POINTER_UP: __webpack_require__(829), - GAMEOBJECT_POINTER_WHEEL: __webpack_require__(830), - GAMEOBJECT_UP: __webpack_require__(831), - GAMEOBJECT_WHEEL: __webpack_require__(832), - MANAGER_BOOT: __webpack_require__(833), - MANAGER_PROCESS: __webpack_require__(834), - MANAGER_UPDATE: __webpack_require__(835), - POINTER_DOWN: __webpack_require__(836), - POINTER_DOWN_OUTSIDE: __webpack_require__(837), - POINTER_MOVE: __webpack_require__(838), - POINTER_OUT: __webpack_require__(839), - POINTER_OVER: __webpack_require__(840), - POINTER_UP: __webpack_require__(841), - POINTER_UP_OUTSIDE: __webpack_require__(842), - POINTER_WHEEL: __webpack_require__(843), - POINTERLOCK_CHANGE: __webpack_require__(844), - PRE_UPDATE: __webpack_require__(845), - SHUTDOWN: __webpack_require__(846), - START: __webpack_require__(847), - UPDATE: __webpack_require__(848) + BOOT: __webpack_require__(814), + DESTROY: __webpack_require__(815), + DRAG_END: __webpack_require__(816), + DRAG_ENTER: __webpack_require__(817), + DRAG: __webpack_require__(818), + DRAG_LEAVE: __webpack_require__(819), + DRAG_OVER: __webpack_require__(820), + DRAG_START: __webpack_require__(821), + DROP: __webpack_require__(822), + GAME_OUT: __webpack_require__(823), + GAME_OVER: __webpack_require__(824), + GAMEOBJECT_DOWN: __webpack_require__(825), + GAMEOBJECT_DRAG_END: __webpack_require__(826), + GAMEOBJECT_DRAG_ENTER: __webpack_require__(827), + GAMEOBJECT_DRAG: __webpack_require__(828), + GAMEOBJECT_DRAG_LEAVE: __webpack_require__(829), + GAMEOBJECT_DRAG_OVER: __webpack_require__(830), + GAMEOBJECT_DRAG_START: __webpack_require__(831), + GAMEOBJECT_DROP: __webpack_require__(832), + GAMEOBJECT_MOVE: __webpack_require__(833), + GAMEOBJECT_OUT: __webpack_require__(834), + GAMEOBJECT_OVER: __webpack_require__(835), + GAMEOBJECT_POINTER_DOWN: __webpack_require__(836), + GAMEOBJECT_POINTER_MOVE: __webpack_require__(837), + GAMEOBJECT_POINTER_OUT: __webpack_require__(838), + GAMEOBJECT_POINTER_OVER: __webpack_require__(839), + GAMEOBJECT_POINTER_UP: __webpack_require__(840), + GAMEOBJECT_POINTER_WHEEL: __webpack_require__(841), + GAMEOBJECT_UP: __webpack_require__(842), + GAMEOBJECT_WHEEL: __webpack_require__(843), + MANAGER_BOOT: __webpack_require__(844), + MANAGER_PROCESS: __webpack_require__(845), + MANAGER_UPDATE: __webpack_require__(846), + POINTER_DOWN: __webpack_require__(847), + POINTER_DOWN_OUTSIDE: __webpack_require__(848), + POINTER_MOVE: __webpack_require__(849), + POINTER_OUT: __webpack_require__(850), + POINTER_OVER: __webpack_require__(851), + POINTER_UP: __webpack_require__(852), + POINTER_UP_OUTSIDE: __webpack_require__(853), + POINTER_WHEEL: __webpack_require__(854), + POINTERLOCK_CHANGE: __webpack_require__(855), + PRE_UPDATE: __webpack_require__(856), + SHUTDOWN: __webpack_require__(857), + START: __webpack_require__(858), + UPDATE: __webpack_require__(859) }; /***/ }), -/* 54 */ +/* 55 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8827,20 +8884,20 @@ module.exports = Contains; /***/ }), -/* 55 */ +/* 56 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var GetPoint = __webpack_require__(258); -var GetPoints = __webpack_require__(148); +var GetPoint = __webpack_require__(272); +var GetPoints = __webpack_require__(150); var GEOM_CONST = __webpack_require__(46); -var Random = __webpack_require__(149); +var Random = __webpack_require__(151); var Vector2 = __webpack_require__(3); /** @@ -8945,7 +9002,7 @@ var Line = new Class({ * @method Phaser.Geom.Line#getPoints * @since 3.0.0 * - * @generic {Phaser.Geom.Point} O - [output,$return] + * @generic {Phaser.Geom.Point[]} O - [output,$return] * * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead. * @param {integer} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`. @@ -9164,12 +9221,12 @@ module.exports = Line; /***/ }), -/* 56 */ +/* 57 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9192,12 +9249,12 @@ module.exports = Length; /***/ }), -/* 57 */ +/* 58 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9223,47 +9280,13 @@ var Wrap = function (value, min, max) module.exports = Wrap; -/***/ }), -/* 58 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Calculate the distance between two sets of coordinates (points). - * - * @function Phaser.Math.Distance.Between - * @since 3.0.0 - * - * @param {number} x1 - The x coordinate of the first point. - * @param {number} y1 - The y coordinate of the first point. - * @param {number} x2 - The x coordinate of the second point. - * @param {number} y2 - The y coordinate of the second point. - * - * @return {number} The distance between each point. - */ -var DistanceBetween = function (x1, y1, x2, y2) -{ - var dx = x1 - x2; - var dy = y1 - y2; - - return Math.sqrt(dx * dx + dy * dy); -}; - -module.exports = DistanceBetween; - - /***/ }), /* 59 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9273,29 +9296,29 @@ module.exports = DistanceBetween; module.exports = { - COMPLETE: __webpack_require__(871), - DECODED: __webpack_require__(872), - DECODED_ALL: __webpack_require__(873), - DESTROY: __webpack_require__(874), - DETUNE: __webpack_require__(875), - GLOBAL_DETUNE: __webpack_require__(876), - GLOBAL_MUTE: __webpack_require__(877), - GLOBAL_RATE: __webpack_require__(878), - GLOBAL_VOLUME: __webpack_require__(879), - LOOP: __webpack_require__(880), - LOOPED: __webpack_require__(881), - MUTE: __webpack_require__(882), - PAUSE_ALL: __webpack_require__(883), - PAUSE: __webpack_require__(884), - PLAY: __webpack_require__(885), - RATE: __webpack_require__(886), - RESUME_ALL: __webpack_require__(887), - RESUME: __webpack_require__(888), - SEEK: __webpack_require__(889), - STOP_ALL: __webpack_require__(890), - STOP: __webpack_require__(891), - UNLOCKED: __webpack_require__(892), - VOLUME: __webpack_require__(893) + COMPLETE: __webpack_require__(882), + DECODED: __webpack_require__(883), + DECODED_ALL: __webpack_require__(884), + DESTROY: __webpack_require__(885), + DETUNE: __webpack_require__(886), + GLOBAL_DETUNE: __webpack_require__(887), + GLOBAL_MUTE: __webpack_require__(888), + GLOBAL_RATE: __webpack_require__(889), + GLOBAL_VOLUME: __webpack_require__(890), + LOOP: __webpack_require__(891), + LOOPED: __webpack_require__(892), + MUTE: __webpack_require__(893), + PAUSE_ALL: __webpack_require__(894), + PAUSE: __webpack_require__(895), + PLAY: __webpack_require__(896), + RATE: __webpack_require__(897), + RESUME_ALL: __webpack_require__(898), + RESUME: __webpack_require__(899), + SEEK: __webpack_require__(900), + STOP_ALL: __webpack_require__(901), + STOP: __webpack_require__(902), + UNLOCKED: __webpack_require__(903), + VOLUME: __webpack_require__(904) }; @@ -9306,13 +9329,13 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var File = __webpack_require__(20); +var CONST = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); @@ -9536,7 +9559,7 @@ module.exports = JSONFile; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9771,7 +9794,7 @@ module.exports = MultiFile; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9822,7 +9845,7 @@ module.exports = WorldToTileX; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9873,16 +9896,16 @@ module.exports = WorldToTileY; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(54); -var GetPoint = __webpack_require__(249); -var GetPoints = __webpack_require__(250); +var Contains = __webpack_require__(55); +var GetPoint = __webpack_require__(263); +var GetPoints = __webpack_require__(264); var GEOM_CONST = __webpack_require__(46); -var Random = __webpack_require__(145); +var Random = __webpack_require__(147); /** * @classdesc @@ -10249,7 +10272,7 @@ module.exports = Circle; "use strict"; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10930,7 +10953,7 @@ earcut.flatten = function (data) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10972,7 +10995,7 @@ module.exports = Clone; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11021,14 +11044,14 @@ module.exports = SafeRange; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var SpriteRender = __webpack_require__(949); +var SpriteRender = __webpack_require__(960); /** * @classdesc @@ -11199,7 +11222,7 @@ module.exports = Sprite; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11274,17 +11297,17 @@ module.exports = StrokePathWebGL; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Contains = __webpack_require__(83); -var GetPoint = __webpack_require__(403); -var GetPoints = __webpack_require__(404); +var GetPoint = __webpack_require__(417); +var GetPoints = __webpack_require__(418); var GEOM_CONST = __webpack_require__(46); -var Line = __webpack_require__(55); -var Random = __webpack_require__(153); +var Line = __webpack_require__(56); +var Random = __webpack_require__(155); /** * @classdesc @@ -11721,13 +11744,13 @@ module.exports = Triangle; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var File = __webpack_require__(20); +var CONST = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -11995,7 +12018,7 @@ module.exports = ImageFile; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12031,13 +12054,13 @@ module.exports = SetTileCollision; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var Rectangle = __webpack_require__(422); +var Rectangle = __webpack_require__(436); /** * @classdesc @@ -12869,7 +12892,7 @@ module.exports = Tile; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12897,7 +12920,7 @@ module.exports = GetCenterX; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12932,7 +12955,35 @@ module.exports = SetCenterX; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Returns the center y coordinate from the bounds of the Game Object. + * + * @function Phaser.Display.Bounds.GetCenterY + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from. + * + * @return {number} The center y coordinate of the bounds of the Game Object. + */ +var GetCenterY = function (gameObject) +{ + return gameObject.y - (gameObject.height * gameObject.originY) + (gameObject.height * 0.5); +}; + +module.exports = GetCenterY; + + +/***/ }), +/* 78 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12961,41 +13012,13 @@ var SetCenterY = function (gameObject, y) module.exports = SetCenterY; -/***/ }), -/* 78 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Returns the center y coordinate from the bounds of the Game Object. - * - * @function Phaser.Display.Bounds.GetCenterY - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from. - * - * @return {number} The center y coordinate of the bounds of the Game Object. - */ -var GetCenterY = function (gameObject) -{ - return gameObject.y - (gameObject.height * gameObject.originY) + (gameObject.height * 0.5); -}; - -module.exports = GetCenterY; - - /***/ }), /* 79 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13041,12 +13064,12 @@ module.exports = SpliceOne; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var FromPoints = __webpack_require__(173); +var FromPoints = __webpack_require__(174); var Rectangle = __webpack_require__(11); var Vector2 = __webpack_require__(3); @@ -13061,7 +13084,7 @@ var Vector2 = __webpack_require__(3); * @constructor * @since 3.0.0 * - * @param {string} type - [description] + * @param {string} type - The curve type. */ var Curve = new Class({ @@ -13119,7 +13142,7 @@ var Curve = new Class({ this.needsUpdate = true; /** - * [description] + * For a curve on a Path, `false` means the Path will ignore this curve. * * @name Phaser.Curves.Curve#active * @type {boolean} @@ -13172,7 +13195,7 @@ var Curve = new Class({ // So you can chain graphics calls return graphics.strokePoints(this.getPoints(pointsTotal)); }, - + /** * Returns a Rectangle where the position and dimensions match the bounds of this Curve. * @@ -13228,7 +13251,7 @@ var Curve = new Class({ }, /** - * [description] + * Get a point at the end of the curve. * * @method Phaser.Curves.Curve#getEndPoint * @since 3.0.0 @@ -13250,7 +13273,7 @@ var Curve = new Class({ * @method Phaser.Curves.Curve#getLength * @since 3.0.0 * - * @return {number} [description] + * @return {number} The total length of the curve. */ getLength: function () { @@ -13261,14 +13284,22 @@ var Curve = new Class({ /** - * Get list of cumulative segment lengths + * Get a list of cumulative segment lengths. + * + * These lengths are + * + * - [0] 0 + * - [1] The first segment + * - [2] The first and second segment + * - ... + * - [divisions] All segments * * @method Phaser.Curves.Curve#getLengths * @since 3.0.0 * - * @param {integer} [divisions] - [description] + * @param {integer} [divisions] - The number of divisions or segments. * - * @return {number[]} [description] + * @return {number[]} An array of cumulative lengths. */ getLengths: function (divisions) { @@ -13309,17 +13340,17 @@ var Curve = new Class({ // - u [0 .. 1] /** - * [description] + * Get a point at a relative position on the curve, by arc length. * * @method Phaser.Curves.Curve#getPointAt * @since 3.0.0 * * @generic {Phaser.Math.Vector2} O - [out,$return] * - * @param {number} u - [description] - * @param {Phaser.Math.Vector2} [out] - [description] + * @param {number} u - The relative position, [0..1]. + * @param {Phaser.Math.Vector2} [out] - A point to store the result in. * - * @return {Phaser.Math.Vector2} [description] + * @return {Phaser.Math.Vector2} The point. */ getPointAt: function (u, out) { @@ -13331,13 +13362,25 @@ var Curve = new Class({ // Get sequence of points using getPoint( t ) /** - * [description] + * Get a sequence of evenly spaced points from the curve. + * + * You can pass `divisions`, `stepRate`, or neither. + * + * The number of divisions will be + * + * 1. `divisions`, if `divisions` > 0; or + * 2. `this.getLength / stepRate`, if `stepRate` > 0; or + * 3. `this.defaultDivisions` + * + * `1 + divisions` points will be returned. * * @method Phaser.Curves.Curve#getPoints * @since 3.0.0 * - * @param {integer} divisions - The number of evenly spaced points from the curve to return. If falsy, step param will be used to calculate the number of points. - * @param {number} step - Step between points. Used to calculate the number of points to return when divisions is falsy. Ignored if divisions is positive. + * @generic {Phaser.Math.Vector2[]} O - [out,$return] + * + * @param {integer} [divisions] - The number of divisions to make. + * @param {number} [stepRate] - The curve distance between points, implying `divisions`. * @param {(array|Phaser.Math.Vector2[])} [out] - An optional array to store the points in. * * @return {(array|Phaser.Math.Vector2[])} An array of Points from the curve. @@ -13368,16 +13411,16 @@ var Curve = new Class({ }, /** - * [description] + * Get a random point from the curve. * * @method Phaser.Curves.Curve#getRandomPoint * @since 3.0.0 * * @generic {Phaser.Math.Vector2} O - [out,$return] * - * @param {Phaser.Math.Vector2} [out] - [description] + * @param {Phaser.Math.Vector2} [out] - A point object to store the result in. * - * @return {Phaser.Math.Vector2} [description] + * @return {Phaser.Math.Vector2} The point. */ getRandomPoint: function (out) { @@ -13389,42 +13432,57 @@ var Curve = new Class({ // Get sequence of points using getPointAt( u ) /** - * [description] + * Get a sequence of equally spaced points (by arc distance) from the curve. + * + * `1 + divisions` points will be returned. * * @method Phaser.Curves.Curve#getSpacedPoints * @since 3.0.0 * - * @param {integer} [divisions] - [description] + * @param {integer} [divisions=this.defaultDivisions] - The number of divisions to make. + * @param {number} [stepRate] - Step between points. Used to calculate the number of points to return when divisions is falsy. Ignored if divisions is positive. + * @param {(array|Phaser.Math.Vector2[])} [out] - An optional array to store the points in. * - * @return {Phaser.Math.Vector2[]} [description] + * @return {Phaser.Math.Vector2[]} An array of points. */ - getSpacedPoints: function (divisions) + getSpacedPoints: function (divisions, stepRate, out) { - if (divisions === undefined) { divisions = this.defaultDivisions; } + if (out === undefined) { out = []; } - var points = []; + // If divisions is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. + if (!divisions) + { + if (!stepRate) + { + divisions = this.defaultDivisions; + } + else + { + divisions = this.getLength() / stepRate; + } + } for (var d = 0; d <= divisions; d++) { var t = this.getUtoTmapping(d / divisions, null, divisions); - points.push(this.getPoint(t)); + out.push(this.getPoint(t)); } - return points; + return out; }, /** - * [description] + * Get a point at the start of the curve. * * @method Phaser.Curves.Curve#getStartPoint * @since 3.0.0 * * @generic {Phaser.Math.Vector2} O - [out,$return] * - * @param {Phaser.Math.Vector2} [out] - [description] + * @param {Phaser.Math.Vector2} [out] - A point to store the result in. * - * @return {Phaser.Math.Vector2} [description] + * @return {Phaser.Math.Vector2} The point. */ getStartPoint: function (out) { @@ -13434,7 +13492,7 @@ var Curve = new Class({ }, /** - * Returns a unit vector tangent at t + * Get a unit vector tangent at a relative position on the curve. * In case any sub curve does not implement its tangent derivation, * 2 points a small delta apart will be used to find its gradient * which seems to give a reasonable approximation @@ -13444,8 +13502,8 @@ var Curve = new Class({ * * @generic {Phaser.Math.Vector2} O - [out,$return] * - * @param {number} t - [description] - * @param {Phaser.Math.Vector2} [out] - [description] + * @param {number} t - The relative position on the curve, [0..1]. + * @param {Phaser.Math.Vector2} [out] - A vector to store the result in. * * @return {Phaser.Math.Vector2} Vector approximating the tangent line at the point t (delta +/- 0.0001) */ @@ -13476,17 +13534,17 @@ var Curve = new Class({ }, /** - * [description] + * Get a unit vector tangent at a relative position on the curve, by arc length. * * @method Phaser.Curves.Curve#getTangentAt * @since 3.0.0 * * @generic {Phaser.Math.Vector2} O - [out,$return] * - * @param {number} u - [description] - * @param {Phaser.Math.Vector2} [out] - [description] + * @param {number} u - The relative position on the curve, [0..1]. + * @param {Phaser.Math.Vector2} [out] - A vector to store the result in. * - * @return {Phaser.Math.Vector2} [description] + * @return {Phaser.Math.Vector2} The tangent vector. */ getTangentAt: function (u, out) { @@ -13601,10 +13659,12 @@ var Curve = new Class({ }, /** - * [description] + * Calculate and cache the arc lengths. * * @method Phaser.Curves.Curve#updateArcLengths * @since 3.0.0 + * + * @see Phaser.Curves.Curve#getLengths() */ updateArcLengths: function () { @@ -13624,7 +13684,7 @@ module.exports = Curve; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13634,16 +13694,16 @@ module.exports = Curve; module.exports = { - ADD: __webpack_require__(850), - COMPLETE: __webpack_require__(851), - FILE_COMPLETE: __webpack_require__(852), - FILE_KEY_COMPLETE: __webpack_require__(853), - FILE_LOAD_ERROR: __webpack_require__(854), - FILE_LOAD: __webpack_require__(855), - FILE_PROGRESS: __webpack_require__(856), - POST_PROCESS: __webpack_require__(857), - PROGRESS: __webpack_require__(858), - START: __webpack_require__(859) + ADD: __webpack_require__(861), + COMPLETE: __webpack_require__(862), + FILE_COMPLETE: __webpack_require__(863), + FILE_KEY_COMPLETE: __webpack_require__(864), + FILE_LOAD_ERROR: __webpack_require__(865), + FILE_LOAD: __webpack_require__(866), + FILE_PROGRESS: __webpack_require__(867), + POST_PROCESS: __webpack_require__(868), + PROGRESS: __webpack_require__(869), + START: __webpack_require__(870) }; @@ -13654,12 +13714,12 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var EaseMap = __webpack_require__(164); -var UppercaseFirst = __webpack_require__(178); +var EaseMap = __webpack_require__(166); +var UppercaseFirst = __webpack_require__(179); /** * This internal function is used to return the correct ease function for a Tween. @@ -13763,7 +13823,7 @@ module.exports = GetEaseFunction; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13816,7 +13876,7 @@ module.exports = Contains; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13892,7 +13952,7 @@ module.exports = LineToLine; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13921,11 +13981,11 @@ module.exports = Angle; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(23); +var Clamp = __webpack_require__(22); /** * Return a value based on the range between `min` and `max` and the percentage given. @@ -13955,7 +14015,7 @@ module.exports = FromPercent; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13996,7 +14056,7 @@ module.exports = GetBoolean; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14168,7 +14228,7 @@ module.exports = TWEEN_CONST; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14178,17 +14238,17 @@ module.exports = TWEEN_CONST; module.exports = { - DESTROY: __webpack_require__(557), - VIDEO_COMPLETE: __webpack_require__(558), - VIDEO_CREATED: __webpack_require__(559), - VIDEO_ERROR: __webpack_require__(560), - VIDEO_LOOP: __webpack_require__(561), - VIDEO_PLAY: __webpack_require__(562), - VIDEO_SEEKED: __webpack_require__(563), - VIDEO_SEEKING: __webpack_require__(564), - VIDEO_STOP: __webpack_require__(565), - VIDEO_TIMEOUT: __webpack_require__(566), - VIDEO_UNLOCKED: __webpack_require__(567) + DESTROY: __webpack_require__(576), + VIDEO_COMPLETE: __webpack_require__(577), + VIDEO_CREATED: __webpack_require__(578), + VIDEO_ERROR: __webpack_require__(579), + VIDEO_LOOP: __webpack_require__(580), + VIDEO_PLAY: __webpack_require__(581), + VIDEO_SEEKED: __webpack_require__(582), + VIDEO_SEEKING: __webpack_require__(583), + VIDEO_STOP: __webpack_require__(584), + VIDEO_TIMEOUT: __webpack_require__(585), + VIDEO_UNLOCKED: __webpack_require__(586) }; @@ -14199,7 +14259,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14210,7 +14270,7 @@ var EventEmitter = __webpack_require__(9); var Events = __webpack_require__(48); var Rectangle = __webpack_require__(11); var TransformMatrix = __webpack_require__(32); -var ValueToColor = __webpack_require__(159); +var ValueToColor = __webpack_require__(161); var Vector2 = __webpack_require__(3); /** @@ -14776,7 +14836,7 @@ var BaseCamera = new Class({ * * @param {number} x - The horizontal coordinate to center on. * @param {number} y - The vertical coordinate to center on. - * @param {Phaser.Math.Vector2} [out] - A Vec2 to store the values in. If not given a new Vec2 is created. + * @param {Phaser.Math.Vector2} [out] - A Vector2 to store the values in. If not given a new Vector2 is created. * * @return {Phaser.Math.Vector2} The scroll coordinates stored in the `x` and `y` properties. */ @@ -16120,7 +16180,7 @@ module.exports = BaseCamera; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16130,12 +16190,12 @@ module.exports = BaseCamera; module.exports = { - ENTER_FULLSCREEN: __webpack_require__(675), - FULLSCREEN_FAILED: __webpack_require__(676), - FULLSCREEN_UNSUPPORTED: __webpack_require__(677), - LEAVE_FULLSCREEN: __webpack_require__(678), - ORIENTATION_CHANGE: __webpack_require__(679), - RESIZE: __webpack_require__(680) + ENTER_FULLSCREEN: __webpack_require__(694), + FULLSCREEN_FAILED: __webpack_require__(695), + FULLSCREEN_UNSUPPORTED: __webpack_require__(696), + LEAVE_FULLSCREEN: __webpack_require__(697), + ORIENTATION_CHANGE: __webpack_require__(698), + RESIZE: __webpack_require__(699) }; @@ -16146,7 +16206,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16190,12 +16250,12 @@ module.exports = SnapFloor; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Clamp = __webpack_require__(23); +var Clamp = __webpack_require__(22); var Extend = __webpack_require__(17); /** @@ -17009,16 +17069,16 @@ module.exports = Frame; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Contains = __webpack_require__(96); -var GetPoint = __webpack_require__(376); -var GetPoints = __webpack_require__(377); +var GetPoint = __webpack_require__(390); +var GetPoints = __webpack_require__(391); var GEOM_CONST = __webpack_require__(46); -var Random = __webpack_require__(152); +var Random = __webpack_require__(154); /** * @classdesc @@ -17144,11 +17204,13 @@ var Ellipse = new Class({ * @method Phaser.Geom.Ellipse#getPoints * @since 3.0.0 * + * @generic {Phaser.Geom.Point[]} O - [output,$return] + * * @param {integer} quantity - The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead. * @param {number} [stepRate] - Sets the quantity by getting the circumference of the ellipse and dividing it by the stepRate. - * @param {array} [output] - An array to insert the points in to. If not provided a new array will be created. + * @param {(array|Phaser.Geom.Point[])} [output] - An array to insert the points in to. If not provided a new array will be created. * - * @return {Phaser.Geom.Point[]} An array of Point objects pertaining to the points around the circumference of the ellipse. + * @return {(array|Phaser.Geom.Point[])} An array of Point objects pertaining to the points around the circumference of the ellipse. */ getPoints: function (quantity, stepRate, output) { @@ -17389,7 +17451,7 @@ module.exports = Ellipse; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -17431,18 +17493,18 @@ module.exports = Contains; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Actions = __webpack_require__(237); +var Actions = __webpack_require__(238); var Class = __webpack_require__(0); var Events = __webpack_require__(90); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); var IsPlainObject = __webpack_require__(7); -var Range = __webpack_require__(370); -var Set = __webpack_require__(107); +var Range = __webpack_require__(384); +var Set = __webpack_require__(108); var Sprite = __webpack_require__(69); /** @@ -17645,6 +17707,28 @@ var Group = new Class({ */ this.createMultipleCallback = GetFastValue(config, 'createMultipleCallback', null); + /** + * A function to be called when adding or creating group members. + * For internal use only by a Group, or any class that extends it. + * + * @name Phaser.GameObjects.Group#internalCreateCallback + * @type {?Phaser.Types.GameObjects.Group.GroupCallback} + * @private + * @since 3.22.0 + */ + this.internalCreateCallback = GetFastValue(config, 'internalCreateCallback', null); + + /** + * A function to be called when removing group members. + * For internal use only by a Group, or any class that extends it. + * + * @name Phaser.GameObjects.Group#internalRemoveCallback + * @type {?Phaser.Types.GameObjects.Group.GroupCallback} + * @private + * @since 3.22.0 + */ + this.internalRemoveCallback = GetFastValue(config, 'internalRemoveCallback', null); + if (config) { this.createMultiple(config); @@ -17943,6 +18027,11 @@ var Group = new Class({ this.children.set(child); + if (this.internalCreateCallback) + { + this.internalCreateCallback.call(this, child); + } + if (this.createCallback) { this.createCallback.call(this, child); @@ -18017,6 +18106,11 @@ var Group = new Class({ this.children.delete(child); + if (this.internalRemoveCallback) + { + this.internalRemoveCallback.call(this, child); + } + if (this.removeCallback) { this.removeCallback.call(this, child); @@ -19037,14 +19131,14 @@ module.exports = Group; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var ImageRender = __webpack_require__(952); +var ImageRender = __webpack_require__(963); /** * @classdesc @@ -19138,7 +19232,7 @@ module.exports = Image; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19167,7 +19261,7 @@ module.exports = HasValue; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19233,7 +19327,7 @@ module.exports = FillPathWebGL; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19264,7 +19358,7 @@ module.exports = IsInLayerBounds; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19458,7 +19552,7 @@ var LayerData = new Class({ * An array of the tile indexes * * @name Phaser.Tilemaps.LayerData#data - * @type {(number[])} + * @type {Phaser.Tilemaps.Tile[][]} * @since 3.0.0 */ this.data = GetFastValue(config, 'data', []); @@ -19484,7 +19578,7 @@ module.exports = LayerData; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19705,11 +19799,145 @@ module.exports = MapData; /***/ }), /* 106 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var ALIGN_CONST = { + + /** + * A constant representing a top-left alignment or position. + * @constant + * @name Phaser.Display.Align.TOP_LEFT + * @since 3.0.0 + * @type {integer} + */ + TOP_LEFT: 0, + + /** + * A constant representing a top-center alignment or position. + * @constant + * @name Phaser.Display.Align.TOP_CENTER + * @since 3.0.0 + * @type {integer} + */ + TOP_CENTER: 1, + + /** + * A constant representing a top-right alignment or position. + * @constant + * @name Phaser.Display.Align.TOP_RIGHT + * @since 3.0.0 + * @type {integer} + */ + TOP_RIGHT: 2, + + /** + * A constant representing a left-top alignment or position. + * @constant + * @name Phaser.Display.Align.LEFT_TOP + * @since 3.0.0 + * @type {integer} + */ + LEFT_TOP: 3, + + /** + * A constant representing a left-center alignment or position. + * @constant + * @name Phaser.Display.Align.LEFT_CENTER + * @since 3.0.0 + * @type {integer} + */ + LEFT_CENTER: 4, + + /** + * A constant representing a left-bottom alignment or position. + * @constant + * @name Phaser.Display.Align.LEFT_BOTTOM + * @since 3.0.0 + * @type {integer} + */ + LEFT_BOTTOM: 5, + + /** + * A constant representing a center alignment or position. + * @constant + * @name Phaser.Display.Align.CENTER + * @since 3.0.0 + * @type {integer} + */ + CENTER: 6, + + /** + * A constant representing a right-top alignment or position. + * @constant + * @name Phaser.Display.Align.RIGHT_TOP + * @since 3.0.0 + * @type {integer} + */ + RIGHT_TOP: 7, + + /** + * A constant representing a right-center alignment or position. + * @constant + * @name Phaser.Display.Align.RIGHT_CENTER + * @since 3.0.0 + * @type {integer} + */ + RIGHT_CENTER: 8, + + /** + * A constant representing a right-bottom alignment or position. + * @constant + * @name Phaser.Display.Align.RIGHT_BOTTOM + * @since 3.0.0 + * @type {integer} + */ + RIGHT_BOTTOM: 9, + + /** + * A constant representing a bottom-left alignment or position. + * @constant + * @name Phaser.Display.Align.BOTTOM_LEFT + * @since 3.0.0 + * @type {integer} + */ + BOTTOM_LEFT: 10, + + /** + * A constant representing a bottom-center alignment or position. + * @constant + * @name Phaser.Display.Align.BOTTOM_CENTER + * @since 3.0.0 + * @type {integer} + */ + BOTTOM_CENTER: 11, + + /** + * A constant representing a bottom-right alignment or position. + * @constant + * @name Phaser.Display.Align.BOTTOM_RIGHT + * @since 3.0.0 + * @type {integer} + */ + BOTTOM_RIGHT: 12 + +}; + +module.exports = ALIGN_CONST; + + +/***/ }), +/* 107 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19749,12 +19977,12 @@ module.exports = Merge; /***/ }), -/* 107 */ +/* 108 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -20198,18 +20426,19 @@ module.exports = Set; /***/ }), -/* 108 */ +/* 109 */, +/* 110 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BlendModes = __webpack_require__(52); var Circle = __webpack_require__(65); -var CircleContains = __webpack_require__(54); +var CircleContains = __webpack_require__(55); var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); @@ -20511,12 +20740,12 @@ module.exports = Zone; /***/ }), -/* 109 */ +/* 111 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -20526,35 +20755,35 @@ module.exports = Zone; module.exports = { - ADD_ANIMATION: __webpack_require__(509), - ANIMATION_COMPLETE: __webpack_require__(510), - ANIMATION_REPEAT: __webpack_require__(511), - ANIMATION_RESTART: __webpack_require__(512), - ANIMATION_START: __webpack_require__(513), - PAUSE_ALL: __webpack_require__(514), - REMOVE_ANIMATION: __webpack_require__(515), - RESUME_ALL: __webpack_require__(516), - SPRITE_ANIMATION_COMPLETE: __webpack_require__(517), - SPRITE_ANIMATION_KEY_COMPLETE: __webpack_require__(518), - SPRITE_ANIMATION_KEY_REPEAT: __webpack_require__(519), - SPRITE_ANIMATION_KEY_RESTART: __webpack_require__(520), - SPRITE_ANIMATION_KEY_START: __webpack_require__(521), - SPRITE_ANIMATION_KEY_UPDATE: __webpack_require__(522), - SPRITE_ANIMATION_REPEAT: __webpack_require__(523), - SPRITE_ANIMATION_RESTART: __webpack_require__(524), - SPRITE_ANIMATION_START: __webpack_require__(525), - SPRITE_ANIMATION_UPDATE: __webpack_require__(526) + ADD_ANIMATION: __webpack_require__(528), + ANIMATION_COMPLETE: __webpack_require__(529), + ANIMATION_REPEAT: __webpack_require__(530), + ANIMATION_RESTART: __webpack_require__(531), + ANIMATION_START: __webpack_require__(532), + PAUSE_ALL: __webpack_require__(533), + REMOVE_ANIMATION: __webpack_require__(534), + RESUME_ALL: __webpack_require__(535), + SPRITE_ANIMATION_COMPLETE: __webpack_require__(536), + SPRITE_ANIMATION_KEY_COMPLETE: __webpack_require__(537), + SPRITE_ANIMATION_KEY_REPEAT: __webpack_require__(538), + SPRITE_ANIMATION_KEY_RESTART: __webpack_require__(539), + SPRITE_ANIMATION_KEY_START: __webpack_require__(540), + SPRITE_ANIMATION_KEY_UPDATE: __webpack_require__(541), + SPRITE_ANIMATION_REPEAT: __webpack_require__(542), + SPRITE_ANIMATION_RESTART: __webpack_require__(543), + SPRITE_ANIMATION_START: __webpack_require__(544), + SPRITE_ANIMATION_UPDATE: __webpack_require__(545) }; /***/ }), -/* 110 */ +/* 112 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -20577,17 +20806,17 @@ module.exports = Perimeter; /***/ }), -/* 111 */ +/* 113 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Events = __webpack_require__(267); +var Events = __webpack_require__(281); /** * @callback DataEachCallback @@ -21218,12 +21447,12 @@ module.exports = DataManager; /***/ }), -/* 112 */ +/* 114 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21235,9 +21464,12 @@ module.exports = DataManager; * @function Phaser.Utils.Array.Shuffle * @since 3.0.0 * - * @param {array} array - The array to shuffle. This array is modified in place. + * @generic T + * @genericUse {T[]} - [array,$return] * - * @return {array} The shuffled array. + * @param {T[]} array - The array to shuffle. This array is modified in place. + * + * @return {T[]} The shuffled array. */ var Shuffle = function (array) { @@ -21256,12 +21488,12 @@ module.exports = Shuffle; /***/ }), -/* 113 */ +/* 115 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21286,12 +21518,12 @@ module.exports = Linear; /***/ }), -/* 114 */ +/* 116 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21455,19 +21687,19 @@ function init () module.exports = init(); -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(701))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(720))) /***/ }), -/* 115 */ +/* 117 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(114); +var OS = __webpack_require__(116); /** * Determines the browser type and version running this Phaser Game instance. @@ -21568,12 +21800,12 @@ module.exports = init(); /***/ }), -/* 116 */ +/* 118 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21598,12 +21830,12 @@ module.exports = IsSizePowerOfTwo; /***/ }), -/* 117 */ +/* 119 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21613,22 +21845,22 @@ module.exports = IsSizePowerOfTwo; module.exports = { - ADD: __webpack_require__(748), - ERROR: __webpack_require__(749), - LOAD: __webpack_require__(750), - READY: __webpack_require__(751), - REMOVE: __webpack_require__(752) + ADD: __webpack_require__(771), + ERROR: __webpack_require__(772), + LOAD: __webpack_require__(773), + READY: __webpack_require__(774), + REMOVE: __webpack_require__(775) }; /***/ }), -/* 118 */ +/* 120 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21681,12 +21913,12 @@ module.exports = AddToDOM; /***/ }), -/* 119 */ +/* 121 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21772,12 +22004,12 @@ module.exports = Remove; /***/ }), -/* 120 */ +/* 122 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22678,12 +22910,12 @@ module.exports = KeyCodes; /***/ }), -/* 121 */ +/* 123 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22801,13 +23033,13 @@ module.exports = CONST; /***/ }), -/* 122 */ +/* 124 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23033,8 +23265,9 @@ var BaseSoundManager = new Class({ }, /** - * Enables playing sound on the fly without the need to keep a reference to it. - * Sound will auto destroy once its playback ends. + * Adds a new sound to the sound manager and plays it. + * The sound will be automatically removed (destroyed) once playback ends. + * This lets you play a new sound on the fly without the need to keep a reference to it. * * @method Phaser.Sound.BaseSoundManager#play * @listens Phaser.Sound.Events#COMPLETE @@ -23425,13 +23658,13 @@ module.exports = BaseSoundManager; /***/ }), -/* 123 */ +/* 125 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23925,19 +24158,19 @@ module.exports = BaseSound; /***/ }), -/* 124 */ +/* 126 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayUtils = __webpack_require__(180); +var ArrayUtils = __webpack_require__(181); var Class = __webpack_require__(0); var NOOP = __webpack_require__(1); -var StableSort = __webpack_require__(126); +var StableSort = __webpack_require__(128); /** * @callback EachListCallback @@ -24741,17 +24974,17 @@ module.exports = List; /***/ }), -/* 125 */ +/* 127 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CheckMatrix = __webpack_require__(181); -var TransposeMatrix = __webpack_require__(368); +var CheckMatrix = __webpack_require__(182); +var TransposeMatrix = __webpack_require__(382); /** * Rotates the array matrix based on the given rotation value. @@ -24813,12 +25046,12 @@ module.exports = RotateMatrix; /***/ }), -/* 126 */ +/* 128 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24958,27 +25191,27 @@ else {} })(); /***/ }), -/* 127 */ +/* 129 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var GetBitmapTextSize = __webpack_require__(927); -var ParseFromAtlas = __webpack_require__(928); -var ParseXMLBitmapFont = __webpack_require__(184); -var Render = __webpack_require__(929); +var GetBitmapTextSize = __webpack_require__(938); +var ParseFromAtlas = __webpack_require__(939); +var ParseXMLBitmapFont = __webpack_require__(185); +var Render = __webpack_require__(940); /** * @classdesc * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure. - * + * * During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to * match the font structure. * @@ -25148,7 +25381,7 @@ var BitmapText = new Class({ /** * Internal cache var holding the maxWidth. - * + * * @name Phaser.GameObjects.BitmapText#_maxWidth * @type {number} * @private @@ -25394,7 +25627,7 @@ var BitmapText = new Class({ * If no whitespace was found then no wrapping will take place and consequently the `maxWidth` value will not be honored. * * Disable maxWidth by setting the value to 0. - * + * * You can set the whitespace character to be searched for by setting the `wordWrapCharCode` parameter or property. * * @method Phaser.GameObjects.BitmapText#setMaxWidth @@ -25653,8 +25886,7 @@ BitmapText.ALIGN_RIGHT = 2; * * Adds the parsed Bitmap Font data to the cache with the `fontName` key. * - * @name Phaser.GameObjects.BitmapText.ParseFromAtlas - * @type {function} + * @method Phaser.GameObjects.BitmapText.ParseFromAtlas * @since 3.0.0 * * @param {Phaser.Scene} scene - The Scene to parse the Bitmap Font for. @@ -25672,8 +25904,7 @@ BitmapText.ParseFromAtlas = ParseFromAtlas; /** * Parse an XML font to Bitmap Font data for the Bitmap Font cache. * - * @name Phaser.GameObjects.BitmapText.ParseXMLBitmapFont - * @type {function} + * @method Phaser.GameObjects.BitmapText.ParseXMLBitmapFont * @since 3.17.0 * * @param {XMLDocument} xml - The XML Document to parse the font from. @@ -25689,19 +25920,19 @@ module.exports = BitmapText; /***/ }), -/* 128 */ +/* 130 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var MeshRender = __webpack_require__(1054); +var MeshRender = __webpack_require__(1065); var NOOP = __webpack_require__(1); /** @@ -25717,7 +25948,6 @@ var NOOP = __webpack_require__(1); * * @extends Phaser.GameObjects.Components.BlendMode * @extends Phaser.GameObjects.Components.Depth - * @extends Phaser.GameObjects.Components.GetBounds * @extends Phaser.GameObjects.Components.Mask * @extends Phaser.GameObjects.Components.Pipeline * @extends Phaser.GameObjects.Components.Size @@ -25743,7 +25973,6 @@ var Mesh = new Class({ Mixins: [ Components.BlendMode, Components.Depth, - Components.GetBounds, Components.Mask, Components.Pipeline, Components.Size, @@ -25862,12 +26091,12 @@ module.exports = Mesh; /***/ }), -/* 129 */ +/* 131 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25900,12 +26129,12 @@ module.exports = RectangleToRectangle; /***/ }), -/* 130 */ +/* 132 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25927,11 +26156,10 @@ var InputPluginCache = {}; * Plugin is the object to instantiate to create the plugin * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input) * - * @name Phaser.Input.InputPluginCache.register - * @type {function} + * @function Phaser.Input.InputPluginCache.register * @static * @since 3.10.0 - * + * * @param {string} key - A reference used to get this plugin from the plugin cache. * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated. * @param {string} mapping - If this plugin is to be injected into the Input Plugin, this is the property key used. @@ -25946,11 +26174,10 @@ InputPluginCache.register = function (key, plugin, mapping, settingsKey, configK /** * Returns the input plugin object from the cache based on the given key. * - * @name Phaser.Input.InputPluginCache.getCore - * @type {function} + * @function Phaser.Input.InputPluginCache.getCore * @static * @since 3.10.0 - * + * * @param {string} key - The key of the input plugin to get. * * @return {Phaser.Types.Input.InputPluginContainer} The input plugin object. @@ -25963,11 +26190,10 @@ InputPluginCache.getPlugin = function (key) /** * Installs all of the registered Input Plugins into the given target. * - * @name Phaser.Input.InputPluginCache.install - * @type {function} + * @function Phaser.Input.InputPluginCache.install * @static * @since 3.10.0 - * + * * @param {Phaser.Input.InputPlugin} target - The target InputPlugin to install the plugins into. */ InputPluginCache.install = function (target) @@ -25993,11 +26219,10 @@ InputPluginCache.install = function (target) /** * Removes an input plugin based on the given key. * - * @name Phaser.Input.InputPluginCache.remove - * @type {function} + * @function Phaser.Input.InputPluginCache.remove * @static * @since 3.10.0 - * + * * @param {string} key - The key of the input plugin to remove. */ InputPluginCache.remove = function (key) @@ -26012,12 +26237,12 @@ module.exports = InputPluginCache; /***/ }), -/* 131 */ +/* 133 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26027,24 +26252,24 @@ module.exports = InputPluginCache; module.exports = { - ANY_KEY_DOWN: __webpack_require__(1192), - ANY_KEY_UP: __webpack_require__(1193), - COMBO_MATCH: __webpack_require__(1194), - DOWN: __webpack_require__(1195), - KEY_DOWN: __webpack_require__(1196), - KEY_UP: __webpack_require__(1197), - UP: __webpack_require__(1198) + ANY_KEY_DOWN: __webpack_require__(1203), + ANY_KEY_UP: __webpack_require__(1204), + COMBO_MATCH: __webpack_require__(1205), + DOWN: __webpack_require__(1206), + KEY_DOWN: __webpack_require__(1207), + KEY_UP: __webpack_require__(1208), + UP: __webpack_require__(1209) }; /***/ }), -/* 132 */ +/* 134 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26080,12 +26305,12 @@ module.exports = GetURL; /***/ }), -/* 133 */ +/* 135 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26144,17 +26369,17 @@ module.exports = XHRSettings; /***/ }), -/* 134 */ +/* 136 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Components = __webpack_require__(213); +var Components = __webpack_require__(214); var Sprite = __webpack_require__(69); /** @@ -26245,13 +26470,12 @@ module.exports = ArcadeSprite; /***/ }), -/* 135 */, -/* 136 */ +/* 137 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26261,59 +26485,59 @@ module.exports = ArcadeSprite; module.exports = { - CalculateFacesAt: __webpack_require__(216), + CalculateFacesAt: __webpack_require__(217), CalculateFacesWithin: __webpack_require__(51), - Copy: __webpack_require__(1286), - CreateFromTiles: __webpack_require__(1287), - CullTiles: __webpack_require__(1288), - Fill: __webpack_require__(1289), - FilterTiles: __webpack_require__(1290), - FindByIndex: __webpack_require__(1291), - FindTile: __webpack_require__(1292), - ForEachTile: __webpack_require__(1293), - GetTileAt: __webpack_require__(137), - GetTileAtWorldXY: __webpack_require__(1294), + Copy: __webpack_require__(1301), + CreateFromTiles: __webpack_require__(1302), + CullTiles: __webpack_require__(1303), + Fill: __webpack_require__(1304), + FilterTiles: __webpack_require__(1305), + FindByIndex: __webpack_require__(1306), + FindTile: __webpack_require__(1307), + ForEachTile: __webpack_require__(1308), + GetTileAt: __webpack_require__(138), + GetTileAtWorldXY: __webpack_require__(1309), GetTilesWithin: __webpack_require__(24), - GetTilesWithinShape: __webpack_require__(1295), - GetTilesWithinWorldXY: __webpack_require__(1296), - HasTileAt: __webpack_require__(456), - HasTileAtWorldXY: __webpack_require__(1297), + GetTilesWithinShape: __webpack_require__(1310), + GetTilesWithinWorldXY: __webpack_require__(1311), + HasTileAt: __webpack_require__(470), + HasTileAtWorldXY: __webpack_require__(1312), IsInLayerBounds: __webpack_require__(103), - PutTileAt: __webpack_require__(217), - PutTileAtWorldXY: __webpack_require__(1298), - PutTilesAt: __webpack_require__(1299), - Randomize: __webpack_require__(1300), - RemoveTileAt: __webpack_require__(457), - RemoveTileAtWorldXY: __webpack_require__(1301), - RenderDebug: __webpack_require__(1302), - ReplaceByIndex: __webpack_require__(455), - SetCollision: __webpack_require__(1303), - SetCollisionBetween: __webpack_require__(1304), - SetCollisionByExclusion: __webpack_require__(1305), - SetCollisionByProperty: __webpack_require__(1306), - SetCollisionFromCollisionGroup: __webpack_require__(1307), - SetTileIndexCallback: __webpack_require__(1308), - SetTileLocationCallback: __webpack_require__(1309), - Shuffle: __webpack_require__(1310), - SwapByIndex: __webpack_require__(1311), - TileToWorldX: __webpack_require__(138), - TileToWorldXY: __webpack_require__(1312), - TileToWorldY: __webpack_require__(139), - WeightedRandomize: __webpack_require__(1313), + PutTileAt: __webpack_require__(218), + PutTileAtWorldXY: __webpack_require__(1313), + PutTilesAt: __webpack_require__(1314), + Randomize: __webpack_require__(1315), + RemoveTileAt: __webpack_require__(471), + RemoveTileAtWorldXY: __webpack_require__(1316), + RenderDebug: __webpack_require__(1317), + ReplaceByIndex: __webpack_require__(469), + SetCollision: __webpack_require__(1318), + SetCollisionBetween: __webpack_require__(1319), + SetCollisionByExclusion: __webpack_require__(1320), + SetCollisionByProperty: __webpack_require__(1321), + SetCollisionFromCollisionGroup: __webpack_require__(1322), + SetTileIndexCallback: __webpack_require__(1323), + SetTileLocationCallback: __webpack_require__(1324), + Shuffle: __webpack_require__(1325), + SwapByIndex: __webpack_require__(1326), + TileToWorldX: __webpack_require__(139), + TileToWorldXY: __webpack_require__(1327), + TileToWorldY: __webpack_require__(140), + WeightedRandomize: __webpack_require__(1328), WorldToTileX: __webpack_require__(63), - WorldToTileXY: __webpack_require__(1314), + WorldToTileXY: __webpack_require__(1329), WorldToTileY: __webpack_require__(64) }; /***/ }), -/* 137 */ +/* 138 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26364,12 +26588,12 @@ module.exports = GetTileAt; /***/ }), -/* 138 */ +/* 139 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26409,12 +26633,12 @@ module.exports = TileToWorldX; /***/ }), -/* 139 */ +/* 140 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26454,12 +26678,12 @@ module.exports = TileToWorldY; /***/ }), -/* 140 */ +/* 141 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26858,12 +27082,12 @@ module.exports = Tileset; /***/ }), -/* 141 */ +/* 142 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26922,26 +27146,26 @@ module.exports = GetNewValue; /***/ }), -/* 142 */ +/* 143 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Defaults = __webpack_require__(226); +var Defaults = __webpack_require__(227); var GetAdvancedValue = __webpack_require__(15); var GetBoolean = __webpack_require__(88); var GetEaseFunction = __webpack_require__(82); -var GetNewValue = __webpack_require__(141); -var GetProps = __webpack_require__(478); -var GetTargets = __webpack_require__(224); +var GetNewValue = __webpack_require__(142); +var GetProps = __webpack_require__(492); +var GetTargets = __webpack_require__(225); var GetValue = __webpack_require__(6); -var GetValueOp = __webpack_require__(225); -var Tween = __webpack_require__(227); -var TweenData = __webpack_require__(229); +var GetValueOp = __webpack_require__(226); +var Tween = __webpack_require__(228); +var TweenData = __webpack_require__(230); /** * Creates a new Tween. @@ -27055,146 +27279,47 @@ module.exports = TweenBuilder; /***/ }), -/* 143 */ +/* 144 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ALIGN_CONST = { - - /** - * A constant representing a top-left alignment or position. - * @constant - * @name Phaser.Display.Align.TOP_LEFT - * @since 3.0.0 - * @type {integer} - */ - TOP_LEFT: 0, - - /** - * A constant representing a top-center alignment or position. - * @constant - * @name Phaser.Display.Align.TOP_CENTER - * @since 3.0.0 - * @type {integer} - */ - TOP_CENTER: 1, - - /** - * A constant representing a top-right alignment or position. - * @constant - * @name Phaser.Display.Align.TOP_RIGHT - * @since 3.0.0 - * @type {integer} - */ - TOP_RIGHT: 2, - - /** - * A constant representing a left-top alignment or position. - * @constant - * @name Phaser.Display.Align.LEFT_TOP - * @since 3.0.0 - * @type {integer} - */ - LEFT_TOP: 3, - - /** - * A constant representing a left-center alignment or position. - * @constant - * @name Phaser.Display.Align.LEFT_CENTER - * @since 3.0.0 - * @type {integer} - */ - LEFT_CENTER: 4, - - /** - * A constant representing a left-bottom alignment or position. - * @constant - * @name Phaser.Display.Align.LEFT_BOTTOM - * @since 3.0.0 - * @type {integer} - */ - LEFT_BOTTOM: 5, - - /** - * A constant representing a center alignment or position. - * @constant - * @name Phaser.Display.Align.CENTER - * @since 3.0.0 - * @type {integer} - */ - CENTER: 6, - - /** - * A constant representing a right-top alignment or position. - * @constant - * @name Phaser.Display.Align.RIGHT_TOP - * @since 3.0.0 - * @type {integer} - */ - RIGHT_TOP: 7, - - /** - * A constant representing a right-center alignment or position. - * @constant - * @name Phaser.Display.Align.RIGHT_CENTER - * @since 3.0.0 - * @type {integer} - */ - RIGHT_CENTER: 8, - - /** - * A constant representing a right-bottom alignment or position. - * @constant - * @name Phaser.Display.Align.RIGHT_BOTTOM - * @since 3.0.0 - * @type {integer} - */ - RIGHT_BOTTOM: 9, - - /** - * A constant representing a bottom-left alignment or position. - * @constant - * @name Phaser.Display.Align.BOTTOM_LEFT - * @since 3.0.0 - * @type {integer} - */ - BOTTOM_LEFT: 10, - - /** - * A constant representing a bottom-center alignment or position. - * @constant - * @name Phaser.Display.Align.BOTTOM_CENTER - * @since 3.0.0 - * @type {integer} - */ - BOTTOM_CENTER: 11, - - /** - * A constant representing a bottom-right alignment or position. - * @constant - * @name Phaser.Display.Align.BOTTOM_RIGHT - * @since 3.0.0 - * @type {integer} - */ - BOTTOM_RIGHT: 12 +/** + * Check whether the given values are fuzzily equal. + * + * Two numbers are fuzzily equal if their difference is less than `epsilon`. + * + * @function Phaser.Math.Fuzzy.Equal + * @since 3.0.0 + * + * @param {number} a - The first value. + * @param {number} b - The second value. + * @param {number} [epsilon=0.0001] - The epsilon. + * + * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`. + */ +var Equal = function (a, b, epsilon) +{ + if (epsilon === undefined) { epsilon = 0.0001; } + return Math.abs(a - b) < epsilon; }; -module.exports = ALIGN_CONST; +module.exports = Equal; /***/ }), -/* 144 */ +/* 145 */, +/* 146 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27228,12 +27353,12 @@ module.exports = CircumferencePoint; /***/ }), -/* 145 */ +/* 147 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27272,21 +27397,21 @@ module.exports = Random; /***/ }), -/* 146 */ +/* 148 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(23); +var Clamp = __webpack_require__(22); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(109); -var FindClosestInSorted = __webpack_require__(253); -var Frame = __webpack_require__(254); +var Events = __webpack_require__(111); +var FindClosestInSorted = __webpack_require__(267); +var Frame = __webpack_require__(268); var GetValue = __webpack_require__(6); /** @@ -28225,16 +28350,16 @@ module.exports = Animation; /***/ }), -/* 147 */ +/* 149 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Perimeter = __webpack_require__(110); +var Perimeter = __webpack_require__(112); var Point = __webpack_require__(4); /** @@ -28302,16 +28427,16 @@ module.exports = GetPoint; /***/ }), -/* 148 */ +/* 150 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(56); +var Length = __webpack_require__(57); var Point = __webpack_require__(4); /** @@ -28367,12 +28492,12 @@ module.exports = GetPoints; /***/ }), -/* 149 */ +/* 151 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28407,12 +28532,12 @@ module.exports = Random; /***/ }), -/* 150 */ +/* 152 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28445,12 +28570,12 @@ module.exports = Random; /***/ }), -/* 151 */ +/* 153 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28574,12 +28699,12 @@ module.exports = Pipeline; /***/ }), -/* 152 */ +/* 154 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28615,12 +28740,12 @@ module.exports = Random; /***/ }), -/* 153 */ +/* 155 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28671,12 +28796,12 @@ module.exports = Random; /***/ }), -/* 154 */ +/* 156 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28708,12 +28833,12 @@ module.exports = RotateAroundDistance; /***/ }), -/* 155 */ +/* 157 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28747,12 +28872,12 @@ module.exports = SmootherStep; /***/ }), -/* 156 */ +/* 158 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28794,12 +28919,12 @@ module.exports = SmoothStep; /***/ }), -/* 157 */ +/* 159 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29167,12 +29292,12 @@ module.exports = Map; /***/ }), -/* 158 */ +/* 160 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29243,19 +29368,19 @@ module.exports = Pad; /***/ }), -/* 159 */ +/* 161 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HexStringToColor = __webpack_require__(277); -var IntegerToColor = __webpack_require__(280); -var ObjectToColor = __webpack_require__(282); -var RGBStringToColor = __webpack_require__(283); +var HexStringToColor = __webpack_require__(291); +var IntegerToColor = __webpack_require__(294); +var ObjectToColor = __webpack_require__(296); +var RGBStringToColor = __webpack_require__(297); /** * Converts the given source color value into an instance of a Color class. @@ -29299,12 +29424,12 @@ module.exports = ValueToColor; /***/ }), -/* 160 */ +/* 162 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29329,16 +29454,16 @@ module.exports = GetColor; /***/ }), -/* 161 */ +/* 163 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetColor = __webpack_require__(160); +var GetColor = __webpack_require__(162); /** * Converts an HSV (hue, saturation and value) color value to RGB. @@ -29430,12 +29555,12 @@ module.exports = HSVToRGB; /***/ }), -/* 162 */ +/* 164 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29562,12 +29687,12 @@ module.exports = Smoothing(); /***/ }), -/* 163 */ +/* 165 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29599,27 +29724,27 @@ module.exports = CenterOn; /***/ }), -/* 164 */ +/* 166 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Back = __webpack_require__(285); -var Bounce = __webpack_require__(286); -var Circular = __webpack_require__(287); -var Cubic = __webpack_require__(288); -var Elastic = __webpack_require__(289); -var Expo = __webpack_require__(290); -var Linear = __webpack_require__(291); -var Quadratic = __webpack_require__(292); -var Quartic = __webpack_require__(293); -var Quintic = __webpack_require__(294); -var Sine = __webpack_require__(295); -var Stepped = __webpack_require__(296); +var Back = __webpack_require__(299); +var Bounce = __webpack_require__(300); +var Circular = __webpack_require__(301); +var Cubic = __webpack_require__(302); +var Elastic = __webpack_require__(303); +var Expo = __webpack_require__(304); +var Linear = __webpack_require__(305); +var Quadratic = __webpack_require__(306); +var Quartic = __webpack_require__(307); +var Quintic = __webpack_require__(308); +var Sine = __webpack_require__(309); +var Stepped = __webpack_require__(310); // EaseMap module.exports = { @@ -29680,17 +29805,17 @@ module.exports = { /***/ }), -/* 165 */ +/* 167 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(114); -var Browser = __webpack_require__(115); +var OS = __webpack_require__(116); +var Browser = __webpack_require__(117); var CanvasPool = __webpack_require__(26); /** @@ -29872,12 +29997,12 @@ module.exports = init(); /***/ }), -/* 166 */ +/* 168 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29891,62 +30016,62 @@ var Extend = __webpack_require__(17); var PhaserMath = { // Collections of functions - Angle: __webpack_require__(706), - Distance: __webpack_require__(714), - Easing: __webpack_require__(716), - Fuzzy: __webpack_require__(717), - Interpolation: __webpack_require__(720), - Pow2: __webpack_require__(725), - Snap: __webpack_require__(727), + Angle: __webpack_require__(725), + Distance: __webpack_require__(733), + Easing: __webpack_require__(739), + Fuzzy: __webpack_require__(740), + Interpolation: __webpack_require__(743), + Pow2: __webpack_require__(748), + Snap: __webpack_require__(750), // Expose the RNG Class - RandomDataGenerator: __webpack_require__(729), + RandomDataGenerator: __webpack_require__(752), // Single functions - Average: __webpack_require__(730), - Bernstein: __webpack_require__(305), - Between: __webpack_require__(169), - CatmullRom: __webpack_require__(168), - CeilTo: __webpack_require__(731), - Clamp: __webpack_require__(23), + Average: __webpack_require__(753), + Bernstein: __webpack_require__(319), + Between: __webpack_require__(170), + CatmullRom: __webpack_require__(169), + CeilTo: __webpack_require__(754), + Clamp: __webpack_require__(22), DegToRad: __webpack_require__(35), - Difference: __webpack_require__(732), - Factorial: __webpack_require__(306), - FloatBetween: __webpack_require__(312), - FloorTo: __webpack_require__(733), + Difference: __webpack_require__(755), + Factorial: __webpack_require__(320), + FloatBetween: __webpack_require__(326), + FloorTo: __webpack_require__(756), FromPercent: __webpack_require__(87), - GetSpeed: __webpack_require__(734), - IsEven: __webpack_require__(735), - IsEvenStrict: __webpack_require__(736), - Linear: __webpack_require__(113), - MaxAdd: __webpack_require__(737), - MinSub: __webpack_require__(738), - Percent: __webpack_require__(739), - RadToDeg: __webpack_require__(170), - RandomXY: __webpack_require__(740), - RandomXYZ: __webpack_require__(741), - RandomXYZW: __webpack_require__(742), - Rotate: __webpack_require__(313), - RotateAround: __webpack_require__(259), - RotateAroundDistance: __webpack_require__(154), - RoundAwayFromZero: __webpack_require__(314), - RoundTo: __webpack_require__(743), - SinCosTableGenerator: __webpack_require__(744), - SmootherStep: __webpack_require__(155), - SmoothStep: __webpack_require__(156), - ToXY: __webpack_require__(745), - TransformXY: __webpack_require__(315), - Within: __webpack_require__(746), - Wrap: __webpack_require__(57), + GetSpeed: __webpack_require__(757), + IsEven: __webpack_require__(758), + IsEvenStrict: __webpack_require__(759), + Linear: __webpack_require__(115), + MaxAdd: __webpack_require__(760), + MinSub: __webpack_require__(761), + Percent: __webpack_require__(762), + RadToDeg: __webpack_require__(171), + RandomXY: __webpack_require__(763), + RandomXYZ: __webpack_require__(764), + RandomXYZW: __webpack_require__(765), + Rotate: __webpack_require__(327), + RotateAround: __webpack_require__(273), + RotateAroundDistance: __webpack_require__(156), + RoundAwayFromZero: __webpack_require__(328), + RoundTo: __webpack_require__(766), + SinCosTableGenerator: __webpack_require__(767), + SmootherStep: __webpack_require__(157), + SmoothStep: __webpack_require__(158), + ToXY: __webpack_require__(768), + TransformXY: __webpack_require__(329), + Within: __webpack_require__(769), + Wrap: __webpack_require__(58), // Vector classes Vector2: __webpack_require__(3), - Vector3: __webpack_require__(171), - Vector4: __webpack_require__(316), - Matrix3: __webpack_require__(317), - Matrix4: __webpack_require__(318), - Quaternion: __webpack_require__(319), - RotateVec3: __webpack_require__(747) + Vector3: __webpack_require__(172), + Vector4: __webpack_require__(330), + Matrix3: __webpack_require__(331), + Matrix4: __webpack_require__(332), + Quaternion: __webpack_require__(333), + RotateVec3: __webpack_require__(770) }; @@ -29960,46 +30085,12 @@ module.exports = PhaserMath; /***/ }), -/* 167 */ +/* 169 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Check whether the given values are fuzzily equal. - * - * Two numbers are fuzzily equal if their difference is less than `epsilon`. - * - * @function Phaser.Math.Fuzzy.Equal - * @since 3.0.0 - * - * @param {number} a - The first value. - * @param {number} b - The second value. - * @param {number} [epsilon=0.0001] - The epsilon. - * - * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`. - */ -var Equal = function (a, b, epsilon) -{ - if (epsilon === undefined) { epsilon = 0.0001; } - - return Math.abs(a - b) < epsilon; -}; - -module.exports = Equal; - - -/***/ }), -/* 168 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30031,12 +30122,12 @@ module.exports = CatmullRom; /***/ }), -/* 169 */ +/* 170 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30060,12 +30151,12 @@ module.exports = Between; /***/ }), -/* 170 */ +/* 171 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30090,12 +30181,12 @@ module.exports = RadToDeg; /***/ }), -/* 171 */ +/* 172 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30900,12 +30991,12 @@ module.exports = Vector3; /***/ }), -/* 172 */ +/* 173 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31001,12 +31092,12 @@ module.exports = DefaultPlugins; /***/ }), -/* 173 */ +/* 174 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31087,21 +31178,21 @@ module.exports = FromPoints; /***/ }), -/* 174 */ +/* 175 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var CONST = { - CENTER: __webpack_require__(339), - ORIENTATION: __webpack_require__(340), - SCALE_MODE: __webpack_require__(341), - ZOOM: __webpack_require__(342) + CENTER: __webpack_require__(353), + ORIENTATION: __webpack_require__(354), + SCALE_MODE: __webpack_require__(355), + ZOOM: __webpack_require__(356) }; @@ -31109,12 +31200,12 @@ module.exports = CONST; /***/ }), -/* 175 */ +/* 176 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31138,12 +31229,12 @@ module.exports = RemoveFromDOM; /***/ }), -/* 176 */ +/* 177 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31236,23 +31327,23 @@ module.exports = INPUT_CONST; /***/ }), -/* 177 */ +/* 178 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(121); -var DefaultPlugins = __webpack_require__(172); -var Events = __webpack_require__(22); -var GetPhysicsPlugins = __webpack_require__(860); -var GetScenePlugins = __webpack_require__(861); +var CONST = __webpack_require__(123); +var DefaultPlugins = __webpack_require__(173); +var Events = __webpack_require__(19); +var GetPhysicsPlugins = __webpack_require__(871); +var GetScenePlugins = __webpack_require__(872); var NOOP = __webpack_require__(1); -var Settings = __webpack_require__(355); +var Settings = __webpack_require__(369); /** * @classdesc @@ -31712,8 +31803,8 @@ var Systems = new Class({ /** * Send this Scene to sleep. * - * A sleeping Scene doesn't run it's update step or render anything, but it also isn't shut down - * or have any of its systems or children removed, meaning it can be re-activated at any point and + * A sleeping Scene doesn't run its update step or render anything, but it also isn't shut down + * or has any of its systems or children removed, meaning it can be re-activated at any point and * will carry on from where it left off. It also keeps everything in memory and events and callbacks * from other Scenes may still invoke changes within it, so be careful what is left active. * @@ -31767,6 +31858,22 @@ var Systems = new Class({ return this; }, + /** + * Returns any data that was sent to this Scene by another Scene. + * + * The data is also passed to `Scene.init` and in various Scene events, but + * you can access it at any point via this method. + * + * @method Phaser.Scenes.Systems#getData + * @since 3.22.0 + * + * @return {any} + */ + getData: function () + { + return this.settings.data; + }, + /** * Is this Scene sleeping? * @@ -31994,12 +32101,12 @@ module.exports = Systems; /***/ }), -/* 178 */ +/* 179 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32031,18 +32138,18 @@ module.exports = UppercaseFirst; /***/ }), -/* 179 */ +/* 180 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Frame = __webpack_require__(94); -var TextureSource = __webpack_require__(358); +var TextureSource = __webpack_require__(372); var TEXTURE_MISSING_ERROR = 'Texture.frame missing: '; @@ -32551,12 +32658,12 @@ module.exports = Texture; /***/ }), -/* 180 */ +/* 181 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32566,50 +32673,50 @@ module.exports = Texture; module.exports = { - Matrix: __webpack_require__(896), + Matrix: __webpack_require__(907), - Add: __webpack_require__(903), - AddAt: __webpack_require__(904), - BringToTop: __webpack_require__(905), - CountAllMatching: __webpack_require__(906), - Each: __webpack_require__(907), - EachInRange: __webpack_require__(908), - FindClosestInSorted: __webpack_require__(253), - GetAll: __webpack_require__(909), - GetFirst: __webpack_require__(910), - GetRandom: __webpack_require__(182), - MoveDown: __webpack_require__(911), - MoveTo: __webpack_require__(912), - MoveUp: __webpack_require__(913), - NumberArray: __webpack_require__(914), - NumberArrayStep: __webpack_require__(915), - QuickSelect: __webpack_require__(369), - Range: __webpack_require__(370), - Remove: __webpack_require__(119), - RemoveAt: __webpack_require__(916), - RemoveBetween: __webpack_require__(917), - RemoveRandomElement: __webpack_require__(918), - Replace: __webpack_require__(919), - RotateLeft: __webpack_require__(269), - RotateRight: __webpack_require__(270), + Add: __webpack_require__(914), + AddAt: __webpack_require__(915), + BringToTop: __webpack_require__(916), + CountAllMatching: __webpack_require__(917), + Each: __webpack_require__(918), + EachInRange: __webpack_require__(919), + FindClosestInSorted: __webpack_require__(267), + GetAll: __webpack_require__(920), + GetFirst: __webpack_require__(921), + GetRandom: __webpack_require__(183), + MoveDown: __webpack_require__(922), + MoveTo: __webpack_require__(923), + MoveUp: __webpack_require__(924), + NumberArray: __webpack_require__(925), + NumberArrayStep: __webpack_require__(926), + QuickSelect: __webpack_require__(383), + Range: __webpack_require__(384), + Remove: __webpack_require__(121), + RemoveAt: __webpack_require__(927), + RemoveBetween: __webpack_require__(928), + RemoveRandomElement: __webpack_require__(929), + Replace: __webpack_require__(930), + RotateLeft: __webpack_require__(283), + RotateRight: __webpack_require__(284), SafeRange: __webpack_require__(68), - SendToBack: __webpack_require__(920), - SetAll: __webpack_require__(921), - Shuffle: __webpack_require__(112), + SendToBack: __webpack_require__(931), + SetAll: __webpack_require__(932), + Shuffle: __webpack_require__(114), SpliceOne: __webpack_require__(79), - StableSort: __webpack_require__(126), - Swap: __webpack_require__(922) + StableSort: __webpack_require__(128), + Swap: __webpack_require__(933) }; /***/ }), -/* 181 */ +/* 182 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32665,12 +32772,12 @@ module.exports = CheckMatrix; /***/ }), -/* 182 */ +/* 183 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32700,18 +32807,18 @@ module.exports = GetRandom; /***/ }), -/* 183 */ +/* 184 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(924); +var Events = __webpack_require__(935); /** * @classdesc @@ -32991,12 +33098,12 @@ module.exports = ProcessQueue; /***/ }), -/* 184 */ +/* 185 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -33130,22 +33237,22 @@ module.exports = ParseXMLBitmapFont; /***/ }), -/* 185 */ +/* 186 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlitterRender = __webpack_require__(932); -var Bob = __webpack_require__(935); +var BlitterRender = __webpack_require__(943); +var Bob = __webpack_require__(946); var Class = __webpack_require__(0); var Components = __webpack_require__(12); var Frame = __webpack_require__(94); var GameObject = __webpack_require__(14); -var List = __webpack_require__(124); +var List = __webpack_require__(126); /** * @callback CreateCallback @@ -33429,25 +33536,25 @@ module.exports = Blitter; /***/ }), -/* 186 */ +/* 187 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayUtils = __webpack_require__(180); +var ArrayUtils = __webpack_require__(181); var BlendModes = __webpack_require__(52); var Class = __webpack_require__(0); var Components = __webpack_require__(12); var Events = __webpack_require__(90); var GameObject = __webpack_require__(14); var Rectangle = __webpack_require__(11); -var Render = __webpack_require__(936); -var Union = __webpack_require__(372); +var Render = __webpack_require__(947); +var Union = __webpack_require__(386); var Vector2 = __webpack_require__(3); /** @@ -33492,7 +33599,7 @@ var Vector2 = __webpack_require__(3); * @constructor * @since 3.4.0 * - * @extends Phaser.GameObjects.Components.Alpha + * @extends Phaser.GameObjects.Components.AlphaSingle * @extends Phaser.GameObjects.Components.BlendMode * @extends Phaser.GameObjects.Components.ComputedSize * @extends Phaser.GameObjects.Components.Depth @@ -33510,7 +33617,7 @@ var Container = new Class({ Extends: GameObject, Mixins: [ - Components.Alpha, + Components.AlphaSingle, Components.BlendMode, Components.ComputedSize, Components.Depth, @@ -34754,18 +34861,18 @@ module.exports = Container; /***/ }), -/* 187 */ +/* 188 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(127); +var BitmapText = __webpack_require__(129); var Class = __webpack_require__(0); -var Render = __webpack_require__(941); +var Render = __webpack_require__(952); /** * @classdesc @@ -34987,26 +35094,26 @@ module.exports = DynamicBitmapText; /***/ }), -/* 188 */ +/* 189 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BaseCamera = __webpack_require__(91); var Class = __webpack_require__(0); -var Commands = __webpack_require__(189); -var ComponentsAlpha = __webpack_require__(252); -var ComponentsBlendMode = __webpack_require__(255); -var ComponentsDepth = __webpack_require__(256); -var ComponentsMask = __webpack_require__(260); -var ComponentsPipeline = __webpack_require__(151); -var ComponentsTransform = __webpack_require__(265); -var ComponentsVisible = __webpack_require__(266); -var ComponentsScrollFactor = __webpack_require__(263); +var Commands = __webpack_require__(190); +var ComponentsAlpha = __webpack_require__(266); +var ComponentsBlendMode = __webpack_require__(269); +var ComponentsDepth = __webpack_require__(270); +var ComponentsMask = __webpack_require__(274); +var ComponentsPipeline = __webpack_require__(153); +var ComponentsTransform = __webpack_require__(279); +var ComponentsVisible = __webpack_require__(280); +var ComponentsScrollFactor = __webpack_require__(277); var TransformMatrix = __webpack_require__(32); @@ -35015,7 +35122,7 @@ var GameObject = __webpack_require__(14); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); var MATH_CONST = __webpack_require__(13); -var Render = __webpack_require__(947); +var Render = __webpack_require__(958); /** * @classdesc @@ -35064,7 +35171,7 @@ var Render = __webpack_require__(947); * @constructor * @since 3.0.0 * - * @extends Phaser.GameObjects.Components.Alpha + * @extends Phaser.GameObjects.Components.AlphaSingle * @extends Phaser.GameObjects.Components.BlendMode * @extends Phaser.GameObjects.Components.Depth * @extends Phaser.GameObjects.Components.Mask @@ -36537,12 +36644,12 @@ module.exports = Graphics; /***/ }), -/* 189 */ +/* 190 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -36574,12 +36681,12 @@ module.exports = { /***/ }), -/* 190 */ +/* 191 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -36616,22 +36723,22 @@ module.exports = CircumferencePoint; /***/ }), -/* 191 */ +/* 192 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var GravityWell = __webpack_require__(380); -var List = __webpack_require__(124); -var ParticleEmitter = __webpack_require__(382); -var Render = __webpack_require__(957); +var GravityWell = __webpack_require__(394); +var List = __webpack_require__(126); +var ParticleEmitter = __webpack_require__(396); +var Render = __webpack_require__(968); /** * @classdesc @@ -36898,6 +37005,21 @@ var ParticleEmitterManager = new Class({ return this.addEmitter(new ParticleEmitter(this, config)); }, + /** + * Removes a Particle Emitter from this Emitter Manager, if the Emitter belongs to this Manager. + * + * @method Phaser.GameObjects.Particles.ParticleEmitterManager#removeEmitter + * @since 3.22.0 + * + * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter + * + * @return {?Phaser.GameObjects.Particles.ParticleEmitter} The Particle Emitter if it was removed or null if it was not. + */ + removeEmitter: function (emitter) + { + return this.emitters.remove(emitter, true); + }, + /** * Adds an existing Gravity Well object to this Emitter Manager. * @@ -37090,12 +37212,12 @@ module.exports = ParticleEmitterManager; /***/ }), -/* 192 */ +/* 193 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -37107,9 +37229,9 @@ var Components = __webpack_require__(12); var CONST = __webpack_require__(29); var Frame = __webpack_require__(94); var GameObject = __webpack_require__(14); -var Render = __webpack_require__(961); +var Render = __webpack_require__(972); var Utils = __webpack_require__(10); -var UUID = __webpack_require__(193); +var UUID = __webpack_require__(194); /** * @classdesc @@ -37133,6 +37255,7 @@ var UUID = __webpack_require__(193); * @extends Phaser.GameObjects.Components.Alpha * @extends Phaser.GameObjects.Components.BlendMode * @extends Phaser.GameObjects.Components.ComputedSize + * @extends Phaser.GameObjects.Components.Crop * @extends Phaser.GameObjects.Components.Depth * @extends Phaser.GameObjects.Components.Flip * @extends Phaser.GameObjects.Components.GetBounds @@ -38328,12 +38451,12 @@ module.exports = RenderTexture; /***/ }), -/* 193 */ +/* 194 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -38363,26 +38486,26 @@ module.exports = UUID; /***/ }), -/* 194 */ +/* 195 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(118); +var AddToDOM = __webpack_require__(120); var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameEvents = __webpack_require__(18); var GameObject = __webpack_require__(14); -var GetTextSize = __webpack_require__(967); +var GetTextSize = __webpack_require__(978); var GetValue = __webpack_require__(6); -var RemoveFromDOM = __webpack_require__(175); -var TextRender = __webpack_require__(968); -var TextStyle = __webpack_require__(971); +var RemoveFromDOM = __webpack_require__(176); +var TextRender = __webpack_require__(979); +var TextStyle = __webpack_require__(982); /** * @classdesc @@ -38653,7 +38776,7 @@ var Text = new Class({ if (style && style.lineSpacing) { - this.lineSpacing = style.lineSpacing; + this.setLineSpacing(style.lineSpacing); } scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function () @@ -38876,16 +38999,20 @@ var Text = new Class({ { var result = ''; var lines = text.split(this.splitRegExp); + var lastLineIndex = lines.length - 1; + var whiteSpaceWidth = context.measureText(' ').width; - for (var i = 0; i < lines.length; i++) + for (var i = 0; i <= lastLineIndex; i++) { var spaceLeft = wordWrapWidth; var words = lines[i].split(' '); + var lastWordIndex = words.length - 1; - for (var j = 0; j < words.length; j++) + for (var j = 0; j <= lastWordIndex; j++) { - var wordWidth = context.measureText(words[j]).width; - var wordWidthWithSpace = wordWidth + context.measureText(' ').width; + var word = words[j]; + var wordWidth = context.measureText(word).width; + var wordWidthWithSpace = wordWidth + whiteSpaceWidth; if (wordWidthWithSpace > spaceLeft) { @@ -38894,24 +39021,24 @@ var Text = new Class({ if (j > 0) { result += '\n'; + spaceLeft = wordWrapWidth; } + } - result += words[j] + ' '; - spaceLeft = wordWrapWidth - wordWidthWithSpace; + result += word; + + if (j < lastWordIndex) + { + result += ' '; + spaceLeft -= wordWidthWithSpace; } else { - spaceLeft -= wordWidthWithSpace; - result += words[j]; - - if (j < (words.length - 1)) - { - result += ' '; - } + spaceLeft -= wordWidth; } } - if (i < lines.length - 1) + if (i < lastLineIndex) { result += '\n'; } @@ -39768,12 +39895,12 @@ module.exports = Text; /***/ }), -/* 195 */ +/* 196 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -39782,9 +39909,9 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameEvents = __webpack_require__(18); var GameObject = __webpack_require__(14); -var GetPowerOfTwo = __webpack_require__(310); -var Smoothing = __webpack_require__(162); -var TileSpriteRender = __webpack_require__(973); +var GetPowerOfTwo = __webpack_require__(324); +var Smoothing = __webpack_require__(164); +var TileSpriteRender = __webpack_require__(984); var Vector2 = __webpack_require__(3); // bitmask flag for GameObject.renderMask @@ -40420,24 +40547,24 @@ module.exports = TileSprite; /***/ }), -/* 196 */ +/* 197 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Clamp = __webpack_require__(23); +var Clamp = __webpack_require__(22); var Components = __webpack_require__(12); var Events = __webpack_require__(90); var GameEvents = __webpack_require__(18); var GameObject = __webpack_require__(14); var SoundEvents = __webpack_require__(59); -var UUID = __webpack_require__(193); -var VideoRender = __webpack_require__(976); +var UUID = __webpack_require__(194); +var VideoRender = __webpack_require__(987); var MATH_CONST = __webpack_require__(13); /** @@ -42189,25 +42316,24 @@ module.exports = Video; /***/ }), -/* 197 */ +/* 198 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(198); -var GetPoints = __webpack_require__(397); +var Contains = __webpack_require__(199); +var GetPoints = __webpack_require__(411); var GEOM_CONST = __webpack_require__(46); /** * @classdesc * A Polygon object * - * The polygon is a closed shape consists of a series of connected straight lines defined by list of ordered points. * Several formats are supported to define the list of points, check the setTo method for details. * This is a geometry object allowing you to define and inspect the shape. @@ -42405,11 +42531,13 @@ var Polygon = new Class({ * @method Phaser.Geom.Polygon#getPoints * @since 3.12.0 * + * @generic {Phaser.Geom.Point[]} O - [output,$return] + * * @param {integer} quantity - The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead. * @param {number} [stepRate] - Sets the quantity by getting the perimeter of the Polygon and dividing it by the stepRate. - * @param {array} [output] - An array to insert the points in to. If not provided a new array will be created. + * @param {(array|Phaser.Geom.Point[])} [output] - An array to insert the points in to. If not provided a new array will be created. * - * @return {Phaser.Geom.Point[]} An array of Point objects pertaining to the points around the perimeter of the Polygon. + * @return {(array|Phaser.Geom.Point[])} An array of Point objects pertaining to the points around the perimeter of the Polygon. */ getPoints: function (quantity, step, output) { @@ -42422,12 +42550,12 @@ module.exports = Polygon; /***/ }), -/* 198 */ +/* 199 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -42471,17 +42599,17 @@ module.exports = Contains; /***/ }), -/* 199 */ +/* 200 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Mesh = __webpack_require__(128); +var Mesh = __webpack_require__(130); /** * @classdesc @@ -43132,12 +43260,12 @@ module.exports = Quad; /***/ }), -/* 200 */ +/* 201 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -43146,8 +43274,8 @@ var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); var GetFastValue = __webpack_require__(2); var Extend = __webpack_require__(17); -var SetValue = __webpack_require__(405); -var ShaderRender = __webpack_require__(1057); +var SetValue = __webpack_require__(419); +var ShaderRender = __webpack_require__(1068); var TransformMatrix = __webpack_require__(32); /** @@ -44355,16 +44483,16 @@ module.exports = Shader; /***/ }), -/* 201 */ +/* 202 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DistanceBetween = __webpack_require__(58); +var DistanceBetween = __webpack_require__(53); /** * Checks if two Circles intersect. @@ -44386,12 +44514,12 @@ module.exports = CircleToCircle; /***/ }), -/* 202 */ +/* 203 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -44440,18 +44568,18 @@ module.exports = CircleToRectangle; /***/ }), -/* 203 */ +/* 204 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Point = __webpack_require__(4); -var LineToCircle = __webpack_require__(204); +var LineToCircle = __webpack_require__(205); /** * Checks for intersection between the line segment and circle, @@ -44532,16 +44660,16 @@ module.exports = GetLineToCircle; /***/ }), -/* 204 */ +/* 205 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(54); +var Contains = __webpack_require__(55); var Point = __webpack_require__(4); var tmp = new Point(); @@ -44616,19 +44744,19 @@ module.exports = LineToCircle; /***/ }), -/* 205 */ +/* 206 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Point = __webpack_require__(4); var LineToLine = __webpack_require__(84); -var LineToRectangle = __webpack_require__(410); +var LineToRectangle = __webpack_require__(424); /** * Checks for intersection between the Line and a Rectangle shape, @@ -44676,12 +44804,12 @@ module.exports = GetLineToRectangle; /***/ }), -/* 206 */ +/* 207 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -44763,12 +44891,12 @@ module.exports = ContainsArray; /***/ }), -/* 207 */ +/* 208 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -44811,12 +44939,12 @@ module.exports = RotateAroundXY; /***/ }), -/* 208 */ +/* 209 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -44839,12 +44967,12 @@ module.exports = GetAspectRatio; /***/ }), -/* 209 */ +/* 210 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -44893,12 +45021,12 @@ module.exports = RotateAroundXY; /***/ }), -/* 210 */ +/* 211 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -44908,28 +45036,28 @@ module.exports = RotateAroundXY; module.exports = { - BUTTON_DOWN: __webpack_require__(1178), - BUTTON_UP: __webpack_require__(1179), - CONNECTED: __webpack_require__(1180), - DISCONNECTED: __webpack_require__(1181), - GAMEPAD_BUTTON_DOWN: __webpack_require__(1182), - GAMEPAD_BUTTON_UP: __webpack_require__(1183) + BUTTON_DOWN: __webpack_require__(1189), + BUTTON_UP: __webpack_require__(1190), + CONNECTED: __webpack_require__(1191), + DISCONNECTED: __webpack_require__(1192), + GAMEPAD_BUTTON_DOWN: __webpack_require__(1193), + GAMEPAD_BUTTON_UP: __webpack_require__(1194) }; /***/ }), -/* 211 */ +/* 212 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Extend = __webpack_require__(17); -var XHRSettings = __webpack_require__(133); +var XHRSettings = __webpack_require__(135); /** * Takes two XHRSettings Objects and creates a new XHRSettings object from them. @@ -44967,22 +45095,22 @@ module.exports = MergeXHRSettings; /***/ }), -/* 212 */ +/* 213 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var File = __webpack_require__(20); +var CONST = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); -var ParseXML = __webpack_require__(344); +var ParseXML = __webpack_require__(358); /** * @classdesc @@ -45152,12 +45280,12 @@ module.exports = XMLFile; /***/ }), -/* 213 */ +/* 214 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45167,29 +45295,29 @@ module.exports = XMLFile; module.exports = { - Acceleration: __webpack_require__(1238), - Angular: __webpack_require__(1239), - Bounce: __webpack_require__(1240), - Debug: __webpack_require__(1241), - Drag: __webpack_require__(1242), - Enable: __webpack_require__(1243), - Friction: __webpack_require__(1244), - Gravity: __webpack_require__(1245), - Immovable: __webpack_require__(1246), - Mass: __webpack_require__(1247), - Size: __webpack_require__(1248), - Velocity: __webpack_require__(1249) + Acceleration: __webpack_require__(1249), + Angular: __webpack_require__(1250), + Bounce: __webpack_require__(1251), + Debug: __webpack_require__(1252), + Drag: __webpack_require__(1253), + Enable: __webpack_require__(1254), + Friction: __webpack_require__(1255), + Gravity: __webpack_require__(1256), + Immovable: __webpack_require__(1257), + Mass: __webpack_require__(1258), + Size: __webpack_require__(1259), + Velocity: __webpack_require__(1260) }; /***/ }), -/* 214 */ +/* 215 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45199,30 +45327,30 @@ module.exports = { module.exports = { - COLLIDE: __webpack_require__(1251), - OVERLAP: __webpack_require__(1252), - PAUSE: __webpack_require__(1253), - RESUME: __webpack_require__(1254), - TILE_COLLIDE: __webpack_require__(1255), - TILE_OVERLAP: __webpack_require__(1256), - WORLD_BOUNDS: __webpack_require__(1257), - WORLD_STEP: __webpack_require__(1258) + COLLIDE: __webpack_require__(1262), + OVERLAP: __webpack_require__(1263), + PAUSE: __webpack_require__(1264), + RESUME: __webpack_require__(1265), + TILE_COLLIDE: __webpack_require__(1266), + TILE_OVERLAP: __webpack_require__(1267), + WORLD_BOUNDS: __webpack_require__(1268), + WORLD_STEP: __webpack_require__(1269) }; /***/ }), -/* 215 */, -/* 216 */ +/* 216 */, +/* 217 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(137); +var GetTileAt = __webpack_require__(138); /** * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting @@ -45289,18 +45417,18 @@ module.exports = CalculateFacesAt; /***/ }), -/* 217 */ +/* 218 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Tile = __webpack_require__(74); var IsInLayerBounds = __webpack_require__(103); -var CalculateFacesAt = __webpack_require__(216); +var CalculateFacesAt = __webpack_require__(217); var SetTileCollision = __webpack_require__(73); /** @@ -45369,12 +45497,12 @@ module.exports = PutTileAt; /***/ }), -/* 218 */ +/* 219 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45408,12 +45536,12 @@ module.exports = SetLayerCollisionIndex; /***/ }), -/* 219 */ +/* 220 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45500,12 +45628,12 @@ module.exports = Parse2DArray; /***/ }), -/* 220 */ +/* 221 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45590,12 +45718,12 @@ module.exports = ParseGID; /***/ }), -/* 221 */ +/* 222 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Seth Berrier - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45651,17 +45779,17 @@ module.exports = CreateGroupLayer; /***/ }), -/* 222 */ +/* 223 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Pick = __webpack_require__(466); -var ParseGID = __webpack_require__(220); +var Pick = __webpack_require__(480); +var ParseGID = __webpack_require__(221); var copyPoints = function (p) { return { x: p.x, y: p.y }; }; @@ -45733,19 +45861,19 @@ module.exports = ParseObject; /***/ }), -/* 223 */ +/* 224 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Formats = __webpack_require__(31); var MapData = __webpack_require__(105); -var Parse = __webpack_require__(458); -var Tilemap = __webpack_require__(474); +var Parse = __webpack_require__(472); +var Tilemap = __webpack_require__(488); /** * Create a Tilemap from the given key or data. If neither is given, make a blank Tilemap. When @@ -45819,12 +45947,12 @@ module.exports = ParseToTilemap; /***/ }), -/* 224 */ +/* 225 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45868,12 +45996,12 @@ module.exports = GetTargets; /***/ }), -/* 225 */ +/* 226 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -46136,12 +46264,12 @@ module.exports = GetValueOp; /***/ }), -/* 226 */ +/* 227 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -46180,18 +46308,18 @@ module.exports = TWEEN_DEFAULTS; /***/ }), -/* 227 */ +/* 228 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(228); +var Events = __webpack_require__(229); var GameObjectCreator = __webpack_require__(16); var GameObjectFactory = __webpack_require__(5); var TWEEN_CONST = __webpack_require__(89); @@ -47425,7 +47553,7 @@ var Tween = new Class({ { if (!this.isSeeking) { - this.emit(event, this, tweenData.key, tweenData.target); + this.emit(event, this, tweenData.key, tweenData.target, tweenData.current, tweenData.previous); if (callback) { @@ -47650,6 +47778,7 @@ var Tween = new Class({ tweenData.elapsed = elapsed; tweenData.progress = progress; + tweenData.previous = tweenData.current; if (progress === 1) { @@ -47823,12 +47952,12 @@ module.exports = Tween; /***/ }), -/* 228 */ +/* 229 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47838,30 +47967,30 @@ module.exports = Tween; module.exports = { - TIMELINE_COMPLETE: __webpack_require__(1331), - TIMELINE_LOOP: __webpack_require__(1332), - TIMELINE_PAUSE: __webpack_require__(1333), - TIMELINE_RESUME: __webpack_require__(1334), - TIMELINE_START: __webpack_require__(1335), - TIMELINE_UPDATE: __webpack_require__(1336), - TWEEN_ACTIVE: __webpack_require__(1337), - TWEEN_COMPLETE: __webpack_require__(1338), - TWEEN_LOOP: __webpack_require__(1339), - TWEEN_REPEAT: __webpack_require__(1340), - TWEEN_START: __webpack_require__(1341), - TWEEN_UPDATE: __webpack_require__(1342), - TWEEN_YOYO: __webpack_require__(1343) + TIMELINE_COMPLETE: __webpack_require__(1346), + TIMELINE_LOOP: __webpack_require__(1347), + TIMELINE_PAUSE: __webpack_require__(1348), + TIMELINE_RESUME: __webpack_require__(1349), + TIMELINE_START: __webpack_require__(1350), + TIMELINE_UPDATE: __webpack_require__(1351), + TWEEN_ACTIVE: __webpack_require__(1352), + TWEEN_COMPLETE: __webpack_require__(1353), + TWEEN_LOOP: __webpack_require__(1354), + TWEEN_REPEAT: __webpack_require__(1355), + TWEEN_START: __webpack_require__(1356), + TWEEN_UPDATE: __webpack_require__(1357), + TWEEN_YOYO: __webpack_require__(1358) }; /***/ }), -/* 229 */ +/* 230 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47957,6 +48086,7 @@ var TweenData = function (target, index, key, getEnd, getStart, getActive, ease, // Ease Value Data: start: 0, + previous: 0, current: 0, end: 0, @@ -47982,12 +48112,12 @@ module.exports = TweenData; /***/ }), -/* 230 */ +/* 231 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -48036,16 +48166,16 @@ module.exports = ScaleModes; /***/ }), -/* 231 */ +/* 232 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathWrap = __webpack_require__(57); +var MathWrap = __webpack_require__(58); /** * Wrap an angle. @@ -48068,16 +48198,16 @@ module.exports = Wrap; /***/ }), -/* 232 */ +/* 233 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Wrap = __webpack_require__(57); +var Wrap = __webpack_require__(58); /** * Wrap an angle in degrees. @@ -48100,13 +48230,13 @@ module.exports = WrapDegrees; /***/ }), -/* 233 */ +/* 234 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -48869,25 +48999,25 @@ module.exports = WebGLPipeline; /***/ }), -/* 234 */ +/* 235 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Earcut = __webpack_require__(66); var GetFastValue = __webpack_require__(2); -var ModelViewProjection = __webpack_require__(492); -var ShaderSourceFS = __webpack_require__(756); -var ShaderSourceVS = __webpack_require__(757); +var ModelViewProjection = __webpack_require__(506); +var ShaderSourceFS = __webpack_require__(779); +var ShaderSourceVS = __webpack_require__(780); var TransformMatrix = __webpack_require__(32); var Utils = __webpack_require__(10); -var WebGLPipeline = __webpack_require__(233); +var WebGLPipeline = __webpack_require__(234); /** * @classdesc @@ -50377,14 +50507,14 @@ module.exports = TextureTintPipeline; /***/ }), -/* 235 */, /* 236 */, -/* 237 */ +/* 237 */, +/* 238 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -50394,85 +50524,670 @@ module.exports = TextureTintPipeline; module.exports = { - Angle: __webpack_require__(504), - Call: __webpack_require__(505), - GetFirst: __webpack_require__(506), - GetLast: __webpack_require__(507), - GridAlign: __webpack_require__(508), - IncAlpha: __webpack_require__(568), - IncX: __webpack_require__(569), - IncXY: __webpack_require__(570), - IncY: __webpack_require__(571), - PlaceOnCircle: __webpack_require__(572), - PlaceOnEllipse: __webpack_require__(573), - PlaceOnLine: __webpack_require__(574), - PlaceOnRectangle: __webpack_require__(575), - PlaceOnTriangle: __webpack_require__(576), - PlayAnimation: __webpack_require__(577), + AlignTo: __webpack_require__(521), + Angle: __webpack_require__(522), + Call: __webpack_require__(523), + GetFirst: __webpack_require__(524), + GetLast: __webpack_require__(525), + GridAlign: __webpack_require__(526), + IncAlpha: __webpack_require__(587), + IncX: __webpack_require__(588), + IncXY: __webpack_require__(589), + IncY: __webpack_require__(590), + PlaceOnCircle: __webpack_require__(591), + PlaceOnEllipse: __webpack_require__(592), + PlaceOnLine: __webpack_require__(593), + PlaceOnRectangle: __webpack_require__(594), + PlaceOnTriangle: __webpack_require__(595), + PlayAnimation: __webpack_require__(596), PropertyValueInc: __webpack_require__(34), PropertyValueSet: __webpack_require__(25), - RandomCircle: __webpack_require__(578), - RandomEllipse: __webpack_require__(579), - RandomLine: __webpack_require__(580), - RandomRectangle: __webpack_require__(581), - RandomTriangle: __webpack_require__(582), - Rotate: __webpack_require__(583), - RotateAround: __webpack_require__(584), - RotateAroundDistance: __webpack_require__(585), - ScaleX: __webpack_require__(586), - ScaleXY: __webpack_require__(587), - ScaleY: __webpack_require__(588), - SetAlpha: __webpack_require__(589), - SetBlendMode: __webpack_require__(590), - SetDepth: __webpack_require__(591), - SetHitArea: __webpack_require__(592), - SetOrigin: __webpack_require__(593), - SetRotation: __webpack_require__(594), - SetScale: __webpack_require__(595), - SetScaleX: __webpack_require__(596), - SetScaleY: __webpack_require__(597), - SetScrollFactor: __webpack_require__(598), - SetScrollFactorX: __webpack_require__(599), - SetScrollFactorY: __webpack_require__(600), - SetTint: __webpack_require__(601), - SetVisible: __webpack_require__(602), - SetX: __webpack_require__(603), - SetXY: __webpack_require__(604), - SetY: __webpack_require__(605), - ShiftPosition: __webpack_require__(606), - Shuffle: __webpack_require__(607), - SmootherStep: __webpack_require__(608), - SmoothStep: __webpack_require__(609), - Spread: __webpack_require__(610), - ToggleVisible: __webpack_require__(611), - WrapInRectangle: __webpack_require__(612) + RandomCircle: __webpack_require__(597), + RandomEllipse: __webpack_require__(598), + RandomLine: __webpack_require__(599), + RandomRectangle: __webpack_require__(600), + RandomTriangle: __webpack_require__(601), + Rotate: __webpack_require__(602), + RotateAround: __webpack_require__(603), + RotateAroundDistance: __webpack_require__(604), + ScaleX: __webpack_require__(605), + ScaleXY: __webpack_require__(606), + ScaleY: __webpack_require__(607), + SetAlpha: __webpack_require__(608), + SetBlendMode: __webpack_require__(609), + SetDepth: __webpack_require__(610), + SetHitArea: __webpack_require__(611), + SetOrigin: __webpack_require__(612), + SetRotation: __webpack_require__(613), + SetScale: __webpack_require__(614), + SetScaleX: __webpack_require__(615), + SetScaleY: __webpack_require__(616), + SetScrollFactor: __webpack_require__(617), + SetScrollFactorX: __webpack_require__(618), + SetScrollFactorY: __webpack_require__(619), + SetTint: __webpack_require__(620), + SetVisible: __webpack_require__(621), + SetX: __webpack_require__(622), + SetXY: __webpack_require__(623), + SetY: __webpack_require__(624), + ShiftPosition: __webpack_require__(625), + Shuffle: __webpack_require__(626), + SmootherStep: __webpack_require__(627), + SmoothStep: __webpack_require__(628), + Spread: __webpack_require__(629), + ToggleVisible: __webpack_require__(630), + WrapInRectangle: __webpack_require__(631) }; /***/ }), -/* 238 */ +/* 239 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var ALIGN_CONST = __webpack_require__(106); + +var AlignToMap = []; + +AlignToMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(240); +AlignToMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(241); +AlignToMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(242); +AlignToMap[ALIGN_CONST.LEFT_BOTTOM] = __webpack_require__(243); +AlignToMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(244); +AlignToMap[ALIGN_CONST.LEFT_TOP] = __webpack_require__(245); +AlignToMap[ALIGN_CONST.RIGHT_BOTTOM] = __webpack_require__(246); +AlignToMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(247); +AlignToMap[ALIGN_CONST.RIGHT_TOP] = __webpack_require__(248); +AlignToMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(249); +AlignToMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(250); +AlignToMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(251); + +/** + * Takes a Game Object and aligns it next to another, at the given position. + * The alignment used is based on the `position` argument, which is a `Phaser.Display.Align` property such as `LEFT_CENTER` or `TOP_RIGHT`. + * + * @function Phaser.Display.Align.To.QuickSet + * @since 3.22.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [child,$return] + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {integer} position - The position to align the Game Object with. This is an align constant, such as `Phaser.Display.Align.LEFT_CENTER`. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var QuickSet = function (child, alignTo, position, offsetX, offsetY) +{ + return AlignToMap[position](child, alignTo, offsetX, offsetY); +}; + +module.exports = QuickSet; + + +/***/ }), +/* 240 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ALIGN_CONST = __webpack_require__(143); +var GetBottom = __webpack_require__(38); +var GetCenterX = __webpack_require__(75); +var SetCenterX = __webpack_require__(76); +var SetTop = __webpack_require__(39); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the bottom center position of the other. + * + * @function Phaser.Display.Align.To.BottomCenter + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var BottomCenter = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetCenterX(gameObject, GetCenterX(alignTo) + offsetX); + SetTop(gameObject, GetBottom(alignTo) + offsetY); + + return gameObject; +}; + +module.exports = BottomCenter; + + +/***/ }), +/* 241 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetBottom = __webpack_require__(38); +var GetLeft = __webpack_require__(40); +var SetLeft = __webpack_require__(41); +var SetTop = __webpack_require__(39); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the bottom left position of the other. + * + * @function Phaser.Display.Align.To.BottomLeft + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var BottomLeft = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetLeft(gameObject, GetLeft(alignTo) - offsetX); + SetTop(gameObject, GetBottom(alignTo) + offsetY); + + return gameObject; +}; + +module.exports = BottomLeft; + + +/***/ }), +/* 242 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetBottom = __webpack_require__(38); +var GetRight = __webpack_require__(42); +var SetRight = __webpack_require__(43); +var SetTop = __webpack_require__(39); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the bottom right position of the other. + * + * @function Phaser.Display.Align.To.BottomRight + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var BottomRight = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetRight(gameObject, GetRight(alignTo) + offsetX); + SetTop(gameObject, GetBottom(alignTo) + offsetY); + + return gameObject; +}; + +module.exports = BottomRight; + + +/***/ }), +/* 243 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetBottom = __webpack_require__(38); +var GetLeft = __webpack_require__(40); +var SetBottom = __webpack_require__(44); +var SetRight = __webpack_require__(43); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the left bottom position of the other. + * + * @function Phaser.Display.Align.To.LeftBottom + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var LeftBottom = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetRight(gameObject, GetLeft(alignTo) - offsetX); + SetBottom(gameObject, GetBottom(alignTo) + offsetY); + + return gameObject; +}; + +module.exports = LeftBottom; + + +/***/ }), +/* 244 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetCenterY = __webpack_require__(77); +var GetLeft = __webpack_require__(40); +var SetCenterY = __webpack_require__(78); +var SetRight = __webpack_require__(43); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the left center position of the other. + * + * @function Phaser.Display.Align.To.LeftCenter + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var LeftCenter = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetRight(gameObject, GetLeft(alignTo) - offsetX); + SetCenterY(gameObject, GetCenterY(alignTo) + offsetY); + + return gameObject; +}; + +module.exports = LeftCenter; + + +/***/ }), +/* 245 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetLeft = __webpack_require__(40); +var GetTop = __webpack_require__(45); +var SetRight = __webpack_require__(43); +var SetTop = __webpack_require__(39); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the left top position of the other. + * + * @function Phaser.Display.Align.To.LeftTop + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var LeftTop = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetRight(gameObject, GetLeft(alignTo) - offsetX); + SetTop(gameObject, GetTop(alignTo) - offsetY); + + return gameObject; +}; + +module.exports = LeftTop; + + +/***/ }), +/* 246 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetBottom = __webpack_require__(38); +var GetRight = __webpack_require__(42); +var SetBottom = __webpack_require__(44); +var SetLeft = __webpack_require__(41); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the right bottom position of the other. + * + * @function Phaser.Display.Align.To.RightBottom + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var RightBottom = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetLeft(gameObject, GetRight(alignTo) + offsetX); + SetBottom(gameObject, GetBottom(alignTo) + offsetY); + + return gameObject; +}; + +module.exports = RightBottom; + + +/***/ }), +/* 247 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetCenterY = __webpack_require__(77); +var GetRight = __webpack_require__(42); +var SetCenterY = __webpack_require__(78); +var SetLeft = __webpack_require__(41); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the right center position of the other. + * + * @function Phaser.Display.Align.To.RightCenter + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var RightCenter = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetLeft(gameObject, GetRight(alignTo) + offsetX); + SetCenterY(gameObject, GetCenterY(alignTo) + offsetY); + + return gameObject; +}; + +module.exports = RightCenter; + + +/***/ }), +/* 248 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetRight = __webpack_require__(42); +var GetTop = __webpack_require__(45); +var SetLeft = __webpack_require__(41); +var SetTop = __webpack_require__(39); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the right top position of the other. + * + * @function Phaser.Display.Align.To.RightTop + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var RightTop = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetLeft(gameObject, GetRight(alignTo) + offsetX); + SetTop(gameObject, GetTop(alignTo) - offsetY); + + return gameObject; +}; + +module.exports = RightTop; + + +/***/ }), +/* 249 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetCenterX = __webpack_require__(75); +var GetTop = __webpack_require__(45); +var SetBottom = __webpack_require__(44); +var SetCenterX = __webpack_require__(76); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the top center position of the other. + * + * @function Phaser.Display.Align.To.TopCenter + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var TopCenter = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetCenterX(gameObject, GetCenterX(alignTo) + offsetX); + SetBottom(gameObject, GetTop(alignTo) - offsetY); + + return gameObject; +}; + +module.exports = TopCenter; + + +/***/ }), +/* 250 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetLeft = __webpack_require__(40); +var GetTop = __webpack_require__(45); +var SetBottom = __webpack_require__(44); +var SetLeft = __webpack_require__(41); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the top left position of the other. + * + * @function Phaser.Display.Align.To.TopLeft + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var TopLeft = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetLeft(gameObject, GetLeft(alignTo) - offsetX); + SetBottom(gameObject, GetTop(alignTo) - offsetY); + + return gameObject; +}; + +module.exports = TopLeft; + + +/***/ }), +/* 251 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetRight = __webpack_require__(42); +var GetTop = __webpack_require__(45); +var SetBottom = __webpack_require__(44); +var SetRight = __webpack_require__(43); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the top right position of the other. + * + * @function Phaser.Display.Align.To.TopRight + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var TopRight = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetRight(gameObject, GetRight(alignTo) + offsetX); + SetBottom(gameObject, GetTop(alignTo) - offsetY); + + return gameObject; +}; + +module.exports = TopRight; + + +/***/ }), +/* 252 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var ALIGN_CONST = __webpack_require__(106); var AlignInMap = []; -AlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(239); -AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(240); -AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(241); -AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(242); -AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(244); -AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(245); -AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(246); -AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(247); -AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(248); +AlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(253); +AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(254); +AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(255); +AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(256); +AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(258); +AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(259); +AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(260); +AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(261); +AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(262); +AlignInMap[ALIGN_CONST.LEFT_BOTTOM] = AlignInMap[ALIGN_CONST.BOTTOM_LEFT]; +AlignInMap[ALIGN_CONST.LEFT_TOP] = AlignInMap[ALIGN_CONST.TOP_LEFT]; +AlignInMap[ALIGN_CONST.RIGHT_BOTTOM] = AlignInMap[ALIGN_CONST.BOTTOM_RIGHT]; +AlignInMap[ALIGN_CONST.RIGHT_TOP] = AlignInMap[ALIGN_CONST.TOP_RIGHT]; /** * Takes given Game Object and aligns it so that it is positioned relative to the other. @@ -50500,18 +51215,18 @@ module.exports = QuickSet; /***/ }), -/* 239 */ +/* 253 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetBottom = __webpack_require__(38); var GetCenterX = __webpack_require__(75); -var SetBottom = __webpack_require__(39); +var SetBottom = __webpack_require__(44); var SetCenterX = __webpack_require__(76); /** @@ -50544,18 +51259,18 @@ module.exports = BottomCenter; /***/ }), -/* 240 */ +/* 254 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetBottom = __webpack_require__(38); var GetLeft = __webpack_require__(40); -var SetBottom = __webpack_require__(39); +var SetBottom = __webpack_require__(44); var SetLeft = __webpack_require__(41); /** @@ -50588,18 +51303,18 @@ module.exports = BottomLeft; /***/ }), -/* 241 */ +/* 255 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetBottom = __webpack_require__(38); var GetRight = __webpack_require__(42); -var SetBottom = __webpack_require__(39); +var SetBottom = __webpack_require__(44); var SetRight = __webpack_require__(43); /** @@ -50632,18 +51347,18 @@ module.exports = BottomRight; /***/ }), -/* 242 */ +/* 256 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CenterOn = __webpack_require__(243); +var CenterOn = __webpack_require__(257); var GetCenterX = __webpack_require__(75); -var GetCenterY = __webpack_require__(78); +var GetCenterY = __webpack_require__(77); /** * Takes given Game Object and aligns it so that it is positioned in the center of the other. @@ -50674,17 +51389,17 @@ module.exports = Center; /***/ }), -/* 243 */ +/* 257 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var SetCenterX = __webpack_require__(76); -var SetCenterY = __webpack_require__(77); +var SetCenterY = __webpack_require__(78); /** * Positions the Game Object so that it is centered on the given coordinates. @@ -50711,18 +51426,18 @@ module.exports = CenterOn; /***/ }), -/* 244 */ +/* 258 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetCenterY = __webpack_require__(78); +var GetCenterY = __webpack_require__(77); var GetLeft = __webpack_require__(40); -var SetCenterY = __webpack_require__(77); +var SetCenterY = __webpack_require__(78); var SetLeft = __webpack_require__(41); /** @@ -50755,18 +51470,18 @@ module.exports = LeftCenter; /***/ }), -/* 245 */ +/* 259 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetCenterY = __webpack_require__(78); +var GetCenterY = __webpack_require__(77); var GetRight = __webpack_require__(42); -var SetCenterY = __webpack_require__(77); +var SetCenterY = __webpack_require__(78); var SetRight = __webpack_require__(43); /** @@ -50799,19 +51514,19 @@ module.exports = RightCenter; /***/ }), -/* 246 */ +/* 260 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetCenterX = __webpack_require__(75); -var GetTop = __webpack_require__(44); +var GetTop = __webpack_require__(45); var SetCenterX = __webpack_require__(76); -var SetTop = __webpack_require__(45); +var SetTop = __webpack_require__(39); /** * Takes given Game Object and aligns it so that it is positioned in the top center of the other. @@ -50843,19 +51558,19 @@ module.exports = TopCenter; /***/ }), -/* 247 */ +/* 261 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetLeft = __webpack_require__(40); -var GetTop = __webpack_require__(44); +var GetTop = __webpack_require__(45); var SetLeft = __webpack_require__(41); -var SetTop = __webpack_require__(45); +var SetTop = __webpack_require__(39); /** * Takes given Game Object and aligns it so that it is positioned in the top left of the other. @@ -50887,19 +51602,19 @@ module.exports = TopLeft; /***/ }), -/* 248 */ +/* 262 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetRight = __webpack_require__(42); -var GetTop = __webpack_require__(44); +var GetTop = __webpack_require__(45); var SetRight = __webpack_require__(43); -var SetTop = __webpack_require__(45); +var SetTop = __webpack_require__(39); /** * Takes given Game Object and aligns it so that it is positioned in the top right of the other. @@ -50931,16 +51646,16 @@ module.exports = TopRight; /***/ }), -/* 249 */ +/* 263 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CircumferencePoint = __webpack_require__(144); +var CircumferencePoint = __webpack_require__(146); var FromPercent = __webpack_require__(87); var MATH_CONST = __webpack_require__(13); var Point = __webpack_require__(4); @@ -50974,17 +51689,17 @@ module.exports = GetPoint; /***/ }), -/* 250 */ +/* 264 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circumference = __webpack_require__(251); -var CircumferencePoint = __webpack_require__(144); +var Circumference = __webpack_require__(265); +var CircumferencePoint = __webpack_require__(146); var FromPercent = __webpack_require__(87); var MATH_CONST = __webpack_require__(13); @@ -51026,12 +51741,12 @@ module.exports = GetPoints; /***/ }), -/* 251 */ +/* 265 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51054,34 +51769,34 @@ module.exports = Circumference; /***/ }), -/* 252 */ +/* 266 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(23); +var Clamp = __webpack_require__(22); // bitmask flag for GameObject.renderMask var _FLAG = 2; // 0010 /** - * Provides methods used for setting the alpha properties of a Game Object. + * Provides methods used for setting the alpha property of a Game Object. * Should be applied as a mixin and not used directly. * - * @namespace Phaser.GameObjects.Components.Alpha - * @since 3.0.0 + * @namespace Phaser.GameObjects.Components.AlphaSingle + * @since 3.22.0 */ -var Alpha = { +var AlphaSingle = { /** * Private internal value. Holds the global alpha value. * - * @name Phaser.GameObjects.Components.Alpha#_alpha + * @name Phaser.GameObjects.Components.AlphaSingle#_alpha * @type {number} * @private * @default 1 @@ -51089,56 +51804,12 @@ var Alpha = { */ _alpha: 1, - /** - * Private internal value. Holds the top-left alpha value. - * - * @name Phaser.GameObjects.Components.Alpha#_alphaTL - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - _alphaTL: 1, - - /** - * Private internal value. Holds the top-right alpha value. - * - * @name Phaser.GameObjects.Components.Alpha#_alphaTR - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - _alphaTR: 1, - - /** - * Private internal value. Holds the bottom-left alpha value. - * - * @name Phaser.GameObjects.Components.Alpha#_alphaBL - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - _alphaBL: 1, - - /** - * Private internal value. Holds the bottom-right alpha value. - * - * @name Phaser.GameObjects.Components.Alpha#_alphaBR - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - _alphaBR: 1, - /** * Clears all alpha values associated with this Game Object. * * Immediately sets the alpha levels back to 1 (fully opaque). * - * @method Phaser.GameObjects.Components.Alpha#clearAlpha + * @method Phaser.GameObjects.Components.AlphaSingle#clearAlpha * @since 3.0.0 * * @return {this} This Game Object instance. @@ -51152,35 +51823,18 @@ var Alpha = { * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. * - * If your game is running under WebGL you can optionally specify four different alpha values, each of which - * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. - * - * @method Phaser.GameObjects.Components.Alpha#setAlpha + * @method Phaser.GameObjects.Components.AlphaSingle#setAlpha * @since 3.0.0 * - * @param {number} [topLeft=1] - The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. - * @param {number} [topRight] - The alpha value used for the top-right of the Game Object. WebGL only. - * @param {number} [bottomLeft] - The alpha value used for the bottom-left of the Game Object. WebGL only. - * @param {number} [bottomRight] - The alpha value used for the bottom-right of the Game Object. WebGL only. + * @param {number} [value=1] - The alpha value applied across the whole Game Object. * * @return {this} This Game Object instance. */ - setAlpha: function (topLeft, topRight, bottomLeft, bottomRight) + setAlpha: function (value) { - if (topLeft === undefined) { topLeft = 1; } + if (value === undefined) { value = 1; } - // Treat as if there is only one alpha value for the whole Game Object - if (topRight === undefined) - { - this.alpha = topLeft; - } - else - { - this._alphaTL = Clamp(topLeft, 0, 1); - this._alphaTR = Clamp(topRight, 0, 1); - this._alphaBL = Clamp(bottomLeft, 0, 1); - this._alphaBR = Clamp(bottomRight, 0, 1); - } + this.alpha = value; return this; }, @@ -51190,7 +51844,7 @@ var Alpha = { * * This is a global value, impacting the entire Game Object, not just a region of it. * - * @name Phaser.GameObjects.Components.Alpha#alpha + * @name Phaser.GameObjects.Components.AlphaSingle#alpha * @type {number} * @since 3.0.0 */ @@ -51206,10 +51860,6 @@ var Alpha = { var v = Clamp(value, 0, 1); this._alpha = v; - this._alphaTL = v; - this._alphaTR = v; - this._alphaBL = v; - this._alphaBR = v; if (v === 0) { @@ -51221,140 +51871,20 @@ var Alpha = { } } - }, - - /** - * The alpha value starting from the top-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * - * @name Phaser.GameObjects.Components.Alpha#alphaTopLeft - * @type {number} - * @webglOnly - * @since 3.0.0 - */ - alphaTopLeft: { - - get: function () - { - return this._alphaTL; - }, - - set: function (value) - { - var v = Clamp(value, 0, 1); - - this._alphaTL = v; - - if (v !== 0) - { - this.renderFlags |= _FLAG; - } - } - - }, - - /** - * The alpha value starting from the top-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * - * @name Phaser.GameObjects.Components.Alpha#alphaTopRight - * @type {number} - * @webglOnly - * @since 3.0.0 - */ - alphaTopRight: { - - get: function () - { - return this._alphaTR; - }, - - set: function (value) - { - var v = Clamp(value, 0, 1); - - this._alphaTR = v; - - if (v !== 0) - { - this.renderFlags |= _FLAG; - } - } - - }, - - /** - * The alpha value starting from the bottom-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * - * @name Phaser.GameObjects.Components.Alpha#alphaBottomLeft - * @type {number} - * @webglOnly - * @since 3.0.0 - */ - alphaBottomLeft: { - - get: function () - { - return this._alphaBL; - }, - - set: function (value) - { - var v = Clamp(value, 0, 1); - - this._alphaBL = v; - - if (v !== 0) - { - this.renderFlags |= _FLAG; - } - } - - }, - - /** - * The alpha value starting from the bottom-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * - * @name Phaser.GameObjects.Components.Alpha#alphaBottomRight - * @type {number} - * @webglOnly - * @since 3.0.0 - */ - alphaBottomRight: { - - get: function () - { - return this._alphaBR; - }, - - set: function (value) - { - var v = Clamp(value, 0, 1); - - this._alphaBR = v; - - if (v !== 0) - { - this.renderFlags |= _FLAG; - } - } - } }; -module.exports = Alpha; +module.exports = AlphaSingle; /***/ }), -/* 253 */ +/* 267 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51433,12 +51963,12 @@ module.exports = FindClosestInSorted; /***/ }), -/* 254 */ +/* 268 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51607,12 +52137,12 @@ module.exports = AnimationFrame; /***/ }), -/* 255 */ +/* 269 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51729,12 +52259,12 @@ module.exports = BlendMode; /***/ }), -/* 256 */ +/* 270 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51822,17 +52352,17 @@ module.exports = Depth; /***/ }), -/* 257 */ +/* 271 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetPoint = __webpack_require__(147); -var Perimeter = __webpack_require__(110); +var GetPoint = __webpack_require__(149); +var Perimeter = __webpack_require__(112); // Return an array of points from the perimeter of the rectangle // each spaced out based on the quantity or step required @@ -51876,12 +52406,12 @@ module.exports = GetPoints; /***/ }), -/* 258 */ +/* 272 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51915,12 +52445,12 @@ module.exports = GetPoint; /***/ }), -/* 259 */ +/* 273 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51955,17 +52485,17 @@ module.exports = RotateAround; /***/ }), -/* 260 */ +/* 274 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapMask = __webpack_require__(261); -var GeometryMask = __webpack_require__(262); +var BitmapMask = __webpack_require__(275); +var GeometryMask = __webpack_require__(276); /** * Provides methods used for getting and setting the mask of a Game Object. @@ -52102,12 +52632,12 @@ module.exports = Mask; /***/ }), -/* 261 */ +/* 275 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -52395,12 +52925,12 @@ module.exports = BitmapMask; /***/ }), -/* 262 */ +/* 276 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -52710,12 +53240,12 @@ module.exports = GeometryMask; /***/ }), -/* 263 */ +/* 277 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -52817,12 +53347,12 @@ module.exports = ScrollFactor; /***/ }), -/* 264 */ +/* 278 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -52878,19 +53408,19 @@ module.exports = ToJSON; /***/ }), -/* 265 */ +/* 279 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var MATH_CONST = __webpack_require__(13); var TransformMatrix = __webpack_require__(32); -var WrapAngle = __webpack_require__(231); -var WrapAngleDegrees = __webpack_require__(232); +var WrapAngle = __webpack_require__(232); +var WrapAngleDegrees = __webpack_require__(233); // global bitmask flag for GameObject.renderMask (used by Scale) var _FLAG = 4; // 0100 @@ -52906,7 +53436,7 @@ var Transform = { /** * Private internal value. Holds the horizontal scale value. - * + * * @name Phaser.GameObjects.Components.Transform#_scaleX * @type {number} * @private @@ -52917,7 +53447,7 @@ var Transform = { /** * Private internal value. Holds the vertical scale value. - * + * * @name Phaser.GameObjects.Components.Transform#_scaleY * @type {number} * @private @@ -52928,7 +53458,7 @@ var Transform = { /** * Private internal value. Holds the rotation value in radians. - * + * * @name Phaser.GameObjects.Components.Transform#_rotation * @type {number} * @private @@ -52959,7 +53489,9 @@ var Transform = { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. * * @name Phaser.GameObjects.Components.Transform#z * @type {number} @@ -52981,7 +53513,7 @@ var Transform = { /** * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`. - * + * * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this * isn't the case, use the `scaleX` or `scaleY` properties instead. * @@ -53078,7 +53610,7 @@ var Transform = { /** * The angle of this Game Object as expressed in degrees. - * + * * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left * and -90 is up. * @@ -53105,7 +53637,7 @@ var Transform = { /** * The angle of this Game Object in radians. - * + * * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left * and -90 is up. * @@ -53161,7 +53693,7 @@ var Transform = { /** * Sets the position of this Game Object to be a random position within the confines of * the given area. - * + * * If no area is specified a random position between 0 x 0 and the game width x height is used instead. * * The position does not factor in the size of this Game Object, meaning that only the origin is @@ -53291,6 +53823,9 @@ var Transform = { /** * Sets the z position of this Game Object. * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. + * * @method Phaser.GameObjects.Components.Transform#setZ * @since 3.0.0 * @@ -53382,7 +53917,7 @@ var Transform = { /** * Gets the sum total rotation of all of this Game Objects parent Containers. - * + * * The returned value is in radians and will be zero if this Game Object has no parent container. * * @method Phaser.GameObjects.Components.Transform#getParentRotation @@ -53412,12 +53947,12 @@ module.exports = Transform; /***/ }), -/* 266 */ +/* 280 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -53501,12 +54036,12 @@ module.exports = Visible; /***/ }), -/* 267 */ +/* 281 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -53516,25 +54051,25 @@ module.exports = Visible; module.exports = { - CHANGE_DATA: __webpack_require__(553), - CHANGE_DATA_KEY: __webpack_require__(554), - REMOVE_DATA: __webpack_require__(555), - SET_DATA: __webpack_require__(556) + CHANGE_DATA: __webpack_require__(572), + CHANGE_DATA_KEY: __webpack_require__(573), + REMOVE_DATA: __webpack_require__(574), + SET_DATA: __webpack_require__(575) }; /***/ }), -/* 268 */ +/* 282 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Perimeter = __webpack_require__(110); +var Perimeter = __webpack_require__(112); var Point = __webpack_require__(4); @@ -53644,12 +54179,12 @@ module.exports = MarchingAnts; /***/ }), -/* 269 */ +/* 283 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -53684,12 +54219,12 @@ module.exports = RotateLeft; /***/ }), -/* 270 */ +/* 284 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -53724,12 +54259,12 @@ module.exports = RotateRight; /***/ }), -/* 271 */ +/* 285 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -53743,9 +54278,9 @@ module.exports = RotateRight; * * @param {Phaser.Geom.Line} line - The line. * @param {integer} [stepRate=1] - The optional step rate for the points on the line. - * @param {array} [results] - An optional array to push the resulting coordinates into. + * @param {Phaser.Types.Math.Vector2Like[]} [results] - An optional array to push the resulting coordinates into. * - * @return {object[]} The array of coordinates on the line. + * @return {Phaser.Types.Math.Vector2Like[]} The array of coordinates on the line. */ var BresenhamPoints = function (line, stepRate, results) { @@ -53798,23 +54333,23 @@ module.exports = BresenhamPoints; /***/ }), -/* 272 */ +/* 286 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Animation = __webpack_require__(146); +var Animation = __webpack_require__(148); var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(157); +var CustomMap = __webpack_require__(159); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(109); +var Events = __webpack_require__(111); var GameEvents = __webpack_require__(18); var GetValue = __webpack_require__(6); -var Pad = __webpack_require__(158); +var Pad = __webpack_require__(160); /** * @classdesc @@ -54447,19 +54982,19 @@ module.exports = AnimationManager; /***/ }), -/* 273 */ +/* 287 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(157); +var CustomMap = __webpack_require__(159); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(274); +var Events = __webpack_require__(288); /** * @classdesc @@ -54633,12 +55168,12 @@ module.exports = BaseCache; /***/ }), -/* 274 */ +/* 288 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -54648,23 +55183,23 @@ module.exports = BaseCache; module.exports = { - ADD: __webpack_require__(615), - REMOVE: __webpack_require__(616) + ADD: __webpack_require__(634), + REMOVE: __webpack_require__(635) }; /***/ }), -/* 275 */ +/* 289 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseCache = __webpack_require__(273); +var BaseCache = __webpack_require__(287); var Class = __webpack_require__(0); var GameEvents = __webpack_require__(18); @@ -54889,23 +55424,23 @@ module.exports = CacheManager; /***/ }), -/* 276 */ +/* 290 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BaseCamera = __webpack_require__(91); var CanvasPool = __webpack_require__(26); -var CenterOn = __webpack_require__(163); -var Clamp = __webpack_require__(23); +var CenterOn = __webpack_require__(165); +var Clamp = __webpack_require__(22); var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var Effects = __webpack_require__(284); -var Linear = __webpack_require__(113); +var Effects = __webpack_require__(298); +var Linear = __webpack_require__(115); var Rectangle = __webpack_require__(11); var Vector2 = __webpack_require__(3); @@ -55882,12 +56417,12 @@ module.exports = Camera; /***/ }), -/* 277 */ +/* 291 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -55935,12 +56470,12 @@ module.exports = HexStringToColor; /***/ }), -/* 278 */ +/* 292 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -55966,12 +56501,12 @@ module.exports = GetColor32; /***/ }), -/* 279 */ +/* 293 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -56046,17 +56581,17 @@ module.exports = RGBToHSV; /***/ }), -/* 280 */ +/* 294 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Color = __webpack_require__(33); -var IntegerToRGB = __webpack_require__(281); +var IntegerToRGB = __webpack_require__(295); /** * Converts the given color value into an instance of a Color object. @@ -56079,12 +56614,12 @@ module.exports = IntegerToColor; /***/ }), -/* 281 */ +/* 295 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -56127,12 +56662,12 @@ module.exports = IntegerToRGB; /***/ }), -/* 282 */ +/* 296 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -56157,12 +56692,12 @@ module.exports = ObjectToColor; /***/ }), -/* 283 */ +/* 297 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -56203,12 +56738,12 @@ module.exports = RGBStringToColor; /***/ }), -/* 284 */ +/* 298 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -56218,22 +56753,22 @@ module.exports = RGBStringToColor; module.exports = { - Fade: __webpack_require__(637), - Flash: __webpack_require__(638), - Pan: __webpack_require__(639), - Shake: __webpack_require__(672), - Zoom: __webpack_require__(673) + Fade: __webpack_require__(656), + Flash: __webpack_require__(657), + Pan: __webpack_require__(658), + Shake: __webpack_require__(691), + Zoom: __webpack_require__(692) }; /***/ }), -/* 285 */ +/* 299 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -56241,161 +56776,6 @@ module.exports = { * @namespace Phaser.Math.Easing.Back */ -module.exports = { - - In: __webpack_require__(640), - Out: __webpack_require__(641), - InOut: __webpack_require__(642) - -}; - - -/***/ }), -/* 286 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Bounce - */ - -module.exports = { - - In: __webpack_require__(643), - Out: __webpack_require__(644), - InOut: __webpack_require__(645) - -}; - - -/***/ }), -/* 287 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Circular - */ - -module.exports = { - - In: __webpack_require__(646), - Out: __webpack_require__(647), - InOut: __webpack_require__(648) - -}; - - -/***/ }), -/* 288 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Cubic - */ - -module.exports = { - - In: __webpack_require__(649), - Out: __webpack_require__(650), - InOut: __webpack_require__(651) - -}; - - -/***/ }), -/* 289 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Elastic - */ - -module.exports = { - - In: __webpack_require__(652), - Out: __webpack_require__(653), - InOut: __webpack_require__(654) - -}; - - -/***/ }), -/* 290 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Expo - */ - -module.exports = { - - In: __webpack_require__(655), - Out: __webpack_require__(656), - InOut: __webpack_require__(657) - -}; - - -/***/ }), -/* 291 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Linear - */ - -module.exports = __webpack_require__(658); - - -/***/ }), -/* 292 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Quadratic - */ - module.exports = { In: __webpack_require__(659), @@ -56406,17 +56786,17 @@ module.exports = { /***/ }), -/* 293 */ +/* 300 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * @namespace Phaser.Math.Easing.Quartic + * @namespace Phaser.Math.Easing.Bounce */ module.exports = { @@ -56429,17 +56809,17 @@ module.exports = { /***/ }), -/* 294 */ +/* 301 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * @namespace Phaser.Math.Easing.Quintic + * @namespace Phaser.Math.Easing.Circular */ module.exports = { @@ -56452,17 +56832,17 @@ module.exports = { /***/ }), -/* 295 */ +/* 302 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * @namespace Phaser.Math.Easing.Sine + * @namespace Phaser.Math.Easing.Cubic */ module.exports = { @@ -56475,12 +56855,167 @@ module.exports = { /***/ }), -/* 296 */ +/* 303 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Elastic + */ + +module.exports = { + + In: __webpack_require__(671), + Out: __webpack_require__(672), + InOut: __webpack_require__(673) + +}; + + +/***/ }), +/* 304 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Expo + */ + +module.exports = { + + In: __webpack_require__(674), + Out: __webpack_require__(675), + InOut: __webpack_require__(676) + +}; + + +/***/ }), +/* 305 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Linear + */ + +module.exports = __webpack_require__(677); + + +/***/ }), +/* 306 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Quadratic + */ + +module.exports = { + + In: __webpack_require__(678), + Out: __webpack_require__(679), + InOut: __webpack_require__(680) + +}; + + +/***/ }), +/* 307 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Quartic + */ + +module.exports = { + + In: __webpack_require__(681), + Out: __webpack_require__(682), + InOut: __webpack_require__(683) + +}; + + +/***/ }), +/* 308 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Quintic + */ + +module.exports = { + + In: __webpack_require__(684), + Out: __webpack_require__(685), + InOut: __webpack_require__(686) + +}; + + +/***/ }), +/* 309 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Sine + */ + +module.exports = { + + In: __webpack_require__(687), + Out: __webpack_require__(688), + InOut: __webpack_require__(689) + +}; + + +/***/ }), +/* 310 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -56488,29 +57023,29 @@ module.exports = { * @namespace Phaser.Math.Easing.Stepped */ -module.exports = __webpack_require__(671); +module.exports = __webpack_require__(690); /***/ }), -/* 297 */ +/* 311 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var CONST = __webpack_require__(29); -var Device = __webpack_require__(298); +var Device = __webpack_require__(312); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); var IsPlainObject = __webpack_require__(7); -var PhaserMath = __webpack_require__(166); +var PhaserMath = __webpack_require__(168); var NOOP = __webpack_require__(1); -var DefaultPlugins = __webpack_require__(172); -var ValueToColor = __webpack_require__(159); +var DefaultPlugins = __webpack_require__(173); +var ValueToColor = __webpack_require__(161); /** * @classdesc @@ -57068,12 +57603,12 @@ module.exports = Config; /***/ }), -/* 298 */ +/* 312 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -57102,25 +57637,25 @@ module.exports = Config; module.exports = { - os: __webpack_require__(114), - browser: __webpack_require__(115), - features: __webpack_require__(165), - input: __webpack_require__(702), - audio: __webpack_require__(703), - video: __webpack_require__(704), - fullscreen: __webpack_require__(705), - canvasFeatures: __webpack_require__(299) + os: __webpack_require__(116), + browser: __webpack_require__(117), + features: __webpack_require__(167), + input: __webpack_require__(721), + audio: __webpack_require__(722), + video: __webpack_require__(723), + fullscreen: __webpack_require__(724), + canvasFeatures: __webpack_require__(313) }; /***/ }), -/* 299 */ +/* 313 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -57229,12 +57764,12 @@ module.exports = init(); /***/ }), -/* 300 */ +/* 314 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -57260,12 +57795,12 @@ module.exports = Between; /***/ }), -/* 301 */ +/* 315 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -57297,12 +57832,12 @@ module.exports = Normalize; /***/ }), -/* 302 */ +/* 316 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -57331,12 +57866,12 @@ module.exports = DistanceSquared; /***/ }), -/* 303 */ +/* 317 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -57365,12 +57900,12 @@ module.exports = GreaterThan; /***/ }), -/* 304 */ +/* 318 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -57399,16 +57934,16 @@ module.exports = LessThan; /***/ }), -/* 305 */ +/* 319 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Factorial = __webpack_require__(306); +var Factorial = __webpack_require__(320); /** * [description] @@ -57430,12 +57965,12 @@ module.exports = Bernstein; /***/ }), -/* 306 */ +/* 320 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -57470,12 +58005,12 @@ module.exports = Factorial; /***/ }), -/* 307 */ +/* 321 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -57540,12 +58075,12 @@ module.exports = CubicBezierInterpolation; /***/ }), -/* 308 */ +/* 322 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -57599,16 +58134,16 @@ module.exports = QuadraticBezierInterpolation; /***/ }), -/* 309 */ +/* 323 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmoothStep = __webpack_require__(156); +var SmoothStep = __webpack_require__(158); /** * A Smooth Step interpolation method. @@ -57632,12 +58167,12 @@ module.exports = SmoothStepInterpolation; /***/ }), -/* 310 */ +/* 324 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -57662,12 +58197,12 @@ module.exports = GetPowerOfTwo; /***/ }), -/* 311 */ +/* 325 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -57706,12 +58241,12 @@ module.exports = SnapCeil; /***/ }), -/* 312 */ +/* 326 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -57735,12 +58270,12 @@ module.exports = FloatBetween; /***/ }), -/* 313 */ +/* 327 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -57770,12 +58305,12 @@ module.exports = Rotate; /***/ }), -/* 314 */ +/* 328 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -57799,12 +58334,12 @@ module.exports = RoundAwayFromZero; /***/ }), -/* 315 */ +/* 329 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -57854,12 +58389,12 @@ module.exports = TransformXY; /***/ }), -/* 316 */ +/* 330 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -58399,12 +58934,12 @@ module.exports = Vector4; /***/ }), -/* 317 */ +/* 331 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -58992,12 +59527,12 @@ module.exports = Matrix3; /***/ }), -/* 318 */ +/* 332 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -60454,12 +60989,12 @@ module.exports = Matrix4; /***/ }), -/* 319 */ +/* 333 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -60467,8 +61002,8 @@ module.exports = Matrix4; // and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl var Class = __webpack_require__(0); -var Vector3 = __webpack_require__(171); -var Matrix3 = __webpack_require__(317); +var Vector3 = __webpack_require__(172); +var Matrix3 = __webpack_require__(331); var EPSILON = 0.000001; @@ -61226,19 +61761,19 @@ module.exports = Quaternion; /***/ }), -/* 320 */ +/* 334 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CanvasInterpolation = __webpack_require__(321); +var CanvasInterpolation = __webpack_require__(335); var CanvasPool = __webpack_require__(26); var CONST = __webpack_require__(29); -var Features = __webpack_require__(165); +var Features = __webpack_require__(167); /** * Called automatically by Phaser.Game and responsible for creating the renderer it will use. @@ -61328,8 +61863,8 @@ var CreateRenderer = function (game) if (true) { - CanvasRenderer = __webpack_require__(485); - WebGLRenderer = __webpack_require__(488); + CanvasRenderer = __webpack_require__(499); + WebGLRenderer = __webpack_require__(502); // Let the config pick the renderer type, as both are included if (config.renderType === CONST.WEBGL) @@ -61354,12 +61889,12 @@ module.exports = CreateRenderer; /***/ }), -/* 321 */ +/* 335 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61417,12 +61952,12 @@ module.exports = CanvasInterpolation; /***/ }), -/* 322 */ +/* 336 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61547,34 +62082,36 @@ module.exports = DebugHeader; /***/ }), -/* 323 */ +/* 337 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var GetValue = __webpack_require__(6); var NOOP = __webpack_require__(1); -var RequestAnimationFrame = __webpack_require__(324); - -// Frame Rate config -// fps: { -// min: 10, -// target: 60, -// forceSetTimeOut: false, -// deltaHistory: 10, -// panicMax: 120 -// } +var RequestAnimationFrame = __webpack_require__(338); // http://www.testufo.com/#test=animation-time-graph /** * @classdesc - * [description] + * The core runner class that Phaser uses to handle the game loop. It can use either Request Animation Frame, + * or SetTimeout, based on browser support and config settings, to create a continuous loop within the browser. + * + * Each time the loop fires, `TimeStep.step` is called and this is then passed onto the core Game update loop, + * it is the core heartbeat of your game. It will fire as often as Request Animation Frame is capable of handling + * on the target device. + * + * Note that there are lots of situations where a browser will stop updating your game. Such as if the player + * switches tabs, or covers up the browser window with another application. In these cases, the 'heartbeat' + * of your game will pause, and only resume when focus is returned to it by the player. There is no way to avoid + * this situation, all you can do is use the visibility events the browser, and Phaser, provide to detect when + * it has happened and then gracefully recover. * * @class TimeStep * @memberof Phaser.Core @@ -61601,7 +62138,7 @@ var TimeStep = new Class({ this.game = game; /** - * [description] + * The Request Animation Frame DOM Event handler. * * @name Phaser.Core.TimeStep#raf * @type {Phaser.DOM.RequestAnimationFrame} @@ -61693,7 +62230,8 @@ var TimeStep = new Class({ this.actualFps = this.targetFps; /** - * [description] + * The time at which the next fps rate update will take place. + * When an fps update happens, the `framesThisSecond` value is reset. * * @name Phaser.Core.TimeStep#nextFpsUpdate * @type {integer} @@ -61890,6 +62428,22 @@ var TimeStep = new Class({ * @since 3.18.0 */ this.now = 0; + + /** + * Apply smoothing to the delta value used within Phasers internal calculations? + * + * This can be changed in the Game Config via the `fps.smoothStep` property. The default is `true`. + * + * Smoothing helps settle down the delta values after browser tab switches, or other situations + * which could cause significant delta spikes or dips. By default it has been enabled in Phaser 3 + * since the first version, but is now exposed under this property (and the corresponding game config + * `smoothStep` value), to allow you to easily disable it, should you require. + * + * @name Phaser.Core.TimeStep#smoothStep + * @type {boolean} + * @since 3.22.0 + */ + this.smoothStep = GetValue(config, 'smoothStep', true); }, /** @@ -62013,7 +62567,7 @@ var TimeStep = new Class({ step: function () { // Because the timestamp passed in from raf represents the beginning of the main thread frame that we’re currently in, - // not the actual time now. As we want to compare this time value against Event timeStamps and the like, we need a + // not the actual time now, and as we want to compare this time value against Event timeStamps and the like, we need a // more accurate one: var time = window.performance.now(); @@ -62037,55 +62591,59 @@ var TimeStep = new Class({ // delta time (time is in ms) var dt = before; + // Delta Average + var avg = before; + // When a browser switches tab, then comes back again, it takes around 10 frames before // the delta time settles down so we employ a 'cooling down' period before we start // trusting the delta values again, to avoid spikes flooding through our delta average - if (this._coolDown > 0 || !this.inFocus) + if (this.smoothStep) { - this._coolDown--; - - dt = Math.min(dt, this._target); + if (this._coolDown > 0 || !this.inFocus) + { + this._coolDown--; + + dt = Math.min(dt, this._target); + } + + if (dt > this._min) + { + // Probably super bad start time or browser tab context loss, + // so use the last 'sane' dt value + + dt = history[idx]; + + // Clamp delta to min (in case history has become corrupted somehow) + dt = Math.min(dt, this._min); + } + + // Smooth out the delta over the previous X frames + + // add the delta to the smoothing array + history[idx] = dt; + + // adjusts the delta history array index based on the smoothing count + // this stops the array growing beyond the size of deltaSmoothingMax + this.deltaIndex++; + + if (this.deltaIndex > max) + { + this.deltaIndex = 0; + } + + // Loop the history array, adding the delta values together + avg = 0; + + for (var i = 0; i < max; i++) + { + avg += history[i]; + } + + // Then divide by the array length to get the average delta + avg /= max; } - if (dt > this._min) - { - // Probably super bad start time or browser tab context loss, - // so use the last 'sane' dt value - - dt = history[idx]; - - // Clamp delta to min (in case history has become corrupted somehow) - dt = Math.min(dt, this._min); - } - - // Smooth out the delta over the previous X frames - - // add the delta to the smoothing array - history[idx] = dt; - - // adjusts the delta history array index based on the smoothing count - // this stops the array growing beyond the size of deltaSmoothingMax - this.deltaIndex++; - - if (this.deltaIndex > max) - { - this.deltaIndex = 0; - } - - // Delta Average - var avg = 0; - - // Loop the history array, adding the delta values together - - for (var i = 0; i < max; i++) - { - avg += history[i]; - } - - // Then divide by the array length to get the average delta - avg /= max; - // Set as the world delta value this.delta = avg; @@ -62219,7 +62777,7 @@ var TimeStep = new Class({ * @method Phaser.Core.TimeStep#stop * @since 3.0.0 * - * @return {Phaser.Core.TimeStep} The TimeStep object. + * @return {this} The TimeStep object. */ stop: function () { @@ -62254,12 +62812,12 @@ module.exports = TimeStep; /***/ }), -/* 324 */ +/* 338 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -62468,12 +63026,12 @@ module.exports = RequestAnimationFrame; /***/ }), -/* 325 */ +/* 339 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -62559,16 +63117,16 @@ module.exports = VisibilityHandler; /***/ }), -/* 326 */ +/* 340 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Arne16 = __webpack_require__(327); +var Arne16 = __webpack_require__(341); var CanvasPool = __webpack_require__(26); var GetValue = __webpack_require__(6); @@ -62653,12 +63211,12 @@ module.exports = GenerateTexture; /***/ }), -/* 327 */ +/* 341 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -62691,19 +63249,19 @@ module.exports = { /***/ }), -/* 328 */ +/* 342 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) var Class = __webpack_require__(0); -var CubicBezier = __webpack_require__(307); +var CubicBezier = __webpack_require__(321); var Curve = __webpack_require__(80); var Vector2 = __webpack_require__(3); @@ -62918,12 +63476,12 @@ module.exports = CubicBezierCurve; /***/ }), -/* 329 */ +/* 343 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -62933,7 +63491,7 @@ var Class = __webpack_require__(0); var Curve = __webpack_require__(80); var DegToRad = __webpack_require__(35); var GetValue = __webpack_require__(6); -var RadToDeg = __webpack_require__(170); +var RadToDeg = __webpack_require__(171); var Vector2 = __webpack_require__(3); /** @@ -63542,12 +64100,12 @@ module.exports = EllipseCurve; /***/ }), -/* 330 */ +/* 344 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -63555,7 +64113,7 @@ module.exports = EllipseCurve; var Class = __webpack_require__(0); var Curve = __webpack_require__(80); -var FromPoints = __webpack_require__(173); +var FromPoints = __webpack_require__(174); var Rectangle = __webpack_require__(11); var Vector2 = __webpack_require__(3); @@ -63741,6 +64299,42 @@ var LineCurve = new Class({ return tangent.normalize(); }, + // Override default Curve.getUtoTmapping + + /** + * [description] + * + * @method Phaser.Curves.Line#getUtoTmapping + * @since 3.0.0 + * + * @param {number} u - [description] + * @param {integer} distance - [description] + * @param {integer} [divisions] - [description] + * + * @return {number} [description] + */ + getUtoTmapping: function (u, distance, divisions) + { + var t; + + if (distance) + { + var arcLengths = this.getLengths(divisions); + var lineLength = arcLengths[arcLengths.length - 1]; + + // Cannot overshoot the curve + var targetLineLength = Math.min(distance, lineLength); + + t = targetLineLength / lineLength; + } + else + { + t = u; + } + + return t; + }, + // Override default Curve.draw because this is better than calling getPoints on a line! /** @@ -63811,18 +64405,18 @@ module.exports = LineCurve; /***/ }), -/* 331 */ +/* 345 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Curve = __webpack_require__(80); -var QuadraticBezierInterpolation = __webpack_require__(308); +var QuadraticBezierInterpolation = __webpack_require__(322); var Vector2 = __webpack_require__(3); /** @@ -64025,25 +64619,25 @@ module.exports = QuadraticBezier; /***/ }), -/* 332 */ +/* 346 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) -var CatmullRom = __webpack_require__(168); +var CatmullRom = __webpack_require__(169); var Class = __webpack_require__(0); var Curve = __webpack_require__(80); var Vector2 = __webpack_require__(3); /** * @classdesc - * [description] + * Create a smooth 2d spline curve from a series of points. * * @class Spline * @extends Phaser.Curves.Curve @@ -64051,7 +64645,7 @@ var Vector2 = __webpack_require__(3); * @constructor * @since 3.0.0 * - * @param {Phaser.Math.Vector2[]} [points] - [description] + * @param {(Phaser.Math.Vector2[]|number[]|number[][])} [points] - The points that configure the curve. */ var SplineCurve = new Class({ @@ -64066,7 +64660,7 @@ var SplineCurve = new Class({ Curve.call(this, 'SplineCurve'); /** - * [description] + * The Vector2 points that configure the curve. * * @name Phaser.Curves.Spline#points * @type {Phaser.Math.Vector2[]} @@ -64079,12 +64673,12 @@ var SplineCurve = new Class({ }, /** - * [description] + * Add a list of points to the current list of Vector2 points of the curve. * * @method Phaser.Curves.Spline#addPoints * @since 3.0.0 * - * @param {(Phaser.Math.Vector2[]|number[]|number[][])} points - [description] + * @param {(Phaser.Math.Vector2[]|number[]|number[][])} points - The points that configure the curve. * * @return {Phaser.Curves.Spline} This curve object. */ @@ -64119,15 +64713,15 @@ var SplineCurve = new Class({ }, /** - * [description] + * Add a point to the current list of Vector2 points of the curve. * * @method Phaser.Curves.Spline#addPoint * @since 3.0.0 * - * @param {number} x - [description] - * @param {number} y - [description] + * @param {number} x - The x coordinate of this curve + * @param {number} y - The y coordinate of this curve * - * @return {Phaser.Math.Vector2} [description] + * @return {Phaser.Math.Vector2} The new Vector2 added to the curve */ addPoint: function (x, y) { @@ -64206,7 +64800,7 @@ var SplineCurve = new Class({ }, /** - * [description] + * Exports a JSON object containing this curve data. * * @method Phaser.Curves.Spline#toJSON * @since 3.0.0 @@ -64232,14 +64826,14 @@ var SplineCurve = new Class({ }); /** - * [description] + * Imports a JSON object containing this curve data. * * @function Phaser.Curves.Spline.fromJSON * @since 3.0.0 * * @param {Phaser.Types.Curves.JSONCurve} data - The JSON object containing this curve data. * - * @return {Phaser.Curves.Spline} [description] + * @return {Phaser.Curves.Spline} The spline curve created. */ SplineCurve.fromJSON = function (data) { @@ -64250,12 +64844,12 @@ module.exports = SplineCurve; /***/ }), -/* 333 */ +/* 347 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64374,46 +64968,46 @@ module.exports = BaseShader; /***/ }), -/* 334 */ +/* 348 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Color = __webpack_require__(33); -Color.ColorToRGBA = __webpack_require__(791); -Color.ComponentToHex = __webpack_require__(335); -Color.GetColor = __webpack_require__(160); -Color.GetColor32 = __webpack_require__(278); -Color.HexStringToColor = __webpack_require__(277); -Color.HSLToColor = __webpack_require__(792); -Color.HSVColorWheel = __webpack_require__(793); -Color.HSVToRGB = __webpack_require__(161); -Color.HueToComponent = __webpack_require__(336); -Color.IntegerToColor = __webpack_require__(280); -Color.IntegerToRGB = __webpack_require__(281); -Color.Interpolate = __webpack_require__(794); -Color.ObjectToColor = __webpack_require__(282); -Color.RandomRGB = __webpack_require__(795); -Color.RGBStringToColor = __webpack_require__(283); -Color.RGBToHSV = __webpack_require__(279); -Color.RGBToString = __webpack_require__(796); -Color.ValueToColor = __webpack_require__(159); +Color.ColorToRGBA = __webpack_require__(802); +Color.ComponentToHex = __webpack_require__(349); +Color.GetColor = __webpack_require__(162); +Color.GetColor32 = __webpack_require__(292); +Color.HexStringToColor = __webpack_require__(291); +Color.HSLToColor = __webpack_require__(803); +Color.HSVColorWheel = __webpack_require__(804); +Color.HSVToRGB = __webpack_require__(163); +Color.HueToComponent = __webpack_require__(350); +Color.IntegerToColor = __webpack_require__(294); +Color.IntegerToRGB = __webpack_require__(295); +Color.Interpolate = __webpack_require__(805); +Color.ObjectToColor = __webpack_require__(296); +Color.RandomRGB = __webpack_require__(806); +Color.RGBStringToColor = __webpack_require__(297); +Color.RGBToHSV = __webpack_require__(293); +Color.RGBToString = __webpack_require__(807); +Color.ValueToColor = __webpack_require__(161); module.exports = Color; /***/ }), -/* 335 */ +/* 349 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64438,12 +65032,12 @@ module.exports = ComponentToHex; /***/ }), -/* 336 */ +/* 350 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64494,16 +65088,16 @@ module.exports = HueToComponent; /***/ }), -/* 337 */ +/* 351 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(114); +var OS = __webpack_require__(116); /** * @callback ContentLoadedCallback @@ -64557,16 +65151,16 @@ module.exports = DOMContentLoaded; /***/ }), -/* 338 */ +/* 352 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(174); +var CONST = __webpack_require__(175); /** * Attempts to determine the screen orientation using the Orientation API. @@ -64623,12 +65217,12 @@ module.exports = GetScreenOrientation; /***/ }), -/* 339 */ +/* 353 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64709,12 +65303,12 @@ module.exports = { /***/ }), -/* 340 */ +/* 354 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64762,12 +65356,12 @@ module.exports = { /***/ }), -/* 341 */ +/* 355 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64860,12 +65454,12 @@ module.exports = { /***/ }), -/* 342 */ +/* 356 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64934,12 +65528,12 @@ module.exports = { /***/ }), -/* 343 */ +/* 357 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64985,12 +65579,12 @@ module.exports = GetTarget; /***/ }), -/* 344 */ +/* 358 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -65042,26 +65636,26 @@ module.exports = ParseXML; /***/ }), -/* 345 */ +/* 359 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(176); +var CONST = __webpack_require__(177); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(53); +var Events = __webpack_require__(54); var GameEvents = __webpack_require__(18); -var Keyboard = __webpack_require__(346); -var Mouse = __webpack_require__(347); -var Pointer = __webpack_require__(348); -var Touch = __webpack_require__(349); +var Keyboard = __webpack_require__(360); +var Mouse = __webpack_require__(361); +var Pointer = __webpack_require__(362); +var Touch = __webpack_require__(363); var TransformMatrix = __webpack_require__(32); -var TransformXY = __webpack_require__(315); +var TransformXY = __webpack_require__(329); /** * @classdesc @@ -66124,20 +66718,20 @@ module.exports = InputManager; /***/ }), -/* 346 */ +/* 360 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayRemove = __webpack_require__(119); +var ArrayRemove = __webpack_require__(121); var Class = __webpack_require__(0); var GameEvents = __webpack_require__(18); -var InputEvents = __webpack_require__(53); -var KeyCodes = __webpack_require__(120); +var InputEvents = __webpack_require__(54); +var KeyCodes = __webpack_require__(122); var NOOP = __webpack_require__(0); /** @@ -66574,18 +67168,18 @@ module.exports = KeyboardManager; /***/ }), -/* 347 */ +/* 361 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Features = __webpack_require__(165); -var InputEvents = __webpack_require__(53); +var Features = __webpack_require__(167); +var InputEvents = __webpack_require__(54); var NOOP = __webpack_require__(0); // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent @@ -67060,20 +67654,20 @@ module.exports = MouseManager; /***/ }), -/* 348 */ +/* 362 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Angle = __webpack_require__(300); +var Angle = __webpack_require__(314); var Class = __webpack_require__(0); -var Distance = __webpack_require__(58); -var FuzzyEqual = __webpack_require__(167); -var SmoothStepInterpolation = __webpack_require__(309); +var Distance = __webpack_require__(53); +var FuzzyEqual = __webpack_require__(144); +var SmoothStepInterpolation = __webpack_require__(323); var Vector2 = __webpack_require__(3); /** @@ -68338,17 +68932,17 @@ module.exports = Pointer; /***/ }), -/* 349 */ +/* 363 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var InputEvents = __webpack_require__(53); +var InputEvents = __webpack_require__(54); var NOOP = __webpack_require__(1); // https://developer.mozilla.org/en-US/docs/Web/API/Touch_events @@ -68751,12 +69345,12 @@ module.exports = TouchManager; /***/ }), -/* 350 */ +/* 364 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68767,8 +69361,8 @@ var FileTypesManager = __webpack_require__(8); var GameObjectCreator = __webpack_require__(16); var GameObjectFactory = __webpack_require__(5); var GetFastValue = __webpack_require__(2); -var PluginCache = __webpack_require__(21); -var Remove = __webpack_require__(119); +var PluginCache = __webpack_require__(23); +var Remove = __webpack_require__(121); /** * @classdesc @@ -69653,26 +70247,26 @@ module.exports = PluginManager; /***/ }), -/* 351 */ +/* 365 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(174); +var CONST = __webpack_require__(175); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); var Events = __webpack_require__(92); var GameEvents = __webpack_require__(18); -var GetInnerHeight = __webpack_require__(849); -var GetTarget = __webpack_require__(343); -var GetScreenOrientation = __webpack_require__(338); +var GetInnerHeight = __webpack_require__(860); +var GetTarget = __webpack_require__(357); +var GetScreenOrientation = __webpack_require__(352); var NOOP = __webpack_require__(1); var Rectangle = __webpack_require__(11); -var Size = __webpack_require__(352); +var Size = __webpack_require__(366); var SnapFloor = __webpack_require__(93); var Vector2 = __webpack_require__(3); @@ -70004,16 +70598,6 @@ var ScaleManager = new Class({ */ this._createdFullscreenTarget = false; - /** - * Internal var that keeps track of the user, or the browser, requesting fullscreen changes. - * - * @name Phaser.Scale.ScaleManager#_requestedFullscreenChange - * @type {boolean} - * @private - * @since 3.16.2 - */ - this._requestedFullscreenChange = false; - /** * The dirty state of the Scale Manager. * Set if there is a change between the parent size and the current size. @@ -70132,6 +70716,7 @@ var ScaleManager = new Class({ } game.events.on(GameEvents.PRE_STEP, this.step, this); + game.events.once(GameEvents.DESTROY, this.destroy, this); this.startListeners(); }, @@ -70896,8 +71481,6 @@ var ScaleManager = new Class({ { var fsTarget = this.getFullscreenTarget(); - this._requestedFullscreenChange = true; - var fsPromise; if (fullscreen.keyboard) @@ -71040,8 +71623,6 @@ var ScaleManager = new Class({ if (fullscreen.active) { - this._requestedFullscreenChange = true; - document[fullscreen.cancel](); } @@ -71148,12 +71729,10 @@ var ScaleManager = new Class({ onFullScreenChange: function () { // They pressed ESC while in fullscreen mode - if (!this._requestedFullscreenChange) + if (!(document.fullscreenElement || document.webkitFullscreenElement || document.msFullscreenElement || document.mozFullScreenElement)) { this.stopFullscreen(); } - - this._requestedFullscreenChange = false; }, /** @@ -71385,16 +71964,16 @@ module.exports = ScaleManager; /***/ }), -/* 352 */ +/* 366 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(23); +var Clamp = __webpack_require__(22); var Class = __webpack_require__(0); var SnapFloor = __webpack_require__(93); var Vector2 = __webpack_require__(3); @@ -72163,24 +72742,24 @@ module.exports = Size; /***/ }), -/* 353 */ +/* 367 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(121); -var Events = __webpack_require__(22); +var CONST = __webpack_require__(123); +var Events = __webpack_require__(19); var GameEvents = __webpack_require__(18); var GetValue = __webpack_require__(6); var LoaderEvents = __webpack_require__(81); var NOOP = __webpack_require__(1); -var Scene = __webpack_require__(354); -var Systems = __webpack_require__(177); +var Scene = __webpack_require__(368); +var Systems = __webpack_require__(178); /** * @classdesc @@ -73803,17 +74382,17 @@ module.exports = SceneManager; /***/ }), -/* 354 */ +/* 368 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Systems = __webpack_require__(177); +var Systems = __webpack_require__(178); /** * @classdesc @@ -74099,19 +74678,19 @@ module.exports = Scene; /***/ }), -/* 355 */ +/* 369 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(121); +var CONST = __webpack_require__(123); var GetValue = __webpack_require__(6); -var Merge = __webpack_require__(106); -var InjectionMap = __webpack_require__(862); +var Merge = __webpack_require__(107); +var InjectionMap = __webpack_require__(873); /** * @namespace Phaser.Scenes.Settings @@ -74195,27 +74774,27 @@ module.exports = Settings; /***/ }), -/* 356 */ +/* 370 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var CanvasPool = __webpack_require__(26); -var CanvasTexture = __webpack_require__(357); +var CanvasTexture = __webpack_require__(371); var Class = __webpack_require__(0); var Color = __webpack_require__(33); var CONST = __webpack_require__(29); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(117); +var Events = __webpack_require__(119); var GameEvents = __webpack_require__(18); -var GenerateTexture = __webpack_require__(326); +var GenerateTexture = __webpack_require__(340); var GetValue = __webpack_require__(6); -var Parser = __webpack_require__(359); -var Texture = __webpack_require__(179); +var Parser = __webpack_require__(373); +var Texture = __webpack_require__(180); /** * @callback EachTextureCallback @@ -75367,21 +75946,21 @@ module.exports = TextureManager; /***/ }), -/* 357 */ +/* 371 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Clamp = __webpack_require__(23); +var Clamp = __webpack_require__(22); var Color = __webpack_require__(33); var CONST = __webpack_require__(29); -var IsSizePowerOfTwo = __webpack_require__(116); -var Texture = __webpack_require__(179); +var IsSizePowerOfTwo = __webpack_require__(118); +var Texture = __webpack_require__(180); /** * @classdesc @@ -75998,19 +76577,19 @@ module.exports = CanvasTexture; /***/ }), -/* 358 */ +/* 372 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); -var IsSizePowerOfTwo = __webpack_require__(116); -var ScaleModes = __webpack_require__(230); +var IsSizePowerOfTwo = __webpack_require__(118); +var ScaleModes = __webpack_require__(231); /** * @classdesc @@ -76339,12 +76918,12 @@ module.exports = TextureSource; /***/ }), -/* 359 */ +/* 373 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -76354,32 +76933,32 @@ module.exports = TextureSource; module.exports = { - AtlasXML: __webpack_require__(863), - Canvas: __webpack_require__(864), - Image: __webpack_require__(865), - JSONArray: __webpack_require__(866), - JSONHash: __webpack_require__(867), - SpriteSheet: __webpack_require__(868), - SpriteSheetFromAtlas: __webpack_require__(869), - UnityYAML: __webpack_require__(870) + AtlasXML: __webpack_require__(874), + Canvas: __webpack_require__(875), + Image: __webpack_require__(876), + JSONArray: __webpack_require__(877), + JSONHash: __webpack_require__(878), + SpriteSheet: __webpack_require__(879), + SpriteSheetFromAtlas: __webpack_require__(880), + UnityYAML: __webpack_require__(881) }; /***/ }), -/* 360 */ +/* 374 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HTML5AudioSoundManager = __webpack_require__(361); -var NoAudioSoundManager = __webpack_require__(363); -var WebAudioSoundManager = __webpack_require__(365); +var HTML5AudioSoundManager = __webpack_require__(375); +var NoAudioSoundManager = __webpack_require__(377); +var WebAudioSoundManager = __webpack_require__(379); /** * Creates a Web Audio, HTML5 Audio or No Audio Sound Manager based on config and device settings. @@ -76390,6 +76969,8 @@ var WebAudioSoundManager = __webpack_require__(365); * @since 3.0.0 * * @param {Phaser.Game} game - Reference to the current game instance. + * + * @return {(Phaser.Sound.HTML5AudioSoundManager|Phaser.Sound.WebAudioSoundManager|Phaser.Sound.NoAudioSoundManager)} The Sound Manager instance that was created. */ var SoundManagerCreator = { @@ -76417,20 +76998,20 @@ module.exports = SoundManagerCreator; /***/ }), -/* 361 */ +/* 375 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSoundManager = __webpack_require__(122); +var BaseSoundManager = __webpack_require__(124); var Class = __webpack_require__(0); var Events = __webpack_require__(59); -var HTML5AudioSound = __webpack_require__(362); +var HTML5AudioSound = __webpack_require__(376); /** * HTML5 Audio implementation of the Sound Manager. @@ -76882,17 +77463,17 @@ module.exports = HTML5AudioSoundManager; /***/ }), -/* 362 */ +/* 376 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(123); +var BaseSound = __webpack_require__(125); var Class = __webpack_require__(0); var Events = __webpack_require__(59); @@ -76934,9 +77515,7 @@ var HTML5AudioSound = new Class({ if (!this.tags) { - // eslint-disable-next-line no-console - console.warn('Audio cache entry missing: ' + key); - return; + throw new Error('There is no audio asset with key "' + key + '" in the audio cache'); } /** @@ -77809,20 +78388,20 @@ module.exports = HTML5AudioSound; /***/ }), -/* 363 */ +/* 377 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSoundManager = __webpack_require__(122); +var BaseSoundManager = __webpack_require__(124); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var NoAudioSound = __webpack_require__(364); +var NoAudioSound = __webpack_require__(378); var NOOP = __webpack_require__(1); /** @@ -77927,17 +78506,17 @@ module.exports = NoAudioSoundManager; /***/ }), -/* 364 */ +/* 378 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(123); +var BaseSound = __webpack_require__(125); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); var Extend = __webpack_require__(17); @@ -78054,21 +78633,21 @@ module.exports = NoAudioSound; /***/ }), -/* 365 */ +/* 379 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Base64ToArrayBuffer = __webpack_require__(366); -var BaseSoundManager = __webpack_require__(122); +var Base64ToArrayBuffer = __webpack_require__(380); +var BaseSoundManager = __webpack_require__(124); var Class = __webpack_require__(0); var Events = __webpack_require__(59); -var WebAudioSound = __webpack_require__(367); +var WebAudioSound = __webpack_require__(381); /** * @classdesc @@ -78513,13 +79092,13 @@ module.exports = WebAudioSoundManager; /***/ }), -/* 366 */ +/* 380 */ /***/ (function(module, exports) { /** * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -78588,17 +79167,17 @@ module.exports = Base64ToArrayBuffer; /***/ }), -/* 367 */ +/* 381 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(123); +var BaseSound = __webpack_require__(125); var Class = __webpack_require__(0); var Events = __webpack_require__(59); @@ -78638,9 +79217,7 @@ var WebAudioSound = new Class({ if (!this.audioBuffer) { - // eslint-disable-next-line no-console - console.warn('Audio cache entry missing: ' + key); - return; + throw new Error('There is no audio asset with key "' + key + '" in the audio cache'); } /** @@ -79496,12 +80073,12 @@ module.exports = WebAudioSound; /***/ }), -/* 368 */ +/* 382 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79544,12 +80121,12 @@ module.exports = TransposeMatrix; /***/ }), -/* 369 */ +/* 383 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79666,17 +80243,17 @@ module.exports = QuickSelect; /***/ }), -/* 370 */ +/* 384 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetValue = __webpack_require__(6); -var Shuffle = __webpack_require__(112); +var Shuffle = __webpack_require__(114); var BuildChunk = function (a, b, qty) { @@ -79804,12 +80381,12 @@ module.exports = Range; /***/ }), -/* 371 */ +/* 385 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79893,12 +80470,12 @@ module.exports = BuildGameObjectAnimation; /***/ }), -/* 372 */ +/* 386 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79935,22 +80512,23 @@ module.exports = Union; /***/ }), -/* 373 */ +/* 387 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var DOMElementRender = __webpack_require__(939); +var DOMElementRender = __webpack_require__(950); var GameObject = __webpack_require__(14); var IsPlainObject = __webpack_require__(7); -var RemoveFromDOM = __webpack_require__(175); -var Vector4 = __webpack_require__(316); +var RemoveFromDOM = __webpack_require__(176); +var SCENE_EVENTS = __webpack_require__(19); +var Vector4 = __webpack_require__(330); /** * @classdesc @@ -80012,7 +80590,7 @@ var Vector4 = __webpack_require__(316); * @constructor * @since 3.17.0 * - * @extends Phaser.GameObjects.Components.Alpha + * @extends Phaser.GameObjects.Components.AlphaSingle * @extends Phaser.GameObjects.Components.BlendMode * @extends Phaser.GameObjects.Components.Depth * @extends Phaser.GameObjects.Components.Origin @@ -80032,7 +80610,7 @@ var DOMElement = new Class({ Extends: GameObject, Mixins: [ - Components.Alpha, + Components.AlphaSingle, Components.BlendMode, Components.Depth, Components.Origin, @@ -80220,6 +80798,29 @@ var DOMElement = new Class({ { this.setElement(element, style, innerText); } + + scene.sys.events.on(SCENE_EVENTS.SLEEP, this.handleSceneEvent, this); + scene.sys.events.on(SCENE_EVENTS.WAKE, this.handleSceneEvent, this); + }, + + /** + * Handles a Scene Sleep and Wake event. + * + * @method Phaser.GameObjects.DOMElement#handleSceneEvent + * @private + * @since 3.22.0 + * + * @param {Phaser.Scenes.Systems} sys - The Scene Systems. + */ + handleSceneEvent: function (sys) + { + var node = this.node; + var style = node.style; + + if (node) + { + style.display = (sys.settings.visible) ? 'block' : 'none'; + } }, /** @@ -80874,6 +81475,9 @@ var DOMElement = new Class({ preDestroy: function () { this.removeElement(); + + this.scene.sys.events.off(SCENE_EVENTS.SLEEP, this.handleSceneEvent, this); + this.scene.sys.events.off(SCENE_EVENTS.WAKE, this.handleSceneEvent, this); } }); @@ -80882,16 +81486,16 @@ module.exports = DOMElement; /***/ }), -/* 374 */ +/* 388 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CSSBlendModes = __webpack_require__(940); +var CSSBlendModes = __webpack_require__(951); var GameObject = __webpack_require__(14); /** @@ -80913,8 +81517,9 @@ var DOMElementCSSRenderer = function (renderer, src, interpolationPercentage, ca { var node = src.node; var style = node.style; + var settings = src.scene.sys.settings; - if (!node || !style || GameObject.RENDER_MASK !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || (src.parentContainer && !src.parentContainer.willRender())) + if (!node || !style || !settings.visible || GameObject.RENDER_MASK !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || (src.parentContainer && !src.parentContainer.willRender())) { if (node) { @@ -81003,19 +81608,19 @@ module.exports = DOMElementCSSRenderer; /***/ }), -/* 375 */ +/* 389 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var ExternRender = __webpack_require__(944); +var ExternRender = __webpack_require__(955); /** * @classdesc @@ -81099,16 +81704,16 @@ module.exports = Extern; /***/ }), -/* 376 */ +/* 390 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CircumferencePoint = __webpack_require__(190); +var CircumferencePoint = __webpack_require__(191); var FromPercent = __webpack_require__(87); var MATH_CONST = __webpack_require__(13); var Point = __webpack_require__(4); @@ -81142,17 +81747,17 @@ module.exports = GetPoint; /***/ }), -/* 377 */ +/* 391 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circumference = __webpack_require__(378); -var CircumferencePoint = __webpack_require__(190); +var Circumference = __webpack_require__(392); +var CircumferencePoint = __webpack_require__(191); var FromPercent = __webpack_require__(87); var MATH_CONST = __webpack_require__(13); @@ -81196,12 +81801,12 @@ module.exports = GetPoints; /***/ }), -/* 378 */ +/* 392 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81228,16 +81833,16 @@ module.exports = Circumference; /***/ }), -/* 379 */ +/* 393 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Commands = __webpack_require__(189); +var Commands = __webpack_require__(190); var SetTransform = __webpack_require__(27); /** @@ -81478,12 +82083,12 @@ module.exports = GraphicsCanvasRenderer; /***/ }), -/* 380 */ +/* 394 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81697,18 +82302,18 @@ module.exports = GravityWell; /***/ }), -/* 381 */ +/* 395 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var DegToRad = __webpack_require__(35); -var DistanceBetween = __webpack_require__(58); +var DistanceBetween = __webpack_require__(53); /** * @classdesc @@ -82266,31 +82871,31 @@ module.exports = Particle; /***/ }), -/* 382 */ +/* 396 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BlendModes = __webpack_require__(52); var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var DeathZone = __webpack_require__(383); -var EdgeZone = __webpack_require__(384); -var EmitterOp = __webpack_require__(956); +var DeathZone = __webpack_require__(397); +var EdgeZone = __webpack_require__(398); +var EmitterOp = __webpack_require__(967); var GetFastValue = __webpack_require__(2); -var GetRandom = __webpack_require__(182); -var HasAny = __webpack_require__(385); +var GetRandom = __webpack_require__(183); +var HasAny = __webpack_require__(399); var HasValue = __webpack_require__(99); -var Particle = __webpack_require__(381); -var RandomZone = __webpack_require__(386); +var Particle = __webpack_require__(395); +var RandomZone = __webpack_require__(400); var Rectangle = __webpack_require__(11); -var StableSort = __webpack_require__(126); +var StableSort = __webpack_require__(128); var Vector2 = __webpack_require__(3); -var Wrap = __webpack_require__(57); +var Wrap = __webpack_require__(58); /** * @classdesc @@ -83594,6 +84199,23 @@ var ParticleEmitter = new Class({ return this; }, + /** + * Sets the color tint of emitted particles. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#setTint + * @since 3.22.0 + * + * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - A value between 0 and 0xffffff. + * + * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + */ + setTint: function (value) + { + this.tint.onChange(value); + + return this; + }, + /** * Sets the angle of a {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle stream. * @@ -84053,6 +84675,21 @@ var ParticleEmitter = new Class({ return this; }, + /** + * Removes the emitter from its manager and the scene. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#remove + * @since 3.22.0 + * + * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + */ + remove: function () + { + this.manager.removeEmitter(this); + + return this; + }, + /** * Sorts active particles with {@link Phaser.GameObjects.Particles.ParticleEmitter#depthSortCallback}. * @@ -84305,12 +84942,12 @@ module.exports = ParticleEmitter; /***/ }), -/* 383 */ +/* 397 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84383,12 +85020,12 @@ module.exports = DeathZone; /***/ }), -/* 384 */ +/* 398 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84627,12 +85264,12 @@ module.exports = EdgeZone; /***/ }), -/* 385 */ +/* 399 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84664,12 +85301,12 @@ module.exports = HasAny; /***/ }), -/* 386 */ +/* 400 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84737,12 +85374,12 @@ module.exports = RandomZone; /***/ }), -/* 387 */ +/* 401 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84819,16 +85456,16 @@ module.exports = PathFollower; /***/ }), -/* 388 */ +/* 402 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcRender = __webpack_require__(979); +var ArcRender = __webpack_require__(990); var Class = __webpack_require__(0); var DegToRad = __webpack_require__(35); var Earcut = __webpack_require__(66); @@ -85228,17 +85865,17 @@ module.exports = Arc; /***/ }), -/* 389 */ +/* 403 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CurveRender = __webpack_require__(982); +var CurveRender = __webpack_require__(993); var Earcut = __webpack_require__(66); var Rectangle = __webpack_require__(11); var Shape = __webpack_require__(30); @@ -85410,18 +86047,18 @@ module.exports = Curve; /***/ }), -/* 390 */ +/* 404 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Earcut = __webpack_require__(66); -var EllipseRender = __webpack_require__(985); +var EllipseRender = __webpack_require__(996); var GeomEllipse = __webpack_require__(95); var Shape = __webpack_require__(30); @@ -85597,18 +86234,18 @@ module.exports = Ellipse; /***/ }), -/* 391 */ +/* 405 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Shape = __webpack_require__(30); -var GridRender = __webpack_require__(988); +var GridRender = __webpack_require__(999); /** * @classdesc @@ -85879,16 +86516,16 @@ module.exports = Grid; /***/ }), -/* 392 */ +/* 406 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsoBoxRender = __webpack_require__(991); +var IsoBoxRender = __webpack_require__(1002); var Class = __webpack_require__(0); var Shape = __webpack_require__(30); @@ -86094,17 +86731,17 @@ module.exports = IsoBox; /***/ }), -/* 393 */ +/* 407 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var IsoTriangleRender = __webpack_require__(994); +var IsoTriangleRender = __webpack_require__(1005); var Shape = __webpack_require__(30); /** @@ -86340,19 +86977,19 @@ module.exports = IsoTriangle; /***/ }), -/* 394 */ +/* 408 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Shape = __webpack_require__(30); -var GeomLine = __webpack_require__(55); -var LineRender = __webpack_require__(997); +var GeomLine = __webpack_require__(56); +var LineRender = __webpack_require__(1008); /** * @classdesc @@ -86507,22 +87144,22 @@ module.exports = Line; /***/ }), -/* 395 */ +/* 409 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PolygonRender = __webpack_require__(1000); +var PolygonRender = __webpack_require__(1011); var Class = __webpack_require__(0); var Earcut = __webpack_require__(66); -var GetAABB = __webpack_require__(396); -var GeomPolygon = __webpack_require__(197); +var GetAABB = __webpack_require__(410); +var GeomPolygon = __webpack_require__(198); var Shape = __webpack_require__(30); -var Smooth = __webpack_require__(399); +var Smooth = __webpack_require__(413); /** * @classdesc @@ -86537,7 +87174,7 @@ var Smooth = __webpack_require__(399); * internal Polygon geometry object. The points can be set from a variety of formats: * * - A string containing paired values separated by a single space: `'40 0 40 20 100 20 100 80 40 80 40 100 0 50'` - * - An array of Point or Vector2 objects: `[new Phaser.Math.Vec2(x1, y1), ...]` + * - An array of Point or Vector2 objects: `[new Phaser.Math.Vector2(x1, y1), ...]` * - An array of objects with public x/y properties: `[obj1, obj2, ...]` * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]` * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]` @@ -86646,12 +87283,12 @@ module.exports = Polygon; /***/ }), -/* 396 */ +/* 410 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -86702,18 +87339,18 @@ module.exports = GetAABB; /***/ }), -/* 397 */ +/* 411 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(56); -var Line = __webpack_require__(55); -var Perimeter = __webpack_require__(398); +var Length = __webpack_require__(57); +var Line = __webpack_require__(56); +var Perimeter = __webpack_require__(412); /** * Returns an array of Point objects containing the coordinates of the points around the perimeter of the Polygon, @@ -86779,17 +87416,17 @@ module.exports = GetPoints; /***/ }), -/* 398 */ +/* 412 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(56); -var Line = __webpack_require__(55); +var Length = __webpack_require__(57); +var Line = __webpack_require__(56); /** * Returns the perimeter of the given Polygon. @@ -86827,13 +87464,13 @@ module.exports = Perimeter; /***/ }), -/* 399 */ +/* 413 */ /***/ (function(module, exports) { /** * @author Richard Davey * @author Igor Ognichenko - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -86903,19 +87540,19 @@ module.exports = Smooth; /***/ }), -/* 400 */ +/* 414 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var GeomRectangle = __webpack_require__(11); var Shape = __webpack_require__(30); -var RectangleRender = __webpack_require__(1003); +var RectangleRender = __webpack_require__(1014); /** * @classdesc @@ -87015,16 +87652,16 @@ module.exports = Rectangle; /***/ }), -/* 401 */ +/* 415 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var StarRender = __webpack_require__(1006); +var StarRender = __webpack_require__(1017); var Class = __webpack_require__(0); var Earcut = __webpack_require__(66); var Shape = __webpack_require__(30); @@ -87303,19 +87940,19 @@ module.exports = Star; /***/ }), -/* 402 */ +/* 416 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Shape = __webpack_require__(30); var GeomTriangle = __webpack_require__(71); -var TriangleRender = __webpack_require__(1009); +var TriangleRender = __webpack_require__(1020); /** * @classdesc @@ -87446,17 +88083,17 @@ module.exports = Triangle; /***/ }), -/* 403 */ +/* 417 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Point = __webpack_require__(4); -var Length = __webpack_require__(56); +var Length = __webpack_require__(57); /** * Returns a Point from around the perimeter of a Triangle. @@ -87533,16 +88170,16 @@ module.exports = GetPoint; /***/ }), -/* 404 */ +/* 418 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(56); +var Length = __webpack_require__(57); var Point = __webpack_require__(4); /** @@ -87626,12 +88263,12 @@ module.exports = GetPoints; /***/ }), -/* 405 */ +/* 419 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87709,12 +88346,12 @@ module.exports = SetValue; /***/ }), -/* 406 */ +/* 420 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87972,17 +88609,17 @@ module.exports = Light; /***/ }), -/* 407 */ +/* 421 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Light = __webpack_require__(406); +var Light = __webpack_require__(420); var Utils = __webpack_require__(10); /** @@ -88335,12 +88972,12 @@ module.exports = LightsManager; /***/ }), -/* 408 */ +/* 422 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -88353,14 +88990,14 @@ var Extend = __webpack_require__(17); var Geom = { - Circle: __webpack_require__(1067), - Ellipse: __webpack_require__(1077), - Intersects: __webpack_require__(409), - Line: __webpack_require__(1096), - Point: __webpack_require__(1117), - Polygon: __webpack_require__(1131), - Rectangle: __webpack_require__(422), - Triangle: __webpack_require__(1161) + Circle: __webpack_require__(1078), + Ellipse: __webpack_require__(1088), + Intersects: __webpack_require__(423), + Line: __webpack_require__(1107), + Point: __webpack_require__(1128), + Polygon: __webpack_require__(1142), + Rectangle: __webpack_require__(436), + Triangle: __webpack_require__(1172) }; @@ -88371,12 +89008,12 @@ module.exports = Geom; /***/ }), -/* 409 */ +/* 423 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -88386,40 +89023,40 @@ module.exports = Geom; module.exports = { - CircleToCircle: __webpack_require__(201), - CircleToRectangle: __webpack_require__(202), - GetCircleToCircle: __webpack_require__(1087), - GetCircleToRectangle: __webpack_require__(1088), - GetLineToCircle: __webpack_require__(203), - GetLineToRectangle: __webpack_require__(205), - GetRectangleIntersection: __webpack_require__(1089), - GetRectangleToRectangle: __webpack_require__(1090), - GetRectangleToTriangle: __webpack_require__(1091), - GetTriangleToCircle: __webpack_require__(1092), - GetTriangleToLine: __webpack_require__(414), - GetTriangleToTriangle: __webpack_require__(1093), - LineToCircle: __webpack_require__(204), + CircleToCircle: __webpack_require__(202), + CircleToRectangle: __webpack_require__(203), + GetCircleToCircle: __webpack_require__(1098), + GetCircleToRectangle: __webpack_require__(1099), + GetLineToCircle: __webpack_require__(204), + GetLineToRectangle: __webpack_require__(206), + GetRectangleIntersection: __webpack_require__(1100), + GetRectangleToRectangle: __webpack_require__(1101), + GetRectangleToTriangle: __webpack_require__(1102), + GetTriangleToCircle: __webpack_require__(1103), + GetTriangleToLine: __webpack_require__(428), + GetTriangleToTriangle: __webpack_require__(1104), + LineToCircle: __webpack_require__(205), LineToLine: __webpack_require__(84), - LineToRectangle: __webpack_require__(410), - PointToLine: __webpack_require__(418), - PointToLineSegment: __webpack_require__(1094), - RectangleToRectangle: __webpack_require__(129), - RectangleToTriangle: __webpack_require__(411), - RectangleToValues: __webpack_require__(1095), - TriangleToCircle: __webpack_require__(413), - TriangleToLine: __webpack_require__(415), - TriangleToTriangle: __webpack_require__(416) + LineToRectangle: __webpack_require__(424), + PointToLine: __webpack_require__(432), + PointToLineSegment: __webpack_require__(1105), + RectangleToRectangle: __webpack_require__(131), + RectangleToTriangle: __webpack_require__(425), + RectangleToValues: __webpack_require__(1106), + TriangleToCircle: __webpack_require__(427), + TriangleToLine: __webpack_require__(429), + TriangleToTriangle: __webpack_require__(430) }; /***/ }), -/* 410 */ +/* 424 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -88515,19 +89152,19 @@ module.exports = LineToRectangle; /***/ }), -/* 411 */ +/* 425 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var LineToLine = __webpack_require__(84); var Contains = __webpack_require__(47); -var ContainsArray = __webpack_require__(206); -var Decompose = __webpack_require__(412); +var ContainsArray = __webpack_require__(207); +var Decompose = __webpack_require__(426); /** * Checks for intersection between Rectangle shape and Triangle shape. @@ -88608,12 +89245,12 @@ module.exports = RectangleToTriangle; /***/ }), -/* 412 */ +/* 426 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -88645,16 +89282,16 @@ module.exports = Decompose; /***/ }), -/* 413 */ +/* 427 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var LineToCircle = __webpack_require__(204); +var LineToCircle = __webpack_require__(205); var Contains = __webpack_require__(83); /** @@ -88710,18 +89347,18 @@ module.exports = TriangleToCircle; /***/ }), -/* 414 */ +/* 428 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Point = __webpack_require__(4); -var TriangleToLine = __webpack_require__(415); +var TriangleToLine = __webpack_require__(429); var LineToLine = __webpack_require__(84); /** @@ -88769,12 +89406,12 @@ module.exports = GetTriangleToLine; /***/ }), -/* 415 */ +/* 429 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -88825,17 +89462,17 @@ module.exports = TriangleToLine; /***/ }), -/* 416 */ +/* 430 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ContainsArray = __webpack_require__(206); -var Decompose = __webpack_require__(417); +var ContainsArray = __webpack_require__(207); +var Decompose = __webpack_require__(431); var LineToLine = __webpack_require__(84); /** @@ -88915,12 +89552,12 @@ module.exports = TriangleToTriangle; /***/ }), -/* 417 */ +/* 431 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -88950,13 +89587,13 @@ module.exports = Decompose; /***/ }), -/* 418 */ +/* 432 */ /***/ (function(module, exports) { /** * @author Richard Davey * @author Florian Mertens - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89020,17 +89657,17 @@ module.exports = PointToLine; /***/ }), -/* 419 */ +/* 433 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var MATH_CONST = __webpack_require__(13); -var Wrap = __webpack_require__(57); +var Wrap = __webpack_require__(58); var Angle = __webpack_require__(85); /** @@ -89054,12 +89691,12 @@ module.exports = NormalAngle; /***/ }), -/* 420 */ +/* 434 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89082,12 +89719,12 @@ module.exports = GetMagnitude; /***/ }), -/* 421 */ +/* 435 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89110,65 +89747,65 @@ module.exports = GetMagnitudeSq; /***/ }), -/* 422 */ +/* 436 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Rectangle = __webpack_require__(11); -Rectangle.Area = __webpack_require__(1136); -Rectangle.Ceil = __webpack_require__(1137); -Rectangle.CeilAll = __webpack_require__(1138); -Rectangle.CenterOn = __webpack_require__(163); -Rectangle.Clone = __webpack_require__(1139); +Rectangle.Area = __webpack_require__(1147); +Rectangle.Ceil = __webpack_require__(1148); +Rectangle.CeilAll = __webpack_require__(1149); +Rectangle.CenterOn = __webpack_require__(165); +Rectangle.Clone = __webpack_require__(1150); Rectangle.Contains = __webpack_require__(47); -Rectangle.ContainsPoint = __webpack_require__(1140); -Rectangle.ContainsRect = __webpack_require__(423); -Rectangle.CopyFrom = __webpack_require__(1141); -Rectangle.Decompose = __webpack_require__(412); -Rectangle.Equals = __webpack_require__(1142); -Rectangle.FitInside = __webpack_require__(1143); -Rectangle.FitOutside = __webpack_require__(1144); -Rectangle.Floor = __webpack_require__(1145); -Rectangle.FloorAll = __webpack_require__(1146); -Rectangle.FromPoints = __webpack_require__(173); -Rectangle.GetAspectRatio = __webpack_require__(208); -Rectangle.GetCenter = __webpack_require__(1147); -Rectangle.GetPoint = __webpack_require__(147); -Rectangle.GetPoints = __webpack_require__(257); -Rectangle.GetSize = __webpack_require__(1148); -Rectangle.Inflate = __webpack_require__(1149); -Rectangle.Intersection = __webpack_require__(1150); -Rectangle.MarchingAnts = __webpack_require__(268); -Rectangle.MergePoints = __webpack_require__(1151); -Rectangle.MergeRect = __webpack_require__(1152); -Rectangle.MergeXY = __webpack_require__(1153); -Rectangle.Offset = __webpack_require__(1154); -Rectangle.OffsetPoint = __webpack_require__(1155); -Rectangle.Overlaps = __webpack_require__(1156); -Rectangle.Perimeter = __webpack_require__(110); -Rectangle.PerimeterPoint = __webpack_require__(1157); -Rectangle.Random = __webpack_require__(150); -Rectangle.RandomOutside = __webpack_require__(1158); -Rectangle.SameDimensions = __webpack_require__(1159); -Rectangle.Scale = __webpack_require__(1160); -Rectangle.Union = __webpack_require__(372); +Rectangle.ContainsPoint = __webpack_require__(1151); +Rectangle.ContainsRect = __webpack_require__(437); +Rectangle.CopyFrom = __webpack_require__(1152); +Rectangle.Decompose = __webpack_require__(426); +Rectangle.Equals = __webpack_require__(1153); +Rectangle.FitInside = __webpack_require__(1154); +Rectangle.FitOutside = __webpack_require__(1155); +Rectangle.Floor = __webpack_require__(1156); +Rectangle.FloorAll = __webpack_require__(1157); +Rectangle.FromPoints = __webpack_require__(174); +Rectangle.GetAspectRatio = __webpack_require__(209); +Rectangle.GetCenter = __webpack_require__(1158); +Rectangle.GetPoint = __webpack_require__(149); +Rectangle.GetPoints = __webpack_require__(271); +Rectangle.GetSize = __webpack_require__(1159); +Rectangle.Inflate = __webpack_require__(1160); +Rectangle.Intersection = __webpack_require__(1161); +Rectangle.MarchingAnts = __webpack_require__(282); +Rectangle.MergePoints = __webpack_require__(1162); +Rectangle.MergeRect = __webpack_require__(1163); +Rectangle.MergeXY = __webpack_require__(1164); +Rectangle.Offset = __webpack_require__(1165); +Rectangle.OffsetPoint = __webpack_require__(1166); +Rectangle.Overlaps = __webpack_require__(1167); +Rectangle.Perimeter = __webpack_require__(112); +Rectangle.PerimeterPoint = __webpack_require__(1168); +Rectangle.Random = __webpack_require__(152); +Rectangle.RandomOutside = __webpack_require__(1169); +Rectangle.SameDimensions = __webpack_require__(1170); +Rectangle.Scale = __webpack_require__(1171); +Rectangle.Union = __webpack_require__(386); module.exports = Rectangle; /***/ }), -/* 423 */ +/* 437 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89203,12 +89840,12 @@ module.exports = ContainsRect; /***/ }), -/* 424 */ +/* 438 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89247,12 +89884,12 @@ module.exports = Centroid; /***/ }), -/* 425 */ +/* 439 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89288,12 +89925,12 @@ module.exports = Offset; /***/ }), -/* 426 */ +/* 440 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89353,12 +89990,12 @@ module.exports = InCenter; /***/ }), -/* 427 */ +/* 441 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89424,12 +90061,12 @@ module.exports = CreateInteractiveObject; /***/ }), -/* 428 */ +/* 442 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89549,17 +90186,17 @@ module.exports = Axis; /***/ }), -/* 429 */ +/* 443 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Events = __webpack_require__(210); +var Events = __webpack_require__(211); /** * @classdesc @@ -89695,17 +90332,17 @@ module.exports = Button; /***/ }), -/* 430 */ +/* 444 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Axis = __webpack_require__(428); -var Button = __webpack_require__(429); +var Axis = __webpack_require__(442); +var Button = __webpack_require__(443); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); var Vector2 = __webpack_require__(3); @@ -90453,18 +91090,18 @@ module.exports = Gamepad; /***/ }), -/* 431 */ +/* 445 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(131); +var Events = __webpack_require__(133); /** * @classdesc @@ -90855,20 +91492,20 @@ module.exports = Key; /***/ }), -/* 432 */ +/* 446 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Events = __webpack_require__(131); +var Events = __webpack_require__(133); var GetFastValue = __webpack_require__(2); -var ProcessKeyCombo = __webpack_require__(1200); -var ResetKeyCombo = __webpack_require__(1202); +var ProcessKeyCombo = __webpack_require__(1211); +var ResetKeyCombo = __webpack_require__(1213); /** * @classdesc @@ -91148,16 +91785,16 @@ module.exports = KeyCombo; /***/ }), -/* 433 */ +/* 447 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MergeXHRSettings = __webpack_require__(211); +var MergeXHRSettings = __webpack_require__(212); /** * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings @@ -91216,21 +91853,21 @@ module.exports = XHRLoader; /***/ }), -/* 434 */ +/* 448 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var CONST = __webpack_require__(29); -var File = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); -var HTML5AudioFile = __webpack_require__(435); +var HTML5AudioFile = __webpack_require__(449); var IsPlainObject = __webpack_require__(7); /** @@ -91487,20 +92124,20 @@ module.exports = AudioFile; /***/ }), -/* 435 */ +/* 449 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Events = __webpack_require__(81); -var File = __webpack_require__(20); +var File = __webpack_require__(21); var GetFastValue = __webpack_require__(2); -var GetURL = __webpack_require__(132); +var GetURL = __webpack_require__(134); var IsPlainObject = __webpack_require__(7); /** @@ -91685,18 +92322,18 @@ module.exports = HTML5AudioFile; /***/ }), -/* 436 */ +/* 450 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var File = __webpack_require__(20); +var CONST = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -91856,18 +92493,18 @@ module.exports = ScriptFile; /***/ }), -/* 437 */ +/* 451 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var File = __webpack_require__(20); +var CONST = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -92031,21 +92668,21 @@ module.exports = TextFile; /***/ }), -/* 438 */ +/* 452 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeImage = __webpack_require__(439); -var ArcadeSprite = __webpack_require__(134); +var ArcadeImage = __webpack_require__(453); +var ArcadeSprite = __webpack_require__(136); var Class = __webpack_require__(0); var CONST = __webpack_require__(50); -var PhysicsGroup = __webpack_require__(440); -var StaticPhysicsGroup = __webpack_require__(441); +var PhysicsGroup = __webpack_require__(454); +var StaticPhysicsGroup = __webpack_require__(455); /** * @classdesc @@ -92302,17 +92939,17 @@ module.exports = Factory; /***/ }), -/* 439 */ +/* 453 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Components = __webpack_require__(213); +var Components = __webpack_require__(214); var Image = __webpack_require__(98); /** @@ -92402,16 +93039,16 @@ module.exports = ArcadeImage; /***/ }), -/* 440 */ +/* 454 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeSprite = __webpack_require__(134); +var ArcadeSprite = __webpack_require__(136); var Class = __webpack_require__(0); var CONST = __webpack_require__(50); var GetFastValue = __webpack_require__(2); @@ -92448,8 +93085,8 @@ var PhysicsGroup = new Class({ if (!children && !config) { config = { - createCallback: this.createCallbackHandler, - removeCallback: this.removeCallbackHandler + internalCreateCallback: this.createCallbackHandler, + internalRemoveCallback: this.removeCallbackHandler }; } else if (IsPlainObject(children)) @@ -92458,8 +93095,8 @@ var PhysicsGroup = new Class({ config = children; children = null; - config.createCallback = this.createCallbackHandler; - config.removeCallback = this.removeCallbackHandler; + config.internalCreateCallback = this.createCallbackHandler; + config.internalRemoveCallback = this.removeCallbackHandler; } else if (Array.isArray(children) && IsPlainObject(children[0])) { @@ -92470,16 +93107,16 @@ var PhysicsGroup = new Class({ children.forEach(function (singleConfig) { - singleConfig.createCallback = _this.createCallbackHandler; - singleConfig.removeCallback = _this.removeCallbackHandler; + singleConfig.internalCreateCallback = _this.createCallbackHandler; + singleConfig.internalRemoveCallback = _this.removeCallbackHandler; }); } else { // config is not defined and children is not a plain object nor an array of plain objects config = { - createCallback: this.createCallbackHandler, - removeCallback: this.removeCallbackHandler + internalCreateCallback: this.createCallbackHandler, + internalRemoveCallback: this.removeCallbackHandler }; } @@ -92687,16 +93324,16 @@ module.exports = PhysicsGroup; /***/ }), -/* 441 */ +/* 455 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeSprite = __webpack_require__(134); +var ArcadeSprite = __webpack_require__(136); var Class = __webpack_require__(0); var CONST = __webpack_require__(50); var GetFastValue = __webpack_require__(2); @@ -92733,8 +93370,8 @@ var StaticPhysicsGroup = new Class({ if (!children && !config) { config = { - createCallback: this.createCallbackHandler, - removeCallback: this.removeCallbackHandler, + internalCreateCallback: this.createCallbackHandler, + internalRemoveCallback: this.removeCallbackHandler, createMultipleCallback: this.createMultipleCallbackHandler, classType: ArcadeSprite }; @@ -92745,8 +93382,8 @@ var StaticPhysicsGroup = new Class({ config = children; children = null; - config.createCallback = this.createCallbackHandler; - config.removeCallback = this.removeCallbackHandler; + config.internalCreateCallback = this.createCallbackHandler; + config.internalRemoveCallback = this.removeCallbackHandler; config.createMultipleCallback = this.createMultipleCallbackHandler; config.classType = GetFastValue(config, 'classType', ArcadeSprite); } @@ -92758,8 +93395,8 @@ var StaticPhysicsGroup = new Class({ config.forEach(function (singleConfig) { - singleConfig.createCallback = this.createCallbackHandler; - singleConfig.removeCallback = this.removeCallbackHandler; + singleConfig.internalCreateCallback = this.createCallbackHandler; + singleConfig.internalRemoveCallback = this.removeCallbackHandler; singleConfig.createMultipleCallback = this.createMultipleCallbackHandler; singleConfig.classType = GetFastValue(singleConfig, 'classType', ArcadeSprite); }); @@ -92878,7 +93515,7 @@ module.exports = StaticPhysicsGroup; /***/ }), -/* 442 */ +/* 456 */ /***/ (function(module, exports) { /** @@ -92963,42 +93600,42 @@ module.exports = OverlapRect; /***/ }), -/* 443 */ +/* 457 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Body = __webpack_require__(444); -var Clamp = __webpack_require__(23); +var Body = __webpack_require__(458); +var Clamp = __webpack_require__(22); var Class = __webpack_require__(0); -var Collider = __webpack_require__(445); +var Collider = __webpack_require__(459); var CONST = __webpack_require__(50); -var DistanceBetween = __webpack_require__(58); +var DistanceBetween = __webpack_require__(53); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(214); -var FuzzyEqual = __webpack_require__(167); -var FuzzyGreaterThan = __webpack_require__(303); -var FuzzyLessThan = __webpack_require__(304); -var GetOverlapX = __webpack_require__(446); -var GetOverlapY = __webpack_require__(447); +var Events = __webpack_require__(215); +var FuzzyEqual = __webpack_require__(144); +var FuzzyGreaterThan = __webpack_require__(317); +var FuzzyLessThan = __webpack_require__(318); +var GetOverlapX = __webpack_require__(460); +var GetOverlapY = __webpack_require__(461); var GetValue = __webpack_require__(6); -var ProcessQueue = __webpack_require__(183); -var ProcessTileCallbacks = __webpack_require__(1259); +var ProcessQueue = __webpack_require__(184); +var ProcessTileCallbacks = __webpack_require__(1270); var Rectangle = __webpack_require__(11); -var RTree = __webpack_require__(448); -var SeparateTile = __webpack_require__(1260); -var SeparateX = __webpack_require__(1265); -var SeparateY = __webpack_require__(1266); -var Set = __webpack_require__(107); -var StaticBody = __webpack_require__(450); -var TileIntersectsBody = __webpack_require__(449); +var RTree = __webpack_require__(462); +var SeparateTile = __webpack_require__(1271); +var SeparateX = __webpack_require__(1276); +var SeparateY = __webpack_require__(1277); +var Set = __webpack_require__(108); +var StaticBody = __webpack_require__(464); +var TileIntersectsBody = __webpack_require__(463); var TransformMatrix = __webpack_require__(32); var Vector2 = __webpack_require__(3); -var Wrap = __webpack_require__(57); +var Wrap = __webpack_require__(58); /** * @classdesc @@ -94916,7 +95553,7 @@ var World = new Class({ { bodyB = results[i]; - if (bodyA === bodyB || !group.contains(bodyB.gameObject)) + if (bodyA === bodyB || !bodyB.enable || !group.contains(bodyB.gameObject)) { // Skip if comparing against itself, or if bodyB isn't actually part of the Group continue; @@ -95352,20 +95989,20 @@ module.exports = World; /***/ }), -/* 444 */ +/* 458 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Benjamin D. Richards - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var CONST = __webpack_require__(50); -var Events = __webpack_require__(214); -var RadToDeg = __webpack_require__(170); +var Events = __webpack_require__(215); +var RadToDeg = __webpack_require__(171); var Rectangle = __webpack_require__(11); var RectangleContains = __webpack_require__(47); var Vector2 = __webpack_require__(3); @@ -95547,7 +96184,7 @@ var Body = new Class({ this.rotation = gameObject.angle; /** - * The Body's rotation, in degrees, during the previous step. + * The Body rotation, in degrees, during the previous step. * * @name Phaser.Physics.Arcade.Body#preRotation * @type {number} @@ -95556,22 +96193,26 @@ var Body = new Class({ this.preRotation = gameObject.angle; /** - * The width of the Body's boundary, in pixels. - * If the Body is circular, this is also the Body's diameter. + * The width of the Body boundary, in pixels. + * If the Body is circular, this is also the diameter. + * If you wish to change the width use the `Body.setSize` method. * * @name Phaser.Physics.Arcade.Body#width * @type {number} + * @readonly * @default 64 * @since 3.0.0 */ this.width = width; /** - * The height of the Body's boundary, in pixels. - * If the Body is circular, this is also the Body's diameter. + * The height of the Body boundary, in pixels. + * If the Body is circular, this is also the diameter. + * If you wish to change the height use the `Body.setSize` method. * * @name Phaser.Physics.Arcade.Body#height * @type {number} + * @readonly * @default 64 * @since 3.0.0 */ @@ -95643,7 +96284,9 @@ var Body = new Class({ this.velocity = new Vector2(); /** - * The Body's calculated velocity, in pixels per second, at the last step. + * The Body's change in position (due to velocity) at the last step, in pixels. + * + * The size of this value depends on the simulation's step rate. * * @name Phaser.Physics.Arcade.Body#newVelocity * @type {Phaser.Math.Vector2} @@ -95800,23 +96443,24 @@ var Body = new Class({ this.maxVelocity = new Vector2(10000, 10000); /** - * The maximum speed this Body is allowed to reach. + * The maximum speed this Body is allowed to reach, in pixels per second. * * If not negative it limits the scalar value of speed. * - * Any negative value means no maximum is being applied. + * Any negative value means no maximum is being applied (the default). * * @name Phaser.Physics.Arcade.Body#maxSpeed * @type {number} + * @default -1 * @since 3.16.0 */ this.maxSpeed = -1; /** * If this Body is `immovable` and in motion, `friction` is the proportion of this Body's motion received by the riding Body on each axis, relative to 1. - * The default value (1, 0) moves the riding Body horizontally in equal proportion to this Body and vertically not at all. * The horizontal component (x) is applied only when two colliding Bodies are separated vertically. * The vertical component (y) is applied only when two colliding Bodies are separated horizontally. + * The default value (1, 0) moves the riding Body horizontally in equal proportion to this Body and vertically not at all. * * @name Phaser.Physics.Arcade.Body#friction * @type {Phaser.Math.Vector2} @@ -95998,7 +96642,7 @@ var Body = new Class({ this.overlapR = 0; /** - * Whether this Body is overlapped with another and both are not moving. + * Whether this Body is overlapped with another and both are not moving, on at least one axis. * * @name Phaser.Physics.Arcade.Body#embedded * @type {boolean} @@ -96028,29 +96672,39 @@ var Body = new Class({ this.checkCollision = { none: false, up: true, down: true, left: true, right: true }; /** - * Whether this Body is colliding with another and in which direction. + * Whether this Body is colliding with a Body or Static Body and in which direction. + * In a collision where both bodies have zero velocity, `embedded` will be set instead. * * @name Phaser.Physics.Arcade.Body#touching * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision} * @since 3.0.0 + * + * @see Phaser.Physics.Arcade.Body#blocked + * @see Phaser.Physics.Arcade.Body#embedded */ this.touching = { none: true, up: false, down: false, left: false, right: false }; /** - * Whether this Body was colliding with another during the last step, and in which direction. + * This Body's `touching` value during the previous step. * * @name Phaser.Physics.Arcade.Body#wasTouching * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision} * @since 3.0.0 + * + * @see Phaser.Physics.Arcade.Body#touching */ this.wasTouching = { none: true, up: false, down: false, left: false, right: false }; /** - * Whether this Body is colliding with a tile or the world boundary. + * Whether this Body is colliding with a Static Body, a tile, or the world boundary. + * In a collision with a Static Body, if this Body has zero velocity then `embedded` will be set instead. * * @name Phaser.Physics.Arcade.Body#blocked * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision} * @since 3.0.0 + * + * @see Phaser.Physics.Arcade.Body#embedded + * @see Phaser.Physics.Arcade.Body#touching */ this.blocked = { none: true, up: false, down: false, left: false, right: false }; @@ -96118,6 +96772,28 @@ var Body = new Class({ */ this._dy = 0; + /** + * The final calculated change in the Body's horizontal position as of `postUpdate`. + * + * @name Phaser.Physics.Arcade.Body#_tx + * @type {number} + * @private + * @default 0 + * @since 3.22.0 + */ + this._tx = 0; + + /** + * The final calculated change in the Body's vertical position as of `postUpdate`. + * + * @name Phaser.Physics.Arcade.Body#_ty + * @type {number} + * @private + * @default 0 + * @since 3.22.0 + */ + this._ty = 0; + /** * Stores the Game Object's bounds. * @@ -96407,6 +97083,9 @@ var Body = new Class({ { this.gameObject.angle += this.deltaZ(); } + + this._tx = dx; + this._ty = dy; }, /** @@ -96780,6 +97459,9 @@ var Body = new Class({ /** * The change in this Body's horizontal position from the previous step. * This value is set during the Body's update phase. + * + * As a Body can update multiple times per step this may not hold the final + * delta value for the Body. In this case, please see the `deltaXFinal` method. * * @method Phaser.Physics.Arcade.Body#deltaX * @since 3.0.0 @@ -96794,6 +97476,9 @@ var Body = new Class({ /** * The change in this Body's vertical position from the previous step. * This value is set during the Body's update phase. + * + * As a Body can update multiple times per step this may not hold the final + * delta value for the Body. In this case, please see the `deltaYFinal` method. * * @method Phaser.Physics.Arcade.Body#deltaY * @since 3.0.0 @@ -96805,6 +97490,48 @@ var Body = new Class({ return this._dy; }, + /** + * The change in this Body's horizontal position from the previous game update. + * + * This value is set during the `postUpdate` phase and takes into account the + * `deltaMax` and final position of the Body. + * + * Because this value is not calculated until `postUpdate`, you must listen for it + * during a Scene `POST_UPDATE` or `RENDER` event, and not in `update`, as it will + * not be calculated by that point. If you _do_ use these values in `update` they + * will represent the delta from the _previous_ game frame. + * + * @method Phaser.Physics.Arcade.Body#deltaXFinal + * @since 3.22.0 + * + * @return {number} The final delta x value. + */ + deltaXFinal: function () + { + return this._tx; + }, + + /** + * The change in this Body's vertical position from the previous game update. + * + * This value is set during the `postUpdate` phase and takes into account the + * `deltaMax` and final position of the Body. + * + * Because this value is not calculated until `postUpdate`, you must listen for it + * during a Scene `POST_UPDATE` or `RENDER` event, and not in `update`, as it will + * not be calculated by that point. If you _do_ use these values in `update` they + * will represent the delta from the _previous_ game frame. + * + * @method Phaser.Physics.Arcade.Body#deltaYFinal + * @since 3.22.0 + * + * @return {number} The final delta y value. + */ + deltaYFinal: function () + { + return this._ty; + }, + /** * The change in this Body's rotation from the previous step, in degrees. * @@ -96905,7 +97632,7 @@ var Body = new Class({ /** * Sets whether this Body collides with the world boundary. * - * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Vec2 first. + * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Phaser.Math.Vector2 first. * * @method Phaser.Physics.Arcade.Body#setCollideWorldBounds * @since 3.0.0 @@ -97590,12 +98317,12 @@ module.exports = Body; /***/ }), -/* 445 */ +/* 459 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -97773,12 +98500,12 @@ module.exports = Collider; /***/ }), -/* 446 */ +/* 460 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -97881,12 +98608,12 @@ module.exports = GetOverlapX; /***/ }), -/* 447 */ +/* 461 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -97989,17 +98716,17 @@ module.exports = GetOverlapY; /***/ }), -/* 448 */ +/* 462 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Vladimir Agafonkin * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var quickselect = __webpack_require__(369); +var quickselect = __webpack_require__(383); /** * @classdesc @@ -98600,12 +99327,12 @@ function multiSelect (arr, left, right, n, compare) module.exports = rbush; /***/ }), -/* 449 */ +/* 463 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -98636,16 +99363,16 @@ module.exports = TileIntersectsBody; /***/ }), -/* 450 */ +/* 464 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CircleContains = __webpack_require__(54); +var CircleContains = __webpack_require__(55); var Class = __webpack_require__(0); var CONST = __webpack_require__(50); var RectangleContains = __webpack_require__(47); @@ -99091,8 +99818,7 @@ var StaticBody = new Class({ }, /** - * Updates this Static Body so that its position and dimensions are updated - * based on the current Game Object it is bound to. + * Syncs the Body's position and size with its parent Game Object. * * @method Phaser.Physics.Arcade.StaticBody#updateFromGameObject * @since 3.1.0 @@ -99271,7 +99997,6 @@ var StaticBody = new Class({ /** * Resets this Body to the given coordinates. Also positions its parent Game Object to the same coordinates. - * Similar to `updateFromGameObject`, but doesn't modify the Body's dimensions. * * @method Phaser.Physics.Arcade.StaticBody#reset * @since 3.0.0 @@ -99625,15 +100350,15 @@ module.exports = StaticBody; /***/ }), -/* 451 */, -/* 452 */, -/* 453 */, -/* 454 */ +/* 465 */, +/* 466 */, +/* 467 */, +/* 468 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey -* @copyright 2019 Photon Storm Ltd. +* @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ @@ -99758,12 +100483,12 @@ module.exports = BasePlugin; /***/ }), -/* 455 */ +/* 469 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99803,12 +100528,12 @@ module.exports = ReplaceByIndex; /***/ }), -/* 456 */ +/* 470 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99846,18 +100571,18 @@ module.exports = HasTileAt; /***/ }), -/* 457 */ +/* 471 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Tile = __webpack_require__(74); var IsInLayerBounds = __webpack_require__(103); -var CalculateFacesAt = __webpack_require__(216); +var CalculateFacesAt = __webpack_require__(217); /** * Removes the tile at the given tile coordinates in the specified layer and updates the layer's @@ -99909,20 +100634,20 @@ module.exports = RemoveTileAt; /***/ }), -/* 458 */ +/* 472 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Formats = __webpack_require__(31); -var Parse2DArray = __webpack_require__(219); -var ParseCSV = __webpack_require__(459); -var ParseJSONTiled = __webpack_require__(460); -var ParseWeltmeister = __webpack_require__(471); +var Parse2DArray = __webpack_require__(220); +var ParseCSV = __webpack_require__(473); +var ParseJSONTiled = __webpack_require__(474); +var ParseWeltmeister = __webpack_require__(485); /** * Parses raw data of a given Tilemap format into a new MapData object. If no recognized data format @@ -99979,17 +100704,17 @@ module.exports = Parse; /***/ }), -/* 459 */ +/* 473 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Formats = __webpack_require__(31); -var Parse2DArray = __webpack_require__(219); +var Parse2DArray = __webpack_require__(220); /** * Parses a CSV string of tile indexes into a new MapData object with a single layer. @@ -100027,23 +100752,23 @@ module.exports = ParseCSV; /***/ }), -/* 460 */ +/* 474 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Formats = __webpack_require__(31); var MapData = __webpack_require__(105); -var ParseTileLayers = __webpack_require__(461); -var ParseImageLayers = __webpack_require__(463); -var ParseTilesets = __webpack_require__(464); -var ParseObjectLayers = __webpack_require__(467); -var BuildTilesetIndex = __webpack_require__(469); -var AssignTileProperties = __webpack_require__(470); +var ParseTileLayers = __webpack_require__(475); +var ParseImageLayers = __webpack_require__(477); +var ParseTilesets = __webpack_require__(478); +var ParseObjectLayers = __webpack_require__(481); +var BuildTilesetIndex = __webpack_require__(483); +var AssignTileProperties = __webpack_require__(484); /** * Parses a Tiled JSON object into a new MapData object. @@ -100105,21 +100830,21 @@ module.exports = ParseJSONTiled; /***/ }), -/* 461 */ +/* 475 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Base64Decode = __webpack_require__(462); +var Base64Decode = __webpack_require__(476); var GetFastValue = __webpack_require__(2); var LayerData = __webpack_require__(104); -var ParseGID = __webpack_require__(220); +var ParseGID = __webpack_require__(221); var Tile = __webpack_require__(74); -var CreateGroupLayer = __webpack_require__(221); +var CreateGroupLayer = __webpack_require__(222); /** * Parses all tilemap layers in a Tiled JSON object into new LayerData objects. @@ -100363,12 +101088,12 @@ module.exports = ParseTileLayers; /***/ }), -/* 462 */ +/* 476 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100406,17 +101131,17 @@ module.exports = Base64Decode; /***/ }), -/* 463 */ +/* 477 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetFastValue = __webpack_require__(2); -var CreateGroupLayer = __webpack_require__(221); +var CreateGroupLayer = __webpack_require__(222); /** * Parses a Tiled JSON object into an array of objects with details about the image layers. @@ -100494,18 +101219,18 @@ module.exports = ParseImageLayers; /***/ }), -/* 464 */ +/* 478 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tileset = __webpack_require__(140); -var ImageCollection = __webpack_require__(465); -var ParseObject = __webpack_require__(222); +var Tileset = __webpack_require__(141); +var ImageCollection = __webpack_require__(479); +var ParseObject = __webpack_require__(223); /** * Tilesets and Image Collections @@ -100663,12 +101388,12 @@ module.exports = ParseTilesets; /***/ }), -/* 465 */ +/* 479 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100835,12 +101560,12 @@ module.exports = ImageCollection; /***/ }), -/* 466 */ +/* 480 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100879,19 +101604,19 @@ module.exports = Pick; /***/ }), -/* 467 */ +/* 481 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetFastValue = __webpack_require__(2); -var ParseObject = __webpack_require__(222); -var ObjectLayer = __webpack_require__(468); -var CreateGroupLayer = __webpack_require__(221); +var ParseObject = __webpack_require__(223); +var ObjectLayer = __webpack_require__(482); +var CreateGroupLayer = __webpack_require__(222); /** * Parses a Tiled JSON object into an array of ObjectLayer objects. @@ -100978,12 +101703,12 @@ module.exports = ParseObjectLayers; /***/ }), -/* 468 */ +/* 482 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101100,12 +101825,12 @@ module.exports = ObjectLayer; /***/ }), -/* 469 */ +/* 483 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101173,12 +101898,12 @@ module.exports = BuildTilesetIndex; /***/ }), -/* 470 */ +/* 484 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101246,19 +101971,19 @@ module.exports = AssignTileProperties; /***/ }), -/* 471 */ +/* 485 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Formats = __webpack_require__(31); var MapData = __webpack_require__(105); -var ParseTileLayers = __webpack_require__(472); -var ParseTilesets = __webpack_require__(473); +var ParseTileLayers = __webpack_require__(486); +var ParseTilesets = __webpack_require__(487); /** * Parses a Weltmeister JSON object into a new MapData object. @@ -101313,12 +102038,12 @@ module.exports = ParseWeltmeister; /***/ }), -/* 472 */ +/* 486 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101397,16 +102122,16 @@ module.exports = ParseTileLayers; /***/ }), -/* 473 */ +/* 487 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tileset = __webpack_require__(140); +var Tileset = __webpack_require__(141); /** * [description] @@ -101448,27 +102173,27 @@ module.exports = ParseTilesets; /***/ }), -/* 474 */ +/* 488 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var DegToRad = __webpack_require__(35); -var DynamicTilemapLayer = __webpack_require__(475); +var DynamicTilemapLayer = __webpack_require__(489); var Extend = __webpack_require__(17); var Formats = __webpack_require__(31); var LayerData = __webpack_require__(104); -var Rotate = __webpack_require__(313); +var Rotate = __webpack_require__(327); var SpliceOne = __webpack_require__(79); -var StaticTilemapLayer = __webpack_require__(476); +var StaticTilemapLayer = __webpack_require__(490); var Tile = __webpack_require__(74); -var TilemapComponents = __webpack_require__(136); -var Tileset = __webpack_require__(140); +var TilemapComponents = __webpack_require__(137); +var Tileset = __webpack_require__(141); /** * @callback TilemapFilterCallback @@ -102709,7 +103434,7 @@ var Tilemap = new Class({ * @method Phaser.Tilemaps.Tilemap#getTileLayerNames * @since 3.21.0 * - * @return {[string]} Array of valid tilelayer names / IDs loaded into this Tilemap. + * @return {string[]} Array of valid tilelayer names / IDs loaded into this Tilemap. */ getTileLayerNames: function () { @@ -104005,20 +104730,20 @@ module.exports = Tilemap; /***/ }), -/* 475 */ +/* 489 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var DynamicTilemapLayerRender = __webpack_require__(1318); +var DynamicTilemapLayerRender = __webpack_require__(1333); var GameObject = __webpack_require__(14); -var TilemapComponents = __webpack_require__(136); +var TilemapComponents = __webpack_require__(137); /** * @classdesc @@ -105326,12 +106051,12 @@ module.exports = DynamicTilemapLayer; /***/ }), -/* 476 */ +/* 490 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105339,8 +106064,8 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameEvents = __webpack_require__(18); var GameObject = __webpack_require__(14); -var StaticTilemapLayerRender = __webpack_require__(1321); -var TilemapComponents = __webpack_require__(136); +var StaticTilemapLayerRender = __webpack_require__(1336); +var TilemapComponents = __webpack_require__(137); var TransformMatrix = __webpack_require__(32); var Utils = __webpack_require__(10); @@ -106820,12 +107545,12 @@ module.exports = StaticTilemapLayer; /***/ }), -/* 477 */ +/* 491 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -107133,16 +107858,16 @@ module.exports = TimerEvent; /***/ }), -/* 478 */ +/* 492 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RESERVED = __webpack_require__(1330); +var RESERVED = __webpack_require__(1345); /** * Internal function used by the Tween Builder to return an array of properties @@ -107194,12 +107919,12 @@ module.exports = GetProps; /***/ }), -/* 479 */ +/* 493 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -107242,24 +107967,24 @@ module.exports = GetTweens; /***/ }), -/* 480 */ +/* 494 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Defaults = __webpack_require__(226); +var Defaults = __webpack_require__(227); var GetAdvancedValue = __webpack_require__(15); var GetBoolean = __webpack_require__(88); var GetEaseFunction = __webpack_require__(82); -var GetNewValue = __webpack_require__(141); +var GetNewValue = __webpack_require__(142); var GetValue = __webpack_require__(6); -var GetValueOp = __webpack_require__(225); -var Tween = __webpack_require__(227); -var TweenData = __webpack_require__(229); +var GetValueOp = __webpack_require__(226); +var Tween = __webpack_require__(228); +var TweenData = __webpack_require__(230); /** * Creates a new Number Tween. @@ -107372,26 +108097,272 @@ module.exports = NumberTweenBuilder; /***/ }), -/* 481 */ +/* 495 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetEaseFunction = __webpack_require__(82); +var GetValue = __webpack_require__(6); +var MATH_CONST = __webpack_require__(13); + +/** + * Creates a Stagger function to be used by a Tween property. + * + * The stagger function will allow you to stagger changes to the value of the property across all targets of the tween. + * + * This is only worth using if the tween has multiple targets. + * + * The following will stagger the delay by 100ms across all targets of the tween, causing them to scale down to 0.2 + * over the duration specified: + * + * ```javascript + * this.tweens.add({ + * targets: [ ... ], + * scale: 0.2, + * ease: 'linear', + * duration: 1000, + * delay: this.tweens.stagger(100) + * }); + * ``` + * + * The following will stagger the delay by 500ms across all targets of the tween using a 10 x 6 grid, staggering + * from the center out, using a cubic ease. + * + * ```javascript + * this.tweens.add({ + * targets: [ ... ], + * scale: 0.2, + * ease: 'linear', + * duration: 1000, + * delay: this.tweens.stagger(500, { grid: [ 10, 6 ], from: 'center', ease: 'cubic.out' }) + * }); + * ``` + * + * @function Phaser.Tweens.Builders.StaggerBuilder + * @since 3.19.0 + * + * @param {(number|number[])} value - The amount to stagger by, or an array containing two elements representing the min and max values to stagger between. + * @param {Phaser.Types.Tweens.StaggerConfig} [config] - A Stagger Configuration object. + * + * @return {function} The stagger function. + */ +var StaggerBuilder = function (value, options) +{ + if (options === undefined) { options = {}; } + + var result; + + var start = GetValue(options, 'start', 0); + var ease = GetValue(options, 'ease', null); + var grid = GetValue(options, 'grid', null); + + var from = GetValue(options, 'from', 0); + + var fromFirst = (from === 'first'); + var fromCenter = (from === 'center'); + var fromLast = (from === 'last'); + var fromValue = (typeof(from) === 'number'); + + var isRange = (Array.isArray(value)); + var value1 = (isRange) ? parseFloat(value[0]) : parseFloat(value); + var value2 = (isRange) ? parseFloat(value[1]) : 0; + var maxValue = Math.max(value1, value2); + + if (isRange) + { + start += value1; + } + + if (grid) + { + // Pre-calc the grid to save doing it for ever tweendata update + var gridWidth = grid[0]; + var gridHeight = grid[1]; + + var fromX = 0; + var fromY = 0; + + var distanceX = 0; + var distanceY = 0; + + var gridValues = []; + + if (fromLast) + { + fromX = gridWidth - 1; + fromY = gridHeight - 1; + } + else if (fromValue) + { + fromX = from % gridWidth; + fromY = Math.floor(from / gridWidth); + } + else if (fromCenter) + { + fromX = (gridWidth - 1) / 2; + fromY = (gridHeight - 1) / 2; + } + + var gridMax = MATH_CONST.MIN_SAFE_INTEGER; + + for (var toY = 0; toY < gridHeight; toY++) + { + gridValues[toY] = []; + + for (var toX = 0; toX < gridWidth; toX++) + { + distanceX = fromX - toX; + distanceY = fromY - toY; + + var dist = Math.sqrt(distanceX * distanceX + distanceY * distanceY); + + if (dist > gridMax) + { + gridMax = dist; + } + + gridValues[toY][toX] = dist; + } + } + } + + var easeFunction = (ease) ? GetEaseFunction(ease) : null; + + if (grid) + { + result = function (target, key, value, index) + { + var gridSpace = 0; + var toX = index % gridWidth; + var toY = Math.floor(index / gridWidth); + + if (toX >= 0 && toX < gridWidth && toY >= 0 && toY < gridHeight) + { + gridSpace = gridValues[toY][toX]; + } + + var output; + + if (isRange) + { + var diff = (value2 - value1); + + if (easeFunction) + { + output = ((gridSpace / gridMax) * diff) * easeFunction(gridSpace / gridMax); + } + else + { + output = (gridSpace / gridMax) * diff; + } + } + else if (easeFunction) + { + output = (gridSpace * value1) * easeFunction(gridSpace / gridMax); + } + else + { + output = gridSpace * value1; + } + + return output + start; + }; + } + else + { + result = function (target, key, value, index, total) + { + // zero offset + total--; + + var fromIndex; + + if (fromFirst) + { + fromIndex = index; + } + else if (fromCenter) + { + fromIndex = Math.abs((total / 2) - index); + } + else if (fromLast) + { + fromIndex = total - index; + } + else if (fromValue) + { + fromIndex = Math.abs(from - index); + } + + var output; + + if (isRange) + { + var spacing; + + if (fromCenter) + { + spacing = ((value2 - value1) / total) * (fromIndex * 2); + } + else + { + spacing = ((value2 - value1) / total) * fromIndex; + } + + if (easeFunction) + { + output = spacing * easeFunction(fromIndex / total); + } + else + { + output = spacing; + } + } + else if (easeFunction) + { + output = (total * maxValue) * easeFunction(fromIndex / total); + } + else + { + output = fromIndex * value1; + } + + return output + start; + }; + } + + return result; +}; + +module.exports = StaggerBuilder; + + +/***/ }), +/* 496 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Clone = __webpack_require__(67); -var Defaults = __webpack_require__(226); +var Defaults = __webpack_require__(227); var GetAdvancedValue = __webpack_require__(15); var GetBoolean = __webpack_require__(88); var GetEaseFunction = __webpack_require__(82); -var GetNewValue = __webpack_require__(141); -var GetTargets = __webpack_require__(224); -var GetTweens = __webpack_require__(479); +var GetNewValue = __webpack_require__(142); +var GetTargets = __webpack_require__(225); +var GetTweens = __webpack_require__(493); var GetValue = __webpack_require__(6); -var Timeline = __webpack_require__(482); -var TweenBuilder = __webpack_require__(142); +var Timeline = __webpack_require__(497); +var TweenBuilder = __webpack_require__(143); /** * Builds a Timeline of Tweens based on a configuration object. @@ -107524,19 +108495,19 @@ module.exports = TimelineBuilder; /***/ }), -/* 482 */ +/* 497 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(228); -var TweenBuilder = __webpack_require__(142); +var Events = __webpack_require__(229); +var TweenBuilder = __webpack_require__(143); var TWEEN_CONST = __webpack_require__(89); /** @@ -108429,44 +109400,18 @@ module.exports = Timeline; /***/ }), -/* 483 */ -/***/ (function(module, exports) { - -var g; - -// This works in non-strict mode -g = (function() { - return this; -})(); - -try { - // This works if eval is allowed (see CSP) - g = g || Function("return this")() || (1, eval)("this"); -} catch (e) { - // This works if the window reference is available - if (typeof window === "object") g = window; -} - -// g can still be undefined, but nothing to do about it... -// We return undefined, instead of nothing here, so it's -// easier to handle this case. if(!global) { ...} - -module.exports = g; - - -/***/ }), -/* 484 */ +/* 498 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseAnimation = __webpack_require__(146); +var BaseAnimation = __webpack_require__(148); var Class = __webpack_require__(0); -var Events = __webpack_require__(109); +var Events = __webpack_require__(111); /** * @classdesc @@ -108986,6 +109931,8 @@ var Animation = new Class({ this.forward = true; this._reverse = false; + this._paused = false; + this._wasPlaying = true; return this._startAnimation(key, startFrame); }, @@ -109628,21 +110575,21 @@ module.exports = Animation; /***/ }), -/* 485 */ +/* 499 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CanvasSnapshot = __webpack_require__(486); +var CanvasSnapshot = __webpack_require__(500); var CameraEvents = __webpack_require__(48); var Class = __webpack_require__(0); var CONST = __webpack_require__(29); -var GetBlendModes = __webpack_require__(487); +var GetBlendModes = __webpack_require__(501); var ScaleEvents = __webpack_require__(92); var TransformMatrix = __webpack_require__(32); @@ -110422,12 +111369,12 @@ module.exports = CanvasRenderer; /***/ }), -/* 486 */ +/* 500 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -110515,17 +111462,17 @@ module.exports = CanvasSnapshot; /***/ }), -/* 487 */ +/* 501 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var modes = __webpack_require__(52); -var CanvasFeatures = __webpack_require__(299); +var CanvasFeatures = __webpack_require__(313); /** * Returns an array which maps the default blend modes to supported Canvas blend modes. @@ -110579,13 +111526,13 @@ module.exports = GetBlendModes; /***/ }), -/* 488 */ +/* 502 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -110594,19 +111541,19 @@ var CameraEvents = __webpack_require__(48); var Class = __webpack_require__(0); var CONST = __webpack_require__(29); var GameEvents = __webpack_require__(18); -var IsSizePowerOfTwo = __webpack_require__(116); +var IsSizePowerOfTwo = __webpack_require__(118); var NOOP = __webpack_require__(1); var ScaleEvents = __webpack_require__(92); var SpliceOne = __webpack_require__(79); -var TextureEvents = __webpack_require__(117); +var TextureEvents = __webpack_require__(119); var TransformMatrix = __webpack_require__(32); var Utils = __webpack_require__(10); -var WebGLSnapshot = __webpack_require__(489); +var WebGLSnapshot = __webpack_require__(503); // Default Pipelines -var BitmapMaskPipeline = __webpack_require__(490); -var ForwardDiffuseLightPipeline = __webpack_require__(491); -var TextureTintPipeline = __webpack_require__(234); +var BitmapMaskPipeline = __webpack_require__(504); +var ForwardDiffuseLightPipeline = __webpack_require__(505); +var TextureTintPipeline = __webpack_require__(235); /** * @callback WebGLContextCallback @@ -113533,12 +114480,12 @@ module.exports = WebGLRenderer; /***/ }), -/* 489 */ +/* 503 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -113643,20 +114590,20 @@ module.exports = WebGLSnapshot; /***/ }), -/* 490 */ +/* 504 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(753); -var ShaderSourceVS = __webpack_require__(754); -var WebGLPipeline = __webpack_require__(233); +var ShaderSourceFS = __webpack_require__(776); +var ShaderSourceVS = __webpack_require__(777); +var WebGLPipeline = __webpack_require__(234); /** * @classdesc @@ -113906,19 +114853,19 @@ module.exports = BitmapMaskPipeline; /***/ }), -/* 491 */ +/* 505 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(755); -var TextureTintPipeline = __webpack_require__(234); +var ShaderSourceFS = __webpack_require__(778); +var TextureTintPipeline = __webpack_require__(235); var LIGHT_COUNT = 10; @@ -114427,12 +115374,12 @@ module.exports = ForwardDiffuseLightPipeline; /***/ }), -/* 492 */ +/* 506 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -115177,23 +116124,51 @@ module.exports = ModelViewProjection; /***/ }), -/* 493 */, -/* 494 */, -/* 495 */ -/***/ (function(module, exports, __webpack_require__) { +/* 507 */, +/* 508 */, +/* 509 */, +/* 510 */, +/* 511 */ +/***/ (function(module, exports) { -__webpack_require__(496); -__webpack_require__(497); -__webpack_require__(498); -__webpack_require__(499); -__webpack_require__(500); -__webpack_require__(501); -__webpack_require__(502); -__webpack_require__(503); +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || new Function("return this")(); +} catch (e) { + // This works if the window reference is available + if (typeof window === "object") g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; /***/ }), -/* 496 */ +/* 512 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(513); +__webpack_require__(514); +__webpack_require__(515); +__webpack_require__(516); +__webpack_require__(517); +__webpack_require__(518); +__webpack_require__(519); +__webpack_require__(520); + + +/***/ }), +/* 513 */ /***/ (function(module, exports) { /** @@ -115233,7 +116208,7 @@ if (!Array.prototype.forEach) /***/ }), -/* 497 */ +/* 514 */ /***/ (function(module, exports) { /** @@ -115249,7 +116224,7 @@ if (!Array.isArray) /***/ }), -/* 498 */ +/* 515 */ /***/ (function(module, exports) { /* Copyright 2013 Chris Wilson @@ -115436,7 +116411,7 @@ BiquadFilterNode.type and OscillatorNode.type. /***/ }), -/* 499 */ +/* 516 */ /***/ (function(module, exports) { /** @@ -115451,7 +116426,7 @@ if (!window.console) /***/ }), -/* 500 */ +/* 517 */ /***/ (function(module, exports) { // ES6 Math.trunc - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc @@ -115463,7 +116438,7 @@ if (!Math.trunc) { /***/ }), -/* 501 */ +/* 518 */ /***/ (function(module, exports) { /** @@ -115500,7 +116475,7 @@ if (!Math.trunc) { /***/ }), -/* 502 */ +/* 519 */ /***/ (function(module, exports) { // References: @@ -115557,7 +116532,7 @@ if (!window.cancelAnimationFrame) /***/ }), -/* 503 */ +/* 520 */ /***/ (function(module, exports) { /** @@ -115610,12 +116585,60 @@ if (typeof window.Uint32Array !== 'function' && typeof window.Uint32Array !== 'o /***/ }), -/* 504 */ +/* 521 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var QuickSet = __webpack_require__(239); + +/** + * Takes an array of Game Objects, or any objects that have public `x` and `y` properties, and aligns them next to each other. + * + * The first item isn't moved. The second item is aligned next to the first, then the third next to the second, and so on. + * + * @function Phaser.Actions.AlignTo + * @since 3.22.0 + * + * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return] + * + * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action. + * @param {integer} position - The position to align the items with. This is an align constant, such as `Phaser.Display.Align.LEFT_CENTER`. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action. + */ +var AlignTo = function (items, position, offsetX, offsetY) +{ + var target = items[0]; + + for (var i = 1; i < items.length; i++) + { + var item = items[i]; + + QuickSet(item, target, position, offsetX, offsetY); + + target = item; + } + + return items; +}; + +module.exports = AlignTo; + + +/***/ }), +/* 522 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -115651,12 +116674,12 @@ module.exports = Angle; /***/ }), -/* 505 */ +/* 523 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -115690,12 +116713,12 @@ module.exports = Call; /***/ }), -/* 506 */ +/* 524 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -115748,12 +116771,12 @@ module.exports = GetFirst; /***/ }), -/* 507 */ +/* 525 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -115806,20 +116829,20 @@ module.exports = GetLast; /***/ }), -/* 508 */ +/* 526 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AlignIn = __webpack_require__(238); -var CONST = __webpack_require__(143); +var AlignIn = __webpack_require__(252); +var CONST = __webpack_require__(106); var GetFastValue = __webpack_require__(2); var NOOP = __webpack_require__(1); -var Zone = __webpack_require__(108); +var Zone = __webpack_require__(110); var tempZone = new Zone({ sys: { queueDepthSort: NOOP, events: { once: NOOP } } }, 0, 0, 1, 1); @@ -115841,10 +116864,15 @@ var GridAlign = function (items, options) { if (options === undefined) { options = {}; } + var widthSet = options.hasOwnProperty('width'); + var heightSet = options.hasOwnProperty('height'); + var width = GetFastValue(options, 'width', -1); var height = GetFastValue(options, 'height', -1); + var cellWidth = GetFastValue(options, 'cellWidth', 1); var cellHeight = GetFastValue(options, 'cellHeight', cellWidth); + var position = GetFastValue(options, 'position', CONST.TOP_LEFT); var x = GetFastValue(options, 'x', 0); var y = GetFastValue(options, 'y', 0); @@ -115861,31 +116889,15 @@ var GridAlign = function (items, options) { AlignIn(items[i], tempZone, position); - if (width === -1) + if (widthSet && width === -1) { // We keep laying them out horizontally until we've done them all - cy += cellHeight; - tempZone.y += cellHeight; - - if (cy === h) - { - cy = 0; - tempZone.x += cellWidth; - tempZone.y = y; - } + tempZone.x += cellWidth; } - else if (height === -1) + else if (heightSet && height === -1) { // We keep laying them out vertically until we've done them all - cx += cellWidth; - tempZone.x += cellWidth; - - if (cx === w) - { - cx = 0; - tempZone.x = x; - tempZone.y += cellHeight; - } + tempZone.y += cellHeight; } else { @@ -115916,12 +116928,307 @@ module.exports = GridAlign; /***/ }), -/* 509 */ +/* 527 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = __webpack_require__(22); + +// bitmask flag for GameObject.renderMask +var _FLAG = 2; // 0010 + +/** + * Provides methods used for setting the alpha properties of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.Alpha + * @since 3.0.0 + */ + +var Alpha = { + + /** + * Private internal value. Holds the global alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alpha + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alpha: 1, + + /** + * Private internal value. Holds the top-left alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaTL + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaTL: 1, + + /** + * Private internal value. Holds the top-right alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaTR + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaTR: 1, + + /** + * Private internal value. Holds the bottom-left alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaBL + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaBL: 1, + + /** + * Private internal value. Holds the bottom-right alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaBR + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaBR: 1, + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + * + * @method Phaser.GameObjects.Components.Alpha#clearAlpha + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + clearAlpha: function () + { + return this.setAlpha(1); + }, + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * + * @method Phaser.GameObjects.Components.Alpha#setAlpha + * @since 3.0.0 + * + * @param {number} [topLeft=1] - The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. + * @param {number} [topRight] - The alpha value used for the top-right of the Game Object. WebGL only. + * @param {number} [bottomLeft] - The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param {number} [bottomRight] - The alpha value used for the bottom-right of the Game Object. WebGL only. + * + * @return {this} This Game Object instance. + */ + setAlpha: function (topLeft, topRight, bottomLeft, bottomRight) + { + if (topLeft === undefined) { topLeft = 1; } + + // Treat as if there is only one alpha value for the whole Game Object + if (topRight === undefined) + { + this.alpha = topLeft; + } + else + { + this._alphaTL = Clamp(topLeft, 0, 1); + this._alphaTR = Clamp(topRight, 0, 1); + this._alphaBL = Clamp(bottomLeft, 0, 1); + this._alphaBR = Clamp(bottomRight, 0, 1); + } + + return this; + }, + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + * + * @name Phaser.GameObjects.Components.Alpha#alpha + * @type {number} + * @since 3.0.0 + */ + alpha: { + + get: function () + { + return this._alpha; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alpha = v; + this._alphaTL = v; + this._alphaTR = v; + this._alphaBL = v; + this._alphaBR = v; + + if (v === 0) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaTopLeft + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaTopLeft: { + + get: function () + { + return this._alphaTL; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaTL = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaTopRight + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaTopRight: { + + get: function () + { + return this._alphaTR; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaTR = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaBottomLeft + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaBottomLeft: { + + get: function () + { + return this._alphaBL; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaBL = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaBottomRight + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaBottomRight: { + + get: function () + { + return this._alphaBR; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaBR = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + } + +}; + +module.exports = Alpha; + + +/***/ }), +/* 528 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -115943,12 +117250,12 @@ module.exports = 'add'; /***/ }), -/* 510 */ +/* 529 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -115971,12 +117278,12 @@ module.exports = 'complete'; /***/ }), -/* 511 */ +/* 530 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -115998,12 +117305,12 @@ module.exports = 'repeat'; /***/ }), -/* 512 */ +/* 531 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116026,12 +117333,12 @@ module.exports = 'restart'; /***/ }), -/* 513 */ +/* 532 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116054,12 +117361,12 @@ module.exports = 'start'; /***/ }), -/* 514 */ +/* 533 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116078,12 +117385,12 @@ module.exports = 'pauseall'; /***/ }), -/* 515 */ +/* 534 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116102,12 +117409,12 @@ module.exports = 'remove'; /***/ }), -/* 516 */ +/* 535 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116125,12 +117432,12 @@ module.exports = 'resumeall'; /***/ }), -/* 517 */ +/* 536 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116154,12 +117461,12 @@ module.exports = 'animationcomplete'; /***/ }), -/* 518 */ +/* 537 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116182,12 +117489,12 @@ module.exports = 'animationcomplete-'; /***/ }), -/* 519 */ +/* 538 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116211,12 +117518,12 @@ module.exports = 'animationrepeat-'; /***/ }), -/* 520 */ +/* 539 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116239,12 +117546,12 @@ module.exports = 'animationrestart-'; /***/ }), -/* 521 */ +/* 540 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116267,12 +117574,12 @@ module.exports = 'animationstart-'; /***/ }), -/* 522 */ +/* 541 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116296,12 +117603,12 @@ module.exports = 'animationupdate-'; /***/ }), -/* 523 */ +/* 542 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116326,12 +117633,12 @@ module.exports = 'animationrepeat'; /***/ }), -/* 524 */ +/* 543 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116355,12 +117662,12 @@ module.exports = 'animationrestart'; /***/ }), -/* 525 */ +/* 544 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116384,12 +117691,12 @@ module.exports = 'animationstart'; /***/ }), -/* 526 */ +/* 545 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116414,12 +117721,12 @@ module.exports = 'animationupdate'; /***/ }), -/* 527 */ +/* 546 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116563,12 +117870,12 @@ module.exports = ComputedSize; /***/ }), -/* 528 */ +/* 547 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116688,12 +117995,12 @@ module.exports = Crop; /***/ }), -/* 529 */ +/* 548 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116852,17 +118159,17 @@ module.exports = Flip; /***/ }), -/* 530 */ +/* 549 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Rectangle = __webpack_require__(11); -var RotateAround = __webpack_require__(259); +var RotateAround = __webpack_require__(273); var Vector2 = __webpack_require__(3); /** @@ -117211,12 +118518,12 @@ module.exports = GetBounds; /***/ }), -/* 531 */ +/* 550 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -117234,12 +118541,12 @@ module.exports = 'blur'; /***/ }), -/* 532 */ +/* 551 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -117256,12 +118563,12 @@ module.exports = 'boot'; /***/ }), -/* 533 */ +/* 552 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -117279,12 +118586,12 @@ module.exports = 'contextlost'; /***/ }), -/* 534 */ +/* 553 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -117302,12 +118609,12 @@ module.exports = 'contextrestored'; /***/ }), -/* 535 */ +/* 554 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -117325,12 +118632,12 @@ module.exports = 'destroy'; /***/ }), -/* 536 */ +/* 555 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -117347,12 +118654,12 @@ module.exports = 'focus'; /***/ }), -/* 537 */ +/* 556 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -117373,12 +118680,12 @@ module.exports = 'hidden'; /***/ }), -/* 538 */ +/* 557 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -117394,12 +118701,12 @@ module.exports = 'pause'; /***/ }), -/* 539 */ +/* 558 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -117420,12 +118727,12 @@ module.exports = 'postrender'; /***/ }), -/* 540 */ +/* 559 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -117445,12 +118752,12 @@ module.exports = 'poststep'; /***/ }), -/* 541 */ +/* 560 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -117470,12 +118777,12 @@ module.exports = 'prerender'; /***/ }), -/* 542 */ +/* 561 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -117495,12 +118802,12 @@ module.exports = 'prestep'; /***/ }), -/* 543 */ +/* 562 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -117517,12 +118824,12 @@ module.exports = 'ready'; /***/ }), -/* 544 */ +/* 563 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -117538,12 +118845,12 @@ module.exports = 'resume'; /***/ }), -/* 545 */ +/* 564 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -117563,12 +118870,12 @@ module.exports = 'step'; /***/ }), -/* 546 */ +/* 565 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -117587,12 +118894,12 @@ module.exports = 'visible'; /***/ }), -/* 547 */ +/* 566 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -117790,12 +119097,12 @@ module.exports = Origin; /***/ }), -/* 548 */ +/* 567 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -118139,15 +119446,24 @@ var PathFollower = { if (tween) { var tweenData = tween.data[0]; + var pathVector = this.pathVector; - if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD) + if (tweenData.state !== TWEEN_CONST.COMPLETE) + { + this.path.getPoint(1, pathVector); + + pathVector.add(this.pathOffset); + + this.setPosition(pathVector.x, pathVector.y); + + return; + } + else if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD) { // If delayed, etc then bail out return; } - var pathVector = this.pathVector; - this.path.getPoint(tween.getValue(), pathVector); pathVector.add(this.pathOffset); @@ -118187,12 +119503,12 @@ module.exports = PathFollower; /***/ }), -/* 549 */ +/* 568 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -118374,12 +119690,12 @@ module.exports = Size; /***/ }), -/* 550 */ +/* 569 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -118504,12 +119820,12 @@ module.exports = Texture; /***/ }), -/* 551 */ +/* 570 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -118712,12 +120028,12 @@ module.exports = TextureCrop; /***/ }), -/* 552 */ +/* 571 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119052,12 +120368,12 @@ module.exports = Tint; /***/ }), -/* 553 */ +/* 572 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119084,12 +120400,12 @@ module.exports = 'changedata'; /***/ }), -/* 554 */ +/* 573 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119107,7 +120423,6 @@ module.exports = 'changedata'; * @since 3.16.1 * * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event. - * @param {string} key - The unique key of the data item within the Data Manager. * @param {any} value - The item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance. * @param {any} previousValue - The previous item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance. */ @@ -119115,12 +120430,12 @@ module.exports = 'changedata-'; /***/ }), -/* 555 */ +/* 574 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119143,12 +120458,12 @@ module.exports = 'removedata'; /***/ }), -/* 556 */ +/* 575 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119171,12 +120486,12 @@ module.exports = 'setdata'; /***/ }), -/* 557 */ +/* 576 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119196,12 +120511,12 @@ module.exports = 'destroy'; /***/ }), -/* 558 */ +/* 577 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119228,12 +120543,12 @@ module.exports = 'complete'; /***/ }), -/* 559 */ +/* 578 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119257,12 +120572,12 @@ module.exports = 'created'; /***/ }), -/* 560 */ +/* 579 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119283,12 +120598,12 @@ module.exports = 'error'; /***/ }), -/* 561 */ +/* 580 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119315,12 +120630,12 @@ module.exports = 'loop'; /***/ }), -/* 562 */ +/* 581 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119343,12 +120658,12 @@ module.exports = 'play'; /***/ }), -/* 563 */ +/* 582 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119368,12 +120683,12 @@ module.exports = 'seeked'; /***/ }), -/* 564 */ +/* 583 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119394,12 +120709,12 @@ module.exports = 'seeking'; /***/ }), -/* 565 */ +/* 584 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119420,12 +120735,12 @@ module.exports = 'stop'; /***/ }), -/* 566 */ +/* 585 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119446,12 +120761,12 @@ module.exports = 'timeout'; /***/ }), -/* 567 */ +/* 586 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119472,12 +120787,12 @@ module.exports = 'unlocked'; /***/ }), -/* 568 */ +/* 587 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119513,12 +120828,12 @@ module.exports = IncAlpha; /***/ }), -/* 569 */ +/* 588 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119554,12 +120869,12 @@ module.exports = IncX; /***/ }), -/* 570 */ +/* 589 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119601,12 +120916,12 @@ module.exports = IncXY; /***/ }), -/* 571 */ +/* 590 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119642,12 +120957,12 @@ module.exports = IncY; /***/ }), -/* 572 */ +/* 591 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119691,12 +121006,12 @@ module.exports = PlaceOnCircle; /***/ }), -/* 573 */ +/* 592 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119743,16 +121058,16 @@ module.exports = PlaceOnEllipse; /***/ }), -/* 574 */ +/* 593 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetPoints = __webpack_require__(148); +var GetPoints = __webpack_require__(150); /** * Positions an array of Game Objects on evenly spaced points of a Line. @@ -119787,18 +121102,18 @@ module.exports = PlaceOnLine; /***/ }), -/* 575 */ +/* 594 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MarchingAnts = __webpack_require__(268); -var RotateLeft = __webpack_require__(269); -var RotateRight = __webpack_require__(270); +var MarchingAnts = __webpack_require__(282); +var RotateLeft = __webpack_require__(283); +var RotateRight = __webpack_require__(284); /** * Takes an array of Game Objects and positions them on evenly spaced points around the perimeter of a Rectangle. @@ -119845,16 +121160,16 @@ module.exports = PlaceOnRectangle; /***/ }), -/* 576 */ +/* 595 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BresenhamPoints = __webpack_require__(271); +var BresenhamPoints = __webpack_require__(285); /** * Takes an array of Game Objects and positions them on evenly spaced points around the edges of a Triangle. @@ -119906,12 +121221,12 @@ module.exports = PlaceOnTriangle; /***/ }), -/* 577 */ +/* 596 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119943,16 +121258,16 @@ module.exports = PlayAnimation; /***/ }), -/* 578 */ +/* 597 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(145); +var Random = __webpack_require__(147); /** * Takes an array of Game Objects and positions them at random locations within the Circle. @@ -119983,16 +121298,16 @@ module.exports = RandomCircle; /***/ }), -/* 579 */ +/* 598 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(152); +var Random = __webpack_require__(154); /** * Takes an array of Game Objects and positions them at random locations within the Ellipse. @@ -120023,16 +121338,16 @@ module.exports = RandomEllipse; /***/ }), -/* 580 */ +/* 599 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(149); +var Random = __webpack_require__(151); /** * Takes an array of Game Objects and positions them at random locations on the Line. @@ -120063,16 +121378,16 @@ module.exports = RandomLine; /***/ }), -/* 581 */ +/* 600 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(150); +var Random = __webpack_require__(152); /** * Takes an array of Game Objects and positions them at random locations within the Rectangle. @@ -120101,16 +121416,16 @@ module.exports = RandomRectangle; /***/ }), -/* 582 */ +/* 601 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(153); +var Random = __webpack_require__(155); /** * Takes an array of Game Objects and positions them at random locations within the Triangle. @@ -120141,12 +121456,12 @@ module.exports = RandomTriangle; /***/ }), -/* 583 */ +/* 602 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120182,17 +121497,17 @@ module.exports = Rotate; /***/ }), -/* 584 */ +/* 603 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundDistance = __webpack_require__(154); -var DistanceBetween = __webpack_require__(58); +var RotateAroundDistance = __webpack_require__(156); +var DistanceBetween = __webpack_require__(53); /** * Rotates each item around the given point by the given angle. @@ -120228,16 +121543,16 @@ module.exports = RotateAround; /***/ }), -/* 585 */ +/* 604 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathRotateAroundDistance = __webpack_require__(154); +var MathRotateAroundDistance = __webpack_require__(156); /** * Rotates an array of Game Objects around a point by the given angle and distance. @@ -120277,12 +121592,12 @@ module.exports = RotateAroundDistance; /***/ }), -/* 586 */ +/* 605 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120318,12 +121633,12 @@ module.exports = ScaleX; /***/ }), -/* 587 */ +/* 606 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120365,12 +121680,12 @@ module.exports = ScaleXY; /***/ }), -/* 588 */ +/* 607 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120406,12 +121721,12 @@ module.exports = ScaleY; /***/ }), -/* 589 */ +/* 608 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120447,12 +121762,12 @@ module.exports = SetAlpha; /***/ }), -/* 590 */ +/* 609 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120487,12 +121802,12 @@ module.exports = SetBlendMode; /***/ }), -/* 591 */ +/* 610 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120528,12 +121843,12 @@ module.exports = SetDepth; /***/ }), -/* 592 */ +/* 611 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120567,12 +121882,12 @@ module.exports = SetHitArea; /***/ }), -/* 593 */ +/* 612 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120614,12 +121929,12 @@ module.exports = SetOrigin; /***/ }), -/* 594 */ +/* 613 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120655,12 +121970,12 @@ module.exports = SetRotation; /***/ }), -/* 595 */ +/* 614 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120702,12 +122017,12 @@ module.exports = SetScale; /***/ }), -/* 596 */ +/* 615 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120743,12 +122058,12 @@ module.exports = SetScaleX; /***/ }), -/* 597 */ +/* 616 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120784,12 +122099,12 @@ module.exports = SetScaleY; /***/ }), -/* 598 */ +/* 617 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120831,12 +122146,12 @@ module.exports = SetScrollFactor; /***/ }), -/* 599 */ +/* 618 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120872,12 +122187,12 @@ module.exports = SetScrollFactorX; /***/ }), -/* 600 */ +/* 619 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120913,12 +122228,12 @@ module.exports = SetScrollFactorY; /***/ }), -/* 601 */ +/* 620 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120952,12 +122267,12 @@ module.exports = SetTint; /***/ }), -/* 602 */ +/* 621 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120990,12 +122305,12 @@ module.exports = SetVisible; /***/ }), -/* 603 */ +/* 622 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -121031,12 +122346,12 @@ module.exports = SetX; /***/ }), -/* 604 */ +/* 623 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -121078,12 +122393,12 @@ module.exports = SetXY; /***/ }), -/* 605 */ +/* 624 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -121119,12 +122434,12 @@ module.exports = SetY; /***/ }), -/* 606 */ +/* 625 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -121249,16 +122564,16 @@ module.exports = ShiftPosition; /***/ }), -/* 607 */ +/* 626 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayShuffle = __webpack_require__(112); +var ArrayShuffle = __webpack_require__(114); /** * Shuffles the array in place. The shuffled array is both modified and returned. @@ -121282,16 +122597,16 @@ module.exports = Shuffle; /***/ }), -/* 608 */ +/* 627 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathSmootherStep = __webpack_require__(155); +var MathSmootherStep = __webpack_require__(157); /** * Smootherstep is a sigmoid-like interpolation and clamping function. @@ -121340,16 +122655,16 @@ module.exports = SmootherStep; /***/ }), -/* 609 */ +/* 628 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathSmoothStep = __webpack_require__(156); +var MathSmoothStep = __webpack_require__(158); /** * Smoothstep is a sigmoid-like interpolation and clamping function. @@ -121398,12 +122713,12 @@ module.exports = SmoothStep; /***/ }), -/* 610 */ +/* 629 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -121461,12 +122776,12 @@ module.exports = Spread; /***/ }), -/* 611 */ +/* 630 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -121497,17 +122812,17 @@ module.exports = ToggleVisible; /***/ }), -/* 612 */ +/* 631 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author samme - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Wrap = __webpack_require__(57); +var Wrap = __webpack_require__(58); /** * Wrap each item's coordinates within a rectangle's area. @@ -121546,12 +122861,12 @@ module.exports = WrapInRectangle; /***/ }), -/* 613 */ +/* 632 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -121561,21 +122876,21 @@ module.exports = WrapInRectangle; module.exports = { - Animation: __webpack_require__(146), - AnimationFrame: __webpack_require__(254), - AnimationManager: __webpack_require__(272), - Events: __webpack_require__(109) + Animation: __webpack_require__(148), + AnimationFrame: __webpack_require__(268), + AnimationManager: __webpack_require__(286), + Events: __webpack_require__(111) }; /***/ }), -/* 614 */ +/* 633 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -121585,20 +122900,20 @@ module.exports = { module.exports = { - BaseCache: __webpack_require__(273), - CacheManager: __webpack_require__(275), - Events: __webpack_require__(274) + BaseCache: __webpack_require__(287), + CacheManager: __webpack_require__(289), + Events: __webpack_require__(288) }; /***/ }), -/* 615 */ +/* 634 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -121618,12 +122933,12 @@ module.exports = 'add'; /***/ }), -/* 616 */ +/* 635 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -121643,12 +122958,12 @@ module.exports = 'remove'; /***/ }), -/* 617 */ +/* 636 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -121662,19 +122977,19 @@ module.exports = 'remove'; module.exports = { - Controls: __webpack_require__(618), - Scene2D: __webpack_require__(621) + Controls: __webpack_require__(637), + Scene2D: __webpack_require__(640) }; /***/ }), -/* 618 */ +/* 637 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -121684,19 +122999,19 @@ module.exports = { module.exports = { - FixedKeyControl: __webpack_require__(619), - SmoothedKeyControl: __webpack_require__(620) + FixedKeyControl: __webpack_require__(638), + SmoothedKeyControl: __webpack_require__(639) }; /***/ }), -/* 619 */ +/* 638 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -121997,12 +123312,12 @@ module.exports = FixedKeyControl; /***/ }), -/* 620 */ +/* 639 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122480,12 +123795,12 @@ module.exports = SmoothedKeyControl; /***/ }), -/* 621 */ +/* 640 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122495,22 +123810,22 @@ module.exports = SmoothedKeyControl; module.exports = { - Camera: __webpack_require__(276), + Camera: __webpack_require__(290), BaseCamera: __webpack_require__(91), - CameraManager: __webpack_require__(674), - Effects: __webpack_require__(284), + CameraManager: __webpack_require__(693), + Effects: __webpack_require__(298), Events: __webpack_require__(48) }; /***/ }), -/* 622 */ +/* 641 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122528,12 +123843,12 @@ module.exports = 'cameradestroy'; /***/ }), -/* 623 */ +/* 642 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122554,12 +123869,12 @@ module.exports = 'camerafadeincomplete'; /***/ }), -/* 624 */ +/* 643 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122584,12 +123899,12 @@ module.exports = 'camerafadeinstart'; /***/ }), -/* 625 */ +/* 644 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122610,12 +123925,12 @@ module.exports = 'camerafadeoutcomplete'; /***/ }), -/* 626 */ +/* 645 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122640,12 +123955,12 @@ module.exports = 'camerafadeoutstart'; /***/ }), -/* 627 */ +/* 646 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122664,12 +123979,12 @@ module.exports = 'cameraflashcomplete'; /***/ }), -/* 628 */ +/* 647 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122692,12 +124007,12 @@ module.exports = 'cameraflashstart'; /***/ }), -/* 629 */ +/* 648 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122716,12 +124031,12 @@ module.exports = 'camerapancomplete'; /***/ }), -/* 630 */ +/* 649 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122743,12 +124058,12 @@ module.exports = 'camerapanstart'; /***/ }), -/* 631 */ +/* 650 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122769,12 +124084,12 @@ module.exports = 'postrender'; /***/ }), -/* 632 */ +/* 651 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122795,12 +124110,12 @@ module.exports = 'prerender'; /***/ }), -/* 633 */ +/* 652 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122819,12 +124134,12 @@ module.exports = 'camerashakecomplete'; /***/ }), -/* 634 */ +/* 653 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122845,12 +124160,12 @@ module.exports = 'camerashakestart'; /***/ }), -/* 635 */ +/* 654 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122869,12 +124184,12 @@ module.exports = 'camerazoomcomplete'; /***/ }), -/* 636 */ +/* 655 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122895,16 +124210,16 @@ module.exports = 'camerazoomstart'; /***/ }), -/* 637 */ +/* 656 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(23); +var Clamp = __webpack_require__(22); var Class = __webpack_require__(0); var Events = __webpack_require__(48); @@ -123283,16 +124598,16 @@ module.exports = Fade; /***/ }), -/* 638 */ +/* 657 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(23); +var Clamp = __webpack_require__(22); var Class = __webpack_require__(0); var Events = __webpack_require__(48); @@ -123634,18 +124949,18 @@ module.exports = Flash; /***/ }), -/* 639 */ +/* 658 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(23); +var Clamp = __webpack_require__(22); var Class = __webpack_require__(0); -var EaseMap = __webpack_require__(164); +var EaseMap = __webpack_require__(166); var Events = __webpack_require__(48); var Vector2 = __webpack_require__(3); @@ -123959,12 +125274,12 @@ module.exports = Pan; /***/ }), -/* 640 */ +/* 659 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -123990,12 +125305,12 @@ module.exports = In; /***/ }), -/* 641 */ +/* 660 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124021,12 +125336,12 @@ module.exports = Out; /***/ }), -/* 642 */ +/* 661 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124061,12 +125376,12 @@ module.exports = InOut; /***/ }), -/* 643 */ +/* 662 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124106,12 +125421,12 @@ module.exports = In; /***/ }), -/* 644 */ +/* 663 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124149,12 +125464,12 @@ module.exports = Out; /***/ }), -/* 645 */ +/* 664 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124213,12 +125528,12 @@ module.exports = InOut; /***/ }), -/* 646 */ +/* 665 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124241,12 +125556,12 @@ module.exports = In; /***/ }), -/* 647 */ +/* 666 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124269,12 +125584,12 @@ module.exports = Out; /***/ }), -/* 648 */ +/* 667 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124304,12 +125619,12 @@ module.exports = InOut; /***/ }), -/* 649 */ +/* 668 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124332,12 +125647,12 @@ module.exports = In; /***/ }), -/* 650 */ +/* 669 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124360,12 +125675,12 @@ module.exports = Out; /***/ }), -/* 651 */ +/* 670 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124395,12 +125710,12 @@ module.exports = InOut; /***/ }), -/* 652 */ +/* 671 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124450,12 +125765,12 @@ module.exports = In; /***/ }), -/* 653 */ +/* 672 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124505,12 +125820,12 @@ module.exports = Out; /***/ }), -/* 654 */ +/* 673 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124567,12 +125882,12 @@ module.exports = InOut; /***/ }), -/* 655 */ +/* 674 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124595,12 +125910,12 @@ module.exports = In; /***/ }), -/* 656 */ +/* 675 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124623,12 +125938,12 @@ module.exports = Out; /***/ }), -/* 657 */ +/* 676 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124658,12 +125973,12 @@ module.exports = InOut; /***/ }), -/* 658 */ +/* 677 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124686,12 +126001,12 @@ module.exports = Linear; /***/ }), -/* 659 */ +/* 678 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124714,12 +126029,12 @@ module.exports = In; /***/ }), -/* 660 */ +/* 679 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124742,12 +126057,12 @@ module.exports = Out; /***/ }), -/* 661 */ +/* 680 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124777,12 +126092,12 @@ module.exports = InOut; /***/ }), -/* 662 */ +/* 681 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124805,12 +126120,12 @@ module.exports = In; /***/ }), -/* 663 */ +/* 682 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124833,12 +126148,12 @@ module.exports = Out; /***/ }), -/* 664 */ +/* 683 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124868,12 +126183,12 @@ module.exports = InOut; /***/ }), -/* 665 */ +/* 684 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124896,12 +126211,12 @@ module.exports = In; /***/ }), -/* 666 */ +/* 685 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124924,12 +126239,12 @@ module.exports = Out; /***/ }), -/* 667 */ +/* 686 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124959,12 +126274,12 @@ module.exports = InOut; /***/ }), -/* 668 */ +/* 687 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124998,12 +126313,12 @@ module.exports = In; /***/ }), -/* 669 */ +/* 688 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -125037,12 +126352,12 @@ module.exports = Out; /***/ }), -/* 670 */ +/* 689 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -125076,12 +126391,12 @@ module.exports = InOut; /***/ }), -/* 671 */ +/* 690 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -125118,16 +126433,16 @@ module.exports = Stepped; /***/ }), -/* 672 */ +/* 691 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(23); +var Clamp = __webpack_require__(22); var Class = __webpack_require__(0); var Events = __webpack_require__(48); var Vector2 = __webpack_require__(3); @@ -125437,18 +126752,18 @@ module.exports = Shake; /***/ }), -/* 673 */ +/* 692 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(23); +var Clamp = __webpack_require__(22); var Class = __webpack_require__(0); -var EaseMap = __webpack_require__(164); +var EaseMap = __webpack_require__(166); var Events = __webpack_require__(48); /** @@ -125730,22 +127045,22 @@ module.exports = Zoom; /***/ }), -/* 674 */ +/* 693 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Camera = __webpack_require__(276); +var Camera = __webpack_require__(290); var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(2); -var PluginCache = __webpack_require__(21); +var PluginCache = __webpack_require__(23); var RectangleContains = __webpack_require__(47); var ScaleEvents = __webpack_require__(92); -var SceneEvents = __webpack_require__(22); +var SceneEvents = __webpack_require__(19); /** * @classdesc @@ -126478,12 +127793,12 @@ module.exports = CameraManager; /***/ }), -/* 675 */ +/* 694 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126497,12 +127812,12 @@ module.exports = 'enterfullscreen'; /***/ }), -/* 676 */ +/* 695 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126516,12 +127831,12 @@ module.exports = 'fullscreenfailed'; /***/ }), -/* 677 */ +/* 696 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126535,12 +127850,12 @@ module.exports = 'fullscreenunsupported'; /***/ }), -/* 678 */ +/* 697 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126555,12 +127870,12 @@ module.exports = 'leavefullscreen'; /***/ }), -/* 679 */ +/* 698 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126576,12 +127891,12 @@ module.exports = 'orientationchange'; /***/ }), -/* 680 */ +/* 699 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126607,12 +127922,12 @@ module.exports = 'resize'; /***/ }), -/* 681 */ +/* 700 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126632,12 +127947,12 @@ module.exports = 'boot'; /***/ }), -/* 682 */ +/* 701 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126661,12 +127976,12 @@ module.exports = 'create'; /***/ }), -/* 683 */ +/* 702 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126688,12 +128003,12 @@ module.exports = 'destroy'; /***/ }), -/* 684 */ +/* 703 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126715,12 +128030,12 @@ module.exports = 'pause'; /***/ }), -/* 685 */ +/* 704 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126752,12 +128067,12 @@ module.exports = 'postupdate'; /***/ }), -/* 686 */ +/* 705 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126789,12 +128104,12 @@ module.exports = 'preupdate'; /***/ }), -/* 687 */ +/* 706 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126817,12 +128132,12 @@ module.exports = 'ready'; /***/ }), -/* 688 */ +/* 707 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126853,12 +128168,12 @@ module.exports = 'render'; /***/ }), -/* 689 */ +/* 708 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126880,12 +128195,12 @@ module.exports = 'resume'; /***/ }), -/* 690 */ +/* 709 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126910,12 +128225,12 @@ module.exports = 'shutdown'; /***/ }), -/* 691 */ +/* 710 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126937,12 +128252,12 @@ module.exports = 'sleep'; /***/ }), -/* 692 */ +/* 711 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126962,12 +128277,12 @@ module.exports = 'start'; /***/ }), -/* 693 */ +/* 712 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126998,12 +128313,12 @@ module.exports = 'transitioncomplete'; /***/ }), -/* 694 */ +/* 713 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127035,12 +128350,12 @@ module.exports = 'transitioninit'; /***/ }), -/* 695 */ +/* 714 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127069,12 +128384,12 @@ module.exports = 'transitionout'; /***/ }), -/* 696 */ +/* 715 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127109,12 +128424,12 @@ module.exports = 'transitionstart'; /***/ }), -/* 697 */ +/* 716 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127144,12 +128459,12 @@ module.exports = 'transitionwake'; /***/ }), -/* 698 */ +/* 717 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127181,12 +128496,12 @@ module.exports = 'update'; /***/ }), -/* 699 */ +/* 718 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127208,12 +128523,12 @@ module.exports = 'wake'; /***/ }), -/* 700 */ +/* 719 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127223,18 +128538,18 @@ module.exports = 'wake'; module.exports = { - Config: __webpack_require__(297), - CreateRenderer: __webpack_require__(320), - DebugHeader: __webpack_require__(322), + Config: __webpack_require__(311), + CreateRenderer: __webpack_require__(334), + DebugHeader: __webpack_require__(336), Events: __webpack_require__(18), - TimeStep: __webpack_require__(323), - VisibilityHandler: __webpack_require__(325) + TimeStep: __webpack_require__(337), + VisibilityHandler: __webpack_require__(339) }; /***/ }), -/* 701 */ +/* 720 */ /***/ (function(module, exports) { // shim for using process in browser @@ -127424,16 +128739,16 @@ process.umask = function() { return 0; }; /***/ }), -/* 702 */ +/* 721 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Browser = __webpack_require__(115); +var Browser = __webpack_require__(117); /** * Determines the input support of the browser running this Phaser Game instance. @@ -127499,16 +128814,16 @@ module.exports = init(); /***/ }), -/* 703 */ +/* 722 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Browser = __webpack_require__(115); +var Browser = __webpack_require__(117); /** * Determines the audio playback capabilities of the device running this Phaser Game instance. @@ -127624,12 +128939,12 @@ module.exports = init(); /***/ }), -/* 704 */ +/* 723 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127711,12 +129026,12 @@ module.exports = init(); /***/ }), -/* 705 */ +/* 724 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127815,12 +129130,12 @@ module.exports = init(); /***/ }), -/* 706 */ +/* 725 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127830,28 +129145,28 @@ module.exports = init(); module.exports = { - Between: __webpack_require__(300), - BetweenPoints: __webpack_require__(707), - BetweenPointsY: __webpack_require__(708), - BetweenY: __webpack_require__(709), - CounterClockwise: __webpack_require__(710), - Normalize: __webpack_require__(301), - Reverse: __webpack_require__(711), - RotateTo: __webpack_require__(712), - ShortestBetween: __webpack_require__(713), - Wrap: __webpack_require__(231), - WrapDegrees: __webpack_require__(232) + Between: __webpack_require__(314), + BetweenPoints: __webpack_require__(726), + BetweenPointsY: __webpack_require__(727), + BetweenY: __webpack_require__(728), + CounterClockwise: __webpack_require__(729), + Normalize: __webpack_require__(315), + Reverse: __webpack_require__(730), + RotateTo: __webpack_require__(731), + ShortestBetween: __webpack_require__(732), + Wrap: __webpack_require__(232), + WrapDegrees: __webpack_require__(233) }; /***/ }), -/* 707 */ +/* 726 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127877,12 +129192,12 @@ module.exports = BetweenPoints; /***/ }), -/* 708 */ +/* 727 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127909,12 +129224,12 @@ module.exports = BetweenPointsY; /***/ }), -/* 709 */ +/* 728 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127943,12 +129258,12 @@ module.exports = BetweenY; /***/ }), -/* 710 */ +/* 729 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127988,16 +129303,16 @@ module.exports = CounterClockwise; /***/ }), -/* 711 */ +/* 730 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Normalize = __webpack_require__(301); +var Normalize = __webpack_require__(315); /** * Reverse the given angle. @@ -128018,12 +129333,12 @@ module.exports = Reverse; /***/ }), -/* 712 */ +/* 731 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128085,12 +129400,12 @@ module.exports = RotateTo; /***/ }), -/* 713 */ +/* 732 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128134,12 +129449,12 @@ module.exports = ShortestBetween; /***/ }), -/* 714 */ +/* 733 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128149,20 +129464,122 @@ module.exports = ShortestBetween; module.exports = { - Between: __webpack_require__(58), - Power: __webpack_require__(715), - Squared: __webpack_require__(302) + Between: __webpack_require__(53), + BetweenPoints: __webpack_require__(734), + BetweenPointsSquared: __webpack_require__(735), + Chebyshev: __webpack_require__(736), + Power: __webpack_require__(737), + Snake: __webpack_require__(738), + Squared: __webpack_require__(316) }; /***/ }), -/* 715 */ +/* 734 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the distance between two points. + * + * @function Phaser.Math.Distance.BetweenPoints + * @since 3.22.0 + * + * @param {Phaser.Types.Math.Vector2Like} a - The first point. + * @param {Phaser.Types.Math.Vector2Like} b - The second point. + * + * @return {number} The distance between the points. + */ +var DistanceBetweenPoints = function (a, b) +{ + var dx = a.x - b.x; + var dy = a.y - b.y; + + return Math.sqrt(dx * dx + dy * dy); +}; + +module.exports = DistanceBetweenPoints; + + +/***/ }), +/* 735 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the squared distance between two points. + * + * @function Phaser.Math.Distance.BetweenPointsSquared + * @since 3.22.0 + * + * @param {Phaser.Types.Math.Vector2Like} a - The first point. + * @param {Phaser.Types.Math.Vector2Like} b - The second point. + * + * @return {number} The squared distance between the points. + */ +var DistanceBetweenPointsSquared = function (a, b) +{ + var dx = a.x - b.x; + var dy = a.y - b.y; + + return dx * dx + dy * dy; +}; + +module.exports = DistanceBetweenPointsSquared; + + +/***/ }), +/* 736 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the Chebyshev distance between two sets of coordinates (points). + * + * Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances. + * It's the effective distance when movement can be horizontal, vertical, or diagonal. + * + * @function Phaser.Math.Distance.Chebyshev + * @since 3.22.0 + * + * @param {number} x1 - The x coordinate of the first point. + * @param {number} y1 - The y coordinate of the first point. + * @param {number} x2 - The x coordinate of the second point. + * @param {number} y2 - The y coordinate of the second point. + * + * @return {number} The distance between each point. + */ +var ChebyshevDistance = function (x1, y1, x2, y2) +{ + return Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2)); +}; + +module.exports = ChebyshevDistance; + + +/***/ }), +/* 737 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128191,12 +129608,46 @@ module.exports = DistancePower; /***/ }), -/* 716 */ +/* 738 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the snake distance between two sets of coordinates (points). + * + * Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances. + * It's the effective distance when movement is allowed only horizontally or vertically (but not both). + * + * @function Phaser.Math.Distance.Snake + * @since 3.22.0 + * + * @param {number} x1 - The x coordinate of the first point. + * @param {number} y1 - The y coordinate of the first point. + * @param {number} x2 - The x coordinate of the second point. + * @param {number} y2 - The y coordinate of the second point. + * + * @return {number} The distance between each point. + */ +var SnakeDistance = function (x1, y1, x2, y2) +{ + return Math.abs(x1 - x2) + Math.abs(y1 - y2); +}; + +module.exports = SnakeDistance; + + +/***/ }), +/* 739 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128206,29 +129657,29 @@ module.exports = DistancePower; module.exports = { - Back: __webpack_require__(285), - Bounce: __webpack_require__(286), - Circular: __webpack_require__(287), - Cubic: __webpack_require__(288), - Elastic: __webpack_require__(289), - Expo: __webpack_require__(290), - Linear: __webpack_require__(291), - Quadratic: __webpack_require__(292), - Quartic: __webpack_require__(293), - Quintic: __webpack_require__(294), - Sine: __webpack_require__(295), - Stepped: __webpack_require__(296) + Back: __webpack_require__(299), + Bounce: __webpack_require__(300), + Circular: __webpack_require__(301), + Cubic: __webpack_require__(302), + Elastic: __webpack_require__(303), + Expo: __webpack_require__(304), + Linear: __webpack_require__(305), + Quadratic: __webpack_require__(306), + Quartic: __webpack_require__(307), + Quintic: __webpack_require__(308), + Sine: __webpack_require__(309), + Stepped: __webpack_require__(310) }; /***/ }), -/* 717 */ +/* 740 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128238,22 +129689,22 @@ module.exports = { module.exports = { - Ceil: __webpack_require__(718), - Equal: __webpack_require__(167), - Floor: __webpack_require__(719), - GreaterThan: __webpack_require__(303), - LessThan: __webpack_require__(304) + Ceil: __webpack_require__(741), + Equal: __webpack_require__(144), + Floor: __webpack_require__(742), + GreaterThan: __webpack_require__(317), + LessThan: __webpack_require__(318) }; /***/ }), -/* 718 */ +/* 741 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128279,12 +129730,12 @@ module.exports = Ceil; /***/ }), -/* 719 */ +/* 742 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128310,12 +129761,12 @@ module.exports = Floor; /***/ }), -/* 720 */ +/* 743 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128325,28 +129776,28 @@ module.exports = Floor; module.exports = { - Bezier: __webpack_require__(721), - CatmullRom: __webpack_require__(722), - CubicBezier: __webpack_require__(307), - Linear: __webpack_require__(723), - QuadraticBezier: __webpack_require__(308), - SmoothStep: __webpack_require__(309), - SmootherStep: __webpack_require__(724) + Bezier: __webpack_require__(744), + CatmullRom: __webpack_require__(745), + CubicBezier: __webpack_require__(321), + Linear: __webpack_require__(746), + QuadraticBezier: __webpack_require__(322), + SmoothStep: __webpack_require__(323), + SmootherStep: __webpack_require__(747) }; /***/ }), -/* 721 */ +/* 744 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bernstein = __webpack_require__(305); +var Bernstein = __webpack_require__(319); /** * A bezier interpolation method. @@ -128376,16 +129827,16 @@ module.exports = BezierInterpolation; /***/ }), -/* 722 */ +/* 745 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CatmullRom = __webpack_require__(168); +var CatmullRom = __webpack_require__(169); /** * A Catmull-Rom interpolation method. @@ -128433,16 +129884,16 @@ module.exports = CatmullRomInterpolation; /***/ }), -/* 723 */ +/* 746 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Linear = __webpack_require__(113); +var Linear = __webpack_require__(115); /** * A linear interpolation method. @@ -128480,16 +129931,16 @@ module.exports = LinearInterpolation; /***/ }), -/* 724 */ +/* 747 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmootherStep = __webpack_require__(155); +var SmootherStep = __webpack_require__(157); /** * A Smoother Step interpolation method. @@ -128513,12 +129964,12 @@ module.exports = SmootherStepInterpolation; /***/ }), -/* 725 */ +/* 748 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128528,20 +129979,20 @@ module.exports = SmootherStepInterpolation; module.exports = { - GetNext: __webpack_require__(310), - IsSize: __webpack_require__(116), - IsValue: __webpack_require__(726) + GetNext: __webpack_require__(324), + IsSize: __webpack_require__(118), + IsValue: __webpack_require__(749) }; /***/ }), -/* 726 */ +/* 749 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128564,12 +130015,12 @@ module.exports = IsValuePowerOfTwo; /***/ }), -/* 727 */ +/* 750 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128579,20 +130030,20 @@ module.exports = IsValuePowerOfTwo; module.exports = { - Ceil: __webpack_require__(311), + Ceil: __webpack_require__(325), Floor: __webpack_require__(93), - To: __webpack_require__(728) + To: __webpack_require__(751) }; /***/ }), -/* 728 */ +/* 751 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128630,12 +130081,12 @@ module.exports = SnapTo; /***/ }), -/* 729 */ +/* 752 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128982,10 +130433,14 @@ var RandomDataGenerator = new Class({ * * @method Phaser.Math.RandomDataGenerator#pick * @since 3.0.0 + * + * @generic T + * @genericUse {T[]} - [array] + * @genericUse {T} - [$return] * - * @param {array} array - The array to pick a random element from. + * @param {T[]} array - The array to pick a random element from. * - * @return {*} A random member of the array. + * @return {T} A random member of the array. */ pick: function (array) { @@ -129011,9 +130466,13 @@ var RandomDataGenerator = new Class({ * @method Phaser.Math.RandomDataGenerator#weightedPick * @since 3.0.0 * - * @param {array} array - The array to pick a random element from. + * @generic T + * @genericUse {T[]} - [array] + * @genericUse {T} - [$return] * - * @return {*} A random member of the array. + * @param {T[]} array - The array to pick a random element from. + * + * @return {T} A random member of the array. */ weightedPick: function (array) { @@ -129103,9 +130562,12 @@ var RandomDataGenerator = new Class({ * @method Phaser.Math.RandomDataGenerator#shuffle * @since 3.7.0 * - * @param {array} [array] - The array to be shuffled. + * @generic T + * @genericUse {T[]} - [array,$return] * - * @return {array} The shuffled array. + * @param {T[]} [array] - The array to be shuffled. + * + * @return {T[]} The shuffled array. */ shuffle: function (array) { @@ -129129,12 +130591,12 @@ module.exports = RandomDataGenerator; /***/ }), -/* 730 */ +/* 753 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129164,12 +130626,12 @@ module.exports = Average; /***/ }), -/* 731 */ +/* 754 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129201,12 +130663,12 @@ module.exports = CeilTo; /***/ }), -/* 732 */ +/* 755 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129230,12 +130692,12 @@ module.exports = Difference; /***/ }), -/* 733 */ +/* 756 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129267,25 +130729,29 @@ module.exports = FloorTo; /***/ }), -/* 734 */ +/* 757 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * Calculate the speed required to cover a distance in the time given. + * Calculate a per-ms speed from a distance and time (given in seconds). * * @function Phaser.Math.GetSpeed * @since 3.0.0 * - * @param {number} distance - The distance to travel in pixels. - * @param {integer} time - The time, in ms, to cover the distance in. + * @param {number} distance - The distance. + * @param {integer} time - The time, in seconds. * - * @return {number} The amount you will need to increment the position by each step in order to cover the distance in the time given. + * @return {number} The speed, in distance per ms. + * + * @example + * // 400px over 1 second is 0.4 px/ms + * Phaser.Math.GetSpeed(400, 1) // -> 0.4 */ var GetSpeed = function (distance, time) { @@ -129296,12 +130762,12 @@ module.exports = GetSpeed; /***/ }), -/* 735 */ +/* 758 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129327,12 +130793,12 @@ module.exports = IsEven; /***/ }), -/* 736 */ +/* 759 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129356,12 +130822,12 @@ module.exports = IsEvenStrict; /***/ }), -/* 737 */ +/* 760 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129386,12 +130852,12 @@ module.exports = MaxAdd; /***/ }), -/* 738 */ +/* 761 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129416,12 +130882,12 @@ module.exports = MinSub; /***/ }), -/* 739 */ +/* 762 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129475,12 +130941,12 @@ module.exports = Percent; /***/ }), -/* 740 */ +/* 763 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129515,12 +130981,12 @@ module.exports = RandomXY; /***/ }), -/* 741 */ +/* 764 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129554,12 +131020,12 @@ module.exports = RandomXYZ; /***/ }), -/* 742 */ +/* 765 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129591,12 +131057,12 @@ module.exports = RandomXYZW; /***/ }), -/* 743 */ +/* 766 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129643,12 +131109,12 @@ module.exports = RoundTo; /***/ }), -/* 744 */ +/* 767 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129696,23 +131162,23 @@ module.exports = SinCosTableGenerator; /***/ }), -/* 745 */ +/* 768 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Vector2 = __webpack_require__(3); /** - * Returns a Vec2 containing the x and y position of the given index in a `width` x `height` sized grid. + * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid. * * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2. * - * If the given index is out of range an empty Vec2 is returned. + * If the given index is out of range an empty Vector2 is returned. * * @function Phaser.Math.ToXY * @since 3.19.0 @@ -129754,12 +131220,12 @@ module.exports = ToXY; /***/ }), -/* 746 */ +/* 769 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129784,18 +131250,18 @@ module.exports = Within; /***/ }), -/* 747 */ +/* 770 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector3 = __webpack_require__(171); -var Matrix4 = __webpack_require__(318); -var Quaternion = __webpack_require__(319); +var Vector3 = __webpack_require__(172); +var Matrix4 = __webpack_require__(332); +var Quaternion = __webpack_require__(333); var tmpMat4 = new Matrix4(); var tmpQuat = new Quaternion(); @@ -129832,12 +131298,12 @@ module.exports = RotateVec3; /***/ }), -/* 748 */ +/* 771 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129858,12 +131324,12 @@ module.exports = 'addtexture'; /***/ }), -/* 749 */ +/* 772 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129884,12 +131350,12 @@ module.exports = 'onerror'; /***/ }), -/* 750 */ +/* 773 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129913,12 +131379,12 @@ module.exports = 'onload'; /***/ }), -/* 751 */ +/* 774 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129936,12 +131402,12 @@ module.exports = 'ready'; /***/ }), -/* 752 */ +/* 775 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129964,7 +131430,7 @@ module.exports = 'removetexture'; /***/ }), -/* 753 */ +/* 776 */ /***/ (function(module, exports) { module.exports = [ @@ -130000,7 +131466,7 @@ module.exports = [ /***/ }), -/* 754 */ +/* 777 */ /***/ (function(module, exports) { module.exports = [ @@ -130019,7 +131485,7 @@ module.exports = [ /***/ }), -/* 755 */ +/* 778 */ /***/ (function(module, exports) { module.exports = [ @@ -130078,7 +131544,7 @@ module.exports = [ /***/ }), -/* 756 */ +/* 779 */ /***/ (function(module, exports) { module.exports = [ @@ -130122,7 +131588,7 @@ module.exports = [ /***/ }), -/* 757 */ +/* 780 */ /***/ (function(module, exports) { module.exports = [ @@ -130157,12 +131623,12 @@ module.exports = [ /***/ }), -/* 758 */ +/* 781 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130172,19 +131638,19 @@ module.exports = [ module.exports = { - GenerateTexture: __webpack_require__(326), - Palettes: __webpack_require__(759) + GenerateTexture: __webpack_require__(340), + Palettes: __webpack_require__(782) }; /***/ }), -/* 759 */ +/* 782 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130194,22 +131660,22 @@ module.exports = { module.exports = { - ARNE16: __webpack_require__(327), - C64: __webpack_require__(760), - CGA: __webpack_require__(761), - JMP: __webpack_require__(762), - MSX: __webpack_require__(763) + ARNE16: __webpack_require__(341), + C64: __webpack_require__(783), + CGA: __webpack_require__(784), + JMP: __webpack_require__(785), + MSX: __webpack_require__(786) }; /***/ }), -/* 760 */ +/* 783 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130242,12 +131708,12 @@ module.exports = { /***/ }), -/* 761 */ +/* 784 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130280,12 +131746,12 @@ module.exports = { /***/ }), -/* 762 */ +/* 785 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130318,12 +131784,12 @@ module.exports = { /***/ }), -/* 763 */ +/* 786 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130356,12 +131822,12 @@ module.exports = { /***/ }), -/* 764 */ +/* 787 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130370,38 +131836,38 @@ module.exports = { */ module.exports = { - Path: __webpack_require__(765), + Path: __webpack_require__(788), - CubicBezier: __webpack_require__(328), + CubicBezier: __webpack_require__(342), Curve: __webpack_require__(80), - Ellipse: __webpack_require__(329), - Line: __webpack_require__(330), - QuadraticBezier: __webpack_require__(331), - Spline: __webpack_require__(332) + Ellipse: __webpack_require__(343), + Line: __webpack_require__(344), + QuadraticBezier: __webpack_require__(345), + Spline: __webpack_require__(346) }; /***/ }), -/* 765 */ +/* 788 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) var Class = __webpack_require__(0); -var CubicBezierCurve = __webpack_require__(328); -var EllipseCurve = __webpack_require__(329); +var CubicBezierCurve = __webpack_require__(342); +var EllipseCurve = __webpack_require__(343); var GameObjectFactory = __webpack_require__(5); -var LineCurve = __webpack_require__(330); -var MovePathTo = __webpack_require__(766); -var QuadraticBezierCurve = __webpack_require__(331); +var LineCurve = __webpack_require__(344); +var MovePathTo = __webpack_require__(789); +var QuadraticBezierCurve = __webpack_require__(345); var Rectangle = __webpack_require__(11); -var SplineCurve = __webpack_require__(332); +var SplineCurve = __webpack_require__(346); var Vector2 = __webpack_require__(3); var MATH_CONST = __webpack_require__(13); @@ -130585,12 +132051,12 @@ var Path = new Class({ * @method Phaser.Curves.Path#cubicBezierTo * @since 3.0.0 * - * @param {(number|Phaser.Math.Vector2)} x - The x coordinate of the end point. Or, if a Vec2, the p1 value. - * @param {(number|Phaser.Math.Vector2)} y - The y coordinate of the end point. Or, if a Vec2, the p2 value. - * @param {(number|Phaser.Math.Vector2)} control1X - The x coordinate of the first control point. Or, if a Vec2, the p3 value. - * @param {number} [control1Y] - The y coordinate of the first control point. Not used if vec2s are provided as the first 3 arguments. - * @param {number} [control2X] - The x coordinate of the second control point. Not used if vec2s are provided as the first 3 arguments. - * @param {number} [control2Y] - The y coordinate of the second control point. Not used if vec2s are provided as the first 3 arguments. + * @param {(number|Phaser.Math.Vector2)} x - The x coordinate of the end point. Or, if a Vector2, the p1 value. + * @param {(number|Phaser.Math.Vector2)} y - The y coordinate of the end point. Or, if a Vector2, the p2 value. + * @param {(number|Phaser.Math.Vector2)} control1X - The x coordinate of the first control point. Or, if a Vector2, the p3 value. + * @param {number} [control1Y] - The y coordinate of the first control point. Not used if Vector2s are provided as the first 3 arguments. + * @param {number} [control2X] - The x coordinate of the second control point. Not used if Vector2s are provided as the first 3 arguments. + * @param {number} [control2Y] - The y coordinate of the second control point. Not used if Vector2s are provided as the first 3 arguments. * * @return {Phaser.Curves.Path} This Path object. */ @@ -130601,7 +132067,7 @@ var Path = new Class({ var p2; var p3; - // Assume they're all vec2s + // Assume they're all Vector2s if (x instanceof Vector2) { p1 = x; @@ -130639,7 +132105,7 @@ var Path = new Class({ var p1; var p2; - // Assume they're all vec2s + // Assume they're all Vector2s if (x instanceof Vector2) { p1 = x; @@ -130956,14 +132422,12 @@ var Path = new Class({ }, /** - * Returns the defined starting point of the Path. - * - * This is not necessarily equal to the starting point of the first Curve if it differs from {@link startPoint}. + * Get a sequence of points on the path. * * @method Phaser.Curves.Path#getPoints * @since 3.0.0 * - * @param {integer} [divisions=12] - The number of points to divide the path in to. + * @param {integer} [divisions=12] - The number of divisions per resolution per curve. * * @return {Phaser.Math.Vector2[]} An array of Vector2 objects that containing the points along the Path. */ @@ -131013,7 +132477,7 @@ var Path = new Class({ /** * Returns a randomly chosen point anywhere on the path. This follows the same rules as `getPoint` in that it may return a point on any Curve inside this path. - * + * * When calling this method multiple times, the points are not guaranteed to be equally spaced spatially. * * @method Phaser.Curves.Path#getRandomPoint @@ -131034,7 +132498,7 @@ var Path = new Class({ /** * Divides this Path into a set of equally spaced points, - * + * * The resulting points are equally spaced with respect to the points' position on the path, but not necessarily equally spaced spatially. * * @method Phaser.Curves.Path#getSpacedPoints @@ -131128,7 +132592,7 @@ var Path = new Class({ /** * Creates a "gap" in this path from the path's current end point to the given coordinates. - * + * * After calling this function, this Path's end point will be equal to the given coordinates * * @method Phaser.Curves.Path#moveTo @@ -131233,12 +132697,12 @@ module.exports = Path; /***/ }), -/* 766 */ +/* 789 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131373,12 +132837,12 @@ module.exports = MoveTo; /***/ }), -/* 767 */ +/* 790 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131388,27 +132852,27 @@ module.exports = MoveTo; module.exports = { - DataManager: __webpack_require__(111), - DataManagerPlugin: __webpack_require__(768), - Events: __webpack_require__(267) + DataManager: __webpack_require__(113), + DataManagerPlugin: __webpack_require__(791), + Events: __webpack_require__(281) }; /***/ }), -/* 768 */ +/* 791 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var DataManager = __webpack_require__(111); -var PluginCache = __webpack_require__(21); -var SceneEvents = __webpack_require__(22); +var DataManager = __webpack_require__(113); +var PluginCache = __webpack_require__(23); +var SceneEvents = __webpack_require__(19); /** * @classdesc @@ -131523,12 +132987,12 @@ module.exports = DataManagerPlugin; /***/ }), -/* 769 */ +/* 792 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131538,27 +133002,27 @@ module.exports = DataManagerPlugin; module.exports = { - Align: __webpack_require__(770), - BaseShader: __webpack_require__(333), - Bounds: __webpack_require__(785), - Canvas: __webpack_require__(788), - Color: __webpack_require__(334), - Masks: __webpack_require__(797) + Align: __webpack_require__(793), + BaseShader: __webpack_require__(347), + Bounds: __webpack_require__(796), + Canvas: __webpack_require__(799), + Color: __webpack_require__(348), + Masks: __webpack_require__(808) }; /***/ }), -/* 770 */ +/* 793 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(143); +var CONST = __webpack_require__(106); var Extend = __webpack_require__(17); /** @@ -131567,8 +133031,8 @@ var Extend = __webpack_require__(17); var Align = { - In: __webpack_require__(771), - To: __webpack_require__(772) + In: __webpack_require__(794), + To: __webpack_require__(795) }; @@ -131579,12 +133043,12 @@ module.exports = Align; /***/ }), -/* 771 */ +/* 794 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131594,27 +133058,27 @@ module.exports = Align; module.exports = { - BottomCenter: __webpack_require__(239), - BottomLeft: __webpack_require__(240), - BottomRight: __webpack_require__(241), - Center: __webpack_require__(242), - LeftCenter: __webpack_require__(244), - QuickSet: __webpack_require__(238), - RightCenter: __webpack_require__(245), - TopCenter: __webpack_require__(246), - TopLeft: __webpack_require__(247), - TopRight: __webpack_require__(248) + BottomCenter: __webpack_require__(253), + BottomLeft: __webpack_require__(254), + BottomRight: __webpack_require__(255), + Center: __webpack_require__(256), + LeftCenter: __webpack_require__(258), + QuickSet: __webpack_require__(252), + RightCenter: __webpack_require__(259), + TopCenter: __webpack_require__(260), + TopLeft: __webpack_require__(261), + TopRight: __webpack_require__(262) }; /***/ }), -/* 772 */ +/* 795 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131624,557 +133088,30 @@ module.exports = { module.exports = { - BottomCenter: __webpack_require__(773), - BottomLeft: __webpack_require__(774), - BottomRight: __webpack_require__(775), - LeftBottom: __webpack_require__(776), - LeftCenter: __webpack_require__(777), - LeftTop: __webpack_require__(778), - RightBottom: __webpack_require__(779), - RightCenter: __webpack_require__(780), - RightTop: __webpack_require__(781), - TopCenter: __webpack_require__(782), - TopLeft: __webpack_require__(783), - TopRight: __webpack_require__(784) + BottomCenter: __webpack_require__(240), + BottomLeft: __webpack_require__(241), + BottomRight: __webpack_require__(242), + LeftBottom: __webpack_require__(243), + LeftCenter: __webpack_require__(244), + LeftTop: __webpack_require__(245), + QuickSet: __webpack_require__(239), + RightBottom: __webpack_require__(246), + RightCenter: __webpack_require__(247), + RightTop: __webpack_require__(248), + TopCenter: __webpack_require__(249), + TopLeft: __webpack_require__(250), + TopRight: __webpack_require__(251) }; /***/ }), -/* 773 */ +/* 796 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetBottom = __webpack_require__(38); -var GetCenterX = __webpack_require__(75); -var SetCenterX = __webpack_require__(76); -var SetTop = __webpack_require__(45); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the bottom center position of the other. - * - * @function Phaser.Display.Align.To.BottomCenter - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var BottomCenter = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetCenterX(gameObject, GetCenterX(alignTo) + offsetX); - SetTop(gameObject, GetBottom(alignTo) + offsetY); - - return gameObject; -}; - -module.exports = BottomCenter; - - -/***/ }), -/* 774 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetBottom = __webpack_require__(38); -var GetLeft = __webpack_require__(40); -var SetLeft = __webpack_require__(41); -var SetTop = __webpack_require__(45); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the bottom left position of the other. - * - * @function Phaser.Display.Align.To.BottomLeft - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var BottomLeft = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetLeft(gameObject, GetLeft(alignTo) - offsetX); - SetTop(gameObject, GetBottom(alignTo) + offsetY); - - return gameObject; -}; - -module.exports = BottomLeft; - - -/***/ }), -/* 775 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetBottom = __webpack_require__(38); -var GetRight = __webpack_require__(42); -var SetRight = __webpack_require__(43); -var SetTop = __webpack_require__(45); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the bottom right position of the other. - * - * @function Phaser.Display.Align.To.BottomRight - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var BottomRight = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetRight(gameObject, GetRight(alignTo) + offsetX); - SetTop(gameObject, GetBottom(alignTo) + offsetY); - - return gameObject; -}; - -module.exports = BottomRight; - - -/***/ }), -/* 776 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetBottom = __webpack_require__(38); -var GetLeft = __webpack_require__(40); -var SetBottom = __webpack_require__(39); -var SetRight = __webpack_require__(43); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the left bottom position of the other. - * - * @function Phaser.Display.Align.To.LeftBottom - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var LeftBottom = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetRight(gameObject, GetLeft(alignTo) - offsetX); - SetBottom(gameObject, GetBottom(alignTo) + offsetY); - - return gameObject; -}; - -module.exports = LeftBottom; - - -/***/ }), -/* 777 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetCenterY = __webpack_require__(78); -var GetLeft = __webpack_require__(40); -var SetCenterY = __webpack_require__(77); -var SetRight = __webpack_require__(43); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the left center position of the other. - * - * @function Phaser.Display.Align.To.LeftCenter - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var LeftCenter = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetRight(gameObject, GetLeft(alignTo) - offsetX); - SetCenterY(gameObject, GetCenterY(alignTo) + offsetY); - - return gameObject; -}; - -module.exports = LeftCenter; - - -/***/ }), -/* 778 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetLeft = __webpack_require__(40); -var GetTop = __webpack_require__(44); -var SetRight = __webpack_require__(43); -var SetTop = __webpack_require__(45); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the left top position of the other. - * - * @function Phaser.Display.Align.To.LeftTop - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var LeftTop = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetRight(gameObject, GetLeft(alignTo) - offsetX); - SetTop(gameObject, GetTop(alignTo) - offsetY); - - return gameObject; -}; - -module.exports = LeftTop; - - -/***/ }), -/* 779 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetBottom = __webpack_require__(38); -var GetRight = __webpack_require__(42); -var SetBottom = __webpack_require__(39); -var SetLeft = __webpack_require__(41); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the right bottom position of the other. - * - * @function Phaser.Display.Align.To.RightBottom - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var RightBottom = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetLeft(gameObject, GetRight(alignTo) + offsetX); - SetBottom(gameObject, GetBottom(alignTo) + offsetY); - - return gameObject; -}; - -module.exports = RightBottom; - - -/***/ }), -/* 780 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetCenterY = __webpack_require__(78); -var GetRight = __webpack_require__(42); -var SetCenterY = __webpack_require__(77); -var SetLeft = __webpack_require__(41); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the right center position of the other. - * - * @function Phaser.Display.Align.To.RightCenter - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var RightCenter = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetLeft(gameObject, GetRight(alignTo) + offsetX); - SetCenterY(gameObject, GetCenterY(alignTo) + offsetY); - - return gameObject; -}; - -module.exports = RightCenter; - - -/***/ }), -/* 781 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetRight = __webpack_require__(42); -var GetTop = __webpack_require__(44); -var SetLeft = __webpack_require__(41); -var SetTop = __webpack_require__(45); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the right top position of the other. - * - * @function Phaser.Display.Align.To.RightTop - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var RightTop = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetLeft(gameObject, GetRight(alignTo) + offsetX); - SetTop(gameObject, GetTop(alignTo) - offsetY); - - return gameObject; -}; - -module.exports = RightTop; - - -/***/ }), -/* 782 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetCenterX = __webpack_require__(75); -var GetTop = __webpack_require__(44); -var SetBottom = __webpack_require__(39); -var SetCenterX = __webpack_require__(76); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the top center position of the other. - * - * @function Phaser.Display.Align.To.TopCenter - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var TopCenter = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetCenterX(gameObject, GetCenterX(alignTo) + offsetX); - SetBottom(gameObject, GetTop(alignTo) - offsetY); - - return gameObject; -}; - -module.exports = TopCenter; - - -/***/ }), -/* 783 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetLeft = __webpack_require__(40); -var GetTop = __webpack_require__(44); -var SetBottom = __webpack_require__(39); -var SetLeft = __webpack_require__(41); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the top left position of the other. - * - * @function Phaser.Display.Align.To.TopLeft - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var TopLeft = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetLeft(gameObject, GetLeft(alignTo) - offsetX); - SetBottom(gameObject, GetTop(alignTo) - offsetY); - - return gameObject; -}; - -module.exports = TopLeft; - - -/***/ }), -/* 784 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetRight = __webpack_require__(42); -var GetTop = __webpack_require__(44); -var SetBottom = __webpack_require__(39); -var SetRight = __webpack_require__(43); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the top right position of the other. - * - * @function Phaser.Display.Align.To.TopRight - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var TopRight = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetRight(gameObject, GetRight(alignTo) + offsetX); - SetBottom(gameObject, GetTop(alignTo) - offsetY); - - return gameObject; -}; - -module.exports = TopRight; - - -/***/ }), -/* 785 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132184,32 +133121,32 @@ module.exports = TopRight; module.exports = { - CenterOn: __webpack_require__(243), + CenterOn: __webpack_require__(257), GetBottom: __webpack_require__(38), GetCenterX: __webpack_require__(75), - GetCenterY: __webpack_require__(78), + GetCenterY: __webpack_require__(77), GetLeft: __webpack_require__(40), - GetOffsetX: __webpack_require__(786), - GetOffsetY: __webpack_require__(787), + GetOffsetX: __webpack_require__(797), + GetOffsetY: __webpack_require__(798), GetRight: __webpack_require__(42), - GetTop: __webpack_require__(44), - SetBottom: __webpack_require__(39), + GetTop: __webpack_require__(45), + SetBottom: __webpack_require__(44), SetCenterX: __webpack_require__(76), - SetCenterY: __webpack_require__(77), + SetCenterY: __webpack_require__(78), SetLeft: __webpack_require__(41), SetRight: __webpack_require__(43), - SetTop: __webpack_require__(45) + SetTop: __webpack_require__(39) }; /***/ }), -/* 786 */ +/* 797 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132234,12 +133171,12 @@ module.exports = GetOffsetX; /***/ }), -/* 787 */ +/* 798 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132264,12 +133201,12 @@ module.exports = GetOffsetY; /***/ }), -/* 788 */ +/* 799 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132279,22 +133216,22 @@ module.exports = GetOffsetY; module.exports = { - CanvasInterpolation: __webpack_require__(321), + CanvasInterpolation: __webpack_require__(335), CanvasPool: __webpack_require__(26), - Smoothing: __webpack_require__(162), - TouchAction: __webpack_require__(789), - UserSelect: __webpack_require__(790) + Smoothing: __webpack_require__(164), + TouchAction: __webpack_require__(800), + UserSelect: __webpack_require__(801) }; /***/ }), -/* 789 */ +/* 800 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132324,12 +133261,12 @@ module.exports = TouchAction; /***/ }), -/* 790 */ +/* 801 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132371,12 +133308,12 @@ module.exports = UserSelect; /***/ }), -/* 791 */ +/* 802 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132411,17 +133348,17 @@ module.exports = ColorToRGBA; /***/ }), -/* 792 */ +/* 803 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Color = __webpack_require__(33); -var HueToComponent = __webpack_require__(336); +var HueToComponent = __webpack_require__(350); /** * Converts HSL (hue, saturation and lightness) values to a Phaser Color object. @@ -132461,16 +133398,16 @@ module.exports = HSLToColor; /***/ }), -/* 793 */ +/* 804 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HSVToRGB = __webpack_require__(161); +var HSVToRGB = __webpack_require__(163); /** * Get HSV color wheel values in an array which will be 360 elements in size. @@ -132502,16 +133439,16 @@ module.exports = HSVColorWheel; /***/ }), -/* 794 */ +/* 805 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Linear = __webpack_require__(113); +var Linear = __webpack_require__(115); /** * @namespace Phaser.Display.Color.Interpolate @@ -132610,16 +133547,16 @@ module.exports = { /***/ }), -/* 795 */ +/* 806 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Between = __webpack_require__(169); +var Between = __webpack_require__(170); var Color = __webpack_require__(33); /** @@ -132646,16 +133583,16 @@ module.exports = RandomRGB; /***/ }), -/* 796 */ +/* 807 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ComponentToHex = __webpack_require__(335); +var ComponentToHex = __webpack_require__(349); /** * Converts the color values into an HTML compatible color string, prefixed with either `#` or `0x`. @@ -132690,12 +133627,12 @@ module.exports = RGBToString; /***/ }), -/* 797 */ +/* 808 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132705,19 +133642,19 @@ module.exports = RGBToString; module.exports = { - BitmapMask: __webpack_require__(261), - GeometryMask: __webpack_require__(262) + BitmapMask: __webpack_require__(275), + GeometryMask: __webpack_require__(276) }; /***/ }), -/* 798 */ +/* 809 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132727,13 +133664,13 @@ module.exports = { var Dom = { - AddToDOM: __webpack_require__(118), - DOMContentLoaded: __webpack_require__(337), - GetScreenOrientation: __webpack_require__(338), - GetTarget: __webpack_require__(343), - ParseXML: __webpack_require__(344), - RemoveFromDOM: __webpack_require__(175), - RequestAnimationFrame: __webpack_require__(324) + AddToDOM: __webpack_require__(120), + DOMContentLoaded: __webpack_require__(351), + GetScreenOrientation: __webpack_require__(352), + GetTarget: __webpack_require__(357), + ParseXML: __webpack_require__(358), + RemoveFromDOM: __webpack_require__(176), + RequestAnimationFrame: __webpack_require__(338) }; @@ -132741,12 +133678,12 @@ module.exports = Dom; /***/ }), -/* 799 */ +/* 810 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132754,22 +133691,22 @@ module.exports = Dom; * @namespace Phaser.Events */ -module.exports = { EventEmitter: __webpack_require__(800) }; +module.exports = { EventEmitter: __webpack_require__(811) }; /***/ }), -/* 800 */ +/* 811 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var EE = __webpack_require__(9); -var PluginCache = __webpack_require__(21); +var PluginCache = __webpack_require__(23); /** * @classdesc @@ -132821,7 +133758,7 @@ var EventEmitter = new Class({ * @method Phaser.Events.EventEmitter#eventNames * @since 3.0.0 * - * @return {array} + * @return {Array.} */ /** @@ -132832,7 +133769,7 @@ var EventEmitter = new Class({ * * @param {(string|symbol)} event - The event name. * - * @return {array} The registered listeners. + * @return {Function[]} The registered listeners. */ /** @@ -132868,7 +133805,7 @@ var EventEmitter = new Class({ * @param {function} fn - The listener function. * @param {*} [context=this] - The context to invoke the listener with. * - * @return {Phaser.Events.EventEmitter} `this`. + * @return {this} `this`. */ /** @@ -132881,7 +133818,7 @@ var EventEmitter = new Class({ * @param {function} fn - The listener function. * @param {*} [context=this] - The context to invoke the listener with. * - * @return {Phaser.Events.EventEmitter} `this`. + * @return {this} `this`. */ /** @@ -132894,7 +133831,7 @@ var EventEmitter = new Class({ * @param {function} fn - The listener function. * @param {*} [context=this] - The context to invoke the listener with. * - * @return {Phaser.Events.EventEmitter} `this`. + * @return {this} `this`. */ /** @@ -132908,7 +133845,7 @@ var EventEmitter = new Class({ * @param {*} [context] - Only remove the listeners that have this context. * @param {boolean} [once] - Only remove one-time listeners. * - * @return {Phaser.Events.EventEmitter} `this`. + * @return {this} `this`. */ /** @@ -132922,7 +133859,7 @@ var EventEmitter = new Class({ * @param {*} [context] - Only remove the listeners that have this context. * @param {boolean} [once] - Only remove one-time listeners. * - * @return {Phaser.Events.EventEmitter} `this`. + * @return {this} `this`. */ /** @@ -132933,7 +133870,7 @@ var EventEmitter = new Class({ * * @param {(string|symbol)} [event] - The event name. * - * @return {Phaser.Events.EventEmitter} `this`. + * @return {this} `this`. */ PluginCache.register('EventEmitter', EventEmitter, 'events'); @@ -132942,42 +133879,42 @@ module.exports = EventEmitter; /***/ }), -/* 801 */ +/* 812 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(118); -var AnimationManager = __webpack_require__(272); -var CacheManager = __webpack_require__(275); +var AddToDOM = __webpack_require__(120); +var AnimationManager = __webpack_require__(286); +var CacheManager = __webpack_require__(289); var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); -var Config = __webpack_require__(297); -var CreateDOMContainer = __webpack_require__(802); -var CreateRenderer = __webpack_require__(320); -var DataManager = __webpack_require__(111); -var DebugHeader = __webpack_require__(322); -var Device = __webpack_require__(298); -var DOMContentLoaded = __webpack_require__(337); +var Config = __webpack_require__(311); +var CreateDOMContainer = __webpack_require__(813); +var CreateRenderer = __webpack_require__(334); +var DataManager = __webpack_require__(113); +var DebugHeader = __webpack_require__(336); +var Device = __webpack_require__(312); +var DOMContentLoaded = __webpack_require__(351); var EventEmitter = __webpack_require__(9); var Events = __webpack_require__(18); -var InputManager = __webpack_require__(345); -var PluginCache = __webpack_require__(21); -var PluginManager = __webpack_require__(350); -var ScaleManager = __webpack_require__(351); -var SceneManager = __webpack_require__(353); -var TextureEvents = __webpack_require__(117); -var TextureManager = __webpack_require__(356); -var TimeStep = __webpack_require__(323); -var VisibilityHandler = __webpack_require__(325); +var InputManager = __webpack_require__(359); +var PluginCache = __webpack_require__(23); +var PluginManager = __webpack_require__(364); +var ScaleManager = __webpack_require__(365); +var SceneManager = __webpack_require__(367); +var TextureEvents = __webpack_require__(119); +var TextureManager = __webpack_require__(370); +var TimeStep = __webpack_require__(337); +var VisibilityHandler = __webpack_require__(339); if (true) { - var SoundManagerCreator = __webpack_require__(360); + var SoundManagerCreator = __webpack_require__(374); } if (false) @@ -133604,12 +134541,12 @@ var Game = new Class({ */ runDestroy: function () { + this.scene.destroy(); + this.events.emit(Events.DESTROY); this.events.removeAllListeners(); - this.scene.destroy(); - if (this.renderer) { this.renderer.destroy(); @@ -133645,16 +134582,16 @@ module.exports = Game; /***/ }), -/* 802 */ +/* 813 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(118); +var AddToDOM = __webpack_require__(120); var CreateDOMContainer = function (game) { @@ -133689,12 +134626,12 @@ module.exports = CreateDOMContainer; /***/ }), -/* 803 */ +/* 814 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133710,12 +134647,12 @@ module.exports = 'boot'; /***/ }), -/* 804 */ +/* 815 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133731,12 +134668,12 @@ module.exports = 'destroy'; /***/ }), -/* 805 */ +/* 816 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133759,12 +134696,12 @@ module.exports = 'dragend'; /***/ }), -/* 806 */ +/* 817 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133790,12 +134727,12 @@ module.exports = 'dragenter'; /***/ }), -/* 807 */ +/* 818 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133822,12 +134759,12 @@ module.exports = 'drag'; /***/ }), -/* 808 */ +/* 819 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133853,12 +134790,12 @@ module.exports = 'dragleave'; /***/ }), -/* 809 */ +/* 820 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133887,12 +134824,12 @@ module.exports = 'dragover'; /***/ }), -/* 810 */ +/* 821 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133917,12 +134854,12 @@ module.exports = 'dragstart'; /***/ }), -/* 811 */ +/* 822 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133946,12 +134883,12 @@ module.exports = 'drop'; /***/ }), -/* 812 */ +/* 823 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133973,12 +134910,12 @@ module.exports = 'gameout'; /***/ }), -/* 813 */ +/* 824 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134000,12 +134937,12 @@ module.exports = 'gameover'; /***/ }), -/* 814 */ +/* 825 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134041,12 +134978,12 @@ module.exports = 'gameobjectdown'; /***/ }), -/* 815 */ +/* 826 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134072,12 +135009,12 @@ module.exports = 'dragend'; /***/ }), -/* 816 */ +/* 827 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134102,12 +135039,12 @@ module.exports = 'dragenter'; /***/ }), -/* 817 */ +/* 828 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134133,12 +135070,12 @@ module.exports = 'drag'; /***/ }), -/* 818 */ +/* 829 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134163,12 +135100,12 @@ module.exports = 'dragleave'; /***/ }), -/* 819 */ +/* 830 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134196,12 +135133,12 @@ module.exports = 'dragover'; /***/ }), -/* 820 */ +/* 831 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134230,12 +135167,12 @@ module.exports = 'dragstart'; /***/ }), -/* 821 */ +/* 832 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134260,12 +135197,12 @@ module.exports = 'drop'; /***/ }), -/* 822 */ +/* 833 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134301,12 +135238,12 @@ module.exports = 'gameobjectmove'; /***/ }), -/* 823 */ +/* 834 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134342,12 +135279,12 @@ module.exports = 'gameobjectout'; /***/ }), -/* 824 */ +/* 835 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134383,12 +135320,12 @@ module.exports = 'gameobjectover'; /***/ }), -/* 825 */ +/* 836 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134424,12 +135361,12 @@ module.exports = 'pointerdown'; /***/ }), -/* 826 */ +/* 837 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134465,12 +135402,12 @@ module.exports = 'pointermove'; /***/ }), -/* 827 */ +/* 838 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134504,12 +135441,12 @@ module.exports = 'pointerout'; /***/ }), -/* 828 */ +/* 839 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134545,12 +135482,12 @@ module.exports = 'pointerover'; /***/ }), -/* 829 */ +/* 840 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134586,12 +135523,12 @@ module.exports = 'pointerup'; /***/ }), -/* 830 */ +/* 841 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134628,12 +135565,12 @@ module.exports = 'wheel'; /***/ }), -/* 831 */ +/* 842 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134669,12 +135606,12 @@ module.exports = 'gameobjectup'; /***/ }), -/* 832 */ +/* 843 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134713,12 +135650,12 @@ module.exports = 'gameobjectwheel'; /***/ }), -/* 833 */ +/* 844 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134734,12 +135671,12 @@ module.exports = 'boot'; /***/ }), -/* 834 */ +/* 845 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134759,12 +135696,12 @@ module.exports = 'process'; /***/ }), -/* 835 */ +/* 846 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134780,12 +135717,12 @@ module.exports = 'update'; /***/ }), -/* 836 */ +/* 847 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134815,12 +135752,12 @@ module.exports = 'pointerdown'; /***/ }), -/* 837 */ +/* 848 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134849,12 +135786,12 @@ module.exports = 'pointerdownoutside'; /***/ }), -/* 838 */ +/* 849 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134884,12 +135821,12 @@ module.exports = 'pointermove'; /***/ }), -/* 839 */ +/* 850 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134898,7 +135835,7 @@ module.exports = 'pointermove'; * * This event is dispatched by the Input Plugin belonging to a Scene if a pointer moves out of any interactive Game Object. * - * Listen to this event from within a Scene using: `this.input.on('pointerup', listener)`. + * Listen to this event from within a Scene using: `this.input.on('pointerout', listener)`. * * The event hierarchy is as follows: * @@ -134919,12 +135856,12 @@ module.exports = 'pointerout'; /***/ }), -/* 840 */ +/* 851 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134954,12 +135891,12 @@ module.exports = 'pointerover'; /***/ }), -/* 841 */ +/* 852 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134989,12 +135926,12 @@ module.exports = 'pointerup'; /***/ }), -/* 842 */ +/* 853 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135023,12 +135960,12 @@ module.exports = 'pointerupoutside'; /***/ }), -/* 843 */ +/* 854 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135061,12 +135998,12 @@ module.exports = 'wheel'; /***/ }), -/* 844 */ +/* 855 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135085,12 +136022,12 @@ module.exports = 'pointerlockchange'; /***/ }), -/* 845 */ +/* 856 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135107,12 +136044,12 @@ module.exports = 'preupdate'; /***/ }), -/* 846 */ +/* 857 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135128,12 +136065,12 @@ module.exports = 'shutdown'; /***/ }), -/* 847 */ +/* 858 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135150,12 +136087,12 @@ module.exports = 'start'; /***/ }), -/* 848 */ +/* 859 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135175,12 +136112,12 @@ module.exports = 'update'; /***/ }), -/* 849 */ +/* 860 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135234,12 +136171,12 @@ module.exports = GetInnerHeight; /***/ }), -/* 850 */ +/* 861 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135264,12 +136201,12 @@ module.exports = 'addfile'; /***/ }), -/* 851 */ +/* 862 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135292,12 +136229,12 @@ module.exports = 'complete'; /***/ }), -/* 852 */ +/* 863 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135321,12 +136258,12 @@ module.exports = 'filecomplete'; /***/ }), -/* 853 */ +/* 864 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135375,12 +136312,12 @@ module.exports = 'filecomplete-'; /***/ }), -/* 854 */ +/* 865 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135400,12 +136337,12 @@ module.exports = 'loaderror'; /***/ }), -/* 855 */ +/* 866 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135426,12 +136363,12 @@ module.exports = 'load'; /***/ }), -/* 856 */ +/* 867 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135453,12 +136390,12 @@ module.exports = 'fileprogress'; /***/ }), -/* 857 */ +/* 868 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135482,12 +136419,12 @@ module.exports = 'postprocess'; /***/ }), -/* 858 */ +/* 869 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135507,12 +136444,12 @@ module.exports = 'progress'; /***/ }), -/* 859 */ +/* 870 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135534,17 +136471,17 @@ module.exports = 'start'; /***/ }), -/* 860 */ +/* 871 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetFastValue = __webpack_require__(2); -var UppercaseFirst = __webpack_require__(178); +var UppercaseFirst = __webpack_require__(179); /** * Builds an array of which physics plugins should be activated for the given Scene. @@ -135596,12 +136533,12 @@ module.exports = GetPhysicsPlugins; /***/ }), -/* 861 */ +/* 872 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135643,12 +136580,12 @@ module.exports = GetScenePlugins; /***/ }), -/* 862 */ +/* 873 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135704,12 +136641,12 @@ module.exports = InjectionMap; /***/ }), -/* 863 */ +/* 874 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135785,12 +136722,12 @@ module.exports = AtlasXML; /***/ }), -/* 864 */ +/* 875 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135820,12 +136757,12 @@ module.exports = Canvas; /***/ }), -/* 865 */ +/* 876 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135855,12 +136792,12 @@ module.exports = Image; /***/ }), -/* 866 */ +/* 877 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135962,12 +136899,12 @@ module.exports = JSONArray; /***/ }), -/* 867 */ +/* 878 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136061,12 +136998,12 @@ module.exports = JSONHash; /***/ }), -/* 868 */ +/* 879 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136186,12 +137123,12 @@ module.exports = SpriteSheet; /***/ }), -/* 869 */ +/* 880 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136377,12 +137314,12 @@ module.exports = SpriteSheetFromAtlas; /***/ }), -/* 870 */ +/* 881 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136547,12 +137484,12 @@ TextureImporter: /***/ }), -/* 871 */ +/* 882 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136578,12 +137515,12 @@ module.exports = 'complete'; /***/ }), -/* 872 */ +/* 883 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136608,12 +137545,12 @@ module.exports = 'decoded'; /***/ }), -/* 873 */ +/* 884 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136640,12 +137577,12 @@ module.exports = 'decodedall'; /***/ }), -/* 874 */ +/* 885 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136672,12 +137609,12 @@ module.exports = 'destroy'; /***/ }), -/* 875 */ +/* 886 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136705,12 +137642,12 @@ module.exports = 'detune'; /***/ }), -/* 876 */ +/* 887 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136733,12 +137670,12 @@ module.exports = 'detune'; /***/ }), -/* 877 */ +/* 888 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136760,12 +137697,12 @@ module.exports = 'mute'; /***/ }), -/* 878 */ +/* 889 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136788,12 +137725,12 @@ module.exports = 'rate'; /***/ }), -/* 879 */ +/* 890 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136815,12 +137752,12 @@ module.exports = 'volume'; /***/ }), -/* 880 */ +/* 891 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136849,12 +137786,12 @@ module.exports = 'loop'; /***/ }), -/* 881 */ +/* 892 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136883,12 +137820,12 @@ module.exports = 'looped'; /***/ }), -/* 882 */ +/* 893 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136916,12 +137853,12 @@ module.exports = 'mute'; /***/ }), -/* 883 */ +/* 894 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136943,12 +137880,12 @@ module.exports = 'pauseall'; /***/ }), -/* 884 */ +/* 895 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136975,12 +137912,12 @@ module.exports = 'pause'; /***/ }), -/* 885 */ +/* 896 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137006,12 +137943,12 @@ module.exports = 'play'; /***/ }), -/* 886 */ +/* 897 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137039,12 +137976,12 @@ module.exports = 'rate'; /***/ }), -/* 887 */ +/* 898 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137066,12 +138003,12 @@ module.exports = 'resumeall'; /***/ }), -/* 888 */ +/* 899 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137099,12 +138036,12 @@ module.exports = 'resume'; /***/ }), -/* 889 */ +/* 900 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137132,12 +138069,12 @@ module.exports = 'seek'; /***/ }), -/* 890 */ +/* 901 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137159,12 +138096,12 @@ module.exports = 'stopall'; /***/ }), -/* 891 */ +/* 902 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137191,12 +138128,12 @@ module.exports = 'stop'; /***/ }), -/* 892 */ +/* 903 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137218,12 +138155,12 @@ module.exports = 'unlocked'; /***/ }), -/* 893 */ +/* 904 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137251,12 +138188,12 @@ module.exports = 'volume'; /***/ }), -/* 894 */ +/* 905 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137268,100 +138205,100 @@ var GameObjects = { Events: __webpack_require__(90), - DisplayList: __webpack_require__(895), + DisplayList: __webpack_require__(906), GameObjectCreator: __webpack_require__(16), GameObjectFactory: __webpack_require__(5), - UpdateList: __webpack_require__(923), + UpdateList: __webpack_require__(934), Components: __webpack_require__(12), BuildGameObject: __webpack_require__(28), - BuildGameObjectAnimation: __webpack_require__(371), + BuildGameObjectAnimation: __webpack_require__(385), GameObject: __webpack_require__(14), - BitmapText: __webpack_require__(127), - Blitter: __webpack_require__(185), - Container: __webpack_require__(186), - DOMElement: __webpack_require__(373), - DynamicBitmapText: __webpack_require__(187), - Extern: __webpack_require__(375), - Graphics: __webpack_require__(188), + BitmapText: __webpack_require__(129), + Blitter: __webpack_require__(186), + Container: __webpack_require__(187), + DOMElement: __webpack_require__(387), + DynamicBitmapText: __webpack_require__(188), + Extern: __webpack_require__(389), + Graphics: __webpack_require__(189), Group: __webpack_require__(97), Image: __webpack_require__(98), - Particles: __webpack_require__(955), - PathFollower: __webpack_require__(387), - RenderTexture: __webpack_require__(192), - RetroFont: __webpack_require__(964), + Particles: __webpack_require__(966), + PathFollower: __webpack_require__(401), + RenderTexture: __webpack_require__(193), + RetroFont: __webpack_require__(975), Sprite: __webpack_require__(69), - Text: __webpack_require__(194), - TileSprite: __webpack_require__(195), - Zone: __webpack_require__(108), - Video: __webpack_require__(196), + Text: __webpack_require__(195), + TileSprite: __webpack_require__(196), + Zone: __webpack_require__(110), + Video: __webpack_require__(197), // Shapes Shape: __webpack_require__(30), - Arc: __webpack_require__(388), - Curve: __webpack_require__(389), - Ellipse: __webpack_require__(390), - Grid: __webpack_require__(391), - IsoBox: __webpack_require__(392), - IsoTriangle: __webpack_require__(393), - Line: __webpack_require__(394), - Polygon: __webpack_require__(395), - Rectangle: __webpack_require__(400), - Star: __webpack_require__(401), - Triangle: __webpack_require__(402), + Arc: __webpack_require__(402), + Curve: __webpack_require__(403), + Ellipse: __webpack_require__(404), + Grid: __webpack_require__(405), + IsoBox: __webpack_require__(406), + IsoTriangle: __webpack_require__(407), + Line: __webpack_require__(408), + Polygon: __webpack_require__(409), + Rectangle: __webpack_require__(414), + Star: __webpack_require__(415), + Triangle: __webpack_require__(416), // Game Object Factories Factories: { - Blitter: __webpack_require__(1012), - Container: __webpack_require__(1013), - DOMElement: __webpack_require__(1014), - DynamicBitmapText: __webpack_require__(1015), - Extern: __webpack_require__(1016), - Graphics: __webpack_require__(1017), - Group: __webpack_require__(1018), - Image: __webpack_require__(1019), - Particles: __webpack_require__(1020), - PathFollower: __webpack_require__(1021), - RenderTexture: __webpack_require__(1022), - Sprite: __webpack_require__(1023), - StaticBitmapText: __webpack_require__(1024), - Text: __webpack_require__(1025), - TileSprite: __webpack_require__(1026), - Zone: __webpack_require__(1027), - Video: __webpack_require__(1028), + Blitter: __webpack_require__(1023), + Container: __webpack_require__(1024), + DOMElement: __webpack_require__(1025), + DynamicBitmapText: __webpack_require__(1026), + Extern: __webpack_require__(1027), + Graphics: __webpack_require__(1028), + Group: __webpack_require__(1029), + Image: __webpack_require__(1030), + Particles: __webpack_require__(1031), + PathFollower: __webpack_require__(1032), + RenderTexture: __webpack_require__(1033), + Sprite: __webpack_require__(1034), + StaticBitmapText: __webpack_require__(1035), + Text: __webpack_require__(1036), + TileSprite: __webpack_require__(1037), + Zone: __webpack_require__(1038), + Video: __webpack_require__(1039), // Shapes - Arc: __webpack_require__(1029), - Curve: __webpack_require__(1030), - Ellipse: __webpack_require__(1031), - Grid: __webpack_require__(1032), - IsoBox: __webpack_require__(1033), - IsoTriangle: __webpack_require__(1034), - Line: __webpack_require__(1035), - Polygon: __webpack_require__(1036), - Rectangle: __webpack_require__(1037), - Star: __webpack_require__(1038), - Triangle: __webpack_require__(1039) + Arc: __webpack_require__(1040), + Curve: __webpack_require__(1041), + Ellipse: __webpack_require__(1042), + Grid: __webpack_require__(1043), + IsoBox: __webpack_require__(1044), + IsoTriangle: __webpack_require__(1045), + Line: __webpack_require__(1046), + Polygon: __webpack_require__(1047), + Rectangle: __webpack_require__(1048), + Star: __webpack_require__(1049), + Triangle: __webpack_require__(1050) }, Creators: { - Blitter: __webpack_require__(1040), - Container: __webpack_require__(1041), - DynamicBitmapText: __webpack_require__(1042), - Graphics: __webpack_require__(1043), - Group: __webpack_require__(1044), - Image: __webpack_require__(1045), - Particles: __webpack_require__(1046), - RenderTexture: __webpack_require__(1047), - Sprite: __webpack_require__(1048), - StaticBitmapText: __webpack_require__(1049), - Text: __webpack_require__(1050), - TileSprite: __webpack_require__(1051), - Zone: __webpack_require__(1052), - Video: __webpack_require__(1053) + Blitter: __webpack_require__(1051), + Container: __webpack_require__(1052), + DynamicBitmapText: __webpack_require__(1053), + Graphics: __webpack_require__(1054), + Group: __webpack_require__(1055), + Image: __webpack_require__(1056), + Particles: __webpack_require__(1057), + RenderTexture: __webpack_require__(1058), + Sprite: __webpack_require__(1059), + StaticBitmapText: __webpack_require__(1060), + Text: __webpack_require__(1061), + TileSprite: __webpack_require__(1062), + Zone: __webpack_require__(1063), + Video: __webpack_require__(1064) } }; @@ -137369,42 +138306,42 @@ var GameObjects = { if (true) { // WebGL only Game Objects - GameObjects.Mesh = __webpack_require__(128); - GameObjects.Quad = __webpack_require__(199); - GameObjects.Shader = __webpack_require__(200); + GameObjects.Mesh = __webpack_require__(130); + GameObjects.Quad = __webpack_require__(200); + GameObjects.Shader = __webpack_require__(201); - GameObjects.Factories.Mesh = __webpack_require__(1060); - GameObjects.Factories.Quad = __webpack_require__(1061); - GameObjects.Factories.Shader = __webpack_require__(1062); + GameObjects.Factories.Mesh = __webpack_require__(1071); + GameObjects.Factories.Quad = __webpack_require__(1072); + GameObjects.Factories.Shader = __webpack_require__(1073); - GameObjects.Creators.Mesh = __webpack_require__(1063); - GameObjects.Creators.Quad = __webpack_require__(1064); - GameObjects.Creators.Shader = __webpack_require__(1065); + GameObjects.Creators.Mesh = __webpack_require__(1074); + GameObjects.Creators.Quad = __webpack_require__(1075); + GameObjects.Creators.Shader = __webpack_require__(1076); - GameObjects.Light = __webpack_require__(406); + GameObjects.Light = __webpack_require__(420); - __webpack_require__(407); - __webpack_require__(1066); + __webpack_require__(421); + __webpack_require__(1077); } module.exports = GameObjects; /***/ }), -/* 895 */ +/* 906 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var List = __webpack_require__(124); -var PluginCache = __webpack_require__(21); -var SceneEvents = __webpack_require__(22); -var StableSort = __webpack_require__(126); +var List = __webpack_require__(126); +var PluginCache = __webpack_require__(23); +var SceneEvents = __webpack_require__(19); +var StableSort = __webpack_require__(128); /** * @classdesc @@ -137596,12 +138533,12 @@ module.exports = DisplayList; /***/ }), -/* 896 */ +/* 907 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137611,31 +138548,31 @@ module.exports = DisplayList; module.exports = { - CheckMatrix: __webpack_require__(181), - MatrixToString: __webpack_require__(897), - ReverseColumns: __webpack_require__(898), - ReverseRows: __webpack_require__(899), - Rotate180: __webpack_require__(900), - RotateLeft: __webpack_require__(901), - RotateMatrix: __webpack_require__(125), - RotateRight: __webpack_require__(902), - TransposeMatrix: __webpack_require__(368) + CheckMatrix: __webpack_require__(182), + MatrixToString: __webpack_require__(908), + ReverseColumns: __webpack_require__(909), + ReverseRows: __webpack_require__(910), + Rotate180: __webpack_require__(911), + RotateLeft: __webpack_require__(912), + RotateMatrix: __webpack_require__(127), + RotateRight: __webpack_require__(913), + TransposeMatrix: __webpack_require__(382) }; /***/ }), -/* 897 */ +/* 908 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Pad = __webpack_require__(158); -var CheckMatrix = __webpack_require__(181); +var Pad = __webpack_require__(160); +var CheckMatrix = __webpack_require__(182); /** * Generates a string (which you can pass to console.log) from the given Array Matrix. @@ -137706,12 +138643,12 @@ module.exports = MatrixToString; /***/ }), -/* 898 */ +/* 909 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137737,12 +138674,12 @@ module.exports = ReverseColumns; /***/ }), -/* 899 */ +/* 910 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137773,16 +138710,16 @@ module.exports = ReverseRows; /***/ }), -/* 900 */ +/* 911 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(125); +var RotateMatrix = __webpack_require__(127); /** * Rotates the array matrix 180 degrees. @@ -137806,16 +138743,16 @@ module.exports = Rotate180; /***/ }), -/* 901 */ +/* 912 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(125); +var RotateMatrix = __webpack_require__(127); /** * Rotates the array matrix to the left (or 90 degrees) @@ -137839,16 +138776,16 @@ module.exports = RotateLeft; /***/ }), -/* 902 */ +/* 913 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(125); +var RotateMatrix = __webpack_require__(127); /** * Rotates the array matrix to the left (or -90 degrees) @@ -137872,12 +138809,12 @@ module.exports = RotateRight; /***/ }), -/* 903 */ +/* 914 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137989,12 +138926,12 @@ module.exports = Add; /***/ }), -/* 904 */ +/* 915 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138111,12 +139048,12 @@ module.exports = AddAt; /***/ }), -/* 905 */ +/* 916 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138149,12 +139086,12 @@ module.exports = BringToTop; /***/ }), -/* 906 */ +/* 917 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138201,12 +139138,12 @@ module.exports = CountAllMatching; /***/ }), -/* 907 */ +/* 918 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138247,12 +139184,12 @@ module.exports = Each; /***/ }), -/* 908 */ +/* 919 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138303,12 +139240,12 @@ module.exports = EachInRange; /***/ }), -/* 909 */ +/* 920 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138365,12 +139302,12 @@ module.exports = GetAll; /***/ }), -/* 910 */ +/* 921 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138424,12 +139361,12 @@ module.exports = GetFirst; /***/ }), -/* 911 */ +/* 922 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138466,12 +139403,12 @@ module.exports = MoveDown; /***/ }), -/* 912 */ +/* 923 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138513,12 +139450,12 @@ module.exports = MoveTo; /***/ }), -/* 913 */ +/* 924 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138555,12 +139492,12 @@ module.exports = MoveUp; /***/ }), -/* 914 */ +/* 925 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138619,16 +139556,16 @@ module.exports = NumberArray; /***/ }), -/* 915 */ +/* 926 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RoundAwayFromZero = __webpack_require__(314); +var RoundAwayFromZero = __webpack_require__(328); /** * Create an array of numbers (positive and/or negative) progressing from `start` @@ -138696,12 +139633,12 @@ module.exports = NumberArrayStep; /***/ }), -/* 916 */ +/* 927 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138747,12 +139684,12 @@ module.exports = RemoveAt; /***/ }), -/* 917 */ +/* 928 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138810,12 +139747,12 @@ module.exports = RemoveBetween; /***/ }), -/* 918 */ +/* 929 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138848,12 +139785,12 @@ module.exports = RemoveRandomElement; /***/ }), -/* 919 */ +/* 930 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138892,12 +139829,12 @@ module.exports = Replace; /***/ }), -/* 920 */ +/* 931 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138930,12 +139867,12 @@ module.exports = SendToBack; /***/ }), -/* 921 */ +/* 932 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138985,12 +139922,12 @@ module.exports = SetAll; /***/ }), -/* 922 */ +/* 933 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139033,19 +139970,19 @@ module.exports = Swap; /***/ }), -/* 923 */ +/* 934 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var ProcessQueue = __webpack_require__(183); -var PluginCache = __webpack_require__(21); -var SceneEvents = __webpack_require__(22); +var ProcessQueue = __webpack_require__(184); +var PluginCache = __webpack_require__(23); +var SceneEvents = __webpack_require__(19); /** * @classdesc @@ -139334,12 +140271,12 @@ module.exports = UpdateList; /***/ }), -/* 924 */ +/* 935 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139349,19 +140286,19 @@ module.exports = UpdateList; module.exports = { - PROCESS_QUEUE_ADD: __webpack_require__(925), - PROCESS_QUEUE_REMOVE: __webpack_require__(926) + PROCESS_QUEUE_ADD: __webpack_require__(936), + PROCESS_QUEUE_REMOVE: __webpack_require__(937) }; /***/ }), -/* 925 */ +/* 936 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139383,12 +140320,12 @@ module.exports = 'add'; /***/ }), -/* 926 */ +/* 937 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139410,12 +140347,12 @@ module.exports = 'remove'; /***/ }), -/* 927 */ +/* 938 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139464,7 +140401,6 @@ var GetBitmapTextSize = function (src, round, out) }, wrappedText: '', words: [], - maxWidth: 0, scaleX: 0, scaleY: 0 }; @@ -139513,7 +140449,7 @@ var GetBitmapTextSize = function (src, round, out) var current = null; // Scan for breach of maxWidth and insert carriage-returns - if (maxWidth > 0 && out.maxWidth !== maxWidth) + if (maxWidth > 0) { for (i = 0; i < textLength; i++) { @@ -139668,7 +140604,6 @@ var GetBitmapTextSize = function (src, round, out) text = stringInsert(text, crs[i], "\n"); } - out.maxWidth = maxWidth; out.wrappedText = text; textLength = text.length; @@ -139865,16 +140800,16 @@ module.exports = GetBitmapTextSize; /***/ }), -/* 928 */ +/* 939 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ParseXMLBitmapFont = __webpack_require__(184); +var ParseXMLBitmapFont = __webpack_require__(185); /** * Parse an XML Bitmap Font from an Atlas. @@ -139890,8 +140825,8 @@ var ParseXMLBitmapFont = __webpack_require__(184); * @param {string} textureKey - The key of the BitmapFont's texture. * @param {string} frameKey - The key of the BitmapFont texture's frame. * @param {string} xmlKey - The key of the XML data of the font to parse. - * @param {integer} xSpacing - The x-axis spacing to add between each letter. - * @param {integer} ySpacing - The y-axis spacing to add to the line height. + * @param {integer} [xSpacing] - The x-axis spacing to add between each letter. + * @param {integer} [ySpacing] - The y-axis spacing to add to the line height. * * @return {boolean} Whether the parsing was successful or not. */ @@ -139918,12 +140853,12 @@ module.exports = ParseFromAtlas; /***/ }), -/* 929 */ +/* 940 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139932,12 +140867,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(930); + renderWebGL = __webpack_require__(941); } if (true) { - renderCanvas = __webpack_require__(931); + renderCanvas = __webpack_require__(942); } module.exports = { @@ -139949,12 +140884,12 @@ module.exports = { /***/ }), -/* 930 */ +/* 941 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140185,12 +141120,12 @@ module.exports = BitmapTextWebGLRenderer; /***/ }), -/* 931 */ +/* 942 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140367,12 +141302,12 @@ module.exports = BitmapTextCanvasRenderer; /***/ }), -/* 932 */ +/* 943 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140381,12 +141316,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(933); + renderWebGL = __webpack_require__(944); } if (true) { - renderCanvas = __webpack_require__(934); + renderCanvas = __webpack_require__(945); } module.exports = { @@ -140398,12 +141333,12 @@ module.exports = { /***/ }), -/* 933 */ +/* 944 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140528,12 +141463,12 @@ module.exports = BlitterWebGLRenderer; /***/ }), -/* 934 */ +/* 945 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140658,12 +141593,12 @@ module.exports = BlitterCanvasRenderer; /***/ }), -/* 935 */ +/* 946 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141088,13 +142023,13 @@ module.exports = Bob; /***/ }), -/* 936 */ +/* 947 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141103,12 +142038,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(937); + renderWebGL = __webpack_require__(948); } if (true) { - renderCanvas = __webpack_require__(938); + renderCanvas = __webpack_require__(949); } module.exports = { @@ -141120,13 +142055,13 @@ module.exports = { /***/ }), -/* 937 */ +/* 948 */ /***/ (function(module, exports) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141177,10 +142112,7 @@ var ContainerWebGLRenderer = function (renderer, container, interpolationPercent renderer.setBlendMode(0); } - var alphaTopLeft = container.alphaTopLeft; - var alphaTopRight = container.alphaTopRight; - var alphaBottomLeft = container.alphaBottomLeft; - var alphaBottomRight = container.alphaBottomRight; + var alpha = container.alpha; var scrollFactorX = container.scrollFactorX; var scrollFactorY = container.scrollFactorY; @@ -141248,7 +142180,7 @@ var ContainerWebGLRenderer = function (renderer, container, interpolationPercent // Set parent values child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY); - child.setAlpha(childAlphaTopLeft * alphaTopLeft, childAlphaTopRight * alphaTopRight, childAlphaBottomLeft * alphaBottomLeft, childAlphaBottomRight * alphaBottomRight); + child.setAlpha(childAlphaTopLeft * alpha, childAlphaTopRight * alpha, childAlphaBottomLeft * alpha, childAlphaBottomRight * alpha); // Render child.renderWebGL(renderer, child, interpolationPercentage, camera, transformMatrix); @@ -141272,13 +142204,13 @@ module.exports = ContainerWebGLRenderer; /***/ }), -/* 938 */ +/* 949 */ /***/ (function(module, exports) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141369,12 +142301,12 @@ module.exports = ContainerCanvasRenderer; /***/ }), -/* 939 */ +/* 950 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141383,12 +142315,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(374); + renderWebGL = __webpack_require__(388); } if (true) { - renderCanvas = __webpack_require__(374); + renderCanvas = __webpack_require__(388); } module.exports = { @@ -141400,12 +142332,12 @@ module.exports = { /***/ }), -/* 940 */ +/* 951 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141441,12 +142373,12 @@ module.exports = [ /***/ }), -/* 941 */ +/* 952 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141455,12 +142387,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(942); + renderWebGL = __webpack_require__(953); } if (true) { - renderCanvas = __webpack_require__(943); + renderCanvas = __webpack_require__(954); } module.exports = { @@ -141472,12 +142404,12 @@ module.exports = { /***/ }), -/* 942 */ +/* 953 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141778,12 +142710,12 @@ module.exports = DynamicBitmapTextWebGLRenderer; /***/ }), -/* 943 */ +/* 954 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141989,12 +142921,12 @@ module.exports = DynamicBitmapTextCanvasRenderer; /***/ }), -/* 944 */ +/* 955 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142003,12 +142935,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(945); + renderWebGL = __webpack_require__(956); } if (true) { - renderCanvas = __webpack_require__(946); + renderCanvas = __webpack_require__(957); } module.exports = { @@ -142020,12 +142952,12 @@ module.exports = { /***/ }), -/* 945 */ +/* 956 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142089,18 +143021,18 @@ module.exports = ExternWebGLRenderer; /***/ }), -/* 946 */ +/* 957 */ /***/ (function(module, exports) { /***/ }), -/* 947 */ +/* 958 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142109,15 +143041,15 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(948); + renderWebGL = __webpack_require__(959); // Needed for Graphics.generateTexture - renderCanvas = __webpack_require__(379); + renderCanvas = __webpack_require__(393); } if (true) { - renderCanvas = __webpack_require__(379); + renderCanvas = __webpack_require__(393); } module.exports = { @@ -142129,16 +143061,16 @@ module.exports = { /***/ }), -/* 948 */ +/* 959 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Commands = __webpack_require__(189); +var Commands = __webpack_require__(190); var Utils = __webpack_require__(10); // TODO: Remove the use of this @@ -142494,12 +143426,12 @@ module.exports = GraphicsWebGLRenderer; /***/ }), -/* 949 */ +/* 960 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142508,12 +143440,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(950); + renderWebGL = __webpack_require__(961); } if (true) { - renderCanvas = __webpack_require__(951); + renderCanvas = __webpack_require__(962); } module.exports = { @@ -142525,12 +143457,12 @@ module.exports = { /***/ }), -/* 950 */ +/* 961 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142558,12 +143490,12 @@ module.exports = SpriteWebGLRenderer; /***/ }), -/* 951 */ +/* 962 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142591,12 +143523,12 @@ module.exports = SpriteCanvasRenderer; /***/ }), -/* 952 */ +/* 963 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142605,12 +143537,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(953); + renderWebGL = __webpack_require__(964); } if (true) { - renderCanvas = __webpack_require__(954); + renderCanvas = __webpack_require__(965); } module.exports = { @@ -142622,12 +143554,12 @@ module.exports = { /***/ }), -/* 953 */ +/* 964 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142655,12 +143587,12 @@ module.exports = ImageWebGLRenderer; /***/ }), -/* 954 */ +/* 965 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142688,12 +143620,12 @@ module.exports = ImageCanvasRenderer; /***/ }), -/* 955 */ +/* 966 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142703,30 +143635,30 @@ module.exports = ImageCanvasRenderer; module.exports = { - GravityWell: __webpack_require__(380), - Particle: __webpack_require__(381), - ParticleEmitter: __webpack_require__(382), - ParticleEmitterManager: __webpack_require__(191), - Zones: __webpack_require__(960) + GravityWell: __webpack_require__(394), + Particle: __webpack_require__(395), + ParticleEmitter: __webpack_require__(396), + ParticleEmitterManager: __webpack_require__(192), + Zones: __webpack_require__(971) }; /***/ }), -/* 956 */ +/* 967 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var FloatBetween = __webpack_require__(312); +var FloatBetween = __webpack_require__(326); var GetEaseFunction = __webpack_require__(82); var GetFastValue = __webpack_require__(2); -var Wrap = __webpack_require__(57); +var Wrap = __webpack_require__(58); /** * @classdesc @@ -143304,12 +144236,12 @@ module.exports = EmitterOp; /***/ }), -/* 957 */ +/* 968 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143318,12 +144250,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(958); + renderWebGL = __webpack_require__(969); } if (true) { - renderCanvas = __webpack_require__(959); + renderCanvas = __webpack_require__(970); } module.exports = { @@ -143335,12 +144267,12 @@ module.exports = { /***/ }), -/* 958 */ +/* 969 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143494,12 +144426,12 @@ module.exports = ParticleManagerWebGLRenderer; /***/ }), -/* 959 */ +/* 970 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143617,12 +144549,12 @@ module.exports = ParticleManagerCanvasRenderer; /***/ }), -/* 960 */ +/* 971 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143632,20 +144564,20 @@ module.exports = ParticleManagerCanvasRenderer; module.exports = { - DeathZone: __webpack_require__(383), - EdgeZone: __webpack_require__(384), - RandomZone: __webpack_require__(386) + DeathZone: __webpack_require__(397), + EdgeZone: __webpack_require__(398), + RandomZone: __webpack_require__(400) }; /***/ }), -/* 961 */ +/* 972 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143654,12 +144586,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(962); + renderWebGL = __webpack_require__(973); } if (true) { - renderCanvas = __webpack_require__(963); + renderCanvas = __webpack_require__(974); } module.exports = { @@ -143671,12 +144603,12 @@ module.exports = { /***/ }), -/* 962 */ +/* 973 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143734,12 +144666,12 @@ module.exports = RenderTextureWebGLRenderer; /***/ }), -/* 963 */ +/* 974 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143767,16 +144699,16 @@ module.exports = RenderTextureCanvasRenderer; /***/ }), -/* 964 */ +/* 975 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RETRO_FONT_CONST = __webpack_require__(965); +var RETRO_FONT_CONST = __webpack_require__(976); var Extend = __webpack_require__(17); /** @@ -143784,7 +144716,7 @@ var Extend = __webpack_require__(17); * @since 3.6.0 */ -var RetroFont = { Parse: __webpack_require__(966) }; +var RetroFont = { Parse: __webpack_require__(977) }; // Merge in the consts RetroFont = Extend(false, RetroFont, RETRO_FONT_CONST); @@ -143793,12 +144725,12 @@ module.exports = RetroFont; /***/ }), -/* 965 */ +/* 976 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143909,12 +144841,12 @@ module.exports = RETRO_FONT_CONST; /***/ }), -/* 966 */ +/* 977 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144025,12 +144957,12 @@ module.exports = ParseRetroFont; /***/ }), -/* 967 */ +/* 978 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144107,12 +145039,12 @@ module.exports = GetTextSize; /***/ }), -/* 968 */ +/* 979 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144121,12 +145053,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(969); + renderWebGL = __webpack_require__(980); } if (true) { - renderCanvas = __webpack_require__(970); + renderCanvas = __webpack_require__(981); } module.exports = { @@ -144138,12 +145070,12 @@ module.exports = { /***/ }), -/* 969 */ +/* 980 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144203,12 +145135,12 @@ module.exports = TextWebGLRenderer; /***/ }), -/* 970 */ +/* 981 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144241,19 +145173,19 @@ module.exports = TextCanvasRenderer; /***/ }), -/* 971 */ +/* 982 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var GetAdvancedValue = __webpack_require__(15); var GetValue = __webpack_require__(6); -var MeasureText = __webpack_require__(972); +var MeasureText = __webpack_require__(983); // Key: [ Object Key, Default Value ] @@ -145294,12 +146226,12 @@ module.exports = TextStyle; /***/ }), -/* 972 */ +/* 983 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145429,12 +146361,12 @@ module.exports = MeasureText; /***/ }), -/* 973 */ +/* 984 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145443,12 +146375,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(974); + renderWebGL = __webpack_require__(985); } if (true) { - renderCanvas = __webpack_require__(975); + renderCanvas = __webpack_require__(986); } module.exports = { @@ -145460,12 +146392,12 @@ module.exports = { /***/ }), -/* 974 */ +/* 985 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145520,12 +146452,12 @@ module.exports = TileSpriteWebGLRenderer; /***/ }), -/* 975 */ +/* 986 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145555,12 +146487,12 @@ module.exports = TileSpriteCanvasRenderer; /***/ }), -/* 976 */ +/* 987 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145569,12 +146501,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(977); + renderWebGL = __webpack_require__(988); } if (true) { - renderCanvas = __webpack_require__(978); + renderCanvas = __webpack_require__(989); } module.exports = { @@ -145586,12 +146518,12 @@ module.exports = { /***/ }), -/* 977 */ +/* 988 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145622,12 +146554,12 @@ module.exports = VideoWebGLRenderer; /***/ }), -/* 978 */ +/* 989 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145658,12 +146590,12 @@ module.exports = VideoCanvasRenderer; /***/ }), -/* 979 */ +/* 990 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145672,12 +146604,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(980); + renderWebGL = __webpack_require__(991); } if (true) { - renderCanvas = __webpack_require__(981); + renderCanvas = __webpack_require__(992); } module.exports = { @@ -145689,12 +146621,12 @@ module.exports = { /***/ }), -/* 980 */ +/* 991 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145767,12 +146699,12 @@ module.exports = ArcWebGLRenderer; /***/ }), -/* 981 */ +/* 992 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145843,12 +146775,12 @@ module.exports = ArcCanvasRenderer; /***/ }), -/* 982 */ +/* 993 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145857,12 +146789,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(983); + renderWebGL = __webpack_require__(994); } if (true) { - renderCanvas = __webpack_require__(984); + renderCanvas = __webpack_require__(995); } module.exports = { @@ -145874,12 +146806,12 @@ module.exports = { /***/ }), -/* 983 */ +/* 994 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145952,12 +146884,12 @@ module.exports = CurveWebGLRenderer; /***/ }), -/* 984 */ +/* 995 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146040,12 +146972,12 @@ module.exports = CurveCanvasRenderer; /***/ }), -/* 985 */ +/* 996 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146054,12 +146986,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(986); + renderWebGL = __webpack_require__(997); } if (true) { - renderCanvas = __webpack_require__(987); + renderCanvas = __webpack_require__(998); } module.exports = { @@ -146071,12 +147003,12 @@ module.exports = { /***/ }), -/* 986 */ +/* 997 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146149,12 +147081,12 @@ module.exports = EllipseWebGLRenderer; /***/ }), -/* 987 */ +/* 998 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146234,12 +147166,12 @@ module.exports = EllipseCanvasRenderer; /***/ }), -/* 988 */ +/* 999 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146248,12 +147180,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(989); + renderWebGL = __webpack_require__(1000); } if (true) { - renderCanvas = __webpack_require__(990); + renderCanvas = __webpack_require__(1001); } module.exports = { @@ -146265,12 +147197,12 @@ module.exports = { /***/ }), -/* 989 */ +/* 1000 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146491,12 +147423,12 @@ module.exports = GridWebGLRenderer; /***/ }), -/* 990 */ +/* 1001 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146680,12 +147612,12 @@ module.exports = GridCanvasRenderer; /***/ }), -/* 991 */ +/* 1002 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146694,12 +147626,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(992); + renderWebGL = __webpack_require__(1003); } if (true) { - renderCanvas = __webpack_require__(993); + renderCanvas = __webpack_require__(1004); } module.exports = { @@ -146711,12 +147643,12 @@ module.exports = { /***/ }), -/* 992 */ +/* 1003 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146869,12 +147801,12 @@ module.exports = IsoBoxWebGLRenderer; /***/ }), -/* 993 */ +/* 1004 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146970,12 +147902,12 @@ module.exports = IsoBoxCanvasRenderer; /***/ }), -/* 994 */ +/* 1005 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146984,12 +147916,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(995); + renderWebGL = __webpack_require__(1006); } if (true) { - renderCanvas = __webpack_require__(996); + renderCanvas = __webpack_require__(1007); } module.exports = { @@ -147001,12 +147933,12 @@ module.exports = { /***/ }), -/* 995 */ +/* 1006 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -147178,12 +148110,12 @@ module.exports = IsoTriangleWebGLRenderer; /***/ }), -/* 996 */ +/* 1007 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -147292,12 +148224,12 @@ module.exports = IsoTriangleCanvasRenderer; /***/ }), -/* 997 */ +/* 1008 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -147306,12 +148238,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(998); + renderWebGL = __webpack_require__(1009); } if (true) { - renderCanvas = __webpack_require__(999); + renderCanvas = __webpack_require__(1010); } module.exports = { @@ -147323,12 +148255,12 @@ module.exports = { /***/ }), -/* 998 */ +/* 1009 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -147416,12 +148348,12 @@ module.exports = LineWebGLRenderer; /***/ }), -/* 999 */ +/* 1010 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -147473,12 +148405,12 @@ module.exports = LineCanvasRenderer; /***/ }), -/* 1000 */ +/* 1011 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -147487,12 +148419,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1001); + renderWebGL = __webpack_require__(1012); } if (true) { - renderCanvas = __webpack_require__(1002); + renderCanvas = __webpack_require__(1013); } module.exports = { @@ -147504,12 +148436,12 @@ module.exports = { /***/ }), -/* 1001 */ +/* 1012 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -147582,12 +148514,12 @@ module.exports = PolygonWebGLRenderer; /***/ }), -/* 1002 */ +/* 1013 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -147667,12 +148599,12 @@ module.exports = PolygonCanvasRenderer; /***/ }), -/* 1003 */ +/* 1014 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -147681,12 +148613,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1004); + renderWebGL = __webpack_require__(1015); } if (true) { - renderCanvas = __webpack_require__(1005); + renderCanvas = __webpack_require__(1016); } module.exports = { @@ -147698,12 +148630,12 @@ module.exports = { /***/ }), -/* 1004 */ +/* 1015 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -147790,12 +148722,12 @@ module.exports = RectangleWebGLRenderer; /***/ }), -/* 1005 */ +/* 1016 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -147864,12 +148796,12 @@ module.exports = RectangleCanvasRenderer; /***/ }), -/* 1006 */ +/* 1017 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -147878,12 +148810,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1007); + renderWebGL = __webpack_require__(1018); } if (true) { - renderCanvas = __webpack_require__(1008); + renderCanvas = __webpack_require__(1019); } module.exports = { @@ -147895,12 +148827,12 @@ module.exports = { /***/ }), -/* 1007 */ +/* 1018 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -147973,12 +148905,12 @@ module.exports = StarWebGLRenderer; /***/ }), -/* 1008 */ +/* 1019 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -148058,12 +148990,12 @@ module.exports = StarCanvasRenderer; /***/ }), -/* 1009 */ +/* 1020 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -148072,12 +149004,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1010); + renderWebGL = __webpack_require__(1021); } if (true) { - renderCanvas = __webpack_require__(1011); + renderCanvas = __webpack_require__(1022); } module.exports = { @@ -148089,12 +149021,12 @@ module.exports = { /***/ }), -/* 1010 */ +/* 1021 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -148192,12 +149124,12 @@ module.exports = TriangleWebGLRenderer; /***/ }), -/* 1011 */ +/* 1022 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -148267,16 +149199,16 @@ module.exports = TriangleCanvasRenderer; /***/ }), -/* 1012 */ +/* 1023 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Blitter = __webpack_require__(185); +var Blitter = __webpack_require__(186); var GameObjectFactory = __webpack_require__(5); /** @@ -148309,17 +149241,17 @@ GameObjectFactory.register('blitter', function (x, y, key, frame) /***/ }), -/* 1013 */ +/* 1024 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Container = __webpack_require__(186); +var Container = __webpack_require__(187); var GameObjectFactory = __webpack_require__(5); /** @@ -148343,16 +149275,16 @@ GameObjectFactory.register('container', function (x, y, children) /***/ }), -/* 1014 */ +/* 1025 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DOMElement = __webpack_require__(373); +var DOMElement = __webpack_require__(387); var GameObjectFactory = __webpack_require__(5); /** @@ -148433,16 +149365,16 @@ GameObjectFactory.register('dom', function (x, y, element, style, innerText) /***/ }), -/* 1015 */ +/* 1026 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DynamicBitmapText = __webpack_require__(187); +var DynamicBitmapText = __webpack_require__(188); var GameObjectFactory = __webpack_require__(5); /** @@ -148502,16 +149434,16 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size /***/ }), -/* 1016 */ +/* 1027 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Extern = __webpack_require__(375); +var Extern = __webpack_require__(389); var GameObjectFactory = __webpack_require__(5); /** @@ -148544,16 +149476,16 @@ GameObjectFactory.register('extern', function () /***/ }), -/* 1017 */ +/* 1028 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Graphics = __webpack_require__(188); +var Graphics = __webpack_require__(189); var GameObjectFactory = __webpack_require__(5); /** @@ -148583,12 +149515,12 @@ GameObjectFactory.register('graphics', function (config) /***/ }), -/* 1018 */ +/* 1029 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -148615,12 +149547,12 @@ GameObjectFactory.register('group', function (children, config) /***/ }), -/* 1019 */ +/* 1030 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -148657,17 +149589,17 @@ GameObjectFactory.register('image', function (x, y, key, frame) /***/ }), -/* 1020 */ +/* 1031 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(5); -var ParticleEmitterManager = __webpack_require__(191); +var ParticleEmitterManager = __webpack_require__(192); /** * Creates a new Particle Emitter Manager Game Object and adds it to the Scene. @@ -148703,17 +149635,17 @@ GameObjectFactory.register('particles', function (key, frame, emitters) /***/ }), -/* 1021 */ +/* 1032 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(5); -var PathFollower = __webpack_require__(387); +var PathFollower = __webpack_require__(401); /** * Creates a new PathFollower Game Object and adds it to the Scene. @@ -148751,17 +149683,17 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame) /***/ }), -/* 1022 */ +/* 1033 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(5); -var RenderTexture = __webpack_require__(192); +var RenderTexture = __webpack_require__(193); /** * Creates a new Render Texture Game Object and adds it to the Scene. @@ -148791,12 +149723,12 @@ GameObjectFactory.register('renderTexture', function (x, y, width, height, key, /***/ }), -/* 1023 */ +/* 1034 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -148838,16 +149770,16 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) /***/ }), -/* 1024 */ +/* 1035 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(127); +var BitmapText = __webpack_require__(129); var GameObjectFactory = __webpack_require__(5); /** @@ -148902,16 +149834,16 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size, align /***/ }), -/* 1025 */ +/* 1036 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Text = __webpack_require__(194); +var Text = __webpack_require__(195); var GameObjectFactory = __webpack_require__(5); /** @@ -148967,16 +149899,16 @@ GameObjectFactory.register('text', function (x, y, text, style) /***/ }), -/* 1026 */ +/* 1037 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileSprite = __webpack_require__(195); +var TileSprite = __webpack_require__(196); var GameObjectFactory = __webpack_require__(5); /** @@ -149011,16 +149943,16 @@ GameObjectFactory.register('tileSprite', function (x, y, width, height, key, fra /***/ }), -/* 1027 */ +/* 1038 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Zone = __webpack_require__(108); +var Zone = __webpack_require__(110); var GameObjectFactory = __webpack_require__(5); /** @@ -149053,16 +149985,16 @@ GameObjectFactory.register('zone', function (x, y, width, height) /***/ }), -/* 1028 */ +/* 1039 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Video = __webpack_require__(196); +var Video = __webpack_require__(197); var GameObjectFactory = __webpack_require__(5); /** @@ -149100,16 +150032,16 @@ GameObjectFactory.register('video', function (x, y, key) /***/ }), -/* 1029 */ +/* 1040 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Arc = __webpack_require__(388); +var Arc = __webpack_require__(402); var GameObjectFactory = __webpack_require__(5); /** @@ -149173,17 +150105,17 @@ GameObjectFactory.register('circle', function (x, y, radius, fillColor, fillAlph /***/ }), -/* 1030 */ +/* 1041 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(5); -var Curve = __webpack_require__(389); +var Curve = __webpack_require__(403); /** * Creates a new Curve Shape Game Object and adds it to the Scene. @@ -149223,16 +150155,16 @@ GameObjectFactory.register('curve', function (x, y, curve, fillColor, fillAlpha) /***/ }), -/* 1031 */ +/* 1042 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Ellipse = __webpack_require__(390); +var Ellipse = __webpack_require__(404); var GameObjectFactory = __webpack_require__(5); /** @@ -149275,17 +150207,17 @@ GameObjectFactory.register('ellipse', function (x, y, width, height, fillColor, /***/ }), -/* 1032 */ +/* 1043 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(5); -var Grid = __webpack_require__(391); +var Grid = __webpack_require__(405); /** * Creates a new Grid Shape Game Object and adds it to the Scene. @@ -149330,17 +150262,17 @@ GameObjectFactory.register('grid', function (x, y, width, height, cellWidth, cel /***/ }), -/* 1033 */ +/* 1044 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(5); -var IsoBox = __webpack_require__(392); +var IsoBox = __webpack_require__(406); /** * Creates a new IsoBox Shape Game Object and adds it to the Scene. @@ -149381,17 +150313,17 @@ GameObjectFactory.register('isobox', function (x, y, size, height, fillTop, fill /***/ }), -/* 1034 */ +/* 1045 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(5); -var IsoTriangle = __webpack_require__(393); +var IsoTriangle = __webpack_require__(407); /** * Creates a new IsoTriangle Shape Game Object and adds it to the Scene. @@ -149434,17 +150366,17 @@ GameObjectFactory.register('isotriangle', function (x, y, size, height, reversed /***/ }), -/* 1035 */ +/* 1046 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(5); -var Line = __webpack_require__(394); +var Line = __webpack_require__(408); /** * Creates a new Line Shape Game Object and adds it to the Scene. @@ -149485,17 +150417,17 @@ GameObjectFactory.register('line', function (x, y, x1, y1, x2, y2, strokeColor, /***/ }), -/* 1036 */ +/* 1047 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(5); -var Polygon = __webpack_require__(395); +var Polygon = __webpack_require__(409); /** * Creates a new Polygon Shape Game Object and adds it to the Scene. @@ -149512,7 +150444,7 @@ var Polygon = __webpack_require__(395); * The Polygon Shape is created by providing a list of points, which are then used to create an * internal Polygon geometry object. The points can be set from a variety of formats: * - * - An array of Point or Vector2 objects: `[new Phaser.Math.Vec2(x1, y1), ...]` + * - An array of Point or Vector2 objects: `[new Phaser.Math.Vector2(x1, y1), ...]` * - An array of objects with public x/y properties: `[obj1, obj2, ...]` * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]` * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]` @@ -149538,17 +150470,17 @@ GameObjectFactory.register('polygon', function (x, y, points, fillColor, fillAlp /***/ }), -/* 1037 */ +/* 1048 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(5); -var Rectangle = __webpack_require__(400); +var Rectangle = __webpack_require__(414); /** * Creates a new Rectangle Shape Game Object and adds it to the Scene. @@ -149583,16 +150515,16 @@ GameObjectFactory.register('rectangle', function (x, y, width, height, fillColor /***/ }), -/* 1038 */ +/* 1049 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Star = __webpack_require__(401); +var Star = __webpack_require__(415); var GameObjectFactory = __webpack_require__(5); /** @@ -149635,17 +150567,17 @@ GameObjectFactory.register('star', function (x, y, points, innerRadius, outerRad /***/ }), -/* 1039 */ +/* 1050 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(5); -var Triangle = __webpack_require__(402); +var Triangle = __webpack_require__(416); /** * Creates a new Triangle Shape Game Object and adds it to the Scene. @@ -149686,16 +150618,16 @@ GameObjectFactory.register('triangle', function (x, y, x1, y1, x2, y2, x3, y3, f /***/ }), -/* 1040 */ +/* 1051 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Blitter = __webpack_require__(185); +var Blitter = __webpack_require__(186); var BuildGameObject = __webpack_require__(28); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -149736,18 +150668,18 @@ GameObjectCreator.register('blitter', function (config, addToScene) /***/ }), -/* 1041 */ +/* 1052 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BuildGameObject = __webpack_require__(28); -var Container = __webpack_require__(186); +var Container = __webpack_require__(187); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -149785,16 +150717,16 @@ GameObjectCreator.register('container', function (config, addToScene) /***/ }), -/* 1042 */ +/* 1053 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(187); +var BitmapText = __webpack_require__(188); var BuildGameObject = __webpack_require__(28); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -149836,17 +150768,17 @@ GameObjectCreator.register('dynamicBitmapText', function (config, addToScene) /***/ }), -/* 1043 */ +/* 1054 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectCreator = __webpack_require__(16); -var Graphics = __webpack_require__(188); +var Graphics = __webpack_require__(189); /** * Creates a new Graphics Game Object and returns it. @@ -149884,12 +150816,12 @@ GameObjectCreator.register('graphics', function (config, addToScene) /***/ }), -/* 1044 */ +/* 1055 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149917,12 +150849,12 @@ GameObjectCreator.register('group', function (config) /***/ }), -/* 1045 */ +/* 1056 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149967,19 +150899,19 @@ GameObjectCreator.register('image', function (config, addToScene) /***/ }), -/* 1046 */ +/* 1057 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); var GetFastValue = __webpack_require__(2); -var ParticleEmitterManager = __webpack_require__(191); +var ParticleEmitterManager = __webpack_require__(192); /** * Creates a new Particle Emitter Manager Game Object and returns it. @@ -150024,19 +150956,19 @@ GameObjectCreator.register('particles', function (config, addToScene) /***/ }), -/* 1047 */ +/* 1058 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BuildGameObject = __webpack_require__(28); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var RenderTexture = __webpack_require__(192); +var RenderTexture = __webpack_require__(193); /** * Creates a new Render Texture Game Object and returns it. @@ -150076,17 +151008,17 @@ GameObjectCreator.register('renderTexture', function (config, addToScene) /***/ }), -/* 1048 */ +/* 1059 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BuildGameObject = __webpack_require__(28); -var BuildGameObjectAnimation = __webpack_require__(371); +var BuildGameObjectAnimation = __webpack_require__(385); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); var Sprite = __webpack_require__(69); @@ -150129,16 +151061,16 @@ GameObjectCreator.register('sprite', function (config, addToScene) /***/ }), -/* 1049 */ +/* 1060 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(127); +var BitmapText = __webpack_require__(129); var BuildGameObject = __webpack_require__(28); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -150182,19 +151114,19 @@ GameObjectCreator.register('bitmapText', function (config, addToScene) /***/ }), -/* 1050 */ +/* 1061 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BuildGameObject = __webpack_require__(28); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Text = __webpack_require__(194); +var Text = __webpack_require__(195); /** * Creates a new Text Game Object and returns it. @@ -150269,19 +151201,19 @@ GameObjectCreator.register('text', function (config, addToScene) /***/ }), -/* 1051 */ +/* 1062 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BuildGameObject = __webpack_require__(28); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var TileSprite = __webpack_require__(195); +var TileSprite = __webpack_require__(196); /** * Creates a new TileSprite Game Object and returns it. @@ -150321,18 +151253,18 @@ GameObjectCreator.register('tileSprite', function (config, addToScene) /***/ }), -/* 1052 */ +/* 1063 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Zone = __webpack_require__(108); +var Zone = __webpack_require__(110); /** * Creates a new Zone Game Object and returns it. @@ -150360,19 +151292,19 @@ GameObjectCreator.register('zone', function (config) /***/ }), -/* 1053 */ +/* 1064 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BuildGameObject = __webpack_require__(28); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Video = __webpack_require__(196); +var Video = __webpack_require__(197); /** * Creates a new Video Game Object and returns it. @@ -150409,12 +151341,12 @@ GameObjectCreator.register('video', function (config, addToScene) /***/ }), -/* 1054 */ +/* 1065 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150423,12 +151355,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1055); + renderWebGL = __webpack_require__(1066); } if (true) { - renderCanvas = __webpack_require__(1056); + renderCanvas = __webpack_require__(1067); } module.exports = { @@ -150440,12 +151372,12 @@ module.exports = { /***/ }), -/* 1055 */ +/* 1066 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150558,12 +151490,12 @@ module.exports = MeshWebGLRenderer; /***/ }), -/* 1056 */ +/* 1067 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150587,12 +151519,12 @@ module.exports = MeshCanvasRenderer; /***/ }), -/* 1057 */ +/* 1068 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150601,12 +151533,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1058); + renderWebGL = __webpack_require__(1069); } if (true) { - renderCanvas = __webpack_require__(1059); + renderCanvas = __webpack_require__(1070); } module.exports = { @@ -150618,12 +151550,12 @@ module.exports = { /***/ }), -/* 1058 */ +/* 1069 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150702,12 +151634,12 @@ module.exports = ShaderWebGLRenderer; /***/ }), -/* 1059 */ +/* 1070 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150731,16 +151663,16 @@ module.exports = ShaderCanvasRenderer; /***/ }), -/* 1060 */ +/* 1071 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Mesh = __webpack_require__(128); +var Mesh = __webpack_require__(130); var GameObjectFactory = __webpack_require__(5); /** @@ -150781,16 +151713,16 @@ if (true) /***/ }), -/* 1061 */ +/* 1072 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Quad = __webpack_require__(199); +var Quad = __webpack_require__(200); var GameObjectFactory = __webpack_require__(5); /** @@ -150827,16 +151759,16 @@ if (true) /***/ }), -/* 1062 */ +/* 1073 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Shader = __webpack_require__(200); +var Shader = __webpack_require__(201); var GameObjectFactory = __webpack_require__(5); /** @@ -150868,12 +151800,12 @@ if (true) /***/ }), -/* 1063 */ +/* 1074 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150881,7 +151813,7 @@ var BuildGameObject = __webpack_require__(28); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); var GetValue = __webpack_require__(6); -var Mesh = __webpack_require__(128); +var Mesh = __webpack_require__(130); /** * Creates a new Mesh Game Object and returns it. @@ -150923,19 +151855,19 @@ GameObjectCreator.register('mesh', function (config, addToScene) /***/ }), -/* 1064 */ +/* 1075 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BuildGameObject = __webpack_require__(28); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Quad = __webpack_require__(199); +var Quad = __webpack_require__(200); /** * Creates a new Quad Game Object and returns it. @@ -150973,19 +151905,19 @@ GameObjectCreator.register('quad', function (config, addToScene) /***/ }), -/* 1065 */ +/* 1076 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BuildGameObject = __webpack_require__(28); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Shader = __webpack_require__(200); +var Shader = __webpack_require__(201); /** * Creates a new Shader Game Object and returns it. @@ -151026,19 +151958,19 @@ GameObjectCreator.register('shader', function (config, addToScene) /***/ }), -/* 1066 */ +/* 1077 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var LightsManager = __webpack_require__(407); -var PluginCache = __webpack_require__(21); -var SceneEvents = __webpack_require__(22); +var LightsManager = __webpack_require__(421); +var PluginCache = __webpack_require__(23); +var SceneEvents = __webpack_require__(19); /** * @classdesc @@ -151142,43 +152074,43 @@ module.exports = LightsPlugin; /***/ }), -/* 1067 */ +/* 1078 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Circle = __webpack_require__(65); -Circle.Area = __webpack_require__(1068); -Circle.Circumference = __webpack_require__(251); -Circle.CircumferencePoint = __webpack_require__(144); -Circle.Clone = __webpack_require__(1069); -Circle.Contains = __webpack_require__(54); -Circle.ContainsPoint = __webpack_require__(1070); -Circle.ContainsRect = __webpack_require__(1071); -Circle.CopyFrom = __webpack_require__(1072); -Circle.Equals = __webpack_require__(1073); -Circle.GetBounds = __webpack_require__(1074); -Circle.GetPoint = __webpack_require__(249); -Circle.GetPoints = __webpack_require__(250); -Circle.Offset = __webpack_require__(1075); -Circle.OffsetPoint = __webpack_require__(1076); -Circle.Random = __webpack_require__(145); +Circle.Area = __webpack_require__(1079); +Circle.Circumference = __webpack_require__(265); +Circle.CircumferencePoint = __webpack_require__(146); +Circle.Clone = __webpack_require__(1080); +Circle.Contains = __webpack_require__(55); +Circle.ContainsPoint = __webpack_require__(1081); +Circle.ContainsRect = __webpack_require__(1082); +Circle.CopyFrom = __webpack_require__(1083); +Circle.Equals = __webpack_require__(1084); +Circle.GetBounds = __webpack_require__(1085); +Circle.GetPoint = __webpack_require__(263); +Circle.GetPoints = __webpack_require__(264); +Circle.Offset = __webpack_require__(1086); +Circle.OffsetPoint = __webpack_require__(1087); +Circle.Random = __webpack_require__(147); module.exports = Circle; /***/ }), -/* 1068 */ +/* 1079 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151201,12 +152133,12 @@ module.exports = Area; /***/ }), -/* 1069 */ +/* 1080 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151231,16 +152163,16 @@ module.exports = Clone; /***/ }), -/* 1070 */ +/* 1081 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(54); +var Contains = __webpack_require__(55); /** * Check to see if the Circle contains the given Point object. @@ -151262,16 +152194,16 @@ module.exports = ContainsPoint; /***/ }), -/* 1071 */ +/* 1082 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(54); +var Contains = __webpack_require__(55); /** * Check to see if the Circle contains all four points of the given Rectangle object. @@ -151298,12 +152230,12 @@ module.exports = ContainsRect; /***/ }), -/* 1072 */ +/* 1083 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151330,12 +152262,12 @@ module.exports = CopyFrom; /***/ }), -/* 1073 */ +/* 1084 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151364,12 +152296,12 @@ module.exports = Equals; /***/ }), -/* 1074 */ +/* 1085 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151404,12 +152336,12 @@ module.exports = GetBounds; /***/ }), -/* 1075 */ +/* 1086 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151439,12 +152371,12 @@ module.exports = Offset; /***/ }), -/* 1076 */ +/* 1087 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151473,43 +152405,43 @@ module.exports = OffsetPoint; /***/ }), -/* 1077 */ +/* 1088 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Ellipse = __webpack_require__(95); -Ellipse.Area = __webpack_require__(1078); -Ellipse.Circumference = __webpack_require__(378); -Ellipse.CircumferencePoint = __webpack_require__(190); -Ellipse.Clone = __webpack_require__(1079); +Ellipse.Area = __webpack_require__(1089); +Ellipse.Circumference = __webpack_require__(392); +Ellipse.CircumferencePoint = __webpack_require__(191); +Ellipse.Clone = __webpack_require__(1090); Ellipse.Contains = __webpack_require__(96); -Ellipse.ContainsPoint = __webpack_require__(1080); -Ellipse.ContainsRect = __webpack_require__(1081); -Ellipse.CopyFrom = __webpack_require__(1082); -Ellipse.Equals = __webpack_require__(1083); -Ellipse.GetBounds = __webpack_require__(1084); -Ellipse.GetPoint = __webpack_require__(376); -Ellipse.GetPoints = __webpack_require__(377); -Ellipse.Offset = __webpack_require__(1085); -Ellipse.OffsetPoint = __webpack_require__(1086); -Ellipse.Random = __webpack_require__(152); +Ellipse.ContainsPoint = __webpack_require__(1091); +Ellipse.ContainsRect = __webpack_require__(1092); +Ellipse.CopyFrom = __webpack_require__(1093); +Ellipse.Equals = __webpack_require__(1094); +Ellipse.GetBounds = __webpack_require__(1095); +Ellipse.GetPoint = __webpack_require__(390); +Ellipse.GetPoints = __webpack_require__(391); +Ellipse.Offset = __webpack_require__(1096); +Ellipse.OffsetPoint = __webpack_require__(1097); +Ellipse.Random = __webpack_require__(154); module.exports = Ellipse; /***/ }), -/* 1078 */ +/* 1089 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151538,12 +152470,12 @@ module.exports = Area; /***/ }), -/* 1079 */ +/* 1090 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151568,12 +152500,12 @@ module.exports = Clone; /***/ }), -/* 1080 */ +/* 1091 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151599,12 +152531,12 @@ module.exports = ContainsPoint; /***/ }), -/* 1081 */ +/* 1092 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151635,12 +152567,12 @@ module.exports = ContainsRect; /***/ }), -/* 1082 */ +/* 1093 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151667,12 +152599,12 @@ module.exports = CopyFrom; /***/ }), -/* 1083 */ +/* 1094 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151702,12 +152634,12 @@ module.exports = Equals; /***/ }), -/* 1084 */ +/* 1095 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151742,12 +152674,12 @@ module.exports = GetBounds; /***/ }), -/* 1085 */ +/* 1096 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151777,12 +152709,12 @@ module.exports = Offset; /***/ }), -/* 1086 */ +/* 1097 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151811,18 +152743,18 @@ module.exports = OffsetPoint; /***/ }), -/* 1087 */ +/* 1098 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Point = __webpack_require__(4); -var CircleToCircle = __webpack_require__(201); +var CircleToCircle = __webpack_require__(202); /** * Checks if two Circles intersect and returns the intersection points as a Point object array. @@ -151905,18 +152837,18 @@ module.exports = GetCircleToCircle; /***/ }), -/* 1088 */ +/* 1099 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLineToCircle = __webpack_require__(203); -var CircleToRectangle = __webpack_require__(202); +var GetLineToCircle = __webpack_require__(204); +var CircleToRectangle = __webpack_require__(203); /** * Checks for intersection between a circle and a rectangle, @@ -151955,17 +152887,17 @@ module.exports = GetCircleToRectangle; /***/ }), -/* 1089 */ +/* 1100 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Rectangle = __webpack_require__(11); -var RectangleToRectangle = __webpack_require__(129); +var RectangleToRectangle = __webpack_require__(131); /** * Checks if two Rectangle shapes intersect and returns the area of this intersection as Rectangle object. @@ -152004,18 +152936,18 @@ module.exports = GetRectangleIntersection; /***/ }), -/* 1090 */ +/* 1101 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLineToRectangle = __webpack_require__(205); -var RectangleToRectangle = __webpack_require__(129); +var GetLineToRectangle = __webpack_require__(206); +var RectangleToRectangle = __webpack_require__(131); /** * Checks if two Rectangles intersect and returns the intersection points as a Point object array. @@ -152055,18 +152987,18 @@ module.exports = GetRectangleToRectangle; /***/ }), -/* 1091 */ +/* 1102 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RectangleToTriangle = __webpack_require__(411); -var GetLineToRectangle = __webpack_require__(205); +var RectangleToTriangle = __webpack_require__(425); +var GetLineToRectangle = __webpack_require__(206); /** * Checks for intersection between Rectangle shape and Triangle shape, @@ -152103,18 +153035,18 @@ module.exports = GetRectangleToTriangle; /***/ }), -/* 1092 */ +/* 1103 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLineToCircle = __webpack_require__(203); -var TriangleToCircle = __webpack_require__(413); +var GetLineToCircle = __webpack_require__(204); +var TriangleToCircle = __webpack_require__(427); /** * Checks if a Triangle and a Circle intersect, and returns the intersection points as a Point object array. @@ -152152,18 +153084,18 @@ module.exports = GetTriangleToCircle; /***/ }), -/* 1093 */ +/* 1104 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TriangleToTriangle = __webpack_require__(416); -var GetTriangleToLine = __webpack_require__(414); +var TriangleToTriangle = __webpack_require__(430); +var GetTriangleToLine = __webpack_require__(428); /** * Checks if two Triangles intersect, and returns the intersection points as a Point object array. @@ -152201,16 +153133,16 @@ module.exports = GetTriangleToTriangle; /***/ }), -/* 1094 */ +/* 1105 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PointToLine = __webpack_require__(418); +var PointToLine = __webpack_require__(432); /** * Checks if a Point is located on the given line segment. @@ -152242,12 +153174,12 @@ module.exports = PointToLineSegment; /***/ }), -/* 1095 */ +/* 1106 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152282,56 +153214,56 @@ module.exports = RectangleToValues; /***/ }), -/* 1096 */ +/* 1107 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Line = __webpack_require__(55); +var Line = __webpack_require__(56); Line.Angle = __webpack_require__(85); -Line.BresenhamPoints = __webpack_require__(271); -Line.CenterOn = __webpack_require__(1097); -Line.Clone = __webpack_require__(1098); -Line.CopyFrom = __webpack_require__(1099); -Line.Equals = __webpack_require__(1100); -Line.Extend = __webpack_require__(1101); -Line.GetMidPoint = __webpack_require__(1102); -Line.GetNearestPoint = __webpack_require__(1103); -Line.GetNormal = __webpack_require__(1104); -Line.GetPoint = __webpack_require__(258); -Line.GetPoints = __webpack_require__(148); -Line.GetShortestDistance = __webpack_require__(1105); -Line.Height = __webpack_require__(1106); -Line.Length = __webpack_require__(56); -Line.NormalAngle = __webpack_require__(419); -Line.NormalX = __webpack_require__(1107); -Line.NormalY = __webpack_require__(1108); -Line.Offset = __webpack_require__(1109); -Line.PerpSlope = __webpack_require__(1110); -Line.Random = __webpack_require__(149); -Line.ReflectAngle = __webpack_require__(1111); -Line.Rotate = __webpack_require__(1112); -Line.RotateAroundPoint = __webpack_require__(1113); -Line.RotateAroundXY = __webpack_require__(207); -Line.SetToAngle = __webpack_require__(1114); -Line.Slope = __webpack_require__(1115); -Line.Width = __webpack_require__(1116); +Line.BresenhamPoints = __webpack_require__(285); +Line.CenterOn = __webpack_require__(1108); +Line.Clone = __webpack_require__(1109); +Line.CopyFrom = __webpack_require__(1110); +Line.Equals = __webpack_require__(1111); +Line.Extend = __webpack_require__(1112); +Line.GetMidPoint = __webpack_require__(1113); +Line.GetNearestPoint = __webpack_require__(1114); +Line.GetNormal = __webpack_require__(1115); +Line.GetPoint = __webpack_require__(272); +Line.GetPoints = __webpack_require__(150); +Line.GetShortestDistance = __webpack_require__(1116); +Line.Height = __webpack_require__(1117); +Line.Length = __webpack_require__(57); +Line.NormalAngle = __webpack_require__(433); +Line.NormalX = __webpack_require__(1118); +Line.NormalY = __webpack_require__(1119); +Line.Offset = __webpack_require__(1120); +Line.PerpSlope = __webpack_require__(1121); +Line.Random = __webpack_require__(151); +Line.ReflectAngle = __webpack_require__(1122); +Line.Rotate = __webpack_require__(1123); +Line.RotateAroundPoint = __webpack_require__(1124); +Line.RotateAroundXY = __webpack_require__(208); +Line.SetToAngle = __webpack_require__(1125); +Line.Slope = __webpack_require__(1126); +Line.Width = __webpack_require__(1127); module.exports = Line; /***/ }), -/* 1097 */ +/* 1108 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152366,16 +153298,16 @@ module.exports = CenterOn; /***/ }), -/* 1098 */ +/* 1109 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Line = __webpack_require__(55); +var Line = __webpack_require__(56); /** * Clone the given line. @@ -152396,12 +153328,12 @@ module.exports = Clone; /***/ }), -/* 1099 */ +/* 1110 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152427,12 +153359,12 @@ module.exports = CopyFrom; /***/ }), -/* 1100 */ +/* 1111 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152461,16 +153393,16 @@ module.exports = Equals; /***/ }), -/* 1101 */ +/* 1112 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(56); +var Length = __webpack_require__(57); /** * Extends the start and end points of a Line by the given amounts. @@ -152519,12 +153451,12 @@ module.exports = Extend; /***/ }), -/* 1102 */ +/* 1113 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152557,13 +153489,13 @@ module.exports = GetMidPoint; /***/ }), -/* 1103 */ +/* 1114 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Florian Mertens - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152612,12 +153544,12 @@ module.exports = GetNearestPoint; /***/ }), -/* 1104 */ +/* 1115 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152656,13 +153588,13 @@ module.exports = GetNormal; /***/ }), -/* 1105 */ +/* 1116 */ /***/ (function(module, exports) { /** * @author Richard Davey * @author Florian Mertens - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152703,12 +153635,12 @@ module.exports = GetShortestDistance; /***/ }), -/* 1106 */ +/* 1117 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152731,12 +153663,12 @@ module.exports = Height; /***/ }), -/* 1107 */ +/* 1118 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152762,12 +153694,12 @@ module.exports = NormalX; /***/ }), -/* 1108 */ +/* 1119 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152794,12 +153726,12 @@ module.exports = NormalY; /***/ }), -/* 1109 */ +/* 1120 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152832,12 +153764,12 @@ module.exports = Offset; /***/ }), -/* 1110 */ +/* 1121 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152860,17 +153792,17 @@ module.exports = PerpSlope; /***/ }), -/* 1111 */ +/* 1122 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Angle = __webpack_require__(85); -var NormalAngle = __webpack_require__(419); +var NormalAngle = __webpack_require__(433); /** * Calculate the reflected angle between two lines. @@ -152894,16 +153826,16 @@ module.exports = ReflectAngle; /***/ }), -/* 1112 */ +/* 1123 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(207); +var RotateAroundXY = __webpack_require__(208); /** * Rotate a line around its midpoint by the given angle in radians. @@ -152930,16 +153862,16 @@ module.exports = Rotate; /***/ }), -/* 1113 */ +/* 1124 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(207); +var RotateAroundXY = __webpack_require__(208); /** * Rotate a line around a point by the given angle in radians. @@ -152964,12 +153896,12 @@ module.exports = RotateAroundPoint; /***/ }), -/* 1114 */ +/* 1125 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153004,12 +153936,12 @@ module.exports = SetToAngle; /***/ }), -/* 1115 */ +/* 1126 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153032,12 +153964,12 @@ module.exports = Slope; /***/ }), -/* 1116 */ +/* 1127 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153060,43 +153992,43 @@ module.exports = Width; /***/ }), -/* 1117 */ +/* 1128 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Point = __webpack_require__(4); -Point.Ceil = __webpack_require__(1118); -Point.Clone = __webpack_require__(1119); -Point.CopyFrom = __webpack_require__(1120); -Point.Equals = __webpack_require__(1121); -Point.Floor = __webpack_require__(1122); -Point.GetCentroid = __webpack_require__(1123); -Point.GetMagnitude = __webpack_require__(420); -Point.GetMagnitudeSq = __webpack_require__(421); -Point.GetRectangleFromPoints = __webpack_require__(1124); -Point.Interpolate = __webpack_require__(1125); -Point.Invert = __webpack_require__(1126); -Point.Negative = __webpack_require__(1127); -Point.Project = __webpack_require__(1128); -Point.ProjectUnit = __webpack_require__(1129); -Point.SetMagnitude = __webpack_require__(1130); +Point.Ceil = __webpack_require__(1129); +Point.Clone = __webpack_require__(1130); +Point.CopyFrom = __webpack_require__(1131); +Point.Equals = __webpack_require__(1132); +Point.Floor = __webpack_require__(1133); +Point.GetCentroid = __webpack_require__(1134); +Point.GetMagnitude = __webpack_require__(434); +Point.GetMagnitudeSq = __webpack_require__(435); +Point.GetRectangleFromPoints = __webpack_require__(1135); +Point.Interpolate = __webpack_require__(1136); +Point.Invert = __webpack_require__(1137); +Point.Negative = __webpack_require__(1138); +Point.Project = __webpack_require__(1139); +Point.ProjectUnit = __webpack_require__(1140); +Point.SetMagnitude = __webpack_require__(1141); module.exports = Point; /***/ }), -/* 1118 */ +/* 1129 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153121,12 +154053,12 @@ module.exports = Ceil; /***/ }), -/* 1119 */ +/* 1130 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153151,12 +154083,12 @@ module.exports = Clone; /***/ }), -/* 1120 */ +/* 1131 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153182,12 +154114,12 @@ module.exports = CopyFrom; /***/ }), -/* 1121 */ +/* 1132 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153211,12 +154143,12 @@ module.exports = Equals; /***/ }), -/* 1122 */ +/* 1133 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153241,12 +154173,12 @@ module.exports = Floor; /***/ }), -/* 1123 */ +/* 1134 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153305,12 +154237,12 @@ module.exports = GetCentroid; /***/ }), -/* 1124 */ +/* 1135 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153375,12 +154307,12 @@ module.exports = GetRectangleFromPoints; /***/ }), -/* 1125 */ +/* 1136 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153416,12 +154348,12 @@ module.exports = Interpolate; /***/ }), -/* 1126 */ +/* 1137 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153446,12 +154378,12 @@ module.exports = Invert; /***/ }), -/* 1127 */ +/* 1138 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153481,17 +154413,17 @@ module.exports = Negative; /***/ }), -/* 1128 */ +/* 1139 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Point = __webpack_require__(4); -var GetMagnitudeSq = __webpack_require__(421); +var GetMagnitudeSq = __webpack_require__(435); /** * [description] @@ -153527,12 +154459,12 @@ module.exports = Project; /***/ }), -/* 1129 */ +/* 1140 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153571,16 +154503,16 @@ module.exports = ProjectUnit; /***/ }), -/* 1130 */ +/* 1141 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetMagnitude = __webpack_require__(420); +var GetMagnitude = __webpack_require__(434); /** * Changes the magnitude (length) of a two-dimensional vector without changing its direction. @@ -153615,41 +154547,41 @@ module.exports = SetMagnitude; /***/ }), -/* 1131 */ +/* 1142 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Polygon = __webpack_require__(197); +var Polygon = __webpack_require__(198); -Polygon.Clone = __webpack_require__(1132); -Polygon.Contains = __webpack_require__(198); -Polygon.ContainsPoint = __webpack_require__(1133); -Polygon.GetAABB = __webpack_require__(396); -Polygon.GetNumberArray = __webpack_require__(1134); -Polygon.GetPoints = __webpack_require__(397); -Polygon.Perimeter = __webpack_require__(398); -Polygon.Reverse = __webpack_require__(1135); -Polygon.Smooth = __webpack_require__(399); +Polygon.Clone = __webpack_require__(1143); +Polygon.Contains = __webpack_require__(199); +Polygon.ContainsPoint = __webpack_require__(1144); +Polygon.GetAABB = __webpack_require__(410); +Polygon.GetNumberArray = __webpack_require__(1145); +Polygon.GetPoints = __webpack_require__(411); +Polygon.Perimeter = __webpack_require__(412); +Polygon.Reverse = __webpack_require__(1146); +Polygon.Smooth = __webpack_require__(413); module.exports = Polygon; /***/ }), -/* 1132 */ +/* 1143 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Polygon = __webpack_require__(197); +var Polygon = __webpack_require__(198); /** * Create a new polygon which is a copy of the specified polygon @@ -153670,16 +154602,16 @@ module.exports = Clone; /***/ }), -/* 1133 */ +/* 1144 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(198); +var Contains = __webpack_require__(199); /** * [description] @@ -153701,12 +154633,12 @@ module.exports = ContainsPoint; /***/ }), -/* 1134 */ +/* 1145 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153744,12 +154676,12 @@ module.exports = GetNumberArray; /***/ }), -/* 1135 */ +/* 1146 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153776,12 +154708,12 @@ module.exports = Reverse; /***/ }), -/* 1136 */ +/* 1147 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153804,12 +154736,12 @@ module.exports = Area; /***/ }), -/* 1137 */ +/* 1148 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153837,12 +154769,12 @@ module.exports = Ceil; /***/ }), -/* 1138 */ +/* 1149 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153872,12 +154804,12 @@ module.exports = CeilAll; /***/ }), -/* 1139 */ +/* 1150 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153902,12 +154834,12 @@ module.exports = Clone; /***/ }), -/* 1140 */ +/* 1151 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153933,12 +154865,12 @@ module.exports = ContainsPoint; /***/ }), -/* 1141 */ +/* 1152 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153964,12 +154896,12 @@ module.exports = CopyFrom; /***/ }), -/* 1142 */ +/* 1153 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153998,16 +154930,16 @@ module.exports = Equals; /***/ }), -/* 1143 */ +/* 1154 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetAspectRatio = __webpack_require__(208); +var GetAspectRatio = __webpack_require__(209); /** * Adjusts the target rectangle, changing its width, height and position, @@ -154051,16 +154983,16 @@ module.exports = FitInside; /***/ }), -/* 1144 */ +/* 1155 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetAspectRatio = __webpack_require__(208); +var GetAspectRatio = __webpack_require__(209); /** * Adjusts the target rectangle, changing its width, height and position, @@ -154104,12 +155036,12 @@ module.exports = FitOutside; /***/ }), -/* 1145 */ +/* 1156 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154137,12 +155069,12 @@ module.exports = Floor; /***/ }), -/* 1146 */ +/* 1157 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154172,12 +155104,12 @@ module.exports = FloorAll; /***/ }), -/* 1147 */ +/* 1158 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154210,12 +155142,12 @@ module.exports = GetCenter; /***/ }), -/* 1148 */ +/* 1159 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154250,16 +155182,16 @@ module.exports = GetSize; /***/ }), -/* 1149 */ +/* 1160 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CenterOn = __webpack_require__(163); +var CenterOn = __webpack_require__(165); /** @@ -154292,17 +155224,17 @@ module.exports = Inflate; /***/ }), -/* 1150 */ +/* 1161 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Rectangle = __webpack_require__(11); -var Intersects = __webpack_require__(129); +var Intersects = __webpack_require__(131); /** * Takes two Rectangles and first checks to see if they intersect. @@ -154343,12 +155275,12 @@ module.exports = Intersection; /***/ }), -/* 1151 */ +/* 1162 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154392,12 +155324,12 @@ module.exports = MergePoints; /***/ }), -/* 1152 */ +/* 1163 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154439,12 +155371,12 @@ module.exports = MergeRect; /***/ }), -/* 1153 */ +/* 1164 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154483,12 +155415,12 @@ module.exports = MergeXY; /***/ }), -/* 1154 */ +/* 1165 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154518,12 +155450,12 @@ module.exports = Offset; /***/ }), -/* 1155 */ +/* 1166 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154552,12 +155484,12 @@ module.exports = OffsetPoint; /***/ }), -/* 1156 */ +/* 1167 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154586,12 +155518,12 @@ module.exports = Overlaps; /***/ }), -/* 1157 */ +/* 1168 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154643,17 +155575,17 @@ module.exports = PerimeterPoint; /***/ }), -/* 1158 */ +/* 1169 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Between = __webpack_require__(169); -var ContainsRect = __webpack_require__(423); +var Between = __webpack_require__(170); +var ContainsRect = __webpack_require__(437); var Point = __webpack_require__(4); /** @@ -154714,12 +155646,12 @@ module.exports = RandomOutside; /***/ }), -/* 1159 */ +/* 1170 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154743,12 +155675,12 @@ module.exports = SameDimensions; /***/ }), -/* 1160 */ +/* 1171 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154782,52 +155714,52 @@ module.exports = Scale; /***/ }), -/* 1161 */ +/* 1172 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Triangle = __webpack_require__(71); -Triangle.Area = __webpack_require__(1162); -Triangle.BuildEquilateral = __webpack_require__(1163); -Triangle.BuildFromPolygon = __webpack_require__(1164); -Triangle.BuildRight = __webpack_require__(1165); -Triangle.CenterOn = __webpack_require__(1166); -Triangle.Centroid = __webpack_require__(424); -Triangle.CircumCenter = __webpack_require__(1167); -Triangle.CircumCircle = __webpack_require__(1168); -Triangle.Clone = __webpack_require__(1169); +Triangle.Area = __webpack_require__(1173); +Triangle.BuildEquilateral = __webpack_require__(1174); +Triangle.BuildFromPolygon = __webpack_require__(1175); +Triangle.BuildRight = __webpack_require__(1176); +Triangle.CenterOn = __webpack_require__(1177); +Triangle.Centroid = __webpack_require__(438); +Triangle.CircumCenter = __webpack_require__(1178); +Triangle.CircumCircle = __webpack_require__(1179); +Triangle.Clone = __webpack_require__(1180); Triangle.Contains = __webpack_require__(83); -Triangle.ContainsArray = __webpack_require__(206); -Triangle.ContainsPoint = __webpack_require__(1170); -Triangle.CopyFrom = __webpack_require__(1171); -Triangle.Decompose = __webpack_require__(417); -Triangle.Equals = __webpack_require__(1172); -Triangle.GetPoint = __webpack_require__(403); -Triangle.GetPoints = __webpack_require__(404); -Triangle.InCenter = __webpack_require__(426); -Triangle.Perimeter = __webpack_require__(1173); -Triangle.Offset = __webpack_require__(425); -Triangle.Random = __webpack_require__(153); -Triangle.Rotate = __webpack_require__(1174); -Triangle.RotateAroundPoint = __webpack_require__(1175); -Triangle.RotateAroundXY = __webpack_require__(209); +Triangle.ContainsArray = __webpack_require__(207); +Triangle.ContainsPoint = __webpack_require__(1181); +Triangle.CopyFrom = __webpack_require__(1182); +Triangle.Decompose = __webpack_require__(431); +Triangle.Equals = __webpack_require__(1183); +Triangle.GetPoint = __webpack_require__(417); +Triangle.GetPoints = __webpack_require__(418); +Triangle.InCenter = __webpack_require__(440); +Triangle.Perimeter = __webpack_require__(1184); +Triangle.Offset = __webpack_require__(439); +Triangle.Random = __webpack_require__(155); +Triangle.Rotate = __webpack_require__(1185); +Triangle.RotateAroundPoint = __webpack_require__(1186); +Triangle.RotateAroundXY = __webpack_require__(210); module.exports = Triangle; /***/ }), -/* 1162 */ +/* 1173 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154861,12 +155793,12 @@ module.exports = Area; /***/ }), -/* 1163 */ +/* 1174 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154905,12 +155837,12 @@ module.exports = BuildEquilateral; /***/ }), -/* 1164 */ +/* 1175 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154980,12 +155912,12 @@ module.exports = BuildFromPolygon; /***/ }), -/* 1165 */ +/* 1176 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155029,17 +155961,17 @@ module.exports = BuildRight; /***/ }), -/* 1166 */ +/* 1177 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Centroid = __webpack_require__(424); -var Offset = __webpack_require__(425); +var Centroid = __webpack_require__(438); +var Offset = __webpack_require__(439); /** * @callback CenterFunction @@ -155082,12 +156014,12 @@ module.exports = CenterOn; /***/ }), -/* 1167 */ +/* 1178 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155158,12 +156090,12 @@ module.exports = CircumCenter; /***/ }), -/* 1168 */ +/* 1179 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155241,12 +156173,12 @@ module.exports = CircumCircle; /***/ }), -/* 1169 */ +/* 1180 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155271,12 +156203,12 @@ module.exports = Clone; /***/ }), -/* 1170 */ +/* 1181 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155302,12 +156234,12 @@ module.exports = ContainsPoint; /***/ }), -/* 1171 */ +/* 1182 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155333,12 +156265,12 @@ module.exports = CopyFrom; /***/ }), -/* 1172 */ +/* 1183 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155369,16 +156301,16 @@ module.exports = Equals; /***/ }), -/* 1173 */ +/* 1184 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(56); +var Length = __webpack_require__(57); // The 2D area of a triangle. The area value is always non-negative. @@ -155405,17 +156337,17 @@ module.exports = Perimeter; /***/ }), -/* 1174 */ +/* 1185 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(209); -var InCenter = __webpack_require__(426); +var RotateAroundXY = __webpack_require__(210); +var InCenter = __webpack_require__(440); /** * Rotates a Triangle about its incenter, which is the point at which its three angle bisectors meet. @@ -155441,16 +156373,16 @@ module.exports = Rotate; /***/ }), -/* 1175 */ +/* 1186 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(209); +var RotateAroundXY = __webpack_require__(210); /** * Rotates a Triangle at a certain angle about a given Point or object with public `x` and `y` properties. @@ -155475,16 +156407,16 @@ module.exports = RotateAroundPoint; /***/ }), -/* 1176 */ +/* 1187 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(176); +var CONST = __webpack_require__(177); var Extend = __webpack_require__(17); /** @@ -155493,16 +156425,16 @@ var Extend = __webpack_require__(17); var Input = { - CreateInteractiveObject: __webpack_require__(427), - Events: __webpack_require__(53), - Gamepad: __webpack_require__(1177), - InputManager: __webpack_require__(345), - InputPlugin: __webpack_require__(1189), - InputPluginCache: __webpack_require__(130), - Keyboard: __webpack_require__(1191), - Mouse: __webpack_require__(1208), - Pointer: __webpack_require__(348), - Touch: __webpack_require__(1209) + CreateInteractiveObject: __webpack_require__(441), + Events: __webpack_require__(54), + Gamepad: __webpack_require__(1188), + InputManager: __webpack_require__(359), + InputPlugin: __webpack_require__(1200), + InputPluginCache: __webpack_require__(132), + Keyboard: __webpack_require__(1202), + Mouse: __webpack_require__(1219), + Pointer: __webpack_require__(362), + Touch: __webpack_require__(1220) }; @@ -155513,12 +156445,12 @@ module.exports = Input; /***/ }), -/* 1177 */ +/* 1188 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155528,23 +156460,23 @@ module.exports = Input; module.exports = { - Axis: __webpack_require__(428), - Button: __webpack_require__(429), - Events: __webpack_require__(210), - Gamepad: __webpack_require__(430), - GamepadPlugin: __webpack_require__(1184), + Axis: __webpack_require__(442), + Button: __webpack_require__(443), + Events: __webpack_require__(211), + Gamepad: __webpack_require__(444), + GamepadPlugin: __webpack_require__(1195), - Configs: __webpack_require__(1185) + Configs: __webpack_require__(1196) }; /***/ }), -/* 1178 */ +/* 1189 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155568,12 +156500,12 @@ module.exports = 'down'; /***/ }), -/* 1179 */ +/* 1190 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155597,12 +156529,12 @@ module.exports = 'up'; /***/ }), -/* 1180 */ +/* 1191 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155628,12 +156560,12 @@ module.exports = 'connected'; /***/ }), -/* 1181 */ +/* 1192 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155654,12 +156586,12 @@ module.exports = 'disconnected'; /***/ }), -/* 1182 */ +/* 1193 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155686,12 +156618,12 @@ module.exports = 'down'; /***/ }), -/* 1183 */ +/* 1194 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155718,22 +156650,22 @@ module.exports = 'up'; /***/ }), -/* 1184 */ +/* 1195 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(210); -var Gamepad = __webpack_require__(430); +var Events = __webpack_require__(211); +var Gamepad = __webpack_require__(444); var GetValue = __webpack_require__(6); -var InputPluginCache = __webpack_require__(130); -var InputEvents = __webpack_require__(53); +var InputPluginCache = __webpack_require__(132); +var InputEvents = __webpack_require__(54); /** * @classdesc @@ -156356,12 +157288,12 @@ module.exports = GamepadPlugin; /***/ }), -/* 1185 */ +/* 1196 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -156371,20 +157303,20 @@ module.exports = GamepadPlugin; module.exports = { - DUALSHOCK_4: __webpack_require__(1186), - SNES_USB: __webpack_require__(1187), - XBOX_360: __webpack_require__(1188) + DUALSHOCK_4: __webpack_require__(1197), + SNES_USB: __webpack_require__(1198), + XBOX_360: __webpack_require__(1199) }; /***/ }), -/* 1186 */ +/* 1197 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -156429,12 +157361,12 @@ module.exports = { /***/ }), -/* 1187 */ +/* 1198 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -156468,12 +157400,12 @@ module.exports = { /***/ }), -/* 1188 */ +/* 1199 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -156519,34 +157451,34 @@ module.exports = { /***/ }), -/* 1189 */ +/* 1200 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Circle = __webpack_require__(65); -var CircleContains = __webpack_require__(54); +var CircleContains = __webpack_require__(55); var Class = __webpack_require__(0); -var CONST = __webpack_require__(176); -var CreateInteractiveObject = __webpack_require__(427); -var CreatePixelPerfectHandler = __webpack_require__(1190); -var DistanceBetween = __webpack_require__(58); +var CONST = __webpack_require__(177); +var CreateInteractiveObject = __webpack_require__(441); +var CreatePixelPerfectHandler = __webpack_require__(1201); +var DistanceBetween = __webpack_require__(53); var Ellipse = __webpack_require__(95); var EllipseContains = __webpack_require__(96); -var Events = __webpack_require__(53); +var Events = __webpack_require__(54); var EventEmitter = __webpack_require__(9); var GetFastValue = __webpack_require__(2); var GEOM_CONST = __webpack_require__(46); -var InputPluginCache = __webpack_require__(130); +var InputPluginCache = __webpack_require__(132); var IsPlainObject = __webpack_require__(7); -var PluginCache = __webpack_require__(21); +var PluginCache = __webpack_require__(23); var Rectangle = __webpack_require__(11); var RectangleContains = __webpack_require__(47); -var SceneEvents = __webpack_require__(22); +var SceneEvents = __webpack_require__(19); var Triangle = __webpack_require__(71); var TriangleContains = __webpack_require__(83); @@ -159671,12 +160603,12 @@ module.exports = InputPlugin; /***/ }), -/* 1190 */ +/* 1201 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159707,12 +160639,12 @@ module.exports = CreatePixelPerfectHandler; /***/ }), -/* 1191 */ +/* 1202 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159722,31 +160654,31 @@ module.exports = CreatePixelPerfectHandler; module.exports = { - Events: __webpack_require__(131), + Events: __webpack_require__(133), - KeyboardManager: __webpack_require__(346), - KeyboardPlugin: __webpack_require__(1199), + KeyboardManager: __webpack_require__(360), + KeyboardPlugin: __webpack_require__(1210), - Key: __webpack_require__(431), - KeyCodes: __webpack_require__(120), + Key: __webpack_require__(445), + KeyCodes: __webpack_require__(122), - KeyCombo: __webpack_require__(432), + KeyCombo: __webpack_require__(446), - JustDown: __webpack_require__(1204), - JustUp: __webpack_require__(1205), - DownDuration: __webpack_require__(1206), - UpDuration: __webpack_require__(1207) + JustDown: __webpack_require__(1215), + JustUp: __webpack_require__(1216), + DownDuration: __webpack_require__(1217), + UpDuration: __webpack_require__(1218) }; /***/ }), -/* 1192 */ +/* 1203 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159777,12 +160709,12 @@ module.exports = 'keydown'; /***/ }), -/* 1193 */ +/* 1204 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159806,12 +160738,12 @@ module.exports = 'keyup'; /***/ }), -/* 1194 */ +/* 1205 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159840,12 +160772,12 @@ module.exports = 'keycombomatch'; /***/ }), -/* 1195 */ +/* 1206 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159874,12 +160806,12 @@ module.exports = 'down'; /***/ }), -/* 1196 */ +/* 1207 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159913,12 +160845,12 @@ module.exports = 'keydown-'; /***/ }), -/* 1197 */ +/* 1208 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159945,12 +160877,12 @@ module.exports = 'keyup-'; /***/ }), -/* 1198 */ +/* 1209 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159979,26 +160911,26 @@ module.exports = 'up'; /***/ }), -/* 1199 */ +/* 1210 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(131); +var Events = __webpack_require__(133); var GameEvents = __webpack_require__(18); var GetValue = __webpack_require__(6); -var InputEvents = __webpack_require__(53); -var InputPluginCache = __webpack_require__(130); -var Key = __webpack_require__(431); -var KeyCodes = __webpack_require__(120); -var KeyCombo = __webpack_require__(432); -var KeyMap = __webpack_require__(1203); +var InputEvents = __webpack_require__(54); +var InputPluginCache = __webpack_require__(132); +var Key = __webpack_require__(445); +var KeyCodes = __webpack_require__(122); +var KeyCombo = __webpack_require__(446); +var KeyMap = __webpack_require__(1214); var SnapFloor = __webpack_require__(93); /** @@ -160865,16 +161797,16 @@ module.exports = KeyboardPlugin; /***/ }), -/* 1200 */ +/* 1211 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AdvanceKeyCombo = __webpack_require__(1201); +var AdvanceKeyCombo = __webpack_require__(1212); /** * Used internally by the KeyCombo class. @@ -160946,12 +161878,12 @@ module.exports = ProcessKeyCombo; /***/ }), -/* 1201 */ +/* 1212 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -160988,12 +161920,12 @@ module.exports = AdvanceKeyCombo; /***/ }), -/* 1202 */ +/* 1213 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -161023,16 +161955,16 @@ module.exports = ResetKeyCombo; /***/ }), -/* 1203 */ +/* 1214 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var KeyCodes = __webpack_require__(120); +var KeyCodes = __webpack_require__(122); var KeyMap = {}; @@ -161045,12 +161977,12 @@ module.exports = KeyMap; /***/ }), -/* 1204 */ +/* 1215 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -161087,12 +162019,12 @@ module.exports = JustDown; /***/ }), -/* 1205 */ +/* 1216 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -161129,12 +162061,12 @@ module.exports = JustUp; /***/ }), -/* 1206 */ +/* 1217 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -161163,12 +162095,12 @@ module.exports = DownDuration; /***/ }), -/* 1207 */ +/* 1218 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -161197,12 +162129,12 @@ module.exports = UpDuration; /***/ }), -/* 1208 */ +/* 1219 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -161213,19 +162145,19 @@ module.exports = UpDuration; /* eslint-disable */ module.exports = { - MouseManager: __webpack_require__(347) + MouseManager: __webpack_require__(361) }; /* eslint-enable */ /***/ }), -/* 1209 */ +/* 1220 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -161236,23 +162168,23 @@ module.exports = { /* eslint-disable */ module.exports = { - TouchManager: __webpack_require__(349) + TouchManager: __webpack_require__(363) }; /* eslint-enable */ /***/ }), -/* 1210 */ +/* 1221 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(19); +var CONST = __webpack_require__(20); var Extend = __webpack_require__(17); /** @@ -161263,16 +162195,16 @@ var Loader = { Events: __webpack_require__(81), - FileTypes: __webpack_require__(1211), + FileTypes: __webpack_require__(1222), - File: __webpack_require__(20), + File: __webpack_require__(21), FileTypesManager: __webpack_require__(8), - GetURL: __webpack_require__(132), - LoaderPlugin: __webpack_require__(1235), - MergeXHRSettings: __webpack_require__(211), + GetURL: __webpack_require__(134), + LoaderPlugin: __webpack_require__(1246), + MergeXHRSettings: __webpack_require__(212), MultiFile: __webpack_require__(61), - XHRLoader: __webpack_require__(433), - XHRSettings: __webpack_require__(133) + XHRLoader: __webpack_require__(447), + XHRSettings: __webpack_require__(135) }; @@ -161283,12 +162215,12 @@ module.exports = Loader; /***/ }), -/* 1211 */ +/* 1222 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -161298,47 +162230,47 @@ module.exports = Loader; module.exports = { - AnimationJSONFile: __webpack_require__(1212), - AtlasJSONFile: __webpack_require__(1213), - AtlasXMLFile: __webpack_require__(1214), - AudioFile: __webpack_require__(434), - AudioSpriteFile: __webpack_require__(1215), - BinaryFile: __webpack_require__(1216), - BitmapFontFile: __webpack_require__(1217), - CSSFile: __webpack_require__(1218), - GLSLFile: __webpack_require__(1219), - HTML5AudioFile: __webpack_require__(435), - HTMLFile: __webpack_require__(1220), - HTMLTextureFile: __webpack_require__(1221), + AnimationJSONFile: __webpack_require__(1223), + AtlasJSONFile: __webpack_require__(1224), + AtlasXMLFile: __webpack_require__(1225), + AudioFile: __webpack_require__(448), + AudioSpriteFile: __webpack_require__(1226), + BinaryFile: __webpack_require__(1227), + BitmapFontFile: __webpack_require__(1228), + CSSFile: __webpack_require__(1229), + GLSLFile: __webpack_require__(1230), + HTML5AudioFile: __webpack_require__(449), + HTMLFile: __webpack_require__(1231), + HTMLTextureFile: __webpack_require__(1232), ImageFile: __webpack_require__(72), JSONFile: __webpack_require__(60), - MultiAtlasFile: __webpack_require__(1222), - MultiScriptFile: __webpack_require__(1223), - PackFile: __webpack_require__(1224), - PluginFile: __webpack_require__(1225), - SceneFile: __webpack_require__(1226), - ScenePluginFile: __webpack_require__(1227), - ScriptFile: __webpack_require__(436), - SpriteSheetFile: __webpack_require__(1228), - SVGFile: __webpack_require__(1229), - TextFile: __webpack_require__(437), - TilemapCSVFile: __webpack_require__(1230), - TilemapImpactFile: __webpack_require__(1231), - TilemapJSONFile: __webpack_require__(1232), - UnityAtlasFile: __webpack_require__(1233), - VideoFile: __webpack_require__(1234), - XMLFile: __webpack_require__(212) + MultiAtlasFile: __webpack_require__(1233), + MultiScriptFile: __webpack_require__(1234), + PackFile: __webpack_require__(1235), + PluginFile: __webpack_require__(1236), + SceneFile: __webpack_require__(1237), + ScenePluginFile: __webpack_require__(1238), + ScriptFile: __webpack_require__(450), + SpriteSheetFile: __webpack_require__(1239), + SVGFile: __webpack_require__(1240), + TextFile: __webpack_require__(451), + TilemapCSVFile: __webpack_require__(1241), + TilemapImpactFile: __webpack_require__(1242), + TilemapJSONFile: __webpack_require__(1243), + UnityAtlasFile: __webpack_require__(1244), + VideoFile: __webpack_require__(1245), + XMLFile: __webpack_require__(213) }; /***/ }), -/* 1212 */ +/* 1223 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -161536,12 +162468,12 @@ module.exports = AnimationJSONFile; /***/ }), -/* 1213 */ +/* 1224 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -161785,12 +162717,12 @@ module.exports = AtlasJSONFile; /***/ }), -/* 1214 */ +/* 1225 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -161800,7 +162732,7 @@ var GetFastValue = __webpack_require__(2); var ImageFile = __webpack_require__(72); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(61); -var XMLFile = __webpack_require__(212); +var XMLFile = __webpack_require__(213); /** * @classdesc @@ -162028,16 +162960,16 @@ module.exports = AtlasXMLFile; /***/ }), -/* 1215 */ +/* 1226 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AudioFile = __webpack_require__(434); +var AudioFile = __webpack_require__(448); var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -162318,18 +163250,18 @@ FileTypesManager.register('audioSprite', function (key, jsonURL, audioURL, audio /***/ }), -/* 1216 */ +/* 1227 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var File = __webpack_require__(20); +var CONST = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -162500,12 +163432,12 @@ module.exports = BinaryFile; /***/ }), -/* 1217 */ +/* 1228 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -162515,8 +163447,8 @@ var GetFastValue = __webpack_require__(2); var ImageFile = __webpack_require__(72); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(61); -var ParseXMLBitmapFont = __webpack_require__(184); -var XMLFile = __webpack_require__(212); +var ParseXMLBitmapFont = __webpack_require__(185); +var XMLFile = __webpack_require__(213); /** * @classdesc @@ -162743,18 +163675,18 @@ module.exports = BitmapFontFile; /***/ }), -/* 1218 */ +/* 1229 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var File = __webpack_require__(20); +var CONST = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -162911,22 +163843,22 @@ module.exports = CSSFile; /***/ }), -/* 1219 */ +/* 1230 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var File = __webpack_require__(20); +var CONST = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); -var Shader = __webpack_require__(333); +var Shader = __webpack_require__(347); /** * @classdesc @@ -163322,18 +164254,18 @@ module.exports = GLSLFile; /***/ }), -/* 1220 */ +/* 1231 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var File = __webpack_require__(20); +var CONST = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -163497,18 +164429,18 @@ module.exports = HTMLFile; /***/ }), -/* 1221 */ +/* 1232 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var File = __webpack_require__(20); +var CONST = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -163755,12 +164687,12 @@ module.exports = HTMLTextureFile; /***/ }), -/* 1222 */ +/* 1233 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -163787,7 +164719,7 @@ var MultiFile = __webpack_require__(61); * @since 3.7.0 * * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file. - * @param {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager. + * @param {(string|Phaser.Types.Loader.FileTypes.MultiAtlasFileConfig)} key - The key of the file. Must be unique within both the Loader and the Texture Manager. Or a config object. * @param {string} [atlasURL] - The absolute or relative URL to load the multi atlas json file from. * @param {string} [path] - Optional path to use when loading the textures defined in the atlas data. * @param {string} [baseURL] - Optional Base URL to use when loading the textures defined in the atlas data. @@ -163807,7 +164739,16 @@ var MultiAtlasFile = new Class({ var config = key; key = GetFastValue(config, 'key'); - atlasURL = GetFastValue(config, 'url'); + + if (GetFastValue(config, 'url', false)) + { + atlasURL = GetFastValue(config, 'url'); + } + else + { + atlasURL = GetFastValue(config, 'atlasURL'); + } + atlasXhrSettings = GetFastValue(config, 'xhrSettings'); path = GetFastValue(config, 'path'); baseURL = GetFastValue(config, 'baseURL'); @@ -164079,12 +165020,12 @@ module.exports = MultiAtlasFile; /***/ }), -/* 1223 */ +/* 1234 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -164093,7 +165034,7 @@ var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(61); -var ScriptFile = __webpack_require__(436); +var ScriptFile = __webpack_require__(450); /** * @classdesc @@ -164296,17 +165237,17 @@ module.exports = MultiScriptFile; /***/ }), -/* 1224 */ +/* 1235 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); +var CONST = __webpack_require__(20); var FileTypesManager = __webpack_require__(8); var JSONFile = __webpack_require__(60); @@ -164514,18 +165455,18 @@ module.exports = PackFile; /***/ }), -/* 1225 */ +/* 1236 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var File = __webpack_require__(20); +var CONST = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -164726,18 +165667,18 @@ module.exports = PluginFile; /***/ }), -/* 1226 */ +/* 1237 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var File = __webpack_require__(20); +var CONST = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -164947,18 +165888,18 @@ module.exports = SceneFile; /***/ }), -/* 1227 */ +/* 1238 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var File = __webpack_require__(20); +var CONST = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -165153,12 +166094,12 @@ module.exports = ScenePluginFile; /***/ }), -/* 1228 */ +/* 1239 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -165344,18 +166285,18 @@ module.exports = SpriteSheetFile; /***/ }), -/* 1229 */ +/* 1240 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var File = __webpack_require__(20); +var CONST = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -165683,18 +166624,18 @@ module.exports = SVGFile; /***/ }), -/* 1230 */ +/* 1241 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var File = __webpack_require__(20); +var CONST = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -165878,12 +166819,12 @@ module.exports = TilemapCSVFile; /***/ }), -/* 1231 */ +/* 1242 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -166034,12 +166975,12 @@ module.exports = TilemapImpactFile; /***/ }), -/* 1232 */ +/* 1243 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -166190,12 +167131,12 @@ module.exports = TilemapJSONFile; /***/ }), -/* 1233 */ +/* 1244 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -166205,7 +167146,7 @@ var GetFastValue = __webpack_require__(2); var ImageFile = __webpack_require__(72); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(61); -var TextFile = __webpack_require__(437); +var TextFile = __webpack_require__(451); /** * @classdesc @@ -166432,20 +167373,20 @@ module.exports = UnityAtlasFile; /***/ }), -/* 1234 */ +/* 1245 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var CONST = __webpack_require__(29); -var File = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); -var GetURL = __webpack_require__(132); +var GetURL = __webpack_require__(134); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -166823,25 +167764,25 @@ module.exports = VideoFile; /***/ }), -/* 1235 */ +/* 1246 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var CustomSet = __webpack_require__(107); +var CONST = __webpack_require__(20); +var CustomSet = __webpack_require__(108); var EventEmitter = __webpack_require__(9); var Events = __webpack_require__(81); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); -var PluginCache = __webpack_require__(21); -var SceneEvents = __webpack_require__(22); -var XHRSettings = __webpack_require__(133); +var PluginCache = __webpack_require__(23); +var SceneEvents = __webpack_require__(19); +var XHRSettings = __webpack_require__(135); /** * @classdesc @@ -167900,12 +168841,12 @@ module.exports = LoaderPlugin; /***/ }), -/* 1236 */ +/* 1247 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167925,18 +168866,18 @@ var Extend = __webpack_require__(17); var Arcade = { - ArcadePhysics: __webpack_require__(1237), - Body: __webpack_require__(444), - Collider: __webpack_require__(445), - Components: __webpack_require__(213), - Events: __webpack_require__(214), - Factory: __webpack_require__(438), - Group: __webpack_require__(440), - Image: __webpack_require__(439), - Sprite: __webpack_require__(134), - StaticBody: __webpack_require__(450), - StaticGroup: __webpack_require__(441), - World: __webpack_require__(443) + ArcadePhysics: __webpack_require__(1248), + Body: __webpack_require__(458), + Collider: __webpack_require__(459), + Components: __webpack_require__(214), + Events: __webpack_require__(215), + Factory: __webpack_require__(452), + Group: __webpack_require__(454), + Image: __webpack_require__(453), + Sprite: __webpack_require__(136), + StaticBody: __webpack_require__(464), + StaticGroup: __webpack_require__(455), + World: __webpack_require__(457) }; @@ -167947,28 +168888,28 @@ module.exports = Arcade; /***/ }), -/* 1237 */ +/* 1248 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var DegToRad = __webpack_require__(35); -var DistanceBetween = __webpack_require__(58); -var DistanceSquared = __webpack_require__(302); -var Factory = __webpack_require__(438); +var DistanceBetween = __webpack_require__(53); +var DistanceSquared = __webpack_require__(316); +var Factory = __webpack_require__(452); var GetFastValue = __webpack_require__(2); -var Merge = __webpack_require__(106); -var OverlapCirc = __webpack_require__(1250); -var OverlapRect = __webpack_require__(442); -var PluginCache = __webpack_require__(21); -var SceneEvents = __webpack_require__(22); +var Merge = __webpack_require__(107); +var OverlapCirc = __webpack_require__(1261); +var OverlapRect = __webpack_require__(456); +var PluginCache = __webpack_require__(23); +var SceneEvents = __webpack_require__(19); var Vector2 = __webpack_require__(3); -var World = __webpack_require__(443); +var World = __webpack_require__(457); /** * @classdesc @@ -168636,12 +169577,12 @@ module.exports = ArcadePhysics; /***/ }), -/* 1238 */ +/* 1249 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -168711,12 +169652,12 @@ module.exports = Acceleration; /***/ }), -/* 1239 */ +/* 1250 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -168793,12 +169734,12 @@ module.exports = Angular; /***/ }), -/* 1240 */ +/* 1251 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -168868,7 +169809,7 @@ var Bounce = { /** * Sets whether this Body collides with the world boundary. * - * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Vec2 first. + * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Phaser.Math.Vector2 first. * * @method Phaser.Physics.Arcade.Components.Bounce#setCollideWorldBounds * @since 3.0.0 @@ -168892,12 +169833,12 @@ module.exports = Bounce; /***/ }), -/* 1241 */ +/* 1252 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169019,12 +169960,12 @@ module.exports = Debug; /***/ }), -/* 1242 */ +/* 1253 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169152,12 +170093,12 @@ module.exports = Drag; /***/ }), -/* 1243 */ +/* 1254 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169276,12 +170217,12 @@ module.exports = Enable; /***/ }), -/* 1244 */ +/* 1255 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169354,12 +170295,12 @@ module.exports = Friction; /***/ }), -/* 1245 */ +/* 1256 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169432,12 +170373,12 @@ module.exports = Gravity; /***/ }), -/* 1246 */ +/* 1257 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169474,12 +170415,12 @@ module.exports = Immovable; /***/ }), -/* 1247 */ +/* 1258 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169514,12 +170455,12 @@ module.exports = Mass; /***/ }), -/* 1248 */ +/* 1259 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169596,12 +170537,12 @@ module.exports = Size; /***/ }), -/* 1249 */ +/* 1260 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169695,13 +170636,13 @@ module.exports = Velocity; /***/ }), -/* 1250 */ +/* 1261 */ /***/ (function(module, exports, __webpack_require__) { -var OverlapRect = __webpack_require__(442); +var OverlapRect = __webpack_require__(456); var Circle = __webpack_require__(65); -var CircleToCircle = __webpack_require__(201); -var CircleToRectangle = __webpack_require__(202); +var CircleToCircle = __webpack_require__(202); +var CircleToRectangle = __webpack_require__(203); /** * This method will search the given circular area and return an array of all physics bodies that @@ -169763,12 +170704,12 @@ module.exports = OverlapCirc; /***/ }), -/* 1251 */ +/* 1262 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169796,12 +170737,12 @@ module.exports = 'collide'; /***/ }), -/* 1252 */ +/* 1263 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169829,12 +170770,12 @@ module.exports = 'overlap'; /***/ }), -/* 1253 */ +/* 1264 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169852,12 +170793,12 @@ module.exports = 'pause'; /***/ }), -/* 1254 */ +/* 1265 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169875,12 +170816,12 @@ module.exports = 'resume'; /***/ }), -/* 1255 */ +/* 1266 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169907,12 +170848,12 @@ module.exports = 'tilecollide'; /***/ }), -/* 1256 */ +/* 1267 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169939,12 +170880,12 @@ module.exports = 'tileoverlap'; /***/ }), -/* 1257 */ +/* 1268 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169971,12 +170912,12 @@ module.exports = 'worldbounds'; /***/ }), -/* 1258 */ +/* 1269 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169997,12 +170938,12 @@ module.exports = 'worldstep'; /***/ }), -/* 1259 */ +/* 1270 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -170038,18 +170979,18 @@ module.exports = ProcessTileCallbacks; /***/ }), -/* 1260 */ +/* 1271 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileCheckX = __webpack_require__(1261); -var TileCheckY = __webpack_require__(1263); -var TileIntersectsBody = __webpack_require__(449); +var TileCheckX = __webpack_require__(1272); +var TileCheckY = __webpack_require__(1274); +var TileIntersectsBody = __webpack_require__(463); /** * The core separation function to separate a physics body and a tile. @@ -170158,16 +171099,16 @@ module.exports = SeparateTile; /***/ }), -/* 1261 */ +/* 1272 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ProcessTileSeparationX = __webpack_require__(1262); +var ProcessTileSeparationX = __webpack_require__(1273); /** * Check the body against the given tile on the X axis. @@ -170248,12 +171189,12 @@ module.exports = TileCheckX; /***/ }), -/* 1262 */ +/* 1273 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -170295,16 +171236,16 @@ module.exports = ProcessTileSeparationX; /***/ }), -/* 1263 */ +/* 1274 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ProcessTileSeparationY = __webpack_require__(1264); +var ProcessTileSeparationY = __webpack_require__(1275); /** * Check the body against the given tile on the Y axis. @@ -170385,12 +171326,12 @@ module.exports = TileCheckY; /***/ }), -/* 1264 */ +/* 1275 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -170432,16 +171373,16 @@ module.exports = ProcessTileSeparationY; /***/ }), -/* 1265 */ +/* 1276 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetOverlapX = __webpack_require__(446); +var GetOverlapX = __webpack_require__(460); /** * Separates two overlapping bodies on the X-axis (horizontally). @@ -170523,16 +171464,16 @@ module.exports = SeparateX; /***/ }), -/* 1266 */ +/* 1277 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetOverlapY = __webpack_require__(447); +var GetOverlapY = __webpack_require__(461); /** * Separates two overlapping bodies on the Y-axis (vertically). @@ -170614,22 +171555,26 @@ module.exports = SeparateY; /***/ }), -/* 1267 */, -/* 1268 */, -/* 1269 */, -/* 1270 */, -/* 1271 */, -/* 1272 */, -/* 1273 */, -/* 1274 */, -/* 1275 */, -/* 1276 */, -/* 1277 */ +/* 1278 */, +/* 1279 */, +/* 1280 */, +/* 1281 */, +/* 1282 */, +/* 1283 */, +/* 1284 */, +/* 1285 */, +/* 1286 */, +/* 1287 */, +/* 1288 */, +/* 1289 */, +/* 1290 */, +/* 1291 */, +/* 1292 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -170639,28 +171584,28 @@ module.exports = SeparateY; module.exports = { - BasePlugin: __webpack_require__(454), - DefaultPlugins: __webpack_require__(172), - PluginCache: __webpack_require__(21), - PluginManager: __webpack_require__(350), - ScenePlugin: __webpack_require__(1278) + BasePlugin: __webpack_require__(468), + DefaultPlugins: __webpack_require__(173), + PluginCache: __webpack_require__(23), + PluginManager: __webpack_require__(364), + ScenePlugin: __webpack_require__(1293) }; /***/ }), -/* 1278 */ +/* 1293 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey -* @copyright 2019 Photon Storm Ltd. +* @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ -var BasePlugin = __webpack_require__(454); +var BasePlugin = __webpack_require__(468); var Class = __webpack_require__(0); -var SceneEvents = __webpack_require__(22); +var SceneEvents = __webpack_require__(19); /** * @classdesc @@ -170777,17 +171722,17 @@ module.exports = ScenePlugin; /***/ }), -/* 1279 */ +/* 1294 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Extend = __webpack_require__(17); -var CONST = __webpack_require__(174); +var CONST = __webpack_require__(175); /** * @namespace Phaser.Scale @@ -170815,12 +171760,12 @@ var CONST = __webpack_require__(174); var Scale = { - Center: __webpack_require__(339), + Center: __webpack_require__(353), Events: __webpack_require__(92), - Orientation: __webpack_require__(340), - ScaleManager: __webpack_require__(351), - ScaleModes: __webpack_require__(341), - Zoom: __webpack_require__(342) + Orientation: __webpack_require__(354), + ScaleManager: __webpack_require__(365), + ScaleModes: __webpack_require__(355), + Zoom: __webpack_require__(356) }; @@ -170833,16 +171778,16 @@ module.exports = Scale; /***/ }), -/* 1280 */ +/* 1295 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(121); +var CONST = __webpack_require__(123); var Extend = __webpack_require__(17); /** @@ -170851,11 +171796,11 @@ var Extend = __webpack_require__(17); var Scene = { - Events: __webpack_require__(22), - SceneManager: __webpack_require__(353), - ScenePlugin: __webpack_require__(1281), - Settings: __webpack_require__(355), - Systems: __webpack_require__(177) + Events: __webpack_require__(19), + SceneManager: __webpack_require__(367), + ScenePlugin: __webpack_require__(1296), + Settings: __webpack_require__(369), + Systems: __webpack_require__(178) }; @@ -170866,20 +171811,20 @@ module.exports = Scene; /***/ }), -/* 1281 */ +/* 1296 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(23); +var Clamp = __webpack_require__(22); var Class = __webpack_require__(0); -var Events = __webpack_require__(22); +var Events = __webpack_require__(19); var GetFastValue = __webpack_require__(2); -var PluginCache = __webpack_require__(21); +var PluginCache = __webpack_require__(23); /** * @classdesc @@ -171059,6 +172004,8 @@ var ScenePlugin = new Class({ /** * Shutdown this Scene and run the given one. * + * This will happen at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#start * @since 3.0.0 * @@ -171080,6 +172027,8 @@ var ScenePlugin = new Class({ /** * Restarts this Scene. * + * This will happen at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#restart * @since 3.4.0 * @@ -171315,6 +172264,8 @@ var ScenePlugin = new Class({ /** * Launch the given Scene and run it in parallel with this one. * + * This will happen at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#launch * @since 3.0.0 * @@ -171336,6 +172287,8 @@ var ScenePlugin = new Class({ /** * Runs the given Scene, but does not change the state of this Scene. * + * This will happen at the next Scene Manager update, not immediately. + * * If the given Scene is paused, it will resume it. If sleeping, it will wake it. * If not running at all, it will be started. * @@ -171363,6 +172316,8 @@ var ScenePlugin = new Class({ /** * Pause the Scene - this stops the update step from happening but it still renders. * + * This will happen at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#pause * @since 3.0.0 * @@ -171383,6 +172338,8 @@ var ScenePlugin = new Class({ /** * Resume the Scene - starts the update loop again. * + * This will happen at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#resume * @since 3.0.0 * @@ -171403,6 +172360,8 @@ var ScenePlugin = new Class({ /** * Makes the Scene sleep (no update, no render) but doesn't shutdown. * + * This will happen at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#sleep * @since 3.0.0 * @@ -171423,6 +172382,8 @@ var ScenePlugin = new Class({ /** * Makes the Scene wake-up (starts update and render) * + * This will happen at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#wake * @since 3.0.0 * @@ -171442,11 +172403,8 @@ var ScenePlugin = new Class({ /** * Makes this Scene sleep then starts the Scene given. - * - * No checks are made to see if an instance of the given Scene is already running. - * Because Scenes in Phaser are non-exclusive, you are allowed to run multiple - * instances of them _at the same time_. This means, calling this function - * may launch another instance of the requested Scene if it's already running. + * + * This will happen at the next Scene Manager update, not immediately. * * @method Phaser.Scenes.ScenePlugin#switch * @since 3.0.0 @@ -171468,6 +172426,8 @@ var ScenePlugin = new Class({ /** * Shutdown the Scene, clearing display list, timers, etc. * + * This happens at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#stop * @since 3.0.0 * @@ -171685,7 +172645,7 @@ var ScenePlugin = new Class({ * The Scene is removed from the local scenes array, it's key is cleared from the keys * cache and Scene.Systems.destroy is then called on it. * - * If the SceneManager is processing the Scenes when this method is called it wil + * If the SceneManager is processing the Scenes when this method is called it will * queue the operation for the next update sequence. * * @method Phaser.Scenes.ScenePlugin#remove @@ -171861,12 +172821,12 @@ module.exports = ScenePlugin; /***/ }), -/* 1282 */ +/* 1297 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -171876,28 +172836,28 @@ module.exports = ScenePlugin; module.exports = { - List: __webpack_require__(124), - Map: __webpack_require__(157), - ProcessQueue: __webpack_require__(183), - RTree: __webpack_require__(448), - Set: __webpack_require__(107), - Size: __webpack_require__(352) + List: __webpack_require__(126), + Map: __webpack_require__(159), + ProcessQueue: __webpack_require__(184), + RTree: __webpack_require__(462), + Set: __webpack_require__(108), + Size: __webpack_require__(366) }; /***/ }), -/* 1283 */ +/* 1298 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Extend = __webpack_require__(17); -var FilterMode = __webpack_require__(1284); +var FilterMode = __webpack_require__(1299); /** * @namespace Phaser.Textures @@ -171923,14 +172883,14 @@ var FilterMode = __webpack_require__(1284); var Textures = { - CanvasTexture: __webpack_require__(357), - Events: __webpack_require__(117), + CanvasTexture: __webpack_require__(371), + Events: __webpack_require__(119), FilterMode: FilterMode, Frame: __webpack_require__(94), - Parsers: __webpack_require__(359), - Texture: __webpack_require__(179), - TextureManager: __webpack_require__(356), - TextureSource: __webpack_require__(358) + Parsers: __webpack_require__(373), + Texture: __webpack_require__(180), + TextureManager: __webpack_require__(370), + TextureSource: __webpack_require__(372) }; @@ -171940,12 +172900,12 @@ module.exports = Textures; /***/ }), -/* 1284 */ +/* 1299 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -171984,12 +172944,12 @@ module.exports = CONST; /***/ }), -/* 1285 */ +/* 1300 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -171999,35 +172959,35 @@ module.exports = CONST; module.exports = { - Components: __webpack_require__(136), - Parsers: __webpack_require__(1315), + Components: __webpack_require__(137), + Parsers: __webpack_require__(1330), Formats: __webpack_require__(31), - ImageCollection: __webpack_require__(465), - ParseToTilemap: __webpack_require__(223), + ImageCollection: __webpack_require__(479), + ParseToTilemap: __webpack_require__(224), Tile: __webpack_require__(74), - Tilemap: __webpack_require__(474), - TilemapCreator: __webpack_require__(1324), - TilemapFactory: __webpack_require__(1325), - Tileset: __webpack_require__(140), + Tilemap: __webpack_require__(488), + TilemapCreator: __webpack_require__(1339), + TilemapFactory: __webpack_require__(1340), + Tileset: __webpack_require__(141), LayerData: __webpack_require__(104), MapData: __webpack_require__(105), - ObjectLayer: __webpack_require__(468), + ObjectLayer: __webpack_require__(482), - DynamicTilemapLayer: __webpack_require__(475), - StaticTilemapLayer: __webpack_require__(476) + DynamicTilemapLayer: __webpack_require__(489), + StaticTilemapLayer: __webpack_require__(490) }; /***/ }), -/* 1286 */ +/* 1301 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -172087,19 +173047,19 @@ module.exports = Copy; /***/ }), -/* 1287 */ +/* 1302 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileToWorldX = __webpack_require__(138); -var TileToWorldY = __webpack_require__(139); +var TileToWorldX = __webpack_require__(139); +var TileToWorldY = __webpack_require__(140); var GetTilesWithin = __webpack_require__(24); -var ReplaceByIndex = __webpack_require__(455); +var ReplaceByIndex = __webpack_require__(469); /** * Creates a Sprite for every object matching the given tile indexes in the layer. You can @@ -172172,17 +173132,17 @@ module.exports = CreateFromTiles; /***/ }), -/* 1288 */ +/* 1303 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var SnapFloor = __webpack_require__(93); -var SnapCeil = __webpack_require__(311); +var SnapCeil = __webpack_require__(325); /** * Returns the tiles in the given layer that are within the camera's viewport. This is used internally. @@ -172329,12 +173289,12 @@ module.exports = CullTiles; /***/ }), -/* 1289 */ +/* 1304 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -172383,12 +173343,12 @@ module.exports = Fill; /***/ }), -/* 1290 */ +/* 1305 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -172431,12 +173391,12 @@ module.exports = FilterTiles; /***/ }), -/* 1291 */ +/* 1306 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -172519,12 +173479,12 @@ module.exports = FindByIndex; /***/ }), -/* 1292 */ +/* 1307 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -172573,12 +173533,12 @@ module.exports = FindTile; /***/ }), -/* 1293 */ +/* 1308 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -172623,16 +173583,16 @@ module.exports = ForEachTile; /***/ }), -/* 1294 */ +/* 1309 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(137); +var GetTileAt = __webpack_require__(138); var WorldToTileX = __webpack_require__(63); var WorldToTileY = __webpack_require__(64); @@ -172664,21 +173624,21 @@ module.exports = GetTileAtWorldXY; /***/ }), -/* 1295 */ +/* 1310 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Geom = __webpack_require__(408); +var Geom = __webpack_require__(422); var GetTilesWithin = __webpack_require__(24); -var Intersects = __webpack_require__(409); +var Intersects = __webpack_require__(423); var NOOP = __webpack_require__(1); -var TileToWorldX = __webpack_require__(138); -var TileToWorldY = __webpack_require__(139); +var TileToWorldX = __webpack_require__(139); +var TileToWorldY = __webpack_require__(140); var WorldToTileX = __webpack_require__(63); var WorldToTileY = __webpack_require__(64); @@ -172761,12 +173721,12 @@ module.exports = GetTilesWithinShape; /***/ }), -/* 1296 */ +/* 1311 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -172811,16 +173771,16 @@ module.exports = GetTilesWithinWorldXY; /***/ }), -/* 1297 */ +/* 1312 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HasTileAt = __webpack_require__(456); +var HasTileAt = __webpack_require__(470); var WorldToTileX = __webpack_require__(63); var WorldToTileY = __webpack_require__(64); @@ -172851,16 +173811,16 @@ module.exports = HasTileAtWorldXY; /***/ }), -/* 1298 */ +/* 1313 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PutTileAt = __webpack_require__(217); +var PutTileAt = __webpack_require__(218); var WorldToTileX = __webpack_require__(63); var WorldToTileY = __webpack_require__(64); @@ -172894,17 +173854,17 @@ module.exports = PutTileAtWorldXY; /***/ }), -/* 1299 */ +/* 1314 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var CalculateFacesWithin = __webpack_require__(51); -var PutTileAt = __webpack_require__(217); +var PutTileAt = __webpack_require__(218); /** * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified @@ -172958,17 +173918,17 @@ module.exports = PutTilesAt; /***/ }), -/* 1300 */ +/* 1315 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetTilesWithin = __webpack_require__(24); -var GetRandom = __webpack_require__(182); +var GetRandom = __webpack_require__(183); /** * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the @@ -173016,16 +173976,16 @@ module.exports = Randomize; /***/ }), -/* 1301 */ +/* 1316 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RemoveTileAt = __webpack_require__(457); +var RemoveTileAt = __webpack_require__(471); var WorldToTileX = __webpack_require__(63); var WorldToTileY = __webpack_require__(64); @@ -173057,17 +174017,17 @@ module.exports = RemoveTileAtWorldXY; /***/ }), -/* 1302 */ +/* 1317 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetTilesWithin = __webpack_require__(24); -var Color = __webpack_require__(334); +var Color = __webpack_require__(348); var defaultTileColor = new Color(105, 210, 231, 150); var defaultCollidingTileColor = new Color(243, 134, 48, 200); @@ -173146,18 +174106,18 @@ module.exports = RenderDebug; /***/ }), -/* 1303 */ +/* 1318 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var SetTileCollision = __webpack_require__(73); var CalculateFacesWithin = __webpack_require__(51); -var SetLayerCollisionIndex = __webpack_require__(218); +var SetLayerCollisionIndex = __webpack_require__(219); /** * Sets collision on the given tile or tiles within a layer by index. You can pass in either a @@ -173215,18 +174175,18 @@ module.exports = SetCollision; /***/ }), -/* 1304 */ +/* 1319 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var SetTileCollision = __webpack_require__(73); var CalculateFacesWithin = __webpack_require__(51); -var SetLayerCollisionIndex = __webpack_require__(218); +var SetLayerCollisionIndex = __webpack_require__(219); /** * Sets collision on a range of tiles in a layer whose index is between the specified `start` and @@ -173290,18 +174250,18 @@ module.exports = SetCollisionBetween; /***/ }), -/* 1305 */ +/* 1320 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var SetTileCollision = __webpack_require__(73); var CalculateFacesWithin = __webpack_require__(51); -var SetLayerCollisionIndex = __webpack_require__(218); +var SetLayerCollisionIndex = __webpack_require__(219); /** * Sets collision on all tiles in the given layer, except for tiles that have an index specified in @@ -173347,12 +174307,12 @@ module.exports = SetCollisionByExclusion; /***/ }), -/* 1306 */ +/* 1321 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -173422,12 +174382,12 @@ module.exports = SetCollisionByProperty; /***/ }), -/* 1307 */ +/* 1322 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -173482,12 +174442,12 @@ module.exports = SetCollisionFromCollisionGroup; /***/ }), -/* 1308 */ +/* 1323 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -173529,12 +174489,12 @@ module.exports = SetTileIndexCallback; /***/ }), -/* 1309 */ +/* 1324 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -173572,17 +174532,17 @@ module.exports = SetTileLocationCallback; /***/ }), -/* 1310 */ +/* 1325 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetTilesWithin = __webpack_require__(24); -var ShuffleArray = __webpack_require__(112); +var ShuffleArray = __webpack_require__(114); /** * Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given @@ -173617,12 +174577,12 @@ module.exports = Shuffle; /***/ }), -/* 1311 */ +/* 1326 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -173668,17 +174628,17 @@ module.exports = SwapByIndex; /***/ }), -/* 1312 */ +/* 1327 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileToWorldX = __webpack_require__(138); -var TileToWorldY = __webpack_require__(139); +var TileToWorldX = __webpack_require__(139); +var TileToWorldY = __webpack_require__(140); var Vector2 = __webpack_require__(3); /** @@ -173712,12 +174672,12 @@ module.exports = TileToWorldXY; /***/ }), -/* 1313 */ +/* 1328 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -173792,12 +174752,12 @@ module.exports = WeightedRandomize; /***/ }), -/* 1314 */ +/* 1329 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -173837,12 +174797,12 @@ module.exports = WorldToTileXY; /***/ }), -/* 1315 */ +/* 1330 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -173852,23 +174812,23 @@ module.exports = WorldToTileXY; module.exports = { - Parse: __webpack_require__(458), - Parse2DArray: __webpack_require__(219), - ParseCSV: __webpack_require__(459), + Parse: __webpack_require__(472), + Parse2DArray: __webpack_require__(220), + ParseCSV: __webpack_require__(473), - Impact: __webpack_require__(1316), - Tiled: __webpack_require__(1317) + Impact: __webpack_require__(1331), + Tiled: __webpack_require__(1332) }; /***/ }), -/* 1316 */ +/* 1331 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -173878,20 +174838,20 @@ module.exports = { module.exports = { - ParseTileLayers: __webpack_require__(472), - ParseTilesets: __webpack_require__(473), - ParseWeltmeister: __webpack_require__(471) + ParseTileLayers: __webpack_require__(486), + ParseTilesets: __webpack_require__(487), + ParseWeltmeister: __webpack_require__(485) }; /***/ }), -/* 1317 */ +/* 1332 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -173901,27 +174861,27 @@ module.exports = { module.exports = { - AssignTileProperties: __webpack_require__(470), - Base64Decode: __webpack_require__(462), - BuildTilesetIndex: __webpack_require__(469), - ParseGID: __webpack_require__(220), - ParseImageLayers: __webpack_require__(463), - ParseJSONTiled: __webpack_require__(460), - ParseObject: __webpack_require__(222), - ParseObjectLayers: __webpack_require__(467), - ParseTileLayers: __webpack_require__(461), - ParseTilesets: __webpack_require__(464) + AssignTileProperties: __webpack_require__(484), + Base64Decode: __webpack_require__(476), + BuildTilesetIndex: __webpack_require__(483), + ParseGID: __webpack_require__(221), + ParseImageLayers: __webpack_require__(477), + ParseJSONTiled: __webpack_require__(474), + ParseObject: __webpack_require__(223), + ParseObjectLayers: __webpack_require__(481), + ParseTileLayers: __webpack_require__(475), + ParseTilesets: __webpack_require__(478) }; /***/ }), -/* 1318 */ +/* 1333 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -173930,12 +174890,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1319); + renderWebGL = __webpack_require__(1334); } if (true) { - renderCanvas = __webpack_require__(1320); + renderCanvas = __webpack_require__(1335); } module.exports = { @@ -173947,12 +174907,12 @@ module.exports = { /***/ }), -/* 1319 */ +/* 1334 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -173988,7 +174948,7 @@ var DynamicTilemapLayerWebGLRenderer = function (renderer, src, interpolationPer var gidMap = src.gidMap; var pipeline = src.pipeline; - var getTint = Utils.getTintAppendFloatAlpha; + var getTint = Utils.getTintAppendFloatAlphaAndSwap; var scrollFactorX = src.scrollFactorX; var scrollFactorY = src.scrollFactorY; @@ -174064,12 +175024,12 @@ module.exports = DynamicTilemapLayerWebGLRenderer; /***/ }), -/* 1320 */ +/* 1335 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -174196,12 +175156,12 @@ module.exports = DynamicTilemapLayerCanvasRenderer; /***/ }), -/* 1321 */ +/* 1336 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -174210,12 +175170,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1322); + renderWebGL = __webpack_require__(1337); } if (true) { - renderCanvas = __webpack_require__(1323); + renderCanvas = __webpack_require__(1338); } module.exports = { @@ -174227,12 +175187,12 @@ module.exports = { /***/ }), -/* 1322 */ +/* 1337 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -174299,12 +175259,12 @@ module.exports = StaticTilemapLayerWebGLRenderer; /***/ }), -/* 1323 */ +/* 1338 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -174433,17 +175393,17 @@ module.exports = StaticTilemapLayerCanvasRenderer; /***/ }), -/* 1324 */ +/* 1339 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectCreator = __webpack_require__(16); -var ParseToTilemap = __webpack_require__(223); +var ParseToTilemap = __webpack_require__(224); /** * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. @@ -174477,17 +175437,17 @@ GameObjectCreator.register('tilemap', function (config) /***/ }), -/* 1325 */ +/* 1340 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(5); -var ParseToTilemap = __webpack_require__(223); +var ParseToTilemap = __webpack_require__(224); /** * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. @@ -174543,12 +175503,12 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt /***/ }), -/* 1326 */ +/* 1341 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -174558,26 +175518,26 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt module.exports = { - Clock: __webpack_require__(1327), - TimerEvent: __webpack_require__(477) + Clock: __webpack_require__(1342), + TimerEvent: __webpack_require__(491) }; /***/ }), -/* 1327 */ +/* 1342 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var PluginCache = __webpack_require__(21); -var SceneEvents = __webpack_require__(22); -var TimerEvent = __webpack_require__(477); +var PluginCache = __webpack_require__(23); +var SceneEvents = __webpack_require__(19); +var TimerEvent = __webpack_require__(491); /** * @classdesc @@ -174971,12 +175931,12 @@ module.exports = Clock; /***/ }), -/* 1328 */ +/* 1343 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -174989,13 +175949,13 @@ var Extend = __webpack_require__(17); var Tweens = { - Builders: __webpack_require__(1329), - Events: __webpack_require__(228), + Builders: __webpack_require__(1344), + Events: __webpack_require__(229), - TweenManager: __webpack_require__(1344), - Tween: __webpack_require__(227), - TweenData: __webpack_require__(229), - Timeline: __webpack_require__(482) + TweenManager: __webpack_require__(1359), + Tween: __webpack_require__(228), + TweenData: __webpack_require__(230), + Timeline: __webpack_require__(497) }; @@ -175006,12 +175966,12 @@ module.exports = Tweens; /***/ }), -/* 1329 */ +/* 1344 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -175023,25 +175983,26 @@ module.exports = { GetBoolean: __webpack_require__(88), GetEaseFunction: __webpack_require__(82), - GetNewValue: __webpack_require__(141), - GetProps: __webpack_require__(478), - GetTargets: __webpack_require__(224), - GetTweens: __webpack_require__(479), - GetValueOp: __webpack_require__(225), - NumberTweenBuilder: __webpack_require__(480), - TimelineBuilder: __webpack_require__(481), - TweenBuilder: __webpack_require__(142) + GetNewValue: __webpack_require__(142), + GetProps: __webpack_require__(492), + GetTargets: __webpack_require__(225), + GetTweens: __webpack_require__(493), + GetValueOp: __webpack_require__(226), + NumberTweenBuilder: __webpack_require__(494), + StaggerBuilder: __webpack_require__(495), + TimelineBuilder: __webpack_require__(496), + TweenBuilder: __webpack_require__(143) }; /***/ }), -/* 1330 */ +/* 1345 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -175111,12 +176072,12 @@ module.exports = [ /***/ }), -/* 1331 */ +/* 1346 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -175147,12 +176108,12 @@ module.exports = 'complete'; /***/ }), -/* 1332 */ +/* 1347 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -175184,12 +176145,12 @@ module.exports = 'loop'; /***/ }), -/* 1333 */ +/* 1348 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -175221,12 +176182,12 @@ module.exports = 'pause'; /***/ }), -/* 1334 */ +/* 1349 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -175258,12 +176219,12 @@ module.exports = 'resume'; /***/ }), -/* 1335 */ +/* 1350 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -175294,12 +176255,12 @@ module.exports = 'start'; /***/ }), -/* 1336 */ +/* 1351 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -175331,12 +176292,12 @@ module.exports = 'update'; /***/ }), -/* 1337 */ +/* 1352 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -175371,12 +176332,12 @@ module.exports = 'active'; /***/ }), -/* 1338 */ +/* 1353 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -175412,12 +176373,12 @@ module.exports = 'complete'; /***/ }), -/* 1339 */ +/* 1354 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -175456,12 +176417,12 @@ module.exports = 'loop'; /***/ }), -/* 1340 */ +/* 1355 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -175501,12 +176462,12 @@ module.exports = 'repeat'; /***/ }), -/* 1341 */ +/* 1356 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -175541,12 +176502,12 @@ module.exports = 'start'; /***/ }), -/* 1342 */ +/* 1357 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -175577,17 +176538,19 @@ module.exports = 'start'; * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event. * @param {string} key - The property that was updated, i.e. `x` or `scale`. * @param {any} target - The target object that was updated. Usually a Game Object, but can be of any type. + * @param {number} current - The current value of the property that was tweened. + * @param {number} previous - The previous value of the property that was tweened, prior to this update. */ module.exports = 'update'; /***/ }), -/* 1343 */ +/* 1358 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -175628,24 +176591,24 @@ module.exports = 'yoyo'; /***/ }), -/* 1344 */ +/* 1359 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayRemove = __webpack_require__(119); +var ArrayRemove = __webpack_require__(121); var Class = __webpack_require__(0); -var NumberTweenBuilder = __webpack_require__(480); -var PluginCache = __webpack_require__(21); -var SceneEvents = __webpack_require__(22); -var StaggerBuilder = __webpack_require__(1345); -var TimelineBuilder = __webpack_require__(481); +var NumberTweenBuilder = __webpack_require__(494); +var PluginCache = __webpack_require__(23); +var SceneEvents = __webpack_require__(19); +var StaggerBuilder = __webpack_require__(495); +var TimelineBuilder = __webpack_require__(496); var TWEEN_CONST = __webpack_require__(89); -var TweenBuilder = __webpack_require__(142); +var TweenBuilder = __webpack_require__(143); /** * @classdesc @@ -175933,6 +176896,7 @@ var TweenManager = new Class({ * @method Phaser.Tweens.TweenManager#stagger * @since 3.19.0 * + * @param {(number|number[])} value - The amount to stagger by, or an array containing two elements representing the min and max values to stagger between. * @param {Phaser.Types.Tweens.StaggerConfig} config - The configuration object for the Stagger function. * * @return {function} The stagger function. @@ -176399,258 +177363,12 @@ module.exports = TweenManager; /***/ }), -/* 1345 */ +/* 1360 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetEaseFunction = __webpack_require__(82); -var GetValue = __webpack_require__(6); -var MATH_CONST = __webpack_require__(13); - -/** - * Creates a Stagger function to be used by a Tween property. - * - * The stagger function will allow you to stagger changes to the value of the property across all targets of the tween. - * - * This is only worth using if the tween has multiple targets. - * - * The following will stagger the delay by 100ms across all targets of the tween, causing them to scale down to 0.2 - * over the duration specified: - * - * ```javascript - * this.tweens.add({ - * targets: [ ... ], - * scale: 0.2, - * ease: 'linear', - * duration: 1000, - * delay: this.tweens.stagger(100) - * }); - * ``` - * - * The following will stagger the delay by 500ms across all targets of the tween using a 10 x 6 grid, staggering - * from the center out, using a cubic ease. - * - * ```javascript - * this.tweens.add({ - * targets: [ ... ], - * scale: 0.2, - * ease: 'linear', - * duration: 1000, - * delay: this.tweens.stagger(500, { grid: [ 10, 6 ], from: 'center', ease: 'cubic.out' }) - * }); - * ``` - * - * @function Phaser.Tweens.Builders.StaggerBuilder - * @since 3.19.0 - * - * @param {(number|number[])} value - The amount to stagger by, or an array containing two elements representing the min and max values to stagger between. - * @param {Phaser.Types.Tweens.StaggerConfig} [config] - A Stagger Configuration object. - * - * @return {function} The stagger function. - */ -var StaggerBuilder = function (value, options) -{ - if (options === undefined) { options = {}; } - - var result; - - var start = GetValue(options, 'start', 0); - var ease = GetValue(options, 'ease', null); - var grid = GetValue(options, 'grid', null); - - var from = GetValue(options, 'from', 0); - - var fromFirst = (from === 'first'); - var fromCenter = (from === 'center'); - var fromLast = (from === 'last'); - var fromValue = (typeof(from) === 'number'); - - var isRange = (Array.isArray(value)); - var value1 = (isRange) ? parseFloat(value[0]) : parseFloat(value); - var value2 = (isRange) ? parseFloat(value[1]) : 0; - var maxValue = Math.max(value1, value2); - - if (isRange) - { - start += value1; - } - - if (grid) - { - // Pre-calc the grid to save doing it for ever tweendata update - var gridWidth = grid[0]; - var gridHeight = grid[1]; - - var fromX = 0; - var fromY = 0; - - var distanceX = 0; - var distanceY = 0; - - var gridValues = []; - - if (fromLast) - { - fromX = gridWidth - 1; - fromY = gridHeight - 1; - } - else if (fromValue) - { - fromX = from % gridWidth; - fromY = Math.floor(from / gridWidth); - } - else if (fromCenter) - { - fromX = (gridWidth - 1) / 2; - fromY = (gridHeight - 1) / 2; - } - - var gridMax = MATH_CONST.MIN_SAFE_INTEGER; - - for (var toY = 0; toY < gridHeight; toY++) - { - gridValues[toY] = []; - - for (var toX = 0; toX < gridWidth; toX++) - { - distanceX = fromX - toX; - distanceY = fromY - toY; - - var dist = Math.sqrt(distanceX * distanceX + distanceY * distanceY); - - if (dist > gridMax) - { - gridMax = dist; - } - - gridValues[toY][toX] = dist; - } - } - } - - var easeFunction = (ease) ? GetEaseFunction(ease) : null; - - if (grid) - { - result = function (target, key, value, index) - { - var gridSpace = 0; - var toX = index % gridWidth; - var toY = Math.floor(index / gridWidth); - - if (toX >= 0 && toX < gridWidth && toY >= 0 && toY < gridHeight) - { - gridSpace = gridValues[toY][toX]; - } - - var output; - - if (isRange) - { - var diff = (value2 - value1); - - if (easeFunction) - { - output = ((gridSpace / gridMax) * diff) * easeFunction(gridSpace / gridMax); - } - else - { - output = (gridSpace / gridMax) * diff; - } - } - else if (easeFunction) - { - output = (gridSpace * value1) * easeFunction(gridSpace / gridMax); - } - else - { - output = gridSpace * value1; - } - - return output + start; - }; - } - else - { - result = function (target, key, value, index, total) - { - // zero offset - total--; - - var fromIndex; - - if (fromFirst) - { - fromIndex = index; - } - else if (fromCenter) - { - fromIndex = Math.abs((total / 2) - index); - } - else if (fromLast) - { - fromIndex = total - index; - } - else if (fromValue) - { - fromIndex = Math.abs(from - index); - } - - var output; - - if (isRange) - { - var spacing; - - if (fromCenter) - { - spacing = ((value2 - value1) / total) * (fromIndex * 2); - } - else - { - spacing = ((value2 - value1) / total) * fromIndex; - } - - if (easeFunction) - { - output = spacing * easeFunction(fromIndex / total); - } - else - { - output = spacing; - } - } - else if (easeFunction) - { - output = (total * maxValue) * easeFunction(fromIndex / total); - } - else - { - output = fromIndex * value1; - } - - return output + start; - }; - } - - return result; -}; - -module.exports = StaggerBuilder; - - -/***/ }), -/* 1346 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -176660,21 +177378,21 @@ module.exports = StaggerBuilder; module.exports = { - Array: __webpack_require__(180), - Base64: __webpack_require__(1347), - Objects: __webpack_require__(1349), - String: __webpack_require__(1353) + Array: __webpack_require__(181), + Base64: __webpack_require__(1361), + Objects: __webpack_require__(1363), + String: __webpack_require__(1367) }; /***/ }), -/* 1347 */ +/* 1361 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -176684,20 +177402,20 @@ module.exports = { module.exports = { - ArrayBufferToBase64: __webpack_require__(1348), - Base64ToArrayBuffer: __webpack_require__(366) + ArrayBufferToBase64: __webpack_require__(1362), + Base64ToArrayBuffer: __webpack_require__(380) }; /***/ }), -/* 1348 */ +/* 1362 */ /***/ (function(module, exports) { /** * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -176749,12 +177467,12 @@ module.exports = ArrayBufferToBase64; /***/ }), -/* 1349 */ +/* 1363 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -176768,32 +177486,32 @@ module.exports = { Extend: __webpack_require__(17), GetAdvancedValue: __webpack_require__(15), GetFastValue: __webpack_require__(2), - GetMinMaxValue: __webpack_require__(1350), + GetMinMaxValue: __webpack_require__(1364), GetValue: __webpack_require__(6), - HasAll: __webpack_require__(1351), - HasAny: __webpack_require__(385), + HasAll: __webpack_require__(1365), + HasAny: __webpack_require__(399), HasValue: __webpack_require__(99), IsPlainObject: __webpack_require__(7), - Merge: __webpack_require__(106), - MergeRight: __webpack_require__(1352), - Pick: __webpack_require__(466), - SetValue: __webpack_require__(405) + Merge: __webpack_require__(107), + MergeRight: __webpack_require__(1366), + Pick: __webpack_require__(480), + SetValue: __webpack_require__(419) }; /***/ }), -/* 1350 */ +/* 1364 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetValue = __webpack_require__(6); -var Clamp = __webpack_require__(23); +var Clamp = __webpack_require__(22); /** * Retrieves and clamps a numerical value from an object. @@ -176822,12 +177540,12 @@ module.exports = GetMinMaxValue; /***/ }), -/* 1351 */ +/* 1365 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -176859,12 +177577,12 @@ module.exports = HasAll; /***/ }), -/* 1352 */ +/* 1366 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -176902,12 +177620,12 @@ module.exports = MergeRight; /***/ }), -/* 1353 */ +/* 1367 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -176917,22 +177635,22 @@ module.exports = MergeRight; module.exports = { - Format: __webpack_require__(1354), - Pad: __webpack_require__(158), - Reverse: __webpack_require__(1355), - UppercaseFirst: __webpack_require__(178), - UUID: __webpack_require__(193) + Format: __webpack_require__(1368), + Pad: __webpack_require__(160), + Reverse: __webpack_require__(1369), + UppercaseFirst: __webpack_require__(179), + UUID: __webpack_require__(194) }; /***/ }), -/* 1354 */ +/* 1368 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -176962,12 +177680,12 @@ module.exports = Format; /***/ }), -/* 1355 */ +/* 1369 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -176991,13 +177709,13 @@ module.exports = Reverse; /***/ }), -/* 1356 */ +/* 1370 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177007,40 +177725,26 @@ module.exports = Reverse; module.exports = { - SoundManagerCreator: __webpack_require__(360), + SoundManagerCreator: __webpack_require__(374), Events: __webpack_require__(59), - BaseSound: __webpack_require__(123), - BaseSoundManager: __webpack_require__(122), + BaseSound: __webpack_require__(125), + BaseSoundManager: __webpack_require__(124), - WebAudioSound: __webpack_require__(367), - WebAudioSoundManager: __webpack_require__(365), + WebAudioSound: __webpack_require__(381), + WebAudioSoundManager: __webpack_require__(379), - HTML5AudioSound: __webpack_require__(362), - HTML5AudioSoundManager: __webpack_require__(361), + HTML5AudioSound: __webpack_require__(376), + HTML5AudioSoundManager: __webpack_require__(375), - NoAudioSound: __webpack_require__(364), - NoAudioSoundManager: __webpack_require__(363) + NoAudioSound: __webpack_require__(378), + NoAudioSoundManager: __webpack_require__(377) }; /***/ }), -/* 1357 */, -/* 1358 */, -/* 1359 */, -/* 1360 */, -/* 1361 */, -/* 1362 */, -/* 1363 */, -/* 1364 */, -/* 1365 */, -/* 1366 */, -/* 1367 */, -/* 1368 */, -/* 1369 */, -/* 1370 */, /* 1371 */, /* 1372 */, /* 1373 */, @@ -177109,16 +177813,30 @@ module.exports = { /* 1436 */, /* 1437 */, /* 1438 */, -/* 1439 */ +/* 1439 */, +/* 1440 */, +/* 1441 */, +/* 1442 */, +/* 1443 */, +/* 1444 */, +/* 1445 */, +/* 1446 */, +/* 1447 */, +/* 1448 */, +/* 1449 */, +/* 1450 */, +/* 1451 */, +/* 1452 */, +/* 1453 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -__webpack_require__(495); +__webpack_require__(512); var CONST = __webpack_require__(29); var Extend = __webpack_require__(17); @@ -177136,37 +177854,37 @@ var Extend = __webpack_require__(17); var Phaser = { - Actions: __webpack_require__(237), - Animations: __webpack_require__(613), - Cache: __webpack_require__(614), - Cameras: __webpack_require__(617), - Core: __webpack_require__(700), + Actions: __webpack_require__(238), + Animations: __webpack_require__(632), + Cache: __webpack_require__(633), + Cameras: __webpack_require__(636), + Core: __webpack_require__(719), Class: __webpack_require__(0), - Create: __webpack_require__(758), - Curves: __webpack_require__(764), - Data: __webpack_require__(767), - Display: __webpack_require__(769), - DOM: __webpack_require__(798), - Events: __webpack_require__(799), - Game: __webpack_require__(801), - GameObjects: __webpack_require__(894), - Geom: __webpack_require__(408), - Input: __webpack_require__(1176), - Loader: __webpack_require__(1210), - Math: __webpack_require__(166), + Create: __webpack_require__(781), + Curves: __webpack_require__(787), + Data: __webpack_require__(790), + Display: __webpack_require__(792), + DOM: __webpack_require__(809), + Events: __webpack_require__(810), + Game: __webpack_require__(812), + GameObjects: __webpack_require__(905), + Geom: __webpack_require__(422), + Input: __webpack_require__(1187), + Loader: __webpack_require__(1221), + Math: __webpack_require__(168), Physics: { - Arcade: __webpack_require__(1236) + Arcade: __webpack_require__(1247) }, - Plugins: __webpack_require__(1277), - Scale: __webpack_require__(1279), - Scene: __webpack_require__(354), - Scenes: __webpack_require__(1280), - Structs: __webpack_require__(1282), - Textures: __webpack_require__(1283), - Tilemaps: __webpack_require__(1285), - Time: __webpack_require__(1326), - Tweens: __webpack_require__(1328), - Utils: __webpack_require__(1346) + Plugins: __webpack_require__(1292), + Scale: __webpack_require__(1294), + Scene: __webpack_require__(368), + Scenes: __webpack_require__(1295), + Structs: __webpack_require__(1297), + Textures: __webpack_require__(1298), + Tilemaps: __webpack_require__(1300), + Time: __webpack_require__(1341), + Tweens: __webpack_require__(1343), + Utils: __webpack_require__(1360) }; @@ -177176,7 +177894,7 @@ Phaser = Extend(false, Phaser, CONST); if (true) { - Phaser.Sound = __webpack_require__(1356); + Phaser.Sound = __webpack_require__(1370); } // Export it @@ -177191,7 +177909,7 @@ global.Phaser = Phaser; * -- Dick Brandon */ -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(483))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(511))) /***/ }) /******/ ]); diff --git a/dist/phaser-arcade-physics.min.js b/dist/phaser-arcade-physics.min.js index 4f6a8fc82..1d5ef78f6 100644 --- a/dist/phaser-arcade-physics.min.js +++ b/dist/phaser-arcade-physics.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Phaser",[],e):"object"==typeof exports?exports.Phaser=e():t.Phaser=e()}(window,function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=1439)}([function(t,e){function i(t,e,i){var n=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&n.value&&"object"==typeof n.value&&(n=n.value),!(!n||!function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(n))&&(void 0===n.enumerable&&(n.enumerable=!0),void 0===n.configurable&&(n.configurable=!0),n)}function n(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function s(t,e,s,r){for(var a in e)if(e.hasOwnProperty(a)){var h=i(e,a,s);if(!1!==h){if(n((r||t).prototype,a)){if(o.ignoreFinals)continue;throw new Error("cannot override final property '"+a+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,a,h)}else t.prototype[a]=e[a]}}function r(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this}});n.ZERO=new n,n.RIGHT=new n(1,0),n.LEFT=new n(-1,0),n.UP=new n(0,-1),n.DOWN=new n(0,1),n.ONE=new n(1,1),t.exports=n},function(t,e,i){var n=i(0),s=i(46),r=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=s.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=r},function(t,e,i){var n=i(0),s=i(21),r=i(22),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.displayList,this.updateList,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){this.systems.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},s.register("GameObjectFactory",o,"add"),t.exports=o},function(t,e){t.exports=function(t,e,i){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return t[e];if(-1!==e.indexOf(".")){for(var n=e.split("."),s=t,r=i,o=0;o>>0},getTintAppendFloatAlpha:function(t,e){return((255&(255*e|0))<<24|t)>>>0},getTintAppendFloatAlphaAndSwap:function(t,e){return((255&(255*e|0))<<24|(255&(0|t))<<16|(255&(t>>8|0))<<8|255&(t>>16|0))>>>0},getFloatsFromUintRGB:function(t){return[(255&(t>>16|0))/255,(255&(t>>8|0))/255,(255&(0|t))/255]},getComponentCount:function(t,e){for(var i=0,n=0;n=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},function(t,e,i){t.exports={Alpha:i(252),Animation:i(484),BlendMode:i(255),ComputedSize:i(527),Crop:i(528),Depth:i(256),Flip:i(529),GetBounds:i(530),Mask:i(260),Origin:i(547),PathFollower:i(548),Pipeline:i(151),ScrollFactor:i(263),Size:i(549),Texture:i(550),TextureCrop:i(551),Tint:i(552),ToJSON:i(264),Transform:i(265),TransformMatrix:i(32),Visible:i(266)}},function(t,e){var i={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=i},function(t,e,i){var n=i(0),s=i(264),r=i(111),o=i(9),a=i(90),h=new n({Extends:o,initialize:function(t,e){o.call(this),this.scene=t,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new r(this)),this},setData:function(t,e){return this.data||(this.data=new r(this)),this.data.set(t,e),this},getData:function(t){return this.data||(this.data=new r(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.input&&(this.input.enabled=!1),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},update:function(){},toJSON:function(){return s(this)},willRender:function(t){return!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return i.unshift(this.scene.sys.displayList.getIndex(t)),i},destroy:function(t){if(void 0===t&&(t=!1),this.scene&&!this.ignoreDestroy){this.preDestroy&&this.preDestroy.call(this),this.emit(a.DESTROY,this);var e=this.scene.sys;t||(e.displayList.remove(this),e.updateList.remove(this)),this.input&&(e.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),t||e.queueDepthSort(),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0,this.removeAllListeners()}}});h.RENDER_MASK=15,t.exports=h},function(t,e,i){var n=i(166),s=i(6);t.exports=function(t,e,i){var r=s(t,e,null);if(null===r)return i;if(Array.isArray(r))return n.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return n.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return n.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},function(t,e,i){var n=i(0),s=i(21),r=i(22),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.displayList,this.updateList,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},s.register("GameObjectCreator",o,"make"),t.exports=o},function(t,e,i){var n=i(7),s=function(){var t,e,i,r,o,a,h=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof h&&(c=h,h=arguments[1]||{},l=2),u===l&&(h=this,--l);l=400&&t.status<=599&&(n=!1),this.resetXHR(),this.loader.nextFile(this,n)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(r.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=s.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=s.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){this.state=s.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.cache.add(this.key,this.data),this.pendingDestroy()},pendingDestroy:function(t){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(r.FILE_COMPLETE,e,i,t),this.loader.emit(r.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this)},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var n=new FileReader;n.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+n.result.split(",")[1]},n.onerror=t.onerror,n.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},function(t,e){var i={},n={},s={register:function(t,e,n,s){void 0===s&&(s=!1),i[t]={plugin:e,mapping:n,custom:s}},registerCustom:function(t,e,i,s){n[t]={plugin:e,mapping:i,data:s}},hasCore:function(t){return i.hasOwnProperty(t)},hasCustom:function(t){return n.hasOwnProperty(t)},getCore:function(t){return i[t]},getCustom:function(t){return n[t]},getCustomClass:function(t){return n.hasOwnProperty(t)?n[t].plugin:null},remove:function(t){i.hasOwnProperty(t)&&delete i[t]},removeCustom:function(t){n.hasOwnProperty(t)&&delete n[t]},destroyCorePlugins:function(){for(var t in i)i.hasOwnProperty(t)&&delete i[t]},destroyCustomPlugins:function(){for(var t in n)n.hasOwnProperty(t)&&delete n[t]}};t.exports=s},function(t,e,i){t.exports={BOOT:i(681),CREATE:i(682),DESTROY:i(683),PAUSE:i(684),POST_UPDATE:i(685),PRE_UPDATE:i(686),READY:i(687),RENDER:i(688),RESUME:i(689),SHUTDOWN:i(690),SLEEP:i(691),START:i(692),TRANSITION_COMPLETE:i(693),TRANSITION_INIT:i(694),TRANSITION_OUT:i(695),TRANSITION_START:i(696),TRANSITION_WAKE:i(697),UPDATE:i(698),WAKE:i(699)}},function(t,e){t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=o.width),void 0===s&&(s=o.height);var a=n(r,"isNotEmpty",!1),h=n(r,"isColliding",!1),l=n(r,"hasInterestingFace",!1);t<0&&(i+=t,t=0),e<0&&(s+=e,e=0),t+i>o.width&&(i=Math.max(o.width-t,0)),e+s>o.height&&(s=Math.max(o.height-e,0));for(var u=[],c=e;c=0;o--)t[o][e]=i+a*n,a++;return t}},function(t,e,i){var n,s,r,o=i(29),a=i(162),h=[],l=!1;t.exports={create2D:function(t,e,i){return n(t,e,i,o.CANVAS)},create:n=function(t,e,i,n,r){var u;void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=o.CANVAS),void 0===r&&(r=!1);var c=s(n);return null===c?(c={parent:t,canvas:document.createElement("canvas"),type:n},n===o.CANVAS&&h.push(c),u=c.canvas):(c.parent=t,u=c.canvas),r&&(c.parent=u),u.width=e,u.height=i,l&&n===o.CANVAS&&a.disable(u.getContext("2d")),u},createWebGL:function(t,e,i){return n(t,e,i,o.WEBGL)},disableSmoothing:function(){l=!0},enableSmoothing:function(){l=!1},first:s=function(t){if(void 0===t&&(t=o.CANVAS),t===o.WEBGL)return null;for(var e=0;e0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):n||r?s.TAU-(r>0?Math.acos(-n/this.scaleY):-Math.acos(n/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),n=this.matrix,s=n[0],r=n[1],o=n[2],a=n[3];return n[0]=s*i+o*e,n[1]=r*i+a*e,n[2]=s*-e+o*i,n[3]=r*-e+a*i,this},multiply:function(t,e){var i=this.matrix,n=t.matrix,s=i[0],r=i[1],o=i[2],a=i[3],h=i[4],l=i[5],u=n[0],c=n[1],d=n[2],f=n[3],p=n[4],g=n[5],v=void 0===e?this:e;return v.a=u*s+c*o,v.b=u*r+c*a,v.c=d*s+f*o,v.d=d*r+f*a,v.e=p*s+g*o+h,v.f=p*r+g*a+l,v},multiplyWithOffset:function(t,e,i){var n=this.matrix,s=t.matrix,r=n[0],o=n[1],a=n[2],h=n[3],l=e*r+i*a+n[4],u=e*o+i*h+n[5],c=s[0],d=s[1],f=s[2],p=s[3],g=s[4],v=s[5];return n[0]=c*r+d*a,n[1]=c*o+d*h,n[2]=f*r+p*a,n[3]=f*o+p*h,n[4]=g*r+v*a+l,n[5]=g*o+v*h+u,this},transform:function(t,e,i,n,s,r){var o=this.matrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],d=o[5];return o[0]=t*a+e*l,o[1]=t*h+e*u,o[2]=i*a+n*l,o[3]=i*h+n*u,o[4]=s*a+r*l+c,o[5]=s*h+r*u+d,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var n=this.matrix,s=n[0],r=n[1],o=n[2],a=n[3],h=n[4],l=n[5];return i.x=t*s+e*o+h,i.y=t*r+e*a+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=e*s-i*n;return t[0]=s/a,t[1]=-i/a,t[2]=-n/a,t[3]=e/a,t[4]=(n*o-s*r)/a,t[5]=-(e*o-i*r)/a,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){var e=this.matrix;return t.setTransform(e[0],e[1],e[2],e[3],e[4],e[5]),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,i,n,s,r){var o=this.matrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=n,o[4]=s,o[5]=r,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],n=e[1],s=e[2],r=e[3],o=i*r-n*s;if(t.translateX=e[4],t.translateY=e[5],i||n){var a=Math.sqrt(i*i+n*n);t.rotation=n>0?Math.acos(i/a):-Math.acos(i/a),t.scaleX=a,t.scaleY=o/a}else if(s||r){var h=Math.sqrt(s*s+r*r);t.rotation=.5*Math.PI-(r>0?Math.acos(-s/h):-Math.acos(s/h)),t.scaleX=o/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,i,n,s){var r=this.matrix,o=Math.sin(i),a=Math.cos(i);return r[4]=t,r[5]=e,r[0]=a*n,r[1]=o*n,r[2]=-o*s,r[3]=a*s,this},applyInverse:function(t,e,i){void 0===i&&(i=new r);var n=this.matrix,s=n[0],o=n[1],a=n[2],h=n[3],l=n[4],u=n[5],c=1/(s*h+a*-o);return i.x=h*c*t+-a*c*e+(u*a-l*h)*c,i.y=s*c*e+-o*c*t+(-u*s+l*o)*c,i},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.decomposedMatrix=null}});t.exports=o},function(t,e,i){var n=i(0),s=i(160),r=i(278),o=i(161),a=i(279),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(t,e,i,n)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(t,e,i,n,s){return void 0===n&&(n=255),void 0===s&&(s=!0),this._locked=!0,this.red=t,this.green=e,this.blue=i,this.alpha=n,this._locked=!1,this.update(s)},setGLTo:function(t,e,i,n){return void 0===n&&(n=1),this._locked=!0,this.redGL=t,this.greenGL=e,this.blueGL=i,this.alphaGL=n,this._locked=!1,this.update(!0)},setFromRGB:function(t){return this._locked=!0,this.red=t.r,this.green=t.g,this.blue=t.b,t.hasOwnProperty("a")&&(this.alpha=t.a),this._locked=!1,this.update(!0)},setFromHSV:function(t,e,i){return o(t,e,i,this)},update:function(t){if(void 0===t&&(t=!1),this._locked)return this;var e=this.r,i=this.g,n=this.b,o=this.a;return this._color=s(e,i,n),this._color32=r(e,i,n,o),this._rgba="rgba("+e+","+i+","+n+","+o/255+")",t&&a(e,i,n,this),this},updateHSV:function(){var t=this.r,e=this.g,i=this.b;return a(t,e,i,this),this},clone:function(){return new h(this.r,this.g,this.b,this.a)},gray:function(t){return this.setTo(t,t,t)},random:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t)),n=Math.floor(t+Math.random()*(e-t)),s=Math.floor(t+Math.random()*(e-t));return this.setTo(i,n,s)},randomGray:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t));return this.setTo(i,i,i)},saturate:function(t){return this.s+=t/100,this},desaturate:function(t){return this.s-=t/100,this},lighten:function(t){return this.v+=t/100,this},darken:function(t){return this.v-=t/100,this},brighten:function(t){var e=this.r,i=this.g,n=this.b;return e=Math.max(0,Math.min(255,e-Math.round(-t/100*255))),i=Math.max(0,Math.min(255,i-Math.round(-t/100*255))),n=Math.max(0,Math.min(255,n-Math.round(-t/100*255))),this.setTo(e,i,n)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(t){this.gl[0]=Math.min(Math.abs(t),1),this.r=Math.floor(255*this.gl[0]),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(t){this.gl[1]=Math.min(Math.abs(t),1),this.g=Math.floor(255*this.gl[1]),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(t){this.gl[2]=Math.min(Math.abs(t),1),this.b=Math.floor(255*this.gl[2]),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(t){this.gl[3]=Math.min(Math.abs(t),1),this.a=Math.floor(255*this.gl[3]),this.update()}},red:{get:function(){return this.r},set:function(t){t=Math.floor(Math.abs(t)),this.r=Math.min(t,255),this.gl[0]=t/255,this.update(!0)}},green:{get:function(){return this.g},set:function(t){t=Math.floor(Math.abs(t)),this.g=Math.min(t,255),this.gl[1]=t/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(t){t=Math.floor(Math.abs(t)),this.b=Math.min(t,255),this.gl[2]=t/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(t){t=Math.floor(Math.abs(t)),this.a=Math.min(t,255),this.gl[3]=t/255,this.update()}},h:{get:function(){return this._h},set:function(t){this._h=t,o(t,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(t){this._s=t,o(this._h,t,this._v,this)}},v:{get:function(){return this._v},set:function(t){this._v=t,o(this._h,this._s,t,this)}}});t.exports=h},function(t,e){t.exports=function(t,e,i,n,s,r){var o;void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=1);var a=0,h=t.length;if(1===r)for(o=s;o=0;o--)t[o][e]+=i+a*n,a++;return t}},function(t,e,i){var n=i(13);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.fillColor,r=n||e.fillAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.fillStyle="rgba("+o+","+a+","+h+","+r+")"}},,function(t,e){t.exports=function(t){return t.y+t.height-t.height*t.originY}},function(t,e){t.exports=function(t,e){return t.y=e-t.height+t.height*t.originY,t}},function(t,e){t.exports=function(t){return t.x-t.width*t.originX}},function(t,e){t.exports=function(t,e){return t.x=e+t.width*t.originX,t}},function(t,e){t.exports=function(t){return t.x+t.width-t.width*t.originX}},function(t,e){t.exports=function(t,e){return t.x=e-t.width+t.width*t.originX,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY}},function(t,e){t.exports=function(t,e){return t.y=e+t.height*t.originY,t}},function(t,e){t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},function(t,e){t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i}},function(t,e,i){t.exports={DESTROY:i(622),FADE_IN_COMPLETE:i(623),FADE_IN_START:i(624),FADE_OUT_COMPLETE:i(625),FADE_OUT_START:i(626),FLASH_COMPLETE:i(627),FLASH_START:i(628),PAN_COMPLETE:i(629),PAN_START:i(630),POST_RENDER:i(631),PRE_RENDER:i(632),SHAKE_COMPLETE:i(633),SHAKE_START:i(634),ZOOM_COMPLETE:i(635),ZOOM_START:i(636)}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.strokeColor,r=n||e.strokeAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.strokeStyle="rgba("+o+","+a+","+h+","+r+")",t.lineWidth=e.lineWidth}},function(t,e){t.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},function(t,e,i){var n=i(137),s=i(24);t.exports=function(t,e,i,r,o){for(var a=null,h=null,l=null,u=null,c=s(t,e,i,r,null,o),d=0;d0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e,i){var n=i(0),s=i(258),r=i(148),o=i(46),a=i(149),h=i(3),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=o.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(t){return void 0===t&&(t=new h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=l},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return Math.sqrt(s*s+r*r)}},function(t,e,i){t.exports={COMPLETE:i(871),DECODED:i(872),DECODED_ALL:i(873),DESTROY:i(874),DETUNE:i(875),GLOBAL_DETUNE:i(876),GLOBAL_MUTE:i(877),GLOBAL_RATE:i(878),GLOBAL_VOLUME:i(879),LOOP:i(880),LOOPED:i(881),MUTE:i(882),PAUSE_ALL:i(883),PAUSE:i(884),PLAY:i(885),RATE:i(886),RESUME_ALL:i(887),RESUME:i(888),SEEK:i(889),STOP_ALL:i(890),STOP:i(891),UNLOCKED:i(892),VOLUME:i(893)}},function(t,e,i){var n=i(0),s=i(19),r=i(20),o=i(8),a=i(2),h=i(6),l=i(7),u=new n({Extends:r,initialize:function(t,e,i,n,o){var u="json";if(l(e)){var c=e;e=a(c,"key"),i=a(c,"url"),n=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"dataKey",o)}var d={type:"json",cache:t.cacheManager.json,extension:u,responseType:"text",key:e,url:i,xhrSettings:n,config:o};r.call(this,t,d),l(i)&&(this.data=o?h(i,o):i,this.state=s.FILE_POPULATED)},onProcess:function(){if(this.state!==s.FILE_POPULATED){this.state=s.FILE_PROCESSING;var t=JSON.parse(this.xhrLoader.responseText),e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});o.register("json",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s80*i){n=h=t[0],a=l=t[1];for(var T=i;Th&&(h=u),f>l&&(l=f);g=0!==(g=Math.max(h-n,l-a))?1/g:0}return o(y,x,i,n,a,g),x}function s(t,e,i,n,s){var r,o;if(s===A(t,e,i,n)>0)for(r=e;r=e;r-=n)o=E(r,t[r],t[r+1],o);return o&&y(o,o.next)&&(_(o),o=o.next),o}function r(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!y(n,n.next)&&0!==m(n.prev,n,n.next))n=n.next;else{if(_(n),(n=e=n.prev)===n.next)break;i=!0}}while(i||n!==e);return e}function o(t,e,i,n,s,c,d){if(t){!d&&c&&function(t,e,i,n){var s=t;do{null===s.z&&(s.z=f(s.x,s.y,e,i,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,i,n,s,r,o,a,h,l=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||h>0&&n;)0!==a&&(0===h||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,h--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,l*=2}while(o>1)}(s)}(t,n,s,c);for(var p,g,v=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,n,s,c):a(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),_(t),t=g.next,v=g.next;else if((t=g)===v){d?1===d?o(t=l(t,e,i),e,i,n,s,c,2):2===d&&u(t,e,i,n,s,c):o(r(t),e,i,n,s,c,1);break}}}function a(t){var e=t.prev,i=t,n=t.next;if(m(e,i,n)>=0)return!1;for(var s=t.next.next;s!==t.prev;){if(g(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&m(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function h(t,e,i,n){var s=t.prev,r=t,o=t.next;if(m(s,r,o)>=0)return!1;for(var a=s.xr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,u=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=f(a,h,e,i,n),d=f(l,u,e,i,n),p=t.prevZ,v=t.nextZ;p&&p.z>=c&&v&&v.z<=d;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&m(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,v!==t.prev&&v!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&m(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;v&&v.z<=d;){if(v!==t.prev&&v!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function l(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!y(s,r)&&x(s,n,n.next,r)&&T(s,r)&&T(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),_(n),_(n.next),n=t=r),n=n.next}while(n!==t);return n}function u(t,e,i,n,s,a){var h=t;do{for(var l=h.next.next;l!==h.prev;){if(h.i!==l.i&&v(h,l)){var u=w(h,l);return h=r(h,h.next),u=r(u,u.next),o(h,e,i,n,s,a),void o(u,e,i,n,s,a)}l=l.next}h=h.next}while(h!==t)}function c(t,e){return t.x-e.x}function d(t,e){if(e=function(t,e){var i,n=e,s=t.x,r=t.y,o=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&a>o){if(o=a,a===s){if(r===n.y)return n;if(r===n.next.y)return n.next}i=n.x=n.x&&n.x>=u&&s!==n.x&&g(ri.x)&&T(n,t)&&(i=n,d=h),n=n.next;return i}(t,e)){var i=w(e,t);r(i,i.next)}}function f(t,e,i,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*s)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*s)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{e.x=0&&(t-o)*(n-a)-(i-o)*(e-a)>=0&&(i-o)*(r-a)-(s-o)*(n-a)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&x(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&T(t,e)&&T(e,t)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(t,e)}function m(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function y(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,i,n){return!!(y(t,e)&&y(i,n)||y(t,n)&&y(i,e))||m(t,e,i)>0!=m(t,e,n)>0&&m(i,n,t)>0!=m(i,n,e)>0}function T(t,e){return m(t.prev,t,t.next)<0?m(t,e,t.next)>=0&&m(t,t.prev,e)>=0:m(t,e,t.prev)<0||m(t,t.next,e)<0}function w(t,e){var i=new b(t.i,t.x,t.y),n=new b(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function E(t,e,i,n){var s=new b(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function _(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function b(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(t,e,i,n){for(var s=0,r=e,o=i-n;r0&&(n+=t[s-1].length,i.holes.push(n))}return i}},function(t,e){t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},function(t,e){t.exports=function(t,e,i,n){var s=t.length;if(e<0||e>s||e>=i||i>s||e+i>s){if(n)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},function(t,e,i){var n=i(0),s=i(12),r=i(14),o=i(949),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Size,s.TextureCrop,s.Tint,s.Transform,s.Visible,o],initialize:function(t,e,i,n,o){r.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new s.Animation(this),this.setTexture(n,o),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e,i){return this.anims.play(t,e,i),this},toJSON:function(){return s.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=a},function(t,e,i){var n=i(10);t.exports=function(t,e,i,s,r){var o=t.strokeTint,a=n.getTintAppendFloatAlphaAndSwap(e.strokeColor,e.strokeAlpha*i);o.TL=a,o.TR=a,o.BL=a,o.BR=a;var h=e.pathData,l=h.length-1,u=e.lineWidth,c=u/2,d=h[0]-s,f=h[1]-r;e.closePath||(l-=2);for(var p=2;p=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=u},function(t,e,i){var n=i(0),s=i(19),r=i(20),o=i(8),a=i(2),h=i(7),l=new n({Extends:r,initialize:function t(e,i,n,s,o){var l,u="png";if(h(i)){var c=i;i=a(c,"key"),n=a(c,"url"),l=a(c,"normalMap"),s=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"frameConfig")}Array.isArray(n)&&(l=n[1],n=n[0]);var d={type:"image",cache:e.textureManager,extension:u,responseType:"blob",key:i,url:n,xhrSettings:s,config:o};if(r.call(this,e,d),l){var f=new t(e,this.key,l,s,o);f.type="normalMap",this.setLink(f),e.addFile(f)}},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){r.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(t.data),t.onProcessError()},r.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===s.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});o.register("image",function(t,e,i){if(Array.isArray(t))for(var n=0;nthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=t.properties,this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(t){var e=this.tilemapLayer;return e?e.tileToWorldX(this.x,t):this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return void 0===e&&(e=new r),e.x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-e.y,e},getCenterX:function(t){return(this.getLeft(t)+this.getRight(t))/2},getCenterY:function(t){return(this.getTop(t)+this.getBottom(t))/2},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){(void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){(void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight,this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.layer.tilemapLayer;if(t){var e=t.gidMap[this.index];if(e)return e}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=o},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,n=t[e],s=e;si&&(e=i/2);var n=Math.max(1,Math.round(i/e));return s(this.getSpacedPoints(n),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],n=this.getPoint(0,this._tmpVec2A),s=0;i.push(0);for(var r=1;r<=t;r++)s+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(n),i.push(s),n.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var n=0;n<=t;n++)i.push(this.getPoint(n/t));return i},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++){var n=this.getUtoTmapping(i/t,null,t);e.push(this.getPoint(n))}return e},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=t-1e-4,n=t+1e-4;return i<0&&(i=0),n>1&&(n=1),this.getPoint(i,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var n,s=this.getLengths(i),r=0,o=s.length;n=e?Math.min(e,s[o-1]):t*s[o-1];for(var a,h=0,l=o-1;h<=l;)if((a=s[r=Math.floor(h+(l-h)/2)]-n)<0)h=r+1;else{if(!(a>0)){l=r;break}l=r-1}if(s[r=l]===n)return r/(o-1);var u=s[r];return(r+(n-u)/(s[r+1]-u))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},function(t,e,i){t.exports={ADD:i(850),COMPLETE:i(851),FILE_COMPLETE:i(852),FILE_KEY_COMPLETE:i(853),FILE_LOAD_ERROR:i(854),FILE_LOAD:i(855),FILE_PROGRESS:i(856),POST_PROCESS:i(857),PROGRESS:i(858),START:i(859)}},function(t,e,i){var n=i(164),s=i(178);t.exports=function(t,e){var i=n.Power0;if("string"==typeof t)if(n.hasOwnProperty(t))i=n[t];else{var r="";t.indexOf(".")&&("in"===(r=t.substr(t.indexOf(".")+1)).toLowerCase()?r="easeIn":"out"===r.toLowerCase()?r="easeOut":"inout"===r.toLowerCase()&&(r="easeInOut")),t=s(t.substr(0,t.indexOf(".")+1)+r),n.hasOwnProperty(t)&&(i=n[t])}else"function"==typeof t?i=t:Array.isArray(t)&&t.length;if(!e)return i;var o=e.slice(0);return o.unshift(0),function(t){return o[0]=t,i.apply(this,o)}}},function(t,e){t.exports=function(t,e,i){var n=t.x3-t.x1,s=t.y3-t.y1,r=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,h=i-t.y1,l=n*n+s*s,u=n*r+s*o,c=n*a+s*h,d=r*r+o*o,f=r*a+o*h,p=l*d-u*u,g=0===p?0:1/p,v=(d*c-u*f)*g,m=(l*f-u*c)*g;return v>=0&&m>=0&&v+m<1}},function(t,e,i){var n=i(4);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.x1,r=t.y1,o=t.x2,a=t.y2,h=e.x1,l=e.y1,u=e.x2,c=e.y2,d=(u-h)*(r-l)-(c-l)*(s-h),f=(o-s)*(r-l)-(a-r)*(s-h),p=(c-l)*(o-s)-(u-h)*(a-r);if(0===p)return!1;var g=d/p,v=f/p;return g>=0&&g<=1&&v>=0&&v<=1&&(i.x=s+g*(o-s),i.y=r+g*(a-r),!0)}},function(t,e){t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},,function(t,e,i){var n=i(23);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e){t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},function(t,e){t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},function(t,e,i){t.exports={DESTROY:i(557),VIDEO_COMPLETE:i(558),VIDEO_CREATED:i(559),VIDEO_ERROR:i(560),VIDEO_LOOP:i(561),VIDEO_PLAY:i(562),VIDEO_SEEKED:i(563),VIDEO_SEEKING:i(564),VIDEO_STOP:i(565),VIDEO_TIMEOUT:i(566),VIDEO_UNLOCKED:i(567)}},function(t,e,i){var n=i(0),s=i(12),r=i(35),o=i(9),a=i(48),h=i(11),l=i(32),u=i(159),c=i(3),d=new n({Extends:o,Mixins:[s.Alpha,s.Visible],initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),o.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.resolution=1,this.roundPixels=!1,this.useBounds=!1,this.worldView=new h,this.dirty=!0,this._x=t,this._y=e,this._cx=0,this._cy=0,this._cw=0,this._ch=0,this._width=i,this._height=n,this._bounds=new h,this._scrollX=0,this._scrollY=0,this._zoom=1,this._rotation=0,this.matrix=new l,this.transparent=!0,this.backgroundColor=u("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new c(i/2,n/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this},getScroll:function(t,e,i){void 0===i&&(i=new c);var n=.5*this.width,s=.5*this.height;return i.x=t-n,i.y=e-s,this.useBounds&&(i.x=this.clampX(i.x),i.y=this.clampY(i.y)),i},centerOnX:function(t){var e=.5*this.width;return this.midPoint.x=t,this.scrollX=t-e,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(t){var e=.5*this.height;return this.midPoint.y=t,this.scrollY=t-e,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(t,e){return this.centerOnX(t),this.centerOnY(e),this},centerToBounds:function(){if(this.useBounds){var t=this._bounds,e=.5*this.width,i=.5*this.height;this.midPoint.set(t.centerX,t.centerY),this.scrollX=t.centerX-e,this.scrollY=t.centerY-i}return this},centerToSize:function(){return this.scrollX=.5*this.width,this.scrollY=.5*this.height,this},cull:function(t){if(this.disableCull)return t;var e=this.matrix.matrix,i=e[0],n=e[1],s=e[2],r=e[3],o=i*r-n*s;if(!o)return t;var a=e[4],h=e[5],l=this.scrollX,u=this.scrollY,c=this.width,d=this.height,f=this.culledObjects,p=t.length;o=1/o,f.length=0;for(var g=0;gC&&wA&&Es&&(t=s),t},clampY:function(t){var e=this._bounds,i=this.displayHeight,n=e.y+(i-this.height)/2,s=Math.max(n,n+e.height-i);return ts&&(t=s),t},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=r(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=u(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n,s){return void 0===s&&(s=!1),this._bounds.setTo(t,e,i,n),this.dirty=!0,this.useBounds=!0,s?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(t){void 0===t&&(t=new h);var e=this._bounds;return t.setTo(e.x,e.y,e.width,e.height),t},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t){this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=t;var e=t.sys;this.sceneManager=e.game.scene,this.scaleManager=e.scale,this.cameraManager=e.cameras;var i=this.scaleManager.resolution;return this.resolution=i,this._cx=this._x*i,this._cy=this._y*i,this._cw=this._width*i,this._ch=this._height*i,this.updateSystem(),this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setZoom:function(t){return void 0===t&&(t=1),0===t&&(t=.001),this.zoom=t,this},setMask:function(t,e){return void 0===e&&(e=!0),this.mask=t,this._maskCamera=e?this.cameraManager.default:this,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},update:function(){},updateSystem:function(){if(this.scaleManager){var t=0!==this._x||0!==this._y||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,e=this.sceneManager;t&&!this._customViewport?e.customViewports++:!t&&this._customViewport&&e.customViewports--,this.dirty=!0,this._customViewport=t}},destroy:function(){this.emit(a.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(t){this._x=t,this._cx=t*this.resolution,this.updateSystem()}},y:{get:function(){return this._y},set:function(t){this._y=t,this._cy=t*this.resolution,this.updateSystem()}},width:{get:function(){return this._width},set:function(t){this._width=t,this._cw=t*this.resolution,this.updateSystem()}},height:{get:function(){return this._height},set:function(t){this._height=t,this._ch=t*this.resolution,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(t){this._scrollX=t,this.dirty=!0}},scrollY:{get:function(){return this._scrollY},set:function(t){this._scrollY=t,this.dirty=!0}},zoom:{get:function(){return this._zoom},set:function(t){this._zoom=t,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoom}},displayHeight:{get:function(){return this.height/this.zoom}}});t.exports=d},function(t,e,i){t.exports={ENTER_FULLSCREEN:i(675),FULLSCREEN_FAILED:i(676),FULLSCREEN_UNSUPPORTED:i(677),LEAVE_FULLSCREEN:i(678),ORIENTATION_CHANGE:i(679),RESIZE:i(680)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),n?(i+t)/e:i+t)}},function(t,e,i){var n=i(0),s=i(23),r=i(17),o=new n({initialize:function(t,e,i,n,s,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0}},this.setSize(r,o,n,s)},setSize:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=0),this.cutX=i,this.cutY=n,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var s=this.data,r=s.cut;r.x=i,r.y=n,r.w=t,r.h=e,r.r=i+t,r.b=n+e,s.sourceSize.w=t,s.sourceSize.h=e,s.spriteSourceSize.w=t,s.spriteSourceSize.h=e,s.radius=.5*Math.sqrt(t*t+e*e);var o=s.drawImage;return o.x=i,o.y=n,o.width=t,o.height=e,this.updateUVs()},setTrim:function(t,e,i,n,s,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=n,a.w=s,a.h=r,a.r=i+s,a.b=n+r,this.x=i,this.y=n,this.width=s,this.height=r,this.halfWidth=.5*s,this.halfHeight=.5*r,this.centerX=Math.floor(s/2),this.centerY=Math.floor(r/2),this.updateUVs()},setCropUVs:function(t,e,i,n,r,o,a){var h=this.cutX,l=this.cutY,u=this.cutWidth,c=this.cutHeight,d=this.realWidth,f=this.realHeight,p=h+(e=s(e,0,d)),g=l+(i=s(i,0,f)),v=n=s(n,0,d-e),m=r=s(r,0,f-i),y=this.data;if(y.trim){var x=y.spriteSourceSize,T=e+(n=s(n,0,u-e)),w=i+(r=s(r,0,c-i));if(!(x.rT||x.y>w)){var E=Math.max(x.x,e),_=Math.max(x.y,i),b=Math.min(x.r,T)-E,A=Math.min(x.b,w)-_;v=b,m=A,p=o?h+(u-(E-x.x)-b):h+(E-x.x),g=a?l+(c-(_-x.y)-A):l+(_-x.y),e=E,i=_,n=b,r=A}else p=0,g=0,v=0,m=0}else o&&(p=h+(u-e-n)),a&&(g=l+(c-i-r));var S=this.source.width,C=this.source.height;return t.u0=Math.max(0,p/S),t.v0=Math.max(0,g/C),t.u1=Math.min(1,(p+v)/S),t.v1=Math.min(1,(g+m)/C),t.x=e,t.y=i,t.cx=p,t.cy=g,t.cw=v,t.ch=m,t.width=n,t.height=r,t.flipX=o,t.flipY=a,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=n;var r=this.source.width,o=this.source.height;return this.u0=t/r,this.v0=e/o,this.u1=(t+i)/r,this.v1=(e+n)/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new o(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=r(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=o},function(t,e,i){var n=i(0),s=i(96),r=i(376),o=i(377),a=i(46),h=i(152),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=a.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=l},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var n=i(237),s=i(0),r=i(90),o=i(2),a=i(6),h=i(7),l=i(370),u=i(107),c=i(69),d=new s({initialize:function(t,e,i){i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?h(e[0])&&(i=e,e=null):h(e)&&(i=e,e=null),this.scene=t,this.children=new u(e),this.isParent=!0,this.type="Group",this.classType=o(i,"classType",c),this.name=o(i,"name",""),this.active=o(i,"active",!0),this.maxSize=o(i,"maxSize",-1),this.defaultKey=o(i,"defaultKey",null),this.defaultFrame=o(i,"defaultFrame",null),this.runChildUpdate=o(i,"runChildUpdate",!1),this.createCallback=o(i,"createCallback",null),this.removeCallback=o(i,"removeCallback",null),this.createMultipleCallback=o(i,"createMultipleCallback",null),i&&this.createMultiple(i)},create:function(t,e,i,n,s,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(o),o.preUpdate&&this.scene.sys.updateList.add(o),o.visible=s,o.setActive(r),this.add(o),o},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i=0;u--)if((l=d[u]).active===i){if(++c===e)break}else l=null;return l?("number"==typeof s&&(l.x=s),"number"==typeof r&&(l.y=r),l):n?this.create(s,r,o,a,h):null},get:function(t,e,i,n,s){return this.getFirst(!1,!0,t,e,i,n,s)},getFirstAlive:function(t,e,i,n,s,r){return this.getFirst(!0,t,e,i,n,s,r)},getFirstDead:function(t,e,i,n,s,r){return this.getFirst(!1,t,e,i,n,s,r)},playAnimation:function(t,e){return n.PlayAnimation(this.children.entries,t,e),this},isFull:function(){return-1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i=0&&t=0&&e-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t-1},union:function(t){var e=new n;return t.entries.forEach(function(t){e.set(t)}),this.entries.forEach(function(t){e.set(t)}),e},intersect:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)&&e.set(i)}),e},difference:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)||e.set(i)}),e},size:{get:function(){return this.entries.length},set:function(t){return t0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e,i){(function(e){var i={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){var t=navigator.userAgent;/Windows/.test(t)?i.windows=!0:/Mac OS/.test(t)&&!/like Mac OS/.test(t)?i.macOS=!0:/Android/.test(t)?i.android=!0:/Linux/.test(t)?i.linux=!0:/iP[ao]d|iPhone/i.test(t)?(i.iOS=!0,navigator.appVersion.match(/OS (\d+)/),i.iOSVersion=parseInt(RegExp.$1,10),i.iPhone=-1!==t.toLowerCase().indexOf("iphone"),i.iPad=-1!==t.toLowerCase().indexOf("ipad")):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?i.kindle=!0:/CrOS/.test(t)&&(i.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(i.android=!1,i.iOS=!1,i.macOS=!1,i.windows=!0,i.windowsPhone=!0);var n=/Silk/.test(t);return(i.windows||i.macOS||i.linux&&!n||i.chromeOS)&&(i.desktop=!0),(i.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(i.desktop=!1),navigator.standalone&&(i.webApp=!0),void 0!==window.cordova&&(i.cordova=!0),void 0!==e&&e.versions&&e.versions.node&&(i.node=!0),i.node&&"object"==typeof e.versions&&(i.nodeWebkit=!!e.versions["node-webkit"],i.electron=!!e.versions.electron),void 0!==window.ejecta&&(i.ejecta=!0),/Crosswalk/.test(t)&&(i.crosswalk=!0),i.pixelRatio=window.devicePixelRatio||1,i}()}).call(this,i(701))},function(t,e,i){var n,s=i(114),r={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0};t.exports=(n=navigator.userAgent,/Edge\/\d+/.test(n)?r.edge=!0:/Chrome\/(\d+)/.test(n)&&!s.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(n)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(n)&&s.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(n)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(n)?r.opera=!0:/Safari/.test(n)&&!s.windowsPhone?r.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(n)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(n)&&(r.silk=!0),r)},function(t,e){t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e,i){t.exports={ADD:i(748),ERROR:i(749),LOAD:i(750),READY:i(751),REMOVE:i(752)}},function(t,e){t.exports=function(t,e){var i;if(e)"string"==typeof e?i=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(i=e);else if(t.parentElement)return t;return i||(i=document.body),i.appendChild(t),t}},function(t,e,i){var n=i(79);t.exports=function(t,e,i,s){var r;if(void 0===s&&(s=t),!Array.isArray(e))return-1!==(r=t.indexOf(e))?(n(t,r),i&&i.call(s,e),e):null;for(var o=e.length-1;o>=0;){var a=e[o];-1!==(r=t.indexOf(a))?(n(t,r),i&&i.call(s,a)):e.pop(),o--}return e}},function(t,e){t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175}},function(t,e){t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},function(t,e,i){var n=i(0),s=i(67),r=i(9),o=i(59),a=i(18),h=i(1),l=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.jsonCache=t.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,t.events.on(a.BLUR,function(){this.pauseOnBlur&&this.onBlur()},this),t.events.on(a.FOCUS,function(){this.pauseOnBlur&&this.onFocus()},this),t.events.on(a.PRE_STEP,this.update,this),t.events.once(a.DESTROY,this.destroy,this)},add:h,addAudioSprite:function(t,e){void 0===e&&(e={});var i=this.add(t,e);for(var n in i.spritemap=this.jsonCache.get(t).spritemap,i.spritemap)if(i.spritemap.hasOwnProperty(n)){var r=s(e),o=i.spritemap[n];r.loop=!!o.hasOwnProperty("loop")&&o.loop,i.addMarker({name:n,start:o.start,duration:o.end-o.start,config:r})}return i},play:function(t,e){var i=this.add(t);return i.once(o.COMPLETE,i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var n=this.addAudioSprite(t);return n.once(o.COMPLETE,n.destroy,n),n.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var n=this.sounds[i];n.key===t&&(n.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound(function(t){t.pause()}),this.emit(o.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit(o.RESUME_ALL,this)},stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit(o.STOP_ALL,this)},unlock:h,onBlur:h,onFocus:h,update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(o.UNLOCKED,this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach(function(i){i.update(t,e)})},destroy:function(){this.removeAllListeners(),this.forEachActiveSound(function(t){t.destroy()}),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach(function(n,s){n&&!n.pendingRemove&&t.call(e||i,n,s,i.sounds)})},setRate:function(t){return this.rate=t,this},rate:{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound(function(t){t.calculateRate()}),this.emit(o.GLOBAL_RATE,this,t)}},setDetune:function(t){return this.detune=t,this},detune:{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound(function(t){t.calculateRate()}),this.emit(o.GLOBAL_DETUNE,this,t)}}});t.exports=l},function(t,e,i){var n=i(0),s=i(9),r=i(59),o=i(17),a=i(1),h=new n({Extends:s,initialize:function(t,e,i){s.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},this.currentConfig=this.config,this.config=o(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(console.error("addMarker "+t.name+" already exists in Sound"),!1):(t=o(!0,{name:"",start:0,duration:this.totalDuration-(t.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0}},t),this.markers[t.name]=t,!0))},updateMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(this.markers[t.name]=o(!0,this.markers[t.name],t),!0):(console.warn("Audio Marker: "+t.name+" missing in Sound: "+this.key),!1))},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):null},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return!1;if(t){if(!this.markers[t])return console.warn("Marker: "+t+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=o(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:a,calculateRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e},destroy:function(){this.pendingRemove||(this.emit(r.DESTROY,this),this.pendingRemove=!0,this.manager=null,this.key="",this.removeAllListeners(),this.isPlaying=!1,this.isPaused=!1,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});t.exports=h},function(t,e,i){var n=i(180),s=i(0),r=i(1),o=i(126),a=new s({initialize:function(t){this.parent=t,this.list=[],this.position=0,this.addCallback=r,this.removeCallback=r,this._sortKey=""},add:function(t,e){return e?n.Add(this.list,t):n.Add(this.list,t,0,this.addCallback,this)},addAt:function(t,e,i){return i?n.AddAt(this.list,t,e):n.AddAt(this.list,t,e,0,this.addCallback,this)},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(t,e){return t?(void 0===e&&(e=function(e,i){return e[t]-i[t]}),o.inplace(this.list,e),this):this},getByName:function(t){return n.GetFirst(this.list,"name",t)},getRandom:function(t,e){return n.GetRandom(this.list,t,e)},getFirst:function(t,e,i,s){return n.GetFirst(this.list,t,e,i,s)},getAll:function(t,e,i,s){return n.GetAll(this.list,t,e,i,s)},count:function(t,e){return n.CountAllMatching(this.list,t,e)},swap:function(t,e){n.Swap(this.list,t,e)},moveTo:function(t,e){return n.MoveTo(this.list,t,e)},remove:function(t,e){return e?n.Remove(this.list,t):n.Remove(this.list,t,this.removeCallback,this)},removeAt:function(t,e){return e?n.RemoveAt(this.list,t):n.RemoveAt(this.list,t,this.removeCallback,this)},removeBetween:function(t,e,i){return i?n.RemoveBetween(this.list,t,e):n.RemoveBetween(this.list,t,e,this.removeCallback,this)},removeAll:function(t){for(var e=this.list.length;e--;)this.remove(this.list[e],t);return this},bringToTop:function(t){return n.BringToTop(this.list,t)},sendToBack:function(t){return n.SendToBack(this.list,t)},moveUp:function(t){return n.MoveUp(this.list,t),t},moveDown:function(t){return n.MoveDown(this.list,t),t},reverse:function(){return this.list.reverse(),this},shuffle:function(){return n.Shuffle(this.list),this},replace:function(t,e){return n.Replace(this.list,t,e)},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e,i,s){return n.SetAll(this.list,t,e,i,s),this},each:function(t,e){for(var i=[null],n=2;n0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});t.exports=a},function(t,e,i){var n=i(181),s=i(368);t.exports=function(t,e){if(void 0===e&&(e=90),!n(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=s(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=s(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;il&&(r=l),o>l&&(o=l),a=s,h=r;;)if(a0&&o.length0&&a.lengthe.right||t.y>e.bottom)}},function(t,e,i){var n=i(6),s={},r={register:function(t,e,i,n,r){s[t]={plugin:e,mapping:i,settingsKey:n,configKey:r}},getPlugin:function(t){return s[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,r=e.game.config;for(var o in s){var a=s[o].plugin,h=s[o].mapping,l=s[o].settingsKey,u=s[o].configKey;n(i,l,r[u])&&(t[h]=new a(t))}},remove:function(t){s.hasOwnProperty(t)&&delete s[t]}};t.exports=r},function(t,e,i){t.exports={ANY_KEY_DOWN:i(1192),ANY_KEY_UP:i(1193),COMBO_MATCH:i(1194),DOWN:i(1195),KEY_DOWN:i(1196),KEY_UP:i(1197),UP:i(1198)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e){t.exports=function(t,e,i,n,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),{responseType:t,async:e,user:i,password:n,timeout:s,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0}}},function(t,e,i){var n=i(0),s=i(213),r=i(69),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.body=null}});t.exports=o},,function(t,e,i){t.exports={CalculateFacesAt:i(216),CalculateFacesWithin:i(51),Copy:i(1286),CreateFromTiles:i(1287),CullTiles:i(1288),Fill:i(1289),FilterTiles:i(1290),FindByIndex:i(1291),FindTile:i(1292),ForEachTile:i(1293),GetTileAt:i(137),GetTileAtWorldXY:i(1294),GetTilesWithin:i(24),GetTilesWithinShape:i(1295),GetTilesWithinWorldXY:i(1296),HasTileAt:i(456),HasTileAtWorldXY:i(1297),IsInLayerBounds:i(103),PutTileAt:i(217),PutTileAtWorldXY:i(1298),PutTilesAt:i(1299),Randomize:i(1300),RemoveTileAt:i(457),RemoveTileAtWorldXY:i(1301),RenderDebug:i(1302),ReplaceByIndex:i(455),SetCollision:i(1303),SetCollisionBetween:i(1304),SetCollisionByExclusion:i(1305),SetCollisionByProperty:i(1306),SetCollisionFromCollisionGroup:i(1307),SetTileIndexCallback:i(1308),SetTileLocationCallback:i(1309),Shuffle:i(1310),SwapByIndex:i(1311),TileToWorldX:i(138),TileToWorldXY:i(1312),TileToWorldY:i(139),WeightedRandomize:i(1313),WorldToTileX:i(63),WorldToTileXY:i(1314),WorldToTileY:i(64)}},function(t,e,i){var n=i(103);t.exports=function(t,e,i,s){if(void 0===i&&(i=!1),n(t,e,s)){var r=s.data[e][t]||null;return null===r?null:-1===r.index?i?r:null:r}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o,a){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o={}),void 0===a&&(a={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=n,this.tileMargin=s,this.tileSpacing=r,this.tileProperties=o,this.tileData=a,this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){var e=this.getTileData(t);return e&&e.objectgroup?e.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t1?2-s:s,o=r*Math.cos(i),a=r*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},function(t,e,i){var n=i(23),s=i(0),r=i(9),o=i(109),a=i(253),h=i(254),l=i(6),u=new s({Extends:r,initialize:function(t,e,i){r.call(this),this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,l(i,"frames",[]),l(i,"defaultTextureKey",null)),this.frameRate=l(i,"frameRate",null),this.duration=l(i,"duration",null),null===this.duration&&null===this.frameRate?(this.frameRate=24,this.duration=this.frameRate/this.frames.length*1e3):this.duration&&null===this.frameRate?this.frameRate=this.frames.length/(this.duration/1e3):this.duration=this.frames.length/this.frameRate*1e3,this.msPerFrame=1e3/this.frameRate,this.skipMissedFrames=l(i,"skipMissedFrames",!0),this.delay=l(i,"delay",0),this.repeat=l(i,"repeat",0),this.repeatDelay=l(i,"repeatDelay",0),this.yoyo=l(i,"yoyo",!1),this.showOnStart=l(i,"showOnStart",!1),this.hideOnComplete=l(i,"hideOnComplete",!1),this.paused=!1,this.manager.on(o.PAUSE_ALL,this.pause,this),this.manager.on(o.RESUME_ALL,this.resume,this)},addFrame:function(t){return this.addFrameAt(this.frames.length,t)},addFrameAt:function(t,e){var i=this.getFrames(this.manager.textureManager,e);if(i.length>0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var n=this.frames.slice(0,t),s=this.frames.slice(t);this.frames=n.concat(i,s)}this.updateFrameSequence()}return this},checkFrame:function(t){return t>=0&&t0){s.isLast=!0,s.nextFrame=a[0],a[0].prevFrame=s;var v=1/(a.length-1);for(r=0;r=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo);var i=this.frames[e];0!==e||t.forward||(i=this.getLastFrame()),t.updateFrame(i)},getFrameByProgress:function(t){return t=n(t,0,1),a(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t._yoyo?this.handleYoyoFrame(t,!1):t.repeatCounter>0?t._reverse&&t.forward?t.forward=!1:this.repeatAnimation(t):this.completeAnimation(t):this.updateAndGetNextTick(t,e.nextFrame)},handleYoyoFrame:function(t,e){if(e||(e=!1),t._reverse===!e&&t.repeatCounter>0)return t.forward=e,void this.repeatAnimation(t);if(t._reverse===e||0!==t.repeatCounter){t.forward=e;var i=e?t.currentFrame.nextFrame:t.currentFrame.prevFrame;this.updateAndGetNextTick(t,i)}else this.completeAnimation(t)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t._yoyo?this.handleYoyoFrame(t,!0):t.repeatCounter>0?t._reverse&&!t.forward?(t.currentFrame=this.getLastFrame(),this.repeatAnimation(t)):(t.forward=!0,this.repeatAnimation(t)):this.completeAnimation(t):this.updateAndGetNextTick(t,e.prevFrame)},updateAndGetNextTick:function(t,e){t.updateFrame(e),this.getNextTick(t)},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){if(2===t._pendingStop)return this.completeAnimation(t);if(t._repeatDelay>0&&!1===t.pendingRepeat)t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t._repeatDelay;else if(t.repeatCounter--,t.updateFrame(t.currentFrame[t.forward?"nextFrame":"prevFrame"]),t.isPlaying){this.getNextTick(t),t.pendingRepeat=!1;var e=t.currentFrame,i=t.parent;this.emit(o.ANIMATION_REPEAT,this,e),i.emit(o.SPRITE_ANIMATION_KEY_REPEAT+this.key,this,e,t.repeatCounter,i),i.emit(o.SPRITE_ANIMATION_REPEAT,this,e,t.repeatCounter,i)}},setFrame:function(t){t.forward?this.nextFrame(t):this.previousFrame(t)},toJSON:function(){var t={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(e){t.frames.push(e.toJSON())}),t},updateFrameSequence:function(){for(var t,e=this.frames.length,i=1/(e-1),n=0;n1?(t.isLast=!0,t.prevFrame=this.frames[e-2],t.nextFrame=this.frames[0]):e>1&&(t.prevFrame=this.frames[n-1],t.nextFrame=this.frames[n+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.removeAllListeners(),this.manager.off(o.PAUSE_ALL,this.pause,this),this.manager.off(o.RESUME_ALL,this.resume,this),this.manager.remove(this.key);for(var t=0;t=1)return i.x=t.x,i.y=t.y,i;var r=n(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},function(t,e,i){var n=i(56),s=i(4);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=n(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,l=t.y2,u=0;u=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(s*a+o*h),e}},function(t,e){t.exports=function(t,e,i,n,s){var r=n+Math.atan2(t.y-i,t.x-e);return t.x=e+s*Math.cos(r),t.y=i+s*Math.sin(r),t}},function(t,e){t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},function(t,e){t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},function(t,e,i){var n=new(i(0))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(s-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(277),s=i(280),r=i(282),o=i(283);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?o(t):n(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var n=i(160);t.exports=function(t,e,i,s){void 0===e&&(e=1),void 0===i&&(i=1);var r=Math.floor(6*t),o=6*t-r,a=Math.floor(i*(1-e)*255),h=Math.floor(i*(1-o*e)*255),l=Math.floor(i*(1-(1-o)*e)*255),u=i=Math.floor(i*=255),c=i,d=i,f=r%6;return 0===f?(c=l,d=a):1===f?(u=h,d=a):2===f?(u=a,d=l):3===f?(u=a,c=h):4===f?(u=l,c=a):5===f&&(c=a,d=h),s?s.setTo?s.setTo(u,c,d,s.alpha,!1):(s.r=u,s.g=c,s.b=d,s.color=n(u,c,d),s):{r:u,g:c,b:d,color:n(u,c,d)}}},function(t,e){var i,n="";t.exports={disable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!1),t},enable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!0),t},getPrefix:i=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z;return this.x=i*o-n*r,this.y=n*s-e*o,this.z=e*r-i*s,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=e*s[0]+i*s[3]+n*s[6],this.y=e*s[1]+i*s[4]+n*s[7],this.z=e*s[2]+i*s[5]+n*s[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12],this.y=s[1]*e+s[5]*i+s[9]*n+s[13],this.z=s[2]*e+s[6]*i+s[10]*n+s[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=e*s[0]+i*s[4]+n*s[8]+s[12],o=e*s[1]+i*s[5]+n*s[9]+s[13],a=e*s[2]+i*s[6]+n*s[10]+s[14],h=e*s[3]+i*s[7]+n*s[11]+s[15];return this.x=r/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},project:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=s[0],o=s[1],a=s[2],h=s[3],l=s[4],u=s[5],c=s[6],d=s[7],f=s[8],p=s[9],g=s[10],v=s[11],m=s[12],y=s[13],x=s[14],T=1/(e*h+i*d+n*v+s[15]);return this.x=(e*r+i*l+n*f+m)*T,this.y=(e*o+i*u+n*p+y)*T,this.z=(e*a+i*c+n*g+x)*T,this},unproject:function(t,e){var i=t.x,n=t.y,s=t.z,r=t.w,o=this.x-i,a=r-this.y-1-n,h=this.z;return this.x=2*o/s-1,this.y=2*a/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});n.ZERO=new n,n.RIGHT=new n(1,0,0),n.LEFT=new n(-1,0,0),n.UP=new n(0,-1,0),n.DOWN=new n(0,1,0),n.FORWARD=new n(0,0,1),n.BACK=new n(0,0,-1),n.ONE=new n(1,1,1),t.exports=n},function(t,e,i){t.exports={Global:["game","anims","cache","plugins","registry","scale","sound","textures"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},function(t,e,i){var n=i(11),s=i(13);t.exports=function(t,e){if(void 0===e&&(e=new n),0===t.length)return e;for(var i,r,o,a=Number.MAX_VALUE,h=Number.MAX_VALUE,l=s.MIN_SAFE_INTEGER,u=s.MIN_SAFE_INTEGER,c=0;c0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t,e){return t?this.resume(e):this.pause(e)},start:function(t){t&&(this.settings.data=t),this.settings.status=s.START,this.settings.active=!0,this.settings.visible=!0,this.events.emit(o.START,this),this.events.emit(o.READY,this,t)},shutdown:function(t){this.events.off(o.TRANSITION_INIT),this.events.off(o.TRANSITION_START),this.events.off(o.TRANSITION_COMPLETE),this.events.off(o.TRANSITION_OUT),this.settings.status=s.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit(o.SHUTDOWN,this,t)},destroy:function(){this.settings.status=s.DESTROYED,this.settings.active=!1,this.settings.visible=!1,this.events.emit(o.DESTROY,this),this.events.removeAllListeners();for(var t=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],e=0;e0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});t.exports=u},function(t,e,i){var n=i(180),s=i(52),r=i(0),o=i(12),a=i(90),h=i(14),l=i(11),u=i(936),c=i(372),d=i(3),f=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Depth,o.Mask,o.Transform,o.Visible,u],initialize:function(t,e,i,n){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new o.TransformMatrix,this.tempTransformMatrix=new o.TransformMatrix,this._displayList=t.sys.displayList,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.setPosition(e,i),this.clearAlpha(),this.setBlendMode(s.SKIP_CHECK),n&&this.add(n)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.list.length>0)for(var e=this.list,i=new l,n=0;n-1},setAll:function(t,e,i,s){return n.SetAll(this.list,t,e,i,s),this},each:function(t,e){var i,n=[null],s=this.list.slice(),r=s.length;for(i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null}});t.exports=f},function(t,e,i){var n=i(127),s=i(0),r=i(941),o=new s({Extends:n,Mixins:[r],initialize:function(t,e,i,s,r,o,a){n.call(this,t,e,i,s,r,o,a),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this}});t.exports=o},function(t,e,i){var n=i(91),s=i(0),r=i(189),o=i(252),a=i(255),h=i(256),l=i(260),u=i(151),c=i(265),d=i(266),f=i(263),p=i(32),g=i(95),v=i(14),m=i(2),y=i(6),x=i(13),T=i(947),w=new s({Extends:v,Mixins:[o,a,h,l,u,c,d,f,T],initialize:function(t,e){var i=y(e,"x",0),n=y(e,"y",0);v.call(this,t,"Graphics"),this.setPosition(i,n),this.initPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this._tempMatrix1=new p,this._tempMatrix2=new p,this._tempMatrix3=new p,this.setDefaultStyles(e)},setDefaultStyles:function(t){return y(t,"lineStyle",null)&&(this.defaultStrokeWidth=y(t,"lineStyle.width",1),this.defaultStrokeColor=y(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=y(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),y(t,"fillStyle",null)&&(this.defaultFillColor=y(t,"fillStyle.color",16777215),this.defaultFillAlpha=y(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(r.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(r.FILL_STYLE,t,e),this},fillGradientStyle:function(t,e,i,n,s){return void 0===s&&(s=1),this.commandBuffer.push(r.GRADIENT_FILL_STYLE,s,t,e,i,n),this},lineGradientStyle:function(t,e,i,n,s,o){return void 0===o&&(o=1),this.commandBuffer.push(r.GRADIENT_LINE_STYLE,t,o,e,i,n,s),this},setTexture:function(t,e,i){if(void 0===i&&(i=0),void 0===t)this.commandBuffer.push(r.CLEAR_TEXTURE);else{var n=this.scene.sys.textures.getFrame(t,e);n&&(2===i&&(i=3),this.commandBuffer.push(r.SET_TEXTURE,n,i))}return this},beginPath:function(){return this.commandBuffer.push(r.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(r.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(r.FILL_PATH),this},fill:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(r.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,x.PI2),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,x.PI2),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,n){return this.commandBuffer.push(r.FILL_RECT,t,e,i,n),this},strokeRect:function(t,e,i,n){var s=this._lineWidth/2,r=t-s,o=t+s;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+n),this.strokePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+n),this.strokePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(o+i,e),this.strokePath(),this.beginPath(),this.moveTo(r,e+n),this.lineTo(o+i,e+n),this.strokePath(),this},fillRoundedRect:function(t,e,i,n,s){void 0===s&&(s=20);var r=s,o=s,a=s,h=s;return"number"!=typeof s&&(r=m(s,"tl",20),o=m(s,"tr",20),a=m(s,"bl",20),h=m(s,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-x.TAU,0),this.lineTo(t+i,e+n-h),this.arc(t+i-h,e+n-h,h,0,x.TAU),this.lineTo(t+a,e+n),this.arc(t+a,e+n-a,a,x.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-x.TAU),this.fillPath(),this},strokeRoundedRect:function(t,e,i,n,s){void 0===s&&(s=20);var r=s,o=s,a=s,h=s;return"number"!=typeof s&&(r=m(s,"tl",20),o=m(s,"tr",20),a=m(s,"bl",20),h=m(s,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-x.TAU,0),this.lineTo(t+i,e+n-h),this.arc(t+i-h,e+n-h,h,0,x.TAU),this.lineTo(t+a,e+n),this.arc(t+a,e+n-a,a,x.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-x.TAU),this.strokePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,n,s,o),this},strokeTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,n,s,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,n){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,n),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(r.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(r.MOVE_TO,t,e),this},strokePoints:function(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===n&&(n=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var s=1;s-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var n,s,r=this.scene.sys,o=r.game.renderer;if(void 0===e&&(e=r.scale.width),void 0===i&&(i=r.scale.height),w.TargetCamera.setScene(this.scene),w.TargetCamera.setViewport(0,0,e,i),w.TargetCamera.scrollX=this.x,w.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var a=(n=r.textures.get(t)).getSourceImage();a instanceof HTMLCanvasElement&&(s=a.getContext("2d"))}else s=(n=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(s=t.getContext("2d"));return s&&(this.renderCanvas(o,this,0,w.TargetCamera,null,s,!1),n&&n.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});w.TargetCamera=new n,t.exports=w},function(t,e){t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,SET_TEXTURE:19,CLEAR_TEXTURE:20,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},function(t,e,i){var n=i(4);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.width/2,r=t.height/2;return i.x=t.x+s*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},function(t,e,i){var n=i(0),s=i(12),r=i(14),o=i(380),a=i(124),h=i(382),l=i(957),u=new n({Extends:r,Mixins:[s.Depth,s.Mask,s.Pipeline,s.Transform,s.Visible,l],initialize:function(t,e,i,n){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline(),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var s=0;s0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;ss.width&&(t=s.width-this.frame.cutX),this.frame.cutY+e>s.height&&(e=s.height-this.frame.cutY),this.frame.setSize(t,e,this.frame.cutX,this.frame.cutY)}this.updateDisplayOrigin();var r=this.input;return r&&!r.customHitArea&&(r.hitArea.width=t,r.hitArea.height=e),this},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this},saveTexture:function(t){return this.textureManager.renameTexture(this.texture.key,t),this._saved=!0,this.texture},fill:function(t,e,i,n,s,r){void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.frame.cutWidth),void 0===r&&(r=this.frame.cutHeight);var o=255&(t>>16|0),a=255&(t>>8|0),h=255&(0|t),l=this.gl,u=this.frame;if(this.camera.preRender(1,1),l){var c=this.camera._cx,f=this.camera._cy,p=this.camera._cw,g=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(c,f,p,g,g);var v=this.pipeline;v.projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),v.drawFillRect(i,n,s,r,d.getTintFromFloats(o/255,a/255,h/255,1),e),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),v.projOrtho(0,v.width,v.height,0,-1e3,1e3)}else this.renderer.setContext(this.context),this.context.fillStyle="rgba("+o+","+a+","+h+","+e+")",this.context.fillRect(i+u.cutX,n+u.cutY,s,r),this.renderer.setContext();return this.dirty=!0,this},clear:function(){if(this.dirty){var t=this.gl;if(t){var e=this.renderer;e.setFramebuffer(this.framebuffer,!0),this.frame.cutWidth===this.canvas.width&&this.frame.cutHeight===this.canvas.height||t.scissor(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),e.setFramebuffer(null,!0)}else{var i=this.context;i.save(),i.setTransform(1,0,0,1,0,0),i.clearRect(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),i.restore()}this.dirty=!1}return this},erase:function(t,e,i){this._eraseMode=!0;var s=this.renderer.currentBlendMode;return this.renderer.setBlendMode(n.ERASE),this.draw(t,e,i,1,16777215),this.renderer.setBlendMode(s),this._eraseMode=!1,this},draw:function(t,e,i,n,s){void 0===n&&(n=this.globalAlpha),s=void 0===s?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(s>>16)+(65280&s)+((255&s)<<16),Array.isArray(t)||(t=[t]);var r=this.gl;if(this.camera.preRender(1,1),r){var o=this.camera._cx,a=this.camera._cy,h=this.camera._cw,l=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(o,a,h,l,l);var u=this.pipeline;u.projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),this.batchList(t,e,i,n,s),u.flush(),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),u.projOrtho(0,u.width,u.height,0,-1e3,1e3)}else this.renderer.setContext(this.context),this.batchList(t,e,i,n,s),this.renderer.setContext();return this.dirty=!0,this},drawFrame:function(t,e,i,n,s,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.globalAlpha),r=void 0===r?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(r>>16)+(65280&r)+((255&r)<<16);var o=this.gl,a=this.textureManager.getFrame(t,e);if(a){if(this.camera.preRender(1,1),o){var h=this.camera._cx,l=this.camera._cy,u=this.camera._cw,c=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(h,l,u,c,c);var d=this.pipeline;d.projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),d.batchTextureFrame(a,i+this.frame.cutX,n+this.frame.cutY,r,s,this.camera.matrix,null),d.flush(),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),d.projOrtho(0,d.width,d.height,0,-1e3,1e3)}else this.batchTextureFrame(a,i+this.frame.cutX,n+this.frame.cutY,s,r);this.dirty=!0}return this},batchList:function(t,e,i,n,s){for(var r=0;rl){if(0===c){for(var g=f;g.length&&(g=g.slice(0,-1),!((p=e.measureText(g).width)<=l)););if(!g.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var v=d.substr(g.length);u[c]=v,h+=g}var m=u[c].length?c:c+1,y=u.slice(m).join(" ").replace(/[ \n]*$/gi,"");s[o+1]=y+" "+(s[o+1]||""),r=s.length;break}h+=f,l-=p}n+=h.replace(/[ \n]*$/gi,"")+"\n"}}return n=n.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var n="",s=t.split(this.splitRegExp),r=0;ro?(h>0&&(n+="\n"),n+=a[h]+" ",o=i-l):(o-=l,n+=a[h],h0&&(d+=h.lineSpacing*g),i.rtl)c=f-c;else if("right"===i.align)c+=o-h.lineWidths[g];else if("center"===i.align)c+=(o-h.lineWidths[g])/2;else if("justify"===i.align){if(h.lineWidths[g]/h.width>=.85){var v=h.width-h.lineWidths[g],m=e.measureText(" ").width,y=a[g].trim(),x=y.split(" ");v+=(a[g].length-y.length)*m;for(var T=Math.floor(v/m),w=0;T>0;)x[w]+=" ",w=(w+1)%(x.length-1||1),--T;a[g]=x.join(" ")}}this.autoRound&&(c=Math.round(c),d=Math.round(d)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(a[g],c,d)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(a[g],c,d))}e.restore(),this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(t,this.frame.source.glTexture,!0),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0;var E=this.input;return E&&!E.customHitArea&&(E.hitArea.width=this.width,E.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(t){this.setText(t)}},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this._text,style:this.style.toJSON(),padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&c(this.canvas),s.remove(this.canvas),this.texture.destroy()}});t.exports=p},function(t,e,i){var n=i(26),s=i(0),r=i(12),o=i(18),a=i(14),h=i(310),l=i(162),u=i(973),c=i(3),d=new s({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Tint,r.Transform,r.Visible,u],initialize:function(t,e,i,s,r,l,u){var d=t.sys.game.renderer;a.call(this,t,"TileSprite");var f=t.sys.textures.get(l),p=f.get(u);s&&r?(s=Math.floor(s),r=Math.floor(r)):(s=p.width,r=p.height),this._tilePosition=new c,this._tileScale=new c(1,1),this.dirty=!1,this.renderer=d,this.canvas=n.create(this,s,r),this.context=this.canvas.getContext("2d"),this.displayTexture=f,this.displayFrame=p,this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.potWidth=h(p.width),this.potHeight=h(p.height),this.fillCanvas=n.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d"),this.fillPattern=null,this.setPosition(e,i),this.setSize(s,r),this.setFrame(u),this.setOriginFromFrame(),this.initPipeline(),t.sys.game.events.on(o.CONTEXT_RESTORED,function(t){var e=t.gl;this.dirty=!0,this.fillPattern=null,this.fillPattern=t.createTexture2D(0,e.LINEAR,e.LINEAR,e.REPEAT,e.REPEAT,e.RGBA,this.fillCanvas,this.potWidth,this.potHeight)},this)},setTexture:function(t,e){return this.displayTexture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){var e=this.displayTexture.get(t);return this.potWidth=h(e.width),this.potHeight=h(e.height),this.canvas.width=0,e.cutWidth&&e.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.displayFrame=e,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(t,e){return void 0!==t&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},setTileScale:function(t,e){return void 0===t&&(t=this.tileScaleX),void 0===e&&(e=t),this.tileScaleX=t,this.tileScaleY=e,this},updateTileTexture:function(){if(this.dirty&&this.renderer){var t=this.displayFrame;if(t.source.isRenderTexture||t.source.isGLTexture)return console.warn("TileSprites can only use Image or Canvas based textures"),void(this.dirty=!1);var e=this.fillContext,i=this.fillCanvas,n=this.potWidth,s=this.potHeight;this.renderer.gl||(n=t.cutWidth,s=t.cutHeight),e.clearRect(0,0,n,s),i.width=n,i.height=s,e.drawImage(t.source.image,t.cutX,t.cutY,t.cutWidth,t.cutHeight,0,0,n,s),this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(i,this.fillPattern):this.fillPattern=e.createPattern(i,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var t=this.canvas;if(t.width===this.width&&t.height===this.height||(t.width=this.width,t.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl)this.dirty=!1;else{var e=this.context;this.scene.sys.game.config.antialias||l.disable(e);var i=this._tileScale.x,n=this._tileScale.y,s=this._tilePosition.x,r=this._tilePosition.y;e.clearRect(0,0,this.width,this.height),e.save(),e.scale(i,n),e.translate(-s,-r),e.fillStyle=this.fillPattern,e.fillRect(s,r,this.width/i,this.height/n),e.restore(),this.dirty=!1}},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),n.remove(this.canvas),n.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null,this.texture.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(t){this._tilePosition.x=t,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(t){this._tilePosition.y=t,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(t){this._tileScale.x=t,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(t){this._tileScale.y=t,this.dirty=!0}}});t.exports=d},function(t,e,i){var n=i(0),s=i(23),r=i(12),o=i(90),a=i(18),h=i(14),l=i(59),u=i(193),c=i(976),d=i(13),f=new n({Extends:h,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,c],initialize:function(t,e,i,n){h.call(this,t,"Video"),this.video=null,this.videoTexture=null,this.videoTextureSource=null,this.snapshotTexture=null,this.flipY=!1,this._key=u(),this.touchLocked=!0,this.playWhenUnlocked=!1,this.retryLimit=20,this.retry=0,this.retryInterval=500,this._retryID=null,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={play:this.playHandler.bind(this),error:this.loadErrorHandler.bind(this),end:this.completeHandler.bind(this),time:this.timeUpdateHandler.bind(this),seeking:this.seekingHandler.bind(this),seeked:this.seekedHandler.bind(this)},this._crop=this.resetCropObject(),this.markers={},this._markerIn=-1,this._markerOut=d.MAX_SAFE_INTEGER,this._lastUpdate=0,this._cacheKey="",this._isSeeking=!1,this.removeVideoElementOnDestroy=!1,this.setPosition(e,i),this.initPipeline(),n&&this.changeSource(n,!1);var s=t.sys.game.events;s.on(a.PAUSE,this.globalPause,this),s.on(a.RESUME,this.globalResume,this);var r=t.sys.sound;r&&r.on(l.GLOBAL_MUTE,this.globalMute,this)},play:function(t,e,i){if(this.touchLocked&&this.playWhenUnlocked||this.isPlaying())return this;var n=this.video;if(!n)return console.warn("Video not loaded"),this;void 0===t&&(t=n.loop);var s=this.scene.sys.sound;s&&s.mute&&this.setMute(!0),isNaN(e)||(this._markerIn=e),!isNaN(i)&&i>e&&(this._markerOut=i),n.loop=t;var r=this._callbacks,o=n.play();return void 0!==o?o.then(this.playPromiseSuccessHandler.bind(this)).catch(this.playPromiseErrorHandler.bind(this)):(n.addEventListener("playing",r.play,!0),n.readyState<2&&(this.retry=this.retryLimit,this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval))),n.addEventListener("ended",r.end,!0),n.addEventListener("timeupdate",r.time,!0),n.addEventListener("seeking",r.seeking,!0),n.addEventListener("seeked",r.seeked,!0),this},changeSource:function(t,e,i,n,s){void 0===e&&(e=!0),this.video&&this.stop();var r=this.scene.sys.cache.video.get(t);return r?(this.video=r,this._cacheKey=t,this._codePaused=r.paused,this._codeMuted=r.muted,this.videoTexture?(this.scene.sys.textures.remove(this._key),this.videoTexture=this.scene.sys.textures.create(this._key,r,r.videoWidth,r.videoHeight),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,r.videoWidth,r.videoHeight),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,r.videoWidth,r.videoHeight)):this.updateTexture(),r.currentTime=0,this._lastUpdate=0,e&&this.play(i,n,s)):this.video=null,this},addMarker:function(t,e,i){return!isNaN(e)&&e>=0&&!isNaN(i)&&(this.markers[t]=[e,i]),this},playMarker:function(t,e){var i=this.markers[t];return i&&this.play(e,i[0],i[1]),this},removeMarker:function(t){return delete this.markers[t],this},snapshot:function(t,e){return void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.snapshotArea(0,0,this.width,this.height,t,e)},snapshotArea:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=this.height),void 0===s&&(s=i),void 0===r&&(r=n);var o=this.video,a=this.snapshotTexture;return a?(a.setSize(s,r),o&&a.context.drawImage(o,t,e,i,n,0,0,s,r)):(a=this.scene.sys.textures.createCanvas(u(),s,r),this.snapshotTexture=a,o&&a.context.drawImage(o,t,e,i,n,0,0,s,r)),a.update()},saveSnapshotTexture:function(t){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,t):this.snapshotTexture=this.scene.sys.textures.createCanvas(t,this.width,this.height),this.snapshotTexture},loadURL:function(t,e,i){void 0===e&&(e="loadeddata"),void 0===i&&(i=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var n=document.createElement("video");return n.controls=!1,i&&(n.muted=!0,n.defaultMuted=!0,n.setAttribute("autoplay","autoplay")),n.setAttribute("playsinline","playsinline"),n.setAttribute("preload","auto"),n.addEventListener("error",this._callbacks.error,!0),n.src=t,n.load(),this.video=n,this},playPromiseSuccessHandler:function(){this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn)},playPromiseErrorHandler:function(t){this.scene.sys.input.once("pointerdown",this.unlockHandler,this),this.touchLocked=!0,this.playWhenUnlocked=!0,this.emit(o.VIDEO_ERROR,this,t)},playHandler:function(){this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this.video.removeEventListener("playing",this._callbacks.play,!0)},loadErrorHandler:function(t){this.stop(),this.emit(o.VIDEO_ERROR,this,t)},unlockHandler:function(){this.touchLocked=!1,this.playWhenUnlocked=!1,this.emit(o.VIDEO_UNLOCKED,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn),this.video.play(),this.emit(o.VIDEO_PLAY,this)},completeHandler:function(){this.emit(o.VIDEO_COMPLETE,this)},timeUpdateHandler:function(){this.video&&this.video.currentTime=this._markerOut&&(t.loop?(t.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=e,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),this.stop())))}},checkVideoProgress:function(){this.video.readyState>=2?this.updateTexture():(this.retry--,this.retry>0?this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval):this.emit(o.VIDEO_TIMEOUT,this))},updateTexture:function(){var t=this.video,e=t.videoWidth,i=t.videoHeight;if(this.videoTexture){var n=this.videoTextureSource;n.source!==t&&(n.source=t,n.width=e,n.height=i),n.update()}else this.videoTexture=this.scene.sys.textures.create(this._key,t,e,i),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,e,i),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,e,i)},getVideoKey:function(){return this._cacheKey},seekTo:function(t){var e=this.video;if(e){var i=e.duration;if(i!==1/0&&!isNaN(i)){var n=i*t;this.setCurrentTime(n)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(t){var e=this.video;if(e){if("string"==typeof t){var i=t[0],n=parseFloat(t.substr(1));"+"===i?t=e.currentTime+n:"-"===i&&(t=e.currentTime-n)}e.currentTime=t,this._lastUpdate=t}return this},isSeeking:function(){return this._isSeeking},seekingHandler:function(){this._isSeeking=!0,this.emit(o.VIDEO_SEEKING,this)},seekedHandler:function(){this._isSeeking=!1,this.emit(o.VIDEO_SEEKED,this),this.video&&this.updateTexture()},getProgress:function(){var t=this.video;if(t){var e=t.currentTime,i=t.duration;if(i!==1/0&&!isNaN(i))return e/i}return 0},getDuration:function(){return this.video?this.video.duration:0},setMute:function(t){void 0===t&&(t=!0),this._codeMuted=t;var e=this.video;return e&&(e.muted=!!this._systemMuted||t),this},isMuted:function(){return this._codeMuted},globalMute:function(t,e){this._systemMuted=e;var i=this.video;i&&(i.muted=!!this._codeMuted||e)},globalPause:function(){this._systemPaused=!0,this.video&&this.video.pause()},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&this.video.play()},setPaused:function(t){void 0===t&&(t=!0);var e=this.video;return this._codePaused=t,e&&(t?e.paused||e.pause():t||e.paused&&!this._systemPaused&&e.play()),this},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(t){return void 0===t&&(t=1),this.video&&(this.video.volume=s(t,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(t){return this.video&&(this.video.playbackRate=t),this},getLoop:function(){return!!this.video&&this.video.loop},setLoop:function(t){return void 0===t&&(t=!0),this.video&&(this.video.loop=t),this},isPlaying:function(){return!!this.video&&!(this.video.paused||this.video.ended)},isPaused:function(){return this.video&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(t,e){return void 0===e&&(e=!1),this.videoTexture&&this.scene.sys.textures.renameTexture(this._key,t),this._key=t,this.flipY=e,this.videoTextureSource&&this.videoTextureSource.setFlipY(e),this.videoTexture},stop:function(){var t=this.video;if(t){var e=this._callbacks;for(var i in e)t.removeEventListener(i,e[i],!0);t.pause()}return this._retryID&&window.clearTimeout(this._retryID),this.emit(o.VIDEO_STOP,this),this},removeVideoElement:function(){var t=this.video;if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("autoplay"),t.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(),this.removeVideoElementOnDestroy&&this.removeVideoElement();var t=this.scene.sys.game.events;t.off(a.PAUSE,this.globalPause,this),t.off(a.RESUME,this.globalResume,this);var e=this.scene.sys.sound;e&&e.off(l.GLOBAL_MUTE,this.globalMute,this),this._retryID&&window.clearTimeout(this._retryID)}});t.exports=f},function(t,e,i){var n=i(0),s=i(198),r=i(397),o=i(46),a=new n({initialize:function(t){this.type=o.POLYGON,this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return s(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],"string"==typeof t&&(t=t.split(" ")),!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,n=0;no||r>a)return!1;if(s<=i||r<=n)return!0;var h=s-i,l=r-n;return h*h+l*l<=t.radius*t.radius}},function(t,e,i){var n=i(4),s=i(204);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r,o,a=t.x1,h=t.y1,l=t.x2,u=t.y2,c=e.x,d=e.y,f=e.radius,p=l-a,g=u-h,v=a-c,m=h-d,y=p*p+g*g,x=2*(p*v+g*m),T=x*x-4*y*(v*v+m*m-f*f);if(0===T){var w=-x/(2*y);r=a+w*p,o=h+w*g,w>=0&&w<=1&&i.push(new n(r,o))}else if(T>0){var E=(-x-Math.sqrt(T))/(2*y);r=a+E*p,o=h+E*g,E>=0&&E<=1&&i.push(new n(r,o));var _=(-x+Math.sqrt(T))/(2*y);r=a+_*p,o=h+_*g,_>=0&&_<=1&&i.push(new n(r,o))}}return i}},function(t,e,i){var n=i(54),s=new(i(4));t.exports=function(t,e,i){if(void 0===i&&(i=s),n(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(n(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,l=r*r+o*o,u=r,c=o;if(l>0){var d=(a*r+h*o)/l;u*=d,c*=d}return i.x=t.x1+u,i.y=t.y1+c,u*u+c*c<=l&&u*r+c*o>=0&&n(e,i.x,i.y)}},function(t,e,i){var n=i(4),s=i(84),r=i(410);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e))for(var o=e.getLineA(),a=e.getLineB(),h=e.getLineC(),l=e.getLineD(),u=[new n,new n,new n,new n],c=[s(o,t,u[0]),s(a,t,u[1]),s(h,t,u[2]),s(l,t,u[3])],d=0;d<4;d++)c[d]&&i.push(u[d]);return i}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=[]);for(var s,r,o,a,h,l,u=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,f=t.y2-t.y1,p=u*u+c*c,g=u*d+c*f,v=d*d+f*f,m=p*v-g*g,y=0===m?0:1/m,x=t.x1,T=t.y1,w=0;w=0&&r>=0&&s+r<1&&(n.push({x:e[w].x,y:e[w].y}),i)));w++);return n}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,t}},function(t,e){t.exports=function(t){return 0===t.height?NaN:t.width/t.height}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,o=t.x3-e,a=t.y3-i,t.x3=o*s-a*r+e,t.y3=o*r+a*s+i,t}},function(t,e,i){t.exports={BUTTON_DOWN:i(1178),BUTTON_UP:i(1179),CONNECTED:i(1180),DISCONNECTED:i(1181),GAMEPAD_BUTTON_DOWN:i(1182),GAMEPAD_BUTTON_UP:i(1183)}},function(t,e,i){var n=i(17),s=i(133);t.exports=function(t,e){var i=void 0===t?s():n({},t);if(e)for(var r in e)void 0!==e[r]&&(i[r]=e[r]);return i}},function(t,e,i){var n=i(0),s=i(19),r=i(20),o=i(8),a=i(2),h=i(7),l=i(344),u=new n({Extends:r,initialize:function(t,e,i,n){var s="xml";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),s=a(o,"extension",s)}var l={type:"xml",cache:t.cacheManager.xml,extension:s,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,l)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=l(this.xhrLoader.responseText),this.data?this.onProcessComplete():(console.warn("Invalid XMLFile: "+this.key),this.onProcessError())}});o.register("xml",function(t,e,i){if(Array.isArray(t))for(var n=0;n0&&(s.totalDuration+=s.t2*s.repeat),s.totalDuration>t&&(t=s.totalDuration),s.delay0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay,this.startDelay=e},init:function(){if(this.paused&&!this.parentIsTimeline)return this.state=h.PENDING_ADD,this._pausedState=h.INIT,!1;for(var t=this.data,e=this.totalTargets,i=0;i0?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=h.LOOP_DELAY):(this.state=h.ACTIVE,this.dispatchTweenEvent(r.TWEEN_LOOP,this.callbacks.onLoop))):this.completeDelay>0?(this.state=h.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=h.PENDING_REMOVE,this.dispatchTweenEvent(r.TWEEN_COMPLETE,this.callbacks.onComplete))},pause:function(){return this.state===h.PAUSED?this:(this.paused=!0,this._pausedState=this.state,this.state=h.PAUSED,this)},play:function(t){void 0===t&&(t=!1);var e=this.state;return e!==h.INIT||this.parentIsTimeline?e===h.ACTIVE||e===h.PENDING_ADD&&this._pausedState===h.PENDING_ADD?this:this.parentIsTimeline||e!==h.PENDING_REMOVE&&e!==h.REMOVED?(this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?this.state=h.ACTIVE:(this.countdown=this.calculatedOffset,this.state=h.OFFSET_DELAY)):this.paused?(this.paused=!1,this.makeActive()):(this.resetTweenData(t),this.state=h.ACTIVE,this.makeActive()),this):(this.seek(0),this.parent.makeActive(this),this):(this.resetTweenData(!1),this.state=h.ACTIVE,this)},resetTweenData:function(t){for(var e=this.data,i=this.totalData,n=this.totalTargets,s=0;s0&&(r.elapsed=r.delay,r.state=h.DELAY),r.getActiveValue&&(o[a]=r.getActiveValue(r.target,r.key,r.start))}},resume:function(){return this.state===h.PAUSED?(this.paused=!1,this.state=this._pausedState):this.play(),this},seek:function(t,e){if(void 0===e&&(e=16.6),this.totalDuration>=36e5)return console.warn("Tween.seek duration too long"),this;this.state===h.REMOVED&&this.makeActive(),this.elapsed=0,this.progress=0,this.totalElapsed=0,this.totalProgress=0;for(var i=this.data,n=this.totalTargets,s=0;s0&&(r.elapsed=r.delay,r.state=h.DELAY)}this.calcDuration();var c=!1;this.state===h.PAUSED&&(c=!0,this.state=h.ACTIVE),this.isSeeking=!0;do{this.update(0,e)}while(this.totalProgress0?(e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY(),e.start=e.getStartValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.end=e.getEndValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,h.REPEAT_DELAY):(this.dispatchTweenDataEvent(r.TWEEN_REPEAT,t.callbacks.onRepeat,e),h.PLAYING_FORWARD)):h.COMPLETE},setStateFromStart:function(t,e,i){return e.repeatCounter>0?(e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY(),e.end=e.getEndValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,h.REPEAT_DELAY):(this.dispatchTweenDataEvent(r.TWEEN_REPEAT,t.callbacks.onRepeat,e),h.PLAYING_FORWARD)):h.COMPLETE},updateTweenData:function(t,e,i){var n=e.target;switch(e.state){case h.PLAYING_FORWARD:case h.PLAYING_BACKWARD:if(!n){e.state=h.COMPLETE;break}var s=e.elapsed,o=e.duration,a=0;(s+=i)>o&&(a=s-o,s=o);var l=e.state===h.PLAYING_FORWARD,u=s/o;if(e.elapsed=s,e.progress=u,1===u)l?(e.current=e.end,n[e.key]=e.end,e.hold>0?(e.elapsed=e.hold-a,e.state=h.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,a)):(e.current=e.start,n[e.key]=e.start,e.state=this.setStateFromStart(t,e,a));else{var c=l?e.ease(u):e.ease(1-u);e.current=e.start+(e.end-e.start)*c,n[e.key]=e.current}this.dispatchTweenDataEvent(r.TWEEN_UPDATE,t.callbacks.onUpdate,e);break;case h.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=h.PENDING_RENDER);break;case h.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=h.PLAYING_FORWARD,this.dispatchTweenDataEvent(r.TWEEN_REPEAT,t.callbacks.onRepeat,e));break;case h.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case h.PENDING_RENDER:n?(e.start=e.getStartValue(n,e.key,n[e.key],e.index,t.totalTargets,t),e.end=e.getEndValue(n,e.key,e.start,e.index,t.totalTargets,t),e.current=e.start,n[e.key]=e.start,e.state=h.PLAYING_FORWARD):e.state=h.COMPLETE}return e.state!==h.COMPLETE}});u.TYPES=["onActive","onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],a.register("tween",function(t){return this.scene.sys.tweens.add(t)}),o.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=u},function(t,e,i){t.exports={TIMELINE_COMPLETE:i(1331),TIMELINE_LOOP:i(1332),TIMELINE_PAUSE:i(1333),TIMELINE_RESUME:i(1334),TIMELINE_START:i(1335),TIMELINE_UPDATE:i(1336),TWEEN_ACTIVE:i(1337),TWEEN_COMPLETE:i(1338),TWEEN_LOOP:i(1339),TWEEN_REPEAT:i(1340),TWEEN_START:i(1341),TWEEN_UPDATE:i(1342),TWEEN_YOYO:i(1343)}},function(t,e){t.exports=function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p){return{target:t,index:e,key:i,getActiveValue:r,getEndValue:n,getStartValue:s,ease:o,duration:0,totalDuration:0,delay:0,yoyo:l,hold:0,repeat:0,repeatDelay:0,flipX:f,flipY:p,progress:0,elapsed:0,repeatCounter:0,start:0,current:0,end:0,t1:0,t2:0,gen:{delay:a,duration:h,hold:u,repeat:c,repeatDelay:d},state:0}}},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},function(t,e,i){var n=i(57);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e,i){var n=i(57);t.exports=function(t){return n(t,-180,180)}},function(t,e,i){var n=i(0),s=i(10),r=new n({initialize:function(t){this.name="WebGLPipeline",this.game=t.game,this.view=t.game.canvas,this.resolution=1,this.width=0,this.height=0,this.gl=t.gl,this.vertexCount=0,this.vertexCapacity=t.vertexCapacity,this.renderer=t.renderer,this.vertexData=t.vertices?t.vertices:new ArrayBuffer(t.vertexCapacity*t.vertexSize),this.vertexBuffer=this.renderer.createVertexBuffer(t.vertices?t.vertices:this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=this.renderer.createProgram(t.vertShader,t.fragShader),this.attributes=t.attributes,this.vertexSize=t.vertexSize,this.topology=t.topology,this.bytes=new Uint8Array(this.vertexData),this.vertexComponentCount=s.getComponentCount(t.attributes,this.gl),this.flushLocked=!1,this.active=!1},boot:function(){},addAttribute:function(t,e,i,n,r){return this.attributes.push({name:t,size:e,type:this.renderer.glFormats[i],normalized:n,offset:r}),this.vertexComponentCount=s.getComponentCount(this.attributes,this.gl),this},shouldFlush:function(){return this.vertexCount>=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this.resolution=i,this},bind:function(){var t=this.gl,e=this.vertexBuffer,i=this.attributes,n=this.program,s=this.renderer,r=this.vertexSize;s.setProgram(n),s.setVertexBuffer(e);for(var o=0;o=0?(t.enableVertexAttribArray(h),t.vertexAttribPointer(h,a.size,a.type,a.normalized,r,a.offset)):-1!==h&&t.disableVertexAttribArray(h)}return this},onBind:function(){return this},onPreRender:function(){return this},onRender:function(){return this},onPostRender:function(){return this},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.vertexCount,i=this.topology,n=this.vertexSize;if(0!==e)return t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,e*n)),t.drawArrays(i,0,e),this.vertexCount=0,this.flushLocked=!1,this;this.flushLocked=!1},destroy:function(){var t=this.gl;return t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),delete this.program,delete this.vertexBuffer,delete this.gl,this},setFloat1:function(t,e){return this.renderer.setFloat1(this.program,t,e),this},setFloat2:function(t,e,i){return this.renderer.setFloat2(this.program,t,e,i),this},setFloat3:function(t,e,i,n){return this.renderer.setFloat3(this.program,t,e,i,n),this},setFloat4:function(t,e,i,n,s){return this.renderer.setFloat4(this.program,t,e,i,n,s),this},setFloat1v:function(t,e){return this.renderer.setFloat1v(this.program,t,e),this},setFloat2v:function(t,e){return this.renderer.setFloat2v(this.program,t,e),this},setFloat3v:function(t,e){return this.renderer.setFloat3v(this.program,t,e),this},setFloat4v:function(t,e){return this.renderer.setFloat4v(this.program,t,e),this},setInt1:function(t,e){return this.renderer.setInt1(this.program,t,e),this},setInt2:function(t,e,i){return this.renderer.setInt2(this.program,t,e,i),this},setInt3:function(t,e,i,n){return this.renderer.setInt3(this.program,t,e,i,n),this},setInt4:function(t,e,i,n,s){return this.renderer.setInt4(this.program,t,e,i,n,s),this},setMatrix2:function(t,e,i){return this.renderer.setMatrix2(this.program,t,e,i),this},setMatrix3:function(t,e,i){return this.renderer.setMatrix3(this.program,t,e,i),this},setMatrix4:function(t,e,i){return this.renderer.setMatrix4(this.program,t,e,i),this}});t.exports=r},function(t,e,i){var n=i(0),s=i(66),r=i(2),o=i(492),a=i(756),h=i(757),l=i(32),u=i(10),c=i(233),d=new n({Extends:c,Mixins:[o],initialize:function(t){var e=t.renderer.config;c.call(this,{game:t.game,renderer:t.renderer,gl:t.renderer.gl,topology:r(t,"topology",t.renderer.gl.TRIANGLES),vertShader:r(t,"vertShader",h),fragShader:r(t,"fragShader",a),vertexCapacity:r(t,"vertexCapacity",6*e.batchSize),vertexSize:r(t,"vertexSize",5*Float32Array.BYTES_PER_ELEMENT+4*Uint8Array.BYTES_PER_ELEMENT),attributes:[{name:"inPosition",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:0},{name:"inTexCoord",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:2*Float32Array.BYTES_PER_ELEMENT},{name:"inTintEffect",size:1,type:t.renderer.gl.FLOAT,normalized:!1,offset:4*Float32Array.BYTES_PER_ELEMENT},{name:"inTint",size:4,type:t.renderer.gl.UNSIGNED_BYTE,normalized:!0,offset:5*Float32Array.BYTES_PER_ELEMENT}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.vertexViewU32=new Uint32Array(this.vertexData),this.maxQuads=e.batchSize,this.batches=[],this._tempMatrix1=new l,this._tempMatrix2=new l,this._tempMatrix3=new l,this._tempMatrix4=new l,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.tintEffect=2,this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[],this.mvpInit()},onBind:function(){return c.prototype.onBind.call(this),this.mvpUpdate(),this},resize:function(t,e,i){return c.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},setTexture2D:function(t,e){return void 0===t&&(t=this.renderer.blankTexture.glTexture),void 0===e&&(e=0),this.requireTextureBatch(t,e)&&this.pushBatch(t,e),this},requireTextureBatch:function(t,e){var i=this.batches,n=i.length;return!(n>0)||!((e>0?i[n-1].textures[e-1]:i[n-1].texture)===t)},pushBatch:function(t,e){if(0===e)this.batches.push({first:this.vertexCount,texture:t,textures:[]});else{var i=[];i[e-1]=t,this.batches.push({first:this.vertexCount,texture:null,textures:i})}},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t,e,i,n=this.gl,s=this.vertexCount,r=this.topology,o=this.vertexSize,a=this.renderer,h=this.batches,l=h.length,u=0,c=null;if(0===l||0===s)return this.flushLocked=!1,this;n.bufferSubData(n.ARRAY_BUFFER,0,this.bytes.subarray(0,s*o));for(var d=0;d0){for(e=0;e0){for(e=0;e0&&(a.setTexture2D(c.texture,0,!1),n.drawArrays(r,c.first,u)),this.vertexCount=0,h.length=0,this.flushLocked=!1,this},batchSprite:function(t,e,i){this.renderer.setPipeline(this);var n=this._tempMatrix1,s=this._tempMatrix2,r=this._tempMatrix3,o=t.frame,a=o.glTexture,h=o.u0,l=o.v0,c=o.u1,d=o.v1,f=o.x,p=o.y,g=o.cutWidth,v=o.cutHeight,m=o.customPivot,y=t.displayOriginX,x=t.displayOriginY,T=-y+f,w=-x+p;if(t.isCropped){var E=t._crop;E.flipX===t.flipX&&E.flipY===t.flipY||o.updateCropUVs(E,t.flipX,t.flipY),h=E.u0,l=E.v0,c=E.u1,d=E.v1,g=E.width,v=E.height,T=-y+(f=E.x),w=-x+(p=E.y)}var _=1,b=1;t.flipX&&(m||(T+=-o.realWidth+2*y),_=-1),(t.flipY||o.source.isGLTexture&&!a.flipY)&&(m||(w+=-o.realHeight+2*x),b=-1),s.applyITRS(t.x,t.y,t.rotation,t.scaleX*_,t.scaleY*b),n.copyFrom(e.matrix),i?(n.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),s.e=t.x,s.f=t.y,n.multiply(s,r)):(s.e-=e.scrollX*t.scrollFactorX,s.f-=e.scrollY*t.scrollFactorY,n.multiply(s,r));var A=T+g,S=w+v,C=r.getX(T,w),M=r.getY(T,w),O=r.getX(T,S),P=r.getY(T,S),R=r.getX(A,S),L=r.getY(A,S),D=r.getX(A,w),F=r.getY(A,w),k=u.getTintAppendFloatAlpha(t._tintTL,e.alpha*t._alphaTL),I=u.getTintAppendFloatAlpha(t._tintTR,e.alpha*t._alphaTR),B=u.getTintAppendFloatAlpha(t._tintBL,e.alpha*t._alphaBL),Y=u.getTintAppendFloatAlpha(t._tintBR,e.alpha*t._alphaBR);e.roundPixels&&(C=Math.round(C),M=Math.round(M),O=Math.round(O),P=Math.round(P),R=Math.round(R),L=Math.round(L),D=Math.round(D),F=Math.round(F)),this.setTexture2D(a,0);var N=t._isTinted&&t.tintFill;this.batchQuad(C,M,O,P,R,L,D,F,h,l,c,d,k,I,B,Y,N,a,0)},batchQuad:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,m,y){var x=!1;this.vertexCount+6>this.vertexCapacity&&(this.flush(),x=!0,this.setTexture2D(m,y));var T=this.vertexViewF32,w=this.vertexViewU32,E=this.vertexCount*this.vertexComponentCount-1;return T[++E]=t,T[++E]=e,T[++E]=h,T[++E]=l,T[++E]=v,w[++E]=d,T[++E]=i,T[++E]=n,T[++E]=h,T[++E]=c,T[++E]=v,w[++E]=p,T[++E]=s,T[++E]=r,T[++E]=u,T[++E]=c,T[++E]=v,w[++E]=g,T[++E]=t,T[++E]=e,T[++E]=h,T[++E]=l,T[++E]=v,w[++E]=d,T[++E]=s,T[++E]=r,T[++E]=u,T[++E]=c,T[++E]=v,w[++E]=g,T[++E]=o,T[++E]=a,T[++E]=u,T[++E]=l,T[++E]=v,w[++E]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g){var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),this.setTexture2D(p,g),v=!0);var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=f,y[++x]=u,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=l,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=l,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},batchTexture:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,m,y,x,T,w,E,_,b,A,S,C,M,O,P){this.renderer.setPipeline(this,t);var R=this._tempMatrix1,L=this._tempMatrix2,D=this._tempMatrix3,F=m/i+S,k=y/n+C,I=(m+x)/i+S,B=(y+T)/n+C,Y=o,N=a,X=-g,U=-v;if(t.isCropped){var z=t._crop;Y=z.width,N=z.height,o=z.width,a=z.height;var G=m=z.x,W=y=z.y;c&&(G=x-z.x-z.width),d&&!e.isRenderTexture&&(W=T-z.y-z.height),F=G/i+S,k=W/n+C,I=(G+z.width)/i+S,B=(W+z.height)/n+C,X=-g+m,U=-v+y}d^=!P&&e.isRenderTexture?1:0,c&&(Y*=-1,X+=o),d&&(N*=-1,U+=a);var V=X+Y,H=U+N;L.applyITRS(s,r,u,h,l),R.copyFrom(M.matrix),O?(R.multiplyWithOffset(O,-M.scrollX*f,-M.scrollY*p),L.e=s,L.f=r,R.multiply(L,D)):(L.e-=M.scrollX*f,L.f-=M.scrollY*p,R.multiply(L,D));var j=D.getX(X,U),K=D.getY(X,U),q=D.getX(X,H),J=D.getY(X,H),Z=D.getX(V,H),Q=D.getY(V,H),$=D.getX(V,U),tt=D.getY(V,U);M.roundPixels&&(j=Math.round(j),K=Math.round(K),q=Math.round(q),J=Math.round(J),Z=Math.round(Z),Q=Math.round(Q),$=Math.round($),tt=Math.round(tt)),this.setTexture2D(e,0),this.batchQuad(j,K,q,J,Z,Q,$,tt,F,k,I,B,w,E,_,b,A,e,0)},batchTextureFrame:function(t,e,i,n,s,r,o){this.renderer.setPipeline(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2,l=e+t.width,c=i+t.height;o?a.multiply(o,h):h=a;var d=h.getX(e,i),f=h.getY(e,i),p=h.getX(e,c),g=h.getY(e,c),v=h.getX(l,c),m=h.getY(l,c),y=h.getX(l,i),x=h.getY(l,i);this.setTexture2D(t.glTexture,0),n=u.getTintAppendFloatAlpha(n,s),this.batchQuad(d,f,p,g,v,m,y,x,t.u0,t.v0,t.u1,t.v1,n,n,n,n,0,t.glTexture,0)},drawFillRect:function(t,e,i,n,s,r){var o=t+i,a=e+n;this.setTexture2D();var h=u.getTintAppendFloatAlphaAndSwap(s,r);this.batchQuad(t,e,t,a,o,a,o,e,0,0,1,1,h,h,h,h,2)},batchFillRect:function(t,e,i,n,s,r){this.renderer.setPipeline(this);var o=this._tempMatrix3;r&&r.multiply(s,o);var a=t+i,h=e+n,l=o.getX(t,e),u=o.getY(t,e),c=o.getX(t,h),d=o.getY(t,h),f=o.getX(a,h),p=o.getY(a,h),g=o.getX(a,e),v=o.getY(a,e),m=this.currentFrame,y=m.u0,x=m.v0,T=m.u1,w=m.v1;this.batchQuad(l,u,c,d,f,p,g,v,y,x,T,w,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.fillTint.BR,this.tintEffect)},batchFillTriangle:function(t,e,i,n,s,r,o,a){this.renderer.setPipeline(this);var h=this._tempMatrix3;a&&a.multiply(o,h);var l=h.getX(t,e),u=h.getY(t,e),c=h.getX(i,n),d=h.getY(i,n),f=h.getX(s,r),p=h.getY(s,r),g=this.currentFrame,v=g.u0,m=g.v0,y=g.u1,x=g.v1;this.batchTri(l,u,c,d,f,p,v,m,y,x,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.tintEffect)},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h){var l=this.tempTriangle;l[0].x=t,l[0].y=e,l[0].width=o,l[1].x=i,l[1].y=n,l[1].width=o,l[2].x=s,l[2].y=r,l[2].width=o,l[3].x=t,l[3].y=e,l[3].width=o,this.batchStrokePath(l,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.setPipeline(this);var n=this._tempMatrix3;i&&i.multiply(e,n);for(var r,o,a=t.length,h=this.polygonCache,l=this.fillTint.TL,u=this.fillTint.TR,c=this.fillTint.BL,d=this.tintEffect,f=0;f0&&H[4]?this.batchQuad(D,F,O,P,H[0],H[1],H[2],H[3],z,G,W,V,B,Y,N,X,I):(j[0]=D,j[1]=F,j[2]=O,j[3]=P,j[4]=1),h&&j[4]?this.batchQuad(C,M,R,L,j[0],j[1],j[2],j[3],z,G,W,V,B,Y,N,X,I):(H[0]=C,H[1]=M,H[2]=R,H[3]=L,H[4]=1)}}});t.exports=d},,,function(t,e,i){t.exports={Angle:i(504),Call:i(505),GetFirst:i(506),GetLast:i(507),GridAlign:i(508),IncAlpha:i(568),IncX:i(569),IncXY:i(570),IncY:i(571),PlaceOnCircle:i(572),PlaceOnEllipse:i(573),PlaceOnLine:i(574),PlaceOnRectangle:i(575),PlaceOnTriangle:i(576),PlayAnimation:i(577),PropertyValueInc:i(34),PropertyValueSet:i(25),RandomCircle:i(578),RandomEllipse:i(579),RandomLine:i(580),RandomRectangle:i(581),RandomTriangle:i(582),Rotate:i(583),RotateAround:i(584),RotateAroundDistance:i(585),ScaleX:i(586),ScaleXY:i(587),ScaleY:i(588),SetAlpha:i(589),SetBlendMode:i(590),SetDepth:i(591),SetHitArea:i(592),SetOrigin:i(593),SetRotation:i(594),SetScale:i(595),SetScaleX:i(596),SetScaleY:i(597),SetScrollFactor:i(598),SetScrollFactorX:i(599),SetScrollFactorY:i(600),SetTint:i(601),SetVisible:i(602),SetX:i(603),SetXY:i(604),SetY:i(605),ShiftPosition:i(606),Shuffle:i(607),SmootherStep:i(608),SmoothStep:i(609),Spread:i(610),ToggleVisible:i(611),WrapInRectangle:i(612)}},function(t,e,i){var n=i(143),s=[];s[n.BOTTOM_CENTER]=i(239),s[n.BOTTOM_LEFT]=i(240),s[n.BOTTOM_RIGHT]=i(241),s[n.CENTER]=i(242),s[n.LEFT_CENTER]=i(244),s[n.RIGHT_CENTER]=i(245),s[n.TOP_CENTER]=i(246),s[n.TOP_LEFT]=i(247),s[n.TOP_RIGHT]=i(248);t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e,i){var n=i(38),s=i(75),r=i(39),o=i(76);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(38),s=i(40),r=i(39),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(38),s=i(42),r=i(39),o=i(43);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(243),s=i(75),r=i(78);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)+i,r(e)+o),t}},function(t,e,i){var n=i(76),s=i(77);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var n=i(78),s=i(40),r=i(77),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(78),s=i(42),r=i(77),o=i(43);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(75),s=i(44),r=i(76),o=i(45);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(40),s=i(44),r=i(41),o=i(45);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)-a),t}},function(t,e,i){var n=i(42),s=i(44),r=i(43),o=i(45);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(144),s=i(87),r=i(13),o=i(4);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=s(e,0,r.PI2);return n(t,a,i)}},function(t,e,i){var n=i(251),s=i(144),r=i(87),o=i(13);t.exports=function(t,e,i,a){void 0===a&&(a=[]),e||(e=n(t)/i);for(var h=0;he.length&&(r=e.length),i?(n=e[r-1][i],(s=e[r][i])-t<=t-n?e[r]:e[r-1]):(n=e[r-1],(s=e[r])-t<=t-n?s:n)}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=n,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0}});t.exports=n},function(t,e,i){var n=i(52),s={_blendMode:n.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=n[t]),(t|=0)>=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e,i){var n=i(147),s=i(110);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=s(t)/i);for(var o=0;o=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n-h&&(c-=h,n+=l),fd.right&&(f=u(f,f+(g-d.right),this.lerp.x)),vd.bottom&&(p=u(p,p+(v-d.bottom),this.lerp.y))):(f=u(f,g-h,this.lerp.x),p=u(p,v-l,this.lerp.y))}this.useBounds&&(f=this.clampX(f),p=this.clampY(p)),this.roundPixels&&(h=Math.round(h),l=Math.round(l)),this.scrollX=f,this.scrollY=p;var m=f+n,y=p+s;this.midPoint.set(m,y);var x=e/o,T=i/o;this.worldView.setTo(m-x/2,y-T/2,x,T),a.applyITRS(this.x+h,this.y+l,this.rotation,o,o),a.translate(-h,-l),this.shakeEffect.preRender()},setLerp:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.lerp.set(t,e),this},setFollowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.followOffset.set(t,e),this},startFollow:function(t,e,i,n,s,r){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===s&&(s=0),void 0===r&&(r=s),this._follow=t,this.roundPixels=e,i=o(i,0,1),n=o(n,0,1),this.lerp.set(i,n),this.followOffset.set(s,r);var a=this.width/2,h=this.height/2,l=t.x-s,u=t.y-r;return this.midPoint.set(l,u),this.scrollX=l-a,this.scrollY=u-h,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.visible&&(this.panEffect.update(t,e),this.zoomEffect.update(t,e),this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e))},destroy:function(){this.clearRenderToTexture(),this.resetFX(),n.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=f},function(t,e,i){var n=i(33);t.exports=function(t){var e=new n;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var s=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16);e.setTo(s,r,o)}return e}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e){t.exports=function(t,e,i,n){void 0===n&&(n={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var s=Math.min(t,e,i),r=Math.max(t,e,i),o=r-s,a=0,h=0===r?0:o/r,l=r;return r!==s&&(r===t?a=(e-i)/o+(e16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},function(t,e,i){var n=i(33);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var n=i(33);t.exports=function(t){var e=new n,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var s=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(s,r,o,255*a)}return e}},function(t,e,i){t.exports={Fade:i(637),Flash:i(638),Pan:i(639),Shake:i(672),Zoom:i(673)}},function(t,e,i){t.exports={In:i(640),Out:i(641),InOut:i(642)}},function(t,e,i){t.exports={In:i(643),Out:i(644),InOut:i(645)}},function(t,e,i){t.exports={In:i(646),Out:i(647),InOut:i(648)}},function(t,e,i){t.exports={In:i(649),Out:i(650),InOut:i(651)}},function(t,e,i){t.exports={In:i(652),Out:i(653),InOut:i(654)}},function(t,e,i){t.exports={In:i(655),Out:i(656),InOut:i(657)}},function(t,e,i){t.exports=i(658)},function(t,e,i){t.exports={In:i(659),Out:i(660),InOut:i(661)}},function(t,e,i){t.exports={In:i(662),Out:i(663),InOut:i(664)}},function(t,e,i){t.exports={In:i(665),Out:i(666),InOut:i(667)}},function(t,e,i){t.exports={In:i(668),Out:i(669),InOut:i(670)}},function(t,e,i){t.exports=i(671)},function(t,e,i){var n=i(0),s=i(29),r=i(298),o=i(2),a=i(6),h=i(7),l=i(166),u=i(1),c=i(172),d=i(159),f=new n({initialize:function(t){void 0===t&&(t={});this.width=a(t,"width",1024),this.height=a(t,"height",768),this.zoom=a(t,"zoom",1),this.resolution=a(t,"resolution",1),this.parent=a(t,"parent",void 0),this.scaleMode=a(t,"scaleMode",0),this.expandParent=a(t,"expandParent",!0),this.autoRound=a(t,"autoRound",!1),this.autoCenter=a(t,"autoCenter",0),this.resizeInterval=a(t,"resizeInterval",500),this.fullscreenTarget=a(t,"fullscreenTarget",null),this.minWidth=a(t,"minWidth",0),this.maxWidth=a(t,"maxWidth",0),this.minHeight=a(t,"minHeight",0),this.maxHeight=a(t,"maxHeight",0);var e=a(t,"scale",null);e&&(this.width=a(e,"width",this.width),this.height=a(e,"height",this.height),this.zoom=a(e,"zoom",this.zoom),this.resolution=a(e,"resolution",this.resolution),this.parent=a(e,"parent",this.parent),this.scaleMode=a(e,"mode",this.scaleMode),this.expandParent=a(e,"expandParent",this.expandParent),this.autoRound=a(e,"autoRound",this.autoRound),this.autoCenter=a(e,"autoCenter",this.autoCenter),this.resizeInterval=a(e,"resizeInterval",this.resizeInterval),this.fullscreenTarget=a(e,"fullscreenTarget",this.fullscreenTarget),this.minWidth=a(e,"min.width",this.minWidth),this.maxWidth=a(e,"max.width",this.maxWidth),this.minHeight=a(e,"min.height",this.minHeight),this.maxHeight=a(e,"max.height",this.maxHeight)),this.renderType=a(t,"type",s.AUTO),this.canvas=a(t,"canvas",null),this.context=a(t,"context",null),this.canvasStyle=a(t,"canvasStyle",null),this.customEnvironment=a(t,"customEnvironment",!1),this.sceneConfig=a(t,"scene",null),this.seed=a(t,"seed",[(Date.now()*Math.random()).toString()]),l.RND=new l.RandomDataGenerator(this.seed),this.gameTitle=a(t,"title",""),this.gameURL=a(t,"url","https://phaser.io"),this.gameVersion=a(t,"version",""),this.autoFocus=a(t,"autoFocus",!0),this.domCreateContainer=a(t,"dom.createContainer",!1),this.domBehindCanvas=a(t,"dom.behindCanvas",!1),this.inputKeyboard=a(t,"input.keyboard",!0),this.inputKeyboardEventTarget=a(t,"input.keyboard.target",window),this.inputKeyboardCapture=a(t,"input.keyboard.capture",[]),this.inputMouse=a(t,"input.mouse",!0),this.inputMouseEventTarget=a(t,"input.mouse.target",null),this.inputMouseCapture=a(t,"input.mouse.capture",!0),this.inputTouch=a(t,"input.touch",r.input.touch),this.inputTouchEventTarget=a(t,"input.touch.target",null),this.inputTouchCapture=a(t,"input.touch.capture",!0),this.inputActivePointers=a(t,"input.activePointers",1),this.inputSmoothFactor=a(t,"input.smoothFactor",0),this.inputWindowEvents=a(t,"input.windowEvents",!0),this.inputGamepad=a(t,"input.gamepad",!1),this.inputGamepadEventTarget=a(t,"input.gamepad.target",window),this.disableContextMenu=a(t,"disableContextMenu",!1),this.audio=a(t,"audio"),this.hideBanner=!1===a(t,"banner",null),this.hidePhaser=a(t,"banner.hidePhaser",!1),this.bannerTextColor=a(t,"banner.text","#ffffff"),this.bannerBackgroundColor=a(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=a(t,"fps",null);var i=a(t,"render",t);this.antialias=a(i,"antialias",!0),this.antialiasGL=a(i,"antialiasGL",!0),this.mipmapFilter=a(i,"mipmapFilter","LINEAR"),this.desynchronized=a(i,"desynchronized",!1),this.roundPixels=a(i,"roundPixels",!1),this.pixelArt=a(i,"pixelArt",1!==this.zoom),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=a(i,"transparent",!1),this.clearBeforeRender=a(i,"clearBeforeRender",!0),this.premultipliedAlpha=a(i,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=a(i,"failIfMajorPerformanceCaveat",!1),this.powerPreference=a(i,"powerPreference","default"),this.batchSize=a(i,"batchSize",2e3),this.maxLights=a(i,"maxLights",10);var n=a(t,"backgroundColor",0);this.backgroundColor=d(n),0===n&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=a(t,"callbacks.preBoot",u),this.postBoot=a(t,"callbacks.postBoot",u),this.physics=a(t,"physics",{}),this.defaultPhysicsSystem=a(this.physics,"default",!1),this.loaderBaseURL=a(t,"loader.baseURL",""),this.loaderPath=a(t,"loader.path",""),this.loaderMaxParallelDownloads=a(t,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=a(t,"loader.crossOrigin",void 0),this.loaderResponseType=a(t,"loader.responseType",""),this.loaderAsync=a(t,"loader.async",!0),this.loaderUser=a(t,"loader.user",""),this.loaderPassword=a(t,"loader.password",""),this.loaderTimeout=a(t,"loader.timeout",0),this.installGlobalPlugins=[],this.installScenePlugins=[];var f=a(t,"plugins",null),p=c.DefaultScene;f&&(Array.isArray(f)?this.defaultPlugins=f:h(f)&&(this.installGlobalPlugins=o(f,"global",[]),this.installScenePlugins=o(f,"scene",[]),Array.isArray(f.default)?p=f.default:Array.isArray(f.defaultMerge)&&(p=p.concat(f.defaultMerge)))),this.defaultPlugins=p;var g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=a(t,"images.default",g+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=a(t,"images.missing",g+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),window&&(window.FORCE_WEBGL?this.renderType=s.WEBGL:window.FORCE_CANVAS&&(this.renderType=s.CANVAS))}});t.exports=f},function(t,e,i){t.exports={os:i(114),browser:i(115),features:i(165),input:i(702),audio:i(703),video:i(704),fullscreen:i(705),canvasFeatures:i(299)}},function(t,e,i){var n,s,r,o=i(26),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create(t,6,1).getContext("2d");if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return s*s+r*r}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t0?Math.ceil(t):Math.floor(t)}},function(t,e,i){var n=i(3);t.exports=function(t,e,i,s,r,o,a,h){void 0===h&&(h=new n);var l=Math.sin(r),u=Math.cos(r),c=u*o,d=l*o,f=-l*a,p=u*a,g=1/(c*p+f*-d);return h.x=p*g*t+-f*g*e+(s*f-i*p)*g,h.y=c*g*e+-d*g*t+(-s*c+i*d)*g,h}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},clone:function(){return new n(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return e*e+i*i+n*n+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12]*s,this.y=r[1]*e+r[5]*i+r[9]*n+r[13]*s,this.z=r[2]*e+r[6]*i+r[10]*n+r[14]*s,this.w=r[3]*e+r[7]*i+r[11]*n+r[15]*s,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*r-o*h,c=-l*s+o*a,d=h*s-r*a,f=e*u+i*c+n*d;return f?(f=1/f,t[0]=u*f,t[1]=(-l*i+n*h)*f,t[2]=(o*i-n*r)*f,t[3]=c*f,t[4]=(l*e-n*a)*f,t[5]=(-o*e+n*s)*f,t[6]=d*f,t[7]=(-h*e+i*a)*f,t[8]=(r*e-i*s)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=r*l-o*h,t[1]=n*h-i*l,t[2]=i*o-n*r,t[3]=o*a-s*l,t[4]=e*l-n*a,t[5]=n*s-e*o,t[6]=s*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*s,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*(l*r-o*h)+i*(-l*s+o*a)+n*(h*s-r*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],m=c[5],y=c[6],x=c[7],T=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*n+f*o+p*l,e[2]=d*s+f*a+p*u,e[3]=g*i+v*r+m*h,e[4]=g*n+v*o+m*l,e[5]=g*s+v*a+m*u,e[6]=y*i+x*r+T*h,e[7]=y*n+x*o+T*l,e[8]=y*s+x*a+T*u,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*r,e[1]=l*n+h*o,e[2]=l*s+h*a,e[3]=l*r-h*i,e[4]=l*o-h*n,e[5]=l*a-h*s,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,o=i+i,a=n+n,h=e*r,l=e*o,u=e*a,c=i*o,d=i*a,f=n*a,p=s*r,g=s*o,v=s*a,m=this.val;return m[0]=1-(c+f),m[3]=l+v,m[6]=u-g,m[1]=l-v,m[4]=1-(h+f),m[7]=d+p,m[2]=u+g,m[5]=d-p,m[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],v=e[13],m=e[14],y=e[15],x=n*h-s*a,T=n*l-r*a,w=n*u-o*a,E=s*l-r*h,_=s*u-o*h,b=r*u-o*l,A=c*v-d*g,S=c*m-f*g,C=c*y-p*g,M=d*m-f*v,O=d*y-p*v,P=f*y-p*m,R=x*P-T*O+w*M+E*C-_*S+b*A;return R?(R=1/R,i[0]=(h*P-l*O+u*M)*R,i[1]=(l*C-a*P-u*S)*R,i[2]=(a*O-h*C+u*A)*R,i[3]=(r*O-s*P-o*M)*R,i[4]=(n*P-r*C+o*S)*R,i[5]=(s*C-n*O-o*A)*R,i[6]=(v*b-m*_+y*E)*R,i[7]=(m*w-g*b-y*T)*R,i[8]=(g*_-v*w+y*x)*R,this):null}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this},zero:function(){var t=this.val;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=0,this},xyz:function(t,e,i){this.identity();var n=this.val;return n[12]=t,n[13]=e,n[14]=i,this},scaling:function(t,e,i){this.zero();var n=this.val;return n[0]=t,n[5]=e,n[10]=i,n[15]=1,this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[3],s=t[6],r=t[7],o=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=s,t[11]=t[14],t[12]=n,t[13]=r,t[14]=o,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15],m=e*o-i*r,y=e*a-n*r,x=e*h-s*r,T=i*a-n*o,w=i*h-s*o,E=n*h-s*a,_=l*p-u*f,b=l*g-c*f,A=l*v-d*f,S=u*g-c*p,C=u*v-d*p,M=c*v-d*g,O=m*M-y*C+x*S+T*A-w*b+E*_;return O?(O=1/O,t[0]=(o*M-a*C+h*S)*O,t[1]=(n*C-i*M-s*S)*O,t[2]=(p*E-g*w+v*T)*O,t[3]=(c*w-u*E-d*T)*O,t[4]=(a*A-r*M-h*b)*O,t[5]=(e*M-n*A+s*b)*O,t[6]=(g*x-f*E-v*y)*O,t[7]=(l*E-c*x+d*y)*O,t[8]=(r*C-o*A+h*_)*O,t[9]=(i*A-e*C-s*_)*O,t[10]=(f*w-p*x+v*m)*O,t[11]=(u*x-l*w-d*m)*O,t[12]=(o*b-r*S-a*_)*O,t[13]=(e*S-i*b+n*_)*O,t[14]=(p*y-f*T-g*m)*O,t[15]=(l*T-u*y+c*m)*O,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return t[0]=o*(c*v-d*g)-u*(a*v-h*g)+p*(a*d-h*c),t[1]=-(i*(c*v-d*g)-u*(n*v-s*g)+p*(n*d-s*c)),t[2]=i*(a*v-h*g)-o*(n*v-s*g)+p*(n*h-s*a),t[3]=-(i*(a*d-h*c)-o*(n*d-s*c)+u*(n*h-s*a)),t[4]=-(r*(c*v-d*g)-l*(a*v-h*g)+f*(a*d-h*c)),t[5]=e*(c*v-d*g)-l*(n*v-s*g)+f*(n*d-s*c),t[6]=-(e*(a*v-h*g)-r*(n*v-s*g)+f*(n*h-s*a)),t[7]=e*(a*d-h*c)-r*(n*d-s*c)+l*(n*h-s*a),t[8]=r*(u*v-d*p)-l*(o*v-h*p)+f*(o*d-h*u),t[9]=-(e*(u*v-d*p)-l*(i*v-s*p)+f*(i*d-s*u)),t[10]=e*(o*v-h*p)-r*(i*v-s*p)+f*(i*h-s*o),t[11]=-(e*(o*d-h*u)-r*(i*d-s*u)+l*(i*h-s*o)),t[12]=-(r*(u*g-c*p)-l*(o*g-a*p)+f*(o*c-a*u)),t[13]=e*(u*g-c*p)-l*(i*g-n*p)+f*(i*c-n*u),t[14]=-(e*(o*g-a*p)-r*(i*g-n*p)+f*(i*a-n*o)),t[15]=e*(o*c-a*u)-r*(i*c-n*u)+l*(i*a-n*o),this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return(e*o-i*r)*(c*v-d*g)-(e*a-n*r)*(u*v-d*p)+(e*h-s*r)*(u*g-c*p)+(i*a-n*o)*(l*v-d*f)-(i*h-s*o)*(l*g-c*f)+(n*h-s*a)*(l*p-u*f)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=e[9],d=e[10],f=e[11],p=e[12],g=e[13],v=e[14],m=e[15],y=t.val,x=y[0],T=y[1],w=y[2],E=y[3];return e[0]=x*i+T*o+w*u+E*p,e[1]=x*n+T*a+w*c+E*g,e[2]=x*s+T*h+w*d+E*v,e[3]=x*r+T*l+w*f+E*m,x=y[4],T=y[5],w=y[6],E=y[7],e[4]=x*i+T*o+w*u+E*p,e[5]=x*n+T*a+w*c+E*g,e[6]=x*s+T*h+w*d+E*v,e[7]=x*r+T*l+w*f+E*m,x=y[8],T=y[9],w=y[10],E=y[11],e[8]=x*i+T*o+w*u+E*p,e[9]=x*n+T*a+w*c+E*g,e[10]=x*s+T*h+w*d+E*v,e[11]=x*r+T*l+w*f+E*m,x=y[12],T=y[13],w=y[14],E=y[15],e[12]=x*i+T*o+w*u+E*p,e[13]=x*n+T*a+w*c+E*g,e[14]=x*s+T*h+w*d+E*v,e[15]=x*r+T*l+w*f+E*m,this},multiplyLocal:function(t){var e=[],i=this.val,n=t.val;return e[0]=i[0]*n[0]+i[1]*n[4]+i[2]*n[8]+i[3]*n[12],e[1]=i[0]*n[1]+i[1]*n[5]+i[2]*n[9]+i[3]*n[13],e[2]=i[0]*n[2]+i[1]*n[6]+i[2]*n[10]+i[3]*n[14],e[3]=i[0]*n[3]+i[1]*n[7]+i[2]*n[11]+i[3]*n[15],e[4]=i[4]*n[0]+i[5]*n[4]+i[6]*n[8]+i[7]*n[12],e[5]=i[4]*n[1]+i[5]*n[5]+i[6]*n[9]+i[7]*n[13],e[6]=i[4]*n[2]+i[5]*n[6]+i[6]*n[10]+i[7]*n[14],e[7]=i[4]*n[3]+i[5]*n[7]+i[6]*n[11]+i[7]*n[15],e[8]=i[8]*n[0]+i[9]*n[4]+i[10]*n[8]+i[11]*n[12],e[9]=i[8]*n[1]+i[9]*n[5]+i[10]*n[9]+i[11]*n[13],e[10]=i[8]*n[2]+i[9]*n[6]+i[10]*n[10]+i[11]*n[14],e[11]=i[8]*n[3]+i[9]*n[7]+i[10]*n[11]+i[11]*n[15],e[12]=i[12]*n[0]+i[13]*n[4]+i[14]*n[8]+i[15]*n[12],e[13]=i[12]*n[1]+i[13]*n[5]+i[14]*n[9]+i[15]*n[13],e[14]=i[12]*n[2]+i[13]*n[6]+i[14]*n[10]+i[15]*n[14],e[15]=i[12]*n[3]+i[13]*n[7]+i[14]*n[11]+i[15]*n[15],this.fromArray(e)},translate:function(t){var e=t.x,i=t.y,n=t.z,s=this.val;return s[12]=s[0]*e+s[4]*i+s[8]*n+s[12],s[13]=s[1]*e+s[5]*i+s[9]*n+s[13],s[14]=s[2]*e+s[6]*i+s[10]*n+s[14],s[15]=s[3]*e+s[7]*i+s[11]*n+s[15],this},translateXYZ:function(t,e,i){var n=this.val;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this},scale:function(t){var e=t.x,i=t.y,n=t.z,s=this.val;return s[0]=s[0]*e,s[1]=s[1]*e,s[2]=s[2]*e,s[3]=s[3]*e,s[4]=s[4]*i,s[5]=s[5]*i,s[6]=s[6]*i,s[7]=s[7]*i,s[8]=s[8]*n,s[9]=s[9]*n,s[10]=s[10]*n,s[11]=s[11]*n,this},scaleXYZ:function(t,e,i){var n=this.val;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),s=1-i,r=t.x,o=t.y,a=t.z,h=s*r,l=s*o;return this.fromArray([h*r+i,h*o-n*a,h*a+n*o,0,h*o+n*a,l*o+i,l*a-n*r,0,h*a-n*o,l*a+n*r,s*a*a+i,0,0,0,0,1]),this},rotate:function(t,e){var i=this.val,n=e.x,s=e.y,r=e.z,o=Math.sqrt(n*n+s*s+r*r);if(Math.abs(o)<1e-6)return null;n*=o=1/o,s*=o,r*=o;var a=Math.sin(t),h=Math.cos(t),l=1-h,u=i[0],c=i[1],d=i[2],f=i[3],p=i[4],g=i[5],v=i[6],m=i[7],y=i[8],x=i[9],T=i[10],w=i[11],E=n*n*l+h,_=s*n*l+r*a,b=r*n*l-s*a,A=n*s*l-r*a,S=s*s*l+h,C=r*s*l+n*a,M=n*r*l+s*a,O=s*r*l-n*a,P=r*r*l+h;return i[0]=u*E+p*_+y*b,i[1]=c*E+g*_+x*b,i[2]=d*E+v*_+T*b,i[3]=f*E+m*_+w*b,i[4]=u*A+p*S+y*C,i[5]=c*A+g*S+x*C,i[6]=d*A+v*S+T*C,i[7]=f*A+m*S+w*C,i[8]=u*M+p*O+y*P,i[9]=c*M+g*O+x*P,i[10]=d*M+v*O+T*P,i[11]=f*M+m*O+w*P,this},rotateX:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this},rotateY:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this},rotateZ:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this},fromRotationTranslation:function(t,e){var i=this.val,n=t.x,s=t.y,r=t.z,o=t.w,a=n+n,h=s+s,l=r+r,u=n*a,c=n*h,d=n*l,f=s*h,p=s*l,g=r*l,v=o*a,m=o*h,y=o*l;return i[0]=1-(f+g),i[1]=c+y,i[2]=d-m,i[3]=0,i[4]=c-y,i[5]=1-(u+g),i[6]=p+v,i[7]=0,i[8]=d+m,i[9]=p-v,i[10]=1-(u+f),i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this},fromQuat:function(t){var e=this.val,i=t.x,n=t.y,s=t.z,r=t.w,o=i+i,a=n+n,h=s+s,l=i*o,u=i*a,c=i*h,d=n*a,f=n*h,p=s*h,g=r*o,v=r*a,m=r*h;return e[0]=1-(d+p),e[1]=u+m,e[2]=c-v,e[3]=0,e[4]=u-m,e[5]=1-(l+p),e[6]=f+g,e[7]=0,e[8]=c+v,e[9]=f-g,e[10]=1-(l+d),e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},frustum:function(t,e,i,n,s,r){var o=this.val,a=1/(e-t),h=1/(n-i),l=1/(s-r);return o[0]=2*s*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=2*s*h,o[6]=0,o[7]=0,o[8]=(e+t)*a,o[9]=(n+i)*h,o[10]=(r+s)*l,o[11]=-1,o[12]=0,o[13]=0,o[14]=r*s*2*l,o[15]=0,this},perspective:function(t,e,i,n){var s=this.val,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this},perspectiveLH:function(t,e,i,n){var s=this.val;return s[0]=2*i/t,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=2*i/e,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=-n/(i-n),s[11]=1,s[12]=0,s[13]=0,s[14]=i*n/(i-n),s[15]=0,this},ortho:function(t,e,i,n,s,r){var o=this.val,a=t-e,h=i-n,l=s-r;return a=0===a?a:1/a,h=0===h?h:1/h,l=0===l?l:1/l,o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*l,o[15]=1,this},lookAt:function(t,e,i){var n=this.val,s=t.x,r=t.y,o=t.z,a=i.x,h=i.y,l=i.z,u=e.x,c=e.y,d=e.z;if(Math.abs(s-u)<1e-6&&Math.abs(r-c)<1e-6&&Math.abs(o-d)<1e-6)return this.identity();var f=s-u,p=r-c,g=o-d,v=1/Math.sqrt(f*f+p*p+g*g),m=h*(g*=v)-l*(p*=v),y=l*(f*=v)-a*g,x=a*p-h*f;(v=Math.sqrt(m*m+y*y+x*x))?(m*=v=1/v,y*=v,x*=v):(m=0,y=0,x=0);var T=p*x-g*y,w=g*m-f*x,E=f*y-p*m;return(v=Math.sqrt(T*T+w*w+E*E))?(T*=v=1/v,w*=v,E*=v):(T=0,w=0,E=0),n[0]=m,n[1]=T,n[2]=f,n[3]=0,n[4]=y,n[5]=w,n[6]=p,n[7]=0,n[8]=x,n[9]=E,n[10]=g,n[11]=0,n[12]=-(m*s+y*r+x*o),n[13]=-(T*s+w*r+E*o),n[14]=-(f*s+p*r+g*o),n[15]=1,this},yawPitchRoll:function(t,e,i){this.zero(),s.zero(),r.zero();var n=this.val,o=s.val,a=r.val,h=Math.sin(i),l=Math.cos(i);return n[10]=1,n[15]=1,n[0]=l,n[1]=h,n[4]=-h,n[5]=l,h=Math.sin(e),l=Math.cos(e),o[0]=1,o[15]=1,o[5]=l,o[10]=l,o[9]=-h,o[6]=h,h=Math.sin(t),l=Math.cos(t),a[5]=1,a[15]=1,a[0]=l,a[2]=-h,a[8]=h,a[10]=l,this.multiplyLocal(s),this.multiplyLocal(r),this},setWorldMatrix:function(t,e,i,n,o){return this.yawPitchRoll(t.y,t.x,t.z),s.scaling(i.x,i.y,i.z),r.xyz(e.x,e.y,e.z),this.multiplyLocal(s),this.multiplyLocal(r),void 0!==n&&this.multiplyLocal(n),void 0!==o&&this.multiplyLocal(o),this}}),s=new n,r=new n;t.exports=n},function(t,e,i){var n=i(0),s=i(171),r=i(317),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new s(1,0,0),l=new s(0,1,0),u=new s,c=new r,d=new n({initialize:function(t,e,i,n){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(u.copy(h).cross(t).length()<1e-6&&u.copy(l).cross(t),u.normalize(),this.setAxisAngle(u,Math.PI)):i>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(u.copy(t).cross(e),this.x=u.x,this.y=u.y,this.z=u.z,this.w=1+i,this.normalize())},setAxes:function(t,e,i){var n=c.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.x=i*t.x,this.y=i*t.y,this.z=i*t.z,this.w=Math.cos(e),this},multiply:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.x=e*h+s*r+i*a-n*o,this.y=i*h+s*o+n*r-e*a,this.z=n*h+s*a+e*o-i*r,this.w=s*h-e*r-i*o-n*a,this},slerp:function(t,e){var i=this.x,n=this.y,s=this.z,r=this.w,o=t.x,a=t.y,h=t.z,l=t.w,u=i*o+n*a+s*h+r*l;u<0&&(u=-u,o=-o,a=-a,h=-h,l=-l);var c=1-e,d=e;if(1-u>1e-6){var f=Math.acos(u),p=Math.sin(f);c=Math.sin((1-e)*f)/p,d=Math.sin(e*f)/p}return this.x=c*i+d*o,this.y=c*n+d*a,this.z=c*s+d*h,this.w=c*r+d*l,this},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n,r=s?1/s:0;return this.x=-t*r,this.y=-e*r,this.z=-i*r,this.w=n*r,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+s*r,this.y=i*o+n*r,this.z=n*o-i*r,this.w=s*o-e*r,this},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o-n*r,this.y=i*o+s*r,this.z=n*o+e*r,this.w=s*o-i*r,this},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+i*r,this.y=i*o-e*r,this.z=n*o+s*r,this.w=s*o-n*r,this},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this.x=(i[7]-i[5])*e,this.y=(i[2]-i[6])*e,this.z=(i[3]-i[1])*e;else{var s=0;i[4]>i[0]&&(s=1),i[8]>i[3*s+s]&&(s=2);var r=o[s],h=o[r];e=Math.sqrt(i[3*s+s]-i[3*r+r]-i[3*h+h]+1),a[s]=.5*e,e=.5/e,a[r]=(i[3*r+s]+i[3*s+r])*e,a[h]=(i[3*h+s]+i[3*s+h])*e,this.x=a[0],this.y=a[1],this.z=a[2],this.w=(i[3*h+r]-i[3*r+h])*e}return this}});t.exports=d},function(t,e,i){var n=i(321),s=i(26),r=i(29),o=i(165);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===r.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==r.HEADLESS)if(e.renderType===r.CANVAS||e.renderType!==r.CANVAS&&!o.webGL){if(!o.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");e.renderType=r.CANVAS}else e.renderType=r.WEBGL;e.antialias||s.disableSmoothing();var a,h,l=t.scale.baseSize,u=l.width,c=l.height;e.canvas?(t.canvas=e.canvas,t.canvas.width=u,t.canvas.height=c):t.canvas=s.create(t,u,c,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||n.setCrisp(t.canvas),e.renderType!==r.HEADLESS&&(a=i(485),h=i(488),e.renderType===r.WEBGL?t.renderer=new h(t):(t.renderer=new a(t),t.context=t.renderer.gameContext))}},function(t,e){t.exports={setCrisp:function(t){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach(function(e){t.style["image-rendering"]=e}),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},function(t,e,i){var n=i(29);t.exports=function(t){var e=t.config;if(!e.hideBanner){var i="WebGL";e.renderType===n.CANVAS?i="Canvas":e.renderType===n.HEADLESS&&(i="Headless");var s,r=e.audio,o=t.device.audio;if(s=!o.webAudio||r&&r.disableWebAudio?r&&r.noAudio||!o.webAudio&&!o.audioData?"No Audio":"HTML5 Audio":"Web Audio",t.device.browser.ie)window.console&&console.log("Phaser v"+n.VERSION+" / https://phaser.io");else{var a,h="",l=[h];Array.isArray(e.bannerBackgroundColor)?(e.bannerBackgroundColor.forEach(function(t){h=h.concat("%c "),l.push("background: "+t),a=t}),l[l.length-1]="color: "+e.bannerTextColor+"; background: "+a):(h=h.concat("%c "),l.push("color: "+e.bannerTextColor+"; background: "+e.bannerBackgroundColor)),l.push("background: #fff"),e.gameTitle&&(h=h.concat(e.gameTitle),e.gameVersion&&(h=h.concat(" v"+e.gameVersion)),e.hidePhaser||(h=h.concat(" / "))),e.hidePhaser||(h=h.concat("Phaser v"+n.VERSION+" ("+i+" | "+s+")")),h=h.concat(" %c "+e.gameURL),l[0]=h,console.log.apply(console,l)}}}},function(t,e,i){var n=i(0),s=i(6),r=i(1),o=i(324),a=new n({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=s(e,"min",5),this.targetFps=s(e,"target",60),this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=r,this.forceSetTimeOut=s(e,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=s(e,"deltaHistory",10),this.panicMax=s(e,"panicMax",120),this.rawDelta=0,this.now=0},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var t=window.performance.now();this.time=t,this.lastTime=t,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0;for(var e=0;e0||!this.inFocus)&&(this._coolDown--,r=Math.min(r,this._target)),r>this._min&&(r=n[i],r=Math.min(r,this._min)),n[i]=r,this.deltaIndex++,this.deltaIndex>s&&(this.deltaIndex=0);for(var o=0,a=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t,this.frame++},tick:function(){this.step()},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running?this.sleep():t&&(this.startTime+=-this.lastTime+(this.lastTime+window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step()},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0,this.target=0;var t=this;this.step=function e(){var i=window.performance.now();t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.requestAnimationFrame(e)},this.stepTimeout=function e(){var i=Date.now(),n=Math.min(Math.max(2*t.target+t.tick-i,0),t.target);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,n)}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.target=i,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=s}});t.exports=r},function(t,e,i){var n=i(18);t.exports=function(t){var e,i=t.events;void 0!==document.hidden?e="visibilitychange":["webkit","moz","ms"].forEach(function(t){void 0!==document[t+"Hidden"]&&(document.hidden=function(){return document[t+"Hidden"]},e=t+"visibilitychange")});e&&document.addEventListener(e,function(t){document.hidden||"pause"===t.type?i.emit(n.HIDDEN):i.emit(n.VISIBLE)},!1),window.onblur=function(){i.emit(n.BLUR)},window.onfocus=function(){i.emit(n.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},function(t,e,i){var n=i(327),s=i(26),r=i(6);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",n),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),l=r(t,"resizeCanvas",!0),u=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),f=Math.floor(Math.abs(e[0].length*a)),p=Math.floor(Math.abs(e.length*h));i||(i=s.create2D(this,f,p),l=!1,u=!1),l&&(i.width=f,i.height=p);var g=i.getContext("2d");u&&g.clearRect(0,0,f,p),c&&c(i,g);for(var v=0;vi;)n-=i;ni.length-2?i.length-1:r+1],c=i[r>i.length-3?i.length-1:r+2];return e.set(n(a,h.x,l.x,u.x,c.x),n(a,h.y,l.y,u.y,c.y))},toJSON:function(){for(var t=[],e=0;e1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}},function(t,e,i){var n=i(114);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?n.cordova?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},function(t,e,i){var n=i(174);t.exports=function(t,e){var i=window.screen,s=!!i&&(i.orientation||i.mozOrientation||i.msOrientation);if(s&&"string"==typeof s.type)return s.type;if("string"==typeof s)return s;if(i)return i.height>i.width?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE;if("number"==typeof window.orientation)return 0===window.orientation||180===window.orientation?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return n.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return n.ORIENTATION.LANDSCAPE}return e>t?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE}},function(t,e){t.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},function(t,e){t.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},function(t,e){t.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5}},function(t,e){t.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},function(t,e){t.exports=function(t){var e;return""!==t&&("string"==typeof t?e=document.getElementById(t):t&&1===t.nodeType&&(e=t)),e||(e=document.body),e}},function(t,e){t.exports=function(t){var e="";try{window.DOMParser?e=(new DOMParser).parseFromString(t,"text/xml"):(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},function(t,e,i){var n=i(0),s=i(176),r=i(9),o=i(53),a=i(18),h=i(346),l=i(347),u=i(348),c=i(349),d=i(32),f=i(315),p=new n({initialize:function(t,e){this.game=t,this.scaleManager,this.canvas,this.config=e,this.enabled=!0,this.events=new r,this.isOver=!0,this.defaultCursor="",this.keyboard=e.inputKeyboard?new h(this):null,this.mouse=e.inputMouse?new l(this):null,this.touch=e.inputTouch?new c(this):null,this.pointers=[],this.pointersTotal=e.inputActivePointers,e.inputTouch&&1===this.pointersTotal&&(this.pointersTotal=2);for(var i=0;i<=this.pointersTotal;i++){var n=new u(this,i);n.smoothFactor=e.inputSmoothFactor,this.pointers.push(n)}this.mousePointer=e.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new d,this._tempMatrix2=new d,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],t.events.once(a.BOOT,this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.scaleManager=this.game.scale,this.events.emit(o.MANAGER_BOOT),this.game.events.on(a.PRE_RENDER,this.preRender,this),this.game.events.once(a.DESTROY,this.destroy,this)},setCanvasOver:function(t){this.isOver=!0,this.events.emit(o.GAME_OVER,t)},setCanvasOut:function(t){this.isOver=!1,this.events.emit(o.GAME_OUT,t)},preRender:function(){var t=this.game.loop.now,e=this.game.loop.delta,i=this.game.scene.getScenes(!0,!0);this.time=t,this.events.emit(o.MANAGER_UPDATE);for(var n=0;n10&&(t=10-this.pointersTotal);for(var i=0;i-1&&e.preventDefault()}},this.onKeyUp=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.useQueue||t.manager.events.emit(o.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}};var e=this.target;e&&(e.addEventListener("keydown",this.onKeyDown,!1),e.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var t=this.target;t.removeEventListener("keydown",this.onKeyDown,!1),t.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},removeCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(r.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});t.exports=l},function(t,e,i){var n=i(0),s=i(165),r=i(53),o=i(0),a=new n({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=o,this.onMouseDown=o,this.onMouseUp=o,this.onMouseDownWindow=o,this.onMouseUpWindow=o,this.onMouseOver=o,this.onMouseOut=o,this.onMouseWheel=o,this.pointerLockChange=o,t.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.capture=t.inputMouseCapture,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return document.body.addEventListener("contextmenu",function(t){return t.preventDefault(),!1}),this},requestPointerLock:function(){if(s.pointerLock){var t=this.target;t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock()}},releasePointerLock:function(){s.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t=this,e=this.manager.canvas,i=window&&window.focus&&this.manager.game.config.autoFocus;this.onMouseMove=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onMouseMove(e),t.capture&&e.preventDefault())},this.onMouseDown=function(n){i&&window.focus(),!n.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onMouseDown(n),t.capture&&n.target===e&&n.preventDefault())},this.onMouseDownWindow=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&i.target!==e&&t.manager.onMouseDown(i)},this.onMouseUp=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onMouseUp(i),t.capture&&i.target===e&&i.preventDefault())},this.onMouseUpWindow=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&i.target!==e&&t.manager.onMouseUp(i)},this.onMouseOver=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.setCanvasOver(e)},this.onMouseOut=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.setCanvasOut(e)},this.onMouseWheel=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.onMouseWheel(e)};var n=this.target;if(n){var r={passive:!0},o={passive:!1};n.addEventListener("mousemove",this.onMouseMove,this.capture?o:r),n.addEventListener("mousedown",this.onMouseDown,this.capture?o:r),n.addEventListener("mouseup",this.onMouseUp,this.capture?o:r),n.addEventListener("mouseover",this.onMouseOver,this.capture?o:r),n.addEventListener("mouseout",this.onMouseOut,this.capture?o:r),n.addEventListener("wheel",this.onMouseWheel,this.capture?o:r),window&&this.manager.game.config.inputWindowEvents&&(window.addEventListener("mousedown",this.onMouseDownWindow,o),window.addEventListener("mouseup",this.onMouseUpWindow,o)),s.pointerLock&&(this.pointerLockChange=function(e){var i=t.target;t.locked=document.pointerLockElement===i||document.mozPointerLockElement===i||document.webkitPointerLockElement===i,t.manager.onPointerLockChange(e)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("mouseover",this.onMouseOver),t.removeEventListener("mouseout",this.onMouseOut),window&&(window.removeEventListener("mousedown",this.onMouseDownWindow),window.removeEventListener("mouseup",this.onMouseUpWindow)),s.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=a},function(t,e,i){var n=i(300),s=i(0),r=i(58),o=i(167),a=i(309),h=i(3),l=new s({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new h,this.prevPosition=new h,this.midPoint=new h(-1,-1),this.velocity=new h,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=0===e,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(t){var e=this.x,i=this.y;1!==t.resolution&&(e+=t._x,i+=t._y);var n=t.getWorldPoint(e,i);return this.worldX=n.x,this.worldY=n.y,this},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},updateMotion:function(){var t=this.position.x,e=this.position.y,i=this.midPoint.x,s=this.midPoint.y;if(t!==i||e!==s){var r=a(this.motionFactor,i,t),h=a(this.motionFactor,s,e);o(r,t,.1)&&(r=t),o(h,e,.1)&&(h=e),this.midPoint.set(r,h);var l=t-r,u=e-h;this.velocity.set(l,u),this.angle=n(r,h,t,e),this.distance=Math.sqrt(l*l+u*u)}},up:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=t.timeStamp),this.isDown=!1,this.wasTouch=!1},down:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=t.timeStamp),this.isDown=!0,this.wasTouch=!1},move:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.locked&&(this.movementX=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.movementY=t.movementY||t.mozMovementY||t.webkitMovementY||0),this.moveTime=t.timeStamp,this.wasTouch=!1},wheel:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.deltaX=t.deltaX,this.deltaY=t.deltaY,this.deltaZ=t.deltaZ,this.wasTouch=!1},touchstart:function(t,e){t.pointerId&&(this.pointerId=t.pointerId),this.identifier=t.identifier,this.target=t.target,this.active=!0,this.buttons=1,this.event=e,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(t,e){this.event=e,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.moveTime=e.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return!!(1&this.buttons)},rightButtonDown:function(){return!!(2&this.buttons)},middleButtonDown:function(){return!!(4&this.buttons)},backButtonDown:function(){return!!(8&this.buttons)},forwardButtonDown:function(){return!!(16&this.buttons)},leftButtonReleased:function(){return 0===this.button&&!this.isDown},rightButtonReleased:function(){return 2===this.button&&!this.isDown},middleButtonReleased:function(){return 1===this.button&&!this.isDown},backButtonReleased:function(){return 3===this.button&&!this.isDown},forwardButtonReleased:function(){return 4===this.button&&!this.isDown},getDistance:function(){return this.isDown?r(this.downX,this.downY,this.x,this.y):r(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?n(this.downX,this.downY,this.x,this.y):n(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(t,e){void 0===t&&(t=10),void 0===e&&(e=[]);for(var i=this.prevPosition.x,n=this.prevPosition.y,s=this.position.x,r=this.position.y,o=0;o0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),t.events.on(a.PRE_STEP,this.step,this),this.startListeners()},parseConfig:function(t){this.getParent(t),this.getParentBounds();var e=t.width,i=t.height,s=t.scaleMode,r=t.resolution,o=t.zoom,a=t.autoRound;if("string"==typeof e){var h=this.parentSize.width;0===h&&(h=window.innerWidth);var l=parseInt(e,10)/100;e=Math.floor(h*l)}if("string"==typeof i){var c=this.parentSize.height;0===c&&(c=window.innerHeight);var d=parseInt(i,10)/100;i=Math.floor(c*d)}this.resolution=1,this.scaleMode=s,this.autoRound=a,this.autoCenter=t.autoCenter,this.resizeInterval=t.resizeInterval,a&&(e=Math.floor(e),i=Math.floor(i)),this.gameSize.setSize(e,i),o===n.ZOOM.MAX_ZOOM&&(o=this.getMaxZoom()),this.zoom=o,1!==o&&(this._resetZoom=!0),this.baseSize.setSize(e*r,i*r),a&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),t.minWidth>0&&this.displaySize.setMin(t.minWidth*o,t.minHeight*o),t.maxWidth>0&&this.displaySize.setMax(t.maxWidth*o,t.maxHeight*o),this.displaySize.setSize(e,i),this.orientation=u(e,i)},getParent:function(t){var e=t.parent;if(null!==e){if(this.parent=l(e),this.parentIsWindow=this.parent===document.body,t.expandParent&&t.scaleMode!==n.SCALE_MODE.NONE){var i=this.parent.getBoundingClientRect();(this.parentIsWindow||0===i.height)&&(document.documentElement.style.height="100%",document.body.style.height="100%",i=this.parent.getBoundingClientRect(),this.parentIsWindow||0!==i.height||(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}t.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=l(t.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var t=this.parentSize,e=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(e.height=h(!0));var i=this.resolution,n=e.width*i,s=e.height*i;return(t.width!==n||t.height!==s)&&(t.setSize(n,s),!0)},lockOrientation:function(t){var e=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return!!e&&e(t)},setParentSize:function(t,e){return this.parentSize.setSize(t,e),this.refresh()},setGameSize:function(t,e){var i=this.autoRound,n=this.resolution;i&&(t=Math.floor(t),e=Math.floor(e));var s=this.width,r=this.height;return this.gameSize.resize(t,e),this.baseSize.resize(t*n,e*n),i&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(t,e),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(s,r)},resize:function(t,e){var i=this.zoom,n=this.resolution,s=this.autoRound;s&&(t=Math.floor(t),e=Math.floor(e));var r=this.width,o=this.height;this.gameSize.resize(t,e),this.baseSize.resize(t*n,e*n),s&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(t*i*n,e*i*n),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var a=this.canvas.style,h=t*i,l=e*i;return s&&(h=Math.floor(h),l=Math.floor(l)),h===t&&l===e||(a.width=h+"px",a.height=l+"px"),this.refresh(r,o)},setZoom:function(t){return this.zoom=t,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},refresh:function(t,e){void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var i=this.game.domContainer;if(i){this.baseSize.setCSS(i);var n=this.canvas.style,s=i.style;s.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",s.marginLeft=n.marginLeft,s.marginTop=n.marginTop}return this.emit(o.RESIZE,this.gameSize,this.baseSize,this.displaySize,this.resolution,t,e),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var t=u(this.width,this.height);t!==this.orientation&&(this.orientation=t,this.emit(o.ORIENTATION_CHANGE,t))}},updateScale:function(){var t,e,i=this.canvas.style,s=this.gameSize.width,r=this.gameSize.height,o=this.zoom,a=this.autoRound;this.scaleMode===n.SCALE_MODE.NONE?(this.displaySize.setSize(s*o*1,r*o*1),t=this.displaySize.width/1,e=this.displaySize.height/1,a&&(t=Math.floor(t),e=Math.floor(e)),this._resetZoom&&(i.width=t+"px",i.height=e+"px",this._resetZoom=!1)):this.scaleMode===n.SCALE_MODE.RESIZE?(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(1*this.displaySize.width,1*this.displaySize.height),t=this.displaySize.width/1,e=this.displaySize.height/1,a&&(t=Math.floor(t),e=Math.floor(e)),this.canvas.width=t,this.canvas.height=e):(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),t=this.displaySize.width/1,e=this.displaySize.height/1,a&&(t=Math.floor(t),e=Math.floor(e)),i.width=t+"px",i.height=e+"px"),this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var t=p(this.parentSize.width,this.gameSize.width,0,!0),e=p(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(t,e),1)},updateCenter:function(){var t=this.autoCenter;if(t!==n.CENTER.NO_CENTER){var e=this.canvas,i=e.style,s=e.getBoundingClientRect(),r=s.width,o=s.height,a=Math.floor((this.parentSize.width-r)/2),h=Math.floor((this.parentSize.height-o)/2);t===n.CENTER.CENTER_HORIZONTALLY?h=0:t===n.CENTER.CENTER_VERTICALLY&&(a=0),i.marginLeft=a+"px",i.marginTop=h+"px"}},updateBounds:function(){var t=this.canvasBounds,e=this.canvas.getBoundingClientRect();t.x=e.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),t.y=e.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),t.width=e.width,t.height=e.height},transformX:function(t){return(t-this.canvasBounds.left)*this.displayScale.x},transformY:function(t){return(t-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(t){void 0===t&&(t={navigationUI:"hide"});var e=this.fullscreen;if(e.available){if(!e.active){var i,n=this.getFullscreenTarget();this._requestedFullscreenChange=!0,(i=e.keyboard?n[e.request](Element.ALLOW_KEYBOARD_INPUT):n[e.request](t))?i.then(this.fullscreenSuccessHandler.bind(this)).catch(this.fullscreenErrorHandler.bind(this)):e.active?this.fullscreenSuccessHandler():this.fullscreenErrorHandler()}}else this.emit(o.FULLSCREEN_UNSUPPORTED)},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(o.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(t){this.removeFullscreenTarget(),this.emit(o.FULLSCREEN_FAILED,t)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var t=document.createElement("div");t.style.margin="0",t.style.padding="0",t.style.width="100%",t.style.height="100%",this.fullscreenTarget=t,this._createdFullscreenTarget=!0}this._createdFullscreenTarget&&(this.canvas.parentNode.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas));return this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var t=this.fullscreenTarget;if(t&&t.parentNode){var e=t.parentNode;e.insertBefore(this.canvas,t),e.removeChild(t)}}},stopFullscreen:function(){var t=this.fullscreen;if(!t.available)return this.emit(o.FULLSCREEN_UNSUPPORTED),!1;t.active&&(this._requestedFullscreenChange=!0,document[t.cancel]()),this.removeFullscreenTarget(),this.getParentBounds(),this.emit(o.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(t){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(t)},startListeners:function(){var t=this,e=this.listeners;if(e.orientationChange=function(){t._checkOrientation=!0,t.dirty=!0},e.windowResize=function(){t.dirty=!0},window.addEventListener("orientationchange",e.orientationChange,!1),window.addEventListener("resize",e.windowResize,!1),this.fullscreen.available){e.fullScreenChange=function(e){return t.onFullScreenChange(e)},e.fullScreenError=function(e){return t.onFullScreenError(e)};["webkit","moz",""].forEach(function(t){document.addEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.addEventListener(t+"fullscreenerror",e.fullScreenError,!1)}),document.addEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.addEventListener("MSFullscreenError",e.fullScreenError,!1)}},onFullScreenChange:function(){this._requestedFullscreenChange||this.stopFullscreen(),this._requestedFullscreenChange=!1},onFullScreenError:function(){this.removeFullscreenTarget()},step:function(t,e){this.parent&&(this._lastCheck+=e,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var t=this.listeners;window.removeEventListener("orientationchange",t.orientationChange,!1),window.removeEventListener("resize",t.windowResize,!1);["webkit","moz",""].forEach(function(e){document.removeEventListener(e+"fullscreenchange",t.fullScreenChange,!1),document.removeEventListener(e+"fullscreenerror",t.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",t.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",t.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===n.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===n.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=v},function(t,e,i){var n=i(23),s=i(0),r=i(93),o=i(3),a=new s({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=null),this._width=t,this._height=e,this._parent=n,this.aspectMode=i,this.aspectRatio=0===e?1:t/e,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new o},setAspectMode:function(t){return void 0===t&&(t=0),this.aspectMode=t,this.setSize(this._width,this._height)},setSnap:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.snapTo.set(t,e),this.setSize(this._width,this._height)},setParent:function(t){return this._parent=t,this.setSize(this._width,this._height)},setMin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.minWidth=n(t,0,this.maxWidth),this.minHeight=n(e,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(t,e){return void 0===t&&(t=Number.MAX_VALUE),void 0===e&&(e=t),this.maxWidth=n(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=n(e,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(t,e){switch(void 0===t&&(t=0),void 0===e&&(e=t),this.aspectMode){case a.NONE:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case a.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case a.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(r(e,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case a.FIT:this.constrain(t,e,!0);break;case a.ENVELOP:this.constrain(t,e,!1)}return this},setAspectRatio:function(t){return this.aspectRatio=t,this.setSize(this._width,this._height)},resize:function(t,e){return this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minWidth,this.maxWidth),e&&this._parent&&t>this._parent.width&&(t=Math.max(this.minWidth,this._parent.width)),t},getNewHeight:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minHeight,this.maxHeight),e&&this._parent&&t>this._parent.height&&(t=Math.max(this.minHeight,this._parent.height)),t},constrain:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=!0),t=this.getNewWidth(t),e=this.getNewHeight(e);var n=this.snapTo,s=0===e?1:t/e;return i&&this.aspectRatio>s||!i&&this.aspectRatio0&&(t=(e=r(e,n.y))*this.aspectRatio)):(i&&this.aspectRatios)&&(t=(e=r(e,n.y))*this.aspectRatio,n.x>0&&(e=(t=r(t,n.x))*(1/this.aspectRatio))),this._width=t,this._height=e,this},fitTo:function(t,e){return this.constrain(t,e,!0)},envelop:function(t,e){return this.constrain(t,e,!1)},setWidth:function(t){return this.setSize(t,this._height)},setHeight:function(t){return this.setSize(this._width,t)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(t){t&&t.style&&(t.style.width=this._width+"px",t.style.height=this._height+"px")},copy:function(t){return t.setAspectMode(this.aspectMode),t.aspectRatio=this.aspectRatio,t.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(t){this.setSize(t,this._height)}},height:{get:function(){return this._height},set:function(t){this.setSize(this._width,t)}}});a.NONE=0,a.WIDTH_CONTROLS_HEIGHT=1,a.HEIGHT_CONTROLS_WIDTH=2,a.FIT=3,a.ENVELOP=4,t.exports=a},function(t,e,i){var n=i(0),s=i(121),r=i(22),o=i(18),a=i(6),h=i(81),l=i(1),u=i(354),c=i(177),d=new n({initialize:function(t,e){if(this.game=t,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,e){Array.isArray(e)||(e=[e]);for(var i=0;i-1&&(delete this.keys[n],this.scenes.splice(i,1),this._start.indexOf(n)>-1&&(i=this._start.indexOf(n),this._start.splice(i,1)),e.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,n=i.settings;t.init&&(t.init.call(t,n.data),n.status=s.INIT,n.isTransition&&i.events.emit(r.TRANSITION_INIT,n.transitionFrom,n.transitionDuration)),i.load&&(e=i.load).reset(),e&&t.preload?(t.preload.call(t),0===e.list.size?this.create(t):(n.status=s.LOADING,e.once(h.COMPLETE,this.loadComplete,this),e.start())):this.create(t)},loadComplete:function(t){var e=t.scene;this.game.sound&&this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(e)},payloadComplete:function(t){this.bootScene(t.scene)},update:function(t,e){this.processQueue(),this.isProcessing=!0;for(var i=this.scenes.length-1;i>=0;i--){var n=this.scenes[i].sys;n.settings.status>s.START&&n.settings.status<=s.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e=s.LOADING&&i.settings.status0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,n=this.getScene(t),s=this.getAt(i);this.scenes[e]=s,this.scenes[i]=n}}return this},moveUp:function(t){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e=r.x&&t=r.y&&e=r.x&&t=r.y&&e-1){var o=this.context.getImageData(t,e,1,1);o.data[0]=i,o.data[1]=n,o.data[2]=s,o.data[3]=r,this.context.putImageData(o,t,e)}return this},putData:function(t,e,i,n,s,r,o){return void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=t.width),void 0===o&&(o=t.height),this.context.putImageData(t,e,i,n,s,r,o),this},getData:function(t,e,i,n){return t=s(Math.floor(t),0,this.width-1),e=s(Math.floor(e),0,this.height-1),i=s(i,1,this.width-t),n=s(n,1,this.height-e),this.context.getImageData(t,e,i,n)},getPixel:function(t,e,i){i||(i=new r);var n=this.getIndex(t,e);if(n>-1){var s=this.data,o=s[n+0],a=s[n+1],h=s[n+2],l=s[n+3];i.setTo(o,a,h,l)}return i},getPixels:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=i),t=Math.abs(Math.round(t)),e=Math.abs(Math.round(e));for(var o=s(t,0,this.width),a=s(t+i,0,this.width),h=s(e,0,this.height),l=s(e+n,0,this.height),u=new r,c=[],d=h;d0)&&(!!n.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(r.PAUSE,this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!n.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit(r.RESUME,this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!n.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit(r.STOP,this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t0)this.startTime=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s=n)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit(r.COMPLETE,this);this.previousTime=s}},destroy:function(){n.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=this.currentConfig.volume*this.manager.volume)},calculateRate:function(){n.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.updateMute(),this.emit(r.MUTE,this,t))}},setMute:function(t){return this.mute=t,this},volume:{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.updateVolume(),this.emit(r.VOLUME,this,t))}},setVolume:function(t){return this.volume=t,this},rate:{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,r.RATE,t)||(this.calculateRate(),this.emit(r.RATE,this,t))}},setRate:function(t){return this.rate=t,this},detune:{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,r.DETUNE,t)||(this.calculateRate(),this.emit(r.DETUNE,this,t))}},setDetune:function(t){return this.detune=t,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit(r.SEEK,this,t))}},setSeek:function(t){return this.seek=t,this},loop:{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit(r.LOOP,this,t))}},setLoop:function(t){return this.loop=t,this}});t.exports=o},function(t,e,i){var n=i(122),s=i(0),r=i(9),o=i(364),a=i(1),h=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return n.prototype.remove.call(this,t)},removeByKey:function(t){return n.prototype.removeByKey.call(this,t)},pauseAll:a,resumeAll:a,stopAll:a,update:a,setRate:a,setDetune:a,setMute:a,setVolume:a,forEachActiveSound:function(t,e){n.prototype.forEachActiveSound.call(this,t,e)},destroy:function(){n.prototype.destroy.call(this)}});t.exports=h},function(t,e,i){var n=i(123),s=i(0),r=i(9),o=i(17),a=new s({Extends:r,initialize:function(t,e,i){void 0===i&&(i={}),r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!1},updateMarker:function(t){return!1},removeMarker:function(t){return null},play:function(t,e){return!1},pause:function(){return!1},resume:function(){return!1},stop:function(){return!1},destroy:function(){this.manager.remove(this),n.prototype.destroy.call(this)}});t.exports=a},function(t,e,i){var n=i(366),s=i(122),r=i(0),o=i(59),a=i(367),h=new r({Extends:s,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&("ontouchstart"in window||"onclick"in window),s.call(this,t),this.locked&&this.unlock()},createAudioContext:function(t){var e=t.config.audio;return e&&e.context?(e.context.resume(),e.context):new AudioContext},setAudioContext:function(t){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=t,this.masterMuteNode=t.createGain(),this.masterVolumeNode=t.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(t.destination),this.destination=this.masterMuteNode,this},add:function(t,e){var i=new a(this,t,e);return this.sounds.push(i),i},decodeAudio:function(t,e){var i;i=Array.isArray(t)?t:[{key:t,data:e}];for(var s=this.game.cache.audio,r=i.length,a=0;a>4,u[h++]=(15&i)<<4|s>>2,u[h++]=(3&s)<<6|63&r;return l}},function(t,e,i){var n=i(123),s=i(0),r=i(59),o=new s({Extends:n,initialize:function(t,e,i){void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),this.audioBuffer?(this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,n.call(this,t,e,i)):console.warn("Audio cache entry missing: "+e)},play:function(t,e){return!!n.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime-1;r--)n[s][r]=t[r][s]}return n}},function(t,e){function i(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function n(t,e){return te?1:0}var s=function(t,e,r,o,a){for(void 0===r&&(r=0),void 0===o&&(o=t.length-1),void 0===a&&(a=n);o>r;){if(o-r>600){var h=o-r+1,l=e-r+1,u=Math.log(h),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),f=Math.max(r,Math.floor(e-l*c/h+d)),p=Math.min(o,Math.floor(e+(h-l)*c/h+d));s(t,e,f,p,a)}var g=t[e],v=r,m=o;for(i(t,r,e),a(t[o],g)>0&&i(t,r,o);v0;)m--}0===a(t[r],g)?i(t,r,m):i(t,++m,o),m<=e&&(r=m+1),e<=m&&(o=m-1)}};t.exports=s},function(t,e,i){var n=i(6),s=i(112),r=function(t,e,i){for(var n=[],s=0;s0?s.delayedPlay(d,r,o):s.load(r)}return t}},function(t,e,i){var n=i(11);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=Math.min(t.x,e.x),r=Math.min(t.y,e.y),o=Math.max(t.right,e.right)-s,a=Math.max(t.bottom,e.bottom)-r;return i.setTo(s,r,o,a)}},function(t,e,i){var n=i(0),s=i(12),r=i(939),o=i(14),a=i(7),h=i(175),l=i(316),u=new n({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.ScrollFactor,s.Transform,s.Visible,r],initialize:function(t,e,i,n,s,r){o.call(this,t,"DOMElement"),this.parent=t.sys.game.domContainer,this.cache=t.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new l,this.rotate3dAngle="deg",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(e,i),"string"==typeof n?"#"===n[0]?this.setElement(n.substr(1),s,r):this.createElement(n,s,r):n&&this.setElement(n,s,r)},setSkew:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.skewX=t,this.skewY=e,this},setPerspective:function(t){return this.parent.style.perspective=t+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(t){this.parent.style.perspective=t+"px"}},addListener:function(t){if(this.node){t=t.split(" ");for(var e=0;e>>16,y=(65280&p)>>>8,x=255&p,c.strokeStyle="rgba("+m+","+y+","+x+","+d+")",c.lineWidth=v,T+=3;break;case n.FILL_STYLE:g=l[T+1],f=l[T+2],m=(16711680&g)>>>16,y=(65280&g)>>>8,x=255&g,c.fillStyle="rgba("+m+","+y+","+x+","+f+")",T+=2;break;case n.BEGIN_PATH:c.beginPath();break;case n.CLOSE_PATH:c.closePath();break;case n.FILL_PATH:h||c.fill();break;case n.STROKE_PATH:h||c.stroke();break;case n.FILL_RECT:h?c.rect(l[T+1],l[T+2],l[T+3],l[T+4]):c.fillRect(l[T+1],l[T+2],l[T+3],l[T+4]),T+=4;break;case n.FILL_TRIANGLE:c.beginPath(),c.moveTo(l[T+1],l[T+2]),c.lineTo(l[T+3],l[T+4]),c.lineTo(l[T+5],l[T+6]),c.closePath(),h||c.fill(),T+=6;break;case n.STROKE_TRIANGLE:c.beginPath(),c.moveTo(l[T+1],l[T+2]),c.lineTo(l[T+3],l[T+4]),c.lineTo(l[T+5],l[T+6]),c.closePath(),h||c.stroke(),T+=6;break;case n.LINE_TO:c.lineTo(l[T+1],l[T+2]),T+=2;break;case n.MOVE_TO:c.moveTo(l[T+1],l[T+2]),T+=2;break;case n.LINE_FX_TO:c.lineTo(l[T+1],l[T+2]),T+=5;break;case n.MOVE_FX_TO:c.moveTo(l[T+1],l[T+2]),T+=5;break;case n.SAVE:c.save();break;case n.RESTORE:c.restore();break;case n.TRANSLATE:c.translate(l[T+1],l[T+2]),T+=2;break;case n.SCALE:c.scale(l[T+1],l[T+2]),T+=2;break;case n.ROTATE:c.rotate(l[T+1]),T+=1;break;case n.GRADIENT_FILL_STYLE:T+=5;break;case n.GRADIENT_LINE_STYLE:T+=6;break;case n.SET_TEXTURE:T+=2}c.restore()}}},function(t,e,i){var n=i(0),s=i(2),r=new n({initialize:function(t,e,i,n,r){if("object"==typeof t){var o=t;t=s(o,"x",0),e=s(o,"y",0),i=s(o,"power",0),n=s(o,"epsilon",100),r=s(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i=this.x-t.x,n=this.y-t.y,s=i*i+n*n;if(0!==s){var r=Math.sqrt(s);s0},resetPosition:function(){this.x=0,this.y=0},fire:function(t,e){var i=this.emitter;this.frame=i.getFrame(),i.emitZone&&i.emitZone.getPoint(this),void 0===t?(i.follow&&(this.x+=i.follow.x+i.followOffset.x),this.x+=i.x.onEmit(this,"x")):this.x+=t,void 0===e?(i.follow&&(this.y+=i.follow.y+i.followOffset.y),this.y+=i.y.onEmit(this,"y")):this.y+=e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var n=i.speedX.onEmit(this,"speedX"),o=i.speedY?i.speedY.onEmit(this,"speedY"):n;if(i.radial){var a=s(i.angle.onEmit(this,"angle"));this.velocityX=Math.cos(a)*Math.abs(n),this.velocityY=Math.sin(a)*Math.abs(o)}else if(i.moveTo){var h=i.moveToX.onEmit(this,"moveToX"),l=i.moveToY?i.moveToY.onEmit(this,"moveToY"):h,u=Math.atan2(l-this.y,h-this.x),c=r(this.x,this.y,h,l)/(this.life/1e3);this.velocityX=Math.cos(u)*c,this.velocityY=Math.sin(u)*c}else this.velocityX=n,this.velocityY=o;i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY?i.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=s(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint")},computeVelocity:function(t,e,i,n){var s=this.velocityX,r=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,l=this.maxVelocityY;s+=t.gravityX*i,r+=t.gravityY*i,o&&(s+=o*i),a&&(r+=a*i),s>h?s=h:s<-h&&(s=-h),r>l?r=l:r<-l&&(r=-l),this.velocityX=s,this.velocityY=r;for(var u=0;ue.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(this.delayCurrent>0)return this.delayCurrent-=t,!1;var n=this.emitter,r=1-this.lifeCurrent/this.life;return this.lifeT=r,this.computeVelocity(n,t,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,n.bounds&&this.checkBounds(n),n.deathZone&&n.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=n.scaleX.onUpdate(this,"scaleX",r,this.scaleX),n.scaleY?this.scaleY=n.scaleY.onUpdate(this,"scaleY",r,this.scaleY):this.scaleY=this.scaleX,this.angle=n.rotate.onUpdate(this,"rotate",r,this.angle),this.rotation=s(this.angle),this.alpha=n.alpha.onUpdate(this,"alpha",r,this.alpha),this.tint=n.tint.onUpdate(this,"tint",r,this.tint),this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=o},function(t,e,i){var n=i(52),s=i(0),r=i(12),o=i(383),a=i(384),h=i(956),l=i(2),u=i(182),c=i(385),d=i(99),f=i(381),p=i(386),g=i(11),v=i(126),m=i(3),y=i(57),x=new s({Mixins:[r.BlendMode,r.Mask,r.ScrollFactor,r.Visible],initialize:function(t,e){this.manager=t,this.texture=t.texture,this.frames=[t.defaultFrame],this.defaultFrame=t.defaultFrame,this.configFastMap=["active","blendMode","collideBottom","collideLeft","collideRight","collideTop","deathCallback","deathCallbackScope","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxParticles","name","on","particleBringToTop","particleClass","radial","timeScale","trackVisible","visible"],this.configOpMap=["accelerationX","accelerationY","angle","alpha","bounce","delay","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],this.name="",this.particleClass=f,this.x=new h(e,"x",0,!0),this.y=new h(e,"y",0,!0),this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.accelerationX=new h(e,"accelerationX",0,!0),this.accelerationY=new h(e,"accelerationY",0,!0),this.maxVelocityX=new h(e,"maxVelocityX",1e4,!0),this.maxVelocityY=new h(e,"maxVelocityY",1e4,!0),this.speedX=new h(e,"speedX",0,!0),this.speedY=new h(e,"speedY",0,!0),this.moveTo=!1,this.moveToX=new h(e,"moveToX",0,!0),this.moveToY=new h(e,"moveToY",0,!0),this.bounce=new h(e,"bounce",0,!0),this.scaleX=new h(e,"scaleX",1),this.scaleY=new h(e,"scaleY",1),this.tint=new h(e,"tint",4294967295),this.alpha=new h(e,"alpha",1),this.lifespan=new h(e,"lifespan",1e3,!0),this.angle=new h(e,"angle",{min:0,max:360},!0),this.rotate=new h(e,"rotate",0),this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.quantity=new h(e,"quantity",1,!0),this.delay=new h(e,"delay",0,!0),this.frequency=0,this.on=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZone=null,this.deathZone=null,this.bounds=null,this.collideLeft=!0,this.collideRight=!0,this.collideTop=!0,this.collideBottom=!0,this.active=!0,this.visible=!0,this.blendMode=n.NORMAL,this.follow=null,this.followOffset=new m,this.trackVisible=!1,this.currentFrame=0,this.randomFrame=!0,this.frameQuantity=1,this.dead=[],this.alive=[],this._counter=0,this._frameCounter=0,e&&this.fromJSON(e)},fromJSON:function(t){if(!t)return this;var e=0,i="";for(e=0;e0&&this.getParticleCount()===this.maxParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,n=i.length,s=0;s0){var u=this.deathCallback,c=this.deathCallbackScope;for(o=h-1;o>=0;o--){var d=a[o];s.splice(d.index,1),r.push(d.particle),u&&u.call(c,d.particle),d.particle.resetPosition()}}this.on&&(0===this.frequency?this.emitParticle():this.frequency>0&&(this._counter-=e,this._counter<=0&&(this.emitParticle(),this._counter=this.frequency-Math.abs(this._counter))))},depthSortCallback:function(t,e){return t.y-e.y}});t.exports=x},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=this.source.contains(t.x,t.y);return e&&this.killOnEnter||!e&&!this.killOnEnter}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s){void 0===n&&(n=!1),void 0===s&&(s=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=s,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=n},function(t,e){t.exports=function(t,e){for(var i=0;i0&&(s=-h.PI2+s%h.PI2):s>h.PI2?s=h.PI2:s<0&&(s=h.PI2+s%h.PI2);for(var u,c=[a+Math.cos(n)*i,l+Math.sin(n)*i];e<1;)u=s*e+n,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),e+=t;return u=s+n,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),c.push(a+Math.cos(n)*i,l+Math.sin(n)*i),this.pathIndexes=o(c),this.pathData=c,this}});t.exports=u},function(t,e,i){var n=i(0),s=i(982),r=i(66),o=i(11),a=i(30),h=new n({Extends:a,Mixins:[s],initialize:function(t,e,i,n,s,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",n),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==s&&this.setFillStyle(s,r),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){var t=this._curveBounds,e=this._smoothness;this.geom.getBounds(t,e),this.setSize(t.width,t.height),this.updateDisplayOrigin();for(var i=[],n=this.geom.getPoints(e),s=0;sc+v)){var m=g.getPoint((u-c)/v);o.push(m);break}c+=v}return o}},function(t,e,i){var n=i(56),s=i(55);t.exports=function(t){for(var e=t.points,i=0,r=0;r0&&r.push(i([0,0],n[0])),e=0;e1&&r.push(i([0,0],n[n.length-1])),t.setTo(r)}},function(t,e,i){var n=i(0),s=i(11),r=i(30),o=i(1003),a=new n({Extends:r,Mixins:[o],initialize:function(t,e,i,n,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===o&&(o=128),r.call(this,t,"Rectangle",new s(0,0,n,o)),this.setPosition(e,i),this.setSize(n,o),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),e.getLineD(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=a},function(t,e,i){var n=i(1006),s=i(0),r=i(66),o=i(30),a=new s({Extends:o,Mixins:[n],initialize:function(t,e,i,n,s,r,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=5),void 0===s&&(s=32),void 0===r&&(r=64),o.call(this,t,"Star",null),this._points=n,this._innerRadius=s,this._outerRadius=r,this.setPosition(e,i),this.setSize(2*r,2*r),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},setPoints:function(t){return this._points=t,this.updateData()},setInnerRadius:function(t){return this._innerRadius=t,this.updateData()},setOuterRadius:function(t){return this._outerRadius=t,this.updateData()},points:{get:function(){return this._points},set:function(t){this._points=t,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(t){this._innerRadius=t,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(t){this._outerRadius=t,this.updateData()}},updateData:function(){var t=[],e=this._points,i=this._innerRadius,n=this._outerRadius,s=Math.PI/2*3,o=Math.PI/e,a=n,h=n;t.push(a,h+-n);for(var l=0;l=1)return i.x=r.x1,i.y=r.y1,i;var h=s(r),l=s(o),u=s(a),c=(h+l+u)*e,d=0;return ch+l?(d=(c-=h+l)/u,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/l,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},function(t,e,i){var n=i(56),s=i(4);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),l=n(o),u=n(a),c=n(h),d=l+u+c;e||(e=d/i);for(var f=0;fl+u?(g=(p-=l+u)/c,v.x=h.x1+(h.x2-h.x1)*g,v.y=h.y1+(h.y2-h.y1)*g):(g=(p-=l)/u,v.x=a.x1+(a.x2-a.x1)*g,v.y=a.y1+(a.y2-a.y1)*g),r.push(v)}return r}},function(t,e){t.exports=function(t,e,i){if(!t||"number"==typeof t)return!1;if(t.hasOwnProperty(e))return t[e]=i,!0;if(-1!==e.indexOf(".")){for(var n=e.split("."),s=t,r=t,o=0;o0?(h=this.lightPool.pop()).set(t,e,i,a[0],a[1],a[2],o):h=new s(t,e,i,a[0],a[1],a[2],o),this.lights.push(h),h},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&(this.lightPool.push(t),this.lights.splice(e,1)),this},shutdown:function(){for(;this.lights.length>0;)this.lightPool.push(this.lights.pop());this.ambientColor={r:.1,g:.1,b:.1},this.culledLights.length=0,this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=o},function(t,e,i){var n=i(46),s=i(17),r={Circle:i(1067),Ellipse:i(1077),Intersects:i(409),Line:i(1096),Point:i(1117),Polygon:i(1131),Rectangle:i(422),Triangle:i(1161)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={CircleToCircle:i(201),CircleToRectangle:i(202),GetCircleToCircle:i(1087),GetCircleToRectangle:i(1088),GetLineToCircle:i(203),GetLineToRectangle:i(205),GetRectangleIntersection:i(1089),GetRectangleToRectangle:i(1090),GetRectangleToTriangle:i(1091),GetTriangleToCircle:i(1092),GetTriangleToLine:i(414),GetTriangleToTriangle:i(1093),LineToCircle:i(204),LineToLine:i(84),LineToRectangle:i(410),PointToLine:i(418),PointToLineSegment:i(1094),RectangleToRectangle:i(129),RectangleToTriangle:i(411),RectangleToValues:i(1095),TriangleToCircle:i(413),TriangleToLine:i(415),TriangleToTriangle:i(416)}},function(t,e){t.exports=function(t,e){var i=t.x1,n=t.y1,s=t.x2,r=t.y2,o=e.x,a=e.y,h=e.right,l=e.bottom,u=0;if(i>=o&&i<=h&&n>=a&&n<=l||s>=o&&s<=h&&r>=a&&r<=l)return!0;if(i=o){if((u=n+(r-n)*(o-i)/(s-i))>a&&u<=l)return!0}else if(i>h&&s<=h&&(u=n+(r-n)*(h-i)/(s-i))>=a&&u<=l)return!0;if(n=a){if((u=i+(s-i)*(a-n)/(r-n))>=o&&u<=h)return!0}else if(n>l&&r<=l&&(u=i+(s-i)*(l-n)/(r-n))>=o&&u<=h)return!0;return!1}},function(t,e,i){var n=i(84),s=i(47),r=i(206),o=i(412);t.exports=function(t,e){if(e.left>t.right||e.rightt.bottom||e.bottom0}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},function(t,e,i){var n=i(204),s=i(83);t.exports=function(t,e){return!(t.left>e.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottom0||(c=s(e),(d=n(t,c,!0)).length>0)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},function(t,e){t.exports=function(t,e,i){void 0===i&&(i=1);var n=e.x1,s=e.y1,r=e.x2,o=e.y2,a=t.x,h=t.y,l=(r-n)*(r-n)+(o-s)*(o-s);if(0===l)return!1;var u=((a-n)*(r-n)+(h-s)*(o-s))/l;if(u<0)return Math.sqrt((n-a)*(n-a)+(s-h)*(s-h))<=i;if(u>=0&&u<=1){var c=((s-h)*(r-n)-(n-a)*(o-s))/l;return Math.abs(c)*Math.sqrt(l)<=i}return Math.sqrt((r-a)*(r-a)+(o-h)*(o-h))<=i}},function(t,e,i){var n=i(13),s=i(57),r=i(85);t.exports=function(t){var e=r(t)-n.TAU;return s(e,-Math.PI,Math.PI)}},function(t,e){t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},function(t,e){t.exports=function(t){return t.x*t.x+t.y*t.y}},function(t,e,i){var n=i(11);n.Area=i(1136),n.Ceil=i(1137),n.CeilAll=i(1138),n.CenterOn=i(163),n.Clone=i(1139),n.Contains=i(47),n.ContainsPoint=i(1140),n.ContainsRect=i(423),n.CopyFrom=i(1141),n.Decompose=i(412),n.Equals=i(1142),n.FitInside=i(1143),n.FitOutside=i(1144),n.Floor=i(1145),n.FloorAll=i(1146),n.FromPoints=i(173),n.GetAspectRatio=i(208),n.GetCenter=i(1147),n.GetPoint=i(147),n.GetPoints=i(257),n.GetSize=i(1148),n.Inflate=i(1149),n.Intersection=i(1150),n.MarchingAnts=i(268),n.MergePoints=i(1151),n.MergeRect=i(1152),n.MergeXY=i(1153),n.Offset=i(1154),n.OffsetPoint=i(1155),n.Overlaps=i(1156),n.Perimeter=i(110),n.PerimeterPoint=i(1157),n.Random=i(150),n.RandomOutside=i(1158),n.SameDimensions=i(1159),n.Scale=i(1160),n.Union=i(372),t.exports=n},function(t,e){t.exports=function(t,e){return!(e.width*e.height>t.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(s.BUTTON_DOWN,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(s.BUTTON_UP,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},function(t,e,i){var n=i(428),s=i(429),r=i(0),o=i(9),a=i(3),h=new r({Extends:o,initialize:function(t,e){o.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],r=0;r=2&&(this.leftStick.set(r[0].getValue(),r[1].getValue()),s>=4&&this.rightStick.set(r[2].getValue(),r[3].getValue()))},destroy:function(){var t;for(this.removeAllListeners(),this.manager=null,this.pad=null,t=0;t=r;for(i=0;i=r;)this._elapsed-=r,this.step(s)}},step:function(t){var e,i,n=this.bodies.entries,s=n.length;for(e=0;e0){var l=this.tree,u=this.staticTree;for(n=(i=h.entries).length,t=0;t-1&&p>g&&(t.velocity.normalize().scale(g),p=g),t.speed=p},separate:function(t,e,i,n,s){if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,s);if(t.isCircle!==e.isCircle){var r=t.isCircle?e:t,o=t.isCircle?t:e,a={x:r.x,y:r.y,right:r.right,bottom:r.bottom},h=o.center;if((h.ya.bottom)&&(h.xa.right))return this.separateCircle(t,e,s)}var l=!1,c=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)r.right&&(s=h(o.x,o.y,r.right,r.y)-o.radius):o.y>r.bottom&&(o.xr.right&&(s=h(o.x,o.y,r.right,r.bottom)-o.radius)),s*=-1}else s=t.halfWidth+e.halfWidth-h(t.center.x,t.center.y,e.center.x,e.center.y);if(i||0===s||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==s&&(t.onOverlap||e.onOverlap)&&this.emit(u.OVERLAP,t.gameObject,e.gameObject,t,e),0!==s;var a=t.center.x-e.center.x,l=t.center.y-e.center.y,c=Math.sqrt(Math.pow(a,2)+Math.pow(l,2)),d=(e.center.x-t.center.x)/c||0,f=(e.center.y-t.center.y)/c||0,v=2*(t.velocity.x*d+t.velocity.y*f-e.velocity.x*d-e.velocity.y*f)/(t.mass+e.mass);t.immovable||(t.velocity.x=t.velocity.x-v*t.mass*d,t.velocity.y=t.velocity.y-v*t.mass*f),e.immovable||(e.velocity.x=e.velocity.x+v*e.mass*d,e.velocity.y=e.velocity.y+v*e.mass*f);var m=e.velocity.x-t.velocity.x,y=e.velocity.y-t.velocity.y,x=Math.atan2(y,m),T=this._frameTime;return t.immovable||e.immovable||(s/=2),t.immovable||(t.x+=t.velocity.x*T-s*Math.cos(x),t.y+=t.velocity.y*T-s*Math.sin(x)),e.immovable||(e.x+=e.velocity.x*T+s*Math.cos(x),e.y+=e.velocity.y*T+s*Math.sin(x)),t.velocity.x*=t.bounce.x,t.velocity.y*=t.bounce.y,e.velocity.x*=e.bounce.x,e.velocity.y*=e.bounce.y,(t.onCollide||e.onCollide)&&this.emit(u.COLLIDE,t.gameObject,e.gameObject,t,e),!0},intersects:function(t,e){return t!==e&&(t.isCircle||e.isCircle?t.isCircle?e.isCircle?h(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):this.circleBodyIntersects(e,t):!(t.right<=e.position.x||t.bottom<=e.position.y||t.position.x>=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=s(t.center.x,e.left,e.right),n=s(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o,a;t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var h=Array.isArray(t),l=Array.isArray(e);if(this._total=0,h||l)if(!h&&l)for(o=0;o0},collideHandler:function(t,e,i,n,s,r){if(void 0===e&&t.isParent)return this.collideGroupVsGroup(t,t,i,n,s,r);if(!t||!e)return!1;if(t.body){if(e.body)return this.collideSpriteVsSprite(t,e,i,n,s,r);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,n,s,r)}else if(t.isParent){if(e.body)return this.collideSpriteVsGroup(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,n,s,r)}else if(t.isTilemap){if(e.body)return this.collideSpriteVsTilemapLayer(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,n,s,r)}},collideSpriteVsSprite:function(t,e,i,n,s,r){return!(!t.body||!e.body)&&(this.separate(t.body,e.body,n,s,r)&&(i&&i.call(s,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,n,s,r){var o,h,l,u=t.body;if(0!==e.length&&u&&u.enable)if(this.useTree){var c=this.treeMinMax;c.minX=u.left,c.minY=u.top,c.maxX=u.right,c.maxY=u.bottom;var d=e.physicsType===a.DYNAMIC_BODY?this.tree.search(c):this.staticTree.search(c);for(h=d.length,o=0;oc.baseTileWidth){var d=(c.tileWidth-c.baseTileWidth)*e.scaleX;a-=d,l+=d}c.tileHeight>c.baseTileHeight&&(u+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var f=e.getTilesWithinWorldXY(a,h,l,u);return 0!==f.length&&this.collideSpriteVsTilesHandler(t,f,i,n,s,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,n,s,r,o){for(var a,h,l=t.body,c={left:0,right:0,top:0,bottom:0},d=!1,f=0;f0&&t>i&&(t=i)),0!==n&&0!==e&&(e<0&&e<-n?e=-n:e>0&&e>n&&(e=n)),this.gameObject.x+=t,this.gameObject.y+=e}t<0?this.facing=s.FACING_LEFT:t>0&&(this.facing=s.FACING_RIGHT),e<0?this.facing=s.FACING_UP:e>0&&(this.facing=s.FACING_DOWN),this.allowRotation&&(this.gameObject.angle+=this.deltaZ())},setBoundsRectangle:function(t){return this.customBoundsRectangle=t||this.world.bounds,this},checkWorldBounds:function(){var t=this.position,e=this.customBoundsRectangle,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,s=this.worldBounce?-this.worldBounce.y:-this.bounce.y,r=!1;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,this.blocked.right=!0,r=!0),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,this.blocked.down=!0,r=!0),r&&(this.blocked.none=!1),r},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this.updateCenter(),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;if(!t&&n.frame&&(t=n.frame.realWidth),!e&&n.frame&&(e=n.frame.realHeight),this.sourceWidth=t,this.sourceHeight=e,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),i&&n.getCenter){var s=n.displayWidth/2,r=n.displayHeight/2;this.offset.set(s-this.halfWidth,r-this.halfHeight)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i.setPosition(t,e),i.getTopLeft?i.getTopLeft(this.position):this.position.set(t,e),this.prev.copy(this.position),this.prevFrame.copy(this.position),this.rotation=i.angle,this.preRotation=i.angle,this.updateBounds(),this.updateCenter()},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?this.radius>0&&t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom&&(this.center.x-t)*(this.center.x-t)+(this.center.y-e)*(this.center.y-e)<=this.radius*this.radius:h(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.width/2):(this.checkCollision.up&&t.lineBetween(e.x,e.y,e.x+this.width,e.y),this.checkCollision.right&&t.lineBetween(e.x+this.width,e.y,e.x+this.width,e.y+this.height),this.checkCollision.down&&t.lineBetween(e.x,e.y+this.height,e.x+this.width,e.y+this.height),this.checkCollision.left&&t.lineBetween(e.x,e.y,e.x,e.y+this.height))),this.debugShowVelocity&&(t.lineStyle(t.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,n,i+this.velocity.x/2,n+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t,e,i){void 0===t&&(t=!0),this.collideWorldBounds=t;var n=void 0!==e,s=void 0!==i;return(n||s)&&(this.worldBounce||(this.worldBounce=new l),n&&(this.worldBounce.x=e),s&&(this.worldBounce.y=i)),this},setVelocity:function(t,e){return this.velocity.set(t,e),t=this.velocity.x,e=this.velocity.y,this.speed=Math.sqrt(t*t+e*e),this},setVelocityX:function(t){this.velocity.x=t;var e=t,i=this.velocity.y;return this.speed=Math.sqrt(e*e+i*i),this},setVelocityY:function(t){this.velocity.y=t;var e=this.velocity.x,i=t;return this.speed=Math.sqrt(e*e+i*i),this},setMaxVelocity:function(t,e){return this.maxVelocity.set(t,e),this},setMaxSpeed:function(t){return this.maxSpeed=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setAllowDrag:function(t){return void 0===t&&(t=!0),this.allowDrag=t,this},setAllowGravity:function(t){return void 0===t&&(t=!0),this.allowGravity=t,this},setAllowRotation:function(t){return void 0===t&&(t=!0),this.allowRotation=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return void 0===t&&(t=!0),this.immovable=t,this},setEnable:function(t){return void 0===t&&(t=!0),this.enable=t,this},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=u},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=n,this.collideCallback=s,this.processCallback=r,this.callbackContext=o},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=n},function(t,e,i){var n=i(50);t.exports=function(t,e,i,s){var r=0,o=t.deltaAbsX()+e.deltaAbsX()+s;return 0===t._dx&&0===e._dx?(t.embedded=!0,e.embedded=!0):t._dx>e._dx?(r=t.right-e.x)>o&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?r=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.right=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.left=!0)):t._dxo&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?r=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.left=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.right=!0))),t.overlapX=r,e.overlapX=r,r}},function(t,e,i){var n=i(50);t.exports=function(t,e,i,s){var r=0,o=t.deltaAbsY()+e.deltaAbsY()+s;return 0===t._dy&&0===e._dy?(t.embedded=!0,e.embedded=!0):t._dy>e._dy?(r=t.bottom-e.y)>o&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?r=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.down=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.up=!0)):t._dyo&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?r=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.up=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.down=!0))),t.overlapY=r,e.overlapY=r,r}},function(t,e,i){var n=i(369);function s(t){if(!(this instanceof s))return new s(t,[".left",".top",".right",".bottom"]);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}function r(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,i,s,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=s||(o=e+Math.ceil((i-e)/s/2)*s,n(t,o,e,i,r),a.push(e,o,o,i))}s.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!p(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;s=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),a=g(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,s,r,o,h,l,u,d,f,p,g,v,m,y;for(l=u=1/0,n=e;n<=i-e;n++)s=a(t,0,n,this.toBBox),r=a(t,n,i,this.toBBox),f=s,p=r,void 0,void 0,void 0,void 0,g=Math.max(f.minX,p.minX),v=Math.max(f.minY,p.minY),m=Math.min(f.maxX,p.maxX),y=Math.min(f.maxY,p.maxY),o=Math.max(0,m-g)*Math.max(0,y-v),h=c(s)+c(r),o=e;s--)r=t.children[s],h(u,t.leaf?o(r):r),c+=d(u);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)h(e[n],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},compareMinX:function(t,e){return t.left-e.left},compareMinY:function(t,e){return t.top-e.top},toBBox:function(t){return{minX:t.left,minY:t.top,maxX:t.right,maxY:t.bottom}}},t.exports=s},function(t,e){t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},function(t,e,i){var n=i(54),s=i(0),r=i(50),o=i(47),a=i(3),h=new s({initialize:function(t,e){var i=e.width?e.width:64,n=e.height?e.height:64;this.world=t,this.gameObject=e,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(e.x-e.displayOriginX,e.y-e.displayOriginY),this.width=i,this.height=n,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new a(e.x+this.halfWidth,e.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY,this._dx=0,this._dy=0},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(t,e){return void 0===e&&(e=t),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(t,e),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;if(!t&&n.frame&&(t=n.frame.realWidth),!e&&n.frame&&(e=n.frame.realHeight),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),i&&n.getCenter){var s=n.displayWidth/2,r=n.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(s-this.halfWidth,r-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.setPosition(t,e),i.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):o(this,t,e)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?t.strokeCircle(i,n,this.width/2):t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=h},,,,function(t,e,i){var n=new(i(0))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=n},function(t,e,i){var n=i(24);t.exports=function(t,e,i,s,r,o,a){for(var h=n(i,s,r,o,null,a),l=0;l-1}return!1}},function(t,e,i){var n=i(74),s=i(103),r=i(216);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!1),void 0===o&&(o=!0),!s(t,e,a))return null;var h=a.data[e][t];return h?(a.data[e][t]=i?null:new n(a,-1,t,e,h.width,h.height),o&&h&&h.collides&&r(t,e,a),h):null}},function(t,e,i){var n=i(31),s=i(219),r=i(459),o=i(460),a=i(471);t.exports=function(t,e,i,h,l,u){var c;switch(e){case n.ARRAY_2D:c=s(t,i,h,l,u);break;case n.CSV:c=r(t,i,h,l,u);break;case n.TILED_JSON:c=o(t,i,u);break;case n.WELTMEISTER:c=a(t,i,u);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},function(t,e,i){var n=i(31),s=i(219);t.exports=function(t,e,i,r,o){var a=e.trim().split("\n").map(function(t){return t.split(",")}),h=s(t,a,i,r,o);return h.format=n.CSV,h}},function(t,e,i){var n=i(31),s=i(105),r=i(461),o=i(463),a=i(464),h=i(467),l=i(469),u=i(470);t.exports=function(t,e,i){if("orthogonal"!==e.orientation)return console.warn("Only orthogonal map types are supported in this version of Phaser"),null;var c=new s({width:e.width,height:e.height,name:t,tileWidth:e.tilewidth,tileHeight:e.tileheight,orientation:e.orientation,format:n.TILED_JSON,version:e.version,properties:e.properties,renderOrder:e.renderorder,infinite:e.infinite});c.layers=r(e,i),c.images=o(e);var d=a(e);return c.tilesets=d.tilesets,c.imageCollections=d.imageCollections,c.objects=h(e),c.tiles=l(c),u(c),c}},function(t,e,i){var n=i(462),s=i(2),r=i(104),o=i(220),a=i(74),h=i(221);t.exports=function(t,e){for(var i=s(t,"infinite",!1),l=[],u=[],c=h(t);c.i0;)if(c.i>=c.layers.length){if(u.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}c=u.pop()}else{var d=c.layers[c.i];if(c.i++,"tilelayer"===d.type)if(d.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+d.name+"'");else{if(d.encoding&&"base64"===d.encoding){if(d.chunks)for(var f=0;f0?((v=new a(p,g.gid,P,R,t.tilewidth,t.tileheight)).rotation=g.rotation,v.flipX=g.flipped,y[R][P]=v):(m=e?null:new a(p,-1,P,R,t.tilewidth,t.tileheight),y[R][P]=m),++x===b.width&&(C++,x=0)}}else{p=new r({name:c.name+d.name,x:c.x+s(d,"offsetx",0)+d.x,y:c.y+s(d,"offsety",0)+d.y,width:d.width,height:d.height,tileWidth:t.tilewidth,tileHeight:t.tileheight,alpha:c.opacity*d.opacity,visible:c.visible&&d.visible,properties:s(d,"properties",{})});for(var L=[],D=0,F=d.data.length;D0?((v=new a(p,g.gid,x,y.length,t.tilewidth,t.tileheight)).rotation=g.rotation,v.flipX=g.flipped,L.push(v)):(m=e?null:new a(p,-1,x,y.length,t.tilewidth,t.tileheight),L.push(m)),++x===d.width&&(y.push(L),x=0,L=[])}p.data=y,l.push(p)}else if("group"===d.type){var k=h(t,d,c);u.push(c),c=k}}return l}},function(t,e){t.exports=function(t){for(var e=window.atob(t),i=e.length,n=new Array(i/4),s=0;s>>0;return n}},function(t,e,i){var n=i(2),s=i(221);t.exports=function(t){for(var e=[],i=[],r=s(t);r.i0;)if(r.i>=r.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=i.pop()}else{var o=r.layers[r.i];if(r.i++,"imagelayer"===o.type){var a=n(o,"offsetx",0)+n(o,"startx",0),h=n(o,"offsety",0)+n(o,"starty",0);e.push({name:r.name+o.name,image:o.image,x:r.x+a+o.x,y:r.y+h+o.y,alpha:r.opacity*o.opacity,visible:r.visible&&o.visible,properties:n(o,"properties",{})})}else if("group"===o.type){var l=s(t,o,r);i.push(r),r=l}}return e}},function(t,e,i){var n=i(140),s=i(465),r=i(222);t.exports=function(t){for(var e,i=[],o=[],a=null,h=0;h1){if(Array.isArray(l.tiles)){for(var c={},d={},f=0;f=this.firstgid&&t0;)if(a.i>=a.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}a=i.pop()}else{var h=a.layers[a.i];if(a.i++,h.opacity*=a.opacity,h.visible=a.visible&&h.visible,"objectgroup"===h.type){h.name=a.name+h.name;for(var l=a.x+n(h,"startx",0)+n(h,"offsetx",0),u=a.y+n(h,"starty",0)+n(h,"offsety",0),c=[],d=0;da&&(a=e.layer[l].width),e.layer[l].height>h&&(h=e.layer[l].height);var u=new s({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:n.WELTMEISTER});return u.layers=r(e,i),u.tilesets=o(e),u}},function(t,e,i){var n=i(104),s=i(74);t.exports=function(t,e){for(var i=[],r=0;r-1?new s(a,f,c,u,o.tilesize,o.tilesize):e?null:new s(a,-1,c,u,o.tilesize,o.tilesize),h.push(d)}l.push(h),h=[]}a.data=l,i.push(a)}return i}},function(t,e,i){var n=i(140);t.exports=function(t){for(var e=[],i=[],s=0;s-1&&(this.renderOrder=t),this},addTilesetImage:function(t,e,i,n,s,r,o){if(void 0===t)return null;if(void 0!==e&&null!==e||(e=t),!this.scene.sys.textures.exists(e))return console.warn("Invalid Tileset Image: "+e),null;var h=this.scene.sys.textures.get(e),l=this.getTilesetIndex(t);if(null===l&&this.format===a.TILED_JSON)return console.warn("No data found for Tileset: "+t),null;var u=this.tilesets[l];return u?(u.setTileSize(i,n),u.setSpacing(s,r),u.setImage(h),u):(void 0===i&&(i=this.tileWidth),void 0===n&&(n=this.tileHeight),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o=0),(u=new p(t,o,i,n,s,r)).setImage(h),this.tilesets.push(u),u)},convertLayerToStatic:function(t){if(null===(t=this.getLayer(t)))return null;var e=t.tilemapLayer;if(!(e&&e instanceof r))return null;var i=new c(e.scene,e.tilemap,e.layerIndex,e.tileset,e.x,e.y);return this.scene.sys.displayList.add(i),e.destroy(),i},copy:function(t,e,i,n,s,r,o,a){return a=this.getLayer(a),this._isStaticCall(a,"copy")?this:null!==a?(f.Copy(t,e,i,n,s,r,o,a),this):null},createBlankDynamicLayer:function(t,e,i,n,s,o,a,l){if(void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.width),void 0===o&&(o=this.height),void 0===a&&(a=this.tileWidth),void 0===l&&(l=this.tileHeight),null!==this.getLayerIndex(t))return console.warn("Invalid Tilemap Layer ID: "+t),null;for(var u,c=new h({name:t,tileWidth:a,tileHeight:l,width:s,height:o}),f=0;f-1&&this.putTileAt(e,r.x,r.y,i,r.tilemapLayer)}return n},removeTileAt:function(t,e,i,n,s){return s=this.getLayer(s),this._isStaticCall(s,"removeTileAt")?null:null===s?null:f.RemoveTileAt(t,e,i,n,s)},removeTileAtWorldXY:function(t,e,i,n,s,r){return r=this.getLayer(r),this._isStaticCall(r,"removeTileAtWorldXY")?null:null===r?null:f.RemoveTileAtWorldXY(t,e,i,n,s,r)},renderDebug:function(t,e,i){return null===(i=this.getLayer(i))?null:(f.RenderDebug(t,e,i),this)},renderDebugFull:function(t,e){for(var i=this.layers,n=0;n=0&&t<4&&(this._renderOrder=t),this},calculateFacesAt:function(t,e){return a.CalculateFacesAt(t,e,this.layer),this},calculateFacesWithin:function(t,e,i,n){return a.CalculateFacesWithin(t,e,i,n,this.layer),this},createFromTiles:function(t,e,i,n,s){return a.CreateFromTiles(t,e,i,n,s,this.layer)},cull:function(t){return this.cullCallback(this.layer,t,this.culledTiles,this._renderOrder)},copy:function(t,e,i,n,s,r,o){return a.Copy(t,e,i,n,s,r,o,this.layer),this},destroy:function(t){void 0===t&&(t=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),t&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],o.prototype.destroy.call(this))},fill:function(t,e,i,n,s,r){return a.Fill(t,e,i,n,s,r,this.layer),this},filterTiles:function(t,e,i,n,s,r,o){return a.FilterTiles(t,e,i,n,s,r,o,this.layer)},findByIndex:function(t,e,i){return a.FindByIndex(t,e,i,this.layer)},findTile:function(t,e,i,n,s,r,o){return a.FindTile(t,e,i,n,s,r,o,this.layer)},forEachTile:function(t,e,i,n,s,r,o){return a.ForEachTile(t,e,i,n,s,r,o,this.layer),this},getTileAt:function(t,e,i){return a.GetTileAt(t,e,i,this.layer)},getTileAtWorldXY:function(t,e,i,n){return a.GetTileAtWorldXY(t,e,i,n,this.layer)},getTilesWithin:function(t,e,i,n,s){return a.GetTilesWithin(t,e,i,n,s,this.layer)},getTilesWithinShape:function(t,e,i){return a.GetTilesWithinShape(t,e,i,this.layer)},getTilesWithinWorldXY:function(t,e,i,n,s,r){return a.GetTilesWithinWorldXY(t,e,i,n,s,r,this.layer)},hasTileAt:function(t,e){return a.HasTileAt(t,e,this.layer)},hasTileAtWorldXY:function(t,e,i){return a.HasTileAtWorldXY(t,e,i,this.layer)},putTileAt:function(t,e,i,n){return a.PutTileAt(t,e,i,n,this.layer)},putTileAtWorldXY:function(t,e,i,n,s){return a.PutTileAtWorldXY(t,e,i,n,s,this.layer)},putTilesAt:function(t,e,i,n){return a.PutTilesAt(t,e,i,n,this.layer),this},randomize:function(t,e,i,n,s){return a.Randomize(t,e,i,n,s,this.layer),this},removeTileAt:function(t,e,i,n){return a.RemoveTileAt(t,e,i,n,this.layer)},removeTileAtWorldXY:function(t,e,i,n,s){return a.RemoveTileAtWorldXY(t,e,i,n,s,this.layer)},renderDebug:function(t,e){return a.RenderDebug(t,e,this.layer),this},replaceByIndex:function(t,e,i,n,s,r){return a.ReplaceByIndex(t,e,i,n,s,r,this.layer),this},setSkipCull:function(t){return void 0===t&&(t=!0),this.skipCull=t,this},setCullPadding:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=1),this.cullPaddingX=t,this.cullPaddingY=e,this},setCollision:function(t,e,i,n){return a.SetCollision(t,e,i,this.layer,n),this},setCollisionBetween:function(t,e,i,n){return a.SetCollisionBetween(t,e,i,n,this.layer),this},setCollisionByProperty:function(t,e,i){return a.SetCollisionByProperty(t,e,i,this.layer),this},setCollisionByExclusion:function(t,e,i){return a.SetCollisionByExclusion(t,e,i,this.layer),this},setCollisionFromCollisionGroup:function(t,e){return a.SetCollisionFromCollisionGroup(t,e,this.layer),this},setTileIndexCallback:function(t,e,i){return a.SetTileIndexCallback(t,e,i,this.layer),this},setTileLocationCallback:function(t,e,i,n,s,r){return a.SetTileLocationCallback(t,e,i,n,s,r,this.layer),this},shuffle:function(t,e,i,n){return a.Shuffle(t,e,i,n,this.layer),this},swapByIndex:function(t,e,i,n,s,r){return a.SwapByIndex(t,e,i,n,s,r,this.layer),this},tileToWorldX:function(t,e){return a.TileToWorldX(t,e,this.layer)},tileToWorldY:function(t,e){return a.TileToWorldY(t,e,this.layer)},tileToWorldXY:function(t,e,i,n){return a.TileToWorldXY(t,e,i,n,this.layer)},weightedRandomize:function(t,e,i,n,s){return a.WeightedRandomize(t,e,i,n,s,this.layer),this},worldToTileX:function(t,e,i){return a.WorldToTileX(t,e,i,this.layer)},worldToTileY:function(t,e,i){return a.WorldToTileY(t,e,i,this.layer)},worldToTileXY:function(t,e,i,n,s){return a.WorldToTileXY(t,e,i,n,s,this.layer)}});t.exports=h},function(t,e,i){var n=i(0),s=i(12),r=i(18),o=i(14),a=i(1321),h=i(136),l=i(32),u=i(10),c=new n({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.ComputedSize,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.Transform,s.Visible,s.ScrollFactor,a],initialize:function(t,e,i,n,s,a){o.call(this,t,"StaticTilemapLayer"),this.isTilemap=!0,this.tilemap=e,this.layerIndex=i,this.layer=e.layers[i],this.layer.tilemapLayer=this,this.tileset=[],this.culledTiles=[],this.skipCull=!1,this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=h.CullTiles,this.renderer=t.sys.game.renderer,this.vertexBuffer=[],this.bufferData=[],this.vertexViewF32=[],this.vertexViewU32=[],this.dirty=[],this.vertexCount=[],this._renderOrder=0,this._tempMatrix=new l,this.gidMap=[],this.setTilesets(n),this.setAlpha(this.layer.alpha),this.setPosition(s,a),this.setOrigin(),this.setSize(e.tileWidth*this.layer.width,e.tileHeight*this.layer.height),this.updateVBOData(),this.initPipeline("TextureTintPipeline"),t.sys.game.events.on(r.CONTEXT_RESTORED,function(){this.updateVBOData()},this)},setTilesets:function(t){var e=[],i=[],n=this.tilemap;Array.isArray(t)||(t=[t]);for(var s=0;sv||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(1===p)for(o=0;o=0;a--)!(r=f[o][a])||r.indexv||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(2===p)for(o=u-1;o>=0;o--)for(a=0;av||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(3===p)for(o=u-1;o>=0;o--)for(a=l-1;a>=0;a--)!(r=f[o][a])||r.indexv||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));this.dirty[e]=!1,null===m?(m=i.createVertexBuffer(y,n.STATIC_DRAW),this.vertexBuffer[e]=m):(i.setVertexBuffer(m),n.bufferSubData(n.ARRAY_BUFFER,0,y))}return this},batchTile:function(t,e,i,n,s,r,o){var a=i.getTileTextureCoordinates(e.index);if(!a)return t;var h=i.tileWidth,l=i.tileHeight,c=h/2,d=l/2,f=a.x/n,p=a.y/s,g=(a.x+h)/n,v=(a.y+l)/s,m=this._tempMatrix,y=-c,x=-d;e.flipX&&(h*=-1,y+=i.tileWidth),e.flipY&&(l*=-1,x+=i.tileHeight);var T=y+h,w=x+l;m.applyITRS(c+e.pixelX,d+e.pixelY,e.rotation,1,1);var E=u.getTintAppendFloatAlpha(16777215,r.alpha*this.alpha*e.alpha),_=m.getX(y,x),b=m.getY(y,x),A=m.getX(y,w),S=m.getY(y,w),C=m.getX(T,w),M=m.getY(T,w),O=m.getX(T,x),P=m.getY(T,x);r.roundPixels&&(_=Math.round(_),b=Math.round(b),A=Math.round(A),S=Math.round(S),C=Math.round(C),M=Math.round(M),O=Math.round(O),P=Math.round(P));var R=this.vertexViewF32[o],L=this.vertexViewU32[o];return R[++t]=_,R[++t]=b,R[++t]=f,R[++t]=p,R[++t]=0,L[++t]=E,R[++t]=A,R[++t]=S,R[++t]=f,R[++t]=v,R[++t]=0,L[++t]=E,R[++t]=C,R[++t]=M,R[++t]=g,R[++t]=v,R[++t]=0,L[++t]=E,R[++t]=_,R[++t]=b,R[++t]=f,R[++t]=p,R[++t]=0,L[++t]=E,R[++t]=C,R[++t]=M,R[++t]=g,R[++t]=v,R[++t]=0,L[++t]=E,R[++t]=O,R[++t]=P,R[++t]=g,R[++t]=p,R[++t]=0,L[++t]=E,this.vertexCount[o]+=6,t},setRenderOrder:function(t){if("string"==typeof t&&(t=["right-down","left-down","right-up","left-up"].indexOf(t)),t>=0&&t<4){this._renderOrder=t;for(var e=0;e0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=r},function(t,e,i){var n=i(1330);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substr(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===n.indexOf(e)&&"_"!==e.substr(0,1)&&i.push({key:e,value:t[e]});return i}},function(t,e,i){var n=i(6);t.exports=function(t){var e=n(t,"tweens",null);return null===e?[]:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},function(t,e,i){var n=i(226),s=i(15),r=i(88),o=i(82),a=i(141),h=i(6),l=i(225),u=i(227),c=i(229);t.exports=function(t,e,i){void 0===i&&(i=n);var d=h(e,"from",0),f=h(e,"to",1),p=[{value:d}],g=a(e,"delay",i.delay),v=a(e,"duration",i.duration),m=h(e,"easeParams",i.easeParams),y=o(h(e,"ease",i.ease),m),x=a(e,"hold",i.hold),T=a(e,"repeat",i.repeat),w=a(e,"repeatDelay",i.repeatDelay),E=r(e,"yoyo",i.yoyo),_=[],b=l("value",f),A=c(p[0],0,"value",b.getEnd,b.getStart,b.getActive,y,g,v,E,x,T,w,!1,!1);A.start=d,A.current=d,A.to=f,_.push(A);var S=new u(t,_,p);S.offset=s(e,"offset",null),S.completeDelay=s(e,"completeDelay",0),S.loop=Math.round(s(e,"loop",0)),S.loopDelay=Math.round(s(e,"loopDelay",0)),S.paused=r(e,"paused",!1),S.useFrames=r(e,"useFrames",!1);for(var C=h(e,"callbackScope",S),M=[S,null],O=u.TYPES,P=0;P0?Math.floor(v/p.length):h(e,"duration",g.duration),g.delay=h(e,"delay",g.delay),g.easeParams=c(e,"easeParams",g.easeParams),g.ease=a(c(e,"ease",g.ease),g.easeParams),g.hold=h(e,"hold",g.hold),g.repeat=h(e,"repeat",g.repeat),g.repeatDelay=h(e,"repeatDelay",g.repeatDelay),g.yoyo=o(e,"yoyo",g.yoyo),g.flipX=o(e,"flipX",g.flipX),g.flipY=o(e,"flipY",g.flipY);for(var m=0;m0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){return this.calcDuration(),this.progress=0,this.totalProgress=0,!this.paused||(this.state=a.PAUSED,!1)},resetTweens:function(t){for(var e=0;e0?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=a.LOOP_DELAY):(this.state=a.ACTIVE,this.dispatchTimelineEvent(r.TIMELINE_LOOP,this.callbacks.onLoop))):this.completeDelay>0?(this.state=a.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=a.PENDING_REMOVE,this.dispatchTimelineEvent(r.TIMELINE_COMPLETE,this.callbacks.onComplete))},update:function(t,e){if(this.state!==a.PAUSED){switch(this.useFrames&&(e=1*this.manager.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case a.ACTIVE:for(var i=this.totalData,n=0;n=this.nextTick&&this.currentAnim.setFrame(this)}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.isCropped&&e.frame.updateCropUVs(e._crop,e.flipX,e.flipY),e.setSizeToFrame(),t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin(),e},updateFrame:function(t){var e=this.setCurrentFrame(t);if(this.isPlaying){t.setAlpha&&(e.alpha=t.alpha);var i=this.currentAnim;e.emit(r.SPRITE_ANIMATION_KEY_UPDATE+i.key,i,t,e),e.emit(r.SPRITE_ANIMATION_UPDATE,i,t,e),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this)}},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off(r.REMOVE_ANIMATION,this.remove,this),this.animationManager=null,this.parent=null,this.currentAnim=null,this.currentFrame=null}});t.exports=o},function(t,e,i){var n=i(486),s=i(48),r=i(0),o=i(29),a=i(487),h=i(92),l=i(32),u=new r({initialize:function(t){this.game=t,this.type=o.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.config={clearBeforeRender:t.config.clearBeforeRender,backgroundColor:t.config.backgroundColor,resolution:t.config.resolution,antialias:t.config.antialias,roundPixels:t.config.roundPixels},this.gameCanvas=t.canvas;var e={alpha:t.config.transparent,desynchronized:t.config.desynchronized};this.gameContext=this.game.config.context?this.game.config.context:this.gameCanvas.getContext("2d",e),this.currentContext=this.gameContext,this.antialias=t.config.antialias,this.blendModes=a(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new l,this._tempMatrix2=new l,this._tempMatrix3=new l,this._tempMatrix4=new l,this.init()},init:function(){this.game.scale.on(h.RESIZE,this.onResize,this);var t=this.game.scale.baseSize;this.resize(t.width,t.height)},onResize:function(t,e){e.width===this.width&&e.height===this.height||this.resize(e.width,e.height)},resize:function(t,e){this.width=t,this.height=e},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(t){return this.currentContext.globalCompositeOperation=t,this},setContext:function(t){return this.currentContext=t||this.gameContext,this},setAlpha:function(t){return this.currentContext.globalAlpha=t,this},preRender:function(){var t=this.gameContext,e=this.config,i=this.width,n=this.height;t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),e.clearBeforeRender&&t.clearRect(0,0,i,n),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,n)),t.save(),this.drawCount=0},render:function(t,e,i,n){var r=e.list,o=r.length,a=n._cx,h=n._cy,l=n._cw,u=n._ch,c=n.renderToTexture?n.context:t.sys.context;c.save(),this.game.scene.customViewports&&(c.beginPath(),c.rect(a,h,l,u),c.clip()),this.currentContext=c;var d=n.mask;d&&d.preRenderCanvas(this,null,n._maskCamera),n.transparent||(c.fillStyle=n.backgroundColor.rgba,c.fillRect(a,h,l,u)),c.globalAlpha=n.alpha,c.globalCompositeOperation="source-over",this.drawCount+=r.length,n.renderToTexture&&n.emit(s.PRE_RENDER,n),n.matrix.copyToContext(c);for(var f=0;f=0?y=-(y+d):y<0&&(y=Math.abs(y)-d)),t.flipY&&(x>=0?x=-(x+f):x<0&&(x=Math.abs(x)-f))}var w=1,E=1;t.flipX&&(p||(y+=-e.realWidth+2*v),w=-1),t.flipY&&(p||(x+=-e.realHeight+2*m),E=-1),a.applyITRS(t.x,t.y,t.rotation,t.scaleX*w,t.scaleY*E),o.copyFrom(i.matrix),n?(o.multiplyWithOffset(n,-i.scrollX*t.scrollFactorX,-i.scrollY*t.scrollFactorY),a.e=t.x,a.f=t.y,o.multiply(a,h)):(a.e-=i.scrollX*t.scrollFactorX,a.f-=i.scrollY*t.scrollFactorY,o.multiply(a,h)),r.save(),h.setToContext(r),r.globalCompositeOperation=this.blendModes[t.blendMode],r.globalAlpha=s,r.imageSmoothingEnabled=!(!this.antialias||e.source.scaleMode),r.drawImage(e.source.image,u,c,d,f,y,x,d/g,f/g),r.restore()}},destroy:function(){this.gameCanvas=null,this.gameContext=null,this.game=null}});t.exports=u},function(t,e,i){var n=i(26),s=i(33),r=i(2);t.exports=function(t,e){var i=r(e,"callback"),o=r(e,"type","image/png"),a=r(e,"encoder",.92),h=Math.abs(Math.round(r(e,"x",0))),l=Math.abs(Math.round(r(e,"y",0))),u=r(e,"width",t.width),c=r(e,"height",t.height);if(r(e,"getPixel",!1)){var d=t.getContext("2d").getImageData(h,l,1,1).data;i.call(null,new s(d[0],d[1],d[2],d[3]/255))}else if(0!==h||0!==l||u!==t.width||c!==t.height){var f=n.createWebGL(this,u,c);f.getContext("2d").drawImage(t,h,l,u,c,0,0,u,c);var p=new Image;p.onerror=function(){i.call(null),n.remove(f)},p.onload=function(){i.call(null,p),n.remove(f)},p.src=f.toDataURL(o,a)}else{var g=new Image;g.onerror=function(){i.call(null)},g.onload=function(){i.call(null,g)},g.src=t.toDataURL(o,a)}}},function(t,e,i){var n=i(52),s=i(299);t.exports=function(){var t=[],e=s.supportNewBlendModes,i="source-over";return t[n.NORMAL]=i,t[n.ADD]="lighter",t[n.MULTIPLY]=e?"multiply":i,t[n.SCREEN]=e?"screen":i,t[n.OVERLAY]=e?"overlay":i,t[n.DARKEN]=e?"darken":i,t[n.LIGHTEN]=e?"lighten":i,t[n.COLOR_DODGE]=e?"color-dodge":i,t[n.COLOR_BURN]=e?"color-burn":i,t[n.HARD_LIGHT]=e?"hard-light":i,t[n.SOFT_LIGHT]=e?"soft-light":i,t[n.DIFFERENCE]=e?"difference":i,t[n.EXCLUSION]=e?"exclusion":i,t[n.HUE]=e?"hue":i,t[n.SATURATION]=e?"saturation":i,t[n.COLOR]=e?"color":i,t[n.LUMINOSITY]=e?"luminosity":i,t[n.ERASE]="destination-out",t[n.SOURCE_IN]="source-in",t[n.SOURCE_OUT]="source-out",t[n.SOURCE_ATOP]="source-atop",t[n.DESTINATION_OVER]="destination-over",t[n.DESTINATION_IN]="destination-in",t[n.DESTINATION_OUT]="destination-out",t[n.DESTINATION_ATOP]="destination-atop",t[n.LIGHTER]="lighter",t[n.COPY]="copy",t[n.XOR]="xor",t}},function(t,e,i){var n=i(91),s=i(48),r=i(0),o=i(29),a=i(18),h=i(116),l=i(1),u=i(92),c=i(79),d=i(117),f=i(32),p=i(10),g=i(489),v=i(490),m=i(491),y=i(234),x=new r({initialize:function(t){var e=t.config,i={alpha:e.transparent,desynchronized:e.desynchronized,depth:!1,antialias:e.antialiasGL,premultipliedAlpha:e.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:e.failIfMajorPerformanceCaveat,powerPreference:e.powerPreference};this.config={clearBeforeRender:e.clearBeforeRender,antialias:e.antialias,backgroundColor:e.backgroundColor,contextCreation:i,resolution:e.resolution,roundPixels:e.roundPixels,maxTextures:e.maxTextures,maxTextureSize:e.maxTextureSize,batchSize:e.batchSize,maxLights:e.maxLights,mipmapFilter:e.mipmapFilter},this.game=t,this.type=o.WEBGL,this.width=0,this.height=0,this.canvas=t.canvas,this.blendModes=[],this.nativeTextures=[],this.contextLost=!1,this.pipelines=null,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92,isFramebuffer:!1,bufferWidth:0,bufferHeight:0},this.currentActiveTextureUnit=0,this.currentTextures=new Array(16),this.currentFramebuffer=null,this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=l,this.contextRestoredHandler=l,this.gl=null,this.supportedExtensions=null,this.extensions={},this.glFormats=[],this.compression={ETC1:!1,PVRTC:!1,S3TC:!1},this.drawingBufferHeight=0,this.blankTexture=null,this.defaultCamera=new n(0,0,0,0),this._tempMatrix1=new f,this._tempMatrix2=new f,this._tempMatrix3=new f,this._tempMatrix4=new f,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.mipmapFilter=null,this.init(this.config)},init:function(t){var e,i=this.game,n=this.canvas,s=t.backgroundColor;if(!(e=i.config.context?i.config.context:n.getContext("webgl",t.contextCreation)||n.getContext("experimental-webgl",t.contextCreation))||e.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=e;var r=this;this.contextLostHandler=function(t){r.contextLost=!0,r.game.events.emit(a.CONTEXT_LOST,r),t.preventDefault()},this.contextRestoredHandler=function(){r.contextLost=!1,r.init(r.config),r.game.events.emit(a.CONTEXT_RESTORED,r)},n.addEventListener("webglcontextlost",this.contextLostHandler,!1),n.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),i.context=e;for(var h=0;h<=27;h++)this.blendModes.push({func:[e.ONE,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_ADD});this.blendModes[1].func=[e.ONE,e.DST_ALPHA],this.blendModes[2].func=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[e.ONE,e.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[e.ZERO,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_REVERSE_SUBTRACT},this.glFormats[0]=e.BYTE,this.glFormats[1]=e.SHORT,this.glFormats[2]=e.UNSIGNED_BYTE,this.glFormats[3]=e.UNSIGNED_SHORT,this.glFormats[4]=e.FLOAT,this.glFuncMap={mat2:{func:e.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:e.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:e.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:e.uniform1f,length:1},"1fv":{func:e.uniform1fv,length:1},"1i":{func:e.uniform1i,length:1},"1iv":{func:e.uniform1iv,length:1},"2f":{func:e.uniform2f,length:2},"2fv":{func:e.uniform2fv,length:1},"2i":{func:e.uniform2i,length:2},"2iv":{func:e.uniform2iv,length:1},"3f":{func:e.uniform3f,length:3},"3fv":{func:e.uniform3fv,length:1},"3i":{func:e.uniform3i,length:3},"3iv":{func:e.uniform3iv,length:1},"4f":{func:e.uniform4f,length:4},"4fv":{func:e.uniform4fv,length:1},"4i":{func:e.uniform4i,length:4},"4iv":{func:e.uniform4iv,length:1}};var l=e.getSupportedExtensions();t.maxTextures||(t.maxTextures=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),t.maxTextureSize||(t.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE));var u="WEBGL_compressed_texture_",c="WEBKIT_"+u;this.compression.ETC1=e.getExtension(u+"etc1")||e.getExtension(c+"etc1"),this.compression.PVRTC=e.getExtension(u+"pvrtc")||e.getExtension(c+"pvrtc"),this.compression.S3TC=e.getExtension(u+"s3tc")||e.getExtension(c+"s3tc"),this.supportedExtensions=l,e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),e.enable(e.BLEND),e.clearColor(s.redGL,s.greenGL,s.blueGL,s.alphaGL),this.mipmapFilter=e[t.mipmapFilter];for(var f=0;f0&&n>0;if(o&&a){var h=o[0],l=o[1],u=o[2],c=o[3];a=h!==t||l!==e||u!==i||c!==n}a&&(this.flush(),r.scissor(t,s-e-n,i,n))},popScissor:function(){var t=this.scissorStack;t.pop();var e=t[t.length-1];e&&this.setScissor(e[0],e[1],e[2],e[3]),this.currentScissor=e},setPipeline:function(t,e){return this.currentPipeline===t&&this.currentPipeline.vertexBuffer===this.currentVertexBuffer&&this.currentPipeline.program===this.currentProgram||(this.flush(),this.currentPipeline=t,this.currentPipeline.bind()),this.currentPipeline.onBind(e),this.currentPipeline},hasActiveStencilMask:function(){var t=this.currentMask.mask,e=this.currentCameraMask.mask;return t&&t.isStencil||e&&e.isStencil},rebindPipeline:function(t){var e=this.gl;e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),this.hasActiveStencilMask()?e.clear(e.DEPTH_BUFFER_BIT):(e.disable(e.STENCIL_TEST),e.clear(e.DEPTH_BUFFER_BIT|e.STENCIL_BUFFER_BIT)),e.viewport(0,0,this.width,this.height),this.setBlendMode(0,!0),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.blankTexture.glTexture),this.currentActiveTextureUnit=0,this.currentTextures[0]=this.blankTexture.glTexture,this.currentPipeline=t,this.currentPipeline.bind(),this.currentPipeline.onBind()},clearPipeline:function(){this.flush(),this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.setBlendMode(0,!0)},setBlendMode:function(t,e){void 0===e&&(e=!1);var i=this.gl,n=this.blendModes[t];return!!(e||t!==o.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t)&&(this.flush(),i.enable(i.BLEND),i.blendEquation(n.equation),n.func.length>2?i.blendFuncSeparate(n.func[0],n.func[1],n.func[2],n.func[3]):i.blendFunc(n.func[0],n.func[1]),this.currentBlendMode=t,!0)},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return t>17&&this.blendModes[t]&&this.blendModes.splice(t,1),this},setBlankTexture:function(t){void 0===t&&(t=!1),!t&&0===this.currentActiveTextureUnit&&this.currentTextures[0]||this.setTexture2D(this.blankTexture.glTexture,0)},setTexture2D:function(t,e,i){void 0===i&&(i=!0);var n=this.gl;return t!==this.currentTextures[e]&&(i&&this.flush(),this.currentActiveTextureUnit!==e&&(n.activeTexture(n.TEXTURE0+e),this.currentActiveTextureUnit=e),n.bindTexture(n.TEXTURE_2D,t),this.currentTextures[e]=t),this},setFramebuffer:function(t,e){void 0===e&&(e=!1);var i=this.gl,n=this.width,s=this.height;return t!==this.currentFramebuffer&&(t&&t.renderTexture?(n=t.renderTexture.width,s=t.renderTexture.height):this.flush(),i.bindFramebuffer(i.FRAMEBUFFER,t),i.viewport(0,0,n,s),e&&(t?(this.drawingBufferHeight=s,this.pushScissor(0,0,n,s)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=t),this},setProgram:function(t){var e=this.gl;return t!==this.currentProgram&&(this.flush(),e.useProgram(t),this.currentProgram=t),this},setVertexBuffer:function(t){var e=this.gl;return t!==this.currentVertexBuffer&&(this.flush(),e.bindBuffer(e.ARRAY_BUFFER,t),this.currentVertexBuffer=t),this},setIndexBuffer:function(t){var e=this.gl;return t!==this.currentIndexBuffer&&(this.flush(),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.currentIndexBuffer=t),this},createTextureFromSource:function(t,e,i,n){var s=this.gl,r=s.NEAREST,a=s.NEAREST,l=s.CLAMP_TO_EDGE;e=t?t.width:e,i=t?t.height:i;var u=h(e,i);return u&&(l=s.REPEAT),n===o.ScaleModes.LINEAR&&this.config.antialias&&(r=u?this.mipmapFilter:s.LINEAR,a=s.LINEAR),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,r,a,l,l,s.RGBA,t):this.createTexture2D(0,r,a,l,l,s.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,s,r,o,a,l,u,c,d){u=void 0===u||null===u||u,void 0===c&&(c=!1),void 0===d&&(d=!1);var f=this.gl,p=f.createTexture();return this.setTexture2D(p,0),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,e),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,i),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_S,s),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_T,n),f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,d),null===o||void 0===o?f.texImage2D(f.TEXTURE_2D,t,r,a,l,0,r,f.UNSIGNED_BYTE,null):(c||(a=o.width,l=o.height),f.texImage2D(f.TEXTURE_2D,t,r,r,f.UNSIGNED_BYTE,o)),h(a,l)&&f.generateMipmap(f.TEXTURE_2D),this.setTexture2D(null,0),p.isAlphaPremultiplied=u,p.isRenderTexture=!1,p.width=a,p.height=l,this.nativeTextures.push(p),p},createFramebuffer:function(t,e,i,n){var s,r=this.gl,o=r.createFramebuffer();if(this.setFramebuffer(o),n){var a=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,a),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,a)}if(i.isRenderTexture=!0,i.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0),(s=r.checkFramebufferStatus(r.FRAMEBUFFER))!==r.FRAMEBUFFER_COMPLETE){throw new Error("Framebuffer incomplete. Framebuffer status: "+{36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"}[s])}return o.renderTexture=i,this.setFramebuffer(null),o},createProgram:function(t,e){var i=this.gl,n=i.createProgram(),s=i.createShader(i.VERTEX_SHADER),r=i.createShader(i.FRAGMENT_SHADER);if(i.shaderSource(s,t),i.shaderSource(r,e),i.compileShader(s),i.compileShader(r),!i.getShaderParameter(s,i.COMPILE_STATUS))throw new Error("Failed to compile Vertex Shader:\n"+i.getShaderInfoLog(s));if(!i.getShaderParameter(r,i.COMPILE_STATUS))throw new Error("Failed to compile Fragment Shader:\n"+i.getShaderInfoLog(r));if(i.attachShader(n,s),i.attachShader(n,r),i.linkProgram(n),!i.getProgramParameter(n,i.LINK_STATUS))throw new Error("Failed to link program:\n"+i.getProgramInfoLog(n));return n},createVertexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setVertexBuffer(n),i.bufferData(i.ARRAY_BUFFER,t,e),this.setVertexBuffer(null),n},createIndexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setIndexBuffer(n),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t,e),this.setIndexBuffer(null),n},deleteTexture:function(t){var e=this.nativeTextures.indexOf(t);return-1!==e&&c(this.nativeTextures,e),this.gl.deleteTexture(t),this.currentTextures[0]!==t||this.game.pendingDestroy||this.setBlankTexture(!0),this},deleteFramebuffer:function(t){return this.gl.deleteFramebuffer(t),this},deleteProgram:function(t){return this.gl.deleteProgram(t),this},deleteBuffer:function(t){return this.gl.deleteBuffer(t),this},preRenderCamera:function(t){var e=t._cx,i=t._cy,n=t._cw,r=t._ch,o=this.pipelines.TextureTintPipeline,a=t.backgroundColor;if(t.renderToTexture){this.flush(),this.pushScissor(e,i,n,-r),this.setFramebuffer(t.framebuffer);var h=this.gl;h.clearColor(0,0,0,0),h.clear(h.COLOR_BUFFER_BIT),o.projOrtho(e,n+e,i,r+i,-1e3,1e3),t.mask&&(this.currentCameraMask.mask=t.mask,this.currentCameraMask.camera=t._maskCamera,t.mask.preRenderWebGL(this,t,t._maskCamera)),a.alphaGL>0&&o.drawFillRect(e,i,n+e,r+i,p.getTintFromFloats(a.redGL,a.greenGL,a.blueGL,1),a.alphaGL),t.emit(s.PRE_RENDER,t)}else this.pushScissor(e,i,n,r),t.mask&&(this.currentCameraMask.mask=t.mask,this.currentCameraMask.camera=t._maskCamera,t.mask.preRenderWebGL(this,t,t._maskCamera)),a.alphaGL>0&&o.drawFillRect(e,i,n,r,p.getTintFromFloats(a.redGL,a.greenGL,a.blueGL,1),a.alphaGL)},getCurrentStencilMask:function(){var t=null,e=this.maskStack,i=this.currentCameraMask;return e.length>0?t=e[e.length-1]:i.mask&&i.mask.isStencil&&(t=i),t},postRenderCamera:function(t){var e=this.pipelines.TextureTintPipeline;if(t.flashEffect.postRenderWebGL(e,p.getTintFromFloats),t.fadeEffect.postRenderWebGL(e,p.getTintFromFloats),t.dirty=!1,this.popScissor(),t.renderToTexture){e.flush(),this.setFramebuffer(null),t.emit(s.POST_RENDER,t),e.projOrtho(0,e.width,e.height,0,-1e3,1e3);var i=p.getTintAppendFloatAlpha;(t.pipeline?t.pipeline:e).batchTexture(t,t.glTexture,t.width,t.height,t.x,t.y,t.width,t.height,t.zoom,t.zoom,t.rotation,t.flipX,!t.flipY,1,1,0,0,0,0,t.width,t.height,i(t._tintTL,t._alphaTL),i(t._tintTR,t._alphaTR),i(t._tintBL,t._alphaBL),i(t._tintBR,t._alphaBR),t._isTinted&&t.tintFill,0,0,this.defaultCamera,null),this.setBlankTexture(!0)}t.mask&&(this.currentCameraMask.mask=null,t.mask.postRenderWebGL(this,t._maskCamera))},preRender:function(){if(!this.contextLost){var t=this.gl,e=this.pipelines;if(t.bindFramebuffer(t.FRAMEBUFFER,null),this.config.clearBeforeRender){var i=this.config.backgroundColor;t.clearColor(i.redGL,i.greenGL,i.blueGL,i.alphaGL),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT)}for(var n in t.enable(t.SCISSOR_TEST),e)e[n].onPreRender();this.currentScissor=[0,0,this.width,this.height],this.scissorStack=[this.currentScissor],this.game.scene.customViewports&&t.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.setPipeline(this.pipelines.TextureTintPipeline)}},render:function(t,e,i,n){if(!this.contextLost){var s=e.list,r=s.length,a=this.pipelines;for(var h in a)a[h].onRender(t,n);if(this.preRenderCamera(n),0===r)return this.setBlendMode(o.BlendModes.NORMAL),void this.postRenderCamera(n);this.currentType="";for(var l=this.currentMask,u=0;u0&&r>0&&(this.setTexture2D(e,0),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,i),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.width=s,e.height=r,this.setTexture2D(null,0)),e},createVideoTexture:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=this.gl,s=n.NEAREST,r=n.NEAREST,o=t.videoWidth,a=t.videoHeight,l=n.CLAMP_TO_EDGE,u=h(o,a);return!e&&u&&(l=n.REPEAT),this.config.antialias&&(s=u?this.mipmapFilter:n.LINEAR,r=n.LINEAR),this.createTexture2D(0,s,r,l,l,n.RGBA,t,o,a,!0,!0,i)},updateVideoTexture:function(t,e,i){void 0===i&&(i=!1);var n=this.gl,s=t.videoWidth,r=t.videoHeight;return s>0&&r>0&&(this.setTexture2D(e,0),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,i),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.width=s,e.height=r,this.setTexture2D(null,0)),e},setTextureFilter:function(t,e){var i=this.gl,n=[i.LINEAR,i.NEAREST][e];return this.setTexture2D(t,0),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,n),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,n),this.setTexture2D(null,0),this},setFloat1:function(t,e,i){return this.setProgram(t),this.gl.uniform1f(this.gl.getUniformLocation(t,e),i),this},setFloat2:function(t,e,i,n){return this.setProgram(t),this.gl.uniform2f(this.gl.getUniformLocation(t,e),i,n),this},setFloat3:function(t,e,i,n,s){return this.setProgram(t),this.gl.uniform3f(this.gl.getUniformLocation(t,e),i,n,s),this},setFloat4:function(t,e,i,n,s,r){return this.setProgram(t),this.gl.uniform4f(this.gl.getUniformLocation(t,e),i,n,s,r),this},setFloat1v:function(t,e,i){return this.setProgram(t),this.gl.uniform1fv(this.gl.getUniformLocation(t,e),i),this},setFloat2v:function(t,e,i){return this.setProgram(t),this.gl.uniform2fv(this.gl.getUniformLocation(t,e),i),this},setFloat3v:function(t,e,i){return this.setProgram(t),this.gl.uniform3fv(this.gl.getUniformLocation(t,e),i),this},setFloat4v:function(t,e,i){return this.setProgram(t),this.gl.uniform4fv(this.gl.getUniformLocation(t,e),i),this},setInt1:function(t,e,i){return this.setProgram(t),this.gl.uniform1i(this.gl.getUniformLocation(t,e),i),this},setInt2:function(t,e,i,n){return this.setProgram(t),this.gl.uniform2i(this.gl.getUniformLocation(t,e),i,n),this},setInt3:function(t,e,i,n,s){return this.setProgram(t),this.gl.uniform3i(this.gl.getUniformLocation(t,e),i,n,s),this},setInt4:function(t,e,i,n,s,r){return this.setProgram(t),this.gl.uniform4i(this.gl.getUniformLocation(t,e),i,n,s,r),this},setMatrix2:function(t,e,i,n){return this.setProgram(t),this.gl.uniformMatrix2fv(this.gl.getUniformLocation(t,e),i,n),this},setMatrix3:function(t,e,i,n){return this.setProgram(t),this.gl.uniformMatrix3fv(this.gl.getUniformLocation(t,e),i,n),this},setMatrix4:function(t,e,i,n){return this.setProgram(t),this.gl.uniformMatrix4fv(this.gl.getUniformLocation(t,e),i,n),this},getMaxTextures:function(){return this.config.maxTextures},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){for(var t=0;t0&&this.flush();var e=this.inverseRotationMatrix;if(t){var i=-t,n=Math.cos(i),s=Math.sin(i);e[1]=s,e[3]=-s,e[0]=e[4]=n}else e[0]=e[4]=1,e[1]=e[3]=0;this.renderer.setMatrix3(this.program,"uInverseRotationMatrix",!1,e),this.currentNormalMapRotation=t}},batchSprite:function(t,e,i){if(this.active){var n=t.texture.dataSource[t.frame.sourceIndex];n&&(this.renderer.setPipeline(this),this.setTexture2D(n.glTexture,1),this.setNormalMapRotation(t.rotation),r.prototype.batchSprite.call(this,t,e,i))}}});a.LIGHT_COUNT=o,t.exports=a},function(t,e){var i={modelMatrixDirty:!1,viewMatrixDirty:!1,projectionMatrixDirty:!1,modelMatrix:null,viewMatrix:null,projectionMatrix:null,mvpInit:function(){return this.modelMatrixDirty=!0,this.viewMatrixDirty=!0,this.projectionMatrixDirty=!0,this.modelMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this},mvpUpdate:function(){var t=this.program;return this.modelMatrixDirty&&(this.renderer.setMatrix4(t,"uModelMatrix",!1,this.modelMatrix),this.modelMatrixDirty=!1),this.viewMatrixDirty&&(this.renderer.setMatrix4(t,"uViewMatrix",!1,this.viewMatrix),this.viewMatrixDirty=!1),this.projectionMatrixDirty&&(this.renderer.setMatrix4(t,"uProjectionMatrix",!1,this.projectionMatrix),this.projectionMatrixDirty=!1),this},modelIdentity:function(){var t=this.modelMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.modelMatrixDirty=!0,this},modelScale:function(t,e,i){var n=this.modelMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.modelMatrixDirty=!0,this},modelTranslate:function(t,e,i){var n=this.modelMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.modelMatrixDirty=!0,this},modelRotateX:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this.modelMatrixDirty=!0,this},modelRotateY:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this.modelMatrixDirty=!0,this},modelRotateZ:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this.modelMatrixDirty=!0,this},viewIdentity:function(){var t=this.viewMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.viewMatrixDirty=!0,this},viewScale:function(t,e,i){var n=this.viewMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.viewMatrixDirty=!0,this},viewTranslate:function(t,e,i){var n=this.viewMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.viewMatrixDirty=!0,this},viewRotateX:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this.viewMatrixDirty=!0,this},viewRotateY:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this.viewMatrixDirty=!0,this},viewRotateZ:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this.viewMatrixDirty=!0,this},viewLoad2D:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=0,e[4]=t[2],e[5]=t[3],e[6]=0,e[7]=0,e[8]=t[4],e[9]=t[5],e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this.viewMatrixDirty=!0,this},viewLoad:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this.viewMatrixDirty=!0,this},projIdentity:function(){var t=this.projectionMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.projectionMatrixDirty=!0,this},projOrtho:function(t,e,i,n,s,r){var o=this.projectionMatrix,a=1/(t-e),h=1/(i-n),l=1/(s-r);return o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*l,o[15]=1,this.projectionMatrixDirty=!0,this},projPersp:function(t,e,i,n){var s=this.projectionMatrix,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this.projectionMatrixDirty=!0,this}};t.exports=i},,,function(t,e,i){i(496),i(497),i(498),i(499),i(500),i(501),i(502),i(503)},function(t,e){Array.prototype.forEach||(Array.prototype.forEach=function(t){"use strict";if(void 0===this||null===this)throw new TypeError;var e=Object(this),i=e.length>>>0;if("function"!=typeof t)throw new TypeError;for(var n=arguments.length>=2?arguments[1]:void 0,s=0;s>16)+(65280&t)+((255&t)<<16)},n={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,_isTinted:!1,tintFill:!1,clearTint:function(){return this.setTint(16777215),this._isTinted=!1,this},setTint:function(t,e,n,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,n=t,s=t),this._tintTL=i(t),this._tintTR=i(e),this._tintBL=i(n),this._tintBR=i(s),this._isTinted=!0,this.tintFill=!1,this},setTintFill:function(t,e,i,n){return this.setTint(t,e,i,n),this.tintFill=!0,this},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=i(t),this._isTinted=!0}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=i(t),this._isTinted=!0}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=i(t),this._isTinted=!0}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=i(t),this._isTinted=!0}},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){return this._isTinted}}};t.exports=n},function(t,e){t.exports="changedata"},function(t,e){t.exports="changedata-"},function(t,e){t.exports="removedata"},function(t,e){t.exports="setdata"},function(t,e){t.exports="destroy"},function(t,e){t.exports="complete"},function(t,e){t.exports="created"},function(t,e){t.exports="error"},function(t,e){t.exports="loop"},function(t,e){t.exports="play"},function(t,e){t.exports="seeked"},function(t,e){t.exports="seeking"},function(t,e){t.exports="stop"},function(t,e){t.exports="timeout"},function(t,e){t.exports="unlocked"},function(t,e,i){var n=i(34);t.exports=function(t,e,i,s,r){return n(t,"alpha",e,i,s,r)}},function(t,e,i){var n=i(34);t.exports=function(t,e,i,s,r){return n(t,"x",e,i,s,r)}},function(t,e,i){var n=i(34);t.exports=function(t,e,i,s,r,o,a){return void 0!==i&&null!==i||(i=e),n(t,"x",e,s,o,a),n(t,"y",i,r,o,a)}},function(t,e,i){var n=i(34);t.exports=function(t,e,i,s,r){return n(t,"y",e,i,s,r)}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=6.28);for(var s=i,r=(n-i)/t.length,o=0;o0?s(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a1)if(0===s){var d=t.length-1;for(o=t[d].x,a=t[d].y,h=d-1;h>=0;h--)l=(c=t[h]).x,u=c.y,c.x=o,c.y=a,o=l,a=u;t[d].x=e,t[d].y=i}else{for(o=t[0].x,a=t[0].y,h=1;h0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<.001&&(e.zoom=.001))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){t.exports={Camera:i(276),BaseCamera:i(91),CameraManager:i(674),Effects:i(284),Events:i(48)}},function(t,e){t.exports="cameradestroy"},function(t,e){t.exports="camerafadeincomplete"},function(t,e){t.exports="camerafadeinstart"},function(t,e){t.exports="camerafadeoutcomplete"},function(t,e){t.exports="camerafadeoutstart"},function(t,e){t.exports="cameraflashcomplete"},function(t,e){t.exports="cameraflashstart"},function(t,e){t.exports="camerapancomplete"},function(t,e){t.exports="camerapanstart"},function(t,e){t.exports="postrender"},function(t,e){t.exports="prerender"},function(t,e){t.exports="camerashakecomplete"},function(t,e){t.exports="camerashakestart"},function(t,e){t.exports="camerazoomcomplete"},function(t,e){t.exports="camerazoomstart"},function(t,e,i){var n=i(23),s=i(0),r=i(48),o=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,o,a,h){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===o&&(o=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene),!o&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=t,this.progress=0,this.red=i,this.green=n,this.blue=s,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h;var l=t?r.FADE_OUT_START:r.FADE_IN_START;return this.camera.emit(l,this.camera,this,e,i,n,s),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed=1?1:1/e*(1+(e*t|0))}},function(t,e,i){var n=i(23),s=i(0),r=i(48),o=i(3),a=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.intensity=new o,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s){return void 0===t&&(t=100),void 0===e&&(e=.05),void 0===i&&(i=!1),void 0===n&&(n=null),void 0===s&&(s=this.camera.scene),!i&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=t,this.progress=0,"number"==typeof e?this.intensity.set(e):this.intensity.set(e.x,e.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=n,this._onUpdateScope=s,this.camera.emit(r.SHAKE_START,this.camera,this,t,e),this.camera)},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(t,e){if(this.isRunning)if(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed0&&(o.preRender(1),t.render(n,e,i,o))}},resetAll:function(){for(var t=0;t1)for(var i=1;i=1)&&(s.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(s.mspointer=!0),navigator.getGamepads&&(s.gamepads=!0),"onwheel"in window||n.ie&&"WheelEvent"in window?s.wheelEvent="wheel":"onmousewheel"in window?s.wheelEvent="mousewheel":n.firefox&&"MouseScrollEvent"in window&&(s.wheelEvent="DOMMouseScroll"),s)},function(t,e,i){var n=i(115),s={audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){s.audioData=!!window.Audio,s.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e&&(t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(s.ogg=!0),(t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||t.canPlayType("audio/opus;").replace(/^no$/,""))&&(s.opus=!0),t.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(s.mp3=!0),t.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")&&(s.wav=!0),(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/aac;").replace(/^no$/,""))&&(s.m4a=!0),t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(s.webm=!0),""!==t.canPlayType('audio/mp4;codecs="ec-3"')))if(n.edge)s.dolby=!0;else if(n.safari&&n.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var i=parseInt(RegExp.$1,10),r=parseInt(RegExp.$2,10);(10===i&&r>=11||i>10)&&(s.dolby=!0)}}catch(t){}return s}()},function(t,e){var i={h264:!1,hls:!1,mp4:!1,ogg:!1,vp9:!1,webm:!1};t.exports=function(){var t=document.createElement("video"),e=!!t.canPlayType;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(i.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.h264=!0,i.mp4=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(i.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(i.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.hls=!0))}catch(t){}return i}()},function(t,e){var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){var t,e="Fullscreen",n="FullScreen",s=["request"+e,"request"+n,"webkitRequest"+e,"webkitRequest"+n,"msRequest"+e,"msRequest"+n,"mozRequest"+n,"mozRequest"+e];for(t=0;tMath.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){var n=i(301);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(13);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e?t:(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e1?t[i]-(n(s-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(s-r,t[r?r-1:0],t[r],t[i1?n(t[i],t[i-1],i-s):n(t[r],t[r+1>i?i:r+1],s-r)}},function(t,e,i){var n=i(155);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){t.exports={GetNext:i(310),IsSize:i(116),IsValue:i(726)}},function(t,e){t.exports=function(t){return t>0&&0==(t&t-1)}},function(t,e,i){t.exports={Ceil:i(311),Floor:i(93),To:i(728)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),n?(i+t)/e:i+t)}},function(t,e,i){var n=new(i(0))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var n=0;n>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e0;e--){var i=Math.floor(this.frac()*(e+1)),n=t[i];t[i]=t[e],t[e]=n}return t}});t.exports=n},function(t,e){t.exports=function(t){for(var e=0,i=0;i1?void 0!==n?(s=(n-t)/(n-i))<0&&(s=0):s=1:s<0&&(s=0),s}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,s=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*s,t.y=Math.sin(i)*s,t.z=n*e,t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var s=[],r=[],o=0;o0&&t<=e*i&&(r=t>e-1?t-(o=Math.floor(t/e))*e:t,s.set(r,o)),s}},function(t,e){t.exports=function(t,e,i){return Math.abs(t-e)<=i}},function(t,e,i){var n=i(171),s=i(318),r=i(319),o=new s,a=new r,h=new n;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},function(t,e){t.exports="addtexture"},function(t,e){t.exports="onerror"},function(t,e){t.exports="onload"},function(t,e){t.exports="ready"},function(t,e){t.exports="removetexture"},function(t,e){t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","","void main()","{"," vec2 uv = gl_FragCoord.xy / uResolution;"," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);"," float alpha = mainColor.a;",""," if (!uInvertMaskAlpha)"," {"," alpha *= (maskColor.a);"," }"," else"," {"," alpha *= (1.0 - maskColor.a);"," }",""," gl_FragColor = vec4(mainColor.rgb * alpha, alpha);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","","precision mediump float;","","attribute vec2 inPosition;","","void main()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_FORWARD_DIFFUSE_FS","","precision mediump float;","","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","","const int kMaxLights = %LIGHT_COUNT%;","","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","","varying vec2 outTexCoord;","varying vec4 outTint;","","void main()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);"," vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.rgb * outTint.a, outTint.a);"," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;",""," for (int index = 0; index < kMaxLights; ++index)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }",""," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);"," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_TEXTURE_TINT_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.rgb * outTint.a, outTint.a);"," vec4 color = texture;",""," if (outTintEffect == 0.0)"," {"," // Multiply texture tint"," color = texture * texel;"," }"," else if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.rgb * outTint.a, texture.a);"," color.a = texture.a * texel.a;"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_TEXTURE_TINT_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform mat4 uModelMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}","",""].join("\n")},function(t,e,i){t.exports={GenerateTexture:i(326),Palettes:i(759)}},function(t,e,i){t.exports={ARNE16:i(327),C64:i(760),CGA:i(761),JMP:i(762),MSX:i(763)}},function(t,e){t.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},function(t,e){t.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},function(t,e){t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},function(t,e){t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},function(t,e,i){t.exports={Path:i(765),CubicBezier:i(328),Curve:i(80),Ellipse:i(329),Line:i(330),QuadraticBezier:i(331),Spline:i(332)}},function(t,e,i){var n=i(0),s=i(328),r=i(329),o=i(5),a=i(330),h=i(766),l=i(331),u=i(11),c=i(332),d=i(3),f=i(13),p=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.name="",this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new d,this._tmpVec2A=new d,this._tmpVec2B=new d,"object"==typeof t?this.fromJSON(t):this.startPoint.set(t,e)},add:function(t){return this.curves.push(t),this},circleTo:function(t,e,i){return void 0===e&&(e=!1),this.ellipseTo(t,t,0,360,e,i)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);return t.equals(e)||this.curves.push(new a(e,t)),this},cubicBezierTo:function(t,e,i,n,r,o){var a,h,l,u=this.getEndPoint();return t instanceof d?(a=t,h=e,l=i):(a=new d(i,n),h=new d(r,o),l=new d(t,e)),this.add(new s(u,a,h,l))},quadraticBezierTo:function(t,e,i,n){var s,r,o=this.getEndPoint();return t instanceof d?(s=t,r=e):(s=new d(i,n),r=new d(t,e)),this.add(new l(o,s,r))},draw:function(t,e){for(var i=0;i0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new d);for(var i=t*this.getLength(),n=this.getCurveLengths(),s=0;s=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new d),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new d),t.copy(this.startPoint)},lineTo:function(t,e){t instanceof d?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new a([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new c(t))},moveTo:function(t,e){return t instanceof d?this.add(new h(t.x,t.y)):this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},function(t,e,i){var n=i(33),s=i(336);t.exports=function(t,e,i){var r=i,o=i,a=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,l=2*i-h;r=s(l,h,t+1/3),o=s(l,h,t),a=s(l,h,t-1/3)}return(new n).setGLTo(r,o,a,1)}},function(t,e,i){var n=i(161);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],s=0;s<=359;s++)i.push(n(s/359,t,e));return i}},function(t,e,i){var n=i(113),s=function(t,e,i,s,r,o,a,h){void 0===a&&(a=100),void 0===h&&(h=0);var l=h/a;return{r:n(t,s,l),g:n(e,r,l),b:n(i,o,l)}};t.exports={RGBWithRGB:s,ColorWithRGB:function(t,e,i,n,r,o){return void 0===r&&(r=100),void 0===o&&(o=0),s(t.r,t.g,t.b,e,i,n,r,o)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),s(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(169),s=i(33);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e,i){var n=i(335);t.exports=function(t,e,i,s,r){return void 0===s&&(s=255),void 0===r&&(r="#"),"#"===r?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1):"0x"+n(s)+n(t)+n(e)+n(i)}},function(t,e,i){t.exports={BitmapMask:i(261),GeometryMask:i(262)}},function(t,e,i){var n={AddToDOM:i(118),DOMContentLoaded:i(337),GetScreenOrientation:i(338),GetTarget:i(343),ParseXML:i(344),RemoveFromDOM:i(175),RequestAnimationFrame:i(324)};t.exports=n},function(t,e,i){t.exports={EventEmitter:i(800)}},function(t,e,i){var n=i(0),s=i(9),r=i(21),o=new n({Extends:s,initialize:function(){s.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},function(t,e,i){var n=i(118),s=i(272),r=i(275),o=i(26),a=i(0),h=i(297),l=i(802),u=i(320),c=i(111),d=i(322),f=i(298),p=i(337),g=i(9),v=i(18),m=i(345),y=i(21),x=i(350),T=i(351),w=i(353),E=i(117),_=i(356),b=i(323),A=i(325),S=i(360),C=new a({initialize:function(t){this.config=new h(t),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new g,this.anims=new s(this),this.textures=new _(this),this.cache=new r(this),this.registry=new c(this),this.input=new m(this,this.config),this.scene=new w(this,this.config.sceneConfig),this.device=f,this.scale=new T(this,this.config),this.sound=null,this.sound=S.create(this),this.loop=new b(this,this.config.fps),this.plugins=new x(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,p(this.boot.bind(this))},boot:function(){y.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),u(this),l(this),d(this),n(this.canvas,this.config.parent),this.textures.once(E.READY,this.texturesReady,this),this.events.emit(v.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(v.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),A(this);var t=this.events;t.on(v.HIDDEN,this.onHidden,this),t.on(v.VISIBLE,this.onVisible,this),t.on(v.BLUR,this.onBlur,this),t.on(v.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e);var n=this.renderer;n.preRender(),i.emit(v.PRE_RENDER,n,t,e),this.scene.render(n),n.postRender(),i.emit(v.POST_RENDER,n,t,e)},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e),i.emit(v.PRE_RENDER),i.emit(v.POST_RENDER)},onHidden:function(){this.loop.pause(),this.events.emit(v.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(v.RESUME)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.events.emit(v.DESTROY),this.events.removeAllListeners(),this.scene.destroy(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=C},function(t,e,i){var n=i(118);t.exports=function(t){var e=t.config;if(e.parent&&e.domCreateContainer){var i=document.createElement("div");i.style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: none;","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=i,n(i,e.parent)}}},function(t,e){t.exports="boot"},function(t,e){t.exports="destroy"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameout"},function(t,e){t.exports="gameover"},function(t,e){t.exports="gameobjectdown"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameobjectmove"},function(t,e){t.exports="gameobjectout"},function(t,e){t.exports="gameobjectover"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="wheel"},function(t,e){t.exports="gameobjectup"},function(t,e){t.exports="gameobjectwheel"},function(t,e){t.exports="boot"},function(t,e){t.exports="process"},function(t,e){t.exports="update"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointerdownoutside"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="pointerupoutside"},function(t,e){t.exports="wheel"},function(t,e){t.exports="pointerlockchange"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="start"},function(t,e){t.exports="update"},function(t,e){t.exports=function(t){if(!t)return window.innerHeight;var e=Math.abs(window.orientation),i={w:0,h:0},n=document.createElement("div");return n.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(n),i.w=90===e?n.offsetHeight:window.innerWidth,i.h=90===e?window.innerWidth:n.offsetHeight,document.documentElement.removeChild(n),n=null,90!==Math.abs(window.orientation)?i.h:i.w}},function(t,e){t.exports="addfile"},function(t,e){t.exports="complete"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="load"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="progress"},function(t,e){t.exports="start"},function(t,e,i){var n=i(2),s=i(178);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=n(t.settings,"physics",!1);if(e||i){var r=[];if(e&&r.push(s(e+"Physics")),i)for(var o in i)o=s(o.concat("Physics")),-1===r.indexOf(o)&&r.push(o);return r}}},function(t,e,i){var n=i(2);t.exports=function(t){var e=t.plugins.getDefaultScenePlugins(),i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e,i){t.exports={game:"game",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"}},function(t,e){t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var s,r=i.getElementsByTagName("SubTexture"),o=0;og||c<-g)&&(c=0),c<0&&(c=g+c),-1!==d&&(g=c+(d+1));for(var v=f,m=f,y=0,x=0,T=0;Tr&&(y=w-r),E>o&&(x=E-o),t.add(T,e,i+v,s+m,h-y,l-x),(v+=h+p)+h>r&&(v=f,m+=l+p)}return t}},function(t,e,i){var n=i(2);t.exports=function(t,e,i){var s=n(i,"frameWidth",null),r=n(i,"frameHeight",s);if(!s)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o=t.source[0];t.add("__BASE",0,0,0,o.width,o.height);var a,h=n(i,"startFrame",0),l=n(i,"endFrame",-1),u=n(i,"margin",0),c=n(i,"spacing",0),d=e.cutX,f=e.cutY,p=e.cutWidth,g=e.cutHeight,v=e.realWidth,m=e.realHeight,y=Math.floor((v-u+c)/(s+c)),x=Math.floor((m-u+c)/(r+c)),T=y*x,w=e.x,E=s-w,_=s-(v-p-w),b=e.y,A=r-b,S=r-(m-g-b);(h>T||h<-T)&&(h=0),h<0&&(h=T+h),-1!==l&&(T=h+(l+1));for(var C=u,M=u,O=0,P=e.sourceIndex,R=0;R0){var r=i-t.length;if(r<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),n&&n.call(s,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.splice(o,1),o--;if(0===(o=e.length))return null;i>0&&o>r&&(e.splice(r),o=r);for(var a=0;a0){var o=n-t.length;if(o<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),s&&s.call(r,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.pop(),a--;if(0===(a=e.length))return null;n>0&&a>o&&(e.splice(o),a=o);for(var h=a-1;h>=0;h--){var l=e[h];t.splice(i,0,l),s&&s.call(r,l)}return e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i0){var n=t[i-1],s=t.indexOf(n);t[i]=n,t[s]=e}return t}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e);if(-1===n||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&it.length-1)throw new Error("Index out of bounds");var r=n(t,e);return i&&i.call(s,r),r}},function(t,e,i){var n=i(68);t.exports=function(t,e,i,s,r){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===r&&(r=t),n(t,e,i)){var o=i-e,a=t.splice(e,o);if(s)for(var h=0;h0&&(t.splice(i,1),t.unshift(e)),e}},function(t,e,i){var n=i(68);t.exports=function(t,e,i,s,r){if(void 0===s&&(s=0),void 0===r&&(r=t.length),n(t,s,r))for(var o=s;o0&&i.maxWidth!==l){for(n=0;nl||z-Y>l?(N.push(X.i-1),X.cr?(N.push(X.i+X.word.length),Y=0,B=null):B=X):X.cr&&(N.push(X.i+X.word.length),Y=0,B=null)}for(n=N.length-1;n>=0;n--)s=a,r=N[n],o="\n",a=s.substr(0,r)+o+s.substr(r+1);i.maxWidth=l,i.wrappedText=a,h=a.length,F=[],k=null}for(n=0;nE&&(c=E),d>_&&(d=_);var W=E+w.xAdvance,V=_+v;fR&&(R=D),DR&&(R=D),D0&&(a=(o=U.wrappedText).length);var z=e._bounds.lines;1===Y?X=(z.longest-z.lengths[0])/2:2===Y&&(X=z.longest-z.lengths[0]);for(var G=s.roundPixels,W=0;W0&&(a=(o=L.wrappedText).length);var D=e._bounds.lines;1===O?R=(D.longest-D.lengths[0])/2:2===O&&(R=D.longest-D.lengths[0]),h.translate(-e.displayOriginX,-e.displayOriginY);for(var F=s.roundPixels,k=0;k0!=t>0,this._alpha=t}}});t.exports=r},function(t,e,i){var n=i(1),s=i(1);n=i(937),s=i(938),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){var r=e.list;if(0!==r.length){var o=e.localTransform;s?(o.loadIdentity(),o.multiply(s),o.translate(e.x,e.y),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY)):o.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);for(var h=e.alphaTopLeft,l=e.alphaTopRight,u=e.alphaBottomLeft,c=e.alphaBottomRight,d=e.scrollFactorX,f=e.scrollFactorY,p=r,g=r.length,v=0;v0||e.cropHeight>0;l&&(h.flush(),t.pushScissor(e.x,e.y,e.cropWidth*e.scaleX,e.cropHeight*e.scaleY));var u=h._tempMatrix1,c=h._tempMatrix2,d=h._tempMatrix3,f=h._tempMatrix4;c.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),u.copyFrom(s.matrix),r?(u.multiplyWithOffset(r,-s.scrollX*e.scrollFactorX,-s.scrollY*e.scrollFactorY),c.e=e.x,c.f=e.y,u.multiply(c,d)):(c.e-=s.scrollX*e.scrollFactorX,c.f-=s.scrollY*e.scrollFactorY,u.multiply(c,d));var p=e.frame,g=p.glTexture,v=p.cutX,m=p.cutY,y=g.width,x=g.height,T=e._isTinted&&e.tintFill,w=n.getTintAppendFloatAlpha(e._tintTL,s.alpha*e._alphaTL),E=n.getTintAppendFloatAlpha(e._tintTR,s.alpha*e._alphaTR),_=n.getTintAppendFloatAlpha(e._tintBL,s.alpha*e._alphaBL),b=n.getTintAppendFloatAlpha(e._tintBR,s.alpha*e._alphaBR);h.setTexture2D(g,0);var A,S,C=0,M=0,O=0,P=0,R=e.letterSpacing,L=0,D=0,F=0,k=0,I=e.scrollX,B=e.scrollY,Y=e.fontData,N=Y.chars,X=Y.lineHeight,U=e.fontSize/Y.size,z=0,G=e._align,W=0,V=0;e.getTextBounds(!1);var H=e._bounds.lines;1===G?V=(H.longest-H.lengths[0])/2:2===G&&(V=H.longest-H.lengths[0]);for(var j=s.roundPixels,K=e.displayCallback,q=e.callbackData,J=0;J0&&e.cropHeight>0&&(h.beginPath(),h.rect(0,0,e.cropWidth,e.cropHeight),h.clip());for(var Y=0;Y0&&(N=N%E-E):N>E?N=E:N<0&&(N=E+N%E),null===S&&(S=new o(k+Math.cos(Y)*B,I+Math.sin(Y)*B,v),_.push(S),F+=.01);F<1+U;)w=N*F+Y,x=k+Math.cos(w)*B,T=I+Math.sin(w)*B,S.points.push(new r(x,T,v)),F+=.01;w=N+Y,x=k+Math.cos(w)*B,T=I+Math.sin(w)*B,S.points.push(new r(x,T,v));break;case n.FILL_RECT:u.setTexture2D(M),u.batchFillRect(p[++O],p[++O],p[++O],p[++O],f,c);break;case n.FILL_TRIANGLE:u.setTexture2D(M),u.batchFillTriangle(p[++O],p[++O],p[++O],p[++O],p[++O],p[++O],f,c);break;case n.STROKE_TRIANGLE:u.setTexture2D(M),u.batchStrokeTriangle(p[++O],p[++O],p[++O],p[++O],p[++O],p[++O],v,f,c);break;case n.LINE_TO:null!==S?S.points.push(new r(p[++O],p[++O],v)):(S=new o(p[++O],p[++O],v),_.push(S));break;case n.MOVE_TO:S=new o(p[++O],p[++O],v),_.push(S);break;case n.SAVE:a.push(f.copyToArray());break;case n.RESTORE:f.copyFromArray(a.pop());break;case n.TRANSLATE:k=p[++O],I=p[++O],f.translate(k,I);break;case n.SCALE:k=p[++O],I=p[++O],f.scale(k,I);break;case n.ROTATE:f.rotate(p[++O]);break;case n.SET_TEXTURE:var z=p[++O],G=p[++O];u.currentFrame=z,u.setTexture2D(z.glTexture,0),u.tintEffect=G,M=z.glTexture;break;case n.CLEAR_TEXTURE:u.currentFrame=t.blankTexture,u.tintEffect=2,M=t.blankTexture.glTexture}}}},function(t,e,i){var n=i(1),s=i(1);n=i(950),s=i(951),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){this.pipeline.batchSprite(e,n,s)}},function(t,e){t.exports=function(t,e,i,n,s){t.batchSprite(e,e.frame,n,s)}},function(t,e,i){var n=i(1),s=i(1);n=i(953),s=i(954),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){this.pipeline.batchSprite(e,n,s)}},function(t,e){t.exports=function(t,e,i,n,s){t.batchSprite(e,e.frame,n,s)}},function(t,e,i){t.exports={GravityWell:i(380),Particle:i(381),ParticleEmitter:i(382),ParticleEmitterManager:i(191),Zones:i(960)}},function(t,e,i){var n=i(0),s=i(312),r=i(82),o=i(2),a=i(57),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return this.propertyValue},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if("number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&(this.has(t,"random")||this.hasBoth(t,"start","end")||this.hasBoth(t,"min","max"))){this.start=this.has(t,"start")?t.start:t.min,this.end=this.has(t,"end")?t.end:t.max;var i=this.hasBoth(t,"min","max")||!!t.random;if(i){var n=t.random;Array.isArray(n)&&(this.start=n[0],this.end=n[1]),this.onEmit=this.randomRangedValueEmit}if(this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var s=this.has(t,"ease")?t.ease:"Linear";this.ease=r(s),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i){var n=t.data[e];return(n.max-n.min)*this.ease(i)+n.min}});t.exports=h},function(t,e,i){var n=i(1),s=i(1);n=i(958),s=i(959),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(10);t.exports=function(t,e,i,s,r){var o=e.emitters.list,a=o.length;if(0!==a){var h=this.pipeline,l=h._tempMatrix1.copyFrom(s.matrix),u=h._tempMatrix2,c=h._tempMatrix3,d=h._tempMatrix4.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);l.multiply(d),t.setPipeline(h);var f=s.roundPixels,p=e.defaultFrame.glTexture,g=n.getTintAppendFloatAlphaAndSwap;h.setTexture2D(p,0);for(var v=0;v?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:"ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",TEXT_SET7:"AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:"ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789"}},function(t,e,i){var n=i(6);t.exports=function(t,e){var i=e.width,s=e.height,r=Math.floor(i/2),o=Math.floor(s/2),a=n(e,"chars","");if(""!==a){var h=n(e,"image",""),l=n(e,"offset.x",0),u=n(e,"offset.y",0),c=n(e,"spacing.x",0),d=n(e,"spacing.y",0),f=n(e,"lineSpacing",0),p=n(e,"charsPerRow",null);null===p&&(p=t.sys.textures.getFrame(h).width/i)>a.length&&(p=a.length);for(var g=l,v=u,m={retroFont:!0,font:h,size:i,lineHeight:s+f,chars:{}},y=0,x=0;x0&&r.maxLines1&&(d+=f*(h-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:f,lineHeight:c}}},function(t,e,i){var n=i(1),s=i(1);n=i(969),s=i(970),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(10);t.exports=function(t,e,i,s,r){if(0!==e.width&&0!==e.height){var o=e.frame,a=o.width,h=o.height,l=n.getTintAppendFloatAlpha;this.pipeline.batchTexture(e,o.glTexture,a,h,e.x,e.y,a/e.style.resolution,h/e.style.resolution,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,a,h,l(e._tintTL,s.alpha*e._alphaTL),l(e._tintTR,s.alpha*e._alphaTR),l(e._tintBL,s.alpha*e._alphaBL),l(e._tintBR,s.alpha*e._alphaBR),e._isTinted&&e.tintFill,0,0,s,r)}}},function(t,e){t.exports=function(t,e,i,n,s){0!==e.width&&0!==e.height&&t.batchSprite(e,e.frame,n,s)}},function(t,e,i){var n=i(0),s=i(15),r=i(6),o=i(972),a={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},h=new n({initialize:function(t,e){this.parent=t,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this._font,this.setStyle(e,!1,!0);var i=r(e,"metrics",!1);this.metrics=i?{ascent:r(i,"ascent",0),descent:r(i,"descent",0),fontSize:r(i,"fontSize",0)}:o(this)},setStyle:function(t,e,i){for(var n in void 0===e&&(e=!0),void 0===i&&(i=!1),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px"),a){var o=i?a[n][1]:this[n];this[n]="wordWrapCallback"===n||"wordWrapCallbackScope"===n?r(t,a[n][0],o):s(t,a[n][0],o)}var h=r(t,"font",null);null!==h&&this.setFont(h,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var l=r(t,"fill",null);return null!==l&&(this.color=l),e?this.update(!0):this.parent},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow:function(t,e){e?(t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur):(t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor=0,t.shadowBlur=0)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=o(this)),this.parent.updateText()},setFont:function(t,e){void 0===e&&(e=!0);var i=t,n="",s="";if("string"!=typeof t)i=r(t,"fontFamily","Courier"),n=r(t,"fontSize","16px"),s=r(t,"fontStyle","");else{var o=t.split(" "),a=0;s=o.length>2?o[a++]:"",n=o[a++]||"16px",i=o[a++]||"Courier"}return i===this.fontFamily&&n===this.fontSize&&s===this.fontStyle||(this.fontFamily=i,this.fontSize=n,this.fontStyle=s,e&&this.update(!0)),this.parent},setFontFamily:function(t){return this.fontFamily!==t&&(this.fontFamily=t,this.update(!0)),this.parent},setFontStyle:function(t){return this.fontStyle!==t&&(this.fontStyle=t,this.update(!0)),this.parent},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize!==t&&(this.fontSize=t,this.update(!0)),this.parent},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.parent.width=t),e&&(this.parent.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setResolution:function(t){return this.resolution=t,this.update(!1)},setStroke:function(t,e){return void 0===e&&(e=this.strokeThickness),void 0===t&&0!==this.strokeThickness?(this.strokeThickness=0,this.update(!0)):this.stroke===t&&this.strokeThickness===e||(this.stroke=t,this.strokeThickness=e,this.update(!0)),this.parent},setShadow:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===n&&(n=0),void 0===s&&(s=!1),void 0===r&&(r=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=n,this.shadowStroke=s,this.shadowFill=r,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},function(t,e,i){var n=i(26);t.exports=function(t){var e=n.create(this),i=e.getContext("2d");t.syncFont(e,i);var s=Math.ceil(i.measureText(t.testString).width*t.baselineX),r=s,o=2*r;r=r*t.baselineY|0,e.width=s,e.height=o,i.fillStyle="#f00",i.fillRect(0,0,s,o),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,r);var a={ascent:0,descent:0,fontSize:0};if(!i.getImageData(0,0,s,o))return a.ascent=r,a.descent=r+6,a.fontSize=a.ascent+a.descent,n.remove(e),a;var h,l,u=i.getImageData(0,0,s,o).data,c=u.length,d=4*s,f=0,p=!1;for(h=0;hr;h--){for(l=0;l0)for(u=o.fillTint,c=n.getTintAppendFloatAlphaAndSwap(e.fillColor,e.fillAlpha*d),u.TL=c,u.TR=c,u.BL=c,u.BR=c,C=0;C0)for(u=o.fillTint,c=n.getTintAppendFloatAlphaAndSwap(e.altFillColor,e.altFillAlpha*d),u.TL=c,u.TR=c,u.BL=c,u.BR=c,C=0;C0){var R=o.strokeTint,L=n.getTintAppendFloatAlphaAndSwap(e.outlineFillColor,e.outlineFillAlpha*d);for(R.TL=L,R.TR=L,R.BL=L,R.BR=L,S=1;S0)for(n(h,e),S=0;S0)for(n(h,e,e.altFillColor,e.altFillAlpha*c),S=0;S0){for(s(h,e,e.outlineFillColor,e.outlineFillAlpha*c),A=1;Ao.vertexCapacity&&o.flush(),o.setTexture2D(u,0);for(var m=o.vertexViewF32,y=o.vertexViewU32,x=o.vertexCount*o.vertexComponentCount-1,T=0,w=e.tintFill,E=0;E0?Math.PI*t.radius*t.radius:0}},function(t,e,i){var n=i(65);t.exports=function(t){return new n(t.x,t.y,t.radius)}},function(t,e,i){var n=i(54);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(54);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},function(t,e,i){var n=i(11);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(95);n.Area=i(1078),n.Circumference=i(378),n.CircumferencePoint=i(190),n.Clone=i(1079),n.Contains=i(96),n.ContainsPoint=i(1080),n.ContainsRect=i(1081),n.CopyFrom=i(1082),n.Equals=i(1083),n.GetBounds=i(1084),n.GetPoint=i(376),n.GetPoints=i(377),n.Offset=i(1085),n.OffsetPoint=i(1086),n.Random=i(152),t.exports=n},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},function(t,e,i){var n=i(95);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(96);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(96);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e,i){var n=i(11);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(4),s=i(201);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r,o,a,h,l=t.x,u=t.y,c=t.radius,d=e.x,f=e.y,p=e.radius;if(u===f)0==(a=(o=-2*f)*o-4*(r=1)*(d*d+(h=(p*p-c*c-d*d+l*l)/(2*(l-d)))*h-2*d*h+f*f-p*p))?i.push(new n(h,-o/(2*r))):a>0&&(i.push(new n(h,(-o+Math.sqrt(a))/(2*r))),i.push(new n(h,(-o-Math.sqrt(a))/(2*r))));else{var g=(l-d)/(u-f),v=(p*p-c*c-d*d+l*l-f*f+u*u)/(2*(u-f));0==(a=(o=2*u*g-2*v*g-2*l)*o-4*(r=g*g+1)*(l*l+u*u+v*v-c*c-2*u*v))?(h=-o/(2*r),i.push(new n(h,v-h*g))):a>0&&(h=(-o+Math.sqrt(a))/(2*r),i.push(new n(h,v-h*g)),h=(-o-Math.sqrt(a))/(2*r),i.push(new n(h,v-h*g)))}}return i}},function(t,e,i){var n=i(203),s=i(202);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC(),h=e.getLineD();n(r,t,i),n(o,t,i),n(a,t,i),n(h,t,i)}return i}},function(t,e,i){var n=i(11),s=i(129);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},function(t,e,i){var n=i(205),s=i(129);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=t.getLineA(),o=t.getLineB(),a=t.getLineC(),h=t.getLineD();n(r,e,i),n(o,e,i),n(a,e,i),n(h,e,i)}return i}},function(t,e,i){var n=i(411),s=i(205);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC();s(r,t,i),s(o,t,i),s(a,t,i)}return i}},function(t,e,i){var n=i(203),s=i(413);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=t.getLineA(),o=t.getLineB(),a=t.getLineC();n(r,e,i),n(o,e,i),n(a,e,i)}return i}},function(t,e,i){var n=i(416),s=i(414);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC();s(t,r,i),s(t,o,i),s(t,a,i)}return i}},function(t,e,i){var n=i(418);t.exports=function(t,e){if(!n(t,e))return!1;var i=Math.min(e.x1,e.x2),s=Math.max(e.x1,e.x2),r=Math.min(e.y1,e.y2),o=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=s&&t.y>=r&&t.y<=o}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===r&&(r=0),!(e>t.right+r||it.bottom+r||si&&(i=h.x),h.xr&&(r=h.y),h.yn(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.centerX,e.y=t.centerY,e}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var n=i(163);t.exports=function(t,e,i){var s=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),n(t,s,r)}},function(t,e,i){var n=i(11),s=i(129);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)?(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y):i.setEmpty(),i}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var n=i(4),s=i(35);t.exports=function(t,e,i){void 0===i&&(i=new n),e=s(e);var r=Math.sin(e),o=Math.cos(e),a=o>0?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r)-1&&(s.splice(a,1),this.clear(o,!0))}t.length=0,this._pendingRemoval.length=0,this._list=s.concat(e.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.isActive()},updatePoll:function(t,e){if(!this.isActive())return!1;if(this.pluginEvents.emit(d.UPDATE,t,e),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var i,n=this.manager,s=n.pointers,r=n.pointersTotal;for(i=0;i0){if(this._pollTimer-=e,!(this._pollTimer<0))return!1;this._pollTimer=this.pollRate}var a=!1;for(i=0;i0&&(a=!0)}return a},update:function(t,e){if(!this.isActive())return!1;for(var i=e.length,n=!1,s=0;s0&&(n=!0)}return this._updatedThisFrame=!0,n},clear:function(t,e){void 0===e&&(e=!1);var i=t.input;if(i){e||this.queueForRemoval(t),i.gameObject=void 0,i.target=void 0,i.hitArea=void 0,i.hitAreaCallback=void 0,i.callbackContext=void 0,this.manager.resetCursor(i),t.input=null;var n=this._draggable.indexOf(t);return n>-1&&this._draggable.splice(n,1),(n=this._drag[0].indexOf(t))>-1&&this._drag[0].splice(n,1),(n=this._over[0].indexOf(t))>-1&&this._over[0].splice(n,1),t}},disable:function(t){t.input.enabled=!1},enable:function(t,e,i,n){return void 0===n&&(n=!1),t.input?t.input.enabled=!0:this.setHitArea(t,e,i),t.input&&n&&!t.input.dropZone&&(t.input.dropZone=n),this},hitTestPointer:function(t){for(var e=this.cameras.getCamerasBelowPointer(t),i=0;i0)return t.camera=n,s}return t.camera=e[0],[]},processDownEvents:function(t){var e=0,i=this._temp,n=this._eventData,s=this._eventContainer;n.cancelled=!1;for(var r=!1,o=0;o0&&l(t.x,t.y,t.downX,t.downY)>=s?i=!0:n>0&&e>=t.downTime+n&&(i=!0),i)return this.setDragState(t,3),this.processDragStartList(t)},processDragStartList:function(t){if(3!==this.getDragState(t))return 0;for(var e=this._drag[t.id],i=0;i1&&(this.sortGameObjects(i),this.topOnly&&i.splice(1)),this._drag[t.id]=i,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?(this.setDragState(t,3),this.processDragStartList(t)):(this.setDragState(t,2),0))},processDragMoveEvent:function(t){if(2===this.getDragState(t)&&this.processDragThresholdEvent(t,this.manager.game.loop.now),4!==this.getDragState(t))return 0;for(var e=this._tempZones,i=this._drag[t.id],n=0;n0?(o.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,o,h),a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h)):(o.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,o,h),e[0]?(a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h)):a.target=null)}else!h&&e[0]&&(a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h));if(o.parentContainer){var u=t.x-a.dragStartXGlobal,c=t.y-a.dragStartYGlobal,f=o.getParentRotation(),p=u*Math.cos(f)+c*Math.sin(f),g=c*Math.cos(f)-u*Math.sin(f);p*=1/o.parentContainer.scaleX,g*=1/o.parentContainer.scaleY,s=p+a.dragStartX,r=g+a.dragStartY}else s=t.x-a.dragX,r=t.y-a.dragY;o.emit(d.GAMEOBJECT_DRAG,t,s,r),this.emit(d.DRAG,t,o,s,r)}return i.length},processDragUpEvent:function(t){for(var e=this._drag[t.id],i=0;i0){var r=this.manager,o=this._eventData,a=this._eventContainer;o.cancelled=!1;for(var h=!1,l=0;l0){var s=this.manager,r=this._eventData,o=this._eventContainer;r.cancelled=!1;var a=!1;this.sortGameObjects(e);for(var h=0;h0){for(this.sortGameObjects(s),e=0;e0){for(this.sortGameObjects(r),e=0;e-1&&this._draggable.splice(s,1)}return this},makePixelPerfect:function(t){void 0===t&&(t=1);var e=this.systems.textures;return h(e,t)},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);var n=!1,s=!1,r=!1,o=!1,h=!1,l=!0;if(m(e)){var u=e;e=p(u,"hitArea",null),i=p(u,"hitAreaCallback",null),n=p(u,"draggable",!1),s=p(u,"dropZone",!1),r=p(u,"cursor",!1),o=p(u,"useHandCursor",!1),h=p(u,"pixelPerfect",!1);var c=p(u,"alphaTolerance",1);h&&(e={},i=this.makePixelPerfect(c)),e&&i||(this.setHitAreaFromTexture(t),l=!1)}else"function"!=typeof e||i||(i=e,e={});for(var d=0;d=e}}},function(t,e,i){t.exports={Events:i(131),KeyboardManager:i(346),KeyboardPlugin:i(1199),Key:i(431),KeyCodes:i(120),KeyCombo:i(432),JustDown:i(1204),JustUp:i(1205),DownDuration:i(1206),UpDuration:i(1207)}},function(t,e){t.exports="keydown"},function(t,e){t.exports="keyup"},function(t,e){t.exports="keycombomatch"},function(t,e){t.exports="down"},function(t,e){t.exports="keydown-"},function(t,e){t.exports="keyup-"},function(t,e){t.exports="up"},function(t,e,i){var n=i(0),s=i(9),r=i(131),o=i(18),a=i(6),h=i(53),l=i(130),u=i(431),c=i(120),d=i(432),f=i(1203),p=i(93),g=new n({Extends:s,initialize:function(t){s.call(this),this.game=t.systems.game,this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.manager=t.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],t.pluginEvents.once(h.BOOT,this.boot,this),t.pluginEvents.on(h.START,this.start,this)},boot:function(){var t=this.settings.input;this.enabled=a(t,"keyboard",!0);var e=a(t,"keyboard.capture",null);e&&this.addCaptures(e),this.sceneInputPlugin.pluginEvents.once(h.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.useQueue?this.sceneInputPlugin.pluginEvents.on(h.UPDATE,this.update,this):this.sceneInputPlugin.manager.events.on(h.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(h.SHUTDOWN,this.shutdown,this),this.game.events.on(o.BLUR,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},addCapture:function(t){return this.manager.addCapture(t),this},removeCapture:function(t){return this.manager.removeCapture(t),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:c.UP,down:c.DOWN,left:c.LEFT,right:c.RIGHT,space:c.SPACE,shift:c.SHIFT})},addKeys:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!1);var n={};if("string"==typeof t){t=t.split(",");for(var s=0;s-1?n[s]=t:n[t.keyCode]=t,e&&this.addCapture(t.keyCode),t.setEmitOnRepeat(i),t}return"string"==typeof t&&(t=c[t.toUpperCase()]),n[t]||(n[t]=new u(this,t),e&&this.addCapture(t),n[t].setEmitOnRepeat(i)),n[t]},removeKey:function(t,e){void 0===e&&(e=!1);var i,n=this.keys;if(t instanceof u){var s=n.indexOf(t);s>-1&&(i=this.keys[s],this.keys[s]=void 0)}else"string"==typeof t&&(t=c[t.toUpperCase()]);return n[t]&&(i=n[t],n[t]=void 0),i&&(i.plugin=null,e&&i.destroy()),this},createCombo:function(t,e){return new d(this,t,e)},checkDown:function(t,e){if(this.enabled&&t.isDown){var i=p(this.time-t.timeDown,e);if(i>t._tick)return t._tick=i,!0}return!1},update:function(){var t=this.manager.queue,e=t.length;if(this.isActive()&&0!==e)for(var i=this.keys,n=0;n0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(s=!0,i=n(t,e))}else s=!0,i=n(t,e);return!s&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},function(t,e){t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},function(t,e){t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},function(t,e,i){var n=i(120),s={};for(var r in n)s[n[r]]=r;t.exports=s},function(t,e){t.exports=function(t){return!!t._justDown&&(t._justDown=!1,!0)}},function(t,e){t.exports=function(t){return!!t._justUp&&(t._justUp=!1,!0)}},function(t,e){t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeDown;return t.isDown&&i'),i.push(''),i.push(''),i.push(this.xhrLoader.responseText),i.push(""),i.push(""),i.push("");var n=[i.join("\n")],o=this;try{var a=new window.Blob(n,{type:"image/svg+xml;charset=utf-8"})}catch(t){return o.state=s.FILE_ERRORED,void o.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(o.data),o.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(o.data),o.onProcessError()},r.createObjectURL(this.data,a,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});o.register("htmlTexture",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r0},isLoading:function(){return this.state===s.LOADER_LOADING||this.state===s.LOADER_PROCESSING},isReady:function(){return this.state===s.LOADER_IDLE||this.state===s.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(a.START,this),0===this.list.size?this.loadComplete():(this.state=s.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(c.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(a.PROGRESS,this.progress)},update:function(){this.state===s.LOADER_LOADING&&this.list.size>0&&this.inflight.sizei&&(n=l,i=c)}}return n},moveTo:function(t,e,i,n,s){void 0===n&&(n=60),void 0===s&&(s=0);var o=Math.atan2(i-t.y,e-t.x);return s>0&&(n=r(t.x,t.y,e,i)/(s/1e3)),t.body.velocity.setToPolar(o,n),o},moveToObject:function(t,e,i,n){return this.moveTo(t,e.x,e.y,i,n)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new p),i.setToPolar(s(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new p),i.setToPolar(t,e)},overlapRect:function(t,e,i,n,s,r){return c(this.world,t,e,i,n,s,r)},overlapCirc:function(t,e,i,n,s){return u(this.world,t,e,i,n,s)},shutdown:function(){if(this.world){var t=this.systems.events;t.off(f.UPDATE,this.world.update,this.world),t.off(f.POST_UPDATE,this.world.postUpdate,this.world),t.off(f.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null}},destroy:function(){this.shutdown(),this.scene.sys.events.off(f.START,this.start,this),this.scene=null,this.systems=null}});d.register("ArcadePhysics",v,"arcadePhysics"),t.exports=v},function(t,e){t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},function(t,e){t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},function(t,e){t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,e,i){return this.body.setCollideWorldBounds(t,e,i),this}}},function(t,e){t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},function(t,e){t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this},setDamping:function(t){return this.body.useDamping=t,this}}},function(t,e){var i={enableBody:function(t,e,i,n,s){return t&&this.body.reset(e,i),n&&(this.body.gameObject.active=!0),s&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};t.exports=i},function(t,e){t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},function(t,e){t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},function(t,e){var i={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}};t.exports=i},function(t,e){t.exports={setMass:function(t){return this.body.mass=t,this}}},function(t,e){t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},function(t,e){t.exports={setVelocity:function(t,e){return this.body.setVelocity(t,e),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,e){return this.body.maxVelocity.set(t,e),this}}},function(t,e,i){var n=i(442),s=i(65),r=i(201),o=i(202);t.exports=function(t,e,i,a,h,l){var u=n(t,e-a,i-a,2*a,2*a,h,l);if(0===u.length)return u;for(var c=new s(e,i,a),d=new s,f=[],p=0;pe.deltaAbsY()?y=-1:e.deltaAbsX()0&&u&&t.checkCollision.right&&h&&t.right>i&&(a=t.right-i)>r&&(a=0),0!==a&&(t.customSeparateX?t.overlapX=a:n(t,a)),a}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):e>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=e,0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},function(t,e,i){var n=i(1264);t.exports=function(t,e,i,s,r,o){var a=0,h=e.faceTop,l=e.faceBottom,u=e.collideUp,c=e.collideDown;return o||(h=!0,l=!0,u=!0,c=!0),t.deltaY()<0&&c&&t.checkCollision.up?l&&t.y0&&u&&t.checkCollision.down&&h&&t.bottom>i&&(a=t.bottom-i)>r&&(a=0),0!==a&&(t.customSeparateY?t.overlapY=a:n(t,a)),a}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):e>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=e,0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},function(t,e,i){var n=i(446);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.x,a=e.velocity.x;if(t.immovable||e.immovable)t.immovable?(e.x+=r,e.velocity.x=o-a*e.bounce.x,t.moves&&(e.y+=(t.y-t.prev.y)*t.friction.y)):(t.x-=r,t.velocity.x=a-o*t.bounce.x,e.moves&&(t.y+=(e.y-e.prev.y)*e.friction.y));else{r*=.5,t.x-=r,e.x+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),l=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),u=.5*(h+l);h-=u,l-=u,t.velocity.x=u+h*t.bounce.x,e.velocity.x=u+l*e.bounce.x}return!0}},function(t,e,i){var n=i(447);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateY||e.customSeparateY)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.y,a=e.velocity.y;if(t.immovable||e.immovable)t.immovable?(e.y+=r,e.velocity.y=o-a*e.bounce.y,t.moves&&(e.x+=(t.x-t.prev.x)*t.friction.x)):(t.y-=r,t.velocity.y=a-o*t.bounce.y,e.moves&&(t.x+=(e.x-e.prev.x)*e.friction.x));else{r*=.5,t.y-=r,e.y+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),l=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),u=.5*(h+l);h-=u,l-=u,t.velocity.y=u+h*t.bounce.y,e.velocity.y=u+l*e.bounce.y}return!0}},,,,,,,,,,,function(t,e,i){t.exports={BasePlugin:i(454),DefaultPlugins:i(172),PluginCache:i(21),PluginManager:i(350),ScenePlugin:i(1278)}},function(t,e,i){var n=i(454),s=i(0),r=i(22),o=new s({Extends:n,initialize:function(t,e){n.call(this,e),this.scene=t,this.systems=t.sys,t.sys.events.once(r.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=o},function(t,e,i){var n=i(17),s=i(174),r={Center:i(339),Events:i(92),Orientation:i(340),ScaleManager:i(351),ScaleModes:i(341),Zoom:i(342)};r=n(!1,r=n(!1,r=n(!1,r=n(!1,r,s.CENTER),s.ORIENTATION),s.SCALE_MODE),s.ZOOM),t.exports=r},function(t,e,i){var n=i(121),s=i(17),r={Events:i(22),SceneManager:i(353),ScenePlugin:i(1281),Settings:i(355),Systems:i(177)};r=s(!1,r,n),t.exports=r},function(t,e,i){var n=i(23),s=i(0),r=i(22),o=i(2),a=i(21),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene,this.transitionProgress=0,this._elapsed=0,this._target=null,this._duration=0,this._onUpdate,this._onUpdateScope,this._willSleep=!1,this._willRemove=!1,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.pluginStart,this)},boot:function(){this.systems.events.once(r.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},start:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t,e),this},restart:function(t){var e=this.key;return this.manager.queueOp("stop",e),this.manager.queueOp("start",e,t),this},transition:function(t){void 0===t&&(t={});var e=o(t,"target",!1),i=this.manager.getScene(e);if(!e||!this.checkValidTransition(i))return!1;var n=o(t,"duration",1e3);this._elapsed=0,this._target=i,this._duration=n,this._willSleep=o(t,"sleep",!1),this._willRemove=o(t,"remove",!1);var s=o(t,"onUpdate",null);s&&(this._onUpdate=s,this._onUpdateScope=o(t,"onUpdateScope",this.scene));var a=o(t,"allowInput",!1);this.settings.transitionAllowInput=a;var h=i.sys.settings;return h.isTransition=!0,h.transitionFrom=this.scene,h.transitionDuration=n,h.transitionAllowInput=a,o(t,"moveAbove",!1)?this.manager.moveAbove(this.key,e):o(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,e),i.sys.isSleeping()?i.sys.wake():this.manager.start(e,o(t,"data")),this.systems.events.emit(r.TRANSITION_OUT,i,n),this.systems.events.on(r.UPDATE,this.step,this),!0},checkValidTransition:function(t){return!(!t||t.sys.isActive()||t.sys.isTransitioning()||t===this.scene||this.systems.isTransitioning())},step:function(t,e){this._elapsed+=e,this.transitionProgress=n(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;this.systems.events.off(r.UPDATE,this.step,this),t.events.emit(r.TRANSITION_COMPLETE,this.scene),e.isTransition=!1,e.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(t,e,i,n){return this.manager.add(t,e,i,n)},launch:function(t,e){return t&&t!==this.key&&this.manager.queueOp("start",t,e),this},run:function(t,e){return t&&t!==this.key&&this.manager.queueOp("run",t,e),this},pause:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("pause",t,e),this},resume:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("resume",t,e),this},sleep:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("sleep",t,e),this},wake:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("wake",t,e),this},switch:function(t){return t!==this.key&&this.manager.queueOp("switch",this.key,t),this},stop:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t,e),this},setActive:function(t,e,i){void 0===e&&(e=this.key);var n=this.manager.getScene(e);return n&&n.sys.setActive(t,i),this},setVisible:function(t,e){void 0===e&&(e=this.key);var i=this.manager.getScene(e);return i&&i.sys.setVisible(t),this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isPaused:function(t){return void 0===t&&(t=this.key),this.manager.isPaused(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.swapPosition(t,e),this},moveAbove:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveAbove(t,e),this},moveBelow:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveBelow(t,e),this},remove:function(t){return void 0===t&&(t=this.key),this.manager.remove(t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(r.SHUTDOWN,this.shutdown,this),t.off(r.POST_UPDATE,this.step,this),t.off(r.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});a.register("ScenePlugin",h,"scenePlugin"),t.exports=h},function(t,e,i){t.exports={List:i(124),Map:i(157),ProcessQueue:i(183),RTree:i(448),Set:i(107),Size:i(352)}},function(t,e,i){var n=i(17),s=i(1284),r={CanvasTexture:i(357),Events:i(117),FilterMode:s,Frame:i(94),Parsers:i(359),Texture:i(179),TextureManager:i(356),TextureSource:i(358)};r=n(!1,r,s),t.exports=r},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(136),Parsers:i(1315),Formats:i(31),ImageCollection:i(465),ParseToTilemap:i(223),Tile:i(74),Tilemap:i(474),TilemapCreator:i(1324),TilemapFactory:i(1325),Tileset:i(140),LayerData:i(104),MapData:i(105),ObjectLayer:i(468),DynamicTilemapLayer:i(475),StaticTilemapLayer:i(476)}},function(t,e,i){var n=i(24),s=i(51);t.exports=function(t,e,i,r,o,a,h,l){t<0&&(t=0),e<0&&(e=0),void 0===h&&(h=!0);for(var u=n(t,e,i,r,null,l),c=o-t,d=a-e,f=0;f=0&&p=0&&g=v;o--)(h=c[a][o])&&-1!==h.index&&h.visible&&0!==h.alpha&&i.push(h);else if(2===r)for(a=x;a>=y;a--)for(o=v;c[a]&&o=y;a--)for(o=m;c[a]&&o>=v;o--)(h=c[a][o])&&-1!==h.index&&h.visible&&0!==h.alpha&&i.push(h);return u.tilesDrawn=i.length,u.tilesTotal=d*f,i}},function(t,e,i){var n=i(24),s=i(51),r=i(73);t.exports=function(t,e,i,o,a,h,l){for(var u=-1!==l.collideIndexes.indexOf(t),c=n(e,i,o,a,null,l),d=0;d=0;r--)for(s=n.width-1;s>=0;s--)if((o=n.data[r][s])&&o.index===t){if(a===e)return o;a+=1}}else for(r=0;re)){for(var l=t;l<=e;l++)r(l,i,a);if(h)for(var u=0;u=t&&d.index<=e&&n(d,i)}o&&s(0,0,a.width,a.height,a)}}},function(t,e,i){var n=i(73),s=i(51),r=i(218);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a0&&n(a,t)}}e&&s(0,0,i.width,i.height,i)}},function(t,e){t.exports=function(t,e,i,n){if("number"==typeof t)n.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var s=0,r=t.length;s1||e.scaleY>1)&&(u.imageSmoothingEnabled=!1);for(var f=0;f0&&(t.currentPipeline&&t.currentPipeline.vertexCount>0&&t.flush(),r.vertexBuffer=e.vertexBuffer[a],t.setPipeline(r),t.setTexture2D(s[a].glTexture,0),t.gl.drawArrays(r.topology,0,e.vertexCount[a]));r.vertexBuffer=o,r.viewIdentity(),r.modelIdentity()}},function(t,e){t.exports=function(t,e,i,n,s){e.cull(n);var r=e.culledTiles,o=r.length;if(0!==o){var a=t._tempMatrix1,h=t._tempMatrix2,l=t._tempMatrix3;h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),a.copyFrom(n.matrix);var u=t.currentContext,c=e.gidMap;u.save(),s?(a.multiplyWithOffset(s,-n.scrollX*e.scrollFactorX,-n.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y,a.multiply(h,l),l.copyToContext(u)):(h.e-=n.scrollX*e.scrollFactorX,h.f-=n.scrollY*e.scrollFactorY,h.copyToContext(u));var d=n.alpha*e.alpha;(!t.antialias||e.scaleX>1||e.scaleY>1)&&(u.imageSmoothingEnabled=!1);for(var f=0;f-1&&this._active.splice(s,1),n.destroy()}for(i=0;i=n.delay)){var s=n.elapsed-n.delay;n.elapsed=n.delay,!n.hasDispatched&&n.callback&&(n.hasDispatched=!0,n.callback.apply(n.callbackScope,n.args)),n.repeatCount>0?(n.repeatCount--,n.elapsed=s,n.hasDispatched=!1):this._pendingRemoval.push(n)}}}},shutdown:function(){var t;for(t=0;t-1&&(e.state=u.REMOVED,s.splice(r,1)):(e.state=u.REMOVED,n.splice(r,1))}for(i.length=0,i=this._add,t=0;tb&&(b=C),_[A][S]=C}}}var M=o?n(o):null;return a?function(t,e,n,s){var r,o=0,a=s%m,h=Math.floor(s/m);if(a>=0&&a=0&&h>2],r+=i[(3&n[o])<<4|n[o+1]>>4],r+=i[(15&n[o+1])<<2|n[o+2]>>6],r+=i[63&n[o+2]];return s%3==2?r=r.substring(0,r.length-1)+"=":s%3==1&&(r=r.substring(0,r.length-2)+"=="),r}},function(t,e,i){t.exports={Clone:i(67),Extend:i(17),GetAdvancedValue:i(15),GetFastValue:i(2),GetMinMaxValue:i(1350),GetValue:i(6),HasAll:i(1351),HasAny:i(385),HasValue:i(99),IsPlainObject:i(7),Merge:i(106),MergeRight:i(1352),Pick:i(466),SetValue:i(405)}},function(t,e,i){var n=i(6),s=i(23);t.exports=function(t,e,i,r,o){void 0===o&&(o=i);var a=n(t,e,o);return s(a,i,r)}},function(t,e){t.exports=function(t,e){for(var i=0;i0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this}});n.ZERO=new n,n.RIGHT=new n(1,0),n.LEFT=new n(-1,0),n.UP=new n(0,-1),n.DOWN=new n(0,1),n.ONE=new n(1,1),t.exports=n},function(t,e,i){var n=i(0),s=i(46),r=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=s.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=r},function(t,e,i){var n=i(0),s=i(23),r=i(19),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.displayList,this.updateList,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){this.systems.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},s.register("GameObjectFactory",o,"add"),t.exports=o},function(t,e){t.exports=function(t,e,i){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return t[e];if(-1!==e.indexOf(".")){for(var n=e.split("."),s=t,r=i,o=0;o>>0},getTintAppendFloatAlpha:function(t,e){return((255&(255*e|0))<<24|t)>>>0},getTintAppendFloatAlphaAndSwap:function(t,e){return((255&(255*e|0))<<24|(255&(0|t))<<16|(255&(t>>8|0))<<8|255&(t>>16|0))>>>0},getFloatsFromUintRGB:function(t){return[(255&(t>>16|0))/255,(255&(t>>8|0))/255,(255&(0|t))/255]},getComponentCount:function(t,e){for(var i=0,n=0;n=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},function(t,e,i){t.exports={Alpha:i(527),AlphaSingle:i(266),Animation:i(498),BlendMode:i(269),ComputedSize:i(546),Crop:i(547),Depth:i(270),Flip:i(548),GetBounds:i(549),Mask:i(274),Origin:i(566),PathFollower:i(567),Pipeline:i(153),ScrollFactor:i(277),Size:i(568),Texture:i(569),TextureCrop:i(570),Tint:i(571),ToJSON:i(278),Transform:i(279),TransformMatrix:i(32),Visible:i(280)}},function(t,e){var i={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=i},function(t,e,i){var n=i(0),s=i(278),r=i(113),o=i(9),a=i(90),h=new n({Extends:o,initialize:function(t,e){o.call(this),this.scene=t,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new r(this)),this},setData:function(t,e){return this.data||(this.data=new r(this)),this.data.set(t,e),this},getData:function(t){return this.data||(this.data=new r(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.input&&(this.input.enabled=!1),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},update:function(){},toJSON:function(){return s(this)},willRender:function(t){return!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return i.unshift(this.scene.sys.displayList.getIndex(t)),i},destroy:function(t){if(void 0===t&&(t=!1),this.scene&&!this.ignoreDestroy){this.preDestroy&&this.preDestroy.call(this),this.emit(a.DESTROY,this);var e=this.scene.sys;t||(e.displayList.remove(this),e.updateList.remove(this)),this.input&&(e.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),t||e.queueDepthSort(),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0,this.removeAllListeners()}}});h.RENDER_MASK=15,t.exports=h},function(t,e,i){var n=i(168),s=i(6);t.exports=function(t,e,i){var r=s(t,e,null);if(null===r)return i;if(Array.isArray(r))return n.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return n.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return n.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},function(t,e,i){var n=i(0),s=i(23),r=i(19),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.displayList,this.updateList,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},s.register("GameObjectCreator",o,"make"),t.exports=o},function(t,e,i){var n=i(7),s=function(){var t,e,i,r,o,a,h=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof h&&(c=h,h=arguments[1]||{},l=2),u===l&&(h=this,--l);l=400&&t.status<=599&&(n=!1),this.resetXHR(),this.loader.nextFile(this,n)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(r.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=s.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=s.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){this.state=s.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.cache.add(this.key,this.data),this.pendingDestroy()},pendingDestroy:function(t){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(r.FILE_COMPLETE,e,i,t),this.loader.emit(r.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this)},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var n=new FileReader;n.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+n.result.split(",")[1]},n.onerror=t.onerror,n.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},function(t,e){t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},function(t,e){var i={},n={},s={register:function(t,e,n,s){void 0===s&&(s=!1),i[t]={plugin:e,mapping:n,custom:s}},registerCustom:function(t,e,i,s){n[t]={plugin:e,mapping:i,data:s}},hasCore:function(t){return i.hasOwnProperty(t)},hasCustom:function(t){return n.hasOwnProperty(t)},getCore:function(t){return i[t]},getCustom:function(t){return n[t]},getCustomClass:function(t){return n.hasOwnProperty(t)?n[t].plugin:null},remove:function(t){i.hasOwnProperty(t)&&delete i[t]},removeCustom:function(t){n.hasOwnProperty(t)&&delete n[t]},destroyCorePlugins:function(){for(var t in i)i.hasOwnProperty(t)&&delete i[t]},destroyCustomPlugins:function(){for(var t in n)n.hasOwnProperty(t)&&delete n[t]}};t.exports=s},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=o.width),void 0===s&&(s=o.height);var a=n(r,"isNotEmpty",!1),h=n(r,"isColliding",!1),l=n(r,"hasInterestingFace",!1);t<0&&(i+=t,t=0),e<0&&(s+=e,e=0),t+i>o.width&&(i=Math.max(o.width-t,0)),e+s>o.height&&(s=Math.max(o.height-e,0));for(var u=[],c=e;c=0;o--)t[o][e]=i+a*n,a++;return t}},function(t,e,i){var n,s,r,o=i(29),a=i(164),h=[],l=!1;t.exports={create2D:function(t,e,i){return n(t,e,i,o.CANVAS)},create:n=function(t,e,i,n,r){var u;void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=o.CANVAS),void 0===r&&(r=!1);var c=s(n);return null===c?(c={parent:t,canvas:document.createElement("canvas"),type:n},n===o.CANVAS&&h.push(c),u=c.canvas):(c.parent=t,u=c.canvas),r&&(c.parent=u),u.width=e,u.height=i,l&&n===o.CANVAS&&a.disable(u.getContext("2d")),u},createWebGL:function(t,e,i){return n(t,e,i,o.WEBGL)},disableSmoothing:function(){l=!0},enableSmoothing:function(){l=!1},first:s=function(t){if(void 0===t&&(t=o.CANVAS),t===o.WEBGL)return null;for(var e=0;e0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):n||r?s.TAU-(r>0?Math.acos(-n/this.scaleY):-Math.acos(n/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),n=this.matrix,s=n[0],r=n[1],o=n[2],a=n[3];return n[0]=s*i+o*e,n[1]=r*i+a*e,n[2]=s*-e+o*i,n[3]=r*-e+a*i,this},multiply:function(t,e){var i=this.matrix,n=t.matrix,s=i[0],r=i[1],o=i[2],a=i[3],h=i[4],l=i[5],u=n[0],c=n[1],d=n[2],f=n[3],p=n[4],g=n[5],v=void 0===e?this:e;return v.a=u*s+c*o,v.b=u*r+c*a,v.c=d*s+f*o,v.d=d*r+f*a,v.e=p*s+g*o+h,v.f=p*r+g*a+l,v},multiplyWithOffset:function(t,e,i){var n=this.matrix,s=t.matrix,r=n[0],o=n[1],a=n[2],h=n[3],l=e*r+i*a+n[4],u=e*o+i*h+n[5],c=s[0],d=s[1],f=s[2],p=s[3],g=s[4],v=s[5];return n[0]=c*r+d*a,n[1]=c*o+d*h,n[2]=f*r+p*a,n[3]=f*o+p*h,n[4]=g*r+v*a+l,n[5]=g*o+v*h+u,this},transform:function(t,e,i,n,s,r){var o=this.matrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],d=o[5];return o[0]=t*a+e*l,o[1]=t*h+e*u,o[2]=i*a+n*l,o[3]=i*h+n*u,o[4]=s*a+r*l+c,o[5]=s*h+r*u+d,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var n=this.matrix,s=n[0],r=n[1],o=n[2],a=n[3],h=n[4],l=n[5];return i.x=t*s+e*o+h,i.y=t*r+e*a+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=e*s-i*n;return t[0]=s/a,t[1]=-i/a,t[2]=-n/a,t[3]=e/a,t[4]=(n*o-s*r)/a,t[5]=-(e*o-i*r)/a,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){var e=this.matrix;return t.setTransform(e[0],e[1],e[2],e[3],e[4],e[5]),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,i,n,s,r){var o=this.matrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=n,o[4]=s,o[5]=r,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],n=e[1],s=e[2],r=e[3],o=i*r-n*s;if(t.translateX=e[4],t.translateY=e[5],i||n){var a=Math.sqrt(i*i+n*n);t.rotation=n>0?Math.acos(i/a):-Math.acos(i/a),t.scaleX=a,t.scaleY=o/a}else if(s||r){var h=Math.sqrt(s*s+r*r);t.rotation=.5*Math.PI-(r>0?Math.acos(-s/h):-Math.acos(s/h)),t.scaleX=o/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,i,n,s){var r=this.matrix,o=Math.sin(i),a=Math.cos(i);return r[4]=t,r[5]=e,r[0]=a*n,r[1]=o*n,r[2]=-o*s,r[3]=a*s,this},applyInverse:function(t,e,i){void 0===i&&(i=new r);var n=this.matrix,s=n[0],o=n[1],a=n[2],h=n[3],l=n[4],u=n[5],c=1/(s*h+a*-o);return i.x=h*c*t+-a*c*e+(u*a-l*h)*c,i.y=s*c*e+-o*c*t+(-u*s+l*o)*c,i},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.decomposedMatrix=null}});t.exports=o},function(t,e,i){var n=i(0),s=i(162),r=i(292),o=i(163),a=i(293),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(t,e,i,n)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(t,e,i,n,s){return void 0===n&&(n=255),void 0===s&&(s=!0),this._locked=!0,this.red=t,this.green=e,this.blue=i,this.alpha=n,this._locked=!1,this.update(s)},setGLTo:function(t,e,i,n){return void 0===n&&(n=1),this._locked=!0,this.redGL=t,this.greenGL=e,this.blueGL=i,this.alphaGL=n,this._locked=!1,this.update(!0)},setFromRGB:function(t){return this._locked=!0,this.red=t.r,this.green=t.g,this.blue=t.b,t.hasOwnProperty("a")&&(this.alpha=t.a),this._locked=!1,this.update(!0)},setFromHSV:function(t,e,i){return o(t,e,i,this)},update:function(t){if(void 0===t&&(t=!1),this._locked)return this;var e=this.r,i=this.g,n=this.b,o=this.a;return this._color=s(e,i,n),this._color32=r(e,i,n,o),this._rgba="rgba("+e+","+i+","+n+","+o/255+")",t&&a(e,i,n,this),this},updateHSV:function(){var t=this.r,e=this.g,i=this.b;return a(t,e,i,this),this},clone:function(){return new h(this.r,this.g,this.b,this.a)},gray:function(t){return this.setTo(t,t,t)},random:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t)),n=Math.floor(t+Math.random()*(e-t)),s=Math.floor(t+Math.random()*(e-t));return this.setTo(i,n,s)},randomGray:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t));return this.setTo(i,i,i)},saturate:function(t){return this.s+=t/100,this},desaturate:function(t){return this.s-=t/100,this},lighten:function(t){return this.v+=t/100,this},darken:function(t){return this.v-=t/100,this},brighten:function(t){var e=this.r,i=this.g,n=this.b;return e=Math.max(0,Math.min(255,e-Math.round(-t/100*255))),i=Math.max(0,Math.min(255,i-Math.round(-t/100*255))),n=Math.max(0,Math.min(255,n-Math.round(-t/100*255))),this.setTo(e,i,n)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(t){this.gl[0]=Math.min(Math.abs(t),1),this.r=Math.floor(255*this.gl[0]),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(t){this.gl[1]=Math.min(Math.abs(t),1),this.g=Math.floor(255*this.gl[1]),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(t){this.gl[2]=Math.min(Math.abs(t),1),this.b=Math.floor(255*this.gl[2]),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(t){this.gl[3]=Math.min(Math.abs(t),1),this.a=Math.floor(255*this.gl[3]),this.update()}},red:{get:function(){return this.r},set:function(t){t=Math.floor(Math.abs(t)),this.r=Math.min(t,255),this.gl[0]=t/255,this.update(!0)}},green:{get:function(){return this.g},set:function(t){t=Math.floor(Math.abs(t)),this.g=Math.min(t,255),this.gl[1]=t/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(t){t=Math.floor(Math.abs(t)),this.b=Math.min(t,255),this.gl[2]=t/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(t){t=Math.floor(Math.abs(t)),this.a=Math.min(t,255),this.gl[3]=t/255,this.update()}},h:{get:function(){return this._h},set:function(t){this._h=t,o(t,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(t){this._s=t,o(this._h,t,this._v,this)}},v:{get:function(){return this._v},set:function(t){this._v=t,o(this._h,this._s,t,this)}}});t.exports=h},function(t,e){t.exports=function(t,e,i,n,s,r){var o;void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=1);var a=0,h=t.length;if(1===r)for(o=s;o=0;o--)t[o][e]+=i+a*n,a++;return t}},function(t,e,i){var n=i(13);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.fillColor,r=n||e.fillAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.fillStyle="rgba("+o+","+a+","+h+","+r+")"}},,function(t,e){t.exports=function(t){return t.y+t.height-t.height*t.originY}},function(t,e){t.exports=function(t,e){return t.y=e+t.height*t.originY,t}},function(t,e){t.exports=function(t){return t.x-t.width*t.originX}},function(t,e){t.exports=function(t,e){return t.x=e+t.width*t.originX,t}},function(t,e){t.exports=function(t){return t.x+t.width-t.width*t.originX}},function(t,e){t.exports=function(t,e){return t.x=e-t.width+t.width*t.originX,t}},function(t,e){t.exports=function(t,e){return t.y=e-t.height+t.height*t.originY,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY}},function(t,e){t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},function(t,e){t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i}},function(t,e,i){t.exports={DESTROY:i(641),FADE_IN_COMPLETE:i(642),FADE_IN_START:i(643),FADE_OUT_COMPLETE:i(644),FADE_OUT_START:i(645),FLASH_COMPLETE:i(646),FLASH_START:i(647),PAN_COMPLETE:i(648),PAN_START:i(649),POST_RENDER:i(650),PRE_RENDER:i(651),SHAKE_COMPLETE:i(652),SHAKE_START:i(653),ZOOM_COMPLETE:i(654),ZOOM_START:i(655)}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.strokeColor,r=n||e.strokeAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.strokeStyle="rgba("+o+","+a+","+h+","+r+")",t.lineWidth=e.lineWidth}},function(t,e){t.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},function(t,e,i){var n=i(138),s=i(24);t.exports=function(t,e,i,r,o){for(var a=null,h=null,l=null,u=null,c=s(t,e,i,r,null,o),d=0;d0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e,i){var n=i(0),s=i(272),r=i(150),o=i(46),a=i(151),h=i(3),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=o.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(t){return void 0===t&&(t=new h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=l},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e,i){t.exports={COMPLETE:i(882),DECODED:i(883),DECODED_ALL:i(884),DESTROY:i(885),DETUNE:i(886),GLOBAL_DETUNE:i(887),GLOBAL_MUTE:i(888),GLOBAL_RATE:i(889),GLOBAL_VOLUME:i(890),LOOP:i(891),LOOPED:i(892),MUTE:i(893),PAUSE_ALL:i(894),PAUSE:i(895),PLAY:i(896),RATE:i(897),RESUME_ALL:i(898),RESUME:i(899),SEEK:i(900),STOP_ALL:i(901),STOP:i(902),UNLOCKED:i(903),VOLUME:i(904)}},function(t,e,i){var n=i(0),s=i(20),r=i(21),o=i(8),a=i(2),h=i(6),l=i(7),u=new n({Extends:r,initialize:function(t,e,i,n,o){var u="json";if(l(e)){var c=e;e=a(c,"key"),i=a(c,"url"),n=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"dataKey",o)}var d={type:"json",cache:t.cacheManager.json,extension:u,responseType:"text",key:e,url:i,xhrSettings:n,config:o};r.call(this,t,d),l(i)&&(this.data=o?h(i,o):i,this.state=s.FILE_POPULATED)},onProcess:function(){if(this.state!==s.FILE_POPULATED){this.state=s.FILE_PROCESSING;var t=JSON.parse(this.xhrLoader.responseText),e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});o.register("json",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s80*i){n=h=t[0],a=l=t[1];for(var T=i;Th&&(h=u),f>l&&(l=f);g=0!==(g=Math.max(h-n,l-a))?1/g:0}return o(y,x,i,n,a,g),x}function s(t,e,i,n,s){var r,o;if(s===A(t,e,i,n)>0)for(r=e;r=e;r-=n)o=E(r,t[r],t[r+1],o);return o&&y(o,o.next)&&(_(o),o=o.next),o}function r(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!y(n,n.next)&&0!==m(n.prev,n,n.next))n=n.next;else{if(_(n),(n=e=n.prev)===n.next)break;i=!0}}while(i||n!==e);return e}function o(t,e,i,n,s,c,d){if(t){!d&&c&&function(t,e,i,n){var s=t;do{null===s.z&&(s.z=f(s.x,s.y,e,i,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,i,n,s,r,o,a,h,l=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||h>0&&n;)0!==a&&(0===h||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,h--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,l*=2}while(o>1)}(s)}(t,n,s,c);for(var p,g,v=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,n,s,c):a(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),_(t),t=g.next,v=g.next;else if((t=g)===v){d?1===d?o(t=l(t,e,i),e,i,n,s,c,2):2===d&&u(t,e,i,n,s,c):o(r(t),e,i,n,s,c,1);break}}}function a(t){var e=t.prev,i=t,n=t.next;if(m(e,i,n)>=0)return!1;for(var s=t.next.next;s!==t.prev;){if(g(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&m(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function h(t,e,i,n){var s=t.prev,r=t,o=t.next;if(m(s,r,o)>=0)return!1;for(var a=s.xr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,u=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=f(a,h,e,i,n),d=f(l,u,e,i,n),p=t.prevZ,v=t.nextZ;p&&p.z>=c&&v&&v.z<=d;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&m(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,v!==t.prev&&v!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&m(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;v&&v.z<=d;){if(v!==t.prev&&v!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function l(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!y(s,r)&&x(s,n,n.next,r)&&T(s,r)&&T(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),_(n),_(n.next),n=t=r),n=n.next}while(n!==t);return n}function u(t,e,i,n,s,a){var h=t;do{for(var l=h.next.next;l!==h.prev;){if(h.i!==l.i&&v(h,l)){var u=w(h,l);return h=r(h,h.next),u=r(u,u.next),o(h,e,i,n,s,a),void o(u,e,i,n,s,a)}l=l.next}h=h.next}while(h!==t)}function c(t,e){return t.x-e.x}function d(t,e){if(e=function(t,e){var i,n=e,s=t.x,r=t.y,o=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&a>o){if(o=a,a===s){if(r===n.y)return n;if(r===n.next.y)return n.next}i=n.x=n.x&&n.x>=u&&s!==n.x&&g(ri.x)&&T(n,t)&&(i=n,d=h),n=n.next;return i}(t,e)){var i=w(e,t);r(i,i.next)}}function f(t,e,i,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*s)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*s)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{e.x=0&&(t-o)*(n-a)-(i-o)*(e-a)>=0&&(i-o)*(r-a)-(s-o)*(n-a)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&x(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&T(t,e)&&T(e,t)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(t,e)}function m(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function y(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,i,n){return!!(y(t,e)&&y(i,n)||y(t,n)&&y(i,e))||m(t,e,i)>0!=m(t,e,n)>0&&m(i,n,t)>0!=m(i,n,e)>0}function T(t,e){return m(t.prev,t,t.next)<0?m(t,e,t.next)>=0&&m(t,t.prev,e)>=0:m(t,e,t.prev)<0||m(t,t.next,e)<0}function w(t,e){var i=new b(t.i,t.x,t.y),n=new b(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function E(t,e,i,n){var s=new b(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function _(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function b(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(t,e,i,n){for(var s=0,r=e,o=i-n;r0&&(n+=t[s-1].length,i.holes.push(n))}return i}},function(t,e){t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},function(t,e){t.exports=function(t,e,i,n){var s=t.length;if(e<0||e>s||e>=i||i>s||e+i>s){if(n)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},function(t,e,i){var n=i(0),s=i(12),r=i(14),o=i(960),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Size,s.TextureCrop,s.Tint,s.Transform,s.Visible,o],initialize:function(t,e,i,n,o){r.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new s.Animation(this),this.setTexture(n,o),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e,i){return this.anims.play(t,e,i),this},toJSON:function(){return s.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=a},function(t,e,i){var n=i(10);t.exports=function(t,e,i,s,r){var o=t.strokeTint,a=n.getTintAppendFloatAlphaAndSwap(e.strokeColor,e.strokeAlpha*i);o.TL=a,o.TR=a,o.BL=a,o.BR=a;var h=e.pathData,l=h.length-1,u=e.lineWidth,c=u/2,d=h[0]-s,f=h[1]-r;e.closePath||(l-=2);for(var p=2;p=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=u},function(t,e,i){var n=i(0),s=i(20),r=i(21),o=i(8),a=i(2),h=i(7),l=new n({Extends:r,initialize:function t(e,i,n,s,o){var l,u="png";if(h(i)){var c=i;i=a(c,"key"),n=a(c,"url"),l=a(c,"normalMap"),s=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"frameConfig")}Array.isArray(n)&&(l=n[1],n=n[0]);var d={type:"image",cache:e.textureManager,extension:u,responseType:"blob",key:i,url:n,xhrSettings:s,config:o};if(r.call(this,e,d),l){var f=new t(e,this.key,l,s,o);f.type="normalMap",this.setLink(f),e.addFile(f)}},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){r.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(t.data),t.onProcessError()},r.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===s.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});o.register("image",function(t,e,i){if(Array.isArray(t))for(var n=0;nthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=t.properties,this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(t){var e=this.tilemapLayer;return e?e.tileToWorldX(this.x,t):this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return void 0===e&&(e=new r),e.x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-e.y,e},getCenterX:function(t){return(this.getLeft(t)+this.getRight(t))/2},getCenterY:function(t){return(this.getTop(t)+this.getBottom(t))/2},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){(void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){(void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight,this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.layer.tilemapLayer;if(t){var e=t.gidMap[this.index];if(e)return e}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=o},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e){t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,n=t[e],s=e;si&&(e=i/2);var n=Math.max(1,Math.round(i/e));return s(this.getSpacedPoints(n),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],n=this.getPoint(0,this._tmpVec2A),s=0;i.push(0);for(var r=1;r<=t;r++)s+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(n),i.push(s),n.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var n=0;n<=t;n++)i.push(this.getPoint(n/t));return i},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var n=0;n<=t;n++){var s=this.getUtoTmapping(n/t,null,t);i.push(this.getPoint(s))}return i},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=t-1e-4,n=t+1e-4;return i<0&&(i=0),n>1&&(n=1),this.getPoint(i,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var n,s=this.getLengths(i),r=0,o=s.length;n=e?Math.min(e,s[o-1]):t*s[o-1];for(var a,h=0,l=o-1;h<=l;)if((a=s[r=Math.floor(h+(l-h)/2)]-n)<0)h=r+1;else{if(!(a>0)){l=r;break}l=r-1}if(s[r=l]===n)return r/(o-1);var u=s[r];return(r+(n-u)/(s[r+1]-u))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},function(t,e,i){t.exports={ADD:i(861),COMPLETE:i(862),FILE_COMPLETE:i(863),FILE_KEY_COMPLETE:i(864),FILE_LOAD_ERROR:i(865),FILE_LOAD:i(866),FILE_PROGRESS:i(867),POST_PROCESS:i(868),PROGRESS:i(869),START:i(870)}},function(t,e,i){var n=i(166),s=i(179);t.exports=function(t,e){var i=n.Power0;if("string"==typeof t)if(n.hasOwnProperty(t))i=n[t];else{var r="";t.indexOf(".")&&("in"===(r=t.substr(t.indexOf(".")+1)).toLowerCase()?r="easeIn":"out"===r.toLowerCase()?r="easeOut":"inout"===r.toLowerCase()&&(r="easeInOut")),t=s(t.substr(0,t.indexOf(".")+1)+r),n.hasOwnProperty(t)&&(i=n[t])}else"function"==typeof t?i=t:Array.isArray(t)&&t.length;if(!e)return i;var o=e.slice(0);return o.unshift(0),function(t){return o[0]=t,i.apply(this,o)}}},function(t,e){t.exports=function(t,e,i){var n=t.x3-t.x1,s=t.y3-t.y1,r=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,h=i-t.y1,l=n*n+s*s,u=n*r+s*o,c=n*a+s*h,d=r*r+o*o,f=r*a+o*h,p=l*d-u*u,g=0===p?0:1/p,v=(d*c-u*f)*g,m=(l*f-u*c)*g;return v>=0&&m>=0&&v+m<1}},function(t,e,i){var n=i(4);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.x1,r=t.y1,o=t.x2,a=t.y2,h=e.x1,l=e.y1,u=e.x2,c=e.y2,d=(u-h)*(r-l)-(c-l)*(s-h),f=(o-s)*(r-l)-(a-r)*(s-h),p=(c-l)*(o-s)-(u-h)*(a-r);if(0===p)return!1;var g=d/p,v=f/p;return g>=0&&g<=1&&v>=0&&v<=1&&(i.x=s+g*(o-s),i.y=r+g*(a-r),!0)}},function(t,e){t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},,function(t,e,i){var n=i(22);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e){t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},function(t,e){t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},function(t,e,i){t.exports={DESTROY:i(576),VIDEO_COMPLETE:i(577),VIDEO_CREATED:i(578),VIDEO_ERROR:i(579),VIDEO_LOOP:i(580),VIDEO_PLAY:i(581),VIDEO_SEEKED:i(582),VIDEO_SEEKING:i(583),VIDEO_STOP:i(584),VIDEO_TIMEOUT:i(585),VIDEO_UNLOCKED:i(586)}},function(t,e,i){var n=i(0),s=i(12),r=i(35),o=i(9),a=i(48),h=i(11),l=i(32),u=i(161),c=i(3),d=new n({Extends:o,Mixins:[s.Alpha,s.Visible],initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),o.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.resolution=1,this.roundPixels=!1,this.useBounds=!1,this.worldView=new h,this.dirty=!0,this._x=t,this._y=e,this._cx=0,this._cy=0,this._cw=0,this._ch=0,this._width=i,this._height=n,this._bounds=new h,this._scrollX=0,this._scrollY=0,this._zoom=1,this._rotation=0,this.matrix=new l,this.transparent=!0,this.backgroundColor=u("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new c(i/2,n/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this},getScroll:function(t,e,i){void 0===i&&(i=new c);var n=.5*this.width,s=.5*this.height;return i.x=t-n,i.y=e-s,this.useBounds&&(i.x=this.clampX(i.x),i.y=this.clampY(i.y)),i},centerOnX:function(t){var e=.5*this.width;return this.midPoint.x=t,this.scrollX=t-e,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(t){var e=.5*this.height;return this.midPoint.y=t,this.scrollY=t-e,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(t,e){return this.centerOnX(t),this.centerOnY(e),this},centerToBounds:function(){if(this.useBounds){var t=this._bounds,e=.5*this.width,i=.5*this.height;this.midPoint.set(t.centerX,t.centerY),this.scrollX=t.centerX-e,this.scrollY=t.centerY-i}return this},centerToSize:function(){return this.scrollX=.5*this.width,this.scrollY=.5*this.height,this},cull:function(t){if(this.disableCull)return t;var e=this.matrix.matrix,i=e[0],n=e[1],s=e[2],r=e[3],o=i*r-n*s;if(!o)return t;var a=e[4],h=e[5],l=this.scrollX,u=this.scrollY,c=this.width,d=this.height,f=this.culledObjects,p=t.length;o=1/o,f.length=0;for(var g=0;gC&&wA&&Es&&(t=s),t},clampY:function(t){var e=this._bounds,i=this.displayHeight,n=e.y+(i-this.height)/2,s=Math.max(n,n+e.height-i);return ts&&(t=s),t},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=r(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=u(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n,s){return void 0===s&&(s=!1),this._bounds.setTo(t,e,i,n),this.dirty=!0,this.useBounds=!0,s?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(t){void 0===t&&(t=new h);var e=this._bounds;return t.setTo(e.x,e.y,e.width,e.height),t},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t){this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=t;var e=t.sys;this.sceneManager=e.game.scene,this.scaleManager=e.scale,this.cameraManager=e.cameras;var i=this.scaleManager.resolution;return this.resolution=i,this._cx=this._x*i,this._cy=this._y*i,this._cw=this._width*i,this._ch=this._height*i,this.updateSystem(),this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setZoom:function(t){return void 0===t&&(t=1),0===t&&(t=.001),this.zoom=t,this},setMask:function(t,e){return void 0===e&&(e=!0),this.mask=t,this._maskCamera=e?this.cameraManager.default:this,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},update:function(){},updateSystem:function(){if(this.scaleManager){var t=0!==this._x||0!==this._y||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,e=this.sceneManager;t&&!this._customViewport?e.customViewports++:!t&&this._customViewport&&e.customViewports--,this.dirty=!0,this._customViewport=t}},destroy:function(){this.emit(a.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(t){this._x=t,this._cx=t*this.resolution,this.updateSystem()}},y:{get:function(){return this._y},set:function(t){this._y=t,this._cy=t*this.resolution,this.updateSystem()}},width:{get:function(){return this._width},set:function(t){this._width=t,this._cw=t*this.resolution,this.updateSystem()}},height:{get:function(){return this._height},set:function(t){this._height=t,this._ch=t*this.resolution,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(t){this._scrollX=t,this.dirty=!0}},scrollY:{get:function(){return this._scrollY},set:function(t){this._scrollY=t,this.dirty=!0}},zoom:{get:function(){return this._zoom},set:function(t){this._zoom=t,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoom}},displayHeight:{get:function(){return this.height/this.zoom}}});t.exports=d},function(t,e,i){t.exports={ENTER_FULLSCREEN:i(694),FULLSCREEN_FAILED:i(695),FULLSCREEN_UNSUPPORTED:i(696),LEAVE_FULLSCREEN:i(697),ORIENTATION_CHANGE:i(698),RESIZE:i(699)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),n?(i+t)/e:i+t)}},function(t,e,i){var n=i(0),s=i(22),r=i(17),o=new n({initialize:function(t,e,i,n,s,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0}},this.setSize(r,o,n,s)},setSize:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=0),this.cutX=i,this.cutY=n,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var s=this.data,r=s.cut;r.x=i,r.y=n,r.w=t,r.h=e,r.r=i+t,r.b=n+e,s.sourceSize.w=t,s.sourceSize.h=e,s.spriteSourceSize.w=t,s.spriteSourceSize.h=e,s.radius=.5*Math.sqrt(t*t+e*e);var o=s.drawImage;return o.x=i,o.y=n,o.width=t,o.height=e,this.updateUVs()},setTrim:function(t,e,i,n,s,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=n,a.w=s,a.h=r,a.r=i+s,a.b=n+r,this.x=i,this.y=n,this.width=s,this.height=r,this.halfWidth=.5*s,this.halfHeight=.5*r,this.centerX=Math.floor(s/2),this.centerY=Math.floor(r/2),this.updateUVs()},setCropUVs:function(t,e,i,n,r,o,a){var h=this.cutX,l=this.cutY,u=this.cutWidth,c=this.cutHeight,d=this.realWidth,f=this.realHeight,p=h+(e=s(e,0,d)),g=l+(i=s(i,0,f)),v=n=s(n,0,d-e),m=r=s(r,0,f-i),y=this.data;if(y.trim){var x=y.spriteSourceSize,T=e+(n=s(n,0,u-e)),w=i+(r=s(r,0,c-i));if(!(x.rT||x.y>w)){var E=Math.max(x.x,e),_=Math.max(x.y,i),b=Math.min(x.r,T)-E,A=Math.min(x.b,w)-_;v=b,m=A,p=o?h+(u-(E-x.x)-b):h+(E-x.x),g=a?l+(c-(_-x.y)-A):l+(_-x.y),e=E,i=_,n=b,r=A}else p=0,g=0,v=0,m=0}else o&&(p=h+(u-e-n)),a&&(g=l+(c-i-r));var S=this.source.width,C=this.source.height;return t.u0=Math.max(0,p/S),t.v0=Math.max(0,g/C),t.u1=Math.min(1,(p+v)/S),t.v1=Math.min(1,(g+m)/C),t.x=e,t.y=i,t.cx=p,t.cy=g,t.cw=v,t.ch=m,t.width=n,t.height=r,t.flipX=o,t.flipY=a,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=n;var r=this.source.width,o=this.source.height;return this.u0=t/r,this.v0=e/o,this.u1=(t+i)/r,this.v1=(e+n)/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new o(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=r(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=o},function(t,e,i){var n=i(0),s=i(96),r=i(390),o=i(391),a=i(46),h=i(154),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=a.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=l},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var n=i(238),s=i(0),r=i(90),o=i(2),a=i(6),h=i(7),l=i(384),u=i(108),c=i(69),d=new s({initialize:function(t,e,i){i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?h(e[0])&&(i=e,e=null):h(e)&&(i=e,e=null),this.scene=t,this.children=new u(e),this.isParent=!0,this.type="Group",this.classType=o(i,"classType",c),this.name=o(i,"name",""),this.active=o(i,"active",!0),this.maxSize=o(i,"maxSize",-1),this.defaultKey=o(i,"defaultKey",null),this.defaultFrame=o(i,"defaultFrame",null),this.runChildUpdate=o(i,"runChildUpdate",!1),this.createCallback=o(i,"createCallback",null),this.removeCallback=o(i,"removeCallback",null),this.createMultipleCallback=o(i,"createMultipleCallback",null),this.internalCreateCallback=o(i,"internalCreateCallback",null),this.internalRemoveCallback=o(i,"internalRemoveCallback",null),i&&this.createMultiple(i)},create:function(t,e,i,n,s,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(o),o.preUpdate&&this.scene.sys.updateList.add(o),o.visible=s,o.setActive(r),this.add(o),o},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i=0;u--)if((l=d[u]).active===i){if(++c===e)break}else l=null;return l?("number"==typeof s&&(l.x=s),"number"==typeof r&&(l.y=r),l):n?this.create(s,r,o,a,h):null},get:function(t,e,i,n,s){return this.getFirst(!1,!0,t,e,i,n,s)},getFirstAlive:function(t,e,i,n,s,r){return this.getFirst(!0,t,e,i,n,s,r)},getFirstDead:function(t,e,i,n,s,r){return this.getFirst(!1,t,e,i,n,s,r)},playAnimation:function(t,e){return n.PlayAnimation(this.children.entries,t,e),this},isFull:function(){return-1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i=0&&t=0&&e-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t-1},union:function(t){var e=new n;return t.entries.forEach(function(t){e.set(t)}),this.entries.forEach(function(t){e.set(t)}),e},intersect:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)&&e.set(i)}),e},difference:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)||e.set(i)}),e},size:{get:function(){return this.entries.length},set:function(t){return t0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e,i){(function(e){var i={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){var t=navigator.userAgent;/Windows/.test(t)?i.windows=!0:/Mac OS/.test(t)&&!/like Mac OS/.test(t)?i.macOS=!0:/Android/.test(t)?i.android=!0:/Linux/.test(t)?i.linux=!0:/iP[ao]d|iPhone/i.test(t)?(i.iOS=!0,navigator.appVersion.match(/OS (\d+)/),i.iOSVersion=parseInt(RegExp.$1,10),i.iPhone=-1!==t.toLowerCase().indexOf("iphone"),i.iPad=-1!==t.toLowerCase().indexOf("ipad")):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?i.kindle=!0:/CrOS/.test(t)&&(i.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(i.android=!1,i.iOS=!1,i.macOS=!1,i.windows=!0,i.windowsPhone=!0);var n=/Silk/.test(t);return(i.windows||i.macOS||i.linux&&!n||i.chromeOS)&&(i.desktop=!0),(i.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(i.desktop=!1),navigator.standalone&&(i.webApp=!0),void 0!==window.cordova&&(i.cordova=!0),void 0!==e&&e.versions&&e.versions.node&&(i.node=!0),i.node&&"object"==typeof e.versions&&(i.nodeWebkit=!!e.versions["node-webkit"],i.electron=!!e.versions.electron),void 0!==window.ejecta&&(i.ejecta=!0),/Crosswalk/.test(t)&&(i.crosswalk=!0),i.pixelRatio=window.devicePixelRatio||1,i}()}).call(this,i(720))},function(t,e,i){var n,s=i(116),r={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0};t.exports=(n=navigator.userAgent,/Edge\/\d+/.test(n)?r.edge=!0:/Chrome\/(\d+)/.test(n)&&!s.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(n)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(n)&&s.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(n)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(n)?r.opera=!0:/Safari/.test(n)&&!s.windowsPhone?r.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(n)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(n)&&(r.silk=!0),r)},function(t,e){t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e,i){t.exports={ADD:i(771),ERROR:i(772),LOAD:i(773),READY:i(774),REMOVE:i(775)}},function(t,e){t.exports=function(t,e){var i;if(e)"string"==typeof e?i=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(i=e);else if(t.parentElement)return t;return i||(i=document.body),i.appendChild(t),t}},function(t,e,i){var n=i(79);t.exports=function(t,e,i,s){var r;if(void 0===s&&(s=t),!Array.isArray(e))return-1!==(r=t.indexOf(e))?(n(t,r),i&&i.call(s,e),e):null;for(var o=e.length-1;o>=0;){var a=e[o];-1!==(r=t.indexOf(a))?(n(t,r),i&&i.call(s,a)):e.pop(),o--}return e}},function(t,e){t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175}},function(t,e){t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},function(t,e,i){var n=i(0),s=i(67),r=i(9),o=i(59),a=i(18),h=i(1),l=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.jsonCache=t.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,t.events.on(a.BLUR,function(){this.pauseOnBlur&&this.onBlur()},this),t.events.on(a.FOCUS,function(){this.pauseOnBlur&&this.onFocus()},this),t.events.on(a.PRE_STEP,this.update,this),t.events.once(a.DESTROY,this.destroy,this)},add:h,addAudioSprite:function(t,e){void 0===e&&(e={});var i=this.add(t,e);for(var n in i.spritemap=this.jsonCache.get(t).spritemap,i.spritemap)if(i.spritemap.hasOwnProperty(n)){var r=s(e),o=i.spritemap[n];r.loop=!!o.hasOwnProperty("loop")&&o.loop,i.addMarker({name:n,start:o.start,duration:o.end-o.start,config:r})}return i},play:function(t,e){var i=this.add(t);return i.once(o.COMPLETE,i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var n=this.addAudioSprite(t);return n.once(o.COMPLETE,n.destroy,n),n.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var n=this.sounds[i];n.key===t&&(n.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound(function(t){t.pause()}),this.emit(o.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit(o.RESUME_ALL,this)},stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit(o.STOP_ALL,this)},unlock:h,onBlur:h,onFocus:h,update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(o.UNLOCKED,this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach(function(i){i.update(t,e)})},destroy:function(){this.removeAllListeners(),this.forEachActiveSound(function(t){t.destroy()}),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach(function(n,s){n&&!n.pendingRemove&&t.call(e||i,n,s,i.sounds)})},setRate:function(t){return this.rate=t,this},rate:{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound(function(t){t.calculateRate()}),this.emit(o.GLOBAL_RATE,this,t)}},setDetune:function(t){return this.detune=t,this},detune:{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound(function(t){t.calculateRate()}),this.emit(o.GLOBAL_DETUNE,this,t)}}});t.exports=l},function(t,e,i){var n=i(0),s=i(9),r=i(59),o=i(17),a=i(1),h=new n({Extends:s,initialize:function(t,e,i){s.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},this.currentConfig=this.config,this.config=o(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(console.error("addMarker "+t.name+" already exists in Sound"),!1):(t=o(!0,{name:"",start:0,duration:this.totalDuration-(t.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0}},t),this.markers[t.name]=t,!0))},updateMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(this.markers[t.name]=o(!0,this.markers[t.name],t),!0):(console.warn("Audio Marker: "+t.name+" missing in Sound: "+this.key),!1))},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):null},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return!1;if(t){if(!this.markers[t])return console.warn("Marker: "+t+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=o(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:a,calculateRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e},destroy:function(){this.pendingRemove||(this.emit(r.DESTROY,this),this.pendingRemove=!0,this.manager=null,this.key="",this.removeAllListeners(),this.isPlaying=!1,this.isPaused=!1,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});t.exports=h},function(t,e,i){var n=i(181),s=i(0),r=i(1),o=i(128),a=new s({initialize:function(t){this.parent=t,this.list=[],this.position=0,this.addCallback=r,this.removeCallback=r,this._sortKey=""},add:function(t,e){return e?n.Add(this.list,t):n.Add(this.list,t,0,this.addCallback,this)},addAt:function(t,e,i){return i?n.AddAt(this.list,t,e):n.AddAt(this.list,t,e,0,this.addCallback,this)},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(t,e){return t?(void 0===e&&(e=function(e,i){return e[t]-i[t]}),o.inplace(this.list,e),this):this},getByName:function(t){return n.GetFirst(this.list,"name",t)},getRandom:function(t,e){return n.GetRandom(this.list,t,e)},getFirst:function(t,e,i,s){return n.GetFirst(this.list,t,e,i,s)},getAll:function(t,e,i,s){return n.GetAll(this.list,t,e,i,s)},count:function(t,e){return n.CountAllMatching(this.list,t,e)},swap:function(t,e){n.Swap(this.list,t,e)},moveTo:function(t,e){return n.MoveTo(this.list,t,e)},remove:function(t,e){return e?n.Remove(this.list,t):n.Remove(this.list,t,this.removeCallback,this)},removeAt:function(t,e){return e?n.RemoveAt(this.list,t):n.RemoveAt(this.list,t,this.removeCallback,this)},removeBetween:function(t,e,i){return i?n.RemoveBetween(this.list,t,e):n.RemoveBetween(this.list,t,e,this.removeCallback,this)},removeAll:function(t){for(var e=this.list.length;e--;)this.remove(this.list[e],t);return this},bringToTop:function(t){return n.BringToTop(this.list,t)},sendToBack:function(t){return n.SendToBack(this.list,t)},moveUp:function(t){return n.MoveUp(this.list,t),t},moveDown:function(t){return n.MoveDown(this.list,t),t},reverse:function(){return this.list.reverse(),this},shuffle:function(){return n.Shuffle(this.list),this},replace:function(t,e){return n.Replace(this.list,t,e)},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e,i,s){return n.SetAll(this.list,t,e,i,s),this},each:function(t,e){for(var i=[null],n=2;n0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});t.exports=a},function(t,e,i){var n=i(182),s=i(382);t.exports=function(t,e){if(void 0===e&&(e=90),!n(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=s(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=s(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;il&&(r=l),o>l&&(o=l),a=s,h=r;;)if(a0&&o.length0&&a.lengthe.right||t.y>e.bottom)}},function(t,e,i){var n=i(6),s={},r={register:function(t,e,i,n,r){s[t]={plugin:e,mapping:i,settingsKey:n,configKey:r}},getPlugin:function(t){return s[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,r=e.game.config;for(var o in s){var a=s[o].plugin,h=s[o].mapping,l=s[o].settingsKey,u=s[o].configKey;n(i,l,r[u])&&(t[h]=new a(t))}},remove:function(t){s.hasOwnProperty(t)&&delete s[t]}};t.exports=r},function(t,e,i){t.exports={ANY_KEY_DOWN:i(1203),ANY_KEY_UP:i(1204),COMBO_MATCH:i(1205),DOWN:i(1206),KEY_DOWN:i(1207),KEY_UP:i(1208),UP:i(1209)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e){t.exports=function(t,e,i,n,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),{responseType:t,async:e,user:i,password:n,timeout:s,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0}}},function(t,e,i){var n=i(0),s=i(214),r=i(69),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.body=null}});t.exports=o},function(t,e,i){t.exports={CalculateFacesAt:i(217),CalculateFacesWithin:i(51),Copy:i(1301),CreateFromTiles:i(1302),CullTiles:i(1303),Fill:i(1304),FilterTiles:i(1305),FindByIndex:i(1306),FindTile:i(1307),ForEachTile:i(1308),GetTileAt:i(138),GetTileAtWorldXY:i(1309),GetTilesWithin:i(24),GetTilesWithinShape:i(1310),GetTilesWithinWorldXY:i(1311),HasTileAt:i(470),HasTileAtWorldXY:i(1312),IsInLayerBounds:i(103),PutTileAt:i(218),PutTileAtWorldXY:i(1313),PutTilesAt:i(1314),Randomize:i(1315),RemoveTileAt:i(471),RemoveTileAtWorldXY:i(1316),RenderDebug:i(1317),ReplaceByIndex:i(469),SetCollision:i(1318),SetCollisionBetween:i(1319),SetCollisionByExclusion:i(1320),SetCollisionByProperty:i(1321),SetCollisionFromCollisionGroup:i(1322),SetTileIndexCallback:i(1323),SetTileLocationCallback:i(1324),Shuffle:i(1325),SwapByIndex:i(1326),TileToWorldX:i(139),TileToWorldXY:i(1327),TileToWorldY:i(140),WeightedRandomize:i(1328),WorldToTileX:i(63),WorldToTileXY:i(1329),WorldToTileY:i(64)}},function(t,e,i){var n=i(103);t.exports=function(t,e,i,s){if(void 0===i&&(i=!1),n(t,e,s)){var r=s.data[e][t]||null;return null===r?null:-1===r.index?i?r:null:r}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o,a){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o={}),void 0===a&&(a={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=n,this.tileMargin=s,this.tileSpacing=r,this.tileProperties=o,this.tileData=a,this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){var e=this.getTileData(t);return e&&e.objectgroup?e.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t1?2-s:s,o=r*Math.cos(i),a=r*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},function(t,e,i){var n=i(22),s=i(0),r=i(9),o=i(111),a=i(267),h=i(268),l=i(6),u=new s({Extends:r,initialize:function(t,e,i){r.call(this),this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,l(i,"frames",[]),l(i,"defaultTextureKey",null)),this.frameRate=l(i,"frameRate",null),this.duration=l(i,"duration",null),null===this.duration&&null===this.frameRate?(this.frameRate=24,this.duration=this.frameRate/this.frames.length*1e3):this.duration&&null===this.frameRate?this.frameRate=this.frames.length/(this.duration/1e3):this.duration=this.frames.length/this.frameRate*1e3,this.msPerFrame=1e3/this.frameRate,this.skipMissedFrames=l(i,"skipMissedFrames",!0),this.delay=l(i,"delay",0),this.repeat=l(i,"repeat",0),this.repeatDelay=l(i,"repeatDelay",0),this.yoyo=l(i,"yoyo",!1),this.showOnStart=l(i,"showOnStart",!1),this.hideOnComplete=l(i,"hideOnComplete",!1),this.paused=!1,this.manager.on(o.PAUSE_ALL,this.pause,this),this.manager.on(o.RESUME_ALL,this.resume,this)},addFrame:function(t){return this.addFrameAt(this.frames.length,t)},addFrameAt:function(t,e){var i=this.getFrames(this.manager.textureManager,e);if(i.length>0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var n=this.frames.slice(0,t),s=this.frames.slice(t);this.frames=n.concat(i,s)}this.updateFrameSequence()}return this},checkFrame:function(t){return t>=0&&t0){s.isLast=!0,s.nextFrame=a[0],a[0].prevFrame=s;var v=1/(a.length-1);for(r=0;r=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo);var i=this.frames[e];0!==e||t.forward||(i=this.getLastFrame()),t.updateFrame(i)},getFrameByProgress:function(t){return t=n(t,0,1),a(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t._yoyo?this.handleYoyoFrame(t,!1):t.repeatCounter>0?t._reverse&&t.forward?t.forward=!1:this.repeatAnimation(t):this.completeAnimation(t):this.updateAndGetNextTick(t,e.nextFrame)},handleYoyoFrame:function(t,e){if(e||(e=!1),t._reverse===!e&&t.repeatCounter>0)return t.forward=e,void this.repeatAnimation(t);if(t._reverse===e||0!==t.repeatCounter){t.forward=e;var i=e?t.currentFrame.nextFrame:t.currentFrame.prevFrame;this.updateAndGetNextTick(t,i)}else this.completeAnimation(t)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t._yoyo?this.handleYoyoFrame(t,!0):t.repeatCounter>0?t._reverse&&!t.forward?(t.currentFrame=this.getLastFrame(),this.repeatAnimation(t)):(t.forward=!0,this.repeatAnimation(t)):this.completeAnimation(t):this.updateAndGetNextTick(t,e.prevFrame)},updateAndGetNextTick:function(t,e){t.updateFrame(e),this.getNextTick(t)},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){if(2===t._pendingStop)return this.completeAnimation(t);if(t._repeatDelay>0&&!1===t.pendingRepeat)t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t._repeatDelay;else if(t.repeatCounter--,t.updateFrame(t.currentFrame[t.forward?"nextFrame":"prevFrame"]),t.isPlaying){this.getNextTick(t),t.pendingRepeat=!1;var e=t.currentFrame,i=t.parent;this.emit(o.ANIMATION_REPEAT,this,e),i.emit(o.SPRITE_ANIMATION_KEY_REPEAT+this.key,this,e,t.repeatCounter,i),i.emit(o.SPRITE_ANIMATION_REPEAT,this,e,t.repeatCounter,i)}},setFrame:function(t){t.forward?this.nextFrame(t):this.previousFrame(t)},toJSON:function(){var t={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(e){t.frames.push(e.toJSON())}),t},updateFrameSequence:function(){for(var t,e=this.frames.length,i=1/(e-1),n=0;n1?(t.isLast=!0,t.prevFrame=this.frames[e-2],t.nextFrame=this.frames[0]):e>1&&(t.prevFrame=this.frames[n-1],t.nextFrame=this.frames[n+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.removeAllListeners(),this.manager.off(o.PAUSE_ALL,this.pause,this),this.manager.off(o.RESUME_ALL,this.resume,this),this.manager.remove(this.key);for(var t=0;t=1)return i.x=t.x,i.y=t.y,i;var r=n(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},function(t,e,i){var n=i(57),s=i(4);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=n(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,l=t.y2,u=0;u=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(s*a+o*h),e}},function(t,e){t.exports=function(t,e,i,n,s){var r=n+Math.atan2(t.y-i,t.x-e);return t.x=e+s*Math.cos(r),t.y=i+s*Math.sin(r),t}},function(t,e){t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},function(t,e){t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},function(t,e,i){var n=new(i(0))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(s-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(291),s=i(294),r=i(296),o=i(297);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?o(t):n(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var n=i(162);t.exports=function(t,e,i,s){void 0===e&&(e=1),void 0===i&&(i=1);var r=Math.floor(6*t),o=6*t-r,a=Math.floor(i*(1-e)*255),h=Math.floor(i*(1-o*e)*255),l=Math.floor(i*(1-(1-o)*e)*255),u=i=Math.floor(i*=255),c=i,d=i,f=r%6;return 0===f?(c=l,d=a):1===f?(u=h,d=a):2===f?(u=a,d=l):3===f?(u=a,c=h):4===f?(u=l,c=a):5===f&&(c=a,d=h),s?s.setTo?s.setTo(u,c,d,s.alpha,!1):(s.r=u,s.g=c,s.b=d,s.color=n(u,c,d),s):{r:u,g:c,b:d,color:n(u,c,d)}}},function(t,e){var i,n="";t.exports={disable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!1),t},enable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!0),t},getPrefix:i=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z;return this.x=i*o-n*r,this.y=n*s-e*o,this.z=e*r-i*s,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=e*s[0]+i*s[3]+n*s[6],this.y=e*s[1]+i*s[4]+n*s[7],this.z=e*s[2]+i*s[5]+n*s[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12],this.y=s[1]*e+s[5]*i+s[9]*n+s[13],this.z=s[2]*e+s[6]*i+s[10]*n+s[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=e*s[0]+i*s[4]+n*s[8]+s[12],o=e*s[1]+i*s[5]+n*s[9]+s[13],a=e*s[2]+i*s[6]+n*s[10]+s[14],h=e*s[3]+i*s[7]+n*s[11]+s[15];return this.x=r/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},project:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=s[0],o=s[1],a=s[2],h=s[3],l=s[4],u=s[5],c=s[6],d=s[7],f=s[8],p=s[9],g=s[10],v=s[11],m=s[12],y=s[13],x=s[14],T=1/(e*h+i*d+n*v+s[15]);return this.x=(e*r+i*l+n*f+m)*T,this.y=(e*o+i*u+n*p+y)*T,this.z=(e*a+i*c+n*g+x)*T,this},unproject:function(t,e){var i=t.x,n=t.y,s=t.z,r=t.w,o=this.x-i,a=r-this.y-1-n,h=this.z;return this.x=2*o/s-1,this.y=2*a/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});n.ZERO=new n,n.RIGHT=new n(1,0,0),n.LEFT=new n(-1,0,0),n.UP=new n(0,-1,0),n.DOWN=new n(0,1,0),n.FORWARD=new n(0,0,1),n.BACK=new n(0,0,-1),n.ONE=new n(1,1,1),t.exports=n},function(t,e,i){t.exports={Global:["game","anims","cache","plugins","registry","scale","sound","textures"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},function(t,e,i){var n=i(11),s=i(13);t.exports=function(t,e){if(void 0===e&&(e=new n),0===t.length)return e;for(var i,r,o,a=Number.MAX_VALUE,h=Number.MAX_VALUE,l=s.MIN_SAFE_INTEGER,u=s.MIN_SAFE_INTEGER,c=0;c0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t,e){return t?this.resume(e):this.pause(e)},start:function(t){t&&(this.settings.data=t),this.settings.status=s.START,this.settings.active=!0,this.settings.visible=!0,this.events.emit(o.START,this),this.events.emit(o.READY,this,t)},shutdown:function(t){this.events.off(o.TRANSITION_INIT),this.events.off(o.TRANSITION_START),this.events.off(o.TRANSITION_COMPLETE),this.events.off(o.TRANSITION_OUT),this.settings.status=s.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit(o.SHUTDOWN,this,t)},destroy:function(){this.settings.status=s.DESTROYED,this.settings.active=!1,this.settings.visible=!1,this.events.emit(o.DESTROY,this),this.events.removeAllListeners();for(var t=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],e=0;e0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});t.exports=u},function(t,e,i){var n=i(181),s=i(52),r=i(0),o=i(12),a=i(90),h=i(14),l=i(11),u=i(947),c=i(386),d=i(3),f=new r({Extends:h,Mixins:[o.AlphaSingle,o.BlendMode,o.ComputedSize,o.Depth,o.Mask,o.Transform,o.Visible,u],initialize:function(t,e,i,n){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new o.TransformMatrix,this.tempTransformMatrix=new o.TransformMatrix,this._displayList=t.sys.displayList,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.setPosition(e,i),this.clearAlpha(),this.setBlendMode(s.SKIP_CHECK),n&&this.add(n)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.list.length>0)for(var e=this.list,i=new l,n=0;n-1},setAll:function(t,e,i,s){return n.SetAll(this.list,t,e,i,s),this},each:function(t,e){var i,n=[null],s=this.list.slice(),r=s.length;for(i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null}});t.exports=f},function(t,e,i){var n=i(129),s=i(0),r=i(952),o=new s({Extends:n,Mixins:[r],initialize:function(t,e,i,s,r,o,a){n.call(this,t,e,i,s,r,o,a),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this}});t.exports=o},function(t,e,i){var n=i(91),s=i(0),r=i(190),o=i(266),a=i(269),h=i(270),l=i(274),u=i(153),c=i(279),d=i(280),f=i(277),p=i(32),g=i(95),v=i(14),m=i(2),y=i(6),x=i(13),T=i(958),w=new s({Extends:v,Mixins:[o,a,h,l,u,c,d,f,T],initialize:function(t,e){var i=y(e,"x",0),n=y(e,"y",0);v.call(this,t,"Graphics"),this.setPosition(i,n),this.initPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this._tempMatrix1=new p,this._tempMatrix2=new p,this._tempMatrix3=new p,this.setDefaultStyles(e)},setDefaultStyles:function(t){return y(t,"lineStyle",null)&&(this.defaultStrokeWidth=y(t,"lineStyle.width",1),this.defaultStrokeColor=y(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=y(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),y(t,"fillStyle",null)&&(this.defaultFillColor=y(t,"fillStyle.color",16777215),this.defaultFillAlpha=y(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(r.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(r.FILL_STYLE,t,e),this},fillGradientStyle:function(t,e,i,n,s){return void 0===s&&(s=1),this.commandBuffer.push(r.GRADIENT_FILL_STYLE,s,t,e,i,n),this},lineGradientStyle:function(t,e,i,n,s,o){return void 0===o&&(o=1),this.commandBuffer.push(r.GRADIENT_LINE_STYLE,t,o,e,i,n,s),this},setTexture:function(t,e,i){if(void 0===i&&(i=0),void 0===t)this.commandBuffer.push(r.CLEAR_TEXTURE);else{var n=this.scene.sys.textures.getFrame(t,e);n&&(2===i&&(i=3),this.commandBuffer.push(r.SET_TEXTURE,n,i))}return this},beginPath:function(){return this.commandBuffer.push(r.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(r.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(r.FILL_PATH),this},fill:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(r.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,x.PI2),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,x.PI2),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,n){return this.commandBuffer.push(r.FILL_RECT,t,e,i,n),this},strokeRect:function(t,e,i,n){var s=this._lineWidth/2,r=t-s,o=t+s;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+n),this.strokePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+n),this.strokePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(o+i,e),this.strokePath(),this.beginPath(),this.moveTo(r,e+n),this.lineTo(o+i,e+n),this.strokePath(),this},fillRoundedRect:function(t,e,i,n,s){void 0===s&&(s=20);var r=s,o=s,a=s,h=s;return"number"!=typeof s&&(r=m(s,"tl",20),o=m(s,"tr",20),a=m(s,"bl",20),h=m(s,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-x.TAU,0),this.lineTo(t+i,e+n-h),this.arc(t+i-h,e+n-h,h,0,x.TAU),this.lineTo(t+a,e+n),this.arc(t+a,e+n-a,a,x.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-x.TAU),this.fillPath(),this},strokeRoundedRect:function(t,e,i,n,s){void 0===s&&(s=20);var r=s,o=s,a=s,h=s;return"number"!=typeof s&&(r=m(s,"tl",20),o=m(s,"tr",20),a=m(s,"bl",20),h=m(s,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-x.TAU,0),this.lineTo(t+i,e+n-h),this.arc(t+i-h,e+n-h,h,0,x.TAU),this.lineTo(t+a,e+n),this.arc(t+a,e+n-a,a,x.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-x.TAU),this.strokePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,n,s,o),this},strokeTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,n,s,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,n){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,n),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(r.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(r.MOVE_TO,t,e),this},strokePoints:function(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===n&&(n=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var s=1;s-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var n,s,r=this.scene.sys,o=r.game.renderer;if(void 0===e&&(e=r.scale.width),void 0===i&&(i=r.scale.height),w.TargetCamera.setScene(this.scene),w.TargetCamera.setViewport(0,0,e,i),w.TargetCamera.scrollX=this.x,w.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var a=(n=r.textures.get(t)).getSourceImage();a instanceof HTMLCanvasElement&&(s=a.getContext("2d"))}else s=(n=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(s=t.getContext("2d"));return s&&(this.renderCanvas(o,this,0,w.TargetCamera,null,s,!1),n&&n.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});w.TargetCamera=new n,t.exports=w},function(t,e){t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,SET_TEXTURE:19,CLEAR_TEXTURE:20,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},function(t,e,i){var n=i(4);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.width/2,r=t.height/2;return i.x=t.x+s*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},function(t,e,i){var n=i(0),s=i(12),r=i(14),o=i(394),a=i(126),h=i(396),l=i(968),u=new n({Extends:r,Mixins:[s.Depth,s.Mask,s.Pipeline,s.Transform,s.Visible,l],initialize:function(t,e,i,n){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline(),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var s=0;s0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},removeEmitter:function(t){return this.emitters.remove(t,!0)},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;ss.width&&(t=s.width-this.frame.cutX),this.frame.cutY+e>s.height&&(e=s.height-this.frame.cutY),this.frame.setSize(t,e,this.frame.cutX,this.frame.cutY)}this.updateDisplayOrigin();var r=this.input;return r&&!r.customHitArea&&(r.hitArea.width=t,r.hitArea.height=e),this},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this},saveTexture:function(t){return this.textureManager.renameTexture(this.texture.key,t),this._saved=!0,this.texture},fill:function(t,e,i,n,s,r){void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.frame.cutWidth),void 0===r&&(r=this.frame.cutHeight);var o=255&(t>>16|0),a=255&(t>>8|0),h=255&(0|t),l=this.gl,u=this.frame;if(this.camera.preRender(1,1),l){var c=this.camera._cx,f=this.camera._cy,p=this.camera._cw,g=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(c,f,p,g,g);var v=this.pipeline;v.projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),v.drawFillRect(i,n,s,r,d.getTintFromFloats(o/255,a/255,h/255,1),e),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),v.projOrtho(0,v.width,v.height,0,-1e3,1e3)}else this.renderer.setContext(this.context),this.context.fillStyle="rgba("+o+","+a+","+h+","+e+")",this.context.fillRect(i+u.cutX,n+u.cutY,s,r),this.renderer.setContext();return this.dirty=!0,this},clear:function(){if(this.dirty){var t=this.gl;if(t){var e=this.renderer;e.setFramebuffer(this.framebuffer,!0),this.frame.cutWidth===this.canvas.width&&this.frame.cutHeight===this.canvas.height||t.scissor(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),e.setFramebuffer(null,!0)}else{var i=this.context;i.save(),i.setTransform(1,0,0,1,0,0),i.clearRect(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),i.restore()}this.dirty=!1}return this},erase:function(t,e,i){this._eraseMode=!0;var s=this.renderer.currentBlendMode;return this.renderer.setBlendMode(n.ERASE),this.draw(t,e,i,1,16777215),this.renderer.setBlendMode(s),this._eraseMode=!1,this},draw:function(t,e,i,n,s){void 0===n&&(n=this.globalAlpha),s=void 0===s?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(s>>16)+(65280&s)+((255&s)<<16),Array.isArray(t)||(t=[t]);var r=this.gl;if(this.camera.preRender(1,1),r){var o=this.camera._cx,a=this.camera._cy,h=this.camera._cw,l=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(o,a,h,l,l);var u=this.pipeline;u.projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),this.batchList(t,e,i,n,s),u.flush(),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),u.projOrtho(0,u.width,u.height,0,-1e3,1e3)}else this.renderer.setContext(this.context),this.batchList(t,e,i,n,s),this.renderer.setContext();return this.dirty=!0,this},drawFrame:function(t,e,i,n,s,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.globalAlpha),r=void 0===r?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(r>>16)+(65280&r)+((255&r)<<16);var o=this.gl,a=this.textureManager.getFrame(t,e);if(a){if(this.camera.preRender(1,1),o){var h=this.camera._cx,l=this.camera._cy,u=this.camera._cw,c=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(h,l,u,c,c);var d=this.pipeline;d.projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),d.batchTextureFrame(a,i+this.frame.cutX,n+this.frame.cutY,r,s,this.camera.matrix,null),d.flush(),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),d.projOrtho(0,d.width,d.height,0,-1e3,1e3)}else this.batchTextureFrame(a,i+this.frame.cutX,n+this.frame.cutY,s,r);this.dirty=!0}return this},batchList:function(t,e,i,n,s){for(var r=0;rl){if(0===c){for(var g=f;g.length&&(g=g.slice(0,-1),!((p=e.measureText(g).width)<=l)););if(!g.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var v=d.substr(g.length);u[c]=v,h+=g}var m=u[c].length?c:c+1,y=u.slice(m).join(" ").replace(/[ \n]*$/gi,"");s[o+1]=y+" "+(s[o+1]||""),r=s.length;break}h+=f,l-=p}n+=h.replace(/[ \n]*$/gi,"")+"\n"}}return n=n.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var n="",s=t.split(this.splitRegExp),r=s.length-1,o=e.measureText(" ").width,a=0;a<=r;a++){for(var h=i,l=s[a].split(" "),u=l.length-1,c=0;c<=u;c++){var d=l[c],f=e.measureText(d).width,p=f+o;p>h&&c>0&&(n+="\n",h=i),n+=d,c0&&(d+=h.lineSpacing*g),i.rtl)c=f-c;else if("right"===i.align)c+=o-h.lineWidths[g];else if("center"===i.align)c+=(o-h.lineWidths[g])/2;else if("justify"===i.align){if(h.lineWidths[g]/h.width>=.85){var v=h.width-h.lineWidths[g],m=e.measureText(" ").width,y=a[g].trim(),x=y.split(" ");v+=(a[g].length-y.length)*m;for(var T=Math.floor(v/m),w=0;T>0;)x[w]+=" ",w=(w+1)%(x.length-1||1),--T;a[g]=x.join(" ")}}this.autoRound&&(c=Math.round(c),d=Math.round(d)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(a[g],c,d)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(a[g],c,d))}e.restore(),this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(t,this.frame.source.glTexture,!0),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0;var E=this.input;return E&&!E.customHitArea&&(E.hitArea.width=this.width,E.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(t){this.setText(t)}},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this._text,style:this.style.toJSON(),padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&c(this.canvas),s.remove(this.canvas),this.texture.destroy()}});t.exports=p},function(t,e,i){var n=i(26),s=i(0),r=i(12),o=i(18),a=i(14),h=i(324),l=i(164),u=i(984),c=i(3),d=new s({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Tint,r.Transform,r.Visible,u],initialize:function(t,e,i,s,r,l,u){var d=t.sys.game.renderer;a.call(this,t,"TileSprite");var f=t.sys.textures.get(l),p=f.get(u);s&&r?(s=Math.floor(s),r=Math.floor(r)):(s=p.width,r=p.height),this._tilePosition=new c,this._tileScale=new c(1,1),this.dirty=!1,this.renderer=d,this.canvas=n.create(this,s,r),this.context=this.canvas.getContext("2d"),this.displayTexture=f,this.displayFrame=p,this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.potWidth=h(p.width),this.potHeight=h(p.height),this.fillCanvas=n.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d"),this.fillPattern=null,this.setPosition(e,i),this.setSize(s,r),this.setFrame(u),this.setOriginFromFrame(),this.initPipeline(),t.sys.game.events.on(o.CONTEXT_RESTORED,function(t){var e=t.gl;this.dirty=!0,this.fillPattern=null,this.fillPattern=t.createTexture2D(0,e.LINEAR,e.LINEAR,e.REPEAT,e.REPEAT,e.RGBA,this.fillCanvas,this.potWidth,this.potHeight)},this)},setTexture:function(t,e){return this.displayTexture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){var e=this.displayTexture.get(t);return this.potWidth=h(e.width),this.potHeight=h(e.height),this.canvas.width=0,e.cutWidth&&e.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.displayFrame=e,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(t,e){return void 0!==t&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},setTileScale:function(t,e){return void 0===t&&(t=this.tileScaleX),void 0===e&&(e=t),this.tileScaleX=t,this.tileScaleY=e,this},updateTileTexture:function(){if(this.dirty&&this.renderer){var t=this.displayFrame;if(t.source.isRenderTexture||t.source.isGLTexture)return console.warn("TileSprites can only use Image or Canvas based textures"),void(this.dirty=!1);var e=this.fillContext,i=this.fillCanvas,n=this.potWidth,s=this.potHeight;this.renderer.gl||(n=t.cutWidth,s=t.cutHeight),e.clearRect(0,0,n,s),i.width=n,i.height=s,e.drawImage(t.source.image,t.cutX,t.cutY,t.cutWidth,t.cutHeight,0,0,n,s),this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(i,this.fillPattern):this.fillPattern=e.createPattern(i,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var t=this.canvas;if(t.width===this.width&&t.height===this.height||(t.width=this.width,t.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl)this.dirty=!1;else{var e=this.context;this.scene.sys.game.config.antialias||l.disable(e);var i=this._tileScale.x,n=this._tileScale.y,s=this._tilePosition.x,r=this._tilePosition.y;e.clearRect(0,0,this.width,this.height),e.save(),e.scale(i,n),e.translate(-s,-r),e.fillStyle=this.fillPattern,e.fillRect(s,r,this.width/i,this.height/n),e.restore(),this.dirty=!1}},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),n.remove(this.canvas),n.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null,this.texture.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(t){this._tilePosition.x=t,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(t){this._tilePosition.y=t,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(t){this._tileScale.x=t,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(t){this._tileScale.y=t,this.dirty=!0}}});t.exports=d},function(t,e,i){var n=i(0),s=i(22),r=i(12),o=i(90),a=i(18),h=i(14),l=i(59),u=i(194),c=i(987),d=i(13),f=new n({Extends:h,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,c],initialize:function(t,e,i,n){h.call(this,t,"Video"),this.video=null,this.videoTexture=null,this.videoTextureSource=null,this.snapshotTexture=null,this.flipY=!1,this._key=u(),this.touchLocked=!0,this.playWhenUnlocked=!1,this.retryLimit=20,this.retry=0,this.retryInterval=500,this._retryID=null,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={play:this.playHandler.bind(this),error:this.loadErrorHandler.bind(this),end:this.completeHandler.bind(this),time:this.timeUpdateHandler.bind(this),seeking:this.seekingHandler.bind(this),seeked:this.seekedHandler.bind(this)},this._crop=this.resetCropObject(),this.markers={},this._markerIn=-1,this._markerOut=d.MAX_SAFE_INTEGER,this._lastUpdate=0,this._cacheKey="",this._isSeeking=!1,this.removeVideoElementOnDestroy=!1,this.setPosition(e,i),this.initPipeline(),n&&this.changeSource(n,!1);var s=t.sys.game.events;s.on(a.PAUSE,this.globalPause,this),s.on(a.RESUME,this.globalResume,this);var r=t.sys.sound;r&&r.on(l.GLOBAL_MUTE,this.globalMute,this)},play:function(t,e,i){if(this.touchLocked&&this.playWhenUnlocked||this.isPlaying())return this;var n=this.video;if(!n)return console.warn("Video not loaded"),this;void 0===t&&(t=n.loop);var s=this.scene.sys.sound;s&&s.mute&&this.setMute(!0),isNaN(e)||(this._markerIn=e),!isNaN(i)&&i>e&&(this._markerOut=i),n.loop=t;var r=this._callbacks,o=n.play();return void 0!==o?o.then(this.playPromiseSuccessHandler.bind(this)).catch(this.playPromiseErrorHandler.bind(this)):(n.addEventListener("playing",r.play,!0),n.readyState<2&&(this.retry=this.retryLimit,this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval))),n.addEventListener("ended",r.end,!0),n.addEventListener("timeupdate",r.time,!0),n.addEventListener("seeking",r.seeking,!0),n.addEventListener("seeked",r.seeked,!0),this},changeSource:function(t,e,i,n,s){void 0===e&&(e=!0),this.video&&this.stop();var r=this.scene.sys.cache.video.get(t);return r?(this.video=r,this._cacheKey=t,this._codePaused=r.paused,this._codeMuted=r.muted,this.videoTexture?(this.scene.sys.textures.remove(this._key),this.videoTexture=this.scene.sys.textures.create(this._key,r,r.videoWidth,r.videoHeight),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,r.videoWidth,r.videoHeight),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,r.videoWidth,r.videoHeight)):this.updateTexture(),r.currentTime=0,this._lastUpdate=0,e&&this.play(i,n,s)):this.video=null,this},addMarker:function(t,e,i){return!isNaN(e)&&e>=0&&!isNaN(i)&&(this.markers[t]=[e,i]),this},playMarker:function(t,e){var i=this.markers[t];return i&&this.play(e,i[0],i[1]),this},removeMarker:function(t){return delete this.markers[t],this},snapshot:function(t,e){return void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.snapshotArea(0,0,this.width,this.height,t,e)},snapshotArea:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=this.height),void 0===s&&(s=i),void 0===r&&(r=n);var o=this.video,a=this.snapshotTexture;return a?(a.setSize(s,r),o&&a.context.drawImage(o,t,e,i,n,0,0,s,r)):(a=this.scene.sys.textures.createCanvas(u(),s,r),this.snapshotTexture=a,o&&a.context.drawImage(o,t,e,i,n,0,0,s,r)),a.update()},saveSnapshotTexture:function(t){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,t):this.snapshotTexture=this.scene.sys.textures.createCanvas(t,this.width,this.height),this.snapshotTexture},loadURL:function(t,e,i){void 0===e&&(e="loadeddata"),void 0===i&&(i=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var n=document.createElement("video");return n.controls=!1,i&&(n.muted=!0,n.defaultMuted=!0,n.setAttribute("autoplay","autoplay")),n.setAttribute("playsinline","playsinline"),n.setAttribute("preload","auto"),n.addEventListener("error",this._callbacks.error,!0),n.src=t,n.load(),this.video=n,this},playPromiseSuccessHandler:function(){this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn)},playPromiseErrorHandler:function(t){this.scene.sys.input.once("pointerdown",this.unlockHandler,this),this.touchLocked=!0,this.playWhenUnlocked=!0,this.emit(o.VIDEO_ERROR,this,t)},playHandler:function(){this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this.video.removeEventListener("playing",this._callbacks.play,!0)},loadErrorHandler:function(t){this.stop(),this.emit(o.VIDEO_ERROR,this,t)},unlockHandler:function(){this.touchLocked=!1,this.playWhenUnlocked=!1,this.emit(o.VIDEO_UNLOCKED,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn),this.video.play(),this.emit(o.VIDEO_PLAY,this)},completeHandler:function(){this.emit(o.VIDEO_COMPLETE,this)},timeUpdateHandler:function(){this.video&&this.video.currentTime=this._markerOut&&(t.loop?(t.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=e,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),this.stop())))}},checkVideoProgress:function(){this.video.readyState>=2?this.updateTexture():(this.retry--,this.retry>0?this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval):this.emit(o.VIDEO_TIMEOUT,this))},updateTexture:function(){var t=this.video,e=t.videoWidth,i=t.videoHeight;if(this.videoTexture){var n=this.videoTextureSource;n.source!==t&&(n.source=t,n.width=e,n.height=i),n.update()}else this.videoTexture=this.scene.sys.textures.create(this._key,t,e,i),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,e,i),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,e,i)},getVideoKey:function(){return this._cacheKey},seekTo:function(t){var e=this.video;if(e){var i=e.duration;if(i!==1/0&&!isNaN(i)){var n=i*t;this.setCurrentTime(n)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(t){var e=this.video;if(e){if("string"==typeof t){var i=t[0],n=parseFloat(t.substr(1));"+"===i?t=e.currentTime+n:"-"===i&&(t=e.currentTime-n)}e.currentTime=t,this._lastUpdate=t}return this},isSeeking:function(){return this._isSeeking},seekingHandler:function(){this._isSeeking=!0,this.emit(o.VIDEO_SEEKING,this)},seekedHandler:function(){this._isSeeking=!1,this.emit(o.VIDEO_SEEKED,this),this.video&&this.updateTexture()},getProgress:function(){var t=this.video;if(t){var e=t.currentTime,i=t.duration;if(i!==1/0&&!isNaN(i))return e/i}return 0},getDuration:function(){return this.video?this.video.duration:0},setMute:function(t){void 0===t&&(t=!0),this._codeMuted=t;var e=this.video;return e&&(e.muted=!!this._systemMuted||t),this},isMuted:function(){return this._codeMuted},globalMute:function(t,e){this._systemMuted=e;var i=this.video;i&&(i.muted=!!this._codeMuted||e)},globalPause:function(){this._systemPaused=!0,this.video&&this.video.pause()},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&this.video.play()},setPaused:function(t){void 0===t&&(t=!0);var e=this.video;return this._codePaused=t,e&&(t?e.paused||e.pause():t||e.paused&&!this._systemPaused&&e.play()),this},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(t){return void 0===t&&(t=1),this.video&&(this.video.volume=s(t,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(t){return this.video&&(this.video.playbackRate=t),this},getLoop:function(){return!!this.video&&this.video.loop},setLoop:function(t){return void 0===t&&(t=!0),this.video&&(this.video.loop=t),this},isPlaying:function(){return!!this.video&&!(this.video.paused||this.video.ended)},isPaused:function(){return this.video&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(t,e){return void 0===e&&(e=!1),this.videoTexture&&this.scene.sys.textures.renameTexture(this._key,t),this._key=t,this.flipY=e,this.videoTextureSource&&this.videoTextureSource.setFlipY(e),this.videoTexture},stop:function(){var t=this.video;if(t){var e=this._callbacks;for(var i in e)t.removeEventListener(i,e[i],!0);t.pause()}return this._retryID&&window.clearTimeout(this._retryID),this.emit(o.VIDEO_STOP,this),this},removeVideoElement:function(){var t=this.video;if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("autoplay"),t.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(),this.removeVideoElementOnDestroy&&this.removeVideoElement();var t=this.scene.sys.game.events;t.off(a.PAUSE,this.globalPause,this),t.off(a.RESUME,this.globalResume,this);var e=this.scene.sys.sound;e&&e.off(l.GLOBAL_MUTE,this.globalMute,this),this._retryID&&window.clearTimeout(this._retryID)}});t.exports=f},function(t,e,i){var n=i(0),s=i(199),r=i(411),o=i(46),a=new n({initialize:function(t){this.type=o.POLYGON,this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return s(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],"string"==typeof t&&(t=t.split(" ")),!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,n=0;no||r>a)return!1;if(s<=i||r<=n)return!0;var h=s-i,l=r-n;return h*h+l*l<=t.radius*t.radius}},function(t,e,i){var n=i(4),s=i(205);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r,o,a=t.x1,h=t.y1,l=t.x2,u=t.y2,c=e.x,d=e.y,f=e.radius,p=l-a,g=u-h,v=a-c,m=h-d,y=p*p+g*g,x=2*(p*v+g*m),T=x*x-4*y*(v*v+m*m-f*f);if(0===T){var w=-x/(2*y);r=a+w*p,o=h+w*g,w>=0&&w<=1&&i.push(new n(r,o))}else if(T>0){var E=(-x-Math.sqrt(T))/(2*y);r=a+E*p,o=h+E*g,E>=0&&E<=1&&i.push(new n(r,o));var _=(-x+Math.sqrt(T))/(2*y);r=a+_*p,o=h+_*g,_>=0&&_<=1&&i.push(new n(r,o))}}return i}},function(t,e,i){var n=i(55),s=new(i(4));t.exports=function(t,e,i){if(void 0===i&&(i=s),n(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(n(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,l=r*r+o*o,u=r,c=o;if(l>0){var d=(a*r+h*o)/l;u*=d,c*=d}return i.x=t.x1+u,i.y=t.y1+c,u*u+c*c<=l&&u*r+c*o>=0&&n(e,i.x,i.y)}},function(t,e,i){var n=i(4),s=i(84),r=i(424);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e))for(var o=e.getLineA(),a=e.getLineB(),h=e.getLineC(),l=e.getLineD(),u=[new n,new n,new n,new n],c=[s(o,t,u[0]),s(a,t,u[1]),s(h,t,u[2]),s(l,t,u[3])],d=0;d<4;d++)c[d]&&i.push(u[d]);return i}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=[]);for(var s,r,o,a,h,l,u=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,f=t.y2-t.y1,p=u*u+c*c,g=u*d+c*f,v=d*d+f*f,m=p*v-g*g,y=0===m?0:1/m,x=t.x1,T=t.y1,w=0;w=0&&r>=0&&s+r<1&&(n.push({x:e[w].x,y:e[w].y}),i)));w++);return n}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,t}},function(t,e){t.exports=function(t){return 0===t.height?NaN:t.width/t.height}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,o=t.x3-e,a=t.y3-i,t.x3=o*s-a*r+e,t.y3=o*r+a*s+i,t}},function(t,e,i){t.exports={BUTTON_DOWN:i(1189),BUTTON_UP:i(1190),CONNECTED:i(1191),DISCONNECTED:i(1192),GAMEPAD_BUTTON_DOWN:i(1193),GAMEPAD_BUTTON_UP:i(1194)}},function(t,e,i){var n=i(17),s=i(135);t.exports=function(t,e){var i=void 0===t?s():n({},t);if(e)for(var r in e)void 0!==e[r]&&(i[r]=e[r]);return i}},function(t,e,i){var n=i(0),s=i(20),r=i(21),o=i(8),a=i(2),h=i(7),l=i(358),u=new n({Extends:r,initialize:function(t,e,i,n){var s="xml";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),s=a(o,"extension",s)}var l={type:"xml",cache:t.cacheManager.xml,extension:s,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,l)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=l(this.xhrLoader.responseText),this.data?this.onProcessComplete():(console.warn("Invalid XMLFile: "+this.key),this.onProcessError())}});o.register("xml",function(t,e,i){if(Array.isArray(t))for(var n=0;n0&&(s.totalDuration+=s.t2*s.repeat),s.totalDuration>t&&(t=s.totalDuration),s.delay0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay,this.startDelay=e},init:function(){if(this.paused&&!this.parentIsTimeline)return this.state=h.PENDING_ADD,this._pausedState=h.INIT,!1;for(var t=this.data,e=this.totalTargets,i=0;i0?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=h.LOOP_DELAY):(this.state=h.ACTIVE,this.dispatchTweenEvent(r.TWEEN_LOOP,this.callbacks.onLoop))):this.completeDelay>0?(this.state=h.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=h.PENDING_REMOVE,this.dispatchTweenEvent(r.TWEEN_COMPLETE,this.callbacks.onComplete))},pause:function(){return this.state===h.PAUSED?this:(this.paused=!0,this._pausedState=this.state,this.state=h.PAUSED,this)},play:function(t){void 0===t&&(t=!1);var e=this.state;return e!==h.INIT||this.parentIsTimeline?e===h.ACTIVE||e===h.PENDING_ADD&&this._pausedState===h.PENDING_ADD?this:this.parentIsTimeline||e!==h.PENDING_REMOVE&&e!==h.REMOVED?(this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?this.state=h.ACTIVE:(this.countdown=this.calculatedOffset,this.state=h.OFFSET_DELAY)):this.paused?(this.paused=!1,this.makeActive()):(this.resetTweenData(t),this.state=h.ACTIVE,this.makeActive()),this):(this.seek(0),this.parent.makeActive(this),this):(this.resetTweenData(!1),this.state=h.ACTIVE,this)},resetTweenData:function(t){for(var e=this.data,i=this.totalData,n=this.totalTargets,s=0;s0&&(r.elapsed=r.delay,r.state=h.DELAY),r.getActiveValue&&(o[a]=r.getActiveValue(r.target,r.key,r.start))}},resume:function(){return this.state===h.PAUSED?(this.paused=!1,this.state=this._pausedState):this.play(),this},seek:function(t,e){if(void 0===e&&(e=16.6),this.totalDuration>=36e5)return console.warn("Tween.seek duration too long"),this;this.state===h.REMOVED&&this.makeActive(),this.elapsed=0,this.progress=0,this.totalElapsed=0,this.totalProgress=0;for(var i=this.data,n=this.totalTargets,s=0;s0&&(r.elapsed=r.delay,r.state=h.DELAY)}this.calcDuration();var c=!1;this.state===h.PAUSED&&(c=!0,this.state=h.ACTIVE),this.isSeeking=!0;do{this.update(0,e)}while(this.totalProgress0?(e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY(),e.start=e.getStartValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.end=e.getEndValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,h.REPEAT_DELAY):(this.dispatchTweenDataEvent(r.TWEEN_REPEAT,t.callbacks.onRepeat,e),h.PLAYING_FORWARD)):h.COMPLETE},setStateFromStart:function(t,e,i){return e.repeatCounter>0?(e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY(),e.end=e.getEndValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,h.REPEAT_DELAY):(this.dispatchTweenDataEvent(r.TWEEN_REPEAT,t.callbacks.onRepeat,e),h.PLAYING_FORWARD)):h.COMPLETE},updateTweenData:function(t,e,i){var n=e.target;switch(e.state){case h.PLAYING_FORWARD:case h.PLAYING_BACKWARD:if(!n){e.state=h.COMPLETE;break}var s=e.elapsed,o=e.duration,a=0;(s+=i)>o&&(a=s-o,s=o);var l=e.state===h.PLAYING_FORWARD,u=s/o;if(e.elapsed=s,e.progress=u,e.previous=e.current,1===u)l?(e.current=e.end,n[e.key]=e.end,e.hold>0?(e.elapsed=e.hold-a,e.state=h.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,a)):(e.current=e.start,n[e.key]=e.start,e.state=this.setStateFromStart(t,e,a));else{var c=l?e.ease(u):e.ease(1-u);e.current=e.start+(e.end-e.start)*c,n[e.key]=e.current}this.dispatchTweenDataEvent(r.TWEEN_UPDATE,t.callbacks.onUpdate,e);break;case h.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=h.PENDING_RENDER);break;case h.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=h.PLAYING_FORWARD,this.dispatchTweenDataEvent(r.TWEEN_REPEAT,t.callbacks.onRepeat,e));break;case h.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case h.PENDING_RENDER:n?(e.start=e.getStartValue(n,e.key,n[e.key],e.index,t.totalTargets,t),e.end=e.getEndValue(n,e.key,e.start,e.index,t.totalTargets,t),e.current=e.start,n[e.key]=e.start,e.state=h.PLAYING_FORWARD):e.state=h.COMPLETE}return e.state!==h.COMPLETE}});u.TYPES=["onActive","onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],a.register("tween",function(t){return this.scene.sys.tweens.add(t)}),o.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=u},function(t,e,i){t.exports={TIMELINE_COMPLETE:i(1346),TIMELINE_LOOP:i(1347),TIMELINE_PAUSE:i(1348),TIMELINE_RESUME:i(1349),TIMELINE_START:i(1350),TIMELINE_UPDATE:i(1351),TWEEN_ACTIVE:i(1352),TWEEN_COMPLETE:i(1353),TWEEN_LOOP:i(1354),TWEEN_REPEAT:i(1355),TWEEN_START:i(1356),TWEEN_UPDATE:i(1357),TWEEN_YOYO:i(1358)}},function(t,e){t.exports=function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p){return{target:t,index:e,key:i,getActiveValue:r,getEndValue:n,getStartValue:s,ease:o,duration:0,totalDuration:0,delay:0,yoyo:l,hold:0,repeat:0,repeatDelay:0,flipX:f,flipY:p,progress:0,elapsed:0,repeatCounter:0,start:0,previous:0,current:0,end:0,t1:0,t2:0,gen:{delay:a,duration:h,hold:u,repeat:c,repeatDelay:d},state:0}}},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},function(t,e,i){var n=i(58);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e,i){var n=i(58);t.exports=function(t){return n(t,-180,180)}},function(t,e,i){var n=i(0),s=i(10),r=new n({initialize:function(t){this.name="WebGLPipeline",this.game=t.game,this.view=t.game.canvas,this.resolution=1,this.width=0,this.height=0,this.gl=t.gl,this.vertexCount=0,this.vertexCapacity=t.vertexCapacity,this.renderer=t.renderer,this.vertexData=t.vertices?t.vertices:new ArrayBuffer(t.vertexCapacity*t.vertexSize),this.vertexBuffer=this.renderer.createVertexBuffer(t.vertices?t.vertices:this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=this.renderer.createProgram(t.vertShader,t.fragShader),this.attributes=t.attributes,this.vertexSize=t.vertexSize,this.topology=t.topology,this.bytes=new Uint8Array(this.vertexData),this.vertexComponentCount=s.getComponentCount(t.attributes,this.gl),this.flushLocked=!1,this.active=!1},boot:function(){},addAttribute:function(t,e,i,n,r){return this.attributes.push({name:t,size:e,type:this.renderer.glFormats[i],normalized:n,offset:r}),this.vertexComponentCount=s.getComponentCount(this.attributes,this.gl),this},shouldFlush:function(){return this.vertexCount>=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this.resolution=i,this},bind:function(){var t=this.gl,e=this.vertexBuffer,i=this.attributes,n=this.program,s=this.renderer,r=this.vertexSize;s.setProgram(n),s.setVertexBuffer(e);for(var o=0;o=0?(t.enableVertexAttribArray(h),t.vertexAttribPointer(h,a.size,a.type,a.normalized,r,a.offset)):-1!==h&&t.disableVertexAttribArray(h)}return this},onBind:function(){return this},onPreRender:function(){return this},onRender:function(){return this},onPostRender:function(){return this},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.vertexCount,i=this.topology,n=this.vertexSize;if(0!==e)return t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,e*n)),t.drawArrays(i,0,e),this.vertexCount=0,this.flushLocked=!1,this;this.flushLocked=!1},destroy:function(){var t=this.gl;return t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),delete this.program,delete this.vertexBuffer,delete this.gl,this},setFloat1:function(t,e){return this.renderer.setFloat1(this.program,t,e),this},setFloat2:function(t,e,i){return this.renderer.setFloat2(this.program,t,e,i),this},setFloat3:function(t,e,i,n){return this.renderer.setFloat3(this.program,t,e,i,n),this},setFloat4:function(t,e,i,n,s){return this.renderer.setFloat4(this.program,t,e,i,n,s),this},setFloat1v:function(t,e){return this.renderer.setFloat1v(this.program,t,e),this},setFloat2v:function(t,e){return this.renderer.setFloat2v(this.program,t,e),this},setFloat3v:function(t,e){return this.renderer.setFloat3v(this.program,t,e),this},setFloat4v:function(t,e){return this.renderer.setFloat4v(this.program,t,e),this},setInt1:function(t,e){return this.renderer.setInt1(this.program,t,e),this},setInt2:function(t,e,i){return this.renderer.setInt2(this.program,t,e,i),this},setInt3:function(t,e,i,n){return this.renderer.setInt3(this.program,t,e,i,n),this},setInt4:function(t,e,i,n,s){return this.renderer.setInt4(this.program,t,e,i,n,s),this},setMatrix2:function(t,e,i){return this.renderer.setMatrix2(this.program,t,e,i),this},setMatrix3:function(t,e,i){return this.renderer.setMatrix3(this.program,t,e,i),this},setMatrix4:function(t,e,i){return this.renderer.setMatrix4(this.program,t,e,i),this}});t.exports=r},function(t,e,i){var n=i(0),s=i(66),r=i(2),o=i(506),a=i(779),h=i(780),l=i(32),u=i(10),c=i(234),d=new n({Extends:c,Mixins:[o],initialize:function(t){var e=t.renderer.config;c.call(this,{game:t.game,renderer:t.renderer,gl:t.renderer.gl,topology:r(t,"topology",t.renderer.gl.TRIANGLES),vertShader:r(t,"vertShader",h),fragShader:r(t,"fragShader",a),vertexCapacity:r(t,"vertexCapacity",6*e.batchSize),vertexSize:r(t,"vertexSize",5*Float32Array.BYTES_PER_ELEMENT+4*Uint8Array.BYTES_PER_ELEMENT),attributes:[{name:"inPosition",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:0},{name:"inTexCoord",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:2*Float32Array.BYTES_PER_ELEMENT},{name:"inTintEffect",size:1,type:t.renderer.gl.FLOAT,normalized:!1,offset:4*Float32Array.BYTES_PER_ELEMENT},{name:"inTint",size:4,type:t.renderer.gl.UNSIGNED_BYTE,normalized:!0,offset:5*Float32Array.BYTES_PER_ELEMENT}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.vertexViewU32=new Uint32Array(this.vertexData),this.maxQuads=e.batchSize,this.batches=[],this._tempMatrix1=new l,this._tempMatrix2=new l,this._tempMatrix3=new l,this._tempMatrix4=new l,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.tintEffect=2,this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[],this.mvpInit()},onBind:function(){return c.prototype.onBind.call(this),this.mvpUpdate(),this},resize:function(t,e,i){return c.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},setTexture2D:function(t,e){return void 0===t&&(t=this.renderer.blankTexture.glTexture),void 0===e&&(e=0),this.requireTextureBatch(t,e)&&this.pushBatch(t,e),this},requireTextureBatch:function(t,e){var i=this.batches,n=i.length;return!(n>0)||!((e>0?i[n-1].textures[e-1]:i[n-1].texture)===t)},pushBatch:function(t,e){if(0===e)this.batches.push({first:this.vertexCount,texture:t,textures:[]});else{var i=[];i[e-1]=t,this.batches.push({first:this.vertexCount,texture:null,textures:i})}},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t,e,i,n=this.gl,s=this.vertexCount,r=this.topology,o=this.vertexSize,a=this.renderer,h=this.batches,l=h.length,u=0,c=null;if(0===l||0===s)return this.flushLocked=!1,this;n.bufferSubData(n.ARRAY_BUFFER,0,this.bytes.subarray(0,s*o));for(var d=0;d0){for(e=0;e0){for(e=0;e0&&(a.setTexture2D(c.texture,0,!1),n.drawArrays(r,c.first,u)),this.vertexCount=0,h.length=0,this.flushLocked=!1,this},batchSprite:function(t,e,i){this.renderer.setPipeline(this);var n=this._tempMatrix1,s=this._tempMatrix2,r=this._tempMatrix3,o=t.frame,a=o.glTexture,h=o.u0,l=o.v0,c=o.u1,d=o.v1,f=o.x,p=o.y,g=o.cutWidth,v=o.cutHeight,m=o.customPivot,y=t.displayOriginX,x=t.displayOriginY,T=-y+f,w=-x+p;if(t.isCropped){var E=t._crop;E.flipX===t.flipX&&E.flipY===t.flipY||o.updateCropUVs(E,t.flipX,t.flipY),h=E.u0,l=E.v0,c=E.u1,d=E.v1,g=E.width,v=E.height,T=-y+(f=E.x),w=-x+(p=E.y)}var _=1,b=1;t.flipX&&(m||(T+=-o.realWidth+2*y),_=-1),(t.flipY||o.source.isGLTexture&&!a.flipY)&&(m||(w+=-o.realHeight+2*x),b=-1),s.applyITRS(t.x,t.y,t.rotation,t.scaleX*_,t.scaleY*b),n.copyFrom(e.matrix),i?(n.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),s.e=t.x,s.f=t.y,n.multiply(s,r)):(s.e-=e.scrollX*t.scrollFactorX,s.f-=e.scrollY*t.scrollFactorY,n.multiply(s,r));var A=T+g,S=w+v,C=r.getX(T,w),M=r.getY(T,w),O=r.getX(T,S),P=r.getY(T,S),R=r.getX(A,S),L=r.getY(A,S),D=r.getX(A,w),F=r.getY(A,w),k=u.getTintAppendFloatAlpha(t._tintTL,e.alpha*t._alphaTL),I=u.getTintAppendFloatAlpha(t._tintTR,e.alpha*t._alphaTR),B=u.getTintAppendFloatAlpha(t._tintBL,e.alpha*t._alphaBL),Y=u.getTintAppendFloatAlpha(t._tintBR,e.alpha*t._alphaBR);e.roundPixels&&(C=Math.round(C),M=Math.round(M),O=Math.round(O),P=Math.round(P),R=Math.round(R),L=Math.round(L),D=Math.round(D),F=Math.round(F)),this.setTexture2D(a,0);var N=t._isTinted&&t.tintFill;this.batchQuad(C,M,O,P,R,L,D,F,h,l,c,d,k,I,B,Y,N,a,0)},batchQuad:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,m,y){var x=!1;this.vertexCount+6>this.vertexCapacity&&(this.flush(),x=!0,this.setTexture2D(m,y));var T=this.vertexViewF32,w=this.vertexViewU32,E=this.vertexCount*this.vertexComponentCount-1;return T[++E]=t,T[++E]=e,T[++E]=h,T[++E]=l,T[++E]=v,w[++E]=d,T[++E]=i,T[++E]=n,T[++E]=h,T[++E]=c,T[++E]=v,w[++E]=p,T[++E]=s,T[++E]=r,T[++E]=u,T[++E]=c,T[++E]=v,w[++E]=g,T[++E]=t,T[++E]=e,T[++E]=h,T[++E]=l,T[++E]=v,w[++E]=d,T[++E]=s,T[++E]=r,T[++E]=u,T[++E]=c,T[++E]=v,w[++E]=g,T[++E]=o,T[++E]=a,T[++E]=u,T[++E]=l,T[++E]=v,w[++E]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g){var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),this.setTexture2D(p,g),v=!0);var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=f,y[++x]=u,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=l,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=l,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},batchTexture:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,m,y,x,T,w,E,_,b,A,S,C,M,O,P){this.renderer.setPipeline(this,t);var R=this._tempMatrix1,L=this._tempMatrix2,D=this._tempMatrix3,F=m/i+S,k=y/n+C,I=(m+x)/i+S,B=(y+T)/n+C,Y=o,N=a,X=-g,U=-v;if(t.isCropped){var z=t._crop;Y=z.width,N=z.height,o=z.width,a=z.height;var G=m=z.x,W=y=z.y;c&&(G=x-z.x-z.width),d&&!e.isRenderTexture&&(W=T-z.y-z.height),F=G/i+S,k=W/n+C,I=(G+z.width)/i+S,B=(W+z.height)/n+C,X=-g+m,U=-v+y}d^=!P&&e.isRenderTexture?1:0,c&&(Y*=-1,X+=o),d&&(N*=-1,U+=a);var H=X+Y,V=U+N;L.applyITRS(s,r,u,h,l),R.copyFrom(M.matrix),O?(R.multiplyWithOffset(O,-M.scrollX*f,-M.scrollY*p),L.e=s,L.f=r,R.multiply(L,D)):(L.e-=M.scrollX*f,L.f-=M.scrollY*p,R.multiply(L,D));var j=D.getX(X,U),K=D.getY(X,U),q=D.getX(X,V),J=D.getY(X,V),Z=D.getX(H,V),Q=D.getY(H,V),$=D.getX(H,U),tt=D.getY(H,U);M.roundPixels&&(j=Math.round(j),K=Math.round(K),q=Math.round(q),J=Math.round(J),Z=Math.round(Z),Q=Math.round(Q),$=Math.round($),tt=Math.round(tt)),this.setTexture2D(e,0),this.batchQuad(j,K,q,J,Z,Q,$,tt,F,k,I,B,w,E,_,b,A,e,0)},batchTextureFrame:function(t,e,i,n,s,r,o){this.renderer.setPipeline(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2,l=e+t.width,c=i+t.height;o?a.multiply(o,h):h=a;var d=h.getX(e,i),f=h.getY(e,i),p=h.getX(e,c),g=h.getY(e,c),v=h.getX(l,c),m=h.getY(l,c),y=h.getX(l,i),x=h.getY(l,i);this.setTexture2D(t.glTexture,0),n=u.getTintAppendFloatAlpha(n,s),this.batchQuad(d,f,p,g,v,m,y,x,t.u0,t.v0,t.u1,t.v1,n,n,n,n,0,t.glTexture,0)},drawFillRect:function(t,e,i,n,s,r){var o=t+i,a=e+n;this.setTexture2D();var h=u.getTintAppendFloatAlphaAndSwap(s,r);this.batchQuad(t,e,t,a,o,a,o,e,0,0,1,1,h,h,h,h,2)},batchFillRect:function(t,e,i,n,s,r){this.renderer.setPipeline(this);var o=this._tempMatrix3;r&&r.multiply(s,o);var a=t+i,h=e+n,l=o.getX(t,e),u=o.getY(t,e),c=o.getX(t,h),d=o.getY(t,h),f=o.getX(a,h),p=o.getY(a,h),g=o.getX(a,e),v=o.getY(a,e),m=this.currentFrame,y=m.u0,x=m.v0,T=m.u1,w=m.v1;this.batchQuad(l,u,c,d,f,p,g,v,y,x,T,w,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.fillTint.BR,this.tintEffect)},batchFillTriangle:function(t,e,i,n,s,r,o,a){this.renderer.setPipeline(this);var h=this._tempMatrix3;a&&a.multiply(o,h);var l=h.getX(t,e),u=h.getY(t,e),c=h.getX(i,n),d=h.getY(i,n),f=h.getX(s,r),p=h.getY(s,r),g=this.currentFrame,v=g.u0,m=g.v0,y=g.u1,x=g.v1;this.batchTri(l,u,c,d,f,p,v,m,y,x,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.tintEffect)},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h){var l=this.tempTriangle;l[0].x=t,l[0].y=e,l[0].width=o,l[1].x=i,l[1].y=n,l[1].width=o,l[2].x=s,l[2].y=r,l[2].width=o,l[3].x=t,l[3].y=e,l[3].width=o,this.batchStrokePath(l,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.setPipeline(this);var n=this._tempMatrix3;i&&i.multiply(e,n);for(var r,o,a=t.length,h=this.polygonCache,l=this.fillTint.TL,u=this.fillTint.TR,c=this.fillTint.BL,d=this.tintEffect,f=0;f0&&V[4]?this.batchQuad(D,F,O,P,V[0],V[1],V[2],V[3],z,G,W,H,B,Y,N,X,I):(j[0]=D,j[1]=F,j[2]=O,j[3]=P,j[4]=1),h&&j[4]?this.batchQuad(C,M,R,L,j[0],j[1],j[2],j[3],z,G,W,H,B,Y,N,X,I):(V[0]=C,V[1]=M,V[2]=R,V[3]=L,V[4]=1)}}});t.exports=d},,,function(t,e,i){t.exports={AlignTo:i(521),Angle:i(522),Call:i(523),GetFirst:i(524),GetLast:i(525),GridAlign:i(526),IncAlpha:i(587),IncX:i(588),IncXY:i(589),IncY:i(590),PlaceOnCircle:i(591),PlaceOnEllipse:i(592),PlaceOnLine:i(593),PlaceOnRectangle:i(594),PlaceOnTriangle:i(595),PlayAnimation:i(596),PropertyValueInc:i(34),PropertyValueSet:i(25),RandomCircle:i(597),RandomEllipse:i(598),RandomLine:i(599),RandomRectangle:i(600),RandomTriangle:i(601),Rotate:i(602),RotateAround:i(603),RotateAroundDistance:i(604),ScaleX:i(605),ScaleXY:i(606),ScaleY:i(607),SetAlpha:i(608),SetBlendMode:i(609),SetDepth:i(610),SetHitArea:i(611),SetOrigin:i(612),SetRotation:i(613),SetScale:i(614),SetScaleX:i(615),SetScaleY:i(616),SetScrollFactor:i(617),SetScrollFactorX:i(618),SetScrollFactorY:i(619),SetTint:i(620),SetVisible:i(621),SetX:i(622),SetXY:i(623),SetY:i(624),ShiftPosition:i(625),Shuffle:i(626),SmootherStep:i(627),SmoothStep:i(628),Spread:i(629),ToggleVisible:i(630),WrapInRectangle:i(631)}},function(t,e,i){var n=i(106),s=[];s[n.BOTTOM_CENTER]=i(240),s[n.BOTTOM_LEFT]=i(241),s[n.BOTTOM_RIGHT]=i(242),s[n.LEFT_BOTTOM]=i(243),s[n.LEFT_CENTER]=i(244),s[n.LEFT_TOP]=i(245),s[n.RIGHT_BOTTOM]=i(246),s[n.RIGHT_CENTER]=i(247),s[n.RIGHT_TOP]=i(248),s[n.TOP_CENTER]=i(249),s[n.TOP_LEFT]=i(250),s[n.TOP_RIGHT]=i(251);t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e,i){var n=i(38),s=i(75),r=i(76),o=i(39);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)+i),o(t,n(e)+a),t}},function(t,e,i){var n=i(38),s=i(40),r=i(41),o=i(39);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)-i),o(t,n(e)+a),t}},function(t,e,i){var n=i(38),s=i(42),r=i(43),o=i(39);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)+i),o(t,n(e)+a),t}},function(t,e,i){var n=i(38),s=i(40),r=i(44),o=i(43);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(77),s=i(40),r=i(78),o=i(43);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(40),s=i(45),r=i(43),o=i(39);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)-a),t}},function(t,e,i){var n=i(38),s=i(42),r=i(44),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(77),s=i(42),r=i(78),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(42),s=i(45),r=i(41),o=i(39);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(75),s=i(45),r=i(44),o=i(76);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)-a),t}},function(t,e,i){var n=i(40),s=i(45),r=i(44),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)-i),r(t,s(e)-a),t}},function(t,e,i){var n=i(42),s=i(45),r=i(44),o=i(43);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)-a),t}},function(t,e,i){var n=i(106),s=[];s[n.BOTTOM_CENTER]=i(253),s[n.BOTTOM_LEFT]=i(254),s[n.BOTTOM_RIGHT]=i(255),s[n.CENTER]=i(256),s[n.LEFT_CENTER]=i(258),s[n.RIGHT_CENTER]=i(259),s[n.TOP_CENTER]=i(260),s[n.TOP_LEFT]=i(261),s[n.TOP_RIGHT]=i(262),s[n.LEFT_BOTTOM]=s[n.BOTTOM_LEFT],s[n.LEFT_TOP]=s[n.TOP_LEFT],s[n.RIGHT_BOTTOM]=s[n.BOTTOM_RIGHT],s[n.RIGHT_TOP]=s[n.TOP_RIGHT];t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e,i){var n=i(38),s=i(75),r=i(44),o=i(76);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(38),s=i(40),r=i(44),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(38),s=i(42),r=i(44),o=i(43);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(257),s=i(75),r=i(77);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)+i,r(e)+o),t}},function(t,e,i){var n=i(76),s=i(78);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var n=i(77),s=i(40),r=i(78),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(77),s=i(42),r=i(78),o=i(43);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(75),s=i(45),r=i(76),o=i(39);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(40),s=i(45),r=i(41),o=i(39);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)-a),t}},function(t,e,i){var n=i(42),s=i(45),r=i(43),o=i(39);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(146),s=i(87),r=i(13),o=i(4);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=s(e,0,r.PI2);return n(t,a,i)}},function(t,e,i){var n=i(265),s=i(146),r=i(87),o=i(13);t.exports=function(t,e,i,a){void 0===a&&(a=[]),e||(e=n(t)/i);for(var h=0;he.length&&(r=e.length),i?(n=e[r-1][i],(s=e[r][i])-t<=t-n?e[r]:e[r-1]):(n=e[r-1],(s=e[r])-t<=t-n?s:n)}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=n,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0}});t.exports=n},function(t,e,i){var n=i(52),s={_blendMode:n.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=n[t]),(t|=0)>=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e,i){var n=i(149),s=i(112);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=s(t)/i);for(var o=0;o=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n-h&&(c-=h,n+=l),fd.right&&(f=u(f,f+(g-d.right),this.lerp.x)),vd.bottom&&(p=u(p,p+(v-d.bottom),this.lerp.y))):(f=u(f,g-h,this.lerp.x),p=u(p,v-l,this.lerp.y))}this.useBounds&&(f=this.clampX(f),p=this.clampY(p)),this.roundPixels&&(h=Math.round(h),l=Math.round(l)),this.scrollX=f,this.scrollY=p;var m=f+n,y=p+s;this.midPoint.set(m,y);var x=e/o,T=i/o;this.worldView.setTo(m-x/2,y-T/2,x,T),a.applyITRS(this.x+h,this.y+l,this.rotation,o,o),a.translate(-h,-l),this.shakeEffect.preRender()},setLerp:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.lerp.set(t,e),this},setFollowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.followOffset.set(t,e),this},startFollow:function(t,e,i,n,s,r){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===s&&(s=0),void 0===r&&(r=s),this._follow=t,this.roundPixels=e,i=o(i,0,1),n=o(n,0,1),this.lerp.set(i,n),this.followOffset.set(s,r);var a=this.width/2,h=this.height/2,l=t.x-s,u=t.y-r;return this.midPoint.set(l,u),this.scrollX=l-a,this.scrollY=u-h,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.visible&&(this.panEffect.update(t,e),this.zoomEffect.update(t,e),this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e))},destroy:function(){this.clearRenderToTexture(),this.resetFX(),n.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=f},function(t,e,i){var n=i(33);t.exports=function(t){var e=new n;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var s=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16);e.setTo(s,r,o)}return e}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e){t.exports=function(t,e,i,n){void 0===n&&(n={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var s=Math.min(t,e,i),r=Math.max(t,e,i),o=r-s,a=0,h=0===r?0:o/r,l=r;return r!==s&&(r===t?a=(e-i)/o+(e16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},function(t,e,i){var n=i(33);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var n=i(33);t.exports=function(t){var e=new n,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var s=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(s,r,o,255*a)}return e}},function(t,e,i){t.exports={Fade:i(656),Flash:i(657),Pan:i(658),Shake:i(691),Zoom:i(692)}},function(t,e,i){t.exports={In:i(659),Out:i(660),InOut:i(661)}},function(t,e,i){t.exports={In:i(662),Out:i(663),InOut:i(664)}},function(t,e,i){t.exports={In:i(665),Out:i(666),InOut:i(667)}},function(t,e,i){t.exports={In:i(668),Out:i(669),InOut:i(670)}},function(t,e,i){t.exports={In:i(671),Out:i(672),InOut:i(673)}},function(t,e,i){t.exports={In:i(674),Out:i(675),InOut:i(676)}},function(t,e,i){t.exports=i(677)},function(t,e,i){t.exports={In:i(678),Out:i(679),InOut:i(680)}},function(t,e,i){t.exports={In:i(681),Out:i(682),InOut:i(683)}},function(t,e,i){t.exports={In:i(684),Out:i(685),InOut:i(686)}},function(t,e,i){t.exports={In:i(687),Out:i(688),InOut:i(689)}},function(t,e,i){t.exports=i(690)},function(t,e,i){var n=i(0),s=i(29),r=i(312),o=i(2),a=i(6),h=i(7),l=i(168),u=i(1),c=i(173),d=i(161),f=new n({initialize:function(t){void 0===t&&(t={});this.width=a(t,"width",1024),this.height=a(t,"height",768),this.zoom=a(t,"zoom",1),this.resolution=a(t,"resolution",1),this.parent=a(t,"parent",void 0),this.scaleMode=a(t,"scaleMode",0),this.expandParent=a(t,"expandParent",!0),this.autoRound=a(t,"autoRound",!1),this.autoCenter=a(t,"autoCenter",0),this.resizeInterval=a(t,"resizeInterval",500),this.fullscreenTarget=a(t,"fullscreenTarget",null),this.minWidth=a(t,"minWidth",0),this.maxWidth=a(t,"maxWidth",0),this.minHeight=a(t,"minHeight",0),this.maxHeight=a(t,"maxHeight",0);var e=a(t,"scale",null);e&&(this.width=a(e,"width",this.width),this.height=a(e,"height",this.height),this.zoom=a(e,"zoom",this.zoom),this.resolution=a(e,"resolution",this.resolution),this.parent=a(e,"parent",this.parent),this.scaleMode=a(e,"mode",this.scaleMode),this.expandParent=a(e,"expandParent",this.expandParent),this.autoRound=a(e,"autoRound",this.autoRound),this.autoCenter=a(e,"autoCenter",this.autoCenter),this.resizeInterval=a(e,"resizeInterval",this.resizeInterval),this.fullscreenTarget=a(e,"fullscreenTarget",this.fullscreenTarget),this.minWidth=a(e,"min.width",this.minWidth),this.maxWidth=a(e,"max.width",this.maxWidth),this.minHeight=a(e,"min.height",this.minHeight),this.maxHeight=a(e,"max.height",this.maxHeight)),this.renderType=a(t,"type",s.AUTO),this.canvas=a(t,"canvas",null),this.context=a(t,"context",null),this.canvasStyle=a(t,"canvasStyle",null),this.customEnvironment=a(t,"customEnvironment",!1),this.sceneConfig=a(t,"scene",null),this.seed=a(t,"seed",[(Date.now()*Math.random()).toString()]),l.RND=new l.RandomDataGenerator(this.seed),this.gameTitle=a(t,"title",""),this.gameURL=a(t,"url","https://phaser.io"),this.gameVersion=a(t,"version",""),this.autoFocus=a(t,"autoFocus",!0),this.domCreateContainer=a(t,"dom.createContainer",!1),this.domBehindCanvas=a(t,"dom.behindCanvas",!1),this.inputKeyboard=a(t,"input.keyboard",!0),this.inputKeyboardEventTarget=a(t,"input.keyboard.target",window),this.inputKeyboardCapture=a(t,"input.keyboard.capture",[]),this.inputMouse=a(t,"input.mouse",!0),this.inputMouseEventTarget=a(t,"input.mouse.target",null),this.inputMouseCapture=a(t,"input.mouse.capture",!0),this.inputTouch=a(t,"input.touch",r.input.touch),this.inputTouchEventTarget=a(t,"input.touch.target",null),this.inputTouchCapture=a(t,"input.touch.capture",!0),this.inputActivePointers=a(t,"input.activePointers",1),this.inputSmoothFactor=a(t,"input.smoothFactor",0),this.inputWindowEvents=a(t,"input.windowEvents",!0),this.inputGamepad=a(t,"input.gamepad",!1),this.inputGamepadEventTarget=a(t,"input.gamepad.target",window),this.disableContextMenu=a(t,"disableContextMenu",!1),this.audio=a(t,"audio"),this.hideBanner=!1===a(t,"banner",null),this.hidePhaser=a(t,"banner.hidePhaser",!1),this.bannerTextColor=a(t,"banner.text","#ffffff"),this.bannerBackgroundColor=a(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=a(t,"fps",null);var i=a(t,"render",t);this.antialias=a(i,"antialias",!0),this.antialiasGL=a(i,"antialiasGL",!0),this.mipmapFilter=a(i,"mipmapFilter","LINEAR"),this.desynchronized=a(i,"desynchronized",!1),this.roundPixels=a(i,"roundPixels",!1),this.pixelArt=a(i,"pixelArt",1!==this.zoom),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=a(i,"transparent",!1),this.clearBeforeRender=a(i,"clearBeforeRender",!0),this.premultipliedAlpha=a(i,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=a(i,"failIfMajorPerformanceCaveat",!1),this.powerPreference=a(i,"powerPreference","default"),this.batchSize=a(i,"batchSize",2e3),this.maxLights=a(i,"maxLights",10);var n=a(t,"backgroundColor",0);this.backgroundColor=d(n),0===n&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=a(t,"callbacks.preBoot",u),this.postBoot=a(t,"callbacks.postBoot",u),this.physics=a(t,"physics",{}),this.defaultPhysicsSystem=a(this.physics,"default",!1),this.loaderBaseURL=a(t,"loader.baseURL",""),this.loaderPath=a(t,"loader.path",""),this.loaderMaxParallelDownloads=a(t,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=a(t,"loader.crossOrigin",void 0),this.loaderResponseType=a(t,"loader.responseType",""),this.loaderAsync=a(t,"loader.async",!0),this.loaderUser=a(t,"loader.user",""),this.loaderPassword=a(t,"loader.password",""),this.loaderTimeout=a(t,"loader.timeout",0),this.installGlobalPlugins=[],this.installScenePlugins=[];var f=a(t,"plugins",null),p=c.DefaultScene;f&&(Array.isArray(f)?this.defaultPlugins=f:h(f)&&(this.installGlobalPlugins=o(f,"global",[]),this.installScenePlugins=o(f,"scene",[]),Array.isArray(f.default)?p=f.default:Array.isArray(f.defaultMerge)&&(p=p.concat(f.defaultMerge)))),this.defaultPlugins=p;var g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=a(t,"images.default",g+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=a(t,"images.missing",g+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),window&&(window.FORCE_WEBGL?this.renderType=s.WEBGL:window.FORCE_CANVAS&&(this.renderType=s.CANVAS))}});t.exports=f},function(t,e,i){t.exports={os:i(116),browser:i(117),features:i(167),input:i(721),audio:i(722),video:i(723),fullscreen:i(724),canvasFeatures:i(313)}},function(t,e,i){var n,s,r,o=i(26),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create(t,6,1).getContext("2d");if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return s*s+r*r}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t0?Math.ceil(t):Math.floor(t)}},function(t,e,i){var n=i(3);t.exports=function(t,e,i,s,r,o,a,h){void 0===h&&(h=new n);var l=Math.sin(r),u=Math.cos(r),c=u*o,d=l*o,f=-l*a,p=u*a,g=1/(c*p+f*-d);return h.x=p*g*t+-f*g*e+(s*f-i*p)*g,h.y=c*g*e+-d*g*t+(-s*c+i*d)*g,h}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},clone:function(){return new n(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return e*e+i*i+n*n+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12]*s,this.y=r[1]*e+r[5]*i+r[9]*n+r[13]*s,this.z=r[2]*e+r[6]*i+r[10]*n+r[14]*s,this.w=r[3]*e+r[7]*i+r[11]*n+r[15]*s,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*r-o*h,c=-l*s+o*a,d=h*s-r*a,f=e*u+i*c+n*d;return f?(f=1/f,t[0]=u*f,t[1]=(-l*i+n*h)*f,t[2]=(o*i-n*r)*f,t[3]=c*f,t[4]=(l*e-n*a)*f,t[5]=(-o*e+n*s)*f,t[6]=d*f,t[7]=(-h*e+i*a)*f,t[8]=(r*e-i*s)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=r*l-o*h,t[1]=n*h-i*l,t[2]=i*o-n*r,t[3]=o*a-s*l,t[4]=e*l-n*a,t[5]=n*s-e*o,t[6]=s*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*s,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*(l*r-o*h)+i*(-l*s+o*a)+n*(h*s-r*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],m=c[5],y=c[6],x=c[7],T=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*n+f*o+p*l,e[2]=d*s+f*a+p*u,e[3]=g*i+v*r+m*h,e[4]=g*n+v*o+m*l,e[5]=g*s+v*a+m*u,e[6]=y*i+x*r+T*h,e[7]=y*n+x*o+T*l,e[8]=y*s+x*a+T*u,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*r,e[1]=l*n+h*o,e[2]=l*s+h*a,e[3]=l*r-h*i,e[4]=l*o-h*n,e[5]=l*a-h*s,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,o=i+i,a=n+n,h=e*r,l=e*o,u=e*a,c=i*o,d=i*a,f=n*a,p=s*r,g=s*o,v=s*a,m=this.val;return m[0]=1-(c+f),m[3]=l+v,m[6]=u-g,m[1]=l-v,m[4]=1-(h+f),m[7]=d+p,m[2]=u+g,m[5]=d-p,m[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],v=e[13],m=e[14],y=e[15],x=n*h-s*a,T=n*l-r*a,w=n*u-o*a,E=s*l-r*h,_=s*u-o*h,b=r*u-o*l,A=c*v-d*g,S=c*m-f*g,C=c*y-p*g,M=d*m-f*v,O=d*y-p*v,P=f*y-p*m,R=x*P-T*O+w*M+E*C-_*S+b*A;return R?(R=1/R,i[0]=(h*P-l*O+u*M)*R,i[1]=(l*C-a*P-u*S)*R,i[2]=(a*O-h*C+u*A)*R,i[3]=(r*O-s*P-o*M)*R,i[4]=(n*P-r*C+o*S)*R,i[5]=(s*C-n*O-o*A)*R,i[6]=(v*b-m*_+y*E)*R,i[7]=(m*w-g*b-y*T)*R,i[8]=(g*_-v*w+y*x)*R,this):null}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this},zero:function(){var t=this.val;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=0,this},xyz:function(t,e,i){this.identity();var n=this.val;return n[12]=t,n[13]=e,n[14]=i,this},scaling:function(t,e,i){this.zero();var n=this.val;return n[0]=t,n[5]=e,n[10]=i,n[15]=1,this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[3],s=t[6],r=t[7],o=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=s,t[11]=t[14],t[12]=n,t[13]=r,t[14]=o,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15],m=e*o-i*r,y=e*a-n*r,x=e*h-s*r,T=i*a-n*o,w=i*h-s*o,E=n*h-s*a,_=l*p-u*f,b=l*g-c*f,A=l*v-d*f,S=u*g-c*p,C=u*v-d*p,M=c*v-d*g,O=m*M-y*C+x*S+T*A-w*b+E*_;return O?(O=1/O,t[0]=(o*M-a*C+h*S)*O,t[1]=(n*C-i*M-s*S)*O,t[2]=(p*E-g*w+v*T)*O,t[3]=(c*w-u*E-d*T)*O,t[4]=(a*A-r*M-h*b)*O,t[5]=(e*M-n*A+s*b)*O,t[6]=(g*x-f*E-v*y)*O,t[7]=(l*E-c*x+d*y)*O,t[8]=(r*C-o*A+h*_)*O,t[9]=(i*A-e*C-s*_)*O,t[10]=(f*w-p*x+v*m)*O,t[11]=(u*x-l*w-d*m)*O,t[12]=(o*b-r*S-a*_)*O,t[13]=(e*S-i*b+n*_)*O,t[14]=(p*y-f*T-g*m)*O,t[15]=(l*T-u*y+c*m)*O,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return t[0]=o*(c*v-d*g)-u*(a*v-h*g)+p*(a*d-h*c),t[1]=-(i*(c*v-d*g)-u*(n*v-s*g)+p*(n*d-s*c)),t[2]=i*(a*v-h*g)-o*(n*v-s*g)+p*(n*h-s*a),t[3]=-(i*(a*d-h*c)-o*(n*d-s*c)+u*(n*h-s*a)),t[4]=-(r*(c*v-d*g)-l*(a*v-h*g)+f*(a*d-h*c)),t[5]=e*(c*v-d*g)-l*(n*v-s*g)+f*(n*d-s*c),t[6]=-(e*(a*v-h*g)-r*(n*v-s*g)+f*(n*h-s*a)),t[7]=e*(a*d-h*c)-r*(n*d-s*c)+l*(n*h-s*a),t[8]=r*(u*v-d*p)-l*(o*v-h*p)+f*(o*d-h*u),t[9]=-(e*(u*v-d*p)-l*(i*v-s*p)+f*(i*d-s*u)),t[10]=e*(o*v-h*p)-r*(i*v-s*p)+f*(i*h-s*o),t[11]=-(e*(o*d-h*u)-r*(i*d-s*u)+l*(i*h-s*o)),t[12]=-(r*(u*g-c*p)-l*(o*g-a*p)+f*(o*c-a*u)),t[13]=e*(u*g-c*p)-l*(i*g-n*p)+f*(i*c-n*u),t[14]=-(e*(o*g-a*p)-r*(i*g-n*p)+f*(i*a-n*o)),t[15]=e*(o*c-a*u)-r*(i*c-n*u)+l*(i*a-n*o),this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return(e*o-i*r)*(c*v-d*g)-(e*a-n*r)*(u*v-d*p)+(e*h-s*r)*(u*g-c*p)+(i*a-n*o)*(l*v-d*f)-(i*h-s*o)*(l*g-c*f)+(n*h-s*a)*(l*p-u*f)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=e[9],d=e[10],f=e[11],p=e[12],g=e[13],v=e[14],m=e[15],y=t.val,x=y[0],T=y[1],w=y[2],E=y[3];return e[0]=x*i+T*o+w*u+E*p,e[1]=x*n+T*a+w*c+E*g,e[2]=x*s+T*h+w*d+E*v,e[3]=x*r+T*l+w*f+E*m,x=y[4],T=y[5],w=y[6],E=y[7],e[4]=x*i+T*o+w*u+E*p,e[5]=x*n+T*a+w*c+E*g,e[6]=x*s+T*h+w*d+E*v,e[7]=x*r+T*l+w*f+E*m,x=y[8],T=y[9],w=y[10],E=y[11],e[8]=x*i+T*o+w*u+E*p,e[9]=x*n+T*a+w*c+E*g,e[10]=x*s+T*h+w*d+E*v,e[11]=x*r+T*l+w*f+E*m,x=y[12],T=y[13],w=y[14],E=y[15],e[12]=x*i+T*o+w*u+E*p,e[13]=x*n+T*a+w*c+E*g,e[14]=x*s+T*h+w*d+E*v,e[15]=x*r+T*l+w*f+E*m,this},multiplyLocal:function(t){var e=[],i=this.val,n=t.val;return e[0]=i[0]*n[0]+i[1]*n[4]+i[2]*n[8]+i[3]*n[12],e[1]=i[0]*n[1]+i[1]*n[5]+i[2]*n[9]+i[3]*n[13],e[2]=i[0]*n[2]+i[1]*n[6]+i[2]*n[10]+i[3]*n[14],e[3]=i[0]*n[3]+i[1]*n[7]+i[2]*n[11]+i[3]*n[15],e[4]=i[4]*n[0]+i[5]*n[4]+i[6]*n[8]+i[7]*n[12],e[5]=i[4]*n[1]+i[5]*n[5]+i[6]*n[9]+i[7]*n[13],e[6]=i[4]*n[2]+i[5]*n[6]+i[6]*n[10]+i[7]*n[14],e[7]=i[4]*n[3]+i[5]*n[7]+i[6]*n[11]+i[7]*n[15],e[8]=i[8]*n[0]+i[9]*n[4]+i[10]*n[8]+i[11]*n[12],e[9]=i[8]*n[1]+i[9]*n[5]+i[10]*n[9]+i[11]*n[13],e[10]=i[8]*n[2]+i[9]*n[6]+i[10]*n[10]+i[11]*n[14],e[11]=i[8]*n[3]+i[9]*n[7]+i[10]*n[11]+i[11]*n[15],e[12]=i[12]*n[0]+i[13]*n[4]+i[14]*n[8]+i[15]*n[12],e[13]=i[12]*n[1]+i[13]*n[5]+i[14]*n[9]+i[15]*n[13],e[14]=i[12]*n[2]+i[13]*n[6]+i[14]*n[10]+i[15]*n[14],e[15]=i[12]*n[3]+i[13]*n[7]+i[14]*n[11]+i[15]*n[15],this.fromArray(e)},translate:function(t){var e=t.x,i=t.y,n=t.z,s=this.val;return s[12]=s[0]*e+s[4]*i+s[8]*n+s[12],s[13]=s[1]*e+s[5]*i+s[9]*n+s[13],s[14]=s[2]*e+s[6]*i+s[10]*n+s[14],s[15]=s[3]*e+s[7]*i+s[11]*n+s[15],this},translateXYZ:function(t,e,i){var n=this.val;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this},scale:function(t){var e=t.x,i=t.y,n=t.z,s=this.val;return s[0]=s[0]*e,s[1]=s[1]*e,s[2]=s[2]*e,s[3]=s[3]*e,s[4]=s[4]*i,s[5]=s[5]*i,s[6]=s[6]*i,s[7]=s[7]*i,s[8]=s[8]*n,s[9]=s[9]*n,s[10]=s[10]*n,s[11]=s[11]*n,this},scaleXYZ:function(t,e,i){var n=this.val;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),s=1-i,r=t.x,o=t.y,a=t.z,h=s*r,l=s*o;return this.fromArray([h*r+i,h*o-n*a,h*a+n*o,0,h*o+n*a,l*o+i,l*a-n*r,0,h*a-n*o,l*a+n*r,s*a*a+i,0,0,0,0,1]),this},rotate:function(t,e){var i=this.val,n=e.x,s=e.y,r=e.z,o=Math.sqrt(n*n+s*s+r*r);if(Math.abs(o)<1e-6)return null;n*=o=1/o,s*=o,r*=o;var a=Math.sin(t),h=Math.cos(t),l=1-h,u=i[0],c=i[1],d=i[2],f=i[3],p=i[4],g=i[5],v=i[6],m=i[7],y=i[8],x=i[9],T=i[10],w=i[11],E=n*n*l+h,_=s*n*l+r*a,b=r*n*l-s*a,A=n*s*l-r*a,S=s*s*l+h,C=r*s*l+n*a,M=n*r*l+s*a,O=s*r*l-n*a,P=r*r*l+h;return i[0]=u*E+p*_+y*b,i[1]=c*E+g*_+x*b,i[2]=d*E+v*_+T*b,i[3]=f*E+m*_+w*b,i[4]=u*A+p*S+y*C,i[5]=c*A+g*S+x*C,i[6]=d*A+v*S+T*C,i[7]=f*A+m*S+w*C,i[8]=u*M+p*O+y*P,i[9]=c*M+g*O+x*P,i[10]=d*M+v*O+T*P,i[11]=f*M+m*O+w*P,this},rotateX:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this},rotateY:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this},rotateZ:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this},fromRotationTranslation:function(t,e){var i=this.val,n=t.x,s=t.y,r=t.z,o=t.w,a=n+n,h=s+s,l=r+r,u=n*a,c=n*h,d=n*l,f=s*h,p=s*l,g=r*l,v=o*a,m=o*h,y=o*l;return i[0]=1-(f+g),i[1]=c+y,i[2]=d-m,i[3]=0,i[4]=c-y,i[5]=1-(u+g),i[6]=p+v,i[7]=0,i[8]=d+m,i[9]=p-v,i[10]=1-(u+f),i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this},fromQuat:function(t){var e=this.val,i=t.x,n=t.y,s=t.z,r=t.w,o=i+i,a=n+n,h=s+s,l=i*o,u=i*a,c=i*h,d=n*a,f=n*h,p=s*h,g=r*o,v=r*a,m=r*h;return e[0]=1-(d+p),e[1]=u+m,e[2]=c-v,e[3]=0,e[4]=u-m,e[5]=1-(l+p),e[6]=f+g,e[7]=0,e[8]=c+v,e[9]=f-g,e[10]=1-(l+d),e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},frustum:function(t,e,i,n,s,r){var o=this.val,a=1/(e-t),h=1/(n-i),l=1/(s-r);return o[0]=2*s*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=2*s*h,o[6]=0,o[7]=0,o[8]=(e+t)*a,o[9]=(n+i)*h,o[10]=(r+s)*l,o[11]=-1,o[12]=0,o[13]=0,o[14]=r*s*2*l,o[15]=0,this},perspective:function(t,e,i,n){var s=this.val,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this},perspectiveLH:function(t,e,i,n){var s=this.val;return s[0]=2*i/t,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=2*i/e,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=-n/(i-n),s[11]=1,s[12]=0,s[13]=0,s[14]=i*n/(i-n),s[15]=0,this},ortho:function(t,e,i,n,s,r){var o=this.val,a=t-e,h=i-n,l=s-r;return a=0===a?a:1/a,h=0===h?h:1/h,l=0===l?l:1/l,o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*l,o[15]=1,this},lookAt:function(t,e,i){var n=this.val,s=t.x,r=t.y,o=t.z,a=i.x,h=i.y,l=i.z,u=e.x,c=e.y,d=e.z;if(Math.abs(s-u)<1e-6&&Math.abs(r-c)<1e-6&&Math.abs(o-d)<1e-6)return this.identity();var f=s-u,p=r-c,g=o-d,v=1/Math.sqrt(f*f+p*p+g*g),m=h*(g*=v)-l*(p*=v),y=l*(f*=v)-a*g,x=a*p-h*f;(v=Math.sqrt(m*m+y*y+x*x))?(m*=v=1/v,y*=v,x*=v):(m=0,y=0,x=0);var T=p*x-g*y,w=g*m-f*x,E=f*y-p*m;return(v=Math.sqrt(T*T+w*w+E*E))?(T*=v=1/v,w*=v,E*=v):(T=0,w=0,E=0),n[0]=m,n[1]=T,n[2]=f,n[3]=0,n[4]=y,n[5]=w,n[6]=p,n[7]=0,n[8]=x,n[9]=E,n[10]=g,n[11]=0,n[12]=-(m*s+y*r+x*o),n[13]=-(T*s+w*r+E*o),n[14]=-(f*s+p*r+g*o),n[15]=1,this},yawPitchRoll:function(t,e,i){this.zero(),s.zero(),r.zero();var n=this.val,o=s.val,a=r.val,h=Math.sin(i),l=Math.cos(i);return n[10]=1,n[15]=1,n[0]=l,n[1]=h,n[4]=-h,n[5]=l,h=Math.sin(e),l=Math.cos(e),o[0]=1,o[15]=1,o[5]=l,o[10]=l,o[9]=-h,o[6]=h,h=Math.sin(t),l=Math.cos(t),a[5]=1,a[15]=1,a[0]=l,a[2]=-h,a[8]=h,a[10]=l,this.multiplyLocal(s),this.multiplyLocal(r),this},setWorldMatrix:function(t,e,i,n,o){return this.yawPitchRoll(t.y,t.x,t.z),s.scaling(i.x,i.y,i.z),r.xyz(e.x,e.y,e.z),this.multiplyLocal(s),this.multiplyLocal(r),void 0!==n&&this.multiplyLocal(n),void 0!==o&&this.multiplyLocal(o),this}}),s=new n,r=new n;t.exports=n},function(t,e,i){var n=i(0),s=i(172),r=i(331),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new s(1,0,0),l=new s(0,1,0),u=new s,c=new r,d=new n({initialize:function(t,e,i,n){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(u.copy(h).cross(t).length()<1e-6&&u.copy(l).cross(t),u.normalize(),this.setAxisAngle(u,Math.PI)):i>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(u.copy(t).cross(e),this.x=u.x,this.y=u.y,this.z=u.z,this.w=1+i,this.normalize())},setAxes:function(t,e,i){var n=c.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.x=i*t.x,this.y=i*t.y,this.z=i*t.z,this.w=Math.cos(e),this},multiply:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.x=e*h+s*r+i*a-n*o,this.y=i*h+s*o+n*r-e*a,this.z=n*h+s*a+e*o-i*r,this.w=s*h-e*r-i*o-n*a,this},slerp:function(t,e){var i=this.x,n=this.y,s=this.z,r=this.w,o=t.x,a=t.y,h=t.z,l=t.w,u=i*o+n*a+s*h+r*l;u<0&&(u=-u,o=-o,a=-a,h=-h,l=-l);var c=1-e,d=e;if(1-u>1e-6){var f=Math.acos(u),p=Math.sin(f);c=Math.sin((1-e)*f)/p,d=Math.sin(e*f)/p}return this.x=c*i+d*o,this.y=c*n+d*a,this.z=c*s+d*h,this.w=c*r+d*l,this},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n,r=s?1/s:0;return this.x=-t*r,this.y=-e*r,this.z=-i*r,this.w=n*r,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+s*r,this.y=i*o+n*r,this.z=n*o-i*r,this.w=s*o-e*r,this},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o-n*r,this.y=i*o+s*r,this.z=n*o+e*r,this.w=s*o-i*r,this},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+i*r,this.y=i*o-e*r,this.z=n*o+s*r,this.w=s*o-n*r,this},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this.x=(i[7]-i[5])*e,this.y=(i[2]-i[6])*e,this.z=(i[3]-i[1])*e;else{var s=0;i[4]>i[0]&&(s=1),i[8]>i[3*s+s]&&(s=2);var r=o[s],h=o[r];e=Math.sqrt(i[3*s+s]-i[3*r+r]-i[3*h+h]+1),a[s]=.5*e,e=.5/e,a[r]=(i[3*r+s]+i[3*s+r])*e,a[h]=(i[3*h+s]+i[3*s+h])*e,this.x=a[0],this.y=a[1],this.z=a[2],this.w=(i[3*h+r]-i[3*r+h])*e}return this}});t.exports=d},function(t,e,i){var n=i(335),s=i(26),r=i(29),o=i(167);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===r.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==r.HEADLESS)if(e.renderType===r.CANVAS||e.renderType!==r.CANVAS&&!o.webGL){if(!o.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");e.renderType=r.CANVAS}else e.renderType=r.WEBGL;e.antialias||s.disableSmoothing();var a,h,l=t.scale.baseSize,u=l.width,c=l.height;e.canvas?(t.canvas=e.canvas,t.canvas.width=u,t.canvas.height=c):t.canvas=s.create(t,u,c,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||n.setCrisp(t.canvas),e.renderType!==r.HEADLESS&&(a=i(499),h=i(502),e.renderType===r.WEBGL?t.renderer=new h(t):(t.renderer=new a(t),t.context=t.renderer.gameContext))}},function(t,e){t.exports={setCrisp:function(t){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach(function(e){t.style["image-rendering"]=e}),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},function(t,e,i){var n=i(29);t.exports=function(t){var e=t.config;if(!e.hideBanner){var i="WebGL";e.renderType===n.CANVAS?i="Canvas":e.renderType===n.HEADLESS&&(i="Headless");var s,r=e.audio,o=t.device.audio;if(s=!o.webAudio||r&&r.disableWebAudio?r&&r.noAudio||!o.webAudio&&!o.audioData?"No Audio":"HTML5 Audio":"Web Audio",t.device.browser.ie)window.console&&console.log("Phaser v"+n.VERSION+" / https://phaser.io");else{var a,h="",l=[h];Array.isArray(e.bannerBackgroundColor)?(e.bannerBackgroundColor.forEach(function(t){h=h.concat("%c "),l.push("background: "+t),a=t}),l[l.length-1]="color: "+e.bannerTextColor+"; background: "+a):(h=h.concat("%c "),l.push("color: "+e.bannerTextColor+"; background: "+e.bannerBackgroundColor)),l.push("background: #fff"),e.gameTitle&&(h=h.concat(e.gameTitle),e.gameVersion&&(h=h.concat(" v"+e.gameVersion)),e.hidePhaser||(h=h.concat(" / "))),e.hidePhaser||(h=h.concat("Phaser v"+n.VERSION+" ("+i+" | "+s+")")),h=h.concat(" %c "+e.gameURL),l[0]=h,console.log.apply(console,l)}}}},function(t,e,i){var n=i(0),s=i(6),r=i(1),o=i(338),a=new n({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=s(e,"min",5),this.targetFps=s(e,"target",60),this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=r,this.forceSetTimeOut=s(e,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=s(e,"deltaHistory",10),this.panicMax=s(e,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=s(e,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var t=window.performance.now();this.time=t,this.lastTime=t,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0;for(var e=0;e0||!this.inFocus)&&(this._coolDown--,r=Math.min(r,this._target)),r>this._min&&(r=n[i],r=Math.min(r,this._min)),n[i]=r,this.deltaIndex++,this.deltaIndex>s&&(this.deltaIndex=0),o=0;for(var a=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t,this.frame++},tick:function(){this.step()},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running?this.sleep():t&&(this.startTime+=-this.lastTime+(this.lastTime+window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step()},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0,this.target=0;var t=this;this.step=function e(){var i=window.performance.now();t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.requestAnimationFrame(e)},this.stepTimeout=function e(){var i=Date.now(),n=Math.min(Math.max(2*t.target+t.tick-i,0),t.target);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,n)}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.target=i,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=s}});t.exports=r},function(t,e,i){var n=i(18);t.exports=function(t){var e,i=t.events;void 0!==document.hidden?e="visibilitychange":["webkit","moz","ms"].forEach(function(t){void 0!==document[t+"Hidden"]&&(document.hidden=function(){return document[t+"Hidden"]},e=t+"visibilitychange")});e&&document.addEventListener(e,function(t){document.hidden||"pause"===t.type?i.emit(n.HIDDEN):i.emit(n.VISIBLE)},!1),window.onblur=function(){i.emit(n.BLUR)},window.onfocus=function(){i.emit(n.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},function(t,e,i){var n=i(341),s=i(26),r=i(6);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",n),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),l=r(t,"resizeCanvas",!0),u=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),f=Math.floor(Math.abs(e[0].length*a)),p=Math.floor(Math.abs(e.length*h));i||(i=s.create2D(this,f,p),l=!1,u=!1),l&&(i.width=f,i.height=p);var g=i.getContext("2d");u&&g.clearRect(0,0,f,p),c&&c(i,g);for(var v=0;vi;)n-=i;ni.length-2?i.length-1:r+1],c=i[r>i.length-3?i.length-1:r+2];return e.set(n(a,h.x,l.x,u.x,c.x),n(a,h.y,l.y,u.y,c.y))},toJSON:function(){for(var t=[],e=0;e1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}},function(t,e,i){var n=i(116);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?n.cordova?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},function(t,e,i){var n=i(175);t.exports=function(t,e){var i=window.screen,s=!!i&&(i.orientation||i.mozOrientation||i.msOrientation);if(s&&"string"==typeof s.type)return s.type;if("string"==typeof s)return s;if(i)return i.height>i.width?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE;if("number"==typeof window.orientation)return 0===window.orientation||180===window.orientation?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return n.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return n.ORIENTATION.LANDSCAPE}return e>t?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE}},function(t,e){t.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},function(t,e){t.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},function(t,e){t.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5}},function(t,e){t.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},function(t,e){t.exports=function(t){var e;return""!==t&&("string"==typeof t?e=document.getElementById(t):t&&1===t.nodeType&&(e=t)),e||(e=document.body),e}},function(t,e){t.exports=function(t){var e="";try{window.DOMParser?e=(new DOMParser).parseFromString(t,"text/xml"):(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},function(t,e,i){var n=i(0),s=i(177),r=i(9),o=i(54),a=i(18),h=i(360),l=i(361),u=i(362),c=i(363),d=i(32),f=i(329),p=new n({initialize:function(t,e){this.game=t,this.scaleManager,this.canvas,this.config=e,this.enabled=!0,this.events=new r,this.isOver=!0,this.defaultCursor="",this.keyboard=e.inputKeyboard?new h(this):null,this.mouse=e.inputMouse?new l(this):null,this.touch=e.inputTouch?new c(this):null,this.pointers=[],this.pointersTotal=e.inputActivePointers,e.inputTouch&&1===this.pointersTotal&&(this.pointersTotal=2);for(var i=0;i<=this.pointersTotal;i++){var n=new u(this,i);n.smoothFactor=e.inputSmoothFactor,this.pointers.push(n)}this.mousePointer=e.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new d,this._tempMatrix2=new d,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],t.events.once(a.BOOT,this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.scaleManager=this.game.scale,this.events.emit(o.MANAGER_BOOT),this.game.events.on(a.PRE_RENDER,this.preRender,this),this.game.events.once(a.DESTROY,this.destroy,this)},setCanvasOver:function(t){this.isOver=!0,this.events.emit(o.GAME_OVER,t)},setCanvasOut:function(t){this.isOver=!1,this.events.emit(o.GAME_OUT,t)},preRender:function(){var t=this.game.loop.now,e=this.game.loop.delta,i=this.game.scene.getScenes(!0,!0);this.time=t,this.events.emit(o.MANAGER_UPDATE);for(var n=0;n10&&(t=10-this.pointersTotal);for(var i=0;i-1&&e.preventDefault()}},this.onKeyUp=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.useQueue||t.manager.events.emit(o.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}};var e=this.target;e&&(e.addEventListener("keydown",this.onKeyDown,!1),e.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var t=this.target;t.removeEventListener("keydown",this.onKeyDown,!1),t.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},removeCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(r.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});t.exports=l},function(t,e,i){var n=i(0),s=i(167),r=i(54),o=i(0),a=new n({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=o,this.onMouseDown=o,this.onMouseUp=o,this.onMouseDownWindow=o,this.onMouseUpWindow=o,this.onMouseOver=o,this.onMouseOut=o,this.onMouseWheel=o,this.pointerLockChange=o,t.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.capture=t.inputMouseCapture,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return document.body.addEventListener("contextmenu",function(t){return t.preventDefault(),!1}),this},requestPointerLock:function(){if(s.pointerLock){var t=this.target;t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock()}},releasePointerLock:function(){s.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t=this,e=this.manager.canvas,i=window&&window.focus&&this.manager.game.config.autoFocus;this.onMouseMove=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onMouseMove(e),t.capture&&e.preventDefault())},this.onMouseDown=function(n){i&&window.focus(),!n.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onMouseDown(n),t.capture&&n.target===e&&n.preventDefault())},this.onMouseDownWindow=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&i.target!==e&&t.manager.onMouseDown(i)},this.onMouseUp=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onMouseUp(i),t.capture&&i.target===e&&i.preventDefault())},this.onMouseUpWindow=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&i.target!==e&&t.manager.onMouseUp(i)},this.onMouseOver=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.setCanvasOver(e)},this.onMouseOut=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.setCanvasOut(e)},this.onMouseWheel=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.onMouseWheel(e)};var n=this.target;if(n){var r={passive:!0},o={passive:!1};n.addEventListener("mousemove",this.onMouseMove,this.capture?o:r),n.addEventListener("mousedown",this.onMouseDown,this.capture?o:r),n.addEventListener("mouseup",this.onMouseUp,this.capture?o:r),n.addEventListener("mouseover",this.onMouseOver,this.capture?o:r),n.addEventListener("mouseout",this.onMouseOut,this.capture?o:r),n.addEventListener("wheel",this.onMouseWheel,this.capture?o:r),window&&this.manager.game.config.inputWindowEvents&&(window.addEventListener("mousedown",this.onMouseDownWindow,o),window.addEventListener("mouseup",this.onMouseUpWindow,o)),s.pointerLock&&(this.pointerLockChange=function(e){var i=t.target;t.locked=document.pointerLockElement===i||document.mozPointerLockElement===i||document.webkitPointerLockElement===i,t.manager.onPointerLockChange(e)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("mouseover",this.onMouseOver),t.removeEventListener("mouseout",this.onMouseOut),window&&(window.removeEventListener("mousedown",this.onMouseDownWindow),window.removeEventListener("mouseup",this.onMouseUpWindow)),s.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=a},function(t,e,i){var n=i(314),s=i(0),r=i(53),o=i(144),a=i(323),h=i(3),l=new s({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new h,this.prevPosition=new h,this.midPoint=new h(-1,-1),this.velocity=new h,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=0===e,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(t){var e=this.x,i=this.y;1!==t.resolution&&(e+=t._x,i+=t._y);var n=t.getWorldPoint(e,i);return this.worldX=n.x,this.worldY=n.y,this},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},updateMotion:function(){var t=this.position.x,e=this.position.y,i=this.midPoint.x,s=this.midPoint.y;if(t!==i||e!==s){var r=a(this.motionFactor,i,t),h=a(this.motionFactor,s,e);o(r,t,.1)&&(r=t),o(h,e,.1)&&(h=e),this.midPoint.set(r,h);var l=t-r,u=e-h;this.velocity.set(l,u),this.angle=n(r,h,t,e),this.distance=Math.sqrt(l*l+u*u)}},up:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=t.timeStamp),this.isDown=!1,this.wasTouch=!1},down:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=t.timeStamp),this.isDown=!0,this.wasTouch=!1},move:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.locked&&(this.movementX=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.movementY=t.movementY||t.mozMovementY||t.webkitMovementY||0),this.moveTime=t.timeStamp,this.wasTouch=!1},wheel:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.deltaX=t.deltaX,this.deltaY=t.deltaY,this.deltaZ=t.deltaZ,this.wasTouch=!1},touchstart:function(t,e){t.pointerId&&(this.pointerId=t.pointerId),this.identifier=t.identifier,this.target=t.target,this.active=!0,this.buttons=1,this.event=e,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(t,e){this.event=e,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.moveTime=e.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return!!(1&this.buttons)},rightButtonDown:function(){return!!(2&this.buttons)},middleButtonDown:function(){return!!(4&this.buttons)},backButtonDown:function(){return!!(8&this.buttons)},forwardButtonDown:function(){return!!(16&this.buttons)},leftButtonReleased:function(){return 0===this.button&&!this.isDown},rightButtonReleased:function(){return 2===this.button&&!this.isDown},middleButtonReleased:function(){return 1===this.button&&!this.isDown},backButtonReleased:function(){return 3===this.button&&!this.isDown},forwardButtonReleased:function(){return 4===this.button&&!this.isDown},getDistance:function(){return this.isDown?r(this.downX,this.downY,this.x,this.y):r(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?n(this.downX,this.downY,this.x,this.y):n(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(t,e){void 0===t&&(t=10),void 0===e&&(e=[]);for(var i=this.prevPosition.x,n=this.prevPosition.y,s=this.position.x,r=this.position.y,o=0;o0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),t.events.on(a.PRE_STEP,this.step,this),t.events.once(a.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(t){this.getParent(t),this.getParentBounds();var e=t.width,i=t.height,s=t.scaleMode,r=t.resolution,o=t.zoom,a=t.autoRound;if("string"==typeof e){var h=this.parentSize.width;0===h&&(h=window.innerWidth);var l=parseInt(e,10)/100;e=Math.floor(h*l)}if("string"==typeof i){var c=this.parentSize.height;0===c&&(c=window.innerHeight);var d=parseInt(i,10)/100;i=Math.floor(c*d)}this.resolution=1,this.scaleMode=s,this.autoRound=a,this.autoCenter=t.autoCenter,this.resizeInterval=t.resizeInterval,a&&(e=Math.floor(e),i=Math.floor(i)),this.gameSize.setSize(e,i),o===n.ZOOM.MAX_ZOOM&&(o=this.getMaxZoom()),this.zoom=o,1!==o&&(this._resetZoom=!0),this.baseSize.setSize(e*r,i*r),a&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),t.minWidth>0&&this.displaySize.setMin(t.minWidth*o,t.minHeight*o),t.maxWidth>0&&this.displaySize.setMax(t.maxWidth*o,t.maxHeight*o),this.displaySize.setSize(e,i),this.orientation=u(e,i)},getParent:function(t){var e=t.parent;if(null!==e){if(this.parent=l(e),this.parentIsWindow=this.parent===document.body,t.expandParent&&t.scaleMode!==n.SCALE_MODE.NONE){var i=this.parent.getBoundingClientRect();(this.parentIsWindow||0===i.height)&&(document.documentElement.style.height="100%",document.body.style.height="100%",i=this.parent.getBoundingClientRect(),this.parentIsWindow||0!==i.height||(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}t.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=l(t.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var t=this.parentSize,e=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(e.height=h(!0));var i=this.resolution,n=e.width*i,s=e.height*i;return(t.width!==n||t.height!==s)&&(t.setSize(n,s),!0)},lockOrientation:function(t){var e=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return!!e&&e(t)},setParentSize:function(t,e){return this.parentSize.setSize(t,e),this.refresh()},setGameSize:function(t,e){var i=this.autoRound,n=this.resolution;i&&(t=Math.floor(t),e=Math.floor(e));var s=this.width,r=this.height;return this.gameSize.resize(t,e),this.baseSize.resize(t*n,e*n),i&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(t,e),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(s,r)},resize:function(t,e){var i=this.zoom,n=this.resolution,s=this.autoRound;s&&(t=Math.floor(t),e=Math.floor(e));var r=this.width,o=this.height;this.gameSize.resize(t,e),this.baseSize.resize(t*n,e*n),s&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(t*i*n,e*i*n),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var a=this.canvas.style,h=t*i,l=e*i;return s&&(h=Math.floor(h),l=Math.floor(l)),h===t&&l===e||(a.width=h+"px",a.height=l+"px"),this.refresh(r,o)},setZoom:function(t){return this.zoom=t,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},refresh:function(t,e){void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var i=this.game.domContainer;if(i){this.baseSize.setCSS(i);var n=this.canvas.style,s=i.style;s.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",s.marginLeft=n.marginLeft,s.marginTop=n.marginTop}return this.emit(o.RESIZE,this.gameSize,this.baseSize,this.displaySize,this.resolution,t,e),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var t=u(this.width,this.height);t!==this.orientation&&(this.orientation=t,this.emit(o.ORIENTATION_CHANGE,t))}},updateScale:function(){var t,e,i=this.canvas.style,s=this.gameSize.width,r=this.gameSize.height,o=this.zoom,a=this.autoRound;this.scaleMode===n.SCALE_MODE.NONE?(this.displaySize.setSize(s*o*1,r*o*1),t=this.displaySize.width/1,e=this.displaySize.height/1,a&&(t=Math.floor(t),e=Math.floor(e)),this._resetZoom&&(i.width=t+"px",i.height=e+"px",this._resetZoom=!1)):this.scaleMode===n.SCALE_MODE.RESIZE?(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(1*this.displaySize.width,1*this.displaySize.height),t=this.displaySize.width/1,e=this.displaySize.height/1,a&&(t=Math.floor(t),e=Math.floor(e)),this.canvas.width=t,this.canvas.height=e):(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),t=this.displaySize.width/1,e=this.displaySize.height/1,a&&(t=Math.floor(t),e=Math.floor(e)),i.width=t+"px",i.height=e+"px"),this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var t=p(this.parentSize.width,this.gameSize.width,0,!0),e=p(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(t,e),1)},updateCenter:function(){var t=this.autoCenter;if(t!==n.CENTER.NO_CENTER){var e=this.canvas,i=e.style,s=e.getBoundingClientRect(),r=s.width,o=s.height,a=Math.floor((this.parentSize.width-r)/2),h=Math.floor((this.parentSize.height-o)/2);t===n.CENTER.CENTER_HORIZONTALLY?h=0:t===n.CENTER.CENTER_VERTICALLY&&(a=0),i.marginLeft=a+"px",i.marginTop=h+"px"}},updateBounds:function(){var t=this.canvasBounds,e=this.canvas.getBoundingClientRect();t.x=e.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),t.y=e.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),t.width=e.width,t.height=e.height},transformX:function(t){return(t-this.canvasBounds.left)*this.displayScale.x},transformY:function(t){return(t-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(t){void 0===t&&(t={navigationUI:"hide"});var e=this.fullscreen;if(e.available){if(!e.active){var i,n=this.getFullscreenTarget();(i=e.keyboard?n[e.request](Element.ALLOW_KEYBOARD_INPUT):n[e.request](t))?i.then(this.fullscreenSuccessHandler.bind(this)).catch(this.fullscreenErrorHandler.bind(this)):e.active?this.fullscreenSuccessHandler():this.fullscreenErrorHandler()}}else this.emit(o.FULLSCREEN_UNSUPPORTED)},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(o.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(t){this.removeFullscreenTarget(),this.emit(o.FULLSCREEN_FAILED,t)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var t=document.createElement("div");t.style.margin="0",t.style.padding="0",t.style.width="100%",t.style.height="100%",this.fullscreenTarget=t,this._createdFullscreenTarget=!0}this._createdFullscreenTarget&&(this.canvas.parentNode.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas));return this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var t=this.fullscreenTarget;if(t&&t.parentNode){var e=t.parentNode;e.insertBefore(this.canvas,t),e.removeChild(t)}}},stopFullscreen:function(){var t=this.fullscreen;if(!t.available)return this.emit(o.FULLSCREEN_UNSUPPORTED),!1;t.active&&document[t.cancel](),this.removeFullscreenTarget(),this.getParentBounds(),this.emit(o.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(t){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(t)},startListeners:function(){var t=this,e=this.listeners;if(e.orientationChange=function(){t._checkOrientation=!0,t.dirty=!0},e.windowResize=function(){t.dirty=!0},window.addEventListener("orientationchange",e.orientationChange,!1),window.addEventListener("resize",e.windowResize,!1),this.fullscreen.available){e.fullScreenChange=function(e){return t.onFullScreenChange(e)},e.fullScreenError=function(e){return t.onFullScreenError(e)};["webkit","moz",""].forEach(function(t){document.addEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.addEventListener(t+"fullscreenerror",e.fullScreenError,!1)}),document.addEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.addEventListener("MSFullscreenError",e.fullScreenError,!1)}},onFullScreenChange:function(){document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||this.stopFullscreen()},onFullScreenError:function(){this.removeFullscreenTarget()},step:function(t,e){this.parent&&(this._lastCheck+=e,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var t=this.listeners;window.removeEventListener("orientationchange",t.orientationChange,!1),window.removeEventListener("resize",t.windowResize,!1);["webkit","moz",""].forEach(function(e){document.removeEventListener(e+"fullscreenchange",t.fullScreenChange,!1),document.removeEventListener(e+"fullscreenerror",t.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",t.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",t.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===n.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===n.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=v},function(t,e,i){var n=i(22),s=i(0),r=i(93),o=i(3),a=new s({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=null),this._width=t,this._height=e,this._parent=n,this.aspectMode=i,this.aspectRatio=0===e?1:t/e,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new o},setAspectMode:function(t){return void 0===t&&(t=0),this.aspectMode=t,this.setSize(this._width,this._height)},setSnap:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.snapTo.set(t,e),this.setSize(this._width,this._height)},setParent:function(t){return this._parent=t,this.setSize(this._width,this._height)},setMin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.minWidth=n(t,0,this.maxWidth),this.minHeight=n(e,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(t,e){return void 0===t&&(t=Number.MAX_VALUE),void 0===e&&(e=t),this.maxWidth=n(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=n(e,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(t,e){switch(void 0===t&&(t=0),void 0===e&&(e=t),this.aspectMode){case a.NONE:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case a.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case a.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(r(e,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case a.FIT:this.constrain(t,e,!0);break;case a.ENVELOP:this.constrain(t,e,!1)}return this},setAspectRatio:function(t){return this.aspectRatio=t,this.setSize(this._width,this._height)},resize:function(t,e){return this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minWidth,this.maxWidth),e&&this._parent&&t>this._parent.width&&(t=Math.max(this.minWidth,this._parent.width)),t},getNewHeight:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minHeight,this.maxHeight),e&&this._parent&&t>this._parent.height&&(t=Math.max(this.minHeight,this._parent.height)),t},constrain:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=!0),t=this.getNewWidth(t),e=this.getNewHeight(e);var n=this.snapTo,s=0===e?1:t/e;return i&&this.aspectRatio>s||!i&&this.aspectRatio0&&(t=(e=r(e,n.y))*this.aspectRatio)):(i&&this.aspectRatios)&&(t=(e=r(e,n.y))*this.aspectRatio,n.x>0&&(e=(t=r(t,n.x))*(1/this.aspectRatio))),this._width=t,this._height=e,this},fitTo:function(t,e){return this.constrain(t,e,!0)},envelop:function(t,e){return this.constrain(t,e,!1)},setWidth:function(t){return this.setSize(t,this._height)},setHeight:function(t){return this.setSize(this._width,t)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(t){t&&t.style&&(t.style.width=this._width+"px",t.style.height=this._height+"px")},copy:function(t){return t.setAspectMode(this.aspectMode),t.aspectRatio=this.aspectRatio,t.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(t){this.setSize(t,this._height)}},height:{get:function(){return this._height},set:function(t){this.setSize(this._width,t)}}});a.NONE=0,a.WIDTH_CONTROLS_HEIGHT=1,a.HEIGHT_CONTROLS_WIDTH=2,a.FIT=3,a.ENVELOP=4,t.exports=a},function(t,e,i){var n=i(0),s=i(123),r=i(19),o=i(18),a=i(6),h=i(81),l=i(1),u=i(368),c=i(178),d=new n({initialize:function(t,e){if(this.game=t,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,e){Array.isArray(e)||(e=[e]);for(var i=0;i-1&&(delete this.keys[n],this.scenes.splice(i,1),this._start.indexOf(n)>-1&&(i=this._start.indexOf(n),this._start.splice(i,1)),e.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,n=i.settings;t.init&&(t.init.call(t,n.data),n.status=s.INIT,n.isTransition&&i.events.emit(r.TRANSITION_INIT,n.transitionFrom,n.transitionDuration)),i.load&&(e=i.load).reset(),e&&t.preload?(t.preload.call(t),0===e.list.size?this.create(t):(n.status=s.LOADING,e.once(h.COMPLETE,this.loadComplete,this),e.start())):this.create(t)},loadComplete:function(t){var e=t.scene;this.game.sound&&this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(e)},payloadComplete:function(t){this.bootScene(t.scene)},update:function(t,e){this.processQueue(),this.isProcessing=!0;for(var i=this.scenes.length-1;i>=0;i--){var n=this.scenes[i].sys;n.settings.status>s.START&&n.settings.status<=s.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e=s.LOADING&&i.settings.status0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,n=this.getScene(t),s=this.getAt(i);this.scenes[e]=s,this.scenes[i]=n}}return this},moveUp:function(t){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e=r.x&&t=r.y&&e=r.x&&t=r.y&&e-1){var o=this.context.getImageData(t,e,1,1);o.data[0]=i,o.data[1]=n,o.data[2]=s,o.data[3]=r,this.context.putImageData(o,t,e)}return this},putData:function(t,e,i,n,s,r,o){return void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=t.width),void 0===o&&(o=t.height),this.context.putImageData(t,e,i,n,s,r,o),this},getData:function(t,e,i,n){return t=s(Math.floor(t),0,this.width-1),e=s(Math.floor(e),0,this.height-1),i=s(i,1,this.width-t),n=s(n,1,this.height-e),this.context.getImageData(t,e,i,n)},getPixel:function(t,e,i){i||(i=new r);var n=this.getIndex(t,e);if(n>-1){var s=this.data,o=s[n+0],a=s[n+1],h=s[n+2],l=s[n+3];i.setTo(o,a,h,l)}return i},getPixels:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=i),t=Math.abs(Math.round(t)),e=Math.abs(Math.round(e));for(var o=s(t,0,this.width),a=s(t+i,0,this.width),h=s(e,0,this.height),l=s(e+n,0,this.height),u=new r,c=[],d=h;d0)&&(!!n.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(r.PAUSE,this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!n.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit(r.RESUME,this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!n.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit(r.STOP,this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t0)this.startTime=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s=n)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit(r.COMPLETE,this);this.previousTime=s}},destroy:function(){n.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=this.currentConfig.volume*this.manager.volume)},calculateRate:function(){n.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.updateMute(),this.emit(r.MUTE,this,t))}},setMute:function(t){return this.mute=t,this},volume:{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.updateVolume(),this.emit(r.VOLUME,this,t))}},setVolume:function(t){return this.volume=t,this},rate:{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,r.RATE,t)||(this.calculateRate(),this.emit(r.RATE,this,t))}},setRate:function(t){return this.rate=t,this},detune:{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,r.DETUNE,t)||(this.calculateRate(),this.emit(r.DETUNE,this,t))}},setDetune:function(t){return this.detune=t,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit(r.SEEK,this,t))}},setSeek:function(t){return this.seek=t,this},loop:{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit(r.LOOP,this,t))}},setLoop:function(t){return this.loop=t,this}});t.exports=o},function(t,e,i){var n=i(124),s=i(0),r=i(9),o=i(378),a=i(1),h=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return n.prototype.remove.call(this,t)},removeByKey:function(t){return n.prototype.removeByKey.call(this,t)},pauseAll:a,resumeAll:a,stopAll:a,update:a,setRate:a,setDetune:a,setMute:a,setVolume:a,forEachActiveSound:function(t,e){n.prototype.forEachActiveSound.call(this,t,e)},destroy:function(){n.prototype.destroy.call(this)}});t.exports=h},function(t,e,i){var n=i(125),s=i(0),r=i(9),o=i(17),a=new s({Extends:r,initialize:function(t,e,i){void 0===i&&(i={}),r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!1},updateMarker:function(t){return!1},removeMarker:function(t){return null},play:function(t,e){return!1},pause:function(){return!1},resume:function(){return!1},stop:function(){return!1},destroy:function(){this.manager.remove(this),n.prototype.destroy.call(this)}});t.exports=a},function(t,e,i){var n=i(380),s=i(124),r=i(0),o=i(59),a=i(381),h=new r({Extends:s,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&("ontouchstart"in window||"onclick"in window),s.call(this,t),this.locked&&this.unlock()},createAudioContext:function(t){var e=t.config.audio;return e&&e.context?(e.context.resume(),e.context):new AudioContext},setAudioContext:function(t){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=t,this.masterMuteNode=t.createGain(),this.masterVolumeNode=t.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(t.destination),this.destination=this.masterMuteNode,this},add:function(t,e){var i=new a(this,t,e);return this.sounds.push(i),i},decodeAudio:function(t,e){var i;i=Array.isArray(t)?t:[{key:t,data:e}];for(var s=this.game.cache.audio,r=i.length,a=0;a>4,u[h++]=(15&i)<<4|s>>2,u[h++]=(3&s)<<6|63&r;return l}},function(t,e,i){var n=i(125),s=i(0),r=i(59),o=new s({Extends:n,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('There is no audio asset with key "'+e+'" in the audio cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,n.call(this,t,e,i)},play:function(t,e){return!!n.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime-1;r--)n[s][r]=t[r][s]}return n}},function(t,e){function i(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function n(t,e){return te?1:0}var s=function(t,e,r,o,a){for(void 0===r&&(r=0),void 0===o&&(o=t.length-1),void 0===a&&(a=n);o>r;){if(o-r>600){var h=o-r+1,l=e-r+1,u=Math.log(h),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),f=Math.max(r,Math.floor(e-l*c/h+d)),p=Math.min(o,Math.floor(e+(h-l)*c/h+d));s(t,e,f,p,a)}var g=t[e],v=r,m=o;for(i(t,r,e),a(t[o],g)>0&&i(t,r,o);v0;)m--}0===a(t[r],g)?i(t,r,m):i(t,++m,o),m<=e&&(r=m+1),e<=m&&(o=m-1)}};t.exports=s},function(t,e,i){var n=i(6),s=i(114),r=function(t,e,i){for(var n=[],s=0;s0?s.delayedPlay(d,r,o):s.load(r)}return t}},function(t,e,i){var n=i(11);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=Math.min(t.x,e.x),r=Math.min(t.y,e.y),o=Math.max(t.right,e.right)-s,a=Math.max(t.bottom,e.bottom)-r;return i.setTo(s,r,o,a)}},function(t,e,i){var n=i(0),s=i(12),r=i(950),o=i(14),a=i(7),h=i(176),l=i(19),u=i(330),c=new n({Extends:o,Mixins:[s.AlphaSingle,s.BlendMode,s.Depth,s.Origin,s.ScrollFactor,s.Transform,s.Visible,r],initialize:function(t,e,i,n,s,r){o.call(this,t,"DOMElement"),this.parent=t.sys.game.domContainer,this.cache=t.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new u,this.rotate3dAngle="deg",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(e,i),"string"==typeof n?"#"===n[0]?this.setElement(n.substr(1),s,r):this.createElement(n,s,r):n&&this.setElement(n,s,r),t.sys.events.on(l.SLEEP,this.handleSceneEvent,this),t.sys.events.on(l.WAKE,this.handleSceneEvent,this)},handleSceneEvent:function(t){var e=this.node,i=e.style;e&&(i.display=t.settings.visible?"block":"none")},setSkew:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.skewX=t,this.skewY=e,this},setPerspective:function(t){return this.parent.style.perspective=t+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(t){this.parent.style.perspective=t+"px"}},addListener:function(t){if(this.node){t=t.split(" ");for(var e=0;e>>16,y=(65280&p)>>>8,x=255&p,c.strokeStyle="rgba("+m+","+y+","+x+","+d+")",c.lineWidth=v,T+=3;break;case n.FILL_STYLE:g=l[T+1],f=l[T+2],m=(16711680&g)>>>16,y=(65280&g)>>>8,x=255&g,c.fillStyle="rgba("+m+","+y+","+x+","+f+")",T+=2;break;case n.BEGIN_PATH:c.beginPath();break;case n.CLOSE_PATH:c.closePath();break;case n.FILL_PATH:h||c.fill();break;case n.STROKE_PATH:h||c.stroke();break;case n.FILL_RECT:h?c.rect(l[T+1],l[T+2],l[T+3],l[T+4]):c.fillRect(l[T+1],l[T+2],l[T+3],l[T+4]),T+=4;break;case n.FILL_TRIANGLE:c.beginPath(),c.moveTo(l[T+1],l[T+2]),c.lineTo(l[T+3],l[T+4]),c.lineTo(l[T+5],l[T+6]),c.closePath(),h||c.fill(),T+=6;break;case n.STROKE_TRIANGLE:c.beginPath(),c.moveTo(l[T+1],l[T+2]),c.lineTo(l[T+3],l[T+4]),c.lineTo(l[T+5],l[T+6]),c.closePath(),h||c.stroke(),T+=6;break;case n.LINE_TO:c.lineTo(l[T+1],l[T+2]),T+=2;break;case n.MOVE_TO:c.moveTo(l[T+1],l[T+2]),T+=2;break;case n.LINE_FX_TO:c.lineTo(l[T+1],l[T+2]),T+=5;break;case n.MOVE_FX_TO:c.moveTo(l[T+1],l[T+2]),T+=5;break;case n.SAVE:c.save();break;case n.RESTORE:c.restore();break;case n.TRANSLATE:c.translate(l[T+1],l[T+2]),T+=2;break;case n.SCALE:c.scale(l[T+1],l[T+2]),T+=2;break;case n.ROTATE:c.rotate(l[T+1]),T+=1;break;case n.GRADIENT_FILL_STYLE:T+=5;break;case n.GRADIENT_LINE_STYLE:T+=6;break;case n.SET_TEXTURE:T+=2}c.restore()}}},function(t,e,i){var n=i(0),s=i(2),r=new n({initialize:function(t,e,i,n,r){if("object"==typeof t){var o=t;t=s(o,"x",0),e=s(o,"y",0),i=s(o,"power",0),n=s(o,"epsilon",100),r=s(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i=this.x-t.x,n=this.y-t.y,s=i*i+n*n;if(0!==s){var r=Math.sqrt(s);s0},resetPosition:function(){this.x=0,this.y=0},fire:function(t,e){var i=this.emitter;this.frame=i.getFrame(),i.emitZone&&i.emitZone.getPoint(this),void 0===t?(i.follow&&(this.x+=i.follow.x+i.followOffset.x),this.x+=i.x.onEmit(this,"x")):this.x+=t,void 0===e?(i.follow&&(this.y+=i.follow.y+i.followOffset.y),this.y+=i.y.onEmit(this,"y")):this.y+=e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var n=i.speedX.onEmit(this,"speedX"),o=i.speedY?i.speedY.onEmit(this,"speedY"):n;if(i.radial){var a=s(i.angle.onEmit(this,"angle"));this.velocityX=Math.cos(a)*Math.abs(n),this.velocityY=Math.sin(a)*Math.abs(o)}else if(i.moveTo){var h=i.moveToX.onEmit(this,"moveToX"),l=i.moveToY?i.moveToY.onEmit(this,"moveToY"):h,u=Math.atan2(l-this.y,h-this.x),c=r(this.x,this.y,h,l)/(this.life/1e3);this.velocityX=Math.cos(u)*c,this.velocityY=Math.sin(u)*c}else this.velocityX=n,this.velocityY=o;i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY?i.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=s(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint")},computeVelocity:function(t,e,i,n){var s=this.velocityX,r=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,l=this.maxVelocityY;s+=t.gravityX*i,r+=t.gravityY*i,o&&(s+=o*i),a&&(r+=a*i),s>h?s=h:s<-h&&(s=-h),r>l?r=l:r<-l&&(r=-l),this.velocityX=s,this.velocityY=r;for(var u=0;ue.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(this.delayCurrent>0)return this.delayCurrent-=t,!1;var n=this.emitter,r=1-this.lifeCurrent/this.life;return this.lifeT=r,this.computeVelocity(n,t,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,n.bounds&&this.checkBounds(n),n.deathZone&&n.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=n.scaleX.onUpdate(this,"scaleX",r,this.scaleX),n.scaleY?this.scaleY=n.scaleY.onUpdate(this,"scaleY",r,this.scaleY):this.scaleY=this.scaleX,this.angle=n.rotate.onUpdate(this,"rotate",r,this.angle),this.rotation=s(this.angle),this.alpha=n.alpha.onUpdate(this,"alpha",r,this.alpha),this.tint=n.tint.onUpdate(this,"tint",r,this.tint),this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=o},function(t,e,i){var n=i(52),s=i(0),r=i(12),o=i(397),a=i(398),h=i(967),l=i(2),u=i(183),c=i(399),d=i(99),f=i(395),p=i(400),g=i(11),v=i(128),m=i(3),y=i(58),x=new s({Mixins:[r.BlendMode,r.Mask,r.ScrollFactor,r.Visible],initialize:function(t,e){this.manager=t,this.texture=t.texture,this.frames=[t.defaultFrame],this.defaultFrame=t.defaultFrame,this.configFastMap=["active","blendMode","collideBottom","collideLeft","collideRight","collideTop","deathCallback","deathCallbackScope","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxParticles","name","on","particleBringToTop","particleClass","radial","timeScale","trackVisible","visible"],this.configOpMap=["accelerationX","accelerationY","angle","alpha","bounce","delay","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],this.name="",this.particleClass=f,this.x=new h(e,"x",0,!0),this.y=new h(e,"y",0,!0),this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.accelerationX=new h(e,"accelerationX",0,!0),this.accelerationY=new h(e,"accelerationY",0,!0),this.maxVelocityX=new h(e,"maxVelocityX",1e4,!0),this.maxVelocityY=new h(e,"maxVelocityY",1e4,!0),this.speedX=new h(e,"speedX",0,!0),this.speedY=new h(e,"speedY",0,!0),this.moveTo=!1,this.moveToX=new h(e,"moveToX",0,!0),this.moveToY=new h(e,"moveToY",0,!0),this.bounce=new h(e,"bounce",0,!0),this.scaleX=new h(e,"scaleX",1),this.scaleY=new h(e,"scaleY",1),this.tint=new h(e,"tint",4294967295),this.alpha=new h(e,"alpha",1),this.lifespan=new h(e,"lifespan",1e3,!0),this.angle=new h(e,"angle",{min:0,max:360},!0),this.rotate=new h(e,"rotate",0),this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.quantity=new h(e,"quantity",1,!0),this.delay=new h(e,"delay",0,!0),this.frequency=0,this.on=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZone=null,this.deathZone=null,this.bounds=null,this.collideLeft=!0,this.collideRight=!0,this.collideTop=!0,this.collideBottom=!0,this.active=!0,this.visible=!0,this.blendMode=n.NORMAL,this.follow=null,this.followOffset=new m,this.trackVisible=!1,this.currentFrame=0,this.randomFrame=!0,this.frameQuantity=1,this.dead=[],this.alive=[],this._counter=0,this._frameCounter=0,e&&this.fromJSON(e)},fromJSON:function(t){if(!t)return this;var e=0,i="";for(e=0;e0&&this.getParticleCount()===this.maxParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,n=i.length,s=0;s0){var u=this.deathCallback,c=this.deathCallbackScope;for(o=h-1;o>=0;o--){var d=a[o];s.splice(d.index,1),r.push(d.particle),u&&u.call(c,d.particle),d.particle.resetPosition()}}this.on&&(0===this.frequency?this.emitParticle():this.frequency>0&&(this._counter-=e,this._counter<=0&&(this.emitParticle(),this._counter=this.frequency-Math.abs(this._counter))))},depthSortCallback:function(t,e){return t.y-e.y}});t.exports=x},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=this.source.contains(t.x,t.y);return e&&this.killOnEnter||!e&&!this.killOnEnter}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s){void 0===n&&(n=!1),void 0===s&&(s=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=s,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=n},function(t,e){t.exports=function(t,e){for(var i=0;i0&&(s=-h.PI2+s%h.PI2):s>h.PI2?s=h.PI2:s<0&&(s=h.PI2+s%h.PI2);for(var u,c=[a+Math.cos(n)*i,l+Math.sin(n)*i];e<1;)u=s*e+n,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),e+=t;return u=s+n,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),c.push(a+Math.cos(n)*i,l+Math.sin(n)*i),this.pathIndexes=o(c),this.pathData=c,this}});t.exports=u},function(t,e,i){var n=i(0),s=i(993),r=i(66),o=i(11),a=i(30),h=new n({Extends:a,Mixins:[s],initialize:function(t,e,i,n,s,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",n),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==s&&this.setFillStyle(s,r),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){var t=this._curveBounds,e=this._smoothness;this.geom.getBounds(t,e),this.setSize(t.width,t.height),this.updateDisplayOrigin();for(var i=[],n=this.geom.getPoints(e),s=0;sc+v)){var m=g.getPoint((u-c)/v);o.push(m);break}c+=v}return o}},function(t,e,i){var n=i(57),s=i(56);t.exports=function(t){for(var e=t.points,i=0,r=0;r0&&r.push(i([0,0],n[0])),e=0;e1&&r.push(i([0,0],n[n.length-1])),t.setTo(r)}},function(t,e,i){var n=i(0),s=i(11),r=i(30),o=i(1014),a=new n({Extends:r,Mixins:[o],initialize:function(t,e,i,n,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===o&&(o=128),r.call(this,t,"Rectangle",new s(0,0,n,o)),this.setPosition(e,i),this.setSize(n,o),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),e.getLineD(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=a},function(t,e,i){var n=i(1017),s=i(0),r=i(66),o=i(30),a=new s({Extends:o,Mixins:[n],initialize:function(t,e,i,n,s,r,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=5),void 0===s&&(s=32),void 0===r&&(r=64),o.call(this,t,"Star",null),this._points=n,this._innerRadius=s,this._outerRadius=r,this.setPosition(e,i),this.setSize(2*r,2*r),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},setPoints:function(t){return this._points=t,this.updateData()},setInnerRadius:function(t){return this._innerRadius=t,this.updateData()},setOuterRadius:function(t){return this._outerRadius=t,this.updateData()},points:{get:function(){return this._points},set:function(t){this._points=t,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(t){this._innerRadius=t,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(t){this._outerRadius=t,this.updateData()}},updateData:function(){var t=[],e=this._points,i=this._innerRadius,n=this._outerRadius,s=Math.PI/2*3,o=Math.PI/e,a=n,h=n;t.push(a,h+-n);for(var l=0;l=1)return i.x=r.x1,i.y=r.y1,i;var h=s(r),l=s(o),u=s(a),c=(h+l+u)*e,d=0;return ch+l?(d=(c-=h+l)/u,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/l,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},function(t,e,i){var n=i(57),s=i(4);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),l=n(o),u=n(a),c=n(h),d=l+u+c;e||(e=d/i);for(var f=0;fl+u?(g=(p-=l+u)/c,v.x=h.x1+(h.x2-h.x1)*g,v.y=h.y1+(h.y2-h.y1)*g):(g=(p-=l)/u,v.x=a.x1+(a.x2-a.x1)*g,v.y=a.y1+(a.y2-a.y1)*g),r.push(v)}return r}},function(t,e){t.exports=function(t,e,i){if(!t||"number"==typeof t)return!1;if(t.hasOwnProperty(e))return t[e]=i,!0;if(-1!==e.indexOf(".")){for(var n=e.split("."),s=t,r=t,o=0;o0?(h=this.lightPool.pop()).set(t,e,i,a[0],a[1],a[2],o):h=new s(t,e,i,a[0],a[1],a[2],o),this.lights.push(h),h},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&(this.lightPool.push(t),this.lights.splice(e,1)),this},shutdown:function(){for(;this.lights.length>0;)this.lightPool.push(this.lights.pop());this.ambientColor={r:.1,g:.1,b:.1},this.culledLights.length=0,this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=o},function(t,e,i){var n=i(46),s=i(17),r={Circle:i(1078),Ellipse:i(1088),Intersects:i(423),Line:i(1107),Point:i(1128),Polygon:i(1142),Rectangle:i(436),Triangle:i(1172)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={CircleToCircle:i(202),CircleToRectangle:i(203),GetCircleToCircle:i(1098),GetCircleToRectangle:i(1099),GetLineToCircle:i(204),GetLineToRectangle:i(206),GetRectangleIntersection:i(1100),GetRectangleToRectangle:i(1101),GetRectangleToTriangle:i(1102),GetTriangleToCircle:i(1103),GetTriangleToLine:i(428),GetTriangleToTriangle:i(1104),LineToCircle:i(205),LineToLine:i(84),LineToRectangle:i(424),PointToLine:i(432),PointToLineSegment:i(1105),RectangleToRectangle:i(131),RectangleToTriangle:i(425),RectangleToValues:i(1106),TriangleToCircle:i(427),TriangleToLine:i(429),TriangleToTriangle:i(430)}},function(t,e){t.exports=function(t,e){var i=t.x1,n=t.y1,s=t.x2,r=t.y2,o=e.x,a=e.y,h=e.right,l=e.bottom,u=0;if(i>=o&&i<=h&&n>=a&&n<=l||s>=o&&s<=h&&r>=a&&r<=l)return!0;if(i=o){if((u=n+(r-n)*(o-i)/(s-i))>a&&u<=l)return!0}else if(i>h&&s<=h&&(u=n+(r-n)*(h-i)/(s-i))>=a&&u<=l)return!0;if(n=a){if((u=i+(s-i)*(a-n)/(r-n))>=o&&u<=h)return!0}else if(n>l&&r<=l&&(u=i+(s-i)*(l-n)/(r-n))>=o&&u<=h)return!0;return!1}},function(t,e,i){var n=i(84),s=i(47),r=i(207),o=i(426);t.exports=function(t,e){if(e.left>t.right||e.rightt.bottom||e.bottom0}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},function(t,e,i){var n=i(205),s=i(83);t.exports=function(t,e){return!(t.left>e.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottom0||(c=s(e),(d=n(t,c,!0)).length>0)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},function(t,e){t.exports=function(t,e,i){void 0===i&&(i=1);var n=e.x1,s=e.y1,r=e.x2,o=e.y2,a=t.x,h=t.y,l=(r-n)*(r-n)+(o-s)*(o-s);if(0===l)return!1;var u=((a-n)*(r-n)+(h-s)*(o-s))/l;if(u<0)return Math.sqrt((n-a)*(n-a)+(s-h)*(s-h))<=i;if(u>=0&&u<=1){var c=((s-h)*(r-n)-(n-a)*(o-s))/l;return Math.abs(c)*Math.sqrt(l)<=i}return Math.sqrt((r-a)*(r-a)+(o-h)*(o-h))<=i}},function(t,e,i){var n=i(13),s=i(58),r=i(85);t.exports=function(t){var e=r(t)-n.TAU;return s(e,-Math.PI,Math.PI)}},function(t,e){t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},function(t,e){t.exports=function(t){return t.x*t.x+t.y*t.y}},function(t,e,i){var n=i(11);n.Area=i(1147),n.Ceil=i(1148),n.CeilAll=i(1149),n.CenterOn=i(165),n.Clone=i(1150),n.Contains=i(47),n.ContainsPoint=i(1151),n.ContainsRect=i(437),n.CopyFrom=i(1152),n.Decompose=i(426),n.Equals=i(1153),n.FitInside=i(1154),n.FitOutside=i(1155),n.Floor=i(1156),n.FloorAll=i(1157),n.FromPoints=i(174),n.GetAspectRatio=i(209),n.GetCenter=i(1158),n.GetPoint=i(149),n.GetPoints=i(271),n.GetSize=i(1159),n.Inflate=i(1160),n.Intersection=i(1161),n.MarchingAnts=i(282),n.MergePoints=i(1162),n.MergeRect=i(1163),n.MergeXY=i(1164),n.Offset=i(1165),n.OffsetPoint=i(1166),n.Overlaps=i(1167),n.Perimeter=i(112),n.PerimeterPoint=i(1168),n.Random=i(152),n.RandomOutside=i(1169),n.SameDimensions=i(1170),n.Scale=i(1171),n.Union=i(386),t.exports=n},function(t,e){t.exports=function(t,e){return!(e.width*e.height>t.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(s.BUTTON_DOWN,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(s.BUTTON_UP,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},function(t,e,i){var n=i(442),s=i(443),r=i(0),o=i(9),a=i(3),h=new r({Extends:o,initialize:function(t,e){o.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],r=0;r=2&&(this.leftStick.set(r[0].getValue(),r[1].getValue()),s>=4&&this.rightStick.set(r[2].getValue(),r[3].getValue()))},destroy:function(){var t;for(this.removeAllListeners(),this.manager=null,this.pad=null,t=0;t=r;for(i=0;i=r;)this._elapsed-=r,this.step(s)}},step:function(t){var e,i,n=this.bodies.entries,s=n.length;for(e=0;e0){var l=this.tree,u=this.staticTree;for(n=(i=h.entries).length,t=0;t-1&&p>g&&(t.velocity.normalize().scale(g),p=g),t.speed=p},separate:function(t,e,i,n,s){if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,s);if(t.isCircle!==e.isCircle){var r=t.isCircle?e:t,o=t.isCircle?t:e,a={x:r.x,y:r.y,right:r.right,bottom:r.bottom},h=o.center;if((h.ya.bottom)&&(h.xa.right))return this.separateCircle(t,e,s)}var l=!1,c=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)r.right&&(s=h(o.x,o.y,r.right,r.y)-o.radius):o.y>r.bottom&&(o.xr.right&&(s=h(o.x,o.y,r.right,r.bottom)-o.radius)),s*=-1}else s=t.halfWidth+e.halfWidth-h(t.center.x,t.center.y,e.center.x,e.center.y);if(i||0===s||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==s&&(t.onOverlap||e.onOverlap)&&this.emit(u.OVERLAP,t.gameObject,e.gameObject,t,e),0!==s;var a=t.center.x-e.center.x,l=t.center.y-e.center.y,c=Math.sqrt(Math.pow(a,2)+Math.pow(l,2)),d=(e.center.x-t.center.x)/c||0,f=(e.center.y-t.center.y)/c||0,v=2*(t.velocity.x*d+t.velocity.y*f-e.velocity.x*d-e.velocity.y*f)/(t.mass+e.mass);t.immovable||(t.velocity.x=t.velocity.x-v*t.mass*d,t.velocity.y=t.velocity.y-v*t.mass*f),e.immovable||(e.velocity.x=e.velocity.x+v*e.mass*d,e.velocity.y=e.velocity.y+v*e.mass*f);var m=e.velocity.x-t.velocity.x,y=e.velocity.y-t.velocity.y,x=Math.atan2(y,m),T=this._frameTime;return t.immovable||e.immovable||(s/=2),t.immovable||(t.x+=t.velocity.x*T-s*Math.cos(x),t.y+=t.velocity.y*T-s*Math.sin(x)),e.immovable||(e.x+=e.velocity.x*T+s*Math.cos(x),e.y+=e.velocity.y*T+s*Math.sin(x)),t.velocity.x*=t.bounce.x,t.velocity.y*=t.bounce.y,e.velocity.x*=e.bounce.x,e.velocity.y*=e.bounce.y,(t.onCollide||e.onCollide)&&this.emit(u.COLLIDE,t.gameObject,e.gameObject,t,e),!0},intersects:function(t,e){return t!==e&&(t.isCircle||e.isCircle?t.isCircle?e.isCircle?h(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):this.circleBodyIntersects(e,t):!(t.right<=e.position.x||t.bottom<=e.position.y||t.position.x>=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=s(t.center.x,e.left,e.right),n=s(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o,a;t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var h=Array.isArray(t),l=Array.isArray(e);if(this._total=0,h||l)if(!h&&l)for(o=0;o0},collideHandler:function(t,e,i,n,s,r){if(void 0===e&&t.isParent)return this.collideGroupVsGroup(t,t,i,n,s,r);if(!t||!e)return!1;if(t.body){if(e.body)return this.collideSpriteVsSprite(t,e,i,n,s,r);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,n,s,r)}else if(t.isParent){if(e.body)return this.collideSpriteVsGroup(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,n,s,r)}else if(t.isTilemap){if(e.body)return this.collideSpriteVsTilemapLayer(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,n,s,r)}},collideSpriteVsSprite:function(t,e,i,n,s,r){return!(!t.body||!e.body)&&(this.separate(t.body,e.body,n,s,r)&&(i&&i.call(s,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,n,s,r){var o,h,l,u=t.body;if(0!==e.length&&u&&u.enable)if(this.useTree){var c=this.treeMinMax;c.minX=u.left,c.minY=u.top,c.maxX=u.right,c.maxY=u.bottom;var d=e.physicsType===a.DYNAMIC_BODY?this.tree.search(c):this.staticTree.search(c);for(h=d.length,o=0;oc.baseTileWidth){var d=(c.tileWidth-c.baseTileWidth)*e.scaleX;a-=d,l+=d}c.tileHeight>c.baseTileHeight&&(u+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var f=e.getTilesWithinWorldXY(a,h,l,u);return 0!==f.length&&this.collideSpriteVsTilesHandler(t,f,i,n,s,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,n,s,r,o){for(var a,h,l=t.body,c={left:0,right:0,top:0,bottom:0},d=!1,f=0;f0&&t>i&&(t=i)),0!==n&&0!==e&&(e<0&&e<-n?e=-n:e>0&&e>n&&(e=n)),this.gameObject.x+=t,this.gameObject.y+=e}t<0?this.facing=s.FACING_LEFT:t>0&&(this.facing=s.FACING_RIGHT),e<0?this.facing=s.FACING_UP:e>0&&(this.facing=s.FACING_DOWN),this.allowRotation&&(this.gameObject.angle+=this.deltaZ()),this._tx=t,this._ty=e},setBoundsRectangle:function(t){return this.customBoundsRectangle=t||this.world.bounds,this},checkWorldBounds:function(){var t=this.position,e=this.customBoundsRectangle,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,s=this.worldBounce?-this.worldBounce.y:-this.bounce.y,r=!1;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,this.blocked.right=!0,r=!0),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,this.blocked.down=!0,r=!0),r&&(this.blocked.none=!1),r},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this.updateCenter(),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;if(!t&&n.frame&&(t=n.frame.realWidth),!e&&n.frame&&(e=n.frame.realHeight),this.sourceWidth=t,this.sourceHeight=e,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),i&&n.getCenter){var s=n.displayWidth/2,r=n.displayHeight/2;this.offset.set(s-this.halfWidth,r-this.halfHeight)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i.setPosition(t,e),i.getTopLeft?i.getTopLeft(this.position):this.position.set(t,e),this.prev.copy(this.position),this.prevFrame.copy(this.position),this.rotation=i.angle,this.preRotation=i.angle,this.updateBounds(),this.updateCenter()},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?this.radius>0&&t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom&&(this.center.x-t)*(this.center.x-t)+(this.center.y-e)*(this.center.y-e)<=this.radius*this.radius:h(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.width/2):(this.checkCollision.up&&t.lineBetween(e.x,e.y,e.x+this.width,e.y),this.checkCollision.right&&t.lineBetween(e.x+this.width,e.y,e.x+this.width,e.y+this.height),this.checkCollision.down&&t.lineBetween(e.x,e.y+this.height,e.x+this.width,e.y+this.height),this.checkCollision.left&&t.lineBetween(e.x,e.y,e.x,e.y+this.height))),this.debugShowVelocity&&(t.lineStyle(t.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,n,i+this.velocity.x/2,n+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t,e,i){void 0===t&&(t=!0),this.collideWorldBounds=t;var n=void 0!==e,s=void 0!==i;return(n||s)&&(this.worldBounce||(this.worldBounce=new l),n&&(this.worldBounce.x=e),s&&(this.worldBounce.y=i)),this},setVelocity:function(t,e){return this.velocity.set(t,e),t=this.velocity.x,e=this.velocity.y,this.speed=Math.sqrt(t*t+e*e),this},setVelocityX:function(t){this.velocity.x=t;var e=t,i=this.velocity.y;return this.speed=Math.sqrt(e*e+i*i),this},setVelocityY:function(t){this.velocity.y=t;var e=this.velocity.x,i=t;return this.speed=Math.sqrt(e*e+i*i),this},setMaxVelocity:function(t,e){return this.maxVelocity.set(t,e),this},setMaxSpeed:function(t){return this.maxSpeed=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setAllowDrag:function(t){return void 0===t&&(t=!0),this.allowDrag=t,this},setAllowGravity:function(t){return void 0===t&&(t=!0),this.allowGravity=t,this},setAllowRotation:function(t){return void 0===t&&(t=!0),this.allowRotation=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return void 0===t&&(t=!0),this.immovable=t,this},setEnable:function(t){return void 0===t&&(t=!0),this.enable=t,this},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=u},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=n,this.collideCallback=s,this.processCallback=r,this.callbackContext=o},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=n},function(t,e,i){var n=i(50);t.exports=function(t,e,i,s){var r=0,o=t.deltaAbsX()+e.deltaAbsX()+s;return 0===t._dx&&0===e._dx?(t.embedded=!0,e.embedded=!0):t._dx>e._dx?(r=t.right-e.x)>o&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?r=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.right=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.left=!0)):t._dxo&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?r=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.left=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.right=!0))),t.overlapX=r,e.overlapX=r,r}},function(t,e,i){var n=i(50);t.exports=function(t,e,i,s){var r=0,o=t.deltaAbsY()+e.deltaAbsY()+s;return 0===t._dy&&0===e._dy?(t.embedded=!0,e.embedded=!0):t._dy>e._dy?(r=t.bottom-e.y)>o&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?r=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.down=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.up=!0)):t._dyo&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?r=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.up=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.down=!0))),t.overlapY=r,e.overlapY=r,r}},function(t,e,i){var n=i(383);function s(t){if(!(this instanceof s))return new s(t,[".left",".top",".right",".bottom"]);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}function r(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,i,s,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=s||(o=e+Math.ceil((i-e)/s/2)*s,n(t,o,e,i,r),a.push(e,o,o,i))}s.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!p(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;s=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),a=g(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,s,r,o,h,l,u,d,f,p,g,v,m,y;for(l=u=1/0,n=e;n<=i-e;n++)s=a(t,0,n,this.toBBox),r=a(t,n,i,this.toBBox),f=s,p=r,void 0,void 0,void 0,void 0,g=Math.max(f.minX,p.minX),v=Math.max(f.minY,p.minY),m=Math.min(f.maxX,p.maxX),y=Math.min(f.maxY,p.maxY),o=Math.max(0,m-g)*Math.max(0,y-v),h=c(s)+c(r),o=e;s--)r=t.children[s],h(u,t.leaf?o(r):r),c+=d(u);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)h(e[n],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},compareMinX:function(t,e){return t.left-e.left},compareMinY:function(t,e){return t.top-e.top},toBBox:function(t){return{minX:t.left,minY:t.top,maxX:t.right,maxY:t.bottom}}},t.exports=s},function(t,e){t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},function(t,e,i){var n=i(55),s=i(0),r=i(50),o=i(47),a=i(3),h=new s({initialize:function(t,e){var i=e.width?e.width:64,n=e.height?e.height:64;this.world=t,this.gameObject=e,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(e.x-e.displayOriginX,e.y-e.displayOriginY),this.width=i,this.height=n,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new a(e.x+this.halfWidth,e.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY,this._dx=0,this._dy=0},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(t,e){return void 0===e&&(e=t),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(t,e),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;if(!t&&n.frame&&(t=n.frame.realWidth),!e&&n.frame&&(e=n.frame.realHeight),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),i&&n.getCenter){var s=n.displayWidth/2,r=n.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(s-this.halfWidth,r-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.setPosition(t,e),i.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):o(this,t,e)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?t.strokeCircle(i,n,this.width/2):t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=h},,,,function(t,e,i){var n=new(i(0))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=n},function(t,e,i){var n=i(24);t.exports=function(t,e,i,s,r,o,a){for(var h=n(i,s,r,o,null,a),l=0;l-1}return!1}},function(t,e,i){var n=i(74),s=i(103),r=i(217);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!1),void 0===o&&(o=!0),!s(t,e,a))return null;var h=a.data[e][t];return h?(a.data[e][t]=i?null:new n(a,-1,t,e,h.width,h.height),o&&h&&h.collides&&r(t,e,a),h):null}},function(t,e,i){var n=i(31),s=i(220),r=i(473),o=i(474),a=i(485);t.exports=function(t,e,i,h,l,u){var c;switch(e){case n.ARRAY_2D:c=s(t,i,h,l,u);break;case n.CSV:c=r(t,i,h,l,u);break;case n.TILED_JSON:c=o(t,i,u);break;case n.WELTMEISTER:c=a(t,i,u);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},function(t,e,i){var n=i(31),s=i(220);t.exports=function(t,e,i,r,o){var a=e.trim().split("\n").map(function(t){return t.split(",")}),h=s(t,a,i,r,o);return h.format=n.CSV,h}},function(t,e,i){var n=i(31),s=i(105),r=i(475),o=i(477),a=i(478),h=i(481),l=i(483),u=i(484);t.exports=function(t,e,i){if("orthogonal"!==e.orientation)return console.warn("Only orthogonal map types are supported in this version of Phaser"),null;var c=new s({width:e.width,height:e.height,name:t,tileWidth:e.tilewidth,tileHeight:e.tileheight,orientation:e.orientation,format:n.TILED_JSON,version:e.version,properties:e.properties,renderOrder:e.renderorder,infinite:e.infinite});c.layers=r(e,i),c.images=o(e);var d=a(e);return c.tilesets=d.tilesets,c.imageCollections=d.imageCollections,c.objects=h(e),c.tiles=l(c),u(c),c}},function(t,e,i){var n=i(476),s=i(2),r=i(104),o=i(221),a=i(74),h=i(222);t.exports=function(t,e){for(var i=s(t,"infinite",!1),l=[],u=[],c=h(t);c.i0;)if(c.i>=c.layers.length){if(u.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}c=u.pop()}else{var d=c.layers[c.i];if(c.i++,"tilelayer"===d.type)if(d.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+d.name+"'");else{if(d.encoding&&"base64"===d.encoding){if(d.chunks)for(var f=0;f0?((v=new a(p,g.gid,P,R,t.tilewidth,t.tileheight)).rotation=g.rotation,v.flipX=g.flipped,y[R][P]=v):(m=e?null:new a(p,-1,P,R,t.tilewidth,t.tileheight),y[R][P]=m),++x===b.width&&(C++,x=0)}}else{p=new r({name:c.name+d.name,x:c.x+s(d,"offsetx",0)+d.x,y:c.y+s(d,"offsety",0)+d.y,width:d.width,height:d.height,tileWidth:t.tilewidth,tileHeight:t.tileheight,alpha:c.opacity*d.opacity,visible:c.visible&&d.visible,properties:s(d,"properties",{})});for(var L=[],D=0,F=d.data.length;D0?((v=new a(p,g.gid,x,y.length,t.tilewidth,t.tileheight)).rotation=g.rotation,v.flipX=g.flipped,L.push(v)):(m=e?null:new a(p,-1,x,y.length,t.tilewidth,t.tileheight),L.push(m)),++x===d.width&&(y.push(L),x=0,L=[])}p.data=y,l.push(p)}else if("group"===d.type){var k=h(t,d,c);u.push(c),c=k}}return l}},function(t,e){t.exports=function(t){for(var e=window.atob(t),i=e.length,n=new Array(i/4),s=0;s>>0;return n}},function(t,e,i){var n=i(2),s=i(222);t.exports=function(t){for(var e=[],i=[],r=s(t);r.i0;)if(r.i>=r.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=i.pop()}else{var o=r.layers[r.i];if(r.i++,"imagelayer"===o.type){var a=n(o,"offsetx",0)+n(o,"startx",0),h=n(o,"offsety",0)+n(o,"starty",0);e.push({name:r.name+o.name,image:o.image,x:r.x+a+o.x,y:r.y+h+o.y,alpha:r.opacity*o.opacity,visible:r.visible&&o.visible,properties:n(o,"properties",{})})}else if("group"===o.type){var l=s(t,o,r);i.push(r),r=l}}return e}},function(t,e,i){var n=i(141),s=i(479),r=i(223);t.exports=function(t){for(var e,i=[],o=[],a=null,h=0;h1){if(Array.isArray(l.tiles)){for(var c={},d={},f=0;f=this.firstgid&&t0;)if(a.i>=a.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}a=i.pop()}else{var h=a.layers[a.i];if(a.i++,h.opacity*=a.opacity,h.visible=a.visible&&h.visible,"objectgroup"===h.type){h.name=a.name+h.name;for(var l=a.x+n(h,"startx",0)+n(h,"offsetx",0),u=a.y+n(h,"starty",0)+n(h,"offsety",0),c=[],d=0;da&&(a=e.layer[l].width),e.layer[l].height>h&&(h=e.layer[l].height);var u=new s({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:n.WELTMEISTER});return u.layers=r(e,i),u.tilesets=o(e),u}},function(t,e,i){var n=i(104),s=i(74);t.exports=function(t,e){for(var i=[],r=0;r-1?new s(a,f,c,u,o.tilesize,o.tilesize):e?null:new s(a,-1,c,u,o.tilesize,o.tilesize),h.push(d)}l.push(h),h=[]}a.data=l,i.push(a)}return i}},function(t,e,i){var n=i(141);t.exports=function(t){for(var e=[],i=[],s=0;s-1&&(this.renderOrder=t),this},addTilesetImage:function(t,e,i,n,s,r,o){if(void 0===t)return null;if(void 0!==e&&null!==e||(e=t),!this.scene.sys.textures.exists(e))return console.warn("Invalid Tileset Image: "+e),null;var h=this.scene.sys.textures.get(e),l=this.getTilesetIndex(t);if(null===l&&this.format===a.TILED_JSON)return console.warn("No data found for Tileset: "+t),null;var u=this.tilesets[l];return u?(u.setTileSize(i,n),u.setSpacing(s,r),u.setImage(h),u):(void 0===i&&(i=this.tileWidth),void 0===n&&(n=this.tileHeight),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o=0),(u=new p(t,o,i,n,s,r)).setImage(h),this.tilesets.push(u),u)},convertLayerToStatic:function(t){if(null===(t=this.getLayer(t)))return null;var e=t.tilemapLayer;if(!(e&&e instanceof r))return null;var i=new c(e.scene,e.tilemap,e.layerIndex,e.tileset,e.x,e.y);return this.scene.sys.displayList.add(i),e.destroy(),i},copy:function(t,e,i,n,s,r,o,a){return a=this.getLayer(a),this._isStaticCall(a,"copy")?this:null!==a?(f.Copy(t,e,i,n,s,r,o,a),this):null},createBlankDynamicLayer:function(t,e,i,n,s,o,a,l){if(void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.width),void 0===o&&(o=this.height),void 0===a&&(a=this.tileWidth),void 0===l&&(l=this.tileHeight),null!==this.getLayerIndex(t))return console.warn("Invalid Tilemap Layer ID: "+t),null;for(var u,c=new h({name:t,tileWidth:a,tileHeight:l,width:s,height:o}),f=0;f-1&&this.putTileAt(e,r.x,r.y,i,r.tilemapLayer)}return n},removeTileAt:function(t,e,i,n,s){return s=this.getLayer(s),this._isStaticCall(s,"removeTileAt")?null:null===s?null:f.RemoveTileAt(t,e,i,n,s)},removeTileAtWorldXY:function(t,e,i,n,s,r){return r=this.getLayer(r),this._isStaticCall(r,"removeTileAtWorldXY")?null:null===r?null:f.RemoveTileAtWorldXY(t,e,i,n,s,r)},renderDebug:function(t,e,i){return null===(i=this.getLayer(i))?null:(f.RenderDebug(t,e,i),this)},renderDebugFull:function(t,e){for(var i=this.layers,n=0;n=0&&t<4&&(this._renderOrder=t),this},calculateFacesAt:function(t,e){return a.CalculateFacesAt(t,e,this.layer),this},calculateFacesWithin:function(t,e,i,n){return a.CalculateFacesWithin(t,e,i,n,this.layer),this},createFromTiles:function(t,e,i,n,s){return a.CreateFromTiles(t,e,i,n,s,this.layer)},cull:function(t){return this.cullCallback(this.layer,t,this.culledTiles,this._renderOrder)},copy:function(t,e,i,n,s,r,o){return a.Copy(t,e,i,n,s,r,o,this.layer),this},destroy:function(t){void 0===t&&(t=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),t&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],o.prototype.destroy.call(this))},fill:function(t,e,i,n,s,r){return a.Fill(t,e,i,n,s,r,this.layer),this},filterTiles:function(t,e,i,n,s,r,o){return a.FilterTiles(t,e,i,n,s,r,o,this.layer)},findByIndex:function(t,e,i){return a.FindByIndex(t,e,i,this.layer)},findTile:function(t,e,i,n,s,r,o){return a.FindTile(t,e,i,n,s,r,o,this.layer)},forEachTile:function(t,e,i,n,s,r,o){return a.ForEachTile(t,e,i,n,s,r,o,this.layer),this},getTileAt:function(t,e,i){return a.GetTileAt(t,e,i,this.layer)},getTileAtWorldXY:function(t,e,i,n){return a.GetTileAtWorldXY(t,e,i,n,this.layer)},getTilesWithin:function(t,e,i,n,s){return a.GetTilesWithin(t,e,i,n,s,this.layer)},getTilesWithinShape:function(t,e,i){return a.GetTilesWithinShape(t,e,i,this.layer)},getTilesWithinWorldXY:function(t,e,i,n,s,r){return a.GetTilesWithinWorldXY(t,e,i,n,s,r,this.layer)},hasTileAt:function(t,e){return a.HasTileAt(t,e,this.layer)},hasTileAtWorldXY:function(t,e,i){return a.HasTileAtWorldXY(t,e,i,this.layer)},putTileAt:function(t,e,i,n){return a.PutTileAt(t,e,i,n,this.layer)},putTileAtWorldXY:function(t,e,i,n,s){return a.PutTileAtWorldXY(t,e,i,n,s,this.layer)},putTilesAt:function(t,e,i,n){return a.PutTilesAt(t,e,i,n,this.layer),this},randomize:function(t,e,i,n,s){return a.Randomize(t,e,i,n,s,this.layer),this},removeTileAt:function(t,e,i,n){return a.RemoveTileAt(t,e,i,n,this.layer)},removeTileAtWorldXY:function(t,e,i,n,s){return a.RemoveTileAtWorldXY(t,e,i,n,s,this.layer)},renderDebug:function(t,e){return a.RenderDebug(t,e,this.layer),this},replaceByIndex:function(t,e,i,n,s,r){return a.ReplaceByIndex(t,e,i,n,s,r,this.layer),this},setSkipCull:function(t){return void 0===t&&(t=!0),this.skipCull=t,this},setCullPadding:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=1),this.cullPaddingX=t,this.cullPaddingY=e,this},setCollision:function(t,e,i,n){return a.SetCollision(t,e,i,this.layer,n),this},setCollisionBetween:function(t,e,i,n){return a.SetCollisionBetween(t,e,i,n,this.layer),this},setCollisionByProperty:function(t,e,i){return a.SetCollisionByProperty(t,e,i,this.layer),this},setCollisionByExclusion:function(t,e,i){return a.SetCollisionByExclusion(t,e,i,this.layer),this},setCollisionFromCollisionGroup:function(t,e){return a.SetCollisionFromCollisionGroup(t,e,this.layer),this},setTileIndexCallback:function(t,e,i){return a.SetTileIndexCallback(t,e,i,this.layer),this},setTileLocationCallback:function(t,e,i,n,s,r){return a.SetTileLocationCallback(t,e,i,n,s,r,this.layer),this},shuffle:function(t,e,i,n){return a.Shuffle(t,e,i,n,this.layer),this},swapByIndex:function(t,e,i,n,s,r){return a.SwapByIndex(t,e,i,n,s,r,this.layer),this},tileToWorldX:function(t,e){return a.TileToWorldX(t,e,this.layer)},tileToWorldY:function(t,e){return a.TileToWorldY(t,e,this.layer)},tileToWorldXY:function(t,e,i,n){return a.TileToWorldXY(t,e,i,n,this.layer)},weightedRandomize:function(t,e,i,n,s){return a.WeightedRandomize(t,e,i,n,s,this.layer),this},worldToTileX:function(t,e,i){return a.WorldToTileX(t,e,i,this.layer)},worldToTileY:function(t,e,i){return a.WorldToTileY(t,e,i,this.layer)},worldToTileXY:function(t,e,i,n,s){return a.WorldToTileXY(t,e,i,n,s,this.layer)}});t.exports=h},function(t,e,i){var n=i(0),s=i(12),r=i(18),o=i(14),a=i(1336),h=i(137),l=i(32),u=i(10),c=new n({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.ComputedSize,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.Transform,s.Visible,s.ScrollFactor,a],initialize:function(t,e,i,n,s,a){o.call(this,t,"StaticTilemapLayer"),this.isTilemap=!0,this.tilemap=e,this.layerIndex=i,this.layer=e.layers[i],this.layer.tilemapLayer=this,this.tileset=[],this.culledTiles=[],this.skipCull=!1,this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=h.CullTiles,this.renderer=t.sys.game.renderer,this.vertexBuffer=[],this.bufferData=[],this.vertexViewF32=[],this.vertexViewU32=[],this.dirty=[],this.vertexCount=[],this._renderOrder=0,this._tempMatrix=new l,this.gidMap=[],this.setTilesets(n),this.setAlpha(this.layer.alpha),this.setPosition(s,a),this.setOrigin(),this.setSize(e.tileWidth*this.layer.width,e.tileHeight*this.layer.height),this.updateVBOData(),this.initPipeline("TextureTintPipeline"),t.sys.game.events.on(r.CONTEXT_RESTORED,function(){this.updateVBOData()},this)},setTilesets:function(t){var e=[],i=[],n=this.tilemap;Array.isArray(t)||(t=[t]);for(var s=0;sv||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(1===p)for(o=0;o=0;a--)!(r=f[o][a])||r.indexv||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(2===p)for(o=u-1;o>=0;o--)for(a=0;av||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(3===p)for(o=u-1;o>=0;o--)for(a=l-1;a>=0;a--)!(r=f[o][a])||r.indexv||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));this.dirty[e]=!1,null===m?(m=i.createVertexBuffer(y,n.STATIC_DRAW),this.vertexBuffer[e]=m):(i.setVertexBuffer(m),n.bufferSubData(n.ARRAY_BUFFER,0,y))}return this},batchTile:function(t,e,i,n,s,r,o){var a=i.getTileTextureCoordinates(e.index);if(!a)return t;var h=i.tileWidth,l=i.tileHeight,c=h/2,d=l/2,f=a.x/n,p=a.y/s,g=(a.x+h)/n,v=(a.y+l)/s,m=this._tempMatrix,y=-c,x=-d;e.flipX&&(h*=-1,y+=i.tileWidth),e.flipY&&(l*=-1,x+=i.tileHeight);var T=y+h,w=x+l;m.applyITRS(c+e.pixelX,d+e.pixelY,e.rotation,1,1);var E=u.getTintAppendFloatAlpha(16777215,r.alpha*this.alpha*e.alpha),_=m.getX(y,x),b=m.getY(y,x),A=m.getX(y,w),S=m.getY(y,w),C=m.getX(T,w),M=m.getY(T,w),O=m.getX(T,x),P=m.getY(T,x);r.roundPixels&&(_=Math.round(_),b=Math.round(b),A=Math.round(A),S=Math.round(S),C=Math.round(C),M=Math.round(M),O=Math.round(O),P=Math.round(P));var R=this.vertexViewF32[o],L=this.vertexViewU32[o];return R[++t]=_,R[++t]=b,R[++t]=f,R[++t]=p,R[++t]=0,L[++t]=E,R[++t]=A,R[++t]=S,R[++t]=f,R[++t]=v,R[++t]=0,L[++t]=E,R[++t]=C,R[++t]=M,R[++t]=g,R[++t]=v,R[++t]=0,L[++t]=E,R[++t]=_,R[++t]=b,R[++t]=f,R[++t]=p,R[++t]=0,L[++t]=E,R[++t]=C,R[++t]=M,R[++t]=g,R[++t]=v,R[++t]=0,L[++t]=E,R[++t]=O,R[++t]=P,R[++t]=g,R[++t]=p,R[++t]=0,L[++t]=E,this.vertexCount[o]+=6,t},setRenderOrder:function(t){if("string"==typeof t&&(t=["right-down","left-down","right-up","left-up"].indexOf(t)),t>=0&&t<4){this._renderOrder=t;for(var e=0;e0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=r},function(t,e,i){var n=i(1345);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substr(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===n.indexOf(e)&&"_"!==e.substr(0,1)&&i.push({key:e,value:t[e]});return i}},function(t,e,i){var n=i(6);t.exports=function(t){var e=n(t,"tweens",null);return null===e?[]:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},function(t,e,i){var n=i(227),s=i(15),r=i(88),o=i(82),a=i(142),h=i(6),l=i(226),u=i(228),c=i(230);t.exports=function(t,e,i){void 0===i&&(i=n);var d=h(e,"from",0),f=h(e,"to",1),p=[{value:d}],g=a(e,"delay",i.delay),v=a(e,"duration",i.duration),m=h(e,"easeParams",i.easeParams),y=o(h(e,"ease",i.ease),m),x=a(e,"hold",i.hold),T=a(e,"repeat",i.repeat),w=a(e,"repeatDelay",i.repeatDelay),E=r(e,"yoyo",i.yoyo),_=[],b=l("value",f),A=c(p[0],0,"value",b.getEnd,b.getStart,b.getActive,y,g,v,E,x,T,w,!1,!1);A.start=d,A.current=d,A.to=f,_.push(A);var S=new u(t,_,p);S.offset=s(e,"offset",null),S.completeDelay=s(e,"completeDelay",0),S.loop=Math.round(s(e,"loop",0)),S.loopDelay=Math.round(s(e,"loopDelay",0)),S.paused=r(e,"paused",!1),S.useFrames=r(e,"useFrames",!1);for(var C=h(e,"callbackScope",S),M=[S,null],O=u.TYPES,P=0;Pb&&(b=C),_[A][S]=C}}}var M=o?n(o):null;return a?function(t,e,n,s){var r,o=0,a=s%m,h=Math.floor(s/m);if(a>=0&&a=0&&h0?Math.floor(v/p.length):h(e,"duration",g.duration),g.delay=h(e,"delay",g.delay),g.easeParams=c(e,"easeParams",g.easeParams),g.ease=a(c(e,"ease",g.ease),g.easeParams),g.hold=h(e,"hold",g.hold),g.repeat=h(e,"repeat",g.repeat),g.repeatDelay=h(e,"repeatDelay",g.repeatDelay),g.yoyo=o(e,"yoyo",g.yoyo),g.flipX=o(e,"flipX",g.flipX),g.flipY=o(e,"flipY",g.flipY);for(var m=0;m0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){return this.calcDuration(),this.progress=0,this.totalProgress=0,!this.paused||(this.state=a.PAUSED,!1)},resetTweens:function(t){for(var e=0;e0?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=a.LOOP_DELAY):(this.state=a.ACTIVE,this.dispatchTimelineEvent(r.TIMELINE_LOOP,this.callbacks.onLoop))):this.completeDelay>0?(this.state=a.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=a.PENDING_REMOVE,this.dispatchTimelineEvent(r.TIMELINE_COMPLETE,this.callbacks.onComplete))},update:function(t,e){if(this.state!==a.PAUSED){switch(this.useFrames&&(e=1*this.manager.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case a.ACTIVE:for(var i=this.totalData,n=0;n=this.nextTick&&this.currentAnim.setFrame(this)}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.isCropped&&e.frame.updateCropUVs(e._crop,e.flipX,e.flipY),e.setSizeToFrame(),t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin(),e},updateFrame:function(t){var e=this.setCurrentFrame(t);if(this.isPlaying){t.setAlpha&&(e.alpha=t.alpha);var i=this.currentAnim;e.emit(r.SPRITE_ANIMATION_KEY_UPDATE+i.key,i,t,e),e.emit(r.SPRITE_ANIMATION_UPDATE,i,t,e),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this)}},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off(r.REMOVE_ANIMATION,this.remove,this),this.animationManager=null,this.parent=null,this.currentAnim=null,this.currentFrame=null}});t.exports=o},function(t,e,i){var n=i(500),s=i(48),r=i(0),o=i(29),a=i(501),h=i(92),l=i(32),u=new r({initialize:function(t){this.game=t,this.type=o.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.config={clearBeforeRender:t.config.clearBeforeRender,backgroundColor:t.config.backgroundColor,resolution:t.config.resolution,antialias:t.config.antialias,roundPixels:t.config.roundPixels},this.gameCanvas=t.canvas;var e={alpha:t.config.transparent,desynchronized:t.config.desynchronized};this.gameContext=this.game.config.context?this.game.config.context:this.gameCanvas.getContext("2d",e),this.currentContext=this.gameContext,this.antialias=t.config.antialias,this.blendModes=a(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new l,this._tempMatrix2=new l,this._tempMatrix3=new l,this._tempMatrix4=new l,this.init()},init:function(){this.game.scale.on(h.RESIZE,this.onResize,this);var t=this.game.scale.baseSize;this.resize(t.width,t.height)},onResize:function(t,e){e.width===this.width&&e.height===this.height||this.resize(e.width,e.height)},resize:function(t,e){this.width=t,this.height=e},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(t){return this.currentContext.globalCompositeOperation=t,this},setContext:function(t){return this.currentContext=t||this.gameContext,this},setAlpha:function(t){return this.currentContext.globalAlpha=t,this},preRender:function(){var t=this.gameContext,e=this.config,i=this.width,n=this.height;t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),e.clearBeforeRender&&t.clearRect(0,0,i,n),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,n)),t.save(),this.drawCount=0},render:function(t,e,i,n){var r=e.list,o=r.length,a=n._cx,h=n._cy,l=n._cw,u=n._ch,c=n.renderToTexture?n.context:t.sys.context;c.save(),this.game.scene.customViewports&&(c.beginPath(),c.rect(a,h,l,u),c.clip()),this.currentContext=c;var d=n.mask;d&&d.preRenderCanvas(this,null,n._maskCamera),n.transparent||(c.fillStyle=n.backgroundColor.rgba,c.fillRect(a,h,l,u)),c.globalAlpha=n.alpha,c.globalCompositeOperation="source-over",this.drawCount+=r.length,n.renderToTexture&&n.emit(s.PRE_RENDER,n),n.matrix.copyToContext(c);for(var f=0;f=0?y=-(y+d):y<0&&(y=Math.abs(y)-d)),t.flipY&&(x>=0?x=-(x+f):x<0&&(x=Math.abs(x)-f))}var w=1,E=1;t.flipX&&(p||(y+=-e.realWidth+2*v),w=-1),t.flipY&&(p||(x+=-e.realHeight+2*m),E=-1),a.applyITRS(t.x,t.y,t.rotation,t.scaleX*w,t.scaleY*E),o.copyFrom(i.matrix),n?(o.multiplyWithOffset(n,-i.scrollX*t.scrollFactorX,-i.scrollY*t.scrollFactorY),a.e=t.x,a.f=t.y,o.multiply(a,h)):(a.e-=i.scrollX*t.scrollFactorX,a.f-=i.scrollY*t.scrollFactorY,o.multiply(a,h)),r.save(),h.setToContext(r),r.globalCompositeOperation=this.blendModes[t.blendMode],r.globalAlpha=s,r.imageSmoothingEnabled=!(!this.antialias||e.source.scaleMode),r.drawImage(e.source.image,u,c,d,f,y,x,d/g,f/g),r.restore()}},destroy:function(){this.gameCanvas=null,this.gameContext=null,this.game=null}});t.exports=u},function(t,e,i){var n=i(26),s=i(33),r=i(2);t.exports=function(t,e){var i=r(e,"callback"),o=r(e,"type","image/png"),a=r(e,"encoder",.92),h=Math.abs(Math.round(r(e,"x",0))),l=Math.abs(Math.round(r(e,"y",0))),u=r(e,"width",t.width),c=r(e,"height",t.height);if(r(e,"getPixel",!1)){var d=t.getContext("2d").getImageData(h,l,1,1).data;i.call(null,new s(d[0],d[1],d[2],d[3]/255))}else if(0!==h||0!==l||u!==t.width||c!==t.height){var f=n.createWebGL(this,u,c);f.getContext("2d").drawImage(t,h,l,u,c,0,0,u,c);var p=new Image;p.onerror=function(){i.call(null),n.remove(f)},p.onload=function(){i.call(null,p),n.remove(f)},p.src=f.toDataURL(o,a)}else{var g=new Image;g.onerror=function(){i.call(null)},g.onload=function(){i.call(null,g)},g.src=t.toDataURL(o,a)}}},function(t,e,i){var n=i(52),s=i(313);t.exports=function(){var t=[],e=s.supportNewBlendModes,i="source-over";return t[n.NORMAL]=i,t[n.ADD]="lighter",t[n.MULTIPLY]=e?"multiply":i,t[n.SCREEN]=e?"screen":i,t[n.OVERLAY]=e?"overlay":i,t[n.DARKEN]=e?"darken":i,t[n.LIGHTEN]=e?"lighten":i,t[n.COLOR_DODGE]=e?"color-dodge":i,t[n.COLOR_BURN]=e?"color-burn":i,t[n.HARD_LIGHT]=e?"hard-light":i,t[n.SOFT_LIGHT]=e?"soft-light":i,t[n.DIFFERENCE]=e?"difference":i,t[n.EXCLUSION]=e?"exclusion":i,t[n.HUE]=e?"hue":i,t[n.SATURATION]=e?"saturation":i,t[n.COLOR]=e?"color":i,t[n.LUMINOSITY]=e?"luminosity":i,t[n.ERASE]="destination-out",t[n.SOURCE_IN]="source-in",t[n.SOURCE_OUT]="source-out",t[n.SOURCE_ATOP]="source-atop",t[n.DESTINATION_OVER]="destination-over",t[n.DESTINATION_IN]="destination-in",t[n.DESTINATION_OUT]="destination-out",t[n.DESTINATION_ATOP]="destination-atop",t[n.LIGHTER]="lighter",t[n.COPY]="copy",t[n.XOR]="xor",t}},function(t,e,i){var n=i(91),s=i(48),r=i(0),o=i(29),a=i(18),h=i(118),l=i(1),u=i(92),c=i(79),d=i(119),f=i(32),p=i(10),g=i(503),v=i(504),m=i(505),y=i(235),x=new r({initialize:function(t){var e=t.config,i={alpha:e.transparent,desynchronized:e.desynchronized,depth:!1,antialias:e.antialiasGL,premultipliedAlpha:e.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:e.failIfMajorPerformanceCaveat,powerPreference:e.powerPreference};this.config={clearBeforeRender:e.clearBeforeRender,antialias:e.antialias,backgroundColor:e.backgroundColor,contextCreation:i,resolution:e.resolution,roundPixels:e.roundPixels,maxTextures:e.maxTextures,maxTextureSize:e.maxTextureSize,batchSize:e.batchSize,maxLights:e.maxLights,mipmapFilter:e.mipmapFilter},this.game=t,this.type=o.WEBGL,this.width=0,this.height=0,this.canvas=t.canvas,this.blendModes=[],this.nativeTextures=[],this.contextLost=!1,this.pipelines=null,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92,isFramebuffer:!1,bufferWidth:0,bufferHeight:0},this.currentActiveTextureUnit=0,this.currentTextures=new Array(16),this.currentFramebuffer=null,this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=l,this.contextRestoredHandler=l,this.gl=null,this.supportedExtensions=null,this.extensions={},this.glFormats=[],this.compression={ETC1:!1,PVRTC:!1,S3TC:!1},this.drawingBufferHeight=0,this.blankTexture=null,this.defaultCamera=new n(0,0,0,0),this._tempMatrix1=new f,this._tempMatrix2=new f,this._tempMatrix3=new f,this._tempMatrix4=new f,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.mipmapFilter=null,this.init(this.config)},init:function(t){var e,i=this.game,n=this.canvas,s=t.backgroundColor;if(!(e=i.config.context?i.config.context:n.getContext("webgl",t.contextCreation)||n.getContext("experimental-webgl",t.contextCreation))||e.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=e;var r=this;this.contextLostHandler=function(t){r.contextLost=!0,r.game.events.emit(a.CONTEXT_LOST,r),t.preventDefault()},this.contextRestoredHandler=function(){r.contextLost=!1,r.init(r.config),r.game.events.emit(a.CONTEXT_RESTORED,r)},n.addEventListener("webglcontextlost",this.contextLostHandler,!1),n.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),i.context=e;for(var h=0;h<=27;h++)this.blendModes.push({func:[e.ONE,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_ADD});this.blendModes[1].func=[e.ONE,e.DST_ALPHA],this.blendModes[2].func=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[e.ONE,e.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[e.ZERO,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_REVERSE_SUBTRACT},this.glFormats[0]=e.BYTE,this.glFormats[1]=e.SHORT,this.glFormats[2]=e.UNSIGNED_BYTE,this.glFormats[3]=e.UNSIGNED_SHORT,this.glFormats[4]=e.FLOAT,this.glFuncMap={mat2:{func:e.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:e.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:e.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:e.uniform1f,length:1},"1fv":{func:e.uniform1fv,length:1},"1i":{func:e.uniform1i,length:1},"1iv":{func:e.uniform1iv,length:1},"2f":{func:e.uniform2f,length:2},"2fv":{func:e.uniform2fv,length:1},"2i":{func:e.uniform2i,length:2},"2iv":{func:e.uniform2iv,length:1},"3f":{func:e.uniform3f,length:3},"3fv":{func:e.uniform3fv,length:1},"3i":{func:e.uniform3i,length:3},"3iv":{func:e.uniform3iv,length:1},"4f":{func:e.uniform4f,length:4},"4fv":{func:e.uniform4fv,length:1},"4i":{func:e.uniform4i,length:4},"4iv":{func:e.uniform4iv,length:1}};var l=e.getSupportedExtensions();t.maxTextures||(t.maxTextures=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),t.maxTextureSize||(t.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE));var u="WEBGL_compressed_texture_",c="WEBKIT_"+u;this.compression.ETC1=e.getExtension(u+"etc1")||e.getExtension(c+"etc1"),this.compression.PVRTC=e.getExtension(u+"pvrtc")||e.getExtension(c+"pvrtc"),this.compression.S3TC=e.getExtension(u+"s3tc")||e.getExtension(c+"s3tc"),this.supportedExtensions=l,e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),e.enable(e.BLEND),e.clearColor(s.redGL,s.greenGL,s.blueGL,s.alphaGL),this.mipmapFilter=e[t.mipmapFilter];for(var f=0;f0&&n>0;if(o&&a){var h=o[0],l=o[1],u=o[2],c=o[3];a=h!==t||l!==e||u!==i||c!==n}a&&(this.flush(),r.scissor(t,s-e-n,i,n))},popScissor:function(){var t=this.scissorStack;t.pop();var e=t[t.length-1];e&&this.setScissor(e[0],e[1],e[2],e[3]),this.currentScissor=e},setPipeline:function(t,e){return this.currentPipeline===t&&this.currentPipeline.vertexBuffer===this.currentVertexBuffer&&this.currentPipeline.program===this.currentProgram||(this.flush(),this.currentPipeline=t,this.currentPipeline.bind()),this.currentPipeline.onBind(e),this.currentPipeline},hasActiveStencilMask:function(){var t=this.currentMask.mask,e=this.currentCameraMask.mask;return t&&t.isStencil||e&&e.isStencil},rebindPipeline:function(t){var e=this.gl;e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),this.hasActiveStencilMask()?e.clear(e.DEPTH_BUFFER_BIT):(e.disable(e.STENCIL_TEST),e.clear(e.DEPTH_BUFFER_BIT|e.STENCIL_BUFFER_BIT)),e.viewport(0,0,this.width,this.height),this.setBlendMode(0,!0),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.blankTexture.glTexture),this.currentActiveTextureUnit=0,this.currentTextures[0]=this.blankTexture.glTexture,this.currentPipeline=t,this.currentPipeline.bind(),this.currentPipeline.onBind()},clearPipeline:function(){this.flush(),this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.setBlendMode(0,!0)},setBlendMode:function(t,e){void 0===e&&(e=!1);var i=this.gl,n=this.blendModes[t];return!!(e||t!==o.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t)&&(this.flush(),i.enable(i.BLEND),i.blendEquation(n.equation),n.func.length>2?i.blendFuncSeparate(n.func[0],n.func[1],n.func[2],n.func[3]):i.blendFunc(n.func[0],n.func[1]),this.currentBlendMode=t,!0)},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return t>17&&this.blendModes[t]&&this.blendModes.splice(t,1),this},setBlankTexture:function(t){void 0===t&&(t=!1),!t&&0===this.currentActiveTextureUnit&&this.currentTextures[0]||this.setTexture2D(this.blankTexture.glTexture,0)},setTexture2D:function(t,e,i){void 0===i&&(i=!0);var n=this.gl;return t!==this.currentTextures[e]&&(i&&this.flush(),this.currentActiveTextureUnit!==e&&(n.activeTexture(n.TEXTURE0+e),this.currentActiveTextureUnit=e),n.bindTexture(n.TEXTURE_2D,t),this.currentTextures[e]=t),this},setFramebuffer:function(t,e){void 0===e&&(e=!1);var i=this.gl,n=this.width,s=this.height;return t!==this.currentFramebuffer&&(t&&t.renderTexture?(n=t.renderTexture.width,s=t.renderTexture.height):this.flush(),i.bindFramebuffer(i.FRAMEBUFFER,t),i.viewport(0,0,n,s),e&&(t?(this.drawingBufferHeight=s,this.pushScissor(0,0,n,s)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=t),this},setProgram:function(t){var e=this.gl;return t!==this.currentProgram&&(this.flush(),e.useProgram(t),this.currentProgram=t),this},setVertexBuffer:function(t){var e=this.gl;return t!==this.currentVertexBuffer&&(this.flush(),e.bindBuffer(e.ARRAY_BUFFER,t),this.currentVertexBuffer=t),this},setIndexBuffer:function(t){var e=this.gl;return t!==this.currentIndexBuffer&&(this.flush(),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.currentIndexBuffer=t),this},createTextureFromSource:function(t,e,i,n){var s=this.gl,r=s.NEAREST,a=s.NEAREST,l=s.CLAMP_TO_EDGE;e=t?t.width:e,i=t?t.height:i;var u=h(e,i);return u&&(l=s.REPEAT),n===o.ScaleModes.LINEAR&&this.config.antialias&&(r=u?this.mipmapFilter:s.LINEAR,a=s.LINEAR),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,r,a,l,l,s.RGBA,t):this.createTexture2D(0,r,a,l,l,s.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,s,r,o,a,l,u,c,d){u=void 0===u||null===u||u,void 0===c&&(c=!1),void 0===d&&(d=!1);var f=this.gl,p=f.createTexture();return this.setTexture2D(p,0),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,e),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,i),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_S,s),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_T,n),f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,d),null===o||void 0===o?f.texImage2D(f.TEXTURE_2D,t,r,a,l,0,r,f.UNSIGNED_BYTE,null):(c||(a=o.width,l=o.height),f.texImage2D(f.TEXTURE_2D,t,r,r,f.UNSIGNED_BYTE,o)),h(a,l)&&f.generateMipmap(f.TEXTURE_2D),this.setTexture2D(null,0),p.isAlphaPremultiplied=u,p.isRenderTexture=!1,p.width=a,p.height=l,this.nativeTextures.push(p),p},createFramebuffer:function(t,e,i,n){var s,r=this.gl,o=r.createFramebuffer();if(this.setFramebuffer(o),n){var a=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,a),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,a)}if(i.isRenderTexture=!0,i.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0),(s=r.checkFramebufferStatus(r.FRAMEBUFFER))!==r.FRAMEBUFFER_COMPLETE){throw new Error("Framebuffer incomplete. Framebuffer status: "+{36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"}[s])}return o.renderTexture=i,this.setFramebuffer(null),o},createProgram:function(t,e){var i=this.gl,n=i.createProgram(),s=i.createShader(i.VERTEX_SHADER),r=i.createShader(i.FRAGMENT_SHADER);if(i.shaderSource(s,t),i.shaderSource(r,e),i.compileShader(s),i.compileShader(r),!i.getShaderParameter(s,i.COMPILE_STATUS))throw new Error("Failed to compile Vertex Shader:\n"+i.getShaderInfoLog(s));if(!i.getShaderParameter(r,i.COMPILE_STATUS))throw new Error("Failed to compile Fragment Shader:\n"+i.getShaderInfoLog(r));if(i.attachShader(n,s),i.attachShader(n,r),i.linkProgram(n),!i.getProgramParameter(n,i.LINK_STATUS))throw new Error("Failed to link program:\n"+i.getProgramInfoLog(n));return n},createVertexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setVertexBuffer(n),i.bufferData(i.ARRAY_BUFFER,t,e),this.setVertexBuffer(null),n},createIndexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setIndexBuffer(n),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t,e),this.setIndexBuffer(null),n},deleteTexture:function(t){var e=this.nativeTextures.indexOf(t);return-1!==e&&c(this.nativeTextures,e),this.gl.deleteTexture(t),this.currentTextures[0]!==t||this.game.pendingDestroy||this.setBlankTexture(!0),this},deleteFramebuffer:function(t){return this.gl.deleteFramebuffer(t),this},deleteProgram:function(t){return this.gl.deleteProgram(t),this},deleteBuffer:function(t){return this.gl.deleteBuffer(t),this},preRenderCamera:function(t){var e=t._cx,i=t._cy,n=t._cw,r=t._ch,o=this.pipelines.TextureTintPipeline,a=t.backgroundColor;if(t.renderToTexture){this.flush(),this.pushScissor(e,i,n,-r),this.setFramebuffer(t.framebuffer);var h=this.gl;h.clearColor(0,0,0,0),h.clear(h.COLOR_BUFFER_BIT),o.projOrtho(e,n+e,i,r+i,-1e3,1e3),t.mask&&(this.currentCameraMask.mask=t.mask,this.currentCameraMask.camera=t._maskCamera,t.mask.preRenderWebGL(this,t,t._maskCamera)),a.alphaGL>0&&o.drawFillRect(e,i,n+e,r+i,p.getTintFromFloats(a.redGL,a.greenGL,a.blueGL,1),a.alphaGL),t.emit(s.PRE_RENDER,t)}else this.pushScissor(e,i,n,r),t.mask&&(this.currentCameraMask.mask=t.mask,this.currentCameraMask.camera=t._maskCamera,t.mask.preRenderWebGL(this,t,t._maskCamera)),a.alphaGL>0&&o.drawFillRect(e,i,n,r,p.getTintFromFloats(a.redGL,a.greenGL,a.blueGL,1),a.alphaGL)},getCurrentStencilMask:function(){var t=null,e=this.maskStack,i=this.currentCameraMask;return e.length>0?t=e[e.length-1]:i.mask&&i.mask.isStencil&&(t=i),t},postRenderCamera:function(t){var e=this.pipelines.TextureTintPipeline;if(t.flashEffect.postRenderWebGL(e,p.getTintFromFloats),t.fadeEffect.postRenderWebGL(e,p.getTintFromFloats),t.dirty=!1,this.popScissor(),t.renderToTexture){e.flush(),this.setFramebuffer(null),t.emit(s.POST_RENDER,t),e.projOrtho(0,e.width,e.height,0,-1e3,1e3);var i=p.getTintAppendFloatAlpha;(t.pipeline?t.pipeline:e).batchTexture(t,t.glTexture,t.width,t.height,t.x,t.y,t.width,t.height,t.zoom,t.zoom,t.rotation,t.flipX,!t.flipY,1,1,0,0,0,0,t.width,t.height,i(t._tintTL,t._alphaTL),i(t._tintTR,t._alphaTR),i(t._tintBL,t._alphaBL),i(t._tintBR,t._alphaBR),t._isTinted&&t.tintFill,0,0,this.defaultCamera,null),this.setBlankTexture(!0)}t.mask&&(this.currentCameraMask.mask=null,t.mask.postRenderWebGL(this,t._maskCamera))},preRender:function(){if(!this.contextLost){var t=this.gl,e=this.pipelines;if(t.bindFramebuffer(t.FRAMEBUFFER,null),this.config.clearBeforeRender){var i=this.config.backgroundColor;t.clearColor(i.redGL,i.greenGL,i.blueGL,i.alphaGL),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT)}for(var n in t.enable(t.SCISSOR_TEST),e)e[n].onPreRender();this.currentScissor=[0,0,this.width,this.height],this.scissorStack=[this.currentScissor],this.game.scene.customViewports&&t.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.setPipeline(this.pipelines.TextureTintPipeline)}},render:function(t,e,i,n){if(!this.contextLost){var s=e.list,r=s.length,a=this.pipelines;for(var h in a)a[h].onRender(t,n);if(this.preRenderCamera(n),0===r)return this.setBlendMode(o.BlendModes.NORMAL),void this.postRenderCamera(n);this.currentType="";for(var l=this.currentMask,u=0;u0&&r>0&&(this.setTexture2D(e,0),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,i),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.width=s,e.height=r,this.setTexture2D(null,0)),e},createVideoTexture:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=this.gl,s=n.NEAREST,r=n.NEAREST,o=t.videoWidth,a=t.videoHeight,l=n.CLAMP_TO_EDGE,u=h(o,a);return!e&&u&&(l=n.REPEAT),this.config.antialias&&(s=u?this.mipmapFilter:n.LINEAR,r=n.LINEAR),this.createTexture2D(0,s,r,l,l,n.RGBA,t,o,a,!0,!0,i)},updateVideoTexture:function(t,e,i){void 0===i&&(i=!1);var n=this.gl,s=t.videoWidth,r=t.videoHeight;return s>0&&r>0&&(this.setTexture2D(e,0),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,i),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.width=s,e.height=r,this.setTexture2D(null,0)),e},setTextureFilter:function(t,e){var i=this.gl,n=[i.LINEAR,i.NEAREST][e];return this.setTexture2D(t,0),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,n),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,n),this.setTexture2D(null,0),this},setFloat1:function(t,e,i){return this.setProgram(t),this.gl.uniform1f(this.gl.getUniformLocation(t,e),i),this},setFloat2:function(t,e,i,n){return this.setProgram(t),this.gl.uniform2f(this.gl.getUniformLocation(t,e),i,n),this},setFloat3:function(t,e,i,n,s){return this.setProgram(t),this.gl.uniform3f(this.gl.getUniformLocation(t,e),i,n,s),this},setFloat4:function(t,e,i,n,s,r){return this.setProgram(t),this.gl.uniform4f(this.gl.getUniformLocation(t,e),i,n,s,r),this},setFloat1v:function(t,e,i){return this.setProgram(t),this.gl.uniform1fv(this.gl.getUniformLocation(t,e),i),this},setFloat2v:function(t,e,i){return this.setProgram(t),this.gl.uniform2fv(this.gl.getUniformLocation(t,e),i),this},setFloat3v:function(t,e,i){return this.setProgram(t),this.gl.uniform3fv(this.gl.getUniformLocation(t,e),i),this},setFloat4v:function(t,e,i){return this.setProgram(t),this.gl.uniform4fv(this.gl.getUniformLocation(t,e),i),this},setInt1:function(t,e,i){return this.setProgram(t),this.gl.uniform1i(this.gl.getUniformLocation(t,e),i),this},setInt2:function(t,e,i,n){return this.setProgram(t),this.gl.uniform2i(this.gl.getUniformLocation(t,e),i,n),this},setInt3:function(t,e,i,n,s){return this.setProgram(t),this.gl.uniform3i(this.gl.getUniformLocation(t,e),i,n,s),this},setInt4:function(t,e,i,n,s,r){return this.setProgram(t),this.gl.uniform4i(this.gl.getUniformLocation(t,e),i,n,s,r),this},setMatrix2:function(t,e,i,n){return this.setProgram(t),this.gl.uniformMatrix2fv(this.gl.getUniformLocation(t,e),i,n),this},setMatrix3:function(t,e,i,n){return this.setProgram(t),this.gl.uniformMatrix3fv(this.gl.getUniformLocation(t,e),i,n),this},setMatrix4:function(t,e,i,n){return this.setProgram(t),this.gl.uniformMatrix4fv(this.gl.getUniformLocation(t,e),i,n),this},getMaxTextures:function(){return this.config.maxTextures},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){for(var t=0;t0&&this.flush();var e=this.inverseRotationMatrix;if(t){var i=-t,n=Math.cos(i),s=Math.sin(i);e[1]=s,e[3]=-s,e[0]=e[4]=n}else e[0]=e[4]=1,e[1]=e[3]=0;this.renderer.setMatrix3(this.program,"uInverseRotationMatrix",!1,e),this.currentNormalMapRotation=t}},batchSprite:function(t,e,i){if(this.active){var n=t.texture.dataSource[t.frame.sourceIndex];n&&(this.renderer.setPipeline(this),this.setTexture2D(n.glTexture,1),this.setNormalMapRotation(t.rotation),r.prototype.batchSprite.call(this,t,e,i))}}});a.LIGHT_COUNT=o,t.exports=a},function(t,e){var i={modelMatrixDirty:!1,viewMatrixDirty:!1,projectionMatrixDirty:!1,modelMatrix:null,viewMatrix:null,projectionMatrix:null,mvpInit:function(){return this.modelMatrixDirty=!0,this.viewMatrixDirty=!0,this.projectionMatrixDirty=!0,this.modelMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this},mvpUpdate:function(){var t=this.program;return this.modelMatrixDirty&&(this.renderer.setMatrix4(t,"uModelMatrix",!1,this.modelMatrix),this.modelMatrixDirty=!1),this.viewMatrixDirty&&(this.renderer.setMatrix4(t,"uViewMatrix",!1,this.viewMatrix),this.viewMatrixDirty=!1),this.projectionMatrixDirty&&(this.renderer.setMatrix4(t,"uProjectionMatrix",!1,this.projectionMatrix),this.projectionMatrixDirty=!1),this},modelIdentity:function(){var t=this.modelMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.modelMatrixDirty=!0,this},modelScale:function(t,e,i){var n=this.modelMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.modelMatrixDirty=!0,this},modelTranslate:function(t,e,i){var n=this.modelMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.modelMatrixDirty=!0,this},modelRotateX:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this.modelMatrixDirty=!0,this},modelRotateY:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this.modelMatrixDirty=!0,this},modelRotateZ:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this.modelMatrixDirty=!0,this},viewIdentity:function(){var t=this.viewMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.viewMatrixDirty=!0,this},viewScale:function(t,e,i){var n=this.viewMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.viewMatrixDirty=!0,this},viewTranslate:function(t,e,i){var n=this.viewMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.viewMatrixDirty=!0,this},viewRotateX:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this.viewMatrixDirty=!0,this},viewRotateY:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this.viewMatrixDirty=!0,this},viewRotateZ:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this.viewMatrixDirty=!0,this},viewLoad2D:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=0,e[4]=t[2],e[5]=t[3],e[6]=0,e[7]=0,e[8]=t[4],e[9]=t[5],e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this.viewMatrixDirty=!0,this},viewLoad:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this.viewMatrixDirty=!0,this},projIdentity:function(){var t=this.projectionMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.projectionMatrixDirty=!0,this},projOrtho:function(t,e,i,n,s,r){var o=this.projectionMatrix,a=1/(t-e),h=1/(i-n),l=1/(s-r);return o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*l,o[15]=1,this.projectionMatrixDirty=!0,this},projPersp:function(t,e,i,n){var s=this.projectionMatrix,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this.projectionMatrixDirty=!0,this}};t.exports=i},,,,,function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){i(513),i(514),i(515),i(516),i(517),i(518),i(519),i(520)},function(t,e){Array.prototype.forEach||(Array.prototype.forEach=function(t){"use strict";if(void 0===this||null===this)throw new TypeError;var e=Object(this),i=e.length>>>0;if("function"!=typeof t)throw new TypeError;for(var n=arguments.length>=2?arguments[1]:void 0,s=0;s>16)+(65280&t)+((255&t)<<16)},n={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,_isTinted:!1,tintFill:!1,clearTint:function(){return this.setTint(16777215),this._isTinted=!1,this},setTint:function(t,e,n,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,n=t,s=t),this._tintTL=i(t),this._tintTR=i(e),this._tintBL=i(n),this._tintBR=i(s),this._isTinted=!0,this.tintFill=!1,this},setTintFill:function(t,e,i,n){return this.setTint(t,e,i,n),this.tintFill=!0,this},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=i(t),this._isTinted=!0}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=i(t),this._isTinted=!0}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=i(t),this._isTinted=!0}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=i(t),this._isTinted=!0}},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){return this._isTinted}}};t.exports=n},function(t,e){t.exports="changedata"},function(t,e){t.exports="changedata-"},function(t,e){t.exports="removedata"},function(t,e){t.exports="setdata"},function(t,e){t.exports="destroy"},function(t,e){t.exports="complete"},function(t,e){t.exports="created"},function(t,e){t.exports="error"},function(t,e){t.exports="loop"},function(t,e){t.exports="play"},function(t,e){t.exports="seeked"},function(t,e){t.exports="seeking"},function(t,e){t.exports="stop"},function(t,e){t.exports="timeout"},function(t,e){t.exports="unlocked"},function(t,e,i){var n=i(34);t.exports=function(t,e,i,s,r){return n(t,"alpha",e,i,s,r)}},function(t,e,i){var n=i(34);t.exports=function(t,e,i,s,r){return n(t,"x",e,i,s,r)}},function(t,e,i){var n=i(34);t.exports=function(t,e,i,s,r,o,a){return void 0!==i&&null!==i||(i=e),n(t,"x",e,s,o,a),n(t,"y",i,r,o,a)}},function(t,e,i){var n=i(34);t.exports=function(t,e,i,s,r){return n(t,"y",e,i,s,r)}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=6.28);for(var s=i,r=(n-i)/t.length,o=0;o0?s(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a1)if(0===s){var d=t.length-1;for(o=t[d].x,a=t[d].y,h=d-1;h>=0;h--)l=(c=t[h]).x,u=c.y,c.x=o,c.y=a,o=l,a=u;t[d].x=e,t[d].y=i}else{for(o=t[0].x,a=t[0].y,h=1;h0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<.001&&(e.zoom=.001))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){t.exports={Camera:i(290),BaseCamera:i(91),CameraManager:i(693),Effects:i(298),Events:i(48)}},function(t,e){t.exports="cameradestroy"},function(t,e){t.exports="camerafadeincomplete"},function(t,e){t.exports="camerafadeinstart"},function(t,e){t.exports="camerafadeoutcomplete"},function(t,e){t.exports="camerafadeoutstart"},function(t,e){t.exports="cameraflashcomplete"},function(t,e){t.exports="cameraflashstart"},function(t,e){t.exports="camerapancomplete"},function(t,e){t.exports="camerapanstart"},function(t,e){t.exports="postrender"},function(t,e){t.exports="prerender"},function(t,e){t.exports="camerashakecomplete"},function(t,e){t.exports="camerashakestart"},function(t,e){t.exports="camerazoomcomplete"},function(t,e){t.exports="camerazoomstart"},function(t,e,i){var n=i(22),s=i(0),r=i(48),o=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,o,a,h){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===o&&(o=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene),!o&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=t,this.progress=0,this.red=i,this.green=n,this.blue=s,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h;var l=t?r.FADE_OUT_START:r.FADE_IN_START;return this.camera.emit(l,this.camera,this,e,i,n,s),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed=1?1:1/e*(1+(e*t|0))}},function(t,e,i){var n=i(22),s=i(0),r=i(48),o=i(3),a=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.intensity=new o,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s){return void 0===t&&(t=100),void 0===e&&(e=.05),void 0===i&&(i=!1),void 0===n&&(n=null),void 0===s&&(s=this.camera.scene),!i&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=t,this.progress=0,"number"==typeof e?this.intensity.set(e):this.intensity.set(e.x,e.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=n,this._onUpdateScope=s,this.camera.emit(r.SHAKE_START,this.camera,this,t,e),this.camera)},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(t,e){if(this.isRunning)if(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed0&&(o.preRender(1),t.render(n,e,i,o))}},resetAll:function(){for(var t=0;t1)for(var i=1;i=1)&&(s.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(s.mspointer=!0),navigator.getGamepads&&(s.gamepads=!0),"onwheel"in window||n.ie&&"WheelEvent"in window?s.wheelEvent="wheel":"onmousewheel"in window?s.wheelEvent="mousewheel":n.firefox&&"MouseScrollEvent"in window&&(s.wheelEvent="DOMMouseScroll"),s)},function(t,e,i){var n=i(117),s={audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){s.audioData=!!window.Audio,s.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e&&(t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(s.ogg=!0),(t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||t.canPlayType("audio/opus;").replace(/^no$/,""))&&(s.opus=!0),t.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(s.mp3=!0),t.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")&&(s.wav=!0),(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/aac;").replace(/^no$/,""))&&(s.m4a=!0),t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(s.webm=!0),""!==t.canPlayType('audio/mp4;codecs="ec-3"')))if(n.edge)s.dolby=!0;else if(n.safari&&n.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var i=parseInt(RegExp.$1,10),r=parseInt(RegExp.$2,10);(10===i&&r>=11||i>10)&&(s.dolby=!0)}}catch(t){}return s}()},function(t,e){var i={h264:!1,hls:!1,mp4:!1,ogg:!1,vp9:!1,webm:!1};t.exports=function(){var t=document.createElement("video"),e=!!t.canPlayType;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(i.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.h264=!0,i.mp4=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(i.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(i.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.hls=!0))}catch(t){}return i}()},function(t,e){var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){var t,e="Fullscreen",n="FullScreen",s=["request"+e,"request"+n,"webkitRequest"+e,"webkitRequest"+n,"msRequest"+e,"msRequest"+n,"mozRequest"+n,"mozRequest"+e];for(t=0;tMath.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){var n=i(315);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(13);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e?t:(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e1?t[i]-(n(s-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(s-r,t[r?r-1:0],t[r],t[i1?n(t[i],t[i-1],i-s):n(t[r],t[r+1>i?i:r+1],s-r)}},function(t,e,i){var n=i(157);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){t.exports={GetNext:i(324),IsSize:i(118),IsValue:i(749)}},function(t,e){t.exports=function(t){return t>0&&0==(t&t-1)}},function(t,e,i){t.exports={Ceil:i(325),Floor:i(93),To:i(751)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),n?(i+t)/e:i+t)}},function(t,e,i){var n=new(i(0))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var n=0;n>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e0;e--){var i=Math.floor(this.frac()*(e+1)),n=t[i];t[i]=t[e],t[e]=n}return t}});t.exports=n},function(t,e){t.exports=function(t){for(var e=0,i=0;i1?void 0!==n?(s=(n-t)/(n-i))<0&&(s=0):s=1:s<0&&(s=0),s}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,s=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*s,t.y=Math.sin(i)*s,t.z=n*e,t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var s=[],r=[],o=0;o0&&t<=e*i&&(r=t>e-1?t-(o=Math.floor(t/e))*e:t,s.set(r,o)),s}},function(t,e){t.exports=function(t,e,i){return Math.abs(t-e)<=i}},function(t,e,i){var n=i(172),s=i(332),r=i(333),o=new s,a=new r,h=new n;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},function(t,e){t.exports="addtexture"},function(t,e){t.exports="onerror"},function(t,e){t.exports="onload"},function(t,e){t.exports="ready"},function(t,e){t.exports="removetexture"},function(t,e){t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","","void main()","{"," vec2 uv = gl_FragCoord.xy / uResolution;"," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);"," float alpha = mainColor.a;",""," if (!uInvertMaskAlpha)"," {"," alpha *= (maskColor.a);"," }"," else"," {"," alpha *= (1.0 - maskColor.a);"," }",""," gl_FragColor = vec4(mainColor.rgb * alpha, alpha);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","","precision mediump float;","","attribute vec2 inPosition;","","void main()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_FORWARD_DIFFUSE_FS","","precision mediump float;","","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","","const int kMaxLights = %LIGHT_COUNT%;","","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","","varying vec2 outTexCoord;","varying vec4 outTint;","","void main()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);"," vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.rgb * outTint.a, outTint.a);"," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;",""," for (int index = 0; index < kMaxLights; ++index)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }",""," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);"," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_TEXTURE_TINT_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.rgb * outTint.a, outTint.a);"," vec4 color = texture;",""," if (outTintEffect == 0.0)"," {"," // Multiply texture tint"," color = texture * texel;"," }"," else if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.rgb * outTint.a, texture.a);"," color.a = texture.a * texel.a;"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_TEXTURE_TINT_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform mat4 uModelMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}","",""].join("\n")},function(t,e,i){t.exports={GenerateTexture:i(340),Palettes:i(782)}},function(t,e,i){t.exports={ARNE16:i(341),C64:i(783),CGA:i(784),JMP:i(785),MSX:i(786)}},function(t,e){t.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},function(t,e){t.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},function(t,e){t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},function(t,e){t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},function(t,e,i){t.exports={Path:i(788),CubicBezier:i(342),Curve:i(80),Ellipse:i(343),Line:i(344),QuadraticBezier:i(345),Spline:i(346)}},function(t,e,i){var n=i(0),s=i(342),r=i(343),o=i(5),a=i(344),h=i(789),l=i(345),u=i(11),c=i(346),d=i(3),f=i(13),p=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.name="",this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new d,this._tmpVec2A=new d,this._tmpVec2B=new d,"object"==typeof t?this.fromJSON(t):this.startPoint.set(t,e)},add:function(t){return this.curves.push(t),this},circleTo:function(t,e,i){return void 0===e&&(e=!1),this.ellipseTo(t,t,0,360,e,i)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);return t.equals(e)||this.curves.push(new a(e,t)),this},cubicBezierTo:function(t,e,i,n,r,o){var a,h,l,u=this.getEndPoint();return t instanceof d?(a=t,h=e,l=i):(a=new d(i,n),h=new d(r,o),l=new d(t,e)),this.add(new s(u,a,h,l))},quadraticBezierTo:function(t,e,i,n){var s,r,o=this.getEndPoint();return t instanceof d?(s=t,r=e):(s=new d(i,n),r=new d(t,e)),this.add(new l(o,s,r))},draw:function(t,e){for(var i=0;i0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new d);for(var i=t*this.getLength(),n=this.getCurveLengths(),s=0;s=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new d),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new d),t.copy(this.startPoint)},lineTo:function(t,e){t instanceof d?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new a([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new c(t))},moveTo:function(t,e){return t instanceof d?this.add(new h(t.x,t.y)):this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},function(t,e,i){var n=i(33),s=i(350);t.exports=function(t,e,i){var r=i,o=i,a=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,l=2*i-h;r=s(l,h,t+1/3),o=s(l,h,t),a=s(l,h,t-1/3)}return(new n).setGLTo(r,o,a,1)}},function(t,e,i){var n=i(163);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],s=0;s<=359;s++)i.push(n(s/359,t,e));return i}},function(t,e,i){var n=i(115),s=function(t,e,i,s,r,o,a,h){void 0===a&&(a=100),void 0===h&&(h=0);var l=h/a;return{r:n(t,s,l),g:n(e,r,l),b:n(i,o,l)}};t.exports={RGBWithRGB:s,ColorWithRGB:function(t,e,i,n,r,o){return void 0===r&&(r=100),void 0===o&&(o=0),s(t.r,t.g,t.b,e,i,n,r,o)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),s(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(170),s=i(33);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e,i){var n=i(349);t.exports=function(t,e,i,s,r){return void 0===s&&(s=255),void 0===r&&(r="#"),"#"===r?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1):"0x"+n(s)+n(t)+n(e)+n(i)}},function(t,e,i){t.exports={BitmapMask:i(275),GeometryMask:i(276)}},function(t,e,i){var n={AddToDOM:i(120),DOMContentLoaded:i(351),GetScreenOrientation:i(352),GetTarget:i(357),ParseXML:i(358),RemoveFromDOM:i(176),RequestAnimationFrame:i(338)};t.exports=n},function(t,e,i){t.exports={EventEmitter:i(811)}},function(t,e,i){var n=i(0),s=i(9),r=i(23),o=new n({Extends:s,initialize:function(){s.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},function(t,e,i){var n=i(120),s=i(286),r=i(289),o=i(26),a=i(0),h=i(311),l=i(813),u=i(334),c=i(113),d=i(336),f=i(312),p=i(351),g=i(9),v=i(18),m=i(359),y=i(23),x=i(364),T=i(365),w=i(367),E=i(119),_=i(370),b=i(337),A=i(339),S=i(374),C=new a({initialize:function(t){this.config=new h(t),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new g,this.anims=new s(this),this.textures=new _(this),this.cache=new r(this),this.registry=new c(this),this.input=new m(this,this.config),this.scene=new w(this,this.config.sceneConfig),this.device=f,this.scale=new T(this,this.config),this.sound=null,this.sound=S.create(this),this.loop=new b(this,this.config.fps),this.plugins=new x(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,p(this.boot.bind(this))},boot:function(){y.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),u(this),l(this),d(this),n(this.canvas,this.config.parent),this.textures.once(E.READY,this.texturesReady,this),this.events.emit(v.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(v.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),A(this);var t=this.events;t.on(v.HIDDEN,this.onHidden,this),t.on(v.VISIBLE,this.onVisible,this),t.on(v.BLUR,this.onBlur,this),t.on(v.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e);var n=this.renderer;n.preRender(),i.emit(v.PRE_RENDER,n,t,e),this.scene.render(n),n.postRender(),i.emit(v.POST_RENDER,n,t,e)},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e),i.emit(v.PRE_RENDER),i.emit(v.POST_RENDER)},onHidden:function(){this.loop.pause(),this.events.emit(v.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(v.RESUME)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.scene.destroy(),this.events.emit(v.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=C},function(t,e,i){var n=i(120);t.exports=function(t){var e=t.config;if(e.parent&&e.domCreateContainer){var i=document.createElement("div");i.style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: none;","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=i,n(i,e.parent)}}},function(t,e){t.exports="boot"},function(t,e){t.exports="destroy"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameout"},function(t,e){t.exports="gameover"},function(t,e){t.exports="gameobjectdown"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameobjectmove"},function(t,e){t.exports="gameobjectout"},function(t,e){t.exports="gameobjectover"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="wheel"},function(t,e){t.exports="gameobjectup"},function(t,e){t.exports="gameobjectwheel"},function(t,e){t.exports="boot"},function(t,e){t.exports="process"},function(t,e){t.exports="update"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointerdownoutside"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="pointerupoutside"},function(t,e){t.exports="wheel"},function(t,e){t.exports="pointerlockchange"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="start"},function(t,e){t.exports="update"},function(t,e){t.exports=function(t){if(!t)return window.innerHeight;var e=Math.abs(window.orientation),i={w:0,h:0},n=document.createElement("div");return n.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(n),i.w=90===e?n.offsetHeight:window.innerWidth,i.h=90===e?window.innerWidth:n.offsetHeight,document.documentElement.removeChild(n),n=null,90!==Math.abs(window.orientation)?i.h:i.w}},function(t,e){t.exports="addfile"},function(t,e){t.exports="complete"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="load"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="progress"},function(t,e){t.exports="start"},function(t,e,i){var n=i(2),s=i(179);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=n(t.settings,"physics",!1);if(e||i){var r=[];if(e&&r.push(s(e+"Physics")),i)for(var o in i)o=s(o.concat("Physics")),-1===r.indexOf(o)&&r.push(o);return r}}},function(t,e,i){var n=i(2);t.exports=function(t){var e=t.plugins.getDefaultScenePlugins(),i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e,i){t.exports={game:"game",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"}},function(t,e){t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var s,r=i.getElementsByTagName("SubTexture"),o=0;og||c<-g)&&(c=0),c<0&&(c=g+c),-1!==d&&(g=c+(d+1));for(var v=f,m=f,y=0,x=0,T=0;Tr&&(y=w-r),E>o&&(x=E-o),t.add(T,e,i+v,s+m,h-y,l-x),(v+=h+p)+h>r&&(v=f,m+=l+p)}return t}},function(t,e,i){var n=i(2);t.exports=function(t,e,i){var s=n(i,"frameWidth",null),r=n(i,"frameHeight",s);if(!s)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o=t.source[0];t.add("__BASE",0,0,0,o.width,o.height);var a,h=n(i,"startFrame",0),l=n(i,"endFrame",-1),u=n(i,"margin",0),c=n(i,"spacing",0),d=e.cutX,f=e.cutY,p=e.cutWidth,g=e.cutHeight,v=e.realWidth,m=e.realHeight,y=Math.floor((v-u+c)/(s+c)),x=Math.floor((m-u+c)/(r+c)),T=y*x,w=e.x,E=s-w,_=s-(v-p-w),b=e.y,A=r-b,S=r-(m-g-b);(h>T||h<-T)&&(h=0),h<0&&(h=T+h),-1!==l&&(T=h+(l+1));for(var C=u,M=u,O=0,P=e.sourceIndex,R=0;R0){var r=i-t.length;if(r<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),n&&n.call(s,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.splice(o,1),o--;if(0===(o=e.length))return null;i>0&&o>r&&(e.splice(r),o=r);for(var a=0;a0){var o=n-t.length;if(o<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),s&&s.call(r,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.pop(),a--;if(0===(a=e.length))return null;n>0&&a>o&&(e.splice(o),a=o);for(var h=a-1;h>=0;h--){var l=e[h];t.splice(i,0,l),s&&s.call(r,l)}return e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i0){var n=t[i-1],s=t.indexOf(n);t[i]=n,t[s]=e}return t}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e);if(-1===n||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&it.length-1)throw new Error("Index out of bounds");var r=n(t,e);return i&&i.call(s,r),r}},function(t,e,i){var n=i(68);t.exports=function(t,e,i,s,r){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===r&&(r=t),n(t,e,i)){var o=i-e,a=t.splice(e,o);if(s)for(var h=0;h0&&(t.splice(i,1),t.unshift(e)),e}},function(t,e,i){var n=i(68);t.exports=function(t,e,i,s,r){if(void 0===s&&(s=0),void 0===r&&(r=t.length),n(t,s,r))for(var o=s;o0){for(n=0;nl||z-Y>l?(N.push(X.i-1),X.cr?(N.push(X.i+X.word.length),Y=0,B=null):B=X):X.cr&&(N.push(X.i+X.word.length),Y=0,B=null)}for(n=N.length-1;n>=0;n--)s=a,r=N[n],o="\n",a=s.substr(0,r)+o+s.substr(r+1);i.wrappedText=a,h=a.length,F=[],k=null}for(n=0;nE&&(c=E),d>_&&(d=_);var W=E+w.xAdvance,H=_+v;fR&&(R=D),DR&&(R=D),D0&&(a=(o=U.wrappedText).length);var z=e._bounds.lines;1===Y?X=(z.longest-z.lengths[0])/2:2===Y&&(X=z.longest-z.lengths[0]);for(var G=s.roundPixels,W=0;W0&&(a=(o=L.wrappedText).length);var D=e._bounds.lines;1===O?R=(D.longest-D.lengths[0])/2:2===O&&(R=D.longest-D.lengths[0]),h.translate(-e.displayOriginX,-e.displayOriginY);for(var F=s.roundPixels,k=0;k0!=t>0,this._alpha=t}}});t.exports=r},function(t,e,i){var n=i(1),s=i(1);n=i(948),s=i(949),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){var r=e.list;if(0!==r.length){var o=e.localTransform;s?(o.loadIdentity(),o.multiply(s),o.translate(e.x,e.y),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY)):o.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);for(var h=e.alpha,l=e.scrollFactorX,u=e.scrollFactorY,c=r,d=r.length,f=0;f0||e.cropHeight>0;l&&(h.flush(),t.pushScissor(e.x,e.y,e.cropWidth*e.scaleX,e.cropHeight*e.scaleY));var u=h._tempMatrix1,c=h._tempMatrix2,d=h._tempMatrix3,f=h._tempMatrix4;c.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),u.copyFrom(s.matrix),r?(u.multiplyWithOffset(r,-s.scrollX*e.scrollFactorX,-s.scrollY*e.scrollFactorY),c.e=e.x,c.f=e.y,u.multiply(c,d)):(c.e-=s.scrollX*e.scrollFactorX,c.f-=s.scrollY*e.scrollFactorY,u.multiply(c,d));var p=e.frame,g=p.glTexture,v=p.cutX,m=p.cutY,y=g.width,x=g.height,T=e._isTinted&&e.tintFill,w=n.getTintAppendFloatAlpha(e._tintTL,s.alpha*e._alphaTL),E=n.getTintAppendFloatAlpha(e._tintTR,s.alpha*e._alphaTR),_=n.getTintAppendFloatAlpha(e._tintBL,s.alpha*e._alphaBL),b=n.getTintAppendFloatAlpha(e._tintBR,s.alpha*e._alphaBR);h.setTexture2D(g,0);var A,S,C=0,M=0,O=0,P=0,R=e.letterSpacing,L=0,D=0,F=0,k=0,I=e.scrollX,B=e.scrollY,Y=e.fontData,N=Y.chars,X=Y.lineHeight,U=e.fontSize/Y.size,z=0,G=e._align,W=0,H=0;e.getTextBounds(!1);var V=e._bounds.lines;1===G?H=(V.longest-V.lengths[0])/2:2===G&&(H=V.longest-V.lengths[0]);for(var j=s.roundPixels,K=e.displayCallback,q=e.callbackData,J=0;J0&&e.cropHeight>0&&(h.beginPath(),h.rect(0,0,e.cropWidth,e.cropHeight),h.clip());for(var Y=0;Y0&&(N=N%E-E):N>E?N=E:N<0&&(N=E+N%E),null===S&&(S=new o(k+Math.cos(Y)*B,I+Math.sin(Y)*B,v),_.push(S),F+=.01);F<1+U;)w=N*F+Y,x=k+Math.cos(w)*B,T=I+Math.sin(w)*B,S.points.push(new r(x,T,v)),F+=.01;w=N+Y,x=k+Math.cos(w)*B,T=I+Math.sin(w)*B,S.points.push(new r(x,T,v));break;case n.FILL_RECT:u.setTexture2D(M),u.batchFillRect(p[++O],p[++O],p[++O],p[++O],f,c);break;case n.FILL_TRIANGLE:u.setTexture2D(M),u.batchFillTriangle(p[++O],p[++O],p[++O],p[++O],p[++O],p[++O],f,c);break;case n.STROKE_TRIANGLE:u.setTexture2D(M),u.batchStrokeTriangle(p[++O],p[++O],p[++O],p[++O],p[++O],p[++O],v,f,c);break;case n.LINE_TO:null!==S?S.points.push(new r(p[++O],p[++O],v)):(S=new o(p[++O],p[++O],v),_.push(S));break;case n.MOVE_TO:S=new o(p[++O],p[++O],v),_.push(S);break;case n.SAVE:a.push(f.copyToArray());break;case n.RESTORE:f.copyFromArray(a.pop());break;case n.TRANSLATE:k=p[++O],I=p[++O],f.translate(k,I);break;case n.SCALE:k=p[++O],I=p[++O],f.scale(k,I);break;case n.ROTATE:f.rotate(p[++O]);break;case n.SET_TEXTURE:var z=p[++O],G=p[++O];u.currentFrame=z,u.setTexture2D(z.glTexture,0),u.tintEffect=G,M=z.glTexture;break;case n.CLEAR_TEXTURE:u.currentFrame=t.blankTexture,u.tintEffect=2,M=t.blankTexture.glTexture}}}},function(t,e,i){var n=i(1),s=i(1);n=i(961),s=i(962),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){this.pipeline.batchSprite(e,n,s)}},function(t,e){t.exports=function(t,e,i,n,s){t.batchSprite(e,e.frame,n,s)}},function(t,e,i){var n=i(1),s=i(1);n=i(964),s=i(965),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){this.pipeline.batchSprite(e,n,s)}},function(t,e){t.exports=function(t,e,i,n,s){t.batchSprite(e,e.frame,n,s)}},function(t,e,i){t.exports={GravityWell:i(394),Particle:i(395),ParticleEmitter:i(396),ParticleEmitterManager:i(192),Zones:i(971)}},function(t,e,i){var n=i(0),s=i(326),r=i(82),o=i(2),a=i(58),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return this.propertyValue},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if("number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&(this.has(t,"random")||this.hasBoth(t,"start","end")||this.hasBoth(t,"min","max"))){this.start=this.has(t,"start")?t.start:t.min,this.end=this.has(t,"end")?t.end:t.max;var i=this.hasBoth(t,"min","max")||!!t.random;if(i){var n=t.random;Array.isArray(n)&&(this.start=n[0],this.end=n[1]),this.onEmit=this.randomRangedValueEmit}if(this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var s=this.has(t,"ease")?t.ease:"Linear";this.ease=r(s),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i){var n=t.data[e];return(n.max-n.min)*this.ease(i)+n.min}});t.exports=h},function(t,e,i){var n=i(1),s=i(1);n=i(969),s=i(970),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(10);t.exports=function(t,e,i,s,r){var o=e.emitters.list,a=o.length;if(0!==a){var h=this.pipeline,l=h._tempMatrix1.copyFrom(s.matrix),u=h._tempMatrix2,c=h._tempMatrix3,d=h._tempMatrix4.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);l.multiply(d),t.setPipeline(h);var f=s.roundPixels,p=e.defaultFrame.glTexture,g=n.getTintAppendFloatAlphaAndSwap;h.setTexture2D(p,0);for(var v=0;v?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:"ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",TEXT_SET7:"AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:"ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789"}},function(t,e,i){var n=i(6);t.exports=function(t,e){var i=e.width,s=e.height,r=Math.floor(i/2),o=Math.floor(s/2),a=n(e,"chars","");if(""!==a){var h=n(e,"image",""),l=n(e,"offset.x",0),u=n(e,"offset.y",0),c=n(e,"spacing.x",0),d=n(e,"spacing.y",0),f=n(e,"lineSpacing",0),p=n(e,"charsPerRow",null);null===p&&(p=t.sys.textures.getFrame(h).width/i)>a.length&&(p=a.length);for(var g=l,v=u,m={retroFont:!0,font:h,size:i,lineHeight:s+f,chars:{}},y=0,x=0;x0&&r.maxLines1&&(d+=f*(h-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:f,lineHeight:c}}},function(t,e,i){var n=i(1),s=i(1);n=i(980),s=i(981),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(10);t.exports=function(t,e,i,s,r){if(0!==e.width&&0!==e.height){var o=e.frame,a=o.width,h=o.height,l=n.getTintAppendFloatAlpha;this.pipeline.batchTexture(e,o.glTexture,a,h,e.x,e.y,a/e.style.resolution,h/e.style.resolution,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,a,h,l(e._tintTL,s.alpha*e._alphaTL),l(e._tintTR,s.alpha*e._alphaTR),l(e._tintBL,s.alpha*e._alphaBL),l(e._tintBR,s.alpha*e._alphaBR),e._isTinted&&e.tintFill,0,0,s,r)}}},function(t,e){t.exports=function(t,e,i,n,s){0!==e.width&&0!==e.height&&t.batchSprite(e,e.frame,n,s)}},function(t,e,i){var n=i(0),s=i(15),r=i(6),o=i(983),a={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},h=new n({initialize:function(t,e){this.parent=t,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this._font,this.setStyle(e,!1,!0);var i=r(e,"metrics",!1);this.metrics=i?{ascent:r(i,"ascent",0),descent:r(i,"descent",0),fontSize:r(i,"fontSize",0)}:o(this)},setStyle:function(t,e,i){for(var n in void 0===e&&(e=!0),void 0===i&&(i=!1),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px"),a){var o=i?a[n][1]:this[n];this[n]="wordWrapCallback"===n||"wordWrapCallbackScope"===n?r(t,a[n][0],o):s(t,a[n][0],o)}var h=r(t,"font",null);null!==h&&this.setFont(h,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var l=r(t,"fill",null);return null!==l&&(this.color=l),e?this.update(!0):this.parent},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow:function(t,e){e?(t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur):(t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor=0,t.shadowBlur=0)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=o(this)),this.parent.updateText()},setFont:function(t,e){void 0===e&&(e=!0);var i=t,n="",s="";if("string"!=typeof t)i=r(t,"fontFamily","Courier"),n=r(t,"fontSize","16px"),s=r(t,"fontStyle","");else{var o=t.split(" "),a=0;s=o.length>2?o[a++]:"",n=o[a++]||"16px",i=o[a++]||"Courier"}return i===this.fontFamily&&n===this.fontSize&&s===this.fontStyle||(this.fontFamily=i,this.fontSize=n,this.fontStyle=s,e&&this.update(!0)),this.parent},setFontFamily:function(t){return this.fontFamily!==t&&(this.fontFamily=t,this.update(!0)),this.parent},setFontStyle:function(t){return this.fontStyle!==t&&(this.fontStyle=t,this.update(!0)),this.parent},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize!==t&&(this.fontSize=t,this.update(!0)),this.parent},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.parent.width=t),e&&(this.parent.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setResolution:function(t){return this.resolution=t,this.update(!1)},setStroke:function(t,e){return void 0===e&&(e=this.strokeThickness),void 0===t&&0!==this.strokeThickness?(this.strokeThickness=0,this.update(!0)):this.stroke===t&&this.strokeThickness===e||(this.stroke=t,this.strokeThickness=e,this.update(!0)),this.parent},setShadow:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===n&&(n=0),void 0===s&&(s=!1),void 0===r&&(r=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=n,this.shadowStroke=s,this.shadowFill=r,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},function(t,e,i){var n=i(26);t.exports=function(t){var e=n.create(this),i=e.getContext("2d");t.syncFont(e,i);var s=Math.ceil(i.measureText(t.testString).width*t.baselineX),r=s,o=2*r;r=r*t.baselineY|0,e.width=s,e.height=o,i.fillStyle="#f00",i.fillRect(0,0,s,o),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,r);var a={ascent:0,descent:0,fontSize:0};if(!i.getImageData(0,0,s,o))return a.ascent=r,a.descent=r+6,a.fontSize=a.ascent+a.descent,n.remove(e),a;var h,l,u=i.getImageData(0,0,s,o).data,c=u.length,d=4*s,f=0,p=!1;for(h=0;hr;h--){for(l=0;l0)for(u=o.fillTint,c=n.getTintAppendFloatAlphaAndSwap(e.fillColor,e.fillAlpha*d),u.TL=c,u.TR=c,u.BL=c,u.BR=c,C=0;C0)for(u=o.fillTint,c=n.getTintAppendFloatAlphaAndSwap(e.altFillColor,e.altFillAlpha*d),u.TL=c,u.TR=c,u.BL=c,u.BR=c,C=0;C0){var R=o.strokeTint,L=n.getTintAppendFloatAlphaAndSwap(e.outlineFillColor,e.outlineFillAlpha*d);for(R.TL=L,R.TR=L,R.BL=L,R.BR=L,S=1;S0)for(n(h,e),S=0;S0)for(n(h,e,e.altFillColor,e.altFillAlpha*c),S=0;S0){for(s(h,e,e.outlineFillColor,e.outlineFillAlpha*c),A=1;Ao.vertexCapacity&&o.flush(),o.setTexture2D(u,0);for(var m=o.vertexViewF32,y=o.vertexViewU32,x=o.vertexCount*o.vertexComponentCount-1,T=0,w=e.tintFill,E=0;E0?Math.PI*t.radius*t.radius:0}},function(t,e,i){var n=i(65);t.exports=function(t){return new n(t.x,t.y,t.radius)}},function(t,e,i){var n=i(55);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(55);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},function(t,e,i){var n=i(11);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(95);n.Area=i(1089),n.Circumference=i(392),n.CircumferencePoint=i(191),n.Clone=i(1090),n.Contains=i(96),n.ContainsPoint=i(1091),n.ContainsRect=i(1092),n.CopyFrom=i(1093),n.Equals=i(1094),n.GetBounds=i(1095),n.GetPoint=i(390),n.GetPoints=i(391),n.Offset=i(1096),n.OffsetPoint=i(1097),n.Random=i(154),t.exports=n},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},function(t,e,i){var n=i(95);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(96);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(96);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e,i){var n=i(11);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(4),s=i(202);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r,o,a,h,l=t.x,u=t.y,c=t.radius,d=e.x,f=e.y,p=e.radius;if(u===f)0==(a=(o=-2*f)*o-4*(r=1)*(d*d+(h=(p*p-c*c-d*d+l*l)/(2*(l-d)))*h-2*d*h+f*f-p*p))?i.push(new n(h,-o/(2*r))):a>0&&(i.push(new n(h,(-o+Math.sqrt(a))/(2*r))),i.push(new n(h,(-o-Math.sqrt(a))/(2*r))));else{var g=(l-d)/(u-f),v=(p*p-c*c-d*d+l*l-f*f+u*u)/(2*(u-f));0==(a=(o=2*u*g-2*v*g-2*l)*o-4*(r=g*g+1)*(l*l+u*u+v*v-c*c-2*u*v))?(h=-o/(2*r),i.push(new n(h,v-h*g))):a>0&&(h=(-o+Math.sqrt(a))/(2*r),i.push(new n(h,v-h*g)),h=(-o-Math.sqrt(a))/(2*r),i.push(new n(h,v-h*g)))}}return i}},function(t,e,i){var n=i(204),s=i(203);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC(),h=e.getLineD();n(r,t,i),n(o,t,i),n(a,t,i),n(h,t,i)}return i}},function(t,e,i){var n=i(11),s=i(131);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},function(t,e,i){var n=i(206),s=i(131);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=t.getLineA(),o=t.getLineB(),a=t.getLineC(),h=t.getLineD();n(r,e,i),n(o,e,i),n(a,e,i),n(h,e,i)}return i}},function(t,e,i){var n=i(425),s=i(206);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC();s(r,t,i),s(o,t,i),s(a,t,i)}return i}},function(t,e,i){var n=i(204),s=i(427);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=t.getLineA(),o=t.getLineB(),a=t.getLineC();n(r,e,i),n(o,e,i),n(a,e,i)}return i}},function(t,e,i){var n=i(430),s=i(428);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC();s(t,r,i),s(t,o,i),s(t,a,i)}return i}},function(t,e,i){var n=i(432);t.exports=function(t,e){if(!n(t,e))return!1;var i=Math.min(e.x1,e.x2),s=Math.max(e.x1,e.x2),r=Math.min(e.y1,e.y2),o=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=s&&t.y>=r&&t.y<=o}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===r&&(r=0),!(e>t.right+r||it.bottom+r||si&&(i=h.x),h.xr&&(r=h.y),h.yn(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.centerX,e.y=t.centerY,e}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var n=i(165);t.exports=function(t,e,i){var s=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),n(t,s,r)}},function(t,e,i){var n=i(11),s=i(131);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)?(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y):i.setEmpty(),i}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var n=i(4),s=i(35);t.exports=function(t,e,i){void 0===i&&(i=new n),e=s(e);var r=Math.sin(e),o=Math.cos(e),a=o>0?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r)-1&&(s.splice(a,1),this.clear(o,!0))}t.length=0,this._pendingRemoval.length=0,this._list=s.concat(e.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.isActive()},updatePoll:function(t,e){if(!this.isActive())return!1;if(this.pluginEvents.emit(d.UPDATE,t,e),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var i,n=this.manager,s=n.pointers,r=n.pointersTotal;for(i=0;i0){if(this._pollTimer-=e,!(this._pollTimer<0))return!1;this._pollTimer=this.pollRate}var a=!1;for(i=0;i0&&(a=!0)}return a},update:function(t,e){if(!this.isActive())return!1;for(var i=e.length,n=!1,s=0;s0&&(n=!0)}return this._updatedThisFrame=!0,n},clear:function(t,e){void 0===e&&(e=!1);var i=t.input;if(i){e||this.queueForRemoval(t),i.gameObject=void 0,i.target=void 0,i.hitArea=void 0,i.hitAreaCallback=void 0,i.callbackContext=void 0,this.manager.resetCursor(i),t.input=null;var n=this._draggable.indexOf(t);return n>-1&&this._draggable.splice(n,1),(n=this._drag[0].indexOf(t))>-1&&this._drag[0].splice(n,1),(n=this._over[0].indexOf(t))>-1&&this._over[0].splice(n,1),t}},disable:function(t){t.input.enabled=!1},enable:function(t,e,i,n){return void 0===n&&(n=!1),t.input?t.input.enabled=!0:this.setHitArea(t,e,i),t.input&&n&&!t.input.dropZone&&(t.input.dropZone=n),this},hitTestPointer:function(t){for(var e=this.cameras.getCamerasBelowPointer(t),i=0;i0)return t.camera=n,s}return t.camera=e[0],[]},processDownEvents:function(t){var e=0,i=this._temp,n=this._eventData,s=this._eventContainer;n.cancelled=!1;for(var r=!1,o=0;o0&&l(t.x,t.y,t.downX,t.downY)>=s?i=!0:n>0&&e>=t.downTime+n&&(i=!0),i)return this.setDragState(t,3),this.processDragStartList(t)},processDragStartList:function(t){if(3!==this.getDragState(t))return 0;for(var e=this._drag[t.id],i=0;i1&&(this.sortGameObjects(i),this.topOnly&&i.splice(1)),this._drag[t.id]=i,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?(this.setDragState(t,3),this.processDragStartList(t)):(this.setDragState(t,2),0))},processDragMoveEvent:function(t){if(2===this.getDragState(t)&&this.processDragThresholdEvent(t,this.manager.game.loop.now),4!==this.getDragState(t))return 0;for(var e=this._tempZones,i=this._drag[t.id],n=0;n0?(o.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,o,h),a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h)):(o.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,o,h),e[0]?(a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h)):a.target=null)}else!h&&e[0]&&(a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h));if(o.parentContainer){var u=t.x-a.dragStartXGlobal,c=t.y-a.dragStartYGlobal,f=o.getParentRotation(),p=u*Math.cos(f)+c*Math.sin(f),g=c*Math.cos(f)-u*Math.sin(f);p*=1/o.parentContainer.scaleX,g*=1/o.parentContainer.scaleY,s=p+a.dragStartX,r=g+a.dragStartY}else s=t.x-a.dragX,r=t.y-a.dragY;o.emit(d.GAMEOBJECT_DRAG,t,s,r),this.emit(d.DRAG,t,o,s,r)}return i.length},processDragUpEvent:function(t){for(var e=this._drag[t.id],i=0;i0){var r=this.manager,o=this._eventData,a=this._eventContainer;o.cancelled=!1;for(var h=!1,l=0;l0){var s=this.manager,r=this._eventData,o=this._eventContainer;r.cancelled=!1;var a=!1;this.sortGameObjects(e);for(var h=0;h0){for(this.sortGameObjects(s),e=0;e0){for(this.sortGameObjects(r),e=0;e-1&&this._draggable.splice(s,1)}return this},makePixelPerfect:function(t){void 0===t&&(t=1);var e=this.systems.textures;return h(e,t)},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);var n=!1,s=!1,r=!1,o=!1,h=!1,l=!0;if(m(e)){var u=e;e=p(u,"hitArea",null),i=p(u,"hitAreaCallback",null),n=p(u,"draggable",!1),s=p(u,"dropZone",!1),r=p(u,"cursor",!1),o=p(u,"useHandCursor",!1),h=p(u,"pixelPerfect",!1);var c=p(u,"alphaTolerance",1);h&&(e={},i=this.makePixelPerfect(c)),e&&i||(this.setHitAreaFromTexture(t),l=!1)}else"function"!=typeof e||i||(i=e,e={});for(var d=0;d=e}}},function(t,e,i){t.exports={Events:i(133),KeyboardManager:i(360),KeyboardPlugin:i(1210),Key:i(445),KeyCodes:i(122),KeyCombo:i(446),JustDown:i(1215),JustUp:i(1216),DownDuration:i(1217),UpDuration:i(1218)}},function(t,e){t.exports="keydown"},function(t,e){t.exports="keyup"},function(t,e){t.exports="keycombomatch"},function(t,e){t.exports="down"},function(t,e){t.exports="keydown-"},function(t,e){t.exports="keyup-"},function(t,e){t.exports="up"},function(t,e,i){var n=i(0),s=i(9),r=i(133),o=i(18),a=i(6),h=i(54),l=i(132),u=i(445),c=i(122),d=i(446),f=i(1214),p=i(93),g=new n({Extends:s,initialize:function(t){s.call(this),this.game=t.systems.game,this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.manager=t.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],t.pluginEvents.once(h.BOOT,this.boot,this),t.pluginEvents.on(h.START,this.start,this)},boot:function(){var t=this.settings.input;this.enabled=a(t,"keyboard",!0);var e=a(t,"keyboard.capture",null);e&&this.addCaptures(e),this.sceneInputPlugin.pluginEvents.once(h.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.useQueue?this.sceneInputPlugin.pluginEvents.on(h.UPDATE,this.update,this):this.sceneInputPlugin.manager.events.on(h.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(h.SHUTDOWN,this.shutdown,this),this.game.events.on(o.BLUR,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},addCapture:function(t){return this.manager.addCapture(t),this},removeCapture:function(t){return this.manager.removeCapture(t),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:c.UP,down:c.DOWN,left:c.LEFT,right:c.RIGHT,space:c.SPACE,shift:c.SHIFT})},addKeys:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!1);var n={};if("string"==typeof t){t=t.split(",");for(var s=0;s-1?n[s]=t:n[t.keyCode]=t,e&&this.addCapture(t.keyCode),t.setEmitOnRepeat(i),t}return"string"==typeof t&&(t=c[t.toUpperCase()]),n[t]||(n[t]=new u(this,t),e&&this.addCapture(t),n[t].setEmitOnRepeat(i)),n[t]},removeKey:function(t,e){void 0===e&&(e=!1);var i,n=this.keys;if(t instanceof u){var s=n.indexOf(t);s>-1&&(i=this.keys[s],this.keys[s]=void 0)}else"string"==typeof t&&(t=c[t.toUpperCase()]);return n[t]&&(i=n[t],n[t]=void 0),i&&(i.plugin=null,e&&i.destroy()),this},createCombo:function(t,e){return new d(this,t,e)},checkDown:function(t,e){if(this.enabled&&t.isDown){var i=p(this.time-t.timeDown,e);if(i>t._tick)return t._tick=i,!0}return!1},update:function(){var t=this.manager.queue,e=t.length;if(this.isActive()&&0!==e)for(var i=this.keys,n=0;n0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(s=!0,i=n(t,e))}else s=!0,i=n(t,e);return!s&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},function(t,e){t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},function(t,e){t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},function(t,e,i){var n=i(122),s={};for(var r in n)s[n[r]]=r;t.exports=s},function(t,e){t.exports=function(t){return!!t._justDown&&(t._justDown=!1,!0)}},function(t,e){t.exports=function(t){return!!t._justUp&&(t._justUp=!1,!0)}},function(t,e){t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeDown;return t.isDown&&i'),i.push(''),i.push(''),i.push(this.xhrLoader.responseText),i.push(""),i.push(""),i.push("");var n=[i.join("\n")],o=this;try{var a=new window.Blob(n,{type:"image/svg+xml;charset=utf-8"})}catch(t){return o.state=s.FILE_ERRORED,void o.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(o.data),o.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(o.data),o.onProcessError()},r.createObjectURL(this.data,a,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});o.register("htmlTexture",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r0},isLoading:function(){return this.state===s.LOADER_LOADING||this.state===s.LOADER_PROCESSING},isReady:function(){return this.state===s.LOADER_IDLE||this.state===s.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(a.START,this),0===this.list.size?this.loadComplete():(this.state=s.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(c.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(a.PROGRESS,this.progress)},update:function(){this.state===s.LOADER_LOADING&&this.list.size>0&&this.inflight.sizei&&(n=l,i=c)}}return n},moveTo:function(t,e,i,n,s){void 0===n&&(n=60),void 0===s&&(s=0);var o=Math.atan2(i-t.y,e-t.x);return s>0&&(n=r(t.x,t.y,e,i)/(s/1e3)),t.body.velocity.setToPolar(o,n),o},moveToObject:function(t,e,i,n){return this.moveTo(t,e.x,e.y,i,n)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new p),i.setToPolar(s(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new p),i.setToPolar(t,e)},overlapRect:function(t,e,i,n,s,r){return c(this.world,t,e,i,n,s,r)},overlapCirc:function(t,e,i,n,s){return u(this.world,t,e,i,n,s)},shutdown:function(){if(this.world){var t=this.systems.events;t.off(f.UPDATE,this.world.update,this.world),t.off(f.POST_UPDATE,this.world.postUpdate,this.world),t.off(f.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null}},destroy:function(){this.shutdown(),this.scene.sys.events.off(f.START,this.start,this),this.scene=null,this.systems=null}});d.register("ArcadePhysics",v,"arcadePhysics"),t.exports=v},function(t,e){t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},function(t,e){t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},function(t,e){t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,e,i){return this.body.setCollideWorldBounds(t,e,i),this}}},function(t,e){t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},function(t,e){t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this},setDamping:function(t){return this.body.useDamping=t,this}}},function(t,e){var i={enableBody:function(t,e,i,n,s){return t&&this.body.reset(e,i),n&&(this.body.gameObject.active=!0),s&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};t.exports=i},function(t,e){t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},function(t,e){t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},function(t,e){var i={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}};t.exports=i},function(t,e){t.exports={setMass:function(t){return this.body.mass=t,this}}},function(t,e){t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},function(t,e){t.exports={setVelocity:function(t,e){return this.body.setVelocity(t,e),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,e){return this.body.maxVelocity.set(t,e),this}}},function(t,e,i){var n=i(456),s=i(65),r=i(202),o=i(203);t.exports=function(t,e,i,a,h,l){var u=n(t,e-a,i-a,2*a,2*a,h,l);if(0===u.length)return u;for(var c=new s(e,i,a),d=new s,f=[],p=0;pe.deltaAbsY()?y=-1:e.deltaAbsX()0&&u&&t.checkCollision.right&&h&&t.right>i&&(a=t.right-i)>r&&(a=0),0!==a&&(t.customSeparateX?t.overlapX=a:n(t,a)),a}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):e>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=e,0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},function(t,e,i){var n=i(1275);t.exports=function(t,e,i,s,r,o){var a=0,h=e.faceTop,l=e.faceBottom,u=e.collideUp,c=e.collideDown;return o||(h=!0,l=!0,u=!0,c=!0),t.deltaY()<0&&c&&t.checkCollision.up?l&&t.y0&&u&&t.checkCollision.down&&h&&t.bottom>i&&(a=t.bottom-i)>r&&(a=0),0!==a&&(t.customSeparateY?t.overlapY=a:n(t,a)),a}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):e>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=e,0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},function(t,e,i){var n=i(460);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.x,a=e.velocity.x;if(t.immovable||e.immovable)t.immovable?(e.x+=r,e.velocity.x=o-a*e.bounce.x,t.moves&&(e.y+=(t.y-t.prev.y)*t.friction.y)):(t.x-=r,t.velocity.x=a-o*t.bounce.x,e.moves&&(t.y+=(e.y-e.prev.y)*e.friction.y));else{r*=.5,t.x-=r,e.x+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),l=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),u=.5*(h+l);h-=u,l-=u,t.velocity.x=u+h*t.bounce.x,e.velocity.x=u+l*e.bounce.x}return!0}},function(t,e,i){var n=i(461);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateY||e.customSeparateY)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.y,a=e.velocity.y;if(t.immovable||e.immovable)t.immovable?(e.y+=r,e.velocity.y=o-a*e.bounce.y,t.moves&&(e.x+=(t.x-t.prev.x)*t.friction.x)):(t.y-=r,t.velocity.y=a-o*t.bounce.y,e.moves&&(t.x+=(e.x-e.prev.x)*e.friction.x));else{r*=.5,t.y-=r,e.y+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),l=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),u=.5*(h+l);h-=u,l-=u,t.velocity.y=u+h*t.bounce.y,e.velocity.y=u+l*e.bounce.y}return!0}},,,,,,,,,,,,,,,function(t,e,i){t.exports={BasePlugin:i(468),DefaultPlugins:i(173),PluginCache:i(23),PluginManager:i(364),ScenePlugin:i(1293)}},function(t,e,i){var n=i(468),s=i(0),r=i(19),o=new s({Extends:n,initialize:function(t,e){n.call(this,e),this.scene=t,this.systems=t.sys,t.sys.events.once(r.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=o},function(t,e,i){var n=i(17),s=i(175),r={Center:i(353),Events:i(92),Orientation:i(354),ScaleManager:i(365),ScaleModes:i(355),Zoom:i(356)};r=n(!1,r=n(!1,r=n(!1,r=n(!1,r,s.CENTER),s.ORIENTATION),s.SCALE_MODE),s.ZOOM),t.exports=r},function(t,e,i){var n=i(123),s=i(17),r={Events:i(19),SceneManager:i(367),ScenePlugin:i(1296),Settings:i(369),Systems:i(178)};r=s(!1,r,n),t.exports=r},function(t,e,i){var n=i(22),s=i(0),r=i(19),o=i(2),a=i(23),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene,this.transitionProgress=0,this._elapsed=0,this._target=null,this._duration=0,this._onUpdate,this._onUpdateScope,this._willSleep=!1,this._willRemove=!1,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.pluginStart,this)},boot:function(){this.systems.events.once(r.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},start:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t,e),this},restart:function(t){var e=this.key;return this.manager.queueOp("stop",e),this.manager.queueOp("start",e,t),this},transition:function(t){void 0===t&&(t={});var e=o(t,"target",!1),i=this.manager.getScene(e);if(!e||!this.checkValidTransition(i))return!1;var n=o(t,"duration",1e3);this._elapsed=0,this._target=i,this._duration=n,this._willSleep=o(t,"sleep",!1),this._willRemove=o(t,"remove",!1);var s=o(t,"onUpdate",null);s&&(this._onUpdate=s,this._onUpdateScope=o(t,"onUpdateScope",this.scene));var a=o(t,"allowInput",!1);this.settings.transitionAllowInput=a;var h=i.sys.settings;return h.isTransition=!0,h.transitionFrom=this.scene,h.transitionDuration=n,h.transitionAllowInput=a,o(t,"moveAbove",!1)?this.manager.moveAbove(this.key,e):o(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,e),i.sys.isSleeping()?i.sys.wake():this.manager.start(e,o(t,"data")),this.systems.events.emit(r.TRANSITION_OUT,i,n),this.systems.events.on(r.UPDATE,this.step,this),!0},checkValidTransition:function(t){return!(!t||t.sys.isActive()||t.sys.isTransitioning()||t===this.scene||this.systems.isTransitioning())},step:function(t,e){this._elapsed+=e,this.transitionProgress=n(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;this.systems.events.off(r.UPDATE,this.step,this),t.events.emit(r.TRANSITION_COMPLETE,this.scene),e.isTransition=!1,e.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(t,e,i,n){return this.manager.add(t,e,i,n)},launch:function(t,e){return t&&t!==this.key&&this.manager.queueOp("start",t,e),this},run:function(t,e){return t&&t!==this.key&&this.manager.queueOp("run",t,e),this},pause:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("pause",t,e),this},resume:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("resume",t,e),this},sleep:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("sleep",t,e),this},wake:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("wake",t,e),this},switch:function(t){return t!==this.key&&this.manager.queueOp("switch",this.key,t),this},stop:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t,e),this},setActive:function(t,e,i){void 0===e&&(e=this.key);var n=this.manager.getScene(e);return n&&n.sys.setActive(t,i),this},setVisible:function(t,e){void 0===e&&(e=this.key);var i=this.manager.getScene(e);return i&&i.sys.setVisible(t),this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isPaused:function(t){return void 0===t&&(t=this.key),this.manager.isPaused(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.swapPosition(t,e),this},moveAbove:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveAbove(t,e),this},moveBelow:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveBelow(t,e),this},remove:function(t){return void 0===t&&(t=this.key),this.manager.remove(t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(r.SHUTDOWN,this.shutdown,this),t.off(r.POST_UPDATE,this.step,this),t.off(r.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});a.register("ScenePlugin",h,"scenePlugin"),t.exports=h},function(t,e,i){t.exports={List:i(126),Map:i(159),ProcessQueue:i(184),RTree:i(462),Set:i(108),Size:i(366)}},function(t,e,i){var n=i(17),s=i(1299),r={CanvasTexture:i(371),Events:i(119),FilterMode:s,Frame:i(94),Parsers:i(373),Texture:i(180),TextureManager:i(370),TextureSource:i(372)};r=n(!1,r,s),t.exports=r},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(137),Parsers:i(1330),Formats:i(31),ImageCollection:i(479),ParseToTilemap:i(224),Tile:i(74),Tilemap:i(488),TilemapCreator:i(1339),TilemapFactory:i(1340),Tileset:i(141),LayerData:i(104),MapData:i(105),ObjectLayer:i(482),DynamicTilemapLayer:i(489),StaticTilemapLayer:i(490)}},function(t,e,i){var n=i(24),s=i(51);t.exports=function(t,e,i,r,o,a,h,l){t<0&&(t=0),e<0&&(e=0),void 0===h&&(h=!0);for(var u=n(t,e,i,r,null,l),c=o-t,d=a-e,f=0;f=0&&p=0&&g=v;o--)(h=c[a][o])&&-1!==h.index&&h.visible&&0!==h.alpha&&i.push(h);else if(2===r)for(a=x;a>=y;a--)for(o=v;c[a]&&o=y;a--)for(o=m;c[a]&&o>=v;o--)(h=c[a][o])&&-1!==h.index&&h.visible&&0!==h.alpha&&i.push(h);return u.tilesDrawn=i.length,u.tilesTotal=d*f,i}},function(t,e,i){var n=i(24),s=i(51),r=i(73);t.exports=function(t,e,i,o,a,h,l){for(var u=-1!==l.collideIndexes.indexOf(t),c=n(e,i,o,a,null,l),d=0;d=0;r--)for(s=n.width-1;s>=0;s--)if((o=n.data[r][s])&&o.index===t){if(a===e)return o;a+=1}}else for(r=0;re)){for(var l=t;l<=e;l++)r(l,i,a);if(h)for(var u=0;u=t&&d.index<=e&&n(d,i)}o&&s(0,0,a.width,a.height,a)}}},function(t,e,i){var n=i(73),s=i(51),r=i(219);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a0&&n(a,t)}}e&&s(0,0,i.width,i.height,i)}},function(t,e){t.exports=function(t,e,i,n){if("number"==typeof t)n.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var s=0,r=t.length;s1||e.scaleY>1)&&(u.imageSmoothingEnabled=!1);for(var f=0;f0&&(t.currentPipeline&&t.currentPipeline.vertexCount>0&&t.flush(),r.vertexBuffer=e.vertexBuffer[a],t.setPipeline(r),t.setTexture2D(s[a].glTexture,0),t.gl.drawArrays(r.topology,0,e.vertexCount[a]));r.vertexBuffer=o,r.viewIdentity(),r.modelIdentity()}},function(t,e){t.exports=function(t,e,i,n,s){e.cull(n);var r=e.culledTiles,o=r.length;if(0!==o){var a=t._tempMatrix1,h=t._tempMatrix2,l=t._tempMatrix3;h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),a.copyFrom(n.matrix);var u=t.currentContext,c=e.gidMap;u.save(),s?(a.multiplyWithOffset(s,-n.scrollX*e.scrollFactorX,-n.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y,a.multiply(h,l),l.copyToContext(u)):(h.e-=n.scrollX*e.scrollFactorX,h.f-=n.scrollY*e.scrollFactorY,h.copyToContext(u));var d=n.alpha*e.alpha;(!t.antialias||e.scaleX>1||e.scaleY>1)&&(u.imageSmoothingEnabled=!1);for(var f=0;f-1&&this._active.splice(s,1),n.destroy()}for(i=0;i=n.delay)){var s=n.elapsed-n.delay;n.elapsed=n.delay,!n.hasDispatched&&n.callback&&(n.hasDispatched=!0,n.callback.apply(n.callbackScope,n.args)),n.repeatCount>0?(n.repeatCount--,n.elapsed=s,n.hasDispatched=!1):this._pendingRemoval.push(n)}}}},shutdown:function(){var t;for(t=0;t-1&&(e.state=u.REMOVED,s.splice(r,1)):(e.state=u.REMOVED,n.splice(r,1))}for(i.length=0,i=this._add,t=0;t>2],r+=i[(3&n[o])<<4|n[o+1]>>4],r+=i[(15&n[o+1])<<2|n[o+2]>>6],r+=i[63&n[o+2]];return s%3==2?r=r.substring(0,r.length-1)+"=":s%3==1&&(r=r.substring(0,r.length-2)+"=="),r}},function(t,e,i){t.exports={Clone:i(67),Extend:i(17),GetAdvancedValue:i(15),GetFastValue:i(2),GetMinMaxValue:i(1364),GetValue:i(6),HasAll:i(1365),HasAny:i(399),HasValue:i(99),IsPlainObject:i(7),Merge:i(107),MergeRight:i(1366),Pick:i(480),SetValue:i(419)}},function(t,e,i){var n=i(6),s=i(22);t.exports=function(t,e,i,r,o){void 0===o&&(o=i);var a=n(t,e,o);return s(a,i,r)}},function(t,e){t.exports=function(t,e){for(var i=0;i - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -354,7 +354,7 @@ module.exports = Class; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -397,7 +397,7 @@ module.exports = GetFastValue; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -424,7 +424,7 @@ module.exports = NOOP; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1063,12 +1063,12 @@ module.exports = Vector2; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var GEOM_CONST = __webpack_require__(51); +var GEOM_CONST = __webpack_require__(52); /** * @classdesc @@ -1156,7 +1156,7 @@ module.exports = Point; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1227,13 +1227,13 @@ module.exports = GetValue; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var PluginCache = __webpack_require__(20); -var SceneEvents = __webpack_require__(21); +var PluginCache = __webpack_require__(22); +var SceneEvents = __webpack_require__(18); /** * @classdesc @@ -1289,7 +1289,7 @@ var GameObjectFactory = new Class({ /** * A reference to the Scene Update List. * - * @name Phaser.GameObjects.GameObjectFactory#updateList; + * @name Phaser.GameObjects.GameObjectFactory#updateList * @type {Phaser.GameObjects.UpdateList} * @protected * @since 3.0.0 @@ -1332,14 +1332,14 @@ var GameObjectFactory = new Class({ /** * Adds an existing Game Object to this Scene. - * + * * If the Game Object renders, it will be added to the Display List. * If it has a `preUpdate` method, it will be added to the Update List. * * @method Phaser.GameObjects.GameObjectFactory#existing * @since 3.0.0 * - * @param {Phaser.GameObjects.GameObject} child - The child to be added to this Scene. + * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group)} child - The child to be added to this Scene. * * @return {Phaser.GameObjects.GameObject} The Game Object that was added. */ @@ -1394,8 +1394,19 @@ var GameObjectFactory = new Class({ }); -// Static method called directly by the Game Object factory functions - +/** + * Static method called directly by the Game Object factory functions. + * With this method you can register a custom GameObject factory in the GameObjectFactory, + * providing a name (`factoryType`) and the constructor (`factoryFunction`) in order + * to be called when you call to Phaser.Scene.add[ factoryType ] method. + * + * @method Phaser.GameObjects.GameObjectFactory.register + * @static + * @since 3.0.0 + * + * @param {string} factoryType - The key of the factory that you will use to call to Phaser.Scene.add[ factoryType ] method. + * @param {function} factoryFunction - The constructor function to be called when you invoke to the Phaser.Scene.add method. + */ GameObjectFactory.register = function (factoryType, factoryFunction) { if (!GameObjectFactory.prototype.hasOwnProperty(factoryType)) @@ -1404,6 +1415,17 @@ GameObjectFactory.register = function (factoryType, factoryFunction) } }; +/** + * Static method called directly by the Game Object factory functions. + * With this method you can remove a custom GameObject factory registered in the GameObjectFactory, + * providing a its `factoryType`. + * + * @method Phaser.GameObjects.GameObjectFactory.remove + * @static + * @since 3.0.0 + * + * @param {string} factoryType - The key of the factory that you want to remove from the GameObjectFactory. + */ GameObjectFactory.remove = function (factoryType) { if (GameObjectFactory.prototype.hasOwnProperty(factoryType)) @@ -1423,7 +1445,7 @@ module.exports = GameObjectFactory; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1479,7 +1501,7 @@ module.exports = IsPlainObject; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1892,7 +1914,7 @@ if (true) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2026,17 +2048,17 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(52); -var GetPoint = __webpack_require__(157); -var GetPoints = __webpack_require__(274); -var GEOM_CONST = __webpack_require__(51); -var Line = __webpack_require__(60); -var Random = __webpack_require__(160); +var Contains = __webpack_require__(53); +var GetPoint = __webpack_require__(161); +var GetPoints = __webpack_require__(293); +var GEOM_CONST = __webpack_require__(52); +var Line = __webpack_require__(61); +var Random = __webpack_require__(164); /** * @classdesc @@ -2537,7 +2559,7 @@ module.exports = Rectangle; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2547,27 +2569,28 @@ module.exports = Rectangle; module.exports = { - Alpha: __webpack_require__(268), - Animation: __webpack_require__(269), - BlendMode: __webpack_require__(272), - ComputedSize: __webpack_require__(558), - Crop: __webpack_require__(559), - Depth: __webpack_require__(273), - Flip: __webpack_require__(560), - GetBounds: __webpack_require__(561), - Mask: __webpack_require__(277), - Origin: __webpack_require__(578), - PathFollower: __webpack_require__(579), - Pipeline: __webpack_require__(119), - ScrollFactor: __webpack_require__(280), - Size: __webpack_require__(580), - Texture: __webpack_require__(581), - TextureCrop: __webpack_require__(582), - Tint: __webpack_require__(583), - ToJSON: __webpack_require__(281), - Transform: __webpack_require__(282), + Alpha: __webpack_require__(559), + AlphaSingle: __webpack_require__(287), + Animation: __webpack_require__(288), + BlendMode: __webpack_require__(291), + ComputedSize: __webpack_require__(578), + Crop: __webpack_require__(579), + Depth: __webpack_require__(292), + Flip: __webpack_require__(580), + GetBounds: __webpack_require__(581), + Mask: __webpack_require__(296), + Origin: __webpack_require__(598), + PathFollower: __webpack_require__(599), + Pipeline: __webpack_require__(121), + ScrollFactor: __webpack_require__(299), + Size: __webpack_require__(600), + Texture: __webpack_require__(601), + TextureCrop: __webpack_require__(602), + Tint: __webpack_require__(603), + ToJSON: __webpack_require__(300), + Transform: __webpack_require__(301), TransformMatrix: __webpack_require__(35), - Visible: __webpack_require__(283) + Visible: __webpack_require__(302) }; @@ -2578,7 +2601,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2670,15 +2693,15 @@ module.exports = MATH_CONST; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var ComponentsToJSON = __webpack_require__(281); -var DataManager = __webpack_require__(99); +var ComponentsToJSON = __webpack_require__(300); +var DataManager = __webpack_require__(101); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(100); +var Events = __webpack_require__(102); /** * @classdesc @@ -2731,7 +2754,7 @@ var GameObject = new Class({ * * Phaser itself will never modify this value, although plugins may do so. * - * Use this property to track the state of a Game Object during its lifetime. For example, it could move from + * Use this property to track the state of a Game Object during its lifetime. For example, it could change from * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons. * If you need to store complex data about your Game Object, look at using the Data Component instead. @@ -3311,11 +3334,11 @@ module.exports = GameObject; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH = __webpack_require__(177); +var MATH = __webpack_require__(181); var GetValue = __webpack_require__(5); /** @@ -3398,13 +3421,13 @@ module.exports = GetAdvancedValue; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var PluginCache = __webpack_require__(20); -var SceneEvents = __webpack_require__(21); +var PluginCache = __webpack_require__(22); +var SceneEvents = __webpack_require__(18); /** * @classdesc @@ -3461,7 +3484,7 @@ var GameObjectCreator = new Class({ /** * A reference to the Scene Update List. * - * @name Phaser.GameObjects.GameObjectCreator#updateList; + * @name Phaser.GameObjects.GameObjectCreator#updateList * @type {Phaser.GameObjects.UpdateList} * @protected * @since 3.0.0 @@ -3566,7 +3589,7 @@ module.exports = GameObjectCreator; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3663,7 +3686,46 @@ module.exports = Extend; /* 18 */ /***/ (function(module, exports, __webpack_require__) { -/* WEBPACK VAR INJECTION */(function(global) {/** +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Scenes.Events + */ + +module.exports = { + + BOOT: __webpack_require__(732), + CREATE: __webpack_require__(733), + DESTROY: __webpack_require__(734), + PAUSE: __webpack_require__(735), + POST_UPDATE: __webpack_require__(736), + PRE_UPDATE: __webpack_require__(737), + READY: __webpack_require__(738), + RENDER: __webpack_require__(739), + RESUME: __webpack_require__(740), + SHUTDOWN: __webpack_require__(741), + SLEEP: __webpack_require__(742), + START: __webpack_require__(743), + TRANSITION_COMPLETE: __webpack_require__(744), + TRANSITION_INIT: __webpack_require__(745), + TRANSITION_OUT: __webpack_require__(746), + TRANSITION_START: __webpack_require__(747), + TRANSITION_WAKE: __webpack_require__(748), + UPDATE: __webpack_require__(749), + WAKE: __webpack_require__(750) + +}; + + +/***/ }), +/* 19 */ +/***/ (function(module, exports) { + +/** * The `Matter.Common` module contains utility functions that are common to all modules. * * @class Common @@ -3922,7 +3984,7 @@ module.exports = Common; * @return {number} the current timestamp */ Common.now = function() { - if (window.performance) { + if (typeof window !== 'undefined' && window.performance) { if (window.performance.now) { return window.performance.now(); } else if (window.performance.webkitNow) { @@ -4200,36 +4262,46 @@ module.exports = Common; func )); }; - - /** - * Used to require external libraries outside of the bundle. - * It first looks for the `globalName` on the environment's global namespace. - * If the global is not found, it will fall back to using the standard `require` using the `moduleName`. - * @private - * @method _requireGlobal - * @param {string} globalName The global module name - * @param {string} moduleName The fallback CommonJS module name - * @return {} The loaded module - */ - Common._requireGlobal = function(globalName, moduleName) { - var obj = (typeof window !== 'undefined' ? window[globalName] : typeof global !== 'undefined' ? global[globalName] : null); - - // Breaks webpack :( - // return obj || require(moduleName); - - return obj; - }; })(); -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(252))) /***/ }), -/* 19 */ +/* 20 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Force a value within the boundaries by clamping it to the range `min`, `max`. + * + * @function Phaser.Math.Clamp + * @since 3.0.0 + * + * @param {number} value - The value to be clamped. + * @param {number} min - The minimum bounds. + * @param {number} max - The maximum bounds. + * + * @return {number} The clamped value. + */ +var Clamp = function (value, min, max) +{ + return Math.max(min, Math.min(max, value)); +}; + +module.exports = Clamp; + + +/***/ }), +/* 21 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4239,33 +4311,33 @@ module.exports = Common; module.exports = { - BLUR: __webpack_require__(562), - BOOT: __webpack_require__(563), - CONTEXT_LOST: __webpack_require__(564), - CONTEXT_RESTORED: __webpack_require__(565), - DESTROY: __webpack_require__(566), - FOCUS: __webpack_require__(567), - HIDDEN: __webpack_require__(568), - PAUSE: __webpack_require__(569), - POST_RENDER: __webpack_require__(570), - POST_STEP: __webpack_require__(571), - PRE_RENDER: __webpack_require__(572), - PRE_STEP: __webpack_require__(573), - READY: __webpack_require__(574), - RESUME: __webpack_require__(575), - STEP: __webpack_require__(576), - VISIBLE: __webpack_require__(577) + BLUR: __webpack_require__(582), + BOOT: __webpack_require__(583), + CONTEXT_LOST: __webpack_require__(584), + CONTEXT_RESTORED: __webpack_require__(585), + DESTROY: __webpack_require__(586), + FOCUS: __webpack_require__(587), + HIDDEN: __webpack_require__(588), + PAUSE: __webpack_require__(589), + POST_RENDER: __webpack_require__(590), + POST_STEP: __webpack_require__(591), + PRE_RENDER: __webpack_require__(592), + PRE_STEP: __webpack_require__(593), + READY: __webpack_require__(594), + RESUME: __webpack_require__(595), + STEP: __webpack_require__(596), + VISIBLE: __webpack_require__(597) }; /***/ }), -/* 20 */ +/* 22 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4469,51 +4541,12 @@ module.exports = PluginCache; /***/ }), -/* 21 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Scenes.Events - */ - -module.exports = { - - BOOT: __webpack_require__(712), - CREATE: __webpack_require__(713), - DESTROY: __webpack_require__(714), - PAUSE: __webpack_require__(715), - POST_UPDATE: __webpack_require__(716), - PRE_UPDATE: __webpack_require__(717), - READY: __webpack_require__(718), - RENDER: __webpack_require__(719), - RESUME: __webpack_require__(720), - SHUTDOWN: __webpack_require__(721), - SLEEP: __webpack_require__(722), - START: __webpack_require__(723), - TRANSITION_COMPLETE: __webpack_require__(724), - TRANSITION_INIT: __webpack_require__(725), - TRANSITION_OUT: __webpack_require__(726), - TRANSITION_START: __webpack_require__(727), - TRANSITION_WAKE: __webpack_require__(728), - UPDATE: __webpack_require__(729), - WAKE: __webpack_require__(730) - -}; - - -/***/ }), -/* 22 */ +/* 23 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4660,23 +4693,23 @@ module.exports = FILE_CONST; /***/ }), -/* 23 */ +/* 24 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(22); -var Events = __webpack_require__(86); +var CONST = __webpack_require__(23); +var Events = __webpack_require__(87); var GetFastValue = __webpack_require__(1); -var GetURL = __webpack_require__(140); -var MergeXHRSettings = __webpack_require__(224); -var XHRLoader = __webpack_require__(459); -var XHRSettings = __webpack_require__(141); +var GetURL = __webpack_require__(143); +var MergeXHRSettings = __webpack_require__(227); +var XHRLoader = __webpack_require__(478); +var XHRSettings = __webpack_require__(144); /** * @classdesc @@ -5200,49 +5233,18 @@ File.revokeObjectURL = function (image) module.exports = File; -/***/ }), -/* 24 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Force a value within the boundaries by clamping it to the range `min`, `max`. - * - * @function Phaser.Math.Clamp - * @since 3.0.0 - * - * @param {number} value - The value to be clamped. - * @param {number} min - The minimum bounds. - * @param {number} max - The maximum bounds. - * - * @return {number} The clamped value. - */ -var Clamp = function (value, min, max) -{ - return Math.max(min, Math.min(max, value)); -}; - -module.exports = Clamp; - - /***/ }), /* 25 */ /***/ (function(module, exports, __webpack_require__) { /** -* The `Matter.Body` module contains methods for creating and manipulating body models. -* A `Matter.Body` is a rigid body that can be simulated by a `Matter.Engine`. -* Factories for commonly used body configurations (such as rectangles, circles and other polygons) can be found in the module `Matter.Bodies`. -* -* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). - -* @class Body -*/ + * The `Matter.Body` module contains methods for creating and manipulating body models. + * A `Matter.Body` is a rigid body that can be simulated by a `Matter.Engine`. + * Factories for commonly used body configurations (such as rectangles, circles and other polygons) can be found in the module `Matter.Bodies`. + * + * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). + * @class Body + */ var Body = {}; @@ -5250,10 +5252,10 @@ module.exports = Body; var Vertices = __webpack_require__(31); var Vector = __webpack_require__(37); -var Sleeping = __webpack_require__(112); -var Common = __webpack_require__(18); +var Sleeping = __webpack_require__(95); +var Common = __webpack_require__(19); var Bounds = __webpack_require__(38); -var Axes = __webpack_require__(230); +var Axes = __webpack_require__(146); (function() { @@ -5276,11 +5278,10 @@ var Axes = __webpack_require__(230); id: Common.nextId(), type: 'body', label: 'Body', - gameObject: null, parts: [], plugin: {}, angle: 0, - vertices: Vertices.fromPath('L 0 0 L 40 0 L 40 40 L 0 40'), + vertices: null, // Phaser change: no point calling fromPath if they pass in vertices anyway position: { x: 0, y: 0 }, force: { x: 0, y: 0 }, torque: 0, @@ -5295,8 +5296,6 @@ var Axes = __webpack_require__(230); isSensor: false, isStatic: false, isSleeping: false, - ignoreGravity: false, - ignorePointer: false, motion: 0, sleepThreshold: 60, density: 0.001, @@ -5311,18 +5310,6 @@ var Axes = __webpack_require__(230); }, slop: 0.05, timeScale: 1, - render: { - visible: true, - opacity: 1, - sprite: { - xScale: 1, - yScale: 1, - xOffset: 0, - yOffset: 0 - }, - lineWidth: 0 - }, - events: null, bounds: null, chamfer: null, @@ -5330,19 +5317,67 @@ var Axes = __webpack_require__(230); positionPrev: null, anglePrev: 0, parent: null, - axes: null, area: 0, mass: 0, + inverseMass: 0, inertia: 0, - - _original: null + inverseInertia: 0, + _original: null, + render: { + visible: true, + opacity: 1, + sprite: { + xOffset: 0, + yOffset: 0 + }, + fillColor: null, // custom Phaser property + fillOpacity: null, // custom Phaser property + lineColor: null, // custom Phaser property + lineOpacity: null, // custom Phaser property + lineThickness: null // custom Phaser property + }, + gameObject: null, // custom Phaser property + scale: { x: 1, y: 1 }, // custom Phaser property + centerOfMass: { x: 0, y: 0 }, // custom Phaser property (float, 0 - 1) + centerOffset: { x: 0, y: 0 }, // custom Phaser property (pixel values) + gravityScale: { x: 1, y: 1 }, // custom Phaser property + ignoreGravity: false, // custom Phaser property + ignorePointer: false, // custom Phaser property + onCollideCallback: null, // custom Phaser property + onCollideEndCallback: null, // custom Phaser property + onCollideActiveCallback: null, // custom Phaser property + onCollideWith: {} // custom Phaser property }; + if (!options.hasOwnProperty('position') && options.hasOwnProperty('vertices')) + { + options.position = Vertices.centre(options.vertices); + } + else if (!options.hasOwnProperty('vertices')) + { + defaults.vertices = Vertices.fromPath('L 0 0 L 40 0 L 40 40 L 0 40'); + } + var body = Common.extend(defaults, options); _initProperties(body, options); + // Helper function + body.setOnCollideWith = function (body, callback) + { + if (callback) + { + this.onCollideWith[body.id] = callback; + } + else + { + delete this.onCollideWith[body.id]; + } + + return this; + } + return body; }; @@ -5394,9 +5429,11 @@ var Axes = __webpack_require__(230); parent: body.parent || body }); + var bounds = body.bounds; + Vertices.rotate(body.vertices, body.angle, body.position); Axes.rotate(body.axes, body.angle); - Bounds.update(body.bounds, body.vertices, body.velocity); + Bounds.update(bounds, body.vertices, body.velocity); // allow options to override the automatically calculated properties Body.set(body, { @@ -5406,13 +5443,20 @@ var Axes = __webpack_require__(230); inertia: options.inertia || body.inertia }); - // render properties - var defaultFillStyle = (body.isStatic ? '#2e2b44' : Common.choose(['#006BA6', '#0496FF', '#FFBC42', '#D81159', '#8F2D56'])), - defaultStrokeStyle = '#000'; - body.render.fillStyle = body.render.fillStyle || defaultFillStyle; - body.render.strokeStyle = body.render.strokeStyle || defaultStrokeStyle; - body.render.sprite.xOffset += -(body.bounds.min.x - body.position.x) / (body.bounds.max.x - body.bounds.min.x); - body.render.sprite.yOffset += -(body.bounds.min.y - body.position.y) / (body.bounds.max.y - body.bounds.min.y); + if (body.parts.length === 1) + { + var centerOfMass = body.centerOfMass; + var centerOffset = body.centerOffset; + + var bodyWidth = bounds.max.x - bounds.min.x; + var bodyHeight = bounds.max.y - bounds.min.y; + + centerOfMass.x = -(bounds.min.x - body.position.x) / bodyWidth; + centerOfMass.y = -(bounds.min.y - body.position.y) / bodyHeight; + + centerOffset.x = bodyWidth * centerOfMass.x; + centerOffset.y = bodyHeight * centerOfMass.y; + } }; /** @@ -5433,8 +5477,7 @@ var Axes = __webpack_require__(230); } for (property in settings) { - - if (!settings.hasOwnProperty(property)) + if (!Object.prototype.hasOwnProperty.call(settings, property)) continue; value = settings[property]; @@ -5473,9 +5516,11 @@ var Axes = __webpack_require__(230); case 'parts': Body.setParts(body, value); break; + case 'centre': + Body.setCentre(body, value); + break; default: body[property] = value; - } } }; @@ -5556,7 +5601,7 @@ var Axes = __webpack_require__(230); }; /** - * Sets the moment of inertia (i.e. second moment of area) of the body of the body. + * Sets the moment of inertia (i.e. second moment of area) of the body. * Inverse inertia is automatically updated to reflect the change. Mass is not changed. * @method setInertia * @param {body} body @@ -5601,6 +5646,7 @@ var Axes = __webpack_require__(230); // update geometry Vertices.translate(body.vertices, body.position); + Bounds.update(body.bounds, body.vertices, body.velocity); }; @@ -5655,18 +5701,59 @@ var Axes = __webpack_require__(230); // sum the properties of all compound parts of the parent body var total = Body._totalProperties(body); + // Phaser addition + var cx = total.centre.x; + var cy = total.centre.y; + + var bounds = body.bounds; + var centerOfMass = body.centerOfMass; + var centerOffset = body.centerOffset; + + Bounds.update(bounds, body.vertices, body.velocity); + + centerOfMass.x = -(bounds.min.x - cx) / (bounds.max.x - bounds.min.x); + centerOfMass.y = -(bounds.min.y - cy) / (bounds.max.y - bounds.min.y); + + centerOffset.x = cx; + centerOffset.y = cy; + body.area = total.area; body.parent = body; - body.position.x = total.centre.x; - body.position.y = total.centre.y; - body.positionPrev.x = total.centre.x; - body.positionPrev.y = total.centre.y; + body.position.x = cx; + body.position.y = cy; + body.positionPrev.x = cx; + body.positionPrev.y = cy; Body.setMass(body, total.mass); Body.setInertia(body, total.inertia); Body.setPosition(body, total.centre); }; + /** + * Set the centre of mass of the body. + * The `centre` is a vector in world-space unless `relative` is set, in which case it is a translation. + * The centre of mass is the point the body rotates about and can be used to simulate non-uniform density. + * This is equal to moving `body.position` but not the `body.vertices`. + * Invalid if the `centre` falls outside the body's convex hull. + * @method setCentre + * @param {body} body + * @param {vector} centre + * @param {bool} relative + */ + Body.setCentre = function(body, centre, relative) { + if (!relative) { + body.positionPrev.x = centre.x - (body.position.x - body.positionPrev.x); + body.positionPrev.y = centre.y - (body.position.y - body.positionPrev.y); + body.position.x = centre.x; + body.position.y = centre.y; + } else { + body.positionPrev.x += centre.x; + body.positionPrev.y += centre.y; + body.position.x += centre.x; + body.position.y += centre.y; + } + }; + /** * Sets the position of the body instantly. Velocity, angle, force etc. are unchanged. * @method setPosition @@ -5704,7 +5791,6 @@ var Axes = __webpack_require__(230); Axes.rotate(part.axes, delta); Bounds.update(part.bounds, part.vertices, body.velocity); if (i > 0) { - part.angle += body.angularVelocity; Vector.rotateAbout(part.position, delta, body.position, part.position); } } @@ -5788,6 +5874,9 @@ var Axes = __webpack_require__(230); for (var i = 0; i < body.parts.length; i++) { var part = body.parts[i]; + part.scale.x = scaleX; + part.scale.y = scaleY; + // scale vertices Vertices.scale(part.vertices, scaleX, scaleY, point); @@ -6057,6 +6146,14 @@ var Axes = __webpack_require__(230); * @default { x: 0, y: 0 } */ + /** + * A `Vector` that holds the current scale values as set by `Body.setScale`. + * + * @property scale + * @type vector + * @default { x: 1, y: 1 } + */ + /** * A `Vector` that specifies the force to apply in the current step. It is zeroed after every `Body.update`. See also `Body.applyForce`. * @@ -6353,29 +6450,6 @@ var Axes = __webpack_require__(230); * @type object */ - /** - * An `String` that defines the path to the image to use as the sprite texture, if any. - * - * @property render.sprite.texture - * @type string - */ - - /** - * A `Number` that defines the scaling in the x-axis for the sprite, if any. - * - * @property render.sprite.xScale - * @type number - * @default 1 - */ - - /** - * A `Number` that defines the scaling in the y-axis for the sprite, if any. - * - * @property render.sprite.yScale - * @type number - * @default 1 - */ - /** * A `Number` that defines the offset in the x-axis for the sprite (normalised by texture width). * @@ -6393,30 +6467,38 @@ var Axes = __webpack_require__(230); */ /** - * A `Number` that defines the line width to use when rendering the body outline (if a sprite is not defined). - * A value of `0` means no outline will be rendered. + * A hex color value that defines the fill color to use when rendering the body. * - * @property render.lineWidth + * @property render.fillColor * @type number - * @default 0 */ /** - * A `String` that defines the fill style to use when rendering the body (if a sprite is not defined). - * It is the same as when using a canvas, so it accepts CSS style property values. + * A value that defines the fill opacity to use when rendering the body. * - * @property render.fillStyle - * @type string - * @default a random colour + * @property render.fillOpacity + * @type number + */ + + /** + * A hex color value that defines the line color to use when rendering the body. + * + * @property render.lineColor + * @type number */ /** - * A `String` that defines the stroke style to use when rendering the body outline (if a sprite is not defined). - * It is the same as when using a canvas, so it accepts CSS style property values. + * A value that defines the line opacity to use when rendering the body. * - * @property render.strokeStyle - * @type string - * @default a random colour + * @property render.lineOpacity + * @type number + */ + + /** + * A `Number` that defines the line width to use when rendering the body outline. + * + * @property render.lineThickness + * @type number */ /** @@ -6444,6 +6526,92 @@ var Axes = __webpack_require__(230); * @type bounds */ + /** + * A reference to the Phaser Game Object this body belongs to, if any. + * + * @property gameObject + * @type Phaser.GameObjects.GameObject + */ + + /** + * The center of mass of the Body. + * + * @property centerOfMass + * @type vector + * @default { x: 0, y: 0 } + */ + + /** + * The center of the body in pixel values. + * Used by Phaser for texture aligment. + * + * @property centerOffset + * @type vector + * @default { x: 0, y: 0 } + */ + + /** + * Will this Body ignore World gravity during the Engine update? + * + * @property ignoreGravity + * @type boolean + * @default false + */ + + /** + * Scale the influence of World gravity when applied to this body. + * + * @property gravityScale + * @type vector + * @default { x: 1, y: 1 } + */ + + /** + * Will this Body ignore Phaser Pointer input events? + * + * @property ignorePointer + * @type boolean + * @default false + */ + + /** + * A callback that is invoked when this Body starts colliding with any other Body. + * + * You can register callbacks by providing a function of type `( pair: Matter.Pair) => void`. + * + * @property onCollideCallback + * @type function + * @default null + */ + + /** + * A callback that is invoked when this Body stops colliding with any other Body. + * + * You can register callbacks by providing a function of type `( pair: Matter.Pair) => void`. + * + * @property onCollideEndCallback + * @type function + * @default null + */ + + /** + * A callback that is invoked for the duration that this Body is colliding with any other Body. + * + * You can register callbacks by providing a function of type `( pair: Matter.Pair) => void`. + * + * @property onCollideActiveCallback + * @type function + * @default null + */ + + /** + * A collision callback dictionary used by the `Body.setOnCollideWith` function. + * + * @property onCollideWith + * @type object + * @default null + */ + })(); @@ -6453,7 +6621,7 @@ var Axes = __webpack_require__(230); /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -6537,7 +6705,7 @@ module.exports = GetTilesWithin; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -6604,12 +6772,12 @@ module.exports = PropertyValueSet; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var CONST = __webpack_require__(32); -var Smoothing = __webpack_require__(173); +var Smoothing = __webpack_require__(177); // The pool into which the canvas elements are placed. var pool = []; @@ -6865,7 +7033,7 @@ module.exports = CanvasPool(); /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -6953,11 +7121,11 @@ module.exports = SetTransform; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlendModes = __webpack_require__(42); +var BlendModes = __webpack_require__(43); var GetAdvancedValue = __webpack_require__(15); /** @@ -7094,7 +7262,7 @@ var Vertices = {}; module.exports = Vertices; var Vector = __webpack_require__(37); -var Common = __webpack_require__(18); +var Common = __webpack_require__(19); (function() { @@ -7126,7 +7294,8 @@ var Common = __webpack_require__(18); index: i, body: body, isInternal: false, - contact: null + contact: null, + offset: null }; vertex.contact = { @@ -7151,7 +7320,7 @@ var Common = __webpack_require__(18); * @return {vertices} vertices */ Vertices.fromPath = function(path, body) { - var pathPattern = /L?\s*([\-\d\.e]+)[\s,]*([\-\d\.e]+)*/ig, + var pathPattern = /L?\s*([-\d.e]+)[\s,]*([-\d.e]+)*/ig, points = []; path.replace(pathPattern, function(match, x, y) { @@ -7541,7 +7710,7 @@ var Common = __webpack_require__(18); /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7561,11 +7730,11 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.21.0', + VERSION: '3.22.0', - BlendModes: __webpack_require__(42), + BlendModes: __webpack_require__(43), - ScaleModes: __webpack_require__(152), + ScaleModes: __webpack_require__(157), /** * AUTO Detect Renderer. @@ -7679,14 +7848,14 @@ module.exports = CONST; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var Line = __webpack_require__(60); +var Line = __webpack_require__(61); /** * @classdesc @@ -7699,7 +7868,7 @@ var Line = __webpack_require__(60); * @constructor * @since 3.13.0 * - * @extends Phaser.GameObjects.Components.Alpha + * @extends Phaser.GameObjects.Components.AlphaSingle * @extends Phaser.GameObjects.Components.BlendMode * @extends Phaser.GameObjects.Components.ComputedSize * @extends Phaser.GameObjects.Components.Depth @@ -7720,7 +7889,7 @@ var Shape = new Class({ Extends: GameObject, Mixins: [ - Components.Alpha, + Components.AlphaSingle, Components.BlendMode, Components.ComputedSize, Components.Depth, @@ -7979,7 +8148,7 @@ module.exports = Shape; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8034,7 +8203,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9002,15 +9171,15 @@ module.exports = TransformMatrix; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var GetColor = __webpack_require__(171); -var GetColor32 = __webpack_require__(295); -var HSVToRGB = __webpack_require__(172); -var RGBToHSV = __webpack_require__(296); +var GetColor = __webpack_require__(175); +var GetColor32 = __webpack_require__(314); +var HSVToRGB = __webpack_require__(176); +var RGBToHSV = __webpack_require__(315); /** * @namespace Phaser.Display.Color @@ -10235,7 +10404,7 @@ module.exports = Bounds; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10302,7 +10471,7 @@ module.exports = PropertyValueInc; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10332,7 +10501,7 @@ module.exports = DegToRad; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10365,11 +10534,369 @@ module.exports = FillStyleCanvas; /***/ }), /* 42 */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* The `Matter.Bodies` module contains factory methods for creating rigid body models +* with commonly used body configurations (such as rectangles, circles and other polygons). +* +* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). +* +* @class Bodies +*/ + +// TODO: true circle bodies + +var Bodies = {}; + +module.exports = Bodies; + +var Vertices = __webpack_require__(31); +var Common = __webpack_require__(19); +var Body = __webpack_require__(25); +var Bounds = __webpack_require__(38); +var Vector = __webpack_require__(37); +var decomp = __webpack_require__(505); + +(function() { + + /** + * Creates a new rigid body model with a rectangle hull. + * The options parameter is an object that specifies any properties you wish to override the defaults. + * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. + * @method rectangle + * @param {number} x + * @param {number} y + * @param {number} width + * @param {number} height + * @param {object} [options] + * @return {body} A new rectangle body + */ + Bodies.rectangle = function(x, y, width, height, options) { + options = options || {}; + + var rectangle = { + label: 'Rectangle Body', + position: { x: x, y: y }, + vertices: Vertices.fromPath('L 0 0 L ' + width + ' 0 L ' + width + ' ' + height + ' L 0 ' + height) + }; + + if (options.chamfer) { + var chamfer = options.chamfer; + rectangle.vertices = Vertices.chamfer(rectangle.vertices, chamfer.radius, + chamfer.quality, chamfer.qualityMin, chamfer.qualityMax); + delete options.chamfer; + } + + return Body.create(Common.extend({}, rectangle, options)); + }; + + /** + * Creates a new rigid body model with a trapezoid hull. + * The options parameter is an object that specifies any properties you wish to override the defaults. + * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. + * @method trapezoid + * @param {number} x + * @param {number} y + * @param {number} width + * @param {number} height + * @param {number} slope + * @param {object} [options] + * @return {body} A new trapezoid body + */ + Bodies.trapezoid = function(x, y, width, height, slope, options) { + options = options || {}; + + slope *= 0.5; + var roof = (1 - (slope * 2)) * width; + + var x1 = width * slope, + x2 = x1 + roof, + x3 = x2 + x1, + verticesPath; + + if (slope < 0.5) { + verticesPath = 'L 0 0 L ' + x1 + ' ' + (-height) + ' L ' + x2 + ' ' + (-height) + ' L ' + x3 + ' 0'; + } else { + verticesPath = 'L 0 0 L ' + x2 + ' ' + (-height) + ' L ' + x3 + ' 0'; + } + + var trapezoid = { + label: 'Trapezoid Body', + position: { x: x, y: y }, + vertices: Vertices.fromPath(verticesPath) + }; + + if (options.chamfer) { + var chamfer = options.chamfer; + trapezoid.vertices = Vertices.chamfer(trapezoid.vertices, chamfer.radius, + chamfer.quality, chamfer.qualityMin, chamfer.qualityMax); + delete options.chamfer; + } + + return Body.create(Common.extend({}, trapezoid, options)); + }; + + /** + * Creates a new rigid body model with a circle hull. + * The options parameter is an object that specifies any properties you wish to override the defaults. + * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. + * @method circle + * @param {number} x + * @param {number} y + * @param {number} radius + * @param {object} [options] + * @param {number} [maxSides] + * @return {body} A new circle body + */ + Bodies.circle = function(x, y, radius, options, maxSides) { + options = options || {}; + + var circle = { + label: 'Circle Body', + circleRadius: radius + }; + + // approximate circles with polygons until true circles implemented in SAT + maxSides = maxSides || 25; + var sides = Math.ceil(Math.max(10, Math.min(maxSides, radius))); + + // optimisation: always use even number of sides (half the number of unique axes) + if (sides % 2 === 1) + sides += 1; + + return Bodies.polygon(x, y, sides, radius, Common.extend({}, circle, options)); + }; + + /** + * Creates a new rigid body model with a regular polygon hull with the given number of sides. + * The options parameter is an object that specifies any properties you wish to override the defaults. + * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. + * @method polygon + * @param {number} x + * @param {number} y + * @param {number} sides + * @param {number} radius + * @param {object} [options] + * @return {body} A new regular polygon body + */ + Bodies.polygon = function(x, y, sides, radius, options) { + options = options || {}; + + if (sides < 3) + return Bodies.circle(x, y, radius, options); + + var theta = 2 * Math.PI / sides, + path = '', + offset = theta * 0.5; + + for (var i = 0; i < sides; i += 1) { + var angle = offset + (i * theta), + xx = Math.cos(angle) * radius, + yy = Math.sin(angle) * radius; + + path += 'L ' + xx.toFixed(3) + ' ' + yy.toFixed(3) + ' '; + } + + var polygon = { + label: 'Polygon Body', + position: { x: x, y: y }, + vertices: Vertices.fromPath(path) + }; + + if (options.chamfer) { + var chamfer = options.chamfer; + polygon.vertices = Vertices.chamfer(polygon.vertices, chamfer.radius, + chamfer.quality, chamfer.qualityMin, chamfer.qualityMax); + delete options.chamfer; + } + + return Body.create(Common.extend({}, polygon, options)); + }; + + /** + * Creates a body using the supplied vertices (or an array containing multiple sets of vertices). + * If the vertices are convex, they will pass through as supplied. + * Otherwise if the vertices are concave, they will be decomposed if [poly-decomp.js](https://github.com/schteppe/poly-decomp.js) is available. + * Note that this process is not guaranteed to support complex sets of vertices (e.g. those with holes may fail). + * By default the decomposition will discard collinear edges (to improve performance). + * It can also optionally discard any parts that have an area less than `minimumArea`. + * If the vertices can not be decomposed, the result will fall back to using the convex hull. + * The options parameter is an object that specifies any `Matter.Body` properties you wish to override the defaults. + * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. + * @method fromVertices + * @param {number} x + * @param {number} y + * @param [[vector]] vertexSets + * @param {object} [options] + * @param {bool} [flagInternal=false] + * @param {number} [removeCollinear=0.01] + * @param {number} [minimumArea=10] + * @return {body} + */ + Bodies.fromVertices = function(x, y, vertexSets, options, flagInternal, removeCollinear, minimumArea) { + var body, + parts, + isConvex, + vertices, + i, + j, + k, + v, + z; + + options = options || {}; + parts = []; + + flagInternal = typeof flagInternal !== 'undefined' ? flagInternal : false; + removeCollinear = typeof removeCollinear !== 'undefined' ? removeCollinear : 0.01; + minimumArea = typeof minimumArea !== 'undefined' ? minimumArea : 10; + + if (!decomp) { + Common.warn('Bodies.fromVertices: poly-decomp.js required. Could not decompose vertices. Fallback to convex hull.'); + } + + // ensure vertexSets is an array of arrays + if (!Common.isArray(vertexSets[0])) { + vertexSets = [vertexSets]; + } + + for (v = 0; v < vertexSets.length; v += 1) { + vertices = vertexSets[v]; + isConvex = Vertices.isConvex(vertices); + + if (isConvex || !decomp) { + if (isConvex) { + vertices = Vertices.clockwiseSort(vertices); + } else { + // fallback to convex hull when decomposition is not possible + vertices = Vertices.hull(vertices); + } + + parts.push({ + position: { x: x, y: y }, + vertices: vertices + }); + } else { + // initialise a decomposition + var concave = vertices.map(function(vertex) { + return [vertex.x, vertex.y]; + }); + + // vertices are concave and simple, we can decompose into parts + decomp.makeCCW(concave); + if (removeCollinear !== false) + decomp.removeCollinearPoints(concave, removeCollinear); + + // use the quick decomposition algorithm (Bayazit) + var decomposed = decomp.quickDecomp(concave); + + // for each decomposed chunk + for (i = 0; i < decomposed.length; i++) { + var chunk = decomposed[i]; + + // convert vertices into the correct structure + var chunkVertices = chunk.map(function(vertices) { + return { + x: vertices[0], + y: vertices[1] + }; + }); + + // skip small chunks + if (minimumArea > 0 && Vertices.area(chunkVertices) < minimumArea) + continue; + + // create a compound part + parts.push({ + position: Vertices.centre(chunkVertices), + vertices: chunkVertices + }); + } + } + } + + // create body parts + for (i = 0; i < parts.length; i++) { + parts[i] = Body.create(Common.extend(parts[i], options)); + } + + if (flagInternal) + { + Bodies.flagCoincidentParts(parts, 5); + } + + if (parts.length > 1) { + // create the parent body to be returned, that contains generated compound parts + body = Body.create(Common.extend({ parts: parts.slice(0) }, options)); + Body.setPosition(body, { x: x, y: y }); + + return body; + } else { + return parts[0]; + } + }; + + /** + * Takes an array of Body objects and flags all internal edges (coincident parts) based on the maxDistance + * value. The array is changed in-place and returned, so you can pass this function a `Body.parts` property. + * + * @method flagCoincidentParts + * @param {body[]} parts - The Body parts, or array of bodies, to flag. + * @param {number} [maxDistance=5] + * @return {body[]} The modified `parts` parameter. + */ + Bodies.flagCoincidentParts = function (parts, maxDistance) + { + if (maxDistance === undefined) { maxDistance = 5; } + + for (var i = 0; i < parts.length; i++) + { + var partA = parts[i]; + + for (var j = i + 1; j < parts.length; j++) + { + var partB = parts[j]; + + if (Bounds.overlaps(partA.bounds, partB.bounds)) + { + var pav = partA.vertices; + var pbv = partB.vertices; + + // iterate vertices of both parts + for (var k = 0; k < partA.vertices.length; k++) + { + for (var z = 0; z < partB.vertices.length; z++) + { + // find distances between the vertices + var da = Vector.magnitudeSquared(Vector.sub(pav[(k + 1) % pav.length], pbv[z])); + var db = Vector.magnitudeSquared(Vector.sub(pav[k], pbv[(z + 1) % pbv.length])); + + // if both vertices are very close, consider the edge concident (internal) + if (da < maxDistance && db < maxDistance) + { + pav[k].isInternal = true; + pbv[z].isInternal = true; + } + } + } + } + } + } + + return parts; + }; + +})(); + + +/***/ }), +/* 43 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10703,12 +11230,12 @@ module.exports = { /***/ }), -/* 43 */ +/* 44 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10730,196 +11257,13 @@ var GetBottom = function (gameObject) module.exports = GetBottom; -/***/ }), -/* 44 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Positions the Game Object so that the bottom of its bounds aligns with the given coordinate. - * - * @function Phaser.Display.Bounds.SetBottom - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned. - * @param {number} value - The coordinate to position the Game Object bounds on. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned. - */ -var SetBottom = function (gameObject, value) -{ - gameObject.y = (value - gameObject.height) + (gameObject.height * gameObject.originY); - - return gameObject; -}; - -module.exports = SetBottom; - - /***/ }), /* 45 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Returns the left coordinate from the bounds of the Game Object. - * - * @function Phaser.Display.Bounds.GetLeft - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from. - * - * @return {number} The left coordinate of the bounds of the Game Object. - */ -var GetLeft = function (gameObject) -{ - return gameObject.x - (gameObject.width * gameObject.originX); -}; - -module.exports = GetLeft; - - -/***/ }), -/* 46 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Positions the Game Object so that the left of its bounds aligns with the given coordinate. - * - * @function Phaser.Display.Bounds.SetLeft - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned. - * @param {number} value - The coordinate to position the Game Object bounds on. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned. - */ -var SetLeft = function (gameObject, value) -{ - gameObject.x = value + (gameObject.width * gameObject.originX); - - return gameObject; -}; - -module.exports = SetLeft; - - -/***/ }), -/* 47 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Returns the right coordinate from the bounds of the Game Object. - * - * @function Phaser.Display.Bounds.GetRight - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from. - * - * @return {number} The right coordinate of the bounds of the Game Object. - */ -var GetRight = function (gameObject) -{ - return (gameObject.x + gameObject.width) - (gameObject.width * gameObject.originX); -}; - -module.exports = GetRight; - - -/***/ }), -/* 48 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Positions the Game Object so that the left of its bounds aligns with the given coordinate. - * - * @function Phaser.Display.Bounds.SetRight - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned. - * @param {number} value - The coordinate to position the Game Object bounds on. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned. - */ -var SetRight = function (gameObject, value) -{ - gameObject.x = (value - gameObject.width) + (gameObject.width * gameObject.originX); - - return gameObject; -}; - -module.exports = SetRight; - - -/***/ }), -/* 49 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Returns the top coordinate from the bounds of the Game Object. - * - * @function Phaser.Display.Bounds.GetTop - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from. - * - * @return {number} The top coordinate of the bounds of the Game Object. - */ -var GetTop = function (gameObject) -{ - return gameObject.y - (gameObject.height * gameObject.originY); -}; - -module.exports = GetTop; - - -/***/ }), -/* 50 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10946,13 +11290,196 @@ var SetTop = function (gameObject, value) module.exports = SetTop; +/***/ }), +/* 46 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Returns the left coordinate from the bounds of the Game Object. + * + * @function Phaser.Display.Bounds.GetLeft + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from. + * + * @return {number} The left coordinate of the bounds of the Game Object. + */ +var GetLeft = function (gameObject) +{ + return gameObject.x - (gameObject.width * gameObject.originX); +}; + +module.exports = GetLeft; + + +/***/ }), +/* 47 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Positions the Game Object so that the left of its bounds aligns with the given coordinate. + * + * @function Phaser.Display.Bounds.SetLeft + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned. + * @param {number} value - The coordinate to position the Game Object bounds on. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned. + */ +var SetLeft = function (gameObject, value) +{ + gameObject.x = value + (gameObject.width * gameObject.originX); + + return gameObject; +}; + +module.exports = SetLeft; + + +/***/ }), +/* 48 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Returns the right coordinate from the bounds of the Game Object. + * + * @function Phaser.Display.Bounds.GetRight + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from. + * + * @return {number} The right coordinate of the bounds of the Game Object. + */ +var GetRight = function (gameObject) +{ + return (gameObject.x + gameObject.width) - (gameObject.width * gameObject.originX); +}; + +module.exports = GetRight; + + +/***/ }), +/* 49 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Positions the Game Object so that the left of its bounds aligns with the given coordinate. + * + * @function Phaser.Display.Bounds.SetRight + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned. + * @param {number} value - The coordinate to position the Game Object bounds on. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned. + */ +var SetRight = function (gameObject, value) +{ + gameObject.x = (value - gameObject.width) + (gameObject.width * gameObject.originX); + + return gameObject; +}; + +module.exports = SetRight; + + +/***/ }), +/* 50 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Positions the Game Object so that the bottom of its bounds aligns with the given coordinate. + * + * @function Phaser.Display.Bounds.SetBottom + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned. + * @param {number} value - The coordinate to position the Game Object bounds on. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned. + */ +var SetBottom = function (gameObject, value) +{ + gameObject.y = (value - gameObject.height) + (gameObject.height * gameObject.originY); + + return gameObject; +}; + +module.exports = SetBottom; + + /***/ }), /* 51 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Returns the top coordinate from the bounds of the Game Object. + * + * @function Phaser.Display.Bounds.GetTop + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from. + * + * @return {number} The top coordinate of the bounds of the Game Object. + */ +var GetTop = function (gameObject) +{ + return gameObject.y - (gameObject.height * gameObject.originY); +}; + +module.exports = GetTop; + + +/***/ }), +/* 52 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11027,12 +11554,12 @@ module.exports = GEOM_CONST; /***/ }), -/* 52 */ +/* 53 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11062,12 +11589,46 @@ module.exports = Contains; /***/ }), -/* 53 */ +/* 54 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the distance between two sets of coordinates (points). + * + * @function Phaser.Math.Distance.Between + * @since 3.0.0 + * + * @param {number} x1 - The x coordinate of the first point. + * @param {number} y1 - The y coordinate of the first point. + * @param {number} x2 - The x coordinate of the second point. + * @param {number} y2 - The y coordinate of the second point. + * + * @return {number} The distance between each point. + */ +var DistanceBetween = function (x1, y1, x2, y2) +{ + var dx = x1 - x2; + var dy = y1 - y2; + + return Math.sqrt(dx * dx + dy * dy); +}; + +module.exports = DistanceBetween; + + +/***/ }), +/* 55 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11077,32 +11638,32 @@ module.exports = Contains; module.exports = { - DESTROY: __webpack_require__(653), - FADE_IN_COMPLETE: __webpack_require__(654), - FADE_IN_START: __webpack_require__(655), - FADE_OUT_COMPLETE: __webpack_require__(656), - FADE_OUT_START: __webpack_require__(657), - FLASH_COMPLETE: __webpack_require__(658), - FLASH_START: __webpack_require__(659), - PAN_COMPLETE: __webpack_require__(660), - PAN_START: __webpack_require__(661), - POST_RENDER: __webpack_require__(662), - PRE_RENDER: __webpack_require__(663), - SHAKE_COMPLETE: __webpack_require__(664), - SHAKE_START: __webpack_require__(665), - ZOOM_COMPLETE: __webpack_require__(666), - ZOOM_START: __webpack_require__(667) + DESTROY: __webpack_require__(673), + FADE_IN_COMPLETE: __webpack_require__(674), + FADE_IN_START: __webpack_require__(675), + FADE_OUT_COMPLETE: __webpack_require__(676), + FADE_OUT_START: __webpack_require__(677), + FLASH_COMPLETE: __webpack_require__(678), + FLASH_START: __webpack_require__(679), + PAN_COMPLETE: __webpack_require__(680), + PAN_START: __webpack_require__(681), + POST_RENDER: __webpack_require__(682), + PRE_RENDER: __webpack_require__(683), + SHAKE_COMPLETE: __webpack_require__(684), + SHAKE_START: __webpack_require__(685), + ZOOM_COMPLETE: __webpack_require__(686), + ZOOM_START: __webpack_require__(687) }; /***/ }), -/* 54 */ +/* 56 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11112,63 +11673,63 @@ module.exports = { module.exports = { - BOOT: __webpack_require__(834), - DESTROY: __webpack_require__(835), - DRAG_END: __webpack_require__(836), - DRAG_ENTER: __webpack_require__(837), - DRAG: __webpack_require__(838), - DRAG_LEAVE: __webpack_require__(839), - DRAG_OVER: __webpack_require__(840), - DRAG_START: __webpack_require__(841), - DROP: __webpack_require__(842), - GAME_OUT: __webpack_require__(843), - GAME_OVER: __webpack_require__(844), - GAMEOBJECT_DOWN: __webpack_require__(845), - GAMEOBJECT_DRAG_END: __webpack_require__(846), - GAMEOBJECT_DRAG_ENTER: __webpack_require__(847), - GAMEOBJECT_DRAG: __webpack_require__(848), - GAMEOBJECT_DRAG_LEAVE: __webpack_require__(849), - GAMEOBJECT_DRAG_OVER: __webpack_require__(850), - GAMEOBJECT_DRAG_START: __webpack_require__(851), - GAMEOBJECT_DROP: __webpack_require__(852), - GAMEOBJECT_MOVE: __webpack_require__(853), - GAMEOBJECT_OUT: __webpack_require__(854), - GAMEOBJECT_OVER: __webpack_require__(855), - GAMEOBJECT_POINTER_DOWN: __webpack_require__(856), - GAMEOBJECT_POINTER_MOVE: __webpack_require__(857), - GAMEOBJECT_POINTER_OUT: __webpack_require__(858), - GAMEOBJECT_POINTER_OVER: __webpack_require__(859), - GAMEOBJECT_POINTER_UP: __webpack_require__(860), - GAMEOBJECT_POINTER_WHEEL: __webpack_require__(861), - GAMEOBJECT_UP: __webpack_require__(862), - GAMEOBJECT_WHEEL: __webpack_require__(863), - MANAGER_BOOT: __webpack_require__(864), - MANAGER_PROCESS: __webpack_require__(865), - MANAGER_UPDATE: __webpack_require__(866), - POINTER_DOWN: __webpack_require__(867), - POINTER_DOWN_OUTSIDE: __webpack_require__(868), - POINTER_MOVE: __webpack_require__(869), - POINTER_OUT: __webpack_require__(870), - POINTER_OVER: __webpack_require__(871), - POINTER_UP: __webpack_require__(872), - POINTER_UP_OUTSIDE: __webpack_require__(873), - POINTER_WHEEL: __webpack_require__(874), - POINTERLOCK_CHANGE: __webpack_require__(875), - PRE_UPDATE: __webpack_require__(876), - SHUTDOWN: __webpack_require__(877), - START: __webpack_require__(878), - UPDATE: __webpack_require__(879) + BOOT: __webpack_require__(846), + DESTROY: __webpack_require__(847), + DRAG_END: __webpack_require__(848), + DRAG_ENTER: __webpack_require__(849), + DRAG: __webpack_require__(850), + DRAG_LEAVE: __webpack_require__(851), + DRAG_OVER: __webpack_require__(852), + DRAG_START: __webpack_require__(853), + DROP: __webpack_require__(854), + GAME_OUT: __webpack_require__(855), + GAME_OVER: __webpack_require__(856), + GAMEOBJECT_DOWN: __webpack_require__(857), + GAMEOBJECT_DRAG_END: __webpack_require__(858), + GAMEOBJECT_DRAG_ENTER: __webpack_require__(859), + GAMEOBJECT_DRAG: __webpack_require__(860), + GAMEOBJECT_DRAG_LEAVE: __webpack_require__(861), + GAMEOBJECT_DRAG_OVER: __webpack_require__(862), + GAMEOBJECT_DRAG_START: __webpack_require__(863), + GAMEOBJECT_DROP: __webpack_require__(864), + GAMEOBJECT_MOVE: __webpack_require__(865), + GAMEOBJECT_OUT: __webpack_require__(866), + GAMEOBJECT_OVER: __webpack_require__(867), + GAMEOBJECT_POINTER_DOWN: __webpack_require__(868), + GAMEOBJECT_POINTER_MOVE: __webpack_require__(869), + GAMEOBJECT_POINTER_OUT: __webpack_require__(870), + GAMEOBJECT_POINTER_OVER: __webpack_require__(871), + GAMEOBJECT_POINTER_UP: __webpack_require__(872), + GAMEOBJECT_POINTER_WHEEL: __webpack_require__(873), + GAMEOBJECT_UP: __webpack_require__(874), + GAMEOBJECT_WHEEL: __webpack_require__(875), + MANAGER_BOOT: __webpack_require__(876), + MANAGER_PROCESS: __webpack_require__(877), + MANAGER_UPDATE: __webpack_require__(878), + POINTER_DOWN: __webpack_require__(879), + POINTER_DOWN_OUTSIDE: __webpack_require__(880), + POINTER_MOVE: __webpack_require__(881), + POINTER_OUT: __webpack_require__(882), + POINTER_OVER: __webpack_require__(883), + POINTER_UP: __webpack_require__(884), + POINTER_UP_OUTSIDE: __webpack_require__(885), + POINTER_WHEEL: __webpack_require__(886), + POINTERLOCK_CHANGE: __webpack_require__(887), + PRE_UPDATE: __webpack_require__(888), + SHUTDOWN: __webpack_require__(889), + START: __webpack_require__(890), + UPDATE: __webpack_require__(891) }; /***/ }), -/* 55 */ +/* 57 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11201,12 +11762,12 @@ module.exports = LineStyleCanvas; /***/ }), -/* 56 */ +/* 58 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11330,353 +11891,16 @@ module.exports = CONST; /***/ }), -/* 57 */ -/***/ (function(module, exports, __webpack_require__) { - -/** -* The `Matter.Bodies` module contains factory methods for creating rigid body models -* with commonly used body configurations (such as rectangles, circles and other polygons). -* -* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). -* -* @class Bodies -*/ - -// TODO: true circle bodies - -var Bodies = {}; - -module.exports = Bodies; - -var Vertices = __webpack_require__(31); -var Common = __webpack_require__(18); -var Body = __webpack_require__(25); -var Bounds = __webpack_require__(38); -var Vector = __webpack_require__(37); -var decomp = __webpack_require__(485); - -(function() { - - /** - * Creates a new rigid body model with a rectangle hull. - * The options parameter is an object that specifies any properties you wish to override the defaults. - * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. - * @method rectangle - * @param {number} x - * @param {number} y - * @param {number} width - * @param {number} height - * @param {object} [options] - * @return {body} A new rectangle body - */ - Bodies.rectangle = function(x, y, width, height, options) { - options = options || {}; - - var rectangle = { - label: 'Rectangle Body', - position: { x: x, y: y }, - vertices: Vertices.fromPath('L 0 0 L ' + width + ' 0 L ' + width + ' ' + height + ' L 0 ' + height) - }; - - if (options.chamfer) { - var chamfer = options.chamfer; - rectangle.vertices = Vertices.chamfer(rectangle.vertices, chamfer.radius, - chamfer.quality, chamfer.qualityMin, chamfer.qualityMax); - delete options.chamfer; - } - - return Body.create(Common.extend({}, rectangle, options)); - }; - - /** - * Creates a new rigid body model with a trapezoid hull. - * The options parameter is an object that specifies any properties you wish to override the defaults. - * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. - * @method trapezoid - * @param {number} x - * @param {number} y - * @param {number} width - * @param {number} height - * @param {number} slope - * @param {object} [options] - * @return {body} A new trapezoid body - */ - Bodies.trapezoid = function(x, y, width, height, slope, options) { - options = options || {}; - - slope *= 0.5; - var roof = (1 - (slope * 2)) * width; - - var x1 = width * slope, - x2 = x1 + roof, - x3 = x2 + x1, - verticesPath; - - if (slope < 0.5) { - verticesPath = 'L 0 0 L ' + x1 + ' ' + (-height) + ' L ' + x2 + ' ' + (-height) + ' L ' + x3 + ' 0'; - } else { - verticesPath = 'L 0 0 L ' + x2 + ' ' + (-height) + ' L ' + x3 + ' 0'; - } - - var trapezoid = { - label: 'Trapezoid Body', - position: { x: x, y: y }, - vertices: Vertices.fromPath(verticesPath) - }; - - if (options.chamfer) { - var chamfer = options.chamfer; - trapezoid.vertices = Vertices.chamfer(trapezoid.vertices, chamfer.radius, - chamfer.quality, chamfer.qualityMin, chamfer.qualityMax); - delete options.chamfer; - } - - return Body.create(Common.extend({}, trapezoid, options)); - }; - - /** - * Creates a new rigid body model with a circle hull. - * The options parameter is an object that specifies any properties you wish to override the defaults. - * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. - * @method circle - * @param {number} x - * @param {number} y - * @param {number} radius - * @param {object} [options] - * @param {number} [maxSides] - * @return {body} A new circle body - */ - Bodies.circle = function(x, y, radius, options, maxSides) { - options = options || {}; - - var circle = { - label: 'Circle Body', - circleRadius: radius - }; - - // approximate circles with polygons until true circles implemented in SAT - maxSides = maxSides || 25; - var sides = Math.ceil(Math.max(10, Math.min(maxSides, radius))); - - // optimisation: always use even number of sides (half the number of unique axes) - if (sides % 2 === 1) - sides += 1; - - return Bodies.polygon(x, y, sides, radius, Common.extend({}, circle, options)); - }; - - /** - * Creates a new rigid body model with a regular polygon hull with the given number of sides. - * The options parameter is an object that specifies any properties you wish to override the defaults. - * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. - * @method polygon - * @param {number} x - * @param {number} y - * @param {number} sides - * @param {number} radius - * @param {object} [options] - * @return {body} A new regular polygon body - */ - Bodies.polygon = function(x, y, sides, radius, options) { - options = options || {}; - - if (sides < 3) - return Bodies.circle(x, y, radius, options); - - var theta = 2 * Math.PI / sides, - path = '', - offset = theta * 0.5; - - for (var i = 0; i < sides; i += 1) { - var angle = offset + (i * theta), - xx = Math.cos(angle) * radius, - yy = Math.sin(angle) * radius; - - path += 'L ' + xx.toFixed(3) + ' ' + yy.toFixed(3) + ' '; - } - - var polygon = { - label: 'Polygon Body', - position: { x: x, y: y }, - vertices: Vertices.fromPath(path) - }; - - if (options.chamfer) { - var chamfer = options.chamfer; - polygon.vertices = Vertices.chamfer(polygon.vertices, chamfer.radius, - chamfer.quality, chamfer.qualityMin, chamfer.qualityMax); - delete options.chamfer; - } - - return Body.create(Common.extend({}, polygon, options)); - }; - - /** - * Creates a body using the supplied vertices (or an array containing multiple sets of vertices). - * If the vertices are convex, they will pass through as supplied. - * Otherwise if the vertices are concave, they will be decomposed if [poly-decomp.js](https://github.com/schteppe/poly-decomp.js) is available. - * Note that this process is not guaranteed to support complex sets of vertices (e.g. those with holes may fail). - * By default the decomposition will discard collinear edges (to improve performance). - * It can also optionally discard any parts that have an area less than `minimumArea`. - * If the vertices can not be decomposed, the result will fall back to using the convex hull. - * The options parameter is an object that specifies any `Matter.Body` properties you wish to override the defaults. - * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. - * @method fromVertices - * @param {number} x - * @param {number} y - * @param [[vector]] vertexSets - * @param {object} [options] - * @param {bool} [flagInternal=false] - * @param {number} [removeCollinear=0.01] - * @param {number} [minimumArea=10] - * @return {body} - */ - Bodies.fromVertices = function(x, y, vertexSets, options, flagInternal, removeCollinear, minimumArea) { - var body, - parts, - isConvex, - vertices, - i, - j, - k, - v, - z; - - options = options || {}; - parts = []; - - flagInternal = typeof flagInternal !== 'undefined' ? flagInternal : false; - removeCollinear = typeof removeCollinear !== 'undefined' ? removeCollinear : 0.01; - minimumArea = typeof minimumArea !== 'undefined' ? minimumArea : 10; - - if (!decomp) { - Common.warn('Bodies.fromVertices: poly-decomp.js required. Could not decompose vertices. Fallback to convex hull.'); - } - - // ensure vertexSets is an array of arrays - if (!Common.isArray(vertexSets[0])) { - vertexSets = [vertexSets]; - } - - for (v = 0; v < vertexSets.length; v += 1) { - vertices = vertexSets[v]; - isConvex = Vertices.isConvex(vertices); - - if (isConvex || !decomp) { - if (isConvex) { - vertices = Vertices.clockwiseSort(vertices); - } else { - // fallback to convex hull when decomposition is not possible - vertices = Vertices.hull(vertices); - } - - parts.push({ - position: { x: x, y: y }, - vertices: vertices - }); - } else { - // initialise a decomposition - var concave = vertices.map(function(vertex) { - return [vertex.x, vertex.y]; - }); - - // vertices are concave and simple, we can decompose into parts - decomp.makeCCW(concave); - if (removeCollinear !== false) - decomp.removeCollinearPoints(concave, removeCollinear); - - // use the quick decomposition algorithm (Bayazit) - var decomposed = decomp.quickDecomp(concave); - - // for each decomposed chunk - for (i = 0; i < decomposed.length; i++) { - var chunk = decomposed[i]; - - // convert vertices into the correct structure - var chunkVertices = chunk.map(function(vertices) { - return { - x: vertices[0], - y: vertices[1] - }; - }); - - // skip small chunks - if (minimumArea > 0 && Vertices.area(chunkVertices) < minimumArea) - continue; - - // create a compound part - parts.push({ - position: Vertices.centre(chunkVertices), - vertices: chunkVertices - }); - } - } - } - - // create body parts - for (i = 0; i < parts.length; i++) { - parts[i] = Body.create(Common.extend(parts[i], options)); - } - - // flag internal edges (coincident part edges) - if (flagInternal) { - var coincident_max_dist = 5; - - for (i = 0; i < parts.length; i++) { - var partA = parts[i]; - - for (j = i + 1; j < parts.length; j++) { - var partB = parts[j]; - - if (Bounds.overlaps(partA.bounds, partB.bounds)) { - var pav = partA.vertices, - pbv = partB.vertices; - - // iterate vertices of both parts - for (k = 0; k < partA.vertices.length; k++) { - for (z = 0; z < partB.vertices.length; z++) { - // find distances between the vertices - var da = Vector.magnitudeSquared(Vector.sub(pav[(k + 1) % pav.length], pbv[z])), - db = Vector.magnitudeSquared(Vector.sub(pav[k], pbv[(z + 1) % pbv.length])); - - // if both vertices are very close, consider the edge concident (internal) - if (da < coincident_max_dist && db < coincident_max_dist) { - pav[k].isInternal = true; - pbv[z].isInternal = true; - } - } - } - - } - } - } - } - - if (parts.length > 1) { - // create the parent body to be returned, that contains generated compound parts - body = Body.create(Common.extend({ parts: parts.slice(0) }, options)); - Body.setPosition(body, { x: x, y: y }); - - return body; - } else { - return parts[0]; - } - }; - -})(); - - -/***/ }), -/* 58 */ +/* 59 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(146); +var GetTileAt = __webpack_require__(151); var GetTilesWithin = __webpack_require__(26); /** @@ -11733,12 +11957,12 @@ module.exports = CalculateFacesWithin; /***/ }), -/* 59 */ +/* 60 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11774,20 +11998,20 @@ module.exports = Contains; /***/ }), -/* 60 */ +/* 61 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var GetPoint = __webpack_require__(275); -var GetPoints = __webpack_require__(158); -var GEOM_CONST = __webpack_require__(51); -var Random = __webpack_require__(159); +var GetPoint = __webpack_require__(294); +var GetPoints = __webpack_require__(162); +var GEOM_CONST = __webpack_require__(52); +var Random = __webpack_require__(163); var Vector2 = __webpack_require__(3); /** @@ -11892,7 +12116,7 @@ var Line = new Class({ * @method Phaser.Geom.Line#getPoints * @since 3.0.0 * - * @generic {Phaser.Geom.Point} O - [output,$return] + * @generic {Phaser.Geom.Point[]} O - [output,$return] * * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead. * @param {integer} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`. @@ -12111,12 +12335,12 @@ module.exports = Line; /***/ }), -/* 61 */ +/* 62 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12139,12 +12363,12 @@ module.exports = Length; /***/ }), -/* 62 */ +/* 63 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12170,47 +12394,13 @@ var Wrap = function (value, min, max) module.exports = Wrap; -/***/ }), -/* 63 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Calculate the distance between two sets of coordinates (points). - * - * @function Phaser.Math.Distance.Between - * @since 3.0.0 - * - * @param {number} x1 - The x coordinate of the first point. - * @param {number} y1 - The y coordinate of the first point. - * @param {number} x2 - The x coordinate of the second point. - * @param {number} y2 - The y coordinate of the second point. - * - * @return {number} The distance between each point. - */ -var DistanceBetween = function (x1, y1, x2, y2) -{ - var dx = x1 - x2; - var dy = y1 - y2; - - return Math.sqrt(dx * dx + dy * dy); -}; - -module.exports = DistanceBetween; - - /***/ }), /* 64 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12220,29 +12410,29 @@ module.exports = DistanceBetween; module.exports = { - COMPLETE: __webpack_require__(902), - DECODED: __webpack_require__(903), - DECODED_ALL: __webpack_require__(904), - DESTROY: __webpack_require__(905), - DETUNE: __webpack_require__(906), - GLOBAL_DETUNE: __webpack_require__(907), - GLOBAL_MUTE: __webpack_require__(908), - GLOBAL_RATE: __webpack_require__(909), - GLOBAL_VOLUME: __webpack_require__(910), - LOOP: __webpack_require__(911), - LOOPED: __webpack_require__(912), - MUTE: __webpack_require__(913), - PAUSE_ALL: __webpack_require__(914), - PAUSE: __webpack_require__(915), - PLAY: __webpack_require__(916), - RATE: __webpack_require__(917), - RESUME_ALL: __webpack_require__(918), - RESUME: __webpack_require__(919), - SEEK: __webpack_require__(920), - STOP_ALL: __webpack_require__(921), - STOP: __webpack_require__(922), - UNLOCKED: __webpack_require__(923), - VOLUME: __webpack_require__(924) + COMPLETE: __webpack_require__(914), + DECODED: __webpack_require__(915), + DECODED_ALL: __webpack_require__(916), + DESTROY: __webpack_require__(917), + DETUNE: __webpack_require__(918), + GLOBAL_DETUNE: __webpack_require__(919), + GLOBAL_MUTE: __webpack_require__(920), + GLOBAL_RATE: __webpack_require__(921), + GLOBAL_VOLUME: __webpack_require__(922), + LOOP: __webpack_require__(923), + LOOPED: __webpack_require__(924), + MUTE: __webpack_require__(925), + PAUSE_ALL: __webpack_require__(926), + PAUSE: __webpack_require__(927), + PLAY: __webpack_require__(928), + RATE: __webpack_require__(929), + RESUME_ALL: __webpack_require__(930), + RESUME: __webpack_require__(931), + SEEK: __webpack_require__(932), + STOP_ALL: __webpack_require__(933), + STOP: __webpack_require__(934), + UNLOCKED: __webpack_require__(935), + VOLUME: __webpack_require__(936) }; @@ -12253,14 +12443,14 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var SpriteRender = __webpack_require__(985); +var SpriteRender = __webpack_require__(997); /** * @classdesc @@ -12431,13 +12621,13 @@ module.exports = Sprite; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(22); -var File = __webpack_require__(23); +var CONST = __webpack_require__(23); +var File = __webpack_require__(24); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(1); var GetValue = __webpack_require__(5); @@ -12661,7 +12851,7 @@ module.exports = JSONFile; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12891,11 +13081,705 @@ module.exports = MultiFile; /***/ }), /* 68 */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* The `Matter.Composite` module contains methods for creating and manipulating composite bodies. +* A composite body is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`, therefore composites form a tree structure. +* It is important to use the functions in this module to modify composites, rather than directly modifying their properties. +* Note that the `Matter.World` object is also a type of `Matter.Composite` and as such all composite methods here can also operate on a `Matter.World`. +* +* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). +* +* @class Composite +*/ + +var Composite = {}; + +module.exports = Composite; + +var Events = __webpack_require__(96); +var Common = __webpack_require__(19); +var Bounds = __webpack_require__(38); +var Body = __webpack_require__(25); + +(function() { + + /** + * Creates a new composite. The options parameter is an object that specifies any properties you wish to override the defaults. + * See the properites section below for detailed information on what you can pass via the `options` object. + * @method create + * @param {} [options] + * @return {composite} A new composite + */ + Composite.create = function(options) { + return Common.extend({ + id: Common.nextId(), + type: 'composite', + parent: null, + isModified: false, + bodies: [], + constraints: [], + composites: [], + label: 'Composite', + plugin: {} + }, options); + }; + + /** + * Sets the composite's `isModified` flag. + * If `updateParents` is true, all parents will be set (default: false). + * If `updateChildren` is true, all children will be set (default: false). + * @method setModified + * @param {composite} composite + * @param {boolean} isModified + * @param {boolean} [updateParents=false] + * @param {boolean} [updateChildren=false] + */ + Composite.setModified = function(composite, isModified, updateParents, updateChildren) { + + Events.trigger(composite, 'compositeModified', composite); + + composite.isModified = isModified; + + if (updateParents && composite.parent) { + Composite.setModified(composite.parent, isModified, updateParents, updateChildren); + } + + if (updateChildren) { + for(var i = 0; i < composite.composites.length; i++) { + var childComposite = composite.composites[i]; + Composite.setModified(childComposite, isModified, updateParents, updateChildren); + } + } + }; + + /** + * Generic add function. Adds one or many body(s), constraint(s) or a composite(s) to the given composite. + * Triggers `beforeAdd` and `afterAdd` events on the `composite`. + * @method add + * @param {composite} composite + * @param {} object + * @return {composite} The original composite with the objects added + */ + Composite.add = function(composite, object) { + var objects = [].concat(object); + + Events.trigger(composite, 'beforeAdd', { object: object }); + + for (var i = 0; i < objects.length; i++) { + var obj = objects[i]; + + switch (obj.type) { + + case 'body': + // skip adding compound parts + if (obj.parent !== obj) { + Common.warn('Composite.add: skipped adding a compound body part (you must add its parent instead)'); + break; + } + + Composite.addBody(composite, obj); + break; + case 'constraint': + Composite.addConstraint(composite, obj); + break; + case 'composite': + Composite.addComposite(composite, obj); + break; + case 'mouseConstraint': + Composite.addConstraint(composite, obj.constraint); + break; + + } + } + + Events.trigger(composite, 'afterAdd', { object: object }); + + return composite; + }; + + /** + * Generic remove function. Removes one or many body(s), constraint(s) or a composite(s) to the given composite. + * Optionally searching its children recursively. + * Triggers `beforeRemove` and `afterRemove` events on the `composite`. + * @method remove + * @param {composite} composite + * @param {} object + * @param {boolean} [deep=false] + * @return {composite} The original composite with the objects removed + */ + Composite.remove = function(composite, object, deep) { + var objects = [].concat(object); + + Events.trigger(composite, 'beforeRemove', { object: object }); + + for (var i = 0; i < objects.length; i++) { + var obj = objects[i]; + + switch (obj.type) { + + case 'body': + Composite.removeBody(composite, obj, deep); + break; + case 'constraint': + Composite.removeConstraint(composite, obj, deep); + break; + case 'composite': + Composite.removeComposite(composite, obj, deep); + break; + case 'mouseConstraint': + Composite.removeConstraint(composite, obj.constraint); + break; + + } + } + + Events.trigger(composite, 'afterRemove', { object: object }); + + return composite; + }; + + /** + * Adds a composite to the given composite. + * @private + * @method addComposite + * @param {composite} compositeA + * @param {composite} compositeB + * @return {composite} The original compositeA with the objects from compositeB added + */ + Composite.addComposite = function(compositeA, compositeB) { + compositeA.composites.push(compositeB); + compositeB.parent = compositeA; + Composite.setModified(compositeA, true, true, false); + return compositeA; + }; + + /** + * Removes a composite from the given composite, and optionally searching its children recursively. + * @private + * @method removeComposite + * @param {composite} compositeA + * @param {composite} compositeB + * @param {boolean} [deep=false] + * @return {composite} The original compositeA with the composite removed + */ + Composite.removeComposite = function(compositeA, compositeB, deep) { + var position = compositeA.composites.indexOf(compositeB); + if (position !== -1) { + Composite.removeCompositeAt(compositeA, position); + Composite.setModified(compositeA, true, true, false); + } + + if (deep) { + for (var i = 0; i < compositeA.composites.length; i++){ + Composite.removeComposite(compositeA.composites[i], compositeB, true); + } + } + + return compositeA; + }; + + /** + * Removes a composite from the given composite. + * @private + * @method removeCompositeAt + * @param {composite} composite + * @param {number} position + * @return {composite} The original composite with the composite removed + */ + Composite.removeCompositeAt = function(composite, position) { + composite.composites.splice(position, 1); + Composite.setModified(composite, true, true, false); + return composite; + }; + + /** + * Adds a body to the given composite. + * @private + * @method addBody + * @param {composite} composite + * @param {body} body + * @return {composite} The original composite with the body added + */ + Composite.addBody = function(composite, body) { + composite.bodies.push(body); + Composite.setModified(composite, true, true, false); + return composite; + }; + + /** + * Removes a body from the given composite, and optionally searching its children recursively. + * @private + * @method removeBody + * @param {composite} composite + * @param {body} body + * @param {boolean} [deep=false] + * @return {composite} The original composite with the body removed + */ + Composite.removeBody = function(composite, body, deep) { + var position = composite.bodies.indexOf(body); + if (position !== -1) { + Composite.removeBodyAt(composite, position); + Composite.setModified(composite, true, true, false); + } + + if (deep) { + for (var i = 0; i < composite.composites.length; i++){ + Composite.removeBody(composite.composites[i], body, true); + } + } + + return composite; + }; + + /** + * Removes a body from the given composite. + * @private + * @method removeBodyAt + * @param {composite} composite + * @param {number} position + * @return {composite} The original composite with the body removed + */ + Composite.removeBodyAt = function(composite, position) { + composite.bodies.splice(position, 1); + Composite.setModified(composite, true, true, false); + return composite; + }; + + /** + * Adds a constraint to the given composite. + * @private + * @method addConstraint + * @param {composite} composite + * @param {constraint} constraint + * @return {composite} The original composite with the constraint added + */ + Composite.addConstraint = function(composite, constraint) { + composite.constraints.push(constraint); + Composite.setModified(composite, true, true, false); + return composite; + }; + + /** + * Removes a constraint from the given composite, and optionally searching its children recursively. + * @private + * @method removeConstraint + * @param {composite} composite + * @param {constraint} constraint + * @param {boolean} [deep=false] + * @return {composite} The original composite with the constraint removed + */ + Composite.removeConstraint = function(composite, constraint, deep) { + var position = composite.constraints.indexOf(constraint); + if (position !== -1) { + Composite.removeConstraintAt(composite, position); + } + + if (deep) { + for (var i = 0; i < composite.composites.length; i++){ + Composite.removeConstraint(composite.composites[i], constraint, true); + } + } + + return composite; + }; + + /** + * Removes a body from the given composite. + * @private + * @method removeConstraintAt + * @param {composite} composite + * @param {number} position + * @return {composite} The original composite with the constraint removed + */ + Composite.removeConstraintAt = function(composite, position) { + composite.constraints.splice(position, 1); + Composite.setModified(composite, true, true, false); + return composite; + }; + + /** + * Removes all bodies, constraints and composites from the given composite. + * Optionally clearing its children recursively. + * @method clear + * @param {composite} composite + * @param {boolean} keepStatic + * @param {boolean} [deep=false] + */ + Composite.clear = function(composite, keepStatic, deep) { + if (deep) { + for (var i = 0; i < composite.composites.length; i++){ + Composite.clear(composite.composites[i], keepStatic, true); + } + } + + if (keepStatic) { + composite.bodies = composite.bodies.filter(function(body) { return body.isStatic; }); + } else { + composite.bodies.length = 0; + } + + composite.constraints.length = 0; + composite.composites.length = 0; + Composite.setModified(composite, true, true, false); + + return composite; + }; + + /** + * Returns all bodies in the given composite, including all bodies in its children, recursively. + * @method allBodies + * @param {composite} composite + * @return {body[]} All the bodies + */ + Composite.allBodies = function(composite) { + var bodies = [].concat(composite.bodies); + + for (var i = 0; i < composite.composites.length; i++) + bodies = bodies.concat(Composite.allBodies(composite.composites[i])); + + return bodies; + }; + + /** + * Returns all constraints in the given composite, including all constraints in its children, recursively. + * @method allConstraints + * @param {composite} composite + * @return {constraint[]} All the constraints + */ + Composite.allConstraints = function(composite) { + var constraints = [].concat(composite.constraints); + + for (var i = 0; i < composite.composites.length; i++) + constraints = constraints.concat(Composite.allConstraints(composite.composites[i])); + + return constraints; + }; + + /** + * Returns all composites in the given composite, including all composites in its children, recursively. + * @method allComposites + * @param {composite} composite + * @return {composite[]} All the composites + */ + Composite.allComposites = function(composite) { + var composites = [].concat(composite.composites); + + for (var i = 0; i < composite.composites.length; i++) + composites = composites.concat(Composite.allComposites(composite.composites[i])); + + return composites; + }; + + /** + * Searches the composite recursively for an object matching the type and id supplied, null if not found. + * @method get + * @param {composite} composite + * @param {number} id + * @param {string} type + * @return {object} The requested object, if found + */ + Composite.get = function(composite, id, type) { + var objects, + object; + + switch (type) { + case 'body': + objects = Composite.allBodies(composite); + break; + case 'constraint': + objects = Composite.allConstraints(composite); + break; + case 'composite': + objects = Composite.allComposites(composite).concat(composite); + break; + } + + if (!objects) + return null; + + object = objects.filter(function(object) { + return object.id.toString() === id.toString(); + }); + + return object.length === 0 ? null : object[0]; + }; + + /** + * Moves the given object(s) from compositeA to compositeB (equal to a remove followed by an add). + * @method move + * @param {compositeA} compositeA + * @param {object[]} objects + * @param {compositeB} compositeB + * @return {composite} Returns compositeA + */ + Composite.move = function(compositeA, objects, compositeB) { + Composite.remove(compositeA, objects); + Composite.add(compositeB, objects); + return compositeA; + }; + + /** + * Assigns new ids for all objects in the composite, recursively. + * @method rebase + * @param {composite} composite + * @return {composite} Returns composite + */ + Composite.rebase = function(composite) { + var objects = Composite.allBodies(composite) + .concat(Composite.allConstraints(composite)) + .concat(Composite.allComposites(composite)); + + for (var i = 0; i < objects.length; i++) { + objects[i].id = Common.nextId(); + } + + Composite.setModified(composite, true, true, false); + + return composite; + }; + + /** + * Translates all children in the composite by a given vector relative to their current positions, + * without imparting any velocity. + * @method translate + * @param {composite} composite + * @param {vector} translation + * @param {bool} [recursive=true] + */ + Composite.translate = function(composite, translation, recursive) { + var bodies = recursive ? Composite.allBodies(composite) : composite.bodies; + + for (var i = 0; i < bodies.length; i++) { + Body.translate(bodies[i], translation); + } + + Composite.setModified(composite, true, true, false); + + return composite; + }; + + /** + * Rotates all children in the composite by a given angle about the given point, without imparting any angular velocity. + * @method rotate + * @param {composite} composite + * @param {number} rotation + * @param {vector} point + * @param {bool} [recursive=true] + */ + Composite.rotate = function(composite, rotation, point, recursive) { + var cos = Math.cos(rotation), + sin = Math.sin(rotation), + bodies = recursive ? Composite.allBodies(composite) : composite.bodies; + + for (var i = 0; i < bodies.length; i++) { + var body = bodies[i], + dx = body.position.x - point.x, + dy = body.position.y - point.y; + + Body.setPosition(body, { + x: point.x + (dx * cos - dy * sin), + y: point.y + (dx * sin + dy * cos) + }); + + Body.rotate(body, rotation); + } + + Composite.setModified(composite, true, true, false); + + return composite; + }; + + /** + * Scales all children in the composite, including updating physical properties (mass, area, axes, inertia), from a world-space point. + * @method scale + * @param {composite} composite + * @param {number} scaleX + * @param {number} scaleY + * @param {vector} point + * @param {bool} [recursive=true] + */ + Composite.scale = function(composite, scaleX, scaleY, point, recursive) { + var bodies = recursive ? Composite.allBodies(composite) : composite.bodies; + + for (var i = 0; i < bodies.length; i++) { + var body = bodies[i], + dx = body.position.x - point.x, + dy = body.position.y - point.y; + + Body.setPosition(body, { + x: point.x + dx * scaleX, + y: point.y + dy * scaleY + }); + + Body.scale(body, scaleX, scaleY); + } + + Composite.setModified(composite, true, true, false); + + return composite; + }; + + /** + * Returns the union of the bounds of all of the composite's bodies. + * @method bounds + * @param {composite} composite The composite. + * @returns {bounds} The composite bounds. + */ + Composite.bounds = function(composite) { + var bodies = Composite.allBodies(composite), + vertices = []; + + for (var i = 0; i < bodies.length; i += 1) { + var body = bodies[i]; + vertices.push(body.bounds.min, body.bounds.max); + } + + return Bounds.create(vertices); + }; + + /* + * + * Events Documentation + * + */ + + /** + * Fired when a call to `Composite.add` is made, before objects have been added. + * + * @event beforeAdd + * @param {} event An event object + * @param {} event.object The object(s) to be added (may be a single body, constraint, composite or a mixed array of these) + * @param {} event.source The source object of the event + * @param {} event.name The name of the event + */ + + /** + * Fired when a call to `Composite.add` is made, after objects have been added. + * + * @event afterAdd + * @param {} event An event object + * @param {} event.object The object(s) that have been added (may be a single body, constraint, composite or a mixed array of these) + * @param {} event.source The source object of the event + * @param {} event.name The name of the event + */ + + /** + * Fired when a call to `Composite.remove` is made, before objects have been removed. + * + * @event beforeRemove + * @param {} event An event object + * @param {} event.object The object(s) to be removed (may be a single body, constraint, composite or a mixed array of these) + * @param {} event.source The source object of the event + * @param {} event.name The name of the event + */ + + /** + * Fired when a call to `Composite.remove` is made, after objects have been removed. + * + * @event afterRemove + * @param {} event An event object + * @param {} event.object The object(s) that have been removed (may be a single body, constraint, composite or a mixed array of these) + * @param {} event.source The source object of the event + * @param {} event.name The name of the event + */ + + /* + * + * Properties Documentation + * + */ + + /** + * An integer `Number` uniquely identifying number generated in `Composite.create` by `Common.nextId`. + * + * @property id + * @type number + */ + + /** + * A `String` denoting the type of object. + * + * @property type + * @type string + * @default "composite" + * @readOnly + */ + + /** + * An arbitrary `String` name to help the user identify and manage composites. + * + * @property label + * @type string + * @default "Composite" + */ + + /** + * A flag that specifies whether the composite has been modified during the current step. + * Most `Matter.Composite` methods will automatically set this flag to `true` to inform the engine of changes to be handled. + * If you need to change it manually, you should use the `Composite.setModified` method. + * + * @property isModified + * @type boolean + * @default false + */ + + /** + * The `Composite` that is the parent of this composite. It is automatically managed by the `Matter.Composite` methods. + * + * @property parent + * @type composite + * @default null + */ + + /** + * An array of `Body` that are _direct_ children of this composite. + * To add or remove bodies you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property. + * If you wish to recursively find all descendants, you should use the `Composite.allBodies` method. + * + * @property bodies + * @type body[] + * @default [] + */ + + /** + * An array of `Constraint` that are _direct_ children of this composite. + * To add or remove constraints you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property. + * If you wish to recursively find all descendants, you should use the `Composite.allConstraints` method. + * + * @property constraints + * @type constraint[] + * @default [] + */ + + /** + * An array of `Composite` that are _direct_ children of this composite. + * To add or remove composites you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property. + * If you wish to recursively find all descendants, you should use the `Composite.allComposites` method. + * + * @property composites + * @type composite[] + * @default [] + */ + + /** + * An object reserved for storing plugin-specific properties. + * + * @property plugin + * @type {} + */ + +})(); + + +/***/ }), +/* 69 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12941,12 +13825,12 @@ module.exports = WorldToTileX; /***/ }), -/* 69 */ +/* 70 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12992,21 +13876,21 @@ module.exports = WorldToTileY; /***/ }), -/* 70 */ +/* 71 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(59); -var GetPoint = __webpack_require__(265); -var GetPoints = __webpack_require__(266); -var GEOM_CONST = __webpack_require__(51); -var Random = __webpack_require__(155); +var Contains = __webpack_require__(60); +var GetPoint = __webpack_require__(284); +var GetPoints = __webpack_require__(285); +var GEOM_CONST = __webpack_require__(52); +var Random = __webpack_require__(159); /** * @classdesc @@ -13367,13 +14251,13 @@ module.exports = Circle; /***/ }), -/* 71 */ +/* 72 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14049,12 +14933,12 @@ earcut.flatten = function (data) { /***/ }), -/* 72 */ +/* 73 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14091,12 +14975,12 @@ module.exports = Clone; /***/ }), -/* 73 */ +/* 74 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14140,12 +15024,12 @@ module.exports = SafeRange; /***/ }), -/* 74 */ +/* 75 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14215,22 +15099,22 @@ module.exports = StrokePathWebGL; /***/ }), -/* 75 */ +/* 76 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(91); -var GetPoint = __webpack_require__(429); -var GetPoints = __webpack_require__(430); -var GEOM_CONST = __webpack_require__(51); -var Line = __webpack_require__(60); -var Random = __webpack_require__(164); +var Contains = __webpack_require__(92); +var GetPoint = __webpack_require__(448); +var GetPoints = __webpack_require__(449); +var GEOM_CONST = __webpack_require__(52); +var Line = __webpack_require__(61); +var Random = __webpack_require__(168); /** * @classdesc @@ -14662,18 +15546,18 @@ module.exports = Triangle; /***/ }), -/* 76 */ +/* 77 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(22); -var File = __webpack_require__(23); +var CONST = __webpack_require__(23); +var File = __webpack_require__(24); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(1); var IsPlainObject = __webpack_require__(7); @@ -14936,608 +15820,341 @@ module.exports = ImageFile; /***/ }), -/* 77 */ +/* 78 */ /***/ (function(module, exports, __webpack_require__) { /** -* The `Matter.Composite` module contains methods for creating and manipulating composite bodies. -* A composite body is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`, therefore composites form a tree structure. -* It is important to use the functions in this module to modify composites, rather than directly modifying their properties. -* Note that the `Matter.World` object is also a type of `Matter.Composite` and as such all composite methods here can also operate on a `Matter.World`. +* The `Matter.Constraint` module contains methods for creating and manipulating constraints. +* Constraints are used for specifying that a fixed distance must be maintained between two bodies (or a body and a fixed world-space position). +* The stiffness of constraints can be modified to create springs or elastic. * * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). * -* @class Composite +* @class Constraint */ -var Composite = {}; +var Constraint = {}; -module.exports = Composite; +module.exports = Constraint; -var Events = __webpack_require__(94); -var Common = __webpack_require__(18); +var Vertices = __webpack_require__(31); +var Vector = __webpack_require__(37); +var Sleeping = __webpack_require__(95); var Bounds = __webpack_require__(38); -var Body = __webpack_require__(25); +var Axes = __webpack_require__(146); +var Common = __webpack_require__(19); (function() { + Constraint._warming = 0.4; + Constraint._torqueDampen = 1; + Constraint._minLength = 0.000001; + /** - * Creates a new composite. The options parameter is an object that specifies any properties you wish to override the defaults. - * See the properites section below for detailed information on what you can pass via the `options` object. + * Creates a new constraint. + * All properties have default values, and many are pre-calculated automatically based on other properties. + * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` value (e.g. `0.7` or above). + * If the constraint is unstable, try lowering the `stiffness` value and / or increasing `engine.constraintIterations`. + * For compound bodies, constraints must be applied to the parent body (not one of its parts). + * See the properties section below for detailed information on what you can pass via the `options` object. * @method create - * @param {} [options] - * @return {composite} A new composite + * @param {} options + * @return {constraint} constraint */ - Composite.create = function(options) { - return Common.extend({ - id: Common.nextId(), - type: 'composite', - parent: null, - isModified: false, - bodies: [], - constraints: [], - composites: [], - label: 'Composite', - plugin: {} - }, options); + Constraint.create = function(options) { + var constraint = options; + + // if bodies defined but no points, use body centre + if (constraint.bodyA && !constraint.pointA) + constraint.pointA = { x: 0, y: 0 }; + if (constraint.bodyB && !constraint.pointB) + constraint.pointB = { x: 0, y: 0 }; + + // calculate static length using initial world space points + var initialPointA = constraint.bodyA ? Vector.add(constraint.bodyA.position, constraint.pointA) : constraint.pointA, + initialPointB = constraint.bodyB ? Vector.add(constraint.bodyB.position, constraint.pointB) : constraint.pointB, + length = Vector.magnitude(Vector.sub(initialPointA, initialPointB)); + + constraint.length = typeof constraint.length !== 'undefined' ? constraint.length : length; + + // option defaults + constraint.id = constraint.id || Common.nextId(); + constraint.label = constraint.label || 'Constraint'; + constraint.type = 'constraint'; + constraint.stiffness = constraint.stiffness || (constraint.length > 0 ? 1 : 0.7); + constraint.damping = constraint.damping || 0; + constraint.angularStiffness = constraint.angularStiffness || 0; + constraint.angleA = constraint.bodyA ? constraint.bodyA.angle : constraint.angleA; + constraint.angleB = constraint.bodyB ? constraint.bodyB.angle : constraint.angleB; + constraint.plugin = {}; + + // render + var render = { + visible: true, + type: 'line', + anchors: true, + lineColor: null, // custom Phaser property + lineOpacity: null, // custom Phaser property + lineThickness: null, // custom Phaser property + pinSize: null, // custom Phaser property + anchorColor: null, // custom Phaser property + anchorSize: null // custom Phaser property + }; + + if (constraint.length === 0 && constraint.stiffness > 0.1) { + render.type = 'pin'; + render.anchors = false; + } else if (constraint.stiffness < 0.9) { + render.type = 'spring'; + } + + constraint.render = Common.extend(render, constraint.render); + + return constraint; }; /** - * Sets the composite's `isModified` flag. - * If `updateParents` is true, all parents will be set (default: false). - * If `updateChildren` is true, all children will be set (default: false). - * @method setModified - * @param {composite} composite - * @param {boolean} isModified - * @param {boolean} [updateParents=false] - * @param {boolean} [updateChildren=false] + * Prepares for solving by constraint warming. + * @private + * @method preSolveAll + * @param {body[]} bodies */ - Composite.setModified = function(composite, isModified, updateParents, updateChildren) { - composite.isModified = isModified; + Constraint.preSolveAll = function(bodies) { + for (var i = 0; i < bodies.length; i += 1) { + var body = bodies[i], + impulse = body.constraintImpulse; - if (updateParents && composite.parent) { - Composite.setModified(composite.parent, isModified, updateParents, updateChildren); + if (body.isStatic || (impulse.x === 0 && impulse.y === 0 && impulse.angle === 0)) { + continue; + } + + body.position.x += impulse.x; + body.position.y += impulse.y; + body.angle += impulse.angle; + } + }; + + /** + * Solves all constraints in a list of collisions. + * @private + * @method solveAll + * @param {constraint[]} constraints + * @param {number} timeScale + */ + Constraint.solveAll = function(constraints, timeScale) { + // Solve fixed constraints first. + for (var i = 0; i < constraints.length; i += 1) { + var constraint = constraints[i], + fixedA = !constraint.bodyA || (constraint.bodyA && constraint.bodyA.isStatic), + fixedB = !constraint.bodyB || (constraint.bodyB && constraint.bodyB.isStatic); + + if (fixedA || fixedB) { + Constraint.solve(constraints[i], timeScale); + } } - if (updateChildren) { - for(var i = 0; i < composite.composites.length; i++) { - var childComposite = composite.composites[i]; - Composite.setModified(childComposite, isModified, updateParents, updateChildren); + // Solve free constraints last. + for (i = 0; i < constraints.length; i += 1) { + constraint = constraints[i]; + fixedA = !constraint.bodyA || (constraint.bodyA && constraint.bodyA.isStatic); + fixedB = !constraint.bodyB || (constraint.bodyB && constraint.bodyB.isStatic); + + if (!fixedA && !fixedB) { + Constraint.solve(constraints[i], timeScale); } } }; /** - * Generic add function. Adds one or many body(s), constraint(s) or a composite(s) to the given composite. - * Triggers `beforeAdd` and `afterAdd` events on the `composite`. - * @method add - * @param {composite} composite - * @param {} object - * @return {composite} The original composite with the objects added - */ - Composite.add = function(composite, object) { - var objects = [].concat(object); - - Events.trigger(composite, 'beforeAdd', { object: object }); - - for (var i = 0; i < objects.length; i++) { - var obj = objects[i]; - - switch (obj.type) { - - case 'body': - // skip adding compound parts - if (obj.parent !== obj) { - Common.warn('Composite.add: skipped adding a compound body part (you must add its parent instead)'); - break; - } - - Composite.addBody(composite, obj); - break; - case 'constraint': - Composite.addConstraint(composite, obj); - break; - case 'composite': - Composite.addComposite(composite, obj); - break; - case 'mouseConstraint': - Composite.addConstraint(composite, obj.constraint); - break; - - } - } - - Events.trigger(composite, 'afterAdd', { object: object }); - - return composite; - }; - - /** - * Generic remove function. Removes one or many body(s), constraint(s) or a composite(s) to the given composite. - * Optionally searching its children recursively. - * Triggers `beforeRemove` and `afterRemove` events on the `composite`. - * @method remove - * @param {composite} composite - * @param {} object - * @param {boolean} [deep=false] - * @return {composite} The original composite with the objects removed - */ - Composite.remove = function(composite, object, deep) { - var objects = [].concat(object); - - Events.trigger(composite, 'beforeRemove', { object: object }); - - for (var i = 0; i < objects.length; i++) { - var obj = objects[i]; - - switch (obj.type) { - - case 'body': - Composite.removeBody(composite, obj, deep); - break; - case 'constraint': - Composite.removeConstraint(composite, obj, deep); - break; - case 'composite': - Composite.removeComposite(composite, obj, deep); - break; - case 'mouseConstraint': - Composite.removeConstraint(composite, obj.constraint); - break; - - } - } - - Events.trigger(composite, 'afterRemove', { object: object }); - - return composite; - }; - - /** - * Adds a composite to the given composite. + * Solves a distance constraint with Gauss-Siedel method. * @private - * @method addComposite - * @param {composite} compositeA - * @param {composite} compositeB - * @return {composite} The original compositeA with the objects from compositeB added - */ - Composite.addComposite = function(compositeA, compositeB) { - compositeA.composites.push(compositeB); - compositeB.parent = compositeA; - Composite.setModified(compositeA, true, true, false); - return compositeA; - }; - - /** - * Removes a composite from the given composite, and optionally searching its children recursively. - * @private - * @method removeComposite - * @param {composite} compositeA - * @param {composite} compositeB - * @param {boolean} [deep=false] - * @return {composite} The original compositeA with the composite removed - */ - Composite.removeComposite = function(compositeA, compositeB, deep) { - var position = compositeA.composites.indexOf(compositeB); - if (position !== -1) { - Composite.removeCompositeAt(compositeA, position); - Composite.setModified(compositeA, true, true, false); - } - - if (deep) { - for (var i = 0; i < compositeA.composites.length; i++){ - Composite.removeComposite(compositeA.composites[i], compositeB, true); - } - } - - return compositeA; - }; - - /** - * Removes a composite from the given composite. - * @private - * @method removeCompositeAt - * @param {composite} composite - * @param {number} position - * @return {composite} The original composite with the composite removed - */ - Composite.removeCompositeAt = function(composite, position) { - composite.composites.splice(position, 1); - Composite.setModified(composite, true, true, false); - return composite; - }; - - /** - * Adds a body to the given composite. - * @private - * @method addBody - * @param {composite} composite - * @param {body} body - * @return {composite} The original composite with the body added - */ - Composite.addBody = function(composite, body) { - composite.bodies.push(body); - Composite.setModified(composite, true, true, false); - return composite; - }; - - /** - * Removes a body from the given composite, and optionally searching its children recursively. - * @private - * @method removeBody - * @param {composite} composite - * @param {body} body - * @param {boolean} [deep=false] - * @return {composite} The original composite with the body removed - */ - Composite.removeBody = function(composite, body, deep) { - var position = composite.bodies.indexOf(body); - if (position !== -1) { - Composite.removeBodyAt(composite, position); - Composite.setModified(composite, true, true, false); - } - - if (deep) { - for (var i = 0; i < composite.composites.length; i++){ - Composite.removeBody(composite.composites[i], body, true); - } - } - - return composite; - }; - - /** - * Removes a body from the given composite. - * @private - * @method removeBodyAt - * @param {composite} composite - * @param {number} position - * @return {composite} The original composite with the body removed - */ - Composite.removeBodyAt = function(composite, position) { - composite.bodies.splice(position, 1); - Composite.setModified(composite, true, true, false); - return composite; - }; - - /** - * Adds a constraint to the given composite. - * @private - * @method addConstraint - * @param {composite} composite + * @method solve * @param {constraint} constraint - * @return {composite} The original composite with the constraint added + * @param {number} timeScale */ - Composite.addConstraint = function(composite, constraint) { - composite.constraints.push(constraint); - Composite.setModified(composite, true, true, false); - return composite; - }; + Constraint.solve = function(constraint, timeScale) { + var bodyA = constraint.bodyA, + bodyB = constraint.bodyB, + pointA = constraint.pointA, + pointB = constraint.pointB; - /** - * Removes a constraint from the given composite, and optionally searching its children recursively. - * @private - * @method removeConstraint - * @param {composite} composite - * @param {constraint} constraint - * @param {boolean} [deep=false] - * @return {composite} The original composite with the constraint removed - */ - Composite.removeConstraint = function(composite, constraint, deep) { - var position = composite.constraints.indexOf(constraint); - if (position !== -1) { - Composite.removeConstraintAt(composite, position); - } + if (!bodyA && !bodyB) + return; - if (deep) { - for (var i = 0; i < composite.composites.length; i++){ - Composite.removeConstraint(composite.composites[i], constraint, true); - } - } - - return composite; - }; - - /** - * Removes a body from the given composite. - * @private - * @method removeConstraintAt - * @param {composite} composite - * @param {number} position - * @return {composite} The original composite with the constraint removed - */ - Composite.removeConstraintAt = function(composite, position) { - composite.constraints.splice(position, 1); - Composite.setModified(composite, true, true, false); - return composite; - }; - - /** - * Removes all bodies, constraints and composites from the given composite. - * Optionally clearing its children recursively. - * @method clear - * @param {composite} composite - * @param {boolean} keepStatic - * @param {boolean} [deep=false] - */ - Composite.clear = function(composite, keepStatic, deep) { - if (deep) { - for (var i = 0; i < composite.composites.length; i++){ - Composite.clear(composite.composites[i], keepStatic, true); - } + // update reference angle + if (bodyA && !bodyA.isStatic) { + Vector.rotate(pointA, bodyA.angle - constraint.angleA, pointA); + constraint.angleA = bodyA.angle; } - if (keepStatic) { - composite.bodies = composite.bodies.filter(function(body) { return body.isStatic; }); - } else { - composite.bodies.length = 0; + // update reference angle + if (bodyB && !bodyB.isStatic) { + Vector.rotate(pointB, bodyB.angle - constraint.angleB, pointB); + constraint.angleB = bodyB.angle; } - composite.constraints.length = 0; - composite.composites.length = 0; - Composite.setModified(composite, true, true, false); + var pointAWorld = pointA, + pointBWorld = pointB; - return composite; - }; + if (bodyA) pointAWorld = Vector.add(bodyA.position, pointA); + if (bodyB) pointBWorld = Vector.add(bodyB.position, pointB); - /** - * Returns all bodies in the given composite, including all bodies in its children, recursively. - * @method allBodies - * @param {composite} composite - * @return {body[]} All the bodies - */ - Composite.allBodies = function(composite) { - var bodies = [].concat(composite.bodies); + if (!pointAWorld || !pointBWorld) + return; - for (var i = 0; i < composite.composites.length; i++) - bodies = bodies.concat(Composite.allBodies(composite.composites[i])); + var delta = Vector.sub(pointAWorld, pointBWorld), + currentLength = Vector.magnitude(delta); - return bodies; - }; - - /** - * Returns all constraints in the given composite, including all constraints in its children, recursively. - * @method allConstraints - * @param {composite} composite - * @return {constraint[]} All the constraints - */ - Composite.allConstraints = function(composite) { - var constraints = [].concat(composite.constraints); - - for (var i = 0; i < composite.composites.length; i++) - constraints = constraints.concat(Composite.allConstraints(composite.composites[i])); - - return constraints; - }; - - /** - * Returns all composites in the given composite, including all composites in its children, recursively. - * @method allComposites - * @param {composite} composite - * @return {composite[]} All the composites - */ - Composite.allComposites = function(composite) { - var composites = [].concat(composite.composites); - - for (var i = 0; i < composite.composites.length; i++) - composites = composites.concat(Composite.allComposites(composite.composites[i])); - - return composites; - }; - - /** - * Searches the composite recursively for an object matching the type and id supplied, null if not found. - * @method get - * @param {composite} composite - * @param {number} id - * @param {string} type - * @return {object} The requested object, if found - */ - Composite.get = function(composite, id, type) { - var objects, - object; - - switch (type) { - case 'body': - objects = Composite.allBodies(composite); - break; - case 'constraint': - objects = Composite.allConstraints(composite); - break; - case 'composite': - objects = Composite.allComposites(composite).concat(composite); - break; + // prevent singularity + if (currentLength < Constraint._minLength) { + currentLength = Constraint._minLength; } - if (!objects) - return null; + // solve distance constraint with Gauss-Siedel method + var difference = (currentLength - constraint.length) / currentLength, + stiffness = constraint.stiffness < 1 ? constraint.stiffness * timeScale : constraint.stiffness, + force = Vector.mult(delta, difference * stiffness), + massTotal = (bodyA ? bodyA.inverseMass : 0) + (bodyB ? bodyB.inverseMass : 0), + inertiaTotal = (bodyA ? bodyA.inverseInertia : 0) + (bodyB ? bodyB.inverseInertia : 0), + resistanceTotal = massTotal + inertiaTotal, + torque, + share, + normal, + normalVelocity, + relativeVelocity; - object = objects.filter(function(object) { - return object.id.toString() === id.toString(); - }); + if (constraint.damping) { + var zero = Vector.create(); + normal = Vector.div(delta, currentLength); - return object.length === 0 ? null : object[0]; - }; + relativeVelocity = Vector.sub( + bodyB && Vector.sub(bodyB.position, bodyB.positionPrev) || zero, + bodyA && Vector.sub(bodyA.position, bodyA.positionPrev) || zero + ); - /** - * Moves the given object(s) from compositeA to compositeB (equal to a remove followed by an add). - * @method move - * @param {compositeA} compositeA - * @param {object[]} objects - * @param {compositeB} compositeB - * @return {composite} Returns compositeA - */ - Composite.move = function(compositeA, objects, compositeB) { - Composite.remove(compositeA, objects); - Composite.add(compositeB, objects); - return compositeA; - }; - - /** - * Assigns new ids for all objects in the composite, recursively. - * @method rebase - * @param {composite} composite - * @return {composite} Returns composite - */ - Composite.rebase = function(composite) { - var objects = Composite.allBodies(composite) - .concat(Composite.allConstraints(composite)) - .concat(Composite.allComposites(composite)); - - for (var i = 0; i < objects.length; i++) { - objects[i].id = Common.nextId(); + normalVelocity = Vector.dot(normal, relativeVelocity); } - Composite.setModified(composite, true, true, false); + if (bodyA && !bodyA.isStatic) { + share = bodyA.inverseMass / massTotal; - return composite; - }; + // keep track of applied impulses for post solving + bodyA.constraintImpulse.x -= force.x * share; + bodyA.constraintImpulse.y -= force.y * share; - /** - * Translates all children in the composite by a given vector relative to their current positions, - * without imparting any velocity. - * @method translate - * @param {composite} composite - * @param {vector} translation - * @param {bool} [recursive=true] - */ - Composite.translate = function(composite, translation, recursive) { - var bodies = recursive ? Composite.allBodies(composite) : composite.bodies; + // apply forces + bodyA.position.x -= force.x * share; + bodyA.position.y -= force.y * share; - for (var i = 0; i < bodies.length; i++) { - Body.translate(bodies[i], translation); + // apply damping + if (constraint.damping) { + bodyA.positionPrev.x -= constraint.damping * normal.x * normalVelocity * share; + bodyA.positionPrev.y -= constraint.damping * normal.y * normalVelocity * share; + } + + // apply torque + torque = (Vector.cross(pointA, force) / resistanceTotal) * Constraint._torqueDampen * bodyA.inverseInertia * (1 - constraint.angularStiffness); + bodyA.constraintImpulse.angle -= torque; + bodyA.angle -= torque; } - Composite.setModified(composite, true, true, false); + if (bodyB && !bodyB.isStatic) { + share = bodyB.inverseMass / massTotal; + + // keep track of applied impulses for post solving + bodyB.constraintImpulse.x += force.x * share; + bodyB.constraintImpulse.y += force.y * share; + + // apply forces + bodyB.position.x += force.x * share; + bodyB.position.y += force.y * share; + + // apply damping + if (constraint.damping) { + bodyB.positionPrev.x += constraint.damping * normal.x * normalVelocity * share; + bodyB.positionPrev.y += constraint.damping * normal.y * normalVelocity * share; + } + + // apply torque + torque = (Vector.cross(pointB, force) / resistanceTotal) * Constraint._torqueDampen * bodyB.inverseInertia * (1 - constraint.angularStiffness); + bodyB.constraintImpulse.angle += torque; + bodyB.angle += torque; + } - return composite; }; /** - * Rotates all children in the composite by a given angle about the given point, without imparting any angular velocity. - * @method rotate - * @param {composite} composite - * @param {number} rotation - * @param {vector} point - * @param {bool} [recursive=true] + * Performs body updates required after solving constraints. + * @private + * @method postSolveAll + * @param {body[]} bodies */ - Composite.rotate = function(composite, rotation, point, recursive) { - var cos = Math.cos(rotation), - sin = Math.sin(rotation), - bodies = recursive ? Composite.allBodies(composite) : composite.bodies; - + Constraint.postSolveAll = function(bodies) { for (var i = 0; i < bodies.length; i++) { var body = bodies[i], - dx = body.position.x - point.x, - dy = body.position.y - point.y; + impulse = body.constraintImpulse; + + if (body.isStatic || (impulse.x === 0 && impulse.y === 0 && impulse.angle === 0)) { + continue; + } + + Sleeping.set(body, false); + + // update geometry and reset + for (var j = 0; j < body.parts.length; j++) { + var part = body.parts[j]; - Body.setPosition(body, { - x: point.x + (dx * cos - dy * sin), - y: point.y + (dx * sin + dy * cos) - }); + Vertices.translate(part.vertices, impulse); - Body.rotate(body, rotation); + if (j > 0) { + part.position.x += impulse.x; + part.position.y += impulse.y; + } + + if (impulse.angle !== 0) { + Vertices.rotate(part.vertices, impulse.angle, body.position); + Axes.rotate(part.axes, impulse.angle); + if (j > 0) { + Vector.rotateAbout(part.position, impulse.angle, body.position, part.position); + } + } + + Bounds.update(part.bounds, part.vertices, body.velocity); + } + + // dampen the cached impulse for warming next step + impulse.angle *= Constraint._warming; + impulse.x *= Constraint._warming; + impulse.y *= Constraint._warming; } - - Composite.setModified(composite, true, true, false); - - return composite; }; /** - * Scales all children in the composite, including updating physical properties (mass, area, axes, inertia), from a world-space point. - * @method scale - * @param {composite} composite - * @param {number} scaleX - * @param {number} scaleY - * @param {vector} point - * @param {bool} [recursive=true] + * Returns the world-space position of `constraint.pointA`, accounting for `constraint.bodyA`. + * @method pointAWorld + * @param {constraint} constraint + * @returns {vector} the world-space position */ - Composite.scale = function(composite, scaleX, scaleY, point, recursive) { - var bodies = recursive ? Composite.allBodies(composite) : composite.bodies; - - for (var i = 0; i < bodies.length; i++) { - var body = bodies[i], - dx = body.position.x - point.x, - dy = body.position.y - point.y; - - Body.setPosition(body, { - x: point.x + dx * scaleX, - y: point.y + dy * scaleY - }); - - Body.scale(body, scaleX, scaleY); - } - - Composite.setModified(composite, true, true, false); - - return composite; + Constraint.pointAWorld = function(constraint) { + return { + x: (constraint.bodyA ? constraint.bodyA.position.x : 0) + constraint.pointA.x, + y: (constraint.bodyA ? constraint.bodyA.position.y : 0) + constraint.pointA.y + }; }; /** - * Returns the union of the bounds of all of the composite's bodies. - * @method bounds - * @param {composite} composite The composite. - * @returns {bounds} The composite bounds. + * Returns the world-space position of `constraint.pointB`, accounting for `constraint.bodyB`. + * @method pointBWorld + * @param {constraint} constraint + * @returns {vector} the world-space position */ - Composite.bounds = function(composite) { - var bodies = Composite.allBodies(composite), - vertices = []; - - for (var i = 0; i < bodies.length; i += 1) { - var body = bodies[i]; - vertices.push(body.bounds.min, body.bounds.max); - } - - return Bounds.create(vertices); + Constraint.pointBWorld = function(constraint) { + return { + x: (constraint.bodyB ? constraint.bodyB.position.x : 0) + constraint.pointB.x, + y: (constraint.bodyB ? constraint.bodyB.position.y : 0) + constraint.pointB.y + }; }; - /* - * - * Events Documentation - * - */ - - /** - * Fired when a call to `Composite.add` is made, before objects have been added. - * - * @event beforeAdd - * @param {} event An event object - * @param {} event.object The object(s) to be added (may be a single body, constraint, composite or a mixed array of these) - * @param {} event.source The source object of the event - * @param {} event.name The name of the event - */ - - /** - * Fired when a call to `Composite.add` is made, after objects have been added. - * - * @event afterAdd - * @param {} event An event object - * @param {} event.object The object(s) that have been added (may be a single body, constraint, composite or a mixed array of these) - * @param {} event.source The source object of the event - * @param {} event.name The name of the event - */ - - /** - * Fired when a call to `Composite.remove` is made, before objects have been removed. - * - * @event beforeRemove - * @param {} event An event object - * @param {} event.object The object(s) to be removed (may be a single body, constraint, composite or a mixed array of these) - * @param {} event.source The source object of the event - * @param {} event.name The name of the event - */ - - /** - * Fired when a call to `Composite.remove` is made, after objects have been removed. - * - * @event afterRemove - * @param {} event An event object - * @param {} event.object The object(s) that have been removed (may be a single body, constraint, composite or a mixed array of these) - * @param {} event.source The source object of the event - * @param {} event.name The name of the event - */ - /* * * Properties Documentation @@ -15556,64 +16173,129 @@ var Body = __webpack_require__(25); * * @property type * @type string - * @default "composite" + * @default "constraint" * @readOnly */ /** - * An arbitrary `String` name to help the user identify and manage composites. + * An arbitrary `String` name to help the user identify and manage bodies. * * @property label * @type string - * @default "Composite" + * @default "Constraint" */ /** - * A flag that specifies whether the composite has been modified during the current step. - * Most `Matter.Composite` methods will automatically set this flag to `true` to inform the engine of changes to be handled. - * If you need to change it manually, you should use the `Composite.setModified` method. + * An `Object` that defines the rendering properties to be consumed by the module `Matter.Render`. * - * @property isModified + * @property render + * @type object + */ + + /** + * A flag that indicates if the constraint should be rendered. + * + * @property render.visible * @type boolean - * @default false + * @default true */ /** - * The `Composite` that is the parent of this composite. It is automatically managed by the `Matter.Composite` methods. + * A `Number` that defines the line width to use when rendering the constraint outline. + * A value of `0` means no outline will be rendered. * - * @property parent - * @type composite + * @property render.lineWidth + * @type number + * @default 2 + */ + + /** + * A `String` that defines the stroke style to use when rendering the constraint outline. + * It is the same as when using a canvas, so it accepts CSS style property values. + * + * @property render.strokeStyle + * @type string + * @default a random colour + */ + + /** + * A `String` that defines the constraint rendering type. + * The possible values are 'line', 'pin', 'spring'. + * An appropriate render type will be automatically chosen unless one is given in options. + * + * @property render.type + * @type string + * @default 'line' + */ + + /** + * A `Boolean` that defines if the constraint's anchor points should be rendered. + * + * @property render.anchors + * @type boolean + * @default true + */ + + /** + * The first possible `Body` that this constraint is attached to. + * + * @property bodyA + * @type body * @default null */ /** - * An array of `Body` that are _direct_ children of this composite. - * To add or remove bodies you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property. - * If you wish to recursively find all descendants, you should use the `Composite.allBodies` method. + * The second possible `Body` that this constraint is attached to. * - * @property bodies - * @type body[] - * @default [] + * @property bodyB + * @type body + * @default null */ /** - * An array of `Constraint` that are _direct_ children of this composite. - * To add or remove constraints you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property. - * If you wish to recursively find all descendants, you should use the `Composite.allConstraints` method. + * A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyA` if defined, otherwise a world-space position. * - * @property constraints - * @type constraint[] - * @default [] + * @property pointA + * @type vector + * @default { x: 0, y: 0 } */ /** - * An array of `Composite` that are _direct_ children of this composite. - * To add or remove composites you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property. - * If you wish to recursively find all descendants, you should use the `Composite.allComposites` method. + * A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyB` if defined, otherwise a world-space position. * - * @property composites - * @type composite[] - * @default [] + * @property pointB + * @type vector + * @default { x: 0, y: 0 } + */ + + /** + * A `Number` that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. + * A value of `1` means the constraint should be very stiff. + * A value of `0.2` means the constraint acts like a soft spring. + * + * @property stiffness + * @type number + * @default 1 + */ + + /** + * A `Number` that specifies the damping of the constraint, + * i.e. the amount of resistance applied to each body based on their velocities to limit the amount of oscillation. + * Damping will only be apparent when the constraint also has a very low `stiffness`. + * A value of `0.1` means the constraint will apply heavy damping, resulting in little to no oscillation. + * A value of `0` means the constraint will apply no damping. + * + * @property damping + * @type number + * @default 0 + */ + + /** + * A `Number` that specifies the target resting length of the constraint. + * It is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. + * + * @property length + * @type number */ /** @@ -15627,12 +16309,12 @@ var Body = __webpack_require__(25); /***/ }), -/* 78 */ +/* 79 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15663,18 +16345,18 @@ module.exports = SetTileCollision; /***/ }), -/* 79 */ +/* 80 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var Rectangle = __webpack_require__(448); +var Rectangle = __webpack_require__(467); /** * @classdesc @@ -16501,12 +17183,12 @@ module.exports = Tile; /***/ }), -/* 80 */ +/* 81 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16529,12 +17211,12 @@ module.exports = GetCenterX; /***/ }), -/* 81 */ +/* 82 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16564,12 +17246,40 @@ module.exports = SetCenterX; /***/ }), -/* 82 */ +/* 83 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Returns the center y coordinate from the bounds of the Game Object. + * + * @function Phaser.Display.Bounds.GetCenterY + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from. + * + * @return {number} The center y coordinate of the bounds of the Game Object. + */ +var GetCenterY = function (gameObject) +{ + return gameObject.y - (gameObject.height * gameObject.originY) + (gameObject.height * 0.5); +}; + +module.exports = GetCenterY; + + +/***/ }), +/* 84 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16599,40 +17309,12 @@ module.exports = SetCenterY; /***/ }), -/* 83 */ +/* 85 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Returns the center y coordinate from the bounds of the Game Object. - * - * @function Phaser.Display.Bounds.GetCenterY - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from. - * - * @return {number} The center y coordinate of the bounds of the Game Object. - */ -var GetCenterY = function (gameObject) -{ - return gameObject.y - (gameObject.height * gameObject.originY) + (gameObject.height * 0.5); -}; - -module.exports = GetCenterY; - - -/***/ }), -/* 84 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16673,17 +17355,17 @@ module.exports = SpliceOne; /***/ }), -/* 85 */ +/* 86 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var FromPoints = __webpack_require__(186); +var FromPoints = __webpack_require__(189); var Rectangle = __webpack_require__(11); var Vector2 = __webpack_require__(3); @@ -16698,7 +17380,7 @@ var Vector2 = __webpack_require__(3); * @constructor * @since 3.0.0 * - * @param {string} type - [description] + * @param {string} type - The curve type. */ var Curve = new Class({ @@ -16756,7 +17438,7 @@ var Curve = new Class({ this.needsUpdate = true; /** - * [description] + * For a curve on a Path, `false` means the Path will ignore this curve. * * @name Phaser.Curves.Curve#active * @type {boolean} @@ -16809,7 +17491,7 @@ var Curve = new Class({ // So you can chain graphics calls return graphics.strokePoints(this.getPoints(pointsTotal)); }, - + /** * Returns a Rectangle where the position and dimensions match the bounds of this Curve. * @@ -16865,7 +17547,7 @@ var Curve = new Class({ }, /** - * [description] + * Get a point at the end of the curve. * * @method Phaser.Curves.Curve#getEndPoint * @since 3.0.0 @@ -16887,7 +17569,7 @@ var Curve = new Class({ * @method Phaser.Curves.Curve#getLength * @since 3.0.0 * - * @return {number} [description] + * @return {number} The total length of the curve. */ getLength: function () { @@ -16898,14 +17580,22 @@ var Curve = new Class({ /** - * Get list of cumulative segment lengths + * Get a list of cumulative segment lengths. + * + * These lengths are + * + * - [0] 0 + * - [1] The first segment + * - [2] The first and second segment + * - ... + * - [divisions] All segments * * @method Phaser.Curves.Curve#getLengths * @since 3.0.0 * - * @param {integer} [divisions] - [description] + * @param {integer} [divisions] - The number of divisions or segments. * - * @return {number[]} [description] + * @return {number[]} An array of cumulative lengths. */ getLengths: function (divisions) { @@ -16946,17 +17636,17 @@ var Curve = new Class({ // - u [0 .. 1] /** - * [description] + * Get a point at a relative position on the curve, by arc length. * * @method Phaser.Curves.Curve#getPointAt * @since 3.0.0 * * @generic {Phaser.Math.Vector2} O - [out,$return] * - * @param {number} u - [description] - * @param {Phaser.Math.Vector2} [out] - [description] + * @param {number} u - The relative position, [0..1]. + * @param {Phaser.Math.Vector2} [out] - A point to store the result in. * - * @return {Phaser.Math.Vector2} [description] + * @return {Phaser.Math.Vector2} The point. */ getPointAt: function (u, out) { @@ -16968,13 +17658,25 @@ var Curve = new Class({ // Get sequence of points using getPoint( t ) /** - * [description] + * Get a sequence of evenly spaced points from the curve. + * + * You can pass `divisions`, `stepRate`, or neither. + * + * The number of divisions will be + * + * 1. `divisions`, if `divisions` > 0; or + * 2. `this.getLength / stepRate`, if `stepRate` > 0; or + * 3. `this.defaultDivisions` + * + * `1 + divisions` points will be returned. * * @method Phaser.Curves.Curve#getPoints * @since 3.0.0 * - * @param {integer} divisions - The number of evenly spaced points from the curve to return. If falsy, step param will be used to calculate the number of points. - * @param {number} step - Step between points. Used to calculate the number of points to return when divisions is falsy. Ignored if divisions is positive. + * @generic {Phaser.Math.Vector2[]} O - [out,$return] + * + * @param {integer} [divisions] - The number of divisions to make. + * @param {number} [stepRate] - The curve distance between points, implying `divisions`. * @param {(array|Phaser.Math.Vector2[])} [out] - An optional array to store the points in. * * @return {(array|Phaser.Math.Vector2[])} An array of Points from the curve. @@ -17005,16 +17707,16 @@ var Curve = new Class({ }, /** - * [description] + * Get a random point from the curve. * * @method Phaser.Curves.Curve#getRandomPoint * @since 3.0.0 * * @generic {Phaser.Math.Vector2} O - [out,$return] * - * @param {Phaser.Math.Vector2} [out] - [description] + * @param {Phaser.Math.Vector2} [out] - A point object to store the result in. * - * @return {Phaser.Math.Vector2} [description] + * @return {Phaser.Math.Vector2} The point. */ getRandomPoint: function (out) { @@ -17026,42 +17728,57 @@ var Curve = new Class({ // Get sequence of points using getPointAt( u ) /** - * [description] + * Get a sequence of equally spaced points (by arc distance) from the curve. + * + * `1 + divisions` points will be returned. * * @method Phaser.Curves.Curve#getSpacedPoints * @since 3.0.0 * - * @param {integer} [divisions] - [description] + * @param {integer} [divisions=this.defaultDivisions] - The number of divisions to make. + * @param {number} [stepRate] - Step between points. Used to calculate the number of points to return when divisions is falsy. Ignored if divisions is positive. + * @param {(array|Phaser.Math.Vector2[])} [out] - An optional array to store the points in. * - * @return {Phaser.Math.Vector2[]} [description] + * @return {Phaser.Math.Vector2[]} An array of points. */ - getSpacedPoints: function (divisions) + getSpacedPoints: function (divisions, stepRate, out) { - if (divisions === undefined) { divisions = this.defaultDivisions; } + if (out === undefined) { out = []; } - var points = []; + // If divisions is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. + if (!divisions) + { + if (!stepRate) + { + divisions = this.defaultDivisions; + } + else + { + divisions = this.getLength() / stepRate; + } + } for (var d = 0; d <= divisions; d++) { var t = this.getUtoTmapping(d / divisions, null, divisions); - points.push(this.getPoint(t)); + out.push(this.getPoint(t)); } - return points; + return out; }, /** - * [description] + * Get a point at the start of the curve. * * @method Phaser.Curves.Curve#getStartPoint * @since 3.0.0 * * @generic {Phaser.Math.Vector2} O - [out,$return] * - * @param {Phaser.Math.Vector2} [out] - [description] + * @param {Phaser.Math.Vector2} [out] - A point to store the result in. * - * @return {Phaser.Math.Vector2} [description] + * @return {Phaser.Math.Vector2} The point. */ getStartPoint: function (out) { @@ -17071,7 +17788,7 @@ var Curve = new Class({ }, /** - * Returns a unit vector tangent at t + * Get a unit vector tangent at a relative position on the curve. * In case any sub curve does not implement its tangent derivation, * 2 points a small delta apart will be used to find its gradient * which seems to give a reasonable approximation @@ -17081,8 +17798,8 @@ var Curve = new Class({ * * @generic {Phaser.Math.Vector2} O - [out,$return] * - * @param {number} t - [description] - * @param {Phaser.Math.Vector2} [out] - [description] + * @param {number} t - The relative position on the curve, [0..1]. + * @param {Phaser.Math.Vector2} [out] - A vector to store the result in. * * @return {Phaser.Math.Vector2} Vector approximating the tangent line at the point t (delta +/- 0.0001) */ @@ -17113,17 +17830,17 @@ var Curve = new Class({ }, /** - * [description] + * Get a unit vector tangent at a relative position on the curve, by arc length. * * @method Phaser.Curves.Curve#getTangentAt * @since 3.0.0 * * @generic {Phaser.Math.Vector2} O - [out,$return] * - * @param {number} u - [description] - * @param {Phaser.Math.Vector2} [out] - [description] + * @param {number} u - The relative position on the curve, [0..1]. + * @param {Phaser.Math.Vector2} [out] - A vector to store the result in. * - * @return {Phaser.Math.Vector2} [description] + * @return {Phaser.Math.Vector2} The tangent vector. */ getTangentAt: function (u, out) { @@ -17238,10 +17955,12 @@ var Curve = new Class({ }, /** - * [description] + * Calculate and cache the arc lengths. * * @method Phaser.Curves.Curve#updateArcLengths * @since 3.0.0 + * + * @see Phaser.Curves.Curve#getLengths() */ updateArcLengths: function () { @@ -17256,12 +17975,12 @@ module.exports = Curve; /***/ }), -/* 86 */ +/* 87 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -17271,31 +17990,31 @@ module.exports = Curve; module.exports = { - ADD: __webpack_require__(881), - COMPLETE: __webpack_require__(882), - FILE_COMPLETE: __webpack_require__(883), - FILE_KEY_COMPLETE: __webpack_require__(884), - FILE_LOAD_ERROR: __webpack_require__(885), - FILE_LOAD: __webpack_require__(886), - FILE_PROGRESS: __webpack_require__(887), - POST_PROCESS: __webpack_require__(888), - PROGRESS: __webpack_require__(889), - START: __webpack_require__(890) + ADD: __webpack_require__(893), + COMPLETE: __webpack_require__(894), + FILE_COMPLETE: __webpack_require__(895), + FILE_KEY_COMPLETE: __webpack_require__(896), + FILE_LOAD_ERROR: __webpack_require__(897), + FILE_LOAD: __webpack_require__(898), + FILE_PROGRESS: __webpack_require__(899), + POST_PROCESS: __webpack_require__(900), + PROGRESS: __webpack_require__(901), + START: __webpack_require__(902) }; /***/ }), -/* 87 */ +/* 88 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clone = __webpack_require__(72); +var Clone = __webpack_require__(73); /** * Creates a new Object using all values from obj1 and obj2. @@ -17331,19 +18050,19 @@ module.exports = Merge; /***/ }), -/* 88 */ +/* 89 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var ImageRender = __webpack_require__(988); +var ImageRender = __webpack_require__(1000); /** * @classdesc @@ -17432,17 +18151,17 @@ module.exports = Image; /***/ }), -/* 89 */ +/* 90 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var EaseMap = __webpack_require__(175); -var UppercaseFirst = __webpack_require__(191); +var EaseMap = __webpack_require__(179); +var UppercaseFirst = __webpack_require__(194); /** * This internal function is used to return the correct ease function for a Tween. @@ -17541,12 +18260,12 @@ module.exports = GetEaseFunction; /***/ }), -/* 90 */ +/* 91 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -17570,12 +18289,12 @@ module.exports = HasValue; /***/ }), -/* 91 */ +/* 92 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -17623,12 +18342,12 @@ module.exports = Contains; /***/ }), -/* 92 */ +/* 93 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -17699,12 +18418,12 @@ module.exports = LineToLine; /***/ }), -/* 93 */ +/* 94 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -17727,7 +18446,142 @@ module.exports = Angle; /***/ }), -/* 94 */ +/* 95 */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* The `Matter.Sleeping` module contains methods to manage the sleeping state of bodies. +* +* @class Sleeping +*/ + +var Sleeping = {}; + +module.exports = Sleeping; + +var Events = __webpack_require__(96); + +(function() { + + Sleeping._motionWakeThreshold = 0.18; + Sleeping._motionSleepThreshold = 0.08; + Sleeping._minBias = 0.9; + + /** + * Puts bodies to sleep or wakes them up depending on their motion. + * @method update + * @param {body[]} bodies + * @param {number} timeScale + */ + Sleeping.update = function(bodies, timeScale) { + var timeFactor = timeScale * timeScale * timeScale; + + // update bodies sleeping status + for (var i = 0; i < bodies.length; i++) { + var body = bodies[i], + motion = body.speed * body.speed + body.angularSpeed * body.angularSpeed; + + // wake up bodies if they have a force applied + if (body.force.x !== 0 || body.force.y !== 0) { + Sleeping.set(body, false); + continue; + } + + var minMotion = Math.min(body.motion, motion), + maxMotion = Math.max(body.motion, motion); + + // biased average motion estimation between frames + body.motion = Sleeping._minBias * minMotion + (1 - Sleeping._minBias) * maxMotion; + + if (body.sleepThreshold > 0 && body.motion < Sleeping._motionSleepThreshold * timeFactor) { + body.sleepCounter += 1; + + if (body.sleepCounter >= body.sleepThreshold) + Sleeping.set(body, true); + } else if (body.sleepCounter > 0) { + body.sleepCounter -= 1; + } + } + }; + + /** + * Given a set of colliding pairs, wakes the sleeping bodies involved. + * @method afterCollisions + * @param {pair[]} pairs + * @param {number} timeScale + */ + Sleeping.afterCollisions = function(pairs, timeScale) { + var timeFactor = timeScale * timeScale * timeScale; + + // wake up bodies involved in collisions + for (var i = 0; i < pairs.length; i++) { + var pair = pairs[i]; + + // don't wake inactive pairs + if (!pair.isActive) + continue; + + var collision = pair.collision, + bodyA = collision.bodyA.parent, + bodyB = collision.bodyB.parent; + + // don't wake if at least one body is static + if ((bodyA.isSleeping && bodyB.isSleeping) || bodyA.isStatic || bodyB.isStatic) + continue; + + if (bodyA.isSleeping || bodyB.isSleeping) { + var sleepingBody = (bodyA.isSleeping && !bodyA.isStatic) ? bodyA : bodyB, + movingBody = sleepingBody === bodyA ? bodyB : bodyA; + + if (!sleepingBody.isStatic && movingBody.motion > Sleeping._motionWakeThreshold * timeFactor) { + Sleeping.set(sleepingBody, false); + } + } + } + }; + + /** + * Set a body as sleeping or awake. + * @method set + * @param {body} body + * @param {boolean} isSleeping + */ + Sleeping.set = function(body, isSleeping) { + var wasSleeping = body.isSleeping; + + if (isSleeping) { + body.isSleeping = true; + body.sleepCounter = body.sleepThreshold; + + body.positionImpulse.x = 0; + body.positionImpulse.y = 0; + + body.positionPrev.x = body.position.x; + body.positionPrev.y = body.position.y; + + body.anglePrev = body.angle; + body.speed = 0; + body.angularSpeed = 0; + body.motion = 0; + + if (!wasSleeping) { + Events.trigger(body, 'sleepStart'); + } + } else { + body.isSleeping = false; + body.sleepCounter = 0; + + if (wasSleeping) { + Events.trigger(body, 'sleepEnd'); + } + } + }; + +})(); + + +/***/ }), +/* 96 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17742,7 +18596,7 @@ var Events = {}; module.exports = Events; -var Common = __webpack_require__(18); +var Common = __webpack_require__(19); (function() { @@ -17845,475 +18699,150 @@ var Common = __webpack_require__(18); /***/ }), -/* 95 */ -/***/ (function(module, exports, __webpack_require__) { +/* 97 */ +/***/ (function(module, exports) { /** -* The `Matter.Constraint` module contains methods for creating and manipulating constraints. -* Constraints are used for specifying that a fixed distance must be maintained between two bodies (or a body and a fixed world-space position). -* The stiffness of constraints can be modified to create springs or elastic. -* -* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). -* -* @class Constraint -*/ + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ -var Constraint = {}; - -module.exports = Constraint; - -var Vertices = __webpack_require__(31); -var Vector = __webpack_require__(37); -var Sleeping = __webpack_require__(112); -var Bounds = __webpack_require__(38); -var Axes = __webpack_require__(230); -var Common = __webpack_require__(18); - -(function() { - - Constraint._warming = 0.4; - Constraint._torqueDampen = 1; - Constraint._minLength = 0.000001; +var ALIGN_CONST = { /** - * Creates a new constraint. - * All properties have default values, and many are pre-calculated automatically based on other properties. - * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` value (e.g. `0.7` or above). - * If the constraint is unstable, try lowering the `stiffness` value and / or increasing `engine.constraintIterations`. - * For compound bodies, constraints must be applied to the parent body (not one of its parts). - * See the properties section below for detailed information on what you can pass via the `options` object. - * @method create - * @param {} options - * @return {constraint} constraint - */ - Constraint.create = function(options) { - var constraint = options; - - // if bodies defined but no points, use body centre - if (constraint.bodyA && !constraint.pointA) - constraint.pointA = { x: 0, y: 0 }; - if (constraint.bodyB && !constraint.pointB) - constraint.pointB = { x: 0, y: 0 }; - - // calculate static length using initial world space points - var initialPointA = constraint.bodyA ? Vector.add(constraint.bodyA.position, constraint.pointA) : constraint.pointA, - initialPointB = constraint.bodyB ? Vector.add(constraint.bodyB.position, constraint.pointB) : constraint.pointB, - length = Vector.magnitude(Vector.sub(initialPointA, initialPointB)); - - constraint.length = typeof constraint.length !== 'undefined' ? constraint.length : length; - - // option defaults - constraint.id = constraint.id || Common.nextId(); - constraint.label = constraint.label || 'Constraint'; - constraint.type = 'constraint'; - constraint.stiffness = constraint.stiffness || (constraint.length > 0 ? 1 : 0.7); - constraint.damping = constraint.damping || 0; - constraint.angularStiffness = constraint.angularStiffness || 0; - constraint.angleA = constraint.bodyA ? constraint.bodyA.angle : constraint.angleA; - constraint.angleB = constraint.bodyB ? constraint.bodyB.angle : constraint.angleB; - constraint.plugin = {}; - - // render - var render = { - visible: true, - lineWidth: 2, - strokeStyle: '#ffffff', - type: 'line', - anchors: true - }; - - if (constraint.length === 0 && constraint.stiffness > 0.1) { - render.type = 'pin'; - render.anchors = false; - } else if (constraint.stiffness < 0.9) { - render.type = 'spring'; - } - - constraint.render = Common.extend(render, constraint.render); - - return constraint; - }; - - /** - * Prepares for solving by constraint warming. - * @private - * @method preSolveAll - * @param {body[]} bodies - */ - Constraint.preSolveAll = function(bodies) { - for (var i = 0; i < bodies.length; i += 1) { - var body = bodies[i], - impulse = body.constraintImpulse; - - if (body.isStatic || (impulse.x === 0 && impulse.y === 0 && impulse.angle === 0)) { - continue; - } - - body.position.x += impulse.x; - body.position.y += impulse.y; - body.angle += impulse.angle; - } - }; - - /** - * Solves all constraints in a list of collisions. - * @private - * @method solveAll - * @param {constraint[]} constraints - * @param {number} timeScale - */ - Constraint.solveAll = function(constraints, timeScale) { - // Solve fixed constraints first. - for (var i = 0; i < constraints.length; i += 1) { - var constraint = constraints[i], - fixedA = !constraint.bodyA || (constraint.bodyA && constraint.bodyA.isStatic), - fixedB = !constraint.bodyB || (constraint.bodyB && constraint.bodyB.isStatic); - - if (fixedA || fixedB) { - Constraint.solve(constraints[i], timeScale); - } - } - - // Solve free constraints last. - for (i = 0; i < constraints.length; i += 1) { - constraint = constraints[i]; - fixedA = !constraint.bodyA || (constraint.bodyA && constraint.bodyA.isStatic); - fixedB = !constraint.bodyB || (constraint.bodyB && constraint.bodyB.isStatic); - - if (!fixedA && !fixedB) { - Constraint.solve(constraints[i], timeScale); - } - } - }; - - /** - * Solves a distance constraint with Gauss-Siedel method. - * @private - * @method solve - * @param {constraint} constraint - * @param {number} timeScale - */ - Constraint.solve = function(constraint, timeScale) { - var bodyA = constraint.bodyA, - bodyB = constraint.bodyB, - pointA = constraint.pointA, - pointB = constraint.pointB; - - if (!bodyA && !bodyB) - return; - - // update reference angle - if (bodyA && !bodyA.isStatic) { - Vector.rotate(pointA, bodyA.angle - constraint.angleA, pointA); - constraint.angleA = bodyA.angle; - } - - // update reference angle - if (bodyB && !bodyB.isStatic) { - Vector.rotate(pointB, bodyB.angle - constraint.angleB, pointB); - constraint.angleB = bodyB.angle; - } - - var pointAWorld = pointA, - pointBWorld = pointB; - - if (bodyA) pointAWorld = Vector.add(bodyA.position, pointA); - if (bodyB) pointBWorld = Vector.add(bodyB.position, pointB); - - if (!pointAWorld || !pointBWorld) - return; - - var delta = Vector.sub(pointAWorld, pointBWorld), - currentLength = Vector.magnitude(delta); - - // prevent singularity - if (currentLength < Constraint._minLength) { - currentLength = Constraint._minLength; - } - - // solve distance constraint with Gauss-Siedel method - var difference = (currentLength - constraint.length) / currentLength, - stiffness = constraint.stiffness < 1 ? constraint.stiffness * timeScale : constraint.stiffness, - force = Vector.mult(delta, difference * stiffness), - massTotal = (bodyA ? bodyA.inverseMass : 0) + (bodyB ? bodyB.inverseMass : 0), - inertiaTotal = (bodyA ? bodyA.inverseInertia : 0) + (bodyB ? bodyB.inverseInertia : 0), - resistanceTotal = massTotal + inertiaTotal, - torque, - share, - normal, - normalVelocity, - relativeVelocity; - - if (constraint.damping) { - var zero = Vector.create(); - normal = Vector.div(delta, currentLength); - - relativeVelocity = Vector.sub( - bodyB && Vector.sub(bodyB.position, bodyB.positionPrev) || zero, - bodyA && Vector.sub(bodyA.position, bodyA.positionPrev) || zero - ); - - normalVelocity = Vector.dot(normal, relativeVelocity); - } - - if (bodyA && !bodyA.isStatic) { - share = bodyA.inverseMass / massTotal; - - // keep track of applied impulses for post solving - bodyA.constraintImpulse.x -= force.x * share; - bodyA.constraintImpulse.y -= force.y * share; - - // apply forces - bodyA.position.x -= force.x * share; - bodyA.position.y -= force.y * share; - - // apply damping - if (constraint.damping) { - bodyA.positionPrev.x -= constraint.damping * normal.x * normalVelocity * share; - bodyA.positionPrev.y -= constraint.damping * normal.y * normalVelocity * share; - } - - // apply torque - torque = (Vector.cross(pointA, force) / resistanceTotal) * Constraint._torqueDampen * bodyA.inverseInertia * (1 - constraint.angularStiffness); - bodyA.constraintImpulse.angle -= torque; - bodyA.angle -= torque; - } - - if (bodyB && !bodyB.isStatic) { - share = bodyB.inverseMass / massTotal; - - // keep track of applied impulses for post solving - bodyB.constraintImpulse.x += force.x * share; - bodyB.constraintImpulse.y += force.y * share; - - // apply forces - bodyB.position.x += force.x * share; - bodyB.position.y += force.y * share; - - // apply damping - if (constraint.damping) { - bodyB.positionPrev.x += constraint.damping * normal.x * normalVelocity * share; - bodyB.positionPrev.y += constraint.damping * normal.y * normalVelocity * share; - } - - // apply torque - torque = (Vector.cross(pointB, force) / resistanceTotal) * Constraint._torqueDampen * bodyB.inverseInertia * (1 - constraint.angularStiffness); - bodyB.constraintImpulse.angle += torque; - bodyB.angle += torque; - } - - }; - - /** - * Performs body updates required after solving constraints. - * @private - * @method postSolveAll - * @param {body[]} bodies - */ - Constraint.postSolveAll = function(bodies) { - for (var i = 0; i < bodies.length; i++) { - var body = bodies[i], - impulse = body.constraintImpulse; - - if (body.isStatic || (impulse.x === 0 && impulse.y === 0 && impulse.angle === 0)) { - continue; - } - - Sleeping.set(body, false); - - // update geometry and reset - for (var j = 0; j < body.parts.length; j++) { - var part = body.parts[j]; - - Vertices.translate(part.vertices, impulse); - - if (j > 0) { - part.position.x += impulse.x; - part.position.y += impulse.y; - } - - if (impulse.angle !== 0) { - Vertices.rotate(part.vertices, impulse.angle, body.position); - Axes.rotate(part.axes, impulse.angle); - if (j > 0) { - Vector.rotateAbout(part.position, impulse.angle, body.position, part.position); - } - } - - Bounds.update(part.bounds, part.vertices, body.velocity); - } - - // dampen the cached impulse for warming next step - impulse.angle *= Constraint._warming; - impulse.x *= Constraint._warming; - impulse.y *= Constraint._warming; - } - }; - - /* - * - * Properties Documentation - * + * A constant representing a top-left alignment or position. + * @constant + * @name Phaser.Display.Align.TOP_LEFT + * @since 3.0.0 + * @type {integer} */ + TOP_LEFT: 0, /** - * An integer `Number` uniquely identifying number generated in `Composite.create` by `Common.nextId`. - * - * @property id - * @type number - */ + * A constant representing a top-center alignment or position. + * @constant + * @name Phaser.Display.Align.TOP_CENTER + * @since 3.0.0 + * @type {integer} + */ + TOP_CENTER: 1, /** - * A `String` denoting the type of object. - * - * @property type - * @type string - * @default "constraint" - * @readOnly - */ + * A constant representing a top-right alignment or position. + * @constant + * @name Phaser.Display.Align.TOP_RIGHT + * @since 3.0.0 + * @type {integer} + */ + TOP_RIGHT: 2, /** - * An arbitrary `String` name to help the user identify and manage bodies. - * - * @property label - * @type string - * @default "Constraint" - */ + * A constant representing a left-top alignment or position. + * @constant + * @name Phaser.Display.Align.LEFT_TOP + * @since 3.0.0 + * @type {integer} + */ + LEFT_TOP: 3, /** - * An `Object` that defines the rendering properties to be consumed by the module `Matter.Render`. - * - * @property render - * @type object - */ + * A constant representing a left-center alignment or position. + * @constant + * @name Phaser.Display.Align.LEFT_CENTER + * @since 3.0.0 + * @type {integer} + */ + LEFT_CENTER: 4, /** - * A flag that indicates if the constraint should be rendered. - * - * @property render.visible - * @type boolean - * @default true - */ + * A constant representing a left-bottom alignment or position. + * @constant + * @name Phaser.Display.Align.LEFT_BOTTOM + * @since 3.0.0 + * @type {integer} + */ + LEFT_BOTTOM: 5, /** - * A `Number` that defines the line width to use when rendering the constraint outline. - * A value of `0` means no outline will be rendered. - * - * @property render.lineWidth - * @type number - * @default 2 - */ + * A constant representing a center alignment or position. + * @constant + * @name Phaser.Display.Align.CENTER + * @since 3.0.0 + * @type {integer} + */ + CENTER: 6, /** - * A `String` that defines the stroke style to use when rendering the constraint outline. - * It is the same as when using a canvas, so it accepts CSS style property values. - * - * @property render.strokeStyle - * @type string - * @default a random colour - */ + * A constant representing a right-top alignment or position. + * @constant + * @name Phaser.Display.Align.RIGHT_TOP + * @since 3.0.0 + * @type {integer} + */ + RIGHT_TOP: 7, /** - * A `String` that defines the constraint rendering type. - * The possible values are 'line', 'pin', 'spring'. - * An appropriate render type will be automatically chosen unless one is given in options. - * - * @property render.type - * @type string - * @default 'line' - */ + * A constant representing a right-center alignment or position. + * @constant + * @name Phaser.Display.Align.RIGHT_CENTER + * @since 3.0.0 + * @type {integer} + */ + RIGHT_CENTER: 8, /** - * A `Boolean` that defines if the constraint's anchor points should be rendered. - * - * @property render.anchors - * @type boolean - * @default true - */ + * A constant representing a right-bottom alignment or position. + * @constant + * @name Phaser.Display.Align.RIGHT_BOTTOM + * @since 3.0.0 + * @type {integer} + */ + RIGHT_BOTTOM: 9, /** - * The first possible `Body` that this constraint is attached to. - * - * @property bodyA - * @type body - * @default null - */ + * A constant representing a bottom-left alignment or position. + * @constant + * @name Phaser.Display.Align.BOTTOM_LEFT + * @since 3.0.0 + * @type {integer} + */ + BOTTOM_LEFT: 10, /** - * The second possible `Body` that this constraint is attached to. - * - * @property bodyB - * @type body - * @default null - */ + * A constant representing a bottom-center alignment or position. + * @constant + * @name Phaser.Display.Align.BOTTOM_CENTER + * @since 3.0.0 + * @type {integer} + */ + BOTTOM_CENTER: 11, /** - * A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyA` if defined, otherwise a world-space position. - * - * @property pointA - * @type vector - * @default { x: 0, y: 0 } - */ + * A constant representing a bottom-right alignment or position. + * @constant + * @name Phaser.Display.Align.BOTTOM_RIGHT + * @since 3.0.0 + * @type {integer} + */ + BOTTOM_RIGHT: 12 - /** - * A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyB` if defined, otherwise a world-space position. - * - * @property pointB - * @type vector - * @default { x: 0, y: 0 } - */ +}; - /** - * A `Number` that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. - * A value of `1` means the constraint should be very stiff. - * A value of `0.2` means the constraint acts like a soft spring. - * - * @property stiffness - * @type number - * @default 1 - */ - - /** - * A `Number` that specifies the damping of the constraint, - * i.e. the amount of resistance applied to each body based on their velocities to limit the amount of oscillation. - * Damping will only be apparent when the constraint also has a very low `stiffness`. - * A value of `0.1` means the constraint will apply heavy damping, resulting in little to no oscillation. - * A value of `0` means the constraint will apply no damping. - * - * @property damping - * @type number - * @default 0 - */ - - /** - * A `Number` that specifies the target resting length of the constraint. - * It is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. - * - * @property length - * @type number - */ - - /** - * An object reserved for storing plugin-specific properties. - * - * @property plugin - * @type {} - */ - -})(); +module.exports = ALIGN_CONST; /***/ }), -/* 96 */ +/* 98 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(24); +var Clamp = __webpack_require__(20); /** * Return a value based on the range between `min` and `max` and the percentage given. @@ -18338,12 +18867,12 @@ module.exports = FromPercent; /***/ }), -/* 97 */ +/* 99 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18379,12 +18908,12 @@ module.exports = GetBoolean; /***/ }), -/* 98 */ +/* 100 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18551,17 +19080,17 @@ module.exports = TWEEN_CONST; /***/ }), -/* 99 */ +/* 101 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Events = __webpack_require__(284); +var Events = __webpack_require__(303); /** * @callback DataEachCallback @@ -19192,12 +19721,12 @@ module.exports = DataManager; /***/ }), -/* 100 */ +/* 102 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19207,28 +19736,28 @@ module.exports = DataManager; module.exports = { - DESTROY: __webpack_require__(588), - VIDEO_COMPLETE: __webpack_require__(589), - VIDEO_CREATED: __webpack_require__(590), - VIDEO_ERROR: __webpack_require__(591), - VIDEO_LOOP: __webpack_require__(592), - VIDEO_PLAY: __webpack_require__(593), - VIDEO_SEEKED: __webpack_require__(594), - VIDEO_SEEKING: __webpack_require__(595), - VIDEO_STOP: __webpack_require__(596), - VIDEO_TIMEOUT: __webpack_require__(597), - VIDEO_UNLOCKED: __webpack_require__(598) + DESTROY: __webpack_require__(608), + VIDEO_COMPLETE: __webpack_require__(609), + VIDEO_CREATED: __webpack_require__(610), + VIDEO_ERROR: __webpack_require__(611), + VIDEO_LOOP: __webpack_require__(612), + VIDEO_PLAY: __webpack_require__(613), + VIDEO_SEEKED: __webpack_require__(614), + VIDEO_SEEKING: __webpack_require__(615), + VIDEO_STOP: __webpack_require__(616), + VIDEO_TIMEOUT: __webpack_require__(617), + VIDEO_UNLOCKED: __webpack_require__(618) }; /***/ }), -/* 101 */ +/* 103 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19236,10 +19765,10 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var DegToRad = __webpack_require__(40); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(53); +var Events = __webpack_require__(55); var Rectangle = __webpack_require__(11); var TransformMatrix = __webpack_require__(35); -var ValueToColor = __webpack_require__(170); +var ValueToColor = __webpack_require__(174); var Vector2 = __webpack_require__(3); /** @@ -19805,7 +20334,7 @@ var BaseCamera = new Class({ * * @param {number} x - The horizontal coordinate to center on. * @param {number} y - The vertical coordinate to center on. - * @param {Phaser.Math.Vector2} [out] - A Vec2 to store the values in. If not given a new Vec2 is created. + * @param {Phaser.Math.Vector2} [out] - A Vector2 to store the values in. If not given a new Vector2 is created. * * @return {Phaser.Math.Vector2} The scroll coordinates stored in the `x` and `y` properties. */ @@ -21144,12 +21673,12 @@ module.exports = BaseCamera; /***/ }), -/* 102 */ +/* 104 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21159,23 +21688,23 @@ module.exports = BaseCamera; module.exports = { - ENTER_FULLSCREEN: __webpack_require__(706), - FULLSCREEN_FAILED: __webpack_require__(707), - FULLSCREEN_UNSUPPORTED: __webpack_require__(708), - LEAVE_FULLSCREEN: __webpack_require__(709), - ORIENTATION_CHANGE: __webpack_require__(710), - RESIZE: __webpack_require__(711) + ENTER_FULLSCREEN: __webpack_require__(726), + FULLSCREEN_FAILED: __webpack_require__(727), + FULLSCREEN_UNSUPPORTED: __webpack_require__(728), + LEAVE_FULLSCREEN: __webpack_require__(729), + ORIENTATION_CHANGE: __webpack_require__(730), + RESIZE: __webpack_require__(731) }; /***/ }), -/* 103 */ +/* 105 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21214,17 +21743,17 @@ module.exports = SnapFloor; /***/ }), -/* 104 */ +/* 106 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Clamp = __webpack_require__(24); +var Clamp = __webpack_require__(20); var Extend = __webpack_require__(17); /** @@ -22033,21 +22562,21 @@ module.exports = Frame; /***/ }), -/* 105 */ +/* 107 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(106); -var GetPoint = __webpack_require__(402); -var GetPoints = __webpack_require__(403); -var GEOM_CONST = __webpack_require__(51); -var Random = __webpack_require__(163); +var Contains = __webpack_require__(108); +var GetPoint = __webpack_require__(421); +var GetPoints = __webpack_require__(422); +var GEOM_CONST = __webpack_require__(52); +var Random = __webpack_require__(167); /** * @classdesc @@ -22173,11 +22702,13 @@ var Ellipse = new Class({ * @method Phaser.Geom.Ellipse#getPoints * @since 3.0.0 * + * @generic {Phaser.Geom.Point[]} O - [output,$return] + * * @param {integer} quantity - The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead. * @param {number} [stepRate] - Sets the quantity by getting the circumference of the ellipse and dividing it by the stepRate. - * @param {array} [output] - An array to insert the points in to. If not provided a new array will be created. + * @param {(array|Phaser.Geom.Point[])} [output] - An array to insert the points in to. If not provided a new array will be created. * - * @return {Phaser.Geom.Point[]} An array of Point objects pertaining to the points around the circumference of the ellipse. + * @return {(array|Phaser.Geom.Point[])} An array of Point objects pertaining to the points around the circumference of the ellipse. */ getPoints: function (quantity, stepRate, output) { @@ -22413,12 +22944,12 @@ module.exports = Ellipse; /***/ }), -/* 106 */ +/* 108 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22455,23 +22986,23 @@ module.exports = Contains; /***/ }), -/* 107 */ +/* 109 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Actions = __webpack_require__(253); +var Actions = __webpack_require__(259); var Class = __webpack_require__(0); -var Events = __webpack_require__(100); +var Events = __webpack_require__(102); var GetFastValue = __webpack_require__(1); var GetValue = __webpack_require__(5); var IsPlainObject = __webpack_require__(7); -var Range = __webpack_require__(396); -var Set = __webpack_require__(108); +var Range = __webpack_require__(415); +var Set = __webpack_require__(110); var Sprite = __webpack_require__(65); /** @@ -22674,6 +23205,28 @@ var Group = new Class({ */ this.createMultipleCallback = GetFastValue(config, 'createMultipleCallback', null); + /** + * A function to be called when adding or creating group members. + * For internal use only by a Group, or any class that extends it. + * + * @name Phaser.GameObjects.Group#internalCreateCallback + * @type {?Phaser.Types.GameObjects.Group.GroupCallback} + * @private + * @since 3.22.0 + */ + this.internalCreateCallback = GetFastValue(config, 'internalCreateCallback', null); + + /** + * A function to be called when removing group members. + * For internal use only by a Group, or any class that extends it. + * + * @name Phaser.GameObjects.Group#internalRemoveCallback + * @type {?Phaser.Types.GameObjects.Group.GroupCallback} + * @private + * @since 3.22.0 + */ + this.internalRemoveCallback = GetFastValue(config, 'internalRemoveCallback', null); + if (config) { this.createMultiple(config); @@ -22972,6 +23525,11 @@ var Group = new Class({ this.children.set(child); + if (this.internalCreateCallback) + { + this.internalCreateCallback.call(this, child); + } + if (this.createCallback) { this.createCallback.call(this, child); @@ -23046,6 +23604,11 @@ var Group = new Class({ this.children.delete(child); + if (this.internalRemoveCallback) + { + this.internalRemoveCallback.call(this, child); + } + if (this.removeCallback) { this.removeCallback.call(this, child); @@ -24061,12 +24624,12 @@ module.exports = Group; /***/ }), -/* 108 */ +/* 110 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24510,12 +25073,12 @@ module.exports = Set; /***/ }), -/* 109 */ +/* 111 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24574,12 +25137,12 @@ module.exports = FillPathWebGL; /***/ }), -/* 110 */ +/* 112 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24653,12 +25216,12 @@ module.exports = { /***/ }), -/* 111 */ +/* 113 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24721,134 +25284,125 @@ module.exports = { /***/ }), -/* 112 */ -/***/ (function(module, exports, __webpack_require__) { +/* 114 */ +/***/ (function(module, exports) { /** -* The `Matter.Sleeping` module contains methods to manage the sleeping state of bodies. +* The `Matter.Pair` module contains methods for creating and manipulating collision pairs. * -* @class Sleeping +* @class Pair */ -var Sleeping = {}; +var Pair = {}; -module.exports = Sleeping; - -var Events = __webpack_require__(94); +module.exports = Pair; (function() { + + /** + * Creates a pair. + * @method create + * @param {collision} collision + * @param {number} timestamp + * @return {pair} A new pair + */ + Pair.create = function(collision, timestamp) { + var bodyA = collision.bodyA, + bodyB = collision.bodyB; - Sleeping._motionWakeThreshold = 0.18; - Sleeping._motionSleepThreshold = 0.08; - Sleeping._minBias = 0.9; + var pair = { + id: Pair.id(bodyA, bodyB), + bodyA: bodyA, + bodyB: bodyB, + activeContacts: [], + separation: 0, + isActive: true, + confirmedActive: true, + isSensor: bodyA.isSensor || bodyB.isSensor, + timeCreated: timestamp, + timeUpdated: timestamp, + collision: null, + inverseMass: 0, + friction: 0, + frictionStatic: 0, + restitution: 0, + slop: 0 + }; + + Pair.update(pair, collision, timestamp); + + return pair; + }; /** - * Puts bodies to sleep or wakes them up depending on their motion. + * Updates a pair given a collision. * @method update - * @param {body[]} bodies - * @param {number} timeScale + * @param {pair} pair + * @param {collision} collision + * @param {number} timestamp */ - Sleeping.update = function(bodies, timeScale) { - var timeFactor = timeScale * timeScale * timeScale; + Pair.update = function(pair, collision, timestamp) { + pair.collision = collision; - // update bodies sleeping status - for (var i = 0; i < bodies.length; i++) { - var body = bodies[i], - motion = body.speed * body.speed + body.angularSpeed * body.angularSpeed; + if (collision.collided) { + var supports = collision.supports, + activeContacts = pair.activeContacts, + parentA = collision.parentA, + parentB = collision.parentB; - // wake up bodies if they have a force applied - if (body.force.x !== 0 || body.force.y !== 0) { - Sleeping.set(body, false); - continue; + pair.inverseMass = parentA.inverseMass + parentB.inverseMass; + pair.friction = Math.min(parentA.friction, parentB.friction); + pair.frictionStatic = Math.max(parentA.frictionStatic, parentB.frictionStatic); + pair.restitution = Math.max(parentA.restitution, parentB.restitution); + pair.slop = Math.max(parentA.slop, parentB.slop); + + for (var i = 0; i < supports.length; i++) { + activeContacts[i] = supports[i].contact; } - var minMotion = Math.min(body.motion, motion), - maxMotion = Math.max(body.motion, motion); - - // biased average motion estimation between frames - body.motion = Sleeping._minBias * minMotion + (1 - Sleeping._minBias) * maxMotion; - - if (body.sleepThreshold > 0 && body.motion < Sleeping._motionSleepThreshold * timeFactor) { - body.sleepCounter += 1; - - if (body.sleepCounter >= body.sleepThreshold) - Sleeping.set(body, true); - } else if (body.sleepCounter > 0) { - body.sleepCounter -= 1; + // optimise array size + var supportCount = supports.length; + if (supportCount < activeContacts.length) { + activeContacts.length = supportCount; } - } - }; - /** - * Given a set of colliding pairs, wakes the sleeping bodies involved. - * @method afterCollisions - * @param {pair[]} pairs - * @param {number} timeScale - */ - Sleeping.afterCollisions = function(pairs, timeScale) { - var timeFactor = timeScale * timeScale * timeScale; - - // wake up bodies involved in collisions - for (var i = 0; i < pairs.length; i++) { - var pair = pairs[i]; - - // don't wake inactive pairs - if (!pair.isActive) - continue; - - var collision = pair.collision, - bodyA = collision.bodyA.parent, - bodyB = collision.bodyB.parent; - - // don't wake if at least one body is static - if ((bodyA.isSleeping && bodyB.isSleeping) || bodyA.isStatic || bodyB.isStatic) - continue; - - if (bodyA.isSleeping || bodyB.isSleeping) { - var sleepingBody = (bodyA.isSleeping && !bodyA.isStatic) ? bodyA : bodyB, - movingBody = sleepingBody === bodyA ? bodyB : bodyA; - - if (!sleepingBody.isStatic && movingBody.motion > Sleeping._motionWakeThreshold * timeFactor) { - Sleeping.set(sleepingBody, false); - } - } - } - }; - - /** - * Set a body as sleeping or awake. - * @method set - * @param {body} body - * @param {boolean} isSleeping - */ - Sleeping.set = function(body, isSleeping) { - var wasSleeping = body.isSleeping; - - if (isSleeping) { - body.isSleeping = true; - body.sleepCounter = body.sleepThreshold; - - body.positionImpulse.x = 0; - body.positionImpulse.y = 0; - - body.positionPrev.x = body.position.x; - body.positionPrev.y = body.position.y; - - body.anglePrev = body.angle; - body.speed = 0; - body.angularSpeed = 0; - body.motion = 0; - - if (!wasSleeping) { - Events.trigger(body, 'sleepStart'); - } + pair.separation = collision.depth; + Pair.setActive(pair, true, timestamp); } else { - body.isSleeping = false; - body.sleepCounter = 0; + if (pair.isActive === true) + Pair.setActive(pair, false, timestamp); + } + }; + + /** + * Set a pair as active or inactive. + * @method setActive + * @param {pair} pair + * @param {bool} isActive + * @param {number} timestamp + */ + Pair.setActive = function(pair, isActive, timestamp) { + if (isActive) { + pair.isActive = true; + pair.timeUpdated = timestamp; + } else { + pair.isActive = false; + pair.activeContacts.length = 0; + } + }; - if (wasSleeping) { - Events.trigger(body, 'sleepEnd'); - } + /** + * Get the id for the given pair. + * @method id + * @param {body} bodyA + * @param {body} bodyB + * @return {string} Unique pairId + */ + Pair.id = function(bodyA, bodyB) { + if (bodyA.id < bodyB.id) { + return 'A' + bodyA.id + 'B' + bodyB.id; + } else { + return 'A' + bodyB.id + 'B' + bodyA.id; } }; @@ -24856,12 +25410,12 @@ var Events = __webpack_require__(94); /***/ }), -/* 113 */ +/* 115 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24887,12 +25441,12 @@ module.exports = IsInLayerBounds; /***/ }), -/* 114 */ +/* 116 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25086,7 +25640,7 @@ var LayerData = new Class({ * An array of the tile indexes * * @name Phaser.Tilemaps.LayerData#data - * @type {(number[])} + * @type {Phaser.Tilemaps.Tile[][]} * @since 3.0.0 */ this.data = GetFastValue(config, 'data', []); @@ -25107,12 +25661,12 @@ module.exports = LayerData; /***/ }), -/* 115 */ +/* 117 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25332,23 +25886,23 @@ module.exports = MapData; /***/ }), -/* 116 */ +/* 118 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlendModes = __webpack_require__(42); -var Circle = __webpack_require__(70); -var CircleContains = __webpack_require__(59); +var BlendModes = __webpack_require__(43); +var Circle = __webpack_require__(71); +var CircleContains = __webpack_require__(60); var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); var Rectangle = __webpack_require__(11); -var RectangleContains = __webpack_require__(52); +var RectangleContains = __webpack_require__(53); /** * @classdesc @@ -25645,12 +26199,12 @@ module.exports = Zone; /***/ }), -/* 117 */ +/* 119 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25660,35 +26214,35 @@ module.exports = Zone; module.exports = { - ADD_ANIMATION: __webpack_require__(540), - ANIMATION_COMPLETE: __webpack_require__(541), - ANIMATION_REPEAT: __webpack_require__(542), - ANIMATION_RESTART: __webpack_require__(543), - ANIMATION_START: __webpack_require__(544), - PAUSE_ALL: __webpack_require__(545), - REMOVE_ANIMATION: __webpack_require__(546), - RESUME_ALL: __webpack_require__(547), - SPRITE_ANIMATION_COMPLETE: __webpack_require__(548), - SPRITE_ANIMATION_KEY_COMPLETE: __webpack_require__(549), - SPRITE_ANIMATION_KEY_REPEAT: __webpack_require__(550), - SPRITE_ANIMATION_KEY_RESTART: __webpack_require__(551), - SPRITE_ANIMATION_KEY_START: __webpack_require__(552), - SPRITE_ANIMATION_KEY_UPDATE: __webpack_require__(553), - SPRITE_ANIMATION_REPEAT: __webpack_require__(554), - SPRITE_ANIMATION_RESTART: __webpack_require__(555), - SPRITE_ANIMATION_START: __webpack_require__(556), - SPRITE_ANIMATION_UPDATE: __webpack_require__(557) + ADD_ANIMATION: __webpack_require__(560), + ANIMATION_COMPLETE: __webpack_require__(561), + ANIMATION_REPEAT: __webpack_require__(562), + ANIMATION_RESTART: __webpack_require__(563), + ANIMATION_START: __webpack_require__(564), + PAUSE_ALL: __webpack_require__(565), + REMOVE_ANIMATION: __webpack_require__(566), + RESUME_ALL: __webpack_require__(567), + SPRITE_ANIMATION_COMPLETE: __webpack_require__(568), + SPRITE_ANIMATION_KEY_COMPLETE: __webpack_require__(569), + SPRITE_ANIMATION_KEY_REPEAT: __webpack_require__(570), + SPRITE_ANIMATION_KEY_RESTART: __webpack_require__(571), + SPRITE_ANIMATION_KEY_START: __webpack_require__(572), + SPRITE_ANIMATION_KEY_UPDATE: __webpack_require__(573), + SPRITE_ANIMATION_REPEAT: __webpack_require__(574), + SPRITE_ANIMATION_RESTART: __webpack_require__(575), + SPRITE_ANIMATION_START: __webpack_require__(576), + SPRITE_ANIMATION_UPDATE: __webpack_require__(577) }; /***/ }), -/* 118 */ +/* 120 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25711,12 +26265,12 @@ module.exports = Perimeter; /***/ }), -/* 119 */ +/* 121 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25840,12 +26394,12 @@ module.exports = Pipeline; /***/ }), -/* 120 */ +/* 122 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25857,9 +26411,12 @@ module.exports = Pipeline; * @function Phaser.Utils.Array.Shuffle * @since 3.0.0 * - * @param {array} array - The array to shuffle. This array is modified in place. + * @generic T + * @genericUse {T[]} - [array,$return] * - * @return {array} The shuffled array. + * @param {T[]} array - The array to shuffle. This array is modified in place. + * + * @return {T[]} The shuffled array. */ var Shuffle = function (array) { @@ -25878,12 +26435,12 @@ module.exports = Shuffle; /***/ }), -/* 121 */ +/* 123 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25908,12 +26465,12 @@ module.exports = Linear; /***/ }), -/* 122 */ +/* 124 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26077,19 +26634,19 @@ function init () module.exports = init(); -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(732))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(752))) /***/ }), -/* 123 */ +/* 125 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(122); +var OS = __webpack_require__(124); /** * Determines the browser type and version running this Phaser Game instance. @@ -26190,12 +26747,46 @@ module.exports = init(); /***/ }), -/* 124 */ +/* 126 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Check whether the given values are fuzzily equal. + * + * Two numbers are fuzzily equal if their difference is less than `epsilon`. + * + * @function Phaser.Math.Fuzzy.Equal + * @since 3.0.0 + * + * @param {number} a - The first value. + * @param {number} b - The second value. + * @param {number} [epsilon=0.0001] - The epsilon. + * + * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`. + */ +var Equal = function (a, b, epsilon) +{ + if (epsilon === undefined) { epsilon = 0.0001; } + + return Math.abs(a - b) < epsilon; +}; + +module.exports = Equal; + + +/***/ }), +/* 127 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26220,12 +26811,12 @@ module.exports = IsSizePowerOfTwo; /***/ }), -/* 125 */ +/* 128 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26235,22 +26826,22 @@ module.exports = IsSizePowerOfTwo; module.exports = { - ADD: __webpack_require__(779), - ERROR: __webpack_require__(780), - LOAD: __webpack_require__(781), - READY: __webpack_require__(782), - REMOVE: __webpack_require__(783) + ADD: __webpack_require__(803), + ERROR: __webpack_require__(804), + LOAD: __webpack_require__(805), + READY: __webpack_require__(806), + REMOVE: __webpack_require__(807) }; /***/ }), -/* 126 */ +/* 129 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26303,16 +26894,16 @@ module.exports = AddToDOM; /***/ }), -/* 127 */ +/* 130 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SpliceOne = __webpack_require__(84); +var SpliceOne = __webpack_require__(85); /** * Removes the given item, or array of items, from the array. @@ -26394,12 +26985,12 @@ module.exports = Remove; /***/ }), -/* 128 */ +/* 131 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27300,12 +27891,12 @@ module.exports = KeyCodes; /***/ }), -/* 129 */ +/* 132 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27423,21 +28014,21 @@ module.exports = CONST; /***/ }), -/* 130 */ +/* 133 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Clone = __webpack_require__(72); +var Clone = __webpack_require__(73); var EventEmitter = __webpack_require__(9); var Events = __webpack_require__(64); -var GameEvents = __webpack_require__(19); +var GameEvents = __webpack_require__(21); var NOOP = __webpack_require__(2); /** @@ -27655,8 +28246,9 @@ var BaseSoundManager = new Class({ }, /** - * Enables playing sound on the fly without the need to keep a reference to it. - * Sound will auto destroy once its playback ends. + * Adds a new sound to the sound manager and plays it. + * The sound will be automatically removed (destroyed) once playback ends. + * This lets you play a new sound on the fly without the need to keep a reference to it. * * @method Phaser.Sound.BaseSoundManager#play * @listens Phaser.Sound.Events#COMPLETE @@ -28047,13 +28639,13 @@ module.exports = BaseSoundManager; /***/ }), -/* 131 */ +/* 134 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28547,19 +29139,19 @@ module.exports = BaseSound; /***/ }), -/* 132 */ +/* 135 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayUtils = __webpack_require__(193); +var ArrayUtils = __webpack_require__(196); var Class = __webpack_require__(0); var NOOP = __webpack_require__(2); -var StableSort = __webpack_require__(134); +var StableSort = __webpack_require__(137); /** * @callback EachListCallback @@ -29363,17 +29955,17 @@ module.exports = List; /***/ }), -/* 133 */ +/* 136 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CheckMatrix = __webpack_require__(194); -var TransposeMatrix = __webpack_require__(394); +var CheckMatrix = __webpack_require__(197); +var TransposeMatrix = __webpack_require__(413); /** * Rotates the array matrix based on the given rotation value. @@ -29435,12 +30027,12 @@ module.exports = RotateMatrix; /***/ }), -/* 134 */ +/* 137 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29580,27 +30172,27 @@ else {} })(); /***/ }), -/* 135 */ +/* 138 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var GetBitmapTextSize = __webpack_require__(963); -var ParseFromAtlas = __webpack_require__(964); -var ParseXMLBitmapFont = __webpack_require__(197); -var Render = __webpack_require__(965); +var GetBitmapTextSize = __webpack_require__(975); +var ParseFromAtlas = __webpack_require__(976); +var ParseXMLBitmapFont = __webpack_require__(200); +var Render = __webpack_require__(977); /** * @classdesc * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure. - * + * * During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to * match the font structure. * @@ -29770,7 +30362,7 @@ var BitmapText = new Class({ /** * Internal cache var holding the maxWidth. - * + * * @name Phaser.GameObjects.BitmapText#_maxWidth * @type {number} * @private @@ -30016,7 +30608,7 @@ var BitmapText = new Class({ * If no whitespace was found then no wrapping will take place and consequently the `maxWidth` value will not be honored. * * Disable maxWidth by setting the value to 0. - * + * * You can set the whitespace character to be searched for by setting the `wordWrapCharCode` parameter or property. * * @method Phaser.GameObjects.BitmapText#setMaxWidth @@ -30275,8 +30867,7 @@ BitmapText.ALIGN_RIGHT = 2; * * Adds the parsed Bitmap Font data to the cache with the `fontName` key. * - * @name Phaser.GameObjects.BitmapText.ParseFromAtlas - * @type {function} + * @method Phaser.GameObjects.BitmapText.ParseFromAtlas * @since 3.0.0 * * @param {Phaser.Scene} scene - The Scene to parse the Bitmap Font for. @@ -30294,8 +30885,7 @@ BitmapText.ParseFromAtlas = ParseFromAtlas; /** * Parse an XML font to Bitmap Font data for the Bitmap Font cache. * - * @name Phaser.GameObjects.BitmapText.ParseXMLBitmapFont - * @type {function} + * @method Phaser.GameObjects.BitmapText.ParseXMLBitmapFont * @since 3.17.0 * * @param {XMLDocument} xml - The XML Document to parse the font from. @@ -30311,19 +30901,19 @@ module.exports = BitmapText; /***/ }), -/* 136 */ +/* 139 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var MeshRender = __webpack_require__(1090); +var MeshRender = __webpack_require__(1102); var NOOP = __webpack_require__(2); /** @@ -30339,7 +30929,6 @@ var NOOP = __webpack_require__(2); * * @extends Phaser.GameObjects.Components.BlendMode * @extends Phaser.GameObjects.Components.Depth - * @extends Phaser.GameObjects.Components.GetBounds * @extends Phaser.GameObjects.Components.Mask * @extends Phaser.GameObjects.Components.Pipeline * @extends Phaser.GameObjects.Components.Size @@ -30365,7 +30954,6 @@ var Mesh = new Class({ Mixins: [ Components.BlendMode, Components.Depth, - Components.GetBounds, Components.Mask, Components.Pipeline, Components.Size, @@ -30484,12 +31072,12 @@ module.exports = Mesh; /***/ }), -/* 137 */ +/* 140 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30522,12 +31110,12 @@ module.exports = RectangleToRectangle; /***/ }), -/* 138 */ +/* 141 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30549,11 +31137,10 @@ var InputPluginCache = {}; * Plugin is the object to instantiate to create the plugin * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input) * - * @name Phaser.Input.InputPluginCache.register - * @type {function} + * @function Phaser.Input.InputPluginCache.register * @static * @since 3.10.0 - * + * * @param {string} key - A reference used to get this plugin from the plugin cache. * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated. * @param {string} mapping - If this plugin is to be injected into the Input Plugin, this is the property key used. @@ -30568,11 +31155,10 @@ InputPluginCache.register = function (key, plugin, mapping, settingsKey, configK /** * Returns the input plugin object from the cache based on the given key. * - * @name Phaser.Input.InputPluginCache.getCore - * @type {function} + * @function Phaser.Input.InputPluginCache.getCore * @static * @since 3.10.0 - * + * * @param {string} key - The key of the input plugin to get. * * @return {Phaser.Types.Input.InputPluginContainer} The input plugin object. @@ -30585,11 +31171,10 @@ InputPluginCache.getPlugin = function (key) /** * Installs all of the registered Input Plugins into the given target. * - * @name Phaser.Input.InputPluginCache.install - * @type {function} + * @function Phaser.Input.InputPluginCache.install * @static * @since 3.10.0 - * + * * @param {Phaser.Input.InputPlugin} target - The target InputPlugin to install the plugins into. */ InputPluginCache.install = function (target) @@ -30615,11 +31200,10 @@ InputPluginCache.install = function (target) /** * Removes an input plugin based on the given key. * - * @name Phaser.Input.InputPluginCache.remove - * @type {function} + * @function Phaser.Input.InputPluginCache.remove * @static * @since 3.10.0 - * + * * @param {string} key - The key of the input plugin to remove. */ InputPluginCache.remove = function (key) @@ -30634,12 +31218,12 @@ module.exports = InputPluginCache; /***/ }), -/* 139 */ +/* 142 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30649,24 +31233,24 @@ module.exports = InputPluginCache; module.exports = { - ANY_KEY_DOWN: __webpack_require__(1228), - ANY_KEY_UP: __webpack_require__(1229), - COMBO_MATCH: __webpack_require__(1230), - DOWN: __webpack_require__(1231), - KEY_DOWN: __webpack_require__(1232), - KEY_UP: __webpack_require__(1233), - UP: __webpack_require__(1234) + ANY_KEY_DOWN: __webpack_require__(1240), + ANY_KEY_UP: __webpack_require__(1241), + COMBO_MATCH: __webpack_require__(1242), + DOWN: __webpack_require__(1243), + KEY_DOWN: __webpack_require__(1244), + KEY_UP: __webpack_require__(1245), + UP: __webpack_require__(1246) }; /***/ }), -/* 140 */ +/* 143 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30702,12 +31286,12 @@ module.exports = GetURL; /***/ }), -/* 141 */ +/* 144 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30766,17 +31350,17 @@ module.exports = XHRSettings; /***/ }), -/* 142 */ +/* 145 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Components = __webpack_require__(226); +var Components = __webpack_require__(229); var Sprite = __webpack_require__(65); /** @@ -30867,12 +31451,82 @@ module.exports = ArcadeSprite; /***/ }), -/* 143 */ +/* 146 */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* The `Matter.Axes` module contains methods for creating and manipulating sets of axes. +* +* @class Axes +*/ + +var Axes = {}; + +module.exports = Axes; + +var Vector = __webpack_require__(37); +var Common = __webpack_require__(19); + +(function() { + + /** + * Creates a new set of axes from the given vertices. + * @method fromVertices + * @param {vertices} vertices + * @return {axes} A new axes from the given vertices + */ + Axes.fromVertices = function(vertices) { + var axes = {}; + + // find the unique axes, using edge normal gradients + for (var i = 0; i < vertices.length; i++) { + var j = (i + 1) % vertices.length, + normal = Vector.normalise({ + x: vertices[j].y - vertices[i].y, + y: vertices[i].x - vertices[j].x + }), + gradient = (normal.y === 0) ? Infinity : (normal.x / normal.y); + + // limit precision + gradient = gradient.toFixed(3).toString(); + axes[gradient] = normal; + } + + return Common.values(axes); + }; + + /** + * Rotates a set of axes by the given angle. + * @method rotate + * @param {axes} axes + * @param {number} angle + */ + Axes.rotate = function(axes, angle) { + if (angle === 0) + return; + + var cos = Math.cos(angle), + sin = Math.sin(angle); + + for (var i = 0; i < axes.length; i++) { + var axis = axes[i], + xx; + xx = axis.x * cos - axis.y * sin; + axis.y = axis.x * sin + axis.y * cos; + axis.x = xx; + } + }; + +})(); + + +/***/ }), +/* 147 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30882,155 +31536,418 @@ module.exports = ArcadeSprite; module.exports = { - Bounce: __webpack_require__(1329), - Collision: __webpack_require__(1330), - Force: __webpack_require__(1331), - Friction: __webpack_require__(1332), - Gravity: __webpack_require__(1333), - Mass: __webpack_require__(1334), - Static: __webpack_require__(1335), - Sensor: __webpack_require__(1336), - SetBody: __webpack_require__(1337), - Sleep: __webpack_require__(1338), - Transform: __webpack_require__(1351), - Velocity: __webpack_require__(1352) + Bounce: __webpack_require__(1341), + Collision: __webpack_require__(1342), + Force: __webpack_require__(1343), + Friction: __webpack_require__(1344), + Gravity: __webpack_require__(1345), + Mass: __webpack_require__(1346), + Static: __webpack_require__(1347), + Sensor: __webpack_require__(1348), + SetBody: __webpack_require__(1349), + Sleep: __webpack_require__(1350), + Transform: __webpack_require__(1367), + Velocity: __webpack_require__(1368) }; /***/ }), -/* 144 */ -/***/ (function(module, exports) { +/* 148 */ +/***/ (function(module, exports, __webpack_require__) { /** -* The `Matter.Pair` module contains methods for creating and manipulating collision pairs. +* The `Matter.Detector` module contains methods for detecting collisions given a set of pairs. * -* @class Pair +* @class Detector */ -var Pair = {}; +// TODO: speculative contacts -module.exports = Pair; +var Detector = {}; + +module.exports = Detector; + +var SAT = __webpack_require__(149); +var Pair = __webpack_require__(114); +var Bounds = __webpack_require__(38); (function() { - - /** - * Creates a pair. - * @method create - * @param {collision} collision - * @param {number} timestamp - * @return {pair} A new pair - */ - Pair.create = function(collision, timestamp) { - var bodyA = collision.bodyA, - bodyB = collision.bodyB; - - var pair = { - id: Pair.id(bodyA, bodyB), - bodyA: bodyA, - bodyB: bodyB, - activeContacts: [], - separation: 0, - isActive: true, - confirmedActive: true, - isSensor: bodyA.isSensor || bodyB.isSensor, - timeCreated: timestamp, - timeUpdated: timestamp, - collision: null, - inverseMass: 0, - friction: 0, - frictionStatic: 0, - restitution: 0, - slop: 0 - }; - - Pair.update(pair, collision, timestamp); - - return pair; - }; /** - * Updates a pair given a collision. - * @method update - * @param {pair} pair - * @param {collision} collision - * @param {number} timestamp + * Finds all collisions given a list of pairs. + * @method collisions + * @param {pair[]} broadphasePairs + * @param {engine} engine + * @return {array} collisions */ - Pair.update = function(pair, collision, timestamp) { - pair.collision = collision; + Detector.collisions = function(broadphasePairs, engine) { + var collisions = [], + pairsTable = engine.pairs.table; - if (collision.collided) { - var supports = collision.supports, - activeContacts = pair.activeContacts, - parentA = collision.parentA, - parentB = collision.parentB; + // @if DEBUG + var metrics = engine.metrics; + // @endif + + for (var i = 0; i < broadphasePairs.length; i++) { + var bodyA = broadphasePairs[i][0], + bodyB = broadphasePairs[i][1]; - pair.inverseMass = parentA.inverseMass + parentB.inverseMass; - pair.friction = Math.min(parentA.friction, parentB.friction); - pair.frictionStatic = Math.max(parentA.frictionStatic, parentB.frictionStatic); - pair.restitution = Math.max(parentA.restitution, parentB.restitution); - pair.slop = Math.max(parentA.slop, parentB.slop); + if ((bodyA.isStatic || bodyA.isSleeping) && (bodyB.isStatic || bodyB.isSleeping)) + continue; + + if (!Detector.canCollide(bodyA.collisionFilter, bodyB.collisionFilter)) + continue; - for (var i = 0; i < supports.length; i++) { - activeContacts[i] = supports[i].contact; + // @if DEBUG + metrics.midphaseTests += 1; + // @endif + + // mid phase + if (Bounds.overlaps(bodyA.bounds, bodyB.bounds)) { + for (var j = bodyA.parts.length > 1 ? 1 : 0; j < bodyA.parts.length; j++) { + var partA = bodyA.parts[j]; + + for (var k = bodyB.parts.length > 1 ? 1 : 0; k < bodyB.parts.length; k++) { + var partB = bodyB.parts[k]; + + if ((partA === bodyA && partB === bodyB) || Bounds.overlaps(partA.bounds, partB.bounds)) { + // find a previous collision we could reuse + var pairId = Pair.id(partA, partB), + pair = pairsTable[pairId], + previousCollision; + + if (pair && pair.isActive) { + previousCollision = pair.collision; + } else { + previousCollision = null; + } + + // narrow phase + var collision = SAT.collides(partA, partB, previousCollision); + + // @if DEBUG + metrics.narrowphaseTests += 1; + if (collision.reused) + metrics.narrowReuseCount += 1; + // @endif + + if (collision.collided) { + collisions.push(collision); + // @if DEBUG + metrics.narrowDetections += 1; + // @endif + } + } + } + } } - - // optimise array size - var supportCount = supports.length; - if (supportCount < activeContacts.length) { - activeContacts.length = supportCount; - } - - pair.separation = collision.depth; - Pair.setActive(pair, true, timestamp); - } else { - if (pair.isActive === true) - Pair.setActive(pair, false, timestamp); - } - }; - - /** - * Set a pair as active or inactive. - * @method setActive - * @param {pair} pair - * @param {bool} isActive - * @param {number} timestamp - */ - Pair.setActive = function(pair, isActive, timestamp) { - if (isActive) { - pair.isActive = true; - pair.timeUpdated = timestamp; - } else { - pair.isActive = false; - pair.activeContacts.length = 0; } + + return collisions; }; /** - * Get the id for the given pair. - * @method id - * @param {body} bodyA - * @param {body} bodyB - * @return {string} Unique pairId + * Returns `true` if both supplied collision filters will allow a collision to occur. + * See `body.collisionFilter` for more information. + * @method canCollide + * @param {} filterA + * @param {} filterB + * @return {bool} `true` if collision can occur */ - Pair.id = function(bodyA, bodyB) { - if (bodyA.id < bodyB.id) { - return 'A' + bodyA.id + 'B' + bodyB.id; - } else { - return 'A' + bodyB.id + 'B' + bodyA.id; - } + Detector.canCollide = function(filterA, filterB) { + if (filterA.group === filterB.group && filterA.group !== 0) + return filterA.group > 0; + + return (filterA.mask & filterB.category) !== 0 && (filterB.mask & filterA.category) !== 0; }; })(); /***/ }), -/* 145 */ +/* 149 */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* The `Matter.SAT` module contains methods for detecting collisions using the Separating Axis Theorem. +* +* @class SAT +*/ + +// TODO: true circles and curves + +var SAT = {}; + +module.exports = SAT; + +var Vertices = __webpack_require__(31); +var Vector = __webpack_require__(37); + +(function() { + + /** + * Detect collision between two bodies using the Separating Axis Theorem. + * @method collides + * @param {body} bodyA + * @param {body} bodyB + * @param {collision} previousCollision + * @return {collision} collision + */ + SAT.collides = function(bodyA, bodyB, previousCollision) { + var overlapAB, + overlapBA, + minOverlap, + collision, + canReusePrevCol = false; + + if (previousCollision) { + // estimate total motion + var parentA = bodyA.parent, + parentB = bodyB.parent, + motion = parentA.speed * parentA.speed + parentA.angularSpeed * parentA.angularSpeed + + parentB.speed * parentB.speed + parentB.angularSpeed * parentB.angularSpeed; + + // we may be able to (partially) reuse collision result + // but only safe if collision was resting + canReusePrevCol = previousCollision && previousCollision.collided && motion < 0.2; + + // reuse collision object + collision = previousCollision; + } else { + collision = { collided: false, bodyA: bodyA, bodyB: bodyB }; + } + + if (previousCollision && canReusePrevCol) { + // if we can reuse the collision result + // we only need to test the previously found axis + var axisBodyA = collision.axisBody, + axisBodyB = axisBodyA === bodyA ? bodyB : bodyA, + axes = [axisBodyA.axes[previousCollision.axisNumber]]; + + minOverlap = SAT._overlapAxes(axisBodyA.vertices, axisBodyB.vertices, axes); + collision.reused = true; + + if (minOverlap.overlap <= 0) { + collision.collided = false; + return collision; + } + } else { + // if we can't reuse a result, perform a full SAT test + + overlapAB = SAT._overlapAxes(bodyA.vertices, bodyB.vertices, bodyA.axes); + + if (overlapAB.overlap <= 0) { + collision.collided = false; + return collision; + } + + overlapBA = SAT._overlapAxes(bodyB.vertices, bodyA.vertices, bodyB.axes); + + if (overlapBA.overlap <= 0) { + collision.collided = false; + return collision; + } + + if (overlapAB.overlap < overlapBA.overlap) { + minOverlap = overlapAB; + collision.axisBody = bodyA; + } else { + minOverlap = overlapBA; + collision.axisBody = bodyB; + } + + // important for reuse later + collision.axisNumber = minOverlap.axisNumber; + } + + collision.bodyA = bodyA.id < bodyB.id ? bodyA : bodyB; + collision.bodyB = bodyA.id < bodyB.id ? bodyB : bodyA; + collision.collided = true; + collision.depth = minOverlap.overlap; + collision.parentA = collision.bodyA.parent; + collision.parentB = collision.bodyB.parent; + + bodyA = collision.bodyA; + bodyB = collision.bodyB; + + // ensure normal is facing away from bodyA + if (Vector.dot(minOverlap.axis, Vector.sub(bodyB.position, bodyA.position)) < 0) { + collision.normal = { + x: minOverlap.axis.x, + y: minOverlap.axis.y + }; + } else { + collision.normal = { + x: -minOverlap.axis.x, + y: -minOverlap.axis.y + }; + } + + collision.tangent = Vector.perp(collision.normal); + + collision.penetration = collision.penetration || {}; + collision.penetration.x = collision.normal.x * collision.depth; + collision.penetration.y = collision.normal.y * collision.depth; + + // find support points, there is always either exactly one or two + var verticesB = SAT._findSupports(bodyA, bodyB, collision.normal), + supports = []; + + // find the supports from bodyB that are inside bodyA + if (Vertices.contains(bodyA.vertices, verticesB[0])) + supports.push(verticesB[0]); + + if (Vertices.contains(bodyA.vertices, verticesB[1])) + supports.push(verticesB[1]); + + // find the supports from bodyA that are inside bodyB + if (supports.length < 2) { + var verticesA = SAT._findSupports(bodyB, bodyA, Vector.neg(collision.normal)); + + if (Vertices.contains(bodyB.vertices, verticesA[0])) + supports.push(verticesA[0]); + + if (supports.length < 2 && Vertices.contains(bodyB.vertices, verticesA[1])) + supports.push(verticesA[1]); + } + + // account for the edge case of overlapping but no vertex containment + if (supports.length < 1) + supports = [verticesB[0]]; + + collision.supports = supports; + + return collision; + }; + + /** + * Find the overlap between two sets of vertices. + * @method _overlapAxes + * @private + * @param {} verticesA + * @param {} verticesB + * @param {} axes + * @return result + */ + SAT._overlapAxes = function(verticesA, verticesB, axes) { + var projectionA = Vector._temp[0], + projectionB = Vector._temp[1], + result = { overlap: Number.MAX_VALUE }, + overlap, + axis; + + for (var i = 0; i < axes.length; i++) { + axis = axes[i]; + + SAT._projectToAxis(projectionA, verticesA, axis); + SAT._projectToAxis(projectionB, verticesB, axis); + + overlap = Math.min(projectionA.max - projectionB.min, projectionB.max - projectionA.min); + + if (overlap <= 0) { + result.overlap = overlap; + return result; + } + + if (overlap < result.overlap) { + result.overlap = overlap; + result.axis = axis; + result.axisNumber = i; + } + } + + return result; + }; + + /** + * Projects vertices on an axis and returns an interval. + * @method _projectToAxis + * @private + * @param {} projection + * @param {} vertices + * @param {} axis + */ + SAT._projectToAxis = function(projection, vertices, axis) { + var min = Vector.dot(vertices[0], axis), + max = min; + + for (var i = 1; i < vertices.length; i += 1) { + var dot = Vector.dot(vertices[i], axis); + + if (dot > max) { + max = dot; + } else if (dot < min) { + min = dot; + } + } + + projection.min = min; + projection.max = max; + }; + + /** + * Finds supporting vertices given two bodies along a given direction using hill-climbing. + * @method _findSupports + * @private + * @param {} bodyA + * @param {} bodyB + * @param {} normal + * @return [vector] + */ + SAT._findSupports = function(bodyA, bodyB, normal) { + var nearestDistance = Number.MAX_VALUE, + vertexToBody = Vector._temp[0], + vertices = bodyB.vertices, + bodyAPosition = bodyA.position, + distance, + vertex, + vertexA, + vertexB; + + // find closest vertex on bodyB + for (var i = 0; i < vertices.length; i++) { + vertex = vertices[i]; + vertexToBody.x = vertex.x - bodyAPosition.x; + vertexToBody.y = vertex.y - bodyAPosition.y; + distance = -Vector.dot(normal, vertexToBody); + + if (distance < nearestDistance) { + nearestDistance = distance; + vertexA = vertex; + } + } + + // find next closest vertex using the two connected to it + var prevIndex = vertexA.index - 1 >= 0 ? vertexA.index - 1 : vertices.length - 1; + vertex = vertices[prevIndex]; + vertexToBody.x = vertex.x - bodyAPosition.x; + vertexToBody.y = vertex.y - bodyAPosition.y; + nearestDistance = -Vector.dot(normal, vertexToBody); + vertexB = vertex; + + var nextIndex = (vertexA.index + 1) % vertices.length; + vertex = vertices[nextIndex]; + vertexToBody.x = vertex.x - bodyAPosition.x; + vertexToBody.y = vertex.y - bodyAPosition.y; + distance = -Vector.dot(normal, vertexToBody); + if (distance < nearestDistance) { + vertexB = vertex; + } + + return [vertexA, vertexB]; + }; + +})(); + + +/***/ }), +/* 150 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31040,63 +31957,63 @@ module.exports = Pair; module.exports = { - CalculateFacesAt: __webpack_require__(238), - CalculateFacesWithin: __webpack_require__(58), - Copy: __webpack_require__(1374), - CreateFromTiles: __webpack_require__(1375), - CullTiles: __webpack_require__(1376), - Fill: __webpack_require__(1377), - FilterTiles: __webpack_require__(1378), - FindByIndex: __webpack_require__(1379), - FindTile: __webpack_require__(1380), - ForEachTile: __webpack_require__(1381), - GetTileAt: __webpack_require__(146), - GetTileAtWorldXY: __webpack_require__(1382), + CalculateFacesAt: __webpack_require__(245), + CalculateFacesWithin: __webpack_require__(59), + Copy: __webpack_require__(1389), + CreateFromTiles: __webpack_require__(1390), + CullTiles: __webpack_require__(1391), + Fill: __webpack_require__(1392), + FilterTiles: __webpack_require__(1393), + FindByIndex: __webpack_require__(1394), + FindTile: __webpack_require__(1395), + ForEachTile: __webpack_require__(1396), + GetTileAt: __webpack_require__(151), + GetTileAtWorldXY: __webpack_require__(1397), GetTilesWithin: __webpack_require__(26), - GetTilesWithinShape: __webpack_require__(1383), - GetTilesWithinWorldXY: __webpack_require__(1384), - HasTileAt: __webpack_require__(498), - HasTileAtWorldXY: __webpack_require__(1385), - IsInLayerBounds: __webpack_require__(113), - PutTileAt: __webpack_require__(239), - PutTileAtWorldXY: __webpack_require__(1386), - PutTilesAt: __webpack_require__(1387), - Randomize: __webpack_require__(1388), - RemoveTileAt: __webpack_require__(499), - RemoveTileAtWorldXY: __webpack_require__(1389), - RenderDebug: __webpack_require__(1390), - ReplaceByIndex: __webpack_require__(497), - SetCollision: __webpack_require__(1391), - SetCollisionBetween: __webpack_require__(1392), - SetCollisionByExclusion: __webpack_require__(1393), - SetCollisionByProperty: __webpack_require__(1394), - SetCollisionFromCollisionGroup: __webpack_require__(1395), - SetTileIndexCallback: __webpack_require__(1396), - SetTileLocationCallback: __webpack_require__(1397), - Shuffle: __webpack_require__(1398), - SwapByIndex: __webpack_require__(1399), - TileToWorldX: __webpack_require__(147), - TileToWorldXY: __webpack_require__(1400), - TileToWorldY: __webpack_require__(148), - WeightedRandomize: __webpack_require__(1401), - WorldToTileX: __webpack_require__(68), - WorldToTileXY: __webpack_require__(1402), - WorldToTileY: __webpack_require__(69) + GetTilesWithinShape: __webpack_require__(1398), + GetTilesWithinWorldXY: __webpack_require__(1399), + HasTileAt: __webpack_require__(514), + HasTileAtWorldXY: __webpack_require__(1400), + IsInLayerBounds: __webpack_require__(115), + PutTileAt: __webpack_require__(246), + PutTileAtWorldXY: __webpack_require__(1401), + PutTilesAt: __webpack_require__(1402), + Randomize: __webpack_require__(1403), + RemoveTileAt: __webpack_require__(515), + RemoveTileAtWorldXY: __webpack_require__(1404), + RenderDebug: __webpack_require__(1405), + ReplaceByIndex: __webpack_require__(513), + SetCollision: __webpack_require__(1406), + SetCollisionBetween: __webpack_require__(1407), + SetCollisionByExclusion: __webpack_require__(1408), + SetCollisionByProperty: __webpack_require__(1409), + SetCollisionFromCollisionGroup: __webpack_require__(1410), + SetTileIndexCallback: __webpack_require__(1411), + SetTileLocationCallback: __webpack_require__(1412), + Shuffle: __webpack_require__(1413), + SwapByIndex: __webpack_require__(1414), + TileToWorldX: __webpack_require__(152), + TileToWorldXY: __webpack_require__(1415), + TileToWorldY: __webpack_require__(153), + WeightedRandomize: __webpack_require__(1416), + WorldToTileX: __webpack_require__(69), + WorldToTileXY: __webpack_require__(1417), + WorldToTileY: __webpack_require__(70) }; /***/ }), -/* 146 */ +/* 151 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsInLayerBounds = __webpack_require__(113); +var IsInLayerBounds = __webpack_require__(115); /** * Gets a tile at the given tile coordinates from the given layer. @@ -31143,12 +32060,12 @@ module.exports = GetTileAt; /***/ }), -/* 147 */ +/* 152 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31188,12 +32105,12 @@ module.exports = TileToWorldX; /***/ }), -/* 148 */ +/* 153 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31233,12 +32150,12 @@ module.exports = TileToWorldY; /***/ }), -/* 149 */ +/* 154 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31637,12 +32554,12 @@ module.exports = Tileset; /***/ }), -/* 150 */ +/* 155 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31701,26 +32618,26 @@ module.exports = GetNewValue; /***/ }), -/* 151 */ +/* 156 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Defaults = __webpack_require__(248); +var Defaults = __webpack_require__(255); var GetAdvancedValue = __webpack_require__(15); -var GetBoolean = __webpack_require__(97); -var GetEaseFunction = __webpack_require__(89); -var GetNewValue = __webpack_require__(150); -var GetProps = __webpack_require__(520); -var GetTargets = __webpack_require__(246); +var GetBoolean = __webpack_require__(99); +var GetEaseFunction = __webpack_require__(90); +var GetNewValue = __webpack_require__(155); +var GetProps = __webpack_require__(536); +var GetTargets = __webpack_require__(253); var GetValue = __webpack_require__(5); -var GetValueOp = __webpack_require__(247); -var Tween = __webpack_require__(249); -var TweenData = __webpack_require__(251); +var GetValueOp = __webpack_require__(254); +var Tween = __webpack_require__(256); +var TweenData = __webpack_require__(258); /** * Creates a new Tween. @@ -31834,12 +32751,12 @@ module.exports = TweenBuilder; /***/ }), -/* 152 */ +/* 157 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31888,146 +32805,12 @@ module.exports = ScaleModes; /***/ }), -/* 153 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var ALIGN_CONST = { - - /** - * A constant representing a top-left alignment or position. - * @constant - * @name Phaser.Display.Align.TOP_LEFT - * @since 3.0.0 - * @type {integer} - */ - TOP_LEFT: 0, - - /** - * A constant representing a top-center alignment or position. - * @constant - * @name Phaser.Display.Align.TOP_CENTER - * @since 3.0.0 - * @type {integer} - */ - TOP_CENTER: 1, - - /** - * A constant representing a top-right alignment or position. - * @constant - * @name Phaser.Display.Align.TOP_RIGHT - * @since 3.0.0 - * @type {integer} - */ - TOP_RIGHT: 2, - - /** - * A constant representing a left-top alignment or position. - * @constant - * @name Phaser.Display.Align.LEFT_TOP - * @since 3.0.0 - * @type {integer} - */ - LEFT_TOP: 3, - - /** - * A constant representing a left-center alignment or position. - * @constant - * @name Phaser.Display.Align.LEFT_CENTER - * @since 3.0.0 - * @type {integer} - */ - LEFT_CENTER: 4, - - /** - * A constant representing a left-bottom alignment or position. - * @constant - * @name Phaser.Display.Align.LEFT_BOTTOM - * @since 3.0.0 - * @type {integer} - */ - LEFT_BOTTOM: 5, - - /** - * A constant representing a center alignment or position. - * @constant - * @name Phaser.Display.Align.CENTER - * @since 3.0.0 - * @type {integer} - */ - CENTER: 6, - - /** - * A constant representing a right-top alignment or position. - * @constant - * @name Phaser.Display.Align.RIGHT_TOP - * @since 3.0.0 - * @type {integer} - */ - RIGHT_TOP: 7, - - /** - * A constant representing a right-center alignment or position. - * @constant - * @name Phaser.Display.Align.RIGHT_CENTER - * @since 3.0.0 - * @type {integer} - */ - RIGHT_CENTER: 8, - - /** - * A constant representing a right-bottom alignment or position. - * @constant - * @name Phaser.Display.Align.RIGHT_BOTTOM - * @since 3.0.0 - * @type {integer} - */ - RIGHT_BOTTOM: 9, - - /** - * A constant representing a bottom-left alignment or position. - * @constant - * @name Phaser.Display.Align.BOTTOM_LEFT - * @since 3.0.0 - * @type {integer} - */ - BOTTOM_LEFT: 10, - - /** - * A constant representing a bottom-center alignment or position. - * @constant - * @name Phaser.Display.Align.BOTTOM_CENTER - * @since 3.0.0 - * @type {integer} - */ - BOTTOM_CENTER: 11, - - /** - * A constant representing a bottom-right alignment or position. - * @constant - * @name Phaser.Display.Align.BOTTOM_RIGHT - * @since 3.0.0 - * @type {integer} - */ - BOTTOM_RIGHT: 12 - -}; - -module.exports = ALIGN_CONST; - - -/***/ }), -/* 154 */ +/* 158 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32061,12 +32844,12 @@ module.exports = CircumferencePoint; /***/ }), -/* 155 */ +/* 159 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32105,21 +32888,21 @@ module.exports = Random; /***/ }), -/* 156 */ +/* 160 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(24); +var Clamp = __webpack_require__(20); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(117); -var FindClosestInSorted = __webpack_require__(270); -var Frame = __webpack_require__(271); +var Events = __webpack_require__(119); +var FindClosestInSorted = __webpack_require__(289); +var Frame = __webpack_require__(290); var GetValue = __webpack_require__(5); /** @@ -33058,16 +33841,16 @@ module.exports = Animation; /***/ }), -/* 157 */ +/* 161 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Perimeter = __webpack_require__(118); +var Perimeter = __webpack_require__(120); var Point = __webpack_require__(4); /** @@ -33135,16 +33918,16 @@ module.exports = GetPoint; /***/ }), -/* 158 */ +/* 162 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(61); +var Length = __webpack_require__(62); var Point = __webpack_require__(4); /** @@ -33200,12 +33983,12 @@ module.exports = GetPoints; /***/ }), -/* 159 */ +/* 163 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -33240,12 +34023,12 @@ module.exports = Random; /***/ }), -/* 160 */ +/* 164 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -33278,16 +34061,16 @@ module.exports = Random; /***/ }), -/* 161 */ +/* 165 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathWrap = __webpack_require__(62); +var MathWrap = __webpack_require__(63); /** * Wrap an angle. @@ -33310,16 +34093,16 @@ module.exports = Wrap; /***/ }), -/* 162 */ +/* 166 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Wrap = __webpack_require__(62); +var Wrap = __webpack_require__(63); /** * Wrap an angle in degrees. @@ -33342,12 +34125,12 @@ module.exports = WrapDegrees; /***/ }), -/* 163 */ +/* 167 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -33383,12 +34166,12 @@ module.exports = Random; /***/ }), -/* 164 */ +/* 168 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -33439,12 +34222,12 @@ module.exports = Random; /***/ }), -/* 165 */ +/* 169 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -33476,12 +34259,12 @@ module.exports = RotateAroundDistance; /***/ }), -/* 166 */ +/* 170 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -33515,12 +34298,12 @@ module.exports = SmootherStep; /***/ }), -/* 167 */ +/* 171 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -33562,12 +34345,12 @@ module.exports = SmoothStep; /***/ }), -/* 168 */ +/* 172 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -33935,12 +34718,12 @@ module.exports = Map; /***/ }), -/* 169 */ +/* 173 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34011,19 +34794,19 @@ module.exports = Pad; /***/ }), -/* 170 */ +/* 174 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HexStringToColor = __webpack_require__(294); -var IntegerToColor = __webpack_require__(297); -var ObjectToColor = __webpack_require__(299); -var RGBStringToColor = __webpack_require__(300); +var HexStringToColor = __webpack_require__(313); +var IntegerToColor = __webpack_require__(316); +var ObjectToColor = __webpack_require__(318); +var RGBStringToColor = __webpack_require__(319); /** * Converts the given source color value into an instance of a Color class. @@ -34067,12 +34850,12 @@ module.exports = ValueToColor; /***/ }), -/* 171 */ +/* 175 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34097,16 +34880,16 @@ module.exports = GetColor; /***/ }), -/* 172 */ +/* 176 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetColor = __webpack_require__(171); +var GetColor = __webpack_require__(175); /** * Converts an HSV (hue, saturation and value) color value to RGB. @@ -34198,12 +34981,12 @@ module.exports = HSVToRGB; /***/ }), -/* 173 */ +/* 177 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34330,12 +35113,12 @@ module.exports = Smoothing(); /***/ }), -/* 174 */ +/* 178 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34367,27 +35150,27 @@ module.exports = CenterOn; /***/ }), -/* 175 */ +/* 179 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Back = __webpack_require__(302); -var Bounce = __webpack_require__(303); -var Circular = __webpack_require__(304); -var Cubic = __webpack_require__(305); -var Elastic = __webpack_require__(306); -var Expo = __webpack_require__(307); -var Linear = __webpack_require__(308); -var Quadratic = __webpack_require__(309); -var Quartic = __webpack_require__(310); -var Quintic = __webpack_require__(311); -var Sine = __webpack_require__(312); -var Stepped = __webpack_require__(313); +var Back = __webpack_require__(321); +var Bounce = __webpack_require__(322); +var Circular = __webpack_require__(323); +var Cubic = __webpack_require__(324); +var Elastic = __webpack_require__(325); +var Expo = __webpack_require__(326); +var Linear = __webpack_require__(327); +var Quadratic = __webpack_require__(328); +var Quartic = __webpack_require__(329); +var Quintic = __webpack_require__(330); +var Sine = __webpack_require__(331); +var Stepped = __webpack_require__(332); // EaseMap module.exports = { @@ -34448,17 +35231,17 @@ module.exports = { /***/ }), -/* 176 */ +/* 180 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(122); -var Browser = __webpack_require__(123); +var OS = __webpack_require__(124); +var Browser = __webpack_require__(125); var CanvasPool = __webpack_require__(28); /** @@ -34640,12 +35423,12 @@ module.exports = init(); /***/ }), -/* 177 */ +/* 181 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34659,62 +35442,62 @@ var Extend = __webpack_require__(17); var PhaserMath = { // Collections of functions - Angle: __webpack_require__(737), - Distance: __webpack_require__(745), - Easing: __webpack_require__(747), - Fuzzy: __webpack_require__(748), - Interpolation: __webpack_require__(751), - Pow2: __webpack_require__(756), - Snap: __webpack_require__(758), + Angle: __webpack_require__(757), + Distance: __webpack_require__(765), + Easing: __webpack_require__(771), + Fuzzy: __webpack_require__(772), + Interpolation: __webpack_require__(775), + Pow2: __webpack_require__(780), + Snap: __webpack_require__(782), // Expose the RNG Class - RandomDataGenerator: __webpack_require__(760), + RandomDataGenerator: __webpack_require__(784), // Single functions - Average: __webpack_require__(761), - Bernstein: __webpack_require__(322), - Between: __webpack_require__(180), - CatmullRom: __webpack_require__(179), - CeilTo: __webpack_require__(762), - Clamp: __webpack_require__(24), + Average: __webpack_require__(785), + Bernstein: __webpack_require__(341), + Between: __webpack_require__(183), + CatmullRom: __webpack_require__(182), + CeilTo: __webpack_require__(786), + Clamp: __webpack_require__(20), DegToRad: __webpack_require__(40), - Difference: __webpack_require__(763), - Factorial: __webpack_require__(323), - FloatBetween: __webpack_require__(329), - FloorTo: __webpack_require__(764), - FromPercent: __webpack_require__(96), - GetSpeed: __webpack_require__(765), - IsEven: __webpack_require__(766), - IsEvenStrict: __webpack_require__(767), - Linear: __webpack_require__(121), - MaxAdd: __webpack_require__(768), - MinSub: __webpack_require__(769), - Percent: __webpack_require__(770), - RadToDeg: __webpack_require__(181), - RandomXY: __webpack_require__(771), - RandomXYZ: __webpack_require__(772), - RandomXYZW: __webpack_require__(773), - Rotate: __webpack_require__(330), - RotateAround: __webpack_require__(276), - RotateAroundDistance: __webpack_require__(165), - RoundAwayFromZero: __webpack_require__(331), - RoundTo: __webpack_require__(774), - SinCosTableGenerator: __webpack_require__(775), - SmootherStep: __webpack_require__(166), - SmoothStep: __webpack_require__(167), - ToXY: __webpack_require__(776), - TransformXY: __webpack_require__(332), - Within: __webpack_require__(777), - Wrap: __webpack_require__(62), + Difference: __webpack_require__(787), + Factorial: __webpack_require__(342), + FloatBetween: __webpack_require__(348), + FloorTo: __webpack_require__(788), + FromPercent: __webpack_require__(98), + GetSpeed: __webpack_require__(789), + IsEven: __webpack_require__(790), + IsEvenStrict: __webpack_require__(791), + Linear: __webpack_require__(123), + MaxAdd: __webpack_require__(792), + MinSub: __webpack_require__(793), + Percent: __webpack_require__(794), + RadToDeg: __webpack_require__(184), + RandomXY: __webpack_require__(795), + RandomXYZ: __webpack_require__(796), + RandomXYZW: __webpack_require__(797), + Rotate: __webpack_require__(349), + RotateAround: __webpack_require__(295), + RotateAroundDistance: __webpack_require__(169), + RoundAwayFromZero: __webpack_require__(350), + RoundTo: __webpack_require__(798), + SinCosTableGenerator: __webpack_require__(799), + SmootherStep: __webpack_require__(170), + SmoothStep: __webpack_require__(171), + ToXY: __webpack_require__(800), + TransformXY: __webpack_require__(351), + Within: __webpack_require__(801), + Wrap: __webpack_require__(63), // Vector classes Vector2: __webpack_require__(3), - Vector3: __webpack_require__(182), - Vector4: __webpack_require__(333), - Matrix3: __webpack_require__(334), - Matrix4: __webpack_require__(335), - Quaternion: __webpack_require__(336), - RotateVec3: __webpack_require__(778) + Vector3: __webpack_require__(185), + Vector4: __webpack_require__(352), + Matrix3: __webpack_require__(353), + Matrix4: __webpack_require__(354), + Quaternion: __webpack_require__(355), + RotateVec3: __webpack_require__(802) }; @@ -34728,46 +35511,12 @@ module.exports = PhaserMath; /***/ }), -/* 178 */ +/* 182 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Check whether the given values are fuzzily equal. - * - * Two numbers are fuzzily equal if their difference is less than `epsilon`. - * - * @function Phaser.Math.Fuzzy.Equal - * @since 3.0.0 - * - * @param {number} a - The first value. - * @param {number} b - The second value. - * @param {number} [epsilon=0.0001] - The epsilon. - * - * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`. - */ -var Equal = function (a, b, epsilon) -{ - if (epsilon === undefined) { epsilon = 0.0001; } - - return Math.abs(a - b) < epsilon; -}; - -module.exports = Equal; - - -/***/ }), -/* 179 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34799,12 +35548,12 @@ module.exports = CatmullRom; /***/ }), -/* 180 */ +/* 183 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34828,12 +35577,12 @@ module.exports = Between; /***/ }), -/* 181 */ +/* 184 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34858,12 +35607,12 @@ module.exports = RadToDeg; /***/ }), -/* 182 */ +/* 185 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -35668,12 +36417,12 @@ module.exports = Vector3; /***/ }), -/* 183 */ +/* 186 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -35771,13 +36520,13 @@ module.exports = DefaultPlugins; /***/ }), -/* 184 */ +/* 187 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -36540,25 +37289,25 @@ module.exports = WebGLPipeline; /***/ }), -/* 185 */ +/* 188 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Earcut = __webpack_require__(71); +var Earcut = __webpack_require__(72); var GetFastValue = __webpack_require__(1); -var ModelViewProjection = __webpack_require__(346); -var ShaderSourceFS = __webpack_require__(787); -var ShaderSourceVS = __webpack_require__(788); +var ModelViewProjection = __webpack_require__(365); +var ShaderSourceFS = __webpack_require__(811); +var ShaderSourceVS = __webpack_require__(812); var TransformMatrix = __webpack_require__(35); var Utils = __webpack_require__(10); -var WebGLPipeline = __webpack_require__(184); +var WebGLPipeline = __webpack_require__(187); /** * @classdesc @@ -38048,12 +38797,12 @@ module.exports = TextureTintPipeline; /***/ }), -/* 186 */ +/* 189 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -38134,21 +38883,21 @@ module.exports = FromPoints; /***/ }), -/* 187 */ +/* 190 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var CONST = { - CENTER: __webpack_require__(364), - ORIENTATION: __webpack_require__(365), - SCALE_MODE: __webpack_require__(366), - ZOOM: __webpack_require__(367) + CENTER: __webpack_require__(383), + ORIENTATION: __webpack_require__(384), + SCALE_MODE: __webpack_require__(385), + ZOOM: __webpack_require__(386) }; @@ -38156,12 +38905,12 @@ module.exports = CONST; /***/ }), -/* 188 */ +/* 191 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -38185,12 +38934,12 @@ module.exports = RemoveFromDOM; /***/ }), -/* 189 */ +/* 192 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -38283,23 +39032,23 @@ module.exports = INPUT_CONST; /***/ }), -/* 190 */ +/* 193 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(129); -var DefaultPlugins = __webpack_require__(183); -var Events = __webpack_require__(21); -var GetPhysicsPlugins = __webpack_require__(891); -var GetScenePlugins = __webpack_require__(892); +var CONST = __webpack_require__(132); +var DefaultPlugins = __webpack_require__(186); +var Events = __webpack_require__(18); +var GetPhysicsPlugins = __webpack_require__(903); +var GetScenePlugins = __webpack_require__(904); var NOOP = __webpack_require__(2); -var Settings = __webpack_require__(380); +var Settings = __webpack_require__(399); /** * @classdesc @@ -38768,8 +39517,8 @@ var Systems = new Class({ /** * Send this Scene to sleep. * - * A sleeping Scene doesn't run it's update step or render anything, but it also isn't shut down - * or have any of its systems or children removed, meaning it can be re-activated at any point and + * A sleeping Scene doesn't run its update step or render anything, but it also isn't shut down + * or has any of its systems or children removed, meaning it can be re-activated at any point and * will carry on from where it left off. It also keeps everything in memory and events and callbacks * from other Scenes may still invoke changes within it, so be careful what is left active. * @@ -38823,6 +39572,22 @@ var Systems = new Class({ return this; }, + /** + * Returns any data that was sent to this Scene by another Scene. + * + * The data is also passed to `Scene.init` and in various Scene events, but + * you can access it at any point via this method. + * + * @method Phaser.Scenes.Systems#getData + * @since 3.22.0 + * + * @return {any} + */ + getData: function () + { + return this.settings.data; + }, + /** * Is this Scene sleeping? * @@ -39050,12 +39815,12 @@ module.exports = Systems; /***/ }), -/* 191 */ +/* 194 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -39087,18 +39852,18 @@ module.exports = UppercaseFirst; /***/ }), -/* 192 */ +/* 195 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Frame = __webpack_require__(104); -var TextureSource = __webpack_require__(383); +var Frame = __webpack_require__(106); +var TextureSource = __webpack_require__(402); var TEXTURE_MISSING_ERROR = 'Texture.frame missing: '; @@ -39607,12 +40372,12 @@ module.exports = Texture; /***/ }), -/* 193 */ +/* 196 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -39622,50 +40387,50 @@ module.exports = Texture; module.exports = { - Matrix: __webpack_require__(932), + Matrix: __webpack_require__(944), - Add: __webpack_require__(939), - AddAt: __webpack_require__(940), - BringToTop: __webpack_require__(941), - CountAllMatching: __webpack_require__(942), - Each: __webpack_require__(943), - EachInRange: __webpack_require__(944), - FindClosestInSorted: __webpack_require__(270), - GetAll: __webpack_require__(945), - GetFirst: __webpack_require__(946), - GetRandom: __webpack_require__(195), - MoveDown: __webpack_require__(947), - MoveTo: __webpack_require__(948), - MoveUp: __webpack_require__(949), - NumberArray: __webpack_require__(950), - NumberArrayStep: __webpack_require__(951), - QuickSelect: __webpack_require__(395), - Range: __webpack_require__(396), - Remove: __webpack_require__(127), - RemoveAt: __webpack_require__(952), - RemoveBetween: __webpack_require__(953), - RemoveRandomElement: __webpack_require__(954), - Replace: __webpack_require__(955), - RotateLeft: __webpack_require__(286), - RotateRight: __webpack_require__(287), - SafeRange: __webpack_require__(73), - SendToBack: __webpack_require__(956), - SetAll: __webpack_require__(957), - Shuffle: __webpack_require__(120), - SpliceOne: __webpack_require__(84), - StableSort: __webpack_require__(134), - Swap: __webpack_require__(958) + Add: __webpack_require__(951), + AddAt: __webpack_require__(952), + BringToTop: __webpack_require__(953), + CountAllMatching: __webpack_require__(954), + Each: __webpack_require__(955), + EachInRange: __webpack_require__(956), + FindClosestInSorted: __webpack_require__(289), + GetAll: __webpack_require__(957), + GetFirst: __webpack_require__(958), + GetRandom: __webpack_require__(198), + MoveDown: __webpack_require__(959), + MoveTo: __webpack_require__(960), + MoveUp: __webpack_require__(961), + NumberArray: __webpack_require__(962), + NumberArrayStep: __webpack_require__(963), + QuickSelect: __webpack_require__(414), + Range: __webpack_require__(415), + Remove: __webpack_require__(130), + RemoveAt: __webpack_require__(964), + RemoveBetween: __webpack_require__(965), + RemoveRandomElement: __webpack_require__(966), + Replace: __webpack_require__(967), + RotateLeft: __webpack_require__(305), + RotateRight: __webpack_require__(306), + SafeRange: __webpack_require__(74), + SendToBack: __webpack_require__(968), + SetAll: __webpack_require__(969), + Shuffle: __webpack_require__(122), + SpliceOne: __webpack_require__(85), + StableSort: __webpack_require__(137), + Swap: __webpack_require__(970) }; /***/ }), -/* 194 */ +/* 197 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -39721,12 +40486,12 @@ module.exports = CheckMatrix; /***/ }), -/* 195 */ +/* 198 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -39756,18 +40521,18 @@ module.exports = GetRandom; /***/ }), -/* 196 */ +/* 199 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(960); +var Events = __webpack_require__(972); /** * @classdesc @@ -40047,12 +40812,12 @@ module.exports = ProcessQueue; /***/ }), -/* 197 */ +/* 200 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -40186,22 +40951,22 @@ module.exports = ParseXMLBitmapFont; /***/ }), -/* 198 */ +/* 201 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlitterRender = __webpack_require__(968); -var Bob = __webpack_require__(971); +var BlitterRender = __webpack_require__(980); +var Bob = __webpack_require__(983); var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var Frame = __webpack_require__(104); +var Frame = __webpack_require__(106); var GameObject = __webpack_require__(14); -var List = __webpack_require__(132); +var List = __webpack_require__(135); /** * @callback CreateCallback @@ -40485,25 +41250,25 @@ module.exports = Blitter; /***/ }), -/* 199 */ +/* 202 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayUtils = __webpack_require__(193); -var BlendModes = __webpack_require__(42); +var ArrayUtils = __webpack_require__(196); +var BlendModes = __webpack_require__(43); var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var Events = __webpack_require__(100); +var Events = __webpack_require__(102); var GameObject = __webpack_require__(14); var Rectangle = __webpack_require__(11); -var Render = __webpack_require__(972); -var Union = __webpack_require__(398); +var Render = __webpack_require__(984); +var Union = __webpack_require__(417); var Vector2 = __webpack_require__(3); /** @@ -40548,7 +41313,7 @@ var Vector2 = __webpack_require__(3); * @constructor * @since 3.4.0 * - * @extends Phaser.GameObjects.Components.Alpha + * @extends Phaser.GameObjects.Components.AlphaSingle * @extends Phaser.GameObjects.Components.BlendMode * @extends Phaser.GameObjects.Components.ComputedSize * @extends Phaser.GameObjects.Components.Depth @@ -40566,7 +41331,7 @@ var Container = new Class({ Extends: GameObject, Mixins: [ - Components.Alpha, + Components.AlphaSingle, Components.BlendMode, Components.ComputedSize, Components.Depth, @@ -41810,18 +42575,18 @@ module.exports = Container; /***/ }), -/* 200 */ +/* 203 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(135); +var BitmapText = __webpack_require__(138); var Class = __webpack_require__(0); -var Render = __webpack_require__(977); +var Render = __webpack_require__(989); /** * @classdesc @@ -42043,35 +42808,35 @@ module.exports = DynamicBitmapText; /***/ }), -/* 201 */ +/* 204 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseCamera = __webpack_require__(101); +var BaseCamera = __webpack_require__(103); var Class = __webpack_require__(0); -var Commands = __webpack_require__(202); -var ComponentsAlpha = __webpack_require__(268); -var ComponentsBlendMode = __webpack_require__(272); -var ComponentsDepth = __webpack_require__(273); -var ComponentsMask = __webpack_require__(277); -var ComponentsPipeline = __webpack_require__(119); -var ComponentsTransform = __webpack_require__(282); -var ComponentsVisible = __webpack_require__(283); -var ComponentsScrollFactor = __webpack_require__(280); +var Commands = __webpack_require__(205); +var ComponentsAlpha = __webpack_require__(287); +var ComponentsBlendMode = __webpack_require__(291); +var ComponentsDepth = __webpack_require__(292); +var ComponentsMask = __webpack_require__(296); +var ComponentsPipeline = __webpack_require__(121); +var ComponentsTransform = __webpack_require__(301); +var ComponentsVisible = __webpack_require__(302); +var ComponentsScrollFactor = __webpack_require__(299); var TransformMatrix = __webpack_require__(35); -var Ellipse = __webpack_require__(105); +var Ellipse = __webpack_require__(107); var GameObject = __webpack_require__(14); var GetFastValue = __webpack_require__(1); var GetValue = __webpack_require__(5); var MATH_CONST = __webpack_require__(13); -var Render = __webpack_require__(983); +var Render = __webpack_require__(995); /** * @classdesc @@ -42120,7 +42885,7 @@ var Render = __webpack_require__(983); * @constructor * @since 3.0.0 * - * @extends Phaser.GameObjects.Components.Alpha + * @extends Phaser.GameObjects.Components.AlphaSingle * @extends Phaser.GameObjects.Components.BlendMode * @extends Phaser.GameObjects.Components.Depth * @extends Phaser.GameObjects.Components.Mask @@ -43593,12 +44358,12 @@ module.exports = Graphics; /***/ }), -/* 202 */ +/* 205 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -43630,12 +44395,12 @@ module.exports = { /***/ }), -/* 203 */ +/* 206 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -43672,22 +44437,22 @@ module.exports = CircumferencePoint; /***/ }), -/* 204 */ +/* 207 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var GravityWell = __webpack_require__(406); -var List = __webpack_require__(132); -var ParticleEmitter = __webpack_require__(408); -var Render = __webpack_require__(993); +var GravityWell = __webpack_require__(425); +var List = __webpack_require__(135); +var ParticleEmitter = __webpack_require__(427); +var Render = __webpack_require__(1005); /** * @classdesc @@ -43954,6 +44719,21 @@ var ParticleEmitterManager = new Class({ return this.addEmitter(new ParticleEmitter(this, config)); }, + /** + * Removes a Particle Emitter from this Emitter Manager, if the Emitter belongs to this Manager. + * + * @method Phaser.GameObjects.Particles.ParticleEmitterManager#removeEmitter + * @since 3.22.0 + * + * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter + * + * @return {?Phaser.GameObjects.Particles.ParticleEmitter} The Particle Emitter if it was removed or null if it was not. + */ + removeEmitter: function (emitter) + { + return this.emitters.remove(emitter, true); + }, + /** * Adds an existing Gravity Well object to this Emitter Manager. * @@ -44146,26 +44926,26 @@ module.exports = ParticleEmitterManager; /***/ }), -/* 205 */ +/* 208 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlendModes = __webpack_require__(42); -var Camera = __webpack_require__(101); +var BlendModes = __webpack_require__(43); +var Camera = __webpack_require__(103); var CanvasPool = __webpack_require__(28); var Class = __webpack_require__(0); var Components = __webpack_require__(12); var CONST = __webpack_require__(32); -var Frame = __webpack_require__(104); +var Frame = __webpack_require__(106); var GameObject = __webpack_require__(14); -var Render = __webpack_require__(997); +var Render = __webpack_require__(1009); var Utils = __webpack_require__(10); -var UUID = __webpack_require__(206); +var UUID = __webpack_require__(209); /** * @classdesc @@ -44189,6 +44969,7 @@ var UUID = __webpack_require__(206); * @extends Phaser.GameObjects.Components.Alpha * @extends Phaser.GameObjects.Components.BlendMode * @extends Phaser.GameObjects.Components.ComputedSize + * @extends Phaser.GameObjects.Components.Crop * @extends Phaser.GameObjects.Components.Depth * @extends Phaser.GameObjects.Components.Flip * @extends Phaser.GameObjects.Components.GetBounds @@ -45384,12 +46165,12 @@ module.exports = RenderTexture; /***/ }), -/* 206 */ +/* 209 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45419,26 +46200,26 @@ module.exports = UUID; /***/ }), -/* 207 */ +/* 210 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(126); +var AddToDOM = __webpack_require__(129); var CanvasPool = __webpack_require__(28); var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var GameEvents = __webpack_require__(19); +var GameEvents = __webpack_require__(21); var GameObject = __webpack_require__(14); -var GetTextSize = __webpack_require__(1003); +var GetTextSize = __webpack_require__(1015); var GetValue = __webpack_require__(5); -var RemoveFromDOM = __webpack_require__(188); -var TextRender = __webpack_require__(1004); -var TextStyle = __webpack_require__(1007); +var RemoveFromDOM = __webpack_require__(191); +var TextRender = __webpack_require__(1016); +var TextStyle = __webpack_require__(1019); /** * @classdesc @@ -45709,7 +46490,7 @@ var Text = new Class({ if (style && style.lineSpacing) { - this.lineSpacing = style.lineSpacing; + this.setLineSpacing(style.lineSpacing); } scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function () @@ -45932,16 +46713,20 @@ var Text = new Class({ { var result = ''; var lines = text.split(this.splitRegExp); + var lastLineIndex = lines.length - 1; + var whiteSpaceWidth = context.measureText(' ').width; - for (var i = 0; i < lines.length; i++) + for (var i = 0; i <= lastLineIndex; i++) { var spaceLeft = wordWrapWidth; var words = lines[i].split(' '); + var lastWordIndex = words.length - 1; - for (var j = 0; j < words.length; j++) + for (var j = 0; j <= lastWordIndex; j++) { - var wordWidth = context.measureText(words[j]).width; - var wordWidthWithSpace = wordWidth + context.measureText(' ').width; + var word = words[j]; + var wordWidth = context.measureText(word).width; + var wordWidthWithSpace = wordWidth + whiteSpaceWidth; if (wordWidthWithSpace > spaceLeft) { @@ -45950,24 +46735,24 @@ var Text = new Class({ if (j > 0) { result += '\n'; + spaceLeft = wordWrapWidth; } + } - result += words[j] + ' '; - spaceLeft = wordWrapWidth - wordWidthWithSpace; + result += word; + + if (j < lastWordIndex) + { + result += ' '; + spaceLeft -= wordWidthWithSpace; } else { - spaceLeft -= wordWidthWithSpace; - result += words[j]; - - if (j < (words.length - 1)) - { - result += ' '; - } + spaceLeft -= wordWidth; } } - if (i < lines.length - 1) + if (i < lastLineIndex) { result += '\n'; } @@ -46824,23 +47609,23 @@ module.exports = Text; /***/ }), -/* 208 */ +/* 211 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var CanvasPool = __webpack_require__(28); var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var GameEvents = __webpack_require__(19); +var GameEvents = __webpack_require__(21); var GameObject = __webpack_require__(14); -var GetPowerOfTwo = __webpack_require__(327); -var Smoothing = __webpack_require__(173); -var TileSpriteRender = __webpack_require__(1009); +var GetPowerOfTwo = __webpack_require__(346); +var Smoothing = __webpack_require__(177); +var TileSpriteRender = __webpack_require__(1021); var Vector2 = __webpack_require__(3); // bitmask flag for GameObject.renderMask @@ -47476,24 +48261,24 @@ module.exports = TileSprite; /***/ }), -/* 209 */ +/* 212 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Clamp = __webpack_require__(24); +var Clamp = __webpack_require__(20); var Components = __webpack_require__(12); -var Events = __webpack_require__(100); -var GameEvents = __webpack_require__(19); +var Events = __webpack_require__(102); +var GameEvents = __webpack_require__(21); var GameObject = __webpack_require__(14); var SoundEvents = __webpack_require__(64); -var UUID = __webpack_require__(206); -var VideoRender = __webpack_require__(1012); +var UUID = __webpack_require__(209); +var VideoRender = __webpack_require__(1024); var MATH_CONST = __webpack_require__(13); /** @@ -49245,25 +50030,24 @@ module.exports = Video; /***/ }), -/* 210 */ +/* 213 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(211); -var GetPoints = __webpack_require__(423); -var GEOM_CONST = __webpack_require__(51); +var Contains = __webpack_require__(214); +var GetPoints = __webpack_require__(442); +var GEOM_CONST = __webpack_require__(52); /** * @classdesc * A Polygon object * - * The polygon is a closed shape consists of a series of connected straight lines defined by list of ordered points. * Several formats are supported to define the list of points, check the setTo method for details. * This is a geometry object allowing you to define and inspect the shape. @@ -49461,11 +50245,13 @@ var Polygon = new Class({ * @method Phaser.Geom.Polygon#getPoints * @since 3.12.0 * + * @generic {Phaser.Geom.Point[]} O - [output,$return] + * * @param {integer} quantity - The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead. * @param {number} [stepRate] - Sets the quantity by getting the perimeter of the Polygon and dividing it by the stepRate. - * @param {array} [output] - An array to insert the points in to. If not provided a new array will be created. + * @param {(array|Phaser.Geom.Point[])} [output] - An array to insert the points in to. If not provided a new array will be created. * - * @return {Phaser.Geom.Point[]} An array of Point objects pertaining to the points around the perimeter of the Polygon. + * @return {(array|Phaser.Geom.Point[])} An array of Point objects pertaining to the points around the perimeter of the Polygon. */ getPoints: function (quantity, step, output) { @@ -49478,12 +50264,12 @@ module.exports = Polygon; /***/ }), -/* 211 */ +/* 214 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -49527,17 +50313,17 @@ module.exports = Contains; /***/ }), -/* 212 */ +/* 215 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Mesh = __webpack_require__(136); +var Mesh = __webpack_require__(139); /** * @classdesc @@ -50188,12 +50974,12 @@ module.exports = Quad; /***/ }), -/* 213 */ +/* 216 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -50202,8 +50988,8 @@ var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); var GetFastValue = __webpack_require__(1); var Extend = __webpack_require__(17); -var SetValue = __webpack_require__(431); -var ShaderRender = __webpack_require__(1093); +var SetValue = __webpack_require__(450); +var ShaderRender = __webpack_require__(1105); var TransformMatrix = __webpack_require__(35); /** @@ -51411,16 +52197,16 @@ module.exports = Shader; /***/ }), -/* 214 */ +/* 217 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DistanceBetween = __webpack_require__(63); +var DistanceBetween = __webpack_require__(54); /** * Checks if two Circles intersect. @@ -51442,12 +52228,12 @@ module.exports = CircleToCircle; /***/ }), -/* 215 */ +/* 218 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51496,18 +52282,18 @@ module.exports = CircleToRectangle; /***/ }), -/* 216 */ +/* 219 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Point = __webpack_require__(4); -var LineToCircle = __webpack_require__(217); +var LineToCircle = __webpack_require__(220); /** * Checks for intersection between the line segment and circle, @@ -51588,16 +52374,16 @@ module.exports = GetLineToCircle; /***/ }), -/* 217 */ +/* 220 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(59); +var Contains = __webpack_require__(60); var Point = __webpack_require__(4); var tmp = new Point(); @@ -51672,19 +52458,19 @@ module.exports = LineToCircle; /***/ }), -/* 218 */ +/* 221 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Point = __webpack_require__(4); -var LineToLine = __webpack_require__(92); -var LineToRectangle = __webpack_require__(436); +var LineToLine = __webpack_require__(93); +var LineToRectangle = __webpack_require__(455); /** * Checks for intersection between the Line and a Rectangle shape, @@ -51732,12 +52518,12 @@ module.exports = GetLineToRectangle; /***/ }), -/* 219 */ +/* 222 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51819,12 +52605,12 @@ module.exports = ContainsArray; /***/ }), -/* 220 */ +/* 223 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51867,12 +52653,12 @@ module.exports = RotateAroundXY; /***/ }), -/* 221 */ +/* 224 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51895,12 +52681,12 @@ module.exports = GetAspectRatio; /***/ }), -/* 222 */ +/* 225 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51949,12 +52735,12 @@ module.exports = RotateAroundXY; /***/ }), -/* 223 */ +/* 226 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51964,28 +52750,28 @@ module.exports = RotateAroundXY; module.exports = { - BUTTON_DOWN: __webpack_require__(1214), - BUTTON_UP: __webpack_require__(1215), - CONNECTED: __webpack_require__(1216), - DISCONNECTED: __webpack_require__(1217), - GAMEPAD_BUTTON_DOWN: __webpack_require__(1218), - GAMEPAD_BUTTON_UP: __webpack_require__(1219) + BUTTON_DOWN: __webpack_require__(1226), + BUTTON_UP: __webpack_require__(1227), + CONNECTED: __webpack_require__(1228), + DISCONNECTED: __webpack_require__(1229), + GAMEPAD_BUTTON_DOWN: __webpack_require__(1230), + GAMEPAD_BUTTON_UP: __webpack_require__(1231) }; /***/ }), -/* 224 */ +/* 227 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Extend = __webpack_require__(17); -var XHRSettings = __webpack_require__(141); +var XHRSettings = __webpack_require__(144); /** * Takes two XHRSettings Objects and creates a new XHRSettings object from them. @@ -52023,22 +52809,22 @@ module.exports = MergeXHRSettings; /***/ }), -/* 225 */ +/* 228 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(22); -var File = __webpack_require__(23); +var CONST = __webpack_require__(23); +var File = __webpack_require__(24); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(1); var IsPlainObject = __webpack_require__(7); -var ParseXML = __webpack_require__(369); +var ParseXML = __webpack_require__(388); /** * @classdesc @@ -52208,12 +52994,12 @@ module.exports = XMLFile; /***/ }), -/* 226 */ +/* 229 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -52223,101 +53009,18 @@ module.exports = XMLFile; module.exports = { - Acceleration: __webpack_require__(1275), - Angular: __webpack_require__(1276), - Bounce: __webpack_require__(1277), - Debug: __webpack_require__(1278), - Drag: __webpack_require__(1279), - Enable: __webpack_require__(1280), - Friction: __webpack_require__(1281), - Gravity: __webpack_require__(1282), - Immovable: __webpack_require__(1283), - Mass: __webpack_require__(1284), - Size: __webpack_require__(1285), - Velocity: __webpack_require__(1286) - -}; - - -/***/ }), -/* 227 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Physics.Arcade.Events - */ - -module.exports = { - - COLLIDE: __webpack_require__(1288), - OVERLAP: __webpack_require__(1289), - PAUSE: __webpack_require__(1290), - RESUME: __webpack_require__(1291), - TILE_COLLIDE: __webpack_require__(1292), - TILE_OVERLAP: __webpack_require__(1293), - WORLD_BOUNDS: __webpack_require__(1294), - WORLD_STEP: __webpack_require__(1295) - -}; - - -/***/ }), -/* 228 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Physics.Impact.Events - */ - -module.exports = { - - COLLIDE: __webpack_require__(1307), - PAUSE: __webpack_require__(1308), - RESUME: __webpack_require__(1309) - -}; - - -/***/ }), -/* 229 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Physics.Impact.Components - */ - -module.exports = { - - Acceleration: __webpack_require__(1311), - BodyScale: __webpack_require__(1312), - BodyType: __webpack_require__(1313), - Bounce: __webpack_require__(1314), - CheckAgainst: __webpack_require__(1315), - Collides: __webpack_require__(1316), - Debug: __webpack_require__(1317), - Friction: __webpack_require__(1318), - Gravity: __webpack_require__(1319), - Offset: __webpack_require__(1320), - SetGameObject: __webpack_require__(1321), - Velocity: __webpack_require__(1322) + Acceleration: __webpack_require__(1287), + Angular: __webpack_require__(1288), + Bounce: __webpack_require__(1289), + Debug: __webpack_require__(1290), + Drag: __webpack_require__(1291), + Enable: __webpack_require__(1292), + Friction: __webpack_require__(1293), + Gravity: __webpack_require__(1294), + Immovable: __webpack_require__(1295), + Mass: __webpack_require__(1296), + Size: __webpack_require__(1297), + Velocity: __webpack_require__(1298) }; @@ -52327,69 +53030,27 @@ module.exports = { /***/ (function(module, exports, __webpack_require__) { /** -* The `Matter.Axes` module contains methods for creating and manipulating sets of axes. -* -* @class Axes -*/ + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ -var Axes = {}; +/** + * @namespace Phaser.Physics.Arcade.Events + */ -module.exports = Axes; +module.exports = { -var Vector = __webpack_require__(37); -var Common = __webpack_require__(18); + COLLIDE: __webpack_require__(1300), + OVERLAP: __webpack_require__(1301), + PAUSE: __webpack_require__(1302), + RESUME: __webpack_require__(1303), + TILE_COLLIDE: __webpack_require__(1304), + TILE_OVERLAP: __webpack_require__(1305), + WORLD_BOUNDS: __webpack_require__(1306), + WORLD_STEP: __webpack_require__(1307) -(function() { - - /** - * Creates a new set of axes from the given vertices. - * @method fromVertices - * @param {vertices} vertices - * @return {axes} A new axes from the given vertices - */ - Axes.fromVertices = function(vertices) { - var axes = {}; - - // find the unique axes, using edge normal gradients - for (var i = 0; i < vertices.length; i++) { - var j = (i + 1) % vertices.length, - normal = Vector.normalise({ - x: vertices[j].y - vertices[i].y, - y: vertices[i].x - vertices[j].x - }), - gradient = (normal.y === 0) ? Infinity : (normal.x / normal.y); - - // limit precision - gradient = gradient.toFixed(3).toString(); - axes[gradient] = normal; - } - - return Common.values(axes); - }; - - /** - * Rotates a set of axes by the given angle. - * @method rotate - * @param {axes} axes - * @param {number} angle - */ - Axes.rotate = function(axes, angle) { - if (angle === 0) - return; - - var cos = Math.cos(angle), - sin = Math.sin(angle); - - for (var i = 0; i < axes.length; i++) { - var axis = axes[i], - xx; - xx = axis.x * cos - axis.y * sin; - axis.y = axis.x * sin + axis.y * cos; - axis.x = xx; - } - }; - -})(); +}; /***/ }), @@ -52398,28 +53059,19 @@ var Common = __webpack_require__(18); /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * @namespace Phaser.Physics.Matter.Events + * @namespace Phaser.Physics.Impact.Events */ module.exports = { - AFTER_UPDATE: __webpack_require__(1339), - BEFORE_UPDATE: __webpack_require__(1340), - COLLISION_ACTIVE: __webpack_require__(1341), - COLLISION_END: __webpack_require__(1342), - COLLISION_START: __webpack_require__(1343), - DRAG_END: __webpack_require__(1344), - DRAG: __webpack_require__(1345), - DRAG_START: __webpack_require__(1346), - PAUSE: __webpack_require__(1347), - RESUME: __webpack_require__(1348), - SLEEP_END: __webpack_require__(1349), - SLEEP_START: __webpack_require__(1350) + COLLIDE: __webpack_require__(1319), + PAUSE: __webpack_require__(1320), + RESUME: __webpack_require__(1321) }; @@ -52430,16 +53082,907 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bodies = __webpack_require__(57); +/** + * @namespace Phaser.Physics.Impact.Components + */ + +module.exports = { + + Acceleration: __webpack_require__(1323), + BodyScale: __webpack_require__(1324), + BodyType: __webpack_require__(1325), + Bounce: __webpack_require__(1326), + CheckAgainst: __webpack_require__(1327), + Collides: __webpack_require__(1328), + Debug: __webpack_require__(1329), + Friction: __webpack_require__(1330), + Gravity: __webpack_require__(1331), + Offset: __webpack_require__(1332), + SetGameObject: __webpack_require__(1333), + Velocity: __webpack_require__(1334) + +}; + + +/***/ }), +/* 233 */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* The `Matter.Composites` module contains factory methods for creating composite bodies +* with commonly used configurations (such as stacks and chains). +* +* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). +* +* @class Composites +*/ + +var Composites = {}; + +module.exports = Composites; + +var Composite = __webpack_require__(68); +var Constraint = __webpack_require__(78); +var Common = __webpack_require__(19); +var Body = __webpack_require__(25); +var Bodies = __webpack_require__(42); + +(function() { + + /** + * Create a new composite containing bodies created in the callback in a grid arrangement. + * This function uses the body's bounds to prevent overlaps. + * @method stack + * @param {number} xx + * @param {number} yy + * @param {number} columns + * @param {number} rows + * @param {number} columnGap + * @param {number} rowGap + * @param {function} callback + * @return {composite} A new composite containing objects created in the callback + */ + Composites.stack = function(xx, yy, columns, rows, columnGap, rowGap, callback) { + var stack = Composite.create({ label: 'Stack' }), + x = xx, + y = yy, + lastBody, + i = 0; + + for (var row = 0; row < rows; row++) { + var maxHeight = 0; + + for (var column = 0; column < columns; column++) { + var body = callback(x, y, column, row, lastBody, i); + + if (body) { + var bodyHeight = body.bounds.max.y - body.bounds.min.y, + bodyWidth = body.bounds.max.x - body.bounds.min.x; + + if (bodyHeight > maxHeight) + maxHeight = bodyHeight; + + Body.translate(body, { x: bodyWidth * 0.5, y: bodyHeight * 0.5 }); + + x = body.bounds.max.x + columnGap; + + Composite.addBody(stack, body); + + lastBody = body; + i += 1; + } else { + x += columnGap; + } + } + + y += maxHeight + rowGap; + x = xx; + } + + return stack; + }; + + /** + * Chains all bodies in the given composite together using constraints. + * @method chain + * @param {composite} composite + * @param {number} xOffsetA + * @param {number} yOffsetA + * @param {number} xOffsetB + * @param {number} yOffsetB + * @param {object} options + * @return {composite} A new composite containing objects chained together with constraints + */ + Composites.chain = function(composite, xOffsetA, yOffsetA, xOffsetB, yOffsetB, options) { + var bodies = composite.bodies; + + for (var i = 1; i < bodies.length; i++) { + var bodyA = bodies[i - 1], + bodyB = bodies[i], + bodyAHeight = bodyA.bounds.max.y - bodyA.bounds.min.y, + bodyAWidth = bodyA.bounds.max.x - bodyA.bounds.min.x, + bodyBHeight = bodyB.bounds.max.y - bodyB.bounds.min.y, + bodyBWidth = bodyB.bounds.max.x - bodyB.bounds.min.x; + + var defaults = { + bodyA: bodyA, + pointA: { x: bodyAWidth * xOffsetA, y: bodyAHeight * yOffsetA }, + bodyB: bodyB, + pointB: { x: bodyBWidth * xOffsetB, y: bodyBHeight * yOffsetB } + }; + + var constraint = Common.extend(defaults, options); + + Composite.addConstraint(composite, Constraint.create(constraint)); + } + + composite.label += ' Chain'; + + return composite; + }; + + /** + * Connects bodies in the composite with constraints in a grid pattern, with optional cross braces. + * @method mesh + * @param {composite} composite + * @param {number} columns + * @param {number} rows + * @param {boolean} crossBrace + * @param {object} options + * @return {composite} The composite containing objects meshed together with constraints + */ + Composites.mesh = function(composite, columns, rows, crossBrace, options) { + var bodies = composite.bodies, + row, + col, + bodyA, + bodyB, + bodyC; + + for (row = 0; row < rows; row++) { + for (col = 1; col < columns; col++) { + bodyA = bodies[(col - 1) + (row * columns)]; + bodyB = bodies[col + (row * columns)]; + Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyA, bodyB: bodyB }, options))); + } + + if (row > 0) { + for (col = 0; col < columns; col++) { + bodyA = bodies[col + ((row - 1) * columns)]; + bodyB = bodies[col + (row * columns)]; + Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyA, bodyB: bodyB }, options))); + + if (crossBrace && col > 0) { + bodyC = bodies[(col - 1) + ((row - 1) * columns)]; + Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyC, bodyB: bodyB }, options))); + } + + if (crossBrace && col < columns - 1) { + bodyC = bodies[(col + 1) + ((row - 1) * columns)]; + Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyC, bodyB: bodyB }, options))); + } + } + } + } + + composite.label += ' Mesh'; + + return composite; + }; + + /** + * Create a new composite containing bodies created in the callback in a pyramid arrangement. + * This function uses the body's bounds to prevent overlaps. + * @method pyramid + * @param {number} xx + * @param {number} yy + * @param {number} columns + * @param {number} rows + * @param {number} columnGap + * @param {number} rowGap + * @param {function} callback + * @return {composite} A new composite containing objects created in the callback + */ + Composites.pyramid = function(xx, yy, columns, rows, columnGap, rowGap, callback) { + return Composites.stack(xx, yy, columns, rows, columnGap, rowGap, function(x, y, column, row, lastBody, i) { + var actualRows = Math.min(rows, Math.ceil(columns / 2)), + lastBodyWidth = lastBody ? lastBody.bounds.max.x - lastBody.bounds.min.x : 0; + + if (row > actualRows) + return; + + // reverse row order + row = actualRows - row; + + var start = row, + end = columns - 1 - row; + + if (column < start || column > end) + return; + + // retroactively fix the first body's position, since width was unknown + if (i === 1) { + Body.translate(lastBody, { x: (column + (columns % 2 === 1 ? 1 : -1)) * lastBodyWidth, y: 0 }); + } + + var xOffset = lastBody ? column * lastBodyWidth : 0; + + return callback(xx + xOffset + column * columnGap, y, column, row, lastBody, i); + }); + }; + + /** + * Creates a composite with a Newton's Cradle setup of bodies and constraints. + * @method newtonsCradle + * @param {number} xx + * @param {number} yy + * @param {number} number + * @param {number} size + * @param {number} length + * @return {composite} A new composite newtonsCradle body + */ + Composites.newtonsCradle = function(xx, yy, number, size, length) { + var newtonsCradle = Composite.create({ label: 'Newtons Cradle' }); + + for (var i = 0; i < number; i++) { + var separation = 1.9, + circle = Bodies.circle(xx + i * (size * separation), yy + length, size, + { inertia: Infinity, restitution: 1, friction: 0, frictionAir: 0.0001, slop: 1 }), + constraint = Constraint.create({ pointA: { x: xx + i * (size * separation), y: yy }, bodyB: circle }); + + Composite.addBody(newtonsCradle, circle); + Composite.addConstraint(newtonsCradle, constraint); + } + + return newtonsCradle; + }; + + /** + * Creates a composite with simple car setup of bodies and constraints. + * @method car + * @param {number} xx + * @param {number} yy + * @param {number} width + * @param {number} height + * @param {number} wheelSize + * @return {composite} A new composite car body + */ + Composites.car = function(xx, yy, width, height, wheelSize) { + var group = Body.nextGroup(true), + wheelBase = 20, + wheelAOffset = -width * 0.5 + wheelBase, + wheelBOffset = width * 0.5 - wheelBase, + wheelYOffset = 0; + + var car = Composite.create({ label: 'Car' }), + body = Bodies.rectangle(xx, yy, width, height, { + collisionFilter: { + group: group + }, + chamfer: { + radius: height * 0.5 + }, + density: 0.0002 + }); + + var wheelA = Bodies.circle(xx + wheelAOffset, yy + wheelYOffset, wheelSize, { + collisionFilter: { + group: group + }, + friction: 0.8 + }); + + var wheelB = Bodies.circle(xx + wheelBOffset, yy + wheelYOffset, wheelSize, { + collisionFilter: { + group: group + }, + friction: 0.8 + }); + + var axelA = Constraint.create({ + bodyB: body, + pointB: { x: wheelAOffset, y: wheelYOffset }, + bodyA: wheelA, + stiffness: 1, + length: 0 + }); + + var axelB = Constraint.create({ + bodyB: body, + pointB: { x: wheelBOffset, y: wheelYOffset }, + bodyA: wheelB, + stiffness: 1, + length: 0 + }); + + Composite.addBody(car, body); + Composite.addBody(car, wheelA); + Composite.addBody(car, wheelB); + Composite.addConstraint(car, axelA); + Composite.addConstraint(car, axelB); + + return car; + }; + + /** + * Creates a simple soft body like object. + * @method softBody + * @param {number} xx + * @param {number} yy + * @param {number} columns + * @param {number} rows + * @param {number} columnGap + * @param {number} rowGap + * @param {boolean} crossBrace + * @param {number} particleRadius + * @param {} particleOptions + * @param {} constraintOptions + * @return {composite} A new composite softBody + */ + Composites.softBody = function(xx, yy, columns, rows, columnGap, rowGap, crossBrace, particleRadius, particleOptions, constraintOptions) { + particleOptions = Common.extend({ inertia: Infinity }, particleOptions); + constraintOptions = Common.extend({ stiffness: 0.2, render: { type: 'line', anchors: false } }, constraintOptions); + + var softBody = Composites.stack(xx, yy, columns, rows, columnGap, rowGap, function(x, y) { + return Bodies.circle(x, y, particleRadius, particleOptions); + }); + + Composites.mesh(softBody, columns, rows, crossBrace, constraintOptions); + + softBody.label = 'Soft Body'; + + return softBody; + }; + +})(); + + +/***/ }), +/* 234 */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* The `Matter.Svg` module contains methods for converting SVG images into an array of vector points. +* +* To use this module you also need the SVGPathSeg polyfill: https://github.com/progers/pathseg +* +* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). +* +* @class Svg +*/ + +var Svg = {}; + +module.exports = Svg; + +var Bounds = __webpack_require__(38); +var Common = __webpack_require__(19); + +(function() { + + /** + * Converts an SVG path into an array of vector points. + * If the input path forms a concave shape, you must decompose the result into convex parts before use. + * See `Bodies.fromVertices` which provides support for this. + * Note that this function is not guaranteed to support complex paths (such as those with holes). + * You must load the `pathseg.js` polyfill on newer browsers. + * @method pathToVertices + * @param {SVGPathElement} path + * @param {Number} [sampleLength=15] + * @return {Vector[]} points + */ + Svg.pathToVertices = function(path, sampleLength) { + if (typeof window !== 'undefined' && !('SVGPathSeg' in window)) { + Common.warn('Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.'); + } + + // https://github.com/wout/svg.topoly.js/blob/master/svg.topoly.js + var i, il, total, point, segment, segments, + segmentsQueue, lastSegment, + lastPoint, segmentIndex, points = [], + lx, ly, length = 0, x = 0, y = 0; + + sampleLength = sampleLength || 15; + + var addPoint = function(px, py, pathSegType) { + // all odd-numbered path types are relative except PATHSEG_CLOSEPATH (1) + var isRelative = pathSegType % 2 === 1 && pathSegType > 1; + + // when the last point doesn't equal the current point add the current point + if (!lastPoint || px != lastPoint.x || py != lastPoint.y) { + if (lastPoint && isRelative) { + lx = lastPoint.x; + ly = lastPoint.y; + } else { + lx = 0; + ly = 0; + } + + var point = { + x: lx + px, + y: ly + py + }; + + // set last point + if (isRelative || !lastPoint) { + lastPoint = point; + } + + points.push(point); + + x = lx + px; + y = ly + py; + } + }; + + var addSegmentPoint = function(segment) { + var segType = segment.pathSegTypeAsLetter.toUpperCase(); + + // skip path ends + if (segType === 'Z') + return; + + // map segment to x and y + switch (segType) { + + case 'M': + case 'L': + case 'T': + case 'C': + case 'S': + case 'Q': + x = segment.x; + y = segment.y; + break; + case 'H': + x = segment.x; + break; + case 'V': + y = segment.y; + break; + } + + addPoint(x, y, segment.pathSegType); + }; + + // ensure path is absolute + Svg._svgPathToAbsolute(path); + + // get total length + total = path.getTotalLength(); + + // queue segments + segments = []; + for (i = 0; i < path.pathSegList.numberOfItems; i += 1) + segments.push(path.pathSegList.getItem(i)); + + segmentsQueue = segments.concat(); + + // sample through path + while (length < total) { + // get segment at position + segmentIndex = path.getPathSegAtLength(length); + segment = segments[segmentIndex]; + + // new segment + if (segment != lastSegment) { + while (segmentsQueue.length && segmentsQueue[0] != segment) + addSegmentPoint(segmentsQueue.shift()); + + lastSegment = segment; + } + + // add points in between when curving + // TODO: adaptive sampling + switch (segment.pathSegTypeAsLetter.toUpperCase()) { + + case 'C': + case 'T': + case 'S': + case 'Q': + case 'A': + point = path.getPointAtLength(length); + addPoint(point.x, point.y, 0); + break; + + } + + // increment by sample value + length += sampleLength; + } + + // add remaining segments not passed by sampling + for (i = 0, il = segmentsQueue.length; i < il; ++i) + addSegmentPoint(segmentsQueue[i]); + + return points; + }; + + Svg._svgPathToAbsolute = function(path) { + // http://phrogz.net/convert-svg-path-to-all-absolute-commands + // Copyright (c) Gavin Kistner + // http://phrogz.net/js/_ReuseLicense.txt + // Modifications: tidy formatting and naming + var x0, y0, x1, y1, x2, y2, segs = path.pathSegList, + x = 0, y = 0, len = segs.numberOfItems; + + for (var i = 0; i < len; ++i) { + var seg = segs.getItem(i), + segType = seg.pathSegTypeAsLetter; + + if (/[MLHVCSQTA]/.test(segType)) { + if ('x' in seg) x = seg.x; + if ('y' in seg) y = seg.y; + } else { + if ('x1' in seg) x1 = x + seg.x1; + if ('x2' in seg) x2 = x + seg.x2; + if ('y1' in seg) y1 = y + seg.y1; + if ('y2' in seg) y2 = y + seg.y2; + if ('x' in seg) x += seg.x; + if ('y' in seg) y += seg.y; + + switch (segType) { + + case 'm': + segs.replaceItem(path.createSVGPathSegMovetoAbs(x, y), i); + break; + case 'l': + segs.replaceItem(path.createSVGPathSegLinetoAbs(x, y), i); + break; + case 'h': + segs.replaceItem(path.createSVGPathSegLinetoHorizontalAbs(x), i); + break; + case 'v': + segs.replaceItem(path.createSVGPathSegLinetoVerticalAbs(y), i); + break; + case 'c': + segs.replaceItem(path.createSVGPathSegCurvetoCubicAbs(x, y, x1, y1, x2, y2), i); + break; + case 's': + segs.replaceItem(path.createSVGPathSegCurvetoCubicSmoothAbs(x, y, x2, y2), i); + break; + case 'q': + segs.replaceItem(path.createSVGPathSegCurvetoQuadraticAbs(x, y, x1, y1), i); + break; + case 't': + segs.replaceItem(path.createSVGPathSegCurvetoQuadraticSmoothAbs(x, y), i); + break; + case 'a': + segs.replaceItem(path.createSVGPathSegArcAbs(x, y, seg.r1, seg.r2, seg.angle, seg.largeArcFlag, seg.sweepFlag), i); + break; + case 'z': + case 'Z': + x = x0; + y = y0; + break; + + } + } + + if (segType == 'M' || segType == 'm') { + x0 = x; + y0 = y; + } + } + }; + +})(); + +/***/ }), +/* 235 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Joachim Grill + * @author Richard Davey + * @copyright 2018 CodeAndWeb GmbH + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Bodies = __webpack_require__(42); +var Body = __webpack_require__(25); +var Common = __webpack_require__(19); +var GetFastValue = __webpack_require__(1); +var Vertices = __webpack_require__(31); + +/** + * Use PhysicsEditorParser.parseBody() to build a Matter body object, based on a physics data file + * created and exported with PhysicsEditor (https://www.codeandweb.com/physicseditor). + * + * @namespace Phaser.Physics.Matter.PhysicsEditorParser + * @since 3.10.0 + */ +var PhysicsEditorParser = { + + /** + * Parses a body element exported by PhysicsEditor. + * + * @function Phaser.Physics.Matter.PhysicsEditorParser.parseBody + * @since 3.10.0 + * + * @param {number} x - The horizontal world location of the body. + * @param {number} y - The vertical world location of the body. + * @param {object} config - The body configuration and fixture (child body) definitions, as exported by PhysicsEditor. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. + * + * @return {MatterJS.BodyType} A compound Matter JS Body. + */ + parseBody: function (x, y, config, options) + { + if (options === undefined) { options = {}; } + + var fixtureConfigs = GetFastValue(config, 'fixtures', []); + var fixtures = []; + + for (var fc = 0; fc < fixtureConfigs.length; fc++) + { + var fixtureParts = this.parseFixture(fixtureConfigs[fc]); + + for (var i = 0; i < fixtureParts.length; i++) + { + fixtures.push(fixtureParts[i]); + } + } + + var matterConfig = Common.clone(config, true); + + Common.extend(matterConfig, options, true); + + delete matterConfig.fixtures; + delete matterConfig.type; + + var body = Body.create(matterConfig); + + Body.setParts(body, fixtures); + + Body.setPosition(body, { x: x, y: y }); + + return body; + }, + + /** + * Parses an element of the "fixtures" list exported by PhysicsEditor + * + * @function Phaser.Physics.Matter.PhysicsEditorParser.parseFixture + * @since 3.10.0 + * + * @param {object} fixtureConfig - The fixture object to parse. + * + * @return {MatterJS.BodyType[]} - An array of Matter JS Bodies. + */ + parseFixture: function (fixtureConfig) + { + var matterConfig = Common.extend({}, false, fixtureConfig); + + delete matterConfig.circle; + delete matterConfig.vertices; + + var fixtures; + + if (fixtureConfig.circle) + { + var x = GetFastValue(fixtureConfig.circle, 'x'); + var y = GetFastValue(fixtureConfig.circle, 'y'); + var r = GetFastValue(fixtureConfig.circle, 'radius'); + fixtures = [ Bodies.circle(x, y, r, matterConfig) ]; + } + else if (fixtureConfig.vertices) + { + fixtures = this.parseVertices(fixtureConfig.vertices, matterConfig); + } + + return fixtures; + }, + + /** + * Parses the "vertices" lists exported by PhysicsEditor. + * + * @function Phaser.Physics.Matter.PhysicsEditorParser.parseVertices + * @since 3.10.0 + * + * @param {array} vertexSets - The vertex lists to parse. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. + * + * @return {MatterJS.BodyType[]} - An array of Matter JS Bodies. + */ + parseVertices: function (vertexSets, options) + { + if (options === undefined) { options = {}; } + + var parts = []; + + for (var v = 0; v < vertexSets.length; v++) + { + Vertices.clockwiseSort(vertexSets[v]); + + parts.push(Body.create(Common.extend({ + position: Vertices.centre(vertexSets[v]), + vertices: vertexSets[v] + }, options))); + } + + // flag coincident part edges + return Bodies.flagCoincidentParts(parts); + } +}; + +module.exports = PhysicsEditorParser; + + +/***/ }), +/* 236 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Bodies = __webpack_require__(42); +var Body = __webpack_require__(25); + +/** + * Creates a body using the supplied physics data, as provided by a JSON file. + * + * The data file should be loaded as JSON: + * + * ```javascript + * preload () + * { + * this.load.json('ninjas', 'assets/ninjas.json); + * } + * + * create () + * { + * const ninjaShapes = this.cache.json.get('ninjas'); + * + * this.matter.add.fromJSON(400, 300, ninjaShapes.shinobi); + * } + * ``` + * + * Do not pass the entire JSON file to this method, but instead pass one of the shapes contained within it. + * + * If you pas in an `options` object, any settings in there will override those in the config object. + * + * The structure of the JSON file is as follows: + * + * ```text + * { + * 'generator_info': // The name of the application that created the JSON data + * 'shapeName': { + * 'type': // The type of body + * 'label': // Optional body label + * 'vertices': // An array, or an array of arrays, containing the vertex data in x/y object pairs + * } + * } + * ``` + * + * At the time of writing, only the Phaser Physics Tracer App exports in this format. + * + * @namespace Phaser.Physics.Matter.PhysicsJSONParser + * @since 3.22.0 + */ +var PhysicsJSONParser = { + + /** + * Parses a body element from the given JSON data. + * + * @function Phaser.Physics.Matter.PhysicsJSONParser.parseBody + * @since 3.22.0 + * + * @param {number} x - The horizontal world location of the body. + * @param {number} y - The vertical world location of the body. + * @param {object} config - The body configuration data. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. + * + * @return {MatterJS.BodyType} A Matter JS Body. + */ + parseBody: function (x, y, config, options) + { + if (options === undefined) { options = {}; } + + var body; + var vertexSets = config.vertices; + + if (vertexSets.length === 1) + { + // Just a single Body + options.vertices = vertexSets[0]; + + body = Body.create(options); + + Bodies.flagCoincidentParts(body.parts); + } + else + { + var parts = []; + + for (var i = 0; i < vertexSets.length; i++) + { + var part = Body.create({ + vertices: vertexSets[i] + }); + + parts.push(part); + } + + Bodies.flagCoincidentParts(parts); + + options.parts = parts; + + body = Body.create(options); + } + + body.label = config.label; + + Body.setPosition(body, { x: x, y: y }); + + return body; + } + +}; + +module.exports = PhysicsJSONParser; + + +/***/ }), +/* 237 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Physics.Matter.Events + */ + +module.exports = { + + AFTER_ADD: __webpack_require__(1351), + AFTER_REMOVE: __webpack_require__(1352), + AFTER_UPDATE: __webpack_require__(1353), + BEFORE_ADD: __webpack_require__(1354), + BEFORE_REMOVE: __webpack_require__(1355), + BEFORE_UPDATE: __webpack_require__(1356), + COLLISION_ACTIVE: __webpack_require__(1357), + COLLISION_END: __webpack_require__(1358), + COLLISION_START: __webpack_require__(1359), + DRAG_END: __webpack_require__(1360), + DRAG: __webpack_require__(1361), + DRAG_START: __webpack_require__(1362), + PAUSE: __webpack_require__(1363), + RESUME: __webpack_require__(1364), + SLEEP_END: __webpack_require__(1365), + SLEEP_START: __webpack_require__(1366) + +}; + + +/***/ }), +/* 238 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Bodies = __webpack_require__(42); var Body = __webpack_require__(25); var Class = __webpack_require__(0); -var Components = __webpack_require__(143); +var Components = __webpack_require__(147); var GetFastValue = __webpack_require__(1); -var HasValue = __webpack_require__(90); +var HasValue = __webpack_require__(91); var Vertices = __webpack_require__(31); /** @@ -52469,7 +54012,7 @@ var Vertices = __webpack_require__(31); * @extends Phaser.Physics.Matter.Components.Sleep * @extends Phaser.Physics.Matter.Components.Static * - * @param {Phaser.Physics.Matter.World} world - [description] + * @param {Phaser.Physics.Matter.World} world - The Matter world instance this body belongs to. * @param {Phaser.Tilemaps.Tile} tile - The target tile that should have a Matter body. * @param {Phaser.Types.Physics.Matter.MatterTileOptions} [options] - Options to be used when creating the Matter body. */ @@ -52673,7 +54216,7 @@ var MatterTileBody = new Class({ * @method Phaser.Physics.Matter.TileBody#setBody * @since 3.0.0 * - * @param {MatterJS.Body} body - The new Matter body to use. + * @param {MatterJS.BodyType} body - The new Matter body to use. * @param {boolean} [addToWorld=true] - Whether or not to add the body to the Matter world. * * @return {Phaser.Physics.Matter.TileBody} This TileBody object. @@ -52738,401 +54281,12 @@ module.exports = MatterTileBody; /***/ }), -/* 233 */ -/***/ (function(module, exports, __webpack_require__) { - -/** -* The `Matter.Detector` module contains methods for detecting collisions given a set of pairs. -* -* @class Detector -*/ - -// TODO: speculative contacts - -var Detector = {}; - -module.exports = Detector; - -var SAT = __webpack_require__(234); -var Pair = __webpack_require__(144); -var Bounds = __webpack_require__(38); - -(function() { - - /** - * Finds all collisions given a list of pairs. - * @method collisions - * @param {pair[]} broadphasePairs - * @param {engine} engine - * @return {array} collisions - */ - Detector.collisions = function(broadphasePairs, engine) { - var collisions = [], - pairsTable = engine.pairs.table; - - // @if DEBUG - var metrics = engine.metrics; - // @endif - - for (var i = 0; i < broadphasePairs.length; i++) { - var bodyA = broadphasePairs[i][0], - bodyB = broadphasePairs[i][1]; - - if ((bodyA.isStatic || bodyA.isSleeping) && (bodyB.isStatic || bodyB.isSleeping)) - continue; - - if (!Detector.canCollide(bodyA.collisionFilter, bodyB.collisionFilter)) - continue; - - // @if DEBUG - metrics.midphaseTests += 1; - // @endif - - // mid phase - if (Bounds.overlaps(bodyA.bounds, bodyB.bounds)) { - for (var j = bodyA.parts.length > 1 ? 1 : 0; j < bodyA.parts.length; j++) { - var partA = bodyA.parts[j]; - - for (var k = bodyB.parts.length > 1 ? 1 : 0; k < bodyB.parts.length; k++) { - var partB = bodyB.parts[k]; - - if ((partA === bodyA && partB === bodyB) || Bounds.overlaps(partA.bounds, partB.bounds)) { - // find a previous collision we could reuse - var pairId = Pair.id(partA, partB), - pair = pairsTable[pairId], - previousCollision; - - if (pair && pair.isActive) { - previousCollision = pair.collision; - } else { - previousCollision = null; - } - - // narrow phase - var collision = SAT.collides(partA, partB, previousCollision); - - // @if DEBUG - metrics.narrowphaseTests += 1; - if (collision.reused) - metrics.narrowReuseCount += 1; - // @endif - - if (collision.collided) { - collisions.push(collision); - // @if DEBUG - metrics.narrowDetections += 1; - // @endif - } - } - } - } - } - } - - return collisions; - }; - - /** - * Returns `true` if both supplied collision filters will allow a collision to occur. - * See `body.collisionFilter` for more information. - * @method canCollide - * @param {} filterA - * @param {} filterB - * @return {bool} `true` if collision can occur - */ - Detector.canCollide = function(filterA, filterB) { - if (filterA.group === filterB.group && filterA.group !== 0) - return filterA.group > 0; - - return (filterA.mask & filterB.category) !== 0 && (filterB.mask & filterA.category) !== 0; - }; - -})(); - - -/***/ }), -/* 234 */ -/***/ (function(module, exports, __webpack_require__) { - -/** -* The `Matter.SAT` module contains methods for detecting collisions using the Separating Axis Theorem. -* -* @class SAT -*/ - -// TODO: true circles and curves - -var SAT = {}; - -module.exports = SAT; - -var Vertices = __webpack_require__(31); -var Vector = __webpack_require__(37); - -(function() { - - /** - * Detect collision between two bodies using the Separating Axis Theorem. - * @method collides - * @param {body} bodyA - * @param {body} bodyB - * @param {collision} previousCollision - * @return {collision} collision - */ - SAT.collides = function(bodyA, bodyB, previousCollision) { - var overlapAB, - overlapBA, - minOverlap, - collision, - canReusePrevCol = false; - - if (previousCollision) { - // estimate total motion - var parentA = bodyA.parent, - parentB = bodyB.parent, - motion = parentA.speed * parentA.speed + parentA.angularSpeed * parentA.angularSpeed - + parentB.speed * parentB.speed + parentB.angularSpeed * parentB.angularSpeed; - - // we may be able to (partially) reuse collision result - // but only safe if collision was resting - canReusePrevCol = previousCollision && previousCollision.collided && motion < 0.2; - - // reuse collision object - collision = previousCollision; - } else { - collision = { collided: false, bodyA: bodyA, bodyB: bodyB }; - } - - if (previousCollision && canReusePrevCol) { - // if we can reuse the collision result - // we only need to test the previously found axis - var axisBodyA = collision.axisBody, - axisBodyB = axisBodyA === bodyA ? bodyB : bodyA, - axes = [axisBodyA.axes[previousCollision.axisNumber]]; - - minOverlap = SAT._overlapAxes(axisBodyA.vertices, axisBodyB.vertices, axes); - collision.reused = true; - - if (minOverlap.overlap <= 0) { - collision.collided = false; - return collision; - } - } else { - // if we can't reuse a result, perform a full SAT test - - overlapAB = SAT._overlapAxes(bodyA.vertices, bodyB.vertices, bodyA.axes); - - if (overlapAB.overlap <= 0) { - collision.collided = false; - return collision; - } - - overlapBA = SAT._overlapAxes(bodyB.vertices, bodyA.vertices, bodyB.axes); - - if (overlapBA.overlap <= 0) { - collision.collided = false; - return collision; - } - - if (overlapAB.overlap < overlapBA.overlap) { - minOverlap = overlapAB; - collision.axisBody = bodyA; - } else { - minOverlap = overlapBA; - collision.axisBody = bodyB; - } - - // important for reuse later - collision.axisNumber = minOverlap.axisNumber; - } - - collision.bodyA = bodyA.id < bodyB.id ? bodyA : bodyB; - collision.bodyB = bodyA.id < bodyB.id ? bodyB : bodyA; - collision.collided = true; - collision.depth = minOverlap.overlap; - collision.parentA = collision.bodyA.parent; - collision.parentB = collision.bodyB.parent; - - bodyA = collision.bodyA; - bodyB = collision.bodyB; - - // ensure normal is facing away from bodyA - if (Vector.dot(minOverlap.axis, Vector.sub(bodyB.position, bodyA.position)) < 0) { - collision.normal = { - x: minOverlap.axis.x, - y: minOverlap.axis.y - }; - } else { - collision.normal = { - x: -minOverlap.axis.x, - y: -minOverlap.axis.y - }; - } - - collision.tangent = Vector.perp(collision.normal); - - collision.penetration = collision.penetration || {}; - collision.penetration.x = collision.normal.x * collision.depth; - collision.penetration.y = collision.normal.y * collision.depth; - - // find support points, there is always either exactly one or two - var verticesB = SAT._findSupports(bodyA, bodyB, collision.normal), - supports = []; - - // find the supports from bodyB that are inside bodyA - if (Vertices.contains(bodyA.vertices, verticesB[0])) - supports.push(verticesB[0]); - - if (Vertices.contains(bodyA.vertices, verticesB[1])) - supports.push(verticesB[1]); - - // find the supports from bodyA that are inside bodyB - if (supports.length < 2) { - var verticesA = SAT._findSupports(bodyB, bodyA, Vector.neg(collision.normal)); - - if (Vertices.contains(bodyB.vertices, verticesA[0])) - supports.push(verticesA[0]); - - if (supports.length < 2 && Vertices.contains(bodyB.vertices, verticesA[1])) - supports.push(verticesA[1]); - } - - // account for the edge case of overlapping but no vertex containment - if (supports.length < 1) - supports = [verticesB[0]]; - - collision.supports = supports; - - return collision; - }; - - /** - * Find the overlap between two sets of vertices. - * @method _overlapAxes - * @private - * @param {} verticesA - * @param {} verticesB - * @param {} axes - * @return result - */ - SAT._overlapAxes = function(verticesA, verticesB, axes) { - var projectionA = Vector._temp[0], - projectionB = Vector._temp[1], - result = { overlap: Number.MAX_VALUE }, - overlap, - axis; - - for (var i = 0; i < axes.length; i++) { - axis = axes[i]; - - SAT._projectToAxis(projectionA, verticesA, axis); - SAT._projectToAxis(projectionB, verticesB, axis); - - overlap = Math.min(projectionA.max - projectionB.min, projectionB.max - projectionA.min); - - if (overlap <= 0) { - result.overlap = overlap; - return result; - } - - if (overlap < result.overlap) { - result.overlap = overlap; - result.axis = axis; - result.axisNumber = i; - } - } - - return result; - }; - - /** - * Projects vertices on an axis and returns an interval. - * @method _projectToAxis - * @private - * @param {} projection - * @param {} vertices - * @param {} axis - */ - SAT._projectToAxis = function(projection, vertices, axis) { - var min = Vector.dot(vertices[0], axis), - max = min; - - for (var i = 1; i < vertices.length; i += 1) { - var dot = Vector.dot(vertices[i], axis); - - if (dot > max) { - max = dot; - } else if (dot < min) { - min = dot; - } - } - - projection.min = min; - projection.max = max; - }; - - /** - * Finds supporting vertices given two bodies along a given direction using hill-climbing. - * @method _findSupports - * @private - * @param {} bodyA - * @param {} bodyB - * @param {} normal - * @return [vector] - */ - SAT._findSupports = function(bodyA, bodyB, normal) { - var nearestDistance = Number.MAX_VALUE, - vertexToBody = Vector._temp[0], - vertices = bodyB.vertices, - bodyAPosition = bodyA.position, - distance, - vertex, - vertexA, - vertexB; - - // find closest vertex on bodyB - for (var i = 0; i < vertices.length; i++) { - vertex = vertices[i]; - vertexToBody.x = vertex.x - bodyAPosition.x; - vertexToBody.y = vertex.y - bodyAPosition.y; - distance = -Vector.dot(normal, vertexToBody); - - if (distance < nearestDistance) { - nearestDistance = distance; - vertexA = vertex; - } - } - - // find next closest vertex using the two connected to it - var prevIndex = vertexA.index - 1 >= 0 ? vertexA.index - 1 : vertices.length - 1; - vertex = vertices[prevIndex]; - vertexToBody.x = vertex.x - bodyAPosition.x; - vertexToBody.y = vertex.y - bodyAPosition.y; - nearestDistance = -Vector.dot(normal, vertexToBody); - vertexB = vertex; - - var nextIndex = (vertexA.index + 1) % vertices.length; - vertex = vertices[nextIndex]; - vertexToBody.x = vertex.x - bodyAPosition.x; - vertexToBody.y = vertex.y - bodyAPosition.y; - distance = -Vector.dot(normal, vertexToBody); - if (distance < nearestDistance) { - vertexB = vertex; - } - - return [vertexA, vertexB]; - }; - -})(); - - -/***/ }), -/* 235 */ +/* 239 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -53140,34 +54294,34 @@ var Vector = __webpack_require__(37); * @namespace Phaser.Physics.Matter.Matter */ -var Matter = __webpack_require__(490); +var Matter = __webpack_require__(508); Matter.Body = __webpack_require__(25); -Matter.Composite = __webpack_require__(77); -Matter.World = __webpack_require__(237); +Matter.Composite = __webpack_require__(68); +Matter.World = __webpack_require__(241); -Matter.Detector = __webpack_require__(233); -Matter.Grid = __webpack_require__(491); -Matter.Pairs = __webpack_require__(492); -Matter.Pair = __webpack_require__(144); -Matter.Query = __webpack_require__(1354); -Matter.Resolver = __webpack_require__(493); -Matter.SAT = __webpack_require__(234); +Matter.Detector = __webpack_require__(148); +Matter.Grid = __webpack_require__(242); +Matter.Pairs = __webpack_require__(243); +Matter.Pair = __webpack_require__(114); +Matter.Query = __webpack_require__(509); +Matter.Resolver = __webpack_require__(244); +Matter.SAT = __webpack_require__(149); -Matter.Constraint = __webpack_require__(95); +Matter.Constraint = __webpack_require__(78); -Matter.Common = __webpack_require__(18); -Matter.Engine = __webpack_require__(494); -Matter.Events = __webpack_require__(94); -Matter.Sleeping = __webpack_require__(112); -Matter.Plugin = __webpack_require__(236); +Matter.Common = __webpack_require__(19); +Matter.Engine = __webpack_require__(510); +Matter.Events = __webpack_require__(96); +Matter.Sleeping = __webpack_require__(95); +Matter.Plugin = __webpack_require__(240); -Matter.Bodies = __webpack_require__(57); -Matter.Composites = __webpack_require__(486); +Matter.Bodies = __webpack_require__(42); +Matter.Composites = __webpack_require__(233); -Matter.Axes = __webpack_require__(230); +Matter.Axes = __webpack_require__(146); Matter.Bounds = __webpack_require__(38); -Matter.Svg = __webpack_require__(1356); +Matter.Svg = __webpack_require__(234); Matter.Vector = __webpack_require__(37); Matter.Vertices = __webpack_require__(31); @@ -53184,7 +54338,7 @@ module.exports = Matter; /***/ }), -/* 236 */ +/* 240 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53197,7 +54351,7 @@ var Plugin = {}; module.exports = Plugin; -var Common = __webpack_require__(18); +var Common = __webpack_require__(19); (function() { @@ -53534,7 +54688,7 @@ var Common = __webpack_require__(18); /***/ }), -/* 237 */ +/* 241 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53554,9 +54708,9 @@ var World = {}; module.exports = World; -var Composite = __webpack_require__(77); -var Constraint = __webpack_require__(95); -var Common = __webpack_require__(18); +var Composite = __webpack_require__(68); +var Constraint = __webpack_require__(78); +var Common = __webpack_require__(19); (function() { @@ -53687,16 +54841,864 @@ var Common = __webpack_require__(18); /***/ }), -/* 238 */ +/* 242 */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* The `Matter.Grid` module contains methods for creating and manipulating collision broadphase grid structures. +* +* @class Grid +*/ + +var Grid = {}; + +module.exports = Grid; + +var Pair = __webpack_require__(114); +var Detector = __webpack_require__(148); +var Common = __webpack_require__(19); + +(function() { + + /** + * Creates a new grid. + * @method create + * @param {} options + * @return {grid} A new grid + */ + Grid.create = function(options) { + var defaults = { + controller: Grid, + detector: Detector.collisions, + buckets: {}, + pairs: {}, + pairsList: [], + bucketWidth: 48, + bucketHeight: 48 + }; + + return Common.extend(defaults, options); + }; + + /** + * The width of a single grid bucket. + * + * @property bucketWidth + * @type number + * @default 48 + */ + + /** + * The height of a single grid bucket. + * + * @property bucketHeight + * @type number + * @default 48 + */ + + /** + * Updates the grid. + * @method update + * @param {grid} grid + * @param {body[]} bodies + * @param {engine} engine + * @param {boolean} forceUpdate + */ + Grid.update = function(grid, bodies, engine, forceUpdate) { + var i, col, row, + world = engine.world, + buckets = grid.buckets, + bucket, + bucketId, + gridChanged = false; + + // @if DEBUG + var metrics = engine.metrics; + metrics.broadphaseTests = 0; + // @endif + + for (i = 0; i < bodies.length; i++) { + var body = bodies[i]; + + if (body.isSleeping && !forceUpdate) + continue; + + // don't update out of world bodies + if (body.bounds.max.x < world.bounds.min.x || body.bounds.min.x > world.bounds.max.x + || body.bounds.max.y < world.bounds.min.y || body.bounds.min.y > world.bounds.max.y) + continue; + + var newRegion = Grid._getRegion(grid, body); + + // if the body has changed grid region + if (!body.region || newRegion.id !== body.region.id || forceUpdate) { + + // @if DEBUG + metrics.broadphaseTests += 1; + // @endif + + if (!body.region || forceUpdate) + body.region = newRegion; + + var union = Grid._regionUnion(newRegion, body.region); + + // update grid buckets affected by region change + // iterate over the union of both regions + for (col = union.startCol; col <= union.endCol; col++) { + for (row = union.startRow; row <= union.endRow; row++) { + bucketId = Grid._getBucketId(col, row); + bucket = buckets[bucketId]; + + var isInsideNewRegion = (col >= newRegion.startCol && col <= newRegion.endCol + && row >= newRegion.startRow && row <= newRegion.endRow); + + var isInsideOldRegion = (col >= body.region.startCol && col <= body.region.endCol + && row >= body.region.startRow && row <= body.region.endRow); + + // remove from old region buckets + if (!isInsideNewRegion && isInsideOldRegion) { + if (isInsideOldRegion) { + if (bucket) + Grid._bucketRemoveBody(grid, bucket, body); + } + } + + // add to new region buckets + if (body.region === newRegion || (isInsideNewRegion && !isInsideOldRegion) || forceUpdate) { + if (!bucket) + bucket = Grid._createBucket(buckets, bucketId); + Grid._bucketAddBody(grid, bucket, body); + } + } + } + + // set the new region + body.region = newRegion; + + // flag changes so we can update pairs + gridChanged = true; + } + } + + // update pairs list only if pairs changed (i.e. a body changed region) + if (gridChanged) + grid.pairsList = Grid._createActivePairsList(grid); + }; + + /** + * Clears the grid. + * @method clear + * @param {grid} grid + */ + Grid.clear = function(grid) { + grid.buckets = {}; + grid.pairs = {}; + grid.pairsList = []; + }; + + /** + * Finds the union of two regions. + * @method _regionUnion + * @private + * @param {} regionA + * @param {} regionB + * @return {} region + */ + Grid._regionUnion = function(regionA, regionB) { + var startCol = Math.min(regionA.startCol, regionB.startCol), + endCol = Math.max(regionA.endCol, regionB.endCol), + startRow = Math.min(regionA.startRow, regionB.startRow), + endRow = Math.max(regionA.endRow, regionB.endRow); + + return Grid._createRegion(startCol, endCol, startRow, endRow); + }; + + /** + * Gets the region a given body falls in for a given grid. + * @method _getRegion + * @private + * @param {} grid + * @param {} body + * @return {} region + */ + Grid._getRegion = function(grid, body) { + var bounds = body.bounds, + startCol = Math.floor(bounds.min.x / grid.bucketWidth), + endCol = Math.floor(bounds.max.x / grid.bucketWidth), + startRow = Math.floor(bounds.min.y / grid.bucketHeight), + endRow = Math.floor(bounds.max.y / grid.bucketHeight); + + return Grid._createRegion(startCol, endCol, startRow, endRow); + }; + + /** + * Creates a region. + * @method _createRegion + * @private + * @param {} startCol + * @param {} endCol + * @param {} startRow + * @param {} endRow + * @return {} region + */ + Grid._createRegion = function(startCol, endCol, startRow, endRow) { + return { + id: startCol + ',' + endCol + ',' + startRow + ',' + endRow, + startCol: startCol, + endCol: endCol, + startRow: startRow, + endRow: endRow + }; + }; + + /** + * Gets the bucket id at the given position. + * @method _getBucketId + * @private + * @param {} column + * @param {} row + * @return {string} bucket id + */ + Grid._getBucketId = function(column, row) { + return 'C' + column + 'R' + row; + }; + + /** + * Creates a bucket. + * @method _createBucket + * @private + * @param {} buckets + * @param {} bucketId + * @return {} bucket + */ + Grid._createBucket = function(buckets, bucketId) { + var bucket = buckets[bucketId] = []; + return bucket; + }; + + /** + * Adds a body to a bucket. + * @method _bucketAddBody + * @private + * @param {} grid + * @param {} bucket + * @param {} body + */ + Grid._bucketAddBody = function(grid, bucket, body) { + // add new pairs + for (var i = 0; i < bucket.length; i++) { + var bodyB = bucket[i]; + + if (body.id === bodyB.id || (body.isStatic && bodyB.isStatic)) + continue; + + // keep track of the number of buckets the pair exists in + // important for Grid.update to work + var pairId = Pair.id(body, bodyB), + pair = grid.pairs[pairId]; + + if (pair) { + pair[2] += 1; + } else { + grid.pairs[pairId] = [body, bodyB, 1]; + } + } + + // add to bodies (after pairs, otherwise pairs with self) + bucket.push(body); + }; + + /** + * Removes a body from a bucket. + * @method _bucketRemoveBody + * @private + * @param {} grid + * @param {} bucket + * @param {} body + */ + Grid._bucketRemoveBody = function(grid, bucket, body) { + // remove from bucket + bucket.splice(bucket.indexOf(body), 1); + + // update pair counts + for (var i = 0; i < bucket.length; i++) { + // keep track of the number of buckets the pair exists in + // important for _createActivePairsList to work + var bodyB = bucket[i], + pairId = Pair.id(body, bodyB), + pair = grid.pairs[pairId]; + + if (pair) + pair[2] -= 1; + } + }; + + /** + * Generates a list of the active pairs in the grid. + * @method _createActivePairsList + * @private + * @param {} grid + * @return [] pairs + */ + Grid._createActivePairsList = function(grid) { + var pairKeys, + pair, + pairs = []; + + // grid.pairs is used as a hashmap + pairKeys = Common.keys(grid.pairs); + + // iterate over grid.pairs + for (var k = 0; k < pairKeys.length; k++) { + pair = grid.pairs[pairKeys[k]]; + + // if pair exists in at least one bucket + // it is a pair that needs further collision testing so push it + if (pair[2] > 0) { + pairs.push(pair); + } else { + delete grid.pairs[pairKeys[k]]; + } + } + + return pairs; + }; + +})(); + + +/***/ }), +/* 243 */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* The `Matter.Pairs` module contains methods for creating and manipulating collision pair sets. +* +* @class Pairs +*/ + +var Pairs = {}; + +module.exports = Pairs; + +var Pair = __webpack_require__(114); +var Common = __webpack_require__(19); + +(function() { + + Pairs._pairMaxIdleLife = 1000; + + /** + * Creates a new pairs structure. + * @method create + * @param {object} options + * @return {pairs} A new pairs structure + */ + Pairs.create = function(options) { + return Common.extend({ + table: {}, + list: [], + collisionStart: [], + collisionActive: [], + collisionEnd: [] + }, options); + }; + + /** + * Updates pairs given a list of collisions. + * @method update + * @param {object} pairs + * @param {collision[]} collisions + * @param {number} timestamp + */ + Pairs.update = function(pairs, collisions, timestamp) { + var pairsList = pairs.list, + pairsTable = pairs.table, + collisionStart = pairs.collisionStart, + collisionEnd = pairs.collisionEnd, + collisionActive = pairs.collisionActive, + collision, + pairId, + pair, + i; + + // clear collision state arrays, but maintain old reference + collisionStart.length = 0; + collisionEnd.length = 0; + collisionActive.length = 0; + + for (i = 0; i < pairsList.length; i++) { + pairsList[i].confirmedActive = false; + } + + for (i = 0; i < collisions.length; i++) { + collision = collisions[i]; + + if (collision.collided) { + pairId = Pair.id(collision.bodyA, collision.bodyB); + + pair = pairsTable[pairId]; + + if (pair) { + // pair already exists (but may or may not be active) + if (pair.isActive) { + // pair exists and is active + collisionActive.push(pair); + } else { + // pair exists but was inactive, so a collision has just started again + collisionStart.push(pair); + } + + // update the pair + Pair.update(pair, collision, timestamp); + pair.confirmedActive = true; + } else { + // pair did not exist, create a new pair + pair = Pair.create(collision, timestamp); + pairsTable[pairId] = pair; + + // push the new pair + collisionStart.push(pair); + pairsList.push(pair); + } + } + } + + // deactivate previously active pairs that are now inactive + for (i = 0; i < pairsList.length; i++) { + pair = pairsList[i]; + if (pair.isActive && !pair.confirmedActive) { + Pair.setActive(pair, false, timestamp); + collisionEnd.push(pair); + } + } + }; + + /** + * Finds and removes pairs that have been inactive for a set amount of time. + * @method removeOld + * @param {object} pairs + * @param {number} timestamp + */ + Pairs.removeOld = function(pairs, timestamp) { + var pairsList = pairs.list, + pairsTable = pairs.table, + indexesToRemove = [], + pair, + collision, + pairIndex, + i; + + for (i = 0; i < pairsList.length; i++) { + pair = pairsList[i]; + collision = pair.collision; + + // never remove sleeping pairs + if (collision.bodyA.isSleeping || collision.bodyB.isSleeping) { + pair.timeUpdated = timestamp; + continue; + } + + // if pair is inactive for too long, mark it to be removed + if (timestamp - pair.timeUpdated > Pairs._pairMaxIdleLife) { + indexesToRemove.push(i); + } + } + + // remove marked pairs + for (i = 0; i < indexesToRemove.length; i++) { + pairIndex = indexesToRemove[i] - i; + pair = pairsList[pairIndex]; + delete pairsTable[pair.id]; + pairsList.splice(pairIndex, 1); + } + }; + + /** + * Clears the given pairs structure. + * @method clear + * @param {pairs} pairs + * @return {pairs} pairs + */ + Pairs.clear = function(pairs) { + pairs.table = {}; + pairs.list.length = 0; + pairs.collisionStart.length = 0; + pairs.collisionActive.length = 0; + pairs.collisionEnd.length = 0; + return pairs; + }; + +})(); + + +/***/ }), +/* 244 */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* The `Matter.Resolver` module contains methods for resolving collision pairs. +* +* @class Resolver +*/ + +var Resolver = {}; + +module.exports = Resolver; + +var Vertices = __webpack_require__(31); +var Vector = __webpack_require__(37); +var Common = __webpack_require__(19); +var Bounds = __webpack_require__(38); + +(function() { + + Resolver._restingThresh = 4; + Resolver._restingThreshTangent = 6; + Resolver._positionDampen = 0.9; + Resolver._positionWarming = 0.8; + Resolver._frictionNormalMultiplier = 5; + + /** + * Prepare pairs for position solving. + * @method preSolvePosition + * @param {pair[]} pairs + */ + Resolver.preSolvePosition = function(pairs) { + var i, + pair, + activeCount; + + // find total contacts on each body + for (i = 0; i < pairs.length; i++) { + pair = pairs[i]; + + if (!pair.isActive) + continue; + + activeCount = pair.activeContacts.length; + pair.collision.parentA.totalContacts += activeCount; + pair.collision.parentB.totalContacts += activeCount; + } + }; + + /** + * Find a solution for pair positions. + * @method solvePosition + * @param {pair[]} pairs + * @param {body[]} bodies + * @param {number} timeScale + */ + Resolver.solvePosition = function(pairs, bodies, timeScale) { + var i, + normalX, + normalY, + pair, + collision, + bodyA, + bodyB, + normal, + separation, + penetration, + positionImpulseA, + positionImpulseB, + contactShare, + bodyBtoAX, + bodyBtoAY, + positionImpulse, + impulseCoefficient = timeScale * Resolver._positionDampen; + + for (i = 0; i < bodies.length; i++) { + var body = bodies[i]; + body.previousPositionImpulse.x = body.positionImpulse.x; + body.previousPositionImpulse.y = body.positionImpulse.y; + } + + // find impulses required to resolve penetration + for (i = 0; i < pairs.length; i++) { + pair = pairs[i]; + + if (!pair.isActive || pair.isSensor) + continue; + + collision = pair.collision; + bodyA = collision.parentA; + bodyB = collision.parentB; + normal = collision.normal; + + positionImpulseA = bodyA.previousPositionImpulse; + positionImpulseB = bodyB.previousPositionImpulse; + + penetration = collision.penetration; + + bodyBtoAX = positionImpulseB.x - positionImpulseA.x + penetration.x; + bodyBtoAY = positionImpulseB.y - positionImpulseA.y + penetration.y; + + normalX = normal.x; + normalY = normal.y; + + separation = normalX * bodyBtoAX + normalY * bodyBtoAY; + pair.separation = separation; + + positionImpulse = (separation - pair.slop) * impulseCoefficient; + + if (bodyA.isStatic || bodyB.isStatic) + positionImpulse *= 2; + + if (!(bodyA.isStatic || bodyA.isSleeping)) { + contactShare = positionImpulse / bodyA.totalContacts; + bodyA.positionImpulse.x += normalX * contactShare; + bodyA.positionImpulse.y += normalY * contactShare; + } + + if (!(bodyB.isStatic || bodyB.isSleeping)) { + contactShare = positionImpulse / bodyB.totalContacts; + bodyB.positionImpulse.x -= normalX * contactShare; + bodyB.positionImpulse.y -= normalY * contactShare; + } + } + }; + + /** + * Apply position resolution. + * @method postSolvePosition + * @param {body[]} bodies + */ + Resolver.postSolvePosition = function(bodies) { + for (var i = 0; i < bodies.length; i++) { + var body = bodies[i]; + + // reset contact count + body.totalContacts = 0; + + if (body.positionImpulse.x !== 0 || body.positionImpulse.y !== 0) { + // update body geometry + for (var j = 0; j < body.parts.length; j++) { + var part = body.parts[j]; + Vertices.translate(part.vertices, body.positionImpulse); + Bounds.update(part.bounds, part.vertices, body.velocity); + part.position.x += body.positionImpulse.x; + part.position.y += body.positionImpulse.y; + } + + // move the body without changing velocity + body.positionPrev.x += body.positionImpulse.x; + body.positionPrev.y += body.positionImpulse.y; + + if (Vector.dot(body.positionImpulse, body.velocity) < 0) { + // reset cached impulse if the body has velocity along it + body.positionImpulse.x = 0; + body.positionImpulse.y = 0; + } else { + // warm the next iteration + body.positionImpulse.x *= Resolver._positionWarming; + body.positionImpulse.y *= Resolver._positionWarming; + } + } + } + }; + + /** + * Prepare pairs for velocity solving. + * @method preSolveVelocity + * @param {pair[]} pairs + */ + Resolver.preSolveVelocity = function(pairs) { + var i, + j, + pair, + contacts, + collision, + bodyA, + bodyB, + normal, + tangent, + contact, + contactVertex, + normalImpulse, + tangentImpulse, + offset, + impulse = Vector._temp[0], + tempA = Vector._temp[1]; + + for (i = 0; i < pairs.length; i++) { + pair = pairs[i]; + + if (!pair.isActive || pair.isSensor) + continue; + + contacts = pair.activeContacts; + collision = pair.collision; + bodyA = collision.parentA; + bodyB = collision.parentB; + normal = collision.normal; + tangent = collision.tangent; + + // resolve each contact + for (j = 0; j < contacts.length; j++) { + contact = contacts[j]; + contactVertex = contact.vertex; + normalImpulse = contact.normalImpulse; + tangentImpulse = contact.tangentImpulse; + + if (normalImpulse !== 0 || tangentImpulse !== 0) { + // total impulse from contact + impulse.x = (normal.x * normalImpulse) + (tangent.x * tangentImpulse); + impulse.y = (normal.y * normalImpulse) + (tangent.y * tangentImpulse); + + // apply impulse from contact + if (!(bodyA.isStatic || bodyA.isSleeping)) { + offset = Vector.sub(contactVertex, bodyA.position, tempA); + bodyA.positionPrev.x += impulse.x * bodyA.inverseMass; + bodyA.positionPrev.y += impulse.y * bodyA.inverseMass; + bodyA.anglePrev += Vector.cross(offset, impulse) * bodyA.inverseInertia; + } + + if (!(bodyB.isStatic || bodyB.isSleeping)) { + offset = Vector.sub(contactVertex, bodyB.position, tempA); + bodyB.positionPrev.x -= impulse.x * bodyB.inverseMass; + bodyB.positionPrev.y -= impulse.y * bodyB.inverseMass; + bodyB.anglePrev -= Vector.cross(offset, impulse) * bodyB.inverseInertia; + } + } + } + } + }; + + /** + * Find a solution for pair velocities. + * @method solveVelocity + * @param {pair[]} pairs + * @param {number} timeScale + */ + Resolver.solveVelocity = function(pairs, timeScale) { + var timeScaleSquared = timeScale * timeScale, + impulse = Vector._temp[0], + tempA = Vector._temp[1], + tempB = Vector._temp[2], + tempC = Vector._temp[3], + tempD = Vector._temp[4], + tempE = Vector._temp[5]; + + for (var i = 0; i < pairs.length; i++) { + var pair = pairs[i]; + + if (!pair.isActive || pair.isSensor) + continue; + + var collision = pair.collision, + bodyA = collision.parentA, + bodyB = collision.parentB, + normal = collision.normal, + tangent = collision.tangent, + contacts = pair.activeContacts, + contactShare = 1 / contacts.length; + + // update body velocities + bodyA.velocity.x = bodyA.position.x - bodyA.positionPrev.x; + bodyA.velocity.y = bodyA.position.y - bodyA.positionPrev.y; + bodyB.velocity.x = bodyB.position.x - bodyB.positionPrev.x; + bodyB.velocity.y = bodyB.position.y - bodyB.positionPrev.y; + bodyA.angularVelocity = bodyA.angle - bodyA.anglePrev; + bodyB.angularVelocity = bodyB.angle - bodyB.anglePrev; + + // resolve each contact + for (var j = 0; j < contacts.length; j++) { + var contact = contacts[j], + contactVertex = contact.vertex, + offsetA = Vector.sub(contactVertex, bodyA.position, tempA), + offsetB = Vector.sub(contactVertex, bodyB.position, tempB), + velocityPointA = Vector.add(bodyA.velocity, Vector.mult(Vector.perp(offsetA), bodyA.angularVelocity), tempC), + velocityPointB = Vector.add(bodyB.velocity, Vector.mult(Vector.perp(offsetB), bodyB.angularVelocity), tempD), + relativeVelocity = Vector.sub(velocityPointA, velocityPointB, tempE), + normalVelocity = Vector.dot(normal, relativeVelocity); + + var tangentVelocity = Vector.dot(tangent, relativeVelocity), + tangentSpeed = Math.abs(tangentVelocity), + tangentVelocityDirection = Common.sign(tangentVelocity); + + // raw impulses + var normalImpulse = (1 + pair.restitution) * normalVelocity, + normalForce = Common.clamp(pair.separation + normalVelocity, 0, 1) * Resolver._frictionNormalMultiplier; + + // coulomb friction + var tangentImpulse = tangentVelocity, + maxFriction = Infinity; + + if (tangentSpeed > pair.friction * pair.frictionStatic * normalForce * timeScaleSquared) { + maxFriction = tangentSpeed; + tangentImpulse = Common.clamp( + pair.friction * tangentVelocityDirection * timeScaleSquared, + -maxFriction, maxFriction + ); + } + + // modify impulses accounting for mass, inertia and offset + var oAcN = Vector.cross(offsetA, normal), + oBcN = Vector.cross(offsetB, normal), + share = contactShare / (bodyA.inverseMass + bodyB.inverseMass + bodyA.inverseInertia * oAcN * oAcN + bodyB.inverseInertia * oBcN * oBcN); + + normalImpulse *= share; + tangentImpulse *= share; + + // handle high velocity and resting collisions separately + if (normalVelocity < 0 && normalVelocity * normalVelocity > Resolver._restingThresh * timeScaleSquared) { + // high normal velocity so clear cached contact normal impulse + contact.normalImpulse = 0; + } else { + // solve resting collision constraints using Erin Catto's method (GDC08) + // impulse constraint tends to 0 + var contactNormalImpulse = contact.normalImpulse; + contact.normalImpulse = Math.min(contact.normalImpulse + normalImpulse, 0); + normalImpulse = contact.normalImpulse - contactNormalImpulse; + } + + // handle high velocity and resting collisions separately + if (tangentVelocity * tangentVelocity > Resolver._restingThreshTangent * timeScaleSquared) { + // high tangent velocity so clear cached contact tangent impulse + contact.tangentImpulse = 0; + } else { + // solve resting collision constraints using Erin Catto's method (GDC08) + // tangent impulse tends to -tangentSpeed or +tangentSpeed + var contactTangentImpulse = contact.tangentImpulse; + contact.tangentImpulse = Common.clamp(contact.tangentImpulse + tangentImpulse, -maxFriction, maxFriction); + tangentImpulse = contact.tangentImpulse - contactTangentImpulse; + } + + // total impulse from contact + impulse.x = (normal.x * normalImpulse) + (tangent.x * tangentImpulse); + impulse.y = (normal.y * normalImpulse) + (tangent.y * tangentImpulse); + + // apply impulse from contact + if (!(bodyA.isStatic || bodyA.isSleeping)) { + bodyA.positionPrev.x += impulse.x * bodyA.inverseMass; + bodyA.positionPrev.y += impulse.y * bodyA.inverseMass; + bodyA.anglePrev += Vector.cross(offsetA, impulse) * bodyA.inverseInertia; + } + + if (!(bodyB.isStatic || bodyB.isSleeping)) { + bodyB.positionPrev.x -= impulse.x * bodyB.inverseMass; + bodyB.positionPrev.y -= impulse.y * bodyB.inverseMass; + bodyB.anglePrev -= Vector.cross(offsetB, impulse) * bodyB.inverseInertia; + } + } + } + }; + +})(); + + +/***/ }), +/* 245 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(146); +var GetTileAt = __webpack_require__(151); /** * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting @@ -53763,19 +55765,19 @@ module.exports = CalculateFacesAt; /***/ }), -/* 239 */ +/* 246 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tile = __webpack_require__(79); -var IsInLayerBounds = __webpack_require__(113); -var CalculateFacesAt = __webpack_require__(238); -var SetTileCollision = __webpack_require__(78); +var Tile = __webpack_require__(80); +var IsInLayerBounds = __webpack_require__(115); +var CalculateFacesAt = __webpack_require__(245); +var SetTileCollision = __webpack_require__(79); /** * Puts a tile at the given tile coordinates in the specified layer. You can pass in either an index @@ -53843,12 +55845,12 @@ module.exports = PutTileAt; /***/ }), -/* 240 */ +/* 247 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -53882,19 +55884,19 @@ module.exports = SetLayerCollisionIndex; /***/ }), -/* 241 */ +/* 248 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Formats = __webpack_require__(34); -var LayerData = __webpack_require__(114); -var MapData = __webpack_require__(115); -var Tile = __webpack_require__(79); +var LayerData = __webpack_require__(116); +var MapData = __webpack_require__(117); +var Tile = __webpack_require__(80); /** * Parses a 2D array of tile indexes into a new MapData object with a single layer. @@ -53974,12 +55976,12 @@ module.exports = Parse2DArray; /***/ }), -/* 242 */ +/* 249 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -54064,12 +56066,12 @@ module.exports = ParseGID; /***/ }), -/* 243 */ +/* 250 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Seth Berrier - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -54125,17 +56127,17 @@ module.exports = CreateGroupLayer; /***/ }), -/* 244 */ +/* 251 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Pick = __webpack_require__(508); -var ParseGID = __webpack_require__(242); +var Pick = __webpack_require__(524); +var ParseGID = __webpack_require__(249); var copyPoints = function (p) { return { x: p.x, y: p.y }; }; @@ -54207,19 +56209,19 @@ module.exports = ParseObject; /***/ }), -/* 245 */ +/* 252 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Formats = __webpack_require__(34); -var MapData = __webpack_require__(115); -var Parse = __webpack_require__(500); -var Tilemap = __webpack_require__(516); +var MapData = __webpack_require__(117); +var Parse = __webpack_require__(516); +var Tilemap = __webpack_require__(532); /** * Create a Tilemap from the given key or data. If neither is given, make a blank Tilemap. When @@ -54293,12 +56295,12 @@ module.exports = ParseToTilemap; /***/ }), -/* 246 */ +/* 253 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -54342,12 +56344,12 @@ module.exports = GetTargets; /***/ }), -/* 247 */ +/* 254 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -54610,12 +56612,12 @@ module.exports = GetValueOp; /***/ }), -/* 248 */ +/* 255 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -54654,21 +56656,21 @@ module.exports = TWEEN_DEFAULTS; /***/ }), -/* 249 */ +/* 256 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(250); +var Events = __webpack_require__(257); var GameObjectCreator = __webpack_require__(16); var GameObjectFactory = __webpack_require__(6); -var TWEEN_CONST = __webpack_require__(98); +var TWEEN_CONST = __webpack_require__(100); var MATH_CONST = __webpack_require__(13); /** @@ -55899,7 +57901,7 @@ var Tween = new Class({ { if (!this.isSeeking) { - this.emit(event, this, tweenData.key, tweenData.target); + this.emit(event, this, tweenData.key, tweenData.target, tweenData.current, tweenData.previous); if (callback) { @@ -56124,6 +58126,7 @@ var Tween = new Class({ tweenData.elapsed = elapsed; tweenData.progress = progress; + tweenData.previous = tweenData.current; if (progress === 1) { @@ -56297,12 +58300,12 @@ module.exports = Tween; /***/ }), -/* 250 */ +/* 257 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -56312,30 +58315,30 @@ module.exports = Tween; module.exports = { - TIMELINE_COMPLETE: __webpack_require__(1419), - TIMELINE_LOOP: __webpack_require__(1420), - TIMELINE_PAUSE: __webpack_require__(1421), - TIMELINE_RESUME: __webpack_require__(1422), - TIMELINE_START: __webpack_require__(1423), - TIMELINE_UPDATE: __webpack_require__(1424), - TWEEN_ACTIVE: __webpack_require__(1425), - TWEEN_COMPLETE: __webpack_require__(1426), - TWEEN_LOOP: __webpack_require__(1427), - TWEEN_REPEAT: __webpack_require__(1428), - TWEEN_START: __webpack_require__(1429), - TWEEN_UPDATE: __webpack_require__(1430), - TWEEN_YOYO: __webpack_require__(1431) + TIMELINE_COMPLETE: __webpack_require__(1434), + TIMELINE_LOOP: __webpack_require__(1435), + TIMELINE_PAUSE: __webpack_require__(1436), + TIMELINE_RESUME: __webpack_require__(1437), + TIMELINE_START: __webpack_require__(1438), + TIMELINE_UPDATE: __webpack_require__(1439), + TWEEN_ACTIVE: __webpack_require__(1440), + TWEEN_COMPLETE: __webpack_require__(1441), + TWEEN_LOOP: __webpack_require__(1442), + TWEEN_REPEAT: __webpack_require__(1443), + TWEEN_START: __webpack_require__(1444), + TWEEN_UPDATE: __webpack_require__(1445), + TWEEN_YOYO: __webpack_require__(1446) }; /***/ }), -/* 251 */ +/* 258 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -56431,6 +58434,7 @@ var TweenData = function (target, index, key, getEnd, getStart, getActive, ease, // Ease Value Data: start: 0, + previous: 0, current: 0, end: 0, @@ -56456,38 +58460,12 @@ module.exports = TweenData; /***/ }), -/* 252 */ -/***/ (function(module, exports) { - -var g; - -// This works in non-strict mode -g = (function() { - return this; -})(); - -try { - // This works if eval is allowed (see CSP) - g = g || Function("return this")() || (1, eval)("this"); -} catch (e) { - // This works if the window reference is available - if (typeof window === "object") g = window; -} - -// g can still be undefined, but nothing to do about it... -// We return undefined, instead of nothing here, so it's -// easier to handle this case. if(!global) { ...} - -module.exports = g; - - -/***/ }), -/* 253 */ +/* 259 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -56497,85 +58475,670 @@ module.exports = g; module.exports = { - Angle: __webpack_require__(535), - Call: __webpack_require__(536), - GetFirst: __webpack_require__(537), - GetLast: __webpack_require__(538), - GridAlign: __webpack_require__(539), - IncAlpha: __webpack_require__(599), - IncX: __webpack_require__(600), - IncXY: __webpack_require__(601), - IncY: __webpack_require__(602), - PlaceOnCircle: __webpack_require__(603), - PlaceOnEllipse: __webpack_require__(604), - PlaceOnLine: __webpack_require__(605), - PlaceOnRectangle: __webpack_require__(606), - PlaceOnTriangle: __webpack_require__(607), - PlayAnimation: __webpack_require__(608), + AlignTo: __webpack_require__(553), + Angle: __webpack_require__(554), + Call: __webpack_require__(555), + GetFirst: __webpack_require__(556), + GetLast: __webpack_require__(557), + GridAlign: __webpack_require__(558), + IncAlpha: __webpack_require__(619), + IncX: __webpack_require__(620), + IncXY: __webpack_require__(621), + IncY: __webpack_require__(622), + PlaceOnCircle: __webpack_require__(623), + PlaceOnEllipse: __webpack_require__(624), + PlaceOnLine: __webpack_require__(625), + PlaceOnRectangle: __webpack_require__(626), + PlaceOnTriangle: __webpack_require__(627), + PlayAnimation: __webpack_require__(628), PropertyValueInc: __webpack_require__(39), PropertyValueSet: __webpack_require__(27), - RandomCircle: __webpack_require__(609), - RandomEllipse: __webpack_require__(610), - RandomLine: __webpack_require__(611), - RandomRectangle: __webpack_require__(612), - RandomTriangle: __webpack_require__(613), - Rotate: __webpack_require__(614), - RotateAround: __webpack_require__(615), - RotateAroundDistance: __webpack_require__(616), - ScaleX: __webpack_require__(617), - ScaleXY: __webpack_require__(618), - ScaleY: __webpack_require__(619), - SetAlpha: __webpack_require__(620), - SetBlendMode: __webpack_require__(621), - SetDepth: __webpack_require__(622), - SetHitArea: __webpack_require__(623), - SetOrigin: __webpack_require__(624), - SetRotation: __webpack_require__(625), - SetScale: __webpack_require__(626), - SetScaleX: __webpack_require__(627), - SetScaleY: __webpack_require__(628), - SetScrollFactor: __webpack_require__(629), - SetScrollFactorX: __webpack_require__(630), - SetScrollFactorY: __webpack_require__(631), - SetTint: __webpack_require__(632), - SetVisible: __webpack_require__(633), - SetX: __webpack_require__(634), - SetXY: __webpack_require__(635), - SetY: __webpack_require__(636), - ShiftPosition: __webpack_require__(637), - Shuffle: __webpack_require__(638), - SmootherStep: __webpack_require__(639), - SmoothStep: __webpack_require__(640), - Spread: __webpack_require__(641), - ToggleVisible: __webpack_require__(642), - WrapInRectangle: __webpack_require__(643) + RandomCircle: __webpack_require__(629), + RandomEllipse: __webpack_require__(630), + RandomLine: __webpack_require__(631), + RandomRectangle: __webpack_require__(632), + RandomTriangle: __webpack_require__(633), + Rotate: __webpack_require__(634), + RotateAround: __webpack_require__(635), + RotateAroundDistance: __webpack_require__(636), + ScaleX: __webpack_require__(637), + ScaleXY: __webpack_require__(638), + ScaleY: __webpack_require__(639), + SetAlpha: __webpack_require__(640), + SetBlendMode: __webpack_require__(641), + SetDepth: __webpack_require__(642), + SetHitArea: __webpack_require__(643), + SetOrigin: __webpack_require__(644), + SetRotation: __webpack_require__(645), + SetScale: __webpack_require__(646), + SetScaleX: __webpack_require__(647), + SetScaleY: __webpack_require__(648), + SetScrollFactor: __webpack_require__(649), + SetScrollFactorX: __webpack_require__(650), + SetScrollFactorY: __webpack_require__(651), + SetTint: __webpack_require__(652), + SetVisible: __webpack_require__(653), + SetX: __webpack_require__(654), + SetXY: __webpack_require__(655), + SetY: __webpack_require__(656), + ShiftPosition: __webpack_require__(657), + Shuffle: __webpack_require__(658), + SmootherStep: __webpack_require__(659), + SmoothStep: __webpack_require__(660), + Spread: __webpack_require__(661), + ToggleVisible: __webpack_require__(662), + WrapInRectangle: __webpack_require__(663) }; /***/ }), -/* 254 */ +/* 260 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var ALIGN_CONST = __webpack_require__(97); + +var AlignToMap = []; + +AlignToMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(261); +AlignToMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(262); +AlignToMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(263); +AlignToMap[ALIGN_CONST.LEFT_BOTTOM] = __webpack_require__(264); +AlignToMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(265); +AlignToMap[ALIGN_CONST.LEFT_TOP] = __webpack_require__(266); +AlignToMap[ALIGN_CONST.RIGHT_BOTTOM] = __webpack_require__(267); +AlignToMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(268); +AlignToMap[ALIGN_CONST.RIGHT_TOP] = __webpack_require__(269); +AlignToMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(270); +AlignToMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(271); +AlignToMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(272); + +/** + * Takes a Game Object and aligns it next to another, at the given position. + * The alignment used is based on the `position` argument, which is a `Phaser.Display.Align` property such as `LEFT_CENTER` or `TOP_RIGHT`. + * + * @function Phaser.Display.Align.To.QuickSet + * @since 3.22.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [child,$return] + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {integer} position - The position to align the Game Object with. This is an align constant, such as `Phaser.Display.Align.LEFT_CENTER`. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var QuickSet = function (child, alignTo, position, offsetX, offsetY) +{ + return AlignToMap[position](child, alignTo, offsetX, offsetY); +}; + +module.exports = QuickSet; + + +/***/ }), +/* 261 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ALIGN_CONST = __webpack_require__(153); +var GetBottom = __webpack_require__(44); +var GetCenterX = __webpack_require__(81); +var SetCenterX = __webpack_require__(82); +var SetTop = __webpack_require__(45); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the bottom center position of the other. + * + * @function Phaser.Display.Align.To.BottomCenter + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var BottomCenter = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetCenterX(gameObject, GetCenterX(alignTo) + offsetX); + SetTop(gameObject, GetBottom(alignTo) + offsetY); + + return gameObject; +}; + +module.exports = BottomCenter; + + +/***/ }), +/* 262 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetBottom = __webpack_require__(44); +var GetLeft = __webpack_require__(46); +var SetLeft = __webpack_require__(47); +var SetTop = __webpack_require__(45); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the bottom left position of the other. + * + * @function Phaser.Display.Align.To.BottomLeft + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var BottomLeft = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetLeft(gameObject, GetLeft(alignTo) - offsetX); + SetTop(gameObject, GetBottom(alignTo) + offsetY); + + return gameObject; +}; + +module.exports = BottomLeft; + + +/***/ }), +/* 263 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetBottom = __webpack_require__(44); +var GetRight = __webpack_require__(48); +var SetRight = __webpack_require__(49); +var SetTop = __webpack_require__(45); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the bottom right position of the other. + * + * @function Phaser.Display.Align.To.BottomRight + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var BottomRight = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetRight(gameObject, GetRight(alignTo) + offsetX); + SetTop(gameObject, GetBottom(alignTo) + offsetY); + + return gameObject; +}; + +module.exports = BottomRight; + + +/***/ }), +/* 264 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetBottom = __webpack_require__(44); +var GetLeft = __webpack_require__(46); +var SetBottom = __webpack_require__(50); +var SetRight = __webpack_require__(49); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the left bottom position of the other. + * + * @function Phaser.Display.Align.To.LeftBottom + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var LeftBottom = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetRight(gameObject, GetLeft(alignTo) - offsetX); + SetBottom(gameObject, GetBottom(alignTo) + offsetY); + + return gameObject; +}; + +module.exports = LeftBottom; + + +/***/ }), +/* 265 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetCenterY = __webpack_require__(83); +var GetLeft = __webpack_require__(46); +var SetCenterY = __webpack_require__(84); +var SetRight = __webpack_require__(49); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the left center position of the other. + * + * @function Phaser.Display.Align.To.LeftCenter + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var LeftCenter = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetRight(gameObject, GetLeft(alignTo) - offsetX); + SetCenterY(gameObject, GetCenterY(alignTo) + offsetY); + + return gameObject; +}; + +module.exports = LeftCenter; + + +/***/ }), +/* 266 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetLeft = __webpack_require__(46); +var GetTop = __webpack_require__(51); +var SetRight = __webpack_require__(49); +var SetTop = __webpack_require__(45); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the left top position of the other. + * + * @function Phaser.Display.Align.To.LeftTop + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var LeftTop = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetRight(gameObject, GetLeft(alignTo) - offsetX); + SetTop(gameObject, GetTop(alignTo) - offsetY); + + return gameObject; +}; + +module.exports = LeftTop; + + +/***/ }), +/* 267 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetBottom = __webpack_require__(44); +var GetRight = __webpack_require__(48); +var SetBottom = __webpack_require__(50); +var SetLeft = __webpack_require__(47); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the right bottom position of the other. + * + * @function Phaser.Display.Align.To.RightBottom + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var RightBottom = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetLeft(gameObject, GetRight(alignTo) + offsetX); + SetBottom(gameObject, GetBottom(alignTo) + offsetY); + + return gameObject; +}; + +module.exports = RightBottom; + + +/***/ }), +/* 268 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetCenterY = __webpack_require__(83); +var GetRight = __webpack_require__(48); +var SetCenterY = __webpack_require__(84); +var SetLeft = __webpack_require__(47); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the right center position of the other. + * + * @function Phaser.Display.Align.To.RightCenter + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var RightCenter = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetLeft(gameObject, GetRight(alignTo) + offsetX); + SetCenterY(gameObject, GetCenterY(alignTo) + offsetY); + + return gameObject; +}; + +module.exports = RightCenter; + + +/***/ }), +/* 269 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetRight = __webpack_require__(48); +var GetTop = __webpack_require__(51); +var SetLeft = __webpack_require__(47); +var SetTop = __webpack_require__(45); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the right top position of the other. + * + * @function Phaser.Display.Align.To.RightTop + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var RightTop = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetLeft(gameObject, GetRight(alignTo) + offsetX); + SetTop(gameObject, GetTop(alignTo) - offsetY); + + return gameObject; +}; + +module.exports = RightTop; + + +/***/ }), +/* 270 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetCenterX = __webpack_require__(81); +var GetTop = __webpack_require__(51); +var SetBottom = __webpack_require__(50); +var SetCenterX = __webpack_require__(82); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the top center position of the other. + * + * @function Phaser.Display.Align.To.TopCenter + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var TopCenter = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetCenterX(gameObject, GetCenterX(alignTo) + offsetX); + SetBottom(gameObject, GetTop(alignTo) - offsetY); + + return gameObject; +}; + +module.exports = TopCenter; + + +/***/ }), +/* 271 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetLeft = __webpack_require__(46); +var GetTop = __webpack_require__(51); +var SetBottom = __webpack_require__(50); +var SetLeft = __webpack_require__(47); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the top left position of the other. + * + * @function Phaser.Display.Align.To.TopLeft + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var TopLeft = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetLeft(gameObject, GetLeft(alignTo) - offsetX); + SetBottom(gameObject, GetTop(alignTo) - offsetY); + + return gameObject; +}; + +module.exports = TopLeft; + + +/***/ }), +/* 272 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetRight = __webpack_require__(48); +var GetTop = __webpack_require__(51); +var SetBottom = __webpack_require__(50); +var SetRight = __webpack_require__(49); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the top right position of the other. + * + * @function Phaser.Display.Align.To.TopRight + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var TopRight = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetRight(gameObject, GetRight(alignTo) + offsetX); + SetBottom(gameObject, GetTop(alignTo) - offsetY); + + return gameObject; +}; + +module.exports = TopRight; + + +/***/ }), +/* 273 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var ALIGN_CONST = __webpack_require__(97); var AlignInMap = []; -AlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(255); -AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(256); -AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(257); -AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(258); -AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(260); -AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(261); -AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(262); -AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(263); -AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(264); +AlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(274); +AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(275); +AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(276); +AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(277); +AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(279); +AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(280); +AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(281); +AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(282); +AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(283); +AlignInMap[ALIGN_CONST.LEFT_BOTTOM] = AlignInMap[ALIGN_CONST.BOTTOM_LEFT]; +AlignInMap[ALIGN_CONST.LEFT_TOP] = AlignInMap[ALIGN_CONST.TOP_LEFT]; +AlignInMap[ALIGN_CONST.RIGHT_BOTTOM] = AlignInMap[ALIGN_CONST.BOTTOM_RIGHT]; +AlignInMap[ALIGN_CONST.RIGHT_TOP] = AlignInMap[ALIGN_CONST.TOP_RIGHT]; /** * Takes given Game Object and aligns it so that it is positioned relative to the other. @@ -56603,19 +59166,19 @@ module.exports = QuickSet; /***/ }), -/* 255 */ +/* 274 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetBottom = __webpack_require__(43); -var GetCenterX = __webpack_require__(80); -var SetBottom = __webpack_require__(44); -var SetCenterX = __webpack_require__(81); +var GetBottom = __webpack_require__(44); +var GetCenterX = __webpack_require__(81); +var SetBottom = __webpack_require__(50); +var SetCenterX = __webpack_require__(82); /** * Takes given Game Object and aligns it so that it is positioned in the bottom center of the other. @@ -56647,19 +59210,19 @@ module.exports = BottomCenter; /***/ }), -/* 256 */ +/* 275 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetBottom = __webpack_require__(43); -var GetLeft = __webpack_require__(45); -var SetBottom = __webpack_require__(44); -var SetLeft = __webpack_require__(46); +var GetBottom = __webpack_require__(44); +var GetLeft = __webpack_require__(46); +var SetBottom = __webpack_require__(50); +var SetLeft = __webpack_require__(47); /** * Takes given Game Object and aligns it so that it is positioned in the bottom left of the other. @@ -56691,19 +59254,19 @@ module.exports = BottomLeft; /***/ }), -/* 257 */ +/* 276 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetBottom = __webpack_require__(43); -var GetRight = __webpack_require__(47); -var SetBottom = __webpack_require__(44); -var SetRight = __webpack_require__(48); +var GetBottom = __webpack_require__(44); +var GetRight = __webpack_require__(48); +var SetBottom = __webpack_require__(50); +var SetRight = __webpack_require__(49); /** * Takes given Game Object and aligns it so that it is positioned in the bottom right of the other. @@ -56735,17 +59298,17 @@ module.exports = BottomRight; /***/ }), -/* 258 */ +/* 277 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CenterOn = __webpack_require__(259); -var GetCenterX = __webpack_require__(80); +var CenterOn = __webpack_require__(278); +var GetCenterX = __webpack_require__(81); var GetCenterY = __webpack_require__(83); /** @@ -56777,17 +59340,17 @@ module.exports = Center; /***/ }), -/* 259 */ +/* 278 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetCenterX = __webpack_require__(81); -var SetCenterY = __webpack_require__(82); +var SetCenterX = __webpack_require__(82); +var SetCenterY = __webpack_require__(84); /** * Positions the Game Object so that it is centered on the given coordinates. @@ -56814,19 +59377,19 @@ module.exports = CenterOn; /***/ }), -/* 260 */ +/* 279 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetCenterY = __webpack_require__(83); -var GetLeft = __webpack_require__(45); -var SetCenterY = __webpack_require__(82); -var SetLeft = __webpack_require__(46); +var GetLeft = __webpack_require__(46); +var SetCenterY = __webpack_require__(84); +var SetLeft = __webpack_require__(47); /** * Takes given Game Object and aligns it so that it is positioned in the left center of the other. @@ -56858,19 +59421,19 @@ module.exports = LeftCenter; /***/ }), -/* 261 */ +/* 280 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetCenterY = __webpack_require__(83); -var GetRight = __webpack_require__(47); -var SetCenterY = __webpack_require__(82); -var SetRight = __webpack_require__(48); +var GetRight = __webpack_require__(48); +var SetCenterY = __webpack_require__(84); +var SetRight = __webpack_require__(49); /** * Takes given Game Object and aligns it so that it is positioned in the right center of the other. @@ -56902,19 +59465,19 @@ module.exports = RightCenter; /***/ }), -/* 262 */ +/* 281 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetCenterX = __webpack_require__(80); -var GetTop = __webpack_require__(49); -var SetCenterX = __webpack_require__(81); -var SetTop = __webpack_require__(50); +var GetCenterX = __webpack_require__(81); +var GetTop = __webpack_require__(51); +var SetCenterX = __webpack_require__(82); +var SetTop = __webpack_require__(45); /** * Takes given Game Object and aligns it so that it is positioned in the top center of the other. @@ -56946,19 +59509,19 @@ module.exports = TopCenter; /***/ }), -/* 263 */ +/* 282 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLeft = __webpack_require__(45); -var GetTop = __webpack_require__(49); -var SetLeft = __webpack_require__(46); -var SetTop = __webpack_require__(50); +var GetLeft = __webpack_require__(46); +var GetTop = __webpack_require__(51); +var SetLeft = __webpack_require__(47); +var SetTop = __webpack_require__(45); /** * Takes given Game Object and aligns it so that it is positioned in the top left of the other. @@ -56990,19 +59553,19 @@ module.exports = TopLeft; /***/ }), -/* 264 */ +/* 283 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetRight = __webpack_require__(47); -var GetTop = __webpack_require__(49); -var SetRight = __webpack_require__(48); -var SetTop = __webpack_require__(50); +var GetRight = __webpack_require__(48); +var GetTop = __webpack_require__(51); +var SetRight = __webpack_require__(49); +var SetTop = __webpack_require__(45); /** * Takes given Game Object and aligns it so that it is positioned in the top right of the other. @@ -57034,17 +59597,17 @@ module.exports = TopRight; /***/ }), -/* 265 */ +/* 284 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CircumferencePoint = __webpack_require__(154); -var FromPercent = __webpack_require__(96); +var CircumferencePoint = __webpack_require__(158); +var FromPercent = __webpack_require__(98); var MATH_CONST = __webpack_require__(13); var Point = __webpack_require__(4); @@ -57077,18 +59640,18 @@ module.exports = GetPoint; /***/ }), -/* 266 */ +/* 285 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circumference = __webpack_require__(267); -var CircumferencePoint = __webpack_require__(154); -var FromPercent = __webpack_require__(96); +var Circumference = __webpack_require__(286); +var CircumferencePoint = __webpack_require__(158); +var FromPercent = __webpack_require__(98); var MATH_CONST = __webpack_require__(13); /** @@ -57129,12 +59692,12 @@ module.exports = GetPoints; /***/ }), -/* 267 */ +/* 286 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -57157,34 +59720,34 @@ module.exports = Circumference; /***/ }), -/* 268 */ +/* 287 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(24); +var Clamp = __webpack_require__(20); // bitmask flag for GameObject.renderMask var _FLAG = 2; // 0010 /** - * Provides methods used for setting the alpha properties of a Game Object. + * Provides methods used for setting the alpha property of a Game Object. * Should be applied as a mixin and not used directly. * - * @namespace Phaser.GameObjects.Components.Alpha - * @since 3.0.0 + * @namespace Phaser.GameObjects.Components.AlphaSingle + * @since 3.22.0 */ -var Alpha = { +var AlphaSingle = { /** * Private internal value. Holds the global alpha value. * - * @name Phaser.GameObjects.Components.Alpha#_alpha + * @name Phaser.GameObjects.Components.AlphaSingle#_alpha * @type {number} * @private * @default 1 @@ -57192,56 +59755,12 @@ var Alpha = { */ _alpha: 1, - /** - * Private internal value. Holds the top-left alpha value. - * - * @name Phaser.GameObjects.Components.Alpha#_alphaTL - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - _alphaTL: 1, - - /** - * Private internal value. Holds the top-right alpha value. - * - * @name Phaser.GameObjects.Components.Alpha#_alphaTR - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - _alphaTR: 1, - - /** - * Private internal value. Holds the bottom-left alpha value. - * - * @name Phaser.GameObjects.Components.Alpha#_alphaBL - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - _alphaBL: 1, - - /** - * Private internal value. Holds the bottom-right alpha value. - * - * @name Phaser.GameObjects.Components.Alpha#_alphaBR - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - _alphaBR: 1, - /** * Clears all alpha values associated with this Game Object. * * Immediately sets the alpha levels back to 1 (fully opaque). * - * @method Phaser.GameObjects.Components.Alpha#clearAlpha + * @method Phaser.GameObjects.Components.AlphaSingle#clearAlpha * @since 3.0.0 * * @return {this} This Game Object instance. @@ -57255,35 +59774,18 @@ var Alpha = { * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. * - * If your game is running under WebGL you can optionally specify four different alpha values, each of which - * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. - * - * @method Phaser.GameObjects.Components.Alpha#setAlpha + * @method Phaser.GameObjects.Components.AlphaSingle#setAlpha * @since 3.0.0 * - * @param {number} [topLeft=1] - The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. - * @param {number} [topRight] - The alpha value used for the top-right of the Game Object. WebGL only. - * @param {number} [bottomLeft] - The alpha value used for the bottom-left of the Game Object. WebGL only. - * @param {number} [bottomRight] - The alpha value used for the bottom-right of the Game Object. WebGL only. + * @param {number} [value=1] - The alpha value applied across the whole Game Object. * * @return {this} This Game Object instance. */ - setAlpha: function (topLeft, topRight, bottomLeft, bottomRight) + setAlpha: function (value) { - if (topLeft === undefined) { topLeft = 1; } + if (value === undefined) { value = 1; } - // Treat as if there is only one alpha value for the whole Game Object - if (topRight === undefined) - { - this.alpha = topLeft; - } - else - { - this._alphaTL = Clamp(topLeft, 0, 1); - this._alphaTR = Clamp(topRight, 0, 1); - this._alphaBL = Clamp(bottomLeft, 0, 1); - this._alphaBR = Clamp(bottomRight, 0, 1); - } + this.alpha = value; return this; }, @@ -57293,7 +59795,7 @@ var Alpha = { * * This is a global value, impacting the entire Game Object, not just a region of it. * - * @name Phaser.GameObjects.Components.Alpha#alpha + * @name Phaser.GameObjects.Components.AlphaSingle#alpha * @type {number} * @since 3.0.0 */ @@ -57309,10 +59811,6 @@ var Alpha = { var v = Clamp(value, 0, 1); this._alpha = v; - this._alphaTL = v; - this._alphaTR = v; - this._alphaBL = v; - this._alphaBR = v; if (v === 0) { @@ -57324,146 +59822,26 @@ var Alpha = { } } - }, - - /** - * The alpha value starting from the top-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * - * @name Phaser.GameObjects.Components.Alpha#alphaTopLeft - * @type {number} - * @webglOnly - * @since 3.0.0 - */ - alphaTopLeft: { - - get: function () - { - return this._alphaTL; - }, - - set: function (value) - { - var v = Clamp(value, 0, 1); - - this._alphaTL = v; - - if (v !== 0) - { - this.renderFlags |= _FLAG; - } - } - - }, - - /** - * The alpha value starting from the top-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * - * @name Phaser.GameObjects.Components.Alpha#alphaTopRight - * @type {number} - * @webglOnly - * @since 3.0.0 - */ - alphaTopRight: { - - get: function () - { - return this._alphaTR; - }, - - set: function (value) - { - var v = Clamp(value, 0, 1); - - this._alphaTR = v; - - if (v !== 0) - { - this.renderFlags |= _FLAG; - } - } - - }, - - /** - * The alpha value starting from the bottom-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * - * @name Phaser.GameObjects.Components.Alpha#alphaBottomLeft - * @type {number} - * @webglOnly - * @since 3.0.0 - */ - alphaBottomLeft: { - - get: function () - { - return this._alphaBL; - }, - - set: function (value) - { - var v = Clamp(value, 0, 1); - - this._alphaBL = v; - - if (v !== 0) - { - this.renderFlags |= _FLAG; - } - } - - }, - - /** - * The alpha value starting from the bottom-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * - * @name Phaser.GameObjects.Components.Alpha#alphaBottomRight - * @type {number} - * @webglOnly - * @since 3.0.0 - */ - alphaBottomRight: { - - get: function () - { - return this._alphaBR; - }, - - set: function (value) - { - var v = Clamp(value, 0, 1); - - this._alphaBR = v; - - if (v !== 0) - { - this.renderFlags |= _FLAG; - } - } - } }; -module.exports = Alpha; +module.exports = AlphaSingle; /***/ }), -/* 269 */ +/* 288 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseAnimation = __webpack_require__(156); +var BaseAnimation = __webpack_require__(160); var Class = __webpack_require__(0); -var Events = __webpack_require__(117); +var Events = __webpack_require__(119); /** * @classdesc @@ -57983,6 +60361,8 @@ var Animation = new Class({ this.forward = true; this._reverse = false; + this._paused = false; + this._wasPlaying = true; return this._startAnimation(key, startFrame); }, @@ -58625,12 +61005,12 @@ module.exports = Animation; /***/ }), -/* 270 */ +/* 289 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -58709,12 +61089,12 @@ module.exports = FindClosestInSorted; /***/ }), -/* 271 */ +/* 290 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -58883,16 +61263,16 @@ module.exports = AnimationFrame; /***/ }), -/* 272 */ +/* 291 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlendModes = __webpack_require__(42); +var BlendModes = __webpack_require__(43); /** * Provides methods used for setting the blend mode of a Game Object. @@ -59005,12 +61385,12 @@ module.exports = BlendMode; /***/ }), -/* 273 */ +/* 292 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -59098,17 +61478,17 @@ module.exports = Depth; /***/ }), -/* 274 */ +/* 293 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetPoint = __webpack_require__(157); -var Perimeter = __webpack_require__(118); +var GetPoint = __webpack_require__(161); +var Perimeter = __webpack_require__(120); // Return an array of points from the perimeter of the rectangle // each spaced out based on the quantity or step required @@ -59152,12 +61532,12 @@ module.exports = GetPoints; /***/ }), -/* 275 */ +/* 294 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -59191,12 +61571,12 @@ module.exports = GetPoint; /***/ }), -/* 276 */ +/* 295 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -59231,17 +61611,17 @@ module.exports = RotateAround; /***/ }), -/* 277 */ +/* 296 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapMask = __webpack_require__(278); -var GeometryMask = __webpack_require__(279); +var BitmapMask = __webpack_require__(297); +var GeometryMask = __webpack_require__(298); /** * Provides methods used for getting and setting the mask of a Game Object. @@ -59378,17 +61758,17 @@ module.exports = Mask; /***/ }), -/* 278 */ +/* 297 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var GameEvents = __webpack_require__(19); +var GameEvents = __webpack_require__(21); /** * @classdesc @@ -59671,12 +62051,12 @@ module.exports = BitmapMask; /***/ }), -/* 279 */ +/* 298 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -59986,12 +62366,12 @@ module.exports = GeometryMask; /***/ }), -/* 280 */ +/* 299 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -60093,12 +62473,12 @@ module.exports = ScrollFactor; /***/ }), -/* 281 */ +/* 300 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -60154,19 +62534,19 @@ module.exports = ToJSON; /***/ }), -/* 282 */ +/* 301 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var MATH_CONST = __webpack_require__(13); var TransformMatrix = __webpack_require__(35); -var WrapAngle = __webpack_require__(161); -var WrapAngleDegrees = __webpack_require__(162); +var WrapAngle = __webpack_require__(165); +var WrapAngleDegrees = __webpack_require__(166); // global bitmask flag for GameObject.renderMask (used by Scale) var _FLAG = 4; // 0100 @@ -60182,7 +62562,7 @@ var Transform = { /** * Private internal value. Holds the horizontal scale value. - * + * * @name Phaser.GameObjects.Components.Transform#_scaleX * @type {number} * @private @@ -60193,7 +62573,7 @@ var Transform = { /** * Private internal value. Holds the vertical scale value. - * + * * @name Phaser.GameObjects.Components.Transform#_scaleY * @type {number} * @private @@ -60204,7 +62584,7 @@ var Transform = { /** * Private internal value. Holds the rotation value in radians. - * + * * @name Phaser.GameObjects.Components.Transform#_rotation * @type {number} * @private @@ -60235,7 +62615,9 @@ var Transform = { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. * * @name Phaser.GameObjects.Components.Transform#z * @type {number} @@ -60257,7 +62639,7 @@ var Transform = { /** * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`. - * + * * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this * isn't the case, use the `scaleX` or `scaleY` properties instead. * @@ -60354,7 +62736,7 @@ var Transform = { /** * The angle of this Game Object as expressed in degrees. - * + * * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left * and -90 is up. * @@ -60381,7 +62763,7 @@ var Transform = { /** * The angle of this Game Object in radians. - * + * * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left * and -90 is up. * @@ -60437,7 +62819,7 @@ var Transform = { /** * Sets the position of this Game Object to be a random position within the confines of * the given area. - * + * * If no area is specified a random position between 0 x 0 and the game width x height is used instead. * * The position does not factor in the size of this Game Object, meaning that only the origin is @@ -60567,6 +62949,9 @@ var Transform = { /** * Sets the z position of this Game Object. * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. + * * @method Phaser.GameObjects.Components.Transform#setZ * @since 3.0.0 * @@ -60658,7 +63043,7 @@ var Transform = { /** * Gets the sum total rotation of all of this Game Objects parent Containers. - * + * * The returned value is in radians and will be zero if this Game Object has no parent container. * * @method Phaser.GameObjects.Components.Transform#getParentRotation @@ -60688,12 +63073,12 @@ module.exports = Transform; /***/ }), -/* 283 */ +/* 302 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -60777,12 +63162,12 @@ module.exports = Visible; /***/ }), -/* 284 */ +/* 303 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -60792,25 +63177,25 @@ module.exports = Visible; module.exports = { - CHANGE_DATA: __webpack_require__(584), - CHANGE_DATA_KEY: __webpack_require__(585), - REMOVE_DATA: __webpack_require__(586), - SET_DATA: __webpack_require__(587) + CHANGE_DATA: __webpack_require__(604), + CHANGE_DATA_KEY: __webpack_require__(605), + REMOVE_DATA: __webpack_require__(606), + SET_DATA: __webpack_require__(607) }; /***/ }), -/* 285 */ +/* 304 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Perimeter = __webpack_require__(118); +var Perimeter = __webpack_require__(120); var Point = __webpack_require__(4); @@ -60920,12 +63305,12 @@ module.exports = MarchingAnts; /***/ }), -/* 286 */ +/* 305 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -60960,12 +63345,12 @@ module.exports = RotateLeft; /***/ }), -/* 287 */ +/* 306 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61000,12 +63385,12 @@ module.exports = RotateRight; /***/ }), -/* 288 */ +/* 307 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61019,9 +63404,9 @@ module.exports = RotateRight; * * @param {Phaser.Geom.Line} line - The line. * @param {integer} [stepRate=1] - The optional step rate for the points on the line. - * @param {array} [results] - An optional array to push the resulting coordinates into. + * @param {Phaser.Types.Math.Vector2Like[]} [results] - An optional array to push the resulting coordinates into. * - * @return {object[]} The array of coordinates on the line. + * @return {Phaser.Types.Math.Vector2Like[]} The array of coordinates on the line. */ var BresenhamPoints = function (line, stepRate, results) { @@ -61074,23 +63459,23 @@ module.exports = BresenhamPoints; /***/ }), -/* 289 */ +/* 308 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Animation = __webpack_require__(156); +var Animation = __webpack_require__(160); var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(168); +var CustomMap = __webpack_require__(172); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(117); -var GameEvents = __webpack_require__(19); +var Events = __webpack_require__(119); +var GameEvents = __webpack_require__(21); var GetValue = __webpack_require__(5); -var Pad = __webpack_require__(169); +var Pad = __webpack_require__(173); /** * @classdesc @@ -61723,19 +64108,19 @@ module.exports = AnimationManager; /***/ }), -/* 290 */ +/* 309 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(168); +var CustomMap = __webpack_require__(172); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(291); +var Events = __webpack_require__(310); /** * @classdesc @@ -61909,12 +64294,12 @@ module.exports = BaseCache; /***/ }), -/* 291 */ +/* 310 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61924,25 +64309,25 @@ module.exports = BaseCache; module.exports = { - ADD: __webpack_require__(646), - REMOVE: __webpack_require__(647) + ADD: __webpack_require__(666), + REMOVE: __webpack_require__(667) }; /***/ }), -/* 292 */ +/* 311 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseCache = __webpack_require__(290); +var BaseCache = __webpack_require__(309); var Class = __webpack_require__(0); -var GameEvents = __webpack_require__(19); +var GameEvents = __webpack_require__(21); /** * @classdesc @@ -62165,23 +64550,23 @@ module.exports = CacheManager; /***/ }), -/* 293 */ +/* 312 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseCamera = __webpack_require__(101); +var BaseCamera = __webpack_require__(103); var CanvasPool = __webpack_require__(28); -var CenterOn = __webpack_require__(174); -var Clamp = __webpack_require__(24); +var CenterOn = __webpack_require__(178); +var Clamp = __webpack_require__(20); var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var Effects = __webpack_require__(301); -var Linear = __webpack_require__(121); +var Effects = __webpack_require__(320); +var Linear = __webpack_require__(123); var Rectangle = __webpack_require__(11); var Vector2 = __webpack_require__(3); @@ -63158,12 +65543,12 @@ module.exports = Camera; /***/ }), -/* 294 */ +/* 313 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -63211,12 +65596,12 @@ module.exports = HexStringToColor; /***/ }), -/* 295 */ +/* 314 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -63242,12 +65627,12 @@ module.exports = GetColor32; /***/ }), -/* 296 */ +/* 315 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -63322,17 +65707,17 @@ module.exports = RGBToHSV; /***/ }), -/* 297 */ +/* 316 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Color = __webpack_require__(36); -var IntegerToRGB = __webpack_require__(298); +var IntegerToRGB = __webpack_require__(317); /** * Converts the given color value into an instance of a Color object. @@ -63355,12 +65740,12 @@ module.exports = IntegerToColor; /***/ }), -/* 298 */ +/* 317 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -63403,12 +65788,12 @@ module.exports = IntegerToRGB; /***/ }), -/* 299 */ +/* 318 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -63433,12 +65818,12 @@ module.exports = ObjectToColor; /***/ }), -/* 300 */ +/* 319 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -63479,12 +65864,12 @@ module.exports = RGBStringToColor; /***/ }), -/* 301 */ +/* 320 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -63494,22 +65879,22 @@ module.exports = RGBStringToColor; module.exports = { - Fade: __webpack_require__(668), - Flash: __webpack_require__(669), - Pan: __webpack_require__(670), - Shake: __webpack_require__(703), - Zoom: __webpack_require__(704) + Fade: __webpack_require__(688), + Flash: __webpack_require__(689), + Pan: __webpack_require__(690), + Shake: __webpack_require__(723), + Zoom: __webpack_require__(724) }; /***/ }), -/* 302 */ +/* 321 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -63519,20 +65904,20 @@ module.exports = { module.exports = { - In: __webpack_require__(671), - Out: __webpack_require__(672), - InOut: __webpack_require__(673) + In: __webpack_require__(691), + Out: __webpack_require__(692), + InOut: __webpack_require__(693) }; /***/ }), -/* 303 */ +/* 322 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -63542,20 +65927,20 @@ module.exports = { module.exports = { - In: __webpack_require__(674), - Out: __webpack_require__(675), - InOut: __webpack_require__(676) + In: __webpack_require__(694), + Out: __webpack_require__(695), + InOut: __webpack_require__(696) }; /***/ }), -/* 304 */ +/* 323 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -63565,20 +65950,20 @@ module.exports = { module.exports = { - In: __webpack_require__(677), - Out: __webpack_require__(678), - InOut: __webpack_require__(679) + In: __webpack_require__(697), + Out: __webpack_require__(698), + InOut: __webpack_require__(699) }; /***/ }), -/* 305 */ +/* 324 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -63588,20 +65973,20 @@ module.exports = { module.exports = { - In: __webpack_require__(680), - Out: __webpack_require__(681), - InOut: __webpack_require__(682) + In: __webpack_require__(700), + Out: __webpack_require__(701), + InOut: __webpack_require__(702) }; /***/ }), -/* 306 */ +/* 325 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -63611,20 +65996,20 @@ module.exports = { module.exports = { - In: __webpack_require__(683), - Out: __webpack_require__(684), - InOut: __webpack_require__(685) + In: __webpack_require__(703), + Out: __webpack_require__(704), + InOut: __webpack_require__(705) }; /***/ }), -/* 307 */ +/* 326 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -63634,20 +66019,20 @@ module.exports = { module.exports = { - In: __webpack_require__(686), - Out: __webpack_require__(687), - InOut: __webpack_require__(688) + In: __webpack_require__(706), + Out: __webpack_require__(707), + InOut: __webpack_require__(708) }; /***/ }), -/* 308 */ +/* 327 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -63655,16 +66040,16 @@ module.exports = { * @namespace Phaser.Math.Easing.Linear */ -module.exports = __webpack_require__(689); +module.exports = __webpack_require__(709); /***/ }), -/* 309 */ +/* 328 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -63674,20 +66059,20 @@ module.exports = __webpack_require__(689); module.exports = { - In: __webpack_require__(690), - Out: __webpack_require__(691), - InOut: __webpack_require__(692) + In: __webpack_require__(710), + Out: __webpack_require__(711), + InOut: __webpack_require__(712) }; /***/ }), -/* 310 */ +/* 329 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -63697,20 +66082,20 @@ module.exports = { module.exports = { - In: __webpack_require__(693), - Out: __webpack_require__(694), - InOut: __webpack_require__(695) + In: __webpack_require__(713), + Out: __webpack_require__(714), + InOut: __webpack_require__(715) }; /***/ }), -/* 311 */ +/* 330 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -63720,20 +66105,20 @@ module.exports = { module.exports = { - In: __webpack_require__(696), - Out: __webpack_require__(697), - InOut: __webpack_require__(698) + In: __webpack_require__(716), + Out: __webpack_require__(717), + InOut: __webpack_require__(718) }; /***/ }), -/* 312 */ +/* 331 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -63743,20 +66128,20 @@ module.exports = { module.exports = { - In: __webpack_require__(699), - Out: __webpack_require__(700), - InOut: __webpack_require__(701) + In: __webpack_require__(719), + Out: __webpack_require__(720), + InOut: __webpack_require__(721) }; /***/ }), -/* 313 */ +/* 332 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -63764,29 +66149,29 @@ module.exports = { * @namespace Phaser.Math.Easing.Stepped */ -module.exports = __webpack_require__(702); +module.exports = __webpack_require__(722); /***/ }), -/* 314 */ +/* 333 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var CONST = __webpack_require__(32); -var Device = __webpack_require__(315); +var Device = __webpack_require__(334); var GetFastValue = __webpack_require__(1); var GetValue = __webpack_require__(5); var IsPlainObject = __webpack_require__(7); -var PhaserMath = __webpack_require__(177); +var PhaserMath = __webpack_require__(181); var NOOP = __webpack_require__(2); -var DefaultPlugins = __webpack_require__(183); -var ValueToColor = __webpack_require__(170); +var DefaultPlugins = __webpack_require__(186); +var ValueToColor = __webpack_require__(174); /** * @classdesc @@ -64344,12 +66729,12 @@ module.exports = Config; /***/ }), -/* 315 */ +/* 334 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64378,25 +66763,25 @@ module.exports = Config; module.exports = { - os: __webpack_require__(122), - browser: __webpack_require__(123), - features: __webpack_require__(176), - input: __webpack_require__(733), - audio: __webpack_require__(734), - video: __webpack_require__(735), - fullscreen: __webpack_require__(736), - canvasFeatures: __webpack_require__(316) + os: __webpack_require__(124), + browser: __webpack_require__(125), + features: __webpack_require__(180), + input: __webpack_require__(753), + audio: __webpack_require__(754), + video: __webpack_require__(755), + fullscreen: __webpack_require__(756), + canvasFeatures: __webpack_require__(335) }; /***/ }), -/* 316 */ +/* 335 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64505,12 +66890,12 @@ module.exports = init(); /***/ }), -/* 317 */ +/* 336 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64536,12 +66921,12 @@ module.exports = Between; /***/ }), -/* 318 */ +/* 337 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64573,12 +66958,12 @@ module.exports = Normalize; /***/ }), -/* 319 */ +/* 338 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64607,12 +66992,12 @@ module.exports = DistanceSquared; /***/ }), -/* 320 */ +/* 339 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64641,12 +67026,12 @@ module.exports = GreaterThan; /***/ }), -/* 321 */ +/* 340 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64675,16 +67060,16 @@ module.exports = LessThan; /***/ }), -/* 322 */ +/* 341 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Factorial = __webpack_require__(323); +var Factorial = __webpack_require__(342); /** * [description] @@ -64706,12 +67091,12 @@ module.exports = Bernstein; /***/ }), -/* 323 */ +/* 342 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64746,12 +67131,12 @@ module.exports = Factorial; /***/ }), -/* 324 */ +/* 343 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64816,12 +67201,12 @@ module.exports = CubicBezierInterpolation; /***/ }), -/* 325 */ +/* 344 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64875,16 +67260,16 @@ module.exports = QuadraticBezierInterpolation; /***/ }), -/* 326 */ +/* 345 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmoothStep = __webpack_require__(167); +var SmoothStep = __webpack_require__(171); /** * A Smooth Step interpolation method. @@ -64908,12 +67293,12 @@ module.exports = SmoothStepInterpolation; /***/ }), -/* 327 */ +/* 346 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64938,12 +67323,12 @@ module.exports = GetPowerOfTwo; /***/ }), -/* 328 */ +/* 347 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64982,12 +67367,12 @@ module.exports = SnapCeil; /***/ }), -/* 329 */ +/* 348 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -65011,12 +67396,12 @@ module.exports = FloatBetween; /***/ }), -/* 330 */ +/* 349 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -65046,12 +67431,12 @@ module.exports = Rotate; /***/ }), -/* 331 */ +/* 350 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -65075,12 +67460,12 @@ module.exports = RoundAwayFromZero; /***/ }), -/* 332 */ +/* 351 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -65130,12 +67515,12 @@ module.exports = TransformXY; /***/ }), -/* 333 */ +/* 352 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -65675,12 +68060,12 @@ module.exports = Vector4; /***/ }), -/* 334 */ +/* 353 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -66268,12 +68653,12 @@ module.exports = Matrix3; /***/ }), -/* 335 */ +/* 354 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67730,12 +70115,12 @@ module.exports = Matrix4; /***/ }), -/* 336 */ +/* 355 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67743,8 +70128,8 @@ module.exports = Matrix4; // and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl var Class = __webpack_require__(0); -var Vector3 = __webpack_require__(182); -var Matrix3 = __webpack_require__(334); +var Vector3 = __webpack_require__(185); +var Matrix3 = __webpack_require__(353); var EPSILON = 0.000001; @@ -68502,19 +70887,19 @@ module.exports = Quaternion; /***/ }), -/* 337 */ +/* 356 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CanvasInterpolation = __webpack_require__(338); +var CanvasInterpolation = __webpack_require__(357); var CanvasPool = __webpack_require__(28); var CONST = __webpack_require__(32); -var Features = __webpack_require__(176); +var Features = __webpack_require__(180); /** * Called automatically by Phaser.Game and responsible for creating the renderer it will use. @@ -68604,8 +70989,8 @@ var CreateRenderer = function (game) if (true) { - CanvasRenderer = __webpack_require__(339); - WebGLRenderer = __webpack_require__(342); + CanvasRenderer = __webpack_require__(358); + WebGLRenderer = __webpack_require__(361); // Let the config pick the renderer type, as both are included if (config.renderType === CONST.WEBGL) @@ -68630,12 +71015,12 @@ module.exports = CreateRenderer; /***/ }), -/* 338 */ +/* 357 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68693,22 +71078,22 @@ module.exports = CanvasInterpolation; /***/ }), -/* 339 */ +/* 358 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CanvasSnapshot = __webpack_require__(340); -var CameraEvents = __webpack_require__(53); +var CanvasSnapshot = __webpack_require__(359); +var CameraEvents = __webpack_require__(55); var Class = __webpack_require__(0); var CONST = __webpack_require__(32); -var GetBlendModes = __webpack_require__(341); -var ScaleEvents = __webpack_require__(102); +var GetBlendModes = __webpack_require__(360); +var ScaleEvents = __webpack_require__(104); var TransformMatrix = __webpack_require__(35); /** @@ -69487,12 +71872,12 @@ module.exports = CanvasRenderer; /***/ }), -/* 340 */ +/* 359 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69580,17 +71965,17 @@ module.exports = CanvasSnapshot; /***/ }), -/* 341 */ +/* 360 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var modes = __webpack_require__(42); -var CanvasFeatures = __webpack_require__(316); +var modes = __webpack_require__(43); +var CanvasFeatures = __webpack_require__(335); /** * Returns an array which maps the default blend modes to supported Canvas blend modes. @@ -69644,34 +72029,34 @@ module.exports = GetBlendModes; /***/ }), -/* 342 */ +/* 361 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseCamera = __webpack_require__(101); -var CameraEvents = __webpack_require__(53); +var BaseCamera = __webpack_require__(103); +var CameraEvents = __webpack_require__(55); var Class = __webpack_require__(0); var CONST = __webpack_require__(32); -var GameEvents = __webpack_require__(19); -var IsSizePowerOfTwo = __webpack_require__(124); +var GameEvents = __webpack_require__(21); +var IsSizePowerOfTwo = __webpack_require__(127); var NOOP = __webpack_require__(2); -var ScaleEvents = __webpack_require__(102); -var SpliceOne = __webpack_require__(84); -var TextureEvents = __webpack_require__(125); +var ScaleEvents = __webpack_require__(104); +var SpliceOne = __webpack_require__(85); +var TextureEvents = __webpack_require__(128); var TransformMatrix = __webpack_require__(35); var Utils = __webpack_require__(10); -var WebGLSnapshot = __webpack_require__(343); +var WebGLSnapshot = __webpack_require__(362); // Default Pipelines -var BitmapMaskPipeline = __webpack_require__(344); -var ForwardDiffuseLightPipeline = __webpack_require__(345); -var TextureTintPipeline = __webpack_require__(185); +var BitmapMaskPipeline = __webpack_require__(363); +var ForwardDiffuseLightPipeline = __webpack_require__(364); +var TextureTintPipeline = __webpack_require__(188); /** * @callback WebGLContextCallback @@ -72598,12 +74983,12 @@ module.exports = WebGLRenderer; /***/ }), -/* 343 */ +/* 362 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72708,20 +75093,20 @@ module.exports = WebGLSnapshot; /***/ }), -/* 344 */ +/* 363 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(784); -var ShaderSourceVS = __webpack_require__(785); -var WebGLPipeline = __webpack_require__(184); +var ShaderSourceFS = __webpack_require__(808); +var ShaderSourceVS = __webpack_require__(809); +var WebGLPipeline = __webpack_require__(187); /** * @classdesc @@ -72971,19 +75356,19 @@ module.exports = BitmapMaskPipeline; /***/ }), -/* 345 */ +/* 364 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(786); -var TextureTintPipeline = __webpack_require__(185); +var ShaderSourceFS = __webpack_require__(810); +var TextureTintPipeline = __webpack_require__(188); var LIGHT_COUNT = 10; @@ -73492,12 +75877,12 @@ module.exports = ForwardDiffuseLightPipeline; /***/ }), -/* 346 */ +/* 365 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -74242,12 +76627,12 @@ module.exports = ModelViewProjection; /***/ }), -/* 347 */ +/* 366 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -74372,34 +76757,36 @@ module.exports = DebugHeader; /***/ }), -/* 348 */ +/* 367 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var GetValue = __webpack_require__(5); var NOOP = __webpack_require__(2); -var RequestAnimationFrame = __webpack_require__(349); - -// Frame Rate config -// fps: { -// min: 10, -// target: 60, -// forceSetTimeOut: false, -// deltaHistory: 10, -// panicMax: 120 -// } +var RequestAnimationFrame = __webpack_require__(368); // http://www.testufo.com/#test=animation-time-graph /** * @classdesc - * [description] + * The core runner class that Phaser uses to handle the game loop. It can use either Request Animation Frame, + * or SetTimeout, based on browser support and config settings, to create a continuous loop within the browser. + * + * Each time the loop fires, `TimeStep.step` is called and this is then passed onto the core Game update loop, + * it is the core heartbeat of your game. It will fire as often as Request Animation Frame is capable of handling + * on the target device. + * + * Note that there are lots of situations where a browser will stop updating your game. Such as if the player + * switches tabs, or covers up the browser window with another application. In these cases, the 'heartbeat' + * of your game will pause, and only resume when focus is returned to it by the player. There is no way to avoid + * this situation, all you can do is use the visibility events the browser, and Phaser, provide to detect when + * it has happened and then gracefully recover. * * @class TimeStep * @memberof Phaser.Core @@ -74426,7 +76813,7 @@ var TimeStep = new Class({ this.game = game; /** - * [description] + * The Request Animation Frame DOM Event handler. * * @name Phaser.Core.TimeStep#raf * @type {Phaser.DOM.RequestAnimationFrame} @@ -74518,7 +76905,8 @@ var TimeStep = new Class({ this.actualFps = this.targetFps; /** - * [description] + * The time at which the next fps rate update will take place. + * When an fps update happens, the `framesThisSecond` value is reset. * * @name Phaser.Core.TimeStep#nextFpsUpdate * @type {integer} @@ -74715,6 +77103,22 @@ var TimeStep = new Class({ * @since 3.18.0 */ this.now = 0; + + /** + * Apply smoothing to the delta value used within Phasers internal calculations? + * + * This can be changed in the Game Config via the `fps.smoothStep` property. The default is `true`. + * + * Smoothing helps settle down the delta values after browser tab switches, or other situations + * which could cause significant delta spikes or dips. By default it has been enabled in Phaser 3 + * since the first version, but is now exposed under this property (and the corresponding game config + * `smoothStep` value), to allow you to easily disable it, should you require. + * + * @name Phaser.Core.TimeStep#smoothStep + * @type {boolean} + * @since 3.22.0 + */ + this.smoothStep = GetValue(config, 'smoothStep', true); }, /** @@ -74838,7 +77242,7 @@ var TimeStep = new Class({ step: function () { // Because the timestamp passed in from raf represents the beginning of the main thread frame that we’re currently in, - // not the actual time now. As we want to compare this time value against Event timeStamps and the like, we need a + // not the actual time now, and as we want to compare this time value against Event timeStamps and the like, we need a // more accurate one: var time = window.performance.now(); @@ -74862,55 +77266,59 @@ var TimeStep = new Class({ // delta time (time is in ms) var dt = before; + // Delta Average + var avg = before; + // When a browser switches tab, then comes back again, it takes around 10 frames before // the delta time settles down so we employ a 'cooling down' period before we start // trusting the delta values again, to avoid spikes flooding through our delta average - if (this._coolDown > 0 || !this.inFocus) + if (this.smoothStep) { - this._coolDown--; - - dt = Math.min(dt, this._target); + if (this._coolDown > 0 || !this.inFocus) + { + this._coolDown--; + + dt = Math.min(dt, this._target); + } + + if (dt > this._min) + { + // Probably super bad start time or browser tab context loss, + // so use the last 'sane' dt value + + dt = history[idx]; + + // Clamp delta to min (in case history has become corrupted somehow) + dt = Math.min(dt, this._min); + } + + // Smooth out the delta over the previous X frames + + // add the delta to the smoothing array + history[idx] = dt; + + // adjusts the delta history array index based on the smoothing count + // this stops the array growing beyond the size of deltaSmoothingMax + this.deltaIndex++; + + if (this.deltaIndex > max) + { + this.deltaIndex = 0; + } + + // Loop the history array, adding the delta values together + avg = 0; + + for (var i = 0; i < max; i++) + { + avg += history[i]; + } + + // Then divide by the array length to get the average delta + avg /= max; } - if (dt > this._min) - { - // Probably super bad start time or browser tab context loss, - // so use the last 'sane' dt value - - dt = history[idx]; - - // Clamp delta to min (in case history has become corrupted somehow) - dt = Math.min(dt, this._min); - } - - // Smooth out the delta over the previous X frames - - // add the delta to the smoothing array - history[idx] = dt; - - // adjusts the delta history array index based on the smoothing count - // this stops the array growing beyond the size of deltaSmoothingMax - this.deltaIndex++; - - if (this.deltaIndex > max) - { - this.deltaIndex = 0; - } - - // Delta Average - var avg = 0; - - // Loop the history array, adding the delta values together - - for (var i = 0; i < max; i++) - { - avg += history[i]; - } - - // Then divide by the array length to get the average delta - avg /= max; - // Set as the world delta value this.delta = avg; @@ -75044,7 +77452,7 @@ var TimeStep = new Class({ * @method Phaser.Core.TimeStep#stop * @since 3.0.0 * - * @return {Phaser.Core.TimeStep} The TimeStep object. + * @return {this} The TimeStep object. */ stop: function () { @@ -75079,12 +77487,12 @@ module.exports = TimeStep; /***/ }), -/* 349 */ +/* 368 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -75293,16 +77701,16 @@ module.exports = RequestAnimationFrame; /***/ }), -/* 350 */ +/* 369 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Events = __webpack_require__(19); +var Events = __webpack_require__(21); /** * The Visibility Handler is responsible for listening out for document level visibility change events. @@ -75384,16 +77792,16 @@ module.exports = VisibilityHandler; /***/ }), -/* 351 */ +/* 370 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Arne16 = __webpack_require__(352); +var Arne16 = __webpack_require__(371); var CanvasPool = __webpack_require__(28); var GetValue = __webpack_require__(5); @@ -75478,12 +77886,12 @@ module.exports = GenerateTexture; /***/ }), -/* 352 */ +/* 371 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -75516,20 +77924,20 @@ module.exports = { /***/ }), -/* 353 */ +/* 372 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) var Class = __webpack_require__(0); -var CubicBezier = __webpack_require__(324); -var Curve = __webpack_require__(85); +var CubicBezier = __webpack_require__(343); +var Curve = __webpack_require__(86); var Vector2 = __webpack_require__(3); /** @@ -75743,22 +78151,22 @@ module.exports = CubicBezierCurve; /***/ }), -/* 354 */ +/* 373 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) var Class = __webpack_require__(0); -var Curve = __webpack_require__(85); +var Curve = __webpack_require__(86); var DegToRad = __webpack_require__(40); var GetValue = __webpack_require__(5); -var RadToDeg = __webpack_require__(181); +var RadToDeg = __webpack_require__(184); var Vector2 = __webpack_require__(3); /** @@ -76367,20 +78775,20 @@ module.exports = EllipseCurve; /***/ }), -/* 355 */ +/* 374 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) var Class = __webpack_require__(0); -var Curve = __webpack_require__(85); -var FromPoints = __webpack_require__(186); +var Curve = __webpack_require__(86); +var FromPoints = __webpack_require__(189); var Rectangle = __webpack_require__(11); var Vector2 = __webpack_require__(3); @@ -76566,6 +78974,42 @@ var LineCurve = new Class({ return tangent.normalize(); }, + // Override default Curve.getUtoTmapping + + /** + * [description] + * + * @method Phaser.Curves.Line#getUtoTmapping + * @since 3.0.0 + * + * @param {number} u - [description] + * @param {integer} distance - [description] + * @param {integer} [divisions] - [description] + * + * @return {number} [description] + */ + getUtoTmapping: function (u, distance, divisions) + { + var t; + + if (distance) + { + var arcLengths = this.getLengths(divisions); + var lineLength = arcLengths[arcLengths.length - 1]; + + // Cannot overshoot the curve + var targetLineLength = Math.min(distance, lineLength); + + t = targetLineLength / lineLength; + } + else + { + t = u; + } + + return t; + }, + // Override default Curve.draw because this is better than calling getPoints on a line! /** @@ -76636,18 +79080,18 @@ module.exports = LineCurve; /***/ }), -/* 356 */ +/* 375 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Curve = __webpack_require__(85); -var QuadraticBezierInterpolation = __webpack_require__(325); +var Curve = __webpack_require__(86); +var QuadraticBezierInterpolation = __webpack_require__(344); var Vector2 = __webpack_require__(3); /** @@ -76850,25 +79294,25 @@ module.exports = QuadraticBezier; /***/ }), -/* 357 */ +/* 376 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) -var CatmullRom = __webpack_require__(179); +var CatmullRom = __webpack_require__(182); var Class = __webpack_require__(0); -var Curve = __webpack_require__(85); +var Curve = __webpack_require__(86); var Vector2 = __webpack_require__(3); /** * @classdesc - * [description] + * Create a smooth 2d spline curve from a series of points. * * @class Spline * @extends Phaser.Curves.Curve @@ -76876,7 +79320,7 @@ var Vector2 = __webpack_require__(3); * @constructor * @since 3.0.0 * - * @param {Phaser.Math.Vector2[]} [points] - [description] + * @param {(Phaser.Math.Vector2[]|number[]|number[][])} [points] - The points that configure the curve. */ var SplineCurve = new Class({ @@ -76891,7 +79335,7 @@ var SplineCurve = new Class({ Curve.call(this, 'SplineCurve'); /** - * [description] + * The Vector2 points that configure the curve. * * @name Phaser.Curves.Spline#points * @type {Phaser.Math.Vector2[]} @@ -76904,12 +79348,12 @@ var SplineCurve = new Class({ }, /** - * [description] + * Add a list of points to the current list of Vector2 points of the curve. * * @method Phaser.Curves.Spline#addPoints * @since 3.0.0 * - * @param {(Phaser.Math.Vector2[]|number[]|number[][])} points - [description] + * @param {(Phaser.Math.Vector2[]|number[]|number[][])} points - The points that configure the curve. * * @return {Phaser.Curves.Spline} This curve object. */ @@ -76944,15 +79388,15 @@ var SplineCurve = new Class({ }, /** - * [description] + * Add a point to the current list of Vector2 points of the curve. * * @method Phaser.Curves.Spline#addPoint * @since 3.0.0 * - * @param {number} x - [description] - * @param {number} y - [description] + * @param {number} x - The x coordinate of this curve + * @param {number} y - The y coordinate of this curve * - * @return {Phaser.Math.Vector2} [description] + * @return {Phaser.Math.Vector2} The new Vector2 added to the curve */ addPoint: function (x, y) { @@ -77031,7 +79475,7 @@ var SplineCurve = new Class({ }, /** - * [description] + * Exports a JSON object containing this curve data. * * @method Phaser.Curves.Spline#toJSON * @since 3.0.0 @@ -77057,14 +79501,14 @@ var SplineCurve = new Class({ }); /** - * [description] + * Imports a JSON object containing this curve data. * * @function Phaser.Curves.Spline.fromJSON * @since 3.0.0 * * @param {Phaser.Types.Curves.JSONCurve} data - The JSON object containing this curve data. * - * @return {Phaser.Curves.Spline} [description] + * @return {Phaser.Curves.Spline} The spline curve created. */ SplineCurve.fromJSON = function (data) { @@ -77075,12 +79519,12 @@ module.exports = SplineCurve; /***/ }), -/* 358 */ +/* 377 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -77199,46 +79643,46 @@ module.exports = BaseShader; /***/ }), -/* 359 */ +/* 378 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Color = __webpack_require__(36); -Color.ColorToRGBA = __webpack_require__(822); -Color.ComponentToHex = __webpack_require__(360); -Color.GetColor = __webpack_require__(171); -Color.GetColor32 = __webpack_require__(295); -Color.HexStringToColor = __webpack_require__(294); -Color.HSLToColor = __webpack_require__(823); -Color.HSVColorWheel = __webpack_require__(824); -Color.HSVToRGB = __webpack_require__(172); -Color.HueToComponent = __webpack_require__(361); -Color.IntegerToColor = __webpack_require__(297); -Color.IntegerToRGB = __webpack_require__(298); -Color.Interpolate = __webpack_require__(825); -Color.ObjectToColor = __webpack_require__(299); -Color.RandomRGB = __webpack_require__(826); -Color.RGBStringToColor = __webpack_require__(300); -Color.RGBToHSV = __webpack_require__(296); -Color.RGBToString = __webpack_require__(827); -Color.ValueToColor = __webpack_require__(170); +Color.ColorToRGBA = __webpack_require__(834); +Color.ComponentToHex = __webpack_require__(379); +Color.GetColor = __webpack_require__(175); +Color.GetColor32 = __webpack_require__(314); +Color.HexStringToColor = __webpack_require__(313); +Color.HSLToColor = __webpack_require__(835); +Color.HSVColorWheel = __webpack_require__(836); +Color.HSVToRGB = __webpack_require__(176); +Color.HueToComponent = __webpack_require__(380); +Color.IntegerToColor = __webpack_require__(316); +Color.IntegerToRGB = __webpack_require__(317); +Color.Interpolate = __webpack_require__(837); +Color.ObjectToColor = __webpack_require__(318); +Color.RandomRGB = __webpack_require__(838); +Color.RGBStringToColor = __webpack_require__(319); +Color.RGBToHSV = __webpack_require__(315); +Color.RGBToString = __webpack_require__(839); +Color.ValueToColor = __webpack_require__(174); module.exports = Color; /***/ }), -/* 360 */ +/* 379 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -77263,12 +79707,12 @@ module.exports = ComponentToHex; /***/ }), -/* 361 */ +/* 380 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -77319,16 +79763,16 @@ module.exports = HueToComponent; /***/ }), -/* 362 */ +/* 381 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(122); +var OS = __webpack_require__(124); /** * @callback ContentLoadedCallback @@ -77382,16 +79826,16 @@ module.exports = DOMContentLoaded; /***/ }), -/* 363 */ +/* 382 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(187); +var CONST = __webpack_require__(190); /** * Attempts to determine the screen orientation using the Orientation API. @@ -77448,12 +79892,12 @@ module.exports = GetScreenOrientation; /***/ }), -/* 364 */ +/* 383 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -77534,12 +79978,12 @@ module.exports = { /***/ }), -/* 365 */ +/* 384 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -77587,12 +80031,12 @@ module.exports = { /***/ }), -/* 366 */ +/* 385 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -77685,12 +80129,12 @@ module.exports = { /***/ }), -/* 367 */ +/* 386 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -77759,12 +80203,12 @@ module.exports = { /***/ }), -/* 368 */ +/* 387 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -77810,12 +80254,12 @@ module.exports = GetTarget; /***/ }), -/* 369 */ +/* 388 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -77867,26 +80311,26 @@ module.exports = ParseXML; /***/ }), -/* 370 */ +/* 389 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(189); +var CONST = __webpack_require__(192); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(54); -var GameEvents = __webpack_require__(19); -var Keyboard = __webpack_require__(371); -var Mouse = __webpack_require__(372); -var Pointer = __webpack_require__(373); -var Touch = __webpack_require__(374); +var Events = __webpack_require__(56); +var GameEvents = __webpack_require__(21); +var Keyboard = __webpack_require__(390); +var Mouse = __webpack_require__(391); +var Pointer = __webpack_require__(392); +var Touch = __webpack_require__(393); var TransformMatrix = __webpack_require__(35); -var TransformXY = __webpack_require__(332); +var TransformXY = __webpack_require__(351); /** * @classdesc @@ -78949,20 +81393,20 @@ module.exports = InputManager; /***/ }), -/* 371 */ +/* 390 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayRemove = __webpack_require__(127); +var ArrayRemove = __webpack_require__(130); var Class = __webpack_require__(0); -var GameEvents = __webpack_require__(19); -var InputEvents = __webpack_require__(54); -var KeyCodes = __webpack_require__(128); +var GameEvents = __webpack_require__(21); +var InputEvents = __webpack_require__(56); +var KeyCodes = __webpack_require__(131); var NOOP = __webpack_require__(0); /** @@ -79399,18 +81843,18 @@ module.exports = KeyboardManager; /***/ }), -/* 372 */ +/* 391 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Features = __webpack_require__(176); -var InputEvents = __webpack_require__(54); +var Features = __webpack_require__(180); +var InputEvents = __webpack_require__(56); var NOOP = __webpack_require__(0); // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent @@ -79885,20 +82329,20 @@ module.exports = MouseManager; /***/ }), -/* 373 */ +/* 392 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Angle = __webpack_require__(317); +var Angle = __webpack_require__(336); var Class = __webpack_require__(0); -var Distance = __webpack_require__(63); -var FuzzyEqual = __webpack_require__(178); -var SmoothStepInterpolation = __webpack_require__(326); +var Distance = __webpack_require__(54); +var FuzzyEqual = __webpack_require__(126); +var SmoothStepInterpolation = __webpack_require__(345); var Vector2 = __webpack_require__(3); /** @@ -81163,17 +83607,17 @@ module.exports = Pointer; /***/ }), -/* 374 */ +/* 393 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var InputEvents = __webpack_require__(54); +var InputEvents = __webpack_require__(56); var NOOP = __webpack_require__(2); // https://developer.mozilla.org/en-US/docs/Web/API/Touch_events @@ -81576,24 +84020,24 @@ module.exports = TouchManager; /***/ }), -/* 375 */ +/* 394 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var GameEvents = __webpack_require__(19); +var GameEvents = __webpack_require__(21); var EventEmitter = __webpack_require__(9); var FileTypesManager = __webpack_require__(8); var GameObjectCreator = __webpack_require__(16); var GameObjectFactory = __webpack_require__(6); var GetFastValue = __webpack_require__(1); -var PluginCache = __webpack_require__(20); -var Remove = __webpack_require__(127); +var PluginCache = __webpack_require__(22); +var Remove = __webpack_require__(130); /** * @classdesc @@ -82478,27 +84922,27 @@ module.exports = PluginManager; /***/ }), -/* 376 */ +/* 395 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(187); +var CONST = __webpack_require__(190); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(102); -var GameEvents = __webpack_require__(19); -var GetInnerHeight = __webpack_require__(880); -var GetTarget = __webpack_require__(368); -var GetScreenOrientation = __webpack_require__(363); +var Events = __webpack_require__(104); +var GameEvents = __webpack_require__(21); +var GetInnerHeight = __webpack_require__(892); +var GetTarget = __webpack_require__(387); +var GetScreenOrientation = __webpack_require__(382); var NOOP = __webpack_require__(2); var Rectangle = __webpack_require__(11); -var Size = __webpack_require__(377); -var SnapFloor = __webpack_require__(103); +var Size = __webpack_require__(396); +var SnapFloor = __webpack_require__(105); var Vector2 = __webpack_require__(3); /** @@ -82829,16 +85273,6 @@ var ScaleManager = new Class({ */ this._createdFullscreenTarget = false; - /** - * Internal var that keeps track of the user, or the browser, requesting fullscreen changes. - * - * @name Phaser.Scale.ScaleManager#_requestedFullscreenChange - * @type {boolean} - * @private - * @since 3.16.2 - */ - this._requestedFullscreenChange = false; - /** * The dirty state of the Scale Manager. * Set if there is a change between the parent size and the current size. @@ -82957,6 +85391,7 @@ var ScaleManager = new Class({ } game.events.on(GameEvents.PRE_STEP, this.step, this); + game.events.once(GameEvents.DESTROY, this.destroy, this); this.startListeners(); }, @@ -83721,8 +86156,6 @@ var ScaleManager = new Class({ { var fsTarget = this.getFullscreenTarget(); - this._requestedFullscreenChange = true; - var fsPromise; if (fullscreen.keyboard) @@ -83865,8 +86298,6 @@ var ScaleManager = new Class({ if (fullscreen.active) { - this._requestedFullscreenChange = true; - document[fullscreen.cancel](); } @@ -83973,12 +86404,10 @@ var ScaleManager = new Class({ onFullScreenChange: function () { // They pressed ESC while in fullscreen mode - if (!this._requestedFullscreenChange) + if (!(document.fullscreenElement || document.webkitFullscreenElement || document.msFullscreenElement || document.mozFullScreenElement)) { this.stopFullscreen(); } - - this._requestedFullscreenChange = false; }, /** @@ -84210,18 +86639,18 @@ module.exports = ScaleManager; /***/ }), -/* 377 */ +/* 396 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(24); +var Clamp = __webpack_require__(20); var Class = __webpack_require__(0); -var SnapFloor = __webpack_require__(103); +var SnapFloor = __webpack_require__(105); var Vector2 = __webpack_require__(3); /** @@ -84988,24 +87417,24 @@ module.exports = Size; /***/ }), -/* 378 */ +/* 397 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(129); -var Events = __webpack_require__(21); -var GameEvents = __webpack_require__(19); +var CONST = __webpack_require__(132); +var Events = __webpack_require__(18); +var GameEvents = __webpack_require__(21); var GetValue = __webpack_require__(5); -var LoaderEvents = __webpack_require__(86); +var LoaderEvents = __webpack_require__(87); var NOOP = __webpack_require__(2); -var Scene = __webpack_require__(379); -var Systems = __webpack_require__(190); +var Scene = __webpack_require__(398); +var Systems = __webpack_require__(193); /** * @classdesc @@ -86628,17 +89057,17 @@ module.exports = SceneManager; /***/ }), -/* 379 */ +/* 398 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Systems = __webpack_require__(190); +var Systems = __webpack_require__(193); /** * @classdesc @@ -86934,19 +89363,19 @@ module.exports = Scene; /***/ }), -/* 380 */ +/* 399 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(129); +var CONST = __webpack_require__(132); var GetValue = __webpack_require__(5); -var Merge = __webpack_require__(87); -var InjectionMap = __webpack_require__(893); +var Merge = __webpack_require__(88); +var InjectionMap = __webpack_require__(905); /** * @namespace Phaser.Scenes.Settings @@ -87030,27 +89459,27 @@ module.exports = Settings; /***/ }), -/* 381 */ +/* 400 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var CanvasPool = __webpack_require__(28); -var CanvasTexture = __webpack_require__(382); +var CanvasTexture = __webpack_require__(401); var Class = __webpack_require__(0); var Color = __webpack_require__(36); var CONST = __webpack_require__(32); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(125); -var GameEvents = __webpack_require__(19); -var GenerateTexture = __webpack_require__(351); +var Events = __webpack_require__(128); +var GameEvents = __webpack_require__(21); +var GenerateTexture = __webpack_require__(370); var GetValue = __webpack_require__(5); -var Parser = __webpack_require__(384); -var Texture = __webpack_require__(192); +var Parser = __webpack_require__(403); +var Texture = __webpack_require__(195); /** * @callback EachTextureCallback @@ -88202,21 +90631,21 @@ module.exports = TextureManager; /***/ }), -/* 382 */ +/* 401 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Clamp = __webpack_require__(24); +var Clamp = __webpack_require__(20); var Color = __webpack_require__(36); var CONST = __webpack_require__(32); -var IsSizePowerOfTwo = __webpack_require__(124); -var Texture = __webpack_require__(192); +var IsSizePowerOfTwo = __webpack_require__(127); +var Texture = __webpack_require__(195); /** * @classdesc @@ -88833,19 +91262,19 @@ module.exports = CanvasTexture; /***/ }), -/* 383 */ +/* 402 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var CanvasPool = __webpack_require__(28); var Class = __webpack_require__(0); -var IsSizePowerOfTwo = __webpack_require__(124); -var ScaleModes = __webpack_require__(152); +var IsSizePowerOfTwo = __webpack_require__(127); +var ScaleModes = __webpack_require__(157); /** * @classdesc @@ -89174,12 +91603,12 @@ module.exports = TextureSource; /***/ }), -/* 384 */ +/* 403 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89189,32 +91618,32 @@ module.exports = TextureSource; module.exports = { - AtlasXML: __webpack_require__(894), - Canvas: __webpack_require__(895), - Image: __webpack_require__(896), - JSONArray: __webpack_require__(897), - JSONHash: __webpack_require__(898), - SpriteSheet: __webpack_require__(899), - SpriteSheetFromAtlas: __webpack_require__(900), - UnityYAML: __webpack_require__(901) + AtlasXML: __webpack_require__(906), + Canvas: __webpack_require__(907), + Image: __webpack_require__(908), + JSONArray: __webpack_require__(909), + JSONHash: __webpack_require__(910), + SpriteSheet: __webpack_require__(911), + SpriteSheetFromAtlas: __webpack_require__(912), + UnityYAML: __webpack_require__(913) }; /***/ }), -/* 385 */ +/* 404 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HTML5AudioSoundManager = __webpack_require__(386); -var NoAudioSoundManager = __webpack_require__(388); -var WebAudioSoundManager = __webpack_require__(390); +var HTML5AudioSoundManager = __webpack_require__(405); +var NoAudioSoundManager = __webpack_require__(407); +var WebAudioSoundManager = __webpack_require__(409); /** * Creates a Web Audio, HTML5 Audio or No Audio Sound Manager based on config and device settings. @@ -89225,6 +91654,8 @@ var WebAudioSoundManager = __webpack_require__(390); * @since 3.0.0 * * @param {Phaser.Game} game - Reference to the current game instance. + * + * @return {(Phaser.Sound.HTML5AudioSoundManager|Phaser.Sound.WebAudioSoundManager|Phaser.Sound.NoAudioSoundManager)} The Sound Manager instance that was created. */ var SoundManagerCreator = { @@ -89252,20 +91683,20 @@ module.exports = SoundManagerCreator; /***/ }), -/* 386 */ +/* 405 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSoundManager = __webpack_require__(130); +var BaseSoundManager = __webpack_require__(133); var Class = __webpack_require__(0); var Events = __webpack_require__(64); -var HTML5AudioSound = __webpack_require__(387); +var HTML5AudioSound = __webpack_require__(406); /** * HTML5 Audio implementation of the Sound Manager. @@ -89717,17 +92148,17 @@ module.exports = HTML5AudioSoundManager; /***/ }), -/* 387 */ +/* 406 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(131); +var BaseSound = __webpack_require__(134); var Class = __webpack_require__(0); var Events = __webpack_require__(64); @@ -89769,9 +92200,7 @@ var HTML5AudioSound = new Class({ if (!this.tags) { - // eslint-disable-next-line no-console - console.warn('Audio cache entry missing: ' + key); - return; + throw new Error('There is no audio asset with key "' + key + '" in the audio cache'); } /** @@ -90644,20 +93073,20 @@ module.exports = HTML5AudioSound; /***/ }), -/* 388 */ +/* 407 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSoundManager = __webpack_require__(130); +var BaseSoundManager = __webpack_require__(133); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var NoAudioSound = __webpack_require__(389); +var NoAudioSound = __webpack_require__(408); var NOOP = __webpack_require__(2); /** @@ -90762,17 +93191,17 @@ module.exports = NoAudioSoundManager; /***/ }), -/* 389 */ +/* 408 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(131); +var BaseSound = __webpack_require__(134); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); var Extend = __webpack_require__(17); @@ -90889,21 +93318,21 @@ module.exports = NoAudioSound; /***/ }), -/* 390 */ +/* 409 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Base64ToArrayBuffer = __webpack_require__(391); -var BaseSoundManager = __webpack_require__(130); +var Base64ToArrayBuffer = __webpack_require__(410); +var BaseSoundManager = __webpack_require__(133); var Class = __webpack_require__(0); var Events = __webpack_require__(64); -var WebAudioSound = __webpack_require__(392); +var WebAudioSound = __webpack_require__(411); /** * @classdesc @@ -91348,13 +93777,13 @@ module.exports = WebAudioSoundManager; /***/ }), -/* 391 */ +/* 410 */ /***/ (function(module, exports) { /** * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -91423,17 +93852,17 @@ module.exports = Base64ToArrayBuffer; /***/ }), -/* 392 */ +/* 411 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(131); +var BaseSound = __webpack_require__(134); var Class = __webpack_require__(0); var Events = __webpack_require__(64); @@ -91473,9 +93902,7 @@ var WebAudioSound = new Class({ if (!this.audioBuffer) { - // eslint-disable-next-line no-console - console.warn('Audio cache entry missing: ' + key); - return; + throw new Error('There is no audio asset with key "' + key + '" in the audio cache'); } /** @@ -92331,7 +94758,7 @@ module.exports = WebAudioSound; /***/ }), -/* 393 */ +/* 412 */ /***/ (function(module, exports, __webpack_require__) { /* eslint no-console: 0 */ @@ -92342,13 +94769,13 @@ module.exports = WebAudioSound; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AdInstance = __webpack_require__(925); +var AdInstance = __webpack_require__(937); var Class = __webpack_require__(0); -var DataManager = __webpack_require__(99); +var DataManager = __webpack_require__(101); var EventEmitter = __webpack_require__(9); -var Leaderboard = __webpack_require__(926); -var Product = __webpack_require__(928); -var Purchase = __webpack_require__(929); +var Leaderboard = __webpack_require__(938); +var Product = __webpack_require__(940); +var Purchase = __webpack_require__(941); /** * @classdesc @@ -94484,6 +96911,8 @@ var FacebookInstantGamesPlugin = new Class({ _this.emit('adshowerror', e, ad); }); + + break; } } @@ -94533,6 +96962,8 @@ var FacebookInstantGamesPlugin = new Class({ _this.emit('adshowerror', e, ad); }); + + break; } } @@ -94647,12 +97078,12 @@ module.exports = FacebookInstantGamesPlugin; /***/ }), -/* 394 */ +/* 413 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -94695,12 +97126,12 @@ module.exports = TransposeMatrix; /***/ }), -/* 395 */ +/* 414 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -94817,17 +97248,17 @@ module.exports = QuickSelect; /***/ }), -/* 396 */ +/* 415 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetValue = __webpack_require__(5); -var Shuffle = __webpack_require__(120); +var Shuffle = __webpack_require__(122); var BuildChunk = function (a, b, qty) { @@ -94955,12 +97386,12 @@ module.exports = Range; /***/ }), -/* 397 */ +/* 416 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -95044,12 +97475,12 @@ module.exports = BuildGameObjectAnimation; /***/ }), -/* 398 */ +/* 417 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -95086,22 +97517,23 @@ module.exports = Union; /***/ }), -/* 399 */ +/* 418 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var DOMElementRender = __webpack_require__(975); +var DOMElementRender = __webpack_require__(987); var GameObject = __webpack_require__(14); var IsPlainObject = __webpack_require__(7); -var RemoveFromDOM = __webpack_require__(188); -var Vector4 = __webpack_require__(333); +var RemoveFromDOM = __webpack_require__(191); +var SCENE_EVENTS = __webpack_require__(18); +var Vector4 = __webpack_require__(352); /** * @classdesc @@ -95163,7 +97595,7 @@ var Vector4 = __webpack_require__(333); * @constructor * @since 3.17.0 * - * @extends Phaser.GameObjects.Components.Alpha + * @extends Phaser.GameObjects.Components.AlphaSingle * @extends Phaser.GameObjects.Components.BlendMode * @extends Phaser.GameObjects.Components.Depth * @extends Phaser.GameObjects.Components.Origin @@ -95183,7 +97615,7 @@ var DOMElement = new Class({ Extends: GameObject, Mixins: [ - Components.Alpha, + Components.AlphaSingle, Components.BlendMode, Components.Depth, Components.Origin, @@ -95371,6 +97803,29 @@ var DOMElement = new Class({ { this.setElement(element, style, innerText); } + + scene.sys.events.on(SCENE_EVENTS.SLEEP, this.handleSceneEvent, this); + scene.sys.events.on(SCENE_EVENTS.WAKE, this.handleSceneEvent, this); + }, + + /** + * Handles a Scene Sleep and Wake event. + * + * @method Phaser.GameObjects.DOMElement#handleSceneEvent + * @private + * @since 3.22.0 + * + * @param {Phaser.Scenes.Systems} sys - The Scene Systems. + */ + handleSceneEvent: function (sys) + { + var node = this.node; + var style = node.style; + + if (node) + { + style.display = (sys.settings.visible) ? 'block' : 'none'; + } }, /** @@ -96025,6 +98480,9 @@ var DOMElement = new Class({ preDestroy: function () { this.removeElement(); + + this.scene.sys.events.off(SCENE_EVENTS.SLEEP, this.handleSceneEvent, this); + this.scene.sys.events.off(SCENE_EVENTS.WAKE, this.handleSceneEvent, this); } }); @@ -96033,16 +98491,16 @@ module.exports = DOMElement; /***/ }), -/* 400 */ +/* 419 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CSSBlendModes = __webpack_require__(976); +var CSSBlendModes = __webpack_require__(988); var GameObject = __webpack_require__(14); /** @@ -96064,8 +98522,9 @@ var DOMElementCSSRenderer = function (renderer, src, interpolationPercentage, ca { var node = src.node; var style = node.style; + var settings = src.scene.sys.settings; - if (!node || !style || GameObject.RENDER_MASK !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || (src.parentContainer && !src.parentContainer.willRender())) + if (!node || !style || !settings.visible || GameObject.RENDER_MASK !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || (src.parentContainer && !src.parentContainer.willRender())) { if (node) { @@ -96154,19 +98613,19 @@ module.exports = DOMElementCSSRenderer; /***/ }), -/* 401 */ +/* 420 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var ExternRender = __webpack_require__(980); +var ExternRender = __webpack_require__(992); /** * @classdesc @@ -96250,17 +98709,17 @@ module.exports = Extern; /***/ }), -/* 402 */ +/* 421 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CircumferencePoint = __webpack_require__(203); -var FromPercent = __webpack_require__(96); +var CircumferencePoint = __webpack_require__(206); +var FromPercent = __webpack_require__(98); var MATH_CONST = __webpack_require__(13); var Point = __webpack_require__(4); @@ -96293,18 +98752,18 @@ module.exports = GetPoint; /***/ }), -/* 403 */ +/* 422 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circumference = __webpack_require__(404); -var CircumferencePoint = __webpack_require__(203); -var FromPercent = __webpack_require__(96); +var Circumference = __webpack_require__(423); +var CircumferencePoint = __webpack_require__(206); +var FromPercent = __webpack_require__(98); var MATH_CONST = __webpack_require__(13); /** @@ -96347,12 +98806,12 @@ module.exports = GetPoints; /***/ }), -/* 404 */ +/* 423 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -96379,16 +98838,16 @@ module.exports = Circumference; /***/ }), -/* 405 */ +/* 424 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Commands = __webpack_require__(202); +var Commands = __webpack_require__(205); var SetTransform = __webpack_require__(29); /** @@ -96629,12 +99088,12 @@ module.exports = GraphicsCanvasRenderer; /***/ }), -/* 406 */ +/* 425 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -96848,18 +99307,18 @@ module.exports = GravityWell; /***/ }), -/* 407 */ +/* 426 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var DegToRad = __webpack_require__(40); -var DistanceBetween = __webpack_require__(63); +var DistanceBetween = __webpack_require__(54); /** * @classdesc @@ -97417,31 +99876,31 @@ module.exports = Particle; /***/ }), -/* 408 */ +/* 427 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlendModes = __webpack_require__(42); +var BlendModes = __webpack_require__(43); var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var DeathZone = __webpack_require__(409); -var EdgeZone = __webpack_require__(410); -var EmitterOp = __webpack_require__(992); +var DeathZone = __webpack_require__(428); +var EdgeZone = __webpack_require__(429); +var EmitterOp = __webpack_require__(1004); var GetFastValue = __webpack_require__(1); -var GetRandom = __webpack_require__(195); -var HasAny = __webpack_require__(411); -var HasValue = __webpack_require__(90); -var Particle = __webpack_require__(407); -var RandomZone = __webpack_require__(412); +var GetRandom = __webpack_require__(198); +var HasAny = __webpack_require__(430); +var HasValue = __webpack_require__(91); +var Particle = __webpack_require__(426); +var RandomZone = __webpack_require__(431); var Rectangle = __webpack_require__(11); -var StableSort = __webpack_require__(134); +var StableSort = __webpack_require__(137); var Vector2 = __webpack_require__(3); -var Wrap = __webpack_require__(62); +var Wrap = __webpack_require__(63); /** * @classdesc @@ -98745,6 +101204,23 @@ var ParticleEmitter = new Class({ return this; }, + /** + * Sets the color tint of emitted particles. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#setTint + * @since 3.22.0 + * + * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - A value between 0 and 0xffffff. + * + * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + */ + setTint: function (value) + { + this.tint.onChange(value); + + return this; + }, + /** * Sets the angle of a {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle stream. * @@ -99204,6 +101680,21 @@ var ParticleEmitter = new Class({ return this; }, + /** + * Removes the emitter from its manager and the scene. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#remove + * @since 3.22.0 + * + * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + */ + remove: function () + { + this.manager.removeEmitter(this); + + return this; + }, + /** * Sorts active particles with {@link Phaser.GameObjects.Particles.ParticleEmitter#depthSortCallback}. * @@ -99456,12 +101947,12 @@ module.exports = ParticleEmitter; /***/ }), -/* 409 */ +/* 428 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99534,12 +102025,12 @@ module.exports = DeathZone; /***/ }), -/* 410 */ +/* 429 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99778,12 +102269,12 @@ module.exports = EdgeZone; /***/ }), -/* 411 */ +/* 430 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99815,12 +102306,12 @@ module.exports = HasAny; /***/ }), -/* 412 */ +/* 431 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99888,12 +102379,12 @@ module.exports = RandomZone; /***/ }), -/* 413 */ +/* 432 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99970,20 +102461,20 @@ module.exports = PathFollower; /***/ }), -/* 414 */ +/* 433 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcRender = __webpack_require__(1015); +var ArcRender = __webpack_require__(1027); var Class = __webpack_require__(0); var DegToRad = __webpack_require__(40); -var Earcut = __webpack_require__(71); -var GeomCircle = __webpack_require__(70); +var Earcut = __webpack_require__(72); +var GeomCircle = __webpack_require__(71); var MATH_CONST = __webpack_require__(13); var Shape = __webpack_require__(33); @@ -100379,18 +102870,18 @@ module.exports = Arc; /***/ }), -/* 415 */ +/* 434 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CurveRender = __webpack_require__(1018); -var Earcut = __webpack_require__(71); +var CurveRender = __webpack_require__(1030); +var Earcut = __webpack_require__(72); var Rectangle = __webpack_require__(11); var Shape = __webpack_require__(33); @@ -100561,19 +103052,19 @@ module.exports = Curve; /***/ }), -/* 416 */ +/* 435 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Earcut = __webpack_require__(71); -var EllipseRender = __webpack_require__(1021); -var GeomEllipse = __webpack_require__(105); +var Earcut = __webpack_require__(72); +var EllipseRender = __webpack_require__(1033); +var GeomEllipse = __webpack_require__(107); var Shape = __webpack_require__(33); /** @@ -100748,18 +103239,18 @@ module.exports = Ellipse; /***/ }), -/* 417 */ +/* 436 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Shape = __webpack_require__(33); -var GridRender = __webpack_require__(1024); +var GridRender = __webpack_require__(1036); /** * @classdesc @@ -101030,16 +103521,16 @@ module.exports = Grid; /***/ }), -/* 418 */ +/* 437 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsoBoxRender = __webpack_require__(1027); +var IsoBoxRender = __webpack_require__(1039); var Class = __webpack_require__(0); var Shape = __webpack_require__(33); @@ -101245,17 +103736,17 @@ module.exports = IsoBox; /***/ }), -/* 419 */ +/* 438 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var IsoTriangleRender = __webpack_require__(1030); +var IsoTriangleRender = __webpack_require__(1042); var Shape = __webpack_require__(33); /** @@ -101491,19 +103982,19 @@ module.exports = IsoTriangle; /***/ }), -/* 420 */ +/* 439 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Shape = __webpack_require__(33); -var GeomLine = __webpack_require__(60); -var LineRender = __webpack_require__(1033); +var GeomLine = __webpack_require__(61); +var LineRender = __webpack_require__(1045); /** * @classdesc @@ -101658,22 +104149,22 @@ module.exports = Line; /***/ }), -/* 421 */ +/* 440 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PolygonRender = __webpack_require__(1036); +var PolygonRender = __webpack_require__(1048); var Class = __webpack_require__(0); -var Earcut = __webpack_require__(71); -var GetAABB = __webpack_require__(422); -var GeomPolygon = __webpack_require__(210); +var Earcut = __webpack_require__(72); +var GetAABB = __webpack_require__(441); +var GeomPolygon = __webpack_require__(213); var Shape = __webpack_require__(33); -var Smooth = __webpack_require__(425); +var Smooth = __webpack_require__(444); /** * @classdesc @@ -101688,7 +104179,7 @@ var Smooth = __webpack_require__(425); * internal Polygon geometry object. The points can be set from a variety of formats: * * - A string containing paired values separated by a single space: `'40 0 40 20 100 20 100 80 40 80 40 100 0 50'` - * - An array of Point or Vector2 objects: `[new Phaser.Math.Vec2(x1, y1), ...]` + * - An array of Point or Vector2 objects: `[new Phaser.Math.Vector2(x1, y1), ...]` * - An array of objects with public x/y properties: `[obj1, obj2, ...]` * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]` * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]` @@ -101797,12 +104288,12 @@ module.exports = Polygon; /***/ }), -/* 422 */ +/* 441 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101853,18 +104344,18 @@ module.exports = GetAABB; /***/ }), -/* 423 */ +/* 442 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(61); -var Line = __webpack_require__(60); -var Perimeter = __webpack_require__(424); +var Length = __webpack_require__(62); +var Line = __webpack_require__(61); +var Perimeter = __webpack_require__(443); /** * Returns an array of Point objects containing the coordinates of the points around the perimeter of the Polygon, @@ -101930,17 +104421,17 @@ module.exports = GetPoints; /***/ }), -/* 424 */ +/* 443 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(61); -var Line = __webpack_require__(60); +var Length = __webpack_require__(62); +var Line = __webpack_require__(61); /** * Returns the perimeter of the given Polygon. @@ -101978,13 +104469,13 @@ module.exports = Perimeter; /***/ }), -/* 425 */ +/* 444 */ /***/ (function(module, exports) { /** * @author Richard Davey * @author Igor Ognichenko - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -102054,19 +104545,19 @@ module.exports = Smooth; /***/ }), -/* 426 */ +/* 445 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var GeomRectangle = __webpack_require__(11); var Shape = __webpack_require__(33); -var RectangleRender = __webpack_require__(1039); +var RectangleRender = __webpack_require__(1051); /** * @classdesc @@ -102166,18 +104657,18 @@ module.exports = Rectangle; /***/ }), -/* 427 */ +/* 446 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var StarRender = __webpack_require__(1042); +var StarRender = __webpack_require__(1054); var Class = __webpack_require__(0); -var Earcut = __webpack_require__(71); +var Earcut = __webpack_require__(72); var Shape = __webpack_require__(33); /** @@ -102454,19 +104945,19 @@ module.exports = Star; /***/ }), -/* 428 */ +/* 447 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Shape = __webpack_require__(33); -var GeomTriangle = __webpack_require__(75); -var TriangleRender = __webpack_require__(1045); +var GeomTriangle = __webpack_require__(76); +var TriangleRender = __webpack_require__(1057); /** * @classdesc @@ -102597,17 +105088,17 @@ module.exports = Triangle; /***/ }), -/* 429 */ +/* 448 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Point = __webpack_require__(4); -var Length = __webpack_require__(61); +var Length = __webpack_require__(62); /** * Returns a Point from around the perimeter of a Triangle. @@ -102684,16 +105175,16 @@ module.exports = GetPoint; /***/ }), -/* 430 */ +/* 449 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(61); +var Length = __webpack_require__(62); var Point = __webpack_require__(4); /** @@ -102777,12 +105268,12 @@ module.exports = GetPoints; /***/ }), -/* 431 */ +/* 450 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -102860,12 +105351,12 @@ module.exports = SetValue; /***/ }), -/* 432 */ +/* 451 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103123,17 +105614,17 @@ module.exports = Light; /***/ }), -/* 433 */ +/* 452 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Light = __webpack_require__(432); +var Light = __webpack_require__(451); var Utils = __webpack_require__(10); /** @@ -103486,16 +105977,16 @@ module.exports = LightsManager; /***/ }), -/* 434 */ +/* 453 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(51); +var CONST = __webpack_require__(52); var Extend = __webpack_require__(17); /** @@ -103504,14 +105995,14 @@ var Extend = __webpack_require__(17); var Geom = { - Circle: __webpack_require__(1103), - Ellipse: __webpack_require__(1113), - Intersects: __webpack_require__(435), - Line: __webpack_require__(1132), - Point: __webpack_require__(1153), - Polygon: __webpack_require__(1167), - Rectangle: __webpack_require__(448), - Triangle: __webpack_require__(1197) + Circle: __webpack_require__(1115), + Ellipse: __webpack_require__(1125), + Intersects: __webpack_require__(454), + Line: __webpack_require__(1144), + Point: __webpack_require__(1165), + Polygon: __webpack_require__(1179), + Rectangle: __webpack_require__(467), + Triangle: __webpack_require__(1209) }; @@ -103522,12 +106013,12 @@ module.exports = Geom; /***/ }), -/* 435 */ +/* 454 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103537,40 +106028,40 @@ module.exports = Geom; module.exports = { - CircleToCircle: __webpack_require__(214), - CircleToRectangle: __webpack_require__(215), - GetCircleToCircle: __webpack_require__(1123), - GetCircleToRectangle: __webpack_require__(1124), - GetLineToCircle: __webpack_require__(216), - GetLineToRectangle: __webpack_require__(218), - GetRectangleIntersection: __webpack_require__(1125), - GetRectangleToRectangle: __webpack_require__(1126), - GetRectangleToTriangle: __webpack_require__(1127), - GetTriangleToCircle: __webpack_require__(1128), - GetTriangleToLine: __webpack_require__(440), - GetTriangleToTriangle: __webpack_require__(1129), - LineToCircle: __webpack_require__(217), - LineToLine: __webpack_require__(92), - LineToRectangle: __webpack_require__(436), - PointToLine: __webpack_require__(444), - PointToLineSegment: __webpack_require__(1130), - RectangleToRectangle: __webpack_require__(137), - RectangleToTriangle: __webpack_require__(437), - RectangleToValues: __webpack_require__(1131), - TriangleToCircle: __webpack_require__(439), - TriangleToLine: __webpack_require__(441), - TriangleToTriangle: __webpack_require__(442) + CircleToCircle: __webpack_require__(217), + CircleToRectangle: __webpack_require__(218), + GetCircleToCircle: __webpack_require__(1135), + GetCircleToRectangle: __webpack_require__(1136), + GetLineToCircle: __webpack_require__(219), + GetLineToRectangle: __webpack_require__(221), + GetRectangleIntersection: __webpack_require__(1137), + GetRectangleToRectangle: __webpack_require__(1138), + GetRectangleToTriangle: __webpack_require__(1139), + GetTriangleToCircle: __webpack_require__(1140), + GetTriangleToLine: __webpack_require__(459), + GetTriangleToTriangle: __webpack_require__(1141), + LineToCircle: __webpack_require__(220), + LineToLine: __webpack_require__(93), + LineToRectangle: __webpack_require__(455), + PointToLine: __webpack_require__(463), + PointToLineSegment: __webpack_require__(1142), + RectangleToRectangle: __webpack_require__(140), + RectangleToTriangle: __webpack_require__(456), + RectangleToValues: __webpack_require__(1143), + TriangleToCircle: __webpack_require__(458), + TriangleToLine: __webpack_require__(460), + TriangleToTriangle: __webpack_require__(461) }; /***/ }), -/* 436 */ +/* 455 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103666,19 +106157,19 @@ module.exports = LineToRectangle; /***/ }), -/* 437 */ +/* 456 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var LineToLine = __webpack_require__(92); -var Contains = __webpack_require__(52); -var ContainsArray = __webpack_require__(219); -var Decompose = __webpack_require__(438); +var LineToLine = __webpack_require__(93); +var Contains = __webpack_require__(53); +var ContainsArray = __webpack_require__(222); +var Decompose = __webpack_require__(457); /** * Checks for intersection between Rectangle shape and Triangle shape. @@ -103759,12 +106250,12 @@ module.exports = RectangleToTriangle; /***/ }), -/* 438 */ +/* 457 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103796,17 +106287,17 @@ module.exports = Decompose; /***/ }), -/* 439 */ +/* 458 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var LineToCircle = __webpack_require__(217); -var Contains = __webpack_require__(91); +var LineToCircle = __webpack_require__(220); +var Contains = __webpack_require__(92); /** * Checks if a Triangle and a Circle intersect. @@ -103861,19 +106352,19 @@ module.exports = TriangleToCircle; /***/ }), -/* 440 */ +/* 459 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Point = __webpack_require__(4); -var TriangleToLine = __webpack_require__(441); -var LineToLine = __webpack_require__(92); +var TriangleToLine = __webpack_require__(460); +var LineToLine = __webpack_require__(93); /** * Checks if a Triangle and a Line intersect, and returns the intersection points as a Point object array. @@ -103920,17 +106411,17 @@ module.exports = GetTriangleToLine; /***/ }), -/* 441 */ +/* 460 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(91); -var LineToLine = __webpack_require__(92); +var Contains = __webpack_require__(92); +var LineToLine = __webpack_require__(93); /** * Checks if a Triangle and a Line intersect. @@ -103976,18 +106467,18 @@ module.exports = TriangleToLine; /***/ }), -/* 442 */ +/* 461 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ContainsArray = __webpack_require__(219); -var Decompose = __webpack_require__(443); -var LineToLine = __webpack_require__(92); +var ContainsArray = __webpack_require__(222); +var Decompose = __webpack_require__(462); +var LineToLine = __webpack_require__(93); /** * Checks if two Triangles intersect. @@ -104066,12 +106557,12 @@ module.exports = TriangleToTriangle; /***/ }), -/* 443 */ +/* 462 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -104101,13 +106592,13 @@ module.exports = Decompose; /***/ }), -/* 444 */ +/* 463 */ /***/ (function(module, exports) { /** * @author Richard Davey * @author Florian Mertens - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -104171,18 +106662,18 @@ module.exports = PointToLine; /***/ }), -/* 445 */ +/* 464 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var MATH_CONST = __webpack_require__(13); -var Wrap = __webpack_require__(62); -var Angle = __webpack_require__(93); +var Wrap = __webpack_require__(63); +var Angle = __webpack_require__(94); /** * Get the angle of the normal of the given line in radians. @@ -104205,12 +106696,12 @@ module.exports = NormalAngle; /***/ }), -/* 446 */ +/* 465 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -104233,12 +106724,12 @@ module.exports = GetMagnitude; /***/ }), -/* 447 */ +/* 466 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -104261,65 +106752,65 @@ module.exports = GetMagnitudeSq; /***/ }), -/* 448 */ +/* 467 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Rectangle = __webpack_require__(11); -Rectangle.Area = __webpack_require__(1172); -Rectangle.Ceil = __webpack_require__(1173); -Rectangle.CeilAll = __webpack_require__(1174); -Rectangle.CenterOn = __webpack_require__(174); -Rectangle.Clone = __webpack_require__(1175); -Rectangle.Contains = __webpack_require__(52); -Rectangle.ContainsPoint = __webpack_require__(1176); -Rectangle.ContainsRect = __webpack_require__(449); -Rectangle.CopyFrom = __webpack_require__(1177); -Rectangle.Decompose = __webpack_require__(438); -Rectangle.Equals = __webpack_require__(1178); -Rectangle.FitInside = __webpack_require__(1179); -Rectangle.FitOutside = __webpack_require__(1180); -Rectangle.Floor = __webpack_require__(1181); -Rectangle.FloorAll = __webpack_require__(1182); -Rectangle.FromPoints = __webpack_require__(186); -Rectangle.GetAspectRatio = __webpack_require__(221); -Rectangle.GetCenter = __webpack_require__(1183); -Rectangle.GetPoint = __webpack_require__(157); -Rectangle.GetPoints = __webpack_require__(274); -Rectangle.GetSize = __webpack_require__(1184); -Rectangle.Inflate = __webpack_require__(1185); -Rectangle.Intersection = __webpack_require__(1186); -Rectangle.MarchingAnts = __webpack_require__(285); -Rectangle.MergePoints = __webpack_require__(1187); -Rectangle.MergeRect = __webpack_require__(1188); -Rectangle.MergeXY = __webpack_require__(1189); -Rectangle.Offset = __webpack_require__(1190); -Rectangle.OffsetPoint = __webpack_require__(1191); -Rectangle.Overlaps = __webpack_require__(1192); -Rectangle.Perimeter = __webpack_require__(118); -Rectangle.PerimeterPoint = __webpack_require__(1193); -Rectangle.Random = __webpack_require__(160); -Rectangle.RandomOutside = __webpack_require__(1194); -Rectangle.SameDimensions = __webpack_require__(1195); -Rectangle.Scale = __webpack_require__(1196); -Rectangle.Union = __webpack_require__(398); +Rectangle.Area = __webpack_require__(1184); +Rectangle.Ceil = __webpack_require__(1185); +Rectangle.CeilAll = __webpack_require__(1186); +Rectangle.CenterOn = __webpack_require__(178); +Rectangle.Clone = __webpack_require__(1187); +Rectangle.Contains = __webpack_require__(53); +Rectangle.ContainsPoint = __webpack_require__(1188); +Rectangle.ContainsRect = __webpack_require__(468); +Rectangle.CopyFrom = __webpack_require__(1189); +Rectangle.Decompose = __webpack_require__(457); +Rectangle.Equals = __webpack_require__(1190); +Rectangle.FitInside = __webpack_require__(1191); +Rectangle.FitOutside = __webpack_require__(1192); +Rectangle.Floor = __webpack_require__(1193); +Rectangle.FloorAll = __webpack_require__(1194); +Rectangle.FromPoints = __webpack_require__(189); +Rectangle.GetAspectRatio = __webpack_require__(224); +Rectangle.GetCenter = __webpack_require__(1195); +Rectangle.GetPoint = __webpack_require__(161); +Rectangle.GetPoints = __webpack_require__(293); +Rectangle.GetSize = __webpack_require__(1196); +Rectangle.Inflate = __webpack_require__(1197); +Rectangle.Intersection = __webpack_require__(1198); +Rectangle.MarchingAnts = __webpack_require__(304); +Rectangle.MergePoints = __webpack_require__(1199); +Rectangle.MergeRect = __webpack_require__(1200); +Rectangle.MergeXY = __webpack_require__(1201); +Rectangle.Offset = __webpack_require__(1202); +Rectangle.OffsetPoint = __webpack_require__(1203); +Rectangle.Overlaps = __webpack_require__(1204); +Rectangle.Perimeter = __webpack_require__(120); +Rectangle.PerimeterPoint = __webpack_require__(1205); +Rectangle.Random = __webpack_require__(164); +Rectangle.RandomOutside = __webpack_require__(1206); +Rectangle.SameDimensions = __webpack_require__(1207); +Rectangle.Scale = __webpack_require__(1208); +Rectangle.Union = __webpack_require__(417); module.exports = Rectangle; /***/ }), -/* 449 */ +/* 468 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -104354,12 +106845,12 @@ module.exports = ContainsRect; /***/ }), -/* 450 */ +/* 469 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -104398,12 +106889,12 @@ module.exports = Centroid; /***/ }), -/* 451 */ +/* 470 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -104439,12 +106930,12 @@ module.exports = Offset; /***/ }), -/* 452 */ +/* 471 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -104504,12 +106995,12 @@ module.exports = InCenter; /***/ }), -/* 453 */ +/* 472 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -104575,12 +107066,12 @@ module.exports = CreateInteractiveObject; /***/ }), -/* 454 */ +/* 473 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -104700,17 +107191,17 @@ module.exports = Axis; /***/ }), -/* 455 */ +/* 474 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Events = __webpack_require__(223); +var Events = __webpack_require__(226); /** * @classdesc @@ -104846,17 +107337,17 @@ module.exports = Button; /***/ }), -/* 456 */ +/* 475 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Axis = __webpack_require__(454); -var Button = __webpack_require__(455); +var Axis = __webpack_require__(473); +var Button = __webpack_require__(474); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); var Vector2 = __webpack_require__(3); @@ -105604,18 +108095,18 @@ module.exports = Gamepad; /***/ }), -/* 457 */ +/* 476 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(139); +var Events = __webpack_require__(142); /** * @classdesc @@ -106006,20 +108497,20 @@ module.exports = Key; /***/ }), -/* 458 */ +/* 477 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Events = __webpack_require__(139); +var Events = __webpack_require__(142); var GetFastValue = __webpack_require__(1); -var ProcessKeyCombo = __webpack_require__(1236); -var ResetKeyCombo = __webpack_require__(1238); +var ProcessKeyCombo = __webpack_require__(1248); +var ResetKeyCombo = __webpack_require__(1250); /** * @classdesc @@ -106299,16 +108790,16 @@ module.exports = KeyCombo; /***/ }), -/* 459 */ +/* 478 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MergeXHRSettings = __webpack_require__(224); +var MergeXHRSettings = __webpack_require__(227); /** * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings @@ -106367,21 +108858,21 @@ module.exports = XHRLoader; /***/ }), -/* 460 */ +/* 479 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var CONST = __webpack_require__(32); -var File = __webpack_require__(23); +var File = __webpack_require__(24); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(1); -var HTML5AudioFile = __webpack_require__(461); +var HTML5AudioFile = __webpack_require__(480); var IsPlainObject = __webpack_require__(7); /** @@ -106638,20 +109129,20 @@ module.exports = AudioFile; /***/ }), -/* 461 */ +/* 480 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Events = __webpack_require__(86); -var File = __webpack_require__(23); +var Events = __webpack_require__(87); +var File = __webpack_require__(24); var GetFastValue = __webpack_require__(1); -var GetURL = __webpack_require__(140); +var GetURL = __webpack_require__(143); var IsPlainObject = __webpack_require__(7); /** @@ -106836,18 +109327,18 @@ module.exports = HTML5AudioFile; /***/ }), -/* 462 */ +/* 481 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(22); -var File = __webpack_require__(23); +var CONST = __webpack_require__(23); +var File = __webpack_require__(24); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(1); var IsPlainObject = __webpack_require__(7); @@ -107007,18 +109498,18 @@ module.exports = ScriptFile; /***/ }), -/* 463 */ +/* 482 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(22); -var File = __webpack_require__(23); +var CONST = __webpack_require__(23); +var File = __webpack_require__(24); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(1); var IsPlainObject = __webpack_require__(7); @@ -107182,21 +109673,21 @@ module.exports = TextFile; /***/ }), -/* 464 */ +/* 483 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeImage = __webpack_require__(465); -var ArcadeSprite = __webpack_require__(142); +var ArcadeImage = __webpack_require__(484); +var ArcadeSprite = __webpack_require__(145); var Class = __webpack_require__(0); -var CONST = __webpack_require__(56); -var PhysicsGroup = __webpack_require__(466); -var StaticPhysicsGroup = __webpack_require__(467); +var CONST = __webpack_require__(58); +var PhysicsGroup = __webpack_require__(485); +var StaticPhysicsGroup = __webpack_require__(486); /** * @classdesc @@ -107453,18 +109944,18 @@ module.exports = Factory; /***/ }), -/* 465 */ +/* 484 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Components = __webpack_require__(226); -var Image = __webpack_require__(88); +var Components = __webpack_require__(229); +var Image = __webpack_require__(89); /** * @classdesc @@ -107553,20 +110044,20 @@ module.exports = ArcadeImage; /***/ }), -/* 466 */ +/* 485 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeSprite = __webpack_require__(142); +var ArcadeSprite = __webpack_require__(145); var Class = __webpack_require__(0); -var CONST = __webpack_require__(56); +var CONST = __webpack_require__(58); var GetFastValue = __webpack_require__(1); -var Group = __webpack_require__(107); +var Group = __webpack_require__(109); var IsPlainObject = __webpack_require__(7); /** @@ -107599,8 +110090,8 @@ var PhysicsGroup = new Class({ if (!children && !config) { config = { - createCallback: this.createCallbackHandler, - removeCallback: this.removeCallbackHandler + internalCreateCallback: this.createCallbackHandler, + internalRemoveCallback: this.removeCallbackHandler }; } else if (IsPlainObject(children)) @@ -107609,8 +110100,8 @@ var PhysicsGroup = new Class({ config = children; children = null; - config.createCallback = this.createCallbackHandler; - config.removeCallback = this.removeCallbackHandler; + config.internalCreateCallback = this.createCallbackHandler; + config.internalRemoveCallback = this.removeCallbackHandler; } else if (Array.isArray(children) && IsPlainObject(children[0])) { @@ -107621,16 +110112,16 @@ var PhysicsGroup = new Class({ children.forEach(function (singleConfig) { - singleConfig.createCallback = _this.createCallbackHandler; - singleConfig.removeCallback = _this.removeCallbackHandler; + singleConfig.internalCreateCallback = _this.createCallbackHandler; + singleConfig.internalRemoveCallback = _this.removeCallbackHandler; }); } else { // config is not defined and children is not a plain object nor an array of plain objects config = { - createCallback: this.createCallbackHandler, - removeCallback: this.removeCallbackHandler + internalCreateCallback: this.createCallbackHandler, + internalRemoveCallback: this.removeCallbackHandler }; } @@ -107838,20 +110329,20 @@ module.exports = PhysicsGroup; /***/ }), -/* 467 */ +/* 486 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeSprite = __webpack_require__(142); +var ArcadeSprite = __webpack_require__(145); var Class = __webpack_require__(0); -var CONST = __webpack_require__(56); +var CONST = __webpack_require__(58); var GetFastValue = __webpack_require__(1); -var Group = __webpack_require__(107); +var Group = __webpack_require__(109); var IsPlainObject = __webpack_require__(7); /** @@ -107884,8 +110375,8 @@ var StaticPhysicsGroup = new Class({ if (!children && !config) { config = { - createCallback: this.createCallbackHandler, - removeCallback: this.removeCallbackHandler, + internalCreateCallback: this.createCallbackHandler, + internalRemoveCallback: this.removeCallbackHandler, createMultipleCallback: this.createMultipleCallbackHandler, classType: ArcadeSprite }; @@ -107896,8 +110387,8 @@ var StaticPhysicsGroup = new Class({ config = children; children = null; - config.createCallback = this.createCallbackHandler; - config.removeCallback = this.removeCallbackHandler; + config.internalCreateCallback = this.createCallbackHandler; + config.internalRemoveCallback = this.removeCallbackHandler; config.createMultipleCallback = this.createMultipleCallbackHandler; config.classType = GetFastValue(config, 'classType', ArcadeSprite); } @@ -107909,8 +110400,8 @@ var StaticPhysicsGroup = new Class({ config.forEach(function (singleConfig) { - singleConfig.createCallback = this.createCallbackHandler; - singleConfig.removeCallback = this.removeCallbackHandler; + singleConfig.internalCreateCallback = this.createCallbackHandler; + singleConfig.internalRemoveCallback = this.removeCallbackHandler; singleConfig.createMultipleCallback = this.createMultipleCallbackHandler; singleConfig.classType = GetFastValue(singleConfig, 'classType', ArcadeSprite); }); @@ -108029,7 +110520,7 @@ module.exports = StaticPhysicsGroup; /***/ }), -/* 468 */ +/* 487 */ /***/ (function(module, exports) { /** @@ -108114,42 +110605,42 @@ module.exports = OverlapRect; /***/ }), -/* 469 */ +/* 488 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Body = __webpack_require__(470); -var Clamp = __webpack_require__(24); +var Body = __webpack_require__(489); +var Clamp = __webpack_require__(20); var Class = __webpack_require__(0); -var Collider = __webpack_require__(471); -var CONST = __webpack_require__(56); -var DistanceBetween = __webpack_require__(63); +var Collider = __webpack_require__(490); +var CONST = __webpack_require__(58); +var DistanceBetween = __webpack_require__(54); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(227); -var FuzzyEqual = __webpack_require__(178); -var FuzzyGreaterThan = __webpack_require__(320); -var FuzzyLessThan = __webpack_require__(321); -var GetOverlapX = __webpack_require__(472); -var GetOverlapY = __webpack_require__(473); +var Events = __webpack_require__(230); +var FuzzyEqual = __webpack_require__(126); +var FuzzyGreaterThan = __webpack_require__(339); +var FuzzyLessThan = __webpack_require__(340); +var GetOverlapX = __webpack_require__(491); +var GetOverlapY = __webpack_require__(492); var GetValue = __webpack_require__(5); -var ProcessQueue = __webpack_require__(196); -var ProcessTileCallbacks = __webpack_require__(1296); +var ProcessQueue = __webpack_require__(199); +var ProcessTileCallbacks = __webpack_require__(1308); var Rectangle = __webpack_require__(11); -var RTree = __webpack_require__(474); -var SeparateTile = __webpack_require__(1297); -var SeparateX = __webpack_require__(1302); -var SeparateY = __webpack_require__(1303); -var Set = __webpack_require__(108); -var StaticBody = __webpack_require__(476); -var TileIntersectsBody = __webpack_require__(475); +var RTree = __webpack_require__(493); +var SeparateTile = __webpack_require__(1309); +var SeparateX = __webpack_require__(1314); +var SeparateY = __webpack_require__(1315); +var Set = __webpack_require__(110); +var StaticBody = __webpack_require__(495); +var TileIntersectsBody = __webpack_require__(494); var TransformMatrix = __webpack_require__(35); var Vector2 = __webpack_require__(3); -var Wrap = __webpack_require__(62); +var Wrap = __webpack_require__(63); /** * @classdesc @@ -110067,7 +112558,7 @@ var World = new Class({ { bodyB = results[i]; - if (bodyA === bodyB || !group.contains(bodyB.gameObject)) + if (bodyA === bodyB || !bodyB.enable || !group.contains(bodyB.gameObject)) { // Skip if comparing against itself, or if bodyB isn't actually part of the Group continue; @@ -110503,22 +112994,22 @@ module.exports = World; /***/ }), -/* 470 */ +/* 489 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Benjamin D. Richards - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(56); -var Events = __webpack_require__(227); -var RadToDeg = __webpack_require__(181); +var CONST = __webpack_require__(58); +var Events = __webpack_require__(230); +var RadToDeg = __webpack_require__(184); var Rectangle = __webpack_require__(11); -var RectangleContains = __webpack_require__(52); +var RectangleContains = __webpack_require__(53); var Vector2 = __webpack_require__(3); /** @@ -110698,7 +113189,7 @@ var Body = new Class({ this.rotation = gameObject.angle; /** - * The Body's rotation, in degrees, during the previous step. + * The Body rotation, in degrees, during the previous step. * * @name Phaser.Physics.Arcade.Body#preRotation * @type {number} @@ -110707,22 +113198,26 @@ var Body = new Class({ this.preRotation = gameObject.angle; /** - * The width of the Body's boundary, in pixels. - * If the Body is circular, this is also the Body's diameter. + * The width of the Body boundary, in pixels. + * If the Body is circular, this is also the diameter. + * If you wish to change the width use the `Body.setSize` method. * * @name Phaser.Physics.Arcade.Body#width * @type {number} + * @readonly * @default 64 * @since 3.0.0 */ this.width = width; /** - * The height of the Body's boundary, in pixels. - * If the Body is circular, this is also the Body's diameter. + * The height of the Body boundary, in pixels. + * If the Body is circular, this is also the diameter. + * If you wish to change the height use the `Body.setSize` method. * * @name Phaser.Physics.Arcade.Body#height * @type {number} + * @readonly * @default 64 * @since 3.0.0 */ @@ -110794,7 +113289,9 @@ var Body = new Class({ this.velocity = new Vector2(); /** - * The Body's calculated velocity, in pixels per second, at the last step. + * The Body's change in position (due to velocity) at the last step, in pixels. + * + * The size of this value depends on the simulation's step rate. * * @name Phaser.Physics.Arcade.Body#newVelocity * @type {Phaser.Math.Vector2} @@ -110951,23 +113448,24 @@ var Body = new Class({ this.maxVelocity = new Vector2(10000, 10000); /** - * The maximum speed this Body is allowed to reach. + * The maximum speed this Body is allowed to reach, in pixels per second. * * If not negative it limits the scalar value of speed. * - * Any negative value means no maximum is being applied. + * Any negative value means no maximum is being applied (the default). * * @name Phaser.Physics.Arcade.Body#maxSpeed * @type {number} + * @default -1 * @since 3.16.0 */ this.maxSpeed = -1; /** * If this Body is `immovable` and in motion, `friction` is the proportion of this Body's motion received by the riding Body on each axis, relative to 1. - * The default value (1, 0) moves the riding Body horizontally in equal proportion to this Body and vertically not at all. * The horizontal component (x) is applied only when two colliding Bodies are separated vertically. * The vertical component (y) is applied only when two colliding Bodies are separated horizontally. + * The default value (1, 0) moves the riding Body horizontally in equal proportion to this Body and vertically not at all. * * @name Phaser.Physics.Arcade.Body#friction * @type {Phaser.Math.Vector2} @@ -111149,7 +113647,7 @@ var Body = new Class({ this.overlapR = 0; /** - * Whether this Body is overlapped with another and both are not moving. + * Whether this Body is overlapped with another and both are not moving, on at least one axis. * * @name Phaser.Physics.Arcade.Body#embedded * @type {boolean} @@ -111179,29 +113677,39 @@ var Body = new Class({ this.checkCollision = { none: false, up: true, down: true, left: true, right: true }; /** - * Whether this Body is colliding with another and in which direction. + * Whether this Body is colliding with a Body or Static Body and in which direction. + * In a collision where both bodies have zero velocity, `embedded` will be set instead. * * @name Phaser.Physics.Arcade.Body#touching * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision} * @since 3.0.0 + * + * @see Phaser.Physics.Arcade.Body#blocked + * @see Phaser.Physics.Arcade.Body#embedded */ this.touching = { none: true, up: false, down: false, left: false, right: false }; /** - * Whether this Body was colliding with another during the last step, and in which direction. + * This Body's `touching` value during the previous step. * * @name Phaser.Physics.Arcade.Body#wasTouching * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision} * @since 3.0.0 + * + * @see Phaser.Physics.Arcade.Body#touching */ this.wasTouching = { none: true, up: false, down: false, left: false, right: false }; /** - * Whether this Body is colliding with a tile or the world boundary. + * Whether this Body is colliding with a Static Body, a tile, or the world boundary. + * In a collision with a Static Body, if this Body has zero velocity then `embedded` will be set instead. * * @name Phaser.Physics.Arcade.Body#blocked * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision} * @since 3.0.0 + * + * @see Phaser.Physics.Arcade.Body#embedded + * @see Phaser.Physics.Arcade.Body#touching */ this.blocked = { none: true, up: false, down: false, left: false, right: false }; @@ -111269,6 +113777,28 @@ var Body = new Class({ */ this._dy = 0; + /** + * The final calculated change in the Body's horizontal position as of `postUpdate`. + * + * @name Phaser.Physics.Arcade.Body#_tx + * @type {number} + * @private + * @default 0 + * @since 3.22.0 + */ + this._tx = 0; + + /** + * The final calculated change in the Body's vertical position as of `postUpdate`. + * + * @name Phaser.Physics.Arcade.Body#_ty + * @type {number} + * @private + * @default 0 + * @since 3.22.0 + */ + this._ty = 0; + /** * Stores the Game Object's bounds. * @@ -111558,6 +114088,9 @@ var Body = new Class({ { this.gameObject.angle += this.deltaZ(); } + + this._tx = dx; + this._ty = dy; }, /** @@ -111931,6 +114464,9 @@ var Body = new Class({ /** * The change in this Body's horizontal position from the previous step. * This value is set during the Body's update phase. + * + * As a Body can update multiple times per step this may not hold the final + * delta value for the Body. In this case, please see the `deltaXFinal` method. * * @method Phaser.Physics.Arcade.Body#deltaX * @since 3.0.0 @@ -111945,6 +114481,9 @@ var Body = new Class({ /** * The change in this Body's vertical position from the previous step. * This value is set during the Body's update phase. + * + * As a Body can update multiple times per step this may not hold the final + * delta value for the Body. In this case, please see the `deltaYFinal` method. * * @method Phaser.Physics.Arcade.Body#deltaY * @since 3.0.0 @@ -111956,6 +114495,48 @@ var Body = new Class({ return this._dy; }, + /** + * The change in this Body's horizontal position from the previous game update. + * + * This value is set during the `postUpdate` phase and takes into account the + * `deltaMax` and final position of the Body. + * + * Because this value is not calculated until `postUpdate`, you must listen for it + * during a Scene `POST_UPDATE` or `RENDER` event, and not in `update`, as it will + * not be calculated by that point. If you _do_ use these values in `update` they + * will represent the delta from the _previous_ game frame. + * + * @method Phaser.Physics.Arcade.Body#deltaXFinal + * @since 3.22.0 + * + * @return {number} The final delta x value. + */ + deltaXFinal: function () + { + return this._tx; + }, + + /** + * The change in this Body's vertical position from the previous game update. + * + * This value is set during the `postUpdate` phase and takes into account the + * `deltaMax` and final position of the Body. + * + * Because this value is not calculated until `postUpdate`, you must listen for it + * during a Scene `POST_UPDATE` or `RENDER` event, and not in `update`, as it will + * not be calculated by that point. If you _do_ use these values in `update` they + * will represent the delta from the _previous_ game frame. + * + * @method Phaser.Physics.Arcade.Body#deltaYFinal + * @since 3.22.0 + * + * @return {number} The final delta y value. + */ + deltaYFinal: function () + { + return this._ty; + }, + /** * The change in this Body's rotation from the previous step, in degrees. * @@ -112056,7 +114637,7 @@ var Body = new Class({ /** * Sets whether this Body collides with the world boundary. * - * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Vec2 first. + * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Phaser.Math.Vector2 first. * * @method Phaser.Physics.Arcade.Body#setCollideWorldBounds * @since 3.0.0 @@ -112741,12 +115322,12 @@ module.exports = Body; /***/ }), -/* 471 */ +/* 490 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -112924,16 +115505,16 @@ module.exports = Collider; /***/ }), -/* 472 */ +/* 491 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(56); +var CONST = __webpack_require__(58); /** * Calculates and returns the horizontal overlap between two arcade physics bodies and sets their properties @@ -113032,16 +115613,16 @@ module.exports = GetOverlapX; /***/ }), -/* 473 */ +/* 492 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(56); +var CONST = __webpack_require__(58); /** * Calculates and returns the vertical overlap between two arcade physics bodies and sets their properties @@ -113140,17 +115721,17 @@ module.exports = GetOverlapY; /***/ }), -/* 474 */ +/* 493 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Vladimir Agafonkin * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var quickselect = __webpack_require__(395); +var quickselect = __webpack_require__(414); /** * @classdesc @@ -113751,12 +116332,12 @@ function multiSelect (arr, left, right, n, compare) module.exports = rbush; /***/ }), -/* 475 */ +/* 494 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -113787,19 +116368,19 @@ module.exports = TileIntersectsBody; /***/ }), -/* 476 */ +/* 495 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CircleContains = __webpack_require__(59); +var CircleContains = __webpack_require__(60); var Class = __webpack_require__(0); -var CONST = __webpack_require__(56); -var RectangleContains = __webpack_require__(52); +var CONST = __webpack_require__(58); +var RectangleContains = __webpack_require__(53); var Vector2 = __webpack_require__(3); /** @@ -114242,8 +116823,7 @@ var StaticBody = new Class({ }, /** - * Updates this Static Body so that its position and dimensions are updated - * based on the current Game Object it is bound to. + * Syncs the Body's position and size with its parent Game Object. * * @method Phaser.Physics.Arcade.StaticBody#updateFromGameObject * @since 3.1.0 @@ -114422,7 +117002,6 @@ var StaticBody = new Class({ /** * Resets this Body to the given coordinates. Also positions its parent Game Object to the same coordinates. - * Similar to `updateFromGameObject`, but doesn't modify the Body's dimensions. * * @method Phaser.Physics.Arcade.StaticBody#reset * @since 3.0.0 @@ -114776,20 +117355,20 @@ module.exports = StaticBody; /***/ }), -/* 477 */ +/* 496 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var COLLIDES = __webpack_require__(110); -var GetVelocity = __webpack_require__(1305); -var TYPE = __webpack_require__(111); -var UpdateMotion = __webpack_require__(1306); +var COLLIDES = __webpack_require__(112); +var GetVelocity = __webpack_require__(1317); +var TYPE = __webpack_require__(113); +var UpdateMotion = __webpack_require__(1318); /** * @callback Phaser.Types.Physics.Impact.BodyUpdateCallback @@ -115377,17 +117956,17 @@ module.exports = Body; /***/ }), -/* 478 */ +/* 497 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var DefaultDefs = __webpack_require__(1310); +var DefaultDefs = __webpack_require__(1322); /** * @classdesc @@ -115741,19 +118320,19 @@ module.exports = CollisionMap; /***/ }), -/* 479 */ +/* 498 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var ImpactBody = __webpack_require__(480); -var ImpactImage = __webpack_require__(481); -var ImpactSprite = __webpack_require__(482); +var ImpactBody = __webpack_require__(499); +var ImpactImage = __webpack_require__(500); +var ImpactSprite = __webpack_require__(501); /** * @classdesc @@ -115898,17 +118477,17 @@ module.exports = Factory; /***/ }), -/* 480 */ +/* 499 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Components = __webpack_require__(229); +var Components = __webpack_require__(232); /** * @classdesc @@ -116031,18 +118610,18 @@ module.exports = ImpactBody; /***/ }), -/* 481 */ +/* 500 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Components = __webpack_require__(229); -var Image = __webpack_require__(88); +var Components = __webpack_require__(232); +var Image = __webpack_require__(89); /** * @classdesc @@ -116189,17 +118768,17 @@ module.exports = ImpactImage; /***/ }), -/* 482 */ +/* 501 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Components = __webpack_require__(229); +var Components = __webpack_require__(232); var Sprite = __webpack_require__(65); /** @@ -116350,27 +118929,27 @@ module.exports = ImpactSprite; /***/ }), -/* 483 */ +/* 502 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Body = __webpack_require__(477); +var Body = __webpack_require__(496); var Class = __webpack_require__(0); -var COLLIDES = __webpack_require__(110); -var CollisionMap = __webpack_require__(478); +var COLLIDES = __webpack_require__(112); +var CollisionMap = __webpack_require__(497); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(228); +var Events = __webpack_require__(231); var GetFastValue = __webpack_require__(1); -var HasValue = __webpack_require__(90); -var Set = __webpack_require__(108); -var Solver = __webpack_require__(1324); +var HasValue = __webpack_require__(91); +var Set = __webpack_require__(110); +var Solver = __webpack_require__(1336); var TILEMAP_FORMATS = __webpack_require__(34); -var TYPE = __webpack_require__(111); +var TYPE = __webpack_require__(113); /** * @classdesc @@ -117335,30 +119914,449 @@ module.exports = World; /***/ }), -/* 484 */ +/* 503 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bodies = __webpack_require__(57); -var Body = __webpack_require__(25); var Class = __webpack_require__(0); -var Composites = __webpack_require__(486); -var Constraint = __webpack_require__(95); -var MatterGameObject = __webpack_require__(1328); -var MatterImage = __webpack_require__(488); -var MatterSprite = __webpack_require__(489); -var MatterTileBody = __webpack_require__(232); -var PointerConstraint = __webpack_require__(1353); +var Vector2 = __webpack_require__(3); + +/** + * @classdesc + * + * The Body Bounds class contains methods to help you extract the world coordinates from various points around + * the bounds of a Matter Body. Because Matter bodies are positioned based on their center of mass, and not a + * dimension based center, you often need to get the bounds coordinates in order to properly align them in the world. + * + * You can access this class via the MatterPhysics class from a Scene, i.e.: + * + * ```javascript + * this.matter.bodyBounds.getTopLeft(body); + * ``` + * + * See also the `MatterPhysics.alignBody` method. + * + * @class BodyBounds + * @memberof Phaser.Physics.Matter + * @constructor + * @since 3.22.0 + */ +var BodyBounds = new Class({ + + initialize: + + function BodyBounds () + { + /** + * A Vector2 that stores the temporary bounds center value during calculations by methods in this class. + * + * @name Phaser.Physics.Matter.BodyBounds#boundsCenter + * @type {Phaser.Math.Vector2} + * @since 3.22.0 + */ + this.boundsCenter = new Vector2(); + + /** + * A Vector2 that stores the temporary center diff values during calculations by methods in this class. + * + * @name Phaser.Physics.Matter.BodyBounds#centerDiff + * @type {Phaser.Math.Vector2} + * @since 3.22.0 + */ + this.centerDiff = new Vector2(); + }, + + /** + * Parses the given body to get the bounds diff values from it. + * + * They're stored in this class in the temporary properties `boundsCenter` and `centerDiff`. + * + * This method is called automatically by all other methods in this class. + * + * @method Phaser.Physics.Matter.BodyBounds#parseBody + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to get the bounds position from. + * + * @return {boolean} `true` if it was able to get the bounds, otherwise `false`. + */ + parseBody: function (body) + { + body = (body.hasOwnProperty('body')) ? body.body : body; + + if (!body.hasOwnProperty('bounds') || !body.hasOwnProperty('centerOfMass')) + { + return false; + } + + var boundsCenter = this.boundsCenter; + var centerDiff = this.centerDiff; + + var boundsWidth = body.bounds.max.x - body.bounds.min.x; + var boundsHeight = body.bounds.max.y - body.bounds.min.y; + + var bodyCenterX = boundsWidth * body.centerOfMass.x; + var bodyCenterY = boundsHeight * body.centerOfMass.y; + + boundsCenter.set(boundsWidth / 2, boundsHeight / 2); + centerDiff.set(bodyCenterX - boundsCenter.x, bodyCenterY - boundsCenter.y); + + return true; + }, + + /** + * Takes a Body and returns the world coordinates of the top-left of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * + * @method Phaser.Physics.Matter.BodyBounds#getTopLeft + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to get the position from. + * @param {number} [x=0] - Optional horizontal offset to add to the returned coordinates. + * @param {number} [y=0] - Optional vertical offset to add to the returned coordinates. + * + * @return {(Phaser.Math.Vector2|false)} A Vector2 containing the coordinates, or `false` if it was unable to parse the body. + */ + getTopLeft: function (body, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + if (this.parseBody(body)) + { + var center = this.boundsCenter; + var diff = this.centerDiff; + + return new Vector2( + x + center.x + diff.x, + y + center.y + diff.y + ); + } + + return false; + }, + + /** + * Takes a Body and returns the world coordinates of the top-center of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * + * @method Phaser.Physics.Matter.BodyBounds#getTopCenter + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to get the position from. + * @param {number} [x=0] - Optional horizontal offset to add to the returned coordinates. + * @param {number} [y=0] - Optional vertical offset to add to the returned coordinates. + * + * @return {(Phaser.Math.Vector2|false)} A Vector2 containing the coordinates, or `false` if it was unable to parse the body. + */ + getTopCenter: function (body, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + if (this.parseBody(body)) + { + var center = this.boundsCenter; + var diff = this.centerDiff; + + return new Vector2( + x + diff.x, + y + center.y + diff.y + ); + } + + return false; + }, + + /** + * Takes a Body and returns the world coordinates of the top-right of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * + * @method Phaser.Physics.Matter.BodyBounds#getTopRight + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to get the position from. + * @param {number} [x=0] - Optional horizontal offset to add to the returned coordinates. + * @param {number} [y=0] - Optional vertical offset to add to the returned coordinates. + * + * @return {(Phaser.Math.Vector2|false)} A Vector2 containing the coordinates, or `false` if it was unable to parse the body. + */ + getTopRight: function (body, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + if (this.parseBody(body)) + { + var center = this.boundsCenter; + var diff = this.centerDiff; + + return new Vector2( + x - (center.x - diff.x), + y + center.y + diff.y + ); + } + + return false; + }, + + /** + * Takes a Body and returns the world coordinates of the left-center of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * + * @method Phaser.Physics.Matter.BodyBounds#getLeftCenter + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to get the position from. + * @param {number} [x=0] - Optional horizontal offset to add to the returned coordinates. + * @param {number} [y=0] - Optional vertical offset to add to the returned coordinates. + * + * @return {(Phaser.Math.Vector2|false)} A Vector2 containing the coordinates, or `false` if it was unable to parse the body. + */ + getLeftCenter: function (body, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + if (this.parseBody(body)) + { + var center = this.boundsCenter; + var diff = this.centerDiff; + + return new Vector2( + x + center.x + diff.x, + y + diff.y + ); + } + + return false; + }, + + /** + * Takes a Body and returns the world coordinates of the center of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * + * @method Phaser.Physics.Matter.BodyBounds#getCenter + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to get the position from. + * @param {number} [x=0] - Optional horizontal offset to add to the returned coordinates. + * @param {number} [y=0] - Optional vertical offset to add to the returned coordinates. + * + * @return {(Phaser.Math.Vector2|false)} A Vector2 containing the coordinates, or `false` if it was unable to parse the body. + */ + getCenter: function (body, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + if (this.parseBody(body)) + { + var diff = this.centerDiff; + + return new Vector2( + x + diff.x, + y + diff.y + ); + } + + return false; + }, + + /** + * Takes a Body and returns the world coordinates of the right-center of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * + * @method Phaser.Physics.Matter.BodyBounds#getRightCenter + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to get the position from. + * @param {number} [x=0] - Optional horizontal offset to add to the returned coordinates. + * @param {number} [y=0] - Optional vertical offset to add to the returned coordinates. + * + * @return {(Phaser.Math.Vector2|false)} A Vector2 containing the coordinates, or `false` if it was unable to parse the body. + */ + getRightCenter: function (body, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + if (this.parseBody(body)) + { + var center = this.boundsCenter; + var diff = this.centerDiff; + + return new Vector2( + x - (center.x - diff.x), + y + diff.y + ); + } + + return false; + }, + + /** + * Takes a Body and returns the world coordinates of the bottom-left of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * + * @method Phaser.Physics.Matter.BodyBounds#getBottomLeft + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to get the position from. + * @param {number} [x=0] - Optional horizontal offset to add to the returned coordinates. + * @param {number} [y=0] - Optional vertical offset to add to the returned coordinates. + * + * @return {(Phaser.Math.Vector2|false)} A Vector2 containing the coordinates, or `false` if it was unable to parse the body. + */ + getBottomLeft: function (body, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + if (this.parseBody(body)) + { + var center = this.boundsCenter; + var diff = this.centerDiff; + + return new Vector2( + x + center.x + diff.x, + y - (center.y - diff.y) + ); + } + + return false; + }, + + /** + * Takes a Body and returns the world coordinates of the bottom-center of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * + * @method Phaser.Physics.Matter.BodyBounds#getBottomCenter + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to get the position from. + * @param {number} [x=0] - Optional horizontal offset to add to the returned coordinates. + * @param {number} [y=0] - Optional vertical offset to add to the returned coordinates. + * + * @return {(Phaser.Math.Vector2|false)} A Vector2 containing the coordinates, or `false` if it was unable to parse the body. + */ + getBottomCenter: function (body, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + if (this.parseBody(body)) + { + var center = this.boundsCenter; + var diff = this.centerDiff; + + return new Vector2( + x + diff.x, + y - (center.y - diff.y) + ); + } + + return false; + }, + + /** + * Takes a Body and returns the world coordinates of the bottom-right of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * + * @method Phaser.Physics.Matter.BodyBounds#getBottomRight + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to get the position from. + * @param {number} [x=0] - Optional horizontal offset to add to the returned coordinates. + * @param {number} [y=0] - Optional vertical offset to add to the returned coordinates. + * + * @return {(Phaser.Math.Vector2|false)} A Vector2 containing the coordinates, or `false` if it was unable to parse the body. + */ + getBottomRight: function (body, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + if (this.parseBody(body)) + { + var center = this.boundsCenter; + var diff = this.centerDiff; + + return new Vector2( + x - (center.x - diff.x), + y - (center.y - diff.y) + ); + } + + return false; + } + +}); + +module.exports = BodyBounds; + + +/***/ }), +/* 504 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Bodies = __webpack_require__(42); +var Class = __webpack_require__(0); +var Composites = __webpack_require__(233); +var Constraint = __webpack_require__(78); +var Svg = __webpack_require__(234); +var MatterGameObject = __webpack_require__(1340); +var MatterImage = __webpack_require__(506); +var MatterSprite = __webpack_require__(507); +var MatterTileBody = __webpack_require__(238); +var PhysicsEditorParser = __webpack_require__(235); +var PhysicsJSONParser = __webpack_require__(236); +var PointerConstraint = __webpack_require__(1369); var Vertices = __webpack_require__(31); /** * @classdesc - * The Matter Factory can create different types of bodies and them to a physics world. + * The Matter Factory is responsible for quickly creating a variety of different types of + * bodies, constraints and Game Objects and adding them into the physics world. + * + * You access the factory from within a Scene using `add`: + * + * ```javascript + * this.matter.add.rectangle(x, y, width, height); + * ``` + * + * Use of the Factory is optional. All of the objects it creates can also be created + * directly via your own code or constructors. It is provided as a means to keep your + * code concise. * * @class Factory * @memberof Phaser.Physics.Matter @@ -117411,9 +120409,9 @@ var Factory = new Class({ * @param {number} y - The Y coordinate of the center of the Body. * @param {number} width - The width of the Body. * @param {number} height - The height of the Body. - * @param {object} options - An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * - * @return {MatterJS.Body} A Matter JS Body. + * @return {MatterJS.BodyType} A Matter JS Body. */ rectangle: function (x, y, width, height, options) { @@ -117432,12 +120430,12 @@ var Factory = new Class({ * * @param {number} x - The X coordinate of the center of the Body. * @param {number} y - The Y coordinate of the center of the Body. - * @param {number} width - The width of the trapezoid of the Body. - * @param {number} height - The height of the trapezoid of the Body. + * @param {number} width - The width of the trapezoid Body. + * @param {number} height - The height of the trapezoid Body. * @param {number} slope - The slope of the trapezoid. 0 creates a rectangle, while 1 creates a triangle. Positive values make the top side shorter, while negative values make the bottom side shorter. - * @param {object} options - An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * - * @return {MatterJS.Body} A Matter JS Body. + * @return {MatterJS.BodyType} A Matter JS Body. */ trapezoid: function (x, y, width, height, slope, options) { @@ -117457,10 +120455,10 @@ var Factory = new Class({ * @param {number} x - The X coordinate of the center of the Body. * @param {number} y - The Y coordinate of the center of the Body. * @param {number} radius - The radius of the circle. - * @param {object} [options] - An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * @param {number} [maxSides] - The maximum amount of sides to use for the polygon which will approximate this circle. * - * @return {MatterJS.Body} A Matter JS Body. + * @return {MatterJS.BodyType} A Matter JS Body. */ circle: function (x, y, radius, options, maxSides) { @@ -117481,9 +120479,9 @@ var Factory = new Class({ * @param {number} y - The Y coordinate of the center of the Body. * @param {number} sides - The number of sides the polygon will have. * @param {number} radius - The "radius" of the polygon, i.e. the distance from its center to any vertex. This is also the radius of its circumcircle. - * @param {object} options - An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * - * @return {MatterJS.Body} A Matter JS Body. + * @return {MatterJS.BodyType} A Matter JS Body. */ polygon: function (x, y, sides, radius, options) { @@ -117503,13 +120501,13 @@ var Factory = new Class({ * * @param {number} x - The X coordinate of the center of the Body. * @param {number} y - The Y coordinate of the center of the Body. - * @param {(string|array)} vertexSets - [description] - * @param {object} [options] - [description] + * @param {(string|array)} vertexSets - The vertices data. Either a path string or an array of vertices. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * @param {boolean} [flagInternal=false] - Flag internal edges (coincident part edges) * @param {number} [removeCollinear=0.01] - Whether Matter.js will discard collinear edges (to improve performance). * @param {number} [minimumArea=10] - During decomposition discard parts that have an area less than this. * - * @return {MatterJS.Body} A Matter JS Body. + * @return {MatterJS.BodyType} A Matter JS Body. */ fromVertices: function (x, y, vertexSets, options, flagInternal, removeCollinear, minimumArea) { @@ -117525,6 +120523,180 @@ var Factory = new Class({ return body; }, + /** + * Creates a body using data exported from the application PhysicsEditor (https://www.codeandweb.com/physicseditor) + * + * The PhysicsEditor file should be loaded as JSON: + * + * ```javascript + * preload () + * { + * this.load.json('vehicles', 'assets/vehicles.json); + * } + * + * create () + * { + * const vehicleShapes = this.cache.json.get('vehicles'); + * this.matter.add.fromPhysicsEditor(400, 300, vehicleShapes.truck); + * } + * ``` + * + * Do not pass the entire JSON file to this method, but instead pass one of the shapes contained within it. + * + * If you pas in an `options` object, any settings in there will override those in the PhysicsEditor config object. + * + * @method Phaser.Physics.Matter.Factory#fromPhysicsEditor + * @since 3.22.0 + * + * @param {number} x - The horizontal world location of the body. + * @param {number} y - The vertical world location of the body. + * @param {any} config - The JSON data exported from PhysicsEditor. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. + * @param {boolean} [addToWorld=true] - Should the newly created body be immediately added to the World? + * + * @return {MatterJS.BodyType} A Matter JS Body. + */ + fromPhysicsEditor: function (x, y, config, options, addToWorld) + { + if (addToWorld === undefined) { addToWorld = true; } + + var body = PhysicsEditorParser.parseBody(x, y, config, options); + + if (addToWorld && !this.world.has(body)) + { + this.world.add(body); + } + + return body; + }, + + /** + * Creates a body using the path data from an SVG file. + * + * SVG Parsing requires the pathseg polyfill from https://github.com/progers/pathseg + * + * The SVG file should be loaded as XML, as this method requires the ability to extract + * the path data from it. I.e.: + * + * ```javascript + * preload () + * { + * this.load.xml('face', 'assets/face.svg); + * } + * + * create () + * { + * this.matter.add.fromSVG(400, 300, this.cache.xml.get('face')); + * } + * ``` + * + * @method Phaser.Physics.Matter.Factory#fromSVG + * @since 3.22.0 + * + * @param {number} x - The X coordinate of the body. + * @param {number} y - The Y coordinate of the body. + * @param {object} xml - The SVG Path data. + * @param {number} [scale=1] - Scale the vertices by this amount after creation. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. + * @param {boolean} [addToWorld=true] - Should the newly created body be immediately added to the World? + * + * @return {MatterJS.BodyType} A Matter JS Body. + */ + fromSVG: function (x, y, xml, scale, options, addToWorld) + { + if (scale === undefined) { scale = 1; } + if (options === undefined) { options = {}; } + if (addToWorld === undefined) { addToWorld = true; } + + var path = xml.getElementsByTagName('path'); + var vertexSets = []; + + for (var i = 0; i < path.length; i++) + { + var points = Svg.pathToVertices(path[i], 30); + + if (scale !== 1) + { + Vertices.scale(points, scale, scale); + } + + vertexSets.push(points); + } + + var body = Bodies.fromVertices(x, y, vertexSets, options); + + if (addToWorld) + { + this.world.add(body); + } + + return body; + }, + + /** + * Creates a body using the supplied physics data, as provided by a JSON file. + * + * The data file should be loaded as JSON: + * + * ```javascript + * preload () + * { + * this.load.json('ninjas', 'assets/ninjas.json); + * } + * + * create () + * { + * const ninjaShapes = this.cache.json.get('ninjas'); + * + * this.matter.add.fromJSON(400, 300, ninjaShapes.shinobi); + * } + * ``` + * + * Do not pass the entire JSON file to this method, but instead pass one of the shapes contained within it. + * + * If you pas in an `options` object, any settings in there will override those in the config object. + * + * The structure of the JSON file is as follows: + * + * ```text + * { + * 'generator_info': // The name of the application that created the JSON data + * 'shapeName': { + * 'type': // The type of body + * 'label': // Optional body label + * 'vertices': // An array, or an array of arrays, containing the vertex data in x/y object pairs + * } + * } + * ``` + * + * At the time of writing, only the Phaser Physics Tracer App exports in this format. + * + * @method Phaser.Physics.Matter.Factory#fromJSON + * @since 3.22.0 + * + * @param {number} x - The X coordinate of the body. + * @param {number} y - The Y coordinate of the body. + * @param {any} config - The JSON physics data. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. + * @param {boolean} [addToWorld=true] - Should the newly created body be immediately added to the World? + * + * @return {MatterJS.BodyType} A Matter JS Body. + */ + fromJSON: function (x, y, config, options, addToWorld) + { + if (options === undefined) { options = {}; } + if (addToWorld === undefined) { addToWorld = true; } + + var body = PhysicsJSONParser.parseBody(x, y, config, options); + + if (body && addToWorld) + { + this.world.add(body); + } + + return body; + }, + /** * Create a new composite containing Matter Image objects created in a grid arrangement. * This function uses the body bounds to prevent overlaps. @@ -117540,9 +120712,9 @@ var Factory = new Class({ * @param {number} rows - The number of rows in the grid. * @param {number} [columnGap=0] - The distance between each column. * @param {number} [rowGap=0] - The distance between each row. - * @param {object} [options] - [description] + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * - * @return {MatterJS.Composite} A Matter JS Composite Stack. + * @return {MatterJS.CompositeType} A Matter JS Composite Stack. */ imageStack: function (key, frame, x, y, columns, rows, columnGap, rowGap, options) { @@ -117571,6 +120743,7 @@ var Factory = new Class({ /** * Create a new composite containing bodies created in the callback in a grid arrangement. + * * This function uses the body bounds to prevent overlaps. * * @method Phaser.Physics.Matter.Factory#stack @@ -117584,7 +120757,7 @@ var Factory = new Class({ * @param {number} rowGap - The distance between each row. * @param {function} callback - The callback that creates the stack. * - * @return {MatterJS.Composite} A new composite containing objects created in the callback. + * @return {MatterJS.CompositeType} A new composite containing objects created in the callback. */ stack: function (x, y, columns, rows, columnGap, rowGap, callback) { @@ -117610,7 +120783,7 @@ var Factory = new Class({ * @param {number} rowGap - The distance between each row. * @param {function} callback - The callback function to be invoked. * - * @return {MatterJS.Composite} A Matter JS Composite pyramid. + * @return {MatterJS.CompositeType} A Matter JS Composite pyramid. */ pyramid: function (x, y, columns, rows, columnGap, rowGap, callback) { @@ -117627,14 +120800,14 @@ var Factory = new Class({ * @method Phaser.Physics.Matter.Factory#chain * @since 3.0.0 * - * @param {MatterJS.Composite} composite - [description] - * @param {number} xOffsetA - [description] - * @param {number} yOffsetA - [description] - * @param {number} xOffsetB - [description] - * @param {number} yOffsetB - [description] - * @param {object} options - [description] + * @param {MatterJS.CompositeType} composite - The composite in which all bodies will be chained together sequentially. + * @param {number} xOffsetA - The horizontal offset of the BodyA constraint. This is a percentage based on the body size, not a world position. + * @param {number} yOffsetA - The vertical offset of the BodyA constraint. This is a percentage based on the body size, not a world position. + * @param {number} xOffsetB - The horizontal offset of the BodyB constraint. This is a percentage based on the body size, not a world position. + * @param {number} yOffsetB - The vertical offset of the BodyB constraint. This is a percentage based on the body size, not a world position. + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * - * @return {MatterJS.Composite} A new composite containing objects chained together with constraints. + * @return {MatterJS.CompositeType} The original composite that was passed to this method. */ chain: function (composite, xOffsetA, yOffsetA, xOffsetB, yOffsetB, options) { @@ -117647,13 +120820,13 @@ var Factory = new Class({ * @method Phaser.Physics.Matter.Factory#mesh * @since 3.0.0 * - * @param {MatterJS.Composite} composite - [description] - * @param {number} columns - [description] - * @param {number} rows - [description] - * @param {boolean} crossBrace - [description] - * @param {object} options - [description] + * @param {MatterJS.CompositeType} composite - The composite in which all bodies will be chained together. + * @param {number} columns - The number of columns in the mesh. + * @param {number} rows - The number of rows in the mesh. + * @param {boolean} crossBrace - Create cross braces for the mesh as well? + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * - * @return {MatterJS.Composite} The composite containing objects meshed together with constraints. + * @return {MatterJS.CompositeType} The original composite that was passed to this method. */ mesh: function (composite, columns, rows, crossBrace, options) { @@ -117666,13 +120839,13 @@ var Factory = new Class({ * @method Phaser.Physics.Matter.Factory#newtonsCradle * @since 3.0.0 * - * @param {number} x - [description] - * @param {number} y - [description] - * @param {number} number - [description] - * @param {number} size - [description] - * @param {number} length - [description] + * @param {number} x - The horizontal position of the start of the cradle. + * @param {number} y - The vertical position of the start of the cradle. + * @param {number} number - The number of balls in the cradle. + * @param {number} size - The radius of each ball in the cradle. + * @param {number} length - The length of the 'string' the balls hang from. * - * @return {MatterJS.Composite} A new composite newtonsCradle body. + * @return {MatterJS.CompositeType} A Newton's cradle composite. */ newtonsCradle: function (x, y, number, size, length) { @@ -117689,13 +120862,13 @@ var Factory = new Class({ * @method Phaser.Physics.Matter.Factory#car * @since 3.0.0 * - * @param {number} x - [description] - * @param {number} y - [description] - * @param {number} width - [description] - * @param {number} height - [description] - * @param {number} wheelSize - [description] + * @param {number} x - The horizontal position of the car in the world. + * @param {number} y - The vertical position of the car in the world. + * @param {number} width - The width of the car chasis. + * @param {number} height - The height of the car chasis. + * @param {number} wheelSize - The radius of the car wheels. * - * @return {MatterJS.Composite} A new composite car body. + * @return {MatterJS.CompositeType} A new composite car body. */ car: function (x, y, width, height, wheelSize) { @@ -117718,12 +120891,12 @@ var Factory = new Class({ * @param {number} rows - The number of rows in the Composite. * @param {number} columnGap - The distance between each column. * @param {number} rowGap - The distance between each row. - * @param {boolean} crossBrace - [description] + * @param {boolean} crossBrace - `true` to create cross braces between the bodies, or `false` to create just straight braces. * @param {number} particleRadius - The radius of this circlular composite. - * @param {object} particleOptions - [description] - * @param {object} constraintOptions - [description] + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [particleOptions] - An optional Body configuration object that is used to set initial Body properties on creation. + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [constraintOptions] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * - * @return {MatterJS.Composite} A new composite simple soft body. + * @return {MatterJS.CompositeType} A new composite simple soft body. */ softBody: function (x, y, columns, rows, columnGap, rowGap, crossBrace, particleRadius, particleOptions, constraintOptions) { @@ -117735,18 +120908,31 @@ var Factory = new Class({ }, /** - * [description] + * This method is an alias for `Factory.constraint`. + * + * Constraints (or joints) are used for specifying that a fixed distance must be maintained + * between two bodies, or a body and a fixed world-space position. + * + * The stiffness of constraints can be modified to create springs or elastic. + * + * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` + * value (e.g. `0.7` or above). + * + * If the constraint is unstable, try lowering the `stiffness` value and / or increasing + * `constraintIterations` within the Matter Config. + * + * For compound bodies, constraints must be applied to the parent body and not one of its parts. * * @method Phaser.Physics.Matter.Factory#joint * @since 3.0.0 * - * @param {MatterJS.Body} bodyA - The first possible `Body` that this constraint is attached to. - * @param {MatterJS.Body} bodyB - The second possible `Body` that this constraint is attached to. + * @param {MatterJS.BodyType} bodyA - The first possible `Body` that this constraint is attached to. + * @param {MatterJS.BodyType} bodyB - The second possible `Body` that this constraint is attached to. * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. - * @param {object} [options={}] - [description] + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * - * @return {MatterJS.Constraint} A Matter JS Constraint. + * @return {MatterJS.ConstraintType} A Matter JS Constraint. */ joint: function (bodyA, bodyB, length, stiffness, options) { @@ -117754,18 +120940,31 @@ var Factory = new Class({ }, /** - * [description] + * This method is an alias for `Factory.constraint`. + * + * Constraints (or joints) are used for specifying that a fixed distance must be maintained + * between two bodies, or a body and a fixed world-space position. + * + * The stiffness of constraints can be modified to create springs or elastic. + * + * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` + * value (e.g. `0.7` or above). + * + * If the constraint is unstable, try lowering the `stiffness` value and / or increasing + * `constraintIterations` within the Matter Config. + * + * For compound bodies, constraints must be applied to the parent body and not one of its parts. * * @method Phaser.Physics.Matter.Factory#spring * @since 3.0.0 * - * @param {MatterJS.Body} bodyA - The first possible `Body` that this constraint is attached to. - * @param {MatterJS.Body} bodyB - The second possible `Body` that this constraint is attached to. + * @param {MatterJS.BodyType} bodyA - The first possible `Body` that this constraint is attached to. + * @param {MatterJS.BodyType} bodyB - The second possible `Body` that this constraint is attached to. * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. - * @param {object} [options={}] - [description] + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * - * @return {MatterJS.Constraint} A Matter JS Constraint. + * @return {MatterJS.ConstraintType} A Matter JS Constraint. */ spring: function (bodyA, bodyB, length, stiffness, options) { @@ -117773,18 +120972,29 @@ var Factory = new Class({ }, /** - * [description] + * Constraints (or joints) are used for specifying that a fixed distance must be maintained + * between two bodies, or a body and a fixed world-space position. + * + * The stiffness of constraints can be modified to create springs or elastic. + * + * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` + * value (e.g. `0.7` or above). + * + * If the constraint is unstable, try lowering the `stiffness` value and / or increasing + * `constraintIterations` within the Matter Config. + * + * For compound bodies, constraints must be applied to the parent body and not one of its parts. * * @method Phaser.Physics.Matter.Factory#constraint * @since 3.0.0 * - * @param {MatterJS.Body} bodyA - The first possible `Body` that this constraint is attached to. - * @param {MatterJS.Body} bodyB - The second possible `Body` that this constraint is attached to. + * @param {MatterJS.BodyType} bodyA - The first possible `Body` that this constraint is attached to. + * @param {MatterJS.BodyType} bodyB - The second possible `Body` that this constraint is attached to. * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. - * @param {object} [options={}] - [description] + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * - * @return {MatterJS.Constraint} A Matter JS Constraint. + * @return {MatterJS.ConstraintType} A Matter JS Constraint. */ constraint: function (bodyA, bodyB, length, stiffness, options) { @@ -117809,24 +121019,38 @@ var Factory = new Class({ }, /** - * [description] + * Constraints (or joints) are used for specifying that a fixed distance must be maintained + * between two bodies, or a body and a fixed world-space position. + * + * A world constraint has only one body, you should specify a `pointA` position in + * the constraint options parameter to attach the constraint to the world. + * + * The stiffness of constraints can be modified to create springs or elastic. + * + * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` + * value (e.g. `0.7` or above). + * + * If the constraint is unstable, try lowering the `stiffness` value and / or increasing + * `constraintIterations` within the Matter Config. + * + * For compound bodies, constraints must be applied to the parent body and not one of its parts. * * @method Phaser.Physics.Matter.Factory#worldConstraint * @since 3.0.0 * - * @param {MatterJS.Body} bodyB - The second possible `Body` that this constraint is attached to. - * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. + * @param {MatterJS.BodyType} body - The Matter `Body` that this constraint is attached to. + * @param {number} [length] - A number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. - * @param {object} [options={}] - [description] + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * - * @return {MatterJS.Constraint} A Matter JS Constraint. + * @return {MatterJS.ConstraintType} A Matter JS Constraint. */ - worldConstraint: function (bodyB, length, stiffness, options) + worldConstraint: function (body, length, stiffness, options) { if (stiffness === undefined) { stiffness = 1; } if (options === undefined) { options = {}; } - options.bodyB = (bodyB.type === 'body') ? bodyB : bodyB.body; + options.bodyB = (body.type === 'body') ? body : body.body; if (!isNaN(length)) { @@ -117843,14 +121067,23 @@ var Factory = new Class({ }, /** - * [description] + * This method is an alias for `Factory.pointerConstraint`. + * + * A Pointer Constraint is a special type of constraint that allows you to click + * and drag bodies in a Matter World. It monitors the active Pointers in a Scene, + * and when one is pressed down it checks to see if that hit any part of any active + * body in the world. If it did, and the body has input enabled, it will begin to + * drag it until either released, or you stop it via the `stopDrag` method. + * + * You can adjust the stiffness, length and other properties of the constraint via + * the `options` object on creation. * * @method Phaser.Physics.Matter.Factory#mouseSpring * @since 3.0.0 * - * @param {object} options - [description] + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * - * @return {MatterJS.Constraint} A Matter JS Constraint. + * @return {MatterJS.ConstraintType} A Matter JS Constraint. */ mouseSpring: function (options) { @@ -117858,14 +121091,21 @@ var Factory = new Class({ }, /** - * [description] + * A Pointer Constraint is a special type of constraint that allows you to click + * and drag bodies in a Matter World. It monitors the active Pointers in a Scene, + * and when one is pressed down it checks to see if that hit any part of any active + * body in the world. If it did, and the body has input enabled, it will begin to + * drag it until either released, or you stop it via the `stopDrag` method. + * + * You can adjust the stiffness, length and other properties of the constraint via + * the `options` object on creation. * * @method Phaser.Physics.Matter.Factory#pointerConstraint * @since 3.0.0 * - * @param {object} options - [description] + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * - * @return {MatterJS.Constraint} A Matter JS Constraint. + * @return {MatterJS.ConstraintType} A Matter JS Constraint. */ pointerConstraint: function (options) { @@ -117884,7 +121124,12 @@ var Factory = new Class({ }, /** - * [description] + * Creates a Matter Physics Image Game Object. + * + * An Image is a light-weight Game Object useful for the display of static images in your game, + * such as logos, backgrounds, scenery or other non-animated elements. Images can have input + * events and physics bodies, or be tweened, tinted or scrolled. The main difference between an + * Image and a Sprite is that you cannot animate an Image as they do not have the Animation component. * * @method Phaser.Physics.Matter.Factory#image * @since 3.0.0 @@ -117893,9 +121138,9 @@ var Factory = new Class({ * @param {number} y - The vertical position of this Game Object in the world. * @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value. - * @param {object} [options={}] - [description] + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * - * @return {Phaser.Physics.Matter.Image} [description] + * @return {Phaser.Physics.Matter.Image} The Matter Image Game Object. */ image: function (x, y, key, frame, options) { @@ -117907,25 +121152,40 @@ var Factory = new Class({ }, /** - * [description] + * Creates a wrapper around a Tile that provides access to a corresponding Matter body. A tile can only + * have one Matter body associated with it. You can either pass in an existing Matter body for + * the tile or allow the constructor to create the corresponding body for you. If the Tile has a + * collision group (defined in Tiled), those shapes will be used to create the body. If not, the + * tile's rectangle bounding box will be used. + * + * The corresponding body will be accessible on the Tile itself via Tile.physics.matterBody. + * + * Note: not all Tiled collision shapes are supported. See + * Phaser.Physics.Matter.TileBody#setFromTileCollision for more information. * * @method Phaser.Physics.Matter.Factory#tileBody * @since 3.0.0 * - * @param {Phaser.Tilemaps.Tile} tile - [description] - * @param {object} options - [description] + * @param {Phaser.Tilemaps.Tile} tile - The target tile that should have a Matter body. + * @param {Phaser.Types.Physics.Matter.MatterTileOptions} [options] - Options to be used when creating the Matter body. * - * @return {Phaser.Physics.Matter.TileBody} [description] + * @return {Phaser.Physics.Matter.TileBody} The Matter Tile Body Game Object. */ tileBody: function (tile, options) { - var tileBody = new MatterTileBody(this.world, tile, options); - - return tileBody; + return new MatterTileBody(this.world, tile, options); }, /** - * [description] + * Creates a Matter Physics Sprite Game Object. + * + * A Sprite Game Object is used for the display of both static and animated images in your game. + * Sprites can have input events and physics bodies. They can also be tweened, tinted, scrolled + * and animated. + * + * The main difference between a Sprite and an Image Game Object is that you cannot animate Images. + * As such, Sprites take a fraction longer to process and have a larger API footprint due to the Animation + * Component. If you do not require animation then you can safely use Images to replace Sprites in all cases. * * @method Phaser.Physics.Matter.Factory#sprite * @since 3.0.0 @@ -117934,9 +121194,9 @@ var Factory = new Class({ * @param {number} y - The vertical position of this Game Object in the world. * @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value. - * @param {object} [options={}] - [description] + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * - * @return {Phaser.Physics.Matter.Sprite} [description] + * @return {Phaser.Physics.Matter.Sprite} The Matter Sprite Game Object. */ sprite: function (x, y, key, frame, options) { @@ -117949,78 +121209,26 @@ var Factory = new Class({ }, /** - * [description] + * Takes an existing Game Object and injects all of the Matter Components into it. + * + * This enables you to use component methods such as `setVelocity` or `isSensor` directly from + * this Game Object. + * + * You can also pass in either a Matter Body Configuration object, or a Matter Body instance + * to link with this Game Object. * * @method Phaser.Physics.Matter.Factory#gameObject * @since 3.3.0 * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to inject the Matter Body in to. - * @param {(object|MatterJS.Body)} options - A Matter Body configuration object, or an instance of a Matter Body. + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to inject the Matter Components in to. + * @param {(Phaser.Types.Physics.Matter.MatterBodyConfig|MatterJS.Body)} [options] - A Matter Body configuration object, or an instance of a Matter Body. + * @param {boolean} [addToWorld=true] - Add this Matter Body to the World? * - * @return {Phaser.GameObjects.GameObject} The Game Object that had the Matter Body injected into it. + * @return {Phaser.GameObjects.GameObject} The Game Object that had the Matter Components injected into it. */ - gameObject: function (gameObject, options) + gameObject: function (gameObject, options, addToWorld) { - return MatterGameObject(this.world, gameObject, options); - }, - - /** - * Instantly sets the linear velocity of the given body. Position, angle, force etc. are unchanged. - * - * See also `force`. - * - * @method Phaser.Physics.Matter.Factory#velocity - * @since 3.18.0 - * - * @param {MatterJS.Body} body - The Matter Body to set the velocity on. - * @param {Phaser.Types.Math.Vector2Like} velocity - The velocity to set. An object with public `x` and `y` components. - * - * @return {MatterJS.Body} The Matter body. - */ - velocity: function (body, velocity) - { - Body.setVelocity(body, velocity); - - return body; - }, - - /** - * Instantly sets the angular velocity of the given body. Position, angle, force etc. are unchanged. - * - * See also `force`. - * - * @method Phaser.Physics.Matter.Factory#angularVelocity - * @since 3.18.0 - * - * @param {MatterJS.Body} body - The Matter Body to set the velocity on. - * @param {number} velocity - The angular velocity to set. - * - * @return {MatterJS.Body} The Matter body. - */ - angularVelocity: function (body, velocity) - { - Body.setAngularVelocity(body, velocity); - - return body; - }, - - /** - * Applies a force to a body from a given world-space position, including resulting torque. - * - * @method Phaser.Physics.Matter.Factory#force - * @since 3.18.0 - * - * @param {MatterJS.Body} body - The Matter Body to set the force on. - * @param {Phaser.Types.Math.Vector2Like} position - The world position to apply the force from. An object with public `x` and `y` components. - * @param {Phaser.Types.Math.Vector2Like} force - The force to set. An object with public `x` and `y` components. - * - * @return {MatterJS.Body} The Matter body. - */ - force: function (body, position, force) - { - Body.applyForce(body, position, force); - - return body; + return MatterGameObject(this.world, gameObject, options, addToWorld); }, /** @@ -118042,7 +121250,7 @@ module.exports = Factory; /***/ }), -/* 485 */ +/* 505 */ /***/ (function(module, exports) { /** @@ -118712,531 +121920,21 @@ function points_eq(a,b,precision){ /***/ }), -/* 486 */ -/***/ (function(module, exports, __webpack_require__) { - -/** -* The `Matter.Composites` module contains factory methods for creating composite bodies -* with commonly used configurations (such as stacks and chains). -* -* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). -* -* @class Composites -*/ - -var Composites = {}; - -module.exports = Composites; - -var Composite = __webpack_require__(77); -var Constraint = __webpack_require__(95); -var Common = __webpack_require__(18); -var Body = __webpack_require__(25); -var Bodies = __webpack_require__(57); - -(function() { - - /** - * Create a new composite containing bodies created in the callback in a grid arrangement. - * This function uses the body's bounds to prevent overlaps. - * @method stack - * @param {number} xx - * @param {number} yy - * @param {number} columns - * @param {number} rows - * @param {number} columnGap - * @param {number} rowGap - * @param {function} callback - * @return {composite} A new composite containing objects created in the callback - */ - Composites.stack = function(xx, yy, columns, rows, columnGap, rowGap, callback) { - var stack = Composite.create({ label: 'Stack' }), - x = xx, - y = yy, - lastBody, - i = 0; - - for (var row = 0; row < rows; row++) { - var maxHeight = 0; - - for (var column = 0; column < columns; column++) { - var body = callback(x, y, column, row, lastBody, i); - - if (body) { - var bodyHeight = body.bounds.max.y - body.bounds.min.y, - bodyWidth = body.bounds.max.x - body.bounds.min.x; - - if (bodyHeight > maxHeight) - maxHeight = bodyHeight; - - Body.translate(body, { x: bodyWidth * 0.5, y: bodyHeight * 0.5 }); - - x = body.bounds.max.x + columnGap; - - Composite.addBody(stack, body); - - lastBody = body; - i += 1; - } else { - x += columnGap; - } - } - - y += maxHeight + rowGap; - x = xx; - } - - return stack; - }; - - /** - * Chains all bodies in the given composite together using constraints. - * @method chain - * @param {composite} composite - * @param {number} xOffsetA - * @param {number} yOffsetA - * @param {number} xOffsetB - * @param {number} yOffsetB - * @param {object} options - * @return {composite} A new composite containing objects chained together with constraints - */ - Composites.chain = function(composite, xOffsetA, yOffsetA, xOffsetB, yOffsetB, options) { - var bodies = composite.bodies; - - for (var i = 1; i < bodies.length; i++) { - var bodyA = bodies[i - 1], - bodyB = bodies[i], - bodyAHeight = bodyA.bounds.max.y - bodyA.bounds.min.y, - bodyAWidth = bodyA.bounds.max.x - bodyA.bounds.min.x, - bodyBHeight = bodyB.bounds.max.y - bodyB.bounds.min.y, - bodyBWidth = bodyB.bounds.max.x - bodyB.bounds.min.x; - - var defaults = { - bodyA: bodyA, - pointA: { x: bodyAWidth * xOffsetA, y: bodyAHeight * yOffsetA }, - bodyB: bodyB, - pointB: { x: bodyBWidth * xOffsetB, y: bodyBHeight * yOffsetB } - }; - - var constraint = Common.extend(defaults, options); - - Composite.addConstraint(composite, Constraint.create(constraint)); - } - - composite.label += ' Chain'; - - return composite; - }; - - /** - * Connects bodies in the composite with constraints in a grid pattern, with optional cross braces. - * @method mesh - * @param {composite} composite - * @param {number} columns - * @param {number} rows - * @param {boolean} crossBrace - * @param {object} options - * @return {composite} The composite containing objects meshed together with constraints - */ - Composites.mesh = function(composite, columns, rows, crossBrace, options) { - var bodies = composite.bodies, - row, - col, - bodyA, - bodyB, - bodyC; - - for (row = 0; row < rows; row++) { - for (col = 1; col < columns; col++) { - bodyA = bodies[(col - 1) + (row * columns)]; - bodyB = bodies[col + (row * columns)]; - Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyA, bodyB: bodyB }, options))); - } - - if (row > 0) { - for (col = 0; col < columns; col++) { - bodyA = bodies[col + ((row - 1) * columns)]; - bodyB = bodies[col + (row * columns)]; - Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyA, bodyB: bodyB }, options))); - - if (crossBrace && col > 0) { - bodyC = bodies[(col - 1) + ((row - 1) * columns)]; - Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyC, bodyB: bodyB }, options))); - } - - if (crossBrace && col < columns - 1) { - bodyC = bodies[(col + 1) + ((row - 1) * columns)]; - Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyC, bodyB: bodyB }, options))); - } - } - } - } - - composite.label += ' Mesh'; - - return composite; - }; - - /** - * Create a new composite containing bodies created in the callback in a pyramid arrangement. - * This function uses the body's bounds to prevent overlaps. - * @method pyramid - * @param {number} xx - * @param {number} yy - * @param {number} columns - * @param {number} rows - * @param {number} columnGap - * @param {number} rowGap - * @param {function} callback - * @return {composite} A new composite containing objects created in the callback - */ - Composites.pyramid = function(xx, yy, columns, rows, columnGap, rowGap, callback) { - return Composites.stack(xx, yy, columns, rows, columnGap, rowGap, function(x, y, column, row, lastBody, i) { - var actualRows = Math.min(rows, Math.ceil(columns / 2)), - lastBodyWidth = lastBody ? lastBody.bounds.max.x - lastBody.bounds.min.x : 0; - - if (row > actualRows) - return; - - // reverse row order - row = actualRows - row; - - var start = row, - end = columns - 1 - row; - - if (column < start || column > end) - return; - - // retroactively fix the first body's position, since width was unknown - if (i === 1) { - Body.translate(lastBody, { x: (column + (columns % 2 === 1 ? 1 : -1)) * lastBodyWidth, y: 0 }); - } - - var xOffset = lastBody ? column * lastBodyWidth : 0; - - return callback(xx + xOffset + column * columnGap, y, column, row, lastBody, i); - }); - }; - - /** - * Creates a composite with a Newton's Cradle setup of bodies and constraints. - * @method newtonsCradle - * @param {number} xx - * @param {number} yy - * @param {number} number - * @param {number} size - * @param {number} length - * @return {composite} A new composite newtonsCradle body - */ - Composites.newtonsCradle = function(xx, yy, number, size, length) { - var newtonsCradle = Composite.create({ label: 'Newtons Cradle' }); - - for (var i = 0; i < number; i++) { - var separation = 1.9, - circle = Bodies.circle(xx + i * (size * separation), yy + length, size, - { inertia: Infinity, restitution: 1, friction: 0, frictionAir: 0.0001, slop: 1 }), - constraint = Constraint.create({ pointA: { x: xx + i * (size * separation), y: yy }, bodyB: circle }); - - Composite.addBody(newtonsCradle, circle); - Composite.addConstraint(newtonsCradle, constraint); - } - - return newtonsCradle; - }; - - /** - * Creates a composite with simple car setup of bodies and constraints. - * @method car - * @param {number} xx - * @param {number} yy - * @param {number} width - * @param {number} height - * @param {number} wheelSize - * @return {composite} A new composite car body - */ - Composites.car = function(xx, yy, width, height, wheelSize) { - var group = Body.nextGroup(true), - wheelBase = 20, - wheelAOffset = -width * 0.5 + wheelBase, - wheelBOffset = width * 0.5 - wheelBase, - wheelYOffset = 0; - - var car = Composite.create({ label: 'Car' }), - body = Bodies.rectangle(xx, yy, width, height, { - collisionFilter: { - group: group - }, - chamfer: { - radius: height * 0.5 - }, - density: 0.0002 - }); - - var wheelA = Bodies.circle(xx + wheelAOffset, yy + wheelYOffset, wheelSize, { - collisionFilter: { - group: group - }, - friction: 0.8 - }); - - var wheelB = Bodies.circle(xx + wheelBOffset, yy + wheelYOffset, wheelSize, { - collisionFilter: { - group: group - }, - friction: 0.8 - }); - - var axelA = Constraint.create({ - bodyB: body, - pointB: { x: wheelAOffset, y: wheelYOffset }, - bodyA: wheelA, - stiffness: 1, - length: 0 - }); - - var axelB = Constraint.create({ - bodyB: body, - pointB: { x: wheelBOffset, y: wheelYOffset }, - bodyA: wheelB, - stiffness: 1, - length: 0 - }); - - Composite.addBody(car, body); - Composite.addBody(car, wheelA); - Composite.addBody(car, wheelB); - Composite.addConstraint(car, axelA); - Composite.addConstraint(car, axelB); - - return car; - }; - - /** - * Creates a simple soft body like object. - * @method softBody - * @param {number} xx - * @param {number} yy - * @param {number} columns - * @param {number} rows - * @param {number} columnGap - * @param {number} rowGap - * @param {boolean} crossBrace - * @param {number} particleRadius - * @param {} particleOptions - * @param {} constraintOptions - * @return {composite} A new composite softBody - */ - Composites.softBody = function(xx, yy, columns, rows, columnGap, rowGap, crossBrace, particleRadius, particleOptions, constraintOptions) { - particleOptions = Common.extend({ inertia: Infinity }, particleOptions); - constraintOptions = Common.extend({ stiffness: 0.2, render: { type: 'line', anchors: false } }, constraintOptions); - - var softBody = Composites.stack(xx, yy, columns, rows, columnGap, rowGap, function(x, y) { - return Bodies.circle(x, y, particleRadius, particleOptions); - }); - - Composites.mesh(softBody, columns, rows, crossBrace, constraintOptions); - - softBody.label = 'Soft Body'; - - return softBody; - }; - -})(); - - -/***/ }), -/* 487 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Joachim Grill - * @copyright 2018 CodeAndWeb GmbH - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Bodies = __webpack_require__(57); -var Body = __webpack_require__(25); -var Bounds = __webpack_require__(38); -var Common = __webpack_require__(18); -var GetFastValue = __webpack_require__(1); -var Vector = __webpack_require__(37); -var Vertices = __webpack_require__(31); - -/** - * Use PhysicsEditorParser.parseBody() to build a Matter body object, based on a physics data file - * created and exported with PhysicsEditor (https://www.codeandweb.com/physicseditor). - * - * @namespace Phaser.Physics.Matter.PhysicsEditorParser - * @since 3.10.0 - */ -var PhysicsEditorParser = { - - /** - * Parses a body element exported by PhysicsEditor. - * - * @function Phaser.Physics.Matter.PhysicsEditorParser.parseBody - * @since 3.10.0 - * - * @param {number} x - x position. - * @param {number} y - y position. - * @param {number} w - width. - * @param {number} h - height. - * @param {object} config - body configuration and fixture (child body) definitions. - * - * @return {object} A matter body, consisting of several parts (child bodies) - */ - parseBody: function (x, y, w, h, config) - { - var fixtureConfigs = GetFastValue(config, 'fixtures', []); - var fixtures = []; - - for (var fc = 0; fc < fixtureConfigs.length; fc++) - { - var fixtureParts = this.parseFixture(fixtureConfigs[fc]); - - for (var i = 0; i < fixtureParts.length; i++) - { - fixtures.push(fixtureParts[i]); - } - } - - var matterConfig = Common.extend({}, false, config); - - delete matterConfig.fixtures; - delete matterConfig.type; - - var body = Body.create(matterConfig); - - Body.setParts(body, fixtures); - body.render.sprite.xOffset = body.position.x / w; - body.render.sprite.yOffset = body.position.y / h; - Body.setPosition(body, { x: x, y: y }); - - return body; - }, - - - /** - * Parses an element of the "fixtures" list exported by PhysicsEditor - * - * @function Phaser.Physics.Matter.PhysicsEditorParser.parseFixture - * @since 3.10.0 - * - * @param {object} fixtureConfig - the fixture object to parse - * - * @return {object[]} - A list of matter bodies - */ - parseFixture: function (fixtureConfig) - { - var matterConfig = Common.extend({}, false, fixtureConfig); - - delete matterConfig.circle; - delete matterConfig.vertices; - - var fixtures; - - if (fixtureConfig.circle) - { - var x = GetFastValue(fixtureConfig.circle, 'x'); - var y = GetFastValue(fixtureConfig.circle, 'y'); - var r = GetFastValue(fixtureConfig.circle, 'radius'); - fixtures = [ Bodies.circle(x, y, r, matterConfig) ]; - } - else if (fixtureConfig.vertices) - { - fixtures = this.parseVertices(fixtureConfig.vertices, matterConfig); - } - - return fixtures; - }, - - /** - * Parses the "vertices" lists exported by PhysicsEditor. - * - * @function Phaser.Physics.Matter.PhysicsEditorParser.parseVertices - * @since 3.10.0 - * - * @param {object} vertexSets - The vertex lists to parse. - * @param {object} options - Matter body options. - * - * @return {object[]} - A list of matter bodies. - */ - parseVertices: function (vertexSets, options) - { - var i, j, k, v, z; - var parts = []; - - options = options || {}; - - for (v = 0; v < vertexSets.length; v += 1) - { - parts.push(Body.create(Common.extend({ - position: Vertices.centre(vertexSets[v]), - vertices: vertexSets[v] - }, options))); - } - - // flag coincident part edges - var coincidentMaxDist = 5; - - for (i = 0; i < parts.length; i++) - { - var partA = parts[i]; - - for (j = i + 1; j < parts.length; j++) - { - var partB = parts[j]; - - if (Bounds.overlaps(partA.bounds, partB.bounds)) - { - var pav = partA.vertices, - pbv = partB.vertices; - - // iterate vertices of both parts - for (k = 0; k < partA.vertices.length; k++) - { - for (z = 0; z < partB.vertices.length; z++) - { - // find distances between the vertices - var da = Vector.magnitudeSquared(Vector.sub(pav[(k + 1) % pav.length], pbv[z])), - db = Vector.magnitudeSquared(Vector.sub(pav[k], pbv[(z + 1) % pbv.length])); - - // if both vertices are very close, consider the edge concident (internal) - if (da < coincidentMaxDist && db < coincidentMaxDist) - { - pav[k].isInternal = true; - pbv[z].isInternal = true; - } - } - } - - } - } - } - - return parts; - } -}; - -module.exports = PhysicsEditorParser; - - -/***/ }), -/* 488 */ +/* 506 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Components = __webpack_require__(143); +var Components = __webpack_require__(147); var GameObject = __webpack_require__(14); var GetFastValue = __webpack_require__(1); -var Image = __webpack_require__(88); -var Pipeline = __webpack_require__(119); +var Image = __webpack_require__(89); +var Pipeline = __webpack_require__(121); var Vector2 = __webpack_require__(3); /** @@ -119280,12 +121978,12 @@ var Vector2 = __webpack_require__(3); * @extends Phaser.GameObjects.Components.Transform * @extends Phaser.GameObjects.Components.Visible * - * @param {Phaser.Physics.Matter.World} world - [description] + * @param {Phaser.Physics.Matter.World} world - A reference to the Matter.World instance that this body belongs to. * @param {number} x - The horizontal position of this Game Object in the world. * @param {number} y - The vertical position of this Game Object in the world. * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. - * @param {object} [options={}] - Matter.js configuration object. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. */ var MatterImage = new Class({ @@ -119318,7 +122016,7 @@ var MatterImage = new Class({ this.setOrigin(); /** - * [description] + * A reference to the Matter.World instance that this body belongs to. * * @name Phaser.Physics.Matter.Image#world * @type {Phaser.Physics.Matter.World} @@ -119327,7 +122025,7 @@ var MatterImage = new Class({ this.world = world; /** - * [description] + * An internal temp vector used for velocity and force calculations. * * @name Phaser.Physics.Matter.Image#_tempVec2 * @type {Phaser.Math.Vector2} @@ -119358,21 +122056,21 @@ module.exports = MatterImage; /***/ }), -/* 489 */ +/* 507 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AnimationComponent = __webpack_require__(269); +var AnimationComponent = __webpack_require__(288); var Class = __webpack_require__(0); -var Components = __webpack_require__(143); +var Components = __webpack_require__(147); var GameObject = __webpack_require__(14); var GetFastValue = __webpack_require__(1); -var Pipeline = __webpack_require__(119); +var Pipeline = __webpack_require__(121); var Sprite = __webpack_require__(65); var Vector2 = __webpack_require__(3); @@ -119420,12 +122118,12 @@ var Vector2 = __webpack_require__(3); * @extends Phaser.GameObjects.Components.Transform * @extends Phaser.GameObjects.Components.Visible * - * @param {Phaser.Physics.Matter.World} world - [description] + * @param {Phaser.Physics.Matter.World} world - A reference to the Matter.World instance that this body belongs to. * @param {number} x - The horizontal position of this Game Object in the world. * @param {number} y - The vertical position of this Game Object in the world. * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. - * @param {object} [options={}] - Matter.js configuration object. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. */ var MatterSprite = new Class({ @@ -119460,7 +122158,7 @@ var MatterSprite = new Class({ this.setOrigin(); /** - * [description] + * A reference to the Matter.World instance that this body belongs to. * * @name Phaser.Physics.Matter.Sprite#world * @type {Phaser.Physics.Matter.World} @@ -119469,7 +122167,7 @@ var MatterSprite = new Class({ this.world = world; /** - * [description] + * An internal temp vector used for velocity and force calculations. * * @name Phaser.Physics.Matter.Sprite#_tempVec2 * @type {Phaser.Math.Vector2} @@ -119500,7 +122198,7 @@ module.exports = MatterSprite; /***/ }), -/* 490 */ +/* 508 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119513,8 +122211,8 @@ var Matter = {}; module.exports = Matter; -var Plugin = __webpack_require__(236); -var Common = __webpack_require__(18); +var Plugin = __webpack_require__(240); +var Common = __webpack_require__(19); (function() { @@ -119592,855 +122290,149 @@ var Common = __webpack_require__(18); /***/ }), -/* 491 */ +/* 509 */ /***/ (function(module, exports, __webpack_require__) { /** -* The `Matter.Grid` module contains methods for creating and manipulating collision broadphase grid structures. +* The `Matter.Query` module contains methods for performing collision queries. * -* @class Grid +* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). +* +* @class Query */ -var Grid = {}; +var Query = {}; -module.exports = Grid; +module.exports = Query; -var Pair = __webpack_require__(144); -var Detector = __webpack_require__(233); -var Common = __webpack_require__(18); - -(function() { - - /** - * Creates a new grid. - * @method create - * @param {} options - * @return {grid} A new grid - */ - Grid.create = function(options) { - var defaults = { - controller: Grid, - detector: Detector.collisions, - buckets: {}, - pairs: {}, - pairsList: [], - bucketWidth: 48, - bucketHeight: 48 - }; - - return Common.extend(defaults, options); - }; - - /** - * The width of a single grid bucket. - * - * @property bucketWidth - * @type number - * @default 48 - */ - - /** - * The height of a single grid bucket. - * - * @property bucketHeight - * @type number - * @default 48 - */ - - /** - * Updates the grid. - * @method update - * @param {grid} grid - * @param {body[]} bodies - * @param {engine} engine - * @param {boolean} forceUpdate - */ - Grid.update = function(grid, bodies, engine, forceUpdate) { - var i, col, row, - world = engine.world, - buckets = grid.buckets, - bucket, - bucketId, - gridChanged = false; - - // @if DEBUG - var metrics = engine.metrics; - metrics.broadphaseTests = 0; - // @endif - - for (i = 0; i < bodies.length; i++) { - var body = bodies[i]; - - if (body.isSleeping && !forceUpdate) - continue; - - // don't update out of world bodies - if (body.bounds.max.x < world.bounds.min.x || body.bounds.min.x > world.bounds.max.x - || body.bounds.max.y < world.bounds.min.y || body.bounds.min.y > world.bounds.max.y) - continue; - - var newRegion = Grid._getRegion(grid, body); - - // if the body has changed grid region - if (!body.region || newRegion.id !== body.region.id || forceUpdate) { - - // @if DEBUG - metrics.broadphaseTests += 1; - // @endif - - if (!body.region || forceUpdate) - body.region = newRegion; - - var union = Grid._regionUnion(newRegion, body.region); - - // update grid buckets affected by region change - // iterate over the union of both regions - for (col = union.startCol; col <= union.endCol; col++) { - for (row = union.startRow; row <= union.endRow; row++) { - bucketId = Grid._getBucketId(col, row); - bucket = buckets[bucketId]; - - var isInsideNewRegion = (col >= newRegion.startCol && col <= newRegion.endCol - && row >= newRegion.startRow && row <= newRegion.endRow); - - var isInsideOldRegion = (col >= body.region.startCol && col <= body.region.endCol - && row >= body.region.startRow && row <= body.region.endRow); - - // remove from old region buckets - if (!isInsideNewRegion && isInsideOldRegion) { - if (isInsideOldRegion) { - if (bucket) - Grid._bucketRemoveBody(grid, bucket, body); - } - } - - // add to new region buckets - if (body.region === newRegion || (isInsideNewRegion && !isInsideOldRegion) || forceUpdate) { - if (!bucket) - bucket = Grid._createBucket(buckets, bucketId); - Grid._bucketAddBody(grid, bucket, body); - } - } - } - - // set the new region - body.region = newRegion; - - // flag changes so we can update pairs - gridChanged = true; - } - } - - // update pairs list only if pairs changed (i.e. a body changed region) - if (gridChanged) - grid.pairsList = Grid._createActivePairsList(grid); - }; - - /** - * Clears the grid. - * @method clear - * @param {grid} grid - */ - Grid.clear = function(grid) { - grid.buckets = {}; - grid.pairs = {}; - grid.pairsList = []; - }; - - /** - * Finds the union of two regions. - * @method _regionUnion - * @private - * @param {} regionA - * @param {} regionB - * @return {} region - */ - Grid._regionUnion = function(regionA, regionB) { - var startCol = Math.min(regionA.startCol, regionB.startCol), - endCol = Math.max(regionA.endCol, regionB.endCol), - startRow = Math.min(regionA.startRow, regionB.startRow), - endRow = Math.max(regionA.endRow, regionB.endRow); - - return Grid._createRegion(startCol, endCol, startRow, endRow); - }; - - /** - * Gets the region a given body falls in for a given grid. - * @method _getRegion - * @private - * @param {} grid - * @param {} body - * @return {} region - */ - Grid._getRegion = function(grid, body) { - var bounds = body.bounds, - startCol = Math.floor(bounds.min.x / grid.bucketWidth), - endCol = Math.floor(bounds.max.x / grid.bucketWidth), - startRow = Math.floor(bounds.min.y / grid.bucketHeight), - endRow = Math.floor(bounds.max.y / grid.bucketHeight); - - return Grid._createRegion(startCol, endCol, startRow, endRow); - }; - - /** - * Creates a region. - * @method _createRegion - * @private - * @param {} startCol - * @param {} endCol - * @param {} startRow - * @param {} endRow - * @return {} region - */ - Grid._createRegion = function(startCol, endCol, startRow, endRow) { - return { - id: startCol + ',' + endCol + ',' + startRow + ',' + endRow, - startCol: startCol, - endCol: endCol, - startRow: startRow, - endRow: endRow - }; - }; - - /** - * Gets the bucket id at the given position. - * @method _getBucketId - * @private - * @param {} column - * @param {} row - * @return {string} bucket id - */ - Grid._getBucketId = function(column, row) { - return 'C' + column + 'R' + row; - }; - - /** - * Creates a bucket. - * @method _createBucket - * @private - * @param {} buckets - * @param {} bucketId - * @return {} bucket - */ - Grid._createBucket = function(buckets, bucketId) { - var bucket = buckets[bucketId] = []; - return bucket; - }; - - /** - * Adds a body to a bucket. - * @method _bucketAddBody - * @private - * @param {} grid - * @param {} bucket - * @param {} body - */ - Grid._bucketAddBody = function(grid, bucket, body) { - // add new pairs - for (var i = 0; i < bucket.length; i++) { - var bodyB = bucket[i]; - - if (body.id === bodyB.id || (body.isStatic && bodyB.isStatic)) - continue; - - // keep track of the number of buckets the pair exists in - // important for Grid.update to work - var pairId = Pair.id(body, bodyB), - pair = grid.pairs[pairId]; - - if (pair) { - pair[2] += 1; - } else { - grid.pairs[pairId] = [body, bodyB, 1]; - } - } - - // add to bodies (after pairs, otherwise pairs with self) - bucket.push(body); - }; - - /** - * Removes a body from a bucket. - * @method _bucketRemoveBody - * @private - * @param {} grid - * @param {} bucket - * @param {} body - */ - Grid._bucketRemoveBody = function(grid, bucket, body) { - // remove from bucket - bucket.splice(Common.indexOf(bucket, body), 1); - - // update pair counts - for (var i = 0; i < bucket.length; i++) { - // keep track of the number of buckets the pair exists in - // important for _createActivePairsList to work - var bodyB = bucket[i], - pairId = Pair.id(body, bodyB), - pair = grid.pairs[pairId]; - - if (pair) - pair[2] -= 1; - } - }; - - /** - * Generates a list of the active pairs in the grid. - * @method _createActivePairsList - * @private - * @param {} grid - * @return [] pairs - */ - Grid._createActivePairsList = function(grid) { - var pairKeys, - pair, - pairs = []; - - // grid.pairs is used as a hashmap - pairKeys = Common.keys(grid.pairs); - - // iterate over grid.pairs - for (var k = 0; k < pairKeys.length; k++) { - pair = grid.pairs[pairKeys[k]]; - - // if pair exists in at least one bucket - // it is a pair that needs further collision testing so push it - if (pair[2] > 0) { - pairs.push(pair); - } else { - delete grid.pairs[pairKeys[k]]; - } - } - - return pairs; - }; - -})(); - - -/***/ }), -/* 492 */ -/***/ (function(module, exports, __webpack_require__) { - -/** -* The `Matter.Pairs` module contains methods for creating and manipulating collision pair sets. -* -* @class Pairs -*/ - -var Pairs = {}; - -module.exports = Pairs; - -var Pair = __webpack_require__(144); -var Common = __webpack_require__(18); - -(function() { - - Pairs._pairMaxIdleLife = 1000; - - /** - * Creates a new pairs structure. - * @method create - * @param {object} options - * @return {pairs} A new pairs structure - */ - Pairs.create = function(options) { - return Common.extend({ - table: {}, - list: [], - collisionStart: [], - collisionActive: [], - collisionEnd: [] - }, options); - }; - - /** - * Updates pairs given a list of collisions. - * @method update - * @param {object} pairs - * @param {collision[]} collisions - * @param {number} timestamp - */ - Pairs.update = function(pairs, collisions, timestamp) { - var pairsList = pairs.list, - pairsTable = pairs.table, - collisionStart = pairs.collisionStart, - collisionEnd = pairs.collisionEnd, - collisionActive = pairs.collisionActive, - collision, - pairId, - pair, - i; - - // clear collision state arrays, but maintain old reference - collisionStart.length = 0; - collisionEnd.length = 0; - collisionActive.length = 0; - - for (i = 0; i < pairsList.length; i++) { - pairsList[i].confirmedActive = false; - } - - for (i = 0; i < collisions.length; i++) { - collision = collisions[i]; - - if (collision.collided) { - pairId = Pair.id(collision.bodyA, collision.bodyB); - - pair = pairsTable[pairId]; - - if (pair) { - // pair already exists (but may or may not be active) - if (pair.isActive) { - // pair exists and is active - collisionActive.push(pair); - } else { - // pair exists but was inactive, so a collision has just started again - collisionStart.push(pair); - } - - // update the pair - Pair.update(pair, collision, timestamp); - pair.confirmedActive = true; - } else { - // pair did not exist, create a new pair - pair = Pair.create(collision, timestamp); - pairsTable[pairId] = pair; - - // push the new pair - collisionStart.push(pair); - pairsList.push(pair); - } - } - } - - // deactivate previously active pairs that are now inactive - for (i = 0; i < pairsList.length; i++) { - pair = pairsList[i]; - if (pair.isActive && !pair.confirmedActive) { - Pair.setActive(pair, false, timestamp); - collisionEnd.push(pair); - } - } - }; - - /** - * Finds and removes pairs that have been inactive for a set amount of time. - * @method removeOld - * @param {object} pairs - * @param {number} timestamp - */ - Pairs.removeOld = function(pairs, timestamp) { - var pairsList = pairs.list, - pairsTable = pairs.table, - indexesToRemove = [], - pair, - collision, - pairIndex, - i; - - for (i = 0; i < pairsList.length; i++) { - pair = pairsList[i]; - collision = pair.collision; - - // never remove sleeping pairs - if (collision.bodyA.isSleeping || collision.bodyB.isSleeping) { - pair.timeUpdated = timestamp; - continue; - } - - // if pair is inactive for too long, mark it to be removed - if (timestamp - pair.timeUpdated > Pairs._pairMaxIdleLife) { - indexesToRemove.push(i); - } - } - - // remove marked pairs - for (i = 0; i < indexesToRemove.length; i++) { - pairIndex = indexesToRemove[i] - i; - pair = pairsList[pairIndex]; - delete pairsTable[pair.id]; - pairsList.splice(pairIndex, 1); - } - }; - - /** - * Clears the given pairs structure. - * @method clear - * @param {pairs} pairs - * @return {pairs} pairs - */ - Pairs.clear = function(pairs) { - pairs.table = {}; - pairs.list.length = 0; - pairs.collisionStart.length = 0; - pairs.collisionActive.length = 0; - pairs.collisionEnd.length = 0; - return pairs; - }; - -})(); - - -/***/ }), -/* 493 */ -/***/ (function(module, exports, __webpack_require__) { - -/** -* The `Matter.Resolver` module contains methods for resolving collision pairs. -* -* @class Resolver -*/ - -var Resolver = {}; - -module.exports = Resolver; - -var Vertices = __webpack_require__(31); var Vector = __webpack_require__(37); -var Common = __webpack_require__(18); +var SAT = __webpack_require__(149); var Bounds = __webpack_require__(38); +var Bodies = __webpack_require__(42); +var Vertices = __webpack_require__(31); (function() { - Resolver._restingThresh = 4; - Resolver._restingThreshTangent = 6; - Resolver._positionDampen = 0.9; - Resolver._positionWarming = 0.8; - Resolver._frictionNormalMultiplier = 5; - /** - * Prepare pairs for position solving. - * @method preSolvePosition - * @param {pair[]} pairs + * Returns a list of collisions between `body` and `bodies`. + * @method collides + * @param {body} body + * @param {body[]} bodies + * @return {object[]} Collisions */ - Resolver.preSolvePosition = function(pairs) { - var i, - pair, - activeCount; + Query.collides = function(body, bodies) { + var collisions = []; - // find total contacts on each body - for (i = 0; i < pairs.length; i++) { - pair = pairs[i]; - - if (!pair.isActive) + for (var i = 0; i < bodies.length; i++) { + var bodyA = bodies[i]; + + // Phaser addition - skip same body checks + if (body === bodyA) + { continue; + } - activeCount = pair.activeContacts.length; - pair.collision.parentA.totalContacts += activeCount; - pair.collision.parentB.totalContacts += activeCount; + if (Bounds.overlaps(bodyA.bounds, body.bounds)) { + for (var j = bodyA.parts.length === 1 ? 0 : 1; j < bodyA.parts.length; j++) { + var part = bodyA.parts[j]; + + if (Bounds.overlaps(part.bounds, body.bounds)) { + var collision = SAT.collides(part, body); + + if (collision.collided) { + collisions.push(collision); + break; + } + } + } + } } + + return collisions; }; /** - * Find a solution for pair positions. - * @method solvePosition - * @param {pair[]} pairs + * Casts a ray segment against a set of bodies and returns all collisions, ray width is optional. Intersection points are not provided. + * @method ray * @param {body[]} bodies - * @param {number} timeScale + * @param {vector} startPoint + * @param {vector} endPoint + * @param {number} [rayWidth] + * @return {object[]} Collisions */ - Resolver.solvePosition = function(pairs, bodies, timeScale) { - var i, - normalX, - normalY, - pair, - collision, - bodyA, - bodyB, - normal, - separation, - penetration, - positionImpulseA, - positionImpulseB, - contactShare, - bodyBtoAX, - bodyBtoAY, - positionImpulse, - impulseCoefficient = timeScale * Resolver._positionDampen; + Query.ray = function(bodies, startPoint, endPoint, rayWidth) { + rayWidth = rayWidth || 1e-100; - for (i = 0; i < bodies.length; i++) { - var body = bodies[i]; - body.previousPositionImpulse.x = body.positionImpulse.x; - body.previousPositionImpulse.y = body.positionImpulse.y; + var rayAngle = Vector.angle(startPoint, endPoint), + rayLength = Vector.magnitude(Vector.sub(startPoint, endPoint)), + rayX = (endPoint.x + startPoint.x) * 0.5, + rayY = (endPoint.y + startPoint.y) * 0.5, + ray = Bodies.rectangle(rayX, rayY, rayLength, rayWidth, { angle: rayAngle }), + collisions = Query.collides(ray, bodies); + + for (var i = 0; i < collisions.length; i += 1) { + var collision = collisions[i]; + collision.body = collision.bodyB = collision.bodyA; } - // find impulses required to resolve penetration - for (i = 0; i < pairs.length; i++) { - pair = pairs[i]; - - if (!pair.isActive || pair.isSensor) - continue; - - collision = pair.collision; - bodyA = collision.parentA; - bodyB = collision.parentB; - normal = collision.normal; - - positionImpulseA = bodyA.previousPositionImpulse; - positionImpulseB = bodyB.previousPositionImpulse; - - penetration = collision.penetration; - - bodyBtoAX = positionImpulseB.x - positionImpulseA.x + penetration.x; - bodyBtoAY = positionImpulseB.y - positionImpulseA.y + penetration.y; - - normalX = normal.x; - normalY = normal.y; - - separation = normalX * bodyBtoAX + normalY * bodyBtoAY; - pair.separation = separation; - - positionImpulse = (separation - pair.slop) * impulseCoefficient; - - if (bodyA.isStatic || bodyB.isStatic) - positionImpulse *= 2; - - if (!(bodyA.isStatic || bodyA.isSleeping)) { - contactShare = positionImpulse / bodyA.totalContacts; - bodyA.positionImpulse.x += normalX * contactShare; - bodyA.positionImpulse.y += normalY * contactShare; - } - - if (!(bodyB.isStatic || bodyB.isSleeping)) { - contactShare = positionImpulse / bodyB.totalContacts; - bodyB.positionImpulse.x -= normalX * contactShare; - bodyB.positionImpulse.y -= normalY * contactShare; - } - } + return collisions; }; /** - * Apply position resolution. - * @method postSolvePosition + * Returns all bodies whose bounds are inside (or outside if set) the given set of bounds, from the given set of bodies. + * @method region * @param {body[]} bodies + * @param {bounds} bounds + * @param {bool} [outside=false] + * @return {body[]} The bodies matching the query */ - Resolver.postSolvePosition = function(bodies) { + Query.region = function(bodies, bounds, outside) { + var result = []; + + for (var i = 0; i < bodies.length; i++) { + var body = bodies[i], + overlaps = Bounds.overlaps(body.bounds, bounds); + if ((overlaps && !outside) || (!overlaps && outside)) + result.push(body); + } + + return result; + }; + + /** + * Returns all bodies whose vertices contain the given point, from the given set of bodies. + * @method point + * @param {body[]} bodies + * @param {vector} point + * @return {body[]} The bodies matching the query + */ + Query.point = function(bodies, point) { + var result = []; + for (var i = 0; i < bodies.length; i++) { var body = bodies[i]; - - // reset contact count - body.totalContacts = 0; - - if (body.positionImpulse.x !== 0 || body.positionImpulse.y !== 0) { - // update body geometry - for (var j = 0; j < body.parts.length; j++) { + + if (Bounds.contains(body.bounds, point)) { + for (var j = body.parts.length === 1 ? 0 : 1; j < body.parts.length; j++) { var part = body.parts[j]; - Vertices.translate(part.vertices, body.positionImpulse); - Bounds.update(part.bounds, part.vertices, body.velocity); - part.position.x += body.positionImpulse.x; - part.position.y += body.positionImpulse.y; - } - // move the body without changing velocity - body.positionPrev.x += body.positionImpulse.x; - body.positionPrev.y += body.positionImpulse.y; - - if (Vector.dot(body.positionImpulse, body.velocity) < 0) { - // reset cached impulse if the body has velocity along it - body.positionImpulse.x = 0; - body.positionImpulse.y = 0; - } else { - // warm the next iteration - body.positionImpulse.x *= Resolver._positionWarming; - body.positionImpulse.y *= Resolver._positionWarming; - } - } - } - }; - - /** - * Prepare pairs for velocity solving. - * @method preSolveVelocity - * @param {pair[]} pairs - */ - Resolver.preSolveVelocity = function(pairs) { - var i, - j, - pair, - contacts, - collision, - bodyA, - bodyB, - normal, - tangent, - contact, - contactVertex, - normalImpulse, - tangentImpulse, - offset, - impulse = Vector._temp[0], - tempA = Vector._temp[1]; - - for (i = 0; i < pairs.length; i++) { - pair = pairs[i]; - - if (!pair.isActive || pair.isSensor) - continue; - - contacts = pair.activeContacts; - collision = pair.collision; - bodyA = collision.parentA; - bodyB = collision.parentB; - normal = collision.normal; - tangent = collision.tangent; - - // resolve each contact - for (j = 0; j < contacts.length; j++) { - contact = contacts[j]; - contactVertex = contact.vertex; - normalImpulse = contact.normalImpulse; - tangentImpulse = contact.tangentImpulse; - - if (normalImpulse !== 0 || tangentImpulse !== 0) { - // total impulse from contact - impulse.x = (normal.x * normalImpulse) + (tangent.x * tangentImpulse); - impulse.y = (normal.y * normalImpulse) + (tangent.y * tangentImpulse); - - // apply impulse from contact - if (!(bodyA.isStatic || bodyA.isSleeping)) { - offset = Vector.sub(contactVertex, bodyA.position, tempA); - bodyA.positionPrev.x += impulse.x * bodyA.inverseMass; - bodyA.positionPrev.y += impulse.y * bodyA.inverseMass; - bodyA.anglePrev += Vector.cross(offset, impulse) * bodyA.inverseInertia; - } - - if (!(bodyB.isStatic || bodyB.isSleeping)) { - offset = Vector.sub(contactVertex, bodyB.position, tempA); - bodyB.positionPrev.x -= impulse.x * bodyB.inverseMass; - bodyB.positionPrev.y -= impulse.y * bodyB.inverseMass; - bodyB.anglePrev -= Vector.cross(offset, impulse) * bodyB.inverseInertia; + if (Bounds.contains(part.bounds, point) + && Vertices.contains(part.vertices, point)) { + result.push(body); + break; } } } } - }; - /** - * Find a solution for pair velocities. - * @method solveVelocity - * @param {pair[]} pairs - * @param {number} timeScale - */ - Resolver.solveVelocity = function(pairs, timeScale) { - var timeScaleSquared = timeScale * timeScale, - impulse = Vector._temp[0], - tempA = Vector._temp[1], - tempB = Vector._temp[2], - tempC = Vector._temp[3], - tempD = Vector._temp[4], - tempE = Vector._temp[5]; - - for (var i = 0; i < pairs.length; i++) { - var pair = pairs[i]; - - if (!pair.isActive || pair.isSensor) - continue; - - var collision = pair.collision, - bodyA = collision.parentA, - bodyB = collision.parentB, - normal = collision.normal, - tangent = collision.tangent, - contacts = pair.activeContacts, - contactShare = 1 / contacts.length; - - // update body velocities - bodyA.velocity.x = bodyA.position.x - bodyA.positionPrev.x; - bodyA.velocity.y = bodyA.position.y - bodyA.positionPrev.y; - bodyB.velocity.x = bodyB.position.x - bodyB.positionPrev.x; - bodyB.velocity.y = bodyB.position.y - bodyB.positionPrev.y; - bodyA.angularVelocity = bodyA.angle - bodyA.anglePrev; - bodyB.angularVelocity = bodyB.angle - bodyB.anglePrev; - - // resolve each contact - for (var j = 0; j < contacts.length; j++) { - var contact = contacts[j], - contactVertex = contact.vertex, - offsetA = Vector.sub(contactVertex, bodyA.position, tempA), - offsetB = Vector.sub(contactVertex, bodyB.position, tempB), - velocityPointA = Vector.add(bodyA.velocity, Vector.mult(Vector.perp(offsetA), bodyA.angularVelocity), tempC), - velocityPointB = Vector.add(bodyB.velocity, Vector.mult(Vector.perp(offsetB), bodyB.angularVelocity), tempD), - relativeVelocity = Vector.sub(velocityPointA, velocityPointB, tempE), - normalVelocity = Vector.dot(normal, relativeVelocity); - - var tangentVelocity = Vector.dot(tangent, relativeVelocity), - tangentSpeed = Math.abs(tangentVelocity), - tangentVelocityDirection = Common.sign(tangentVelocity); - - // raw impulses - var normalImpulse = (1 + pair.restitution) * normalVelocity, - normalForce = Common.clamp(pair.separation + normalVelocity, 0, 1) * Resolver._frictionNormalMultiplier; - - // coulomb friction - var tangentImpulse = tangentVelocity, - maxFriction = Infinity; - - if (tangentSpeed > pair.friction * pair.frictionStatic * normalForce * timeScaleSquared) { - maxFriction = tangentSpeed; - tangentImpulse = Common.clamp( - pair.friction * tangentVelocityDirection * timeScaleSquared, - -maxFriction, maxFriction - ); - } - - // modify impulses accounting for mass, inertia and offset - var oAcN = Vector.cross(offsetA, normal), - oBcN = Vector.cross(offsetB, normal), - share = contactShare / (bodyA.inverseMass + bodyB.inverseMass + bodyA.inverseInertia * oAcN * oAcN + bodyB.inverseInertia * oBcN * oBcN); - - normalImpulse *= share; - tangentImpulse *= share; - - // handle high velocity and resting collisions separately - if (normalVelocity < 0 && normalVelocity * normalVelocity > Resolver._restingThresh * timeScaleSquared) { - // high normal velocity so clear cached contact normal impulse - contact.normalImpulse = 0; - } else { - // solve resting collision constraints using Erin Catto's method (GDC08) - // impulse constraint tends to 0 - var contactNormalImpulse = contact.normalImpulse; - contact.normalImpulse = Math.min(contact.normalImpulse + normalImpulse, 0); - normalImpulse = contact.normalImpulse - contactNormalImpulse; - } - - // handle high velocity and resting collisions separately - if (tangentVelocity * tangentVelocity > Resolver._restingThreshTangent * timeScaleSquared) { - // high tangent velocity so clear cached contact tangent impulse - contact.tangentImpulse = 0; - } else { - // solve resting collision constraints using Erin Catto's method (GDC08) - // tangent impulse tends to -tangentSpeed or +tangentSpeed - var contactTangentImpulse = contact.tangentImpulse; - contact.tangentImpulse = Common.clamp(contact.tangentImpulse + tangentImpulse, -maxFriction, maxFriction); - tangentImpulse = contact.tangentImpulse - contactTangentImpulse; - } - - // total impulse from contact - impulse.x = (normal.x * normalImpulse) + (tangent.x * tangentImpulse); - impulse.y = (normal.y * normalImpulse) + (tangent.y * tangentImpulse); - - // apply impulse from contact - if (!(bodyA.isStatic || bodyA.isSleeping)) { - bodyA.positionPrev.x += impulse.x * bodyA.inverseMass; - bodyA.positionPrev.y += impulse.y * bodyA.inverseMass; - bodyA.anglePrev += Vector.cross(offsetA, impulse) * bodyA.inverseInertia; - } - - if (!(bodyB.isStatic || bodyB.isSleeping)) { - bodyB.positionPrev.x -= impulse.x * bodyB.inverseMass; - bodyB.positionPrev.y -= impulse.y * bodyB.inverseMass; - bodyB.anglePrev -= Vector.cross(offsetB, impulse) * bodyB.inverseInertia; - } - } - } + return result; }; })(); /***/ }), -/* 494 */ +/* 510 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120457,16 +122449,16 @@ var Engine = {}; module.exports = Engine; -var World = __webpack_require__(237); -var Sleeping = __webpack_require__(112); -var Resolver = __webpack_require__(493); -var Pairs = __webpack_require__(492); -var Metrics = __webpack_require__(1355); -var Grid = __webpack_require__(491); -var Events = __webpack_require__(94); -var Composite = __webpack_require__(77); -var Constraint = __webpack_require__(95); -var Common = __webpack_require__(18); +var World = __webpack_require__(241); +var Sleeping = __webpack_require__(95); +var Resolver = __webpack_require__(244); +var Pairs = __webpack_require__(243); +var Metrics = __webpack_require__(1370); +var Grid = __webpack_require__(242); +var Events = __webpack_require__(96); +var Composite = __webpack_require__(68); +var Constraint = __webpack_require__(78); +var Common = __webpack_require__(19); var Body = __webpack_require__(25); (function() { @@ -120507,26 +122499,6 @@ var Body = __webpack_require__(25); var engine = Common.extend(defaults, options); - // @deprecated - if (element || engine.render) { - var renderDefaults = { - element: element, - controller: Render - }; - - engine.render = Common.extend(renderDefaults, engine.render); - } - - // @deprecated - if (engine.render && engine.render.controller) { - engine.render = engine.render.controller.create(engine.render); - } - - // @deprecated - if (engine.render) { - engine.render.engine = engine; - } - engine.world = options.world || World.create(engine.world); engine.pairs = Pairs.create(); engine.broadphase = engine.broadphase.controller.create(engine.broadphase); @@ -120756,8 +122728,8 @@ var Body = __webpack_require__(25); continue; // apply gravity - body.force.y += body.mass * gravity.y * gravityScale; - body.force.x += body.mass * gravity.x * gravityScale; + body.force.x += (body.mass * gravity.x * gravityScale) * body.gravityScale.x; + body.force.y += (body.mass * gravity.y * gravityScale) * body.gravityScale.y; } }; @@ -120953,34 +122925,44 @@ var Body = __webpack_require__(25); /***/ }), -/* 495 */ +/* 511 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bodies = __webpack_require__(57); +var Bodies = __webpack_require__(42); var Body = __webpack_require__(25); var Class = __webpack_require__(0); -var Common = __webpack_require__(18); -var Composite = __webpack_require__(77); -var Engine = __webpack_require__(494); +var Common = __webpack_require__(19); +var Composite = __webpack_require__(68); +var Engine = __webpack_require__(510); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(231); +var Events = __webpack_require__(237); var GetFastValue = __webpack_require__(1); var GetValue = __webpack_require__(5); var MatterBody = __webpack_require__(25); -var MatterEvents = __webpack_require__(94); -var MatterTileBody = __webpack_require__(232); -var MatterWorld = __webpack_require__(237); +var MatterEvents = __webpack_require__(96); +var MatterTileBody = __webpack_require__(238); +var MatterWorld = __webpack_require__(241); var Vector = __webpack_require__(37); /** * @classdesc - * [description] + * The Matter World class is responsible for managing one single instance of a Matter Physics World for Phaser. + * + * Access this via `this.matter.world` from within a Scene. + * + * This class creates a Matter JS World Composite along with the Matter JS Engine during instantiation. It also + * handles delta timing, bounds, body and constraint creation and debug drawing. + * + * If you wish to access the Matter JS World object directly, see the `localWorld` property. + * If you wish to access the Matter Engine directly, see the `engine` property. + * + * This class is an Event Emitter and will proxy _all_ Matter JS events, as they are received. * * @class World * @extends Phaser.Events.EventEmitter @@ -121034,6 +123016,10 @@ var World = new Class({ { this.setGravity(gravity.x, gravity.y, gravity.scale); } + else if (gravity === false) + { + this.setGravity(0, 0, 0); + } /** * An object containing the 4 wall bodies that bound the physics world. @@ -121044,30 +123030,6 @@ var World = new Class({ */ this.walls = { left: null, right: null, top: null, bottom: null }; - if (GetFastValue(config, 'setBounds', false)) - { - var boundsConfig = config['setBounds']; - - if (typeof boundsConfig === 'boolean') - { - this.setBounds(); - } - else - { - var x = GetFastValue(boundsConfig, 'x', 0); - var y = GetFastValue(boundsConfig, 'y', 0); - var width = GetFastValue(boundsConfig, 'width', scene.sys.scale.width); - var height = GetFastValue(boundsConfig, 'height', scene.sys.scale.height); - var thickness = GetFastValue(boundsConfig, 'thickness', 64); - var left = GetFastValue(boundsConfig, 'left', true); - var right = GetFastValue(boundsConfig, 'right', true); - var top = GetFastValue(boundsConfig, 'top', true); - var bottom = GetFastValue(boundsConfig, 'bottom', true); - - this.setBounds(x, y, width, height, thickness, left, right, top, bottom); - } - } - /** * A flag that toggles if the world is enabled or not. * @@ -121082,7 +123044,7 @@ var World = new Class({ * The correction argument is an optional Number that specifies the time correction factor to apply to the update. * This can help improve the accuracy of the simulation in cases where delta is changing between updates. * The value of correction is defined as delta / lastDelta, i.e. the percentage change of delta over the last step. - * Therefore the value is always 1 (no correction) when delta constant (or when no correction is desired, which is the default). + * Therefore the value is always 1 (no correction) when delta is constant (or when no correction is desired, which is the default). * See the paper on Time Corrected Verlet for more information. * * @name Phaser.Physics.Matter.World#correction @@ -121122,6 +123084,47 @@ var World = new Class({ */ this.getDelta = GetValue(config, 'getDelta', this.update60Hz); + var runnerConfig = GetFastValue(config, 'runner', {}); + + var hasFPS = GetFastValue(runnerConfig, 'fps', false); + + var fps = GetFastValue(runnerConfig, 'fps', 60); + + var delta = GetFastValue(runnerConfig, 'delta', 1000 / fps); + var deltaMin = GetFastValue(runnerConfig, 'deltaMin', 1000 / fps); + var deltaMax = GetFastValue(runnerConfig, 'deltaMax', 1000 / (fps * 0.5)); + + if (!hasFPS) + { + fps = 1000 / delta; + } + + /** + * The Matter JS Runner Configuration object. + * + * This object is populated via the Matter Configuration object's `runner` property and is + * updated constantly during the game step. + * + * @name Phaser.Physics.Matter.World#runner + * @type {Phaser.Types.Physics.Matter.MatterRunnerConfig} + * @since 3.22.0 + */ + this.runner = { + fps: fps, + correction: GetFastValue(runnerConfig, 'correction', 1), + deltaSampleSize: GetFastValue(runnerConfig, 'deltaSampleSize', 60), + counterTimestamp: 0, + frameCounter: 0, + deltaHistory: [], + timePrev: null, + timeScalePrev: 1, + frameRequestId: null, + isFixed: GetFastValue(runnerConfig, 'isFixed', false), + delta: delta, + deltaMin: deltaMin, + deltaMax: deltaMax + }; + /** * Automatically call Engine.update every time the game steps. * If you disable this then you are responsible for calling `World.step` directly from your game. @@ -121134,6 +123137,8 @@ var World = new Class({ */ this.autoUpdate = GetValue(config, 'autoUpdate', true); + var debugConfig = GetValue(config, 'debug', false); + /** * A flag that controls if the debug graphics will be drawn to or not. * @@ -121142,7 +123147,7 @@ var World = new Class({ * @default false * @since 3.0.0 */ - this.drawDebug = GetValue(config, 'debug', false); + this.drawDebug = (typeof(debugConfig) === 'object') ? true : debugConfig; /** * An instance of the Graphics object the debug bodies are drawn to, if enabled. @@ -121154,27 +123159,85 @@ var World = new Class({ this.debugGraphic; /** - * The default configuration values. + * The debug configuration object. + * + * The values stored in this object are read from the Matter World Config `debug` property. + * + * When a new Body or Constraint is _added to the World_, they are given the values stored in this object, + * unless they have their own `render` object set that will override them. + * + * Note that while you can modify the values of properties in this object at run-time, it will not change + * any of the Matter objects _already added_. It will only impact objects newly added to the world, or one + * that is removed and then re-added at a later time. * - * @name Phaser.Physics.Matter.World#defaults - * @type {object} - * @since 3.0.0 + * @name Phaser.Physics.Matter.World#debugConfig + * @type {Phaser.Types.Physics.Matter.MatterDebugConfig} + * @since 3.22.0 */ - this.defaults = { - debugShowBody: GetFastValue(config, 'debugShowBody', true), - debugShowStaticBody: GetFastValue(config, 'debugShowStaticBody', true), - debugShowVelocity: GetFastValue(config, 'debugShowVelocity', true), - bodyDebugColor: GetFastValue(config, 'debugBodyColor', 0xff00ff), - bodyDebugFillColor: GetFastValue(config, 'debugBodyFillColor', 0xe3a7e3), - staticBodyDebugColor: GetFastValue(config, 'debugStaticBodyColor', 0x0000ff), - velocityDebugColor: GetFastValue(config, 'debugVelocityColor', 0x00ff00), - debugShowJoint: GetFastValue(config, 'debugShowJoint', true), - jointDebugColor: GetFastValue(config, 'debugJointColor', 0x000000), - debugWireframes: GetFastValue(config, 'debugWireframes', true), - debugShowInternalEdges: GetFastValue(config, 'debugShowInternalEdges', false), - debugShowConvexHulls: GetFastValue(config, 'debugShowConvexHulls', false), - debugConvexHullColor: GetFastValue(config, 'debugConvexHullColor', 0xaaaaaa), - debugShowSleeping: GetFastValue(config, 'debugShowSleeping', false) + this.debugConfig = { + showAxes: GetFastValue(debugConfig, 'showAxes', false), + showAngleIndicator: GetFastValue(debugConfig, 'showAngleIndicator', false), + angleColor: GetFastValue(debugConfig, 'angleColor', 0xe81153), + + showBroadphase: GetFastValue(debugConfig, 'showBroadphase', false), + broadphaseColor: GetFastValue(debugConfig, 'broadphaseColor', 0xffb400), + + showBounds: GetFastValue(debugConfig, 'showBounds', false), + boundsColor: GetFastValue(debugConfig, 'boundsColor', 0xffffff), + + showVelocity: GetFastValue(debugConfig, 'showVelocity', false), + velocityColor: GetFastValue(debugConfig, 'velocityColor', 0x00aeef), + + showCollisions: GetFastValue(debugConfig, 'showCollisions', false), + collisionColor: GetFastValue(debugConfig, 'collisionColor', 0xf5950c), + + showSeparations: GetFastValue(debugConfig, 'showSeparations', false), + separationColor: GetFastValue(debugConfig, 'separationColor', 0xffa500), + + showBody: GetFastValue(debugConfig, 'showBody', true), + showStaticBody: GetFastValue(debugConfig, 'showStaticBody', true), + showInternalEdges: GetFastValue(debugConfig, 'showInternalEdges', false), + + renderFill: GetFastValue(debugConfig, 'renderFill', false), + renderLine: GetFastValue(debugConfig, 'renderLine', true), + + fillColor: GetFastValue(debugConfig, 'fillColor', 0x106909), + fillOpacity: GetFastValue(debugConfig, 'fillOpacity', 1), + lineColor: GetFastValue(debugConfig, 'lineColor', 0x28de19), + lineOpacity: GetFastValue(debugConfig, 'lineOpacity', 1), + lineThickness: GetFastValue(debugConfig, 'lineThickness', 1), + + staticFillColor: GetFastValue(debugConfig, 'staticFillColor', 0x0d177b), + staticLineColor: GetFastValue(debugConfig, 'staticLineColor', 0x1327e4), + + showSleeping: GetFastValue(debugConfig, 'showSleeping', false), + staticBodySleepOpacity: GetFastValue(debugConfig, 'staticBodySleepOpacity', 0.7), + sleepFillColor: GetFastValue(debugConfig, 'sleepFillColor', 0x464646), + sleepLineColor: GetFastValue(debugConfig, 'sleepLineColor', 0x999a99), + + showSensors: GetFastValue(debugConfig, 'showSensors', true), + sensorFillColor: GetFastValue(debugConfig, 'sensorFillColor', 0x0d177b), + sensorLineColor: GetFastValue(debugConfig, 'sensorLineColor', 0x1327e4), + + showPositions: GetFastValue(debugConfig, 'showPositions', true), + positionSize: GetFastValue(debugConfig, 'positionSize', 4), + positionColor: GetFastValue(debugConfig, 'positionColor', 0xe042da), + + showJoint: GetFastValue(debugConfig, 'showJoint', true), + jointColor: GetFastValue(debugConfig, 'jointColor', 0xe0e042), + jointLineOpacity: GetFastValue(debugConfig, 'jointLineOpacity', 1), + jointLineThickness: GetFastValue(debugConfig, 'jointLineThickness', 2), + + pinSize: GetFastValue(debugConfig, 'pinSize', 4), + pinColor: GetFastValue(debugConfig, 'pinColor', 0x42e0e0), + + springColor: GetFastValue(debugConfig, 'springColor', 0xe042e0), + + anchorColor: GetFastValue(debugConfig, 'anchorColor', 0xefefef), + anchorSize: GetFastValue(debugConfig, 'anchorSize', 4), + + showConvexHulls: GetFastValue(debugConfig, 'showConvexHulls', false), + hullColor: GetFastValue(debugConfig, 'hullColor', 0xd703d0) }; if (this.drawDebug) @@ -121183,10 +123246,284 @@ var World = new Class({ } this.setEventsProxy(); + + // Create the walls + + if (GetFastValue(config, 'setBounds', false)) + { + var boundsConfig = config['setBounds']; + + if (typeof boundsConfig === 'boolean') + { + this.setBounds(); + } + else + { + var x = GetFastValue(boundsConfig, 'x', 0); + var y = GetFastValue(boundsConfig, 'y', 0); + var width = GetFastValue(boundsConfig, 'width', scene.sys.scale.width); + var height = GetFastValue(boundsConfig, 'height', scene.sys.scale.height); + var thickness = GetFastValue(boundsConfig, 'thickness', 64); + var left = GetFastValue(boundsConfig, 'left', true); + var right = GetFastValue(boundsConfig, 'right', true); + var top = GetFastValue(boundsConfig, 'top', true); + var bottom = GetFastValue(boundsConfig, 'bottom', true); + + this.setBounds(x, y, width, height, thickness, left, right, top, bottom); + } + } }, /** - * [description] + * Sets the debug render style for the children of the given Matter Composite. + * + * Composites themselves do not render, but they can contain bodies, constraints and other composites that may do. + * So the children of this composite are passed to the `setBodyRenderStyle`, `setCompositeRenderStyle` and + * `setConstraintRenderStyle` methods accordingly. + * + * @method Phaser.Physics.Matter.World#setCompositeRenderStyle + * @since 3.22.0 + * + * @param {MatterJS.CompositeType} composite - The Matter Composite to set the render style on. + * + * @return {this} This Matter World instance for method chaining. + */ + setCompositeRenderStyle: function (composite) + { + var bodies = composite.bodies; + var constraints = composite.constraints; + var composites = composite.composites; + + var i; + var obj; + var render; + + for (i = 0; i < bodies.length; i++) + { + obj = bodies[i]; + render = obj.render; + + this.setBodyRenderStyle(obj, render.lineColor, render.lineOpacity, render.lineThickness, render.fillColor, render.fillOpacity); + } + + for (i = 0; i < constraints.length; i++) + { + obj = constraints[i]; + render = obj.render; + + this.setConstraintRenderStyle(obj, render.lineColor, render.lineOpacity, render.lineThickness, render.pinSize, render.anchorColor, render.anchorSize); + } + + for (i = 0; i < composites.length; i++) + { + obj = composites[i]; + + this.setCompositeRenderStyle(obj); + } + + return this; + }, + + /** + * Sets the debug render style for the given Matter Body. + * + * If you are using this on a Phaser Game Object, such as a Matter Sprite, then pass in the body property + * to this method, not the Game Object itself. + * + * If you wish to skip a parameter, so it retains its current value, pass `false` for it. + * + * If you wish to reset the Body render colors to the defaults found in the World Debug Config, then call + * this method with just the `body` parameter provided and no others. + * + * @method Phaser.Physics.Matter.World#setBodyRenderStyle + * @since 3.22.0 + * + * @param {MatterJS.BodyType} body - The Matter Body to set the render style on. + * @param {number} [lineColor] - The line color. If `null` it will use the World Debug Config value. + * @param {number} [lineOpacity] - The line opacity, between 0 and 1. If `null` it will use the World Debug Config value. + * @param {number} [lineThickness] - The line thickness. If `null` it will use the World Debug Config value. + * @param {number} [fillColor] - The fill color. If `null` it will use the World Debug Config value. + * @param {number} [fillOpacity] - The fill opacity, between 0 and 1. If `null` it will use the World Debug Config value. + * + * @return {this} This Matter World instance for method chaining. + */ + setBodyRenderStyle: function (body, lineColor, lineOpacity, lineThickness, fillColor, fillOpacity) + { + var render = body.render; + var config = this.debugConfig; + + if (!render) + { + return this; + } + + if (lineColor === undefined || lineColor === null) + { + lineColor = (body.isStatic) ? config.staticLineColor : config.lineColor; + } + + if (lineOpacity === undefined || lineOpacity === null) + { + lineOpacity = config.lineOpacity; + } + + if (lineThickness === undefined || lineThickness === null) + { + lineThickness = config.lineThickness; + } + + if (fillColor === undefined || fillColor === null) + { + fillColor = (body.isStatic) ? config.staticFillColor : config.fillColor; + } + + if (fillOpacity === undefined || fillOpacity === null) + { + fillOpacity = config.fillOpacity; + } + + if (lineColor !== false) + { + render.lineColor = lineColor; + } + + if (lineOpacity !== false) + { + render.lineOpacity = lineOpacity; + } + + if (lineThickness !== false) + { + render.lineThickness = lineThickness; + } + + if (fillColor !== false) + { + render.fillColor = fillColor; + } + + if (fillOpacity !== false) + { + render.fillOpacity = fillOpacity; + } + + return this; + }, + + /** + * Sets the debug render style for the given Matter Constraint. + * + * If you are using this on a Phaser Game Object, then pass in the body property + * to this method, not the Game Object itself. + * + * If you wish to skip a parameter, so it retains its current value, pass `false` for it. + * + * If you wish to reset the Constraint render colors to the defaults found in the World Debug Config, then call + * this method with just the `constraint` parameter provided and no others. + * + * @method Phaser.Physics.Matter.World#setConstraintRenderStyle + * @since 3.22.0 + * + * @param {MatterJS.ConstraintType} constraint - The Matter Constraint to set the render style on. + * @param {number} [lineColor] - The line color. If `null` it will use the World Debug Config value. + * @param {number} [lineOpacity] - The line opacity, between 0 and 1. If `null` it will use the World Debug Config value. + * @param {number} [lineThickness] - The line thickness. If `null` it will use the World Debug Config value. + * @param {number} [pinSize] - If this constraint is a pin, this sets the size of the pin circle. If `null` it will use the World Debug Config value. + * @param {number} [anchorColor] - The color used when rendering this constraints anchors. If `null` it will use the World Debug Config value. + * @param {number} [anchorSize] - The size of the anchor circle, if this constraint has anchors. If `null` it will use the World Debug Config value. + * + * @return {this} This Matter World instance for method chaining. + */ + setConstraintRenderStyle: function (constraint, lineColor, lineOpacity, lineThickness, pinSize, anchorColor, anchorSize) + { + var render = constraint.render; + var config = this.debugConfig; + + if (!render) + { + return this; + } + + // Reset them + if (lineColor === undefined || lineColor === null) + { + var type = render.type; + + if (type === 'line') + { + lineColor = config.jointColor; + } + else if (type === 'pin') + { + lineColor = config.pinColor; + } + else if (type === 'spring') + { + lineColor = config.springColor; + } + } + + if (lineOpacity === undefined || lineOpacity === null) + { + lineOpacity = config.jointLineOpacity; + } + + if (lineThickness === undefined || lineThickness === null) + { + lineThickness = config.jointLineThickness; + } + + if (pinSize === undefined || pinSize === null) + { + pinSize = config.pinSize; + } + + if (anchorColor === undefined || anchorColor === null) + { + anchorColor = config.anchorColor; + } + + if (anchorSize === undefined || anchorSize === null) + { + anchorSize = config.anchorSize; + } + + if (lineColor !== false) + { + render.lineColor = lineColor; + } + + if (lineOpacity !== false) + { + render.lineOpacity = lineOpacity; + } + + if (lineThickness !== false) + { + render.lineThickness = lineThickness; + } + + if (pinSize !== false) + { + render.pinSize = pinSize; + } + + if (anchorColor !== false) + { + render.anchorColor = anchorColor; + } + + if (anchorSize !== false) + { + render.anchorSize = anchorSize; + } + + return this; + }, + + /** + * This internal method acts as a proxy between all of the Matter JS events and then re-emits them + * via this class. * * @method Phaser.Physics.Matter.World#setEventsProxy * @since 3.0.0 @@ -121195,6 +123532,61 @@ var World = new Class({ { var _this = this; var engine = this.engine; + var world = this.localWorld; + + // Inject debug styles + + if (this.drawDebug) + { + MatterEvents.on(world, 'compositeModified', function (composite) + { + _this.setCompositeRenderStyle(composite); + }); + + MatterEvents.on(world, 'beforeAdd', function (event) + { + var objects = [].concat(event.object); + + for (var i = 0; i < objects.length; i++) + { + var obj = objects[i]; + var render = obj.render; + + if (obj.type === 'body') + { + _this.setBodyRenderStyle(obj, render.lineColor, render.lineOpacity, render.lineThickness, render.fillColor, render.fillOpacity); + } + else if (obj.type === 'composite') + { + _this.setCompositeRenderStyle(obj); + } + else if (obj.type === 'constraint') + { + _this.setConstraintRenderStyle(obj, render.lineColor, render.lineOpacity, render.lineThickness, render.pinSize, render.anchorColor, render.anchorSize); + } + } + }); + } + + MatterEvents.on(world, 'beforeAdd', function (event) + { + _this.emit(Events.BEFORE_ADD, event); + }); + + MatterEvents.on(world, 'afterAdd', function (event) + { + _this.emit(Events.AFTER_ADD, event); + }); + + MatterEvents.on(world, 'beforeRemove', function (event) + { + _this.emit(Events.BEFORE_REMOVE, event); + }); + + MatterEvents.on(world, 'afterRemove', function (event) + { + _this.emit(Events.AFTER_REMOVE, event); + }); MatterEvents.on(engine, 'beforeUpdate', function (event) { @@ -121267,7 +123659,7 @@ var World = new Class({ * @param {number} [y=0] - The y coordinate of the top-left corner of the bounds. * @param {number} [width] - The width of the bounds. * @param {number} [height] - The height of the bounds. - * @param {number} [thickness=128] - The thickness of each wall, in pixels. + * @param {number} [thickness=64] - The thickness of each wall, in pixels. * @param {boolean} [left=true] - If true will create the left bounds wall. * @param {boolean} [right=true] - If true will create the right bounds wall. * @param {boolean} [top=true] - If true will create the top bounds wall. @@ -121281,7 +123673,7 @@ var World = new Class({ if (y === undefined) { y = 0; } if (width === undefined) { width = this.scene.sys.scale.width; } if (height === undefined) { height = this.scene.sys.scale.height; } - if (thickness === undefined) { thickness = 128; } + if (thickness === undefined) { thickness = 64; } if (left === undefined) { left = true; } if (right === undefined) { right = true; } if (top === undefined) { top = true; } @@ -121295,19 +123687,19 @@ var World = new Class({ return this; }, - // position = 'left', 'right', 'top' or 'bottom' /** - * [description] + * Updates the 4 rectangle bodies that were created, if `setBounds` was set in the Matter config, to use + * the new positions and sizes. This method is usually only called internally via the `setBounds` method. * * @method Phaser.Physics.Matter.World#updateWall * @since 3.0.0 * - * @param {boolean} add - [description] - * @param {string} position - [description] - * @param {number} x - [description] - * @param {number} y - [description] - * @param {number} width - [description] - * @param {number} height - [description] + * @param {boolean} add - `true` if the walls are being added or updated, `false` to remove them from the world. + * @param {string} [position] - Either `left`, `right`, `top` or `bottom`. Only optional if `add` is `false`. + * @param {number} [x] - The horizontal position to place the walls at. Only optional if `add` is `false`. + * @param {number} [y] - The vertical position to place the walls at. Only optional if `add` is `false`. + * @param {number} [width] - The width of the walls, in pixels. Only optional if `add` is `false`. + * @param {number} [height] - The height of the walls, in pixels. Only optional if `add` is `false`. */ updateWall: function (add, position, x, y, width, height) { @@ -121338,12 +123730,19 @@ var World = new Class({ }, /** - * [description] + * Creates a Phaser.GameObjects.Graphics object that is used to render all of the debug bodies and joints to. + * + * This method is called automatically by the constructor, if debugging has been enabled. + * + * The created Graphics object is automatically added to the Scene at 0x0 and given a depth of `Number.MAX_VALUE`, + * so it renders above all else in the Scene. + * + * The Graphics object is assigned to the `debugGraphic` property of this class and `drawDebug` is enabled. * * @method Phaser.Physics.Matter.World#createDebugGraphic * @since 3.0.0 * - * @return {Phaser.GameObjects.Graphics} [description] + * @return {Phaser.GameObjects.Graphics} The newly created Graphics object. */ createDebugGraphic: function () { @@ -121359,12 +123758,12 @@ var World = new Class({ }, /** - * Sets the world's gravity and gravity scale to 0. + * Sets the world gravity and gravity scale to 0. * * @method Phaser.Physics.Matter.World#disableGravity * @since 3.0.0 * - * @return {Phaser.Physics.Matter.World} This Matter World object. + * @return {this} This Matter World object. */ disableGravity: function () { @@ -121376,16 +123775,18 @@ var World = new Class({ }, /** - * Sets the world's gravity + * Sets the worlds gravity to the values given. + * + * Gravity effects all bodies in the world, unless they have the `ignoreGravity` flag set. * * @method Phaser.Physics.Matter.World#setGravity * @since 3.0.0 * * @param {number} [x=0] - The world gravity x component. * @param {number} [y=1] - The world gravity y component. - * @param {number} [scale] - [description] + * @param {number} [scale=0.001] - The gravity scale factor. * - * @return {Phaser.Physics.Matter.World} This Matter World object. + * @return {this} This Matter World object. */ setGravity: function (x, y, scale) { @@ -121415,7 +123816,7 @@ var World = new Class({ * @param {number} height - The height of the body. * @param {object} options - Optional Matter configuration object. * - * @return {MatterJS.Body} The Matter.js body that was created. + * @return {MatterJS.BodyType} The Matter.js body that was created. */ create: function (x, y, width, height, options) { @@ -121427,14 +123828,18 @@ var World = new Class({ }, /** - * Adds an object to the world. + * Adds a Matter JS object, or array of objects, to the world. + * + * The objects should be valid Matter JS entities, such as a Body, Composite or Constraint. + * + * Triggers `beforeAdd` and `afterAdd` events. * * @method Phaser.Physics.Matter.World#add * @since 3.0.0 * - * @param {(object|object[])} object - Can be single or an array, and can be a body, composite or constraint + * @param {(object|object[])} object - Can be single object, or an array, and can be a body, composite or constraint. * - * @return {Phaser.Physics.Matter.World} This Matter World object. + * @return {this} This Matter World object. */ add: function (object) { @@ -121444,35 +123849,51 @@ var World = new Class({ }, /** - * [description] + * Removes a Matter JS object, or array of objects, from the world. + * + * The objects should be valid Matter JS entities, such as a Body, Composite or Constraint. + * + * Triggers `beforeRemove` and `afterRemove` events. * * @method Phaser.Physics.Matter.World#remove * @since 3.0.0 * - * @param {object} object - The object to be removed from the world. - * @param {boolean} deep - [description] + * @param {(object|object[])} object - Can be single object, or an array, and can be a body, composite or constraint. + * @param {boolean} [deep=false] - Optionally search the objects children and recursively remove those as well. * - * @return {Phaser.Physics.Matter.World} This Matter World object. + * @return {this} This Matter World object. */ remove: function (object, deep) { - var body = (object.body) ? object.body : object; + if (!Array.isArray(object)) + { + object = [ object ]; + } - Composite.remove(this.localWorld, body, deep); + for (var i = 0; i < object.length; i++) + { + var entity = object[i]; + + var body = (entity.body) ? entity.body : entity; + + Composite.remove(this.localWorld, body, deep); + } return this; }, /** - * [description] + * Removes a Matter JS constraint, or array of constraints, from the world. + * + * Triggers `beforeRemove` and `afterRemove` events. * * @method Phaser.Physics.Matter.World#removeConstraint * @since 3.0.0 * - * @param {MatterJS.Constraint} constraint - [description] - * @param {boolean} deep - [description] + * @param {(MatterJS.ConstraintType|MatterJS.ConstraintType[])} constraint - A Matter JS Constraint, or an array of constraints, to be removed. + * @param {boolean} [deep=false] - Optionally search the objects children and recursively remove those as well. * - * @return {Phaser.Physics.Matter.World} This Matter World object. + * @return {this} This Matter World object. */ removeConstraint: function (constraint, deep) { @@ -121482,17 +123903,18 @@ var World = new Class({ }, /** - * Adds MatterTileBody instances for all the colliding tiles within the given tilemap layer. Set - * the appropriate tiles in your layer to collide before calling this method! + * Adds `MatterTileBody` instances for all the colliding tiles within the given tilemap layer. + * + * Set the appropriate tiles in your layer to collide before calling this method! * * @method Phaser.Physics.Matter.World#convertTilemapLayer * @since 3.0.0 * * @param {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} tilemapLayer - * An array of tiles. - * @param {object} [options] - Options to be passed to the MatterTileBody constructor. {@ee Phaser.Physics.Matter.TileBody} + * @param {object} [options] - Options to be passed to the MatterTileBody constructor. {@see Phaser.Physics.Matter.TileBody} * - * @return {Phaser.Physics.Matter.World} This Matter World object. + * @return {this} This Matter World object. */ convertTilemapLayer: function (tilemapLayer, options) { @@ -121505,7 +123927,7 @@ var World = new Class({ }, /** - * Adds MatterTileBody instances for the given tiles. This adds bodies regardless of whether the + * Adds `MatterTileBody` instances for the given tiles. This adds bodies regardless of whether the * tiles are set to collide or not. * * @method Phaser.Physics.Matter.World#convertTiles @@ -121514,7 +123936,7 @@ var World = new Class({ * @param {Phaser.Tilemaps.Tile[]} tiles - An array of tiles. * @param {object} [options] - Options to be passed to the MatterTileBody constructor. {@see Phaser.Physics.Matter.TileBody} * - * @return {Phaser.Physics.Matter.World} This Matter World object. + * @return {this} This Matter World object. */ convertTiles: function (tiles, options) { @@ -121532,14 +123954,15 @@ var World = new Class({ }, /** - * [description] + * Returns the next unique group index for which bodies will collide. + * If `isNonColliding` is `true`, returns the next unique group index for which bodies will not collide. * * @method Phaser.Physics.Matter.World#nextGroup * @since 3.0.0 * - * @param {boolean} isNonColliding - [description] + * @param {boolean} [isNonColliding=false] - If `true`, returns the next unique group index for which bodies will _not_ collide. * - * @return {number} [description] + * @return {number} Unique category bitfield */ nextGroup: function (isNonColliding) { @@ -121547,12 +123970,13 @@ var World = new Class({ }, /** - * [description] + * Returns the next unique category bitfield (starting after the initial default category 0x0001). + * There are 32 available. * * @method Phaser.Physics.Matter.World#nextCategory * @since 3.0.0 * - * @return {number} Returns the next unique category bitfield. + * @return {number} Unique category bitfield */ nextCategory: function () { @@ -121560,13 +123984,15 @@ var World = new Class({ }, /** - * [description] + * Pauses this Matter World instance and sets `enabled` to `false`. + * + * A paused world will not run any simulations for the duration it is paused. * * @method Phaser.Physics.Matter.World#pause * @fires Phaser.Physics.Matter.Events#PAUSE * @since 3.0.0 * - * @return {Phaser.Physics.Matter.World} This Matter World object. + * @return {this} This Matter World object. */ pause: function () { @@ -121578,13 +124004,13 @@ var World = new Class({ }, /** - * [description] + * Resumes this Matter World instance from a paused state and sets `enabled` to `true`. * * @method Phaser.Physics.Matter.World#resume * @fires Phaser.Physics.Matter.Events#RESUME * @since 3.0.0 * - * @return {Phaser.Physics.Matter.World} This Matter World object. + * @return {this} This Matter World object. */ resume: function () { @@ -121596,7 +124022,18 @@ var World = new Class({ }, /** - * [description] + * The internal update method. This is called automatically by the parent Scene. + * + * Moves the simulation forward in time by delta ms. Uses `World.correction` value as an optional number that + * specifies the time correction factor to apply to the update. This can help improve the accuracy of the + * simulation in cases where delta is changing between updates. The value of correction is defined as `delta / lastDelta`, + * i.e. the percentage change of delta over the last step. Therefore the value is always 1 (no correction) when + * delta is constant (or when no correction is desired, which is the default). + * See the paper on Time Corrected Verlet for more information. + * + * Triggers `beforeUpdate` and `afterUpdate` events. Triggers `collisionStart`, `collisionActive` and `collisionEnd` events. + * + * If the World is paused, `update` is still run, but exits early and does not update the Matter Engine. * * @method Phaser.Physics.Matter.World#update * @since 3.0.0 @@ -121606,10 +124043,69 @@ var World = new Class({ */ update: function (time, delta) { - if (this.enabled && this.autoUpdate) + if (!this.enabled || !this.autoUpdate) { - Engine.update(this.engine, this.getDelta(time, delta), this.correction); + return; } + + var engine = this.engine; + var runner = this.runner; + + var timing = engine.timing; + var correction = this.correction; + + if (runner.isFixed) + { + // fixed timestep + delta = this.getDelta(time, delta); + } + else + { + // dynamic timestep based on wall clock between calls + delta = (time - runner.timePrev) || runner.delta; + runner.timePrev = time; + + // optimistically filter delta over a few frames, to improve stability + runner.deltaHistory.push(delta); + runner.deltaHistory = runner.deltaHistory.slice(-runner.deltaSampleSize); + delta = Math.min.apply(null, runner.deltaHistory); + + // limit delta + delta = delta < runner.deltaMin ? runner.deltaMin : delta; + delta = delta > runner.deltaMax ? runner.deltaMax : delta; + + // correction for delta + correction = delta / runner.delta; + + // update engine timing object + runner.delta = delta; + } + + // time correction for time scaling + if (runner.timeScalePrev !== 0) + { + correction *= timing.timeScale / runner.timeScalePrev; + } + + if (timing.timeScale === 0) + { + correction = 0; + } + + runner.timeScalePrev = timing.timeScale; + runner.correction = correction; + + // fps counter + runner.frameCounter += 1; + + if (time - runner.counterTimestamp >= 1000) + { + runner.fps = runner.frameCounter * ((time - runner.counterTimestamp) / 1000); + runner.counterTimestamp = time; + runner.frameCounter = 0; + } + + Engine.update(engine, delta, correction); }, /** @@ -121636,8 +124132,8 @@ var World = new Class({ * @method Phaser.Physics.Matter.World#step * @since 3.4.0 * - * @param {number} [delta=16.666] - [description] - * @param {number} [correction=1] - [description] + * @param {number} [delta=16.666] - The delta value. + * @param {number} [correction=1] - Optional delta correction value. */ step: function (delta, correction) { @@ -121670,8 +124166,66 @@ var World = new Class({ return 1000 / 30; }, + /** + * Returns `true` if the given body can be found within the World. + * + * @method Phaser.Physics.Matter.World#has + * @since 3.22.0 + * + * @param {(MatterJS.Body|Phaser.GameObjects.GameObject)} body - The Matter Body, or Game Object, to search for within the world. + * + * @return {MatterJS.BodyType[]} An array of all the Matter JS Bodies in this World. + */ + has: function (body) + { + var src = (body.hasOwnProperty('body')) ? body.body : body; + + return (Composite.get(this.localWorld, src.id, src.type) !== null); + }, + + /** + * Returns all the bodies in the Matter World, including all bodies in children, recursively. + * + * @method Phaser.Physics.Matter.World#getAllBodies + * @since 3.22.0 + * + * @return {MatterJS.BodyType[]} An array of all the Matter JS Bodies in this World. + */ + getAllBodies: function () + { + return Composite.allBodies(this.localWorld); + }, + + /** + * Returns all the constraints in the Matter World, including all constraints in children, recursively. + * + * @method Phaser.Physics.Matter.World#getAllConstraints + * @since 3.22.0 + * + * @return {MatterJS.ConstraintType[]} An array of all the Matter JS Constraints in this World. + */ + getAllConstraints: function () + { + return Composite.allConstraints(this.localWorld); + }, + + /** + * Returns all the composites in the Matter World, including all composites in children, recursively. + * + * @method Phaser.Physics.Matter.World#getAllComposites + * @since 3.22.0 + * + * @return {MatterJS.CompositeType[]} An array of all the Matter JS Composites in this World. + */ + getAllComposites: function () + { + return Composite.allComposites(this.localWorld); + }, + /** * Handles the rendering of bodies and debug information to the debug Graphics object, if enabled. + * + * This method is called automatically by the Scene after all processing has taken place. * * @method Phaser.Physics.Matter.World#postUpdate * @private @@ -121684,130 +124238,451 @@ var World = new Class({ return; } - this.debugGraphic.clear(); + var config = this.debugConfig; + var engine = this.engine; + var graphics = this.debugGraphic; var bodies = Composite.allBodies(this.localWorld); - if (this.defaults.debugWireframes) - { - if (this.defaults.debugShowConvexHulls) - { - this.renderConvexHulls(bodies); - } + this.debugGraphic.clear(); - this.renderWireframes(bodies); + if (config.showBroadphase && engine.broadphase.controller) + { + this.renderGrid(engine.broadphase, graphics, config.broadphaseColor, 0.5); } - else + + if (config.showBounds) + { + this.renderBodyBounds(bodies, graphics, config.boundsColor, 0.5); + } + + if (config.showBody || config.showStaticBody) { this.renderBodies(bodies); } - if (this.defaults.debugShowJoint) + if (config.showJoint) { this.renderJoints(); } + + if (config.showAxes || config.showAngleIndicator) + { + this.renderBodyAxes(bodies, graphics, config.showAxes, config.angleColor, 0.5); + } + + if (config.showVelocity) + { + this.renderBodyVelocity(bodies, graphics, config.velocityColor, 1, 2); + } + + if (config.showSeparations) + { + this.renderSeparations(engine.pairs.list, graphics, config.separationColor); + } + + if (config.showCollisions) + { + this.renderCollisions(engine.pairs.list, graphics, config.collisionColor); + } }, /** - * Renders the debug convex hulls from the given array of bodies. - * - * @method Phaser.Physics.Matter.World#renderConvexHulls - * @private - * @since 3.14.0 + * Renders the Engine Broadphase Controller Grid to the given Graphics instance. * - * @param {array} bodies - An array of bodies from the localWorld. + * The debug renderer calls this method if the `showBroadphase` config value is set. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render the Grid to your own Graphics instance. + * + * @method Phaser.Physics.Matter.World#renderGrid + * @since 3.22.0 + * + * @param {MatterJS.Grid} grid - The Matter Grid to be rendered. + * @param {Phaser.GameObjects.Graphics} graphics - The Graphics object to render to. + * @param {number} lineColor - The line color. + * @param {number} lineOpacity - The line opacity, between 0 and 1. + * + * @return {this} This Matter World instance for method chaining. */ - renderConvexHulls: function (bodies) + renderGrid: function (grid, graphics, lineColor, lineOpacity) { - var graphics = this.debugGraphic; + graphics.lineStyle(1, lineColor, lineOpacity); - graphics.lineStyle(1, this.defaults.debugConvexHullColor); + var bucketKeys = Common.keys(grid.buckets); - graphics.beginPath(); - - for (var i = 0; i < bodies.length; i++) + for (var i = 0; i < bucketKeys.length; i++) { - var body = bodies[i]; + var bucketId = bucketKeys[i]; - if (!body.render.visible || body.parts.length === 1) + if (grid.buckets[bucketId].length < 2) { continue; } - graphics.moveTo(body.vertices[0].x, body.vertices[0].y); + var region = bucketId.split(/C|R/); - for (var j = 1; j < body.vertices.length; j++) - { - graphics.lineTo(body.vertices[j].x, body.vertices[j].y); - } - - graphics.lineTo(body.vertices[0].x, body.vertices[0].y); + graphics.strokeRect( + parseInt(region[1], 10) * grid.bucketWidth, + parseInt(region[2], 10) * grid.bucketHeight, + grid.bucketWidth, + grid.bucketHeight + ); } - graphics.strokePath(); + return this; }, /** - * Renders the wireframes of the given array of bodies. + * Renders the list of Pair separations to the given Graphics instance. + * + * The debug renderer calls this method if the `showSeparations` config value is set. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render the Grid to your own Graphics instance. + * + * @method Phaser.Physics.Matter.World#renderSeparations + * @since 3.22.0 + * + * @param {MatterJS.Pair[]} pairs - An array of Matter Pairs to be rendered. + * @param {Phaser.GameObjects.Graphics} graphics - The Graphics object to render to. + * @param {number} lineColor - The line color. + * + * @return {this} This Matter World instance for method chaining. + */ + renderSeparations: function (pairs, graphics, lineColor) + { + graphics.lineStyle(1, lineColor, 1); + + for (var i = 0; i < pairs.length; i++) + { + var pair = pairs[i]; + + if (!pair.isActive) + { + continue; + } + + var collision = pair.collision; + var bodyA = collision.bodyA; + var bodyB = collision.bodyB; + var posA = bodyA.position; + var posB = bodyB.position; + var penetration = collision.penetration; + + var k = (!bodyA.isStatic && !bodyB.isStatic) ? 4 : 1; + + if (bodyB.isStatic) + { + k = 0; + } + + graphics.lineBetween( + posB.x, + posB.y, + posB.x - (penetration.x * k), + posB.y - (penetration.y * k) + ); + + k = (!bodyA.isStatic && !bodyB.isStatic) ? 4 : 1; + + if (bodyA.isStatic) + { + k = 0; + } + + graphics.lineBetween( + posA.x, + posA.y, + posA.x - (penetration.x * k), + posA.y - (penetration.y * k) + ); + } + + return this; + }, + + /** + * Renders the list of collision points and normals to the given Graphics instance. + * + * The debug renderer calls this method if the `showCollisions` config value is set. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render the Grid to your own Graphics instance. + * + * @method Phaser.Physics.Matter.World#renderCollisions + * @since 3.22.0 + * + * @param {MatterJS.Pair[]} pairs - An array of Matter Pairs to be rendered. + * @param {Phaser.GameObjects.Graphics} graphics - The Graphics object to render to. + * @param {number} lineColor - The line color. + * + * @return {this} This Matter World instance for method chaining. + */ + renderCollisions: function (pairs, graphics, lineColor) + { + graphics.lineStyle(1, lineColor, 0.5); + graphics.fillStyle(lineColor, 1); + + var i; + var pair; + + // Collision Positions + + for (i = 0; i < pairs.length; i++) + { + pair = pairs[i]; + + if (!pair.isActive) + { + continue; + } + + for (var j = 0; j < pair.activeContacts.length; j++) + { + var contact = pair.activeContacts[j]; + var vertex = contact.vertex; + + graphics.fillRect(vertex.x - 2, vertex.y - 2, 5, 5); + } + } + + // Collision Normals + + for (i = 0; i < pairs.length; i++) + { + pair = pairs[i]; + + if (!pair.isActive) + { + continue; + } + + var collision = pair.collision; + var contacts = pair.activeContacts; + + if (contacts.length > 0) + { + var normalPosX = contacts[0].vertex.x; + var normalPosY = contacts[0].vertex.y; + + if (contacts.length === 2) + { + normalPosX = (contacts[0].vertex.x + contacts[1].vertex.x) / 2; + normalPosY = (contacts[0].vertex.y + contacts[1].vertex.y) / 2; + } + + if (collision.bodyB === collision.supports[0].body || collision.bodyA.isStatic) + { + graphics.lineBetween( + normalPosX - collision.normal.x * 8, + normalPosY - collision.normal.y * 8, + normalPosX, + normalPosY + ); + } + else + { + graphics.lineBetween( + normalPosX + collision.normal.x * 8, + normalPosY + collision.normal.y * 8, + normalPosX, + normalPosY + ); + } + } + } + + return this; + }, + + /** + * Renders the bounds of an array of Bodies to the given Graphics instance. + * + * If the body is a compound body, it will render the bounds for the parent compound. + * + * The debug renderer calls this method if the `showBounds` config value is set. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render bounds to your own Graphics instance. * - * @method Phaser.Physics.Matter.World#renderWireframes - * @private - * @since 3.14.0 + * @method Phaser.Physics.Matter.World#renderBodyBounds + * @since 3.22.0 * * @param {array} bodies - An array of bodies from the localWorld. + * @param {Phaser.GameObjects.Graphics} graphics - The Graphics object to render to. + * @param {number} lineColor - The line color. + * @param {number} lineOpacity - The line opacity, between 0 and 1. */ - renderWireframes: function (bodies) + renderBodyBounds: function (bodies, graphics, lineColor, lineOpacity) { - var graphics = this.debugGraphic; - var showInternalEdges = this.defaults.debugShowInternalEdges; - - graphics.lineStyle(1, this.defaults.bodyDebugColor); - - graphics.beginPath(); + graphics.lineStyle(1, lineColor, lineOpacity); for (var i = 0; i < bodies.length; i++) { var body = bodies[i]; + // 1) Don't show invisible bodies if (!body.render.visible) { continue; } - for (var k = (body.parts.length > 1) ? 1 : 0; k < body.parts.length; k++) + var bounds = body.bounds; + + if (bounds) { - var part = body.parts[k]; + graphics.strokeRect( + bounds.min.x, + bounds.min.y, + bounds.max.x - bounds.min.x, + bounds.max.y - bounds.min.y + ); + } + else + { + var parts = body.parts; - var vertLength = part.vertices.length; - - graphics.moveTo(part.vertices[0].x, part.vertices[0].y); - - for (var j = 1; j < vertLength; j++) + for (var j = parts.length > 1 ? 1 : 0; j < parts.length; j++) { - if (!part.vertices[j - 1].isInternal || showInternalEdges) - { - graphics.lineTo(part.vertices[j].x, part.vertices[j].y); - } - else - { - graphics.moveTo(part.vertices[j].x, part.vertices[j].y); - } - - if (part.vertices[j].isInternal && !showInternalEdges) - { - graphics.moveTo(part.vertices[(j + 1) % vertLength].x, part.vertices[(j + 1) % vertLength].y); - } + var part = parts[j]; + + graphics.strokeRect( + part.bounds.min.x, + part.bounds.min.y, + part.bounds.max.x - part.bounds.min.x, + part.bounds.max.y - part.bounds.min.y + ); } - - graphics.lineTo(part.vertices[0].x, part.vertices[0].y); } } - graphics.strokePath(); + return this; }, /** - * Renders the array of bodies. + * Renders either all axes, or a single axis indicator, for an array of Bodies, to the given Graphics instance. + * + * The debug renderer calls this method if the `showAxes` or `showAngleIndicator` config values are set. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render bounds to your own Graphics instance. + * + * @method Phaser.Physics.Matter.World#renderBodyAxes + * @since 3.22.0 + * + * @param {array} bodies - An array of bodies from the localWorld. + * @param {Phaser.GameObjects.Graphics} graphics - The Graphics object to render to. + * @param {boolean} showAxes - If `true` it will render all body axes. If `false` it will render a single axis indicator. + * @param {number} lineColor - The line color. + * @param {number} lineOpacity - The line opacity, between 0 and 1. + */ + renderBodyAxes: function (bodies, graphics, showAxes, lineColor, lineOpacity) + { + graphics.lineStyle(1, lineColor, lineOpacity); + + for (var i = 0; i < bodies.length; i++) + { + var body = bodies[i]; + var parts = body.parts; + + // 1) Don't show invisible bodies + if (!body.render.visible) + { + continue; + } + + var part; + var j; + var k; + + if (showAxes) + { + for (j = parts.length > 1 ? 1 : 0; j < parts.length; j++) + { + part = parts[j]; + + for (k = 0; k < part.axes.length; k++) + { + var axis = part.axes[k]; + + graphics.lineBetween( + part.position.x, + part.position.y, + part.position.x + axis.x * 20, + part.position.y + axis.y * 20 + ); + } + } + } + else + { + for (j = parts.length > 1 ? 1 : 0; j < parts.length; j++) + { + part = parts[j]; + + for (k = 0; k < part.axes.length; k++) + { + graphics.lineBetween( + part.position.x, + part.position.y, + (part.vertices[0].x + part.vertices[part.vertices.length - 1].x) / 2, + (part.vertices[0].y + part.vertices[part.vertices.length - 1].y) / 2 + ); + } + } + } + } + + return this; + }, + + /** + * Renders a velocity indicator for an array of Bodies, to the given Graphics instance. + * + * The debug renderer calls this method if the `showVelocity` config value is set. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render bounds to your own Graphics instance. + * + * @method Phaser.Physics.Matter.World#renderBodyVelocity + * @since 3.22.0 + * + * @param {array} bodies - An array of bodies from the localWorld. + * @param {Phaser.GameObjects.Graphics} graphics - The Graphics object to render to. + * @param {number} lineColor - The line color. + * @param {number} lineOpacity - The line opacity, between 0 and 1. + * @param {number} lineThickness - The line thickness. + */ + renderBodyVelocity: function (bodies, graphics, lineColor, lineOpacity, lineThickness) + { + graphics.lineStyle(lineThickness, lineColor, lineOpacity); + + for (var i = 0; i < bodies.length; i++) + { + var body = bodies[i]; + + // 1) Don't show invisible bodies + if (!body.render.visible) + { + continue; + } + + graphics.lineBetween( + body.position.x, + body.position.y, + body.position.x + (body.position.x - body.positionPrev.x) * 2, + body.position.y + (body.position.y - body.positionPrev.y) * 2 + ); + } + + return this; + }, + + /** + * Renders the given array of Bodies to the debug graphics instance. + * + * Called automatically by the `postUpdate` method. * * @method Phaser.Physics.Matter.World#renderBodies * @private @@ -121819,94 +124694,272 @@ var World = new Class({ { var graphics = this.debugGraphic; - var showInternalEdges = this.defaults.debugShowInternalEdges || !this.defaults.debugWireframes; - var showSleeping = this.defaults.debugShowSleeping; - var wireframes = this.defaults.debugWireframes; + var config = this.debugConfig; - var body; - var part; - var i; - var k; + var showBody = config.showBody; + var showStaticBody = config.showStaticBody; + var showSleeping = config.showSleeping; + var showInternalEdges = config.showInternalEdges; + var showConvexHulls = config.showConvexHulls; - for (i = 0; i < bodies.length; i++) + var renderFill = config.renderFill; + var renderLine = config.renderLine; + + var staticBodySleepOpacity = config.staticBodySleepOpacity; + var sleepFillColor = config.sleepFillColor; + var sleepLineColor = config.sleepLineColor; + + var hullColor = config.hullColor; + + for (var i = 0; i < bodies.length; i++) { - body = bodies[i]; + var body = bodies[i]; + // 1) Don't show invisible bodies if (!body.render.visible) { continue; } - // Handle compound parts - for (k = body.parts.length > 1 ? 1 : 0; k < body.parts.length; k++) + // 2) Don't show static bodies, OR + // 3) Don't show dynamic bodies + if ((!showStaticBody && body.isStatic) || (!showBody && !body.isStatic)) { - part = body.parts[k]; + continue; + } - if (!part.render.visible) - { - continue; - } + var lineColor = body.render.lineColor; + var lineOpacity = body.render.lineOpacity; + var lineThickness = body.render.lineThickness; + var fillColor = body.render.fillColor; + var fillOpacity = body.render.fillOpacity; - if (showSleeping && body.isSleeping) + if (showSleeping && body.isSleeping) + { + if (body.isStatic) { - graphics.lineStyle(1, this.defaults.bodyDebugColor, 0.5 * part.render.opacity); - graphics.fillStyle(this.defaults.bodyDebugColor, 0.5 * part.render.opacity); + lineOpacity *= staticBodySleepOpacity; + fillOpacity *= staticBodySleepOpacity; } else { - graphics.lineStyle(1, this.defaults.bodyDebugColor, part.render.opacity); - graphics.fillStyle(this.defaults.bodyDebugColor, part.render.opacity); + lineColor = sleepLineColor; + fillColor = sleepFillColor; } + } - // Part polygon - if (part.circleRadius) - { - graphics.beginPath(); - graphics.arc(part.position.x, part.position.y, part.circleRadius, 0, 2 * Math.PI); - } - else - { - graphics.beginPath(); - graphics.moveTo(part.vertices[0].x, part.vertices[0].y); + if (!renderFill) + { + fillColor = null; + } - var vertLength = part.vertices.length; + if (!renderLine) + { + lineColor = null; + } - for (var j = 1; j < vertLength; j++) - { - if (!part.vertices[j - 1].isInternal || showInternalEdges) - { - graphics.lineTo(part.vertices[j].x, part.vertices[j].y); - } - else - { - graphics.moveTo(part.vertices[j].x, part.vertices[j].y); - } + this.renderBody(body, graphics, showInternalEdges, lineColor, lineOpacity, lineThickness, fillColor, fillOpacity); - if (part.vertices[j].isInternal && !showInternalEdges) - { - graphics.moveTo(part.vertices[(j + 1) % part.vertices.length].x, part.vertices[(j + 1) % part.vertices.length].y); - } - } - - graphics.lineTo(part.vertices[0].x, part.vertices[0].y); + var partsLength = body.parts.length; - graphics.closePath(); - } - - if (!wireframes) - { - graphics.fillPath(); - } - else - { - graphics.strokePath(); - } + if (showConvexHulls && partsLength > 1) + { + this.renderConvexHull(body, graphics, hullColor, lineThickness); } } }, /** - * Renders world constraints. + * Renders a single Matter Body to the given Phaser Graphics Game Object. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render a Body to your own Graphics instance. + * + * If you don't wish to render a line around the body, set the `lineColor` parameter to `null`. + * Equally, if you don't wish to render a fill, set the `fillColor` parameter to `null`. + * + * @method Phaser.Physics.Matter.World#renderBody + * @since 3.22.0 + * + * @param {MatterJS.BodyType} body - The Matter Body to be rendered. + * @param {Phaser.GameObjects.Graphics} graphics - The Graphics object to render to. + * @param {boolean} showInternalEdges - Render internal edges of the polygon? + * @param {number} [lineColor] - The line color. + * @param {number} [lineOpacity] - The line opacity, between 0 and 1. + * @param {number} [lineThickness=1] - The line thickness. + * @param {number} [fillColor] - The fill color. + * @param {number} [fillOpacity] - The fill opacity, between 0 and 1. + * + * @return {this} This Matter World instance for method chaining. + */ + renderBody: function (body, graphics, showInternalEdges, lineColor, lineOpacity, lineThickness, fillColor, fillOpacity) + { + if (lineColor === undefined) { lineColor = null; } + if (lineOpacity === undefined) { lineOpacity = null; } + if (lineThickness === undefined) { lineThickness = 1; } + if (fillColor === undefined) { fillColor = null; } + if (fillOpacity === undefined) { fillOpacity = null; } + + var config = this.debugConfig; + + var sensorFillColor = config.sensorFillColor; + var sensorLineColor = config.sensorLineColor; + + // Handle compound parts + var parts = body.parts; + var partsLength = parts.length; + + for (var k = (partsLength > 1) ? 1 : 0; k < partsLength; k++) + { + var part = parts[k]; + var render = part.render; + var opacity = render.opacity; + + if (!render.visible || opacity === 0 || (part.isSensor && !config.showSensors)) + { + continue; + } + + // Part polygon + var circleRadius = part.circleRadius; + + graphics.beginPath(); + + if (part.isSensor) + { + if (fillColor !== null) + { + graphics.fillStyle(sensorFillColor, fillOpacity * opacity); + } + + if (lineColor !== null) + { + graphics.lineStyle(lineThickness, sensorLineColor, lineOpacity * opacity); + } + } + else + { + if (fillColor !== null) + { + graphics.fillStyle(fillColor, fillOpacity * opacity); + } + + if (lineColor !== null) + { + graphics.lineStyle(lineThickness, lineColor, lineOpacity * opacity); + } + } + + if (circleRadius) + { + graphics.arc(part.position.x, part.position.y, circleRadius, 0, 2 * Math.PI); + } + else + { + var vertices = part.vertices; + var vertLength = vertices.length; + + graphics.moveTo(vertices[0].x, vertices[0].y); + + for (var j = 1; j < vertLength; j++) + { + var vert = vertices[j]; + + if (!vertices[j - 1].isInternal || showInternalEdges) + { + graphics.lineTo(vert.x, vert.y); + } + else + { + graphics.moveTo(vert.x, vert.y); + } + + if (j < vertLength && vert.isInternal && !showInternalEdges) + { + var nextIndex = (j + 1) % vertLength; + + graphics.moveTo(vertices[nextIndex].x, vertices[nextIndex].y); + } + } + + graphics.closePath(); + } + + if (fillColor !== null) + { + graphics.fillPath(); + } + + if (lineColor !== null) + { + graphics.strokePath(); + } + } + + if (config.showPositions && !body.isStatic) + { + var px = body.position.x; + var py = body.position.y; + var hs = Math.ceil(config.positionSize / 2); + + graphics.fillStyle(config.positionColor, 1); + graphics.fillRect(px - hs, py - hs, config.positionSize, config.positionSize); + } + + return this; + }, + + /** + * Renders the Convex Hull for a single Matter Body to the given Phaser Graphics Game Object. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render a Body hull to your own Graphics instance. + * + * @method Phaser.Physics.Matter.World#renderConvexHull + * @since 3.22.0 + * + * @param {MatterJS.BodyType} body - The Matter Body to be rendered. + * @param {Phaser.GameObjects.Graphics} graphics - The Graphics object to render to. + * @param {number} hullColor - The color used to render the hull. + * @param {number} [lineThickness=1] - The hull line thickness. + * + * @return {this} This Matter World instance for method chaining. + */ + renderConvexHull: function (body, graphics, hullColor, lineThickness) + { + if (lineThickness === undefined) { lineThickness = 1; } + + var parts = body.parts; + var partsLength = parts.length; + + // Render Convex Hulls + if (partsLength > 1) + { + var verts = body.vertices; + + graphics.lineStyle(lineThickness, hullColor); + + graphics.beginPath(); + + graphics.moveTo(verts[0].x, verts[0].y); + + for (var v = 1; v < verts.length; v++) + { + graphics.lineTo(verts[v].x, verts[v].y); + } + + graphics.lineTo(verts[0].x, verts[0].y); + + graphics.strokePath(); + } + + return this; + }, + + /** + * Renders all of the constraints in the world (unless they are specifically set to invisible). + * + * Called automatically by the `postUpdate` method. * * @method Phaser.Physics.Matter.World#renderJoints * @private @@ -121916,123 +124969,118 @@ var World = new Class({ { var graphics = this.debugGraphic; - graphics.lineStyle(2, this.defaults.jointDebugColor); - // Render constraints var constraints = Composite.allConstraints(this.localWorld); for (var i = 0; i < constraints.length; i++) { - var constraint = constraints[i]; + var config = constraints[i].render; - if (!constraint.render.visible || !constraint.pointA || !constraint.pointB) - { - continue; - } + var lineColor = config.lineColor; + var lineOpacity = config.lineOpacity; + var lineThickness = config.lineThickness; + var pinSize = config.pinSize; + var anchorColor = config.anchorColor; + var anchorSize = config.anchorSize; - if (constraint.render.lineWidth) - { - graphics.lineStyle(constraint.render.lineWidth, Common.colorToNumber(constraint.render.strokeStyle)); - } - - var bodyA = constraint.bodyA; - var bodyB = constraint.bodyB; - var start; - var end; - - if (bodyA) - { - start = Vector.add(bodyA.position, constraint.pointA); - } - else - { - start = constraint.pointA; - } - - if (constraint.render.type === 'pin') - { - graphics.beginPath(); - graphics.arc(start.x, start.y, 3, 0, 2 * Math.PI); - graphics.closePath(); - } - else - { - if (bodyB) - { - end = Vector.add(bodyB.position, constraint.pointB); - } - else - { - end = constraint.pointB; - } - - graphics.beginPath(); - graphics.moveTo(start.x, start.y); - - if (constraint.render.type === 'spring') - { - var delta = Vector.sub(end, start); - var normal = Vector.perp(Vector.normalise(delta)); - var coils = Math.ceil(Common.clamp(constraint.length / 5, 12, 20)); - var offset; - - for (var j = 1; j < coils; j += 1) - { - offset = (j % 2 === 0) ? 1 : -1; - - graphics.lineTo( - start.x + delta.x * (j / coils) + normal.x * offset * 4, - start.y + delta.y * (j / coils) + normal.y * offset * 4 - ); - } - } - - graphics.lineTo(end.x, end.y); - } - - if (constraint.render.lineWidth) - { - graphics.strokePath(); - } - - if (constraint.render.anchors) - { - graphics.fillStyle(Common.colorToNumber(constraint.render.strokeStyle)); - graphics.beginPath(); - graphics.arc(start.x, start.y, 6, 0, 2 * Math.PI); - graphics.arc(end.x, end.y, 6, 0, 2 * Math.PI); - graphics.closePath(); - graphics.fillPath(); - } + this.renderConstraint(constraints[i], graphics, lineColor, lineOpacity, lineThickness, pinSize, anchorColor, anchorSize); } }, /** - * [description] - * - * @method Phaser.Physics.Matter.World#fromPath - * @since 3.0.0 - * - * @param {string} path - [description] - * @param {array} points - [description] - * - * @return {array} [description] + * Renders a single Matter Constraint, such as a Pin or a Spring, to the given Phaser Graphics Game Object. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render a Constraint to your own Graphics instance. + * + * @method Phaser.Physics.Matter.World#renderConstraint + * @since 3.22.0 + * + * @param {MatterJS.ConstraintType} constraint - The Matter Constraint to render. + * @param {Phaser.GameObjects.Graphics} graphics - The Graphics object to render to. + * @param {number} lineColor - The line color. + * @param {number} lineOpacity - The line opacity, between 0 and 1. + * @param {number} lineThickness - The line thickness. + * @param {number} pinSize - If this constraint is a pin, this sets the size of the pin circle. + * @param {number} anchorColor - The color used when rendering this constraints anchors. Set to `null` to not render anchors. + * @param {number} anchorSize - The size of the anchor circle, if this constraint has anchors and is rendering them. + * + * @return {this} This Matter World instance for method chaining. */ - fromPath: function (path, points) + renderConstraint: function (constraint, graphics, lineColor, lineOpacity, lineThickness, pinSize, anchorColor, anchorSize) { - if (points === undefined) { points = []; } + var render = constraint.render; - // var pathPattern = /L?\s*([-\d.e]+)[\s,]*([-\d.e]+)*/ig; - - // eslint-disable-next-line no-useless-escape - var pathPattern = /L?\s*([\-\d\.e]+)[\s,]*([\-\d\.e]+)*/ig; - - path.replace(pathPattern, function (match, x, y) + if (!render.visible || !constraint.pointA || !constraint.pointB) { - points.push({ x: parseFloat(x), y: parseFloat(y) }); - }); + return this; + } - return points; + graphics.lineStyle(lineThickness, lineColor, lineOpacity); + + var bodyA = constraint.bodyA; + var bodyB = constraint.bodyB; + var start; + var end; + + if (bodyA) + { + start = Vector.add(bodyA.position, constraint.pointA); + } + else + { + start = constraint.pointA; + } + + if (render.type === 'pin') + { + graphics.strokeCircle(start.x, start.y, pinSize); + } + else + { + if (bodyB) + { + end = Vector.add(bodyB.position, constraint.pointB); + } + else + { + end = constraint.pointB; + } + + graphics.beginPath(); + graphics.moveTo(start.x, start.y); + + if (render.type === 'spring') + { + var delta = Vector.sub(end, start); + var normal = Vector.perp(Vector.normalise(delta)); + var coils = Math.ceil(Common.clamp(constraint.length / 5, 12, 20)); + var offset; + + for (var j = 1; j < coils; j += 1) + { + offset = (j % 2 === 0) ? 1 : -1; + + graphics.lineTo( + start.x + delta.x * (j / coils) + normal.x * offset * 4, + start.y + delta.y * (j / coils) + normal.y * offset * 4 + ); + } + } + + graphics.lineTo(end.x, end.y); + } + + graphics.strokePath(); + + if (render.anchors && anchorSize > 0) + { + graphics.fillStyle(anchorColor); + graphics.fillCircle(start.x, start.y, anchorSize); + graphics.fillCircle(end.x, end.y, anchorSize); + } + + return this; }, /** @@ -122098,12 +125146,12 @@ module.exports = World; /***/ }), -/* 496 */ +/* 512 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey -* @copyright 2019 Photon Storm Ltd. +* @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ @@ -122228,12 +125276,12 @@ module.exports = BasePlugin; /***/ }), -/* 497 */ +/* 513 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122273,16 +125321,16 @@ module.exports = ReplaceByIndex; /***/ }), -/* 498 */ +/* 514 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsInLayerBounds = __webpack_require__(113); +var IsInLayerBounds = __webpack_require__(115); /** * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns @@ -122316,18 +125364,18 @@ module.exports = HasTileAt; /***/ }), -/* 499 */ +/* 515 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tile = __webpack_require__(79); -var IsInLayerBounds = __webpack_require__(113); -var CalculateFacesAt = __webpack_require__(238); +var Tile = __webpack_require__(80); +var IsInLayerBounds = __webpack_require__(115); +var CalculateFacesAt = __webpack_require__(245); /** * Removes the tile at the given tile coordinates in the specified layer and updates the layer's @@ -122379,20 +125427,20 @@ module.exports = RemoveTileAt; /***/ }), -/* 500 */ +/* 516 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Formats = __webpack_require__(34); -var Parse2DArray = __webpack_require__(241); -var ParseCSV = __webpack_require__(501); -var ParseJSONTiled = __webpack_require__(502); -var ParseWeltmeister = __webpack_require__(513); +var Parse2DArray = __webpack_require__(248); +var ParseCSV = __webpack_require__(517); +var ParseJSONTiled = __webpack_require__(518); +var ParseWeltmeister = __webpack_require__(529); /** * Parses raw data of a given Tilemap format into a new MapData object. If no recognized data format @@ -122449,17 +125497,17 @@ module.exports = Parse; /***/ }), -/* 501 */ +/* 517 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Formats = __webpack_require__(34); -var Parse2DArray = __webpack_require__(241); +var Parse2DArray = __webpack_require__(248); /** * Parses a CSV string of tile indexes into a new MapData object with a single layer. @@ -122497,23 +125545,23 @@ module.exports = ParseCSV; /***/ }), -/* 502 */ +/* 518 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Formats = __webpack_require__(34); -var MapData = __webpack_require__(115); -var ParseTileLayers = __webpack_require__(503); -var ParseImageLayers = __webpack_require__(505); -var ParseTilesets = __webpack_require__(506); -var ParseObjectLayers = __webpack_require__(509); -var BuildTilesetIndex = __webpack_require__(511); -var AssignTileProperties = __webpack_require__(512); +var MapData = __webpack_require__(117); +var ParseTileLayers = __webpack_require__(519); +var ParseImageLayers = __webpack_require__(521); +var ParseTilesets = __webpack_require__(522); +var ParseObjectLayers = __webpack_require__(525); +var BuildTilesetIndex = __webpack_require__(527); +var AssignTileProperties = __webpack_require__(528); /** * Parses a Tiled JSON object into a new MapData object. @@ -122575,21 +125623,21 @@ module.exports = ParseJSONTiled; /***/ }), -/* 503 */ +/* 519 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Base64Decode = __webpack_require__(504); +var Base64Decode = __webpack_require__(520); var GetFastValue = __webpack_require__(1); -var LayerData = __webpack_require__(114); -var ParseGID = __webpack_require__(242); -var Tile = __webpack_require__(79); -var CreateGroupLayer = __webpack_require__(243); +var LayerData = __webpack_require__(116); +var ParseGID = __webpack_require__(249); +var Tile = __webpack_require__(80); +var CreateGroupLayer = __webpack_require__(250); /** * Parses all tilemap layers in a Tiled JSON object into new LayerData objects. @@ -122833,12 +125881,12 @@ module.exports = ParseTileLayers; /***/ }), -/* 504 */ +/* 520 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122876,17 +125924,17 @@ module.exports = Base64Decode; /***/ }), -/* 505 */ +/* 521 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetFastValue = __webpack_require__(1); -var CreateGroupLayer = __webpack_require__(243); +var CreateGroupLayer = __webpack_require__(250); /** * Parses a Tiled JSON object into an array of objects with details about the image layers. @@ -122964,18 +126012,18 @@ module.exports = ParseImageLayers; /***/ }), -/* 506 */ +/* 522 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tileset = __webpack_require__(149); -var ImageCollection = __webpack_require__(507); -var ParseObject = __webpack_require__(244); +var Tileset = __webpack_require__(154); +var ImageCollection = __webpack_require__(523); +var ParseObject = __webpack_require__(251); /** * Tilesets and Image Collections @@ -123133,12 +126181,12 @@ module.exports = ParseTilesets; /***/ }), -/* 507 */ +/* 523 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -123305,16 +126353,16 @@ module.exports = ImageCollection; /***/ }), -/* 508 */ +/* 524 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HasValue = __webpack_require__(90); +var HasValue = __webpack_require__(91); /** * Returns a new object that only contains the `keys` that were found on the object provided. @@ -123349,19 +126397,19 @@ module.exports = Pick; /***/ }), -/* 509 */ +/* 525 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetFastValue = __webpack_require__(1); -var ParseObject = __webpack_require__(244); -var ObjectLayer = __webpack_require__(510); -var CreateGroupLayer = __webpack_require__(243); +var ParseObject = __webpack_require__(251); +var ObjectLayer = __webpack_require__(526); +var CreateGroupLayer = __webpack_require__(250); /** * Parses a Tiled JSON object into an array of ObjectLayer objects. @@ -123448,12 +126496,12 @@ module.exports = ParseObjectLayers; /***/ }), -/* 510 */ +/* 526 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -123570,12 +126618,12 @@ module.exports = ObjectLayer; /***/ }), -/* 511 */ +/* 527 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -123643,12 +126691,12 @@ module.exports = BuildTilesetIndex; /***/ }), -/* 512 */ +/* 528 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -123716,19 +126764,19 @@ module.exports = AssignTileProperties; /***/ }), -/* 513 */ +/* 529 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Formats = __webpack_require__(34); -var MapData = __webpack_require__(115); -var ParseTileLayers = __webpack_require__(514); -var ParseTilesets = __webpack_require__(515); +var MapData = __webpack_require__(117); +var ParseTileLayers = __webpack_require__(530); +var ParseTilesets = __webpack_require__(531); /** * Parses a Weltmeister JSON object into a new MapData object. @@ -123783,17 +126831,17 @@ module.exports = ParseWeltmeister; /***/ }), -/* 514 */ +/* 530 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var LayerData = __webpack_require__(114); -var Tile = __webpack_require__(79); +var LayerData = __webpack_require__(116); +var Tile = __webpack_require__(80); /** * [description] @@ -123867,16 +126915,16 @@ module.exports = ParseTileLayers; /***/ }), -/* 515 */ +/* 531 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tileset = __webpack_require__(149); +var Tileset = __webpack_require__(154); /** * [description] @@ -123918,27 +126966,27 @@ module.exports = ParseTilesets; /***/ }), -/* 516 */ +/* 532 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var DegToRad = __webpack_require__(40); -var DynamicTilemapLayer = __webpack_require__(517); +var DynamicTilemapLayer = __webpack_require__(533); var Extend = __webpack_require__(17); var Formats = __webpack_require__(34); -var LayerData = __webpack_require__(114); -var Rotate = __webpack_require__(330); -var SpliceOne = __webpack_require__(84); -var StaticTilemapLayer = __webpack_require__(518); -var Tile = __webpack_require__(79); -var TilemapComponents = __webpack_require__(145); -var Tileset = __webpack_require__(149); +var LayerData = __webpack_require__(116); +var Rotate = __webpack_require__(349); +var SpliceOne = __webpack_require__(85); +var StaticTilemapLayer = __webpack_require__(534); +var Tile = __webpack_require__(80); +var TilemapComponents = __webpack_require__(150); +var Tileset = __webpack_require__(154); /** * @callback TilemapFilterCallback @@ -125179,7 +128227,7 @@ var Tilemap = new Class({ * @method Phaser.Tilemaps.Tilemap#getTileLayerNames * @since 3.21.0 * - * @return {[string]} Array of valid tilelayer names / IDs loaded into this Tilemap. + * @return {string[]} Array of valid tilelayer names / IDs loaded into this Tilemap. */ getTileLayerNames: function () { @@ -126475,20 +129523,20 @@ module.exports = Tilemap; /***/ }), -/* 517 */ +/* 533 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var DynamicTilemapLayerRender = __webpack_require__(1406); +var DynamicTilemapLayerRender = __webpack_require__(1421); var GameObject = __webpack_require__(14); -var TilemapComponents = __webpack_require__(145); +var TilemapComponents = __webpack_require__(150); /** * @classdesc @@ -127796,21 +130844,21 @@ module.exports = DynamicTilemapLayer; /***/ }), -/* 518 */ +/* 534 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var GameEvents = __webpack_require__(19); +var GameEvents = __webpack_require__(21); var GameObject = __webpack_require__(14); -var StaticTilemapLayerRender = __webpack_require__(1409); -var TilemapComponents = __webpack_require__(145); +var StaticTilemapLayerRender = __webpack_require__(1424); +var TilemapComponents = __webpack_require__(150); var TransformMatrix = __webpack_require__(35); var Utils = __webpack_require__(10); @@ -129290,12 +132338,12 @@ module.exports = StaticTilemapLayer; /***/ }), -/* 519 */ +/* 535 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129603,16 +132651,16 @@ module.exports = TimerEvent; /***/ }), -/* 520 */ +/* 536 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RESERVED = __webpack_require__(1418); +var RESERVED = __webpack_require__(1433); /** * Internal function used by the Tween Builder to return an array of properties @@ -129664,12 +132712,12 @@ module.exports = GetProps; /***/ }), -/* 521 */ +/* 537 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129712,24 +132760,24 @@ module.exports = GetTweens; /***/ }), -/* 522 */ +/* 538 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Defaults = __webpack_require__(248); +var Defaults = __webpack_require__(255); var GetAdvancedValue = __webpack_require__(15); -var GetBoolean = __webpack_require__(97); -var GetEaseFunction = __webpack_require__(89); -var GetNewValue = __webpack_require__(150); +var GetBoolean = __webpack_require__(99); +var GetEaseFunction = __webpack_require__(90); +var GetNewValue = __webpack_require__(155); var GetValue = __webpack_require__(5); -var GetValueOp = __webpack_require__(247); -var Tween = __webpack_require__(249); -var TweenData = __webpack_require__(251); +var GetValueOp = __webpack_require__(254); +var Tween = __webpack_require__(256); +var TweenData = __webpack_require__(258); /** * Creates a new Number Tween. @@ -129842,26 +132890,272 @@ module.exports = NumberTweenBuilder; /***/ }), -/* 523 */ +/* 539 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clone = __webpack_require__(72); -var Defaults = __webpack_require__(248); -var GetAdvancedValue = __webpack_require__(15); -var GetBoolean = __webpack_require__(97); -var GetEaseFunction = __webpack_require__(89); -var GetNewValue = __webpack_require__(150); -var GetTargets = __webpack_require__(246); -var GetTweens = __webpack_require__(521); +var GetEaseFunction = __webpack_require__(90); var GetValue = __webpack_require__(5); -var Timeline = __webpack_require__(524); -var TweenBuilder = __webpack_require__(151); +var MATH_CONST = __webpack_require__(13); + +/** + * Creates a Stagger function to be used by a Tween property. + * + * The stagger function will allow you to stagger changes to the value of the property across all targets of the tween. + * + * This is only worth using if the tween has multiple targets. + * + * The following will stagger the delay by 100ms across all targets of the tween, causing them to scale down to 0.2 + * over the duration specified: + * + * ```javascript + * this.tweens.add({ + * targets: [ ... ], + * scale: 0.2, + * ease: 'linear', + * duration: 1000, + * delay: this.tweens.stagger(100) + * }); + * ``` + * + * The following will stagger the delay by 500ms across all targets of the tween using a 10 x 6 grid, staggering + * from the center out, using a cubic ease. + * + * ```javascript + * this.tweens.add({ + * targets: [ ... ], + * scale: 0.2, + * ease: 'linear', + * duration: 1000, + * delay: this.tweens.stagger(500, { grid: [ 10, 6 ], from: 'center', ease: 'cubic.out' }) + * }); + * ``` + * + * @function Phaser.Tweens.Builders.StaggerBuilder + * @since 3.19.0 + * + * @param {(number|number[])} value - The amount to stagger by, or an array containing two elements representing the min and max values to stagger between. + * @param {Phaser.Types.Tweens.StaggerConfig} [config] - A Stagger Configuration object. + * + * @return {function} The stagger function. + */ +var StaggerBuilder = function (value, options) +{ + if (options === undefined) { options = {}; } + + var result; + + var start = GetValue(options, 'start', 0); + var ease = GetValue(options, 'ease', null); + var grid = GetValue(options, 'grid', null); + + var from = GetValue(options, 'from', 0); + + var fromFirst = (from === 'first'); + var fromCenter = (from === 'center'); + var fromLast = (from === 'last'); + var fromValue = (typeof(from) === 'number'); + + var isRange = (Array.isArray(value)); + var value1 = (isRange) ? parseFloat(value[0]) : parseFloat(value); + var value2 = (isRange) ? parseFloat(value[1]) : 0; + var maxValue = Math.max(value1, value2); + + if (isRange) + { + start += value1; + } + + if (grid) + { + // Pre-calc the grid to save doing it for ever tweendata update + var gridWidth = grid[0]; + var gridHeight = grid[1]; + + var fromX = 0; + var fromY = 0; + + var distanceX = 0; + var distanceY = 0; + + var gridValues = []; + + if (fromLast) + { + fromX = gridWidth - 1; + fromY = gridHeight - 1; + } + else if (fromValue) + { + fromX = from % gridWidth; + fromY = Math.floor(from / gridWidth); + } + else if (fromCenter) + { + fromX = (gridWidth - 1) / 2; + fromY = (gridHeight - 1) / 2; + } + + var gridMax = MATH_CONST.MIN_SAFE_INTEGER; + + for (var toY = 0; toY < gridHeight; toY++) + { + gridValues[toY] = []; + + for (var toX = 0; toX < gridWidth; toX++) + { + distanceX = fromX - toX; + distanceY = fromY - toY; + + var dist = Math.sqrt(distanceX * distanceX + distanceY * distanceY); + + if (dist > gridMax) + { + gridMax = dist; + } + + gridValues[toY][toX] = dist; + } + } + } + + var easeFunction = (ease) ? GetEaseFunction(ease) : null; + + if (grid) + { + result = function (target, key, value, index) + { + var gridSpace = 0; + var toX = index % gridWidth; + var toY = Math.floor(index / gridWidth); + + if (toX >= 0 && toX < gridWidth && toY >= 0 && toY < gridHeight) + { + gridSpace = gridValues[toY][toX]; + } + + var output; + + if (isRange) + { + var diff = (value2 - value1); + + if (easeFunction) + { + output = ((gridSpace / gridMax) * diff) * easeFunction(gridSpace / gridMax); + } + else + { + output = (gridSpace / gridMax) * diff; + } + } + else if (easeFunction) + { + output = (gridSpace * value1) * easeFunction(gridSpace / gridMax); + } + else + { + output = gridSpace * value1; + } + + return output + start; + }; + } + else + { + result = function (target, key, value, index, total) + { + // zero offset + total--; + + var fromIndex; + + if (fromFirst) + { + fromIndex = index; + } + else if (fromCenter) + { + fromIndex = Math.abs((total / 2) - index); + } + else if (fromLast) + { + fromIndex = total - index; + } + else if (fromValue) + { + fromIndex = Math.abs(from - index); + } + + var output; + + if (isRange) + { + var spacing; + + if (fromCenter) + { + spacing = ((value2 - value1) / total) * (fromIndex * 2); + } + else + { + spacing = ((value2 - value1) / total) * fromIndex; + } + + if (easeFunction) + { + output = spacing * easeFunction(fromIndex / total); + } + else + { + output = spacing; + } + } + else if (easeFunction) + { + output = (total * maxValue) * easeFunction(fromIndex / total); + } + else + { + output = fromIndex * value1; + } + + return output + start; + }; + } + + return result; +}; + +module.exports = StaggerBuilder; + + +/***/ }), +/* 540 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clone = __webpack_require__(73); +var Defaults = __webpack_require__(255); +var GetAdvancedValue = __webpack_require__(15); +var GetBoolean = __webpack_require__(99); +var GetEaseFunction = __webpack_require__(90); +var GetNewValue = __webpack_require__(155); +var GetTargets = __webpack_require__(253); +var GetTweens = __webpack_require__(537); +var GetValue = __webpack_require__(5); +var Timeline = __webpack_require__(541); +var TweenBuilder = __webpack_require__(156); /** * Builds a Timeline of Tweens based on a configuration object. @@ -129994,20 +133288,20 @@ module.exports = TimelineBuilder; /***/ }), -/* 524 */ +/* 541 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(250); -var TweenBuilder = __webpack_require__(151); -var TWEEN_CONST = __webpack_require__(98); +var Events = __webpack_require__(257); +var TweenBuilder = __webpack_require__(156); +var TWEEN_CONST = __webpack_require__(100); /** * @classdesc @@ -130899,16 +134193,16 @@ module.exports = Timeline; /***/ }), -/* 525 */ +/* 542 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -__webpack_require__(526); +__webpack_require__(544); var CONST = __webpack_require__(32); var Extend = __webpack_require__(17); @@ -130919,38 +134213,38 @@ var Extend = __webpack_require__(17); var Phaser = { - Actions: __webpack_require__(253), - Animations: __webpack_require__(644), - BlendModes: __webpack_require__(42), - Cache: __webpack_require__(645), - Cameras: __webpack_require__(648), - Core: __webpack_require__(731), + Actions: __webpack_require__(259), + Animations: __webpack_require__(664), + BlendModes: __webpack_require__(43), + Cache: __webpack_require__(665), + Cameras: __webpack_require__(668), + Core: __webpack_require__(751), Class: __webpack_require__(0), - Create: __webpack_require__(789), - Curves: __webpack_require__(795), - Data: __webpack_require__(798), - Display: __webpack_require__(800), - DOM: __webpack_require__(829), - Events: __webpack_require__(830), - Game: __webpack_require__(832), - GameObjects: __webpack_require__(930), - Geom: __webpack_require__(434), - Input: __webpack_require__(1212), - Loader: __webpack_require__(1246), - Math: __webpack_require__(177), - Physics: __webpack_require__(1272), - Plugins: __webpack_require__(1360), - Renderer: __webpack_require__(1362), - Scale: __webpack_require__(1367), - ScaleModes: __webpack_require__(152), - Scene: __webpack_require__(379), - Scenes: __webpack_require__(1368), - Structs: __webpack_require__(1370), - Textures: __webpack_require__(1371), - Tilemaps: __webpack_require__(1373), - Time: __webpack_require__(1414), - Tweens: __webpack_require__(1416), - Utils: __webpack_require__(1434) + Create: __webpack_require__(813), + Curves: __webpack_require__(819), + Data: __webpack_require__(822), + Display: __webpack_require__(824), + DOM: __webpack_require__(841), + Events: __webpack_require__(842), + Game: __webpack_require__(844), + GameObjects: __webpack_require__(942), + Geom: __webpack_require__(453), + Input: __webpack_require__(1224), + Loader: __webpack_require__(1258), + Math: __webpack_require__(181), + Physics: __webpack_require__(1284), + Plugins: __webpack_require__(1375), + Renderer: __webpack_require__(1377), + Scale: __webpack_require__(1382), + ScaleModes: __webpack_require__(157), + Scene: __webpack_require__(398), + Scenes: __webpack_require__(1383), + Structs: __webpack_require__(1385), + Textures: __webpack_require__(1386), + Tilemaps: __webpack_require__(1388), + Time: __webpack_require__(1429), + Tweens: __webpack_require__(1431), + Utils: __webpack_require__(1448) }; @@ -130958,7 +134252,7 @@ var Phaser = { if (true) { - Phaser.Sound = __webpack_require__(1444); + Phaser.Sound = __webpack_require__(1458); } if (false) @@ -130966,7 +134260,7 @@ if (false) if (true) { - Phaser.FacebookInstantGamesPlugin = __webpack_require__(393); + Phaser.FacebookInstantGamesPlugin = __webpack_require__(412); } // Merge in the consts @@ -130992,24 +134286,50 @@ global.Phaser = Phaser; * -- Dick Brandon */ -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(252))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(543))) /***/ }), -/* 526 */ +/* 543 */ +/***/ (function(module, exports) { + +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || new Function("return this")(); +} catch (e) { + // This works if the window reference is available + if (typeof window === "object") g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; + + +/***/ }), +/* 544 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(527); -__webpack_require__(528); -__webpack_require__(529); -__webpack_require__(530); -__webpack_require__(531); -__webpack_require__(532); -__webpack_require__(533); -__webpack_require__(534); +__webpack_require__(545); +__webpack_require__(546); +__webpack_require__(547); +__webpack_require__(548); +__webpack_require__(549); +__webpack_require__(550); +__webpack_require__(551); +__webpack_require__(552); /***/ }), -/* 527 */ +/* 545 */ /***/ (function(module, exports) { /** @@ -131049,7 +134369,7 @@ if (!Array.prototype.forEach) /***/ }), -/* 528 */ +/* 546 */ /***/ (function(module, exports) { /** @@ -131065,7 +134385,7 @@ if (!Array.isArray) /***/ }), -/* 529 */ +/* 547 */ /***/ (function(module, exports) { /* Copyright 2013 Chris Wilson @@ -131252,7 +134572,7 @@ BiquadFilterNode.type and OscillatorNode.type. /***/ }), -/* 530 */ +/* 548 */ /***/ (function(module, exports) { /** @@ -131267,7 +134587,7 @@ if (!window.console) /***/ }), -/* 531 */ +/* 549 */ /***/ (function(module, exports) { // ES6 Math.trunc - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc @@ -131279,7 +134599,7 @@ if (!Math.trunc) { /***/ }), -/* 532 */ +/* 550 */ /***/ (function(module, exports) { /** @@ -131316,7 +134636,7 @@ if (!Math.trunc) { /***/ }), -/* 533 */ +/* 551 */ /***/ (function(module, exports) { // References: @@ -131373,7 +134693,7 @@ if (!window.cancelAnimationFrame) /***/ }), -/* 534 */ +/* 552 */ /***/ (function(module, exports) { /** @@ -131426,12 +134746,60 @@ if (typeof window.Uint32Array !== 'function' && typeof window.Uint32Array !== 'o /***/ }), -/* 535 */ +/* 553 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var QuickSet = __webpack_require__(260); + +/** + * Takes an array of Game Objects, or any objects that have public `x` and `y` properties, and aligns them next to each other. + * + * The first item isn't moved. The second item is aligned next to the first, then the third next to the second, and so on. + * + * @function Phaser.Actions.AlignTo + * @since 3.22.0 + * + * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return] + * + * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action. + * @param {integer} position - The position to align the items with. This is an align constant, such as `Phaser.Display.Align.LEFT_CENTER`. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action. + */ +var AlignTo = function (items, position, offsetX, offsetY) +{ + var target = items[0]; + + for (var i = 1; i < items.length; i++) + { + var item = items[i]; + + QuickSet(item, target, position, offsetX, offsetY); + + target = item; + } + + return items; +}; + +module.exports = AlignTo; + + +/***/ }), +/* 554 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131467,12 +134835,12 @@ module.exports = Angle; /***/ }), -/* 536 */ +/* 555 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131506,12 +134874,12 @@ module.exports = Call; /***/ }), -/* 537 */ +/* 556 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131564,12 +134932,12 @@ module.exports = GetFirst; /***/ }), -/* 538 */ +/* 557 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131622,20 +134990,20 @@ module.exports = GetLast; /***/ }), -/* 539 */ +/* 558 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AlignIn = __webpack_require__(254); -var CONST = __webpack_require__(153); +var AlignIn = __webpack_require__(273); +var CONST = __webpack_require__(97); var GetFastValue = __webpack_require__(1); var NOOP = __webpack_require__(2); -var Zone = __webpack_require__(116); +var Zone = __webpack_require__(118); var tempZone = new Zone({ sys: { queueDepthSort: NOOP, events: { once: NOOP } } }, 0, 0, 1, 1); @@ -131657,10 +135025,15 @@ var GridAlign = function (items, options) { if (options === undefined) { options = {}; } + var widthSet = options.hasOwnProperty('width'); + var heightSet = options.hasOwnProperty('height'); + var width = GetFastValue(options, 'width', -1); var height = GetFastValue(options, 'height', -1); + var cellWidth = GetFastValue(options, 'cellWidth', 1); var cellHeight = GetFastValue(options, 'cellHeight', cellWidth); + var position = GetFastValue(options, 'position', CONST.TOP_LEFT); var x = GetFastValue(options, 'x', 0); var y = GetFastValue(options, 'y', 0); @@ -131677,31 +135050,15 @@ var GridAlign = function (items, options) { AlignIn(items[i], tempZone, position); - if (width === -1) + if (widthSet && width === -1) { // We keep laying them out horizontally until we've done them all - cy += cellHeight; - tempZone.y += cellHeight; - - if (cy === h) - { - cy = 0; - tempZone.x += cellWidth; - tempZone.y = y; - } + tempZone.x += cellWidth; } - else if (height === -1) + else if (heightSet && height === -1) { // We keep laying them out vertically until we've done them all - cx += cellWidth; - tempZone.x += cellWidth; - - if (cx === w) - { - cx = 0; - tempZone.x = x; - tempZone.y += cellHeight; - } + tempZone.y += cellHeight; } else { @@ -131732,12 +135089,307 @@ module.exports = GridAlign; /***/ }), -/* 540 */ +/* 559 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = __webpack_require__(20); + +// bitmask flag for GameObject.renderMask +var _FLAG = 2; // 0010 + +/** + * Provides methods used for setting the alpha properties of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.Alpha + * @since 3.0.0 + */ + +var Alpha = { + + /** + * Private internal value. Holds the global alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alpha + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alpha: 1, + + /** + * Private internal value. Holds the top-left alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaTL + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaTL: 1, + + /** + * Private internal value. Holds the top-right alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaTR + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaTR: 1, + + /** + * Private internal value. Holds the bottom-left alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaBL + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaBL: 1, + + /** + * Private internal value. Holds the bottom-right alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaBR + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaBR: 1, + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + * + * @method Phaser.GameObjects.Components.Alpha#clearAlpha + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + clearAlpha: function () + { + return this.setAlpha(1); + }, + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * + * @method Phaser.GameObjects.Components.Alpha#setAlpha + * @since 3.0.0 + * + * @param {number} [topLeft=1] - The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. + * @param {number} [topRight] - The alpha value used for the top-right of the Game Object. WebGL only. + * @param {number} [bottomLeft] - The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param {number} [bottomRight] - The alpha value used for the bottom-right of the Game Object. WebGL only. + * + * @return {this} This Game Object instance. + */ + setAlpha: function (topLeft, topRight, bottomLeft, bottomRight) + { + if (topLeft === undefined) { topLeft = 1; } + + // Treat as if there is only one alpha value for the whole Game Object + if (topRight === undefined) + { + this.alpha = topLeft; + } + else + { + this._alphaTL = Clamp(topLeft, 0, 1); + this._alphaTR = Clamp(topRight, 0, 1); + this._alphaBL = Clamp(bottomLeft, 0, 1); + this._alphaBR = Clamp(bottomRight, 0, 1); + } + + return this; + }, + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + * + * @name Phaser.GameObjects.Components.Alpha#alpha + * @type {number} + * @since 3.0.0 + */ + alpha: { + + get: function () + { + return this._alpha; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alpha = v; + this._alphaTL = v; + this._alphaTR = v; + this._alphaBL = v; + this._alphaBR = v; + + if (v === 0) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaTopLeft + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaTopLeft: { + + get: function () + { + return this._alphaTL; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaTL = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaTopRight + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaTopRight: { + + get: function () + { + return this._alphaTR; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaTR = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaBottomLeft + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaBottomLeft: { + + get: function () + { + return this._alphaBL; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaBL = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaBottomRight + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaBottomRight: { + + get: function () + { + return this._alphaBR; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaBR = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + } + +}; + +module.exports = Alpha; + + +/***/ }), +/* 560 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131759,12 +135411,12 @@ module.exports = 'add'; /***/ }), -/* 541 */ +/* 561 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131787,12 +135439,12 @@ module.exports = 'complete'; /***/ }), -/* 542 */ +/* 562 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131814,12 +135466,12 @@ module.exports = 'repeat'; /***/ }), -/* 543 */ +/* 563 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131842,12 +135494,12 @@ module.exports = 'restart'; /***/ }), -/* 544 */ +/* 564 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131870,12 +135522,12 @@ module.exports = 'start'; /***/ }), -/* 545 */ +/* 565 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131894,12 +135546,12 @@ module.exports = 'pauseall'; /***/ }), -/* 546 */ +/* 566 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131918,12 +135570,12 @@ module.exports = 'remove'; /***/ }), -/* 547 */ +/* 567 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131941,12 +135593,12 @@ module.exports = 'resumeall'; /***/ }), -/* 548 */ +/* 568 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131970,12 +135622,12 @@ module.exports = 'animationcomplete'; /***/ }), -/* 549 */ +/* 569 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131998,12 +135650,12 @@ module.exports = 'animationcomplete-'; /***/ }), -/* 550 */ +/* 570 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132027,12 +135679,12 @@ module.exports = 'animationrepeat-'; /***/ }), -/* 551 */ +/* 571 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132055,12 +135707,12 @@ module.exports = 'animationrestart-'; /***/ }), -/* 552 */ +/* 572 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132083,12 +135735,12 @@ module.exports = 'animationstart-'; /***/ }), -/* 553 */ +/* 573 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132112,12 +135764,12 @@ module.exports = 'animationupdate-'; /***/ }), -/* 554 */ +/* 574 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132142,12 +135794,12 @@ module.exports = 'animationrepeat'; /***/ }), -/* 555 */ +/* 575 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132171,12 +135823,12 @@ module.exports = 'animationrestart'; /***/ }), -/* 556 */ +/* 576 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132200,12 +135852,12 @@ module.exports = 'animationstart'; /***/ }), -/* 557 */ +/* 577 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132230,12 +135882,12 @@ module.exports = 'animationupdate'; /***/ }), -/* 558 */ +/* 578 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132379,12 +136031,12 @@ module.exports = ComputedSize; /***/ }), -/* 559 */ +/* 579 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132504,12 +136156,12 @@ module.exports = Crop; /***/ }), -/* 560 */ +/* 580 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132668,17 +136320,17 @@ module.exports = Flip; /***/ }), -/* 561 */ +/* 581 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Rectangle = __webpack_require__(11); -var RotateAround = __webpack_require__(276); +var RotateAround = __webpack_require__(295); var Vector2 = __webpack_require__(3); /** @@ -133027,12 +136679,12 @@ module.exports = GetBounds; /***/ }), -/* 562 */ +/* 582 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133050,12 +136702,12 @@ module.exports = 'blur'; /***/ }), -/* 563 */ +/* 583 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133072,12 +136724,12 @@ module.exports = 'boot'; /***/ }), -/* 564 */ +/* 584 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133095,12 +136747,12 @@ module.exports = 'contextlost'; /***/ }), -/* 565 */ +/* 585 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133118,12 +136770,12 @@ module.exports = 'contextrestored'; /***/ }), -/* 566 */ +/* 586 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133141,12 +136793,12 @@ module.exports = 'destroy'; /***/ }), -/* 567 */ +/* 587 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133163,12 +136815,12 @@ module.exports = 'focus'; /***/ }), -/* 568 */ +/* 588 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133189,12 +136841,12 @@ module.exports = 'hidden'; /***/ }), -/* 569 */ +/* 589 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133210,12 +136862,12 @@ module.exports = 'pause'; /***/ }), -/* 570 */ +/* 590 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133236,12 +136888,12 @@ module.exports = 'postrender'; /***/ }), -/* 571 */ +/* 591 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133261,12 +136913,12 @@ module.exports = 'poststep'; /***/ }), -/* 572 */ +/* 592 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133286,12 +136938,12 @@ module.exports = 'prerender'; /***/ }), -/* 573 */ +/* 593 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133311,12 +136963,12 @@ module.exports = 'prestep'; /***/ }), -/* 574 */ +/* 594 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133333,12 +136985,12 @@ module.exports = 'ready'; /***/ }), -/* 575 */ +/* 595 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133354,12 +137006,12 @@ module.exports = 'resume'; /***/ }), -/* 576 */ +/* 596 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133379,12 +137031,12 @@ module.exports = 'step'; /***/ }), -/* 577 */ +/* 597 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133403,12 +137055,12 @@ module.exports = 'visible'; /***/ }), -/* 578 */ +/* 598 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133606,19 +137258,19 @@ module.exports = Origin; /***/ }), -/* 579 */ +/* 599 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var DegToRad = __webpack_require__(40); -var GetBoolean = __webpack_require__(97); +var GetBoolean = __webpack_require__(99); var GetValue = __webpack_require__(5); -var TWEEN_CONST = __webpack_require__(98); +var TWEEN_CONST = __webpack_require__(100); var Vector2 = __webpack_require__(3); /** @@ -133955,15 +137607,24 @@ var PathFollower = { if (tween) { var tweenData = tween.data[0]; + var pathVector = this.pathVector; - if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD) + if (tweenData.state !== TWEEN_CONST.COMPLETE) + { + this.path.getPoint(1, pathVector); + + pathVector.add(this.pathOffset); + + this.setPosition(pathVector.x, pathVector.y); + + return; + } + else if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD) { // If delayed, etc then bail out return; } - var pathVector = this.pathVector; - this.path.getPoint(tween.getValue(), pathVector); pathVector.add(this.pathOffset); @@ -134003,12 +137664,12 @@ module.exports = PathFollower; /***/ }), -/* 580 */ +/* 600 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134190,12 +137851,12 @@ module.exports = Size; /***/ }), -/* 581 */ +/* 601 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134320,12 +137981,12 @@ module.exports = Texture; /***/ }), -/* 582 */ +/* 602 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134528,12 +138189,12 @@ module.exports = TextureCrop; /***/ }), -/* 583 */ +/* 603 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134868,12 +138529,12 @@ module.exports = Tint; /***/ }), -/* 584 */ +/* 604 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134900,12 +138561,12 @@ module.exports = 'changedata'; /***/ }), -/* 585 */ +/* 605 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134923,7 +138584,6 @@ module.exports = 'changedata'; * @since 3.16.1 * * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event. - * @param {string} key - The unique key of the data item within the Data Manager. * @param {any} value - The item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance. * @param {any} previousValue - The previous item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance. */ @@ -134931,12 +138591,12 @@ module.exports = 'changedata-'; /***/ }), -/* 586 */ +/* 606 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134959,12 +138619,12 @@ module.exports = 'removedata'; /***/ }), -/* 587 */ +/* 607 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134987,12 +138647,12 @@ module.exports = 'setdata'; /***/ }), -/* 588 */ +/* 608 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135012,12 +138672,12 @@ module.exports = 'destroy'; /***/ }), -/* 589 */ +/* 609 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135044,12 +138704,12 @@ module.exports = 'complete'; /***/ }), -/* 590 */ +/* 610 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135073,12 +138733,12 @@ module.exports = 'created'; /***/ }), -/* 591 */ +/* 611 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135099,12 +138759,12 @@ module.exports = 'error'; /***/ }), -/* 592 */ +/* 612 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135131,12 +138791,12 @@ module.exports = 'loop'; /***/ }), -/* 593 */ +/* 613 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135159,12 +138819,12 @@ module.exports = 'play'; /***/ }), -/* 594 */ +/* 614 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135184,12 +138844,12 @@ module.exports = 'seeked'; /***/ }), -/* 595 */ +/* 615 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135210,12 +138870,12 @@ module.exports = 'seeking'; /***/ }), -/* 596 */ +/* 616 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135236,12 +138896,12 @@ module.exports = 'stop'; /***/ }), -/* 597 */ +/* 617 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135262,12 +138922,12 @@ module.exports = 'timeout'; /***/ }), -/* 598 */ +/* 618 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135288,12 +138948,12 @@ module.exports = 'unlocked'; /***/ }), -/* 599 */ +/* 619 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135329,12 +138989,12 @@ module.exports = IncAlpha; /***/ }), -/* 600 */ +/* 620 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135370,12 +139030,12 @@ module.exports = IncX; /***/ }), -/* 601 */ +/* 621 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135417,12 +139077,12 @@ module.exports = IncXY; /***/ }), -/* 602 */ +/* 622 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135458,12 +139118,12 @@ module.exports = IncY; /***/ }), -/* 603 */ +/* 623 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135507,12 +139167,12 @@ module.exports = PlaceOnCircle; /***/ }), -/* 604 */ +/* 624 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135559,16 +139219,16 @@ module.exports = PlaceOnEllipse; /***/ }), -/* 605 */ +/* 625 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetPoints = __webpack_require__(158); +var GetPoints = __webpack_require__(162); /** * Positions an array of Game Objects on evenly spaced points of a Line. @@ -135603,18 +139263,18 @@ module.exports = PlaceOnLine; /***/ }), -/* 606 */ +/* 626 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MarchingAnts = __webpack_require__(285); -var RotateLeft = __webpack_require__(286); -var RotateRight = __webpack_require__(287); +var MarchingAnts = __webpack_require__(304); +var RotateLeft = __webpack_require__(305); +var RotateRight = __webpack_require__(306); /** * Takes an array of Game Objects and positions them on evenly spaced points around the perimeter of a Rectangle. @@ -135661,16 +139321,16 @@ module.exports = PlaceOnRectangle; /***/ }), -/* 607 */ +/* 627 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BresenhamPoints = __webpack_require__(288); +var BresenhamPoints = __webpack_require__(307); /** * Takes an array of Game Objects and positions them on evenly spaced points around the edges of a Triangle. @@ -135722,12 +139382,12 @@ module.exports = PlaceOnTriangle; /***/ }), -/* 608 */ +/* 628 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135759,16 +139419,16 @@ module.exports = PlayAnimation; /***/ }), -/* 609 */ +/* 629 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(155); +var Random = __webpack_require__(159); /** * Takes an array of Game Objects and positions them at random locations within the Circle. @@ -135799,16 +139459,16 @@ module.exports = RandomCircle; /***/ }), -/* 610 */ +/* 630 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(163); +var Random = __webpack_require__(167); /** * Takes an array of Game Objects and positions them at random locations within the Ellipse. @@ -135839,16 +139499,16 @@ module.exports = RandomEllipse; /***/ }), -/* 611 */ +/* 631 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(159); +var Random = __webpack_require__(163); /** * Takes an array of Game Objects and positions them at random locations on the Line. @@ -135879,16 +139539,16 @@ module.exports = RandomLine; /***/ }), -/* 612 */ +/* 632 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(160); +var Random = __webpack_require__(164); /** * Takes an array of Game Objects and positions them at random locations within the Rectangle. @@ -135917,16 +139577,16 @@ module.exports = RandomRectangle; /***/ }), -/* 613 */ +/* 633 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(164); +var Random = __webpack_require__(168); /** * Takes an array of Game Objects and positions them at random locations within the Triangle. @@ -135957,12 +139617,12 @@ module.exports = RandomTriangle; /***/ }), -/* 614 */ +/* 634 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135998,17 +139658,17 @@ module.exports = Rotate; /***/ }), -/* 615 */ +/* 635 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundDistance = __webpack_require__(165); -var DistanceBetween = __webpack_require__(63); +var RotateAroundDistance = __webpack_require__(169); +var DistanceBetween = __webpack_require__(54); /** * Rotates each item around the given point by the given angle. @@ -136044,16 +139704,16 @@ module.exports = RotateAround; /***/ }), -/* 616 */ +/* 636 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathRotateAroundDistance = __webpack_require__(165); +var MathRotateAroundDistance = __webpack_require__(169); /** * Rotates an array of Game Objects around a point by the given angle and distance. @@ -136093,12 +139753,12 @@ module.exports = RotateAroundDistance; /***/ }), -/* 617 */ +/* 637 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136134,12 +139794,12 @@ module.exports = ScaleX; /***/ }), -/* 618 */ +/* 638 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136181,12 +139841,12 @@ module.exports = ScaleXY; /***/ }), -/* 619 */ +/* 639 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136222,12 +139882,12 @@ module.exports = ScaleY; /***/ }), -/* 620 */ +/* 640 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136263,12 +139923,12 @@ module.exports = SetAlpha; /***/ }), -/* 621 */ +/* 641 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136303,12 +139963,12 @@ module.exports = SetBlendMode; /***/ }), -/* 622 */ +/* 642 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136344,12 +140004,12 @@ module.exports = SetDepth; /***/ }), -/* 623 */ +/* 643 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136383,12 +140043,12 @@ module.exports = SetHitArea; /***/ }), -/* 624 */ +/* 644 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136430,12 +140090,12 @@ module.exports = SetOrigin; /***/ }), -/* 625 */ +/* 645 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136471,12 +140131,12 @@ module.exports = SetRotation; /***/ }), -/* 626 */ +/* 646 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136518,12 +140178,12 @@ module.exports = SetScale; /***/ }), -/* 627 */ +/* 647 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136559,12 +140219,12 @@ module.exports = SetScaleX; /***/ }), -/* 628 */ +/* 648 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136600,12 +140260,12 @@ module.exports = SetScaleY; /***/ }), -/* 629 */ +/* 649 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136647,12 +140307,12 @@ module.exports = SetScrollFactor; /***/ }), -/* 630 */ +/* 650 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136688,12 +140348,12 @@ module.exports = SetScrollFactorX; /***/ }), -/* 631 */ +/* 651 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136729,12 +140389,12 @@ module.exports = SetScrollFactorY; /***/ }), -/* 632 */ +/* 652 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136768,12 +140428,12 @@ module.exports = SetTint; /***/ }), -/* 633 */ +/* 653 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136806,12 +140466,12 @@ module.exports = SetVisible; /***/ }), -/* 634 */ +/* 654 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136847,12 +140507,12 @@ module.exports = SetX; /***/ }), -/* 635 */ +/* 655 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136894,12 +140554,12 @@ module.exports = SetXY; /***/ }), -/* 636 */ +/* 656 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136935,12 +140595,12 @@ module.exports = SetY; /***/ }), -/* 637 */ +/* 657 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137065,16 +140725,16 @@ module.exports = ShiftPosition; /***/ }), -/* 638 */ +/* 658 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayShuffle = __webpack_require__(120); +var ArrayShuffle = __webpack_require__(122); /** * Shuffles the array in place. The shuffled array is both modified and returned. @@ -137098,16 +140758,16 @@ module.exports = Shuffle; /***/ }), -/* 639 */ +/* 659 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathSmootherStep = __webpack_require__(166); +var MathSmootherStep = __webpack_require__(170); /** * Smootherstep is a sigmoid-like interpolation and clamping function. @@ -137156,16 +140816,16 @@ module.exports = SmootherStep; /***/ }), -/* 640 */ +/* 660 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathSmoothStep = __webpack_require__(167); +var MathSmoothStep = __webpack_require__(171); /** * Smoothstep is a sigmoid-like interpolation and clamping function. @@ -137214,12 +140874,12 @@ module.exports = SmoothStep; /***/ }), -/* 641 */ +/* 661 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137277,12 +140937,12 @@ module.exports = Spread; /***/ }), -/* 642 */ +/* 662 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137313,17 +140973,17 @@ module.exports = ToggleVisible; /***/ }), -/* 643 */ +/* 663 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author samme - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Wrap = __webpack_require__(62); +var Wrap = __webpack_require__(63); /** * Wrap each item's coordinates within a rectangle's area. @@ -137362,12 +141022,12 @@ module.exports = WrapInRectangle; /***/ }), -/* 644 */ +/* 664 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137377,21 +141037,21 @@ module.exports = WrapInRectangle; module.exports = { - Animation: __webpack_require__(156), - AnimationFrame: __webpack_require__(271), - AnimationManager: __webpack_require__(289), - Events: __webpack_require__(117) + Animation: __webpack_require__(160), + AnimationFrame: __webpack_require__(290), + AnimationManager: __webpack_require__(308), + Events: __webpack_require__(119) }; /***/ }), -/* 645 */ +/* 665 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137401,20 +141061,20 @@ module.exports = { module.exports = { - BaseCache: __webpack_require__(290), - CacheManager: __webpack_require__(292), - Events: __webpack_require__(291) + BaseCache: __webpack_require__(309), + CacheManager: __webpack_require__(311), + Events: __webpack_require__(310) }; /***/ }), -/* 646 */ +/* 666 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137434,12 +141094,12 @@ module.exports = 'add'; /***/ }), -/* 647 */ +/* 667 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137459,12 +141119,12 @@ module.exports = 'remove'; /***/ }), -/* 648 */ +/* 668 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137478,19 +141138,19 @@ module.exports = 'remove'; module.exports = { - Controls: __webpack_require__(649), - Scene2D: __webpack_require__(652) + Controls: __webpack_require__(669), + Scene2D: __webpack_require__(672) }; /***/ }), -/* 649 */ +/* 669 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137500,19 +141160,19 @@ module.exports = { module.exports = { - FixedKeyControl: __webpack_require__(650), - SmoothedKeyControl: __webpack_require__(651) + FixedKeyControl: __webpack_require__(670), + SmoothedKeyControl: __webpack_require__(671) }; /***/ }), -/* 650 */ +/* 670 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137813,12 +141473,12 @@ module.exports = FixedKeyControl; /***/ }), -/* 651 */ +/* 671 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138296,12 +141956,12 @@ module.exports = SmoothedKeyControl; /***/ }), -/* 652 */ +/* 672 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138311,22 +141971,22 @@ module.exports = SmoothedKeyControl; module.exports = { - Camera: __webpack_require__(293), - BaseCamera: __webpack_require__(101), - CameraManager: __webpack_require__(705), - Effects: __webpack_require__(301), - Events: __webpack_require__(53) + Camera: __webpack_require__(312), + BaseCamera: __webpack_require__(103), + CameraManager: __webpack_require__(725), + Effects: __webpack_require__(320), + Events: __webpack_require__(55) }; /***/ }), -/* 653 */ +/* 673 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138344,12 +142004,12 @@ module.exports = 'cameradestroy'; /***/ }), -/* 654 */ +/* 674 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138370,12 +142030,12 @@ module.exports = 'camerafadeincomplete'; /***/ }), -/* 655 */ +/* 675 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138400,12 +142060,12 @@ module.exports = 'camerafadeinstart'; /***/ }), -/* 656 */ +/* 676 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138426,12 +142086,12 @@ module.exports = 'camerafadeoutcomplete'; /***/ }), -/* 657 */ +/* 677 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138456,12 +142116,12 @@ module.exports = 'camerafadeoutstart'; /***/ }), -/* 658 */ +/* 678 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138480,12 +142140,12 @@ module.exports = 'cameraflashcomplete'; /***/ }), -/* 659 */ +/* 679 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138508,12 +142168,12 @@ module.exports = 'cameraflashstart'; /***/ }), -/* 660 */ +/* 680 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138532,12 +142192,12 @@ module.exports = 'camerapancomplete'; /***/ }), -/* 661 */ +/* 681 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138559,12 +142219,12 @@ module.exports = 'camerapanstart'; /***/ }), -/* 662 */ +/* 682 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138585,12 +142245,12 @@ module.exports = 'postrender'; /***/ }), -/* 663 */ +/* 683 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138611,12 +142271,12 @@ module.exports = 'prerender'; /***/ }), -/* 664 */ +/* 684 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138635,12 +142295,12 @@ module.exports = 'camerashakecomplete'; /***/ }), -/* 665 */ +/* 685 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138661,12 +142321,12 @@ module.exports = 'camerashakestart'; /***/ }), -/* 666 */ +/* 686 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138685,12 +142345,12 @@ module.exports = 'camerazoomcomplete'; /***/ }), -/* 667 */ +/* 687 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138711,18 +142371,18 @@ module.exports = 'camerazoomstart'; /***/ }), -/* 668 */ +/* 688 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(24); +var Clamp = __webpack_require__(20); var Class = __webpack_require__(0); -var Events = __webpack_require__(53); +var Events = __webpack_require__(55); /** * @classdesc @@ -139099,18 +142759,18 @@ module.exports = Fade; /***/ }), -/* 669 */ +/* 689 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(24); +var Clamp = __webpack_require__(20); var Class = __webpack_require__(0); -var Events = __webpack_require__(53); +var Events = __webpack_require__(55); /** * @classdesc @@ -139450,19 +143110,19 @@ module.exports = Flash; /***/ }), -/* 670 */ +/* 690 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(24); +var Clamp = __webpack_require__(20); var Class = __webpack_require__(0); -var EaseMap = __webpack_require__(175); -var Events = __webpack_require__(53); +var EaseMap = __webpack_require__(179); +var Events = __webpack_require__(55); var Vector2 = __webpack_require__(3); /** @@ -139775,12 +143435,12 @@ module.exports = Pan; /***/ }), -/* 671 */ +/* 691 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139806,12 +143466,12 @@ module.exports = In; /***/ }), -/* 672 */ +/* 692 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139837,12 +143497,12 @@ module.exports = Out; /***/ }), -/* 673 */ +/* 693 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139877,12 +143537,12 @@ module.exports = InOut; /***/ }), -/* 674 */ +/* 694 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139922,12 +143582,12 @@ module.exports = In; /***/ }), -/* 675 */ +/* 695 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139965,12 +143625,12 @@ module.exports = Out; /***/ }), -/* 676 */ +/* 696 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140029,12 +143689,12 @@ module.exports = InOut; /***/ }), -/* 677 */ +/* 697 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140057,12 +143717,12 @@ module.exports = In; /***/ }), -/* 678 */ +/* 698 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140085,12 +143745,12 @@ module.exports = Out; /***/ }), -/* 679 */ +/* 699 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140120,12 +143780,12 @@ module.exports = InOut; /***/ }), -/* 680 */ +/* 700 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140148,12 +143808,12 @@ module.exports = In; /***/ }), -/* 681 */ +/* 701 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140176,12 +143836,12 @@ module.exports = Out; /***/ }), -/* 682 */ +/* 702 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140211,12 +143871,12 @@ module.exports = InOut; /***/ }), -/* 683 */ +/* 703 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140266,12 +143926,12 @@ module.exports = In; /***/ }), -/* 684 */ +/* 704 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140321,12 +143981,12 @@ module.exports = Out; /***/ }), -/* 685 */ +/* 705 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140383,12 +144043,12 @@ module.exports = InOut; /***/ }), -/* 686 */ +/* 706 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140411,12 +144071,12 @@ module.exports = In; /***/ }), -/* 687 */ +/* 707 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140439,12 +144099,12 @@ module.exports = Out; /***/ }), -/* 688 */ +/* 708 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140474,12 +144134,12 @@ module.exports = InOut; /***/ }), -/* 689 */ +/* 709 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140502,12 +144162,12 @@ module.exports = Linear; /***/ }), -/* 690 */ +/* 710 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140530,12 +144190,12 @@ module.exports = In; /***/ }), -/* 691 */ +/* 711 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140558,12 +144218,12 @@ module.exports = Out; /***/ }), -/* 692 */ +/* 712 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140593,12 +144253,12 @@ module.exports = InOut; /***/ }), -/* 693 */ +/* 713 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140621,12 +144281,12 @@ module.exports = In; /***/ }), -/* 694 */ +/* 714 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140649,12 +144309,12 @@ module.exports = Out; /***/ }), -/* 695 */ +/* 715 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140684,12 +144344,12 @@ module.exports = InOut; /***/ }), -/* 696 */ +/* 716 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140712,12 +144372,12 @@ module.exports = In; /***/ }), -/* 697 */ +/* 717 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140740,12 +144400,12 @@ module.exports = Out; /***/ }), -/* 698 */ +/* 718 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140775,12 +144435,12 @@ module.exports = InOut; /***/ }), -/* 699 */ +/* 719 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140814,12 +144474,12 @@ module.exports = In; /***/ }), -/* 700 */ +/* 720 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140853,12 +144513,12 @@ module.exports = Out; /***/ }), -/* 701 */ +/* 721 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140892,12 +144552,12 @@ module.exports = InOut; /***/ }), -/* 702 */ +/* 722 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140934,18 +144594,18 @@ module.exports = Stepped; /***/ }), -/* 703 */ +/* 723 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(24); +var Clamp = __webpack_require__(20); var Class = __webpack_require__(0); -var Events = __webpack_require__(53); +var Events = __webpack_require__(55); var Vector2 = __webpack_require__(3); /** @@ -141253,19 +144913,19 @@ module.exports = Shake; /***/ }), -/* 704 */ +/* 724 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(24); +var Clamp = __webpack_require__(20); var Class = __webpack_require__(0); -var EaseMap = __webpack_require__(175); -var Events = __webpack_require__(53); +var EaseMap = __webpack_require__(179); +var Events = __webpack_require__(55); /** * @classdesc @@ -141546,22 +145206,22 @@ module.exports = Zoom; /***/ }), -/* 705 */ +/* 725 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Camera = __webpack_require__(293); +var Camera = __webpack_require__(312); var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(1); -var PluginCache = __webpack_require__(20); -var RectangleContains = __webpack_require__(52); -var ScaleEvents = __webpack_require__(102); -var SceneEvents = __webpack_require__(21); +var PluginCache = __webpack_require__(22); +var RectangleContains = __webpack_require__(53); +var ScaleEvents = __webpack_require__(104); +var SceneEvents = __webpack_require__(18); /** * @classdesc @@ -142294,12 +145954,12 @@ module.exports = CameraManager; /***/ }), -/* 706 */ +/* 726 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142313,12 +145973,12 @@ module.exports = 'enterfullscreen'; /***/ }), -/* 707 */ +/* 727 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142332,12 +145992,12 @@ module.exports = 'fullscreenfailed'; /***/ }), -/* 708 */ +/* 728 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142351,12 +146011,12 @@ module.exports = 'fullscreenunsupported'; /***/ }), -/* 709 */ +/* 729 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142371,12 +146031,12 @@ module.exports = 'leavefullscreen'; /***/ }), -/* 710 */ +/* 730 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142392,12 +146052,12 @@ module.exports = 'orientationchange'; /***/ }), -/* 711 */ +/* 731 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142423,12 +146083,12 @@ module.exports = 'resize'; /***/ }), -/* 712 */ +/* 732 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142448,12 +146108,12 @@ module.exports = 'boot'; /***/ }), -/* 713 */ +/* 733 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142477,12 +146137,12 @@ module.exports = 'create'; /***/ }), -/* 714 */ +/* 734 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142504,12 +146164,12 @@ module.exports = 'destroy'; /***/ }), -/* 715 */ +/* 735 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142531,12 +146191,12 @@ module.exports = 'pause'; /***/ }), -/* 716 */ +/* 736 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142568,12 +146228,12 @@ module.exports = 'postupdate'; /***/ }), -/* 717 */ +/* 737 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142605,12 +146265,12 @@ module.exports = 'preupdate'; /***/ }), -/* 718 */ +/* 738 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142633,12 +146293,12 @@ module.exports = 'ready'; /***/ }), -/* 719 */ +/* 739 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142669,12 +146329,12 @@ module.exports = 'render'; /***/ }), -/* 720 */ +/* 740 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142696,12 +146356,12 @@ module.exports = 'resume'; /***/ }), -/* 721 */ +/* 741 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142726,12 +146386,12 @@ module.exports = 'shutdown'; /***/ }), -/* 722 */ +/* 742 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142753,12 +146413,12 @@ module.exports = 'sleep'; /***/ }), -/* 723 */ +/* 743 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142778,12 +146438,12 @@ module.exports = 'start'; /***/ }), -/* 724 */ +/* 744 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142814,12 +146474,12 @@ module.exports = 'transitioncomplete'; /***/ }), -/* 725 */ +/* 745 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142851,12 +146511,12 @@ module.exports = 'transitioninit'; /***/ }), -/* 726 */ +/* 746 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142885,12 +146545,12 @@ module.exports = 'transitionout'; /***/ }), -/* 727 */ +/* 747 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142925,12 +146585,12 @@ module.exports = 'transitionstart'; /***/ }), -/* 728 */ +/* 748 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142960,12 +146620,12 @@ module.exports = 'transitionwake'; /***/ }), -/* 729 */ +/* 749 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142997,12 +146657,12 @@ module.exports = 'update'; /***/ }), -/* 730 */ +/* 750 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143024,12 +146684,12 @@ module.exports = 'wake'; /***/ }), -/* 731 */ +/* 751 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143039,18 +146699,18 @@ module.exports = 'wake'; module.exports = { - Config: __webpack_require__(314), - CreateRenderer: __webpack_require__(337), - DebugHeader: __webpack_require__(347), - Events: __webpack_require__(19), - TimeStep: __webpack_require__(348), - VisibilityHandler: __webpack_require__(350) + Config: __webpack_require__(333), + CreateRenderer: __webpack_require__(356), + DebugHeader: __webpack_require__(366), + Events: __webpack_require__(21), + TimeStep: __webpack_require__(367), + VisibilityHandler: __webpack_require__(369) }; /***/ }), -/* 732 */ +/* 752 */ /***/ (function(module, exports) { // shim for using process in browser @@ -143240,16 +146900,16 @@ process.umask = function() { return 0; }; /***/ }), -/* 733 */ +/* 753 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Browser = __webpack_require__(123); +var Browser = __webpack_require__(125); /** * Determines the input support of the browser running this Phaser Game instance. @@ -143315,16 +146975,16 @@ module.exports = init(); /***/ }), -/* 734 */ +/* 754 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Browser = __webpack_require__(123); +var Browser = __webpack_require__(125); /** * Determines the audio playback capabilities of the device running this Phaser Game instance. @@ -143440,12 +147100,12 @@ module.exports = init(); /***/ }), -/* 735 */ +/* 755 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143527,12 +147187,12 @@ module.exports = init(); /***/ }), -/* 736 */ +/* 756 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143631,12 +147291,12 @@ module.exports = init(); /***/ }), -/* 737 */ +/* 757 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143646,28 +147306,28 @@ module.exports = init(); module.exports = { - Between: __webpack_require__(317), - BetweenPoints: __webpack_require__(738), - BetweenPointsY: __webpack_require__(739), - BetweenY: __webpack_require__(740), - CounterClockwise: __webpack_require__(741), - Normalize: __webpack_require__(318), - Reverse: __webpack_require__(742), - RotateTo: __webpack_require__(743), - ShortestBetween: __webpack_require__(744), - Wrap: __webpack_require__(161), - WrapDegrees: __webpack_require__(162) + Between: __webpack_require__(336), + BetweenPoints: __webpack_require__(758), + BetweenPointsY: __webpack_require__(759), + BetweenY: __webpack_require__(760), + CounterClockwise: __webpack_require__(761), + Normalize: __webpack_require__(337), + Reverse: __webpack_require__(762), + RotateTo: __webpack_require__(763), + ShortestBetween: __webpack_require__(764), + Wrap: __webpack_require__(165), + WrapDegrees: __webpack_require__(166) }; /***/ }), -/* 738 */ +/* 758 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143693,12 +147353,12 @@ module.exports = BetweenPoints; /***/ }), -/* 739 */ +/* 759 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143725,12 +147385,12 @@ module.exports = BetweenPointsY; /***/ }), -/* 740 */ +/* 760 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143759,12 +147419,12 @@ module.exports = BetweenY; /***/ }), -/* 741 */ +/* 761 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143804,16 +147464,16 @@ module.exports = CounterClockwise; /***/ }), -/* 742 */ +/* 762 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Normalize = __webpack_require__(318); +var Normalize = __webpack_require__(337); /** * Reverse the given angle. @@ -143834,12 +147494,12 @@ module.exports = Reverse; /***/ }), -/* 743 */ +/* 763 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143901,12 +147561,12 @@ module.exports = RotateTo; /***/ }), -/* 744 */ +/* 764 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143950,12 +147610,12 @@ module.exports = ShortestBetween; /***/ }), -/* 745 */ +/* 765 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143965,20 +147625,122 @@ module.exports = ShortestBetween; module.exports = { - Between: __webpack_require__(63), - Power: __webpack_require__(746), - Squared: __webpack_require__(319) + Between: __webpack_require__(54), + BetweenPoints: __webpack_require__(766), + BetweenPointsSquared: __webpack_require__(767), + Chebyshev: __webpack_require__(768), + Power: __webpack_require__(769), + Snake: __webpack_require__(770), + Squared: __webpack_require__(338) }; /***/ }), -/* 746 */ +/* 766 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the distance between two points. + * + * @function Phaser.Math.Distance.BetweenPoints + * @since 3.22.0 + * + * @param {Phaser.Types.Math.Vector2Like} a - The first point. + * @param {Phaser.Types.Math.Vector2Like} b - The second point. + * + * @return {number} The distance between the points. + */ +var DistanceBetweenPoints = function (a, b) +{ + var dx = a.x - b.x; + var dy = a.y - b.y; + + return Math.sqrt(dx * dx + dy * dy); +}; + +module.exports = DistanceBetweenPoints; + + +/***/ }), +/* 767 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the squared distance between two points. + * + * @function Phaser.Math.Distance.BetweenPointsSquared + * @since 3.22.0 + * + * @param {Phaser.Types.Math.Vector2Like} a - The first point. + * @param {Phaser.Types.Math.Vector2Like} b - The second point. + * + * @return {number} The squared distance between the points. + */ +var DistanceBetweenPointsSquared = function (a, b) +{ + var dx = a.x - b.x; + var dy = a.y - b.y; + + return dx * dx + dy * dy; +}; + +module.exports = DistanceBetweenPointsSquared; + + +/***/ }), +/* 768 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the Chebyshev distance between two sets of coordinates (points). + * + * Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances. + * It's the effective distance when movement can be horizontal, vertical, or diagonal. + * + * @function Phaser.Math.Distance.Chebyshev + * @since 3.22.0 + * + * @param {number} x1 - The x coordinate of the first point. + * @param {number} y1 - The y coordinate of the first point. + * @param {number} x2 - The x coordinate of the second point. + * @param {number} y2 - The y coordinate of the second point. + * + * @return {number} The distance between each point. + */ +var ChebyshevDistance = function (x1, y1, x2, y2) +{ + return Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2)); +}; + +module.exports = ChebyshevDistance; + + +/***/ }), +/* 769 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144007,12 +147769,46 @@ module.exports = DistancePower; /***/ }), -/* 747 */ +/* 770 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the snake distance between two sets of coordinates (points). + * + * Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances. + * It's the effective distance when movement is allowed only horizontally or vertically (but not both). + * + * @function Phaser.Math.Distance.Snake + * @since 3.22.0 + * + * @param {number} x1 - The x coordinate of the first point. + * @param {number} y1 - The y coordinate of the first point. + * @param {number} x2 - The x coordinate of the second point. + * @param {number} y2 - The y coordinate of the second point. + * + * @return {number} The distance between each point. + */ +var SnakeDistance = function (x1, y1, x2, y2) +{ + return Math.abs(x1 - x2) + Math.abs(y1 - y2); +}; + +module.exports = SnakeDistance; + + +/***/ }), +/* 771 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144022,29 +147818,29 @@ module.exports = DistancePower; module.exports = { - Back: __webpack_require__(302), - Bounce: __webpack_require__(303), - Circular: __webpack_require__(304), - Cubic: __webpack_require__(305), - Elastic: __webpack_require__(306), - Expo: __webpack_require__(307), - Linear: __webpack_require__(308), - Quadratic: __webpack_require__(309), - Quartic: __webpack_require__(310), - Quintic: __webpack_require__(311), - Sine: __webpack_require__(312), - Stepped: __webpack_require__(313) + Back: __webpack_require__(321), + Bounce: __webpack_require__(322), + Circular: __webpack_require__(323), + Cubic: __webpack_require__(324), + Elastic: __webpack_require__(325), + Expo: __webpack_require__(326), + Linear: __webpack_require__(327), + Quadratic: __webpack_require__(328), + Quartic: __webpack_require__(329), + Quintic: __webpack_require__(330), + Sine: __webpack_require__(331), + Stepped: __webpack_require__(332) }; /***/ }), -/* 748 */ +/* 772 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144054,22 +147850,22 @@ module.exports = { module.exports = { - Ceil: __webpack_require__(749), - Equal: __webpack_require__(178), - Floor: __webpack_require__(750), - GreaterThan: __webpack_require__(320), - LessThan: __webpack_require__(321) + Ceil: __webpack_require__(773), + Equal: __webpack_require__(126), + Floor: __webpack_require__(774), + GreaterThan: __webpack_require__(339), + LessThan: __webpack_require__(340) }; /***/ }), -/* 749 */ +/* 773 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144095,12 +147891,12 @@ module.exports = Ceil; /***/ }), -/* 750 */ +/* 774 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144126,12 +147922,12 @@ module.exports = Floor; /***/ }), -/* 751 */ +/* 775 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144141,28 +147937,28 @@ module.exports = Floor; module.exports = { - Bezier: __webpack_require__(752), - CatmullRom: __webpack_require__(753), - CubicBezier: __webpack_require__(324), - Linear: __webpack_require__(754), - QuadraticBezier: __webpack_require__(325), - SmoothStep: __webpack_require__(326), - SmootherStep: __webpack_require__(755) + Bezier: __webpack_require__(776), + CatmullRom: __webpack_require__(777), + CubicBezier: __webpack_require__(343), + Linear: __webpack_require__(778), + QuadraticBezier: __webpack_require__(344), + SmoothStep: __webpack_require__(345), + SmootherStep: __webpack_require__(779) }; /***/ }), -/* 752 */ +/* 776 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bernstein = __webpack_require__(322); +var Bernstein = __webpack_require__(341); /** * A bezier interpolation method. @@ -144192,16 +147988,16 @@ module.exports = BezierInterpolation; /***/ }), -/* 753 */ +/* 777 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CatmullRom = __webpack_require__(179); +var CatmullRom = __webpack_require__(182); /** * A Catmull-Rom interpolation method. @@ -144249,16 +148045,16 @@ module.exports = CatmullRomInterpolation; /***/ }), -/* 754 */ +/* 778 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Linear = __webpack_require__(121); +var Linear = __webpack_require__(123); /** * A linear interpolation method. @@ -144296,16 +148092,16 @@ module.exports = LinearInterpolation; /***/ }), -/* 755 */ +/* 779 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmootherStep = __webpack_require__(166); +var SmootherStep = __webpack_require__(170); /** * A Smoother Step interpolation method. @@ -144329,12 +148125,12 @@ module.exports = SmootherStepInterpolation; /***/ }), -/* 756 */ +/* 780 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144344,20 +148140,20 @@ module.exports = SmootherStepInterpolation; module.exports = { - GetNext: __webpack_require__(327), - IsSize: __webpack_require__(124), - IsValue: __webpack_require__(757) + GetNext: __webpack_require__(346), + IsSize: __webpack_require__(127), + IsValue: __webpack_require__(781) }; /***/ }), -/* 757 */ +/* 781 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144380,12 +148176,12 @@ module.exports = IsValuePowerOfTwo; /***/ }), -/* 758 */ +/* 782 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144395,20 +148191,20 @@ module.exports = IsValuePowerOfTwo; module.exports = { - Ceil: __webpack_require__(328), - Floor: __webpack_require__(103), - To: __webpack_require__(759) + Ceil: __webpack_require__(347), + Floor: __webpack_require__(105), + To: __webpack_require__(783) }; /***/ }), -/* 759 */ +/* 783 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144446,12 +148242,12 @@ module.exports = SnapTo; /***/ }), -/* 760 */ +/* 784 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144798,10 +148594,14 @@ var RandomDataGenerator = new Class({ * * @method Phaser.Math.RandomDataGenerator#pick * @since 3.0.0 + * + * @generic T + * @genericUse {T[]} - [array] + * @genericUse {T} - [$return] * - * @param {array} array - The array to pick a random element from. + * @param {T[]} array - The array to pick a random element from. * - * @return {*} A random member of the array. + * @return {T} A random member of the array. */ pick: function (array) { @@ -144827,9 +148627,13 @@ var RandomDataGenerator = new Class({ * @method Phaser.Math.RandomDataGenerator#weightedPick * @since 3.0.0 * - * @param {array} array - The array to pick a random element from. + * @generic T + * @genericUse {T[]} - [array] + * @genericUse {T} - [$return] * - * @return {*} A random member of the array. + * @param {T[]} array - The array to pick a random element from. + * + * @return {T} A random member of the array. */ weightedPick: function (array) { @@ -144919,9 +148723,12 @@ var RandomDataGenerator = new Class({ * @method Phaser.Math.RandomDataGenerator#shuffle * @since 3.7.0 * - * @param {array} [array] - The array to be shuffled. + * @generic T + * @genericUse {T[]} - [array,$return] * - * @return {array} The shuffled array. + * @param {T[]} [array] - The array to be shuffled. + * + * @return {T[]} The shuffled array. */ shuffle: function (array) { @@ -144945,12 +148752,12 @@ module.exports = RandomDataGenerator; /***/ }), -/* 761 */ +/* 785 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144980,12 +148787,12 @@ module.exports = Average; /***/ }), -/* 762 */ +/* 786 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145017,12 +148824,12 @@ module.exports = CeilTo; /***/ }), -/* 763 */ +/* 787 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145046,12 +148853,12 @@ module.exports = Difference; /***/ }), -/* 764 */ +/* 788 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145083,25 +148890,29 @@ module.exports = FloorTo; /***/ }), -/* 765 */ +/* 789 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * Calculate the speed required to cover a distance in the time given. + * Calculate a per-ms speed from a distance and time (given in seconds). * * @function Phaser.Math.GetSpeed * @since 3.0.0 * - * @param {number} distance - The distance to travel in pixels. - * @param {integer} time - The time, in ms, to cover the distance in. + * @param {number} distance - The distance. + * @param {integer} time - The time, in seconds. * - * @return {number} The amount you will need to increment the position by each step in order to cover the distance in the time given. + * @return {number} The speed, in distance per ms. + * + * @example + * // 400px over 1 second is 0.4 px/ms + * Phaser.Math.GetSpeed(400, 1) // -> 0.4 */ var GetSpeed = function (distance, time) { @@ -145112,12 +148923,12 @@ module.exports = GetSpeed; /***/ }), -/* 766 */ +/* 790 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145143,12 +148954,12 @@ module.exports = IsEven; /***/ }), -/* 767 */ +/* 791 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145172,12 +148983,12 @@ module.exports = IsEvenStrict; /***/ }), -/* 768 */ +/* 792 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145202,12 +149013,12 @@ module.exports = MaxAdd; /***/ }), -/* 769 */ +/* 793 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145232,12 +149043,12 @@ module.exports = MinSub; /***/ }), -/* 770 */ +/* 794 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145291,12 +149102,12 @@ module.exports = Percent; /***/ }), -/* 771 */ +/* 795 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145331,12 +149142,12 @@ module.exports = RandomXY; /***/ }), -/* 772 */ +/* 796 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145370,12 +149181,12 @@ module.exports = RandomXYZ; /***/ }), -/* 773 */ +/* 797 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145407,12 +149218,12 @@ module.exports = RandomXYZW; /***/ }), -/* 774 */ +/* 798 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145459,12 +149270,12 @@ module.exports = RoundTo; /***/ }), -/* 775 */ +/* 799 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145512,23 +149323,23 @@ module.exports = SinCosTableGenerator; /***/ }), -/* 776 */ +/* 800 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Vector2 = __webpack_require__(3); /** - * Returns a Vec2 containing the x and y position of the given index in a `width` x `height` sized grid. + * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid. * * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2. * - * If the given index is out of range an empty Vec2 is returned. + * If the given index is out of range an empty Vector2 is returned. * * @function Phaser.Math.ToXY * @since 3.19.0 @@ -145570,12 +149381,12 @@ module.exports = ToXY; /***/ }), -/* 777 */ +/* 801 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145600,18 +149411,18 @@ module.exports = Within; /***/ }), -/* 778 */ +/* 802 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector3 = __webpack_require__(182); -var Matrix4 = __webpack_require__(335); -var Quaternion = __webpack_require__(336); +var Vector3 = __webpack_require__(185); +var Matrix4 = __webpack_require__(354); +var Quaternion = __webpack_require__(355); var tmpMat4 = new Matrix4(); var tmpQuat = new Quaternion(); @@ -145648,12 +149459,12 @@ module.exports = RotateVec3; /***/ }), -/* 779 */ +/* 803 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145674,12 +149485,12 @@ module.exports = 'addtexture'; /***/ }), -/* 780 */ +/* 804 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145700,12 +149511,12 @@ module.exports = 'onerror'; /***/ }), -/* 781 */ +/* 805 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145729,12 +149540,12 @@ module.exports = 'onload'; /***/ }), -/* 782 */ +/* 806 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145752,12 +149563,12 @@ module.exports = 'ready'; /***/ }), -/* 783 */ +/* 807 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145780,7 +149591,7 @@ module.exports = 'removetexture'; /***/ }), -/* 784 */ +/* 808 */ /***/ (function(module, exports) { module.exports = [ @@ -145816,7 +149627,7 @@ module.exports = [ /***/ }), -/* 785 */ +/* 809 */ /***/ (function(module, exports) { module.exports = [ @@ -145835,7 +149646,7 @@ module.exports = [ /***/ }), -/* 786 */ +/* 810 */ /***/ (function(module, exports) { module.exports = [ @@ -145894,7 +149705,7 @@ module.exports = [ /***/ }), -/* 787 */ +/* 811 */ /***/ (function(module, exports) { module.exports = [ @@ -145938,7 +149749,7 @@ module.exports = [ /***/ }), -/* 788 */ +/* 812 */ /***/ (function(module, exports) { module.exports = [ @@ -145973,12 +149784,12 @@ module.exports = [ /***/ }), -/* 789 */ +/* 813 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145988,19 +149799,19 @@ module.exports = [ module.exports = { - GenerateTexture: __webpack_require__(351), - Palettes: __webpack_require__(790) + GenerateTexture: __webpack_require__(370), + Palettes: __webpack_require__(814) }; /***/ }), -/* 790 */ +/* 814 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146010,22 +149821,22 @@ module.exports = { module.exports = { - ARNE16: __webpack_require__(352), - C64: __webpack_require__(791), - CGA: __webpack_require__(792), - JMP: __webpack_require__(793), - MSX: __webpack_require__(794) + ARNE16: __webpack_require__(371), + C64: __webpack_require__(815), + CGA: __webpack_require__(816), + JMP: __webpack_require__(817), + MSX: __webpack_require__(818) }; /***/ }), -/* 791 */ +/* 815 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146058,12 +149869,12 @@ module.exports = { /***/ }), -/* 792 */ +/* 816 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146096,12 +149907,12 @@ module.exports = { /***/ }), -/* 793 */ +/* 817 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146134,12 +149945,12 @@ module.exports = { /***/ }), -/* 794 */ +/* 818 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146172,12 +149983,12 @@ module.exports = { /***/ }), -/* 795 */ +/* 819 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146186,38 +149997,38 @@ module.exports = { */ module.exports = { - Path: __webpack_require__(796), + Path: __webpack_require__(820), - CubicBezier: __webpack_require__(353), - Curve: __webpack_require__(85), - Ellipse: __webpack_require__(354), - Line: __webpack_require__(355), - QuadraticBezier: __webpack_require__(356), - Spline: __webpack_require__(357) + CubicBezier: __webpack_require__(372), + Curve: __webpack_require__(86), + Ellipse: __webpack_require__(373), + Line: __webpack_require__(374), + QuadraticBezier: __webpack_require__(375), + Spline: __webpack_require__(376) }; /***/ }), -/* 796 */ +/* 820 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) var Class = __webpack_require__(0); -var CubicBezierCurve = __webpack_require__(353); -var EllipseCurve = __webpack_require__(354); +var CubicBezierCurve = __webpack_require__(372); +var EllipseCurve = __webpack_require__(373); var GameObjectFactory = __webpack_require__(6); -var LineCurve = __webpack_require__(355); -var MovePathTo = __webpack_require__(797); -var QuadraticBezierCurve = __webpack_require__(356); +var LineCurve = __webpack_require__(374); +var MovePathTo = __webpack_require__(821); +var QuadraticBezierCurve = __webpack_require__(375); var Rectangle = __webpack_require__(11); -var SplineCurve = __webpack_require__(357); +var SplineCurve = __webpack_require__(376); var Vector2 = __webpack_require__(3); var MATH_CONST = __webpack_require__(13); @@ -146401,12 +150212,12 @@ var Path = new Class({ * @method Phaser.Curves.Path#cubicBezierTo * @since 3.0.0 * - * @param {(number|Phaser.Math.Vector2)} x - The x coordinate of the end point. Or, if a Vec2, the p1 value. - * @param {(number|Phaser.Math.Vector2)} y - The y coordinate of the end point. Or, if a Vec2, the p2 value. - * @param {(number|Phaser.Math.Vector2)} control1X - The x coordinate of the first control point. Or, if a Vec2, the p3 value. - * @param {number} [control1Y] - The y coordinate of the first control point. Not used if vec2s are provided as the first 3 arguments. - * @param {number} [control2X] - The x coordinate of the second control point. Not used if vec2s are provided as the first 3 arguments. - * @param {number} [control2Y] - The y coordinate of the second control point. Not used if vec2s are provided as the first 3 arguments. + * @param {(number|Phaser.Math.Vector2)} x - The x coordinate of the end point. Or, if a Vector2, the p1 value. + * @param {(number|Phaser.Math.Vector2)} y - The y coordinate of the end point. Or, if a Vector2, the p2 value. + * @param {(number|Phaser.Math.Vector2)} control1X - The x coordinate of the first control point. Or, if a Vector2, the p3 value. + * @param {number} [control1Y] - The y coordinate of the first control point. Not used if Vector2s are provided as the first 3 arguments. + * @param {number} [control2X] - The x coordinate of the second control point. Not used if Vector2s are provided as the first 3 arguments. + * @param {number} [control2Y] - The y coordinate of the second control point. Not used if Vector2s are provided as the first 3 arguments. * * @return {Phaser.Curves.Path} This Path object. */ @@ -146417,7 +150228,7 @@ var Path = new Class({ var p2; var p3; - // Assume they're all vec2s + // Assume they're all Vector2s if (x instanceof Vector2) { p1 = x; @@ -146455,7 +150266,7 @@ var Path = new Class({ var p1; var p2; - // Assume they're all vec2s + // Assume they're all Vector2s if (x instanceof Vector2) { p1 = x; @@ -146772,14 +150583,12 @@ var Path = new Class({ }, /** - * Returns the defined starting point of the Path. - * - * This is not necessarily equal to the starting point of the first Curve if it differs from {@link startPoint}. + * Get a sequence of points on the path. * * @method Phaser.Curves.Path#getPoints * @since 3.0.0 * - * @param {integer} [divisions=12] - The number of points to divide the path in to. + * @param {integer} [divisions=12] - The number of divisions per resolution per curve. * * @return {Phaser.Math.Vector2[]} An array of Vector2 objects that containing the points along the Path. */ @@ -146829,7 +150638,7 @@ var Path = new Class({ /** * Returns a randomly chosen point anywhere on the path. This follows the same rules as `getPoint` in that it may return a point on any Curve inside this path. - * + * * When calling this method multiple times, the points are not guaranteed to be equally spaced spatially. * * @method Phaser.Curves.Path#getRandomPoint @@ -146850,7 +150659,7 @@ var Path = new Class({ /** * Divides this Path into a set of equally spaced points, - * + * * The resulting points are equally spaced with respect to the points' position on the path, but not necessarily equally spaced spatially. * * @method Phaser.Curves.Path#getSpacedPoints @@ -146944,7 +150753,7 @@ var Path = new Class({ /** * Creates a "gap" in this path from the path's current end point to the given coordinates. - * + * * After calling this function, this Path's end point will be equal to the given coordinates * * @method Phaser.Curves.Path#moveTo @@ -147049,12 +150858,12 @@ module.exports = Path; /***/ }), -/* 797 */ +/* 821 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -147189,12 +150998,12 @@ module.exports = MoveTo; /***/ }), -/* 798 */ +/* 822 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -147204,27 +151013,27 @@ module.exports = MoveTo; module.exports = { - DataManager: __webpack_require__(99), - DataManagerPlugin: __webpack_require__(799), - Events: __webpack_require__(284) + DataManager: __webpack_require__(101), + DataManagerPlugin: __webpack_require__(823), + Events: __webpack_require__(303) }; /***/ }), -/* 799 */ +/* 823 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var DataManager = __webpack_require__(99); -var PluginCache = __webpack_require__(20); -var SceneEvents = __webpack_require__(21); +var DataManager = __webpack_require__(101); +var PluginCache = __webpack_require__(22); +var SceneEvents = __webpack_require__(18); /** * @classdesc @@ -147339,12 +151148,12 @@ module.exports = DataManagerPlugin; /***/ }), -/* 800 */ +/* 824 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -147354,27 +151163,27 @@ module.exports = DataManagerPlugin; module.exports = { - Align: __webpack_require__(801), - BaseShader: __webpack_require__(358), - Bounds: __webpack_require__(816), - Canvas: __webpack_require__(819), - Color: __webpack_require__(359), - Masks: __webpack_require__(828) + Align: __webpack_require__(825), + BaseShader: __webpack_require__(377), + Bounds: __webpack_require__(828), + Canvas: __webpack_require__(831), + Color: __webpack_require__(378), + Masks: __webpack_require__(840) }; /***/ }), -/* 801 */ +/* 825 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(153); +var CONST = __webpack_require__(97); var Extend = __webpack_require__(17); /** @@ -147383,8 +151192,8 @@ var Extend = __webpack_require__(17); var Align = { - In: __webpack_require__(802), - To: __webpack_require__(803) + In: __webpack_require__(826), + To: __webpack_require__(827) }; @@ -147395,12 +151204,12 @@ module.exports = Align; /***/ }), -/* 802 */ +/* 826 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -147410,27 +151219,27 @@ module.exports = Align; module.exports = { - BottomCenter: __webpack_require__(255), - BottomLeft: __webpack_require__(256), - BottomRight: __webpack_require__(257), - Center: __webpack_require__(258), - LeftCenter: __webpack_require__(260), - QuickSet: __webpack_require__(254), - RightCenter: __webpack_require__(261), - TopCenter: __webpack_require__(262), - TopLeft: __webpack_require__(263), - TopRight: __webpack_require__(264) + BottomCenter: __webpack_require__(274), + BottomLeft: __webpack_require__(275), + BottomRight: __webpack_require__(276), + Center: __webpack_require__(277), + LeftCenter: __webpack_require__(279), + QuickSet: __webpack_require__(273), + RightCenter: __webpack_require__(280), + TopCenter: __webpack_require__(281), + TopLeft: __webpack_require__(282), + TopRight: __webpack_require__(283) }; /***/ }), -/* 803 */ +/* 827 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -147440,557 +151249,30 @@ module.exports = { module.exports = { - BottomCenter: __webpack_require__(804), - BottomLeft: __webpack_require__(805), - BottomRight: __webpack_require__(806), - LeftBottom: __webpack_require__(807), - LeftCenter: __webpack_require__(808), - LeftTop: __webpack_require__(809), - RightBottom: __webpack_require__(810), - RightCenter: __webpack_require__(811), - RightTop: __webpack_require__(812), - TopCenter: __webpack_require__(813), - TopLeft: __webpack_require__(814), - TopRight: __webpack_require__(815) + BottomCenter: __webpack_require__(261), + BottomLeft: __webpack_require__(262), + BottomRight: __webpack_require__(263), + LeftBottom: __webpack_require__(264), + LeftCenter: __webpack_require__(265), + LeftTop: __webpack_require__(266), + QuickSet: __webpack_require__(260), + RightBottom: __webpack_require__(267), + RightCenter: __webpack_require__(268), + RightTop: __webpack_require__(269), + TopCenter: __webpack_require__(270), + TopLeft: __webpack_require__(271), + TopRight: __webpack_require__(272) }; /***/ }), -/* 804 */ +/* 828 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetBottom = __webpack_require__(43); -var GetCenterX = __webpack_require__(80); -var SetCenterX = __webpack_require__(81); -var SetTop = __webpack_require__(50); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the bottom center position of the other. - * - * @function Phaser.Display.Align.To.BottomCenter - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var BottomCenter = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetCenterX(gameObject, GetCenterX(alignTo) + offsetX); - SetTop(gameObject, GetBottom(alignTo) + offsetY); - - return gameObject; -}; - -module.exports = BottomCenter; - - -/***/ }), -/* 805 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetBottom = __webpack_require__(43); -var GetLeft = __webpack_require__(45); -var SetLeft = __webpack_require__(46); -var SetTop = __webpack_require__(50); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the bottom left position of the other. - * - * @function Phaser.Display.Align.To.BottomLeft - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var BottomLeft = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetLeft(gameObject, GetLeft(alignTo) - offsetX); - SetTop(gameObject, GetBottom(alignTo) + offsetY); - - return gameObject; -}; - -module.exports = BottomLeft; - - -/***/ }), -/* 806 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetBottom = __webpack_require__(43); -var GetRight = __webpack_require__(47); -var SetRight = __webpack_require__(48); -var SetTop = __webpack_require__(50); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the bottom right position of the other. - * - * @function Phaser.Display.Align.To.BottomRight - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var BottomRight = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetRight(gameObject, GetRight(alignTo) + offsetX); - SetTop(gameObject, GetBottom(alignTo) + offsetY); - - return gameObject; -}; - -module.exports = BottomRight; - - -/***/ }), -/* 807 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetBottom = __webpack_require__(43); -var GetLeft = __webpack_require__(45); -var SetBottom = __webpack_require__(44); -var SetRight = __webpack_require__(48); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the left bottom position of the other. - * - * @function Phaser.Display.Align.To.LeftBottom - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var LeftBottom = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetRight(gameObject, GetLeft(alignTo) - offsetX); - SetBottom(gameObject, GetBottom(alignTo) + offsetY); - - return gameObject; -}; - -module.exports = LeftBottom; - - -/***/ }), -/* 808 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetCenterY = __webpack_require__(83); -var GetLeft = __webpack_require__(45); -var SetCenterY = __webpack_require__(82); -var SetRight = __webpack_require__(48); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the left center position of the other. - * - * @function Phaser.Display.Align.To.LeftCenter - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var LeftCenter = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetRight(gameObject, GetLeft(alignTo) - offsetX); - SetCenterY(gameObject, GetCenterY(alignTo) + offsetY); - - return gameObject; -}; - -module.exports = LeftCenter; - - -/***/ }), -/* 809 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetLeft = __webpack_require__(45); -var GetTop = __webpack_require__(49); -var SetRight = __webpack_require__(48); -var SetTop = __webpack_require__(50); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the left top position of the other. - * - * @function Phaser.Display.Align.To.LeftTop - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var LeftTop = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetRight(gameObject, GetLeft(alignTo) - offsetX); - SetTop(gameObject, GetTop(alignTo) - offsetY); - - return gameObject; -}; - -module.exports = LeftTop; - - -/***/ }), -/* 810 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetBottom = __webpack_require__(43); -var GetRight = __webpack_require__(47); -var SetBottom = __webpack_require__(44); -var SetLeft = __webpack_require__(46); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the right bottom position of the other. - * - * @function Phaser.Display.Align.To.RightBottom - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var RightBottom = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetLeft(gameObject, GetRight(alignTo) + offsetX); - SetBottom(gameObject, GetBottom(alignTo) + offsetY); - - return gameObject; -}; - -module.exports = RightBottom; - - -/***/ }), -/* 811 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetCenterY = __webpack_require__(83); -var GetRight = __webpack_require__(47); -var SetCenterY = __webpack_require__(82); -var SetLeft = __webpack_require__(46); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the right center position of the other. - * - * @function Phaser.Display.Align.To.RightCenter - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var RightCenter = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetLeft(gameObject, GetRight(alignTo) + offsetX); - SetCenterY(gameObject, GetCenterY(alignTo) + offsetY); - - return gameObject; -}; - -module.exports = RightCenter; - - -/***/ }), -/* 812 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetRight = __webpack_require__(47); -var GetTop = __webpack_require__(49); -var SetLeft = __webpack_require__(46); -var SetTop = __webpack_require__(50); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the right top position of the other. - * - * @function Phaser.Display.Align.To.RightTop - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var RightTop = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetLeft(gameObject, GetRight(alignTo) + offsetX); - SetTop(gameObject, GetTop(alignTo) - offsetY); - - return gameObject; -}; - -module.exports = RightTop; - - -/***/ }), -/* 813 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetCenterX = __webpack_require__(80); -var GetTop = __webpack_require__(49); -var SetBottom = __webpack_require__(44); -var SetCenterX = __webpack_require__(81); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the top center position of the other. - * - * @function Phaser.Display.Align.To.TopCenter - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var TopCenter = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetCenterX(gameObject, GetCenterX(alignTo) + offsetX); - SetBottom(gameObject, GetTop(alignTo) - offsetY); - - return gameObject; -}; - -module.exports = TopCenter; - - -/***/ }), -/* 814 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetLeft = __webpack_require__(45); -var GetTop = __webpack_require__(49); -var SetBottom = __webpack_require__(44); -var SetLeft = __webpack_require__(46); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the top left position of the other. - * - * @function Phaser.Display.Align.To.TopLeft - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var TopLeft = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetLeft(gameObject, GetLeft(alignTo) - offsetX); - SetBottom(gameObject, GetTop(alignTo) - offsetY); - - return gameObject; -}; - -module.exports = TopLeft; - - -/***/ }), -/* 815 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetRight = __webpack_require__(47); -var GetTop = __webpack_require__(49); -var SetBottom = __webpack_require__(44); -var SetRight = __webpack_require__(48); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the top right position of the other. - * - * @function Phaser.Display.Align.To.TopRight - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var TopRight = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetRight(gameObject, GetRight(alignTo) + offsetX); - SetBottom(gameObject, GetTop(alignTo) - offsetY); - - return gameObject; -}; - -module.exports = TopRight; - - -/***/ }), -/* 816 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -148000,32 +151282,32 @@ module.exports = TopRight; module.exports = { - CenterOn: __webpack_require__(259), - GetBottom: __webpack_require__(43), - GetCenterX: __webpack_require__(80), + CenterOn: __webpack_require__(278), + GetBottom: __webpack_require__(44), + GetCenterX: __webpack_require__(81), GetCenterY: __webpack_require__(83), - GetLeft: __webpack_require__(45), - GetOffsetX: __webpack_require__(817), - GetOffsetY: __webpack_require__(818), - GetRight: __webpack_require__(47), - GetTop: __webpack_require__(49), - SetBottom: __webpack_require__(44), - SetCenterX: __webpack_require__(81), - SetCenterY: __webpack_require__(82), - SetLeft: __webpack_require__(46), - SetRight: __webpack_require__(48), - SetTop: __webpack_require__(50) + GetLeft: __webpack_require__(46), + GetOffsetX: __webpack_require__(829), + GetOffsetY: __webpack_require__(830), + GetRight: __webpack_require__(48), + GetTop: __webpack_require__(51), + SetBottom: __webpack_require__(50), + SetCenterX: __webpack_require__(82), + SetCenterY: __webpack_require__(84), + SetLeft: __webpack_require__(47), + SetRight: __webpack_require__(49), + SetTop: __webpack_require__(45) }; /***/ }), -/* 817 */ +/* 829 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -148050,12 +151332,12 @@ module.exports = GetOffsetX; /***/ }), -/* 818 */ +/* 830 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -148080,12 +151362,12 @@ module.exports = GetOffsetY; /***/ }), -/* 819 */ +/* 831 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -148095,22 +151377,22 @@ module.exports = GetOffsetY; module.exports = { - CanvasInterpolation: __webpack_require__(338), + CanvasInterpolation: __webpack_require__(357), CanvasPool: __webpack_require__(28), - Smoothing: __webpack_require__(173), - TouchAction: __webpack_require__(820), - UserSelect: __webpack_require__(821) + Smoothing: __webpack_require__(177), + TouchAction: __webpack_require__(832), + UserSelect: __webpack_require__(833) }; /***/ }), -/* 820 */ +/* 832 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -148140,12 +151422,12 @@ module.exports = TouchAction; /***/ }), -/* 821 */ +/* 833 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -148187,12 +151469,12 @@ module.exports = UserSelect; /***/ }), -/* 822 */ +/* 834 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -148227,17 +151509,17 @@ module.exports = ColorToRGBA; /***/ }), -/* 823 */ +/* 835 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Color = __webpack_require__(36); -var HueToComponent = __webpack_require__(361); +var HueToComponent = __webpack_require__(380); /** * Converts HSL (hue, saturation and lightness) values to a Phaser Color object. @@ -148277,16 +151559,16 @@ module.exports = HSLToColor; /***/ }), -/* 824 */ +/* 836 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HSVToRGB = __webpack_require__(172); +var HSVToRGB = __webpack_require__(176); /** * Get HSV color wheel values in an array which will be 360 elements in size. @@ -148318,16 +151600,16 @@ module.exports = HSVColorWheel; /***/ }), -/* 825 */ +/* 837 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Linear = __webpack_require__(121); +var Linear = __webpack_require__(123); /** * @namespace Phaser.Display.Color.Interpolate @@ -148426,16 +151708,16 @@ module.exports = { /***/ }), -/* 826 */ +/* 838 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Between = __webpack_require__(180); +var Between = __webpack_require__(183); var Color = __webpack_require__(36); /** @@ -148462,16 +151744,16 @@ module.exports = RandomRGB; /***/ }), -/* 827 */ +/* 839 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ComponentToHex = __webpack_require__(360); +var ComponentToHex = __webpack_require__(379); /** * Converts the color values into an HTML compatible color string, prefixed with either `#` or `0x`. @@ -148506,12 +151788,12 @@ module.exports = RGBToString; /***/ }), -/* 828 */ +/* 840 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -148521,19 +151803,19 @@ module.exports = RGBToString; module.exports = { - BitmapMask: __webpack_require__(278), - GeometryMask: __webpack_require__(279) + BitmapMask: __webpack_require__(297), + GeometryMask: __webpack_require__(298) }; /***/ }), -/* 829 */ +/* 841 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -148543,13 +151825,13 @@ module.exports = { var Dom = { - AddToDOM: __webpack_require__(126), - DOMContentLoaded: __webpack_require__(362), - GetScreenOrientation: __webpack_require__(363), - GetTarget: __webpack_require__(368), - ParseXML: __webpack_require__(369), - RemoveFromDOM: __webpack_require__(188), - RequestAnimationFrame: __webpack_require__(349) + AddToDOM: __webpack_require__(129), + DOMContentLoaded: __webpack_require__(381), + GetScreenOrientation: __webpack_require__(382), + GetTarget: __webpack_require__(387), + ParseXML: __webpack_require__(388), + RemoveFromDOM: __webpack_require__(191), + RequestAnimationFrame: __webpack_require__(368) }; @@ -148557,12 +151839,12 @@ module.exports = Dom; /***/ }), -/* 830 */ +/* 842 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -148570,22 +151852,22 @@ module.exports = Dom; * @namespace Phaser.Events */ -module.exports = { EventEmitter: __webpack_require__(831) }; +module.exports = { EventEmitter: __webpack_require__(843) }; /***/ }), -/* 831 */ +/* 843 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var EE = __webpack_require__(9); -var PluginCache = __webpack_require__(20); +var PluginCache = __webpack_require__(22); /** * @classdesc @@ -148637,7 +151919,7 @@ var EventEmitter = new Class({ * @method Phaser.Events.EventEmitter#eventNames * @since 3.0.0 * - * @return {array} + * @return {Array.} */ /** @@ -148648,7 +151930,7 @@ var EventEmitter = new Class({ * * @param {(string|symbol)} event - The event name. * - * @return {array} The registered listeners. + * @return {Function[]} The registered listeners. */ /** @@ -148684,7 +151966,7 @@ var EventEmitter = new Class({ * @param {function} fn - The listener function. * @param {*} [context=this] - The context to invoke the listener with. * - * @return {Phaser.Events.EventEmitter} `this`. + * @return {this} `this`. */ /** @@ -148697,7 +151979,7 @@ var EventEmitter = new Class({ * @param {function} fn - The listener function. * @param {*} [context=this] - The context to invoke the listener with. * - * @return {Phaser.Events.EventEmitter} `this`. + * @return {this} `this`. */ /** @@ -148710,7 +151992,7 @@ var EventEmitter = new Class({ * @param {function} fn - The listener function. * @param {*} [context=this] - The context to invoke the listener with. * - * @return {Phaser.Events.EventEmitter} `this`. + * @return {this} `this`. */ /** @@ -148724,7 +152006,7 @@ var EventEmitter = new Class({ * @param {*} [context] - Only remove the listeners that have this context. * @param {boolean} [once] - Only remove one-time listeners. * - * @return {Phaser.Events.EventEmitter} `this`. + * @return {this} `this`. */ /** @@ -148738,7 +152020,7 @@ var EventEmitter = new Class({ * @param {*} [context] - Only remove the listeners that have this context. * @param {boolean} [once] - Only remove one-time listeners. * - * @return {Phaser.Events.EventEmitter} `this`. + * @return {this} `this`. */ /** @@ -148749,7 +152031,7 @@ var EventEmitter = new Class({ * * @param {(string|symbol)} [event] - The event name. * - * @return {Phaser.Events.EventEmitter} `this`. + * @return {this} `this`. */ PluginCache.register('EventEmitter', EventEmitter, 'events'); @@ -148758,47 +152040,47 @@ module.exports = EventEmitter; /***/ }), -/* 832 */ +/* 844 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(126); -var AnimationManager = __webpack_require__(289); -var CacheManager = __webpack_require__(292); +var AddToDOM = __webpack_require__(129); +var AnimationManager = __webpack_require__(308); +var CacheManager = __webpack_require__(311); var CanvasPool = __webpack_require__(28); var Class = __webpack_require__(0); -var Config = __webpack_require__(314); -var CreateDOMContainer = __webpack_require__(833); -var CreateRenderer = __webpack_require__(337); -var DataManager = __webpack_require__(99); -var DebugHeader = __webpack_require__(347); -var Device = __webpack_require__(315); -var DOMContentLoaded = __webpack_require__(362); +var Config = __webpack_require__(333); +var CreateDOMContainer = __webpack_require__(845); +var CreateRenderer = __webpack_require__(356); +var DataManager = __webpack_require__(101); +var DebugHeader = __webpack_require__(366); +var Device = __webpack_require__(334); +var DOMContentLoaded = __webpack_require__(381); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(19); -var InputManager = __webpack_require__(370); -var PluginCache = __webpack_require__(20); -var PluginManager = __webpack_require__(375); -var ScaleManager = __webpack_require__(376); -var SceneManager = __webpack_require__(378); -var TextureEvents = __webpack_require__(125); -var TextureManager = __webpack_require__(381); -var TimeStep = __webpack_require__(348); -var VisibilityHandler = __webpack_require__(350); +var Events = __webpack_require__(21); +var InputManager = __webpack_require__(389); +var PluginCache = __webpack_require__(22); +var PluginManager = __webpack_require__(394); +var ScaleManager = __webpack_require__(395); +var SceneManager = __webpack_require__(397); +var TextureEvents = __webpack_require__(128); +var TextureManager = __webpack_require__(400); +var TimeStep = __webpack_require__(367); +var VisibilityHandler = __webpack_require__(369); if (true) { - var SoundManagerCreator = __webpack_require__(385); + var SoundManagerCreator = __webpack_require__(404); } if (true) { - var FacebookInstantGamesPlugin = __webpack_require__(393); + var FacebookInstantGamesPlugin = __webpack_require__(412); } /** @@ -149434,12 +152716,12 @@ var Game = new Class({ */ runDestroy: function () { + this.scene.destroy(); + this.events.emit(Events.DESTROY); this.events.removeAllListeners(); - this.scene.destroy(); - if (this.renderer) { this.renderer.destroy(); @@ -149475,16 +152757,16 @@ module.exports = Game; /***/ }), -/* 833 */ +/* 845 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(126); +var AddToDOM = __webpack_require__(129); var CreateDOMContainer = function (game) { @@ -149519,12 +152801,12 @@ module.exports = CreateDOMContainer; /***/ }), -/* 834 */ +/* 846 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149540,12 +152822,12 @@ module.exports = 'boot'; /***/ }), -/* 835 */ +/* 847 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149561,12 +152843,12 @@ module.exports = 'destroy'; /***/ }), -/* 836 */ +/* 848 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149589,12 +152871,12 @@ module.exports = 'dragend'; /***/ }), -/* 837 */ +/* 849 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149620,12 +152902,12 @@ module.exports = 'dragenter'; /***/ }), -/* 838 */ +/* 850 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149652,12 +152934,12 @@ module.exports = 'drag'; /***/ }), -/* 839 */ +/* 851 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149683,12 +152965,12 @@ module.exports = 'dragleave'; /***/ }), -/* 840 */ +/* 852 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149717,12 +152999,12 @@ module.exports = 'dragover'; /***/ }), -/* 841 */ +/* 853 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149747,12 +153029,12 @@ module.exports = 'dragstart'; /***/ }), -/* 842 */ +/* 854 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149776,12 +153058,12 @@ module.exports = 'drop'; /***/ }), -/* 843 */ +/* 855 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149803,12 +153085,12 @@ module.exports = 'gameout'; /***/ }), -/* 844 */ +/* 856 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149830,12 +153112,12 @@ module.exports = 'gameover'; /***/ }), -/* 845 */ +/* 857 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149871,12 +153153,12 @@ module.exports = 'gameobjectdown'; /***/ }), -/* 846 */ +/* 858 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149902,12 +153184,12 @@ module.exports = 'dragend'; /***/ }), -/* 847 */ +/* 859 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149932,12 +153214,12 @@ module.exports = 'dragenter'; /***/ }), -/* 848 */ +/* 860 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149963,12 +153245,12 @@ module.exports = 'drag'; /***/ }), -/* 849 */ +/* 861 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149993,12 +153275,12 @@ module.exports = 'dragleave'; /***/ }), -/* 850 */ +/* 862 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150026,12 +153308,12 @@ module.exports = 'dragover'; /***/ }), -/* 851 */ +/* 863 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150060,12 +153342,12 @@ module.exports = 'dragstart'; /***/ }), -/* 852 */ +/* 864 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150090,12 +153372,12 @@ module.exports = 'drop'; /***/ }), -/* 853 */ +/* 865 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150131,12 +153413,12 @@ module.exports = 'gameobjectmove'; /***/ }), -/* 854 */ +/* 866 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150172,12 +153454,12 @@ module.exports = 'gameobjectout'; /***/ }), -/* 855 */ +/* 867 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150213,12 +153495,12 @@ module.exports = 'gameobjectover'; /***/ }), -/* 856 */ +/* 868 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150254,12 +153536,12 @@ module.exports = 'pointerdown'; /***/ }), -/* 857 */ +/* 869 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150295,12 +153577,12 @@ module.exports = 'pointermove'; /***/ }), -/* 858 */ +/* 870 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150334,12 +153616,12 @@ module.exports = 'pointerout'; /***/ }), -/* 859 */ +/* 871 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150375,12 +153657,12 @@ module.exports = 'pointerover'; /***/ }), -/* 860 */ +/* 872 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150416,12 +153698,12 @@ module.exports = 'pointerup'; /***/ }), -/* 861 */ +/* 873 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150458,12 +153740,12 @@ module.exports = 'wheel'; /***/ }), -/* 862 */ +/* 874 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150499,12 +153781,12 @@ module.exports = 'gameobjectup'; /***/ }), -/* 863 */ +/* 875 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150543,12 +153825,12 @@ module.exports = 'gameobjectwheel'; /***/ }), -/* 864 */ +/* 876 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150564,12 +153846,12 @@ module.exports = 'boot'; /***/ }), -/* 865 */ +/* 877 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150589,12 +153871,12 @@ module.exports = 'process'; /***/ }), -/* 866 */ +/* 878 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150610,12 +153892,12 @@ module.exports = 'update'; /***/ }), -/* 867 */ +/* 879 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150645,12 +153927,12 @@ module.exports = 'pointerdown'; /***/ }), -/* 868 */ +/* 880 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150679,12 +153961,12 @@ module.exports = 'pointerdownoutside'; /***/ }), -/* 869 */ +/* 881 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150714,12 +153996,12 @@ module.exports = 'pointermove'; /***/ }), -/* 870 */ +/* 882 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150728,7 +154010,7 @@ module.exports = 'pointermove'; * * This event is dispatched by the Input Plugin belonging to a Scene if a pointer moves out of any interactive Game Object. * - * Listen to this event from within a Scene using: `this.input.on('pointerup', listener)`. + * Listen to this event from within a Scene using: `this.input.on('pointerout', listener)`. * * The event hierarchy is as follows: * @@ -150749,12 +154031,12 @@ module.exports = 'pointerout'; /***/ }), -/* 871 */ +/* 883 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150784,12 +154066,12 @@ module.exports = 'pointerover'; /***/ }), -/* 872 */ +/* 884 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150819,12 +154101,12 @@ module.exports = 'pointerup'; /***/ }), -/* 873 */ +/* 885 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150853,12 +154135,12 @@ module.exports = 'pointerupoutside'; /***/ }), -/* 874 */ +/* 886 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150891,12 +154173,12 @@ module.exports = 'wheel'; /***/ }), -/* 875 */ +/* 887 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150915,12 +154197,12 @@ module.exports = 'pointerlockchange'; /***/ }), -/* 876 */ +/* 888 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150937,12 +154219,12 @@ module.exports = 'preupdate'; /***/ }), -/* 877 */ +/* 889 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150958,12 +154240,12 @@ module.exports = 'shutdown'; /***/ }), -/* 878 */ +/* 890 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150980,12 +154262,12 @@ module.exports = 'start'; /***/ }), -/* 879 */ +/* 891 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151005,12 +154287,12 @@ module.exports = 'update'; /***/ }), -/* 880 */ +/* 892 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151064,12 +154346,12 @@ module.exports = GetInnerHeight; /***/ }), -/* 881 */ +/* 893 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151094,12 +154376,12 @@ module.exports = 'addfile'; /***/ }), -/* 882 */ +/* 894 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151122,12 +154404,12 @@ module.exports = 'complete'; /***/ }), -/* 883 */ +/* 895 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151151,12 +154433,12 @@ module.exports = 'filecomplete'; /***/ }), -/* 884 */ +/* 896 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151205,12 +154487,12 @@ module.exports = 'filecomplete-'; /***/ }), -/* 885 */ +/* 897 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151230,12 +154512,12 @@ module.exports = 'loaderror'; /***/ }), -/* 886 */ +/* 898 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151256,12 +154538,12 @@ module.exports = 'load'; /***/ }), -/* 887 */ +/* 899 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151283,12 +154565,12 @@ module.exports = 'fileprogress'; /***/ }), -/* 888 */ +/* 900 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151312,12 +154594,12 @@ module.exports = 'postprocess'; /***/ }), -/* 889 */ +/* 901 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151337,12 +154619,12 @@ module.exports = 'progress'; /***/ }), -/* 890 */ +/* 902 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151364,17 +154646,17 @@ module.exports = 'start'; /***/ }), -/* 891 */ +/* 903 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetFastValue = __webpack_require__(1); -var UppercaseFirst = __webpack_require__(191); +var UppercaseFirst = __webpack_require__(194); /** * Builds an array of which physics plugins should be activated for the given Scene. @@ -151426,12 +154708,12 @@ module.exports = GetPhysicsPlugins; /***/ }), -/* 892 */ +/* 904 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151473,12 +154755,12 @@ module.exports = GetScenePlugins; /***/ }), -/* 893 */ +/* 905 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151536,12 +154818,12 @@ module.exports = InjectionMap; /***/ }), -/* 894 */ +/* 906 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151617,12 +154899,12 @@ module.exports = AtlasXML; /***/ }), -/* 895 */ +/* 907 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151652,12 +154934,12 @@ module.exports = Canvas; /***/ }), -/* 896 */ +/* 908 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151687,16 +154969,16 @@ module.exports = Image; /***/ }), -/* 897 */ +/* 909 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clone = __webpack_require__(72); +var Clone = __webpack_require__(73); /** * Parses a Texture Atlas JSON Array and adds the Frames to the Texture. @@ -151794,16 +155076,16 @@ module.exports = JSONArray; /***/ }), -/* 898 */ +/* 910 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clone = __webpack_require__(72); +var Clone = __webpack_require__(73); /** * Parses a Texture Atlas JSON Hash and adds the Frames to the Texture. @@ -151893,12 +155175,12 @@ module.exports = JSONHash; /***/ }), -/* 899 */ +/* 911 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152018,12 +155300,12 @@ module.exports = SpriteSheet; /***/ }), -/* 900 */ +/* 912 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152209,12 +155491,12 @@ module.exports = SpriteSheetFromAtlas; /***/ }), -/* 901 */ +/* 913 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152379,12 +155661,12 @@ TextureImporter: /***/ }), -/* 902 */ +/* 914 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152410,12 +155692,12 @@ module.exports = 'complete'; /***/ }), -/* 903 */ +/* 915 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152440,12 +155722,12 @@ module.exports = 'decoded'; /***/ }), -/* 904 */ +/* 916 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152472,12 +155754,12 @@ module.exports = 'decodedall'; /***/ }), -/* 905 */ +/* 917 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152504,12 +155786,12 @@ module.exports = 'destroy'; /***/ }), -/* 906 */ +/* 918 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152537,12 +155819,12 @@ module.exports = 'detune'; /***/ }), -/* 907 */ +/* 919 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152565,12 +155847,12 @@ module.exports = 'detune'; /***/ }), -/* 908 */ +/* 920 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152592,12 +155874,12 @@ module.exports = 'mute'; /***/ }), -/* 909 */ +/* 921 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152620,12 +155902,12 @@ module.exports = 'rate'; /***/ }), -/* 910 */ +/* 922 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152647,12 +155929,12 @@ module.exports = 'volume'; /***/ }), -/* 911 */ +/* 923 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152681,12 +155963,12 @@ module.exports = 'loop'; /***/ }), -/* 912 */ +/* 924 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152715,12 +155997,12 @@ module.exports = 'looped'; /***/ }), -/* 913 */ +/* 925 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152748,12 +156030,12 @@ module.exports = 'mute'; /***/ }), -/* 914 */ +/* 926 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152775,12 +156057,12 @@ module.exports = 'pauseall'; /***/ }), -/* 915 */ +/* 927 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152807,12 +156089,12 @@ module.exports = 'pause'; /***/ }), -/* 916 */ +/* 928 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152838,12 +156120,12 @@ module.exports = 'play'; /***/ }), -/* 917 */ +/* 929 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152871,12 +156153,12 @@ module.exports = 'rate'; /***/ }), -/* 918 */ +/* 930 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152898,12 +156180,12 @@ module.exports = 'resumeall'; /***/ }), -/* 919 */ +/* 931 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152931,12 +156213,12 @@ module.exports = 'resume'; /***/ }), -/* 920 */ +/* 932 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152964,12 +156246,12 @@ module.exports = 'seek'; /***/ }), -/* 921 */ +/* 933 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152991,12 +156273,12 @@ module.exports = 'stopall'; /***/ }), -/* 922 */ +/* 934 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153023,12 +156305,12 @@ module.exports = 'stop'; /***/ }), -/* 923 */ +/* 935 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153050,12 +156332,12 @@ module.exports = 'unlocked'; /***/ }), -/* 924 */ +/* 936 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153083,7 +156365,7 @@ module.exports = 'volume'; /***/ }), -/* 925 */ +/* 937 */ /***/ (function(module, exports) { /** @@ -153115,7 +156397,7 @@ module.exports = AdInstance; /***/ }), -/* 926 */ +/* 938 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153126,7 +156408,7 @@ module.exports = AdInstance; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var LeaderboardScore = __webpack_require__(927); +var LeaderboardScore = __webpack_require__(939); /** * @classdesc @@ -153429,7 +156711,7 @@ module.exports = Leaderboard; /***/ }), -/* 927 */ +/* 939 */ /***/ (function(module, exports) { /** @@ -153469,7 +156751,7 @@ module.exports = LeaderboardScore; /***/ }), -/* 928 */ +/* 940 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153507,7 +156789,7 @@ module.exports = Product; /***/ }), -/* 929 */ +/* 941 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153545,12 +156827,12 @@ module.exports = Purchase; /***/ }), -/* 930 */ +/* 942 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153560,102 +156842,102 @@ module.exports = Purchase; var GameObjects = { - Events: __webpack_require__(100), + Events: __webpack_require__(102), - DisplayList: __webpack_require__(931), + DisplayList: __webpack_require__(943), GameObjectCreator: __webpack_require__(16), GameObjectFactory: __webpack_require__(6), - UpdateList: __webpack_require__(959), + UpdateList: __webpack_require__(971), Components: __webpack_require__(12), BuildGameObject: __webpack_require__(30), - BuildGameObjectAnimation: __webpack_require__(397), + BuildGameObjectAnimation: __webpack_require__(416), GameObject: __webpack_require__(14), - BitmapText: __webpack_require__(135), - Blitter: __webpack_require__(198), - Container: __webpack_require__(199), - DOMElement: __webpack_require__(399), - DynamicBitmapText: __webpack_require__(200), - Extern: __webpack_require__(401), - Graphics: __webpack_require__(201), - Group: __webpack_require__(107), - Image: __webpack_require__(88), - Particles: __webpack_require__(991), - PathFollower: __webpack_require__(413), - RenderTexture: __webpack_require__(205), - RetroFont: __webpack_require__(1000), + BitmapText: __webpack_require__(138), + Blitter: __webpack_require__(201), + Container: __webpack_require__(202), + DOMElement: __webpack_require__(418), + DynamicBitmapText: __webpack_require__(203), + Extern: __webpack_require__(420), + Graphics: __webpack_require__(204), + Group: __webpack_require__(109), + Image: __webpack_require__(89), + Particles: __webpack_require__(1003), + PathFollower: __webpack_require__(432), + RenderTexture: __webpack_require__(208), + RetroFont: __webpack_require__(1012), Sprite: __webpack_require__(65), - Text: __webpack_require__(207), - TileSprite: __webpack_require__(208), - Zone: __webpack_require__(116), - Video: __webpack_require__(209), + Text: __webpack_require__(210), + TileSprite: __webpack_require__(211), + Zone: __webpack_require__(118), + Video: __webpack_require__(212), // Shapes Shape: __webpack_require__(33), - Arc: __webpack_require__(414), - Curve: __webpack_require__(415), - Ellipse: __webpack_require__(416), - Grid: __webpack_require__(417), - IsoBox: __webpack_require__(418), - IsoTriangle: __webpack_require__(419), - Line: __webpack_require__(420), - Polygon: __webpack_require__(421), - Rectangle: __webpack_require__(426), - Star: __webpack_require__(427), - Triangle: __webpack_require__(428), + Arc: __webpack_require__(433), + Curve: __webpack_require__(434), + Ellipse: __webpack_require__(435), + Grid: __webpack_require__(436), + IsoBox: __webpack_require__(437), + IsoTriangle: __webpack_require__(438), + Line: __webpack_require__(439), + Polygon: __webpack_require__(440), + Rectangle: __webpack_require__(445), + Star: __webpack_require__(446), + Triangle: __webpack_require__(447), // Game Object Factories Factories: { - Blitter: __webpack_require__(1048), - Container: __webpack_require__(1049), - DOMElement: __webpack_require__(1050), - DynamicBitmapText: __webpack_require__(1051), - Extern: __webpack_require__(1052), - Graphics: __webpack_require__(1053), - Group: __webpack_require__(1054), - Image: __webpack_require__(1055), - Particles: __webpack_require__(1056), - PathFollower: __webpack_require__(1057), - RenderTexture: __webpack_require__(1058), - Sprite: __webpack_require__(1059), - StaticBitmapText: __webpack_require__(1060), - Text: __webpack_require__(1061), - TileSprite: __webpack_require__(1062), - Zone: __webpack_require__(1063), - Video: __webpack_require__(1064), + Blitter: __webpack_require__(1060), + Container: __webpack_require__(1061), + DOMElement: __webpack_require__(1062), + DynamicBitmapText: __webpack_require__(1063), + Extern: __webpack_require__(1064), + Graphics: __webpack_require__(1065), + Group: __webpack_require__(1066), + Image: __webpack_require__(1067), + Particles: __webpack_require__(1068), + PathFollower: __webpack_require__(1069), + RenderTexture: __webpack_require__(1070), + Sprite: __webpack_require__(1071), + StaticBitmapText: __webpack_require__(1072), + Text: __webpack_require__(1073), + TileSprite: __webpack_require__(1074), + Zone: __webpack_require__(1075), + Video: __webpack_require__(1076), // Shapes - Arc: __webpack_require__(1065), - Curve: __webpack_require__(1066), - Ellipse: __webpack_require__(1067), - Grid: __webpack_require__(1068), - IsoBox: __webpack_require__(1069), - IsoTriangle: __webpack_require__(1070), - Line: __webpack_require__(1071), - Polygon: __webpack_require__(1072), - Rectangle: __webpack_require__(1073), - Star: __webpack_require__(1074), - Triangle: __webpack_require__(1075) + Arc: __webpack_require__(1077), + Curve: __webpack_require__(1078), + Ellipse: __webpack_require__(1079), + Grid: __webpack_require__(1080), + IsoBox: __webpack_require__(1081), + IsoTriangle: __webpack_require__(1082), + Line: __webpack_require__(1083), + Polygon: __webpack_require__(1084), + Rectangle: __webpack_require__(1085), + Star: __webpack_require__(1086), + Triangle: __webpack_require__(1087) }, Creators: { - Blitter: __webpack_require__(1076), - Container: __webpack_require__(1077), - DynamicBitmapText: __webpack_require__(1078), - Graphics: __webpack_require__(1079), - Group: __webpack_require__(1080), - Image: __webpack_require__(1081), - Particles: __webpack_require__(1082), - RenderTexture: __webpack_require__(1083), - Sprite: __webpack_require__(1084), - StaticBitmapText: __webpack_require__(1085), - Text: __webpack_require__(1086), - TileSprite: __webpack_require__(1087), - Zone: __webpack_require__(1088), - Video: __webpack_require__(1089) + Blitter: __webpack_require__(1088), + Container: __webpack_require__(1089), + DynamicBitmapText: __webpack_require__(1090), + Graphics: __webpack_require__(1091), + Group: __webpack_require__(1092), + Image: __webpack_require__(1093), + Particles: __webpack_require__(1094), + RenderTexture: __webpack_require__(1095), + Sprite: __webpack_require__(1096), + StaticBitmapText: __webpack_require__(1097), + Text: __webpack_require__(1098), + TileSprite: __webpack_require__(1099), + Zone: __webpack_require__(1100), + Video: __webpack_require__(1101) } }; @@ -153663,42 +156945,42 @@ var GameObjects = { if (true) { // WebGL only Game Objects - GameObjects.Mesh = __webpack_require__(136); - GameObjects.Quad = __webpack_require__(212); - GameObjects.Shader = __webpack_require__(213); + GameObjects.Mesh = __webpack_require__(139); + GameObjects.Quad = __webpack_require__(215); + GameObjects.Shader = __webpack_require__(216); - GameObjects.Factories.Mesh = __webpack_require__(1096); - GameObjects.Factories.Quad = __webpack_require__(1097); - GameObjects.Factories.Shader = __webpack_require__(1098); + GameObjects.Factories.Mesh = __webpack_require__(1108); + GameObjects.Factories.Quad = __webpack_require__(1109); + GameObjects.Factories.Shader = __webpack_require__(1110); - GameObjects.Creators.Mesh = __webpack_require__(1099); - GameObjects.Creators.Quad = __webpack_require__(1100); - GameObjects.Creators.Shader = __webpack_require__(1101); + GameObjects.Creators.Mesh = __webpack_require__(1111); + GameObjects.Creators.Quad = __webpack_require__(1112); + GameObjects.Creators.Shader = __webpack_require__(1113); - GameObjects.Light = __webpack_require__(432); + GameObjects.Light = __webpack_require__(451); - __webpack_require__(433); - __webpack_require__(1102); + __webpack_require__(452); + __webpack_require__(1114); } module.exports = GameObjects; /***/ }), -/* 931 */ +/* 943 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var List = __webpack_require__(132); -var PluginCache = __webpack_require__(20); -var SceneEvents = __webpack_require__(21); -var StableSort = __webpack_require__(134); +var List = __webpack_require__(135); +var PluginCache = __webpack_require__(22); +var SceneEvents = __webpack_require__(18); +var StableSort = __webpack_require__(137); /** * @classdesc @@ -153890,12 +157172,12 @@ module.exports = DisplayList; /***/ }), -/* 932 */ +/* 944 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153905,31 +157187,31 @@ module.exports = DisplayList; module.exports = { - CheckMatrix: __webpack_require__(194), - MatrixToString: __webpack_require__(933), - ReverseColumns: __webpack_require__(934), - ReverseRows: __webpack_require__(935), - Rotate180: __webpack_require__(936), - RotateLeft: __webpack_require__(937), - RotateMatrix: __webpack_require__(133), - RotateRight: __webpack_require__(938), - TransposeMatrix: __webpack_require__(394) + CheckMatrix: __webpack_require__(197), + MatrixToString: __webpack_require__(945), + ReverseColumns: __webpack_require__(946), + ReverseRows: __webpack_require__(947), + Rotate180: __webpack_require__(948), + RotateLeft: __webpack_require__(949), + RotateMatrix: __webpack_require__(136), + RotateRight: __webpack_require__(950), + TransposeMatrix: __webpack_require__(413) }; /***/ }), -/* 933 */ +/* 945 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Pad = __webpack_require__(169); -var CheckMatrix = __webpack_require__(194); +var Pad = __webpack_require__(173); +var CheckMatrix = __webpack_require__(197); /** * Generates a string (which you can pass to console.log) from the given Array Matrix. @@ -154000,12 +157282,12 @@ module.exports = MatrixToString; /***/ }), -/* 934 */ +/* 946 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154031,12 +157313,12 @@ module.exports = ReverseColumns; /***/ }), -/* 935 */ +/* 947 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154067,16 +157349,16 @@ module.exports = ReverseRows; /***/ }), -/* 936 */ +/* 948 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(133); +var RotateMatrix = __webpack_require__(136); /** * Rotates the array matrix 180 degrees. @@ -154100,16 +157382,16 @@ module.exports = Rotate180; /***/ }), -/* 937 */ +/* 949 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(133); +var RotateMatrix = __webpack_require__(136); /** * Rotates the array matrix to the left (or 90 degrees) @@ -154133,16 +157415,16 @@ module.exports = RotateLeft; /***/ }), -/* 938 */ +/* 950 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(133); +var RotateMatrix = __webpack_require__(136); /** * Rotates the array matrix to the left (or -90 degrees) @@ -154166,12 +157448,12 @@ module.exports = RotateRight; /***/ }), -/* 939 */ +/* 951 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154283,12 +157565,12 @@ module.exports = Add; /***/ }), -/* 940 */ +/* 952 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154405,12 +157687,12 @@ module.exports = AddAt; /***/ }), -/* 941 */ +/* 953 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154443,16 +157725,16 @@ module.exports = BringToTop; /***/ }), -/* 942 */ +/* 954 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SafeRange = __webpack_require__(73); +var SafeRange = __webpack_require__(74); /** * Returns the total number of elements in the array which have a property matching the given value. @@ -154495,12 +157777,12 @@ module.exports = CountAllMatching; /***/ }), -/* 943 */ +/* 955 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154541,16 +157823,16 @@ module.exports = Each; /***/ }), -/* 944 */ +/* 956 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SafeRange = __webpack_require__(73); +var SafeRange = __webpack_require__(74); /** * Passes each element in the array, between the start and end indexes, to the given callback. @@ -154597,16 +157879,16 @@ module.exports = EachInRange; /***/ }), -/* 945 */ +/* 957 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SafeRange = __webpack_require__(73); +var SafeRange = __webpack_require__(74); /** * Returns all elements in the array. @@ -154659,16 +157941,16 @@ module.exports = GetAll; /***/ }), -/* 946 */ +/* 958 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SafeRange = __webpack_require__(73); +var SafeRange = __webpack_require__(74); /** * Returns the first element in the array. @@ -154718,12 +158000,12 @@ module.exports = GetFirst; /***/ }), -/* 947 */ +/* 959 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154760,12 +158042,12 @@ module.exports = MoveDown; /***/ }), -/* 948 */ +/* 960 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154807,12 +158089,12 @@ module.exports = MoveTo; /***/ }), -/* 949 */ +/* 961 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154849,12 +158131,12 @@ module.exports = MoveUp; /***/ }), -/* 950 */ +/* 962 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154913,16 +158195,16 @@ module.exports = NumberArray; /***/ }), -/* 951 */ +/* 963 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RoundAwayFromZero = __webpack_require__(331); +var RoundAwayFromZero = __webpack_require__(350); /** * Create an array of numbers (positive and/or negative) progressing from `start` @@ -154990,16 +158272,16 @@ module.exports = NumberArrayStep; /***/ }), -/* 952 */ +/* 964 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SpliceOne = __webpack_require__(84); +var SpliceOne = __webpack_require__(85); /** * Removes the item from the given position in the array. @@ -155041,16 +158323,16 @@ module.exports = RemoveAt; /***/ }), -/* 953 */ +/* 965 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SafeRange = __webpack_require__(73); +var SafeRange = __webpack_require__(74); /** * Removes the item within the given range in the array. @@ -155104,16 +158386,16 @@ module.exports = RemoveBetween; /***/ }), -/* 954 */ +/* 966 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SpliceOne = __webpack_require__(84); +var SpliceOne = __webpack_require__(85); /** * Removes a random object from the given array and returns it. @@ -155142,12 +158424,12 @@ module.exports = RemoveRandomElement; /***/ }), -/* 955 */ +/* 967 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155186,12 +158468,12 @@ module.exports = Replace; /***/ }), -/* 956 */ +/* 968 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155224,16 +158506,16 @@ module.exports = SendToBack; /***/ }), -/* 957 */ +/* 969 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SafeRange = __webpack_require__(73); +var SafeRange = __webpack_require__(74); /** * Scans the array for elements with the given property. If found, the property is set to the `value`. @@ -155279,12 +158561,12 @@ module.exports = SetAll; /***/ }), -/* 958 */ +/* 970 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155327,19 +158609,19 @@ module.exports = Swap; /***/ }), -/* 959 */ +/* 971 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var ProcessQueue = __webpack_require__(196); -var PluginCache = __webpack_require__(20); -var SceneEvents = __webpack_require__(21); +var ProcessQueue = __webpack_require__(199); +var PluginCache = __webpack_require__(22); +var SceneEvents = __webpack_require__(18); /** * @classdesc @@ -155628,12 +158910,12 @@ module.exports = UpdateList; /***/ }), -/* 960 */ +/* 972 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155643,19 +158925,19 @@ module.exports = UpdateList; module.exports = { - PROCESS_QUEUE_ADD: __webpack_require__(961), - PROCESS_QUEUE_REMOVE: __webpack_require__(962) + PROCESS_QUEUE_ADD: __webpack_require__(973), + PROCESS_QUEUE_REMOVE: __webpack_require__(974) }; /***/ }), -/* 961 */ +/* 973 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155677,12 +158959,12 @@ module.exports = 'add'; /***/ }), -/* 962 */ +/* 974 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155704,12 +158986,12 @@ module.exports = 'remove'; /***/ }), -/* 963 */ +/* 975 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155758,7 +159040,6 @@ var GetBitmapTextSize = function (src, round, out) }, wrappedText: '', words: [], - maxWidth: 0, scaleX: 0, scaleY: 0 }; @@ -155807,7 +159088,7 @@ var GetBitmapTextSize = function (src, round, out) var current = null; // Scan for breach of maxWidth and insert carriage-returns - if (maxWidth > 0 && out.maxWidth !== maxWidth) + if (maxWidth > 0) { for (i = 0; i < textLength; i++) { @@ -155962,7 +159243,6 @@ var GetBitmapTextSize = function (src, round, out) text = stringInsert(text, crs[i], "\n"); } - out.maxWidth = maxWidth; out.wrappedText = text; textLength = text.length; @@ -156159,16 +159439,16 @@ module.exports = GetBitmapTextSize; /***/ }), -/* 964 */ +/* 976 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ParseXMLBitmapFont = __webpack_require__(197); +var ParseXMLBitmapFont = __webpack_require__(200); /** * Parse an XML Bitmap Font from an Atlas. @@ -156184,8 +159464,8 @@ var ParseXMLBitmapFont = __webpack_require__(197); * @param {string} textureKey - The key of the BitmapFont's texture. * @param {string} frameKey - The key of the BitmapFont texture's frame. * @param {string} xmlKey - The key of the XML data of the font to parse. - * @param {integer} xSpacing - The x-axis spacing to add between each letter. - * @param {integer} ySpacing - The y-axis spacing to add to the line height. + * @param {integer} [xSpacing] - The x-axis spacing to add between each letter. + * @param {integer} [ySpacing] - The y-axis spacing to add to the line height. * * @return {boolean} Whether the parsing was successful or not. */ @@ -156212,12 +159492,12 @@ module.exports = ParseFromAtlas; /***/ }), -/* 965 */ +/* 977 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -156226,12 +159506,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(966); + renderWebGL = __webpack_require__(978); } if (true) { - renderCanvas = __webpack_require__(967); + renderCanvas = __webpack_require__(979); } module.exports = { @@ -156243,12 +159523,12 @@ module.exports = { /***/ }), -/* 966 */ +/* 978 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -156479,12 +159759,12 @@ module.exports = BitmapTextWebGLRenderer; /***/ }), -/* 967 */ +/* 979 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -156661,12 +159941,12 @@ module.exports = BitmapTextCanvasRenderer; /***/ }), -/* 968 */ +/* 980 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -156675,12 +159955,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(969); + renderWebGL = __webpack_require__(981); } if (true) { - renderCanvas = __webpack_require__(970); + renderCanvas = __webpack_require__(982); } module.exports = { @@ -156692,12 +159972,12 @@ module.exports = { /***/ }), -/* 969 */ +/* 981 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -156822,12 +160102,12 @@ module.exports = BlitterWebGLRenderer; /***/ }), -/* 970 */ +/* 982 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -156952,17 +160232,17 @@ module.exports = BlitterCanvasRenderer; /***/ }), -/* 971 */ +/* 983 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Frame = __webpack_require__(104); +var Frame = __webpack_require__(106); /** * @classdesc @@ -157382,13 +160662,13 @@ module.exports = Bob; /***/ }), -/* 972 */ +/* 984 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -157397,12 +160677,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(973); + renderWebGL = __webpack_require__(985); } if (true) { - renderCanvas = __webpack_require__(974); + renderCanvas = __webpack_require__(986); } module.exports = { @@ -157414,13 +160694,13 @@ module.exports = { /***/ }), -/* 973 */ +/* 985 */ /***/ (function(module, exports) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -157471,10 +160751,7 @@ var ContainerWebGLRenderer = function (renderer, container, interpolationPercent renderer.setBlendMode(0); } - var alphaTopLeft = container.alphaTopLeft; - var alphaTopRight = container.alphaTopRight; - var alphaBottomLeft = container.alphaBottomLeft; - var alphaBottomRight = container.alphaBottomRight; + var alpha = container.alpha; var scrollFactorX = container.scrollFactorX; var scrollFactorY = container.scrollFactorY; @@ -157542,7 +160819,7 @@ var ContainerWebGLRenderer = function (renderer, container, interpolationPercent // Set parent values child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY); - child.setAlpha(childAlphaTopLeft * alphaTopLeft, childAlphaTopRight * alphaTopRight, childAlphaBottomLeft * alphaBottomLeft, childAlphaBottomRight * alphaBottomRight); + child.setAlpha(childAlphaTopLeft * alpha, childAlphaTopRight * alpha, childAlphaBottomLeft * alpha, childAlphaBottomRight * alpha); // Render child.renderWebGL(renderer, child, interpolationPercentage, camera, transformMatrix); @@ -157566,13 +160843,13 @@ module.exports = ContainerWebGLRenderer; /***/ }), -/* 974 */ +/* 986 */ /***/ (function(module, exports) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -157663,12 +160940,12 @@ module.exports = ContainerCanvasRenderer; /***/ }), -/* 975 */ +/* 987 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -157677,12 +160954,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(400); + renderWebGL = __webpack_require__(419); } if (true) { - renderCanvas = __webpack_require__(400); + renderCanvas = __webpack_require__(419); } module.exports = { @@ -157694,12 +160971,12 @@ module.exports = { /***/ }), -/* 976 */ +/* 988 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -157735,12 +161012,12 @@ module.exports = [ /***/ }), -/* 977 */ +/* 989 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -157749,12 +161026,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(978); + renderWebGL = __webpack_require__(990); } if (true) { - renderCanvas = __webpack_require__(979); + renderCanvas = __webpack_require__(991); } module.exports = { @@ -157766,12 +161043,12 @@ module.exports = { /***/ }), -/* 978 */ +/* 990 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158072,12 +161349,12 @@ module.exports = DynamicBitmapTextWebGLRenderer; /***/ }), -/* 979 */ +/* 991 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158283,12 +161560,12 @@ module.exports = DynamicBitmapTextCanvasRenderer; /***/ }), -/* 980 */ +/* 992 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158297,12 +161574,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(981); + renderWebGL = __webpack_require__(993); } if (true) { - renderCanvas = __webpack_require__(982); + renderCanvas = __webpack_require__(994); } module.exports = { @@ -158314,12 +161591,12 @@ module.exports = { /***/ }), -/* 981 */ +/* 993 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158383,18 +161660,18 @@ module.exports = ExternWebGLRenderer; /***/ }), -/* 982 */ +/* 994 */ /***/ (function(module, exports) { /***/ }), -/* 983 */ +/* 995 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158403,15 +161680,15 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(984); + renderWebGL = __webpack_require__(996); // Needed for Graphics.generateTexture - renderCanvas = __webpack_require__(405); + renderCanvas = __webpack_require__(424); } if (true) { - renderCanvas = __webpack_require__(405); + renderCanvas = __webpack_require__(424); } module.exports = { @@ -158423,16 +161700,16 @@ module.exports = { /***/ }), -/* 984 */ +/* 996 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Commands = __webpack_require__(202); +var Commands = __webpack_require__(205); var Utils = __webpack_require__(10); // TODO: Remove the use of this @@ -158788,12 +162065,12 @@ module.exports = GraphicsWebGLRenderer; /***/ }), -/* 985 */ +/* 997 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158802,12 +162079,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(986); + renderWebGL = __webpack_require__(998); } if (true) { - renderCanvas = __webpack_require__(987); + renderCanvas = __webpack_require__(999); } module.exports = { @@ -158819,12 +162096,12 @@ module.exports = { /***/ }), -/* 986 */ +/* 998 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158852,12 +162129,12 @@ module.exports = SpriteWebGLRenderer; /***/ }), -/* 987 */ +/* 999 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158885,12 +162162,12 @@ module.exports = SpriteCanvasRenderer; /***/ }), -/* 988 */ +/* 1000 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158899,12 +162176,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(989); + renderWebGL = __webpack_require__(1001); } if (true) { - renderCanvas = __webpack_require__(990); + renderCanvas = __webpack_require__(1002); } module.exports = { @@ -158916,12 +162193,12 @@ module.exports = { /***/ }), -/* 989 */ +/* 1001 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158949,12 +162226,12 @@ module.exports = ImageWebGLRenderer; /***/ }), -/* 990 */ +/* 1002 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158982,12 +162259,12 @@ module.exports = ImageCanvasRenderer; /***/ }), -/* 991 */ +/* 1003 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158997,30 +162274,30 @@ module.exports = ImageCanvasRenderer; module.exports = { - GravityWell: __webpack_require__(406), - Particle: __webpack_require__(407), - ParticleEmitter: __webpack_require__(408), - ParticleEmitterManager: __webpack_require__(204), - Zones: __webpack_require__(996) + GravityWell: __webpack_require__(425), + Particle: __webpack_require__(426), + ParticleEmitter: __webpack_require__(427), + ParticleEmitterManager: __webpack_require__(207), + Zones: __webpack_require__(1008) }; /***/ }), -/* 992 */ +/* 1004 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var FloatBetween = __webpack_require__(329); -var GetEaseFunction = __webpack_require__(89); +var FloatBetween = __webpack_require__(348); +var GetEaseFunction = __webpack_require__(90); var GetFastValue = __webpack_require__(1); -var Wrap = __webpack_require__(62); +var Wrap = __webpack_require__(63); /** * @classdesc @@ -159598,12 +162875,12 @@ module.exports = EmitterOp; /***/ }), -/* 993 */ +/* 1005 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159612,12 +162889,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(994); + renderWebGL = __webpack_require__(1006); } if (true) { - renderCanvas = __webpack_require__(995); + renderCanvas = __webpack_require__(1007); } module.exports = { @@ -159629,12 +162906,12 @@ module.exports = { /***/ }), -/* 994 */ +/* 1006 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159788,12 +163065,12 @@ module.exports = ParticleManagerWebGLRenderer; /***/ }), -/* 995 */ +/* 1007 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159911,12 +163188,12 @@ module.exports = ParticleManagerCanvasRenderer; /***/ }), -/* 996 */ +/* 1008 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159926,20 +163203,20 @@ module.exports = ParticleManagerCanvasRenderer; module.exports = { - DeathZone: __webpack_require__(409), - EdgeZone: __webpack_require__(410), - RandomZone: __webpack_require__(412) + DeathZone: __webpack_require__(428), + EdgeZone: __webpack_require__(429), + RandomZone: __webpack_require__(431) }; /***/ }), -/* 997 */ +/* 1009 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159948,12 +163225,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(998); + renderWebGL = __webpack_require__(1010); } if (true) { - renderCanvas = __webpack_require__(999); + renderCanvas = __webpack_require__(1011); } module.exports = { @@ -159965,12 +163242,12 @@ module.exports = { /***/ }), -/* 998 */ +/* 1010 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -160028,12 +163305,12 @@ module.exports = RenderTextureWebGLRenderer; /***/ }), -/* 999 */ +/* 1011 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -160061,16 +163338,16 @@ module.exports = RenderTextureCanvasRenderer; /***/ }), -/* 1000 */ +/* 1012 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RETRO_FONT_CONST = __webpack_require__(1001); +var RETRO_FONT_CONST = __webpack_require__(1013); var Extend = __webpack_require__(17); /** @@ -160078,7 +163355,7 @@ var Extend = __webpack_require__(17); * @since 3.6.0 */ -var RetroFont = { Parse: __webpack_require__(1002) }; +var RetroFont = { Parse: __webpack_require__(1014) }; // Merge in the consts RetroFont = Extend(false, RetroFont, RETRO_FONT_CONST); @@ -160087,12 +163364,12 @@ module.exports = RetroFont; /***/ }), -/* 1001 */ +/* 1013 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -160203,12 +163480,12 @@ module.exports = RETRO_FONT_CONST; /***/ }), -/* 1002 */ +/* 1014 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -160319,12 +163596,12 @@ module.exports = ParseRetroFont; /***/ }), -/* 1003 */ +/* 1015 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -160401,12 +163678,12 @@ module.exports = GetTextSize; /***/ }), -/* 1004 */ +/* 1016 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -160415,12 +163692,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(1005); + renderWebGL = __webpack_require__(1017); } if (true) { - renderCanvas = __webpack_require__(1006); + renderCanvas = __webpack_require__(1018); } module.exports = { @@ -160432,12 +163709,12 @@ module.exports = { /***/ }), -/* 1005 */ +/* 1017 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -160497,12 +163774,12 @@ module.exports = TextWebGLRenderer; /***/ }), -/* 1006 */ +/* 1018 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -160535,19 +163812,19 @@ module.exports = TextCanvasRenderer; /***/ }), -/* 1007 */ +/* 1019 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var GetAdvancedValue = __webpack_require__(15); var GetValue = __webpack_require__(5); -var MeasureText = __webpack_require__(1008); +var MeasureText = __webpack_require__(1020); // Key: [ Object Key, Default Value ] @@ -161588,12 +164865,12 @@ module.exports = TextStyle; /***/ }), -/* 1008 */ +/* 1020 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -161723,12 +165000,12 @@ module.exports = MeasureText; /***/ }), -/* 1009 */ +/* 1021 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -161737,12 +165014,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(1010); + renderWebGL = __webpack_require__(1022); } if (true) { - renderCanvas = __webpack_require__(1011); + renderCanvas = __webpack_require__(1023); } module.exports = { @@ -161754,12 +165031,12 @@ module.exports = { /***/ }), -/* 1010 */ +/* 1022 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -161814,12 +165091,12 @@ module.exports = TileSpriteWebGLRenderer; /***/ }), -/* 1011 */ +/* 1023 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -161849,12 +165126,12 @@ module.exports = TileSpriteCanvasRenderer; /***/ }), -/* 1012 */ +/* 1024 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -161863,12 +165140,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(1013); + renderWebGL = __webpack_require__(1025); } if (true) { - renderCanvas = __webpack_require__(1014); + renderCanvas = __webpack_require__(1026); } module.exports = { @@ -161880,12 +165157,12 @@ module.exports = { /***/ }), -/* 1013 */ +/* 1025 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -161916,12 +165193,12 @@ module.exports = VideoWebGLRenderer; /***/ }), -/* 1014 */ +/* 1026 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -161952,12 +165229,12 @@ module.exports = VideoCanvasRenderer; /***/ }), -/* 1015 */ +/* 1027 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -161966,12 +165243,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(1016); + renderWebGL = __webpack_require__(1028); } if (true) { - renderCanvas = __webpack_require__(1017); + renderCanvas = __webpack_require__(1029); } module.exports = { @@ -161983,17 +165260,17 @@ module.exports = { /***/ }), -/* 1016 */ +/* 1028 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(109); -var StrokePathWebGL = __webpack_require__(74); +var FillPathWebGL = __webpack_require__(111); +var StrokePathWebGL = __webpack_require__(75); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -162061,18 +165338,18 @@ module.exports = ArcWebGLRenderer; /***/ }), -/* 1017 */ +/* 1029 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var DegToRad = __webpack_require__(40); var FillStyleCanvas = __webpack_require__(41); -var LineStyleCanvas = __webpack_require__(55); +var LineStyleCanvas = __webpack_require__(57); var SetTransform = __webpack_require__(29); /** @@ -162137,12 +165414,12 @@ module.exports = ArcCanvasRenderer; /***/ }), -/* 1018 */ +/* 1030 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -162151,12 +165428,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(1019); + renderWebGL = __webpack_require__(1031); } if (true) { - renderCanvas = __webpack_require__(1020); + renderCanvas = __webpack_require__(1032); } module.exports = { @@ -162168,17 +165445,17 @@ module.exports = { /***/ }), -/* 1019 */ +/* 1031 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(109); -var StrokePathWebGL = __webpack_require__(74); +var FillPathWebGL = __webpack_require__(111); +var StrokePathWebGL = __webpack_require__(75); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -162246,17 +165523,17 @@ module.exports = CurveWebGLRenderer; /***/ }), -/* 1020 */ +/* 1032 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var FillStyleCanvas = __webpack_require__(41); -var LineStyleCanvas = __webpack_require__(55); +var LineStyleCanvas = __webpack_require__(57); var SetTransform = __webpack_require__(29); /** @@ -162334,12 +165611,12 @@ module.exports = CurveCanvasRenderer; /***/ }), -/* 1021 */ +/* 1033 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -162348,12 +165625,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(1022); + renderWebGL = __webpack_require__(1034); } if (true) { - renderCanvas = __webpack_require__(1023); + renderCanvas = __webpack_require__(1035); } module.exports = { @@ -162365,17 +165642,17 @@ module.exports = { /***/ }), -/* 1022 */ +/* 1034 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(109); -var StrokePathWebGL = __webpack_require__(74); +var FillPathWebGL = __webpack_require__(111); +var StrokePathWebGL = __webpack_require__(75); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -162443,17 +165720,17 @@ module.exports = EllipseWebGLRenderer; /***/ }), -/* 1023 */ +/* 1035 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var FillStyleCanvas = __webpack_require__(41); -var LineStyleCanvas = __webpack_require__(55); +var LineStyleCanvas = __webpack_require__(57); var SetTransform = __webpack_require__(29); /** @@ -162528,12 +165805,12 @@ module.exports = EllipseCanvasRenderer; /***/ }), -/* 1024 */ +/* 1036 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -162542,12 +165819,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(1025); + renderWebGL = __webpack_require__(1037); } if (true) { - renderCanvas = __webpack_require__(1026); + renderCanvas = __webpack_require__(1038); } module.exports = { @@ -162559,12 +165836,12 @@ module.exports = { /***/ }), -/* 1025 */ +/* 1037 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -162785,17 +166062,17 @@ module.exports = GridWebGLRenderer; /***/ }), -/* 1026 */ +/* 1038 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var FillStyleCanvas = __webpack_require__(41); -var LineStyleCanvas = __webpack_require__(55); +var LineStyleCanvas = __webpack_require__(57); var SetTransform = __webpack_require__(29); /** @@ -162974,12 +166251,12 @@ module.exports = GridCanvasRenderer; /***/ }), -/* 1027 */ +/* 1039 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -162988,12 +166265,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(1028); + renderWebGL = __webpack_require__(1040); } if (true) { - renderCanvas = __webpack_require__(1029); + renderCanvas = __webpack_require__(1041); } module.exports = { @@ -163005,12 +166282,12 @@ module.exports = { /***/ }), -/* 1028 */ +/* 1040 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -163163,12 +166440,12 @@ module.exports = IsoBoxWebGLRenderer; /***/ }), -/* 1029 */ +/* 1041 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -163264,12 +166541,12 @@ module.exports = IsoBoxCanvasRenderer; /***/ }), -/* 1030 */ +/* 1042 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -163278,12 +166555,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(1031); + renderWebGL = __webpack_require__(1043); } if (true) { - renderCanvas = __webpack_require__(1032); + renderCanvas = __webpack_require__(1044); } module.exports = { @@ -163295,12 +166572,12 @@ module.exports = { /***/ }), -/* 1031 */ +/* 1043 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -163472,12 +166749,12 @@ module.exports = IsoTriangleWebGLRenderer; /***/ }), -/* 1032 */ +/* 1044 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -163586,12 +166863,12 @@ module.exports = IsoTriangleCanvasRenderer; /***/ }), -/* 1033 */ +/* 1045 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -163600,12 +166877,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(1034); + renderWebGL = __webpack_require__(1046); } if (true) { - renderCanvas = __webpack_require__(1035); + renderCanvas = __webpack_require__(1047); } module.exports = { @@ -163617,12 +166894,12 @@ module.exports = { /***/ }), -/* 1034 */ +/* 1046 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -163710,16 +166987,16 @@ module.exports = LineWebGLRenderer; /***/ }), -/* 1035 */ +/* 1047 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var LineStyleCanvas = __webpack_require__(55); +var LineStyleCanvas = __webpack_require__(57); var SetTransform = __webpack_require__(29); /** @@ -163767,12 +167044,12 @@ module.exports = LineCanvasRenderer; /***/ }), -/* 1036 */ +/* 1048 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -163781,12 +167058,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(1037); + renderWebGL = __webpack_require__(1049); } if (true) { - renderCanvas = __webpack_require__(1038); + renderCanvas = __webpack_require__(1050); } module.exports = { @@ -163798,17 +167075,17 @@ module.exports = { /***/ }), -/* 1037 */ +/* 1049 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(109); -var StrokePathWebGL = __webpack_require__(74); +var FillPathWebGL = __webpack_require__(111); +var StrokePathWebGL = __webpack_require__(75); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -163876,17 +167153,17 @@ module.exports = PolygonWebGLRenderer; /***/ }), -/* 1038 */ +/* 1050 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var FillStyleCanvas = __webpack_require__(41); -var LineStyleCanvas = __webpack_require__(55); +var LineStyleCanvas = __webpack_require__(57); var SetTransform = __webpack_require__(29); /** @@ -163961,12 +167238,12 @@ module.exports = PolygonCanvasRenderer; /***/ }), -/* 1039 */ +/* 1051 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -163975,12 +167252,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(1040); + renderWebGL = __webpack_require__(1052); } if (true) { - renderCanvas = __webpack_require__(1041); + renderCanvas = __webpack_require__(1053); } module.exports = { @@ -163992,16 +167269,16 @@ module.exports = { /***/ }), -/* 1040 */ +/* 1052 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var StrokePathWebGL = __webpack_require__(74); +var StrokePathWebGL = __webpack_require__(75); var Utils = __webpack_require__(10); /** @@ -164084,17 +167361,17 @@ module.exports = RectangleWebGLRenderer; /***/ }), -/* 1041 */ +/* 1053 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var FillStyleCanvas = __webpack_require__(41); -var LineStyleCanvas = __webpack_require__(55); +var LineStyleCanvas = __webpack_require__(57); var SetTransform = __webpack_require__(29); /** @@ -164158,12 +167435,12 @@ module.exports = RectangleCanvasRenderer; /***/ }), -/* 1042 */ +/* 1054 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -164172,12 +167449,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(1043); + renderWebGL = __webpack_require__(1055); } if (true) { - renderCanvas = __webpack_require__(1044); + renderCanvas = __webpack_require__(1056); } module.exports = { @@ -164189,17 +167466,17 @@ module.exports = { /***/ }), -/* 1043 */ +/* 1055 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(109); -var StrokePathWebGL = __webpack_require__(74); +var FillPathWebGL = __webpack_require__(111); +var StrokePathWebGL = __webpack_require__(75); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -164267,17 +167544,17 @@ module.exports = StarWebGLRenderer; /***/ }), -/* 1044 */ +/* 1056 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var FillStyleCanvas = __webpack_require__(41); -var LineStyleCanvas = __webpack_require__(55); +var LineStyleCanvas = __webpack_require__(57); var SetTransform = __webpack_require__(29); /** @@ -164352,12 +167629,12 @@ module.exports = StarCanvasRenderer; /***/ }), -/* 1045 */ +/* 1057 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -164366,12 +167643,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(1046); + renderWebGL = __webpack_require__(1058); } if (true) { - renderCanvas = __webpack_require__(1047); + renderCanvas = __webpack_require__(1059); } module.exports = { @@ -164383,16 +167660,16 @@ module.exports = { /***/ }), -/* 1046 */ +/* 1058 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var StrokePathWebGL = __webpack_require__(74); +var StrokePathWebGL = __webpack_require__(75); var Utils = __webpack_require__(10); /** @@ -164486,17 +167763,17 @@ module.exports = TriangleWebGLRenderer; /***/ }), -/* 1047 */ +/* 1059 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var FillStyleCanvas = __webpack_require__(41); -var LineStyleCanvas = __webpack_require__(55); +var LineStyleCanvas = __webpack_require__(57); var SetTransform = __webpack_require__(29); /** @@ -164561,16 +167838,16 @@ module.exports = TriangleCanvasRenderer; /***/ }), -/* 1048 */ +/* 1060 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Blitter = __webpack_require__(198); +var Blitter = __webpack_require__(201); var GameObjectFactory = __webpack_require__(6); /** @@ -164603,17 +167880,17 @@ GameObjectFactory.register('blitter', function (x, y, key, frame) /***/ }), -/* 1049 */ +/* 1061 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Container = __webpack_require__(199); +var Container = __webpack_require__(202); var GameObjectFactory = __webpack_require__(6); /** @@ -164637,16 +167914,16 @@ GameObjectFactory.register('container', function (x, y, children) /***/ }), -/* 1050 */ +/* 1062 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DOMElement = __webpack_require__(399); +var DOMElement = __webpack_require__(418); var GameObjectFactory = __webpack_require__(6); /** @@ -164727,16 +168004,16 @@ GameObjectFactory.register('dom', function (x, y, element, style, innerText) /***/ }), -/* 1051 */ +/* 1063 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DynamicBitmapText = __webpack_require__(200); +var DynamicBitmapText = __webpack_require__(203); var GameObjectFactory = __webpack_require__(6); /** @@ -164796,16 +168073,16 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size /***/ }), -/* 1052 */ +/* 1064 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Extern = __webpack_require__(401); +var Extern = __webpack_require__(420); var GameObjectFactory = __webpack_require__(6); /** @@ -164838,16 +168115,16 @@ GameObjectFactory.register('extern', function () /***/ }), -/* 1053 */ +/* 1065 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Graphics = __webpack_require__(201); +var Graphics = __webpack_require__(204); var GameObjectFactory = __webpack_require__(6); /** @@ -164877,16 +168154,16 @@ GameObjectFactory.register('graphics', function (config) /***/ }), -/* 1054 */ +/* 1066 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Group = __webpack_require__(107); +var Group = __webpack_require__(109); var GameObjectFactory = __webpack_require__(6); /** @@ -164909,16 +168186,16 @@ GameObjectFactory.register('group', function (children, config) /***/ }), -/* 1055 */ +/* 1067 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Image = __webpack_require__(88); +var Image = __webpack_require__(89); var GameObjectFactory = __webpack_require__(6); /** @@ -164951,17 +168228,17 @@ GameObjectFactory.register('image', function (x, y, key, frame) /***/ }), -/* 1056 */ +/* 1068 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(6); -var ParticleEmitterManager = __webpack_require__(204); +var ParticleEmitterManager = __webpack_require__(207); /** * Creates a new Particle Emitter Manager Game Object and adds it to the Scene. @@ -164997,17 +168274,17 @@ GameObjectFactory.register('particles', function (key, frame, emitters) /***/ }), -/* 1057 */ +/* 1069 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(6); -var PathFollower = __webpack_require__(413); +var PathFollower = __webpack_require__(432); /** * Creates a new PathFollower Game Object and adds it to the Scene. @@ -165045,17 +168322,17 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame) /***/ }), -/* 1058 */ +/* 1070 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(6); -var RenderTexture = __webpack_require__(205); +var RenderTexture = __webpack_require__(208); /** * Creates a new Render Texture Game Object and adds it to the Scene. @@ -165085,12 +168362,12 @@ GameObjectFactory.register('renderTexture', function (x, y, width, height, key, /***/ }), -/* 1059 */ +/* 1071 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -165132,16 +168409,16 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) /***/ }), -/* 1060 */ +/* 1072 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(135); +var BitmapText = __webpack_require__(138); var GameObjectFactory = __webpack_require__(6); /** @@ -165196,16 +168473,16 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size, align /***/ }), -/* 1061 */ +/* 1073 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Text = __webpack_require__(207); +var Text = __webpack_require__(210); var GameObjectFactory = __webpack_require__(6); /** @@ -165261,16 +168538,16 @@ GameObjectFactory.register('text', function (x, y, text, style) /***/ }), -/* 1062 */ +/* 1074 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileSprite = __webpack_require__(208); +var TileSprite = __webpack_require__(211); var GameObjectFactory = __webpack_require__(6); /** @@ -165305,16 +168582,16 @@ GameObjectFactory.register('tileSprite', function (x, y, width, height, key, fra /***/ }), -/* 1063 */ +/* 1075 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Zone = __webpack_require__(116); +var Zone = __webpack_require__(118); var GameObjectFactory = __webpack_require__(6); /** @@ -165347,16 +168624,16 @@ GameObjectFactory.register('zone', function (x, y, width, height) /***/ }), -/* 1064 */ +/* 1076 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Video = __webpack_require__(209); +var Video = __webpack_require__(212); var GameObjectFactory = __webpack_require__(6); /** @@ -165394,16 +168671,16 @@ GameObjectFactory.register('video', function (x, y, key) /***/ }), -/* 1065 */ +/* 1077 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Arc = __webpack_require__(414); +var Arc = __webpack_require__(433); var GameObjectFactory = __webpack_require__(6); /** @@ -165467,17 +168744,17 @@ GameObjectFactory.register('circle', function (x, y, radius, fillColor, fillAlph /***/ }), -/* 1066 */ +/* 1078 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(6); -var Curve = __webpack_require__(415); +var Curve = __webpack_require__(434); /** * Creates a new Curve Shape Game Object and adds it to the Scene. @@ -165517,16 +168794,16 @@ GameObjectFactory.register('curve', function (x, y, curve, fillColor, fillAlpha) /***/ }), -/* 1067 */ +/* 1079 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Ellipse = __webpack_require__(416); +var Ellipse = __webpack_require__(435); var GameObjectFactory = __webpack_require__(6); /** @@ -165569,17 +168846,17 @@ GameObjectFactory.register('ellipse', function (x, y, width, height, fillColor, /***/ }), -/* 1068 */ +/* 1080 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(6); -var Grid = __webpack_require__(417); +var Grid = __webpack_require__(436); /** * Creates a new Grid Shape Game Object and adds it to the Scene. @@ -165624,17 +168901,17 @@ GameObjectFactory.register('grid', function (x, y, width, height, cellWidth, cel /***/ }), -/* 1069 */ +/* 1081 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(6); -var IsoBox = __webpack_require__(418); +var IsoBox = __webpack_require__(437); /** * Creates a new IsoBox Shape Game Object and adds it to the Scene. @@ -165675,17 +168952,17 @@ GameObjectFactory.register('isobox', function (x, y, size, height, fillTop, fill /***/ }), -/* 1070 */ +/* 1082 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(6); -var IsoTriangle = __webpack_require__(419); +var IsoTriangle = __webpack_require__(438); /** * Creates a new IsoTriangle Shape Game Object and adds it to the Scene. @@ -165728,17 +169005,17 @@ GameObjectFactory.register('isotriangle', function (x, y, size, height, reversed /***/ }), -/* 1071 */ +/* 1083 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(6); -var Line = __webpack_require__(420); +var Line = __webpack_require__(439); /** * Creates a new Line Shape Game Object and adds it to the Scene. @@ -165779,17 +169056,17 @@ GameObjectFactory.register('line', function (x, y, x1, y1, x2, y2, strokeColor, /***/ }), -/* 1072 */ +/* 1084 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(6); -var Polygon = __webpack_require__(421); +var Polygon = __webpack_require__(440); /** * Creates a new Polygon Shape Game Object and adds it to the Scene. @@ -165806,7 +169083,7 @@ var Polygon = __webpack_require__(421); * The Polygon Shape is created by providing a list of points, which are then used to create an * internal Polygon geometry object. The points can be set from a variety of formats: * - * - An array of Point or Vector2 objects: `[new Phaser.Math.Vec2(x1, y1), ...]` + * - An array of Point or Vector2 objects: `[new Phaser.Math.Vector2(x1, y1), ...]` * - An array of objects with public x/y properties: `[obj1, obj2, ...]` * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]` * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]` @@ -165832,17 +169109,17 @@ GameObjectFactory.register('polygon', function (x, y, points, fillColor, fillAlp /***/ }), -/* 1073 */ +/* 1085 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(6); -var Rectangle = __webpack_require__(426); +var Rectangle = __webpack_require__(445); /** * Creates a new Rectangle Shape Game Object and adds it to the Scene. @@ -165877,16 +169154,16 @@ GameObjectFactory.register('rectangle', function (x, y, width, height, fillColor /***/ }), -/* 1074 */ +/* 1086 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Star = __webpack_require__(427); +var Star = __webpack_require__(446); var GameObjectFactory = __webpack_require__(6); /** @@ -165929,17 +169206,17 @@ GameObjectFactory.register('star', function (x, y, points, innerRadius, outerRad /***/ }), -/* 1075 */ +/* 1087 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(6); -var Triangle = __webpack_require__(428); +var Triangle = __webpack_require__(447); /** * Creates a new Triangle Shape Game Object and adds it to the Scene. @@ -165980,16 +169257,16 @@ GameObjectFactory.register('triangle', function (x, y, x1, y1, x2, y2, x3, y3, f /***/ }), -/* 1076 */ +/* 1088 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Blitter = __webpack_require__(198); +var Blitter = __webpack_require__(201); var BuildGameObject = __webpack_require__(30); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -166030,18 +169307,18 @@ GameObjectCreator.register('blitter', function (config, addToScene) /***/ }), -/* 1077 */ +/* 1089 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BuildGameObject = __webpack_require__(30); -var Container = __webpack_require__(199); +var Container = __webpack_require__(202); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -166079,16 +169356,16 @@ GameObjectCreator.register('container', function (config, addToScene) /***/ }), -/* 1078 */ +/* 1090 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(200); +var BitmapText = __webpack_require__(203); var BuildGameObject = __webpack_require__(30); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -166130,17 +169407,17 @@ GameObjectCreator.register('dynamicBitmapText', function (config, addToScene) /***/ }), -/* 1079 */ +/* 1091 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectCreator = __webpack_require__(16); -var Graphics = __webpack_require__(201); +var Graphics = __webpack_require__(204); /** * Creates a new Graphics Game Object and returns it. @@ -166178,17 +169455,17 @@ GameObjectCreator.register('graphics', function (config, addToScene) /***/ }), -/* 1080 */ +/* 1092 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectCreator = __webpack_require__(16); -var Group = __webpack_require__(107); +var Group = __webpack_require__(109); /** * Creates a new Group Game Object and returns it. @@ -166211,19 +169488,19 @@ GameObjectCreator.register('group', function (config) /***/ }), -/* 1081 */ +/* 1093 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BuildGameObject = __webpack_require__(30); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Image = __webpack_require__(88); +var Image = __webpack_require__(89); /** * Creates a new Image Game Object and returns it. @@ -166261,19 +169538,19 @@ GameObjectCreator.register('image', function (config, addToScene) /***/ }), -/* 1082 */ +/* 1094 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); var GetFastValue = __webpack_require__(1); -var ParticleEmitterManager = __webpack_require__(204); +var ParticleEmitterManager = __webpack_require__(207); /** * Creates a new Particle Emitter Manager Game Object and returns it. @@ -166318,19 +169595,19 @@ GameObjectCreator.register('particles', function (config, addToScene) /***/ }), -/* 1083 */ +/* 1095 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BuildGameObject = __webpack_require__(30); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var RenderTexture = __webpack_require__(205); +var RenderTexture = __webpack_require__(208); /** * Creates a new Render Texture Game Object and returns it. @@ -166370,17 +169647,17 @@ GameObjectCreator.register('renderTexture', function (config, addToScene) /***/ }), -/* 1084 */ +/* 1096 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BuildGameObject = __webpack_require__(30); -var BuildGameObjectAnimation = __webpack_require__(397); +var BuildGameObjectAnimation = __webpack_require__(416); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); var Sprite = __webpack_require__(65); @@ -166423,16 +169700,16 @@ GameObjectCreator.register('sprite', function (config, addToScene) /***/ }), -/* 1085 */ +/* 1097 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(135); +var BitmapText = __webpack_require__(138); var BuildGameObject = __webpack_require__(30); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -166476,19 +169753,19 @@ GameObjectCreator.register('bitmapText', function (config, addToScene) /***/ }), -/* 1086 */ +/* 1098 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BuildGameObject = __webpack_require__(30); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Text = __webpack_require__(207); +var Text = __webpack_require__(210); /** * Creates a new Text Game Object and returns it. @@ -166563,19 +169840,19 @@ GameObjectCreator.register('text', function (config, addToScene) /***/ }), -/* 1087 */ +/* 1099 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BuildGameObject = __webpack_require__(30); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var TileSprite = __webpack_require__(208); +var TileSprite = __webpack_require__(211); /** * Creates a new TileSprite Game Object and returns it. @@ -166615,18 +169892,18 @@ GameObjectCreator.register('tileSprite', function (config, addToScene) /***/ }), -/* 1088 */ +/* 1100 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Zone = __webpack_require__(116); +var Zone = __webpack_require__(118); /** * Creates a new Zone Game Object and returns it. @@ -166654,19 +169931,19 @@ GameObjectCreator.register('zone', function (config) /***/ }), -/* 1089 */ +/* 1101 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BuildGameObject = __webpack_require__(30); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Video = __webpack_require__(209); +var Video = __webpack_require__(212); /** * Creates a new Video Game Object and returns it. @@ -166703,12 +169980,12 @@ GameObjectCreator.register('video', function (config, addToScene) /***/ }), -/* 1090 */ +/* 1102 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -166717,12 +169994,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(1091); + renderWebGL = __webpack_require__(1103); } if (true) { - renderCanvas = __webpack_require__(1092); + renderCanvas = __webpack_require__(1104); } module.exports = { @@ -166734,12 +170011,12 @@ module.exports = { /***/ }), -/* 1091 */ +/* 1103 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -166852,12 +170129,12 @@ module.exports = MeshWebGLRenderer; /***/ }), -/* 1092 */ +/* 1104 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -166881,12 +170158,12 @@ module.exports = MeshCanvasRenderer; /***/ }), -/* 1093 */ +/* 1105 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -166895,12 +170172,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(1094); + renderWebGL = __webpack_require__(1106); } if (true) { - renderCanvas = __webpack_require__(1095); + renderCanvas = __webpack_require__(1107); } module.exports = { @@ -166912,12 +170189,12 @@ module.exports = { /***/ }), -/* 1094 */ +/* 1106 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -166996,12 +170273,12 @@ module.exports = ShaderWebGLRenderer; /***/ }), -/* 1095 */ +/* 1107 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167025,16 +170302,16 @@ module.exports = ShaderCanvasRenderer; /***/ }), -/* 1096 */ +/* 1108 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Mesh = __webpack_require__(136); +var Mesh = __webpack_require__(139); var GameObjectFactory = __webpack_require__(6); /** @@ -167075,16 +170352,16 @@ if (true) /***/ }), -/* 1097 */ +/* 1109 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Quad = __webpack_require__(212); +var Quad = __webpack_require__(215); var GameObjectFactory = __webpack_require__(6); /** @@ -167121,16 +170398,16 @@ if (true) /***/ }), -/* 1098 */ +/* 1110 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Shader = __webpack_require__(213); +var Shader = __webpack_require__(216); var GameObjectFactory = __webpack_require__(6); /** @@ -167162,12 +170439,12 @@ if (true) /***/ }), -/* 1099 */ +/* 1111 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167175,7 +170452,7 @@ var BuildGameObject = __webpack_require__(30); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); var GetValue = __webpack_require__(5); -var Mesh = __webpack_require__(136); +var Mesh = __webpack_require__(139); /** * Creates a new Mesh Game Object and returns it. @@ -167217,19 +170494,19 @@ GameObjectCreator.register('mesh', function (config, addToScene) /***/ }), -/* 1100 */ +/* 1112 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BuildGameObject = __webpack_require__(30); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Quad = __webpack_require__(212); +var Quad = __webpack_require__(215); /** * Creates a new Quad Game Object and returns it. @@ -167267,19 +170544,19 @@ GameObjectCreator.register('quad', function (config, addToScene) /***/ }), -/* 1101 */ +/* 1113 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BuildGameObject = __webpack_require__(30); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Shader = __webpack_require__(213); +var Shader = __webpack_require__(216); /** * Creates a new Shader Game Object and returns it. @@ -167320,19 +170597,19 @@ GameObjectCreator.register('shader', function (config, addToScene) /***/ }), -/* 1102 */ +/* 1114 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var LightsManager = __webpack_require__(433); -var PluginCache = __webpack_require__(20); -var SceneEvents = __webpack_require__(21); +var LightsManager = __webpack_require__(452); +var PluginCache = __webpack_require__(22); +var SceneEvents = __webpack_require__(18); /** * @classdesc @@ -167436,43 +170713,43 @@ module.exports = LightsPlugin; /***/ }), -/* 1103 */ +/* 1115 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circle = __webpack_require__(70); +var Circle = __webpack_require__(71); -Circle.Area = __webpack_require__(1104); -Circle.Circumference = __webpack_require__(267); -Circle.CircumferencePoint = __webpack_require__(154); -Circle.Clone = __webpack_require__(1105); -Circle.Contains = __webpack_require__(59); -Circle.ContainsPoint = __webpack_require__(1106); -Circle.ContainsRect = __webpack_require__(1107); -Circle.CopyFrom = __webpack_require__(1108); -Circle.Equals = __webpack_require__(1109); -Circle.GetBounds = __webpack_require__(1110); -Circle.GetPoint = __webpack_require__(265); -Circle.GetPoints = __webpack_require__(266); -Circle.Offset = __webpack_require__(1111); -Circle.OffsetPoint = __webpack_require__(1112); -Circle.Random = __webpack_require__(155); +Circle.Area = __webpack_require__(1116); +Circle.Circumference = __webpack_require__(286); +Circle.CircumferencePoint = __webpack_require__(158); +Circle.Clone = __webpack_require__(1117); +Circle.Contains = __webpack_require__(60); +Circle.ContainsPoint = __webpack_require__(1118); +Circle.ContainsRect = __webpack_require__(1119); +Circle.CopyFrom = __webpack_require__(1120); +Circle.Equals = __webpack_require__(1121); +Circle.GetBounds = __webpack_require__(1122); +Circle.GetPoint = __webpack_require__(284); +Circle.GetPoints = __webpack_require__(285); +Circle.Offset = __webpack_require__(1123); +Circle.OffsetPoint = __webpack_require__(1124); +Circle.Random = __webpack_require__(159); module.exports = Circle; /***/ }), -/* 1104 */ +/* 1116 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167495,16 +170772,16 @@ module.exports = Area; /***/ }), -/* 1105 */ +/* 1117 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circle = __webpack_require__(70); +var Circle = __webpack_require__(71); /** * Creates a new Circle instance based on the values contained in the given source. @@ -167525,16 +170802,16 @@ module.exports = Clone; /***/ }), -/* 1106 */ +/* 1118 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(59); +var Contains = __webpack_require__(60); /** * Check to see if the Circle contains the given Point object. @@ -167556,16 +170833,16 @@ module.exports = ContainsPoint; /***/ }), -/* 1107 */ +/* 1119 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(59); +var Contains = __webpack_require__(60); /** * Check to see if the Circle contains all four points of the given Rectangle object. @@ -167592,12 +170869,12 @@ module.exports = ContainsRect; /***/ }), -/* 1108 */ +/* 1120 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167624,12 +170901,12 @@ module.exports = CopyFrom; /***/ }), -/* 1109 */ +/* 1121 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167658,12 +170935,12 @@ module.exports = Equals; /***/ }), -/* 1110 */ +/* 1122 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167698,12 +170975,12 @@ module.exports = GetBounds; /***/ }), -/* 1111 */ +/* 1123 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167733,12 +171010,12 @@ module.exports = Offset; /***/ }), -/* 1112 */ +/* 1124 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167767,43 +171044,43 @@ module.exports = OffsetPoint; /***/ }), -/* 1113 */ +/* 1125 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Ellipse = __webpack_require__(105); +var Ellipse = __webpack_require__(107); -Ellipse.Area = __webpack_require__(1114); -Ellipse.Circumference = __webpack_require__(404); -Ellipse.CircumferencePoint = __webpack_require__(203); -Ellipse.Clone = __webpack_require__(1115); -Ellipse.Contains = __webpack_require__(106); -Ellipse.ContainsPoint = __webpack_require__(1116); -Ellipse.ContainsRect = __webpack_require__(1117); -Ellipse.CopyFrom = __webpack_require__(1118); -Ellipse.Equals = __webpack_require__(1119); -Ellipse.GetBounds = __webpack_require__(1120); -Ellipse.GetPoint = __webpack_require__(402); -Ellipse.GetPoints = __webpack_require__(403); -Ellipse.Offset = __webpack_require__(1121); -Ellipse.OffsetPoint = __webpack_require__(1122); -Ellipse.Random = __webpack_require__(163); +Ellipse.Area = __webpack_require__(1126); +Ellipse.Circumference = __webpack_require__(423); +Ellipse.CircumferencePoint = __webpack_require__(206); +Ellipse.Clone = __webpack_require__(1127); +Ellipse.Contains = __webpack_require__(108); +Ellipse.ContainsPoint = __webpack_require__(1128); +Ellipse.ContainsRect = __webpack_require__(1129); +Ellipse.CopyFrom = __webpack_require__(1130); +Ellipse.Equals = __webpack_require__(1131); +Ellipse.GetBounds = __webpack_require__(1132); +Ellipse.GetPoint = __webpack_require__(421); +Ellipse.GetPoints = __webpack_require__(422); +Ellipse.Offset = __webpack_require__(1133); +Ellipse.OffsetPoint = __webpack_require__(1134); +Ellipse.Random = __webpack_require__(167); module.exports = Ellipse; /***/ }), -/* 1114 */ +/* 1126 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167832,16 +171109,16 @@ module.exports = Area; /***/ }), -/* 1115 */ +/* 1127 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Ellipse = __webpack_require__(105); +var Ellipse = __webpack_require__(107); /** * Creates a new Ellipse instance based on the values contained in the given source. @@ -167862,16 +171139,16 @@ module.exports = Clone; /***/ }), -/* 1116 */ +/* 1128 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(106); +var Contains = __webpack_require__(108); /** * Check to see if the Ellipse contains the given Point object. @@ -167893,16 +171170,16 @@ module.exports = ContainsPoint; /***/ }), -/* 1117 */ +/* 1129 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(106); +var Contains = __webpack_require__(108); /** * Check to see if the Ellipse contains all four points of the given Rectangle object. @@ -167929,12 +171206,12 @@ module.exports = ContainsRect; /***/ }), -/* 1118 */ +/* 1130 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167961,12 +171238,12 @@ module.exports = CopyFrom; /***/ }), -/* 1119 */ +/* 1131 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167996,12 +171273,12 @@ module.exports = Equals; /***/ }), -/* 1120 */ +/* 1132 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -168036,12 +171313,12 @@ module.exports = GetBounds; /***/ }), -/* 1121 */ +/* 1133 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -168071,12 +171348,12 @@ module.exports = Offset; /***/ }), -/* 1122 */ +/* 1134 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -168105,18 +171382,18 @@ module.exports = OffsetPoint; /***/ }), -/* 1123 */ +/* 1135 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Point = __webpack_require__(4); -var CircleToCircle = __webpack_require__(214); +var CircleToCircle = __webpack_require__(217); /** * Checks if two Circles intersect and returns the intersection points as a Point object array. @@ -168199,18 +171476,18 @@ module.exports = GetCircleToCircle; /***/ }), -/* 1124 */ +/* 1136 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLineToCircle = __webpack_require__(216); -var CircleToRectangle = __webpack_require__(215); +var GetLineToCircle = __webpack_require__(219); +var CircleToRectangle = __webpack_require__(218); /** * Checks for intersection between a circle and a rectangle, @@ -168249,17 +171526,17 @@ module.exports = GetCircleToRectangle; /***/ }), -/* 1125 */ +/* 1137 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Rectangle = __webpack_require__(11); -var RectangleToRectangle = __webpack_require__(137); +var RectangleToRectangle = __webpack_require__(140); /** * Checks if two Rectangle shapes intersect and returns the area of this intersection as Rectangle object. @@ -168298,18 +171575,18 @@ module.exports = GetRectangleIntersection; /***/ }), -/* 1126 */ +/* 1138 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLineToRectangle = __webpack_require__(218); -var RectangleToRectangle = __webpack_require__(137); +var GetLineToRectangle = __webpack_require__(221); +var RectangleToRectangle = __webpack_require__(140); /** * Checks if two Rectangles intersect and returns the intersection points as a Point object array. @@ -168349,18 +171626,18 @@ module.exports = GetRectangleToRectangle; /***/ }), -/* 1127 */ +/* 1139 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RectangleToTriangle = __webpack_require__(437); -var GetLineToRectangle = __webpack_require__(218); +var RectangleToTriangle = __webpack_require__(456); +var GetLineToRectangle = __webpack_require__(221); /** * Checks for intersection between Rectangle shape and Triangle shape, @@ -168397,18 +171674,18 @@ module.exports = GetRectangleToTriangle; /***/ }), -/* 1128 */ +/* 1140 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLineToCircle = __webpack_require__(216); -var TriangleToCircle = __webpack_require__(439); +var GetLineToCircle = __webpack_require__(219); +var TriangleToCircle = __webpack_require__(458); /** * Checks if a Triangle and a Circle intersect, and returns the intersection points as a Point object array. @@ -168446,18 +171723,18 @@ module.exports = GetTriangleToCircle; /***/ }), -/* 1129 */ +/* 1141 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TriangleToTriangle = __webpack_require__(442); -var GetTriangleToLine = __webpack_require__(440); +var TriangleToTriangle = __webpack_require__(461); +var GetTriangleToLine = __webpack_require__(459); /** * Checks if two Triangles intersect, and returns the intersection points as a Point object array. @@ -168495,16 +171772,16 @@ module.exports = GetTriangleToTriangle; /***/ }), -/* 1130 */ +/* 1142 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PointToLine = __webpack_require__(444); +var PointToLine = __webpack_require__(463); /** * Checks if a Point is located on the given line segment. @@ -168536,12 +171813,12 @@ module.exports = PointToLineSegment; /***/ }), -/* 1131 */ +/* 1143 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -168576,56 +171853,56 @@ module.exports = RectangleToValues; /***/ }), -/* 1132 */ +/* 1144 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Line = __webpack_require__(60); +var Line = __webpack_require__(61); -Line.Angle = __webpack_require__(93); -Line.BresenhamPoints = __webpack_require__(288); -Line.CenterOn = __webpack_require__(1133); -Line.Clone = __webpack_require__(1134); -Line.CopyFrom = __webpack_require__(1135); -Line.Equals = __webpack_require__(1136); -Line.Extend = __webpack_require__(1137); -Line.GetMidPoint = __webpack_require__(1138); -Line.GetNearestPoint = __webpack_require__(1139); -Line.GetNormal = __webpack_require__(1140); -Line.GetPoint = __webpack_require__(275); -Line.GetPoints = __webpack_require__(158); -Line.GetShortestDistance = __webpack_require__(1141); -Line.Height = __webpack_require__(1142); -Line.Length = __webpack_require__(61); -Line.NormalAngle = __webpack_require__(445); -Line.NormalX = __webpack_require__(1143); -Line.NormalY = __webpack_require__(1144); -Line.Offset = __webpack_require__(1145); -Line.PerpSlope = __webpack_require__(1146); -Line.Random = __webpack_require__(159); -Line.ReflectAngle = __webpack_require__(1147); -Line.Rotate = __webpack_require__(1148); -Line.RotateAroundPoint = __webpack_require__(1149); -Line.RotateAroundXY = __webpack_require__(220); -Line.SetToAngle = __webpack_require__(1150); -Line.Slope = __webpack_require__(1151); -Line.Width = __webpack_require__(1152); +Line.Angle = __webpack_require__(94); +Line.BresenhamPoints = __webpack_require__(307); +Line.CenterOn = __webpack_require__(1145); +Line.Clone = __webpack_require__(1146); +Line.CopyFrom = __webpack_require__(1147); +Line.Equals = __webpack_require__(1148); +Line.Extend = __webpack_require__(1149); +Line.GetMidPoint = __webpack_require__(1150); +Line.GetNearestPoint = __webpack_require__(1151); +Line.GetNormal = __webpack_require__(1152); +Line.GetPoint = __webpack_require__(294); +Line.GetPoints = __webpack_require__(162); +Line.GetShortestDistance = __webpack_require__(1153); +Line.Height = __webpack_require__(1154); +Line.Length = __webpack_require__(62); +Line.NormalAngle = __webpack_require__(464); +Line.NormalX = __webpack_require__(1155); +Line.NormalY = __webpack_require__(1156); +Line.Offset = __webpack_require__(1157); +Line.PerpSlope = __webpack_require__(1158); +Line.Random = __webpack_require__(163); +Line.ReflectAngle = __webpack_require__(1159); +Line.Rotate = __webpack_require__(1160); +Line.RotateAroundPoint = __webpack_require__(1161); +Line.RotateAroundXY = __webpack_require__(223); +Line.SetToAngle = __webpack_require__(1162); +Line.Slope = __webpack_require__(1163); +Line.Width = __webpack_require__(1164); module.exports = Line; /***/ }), -/* 1133 */ +/* 1145 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -168660,16 +171937,16 @@ module.exports = CenterOn; /***/ }), -/* 1134 */ +/* 1146 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Line = __webpack_require__(60); +var Line = __webpack_require__(61); /** * Clone the given line. @@ -168690,12 +171967,12 @@ module.exports = Clone; /***/ }), -/* 1135 */ +/* 1147 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -168721,12 +171998,12 @@ module.exports = CopyFrom; /***/ }), -/* 1136 */ +/* 1148 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -168755,16 +172032,16 @@ module.exports = Equals; /***/ }), -/* 1137 */ +/* 1149 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(61); +var Length = __webpack_require__(62); /** * Extends the start and end points of a Line by the given amounts. @@ -168813,12 +172090,12 @@ module.exports = Extend; /***/ }), -/* 1138 */ +/* 1150 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -168851,13 +172128,13 @@ module.exports = GetMidPoint; /***/ }), -/* 1139 */ +/* 1151 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Florian Mertens - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -168906,17 +172183,17 @@ module.exports = GetNearestPoint; /***/ }), -/* 1140 */ +/* 1152 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var MATH_CONST = __webpack_require__(13); -var Angle = __webpack_require__(93); +var Angle = __webpack_require__(94); var Point = __webpack_require__(4); /** @@ -168950,13 +172227,13 @@ module.exports = GetNormal; /***/ }), -/* 1141 */ +/* 1153 */ /***/ (function(module, exports) { /** * @author Richard Davey * @author Florian Mertens - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -168997,12 +172274,12 @@ module.exports = GetShortestDistance; /***/ }), -/* 1142 */ +/* 1154 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169025,17 +172302,17 @@ module.exports = Height; /***/ }), -/* 1143 */ +/* 1155 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var MATH_CONST = __webpack_require__(13); -var Angle = __webpack_require__(93); +var Angle = __webpack_require__(94); /** * [description] @@ -169056,17 +172333,17 @@ module.exports = NormalX; /***/ }), -/* 1144 */ +/* 1156 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var MATH_CONST = __webpack_require__(13); -var Angle = __webpack_require__(93); +var Angle = __webpack_require__(94); /** * The Y value of the normal of the given line. @@ -169088,12 +172365,12 @@ module.exports = NormalY; /***/ }), -/* 1145 */ +/* 1157 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169126,12 +172403,12 @@ module.exports = Offset; /***/ }), -/* 1146 */ +/* 1158 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169154,17 +172431,17 @@ module.exports = PerpSlope; /***/ }), -/* 1147 */ +/* 1159 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Angle = __webpack_require__(93); -var NormalAngle = __webpack_require__(445); +var Angle = __webpack_require__(94); +var NormalAngle = __webpack_require__(464); /** * Calculate the reflected angle between two lines. @@ -169188,16 +172465,16 @@ module.exports = ReflectAngle; /***/ }), -/* 1148 */ +/* 1160 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(220); +var RotateAroundXY = __webpack_require__(223); /** * Rotate a line around its midpoint by the given angle in radians. @@ -169224,16 +172501,16 @@ module.exports = Rotate; /***/ }), -/* 1149 */ +/* 1161 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(220); +var RotateAroundXY = __webpack_require__(223); /** * Rotate a line around a point by the given angle in radians. @@ -169258,12 +172535,12 @@ module.exports = RotateAroundPoint; /***/ }), -/* 1150 */ +/* 1162 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169298,12 +172575,12 @@ module.exports = SetToAngle; /***/ }), -/* 1151 */ +/* 1163 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169326,12 +172603,12 @@ module.exports = Slope; /***/ }), -/* 1152 */ +/* 1164 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169354,43 +172631,43 @@ module.exports = Width; /***/ }), -/* 1153 */ +/* 1165 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Point = __webpack_require__(4); -Point.Ceil = __webpack_require__(1154); -Point.Clone = __webpack_require__(1155); -Point.CopyFrom = __webpack_require__(1156); -Point.Equals = __webpack_require__(1157); -Point.Floor = __webpack_require__(1158); -Point.GetCentroid = __webpack_require__(1159); -Point.GetMagnitude = __webpack_require__(446); -Point.GetMagnitudeSq = __webpack_require__(447); -Point.GetRectangleFromPoints = __webpack_require__(1160); -Point.Interpolate = __webpack_require__(1161); -Point.Invert = __webpack_require__(1162); -Point.Negative = __webpack_require__(1163); -Point.Project = __webpack_require__(1164); -Point.ProjectUnit = __webpack_require__(1165); -Point.SetMagnitude = __webpack_require__(1166); +Point.Ceil = __webpack_require__(1166); +Point.Clone = __webpack_require__(1167); +Point.CopyFrom = __webpack_require__(1168); +Point.Equals = __webpack_require__(1169); +Point.Floor = __webpack_require__(1170); +Point.GetCentroid = __webpack_require__(1171); +Point.GetMagnitude = __webpack_require__(465); +Point.GetMagnitudeSq = __webpack_require__(466); +Point.GetRectangleFromPoints = __webpack_require__(1172); +Point.Interpolate = __webpack_require__(1173); +Point.Invert = __webpack_require__(1174); +Point.Negative = __webpack_require__(1175); +Point.Project = __webpack_require__(1176); +Point.ProjectUnit = __webpack_require__(1177); +Point.SetMagnitude = __webpack_require__(1178); module.exports = Point; /***/ }), -/* 1154 */ +/* 1166 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169415,12 +172692,12 @@ module.exports = Ceil; /***/ }), -/* 1155 */ +/* 1167 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169445,12 +172722,12 @@ module.exports = Clone; /***/ }), -/* 1156 */ +/* 1168 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169476,12 +172753,12 @@ module.exports = CopyFrom; /***/ }), -/* 1157 */ +/* 1169 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169505,12 +172782,12 @@ module.exports = Equals; /***/ }), -/* 1158 */ +/* 1170 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169535,12 +172812,12 @@ module.exports = Floor; /***/ }), -/* 1159 */ +/* 1171 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169599,12 +172876,12 @@ module.exports = GetCentroid; /***/ }), -/* 1160 */ +/* 1172 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169669,12 +172946,12 @@ module.exports = GetRectangleFromPoints; /***/ }), -/* 1161 */ +/* 1173 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169710,12 +172987,12 @@ module.exports = Interpolate; /***/ }), -/* 1162 */ +/* 1174 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169740,12 +173017,12 @@ module.exports = Invert; /***/ }), -/* 1163 */ +/* 1175 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169775,17 +173052,17 @@ module.exports = Negative; /***/ }), -/* 1164 */ +/* 1176 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Point = __webpack_require__(4); -var GetMagnitudeSq = __webpack_require__(447); +var GetMagnitudeSq = __webpack_require__(466); /** * [description] @@ -169821,12 +173098,12 @@ module.exports = Project; /***/ }), -/* 1165 */ +/* 1177 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169865,16 +173142,16 @@ module.exports = ProjectUnit; /***/ }), -/* 1166 */ +/* 1178 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetMagnitude = __webpack_require__(446); +var GetMagnitude = __webpack_require__(465); /** * Changes the magnitude (length) of a two-dimensional vector without changing its direction. @@ -169909,41 +173186,41 @@ module.exports = SetMagnitude; /***/ }), -/* 1167 */ +/* 1179 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Polygon = __webpack_require__(210); +var Polygon = __webpack_require__(213); -Polygon.Clone = __webpack_require__(1168); -Polygon.Contains = __webpack_require__(211); -Polygon.ContainsPoint = __webpack_require__(1169); -Polygon.GetAABB = __webpack_require__(422); -Polygon.GetNumberArray = __webpack_require__(1170); -Polygon.GetPoints = __webpack_require__(423); -Polygon.Perimeter = __webpack_require__(424); -Polygon.Reverse = __webpack_require__(1171); -Polygon.Smooth = __webpack_require__(425); +Polygon.Clone = __webpack_require__(1180); +Polygon.Contains = __webpack_require__(214); +Polygon.ContainsPoint = __webpack_require__(1181); +Polygon.GetAABB = __webpack_require__(441); +Polygon.GetNumberArray = __webpack_require__(1182); +Polygon.GetPoints = __webpack_require__(442); +Polygon.Perimeter = __webpack_require__(443); +Polygon.Reverse = __webpack_require__(1183); +Polygon.Smooth = __webpack_require__(444); module.exports = Polygon; /***/ }), -/* 1168 */ +/* 1180 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Polygon = __webpack_require__(210); +var Polygon = __webpack_require__(213); /** * Create a new polygon which is a copy of the specified polygon @@ -169964,16 +173241,16 @@ module.exports = Clone; /***/ }), -/* 1169 */ +/* 1181 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(211); +var Contains = __webpack_require__(214); /** * [description] @@ -169995,12 +173272,12 @@ module.exports = ContainsPoint; /***/ }), -/* 1170 */ +/* 1182 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -170038,12 +173315,12 @@ module.exports = GetNumberArray; /***/ }), -/* 1171 */ +/* 1183 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -170070,12 +173347,12 @@ module.exports = Reverse; /***/ }), -/* 1172 */ +/* 1184 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -170098,12 +173375,12 @@ module.exports = Area; /***/ }), -/* 1173 */ +/* 1185 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -170131,12 +173408,12 @@ module.exports = Ceil; /***/ }), -/* 1174 */ +/* 1186 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -170166,12 +173443,12 @@ module.exports = CeilAll; /***/ }), -/* 1175 */ +/* 1187 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -170196,16 +173473,16 @@ module.exports = Clone; /***/ }), -/* 1176 */ +/* 1188 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(52); +var Contains = __webpack_require__(53); /** * Determines whether the specified point is contained within the rectangular region defined by this Rectangle object. @@ -170227,12 +173504,12 @@ module.exports = ContainsPoint; /***/ }), -/* 1177 */ +/* 1189 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -170258,12 +173535,12 @@ module.exports = CopyFrom; /***/ }), -/* 1178 */ +/* 1190 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -170292,16 +173569,16 @@ module.exports = Equals; /***/ }), -/* 1179 */ +/* 1191 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetAspectRatio = __webpack_require__(221); +var GetAspectRatio = __webpack_require__(224); /** * Adjusts the target rectangle, changing its width, height and position, @@ -170345,16 +173622,16 @@ module.exports = FitInside; /***/ }), -/* 1180 */ +/* 1192 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetAspectRatio = __webpack_require__(221); +var GetAspectRatio = __webpack_require__(224); /** * Adjusts the target rectangle, changing its width, height and position, @@ -170398,12 +173675,12 @@ module.exports = FitOutside; /***/ }), -/* 1181 */ +/* 1193 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -170431,12 +173708,12 @@ module.exports = Floor; /***/ }), -/* 1182 */ +/* 1194 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -170466,12 +173743,12 @@ module.exports = FloorAll; /***/ }), -/* 1183 */ +/* 1195 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -170504,12 +173781,12 @@ module.exports = GetCenter; /***/ }), -/* 1184 */ +/* 1196 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -170544,16 +173821,16 @@ module.exports = GetSize; /***/ }), -/* 1185 */ +/* 1197 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CenterOn = __webpack_require__(174); +var CenterOn = __webpack_require__(178); /** @@ -170586,17 +173863,17 @@ module.exports = Inflate; /***/ }), -/* 1186 */ +/* 1198 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Rectangle = __webpack_require__(11); -var Intersects = __webpack_require__(137); +var Intersects = __webpack_require__(140); /** * Takes two Rectangles and first checks to see if they intersect. @@ -170637,12 +173914,12 @@ module.exports = Intersection; /***/ }), -/* 1187 */ +/* 1199 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -170686,12 +173963,12 @@ module.exports = MergePoints; /***/ }), -/* 1188 */ +/* 1200 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -170733,12 +174010,12 @@ module.exports = MergeRect; /***/ }), -/* 1189 */ +/* 1201 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -170777,12 +174054,12 @@ module.exports = MergeXY; /***/ }), -/* 1190 */ +/* 1202 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -170812,12 +174089,12 @@ module.exports = Offset; /***/ }), -/* 1191 */ +/* 1203 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -170846,12 +174123,12 @@ module.exports = OffsetPoint; /***/ }), -/* 1192 */ +/* 1204 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -170880,12 +174157,12 @@ module.exports = Overlaps; /***/ }), -/* 1193 */ +/* 1205 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -170937,17 +174214,17 @@ module.exports = PerimeterPoint; /***/ }), -/* 1194 */ +/* 1206 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Between = __webpack_require__(180); -var ContainsRect = __webpack_require__(449); +var Between = __webpack_require__(183); +var ContainsRect = __webpack_require__(468); var Point = __webpack_require__(4); /** @@ -171008,12 +174285,12 @@ module.exports = RandomOutside; /***/ }), -/* 1195 */ +/* 1207 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -171037,12 +174314,12 @@ module.exports = SameDimensions; /***/ }), -/* 1196 */ +/* 1208 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -171076,52 +174353,52 @@ module.exports = Scale; /***/ }), -/* 1197 */ +/* 1209 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Triangle = __webpack_require__(75); +var Triangle = __webpack_require__(76); -Triangle.Area = __webpack_require__(1198); -Triangle.BuildEquilateral = __webpack_require__(1199); -Triangle.BuildFromPolygon = __webpack_require__(1200); -Triangle.BuildRight = __webpack_require__(1201); -Triangle.CenterOn = __webpack_require__(1202); -Triangle.Centroid = __webpack_require__(450); -Triangle.CircumCenter = __webpack_require__(1203); -Triangle.CircumCircle = __webpack_require__(1204); -Triangle.Clone = __webpack_require__(1205); -Triangle.Contains = __webpack_require__(91); -Triangle.ContainsArray = __webpack_require__(219); -Triangle.ContainsPoint = __webpack_require__(1206); -Triangle.CopyFrom = __webpack_require__(1207); -Triangle.Decompose = __webpack_require__(443); -Triangle.Equals = __webpack_require__(1208); -Triangle.GetPoint = __webpack_require__(429); -Triangle.GetPoints = __webpack_require__(430); -Triangle.InCenter = __webpack_require__(452); -Triangle.Perimeter = __webpack_require__(1209); -Triangle.Offset = __webpack_require__(451); -Triangle.Random = __webpack_require__(164); -Triangle.Rotate = __webpack_require__(1210); -Triangle.RotateAroundPoint = __webpack_require__(1211); -Triangle.RotateAroundXY = __webpack_require__(222); +Triangle.Area = __webpack_require__(1210); +Triangle.BuildEquilateral = __webpack_require__(1211); +Triangle.BuildFromPolygon = __webpack_require__(1212); +Triangle.BuildRight = __webpack_require__(1213); +Triangle.CenterOn = __webpack_require__(1214); +Triangle.Centroid = __webpack_require__(469); +Triangle.CircumCenter = __webpack_require__(1215); +Triangle.CircumCircle = __webpack_require__(1216); +Triangle.Clone = __webpack_require__(1217); +Triangle.Contains = __webpack_require__(92); +Triangle.ContainsArray = __webpack_require__(222); +Triangle.ContainsPoint = __webpack_require__(1218); +Triangle.CopyFrom = __webpack_require__(1219); +Triangle.Decompose = __webpack_require__(462); +Triangle.Equals = __webpack_require__(1220); +Triangle.GetPoint = __webpack_require__(448); +Triangle.GetPoints = __webpack_require__(449); +Triangle.InCenter = __webpack_require__(471); +Triangle.Perimeter = __webpack_require__(1221); +Triangle.Offset = __webpack_require__(470); +Triangle.Random = __webpack_require__(168); +Triangle.Rotate = __webpack_require__(1222); +Triangle.RotateAroundPoint = __webpack_require__(1223); +Triangle.RotateAroundXY = __webpack_require__(225); module.exports = Triangle; /***/ }), -/* 1198 */ +/* 1210 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -171155,16 +174432,16 @@ module.exports = Area; /***/ }), -/* 1199 */ +/* 1211 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Triangle = __webpack_require__(75); +var Triangle = __webpack_require__(76); /** * Builds an equilateral triangle. In the equilateral triangle, all the sides are the same length (congruent) and all the angles are the same size (congruent). @@ -171199,17 +174476,17 @@ module.exports = BuildEquilateral; /***/ }), -/* 1200 */ +/* 1212 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var EarCut = __webpack_require__(71); -var Triangle = __webpack_require__(75); +var EarCut = __webpack_require__(72); +var Triangle = __webpack_require__(76); /** * [description] @@ -171274,16 +174551,16 @@ module.exports = BuildFromPolygon; /***/ }), -/* 1201 */ +/* 1213 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Triangle = __webpack_require__(75); +var Triangle = __webpack_require__(76); // Builds a right triangle, with one 90 degree angle and two acute angles // The x/y is the coordinate of the 90 degree angle (and will map to x1/y1 in the resulting Triangle) @@ -171323,17 +174600,17 @@ module.exports = BuildRight; /***/ }), -/* 1202 */ +/* 1214 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Centroid = __webpack_require__(450); -var Offset = __webpack_require__(451); +var Centroid = __webpack_require__(469); +var Offset = __webpack_require__(470); /** * @callback CenterFunction @@ -171376,12 +174653,12 @@ module.exports = CenterOn; /***/ }), -/* 1203 */ +/* 1215 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -171452,16 +174729,16 @@ module.exports = CircumCenter; /***/ }), -/* 1204 */ +/* 1216 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circle = __webpack_require__(70); +var Circle = __webpack_require__(71); // Adapted from https://gist.github.com/mutoo/5617691 @@ -171535,16 +174812,16 @@ module.exports = CircumCircle; /***/ }), -/* 1205 */ +/* 1217 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Triangle = __webpack_require__(75); +var Triangle = __webpack_require__(76); /** * Clones a Triangle object. @@ -171565,16 +174842,16 @@ module.exports = Clone; /***/ }), -/* 1206 */ +/* 1218 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(91); +var Contains = __webpack_require__(92); /** * Tests if a triangle contains a point. @@ -171596,12 +174873,12 @@ module.exports = ContainsPoint; /***/ }), -/* 1207 */ +/* 1219 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -171627,12 +174904,12 @@ module.exports = CopyFrom; /***/ }), -/* 1208 */ +/* 1220 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -171663,16 +174940,16 @@ module.exports = Equals; /***/ }), -/* 1209 */ +/* 1221 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(61); +var Length = __webpack_require__(62); // The 2D area of a triangle. The area value is always non-negative. @@ -171699,17 +174976,17 @@ module.exports = Perimeter; /***/ }), -/* 1210 */ +/* 1222 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(222); -var InCenter = __webpack_require__(452); +var RotateAroundXY = __webpack_require__(225); +var InCenter = __webpack_require__(471); /** * Rotates a Triangle about its incenter, which is the point at which its three angle bisectors meet. @@ -171735,16 +175012,16 @@ module.exports = Rotate; /***/ }), -/* 1211 */ +/* 1223 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(222); +var RotateAroundXY = __webpack_require__(225); /** * Rotates a Triangle at a certain angle about a given Point or object with public `x` and `y` properties. @@ -171769,16 +175046,16 @@ module.exports = RotateAroundPoint; /***/ }), -/* 1212 */ +/* 1224 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(189); +var CONST = __webpack_require__(192); var Extend = __webpack_require__(17); /** @@ -171787,16 +175064,16 @@ var Extend = __webpack_require__(17); var Input = { - CreateInteractiveObject: __webpack_require__(453), - Events: __webpack_require__(54), - Gamepad: __webpack_require__(1213), - InputManager: __webpack_require__(370), - InputPlugin: __webpack_require__(1225), - InputPluginCache: __webpack_require__(138), - Keyboard: __webpack_require__(1227), - Mouse: __webpack_require__(1244), - Pointer: __webpack_require__(373), - Touch: __webpack_require__(1245) + CreateInteractiveObject: __webpack_require__(472), + Events: __webpack_require__(56), + Gamepad: __webpack_require__(1225), + InputManager: __webpack_require__(389), + InputPlugin: __webpack_require__(1237), + InputPluginCache: __webpack_require__(141), + Keyboard: __webpack_require__(1239), + Mouse: __webpack_require__(1256), + Pointer: __webpack_require__(392), + Touch: __webpack_require__(1257) }; @@ -171807,12 +175084,12 @@ module.exports = Input; /***/ }), -/* 1213 */ +/* 1225 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -171822,23 +175099,23 @@ module.exports = Input; module.exports = { - Axis: __webpack_require__(454), - Button: __webpack_require__(455), - Events: __webpack_require__(223), - Gamepad: __webpack_require__(456), - GamepadPlugin: __webpack_require__(1220), + Axis: __webpack_require__(473), + Button: __webpack_require__(474), + Events: __webpack_require__(226), + Gamepad: __webpack_require__(475), + GamepadPlugin: __webpack_require__(1232), - Configs: __webpack_require__(1221) + Configs: __webpack_require__(1233) }; /***/ }), -/* 1214 */ +/* 1226 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -171862,12 +175139,12 @@ module.exports = 'down'; /***/ }), -/* 1215 */ +/* 1227 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -171891,12 +175168,12 @@ module.exports = 'up'; /***/ }), -/* 1216 */ +/* 1228 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -171922,12 +175199,12 @@ module.exports = 'connected'; /***/ }), -/* 1217 */ +/* 1229 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -171948,12 +175225,12 @@ module.exports = 'disconnected'; /***/ }), -/* 1218 */ +/* 1230 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -171980,12 +175257,12 @@ module.exports = 'down'; /***/ }), -/* 1219 */ +/* 1231 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -172012,22 +175289,22 @@ module.exports = 'up'; /***/ }), -/* 1220 */ +/* 1232 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(223); -var Gamepad = __webpack_require__(456); +var Events = __webpack_require__(226); +var Gamepad = __webpack_require__(475); var GetValue = __webpack_require__(5); -var InputPluginCache = __webpack_require__(138); -var InputEvents = __webpack_require__(54); +var InputPluginCache = __webpack_require__(141); +var InputEvents = __webpack_require__(56); /** * @classdesc @@ -172650,12 +175927,12 @@ module.exports = GamepadPlugin; /***/ }), -/* 1221 */ +/* 1233 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -172665,20 +175942,20 @@ module.exports = GamepadPlugin; module.exports = { - DUALSHOCK_4: __webpack_require__(1222), - SNES_USB: __webpack_require__(1223), - XBOX_360: __webpack_require__(1224) + DUALSHOCK_4: __webpack_require__(1234), + SNES_USB: __webpack_require__(1235), + XBOX_360: __webpack_require__(1236) }; /***/ }), -/* 1222 */ +/* 1234 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -172723,12 +176000,12 @@ module.exports = { /***/ }), -/* 1223 */ +/* 1235 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -172762,12 +176039,12 @@ module.exports = { /***/ }), -/* 1224 */ +/* 1236 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -172813,36 +176090,36 @@ module.exports = { /***/ }), -/* 1225 */ +/* 1237 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circle = __webpack_require__(70); -var CircleContains = __webpack_require__(59); +var Circle = __webpack_require__(71); +var CircleContains = __webpack_require__(60); var Class = __webpack_require__(0); -var CONST = __webpack_require__(189); -var CreateInteractiveObject = __webpack_require__(453); -var CreatePixelPerfectHandler = __webpack_require__(1226); -var DistanceBetween = __webpack_require__(63); -var Ellipse = __webpack_require__(105); -var EllipseContains = __webpack_require__(106); -var Events = __webpack_require__(54); +var CONST = __webpack_require__(192); +var CreateInteractiveObject = __webpack_require__(472); +var CreatePixelPerfectHandler = __webpack_require__(1238); +var DistanceBetween = __webpack_require__(54); +var Ellipse = __webpack_require__(107); +var EllipseContains = __webpack_require__(108); +var Events = __webpack_require__(56); var EventEmitter = __webpack_require__(9); var GetFastValue = __webpack_require__(1); -var GEOM_CONST = __webpack_require__(51); -var InputPluginCache = __webpack_require__(138); +var GEOM_CONST = __webpack_require__(52); +var InputPluginCache = __webpack_require__(141); var IsPlainObject = __webpack_require__(7); -var PluginCache = __webpack_require__(20); +var PluginCache = __webpack_require__(22); var Rectangle = __webpack_require__(11); -var RectangleContains = __webpack_require__(52); -var SceneEvents = __webpack_require__(21); -var Triangle = __webpack_require__(75); -var TriangleContains = __webpack_require__(91); +var RectangleContains = __webpack_require__(53); +var SceneEvents = __webpack_require__(18); +var Triangle = __webpack_require__(76); +var TriangleContains = __webpack_require__(92); /** * @classdesc @@ -175965,12 +179242,12 @@ module.exports = InputPlugin; /***/ }), -/* 1226 */ +/* 1238 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -176001,12 +179278,12 @@ module.exports = CreatePixelPerfectHandler; /***/ }), -/* 1227 */ +/* 1239 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -176016,31 +179293,31 @@ module.exports = CreatePixelPerfectHandler; module.exports = { - Events: __webpack_require__(139), + Events: __webpack_require__(142), - KeyboardManager: __webpack_require__(371), - KeyboardPlugin: __webpack_require__(1235), + KeyboardManager: __webpack_require__(390), + KeyboardPlugin: __webpack_require__(1247), - Key: __webpack_require__(457), - KeyCodes: __webpack_require__(128), + Key: __webpack_require__(476), + KeyCodes: __webpack_require__(131), - KeyCombo: __webpack_require__(458), + KeyCombo: __webpack_require__(477), - JustDown: __webpack_require__(1240), - JustUp: __webpack_require__(1241), - DownDuration: __webpack_require__(1242), - UpDuration: __webpack_require__(1243) + JustDown: __webpack_require__(1252), + JustUp: __webpack_require__(1253), + DownDuration: __webpack_require__(1254), + UpDuration: __webpack_require__(1255) }; /***/ }), -/* 1228 */ +/* 1240 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -176071,12 +179348,12 @@ module.exports = 'keydown'; /***/ }), -/* 1229 */ +/* 1241 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -176100,12 +179377,12 @@ module.exports = 'keyup'; /***/ }), -/* 1230 */ +/* 1242 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -176134,12 +179411,12 @@ module.exports = 'keycombomatch'; /***/ }), -/* 1231 */ +/* 1243 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -176168,12 +179445,12 @@ module.exports = 'down'; /***/ }), -/* 1232 */ +/* 1244 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -176207,12 +179484,12 @@ module.exports = 'keydown-'; /***/ }), -/* 1233 */ +/* 1245 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -176239,12 +179516,12 @@ module.exports = 'keyup-'; /***/ }), -/* 1234 */ +/* 1246 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -176273,27 +179550,27 @@ module.exports = 'up'; /***/ }), -/* 1235 */ +/* 1247 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(139); -var GameEvents = __webpack_require__(19); +var Events = __webpack_require__(142); +var GameEvents = __webpack_require__(21); var GetValue = __webpack_require__(5); -var InputEvents = __webpack_require__(54); -var InputPluginCache = __webpack_require__(138); -var Key = __webpack_require__(457); -var KeyCodes = __webpack_require__(128); -var KeyCombo = __webpack_require__(458); -var KeyMap = __webpack_require__(1239); -var SnapFloor = __webpack_require__(103); +var InputEvents = __webpack_require__(56); +var InputPluginCache = __webpack_require__(141); +var Key = __webpack_require__(476); +var KeyCodes = __webpack_require__(131); +var KeyCombo = __webpack_require__(477); +var KeyMap = __webpack_require__(1251); +var SnapFloor = __webpack_require__(105); /** * @classdesc @@ -177159,16 +180436,16 @@ module.exports = KeyboardPlugin; /***/ }), -/* 1236 */ +/* 1248 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AdvanceKeyCombo = __webpack_require__(1237); +var AdvanceKeyCombo = __webpack_require__(1249); /** * Used internally by the KeyCombo class. @@ -177240,12 +180517,12 @@ module.exports = ProcessKeyCombo; /***/ }), -/* 1237 */ +/* 1249 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177282,12 +180559,12 @@ module.exports = AdvanceKeyCombo; /***/ }), -/* 1238 */ +/* 1250 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177317,16 +180594,16 @@ module.exports = ResetKeyCombo; /***/ }), -/* 1239 */ +/* 1251 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var KeyCodes = __webpack_require__(128); +var KeyCodes = __webpack_require__(131); var KeyMap = {}; @@ -177339,12 +180616,12 @@ module.exports = KeyMap; /***/ }), -/* 1240 */ +/* 1252 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177381,12 +180658,12 @@ module.exports = JustDown; /***/ }), -/* 1241 */ +/* 1253 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177423,12 +180700,12 @@ module.exports = JustUp; /***/ }), -/* 1242 */ +/* 1254 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177457,12 +180734,12 @@ module.exports = DownDuration; /***/ }), -/* 1243 */ +/* 1255 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177491,12 +180768,12 @@ module.exports = UpDuration; /***/ }), -/* 1244 */ +/* 1256 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177507,19 +180784,19 @@ module.exports = UpDuration; /* eslint-disable */ module.exports = { - MouseManager: __webpack_require__(372) + MouseManager: __webpack_require__(391) }; /* eslint-enable */ /***/ }), -/* 1245 */ +/* 1257 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177530,23 +180807,23 @@ module.exports = { /* eslint-disable */ module.exports = { - TouchManager: __webpack_require__(374) + TouchManager: __webpack_require__(393) }; /* eslint-enable */ /***/ }), -/* 1246 */ +/* 1258 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(22); +var CONST = __webpack_require__(23); var Extend = __webpack_require__(17); /** @@ -177555,18 +180832,18 @@ var Extend = __webpack_require__(17); var Loader = { - Events: __webpack_require__(86), + Events: __webpack_require__(87), - FileTypes: __webpack_require__(1247), + FileTypes: __webpack_require__(1259), - File: __webpack_require__(23), + File: __webpack_require__(24), FileTypesManager: __webpack_require__(8), - GetURL: __webpack_require__(140), - LoaderPlugin: __webpack_require__(1271), - MergeXHRSettings: __webpack_require__(224), + GetURL: __webpack_require__(143), + LoaderPlugin: __webpack_require__(1283), + MergeXHRSettings: __webpack_require__(227), MultiFile: __webpack_require__(67), - XHRLoader: __webpack_require__(459), - XHRSettings: __webpack_require__(141) + XHRLoader: __webpack_require__(478), + XHRSettings: __webpack_require__(144) }; @@ -177577,12 +180854,12 @@ module.exports = Loader; /***/ }), -/* 1247 */ +/* 1259 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177592,54 +180869,54 @@ module.exports = Loader; module.exports = { - AnimationJSONFile: __webpack_require__(1248), - AtlasJSONFile: __webpack_require__(1249), - AtlasXMLFile: __webpack_require__(1250), - AudioFile: __webpack_require__(460), - AudioSpriteFile: __webpack_require__(1251), - BinaryFile: __webpack_require__(1252), - BitmapFontFile: __webpack_require__(1253), - CSSFile: __webpack_require__(1254), - GLSLFile: __webpack_require__(1255), - HTML5AudioFile: __webpack_require__(461), - HTMLFile: __webpack_require__(1256), - HTMLTextureFile: __webpack_require__(1257), - ImageFile: __webpack_require__(76), + AnimationJSONFile: __webpack_require__(1260), + AtlasJSONFile: __webpack_require__(1261), + AtlasXMLFile: __webpack_require__(1262), + AudioFile: __webpack_require__(479), + AudioSpriteFile: __webpack_require__(1263), + BinaryFile: __webpack_require__(1264), + BitmapFontFile: __webpack_require__(1265), + CSSFile: __webpack_require__(1266), + GLSLFile: __webpack_require__(1267), + HTML5AudioFile: __webpack_require__(480), + HTMLFile: __webpack_require__(1268), + HTMLTextureFile: __webpack_require__(1269), + ImageFile: __webpack_require__(77), JSONFile: __webpack_require__(66), - MultiAtlasFile: __webpack_require__(1258), - MultiScriptFile: __webpack_require__(1259), - PackFile: __webpack_require__(1260), - PluginFile: __webpack_require__(1261), - SceneFile: __webpack_require__(1262), - ScenePluginFile: __webpack_require__(1263), - ScriptFile: __webpack_require__(462), - SpriteSheetFile: __webpack_require__(1264), - SVGFile: __webpack_require__(1265), - TextFile: __webpack_require__(463), - TilemapCSVFile: __webpack_require__(1266), - TilemapImpactFile: __webpack_require__(1267), - TilemapJSONFile: __webpack_require__(1268), - UnityAtlasFile: __webpack_require__(1269), - VideoFile: __webpack_require__(1270), - XMLFile: __webpack_require__(225) + MultiAtlasFile: __webpack_require__(1270), + MultiScriptFile: __webpack_require__(1271), + PackFile: __webpack_require__(1272), + PluginFile: __webpack_require__(1273), + SceneFile: __webpack_require__(1274), + ScenePluginFile: __webpack_require__(1275), + ScriptFile: __webpack_require__(481), + SpriteSheetFile: __webpack_require__(1276), + SVGFile: __webpack_require__(1277), + TextFile: __webpack_require__(482), + TilemapCSVFile: __webpack_require__(1278), + TilemapImpactFile: __webpack_require__(1279), + TilemapJSONFile: __webpack_require__(1280), + UnityAtlasFile: __webpack_require__(1281), + VideoFile: __webpack_require__(1282), + XMLFile: __webpack_require__(228) }; /***/ }), -/* 1248 */ +/* 1260 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var JSONFile = __webpack_require__(66); -var LoaderEvents = __webpack_require__(86); +var LoaderEvents = __webpack_require__(87); /** * @classdesc @@ -177830,19 +181107,19 @@ module.exports = AnimationJSONFile; /***/ }), -/* 1249 */ +/* 1261 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(1); -var ImageFile = __webpack_require__(76); +var ImageFile = __webpack_require__(77); var IsPlainObject = __webpack_require__(7); var JSONFile = __webpack_require__(66); var MultiFile = __webpack_require__(67); @@ -178079,22 +181356,22 @@ module.exports = AtlasJSONFile; /***/ }), -/* 1250 */ +/* 1262 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(1); -var ImageFile = __webpack_require__(76); +var ImageFile = __webpack_require__(77); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(67); -var XMLFile = __webpack_require__(225); +var XMLFile = __webpack_require__(228); /** * @classdesc @@ -178322,16 +181599,16 @@ module.exports = AtlasXMLFile; /***/ }), -/* 1251 */ +/* 1263 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AudioFile = __webpack_require__(460); +var AudioFile = __webpack_require__(479); var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(1); @@ -178612,18 +181889,18 @@ FileTypesManager.register('audioSprite', function (key, jsonURL, audioURL, audio /***/ }), -/* 1252 */ +/* 1264 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(22); -var File = __webpack_require__(23); +var CONST = __webpack_require__(23); +var File = __webpack_require__(24); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(1); var IsPlainObject = __webpack_require__(7); @@ -178794,23 +182071,23 @@ module.exports = BinaryFile; /***/ }), -/* 1253 */ +/* 1265 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(1); -var ImageFile = __webpack_require__(76); +var ImageFile = __webpack_require__(77); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(67); -var ParseXMLBitmapFont = __webpack_require__(197); -var XMLFile = __webpack_require__(225); +var ParseXMLBitmapFont = __webpack_require__(200); +var XMLFile = __webpack_require__(228); /** * @classdesc @@ -179037,18 +182314,18 @@ module.exports = BitmapFontFile; /***/ }), -/* 1254 */ +/* 1266 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(22); -var File = __webpack_require__(23); +var CONST = __webpack_require__(23); +var File = __webpack_require__(24); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(1); var IsPlainObject = __webpack_require__(7); @@ -179205,22 +182482,22 @@ module.exports = CSSFile; /***/ }), -/* 1255 */ +/* 1267 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(22); -var File = __webpack_require__(23); +var CONST = __webpack_require__(23); +var File = __webpack_require__(24); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(1); var IsPlainObject = __webpack_require__(7); -var Shader = __webpack_require__(358); +var Shader = __webpack_require__(377); /** * @classdesc @@ -179616,18 +182893,18 @@ module.exports = GLSLFile; /***/ }), -/* 1256 */ +/* 1268 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(22); -var File = __webpack_require__(23); +var CONST = __webpack_require__(23); +var File = __webpack_require__(24); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(1); var IsPlainObject = __webpack_require__(7); @@ -179791,18 +183068,18 @@ module.exports = HTMLFile; /***/ }), -/* 1257 */ +/* 1269 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(22); -var File = __webpack_require__(23); +var CONST = __webpack_require__(23); +var File = __webpack_require__(24); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(1); var IsPlainObject = __webpack_require__(7); @@ -180049,19 +183326,19 @@ module.exports = HTMLTextureFile; /***/ }), -/* 1258 */ +/* 1270 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(1); -var ImageFile = __webpack_require__(76); +var ImageFile = __webpack_require__(77); var IsPlainObject = __webpack_require__(7); var JSONFile = __webpack_require__(66); var MultiFile = __webpack_require__(67); @@ -180081,7 +183358,7 @@ var MultiFile = __webpack_require__(67); * @since 3.7.0 * * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file. - * @param {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager. + * @param {(string|Phaser.Types.Loader.FileTypes.MultiAtlasFileConfig)} key - The key of the file. Must be unique within both the Loader and the Texture Manager. Or a config object. * @param {string} [atlasURL] - The absolute or relative URL to load the multi atlas json file from. * @param {string} [path] - Optional path to use when loading the textures defined in the atlas data. * @param {string} [baseURL] - Optional Base URL to use when loading the textures defined in the atlas data. @@ -180101,7 +183378,16 @@ var MultiAtlasFile = new Class({ var config = key; key = GetFastValue(config, 'key'); - atlasURL = GetFastValue(config, 'url'); + + if (GetFastValue(config, 'url', false)) + { + atlasURL = GetFastValue(config, 'url'); + } + else + { + atlasURL = GetFastValue(config, 'atlasURL'); + } + atlasXhrSettings = GetFastValue(config, 'xhrSettings'); path = GetFastValue(config, 'path'); baseURL = GetFastValue(config, 'baseURL'); @@ -180373,12 +183659,12 @@ module.exports = MultiAtlasFile; /***/ }), -/* 1259 */ +/* 1271 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180387,7 +183673,7 @@ var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(1); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(67); -var ScriptFile = __webpack_require__(462); +var ScriptFile = __webpack_require__(481); /** * @classdesc @@ -180590,17 +183876,17 @@ module.exports = MultiScriptFile; /***/ }), -/* 1260 */ +/* 1272 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(22); +var CONST = __webpack_require__(23); var FileTypesManager = __webpack_require__(8); var JSONFile = __webpack_require__(66); @@ -180808,18 +184094,18 @@ module.exports = PackFile; /***/ }), -/* 1261 */ +/* 1273 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(22); -var File = __webpack_require__(23); +var CONST = __webpack_require__(23); +var File = __webpack_require__(24); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(1); var IsPlainObject = __webpack_require__(7); @@ -181020,18 +184306,18 @@ module.exports = PluginFile; /***/ }), -/* 1262 */ +/* 1274 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(22); -var File = __webpack_require__(23); +var CONST = __webpack_require__(23); +var File = __webpack_require__(24); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(1); var IsPlainObject = __webpack_require__(7); @@ -181241,18 +184527,18 @@ module.exports = SceneFile; /***/ }), -/* 1263 */ +/* 1275 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(22); -var File = __webpack_require__(23); +var CONST = __webpack_require__(23); +var File = __webpack_require__(24); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(1); var IsPlainObject = __webpack_require__(7); @@ -181447,18 +184733,18 @@ module.exports = ScenePluginFile; /***/ }), -/* 1264 */ +/* 1276 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); -var ImageFile = __webpack_require__(76); +var ImageFile = __webpack_require__(77); /** * @classdesc @@ -181638,18 +184924,18 @@ module.exports = SpriteSheetFile; /***/ }), -/* 1265 */ +/* 1277 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(22); -var File = __webpack_require__(23); +var CONST = __webpack_require__(23); +var File = __webpack_require__(24); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(1); var IsPlainObject = __webpack_require__(7); @@ -181977,18 +185263,18 @@ module.exports = SVGFile; /***/ }), -/* 1266 */ +/* 1278 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(22); -var File = __webpack_require__(23); +var CONST = __webpack_require__(23); +var File = __webpack_require__(24); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(1); var IsPlainObject = __webpack_require__(7); @@ -182172,12 +185458,12 @@ module.exports = TilemapCSVFile; /***/ }), -/* 1267 */ +/* 1279 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -182328,12 +185614,12 @@ module.exports = TilemapImpactFile; /***/ }), -/* 1268 */ +/* 1280 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -182484,22 +185770,22 @@ module.exports = TilemapJSONFile; /***/ }), -/* 1269 */ +/* 1281 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(1); -var ImageFile = __webpack_require__(76); +var ImageFile = __webpack_require__(77); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(67); -var TextFile = __webpack_require__(463); +var TextFile = __webpack_require__(482); /** * @classdesc @@ -182726,20 +186012,20 @@ module.exports = UnityAtlasFile; /***/ }), -/* 1270 */ +/* 1282 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var CONST = __webpack_require__(32); -var File = __webpack_require__(23); +var File = __webpack_require__(24); var FileTypesManager = __webpack_require__(8); -var GetURL = __webpack_require__(140); +var GetURL = __webpack_require__(143); var GetFastValue = __webpack_require__(1); var IsPlainObject = __webpack_require__(7); @@ -183117,25 +186403,25 @@ module.exports = VideoFile; /***/ }), -/* 1271 */ +/* 1283 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(22); -var CustomSet = __webpack_require__(108); +var CONST = __webpack_require__(23); +var CustomSet = __webpack_require__(110); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(86); +var Events = __webpack_require__(87); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(1); -var PluginCache = __webpack_require__(20); -var SceneEvents = __webpack_require__(21); -var XHRSettings = __webpack_require__(141); +var PluginCache = __webpack_require__(22); +var SceneEvents = __webpack_require__(18); +var XHRSettings = __webpack_require__(144); /** * @classdesc @@ -184194,12 +187480,12 @@ module.exports = LoaderPlugin; /***/ }), -/* 1272 */ +/* 1284 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -184213,24 +187499,24 @@ module.exports = LoaderPlugin; module.exports = { - Arcade: __webpack_require__(1273), - Impact: __webpack_require__(1304), - Matter: __webpack_require__(1327) + Arcade: __webpack_require__(1285), + Impact: __webpack_require__(1316), + Matter: __webpack_require__(1339) }; /***/ }), -/* 1273 */ +/* 1285 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(56); +var CONST = __webpack_require__(58); var Extend = __webpack_require__(17); /** @@ -184246,18 +187532,18 @@ var Extend = __webpack_require__(17); var Arcade = { - ArcadePhysics: __webpack_require__(1274), - Body: __webpack_require__(470), - Collider: __webpack_require__(471), - Components: __webpack_require__(226), - Events: __webpack_require__(227), - Factory: __webpack_require__(464), - Group: __webpack_require__(466), - Image: __webpack_require__(465), - Sprite: __webpack_require__(142), - StaticBody: __webpack_require__(476), - StaticGroup: __webpack_require__(467), - World: __webpack_require__(469) + ArcadePhysics: __webpack_require__(1286), + Body: __webpack_require__(489), + Collider: __webpack_require__(490), + Components: __webpack_require__(229), + Events: __webpack_require__(230), + Factory: __webpack_require__(483), + Group: __webpack_require__(485), + Image: __webpack_require__(484), + Sprite: __webpack_require__(145), + StaticBody: __webpack_require__(495), + StaticGroup: __webpack_require__(486), + World: __webpack_require__(488) }; @@ -184268,28 +187554,28 @@ module.exports = Arcade; /***/ }), -/* 1274 */ +/* 1286 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var DegToRad = __webpack_require__(40); -var DistanceBetween = __webpack_require__(63); -var DistanceSquared = __webpack_require__(319); -var Factory = __webpack_require__(464); +var DistanceBetween = __webpack_require__(54); +var DistanceSquared = __webpack_require__(338); +var Factory = __webpack_require__(483); var GetFastValue = __webpack_require__(1); -var Merge = __webpack_require__(87); -var OverlapCirc = __webpack_require__(1287); -var OverlapRect = __webpack_require__(468); -var PluginCache = __webpack_require__(20); -var SceneEvents = __webpack_require__(21); +var Merge = __webpack_require__(88); +var OverlapCirc = __webpack_require__(1299); +var OverlapRect = __webpack_require__(487); +var PluginCache = __webpack_require__(22); +var SceneEvents = __webpack_require__(18); var Vector2 = __webpack_require__(3); -var World = __webpack_require__(469); +var World = __webpack_require__(488); /** * @classdesc @@ -184957,12 +188243,12 @@ module.exports = ArcadePhysics; /***/ }), -/* 1275 */ +/* 1287 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185032,12 +188318,12 @@ module.exports = Acceleration; /***/ }), -/* 1276 */ +/* 1288 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185114,12 +188400,12 @@ module.exports = Angular; /***/ }), -/* 1277 */ +/* 1289 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185189,7 +188475,7 @@ var Bounce = { /** * Sets whether this Body collides with the world boundary. * - * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Vec2 first. + * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Phaser.Math.Vector2 first. * * @method Phaser.Physics.Arcade.Components.Bounce#setCollideWorldBounds * @since 3.0.0 @@ -185213,12 +188499,12 @@ module.exports = Bounce; /***/ }), -/* 1278 */ +/* 1290 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185340,12 +188626,12 @@ module.exports = Debug; /***/ }), -/* 1279 */ +/* 1291 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185473,12 +188759,12 @@ module.exports = Drag; /***/ }), -/* 1280 */ +/* 1292 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185597,12 +188883,12 @@ module.exports = Enable; /***/ }), -/* 1281 */ +/* 1293 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185675,12 +188961,12 @@ module.exports = Friction; /***/ }), -/* 1282 */ +/* 1294 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185753,12 +189039,12 @@ module.exports = Gravity; /***/ }), -/* 1283 */ +/* 1295 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185795,12 +189081,12 @@ module.exports = Immovable; /***/ }), -/* 1284 */ +/* 1296 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185835,12 +189121,12 @@ module.exports = Mass; /***/ }), -/* 1285 */ +/* 1297 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185917,12 +189203,12 @@ module.exports = Size; /***/ }), -/* 1286 */ +/* 1298 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -186016,13 +189302,13 @@ module.exports = Velocity; /***/ }), -/* 1287 */ +/* 1299 */ /***/ (function(module, exports, __webpack_require__) { -var OverlapRect = __webpack_require__(468); -var Circle = __webpack_require__(70); -var CircleToCircle = __webpack_require__(214); -var CircleToRectangle = __webpack_require__(215); +var OverlapRect = __webpack_require__(487); +var Circle = __webpack_require__(71); +var CircleToCircle = __webpack_require__(217); +var CircleToRectangle = __webpack_require__(218); /** * This method will search the given circular area and return an array of all physics bodies that @@ -186084,12 +189370,12 @@ module.exports = OverlapCirc; /***/ }), -/* 1288 */ +/* 1300 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -186117,12 +189403,12 @@ module.exports = 'collide'; /***/ }), -/* 1289 */ +/* 1301 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -186150,12 +189436,12 @@ module.exports = 'overlap'; /***/ }), -/* 1290 */ +/* 1302 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -186173,12 +189459,12 @@ module.exports = 'pause'; /***/ }), -/* 1291 */ +/* 1303 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -186196,12 +189482,12 @@ module.exports = 'resume'; /***/ }), -/* 1292 */ +/* 1304 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -186228,12 +189514,12 @@ module.exports = 'tilecollide'; /***/ }), -/* 1293 */ +/* 1305 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -186260,12 +189546,12 @@ module.exports = 'tileoverlap'; /***/ }), -/* 1294 */ +/* 1306 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -186292,12 +189578,12 @@ module.exports = 'worldbounds'; /***/ }), -/* 1295 */ +/* 1307 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -186318,12 +189604,12 @@ module.exports = 'worldstep'; /***/ }), -/* 1296 */ +/* 1308 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -186359,18 +189645,18 @@ module.exports = ProcessTileCallbacks; /***/ }), -/* 1297 */ +/* 1309 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileCheckX = __webpack_require__(1298); -var TileCheckY = __webpack_require__(1300); -var TileIntersectsBody = __webpack_require__(475); +var TileCheckX = __webpack_require__(1310); +var TileCheckY = __webpack_require__(1312); +var TileIntersectsBody = __webpack_require__(494); /** * The core separation function to separate a physics body and a tile. @@ -186479,16 +189765,16 @@ module.exports = SeparateTile; /***/ }), -/* 1298 */ +/* 1310 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ProcessTileSeparationX = __webpack_require__(1299); +var ProcessTileSeparationX = __webpack_require__(1311); /** * Check the body against the given tile on the X axis. @@ -186569,12 +189855,12 @@ module.exports = TileCheckX; /***/ }), -/* 1299 */ +/* 1311 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -186616,16 +189902,16 @@ module.exports = ProcessTileSeparationX; /***/ }), -/* 1300 */ +/* 1312 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ProcessTileSeparationY = __webpack_require__(1301); +var ProcessTileSeparationY = __webpack_require__(1313); /** * Check the body against the given tile on the Y axis. @@ -186706,12 +189992,12 @@ module.exports = TileCheckY; /***/ }), -/* 1301 */ +/* 1313 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -186753,16 +190039,16 @@ module.exports = ProcessTileSeparationY; /***/ }), -/* 1302 */ +/* 1314 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetOverlapX = __webpack_require__(472); +var GetOverlapX = __webpack_require__(491); /** * Separates two overlapping bodies on the X-axis (horizontally). @@ -186844,16 +190130,16 @@ module.exports = SeparateX; /***/ }), -/* 1303 */ +/* 1315 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetOverlapY = __webpack_require__(473); +var GetOverlapY = __webpack_require__(492); /** * Separates two overlapping bodies on the Y-axis (vertically). @@ -186935,12 +190221,12 @@ module.exports = SeparateY; /***/ }), -/* 1304 */ +/* 1316 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -186961,32 +190247,32 @@ module.exports = SeparateY; */ module.exports = { - Body: __webpack_require__(477), - Events: __webpack_require__(228), - COLLIDES: __webpack_require__(110), - CollisionMap: __webpack_require__(478), - Factory: __webpack_require__(479), - Image: __webpack_require__(481), - ImpactBody: __webpack_require__(480), - ImpactPhysics: __webpack_require__(1323), - Sprite: __webpack_require__(482), - TYPE: __webpack_require__(111), - World: __webpack_require__(483) + Body: __webpack_require__(496), + Events: __webpack_require__(231), + COLLIDES: __webpack_require__(112), + CollisionMap: __webpack_require__(497), + Factory: __webpack_require__(498), + Image: __webpack_require__(500), + ImpactBody: __webpack_require__(499), + ImpactPhysics: __webpack_require__(1335), + Sprite: __webpack_require__(501), + TYPE: __webpack_require__(113), + World: __webpack_require__(502) }; /***/ }), -/* 1305 */ +/* 1317 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(24); +var Clamp = __webpack_require__(20); /** * [description] @@ -187033,12 +190319,12 @@ module.exports = GetVelocity; /***/ }), -/* 1306 */ +/* 1318 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187128,12 +190414,12 @@ module.exports = UpdateMotion; /***/ }), -/* 1307 */ +/* 1319 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187155,12 +190441,12 @@ module.exports = 'collide'; /***/ }), -/* 1308 */ +/* 1320 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187178,12 +190464,12 @@ module.exports = 'pause'; /***/ }), -/* 1309 */ +/* 1321 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187201,12 +190487,12 @@ module.exports = 'resume'; /***/ }), -/* 1310 */ +/* 1322 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187272,12 +190558,12 @@ module.exports = { /***/ }), -/* 1311 */ +/* 1323 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187349,12 +190635,12 @@ module.exports = Acceleration; /***/ }), -/* 1312 */ +/* 1324 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187423,16 +190709,16 @@ module.exports = BodyScale; /***/ }), -/* 1313 */ +/* 1325 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TYPE = __webpack_require__(111); +var TYPE = __webpack_require__(113); /** * The Impact Body Type component. @@ -187507,12 +190793,12 @@ module.exports = BodyType; /***/ }), -/* 1314 */ +/* 1326 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187587,16 +190873,16 @@ module.exports = Bounce; /***/ }), -/* 1315 */ +/* 1327 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TYPE = __webpack_require__(111); +var TYPE = __webpack_require__(113); /** * The Impact Check Against component. @@ -187709,16 +190995,16 @@ module.exports = CheckAgainst; /***/ }), -/* 1316 */ +/* 1328 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var COLLIDES = __webpack_require__(110); +var COLLIDES = __webpack_require__(112); /** * @callback CollideCallback @@ -187865,12 +191151,12 @@ module.exports = Collides; /***/ }), -/* 1317 */ +/* 1329 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187990,12 +191276,12 @@ module.exports = Debug; /***/ }), -/* 1318 */ +/* 1330 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -188067,12 +191353,12 @@ module.exports = Friction; /***/ }), -/* 1319 */ +/* 1331 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -188129,12 +191415,12 @@ module.exports = Gravity; /***/ }), -/* 1320 */ +/* 1332 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -188179,12 +191465,12 @@ module.exports = Offset; /***/ }), -/* 1321 */ +/* 1333 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -188255,12 +191541,12 @@ module.exports = SetGameObject; /***/ }), -/* 1322 */ +/* 1334 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -188355,22 +191641,22 @@ module.exports = Velocity; /***/ }), -/* 1323 */ +/* 1335 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Factory = __webpack_require__(479); +var Factory = __webpack_require__(498); var GetFastValue = __webpack_require__(1); -var Merge = __webpack_require__(87); -var PluginCache = __webpack_require__(20); -var SceneEvents = __webpack_require__(21); -var World = __webpack_require__(483); +var Merge = __webpack_require__(88); +var PluginCache = __webpack_require__(22); +var SceneEvents = __webpack_require__(18); +var World = __webpack_require__(502); /** * @classdesc @@ -188572,19 +191858,19 @@ module.exports = ImpactPhysics; /***/ }), -/* 1324 */ +/* 1336 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var COLLIDES = __webpack_require__(110); -var Events = __webpack_require__(228); -var SeparateX = __webpack_require__(1325); -var SeparateY = __webpack_require__(1326); +var COLLIDES = __webpack_require__(112); +var Events = __webpack_require__(231); +var SeparateX = __webpack_require__(1337); +var SeparateY = __webpack_require__(1338); /** * Impact Physics Solver @@ -188648,12 +191934,12 @@ module.exports = Solver; /***/ }), -/* 1325 */ +/* 1337 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -188704,12 +191990,12 @@ module.exports = SeparateX; /***/ }), -/* 1326 */ +/* 1338 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -188789,12 +192075,12 @@ module.exports = SeparateY; /***/ }), -/* 1327 */ +/* 1339 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -188804,106 +192090,32 @@ module.exports = SeparateY; module.exports = { - Factory: __webpack_require__(484), - Image: __webpack_require__(488), - Matter: __webpack_require__(235), - MatterPhysics: __webpack_require__(1357), - PolyDecomp: __webpack_require__(485), - Sprite: __webpack_require__(489), - TileBody: __webpack_require__(232), - PhysicsEditorParser: __webpack_require__(487), - World: __webpack_require__(495) + BodyBounds: __webpack_require__(503), + Factory: __webpack_require__(504), + Image: __webpack_require__(506), + Matter: __webpack_require__(239), + MatterPhysics: __webpack_require__(1371), + PolyDecomp: __webpack_require__(505), + Sprite: __webpack_require__(507), + TileBody: __webpack_require__(238), + PhysicsEditorParser: __webpack_require__(235), + PhysicsJSONParser: __webpack_require__(236), + World: __webpack_require__(511) }; -/** - * @namespace MatterJS - */ - -/** - * @classdesc - * The `Matter.Body` module contains methods for creating and manipulating body models. - * A `Matter.Body` is a rigid body that can be simulated by a `Matter.Engine`. - * Factories for commonly used body configurations (such as rectangles, circles and other polygons) can be found in the module `Matter.Bodies`. - * - * @class MatterJS.Body - * @since 3.0.0 - */ - -/** - * @classdesc - * The `Matter.Bodies` module contains factory methods for creating rigid body models - * with commonly used body configurations (such as rectangles, circles and other polygons). - * - * @class MatterJS.Bodies - * @since 3.18.0 - */ - -/** - * @classdesc - * The `Matter.Composite` module contains methods for creating and manipulating composite bodies. - * A composite body is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`, therefore composites form a tree structure. - * It is important to use the functions in this module to modify composites, rather than directly modifying their properties. - * Note that the `Matter.World` object is also a type of `Matter.Composite` and as such all composite methods here can also operate on a `Matter.World`. - * - * @class MatterJS.Composite - * @since 3.0.0 - */ - -/** - * @classdesc - * The `Matter.World` module contains methods for creating and manipulating the world composite. - * A `Matter.World` is a `Matter.Composite` body, which is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`. - * A `Matter.World` has a few additional properties including `gravity` and `bounds`. - * It is important to use the functions in the `Matter.Composite` module to modify the world composite, rather than directly modifying its properties. - * There are also a few methods here that alias those in `Matter.Composite` for easier readability. - * - * @class MatterJS.World - * @extends MatterJS.Composite - * @since 3.0.0 - */ - -/** - * @classdesc - * The `Matter.Constraint` module contains methods for creating and manipulating constraints. - * Constraints are used for specifying that a fixed distance must be maintained between two bodies (or a body and a fixed world-space position). - * The stiffness of constraints can be modified to create springs or elastic. - * - * @class MatterJS.Constraint - * @since 3.0.0 - */ - -/** - * @classdesc - * The `Matter.Engine` module contains methods for creating and manipulating engines. - * An engine is a controller that manages updating the simulation of the world. - * - * @class MatterJS.Engine - * @since 3.0.0 - */ - -/** - * @classdesc - * The `Matter.Vertices` module contains methods for creating and manipulating sets of vertices. - * A set of vertices is an array of `Matter.Vector` with additional indexing properties inserted by `Vertices.create`. - * A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull). - * - * @class MatterJS.Vertices - * @since 3.0.0 - */ - /***/ }), -/* 1328 */ +/* 1340 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Components = __webpack_require__(143); +var Components = __webpack_require__(147); var GetFastValue = __webpack_require__(1); var Vector2 = __webpack_require__(3); @@ -188923,20 +192135,26 @@ function hasGetterOrSetter (def) } /** - * [description] + * A Matter Game Object is a generic object that allows you to combine any Phaser Game Object, + * including those you have extended or created yourself, with all of the Matter Components. + * + * This enables you to use component methods such as `setVelocity` or `isSensor` directly from + * this Game Object. * * @function Phaser.Physics.Matter.MatterGameObject * @since 3.3.0 * * @param {Phaser.Physics.Matter.World} world - The Matter world to add the body to. * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will have the Matter body applied to it. - * @param {(object|MatterJS.Body)} options - A Matter Body configuration object, or an instance of a Matter Body. + * @param {(Phaser.Types.Physics.Matter.MatterBodyConfig|MatterJS.Body)} [options] - A Matter Body configuration object, or an instance of a Matter Body. + * @param {boolean} [addToWorld=true] - Should the newly created body be immediately added to the World? * * @return {Phaser.GameObjects.GameObject} The Game Object that was created with the Matter body. */ -var MatterGameObject = function (world, gameObject, options) +var MatterGameObject = function (world, gameObject, options, addToWorld) { if (options === undefined) { options = {}; } + if (addToWorld === undefined) { addToWorld = true; } var x = gameObject.x; var y = gameObject.y; @@ -188991,7 +192209,7 @@ var MatterGameObject = function (world, gameObject, options) if (options.hasOwnProperty('type') && options.type === 'body') { - gameObject.setExistingBody(options, true); + gameObject.setExistingBody(options, addToWorld); } else { @@ -189001,6 +192219,8 @@ var MatterGameObject = function (world, gameObject, options) { shape = 'rectangle'; } + + options.addToWorld = addToWorld; gameObject.setBody(shape, options); } @@ -189012,12 +192232,12 @@ module.exports = MatterGameObject; /***/ }), -/* 1329 */ +/* 1341 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -189052,12 +192272,12 @@ module.exports = Bounce; /***/ }), -/* 1330 */ +/* 1342 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -189070,7 +192290,9 @@ module.exports = Bounce; var Collision = { /** - * Sets the collision category of this Game Object's Matter Body. This number must be a power of two between 2^0 (= 1) and 2^31. Two bodies with different collision groups (see {@link #setCollisionGroup}) will only collide if their collision categories are included in their collision masks (see {@link #setCollidesWith}). + * Sets the collision category of this Game Object's Matter Body. This number must be a power of two between 2^0 (= 1) and 2^31. + * Two bodies with different collision groups (see {@link #setCollisionGroup}) will only collide if their collision + * categories are included in their collision masks (see {@link #setCollidesWith}). * * @method Phaser.Physics.Matter.Components.Collision#setCollisionCategory * @since 3.0.0 @@ -189087,7 +192309,10 @@ var Collision = { }, /** - * Sets the collision group of this Game Object's Matter Body. If this is zero or two Matter Bodies have different values, they will collide according to the usual rules (see {@link #setCollisionCategory} and {@link #setCollisionGroup}). If two Matter Bodies have the same positive value, they will always collide; if they have the same negative value, they will never collide. + * Sets the collision group of this Game Object's Matter Body. If this is zero or two Matter Bodies have different values, + * they will collide according to the usual rules (see {@link #setCollisionCategory} and {@link #setCollisionGroup}). + * If two Matter Bodies have the same positive value, they will always collide; if they have the same negative value, + * they will never collide. * * @method Phaser.Physics.Matter.Components.Collision#setCollisionGroup * @since 3.0.0 @@ -189104,7 +192329,9 @@ var Collision = { }, /** - * Sets the collision mask for this Game Object's Matter Body. Two Matter Bodies with different collision groups will only collide if each one includes the other's category in its mask based on a bitwise AND, i.e. `(categoryA & maskB) !== 0` and `(categoryB & maskA) !== 0` are both true. + * Sets the collision mask for this Game Object's Matter Body. Two Matter Bodies with different collision groups will only + * collide if each one includes the other's category in its mask based on a bitwise AND, i.e. `(categoryA & maskB) !== 0` + * and `(categoryB & maskA) !== 0` are both true. * * @method Phaser.Physics.Matter.Components.Collision#setCollidesWith * @since 3.0.0 @@ -189131,6 +192358,97 @@ var Collision = { this.body.collisionFilter.mask = flags; + return this; + }, + + /** + * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object. + * + * This does not change the bodies collision category, group or filter. Those must be set in addition + * to the callback. + * + * @method Phaser.Physics.Matter.Components.Collision#setOnCollide + * @since 3.22.0 + * + * @param {function} callback - The callback to invoke when this body starts colliding with another. + * + * @return {Phaser.GameObjects.GameObject} This Game Object. + */ + setOnCollide: function (callback) + { + this.body.onCollideCallback = callback; + + return this; + }, + + /** + * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object. + * + * This does not change the bodies collision category, group or filter. Those must be set in addition + * to the callback. + * + * @method Phaser.Physics.Matter.Components.Collision#setOnCollideEnd + * @since 3.22.0 + * + * @param {function} callback - The callback to invoke when this body stops colliding with another. + * + * @return {Phaser.GameObjects.GameObject} This Game Object. + */ + setOnCollideEnd: function (callback) + { + this.body.onCollideEndCallback = callback; + + return this; + }, + + /** + * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object. + * + * This does not change the bodies collision category, group or filter. Those must be set in addition + * to the callback. + * + * @method Phaser.Physics.Matter.Components.Collision#setOnCollideActive + * @since 3.22.0 + * + * @param {function} callback - The callback to invoke for the duration of this body colliding with another. + * + * @return {Phaser.GameObjects.GameObject} This Game Object. + */ + setOnCollideActive: function (callback) + { + this.body.onCollideActiveCallback = callback; + + return this; + }, + + /** + * The callback is sent a reference to the other body, along with a `Phaser.Types.Physics.Matter.MatterCollisionData` object. + * + * This does not change the bodies collision category, group or filter. Those must be set in addition + * to the callback. + * + * @method Phaser.Physics.Matter.Components.Collision#setOnCollideWith + * @since 3.22.0 + * + * @param {(MatterJS.Body|MatterJS.Body[])} body - The body, or an array of bodies, to test for collisions with. + * @param {function} callback - The callback to invoke when this body collides with the given body or bodies. + * + * @return {Phaser.GameObjects.GameObject} This Game Object. + */ + setOnCollideWith: function (body, callback) + { + if (!Array.isArray(body)) + { + body = [ body ]; + } + + for (var i = 0; i < body.length; i++) + { + var src = (body[i].hasOwnProperty('body')) ? body[i].body : body[i]; + + this.body.setOnCollideWith(src, callback); + } + return this; } @@ -189140,12 +192458,12 @@ module.exports = Collision; /***/ }), -/* 1331 */ +/* 1343 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -189200,6 +192518,8 @@ var Force = { /** * Apply thrust to the forward position of the body. + * + * Use very small values, such as 0.1, depending on the mass and required speed. * * @method Phaser.Physics.Matter.Components.Force#thrust * @since 3.0.0 @@ -189221,6 +192541,8 @@ var Force = { /** * Apply thrust to the left position of the body. + * + * Use very small values, such as 0.1, depending on the mass and required speed. * * @method Phaser.Physics.Matter.Components.Force#thrustLeft * @since 3.0.0 @@ -189242,6 +192564,8 @@ var Force = { /** * Apply thrust to the right position of the body. + * + * Use very small values, such as 0.1, depending on the mass and required speed. * * @method Phaser.Physics.Matter.Components.Force#thrustRight * @since 3.0.0 @@ -189263,6 +192587,8 @@ var Force = { /** * Apply thrust to the back position of the body. + * + * Use very small values, such as 0.1, depending on the mass and required speed. * * @method Phaser.Physics.Matter.Components.Force#thrustBack * @since 3.0.0 @@ -189288,12 +192614,12 @@ module.exports = Force; /***/ }), -/* 1332 */ +/* 1344 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -189335,7 +192661,9 @@ var Friction = { }, /** - * Sets a new air resistance for this Game Object's Matter Body. A value of 0 means the Body will never slow as it moves through space. The higher the value, the faster a Body slows when moving through space. + * Sets a new air resistance for this Game Object's Matter Body. + * A value of 0 means the Body will never slow as it moves through space. + * The higher the value, the faster a Body slows when moving through space. * * @method Phaser.Physics.Matter.Components.Friction#setFrictionAir * @since 3.0.0 @@ -189352,7 +192680,9 @@ var Friction = { }, /** - * Sets a new static friction for this Game Object's Matter Body. A value of 0 means the Body will never "stick" when it is nearly stationary. The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary. + * Sets a new static friction for this Game Object's Matter Body. + * A value of 0 means the Body will never "stick" when it is nearly stationary. + * The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary. * * @method Phaser.Physics.Matter.Components.Friction#setFrictionStatic * @since 3.0.0 @@ -189374,12 +192704,12 @@ module.exports = Friction; /***/ }), -/* 1333 */ +/* 1345 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -189414,12 +192744,12 @@ module.exports = Gravity; /***/ }), -/* 1334 */ +/* 1346 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -189470,6 +192800,10 @@ var Mass = { /** * The body's center of mass. + * + * Calling this creates a new `Vector2 each time to avoid mutation. + * + * If you only need to read the value and won't change it, you can get it from `GameObject.body.centerOfMass`. * * @name Phaser.Physics.Matter.Components.Mass#centerOfMass * @type {Phaser.Math.Vector2} @@ -189482,7 +192816,7 @@ var Mass = { get: function () { - return new Vector2(this.body.render.sprite.xOffset * this.width, this.body.render.sprite.yOffset * this.height); + return new Vector2(this.body.centerOfMass.x, this.body.centerOfMass.y); } } @@ -189492,19 +192826,19 @@ module.exports = Mass; /***/ }), -/* 1335 */ +/* 1347 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Body = __webpack_require__(25); /** - * [description] + * Provides methods used for getting and setting the static state of a physics body. * * @namespace Phaser.Physics.Matter.Components.Static * @since 3.0.0 @@ -189512,12 +192846,12 @@ var Body = __webpack_require__(25); var Static = { /** - * [description] + * Changes the physics body to be either static `true` or dynamic `false`. * * @method Phaser.Physics.Matter.Components.Static#setStatic * @since 3.0.0 * - * @param {boolean} value - [description] + * @param {boolean} value - `true` to set the body as being static, or `false` to make it dynamic. * * @return {Phaser.GameObjects.GameObject} This Game Object. */ @@ -189529,12 +192863,12 @@ var Static = { }, /** - * [description] + * Returns `true` if the body is static, otherwise `false` for a dynamic body. * * @method Phaser.Physics.Matter.Components.Static#isStatic * @since 3.0.0 * - * @return {boolean} [description] + * @return {boolean} `true` if the body is static, otherwise `false`. */ isStatic: function () { @@ -189547,17 +192881,17 @@ module.exports = Static; /***/ }), -/* 1336 */ +/* 1348 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * [description] + * Enables a Matter-enabled Game Object to be a sensor. Should be used as a mixin and not directly. * * @namespace Phaser.Physics.Matter.Components.Sensor * @since 3.0.0 @@ -189565,12 +192899,13 @@ module.exports = Static; var Sensor = { /** - * [description] + * Set the body belonging to this Game Object to be a sensor. + * Sensors trigger collision events, but don't react with colliding body physically. * * @method Phaser.Physics.Matter.Components.Sensor#setSensor * @since 3.0.0 * - * @param {boolean} value - [description] + * @param {boolean} value - `true` to set the body as a sensor, or `false` to disable it. * * @return {Phaser.GameObjects.GameObject} This Game Object. */ @@ -189582,12 +192917,12 @@ var Sensor = { }, /** - * [description] + * Is the body belonging to this Game Object a sensor or not? * * @method Phaser.Physics.Matter.Components.Sensor#isSensor * @since 3.0.0 * - * @return {boolean} [description] + * @return {boolean} `true` if the body is a sensor, otherwise `false`. */ isSensor: function () { @@ -189600,40 +192935,43 @@ module.exports = Sensor; /***/ }), -/* 1337 */ +/* 1349 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bodies = __webpack_require__(57); +var Bodies = __webpack_require__(42); var Body = __webpack_require__(25); +var FuzzyEquals = __webpack_require__(126); var GetFastValue = __webpack_require__(1); -var PhysicsEditorParser = __webpack_require__(487); +var PhysicsEditorParser = __webpack_require__(235); +var PhysicsJSONParser = __webpack_require__(236); var Vertices = __webpack_require__(31); /** - * [description] + * Enables a Matter-enabled Game Object to set its Body. Should be used as a mixin and not directly. * * @namespace Phaser.Physics.Matter.Components.SetBody * @since 3.0.0 */ var SetBody = { - // Calling any of these methods resets previous properties you may have set on the body, including plugins, mass, etc - /** * Set the body on a Game Object to a rectangle. + * + * Calling this methods resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. * * @method Phaser.Physics.Matter.Components.SetBody#setRectangle * @since 3.0.0 * * @param {number} width - Width of the rectangle. * @param {number} height - Height of the rectangle. - * @param {object} options - [description] + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * * @return {Phaser.GameObjects.GameObject} This Game Object. */ @@ -189643,13 +192981,16 @@ var SetBody = { }, /** - * [description] + * Set the body on a Game Object to a circle. + * + * Calling this methods resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. * * @method Phaser.Physics.Matter.Components.SetBody#setCircle * @since 3.0.0 * - * @param {number} radius - [description] - * @param {object} options - [description] + * @param {number} radius - The radius of the circle. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * * @return {Phaser.GameObjects.GameObject} This Game Object. */ @@ -189660,13 +193001,16 @@ var SetBody = { /** * Set the body on the Game Object to a polygon shape. + * + * Calling this methods resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. * * @method Phaser.Physics.Matter.Components.SetBody#setPolygon * @since 3.0.0 * - * @param {number} radius - The radius of the polygon. - * @param {number} sides - The amount of sides creating the polygon. - * @param {object} options - A matterjs config object. + * @param {number} sides - The number of sides the polygon will have. + * @param {number} radius - The "radius" of the polygon, i.e. the distance from its center to any vertex. This is also the radius of its circumcircle. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * * @return {Phaser.GameObjects.GameObject} This Game Object. */ @@ -189676,15 +193020,18 @@ var SetBody = { }, /** - * Creates a new matterjs trapezoid body. + * Set the body on the Game Object to a trapezoid shape. + * + * Calling this methods resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. * * @method Phaser.Physics.Matter.Components.SetBody#setTrapezoid * @since 3.0.0 * - * @param {number} width - The width of the trapezoid. - * @param {number} height - The height of the trapezoid. - * @param {number} slope - The angle of slope for the trapezoid. - * @param {object} options - A matterjs config object for the body. + * @param {number} width - The width of the trapezoid Body. + * @param {number} height - The height of the trapezoid Body. + * @param {number} slope - The slope of the trapezoid. 0 creates a rectangle, while 1 creates a triangle. Positive values make the top side shorter, while negative values make the bottom side shorter. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * * @return {Phaser.GameObjects.GameObject} This Game Object. */ @@ -189694,26 +193041,25 @@ var SetBody = { }, /** - * [description] + * Set this Game Object to use the given existing Matter Body. + * + * The body is first removed from the world before being added to this Game Object. * * @method Phaser.Physics.Matter.Components.SetBody#setExistingBody * @since 3.0.0 * - * @param {MatterJS.Body} body - [description] - * @param {boolean} [addToWorld=true] - [description] + * @param {MatterJS.BodyType} body - The Body this Game Object should use. + * @param {boolean} [addToWorld=true] - Should the body be immediately added to the World? * * @return {Phaser.GameObjects.GameObject} This Game Object. */ setExistingBody: function (body, addToWorld) { - if (addToWorld === undefined) - { - addToWorld = true; - } + if (addToWorld === undefined) { addToWorld = true; } if (this.body) { - this.world.remove(this.body); + this.world.remove(this.body, true); } this.body = body; @@ -189727,31 +193073,56 @@ var SetBody = { body.destroy = function destroy () { - _this.world.remove(_this.body); + _this.world.remove(_this.body, true); _this.body.gameObject = null; }; if (addToWorld) { + if (this.world.has(body)) + { + // Because it could be part of another Composite + this.world.remove(body, true); + } + this.world.add(body); } if (this._originComponent) { - this.setOrigin(body.render.sprite.xOffset, body.render.sprite.yOffset); + var rx = body.render.sprite.xOffset; + var ry = body.render.sprite.yOffset; + + var comx = body.centerOfMass.x; + var comy = body.centerOfMass.y; + + if (FuzzyEquals(comx, 0.5) && FuzzyEquals(comy, 0.5)) + { + this.setOrigin(rx + 0.5, ry + 0.5); + } + else + { + var cx = body.centerOffset.x; + var cy = body.centerOffset.y; + + this.setOrigin(rx + (cx / this.displayWidth), ry + (cy / this.displayHeight)); + } } return this; }, /** - * [description] + * Set this Game Object to create and use a new Body based on the configuration object given. + * + * Calling this method resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. * * @method Phaser.Physics.Matter.Components.SetBody#setBody * @since 3.0.0 * - * @param {object} config - [description] - * @param {object} options - [description] + * @param {(string|Phaser.Types.Physics.Matter.MatterSetBodyConfig)} config - Either a string, such as `circle`, or a Matter Set Body Configuration object. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * * @return {Phaser.GameObjects.GameObject} This Game Object. */ @@ -189832,7 +193203,11 @@ var SetBody = { break; case 'fromPhysicsEditor': - body = PhysicsEditorParser.parseBody(bodyX, bodyY, bodyWidth, bodyHeight, config); + body = PhysicsEditorParser.parseBody(bodyX, bodyY, config, options); + break; + + case 'fromPhysicsTracer': + body = PhysicsJSONParser.parseBody(bodyX, bodyY, config, options); break; } @@ -189850,20 +193225,21 @@ module.exports = SetBody; /***/ }), -/* 1338 */ +/* 1350 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Events = __webpack_require__(231); -var MatterEvents = __webpack_require__(94); +var Events = __webpack_require__(237); +var Sleeping = __webpack_require__(95); +var MatterEvents = __webpack_require__(96); /** - * [description] + * Enables a Matter-enabled Game Object to be able to go to sleep. Should be used as a mixin and not directly. * * @namespace Phaser.Physics.Matter.Components.Sleep * @since 3.0.0 @@ -189871,14 +193247,40 @@ var MatterEvents = __webpack_require__(94); var Sleep = { /** - * [description] + * Sets this Body to sleep. + * + * @method Phaser.Physics.Matter.Components.Sleep#setToSleep + * @since 3.22.0 + * + * @return {this} This Game Object. + */ + setToSleep: function () + { + Sleeping.set(this.body, true); + }, + + /** + * Wakes this Body if asleep. + * + * @method Phaser.Physics.Matter.Components.Sleep#setAwake + * @since 3.22.0 + * + * @return {this} This Game Object. + */ + setAwake: function () + { + Sleeping.set(this.body, false); + }, + + /** + * Sets the number of updates in which this body must have near-zero velocity before it is set as sleeping (if sleeping is enabled by the engine). * * @method Phaser.Physics.Matter.Components.Sleep#setSleepThreshold * @since 3.0.0 * - * @param {number} [value=60] - [description] + * @param {number} [value=60] - A `Number` that defines the number of updates in which this body must have near-zero velocity before it is set as sleeping. * - * @return {Phaser.GameObjects.GameObject} This Game Object. + * @return {this} This Game Object. */ setSleepThreshold: function (value) { @@ -189890,15 +193292,20 @@ var Sleep = { }, /** - * [description] + * Enable sleep and wake events for this body. + * + * By default when a body goes to sleep, or wakes up, it will not emit any events. + * + * The events are emitted by the Matter World instance and can be listened to via + * the `SLEEP_START` and `SLEEP_END` events. * * @method Phaser.Physics.Matter.Components.Sleep#setSleepEvents * @since 3.0.0 * - * @param {boolean} start - [description] - * @param {boolean} end - [description] + * @param {boolean} start - `true` if you want the sleep start event to be emitted for this body. + * @param {boolean} end - `true` if you want the sleep end event to be emitted for this body. * - * @return {Phaser.GameObjects.GameObject} This Game Object. + * @return {this} This Game Object. */ setSleepEvents: function (start, end) { @@ -189909,14 +193316,14 @@ var Sleep = { }, /** - * [description] + * Enables or disables the Sleep Start event for this body. * * @method Phaser.Physics.Matter.Components.Sleep#setSleepStartEvent * @since 3.0.0 * - * @param {boolean} value - [description] + * @param {boolean} value - `true` to enable the sleep event, or `false` to disable it. * - * @return {Phaser.GameObjects.GameObject} This Game Object. + * @return {this} This Game Object. */ setSleepStartEvent: function (value) { @@ -189938,14 +193345,14 @@ var Sleep = { }, /** - * [description] + * Enables or disables the Sleep End event for this body. * * @method Phaser.Physics.Matter.Components.Sleep#setSleepEndEvent * @since 3.0.0 * - * @param {boolean} value - [description] + * @param {boolean} value - `true` to enable the sleep event, or `false` to disable it. * - * @return {Phaser.GameObjects.GameObject} This Game Object. + * @return {this} This Game Object. */ setSleepEndEvent: function (value) { @@ -189972,12 +193379,80 @@ module.exports = Sleep; /***/ }), -/* 1339 */ +/* 1351 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @typedef {object} Phaser.Physics.Matter.Events.AfterAddEvent + * + * @property {any[]} object - An array of the object(s) that have been added. May be a single body, constraint, composite or a mixture of these. + * @property {any} source - The source object of the event. + * @property {string} name - The name of the event. + */ + +/** + * The Matter Physics After Add Event. + * + * This event is dispatched by a Matter Physics World instance at the end of the process when a new Body + * or Constraint has just been added to the world. + * + * Listen to it from a Scene using: `this.matter.world.on('afteradd', listener)`. + * + * @event Phaser.Physics.Matter.Events#AFTER_ADD + * @since 3.22.0 + * + * @param {Phaser.Physics.Matter.Events.AfterAddEvent} event - The Add Event object. + */ +module.exports = 'afteradd'; + + +/***/ }), +/* 1352 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @typedef {object} Phaser.Physics.Matter.Events.AfterRemoveEvent + * + * @property {any[]} object - An array of the object(s) that were removed. May be a single body, constraint, composite or a mixture of these. + * @property {any} source - The source object of the event. + * @property {string} name - The name of the event. + */ + +/** + * The Matter Physics After Remove Event. + * + * This event is dispatched by a Matter Physics World instance at the end of the process when a + * Body or Constraint was removed from the world. + * + * Listen to it from a Scene using: `this.matter.world.on('afterremove', listener)`. + * + * @event Phaser.Physics.Matter.Events#AFTER_REMOVE + * @since 3.22.0 + * + * @param {Phaser.Physics.Matter.Events.AfterRemoveEvent} event - The Remove Event object. + */ +module.exports = 'afterremove'; + + +/***/ }), +/* 1353 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -190005,12 +193480,80 @@ module.exports = 'afterupdate'; /***/ }), -/* 1340 */ +/* 1354 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @typedef {object} Phaser.Physics.Matter.Events.BeforeAddEvent + * + * @property {any[]} object - An array of the object(s) to be added. May be a single body, constraint, composite or a mixture of these. + * @property {any} source - The source object of the event. + * @property {string} name - The name of the event. + */ + +/** + * The Matter Physics Before Add Event. + * + * This event is dispatched by a Matter Physics World instance at the start of the process when a new Body + * or Constraint is being added to the world. + * + * Listen to it from a Scene using: `this.matter.world.on('beforeadd', listener)`. + * + * @event Phaser.Physics.Matter.Events#BEFORE_ADD + * @since 3.22.0 + * + * @param {Phaser.Physics.Matter.Events.BeforeAddEvent} event - The Add Event object. + */ +module.exports = 'beforeadd'; + + +/***/ }), +/* 1355 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @typedef {object} Phaser.Physics.Matter.Events.BeforeRemoveEvent + * + * @property {any[]} object - An array of the object(s) to be removed. May be a single body, constraint, composite or a mixture of these. + * @property {any} source - The source object of the event. + * @property {string} name - The name of the event. + */ + +/** + * The Matter Physics Before Remove Event. + * + * This event is dispatched by a Matter Physics World instance at the start of the process when a + * Body or Constraint is being removed from the world. + * + * Listen to it from a Scene using: `this.matter.world.on('beforeremove', listener)`. + * + * @event Phaser.Physics.Matter.Events#BEFORE_REMOVE + * @since 3.22.0 + * + * @param {Phaser.Physics.Matter.Events.BeforeRemoveEvent} event - The Remove Event object. + */ +module.exports = 'beforeremove'; + + +/***/ }), +/* 1356 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -190038,19 +193581,19 @@ module.exports = 'beforeupdate'; /***/ }), -/* 1341 */ +/* 1357 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * @typedef {object} Phaser.Physics.Matter.Events.CollisionActiveEvent * - * @property {array} pairs - A list of all affected pairs in the collision. + * @property {Phaser.Types.Physics.Matter.MatterCollisionData[]} pairs - A list of all affected pairs in the collision. * @property {number} timestamp - The Matter Engine `timing.timestamp` value for the event. * @property {any} source - The source object of the event. * @property {string} name - The name of the event. @@ -190068,26 +193611,26 @@ module.exports = 'beforeupdate'; * @since 3.0.0 * * @param {Phaser.Physics.Matter.Events.CollisionActiveEvent} event - The Collision Event object. - * @param {MatterJS.Body} bodyA - The first body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. - * @param {MatterJS.Body} bodyB - The second body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. + * @param {MatterJS.BodyType} bodyA - The first body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. + * @param {MatterJS.BodyType} bodyB - The second body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. */ module.exports = 'collisionactive'; /***/ }), -/* 1342 */ +/* 1358 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * @typedef {object} Phaser.Physics.Matter.Events.CollisionEndEvent * - * @property {array} pairs - A list of all affected pairs in the collision. + * @property {Phaser.Types.Physics.Matter.MatterCollisionData[]} pairs - A list of all affected pairs in the collision. * @property {number} timestamp - The Matter Engine `timing.timestamp` value for the event. * @property {any} source - The source object of the event. * @property {string} name - The name of the event. @@ -190105,26 +193648,26 @@ module.exports = 'collisionactive'; * @since 3.0.0 * * @param {Phaser.Physics.Matter.Events.CollisionEndEvent} event - The Collision Event object. - * @param {MatterJS.Body} bodyA - The first body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. - * @param {MatterJS.Body} bodyB - The second body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. + * @param {MatterJS.BodyType} bodyA - The first body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. + * @param {MatterJS.BodyType} bodyB - The second body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. */ module.exports = 'collisionend'; /***/ }), -/* 1343 */ +/* 1359 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * @typedef {object} Phaser.Physics.Matter.Events.CollisionStartEvent * - * @property {array} pairs - A list of all affected pairs in the collision. + * @property {Phaser.Types.Physics.Matter.MatterCollisionData[]} pairs - A list of all affected pairs in the collision. * @property {number} timestamp - The Matter Engine `timing.timestamp` value for the event. * @property {any} source - The source object of the event. * @property {string} name - The name of the event. @@ -190142,19 +193685,19 @@ module.exports = 'collisionend'; * @since 3.0.0 * * @param {Phaser.Physics.Matter.Events.CollisionStartEvent} event - The Collision Event object. - * @param {MatterJS.Body} bodyA - The first body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. - * @param {MatterJS.Body} bodyB - The second body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. + * @param {MatterJS.BodyType} bodyA - The first body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. + * @param {MatterJS.BodyType} bodyB - The second body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. */ module.exports = 'collisionstart'; /***/ }), -/* 1344 */ +/* 1360 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -190169,19 +193712,19 @@ module.exports = 'collisionstart'; * @event Phaser.Physics.Matter.Events#DRAG_END * @since 3.16.2 * - * @param {MatterJS.Body} body - The Body that has stopped being dragged. This is a Matter Body, not a Phaser Game Object. + * @param {MatterJS.BodyType} body - The Body that has stopped being dragged. This is a Matter Body, not a Phaser Game Object. * @param {Phaser.Physics.Matter.PointerConstraint} constraint - The Pointer Constraint that was dragging the body. */ module.exports = 'dragend'; /***/ }), -/* 1345 */ +/* 1361 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -190196,19 +193739,19 @@ module.exports = 'dragend'; * @event Phaser.Physics.Matter.Events#DRAG * @since 3.16.2 * - * @param {MatterJS.Body} body - The Body that is being dragged. This is a Matter Body, not a Phaser Game Object. + * @param {MatterJS.BodyType} body - The Body that is being dragged. This is a Matter Body, not a Phaser Game Object. * @param {Phaser.Physics.Matter.PointerConstraint} constraint - The Pointer Constraint that is dragging the body. */ module.exports = 'drag'; /***/ }), -/* 1346 */ +/* 1362 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -190223,20 +193766,20 @@ module.exports = 'drag'; * @event Phaser.Physics.Matter.Events#DRAG_START * @since 3.16.2 * - * @param {MatterJS.Body} body - The Body that has started being dragged. This is a Matter Body, not a Phaser Game Object. - * @param {MatterJS.Body} part - The part of the body that was clicked on. + * @param {MatterJS.BodyType} body - The Body that has started being dragged. This is a Matter Body, not a Phaser Game Object. + * @param {MatterJS.BodyType} part - The part of the body that was clicked on. * @param {Phaser.Physics.Matter.PointerConstraint} constraint - The Pointer Constraint that is dragging the body. */ module.exports = 'dragstart'; /***/ }), -/* 1347 */ +/* 1363 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -190254,12 +193797,12 @@ module.exports = 'pause'; /***/ }), -/* 1348 */ +/* 1364 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -190277,12 +193820,12 @@ module.exports = 'resume'; /***/ }), -/* 1349 */ +/* 1365 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -190304,18 +193847,18 @@ module.exports = 'resume'; * @since 3.0.0 * * @param {Phaser.Physics.Matter.Events.SleepEndEvent} event - The Sleep Event object. - * @param {MatterJS.Body} body - The body that has stopped sleeping. + * @param {MatterJS.BodyType} body - The body that has stopped sleeping. */ module.exports = 'sleepend'; /***/ }), -/* 1350 */ +/* 1366 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -190337,25 +193880,25 @@ module.exports = 'sleepend'; * @since 3.0.0 * * @param {Phaser.Physics.Matter.Events.SleepStartEvent} event - The Sleep Event object. - * @param {MatterJS.Body} body - The body that has gone to sleep. + * @param {MatterJS.BodyType} body - The body that has gone to sleep. */ module.exports = 'sleepstart'; /***/ }), -/* 1351 */ +/* 1367 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Body = __webpack_require__(25); var MATH_CONST = __webpack_require__(13); -var WrapAngle = __webpack_require__(161); -var WrapAngleDegrees = __webpack_require__(162); +var WrapAngle = __webpack_require__(165); +var WrapAngleDegrees = __webpack_require__(166); // global bitmask flag for GameObject.renderMask (used by Scale) var _FLAG = 4; // 0100 @@ -190492,7 +194035,8 @@ var Transform = { }, /** - * Use `angle` to set or get rotation of the physics body associated to this GameObject. Unlike rotation, when using set the value can be in degrees, which will be converted to radians internally. + * Use `angle` to set or get rotation of the physics body associated to this GameObject. + * Unlike rotation, when using set the value can be in degrees, which will be converted to radians internally. * * @name Phaser.Physics.Matter.Components.Transform#angle * @type {number} @@ -190513,7 +194057,8 @@ var Transform = { }, /** - * Use `rotation` to set or get the rotation of the physics body associated with this GameObject. The value when set must be in radians. + * Use `rotation` to set or get the rotation of the physics body associated with this GameObject. + * The value when set must be in radians. * * @name Phaser.Physics.Matter.Components.Transform#rotation * @type {number} @@ -190536,7 +194081,9 @@ var Transform = { }, /** - * Sets the position of the physics body along x and y axes. Both the parameters to this function are optional and if not passed any they default to 0. + * Sets the position of the physics body along x and y axes. + * Both the parameters to this function are optional and if not passed any they default to 0. + * Velocity, angle, force etc. are unchanged. * * @method Phaser.Physics.Matter.Components.Transform#setPosition * @since 3.0.0 @@ -190559,12 +194106,13 @@ var Transform = { }, /** - * [description] + * Immediately sets the angle of the Body. + * Angular velocity, position, force etc. are unchanged. * * @method Phaser.Physics.Matter.Components.Transform#setRotation * @since 3.0.0 * - * @param {number} [radians=0] - [description] + * @param {number} [radians=0] - The angle of the body, in radians. * * @return {this} This Game Object. */ @@ -190580,7 +194128,8 @@ var Transform = { }, /** - * [description] + * Setting fixed rotation sets the Body inertia to Infinity, which stops it + * from being able to rotate when forces are applied to it. * * @method Phaser.Physics.Matter.Components.Transform#setFixedRotation * @since 3.0.0 @@ -190595,12 +194144,13 @@ var Transform = { }, /** - * [description] + * Immediately sets the angle of the Body. + * Angular velocity, position, force etc. are unchanged. * * @method Phaser.Physics.Matter.Components.Transform#setAngle * @since 3.0.0 * - * @param {number} [degrees=0] - [description] + * @param {number} [degrees=0] - The angle to set, in degrees. * * @return {this} This Game Object. */ @@ -190651,19 +194201,19 @@ module.exports = Transform; /***/ }), -/* 1352 */ +/* 1368 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Body = __webpack_require__(25); /** - * [description] + * Contains methods for changing the velocity of a Matter Body. Should be used as a mixin and not called directly. * * @namespace Phaser.Physics.Matter.Components.Velocity * @since 3.0.0 @@ -190671,12 +194221,13 @@ var Body = __webpack_require__(25); var Velocity = { /** - * [description] + * Sets the angular velocity of the body instantly. + * Position, angle, force etc. are unchanged. * * @method Phaser.Physics.Matter.Components.Velocity#setAngularVelocity * @since 3.0.0 * - * @param {number} value - [description] + * @param {number} value - The angular velocity. * * @return {Phaser.GameObjects.GameObject} This Game Object. */ @@ -190751,24 +194302,24 @@ module.exports = Velocity; /***/ }), -/* 1353 */ +/* 1369 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Bounds = __webpack_require__(38); var Class = __webpack_require__(0); -var Composite = __webpack_require__(77); -var Constraint = __webpack_require__(95); -var Detector = __webpack_require__(233); -var Events = __webpack_require__(231); -var InputEvents = __webpack_require__(54); -var Merge = __webpack_require__(87); -var Sleeping = __webpack_require__(112); +var Composite = __webpack_require__(68); +var Constraint = __webpack_require__(78); +var Detector = __webpack_require__(148); +var Events = __webpack_require__(237); +var InputEvents = __webpack_require__(56); +var Merge = __webpack_require__(88); +var Sleeping = __webpack_require__(95); var Vector2 = __webpack_require__(3); var Vertices = __webpack_require__(31); @@ -190805,7 +194356,6 @@ var PointerConstraint = new Class({ label: 'Pointer Constraint', pointA: { x: 0, y: 0 }, pointB: { x: 0, y: 0 }, - damping: 0, length: 0.01, stiffness: 0.1, angularStiffness: 1, @@ -190882,7 +194432,7 @@ var PointerConstraint = new Class({ * The body that is currently being dragged, if any. * * @name Phaser.Physics.Matter.PointerConstraint#body - * @type {?MatterJS.Body} + * @type {?MatterJS.BodyType} * @since 3.16.2 */ this.body = null; @@ -190891,7 +194441,7 @@ var PointerConstraint = new Class({ * The part of the body that was clicked on to start the drag. * * @name Phaser.Physics.Matter.PointerConstraint#part - * @type {?MatterJS.Body} + * @type {?MatterJS.BodyType} * @since 3.16.2 */ this.part = null; @@ -190900,7 +194450,7 @@ var PointerConstraint = new Class({ * The native Matter Constraint that is used to attach to bodies. * * @name Phaser.Physics.Matter.PointerConstraint#constraint - * @type {object} + * @type {MatterJS.ConstraintType} * @since 3.0.0 */ this.constraint = Constraint.create(Merge(options, defaults)); @@ -190908,17 +194458,17 @@ var PointerConstraint = new Class({ this.world.on(Events.BEFORE_UPDATE, this.update, this); scene.sys.input.on(InputEvents.POINTER_DOWN, this.onDown, this); + scene.sys.input.on(InputEvents.POINTER_UP, this.onUp, this); }, /** * A Pointer has been pressed down onto the Scene. * - * If this Constraint doesn't have an active Pointer then a hit test is - * run against all active bodies in the world. If one is found it is bound - * to this constraint and the drag begins. + * If this Constraint doesn't have an active Pointer then a hit test is set to + * run against all active bodies in the world during the _next_ call to `update`. + * If a body is found, it is bound to this constraint and the drag begins. * * @method Phaser.Physics.Matter.PointerConstraint#onDown - * @fires Phaser.Physics.Matter.Events#DRAG_START * @since 3.0.0 * * @param {Phaser.Input.Pointer} pointer - A reference to the Pointer that was pressed. @@ -190927,12 +194477,24 @@ var PointerConstraint = new Class({ { if (!this.pointer) { - if (this.getBody(pointer)) - { - this.pointer = pointer; + this.pointer = pointer; + this.camera = pointer.camera; + } + }, - this.camera = pointer.camera; - } + /** + * A Pointer has been released from the Scene. If it was the one this constraint was using, it's cleared. + * + * @method Phaser.Physics.Matter.PointerConstraint#onUp + * @since 3.22.0 + * + * @param {Phaser.Input.Pointer} pointer - A reference to the Pointer that was pressed. + */ + onUp: function (pointer) + { + if (pointer === this.pointer) + { + this.pointer = null; } }, @@ -190942,6 +194504,7 @@ var PointerConstraint = new Class({ * body. * * @method Phaser.Physics.Matter.PointerConstraint#getBody + * @fires Phaser.Physics.Matter.Events#DRAG_START * @since 3.16.2 * * @return {boolean} `true` if a body was found and set, otherwise `false`. @@ -190951,7 +194514,7 @@ var PointerConstraint = new Class({ var pos = this.position; var constraint = this.constraint; - pointer.camera.getWorldPoint(pointer.x, pointer.y, pos); + this.camera.getWorldPoint(pointer.x, pointer.y, pos); var bodies = Composite.allBodies(this.world.localWorld); @@ -190965,7 +194528,7 @@ var PointerConstraint = new Class({ { if (this.hitTestBody(body, pos)) { - this.world.emit(Events.DRAG_START, this.body, this.part, this); + this.world.emit(Events.DRAG_START, body, this.part, this); return true; } @@ -190983,7 +194546,7 @@ var PointerConstraint = new Class({ * @method Phaser.Physics.Matter.PointerConstraint#hitTestBody * @since 3.16.2 * - * @param {MatterJS.Body} body - The Matter Body to check. + * @param {MatterJS.BodyType} body - The Matter Body to check. * @param {Phaser.Math.Vector2} position - A translated hit test position. * * @return {boolean} `true` if a part of the body was hit, otherwise `false`. @@ -190991,23 +194554,20 @@ var PointerConstraint = new Class({ hitTestBody: function (body, position) { var constraint = this.constraint; + var partsLength = body.parts.length; - var start = (body.parts.length > 1) ? 1 : 0; + var start = (partsLength > 1) ? 1 : 0; - for (var i = start; i < body.parts.length; i++) + for (var i = start; i < partsLength; i++) { var part = body.parts[i]; if (Vertices.contains(part.vertices, position)) { + constraint.pointA = position; + constraint.pointB = { x: position.x - body.position.x, y: position.y - body.position.y }; + constraint.bodyB = body; - - constraint.pointA.x = position.x; - constraint.pointA.y = position.y; - - constraint.pointB.x = position.x - body.position.x; - constraint.pointB.y = position.y - body.position.y; - constraint.angleB = body.angle; Sleeping.set(body, false); @@ -191031,33 +194591,47 @@ var PointerConstraint = new Class({ */ update: function () { - var body = this.body; var pointer = this.pointer; + var body = this.body; - if (!this.active || !pointer || !body) + if (!this.active || !pointer) { + if (body) + { + this.stopDrag(); + } + return; } - if (pointer.isDown) + if (!pointer.isDown && body) { + this.stopDrag(); + + return; + } + else if (pointer.isDown) + { + if (!body && !this.getBody(pointer)) + { + return; + } + + body = this.body; + var pos = this.position; var constraint = this.constraint; this.camera.getWorldPoint(pointer.x, pointer.y, pos); - - Sleeping.set(body, false); - + + // Drag update constraint.pointA.x = pos.x; constraint.pointA.y = pos.y; - + + Sleeping.set(body, false); + this.world.emit(Events.DRAG, body, this); } - else - { - // Pointer has been released since the last world step - this.stopDrag(); - } }, /** @@ -191076,15 +194650,16 @@ var PointerConstraint = new Class({ var body = this.body; var constraint = this.constraint; + constraint.bodyB = null; + constraint.pointB = null; + + this.pointer = null; + this.body = null; + this.part = null; + if (body) { this.world.emit(Events.DRAG_END, body, this); - - this.pointer = null; - this.body = null; - this.part = null; - - constraint.bodyB = null; } }, @@ -191106,6 +194681,7 @@ var PointerConstraint = new Class({ this.world.off(Events.BEFORE_UPDATE, this.update); this.scene.sys.input.off(InputEvents.POINTER_DOWN, this.onDown, this); + this.scene.sys.input.off(InputEvents.POINTER_UP, this.onUp, this); } }); @@ -191114,143 +194690,7 @@ module.exports = PointerConstraint; /***/ }), -/* 1354 */ -/***/ (function(module, exports, __webpack_require__) { - -/** -* The `Matter.Query` module contains methods for performing collision queries. -* -* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). -* -* @class Query -*/ - -var Query = {}; - -module.exports = Query; - -var Vector = __webpack_require__(37); -var SAT = __webpack_require__(234); -var Bounds = __webpack_require__(38); -var Bodies = __webpack_require__(57); -var Vertices = __webpack_require__(31); - -(function() { - - /** - * Returns a list of collisions between `body` and `bodies`. - * @method collides - * @param {body} body - * @param {body[]} bodies - * @return {object[]} Collisions - */ - Query.collides = function(body, bodies) { - var collisions = []; - - for (var i = 0; i < bodies.length; i++) { - var bodyA = bodies[i]; - - if (Bounds.overlaps(bodyA.bounds, body.bounds)) { - for (var j = bodyA.parts.length === 1 ? 0 : 1; j < bodyA.parts.length; j++) { - var part = bodyA.parts[j]; - - if (Bounds.overlaps(part.bounds, body.bounds)) { - var collision = SAT.collides(part, body); - - if (collision.collided) { - collisions.push(collision); - break; - } - } - } - } - } - - return collisions; - }; - - /** - * Casts a ray segment against a set of bodies and returns all collisions, ray width is optional. Intersection points are not provided. - * @method ray - * @param {body[]} bodies - * @param {vector} startPoint - * @param {vector} endPoint - * @param {number} [rayWidth] - * @return {object[]} Collisions - */ - Query.ray = function(bodies, startPoint, endPoint, rayWidth) { - rayWidth = rayWidth || 1e-100; - - var rayAngle = Vector.angle(startPoint, endPoint), - rayLength = Vector.magnitude(Vector.sub(startPoint, endPoint)), - rayX = (endPoint.x + startPoint.x) * 0.5, - rayY = (endPoint.y + startPoint.y) * 0.5, - ray = Bodies.rectangle(rayX, rayY, rayLength, rayWidth, { angle: rayAngle }), - collisions = Query.collides(ray, bodies); - - for (var i = 0; i < collisions.length; i += 1) { - var collision = collisions[i]; - collision.body = collision.bodyB = collision.bodyA; - } - - return collisions; - }; - - /** - * Returns all bodies whose bounds are inside (or outside if set) the given set of bounds, from the given set of bodies. - * @method region - * @param {body[]} bodies - * @param {bounds} bounds - * @param {bool} [outside=false] - * @return {body[]} The bodies matching the query - */ - Query.region = function(bodies, bounds, outside) { - var result = []; - - for (var i = 0; i < bodies.length; i++) { - var body = bodies[i], - overlaps = Bounds.overlaps(body.bounds, bounds); - if ((overlaps && !outside) || (!overlaps && outside)) - result.push(body); - } - - return result; - }; - - /** - * Returns all bodies whose vertices contain the given point, from the given set of bodies. - * @method point - * @param {body[]} bodies - * @param {vector} point - * @return {body[]} The bodies matching the query - */ - Query.point = function(bodies, point) { - var result = []; - - for (var i = 0; i < bodies.length; i++) { - var body = bodies[i]; - - if (Bounds.contains(body.bounds, point)) { - for (var j = body.parts.length === 1 ? 0 : 1; j < body.parts.length; j++) { - var part = body.parts[j]; - - if (Bounds.contains(part.bounds, point) - && Vertices.contains(part.vertices, point)) { - result.push(body); - break; - } - } - } - } - - return result; - }; - -})(); - - -/***/ }), -/* 1355 */ +/* 1370 */ /***/ (function(module, exports, __webpack_require__) { // @if DEBUG @@ -191263,8 +194703,8 @@ var Metrics = {}; module.exports = Metrics; -var Composite = __webpack_require__(77); -var Common = __webpack_require__(18); +var Composite = __webpack_require__(68); +var Common = __webpack_require__(19); (function() { @@ -191349,272 +194789,105 @@ var Common = __webpack_require__(18); /***/ }), -/* 1356 */ -/***/ (function(module, exports, __webpack_require__) { - -/** -* The `Matter.Svg` module contains methods for converting SVG images into an array of vector points. -* -* To use this module you also need the SVGPathSeg polyfill: https://github.com/progers/pathseg -* -* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). -* -* @class Svg -*/ - -var Svg = {}; - -module.exports = Svg; - -var Bounds = __webpack_require__(38); -var Common = __webpack_require__(18); - -(function() { - - /** - * Converts an SVG path into an array of vector points. - * If the input path forms a concave shape, you must decompose the result into convex parts before use. - * See `Bodies.fromVertices` which provides support for this. - * Note that this function is not guaranteed to support complex paths (such as those with holes). - * You must load the `pathseg.js` polyfill on newer browsers. - * @method pathToVertices - * @param {SVGPathElement} path - * @param {Number} [sampleLength=15] - * @return {Vector[]} points - */ - Svg.pathToVertices = function(path, sampleLength) { - if (typeof window !== 'undefined' && !('SVGPathSeg' in window)) { - Common.warn('Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.'); - } - - // https://github.com/wout/svg.topoly.js/blob/master/svg.topoly.js - var i, il, total, point, segment, segments, - segmentsQueue, lastSegment, - lastPoint, segmentIndex, points = [], - lx, ly, length = 0, x = 0, y = 0; - - sampleLength = sampleLength || 15; - - var addPoint = function(px, py, pathSegType) { - // all odd-numbered path types are relative except PATHSEG_CLOSEPATH (1) - var isRelative = pathSegType % 2 === 1 && pathSegType > 1; - - // when the last point doesn't equal the current point add the current point - if (!lastPoint || px != lastPoint.x || py != lastPoint.y) { - if (lastPoint && isRelative) { - lx = lastPoint.x; - ly = lastPoint.y; - } else { - lx = 0; - ly = 0; - } - - var point = { - x: lx + px, - y: ly + py - }; - - // set last point - if (isRelative || !lastPoint) { - lastPoint = point; - } - - points.push(point); - - x = lx + px; - y = ly + py; - } - }; - - var addSegmentPoint = function(segment) { - var segType = segment.pathSegTypeAsLetter.toUpperCase(); - - // skip path ends - if (segType === 'Z') - return; - - // map segment to x and y - switch (segType) { - - case 'M': - case 'L': - case 'T': - case 'C': - case 'S': - case 'Q': - x = segment.x; - y = segment.y; - break; - case 'H': - x = segment.x; - break; - case 'V': - y = segment.y; - break; - } - - addPoint(x, y, segment.pathSegType); - }; - - // ensure path is absolute - Svg._svgPathToAbsolute(path); - - // get total length - total = path.getTotalLength(); - - // queue segments - segments = []; - for (i = 0; i < path.pathSegList.numberOfItems; i += 1) - segments.push(path.pathSegList.getItem(i)); - - segmentsQueue = segments.concat(); - - // sample through path - while (length < total) { - // get segment at position - segmentIndex = path.getPathSegAtLength(length); - segment = segments[segmentIndex]; - - // new segment - if (segment != lastSegment) { - while (segmentsQueue.length && segmentsQueue[0] != segment) - addSegmentPoint(segmentsQueue.shift()); - - lastSegment = segment; - } - - // add points in between when curving - // TODO: adaptive sampling - switch (segment.pathSegTypeAsLetter.toUpperCase()) { - - case 'C': - case 'T': - case 'S': - case 'Q': - case 'A': - point = path.getPointAtLength(length); - addPoint(point.x, point.y, 0); - break; - - } - - // increment by sample value - length += sampleLength; - } - - // add remaining segments not passed by sampling - for (i = 0, il = segmentsQueue.length; i < il; ++i) - addSegmentPoint(segmentsQueue[i]); - - return points; - }; - - Svg._svgPathToAbsolute = function(path) { - // http://phrogz.net/convert-svg-path-to-all-absolute-commands - // Copyright (c) Gavin Kistner - // http://phrogz.net/js/_ReuseLicense.txt - // Modifications: tidy formatting and naming - var x0, y0, x1, y1, x2, y2, segs = path.pathSegList, - x = 0, y = 0, len = segs.numberOfItems; - - for (var i = 0; i < len; ++i) { - var seg = segs.getItem(i), - segType = seg.pathSegTypeAsLetter; - - if (/[MLHVCSQTA]/.test(segType)) { - if ('x' in seg) x = seg.x; - if ('y' in seg) y = seg.y; - } else { - if ('x1' in seg) x1 = x + seg.x1; - if ('x2' in seg) x2 = x + seg.x2; - if ('y1' in seg) y1 = y + seg.y1; - if ('y2' in seg) y2 = y + seg.y2; - if ('x' in seg) x += seg.x; - if ('y' in seg) y += seg.y; - - switch (segType) { - - case 'm': - segs.replaceItem(path.createSVGPathSegMovetoAbs(x, y), i); - break; - case 'l': - segs.replaceItem(path.createSVGPathSegLinetoAbs(x, y), i); - break; - case 'h': - segs.replaceItem(path.createSVGPathSegLinetoHorizontalAbs(x), i); - break; - case 'v': - segs.replaceItem(path.createSVGPathSegLinetoVerticalAbs(y), i); - break; - case 'c': - segs.replaceItem(path.createSVGPathSegCurvetoCubicAbs(x, y, x1, y1, x2, y2), i); - break; - case 's': - segs.replaceItem(path.createSVGPathSegCurvetoCubicSmoothAbs(x, y, x2, y2), i); - break; - case 'q': - segs.replaceItem(path.createSVGPathSegCurvetoQuadraticAbs(x, y, x1, y1), i); - break; - case 't': - segs.replaceItem(path.createSVGPathSegCurvetoQuadraticSmoothAbs(x, y), i); - break; - case 'a': - segs.replaceItem(path.createSVGPathSegArcAbs(x, y, seg.r1, seg.r2, seg.angle, seg.largeArcFlag, seg.sweepFlag), i); - break; - case 'z': - case 'Z': - x = x0; - y = y0; - break; - - } - } - - if (segType == 'M' || segType == 'm') { - x0 = x; - y0 = y; - } - } - }; - -})(); - -/***/ }), -/* 1357 */ +/* 1371 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var ALIGN_CONST = __webpack_require__(97); +var Axes = __webpack_require__(146); +var Bodies = __webpack_require__(42); var Body = __webpack_require__(25); -var Bodies = __webpack_require__(57); +var BodyBounds = __webpack_require__(503); +var Bounds = __webpack_require__(38); var Class = __webpack_require__(0); -var Factory = __webpack_require__(484); +var Composite = __webpack_require__(68); +var Composites = __webpack_require__(233); +var Constraint = __webpack_require__(78); +var Detector = __webpack_require__(148); +var DistanceBetween = __webpack_require__(54); +var Factory = __webpack_require__(504); var GetFastValue = __webpack_require__(1); var GetValue = __webpack_require__(5); -var MatterAttractors = __webpack_require__(1358); -var MatterLib = __webpack_require__(490); -var MatterWrap = __webpack_require__(1359); -var Merge = __webpack_require__(87); -var Plugin = __webpack_require__(236); -var PluginCache = __webpack_require__(20); -var SceneEvents = __webpack_require__(21); -var World = __webpack_require__(495); +var Grid = __webpack_require__(242); +var MatterAttractors = __webpack_require__(1372); +var MatterCollisionEvents = __webpack_require__(1373); +var MatterLib = __webpack_require__(508); +var MatterWrap = __webpack_require__(1374); +var Merge = __webpack_require__(88); +var Pair = __webpack_require__(114); +var Pairs = __webpack_require__(243); +var Plugin = __webpack_require__(240); +var PluginCache = __webpack_require__(22); +var Query = __webpack_require__(509); +var Resolver = __webpack_require__(244); +var SAT = __webpack_require__(149); +var SceneEvents = __webpack_require__(18); +var Svg = __webpack_require__(234); +var Vector = __webpack_require__(37); var Vertices = __webpack_require__(31); +var World = __webpack_require__(511); /** * @classdesc - * [description] + * The Phaser Matter plugin provides the ability to use the Matter JS Physics Engine within your Phaser games. + * + * Unlike Arcade Physics, the other physics system provided with Phaser, Matter JS is a full-body physics system. + * It features: + * + * * Rigid bodies + * * Compound bodies + * * Composite bodies + * * Concave and convex hulls + * * Physical properties (mass, area, density etc.) + * * Restitution (elastic and inelastic collisions) + * * Collisions (broad-phase, mid-phase and narrow-phase) + * * Stable stacking and resting + * * Conservation of momentum + * * Friction and resistance + * * Constraints + * * Gravity + * * Sleeping and static bodies + * * Rounded corners (chamfering) + * * Views (translate, zoom) + * * Collision queries (raycasting, region tests) + * * Time scaling (slow-mo, speed-up) + * + * Configuration of Matter is handled via the Matter World Config object, which can be passed in either the + * Phaser Game Config, or Phaser Scene Config. Here is a basic example: + * + * ```js + * physics: { + * default: 'matter', + * matter: { + * enableSleeping: true, + * gravity: { + * y: 0 + * }, + * debug: { + * showBody: true, + * showStaticBody: true + * } + * } + * } + * ``` + * + * This class acts as an interface between a Phaser Scene and a single instance of the Matter Engine. + * + * Use it to access the most common Matter features and helper functions. + * + * You can find details, documentation and examples on the Matter JS website: https://brm.io/matter-js/ * * @class MatterPhysics * @memberof Phaser.Physics.Matter * @constructor * @since 3.0.0 * - * @param {Phaser.Scene} scene - [description] + * @param {Phaser.Scene} scene - The Phaser Scene that owns this Matter Physics instance. */ var MatterPhysics = new Class({ @@ -191623,7 +194896,7 @@ var MatterPhysics = new Class({ function MatterPhysics (scene) { /** - * [description] + * The Phaser Scene that owns this Matter Physics instance * * @name Phaser.Physics.Matter.MatterPhysics#scene * @type {Phaser.Scene} @@ -191632,7 +194905,7 @@ var MatterPhysics = new Class({ this.scene = scene; /** - * [description] + * A reference to the Scene Systems that belong to the Scene owning this Matter Physics instance. * * @name Phaser.Physics.Matter.MatterPhysics#systems * @type {Phaser.Scenes.Systems} @@ -191641,16 +194914,17 @@ var MatterPhysics = new Class({ this.systems = scene.sys; /** - * [description] + * The parsed Matter Configuration object. * * @name Phaser.Physics.Matter.MatterPhysics#config - * @type {object} + * @type {Phaser.Types.Physics.Matter.MatterWorldConfig} * @since 3.0.0 */ this.config = this.getConfig(); /** - * [description] + * An instance of the Matter World class. This class is responsible for the updating of the + * Matter Physics world, as well as handling debug drawing functions. * * @name Phaser.Physics.Matter.MatterPhysics#world * @type {Phaser.Physics.Matter.World} @@ -191659,7 +194933,12 @@ var MatterPhysics = new Class({ this.world; /** - * [description] + * An instance of the Matter Factory. This class provides lots of functions for creating a + * wide variety of physics objects and adds them automatically to the Matter World. + * + * You can use this class to cut-down on the amount of code required in your game, however, + * use of the Factory is entirely optional and should be seen as a development aid. It's + * perfectly possible to create and add components to the Matter world without using it. * * @name Phaser.Physics.Matter.MatterPhysics#add * @type {Phaser.Physics.Matter.Factory} @@ -191668,48 +194947,273 @@ var MatterPhysics = new Class({ this.add; /** - * A reference to the `Matter.Vertices` module which contains methods for creating and manipulating sets of vertices. - * A set of vertices is an array of `Matter.Vector` with additional indexing properties inserted by `Vertices.create`. - * A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull). + * An instance of the Body Bounds class. This class contains functions used for getting the + * world position from various points around the bounds of a physics body. * - * @name Phaser.Physics.Matter.MatterPhysics#verts - * @type {MatterJS.Vertices} - * @since 3.14.0 + * @name Phaser.Physics.Matter.MatterPhysics#bodyBounds + * @type {Phaser.Physics.Matter.BodyBounds} + * @since 3.22.0 */ - this.verts = Vertices; + this.bodyBounds; + + // Body /** - * A reference to the `Matter.Body` module which contains methods for creating and manipulating body models. + * A reference to the `Matter.Body` module. + * + * The `Matter.Body` module contains methods for creating and manipulating body models. + * A `Matter.Body` is a rigid body that can be simulated by a `Matter.Engine`. + * Factories for commonly used body configurations (such as rectangles, circles and other polygons) can be found in the `Bodies` module. * * @name Phaser.Physics.Matter.MatterPhysics#body - * @type {MatterJS.Body} + * @type {MatterJS.BodyFactory} * @since 3.18.0 */ this.body = Body; /** - * A reference to the `Matter.Bodies` module which contains methods for creating bodies. + * A reference to the `Matter.Composite` module. + * + * The `Matter.Composite` module contains methods for creating and manipulating composite bodies. + * A composite body is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`, therefore composites form a tree structure. + * It is important to use the functions in this module to modify composites, rather than directly modifying their properties. + * Note that the `Matter.World` object is also a type of `Matter.Composite` and as such all composite methods here can also operate on a `Matter.World`. + * + * @name Phaser.Physics.Matter.MatterPhysics#composite + * @type {MatterJS.CompositeFactory} + * @since 3.22.0 + */ + this.composite = Composite; + + // Collision: + + /** + * A reference to the `Matter.Detector` module. + * + * The `Matter.Detector` module contains methods for detecting collisions given a set of pairs. + * + * @name Phaser.Physics.Matter.MatterPhysics#detector + * @type {MatterJS.DetectorFactory} + * @since 3.22.0 + */ + this.detector = Detector; + + /** + * A reference to the `Matter.Grid` module. + * + * The `Matter.Grid` module contains methods for creating and manipulating collision broadphase grid structures. + * + * @name Phaser.Physics.Matter.MatterPhysics#grid + * @type {MatterJS.GridFactory} + * @since 3.22.0 + */ + this.grid = Grid; + + /** + * A reference to the `Matter.Pair` module. + * + * The `Matter.Pair` module contains methods for creating and manipulating collision pairs. + * + * @name Phaser.Physics.Matter.MatterPhysics#pair + * @type {MatterJS.PairFactory} + * @since 3.22.0 + */ + this.pair = Pair; + + /** + * A reference to the `Matter.Pairs` module. + * + * The `Matter.Pairs` module contains methods for creating and manipulating collision pair sets. + * + * @name Phaser.Physics.Matter.MatterPhysics#pairs + * @type {MatterJS.PairsFactory} + * @since 3.22.0 + */ + this.pairs = Pairs; + + /** + * A reference to the `Matter.Query` module. + * + * The `Matter.Query` module contains methods for performing collision queries. + * + * @name Phaser.Physics.Matter.MatterPhysics#query + * @type {MatterJS.QueryFactory} + * @since 3.22.0 + */ + this.query = Query; + + /** + * A reference to the `Matter.Resolver` module. + * + * The `Matter.Resolver` module contains methods for resolving collision pairs. + * + * @name Phaser.Physics.Matter.MatterPhysics#resolver + * @type {MatterJS.ResolverFactory} + * @since 3.22.0 + */ + this.resolver = Resolver; + + /** + * A reference to the `Matter.SAT` module. + * + * The `Matter.SAT` module contains methods for detecting collisions using the Separating Axis Theorem. + * + * @name Phaser.Physics.Matter.MatterPhysics#sat + * @type {MatterJS.SATFactory} + * @since 3.22.0 + */ + this.sat = SAT; + + // Constraint + + /** + * A reference to the `Matter.Constraint` module. + * + * The `Matter.Constraint` module contains methods for creating and manipulating constraints. + * Constraints are used for specifying that a fixed distance must be maintained between two bodies (or a body and a fixed world-space position). + * The stiffness of constraints can be modified to create springs or elastic. + * + * @name Phaser.Physics.Matter.MatterPhysics#constraint + * @type {MatterJS.ConstraintFactory} + * @since 3.22.0 + */ + this.constraint = Constraint; + + // Factory + + /** + * A reference to the `Matter.Bodies` module. + * + * The `Matter.Bodies` module contains factory methods for creating rigid bodies + * with commonly used body configurations (such as rectangles, circles and other polygons). * * @name Phaser.Physics.Matter.MatterPhysics#bodies - * @type {MatterJS.Bodies} + * @type {MatterJS.BodiesFactory} * @since 3.18.0 */ this.bodies = Bodies; + /** + * A reference to the `Matter.Composites` module. + * + * The `Matter.Composites` module contains factory methods for creating composite bodies + * with commonly used configurations (such as stacks and chains). + * + * @name Phaser.Physics.Matter.MatterPhysics#composites + * @type {MatterJS.CompositesFactory} + * @since 3.22.0 + */ + this.composites = Composites; + + // Geometry + + /** + * A reference to the `Matter.Axes` module. + * + * The `Matter.Axes` module contains methods for creating and manipulating sets of axes. + * + * @name Phaser.Physics.Matter.MatterPhysics#axes + * @type {MatterJS.AxesFactory} + * @since 3.22.0 + */ + this.axes = Axes; + + /** + * A reference to the `Matter.Bounds` module. + * + * The `Matter.Bounds` module contains methods for creating and manipulating axis-aligned bounding boxes (AABB). + * + * @name Phaser.Physics.Matter.MatterPhysics#bounds + * @type {MatterJS.BoundsFactory} + * @since 3.22.0 + */ + this.bounds = Bounds; + + /** + * A reference to the `Matter.Svg` module. + * + * The `Matter.Svg` module contains methods for converting SVG images into an array of vector points. + * + * To use this module you also need the SVGPathSeg polyfill: https://github.com/progers/pathseg + * + * @name Phaser.Physics.Matter.MatterPhysics#svg + * @type {MatterJS.SvgFactory} + * @since 3.22.0 + */ + this.svg = Svg; + + /** + * A reference to the `Matter.Vector` module. + * + * The `Matter.Vector` module contains methods for creating and manipulating vectors. + * Vectors are the basis of all the geometry related operations in the engine. + * A `Matter.Vector` object is of the form `{ x: 0, y: 0 }`. + * + * @name Phaser.Physics.Matter.MatterPhysics#vector + * @type {MatterJS.VectorFactory} + * @since 3.22.0 + */ + this.vector = Vector; + + /** + * A reference to the `Matter.Vertices` module. + * + * The `Matter.Vertices` module contains methods for creating and manipulating sets of vertices. + * A set of vertices is an array of `Matter.Vector` with additional indexing properties inserted by `Vertices.create`. + * A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull). + * + * @name Phaser.Physics.Matter.MatterPhysics#vertices + * @type {MatterJS.VerticesFactory} + * @since 3.22.0 + */ + this.vertices = Vertices; + + /** + * A reference to the `Matter.Vertices` module. + * + * The `Matter.Vertices` module contains methods for creating and manipulating sets of vertices. + * A set of vertices is an array of `Matter.Vector` with additional indexing properties inserted by `Vertices.create`. + * A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull). + * + * @name Phaser.Physics.Matter.MatterPhysics#verts + * @type {MatterJS.VerticesFactory} + * @since 3.14.0 + */ + this.verts = Vertices; + + /** + * An internal temp vector used for velocity and force calculations. + * + * @name Phaser.Physics.Matter.MatterPhysics#_tempVec2 + * @type {MatterJS.Vector} + * @private + * @since 3.22.0 + */ + this._tempVec2 = Vector.create(); + // Matter plugins + if (GetValue(this.config, 'plugins.collisionevents', true)) + { + this.enableCollisionEventsPlugin(); + } + if (GetValue(this.config, 'plugins.attractors', false)) { - Plugin.register(MatterAttractors); - Plugin.use(MatterLib, MatterAttractors); + this.enableAttractorPlugin(); } if (GetValue(this.config, 'plugins.wrap', false)) { - Plugin.register(MatterWrap); - Plugin.use(MatterLib, MatterWrap); + this.enableWrapPlugin(); } + Resolver._restingThresh = GetValue(this.config, 'restingThresh', 4); + Resolver._restingThreshTangent = GetValue(this.config, 'restingThreshTangent', 6); + Resolver._positionDampen = GetValue(this.config, 'positionDampen', 0.9); + Resolver._positionWarming = GetValue(this.config, 'positionWarming', 0.8); + Resolver._frictionNormalMultiplier = GetValue(this.config, 'frictionNormalMultiplier', 5); + scene.sys.events.once(SceneEvents.BOOT, this.boot, this); scene.sys.events.on(SceneEvents.START, this.start, this); }, @@ -191726,6 +195230,7 @@ var MatterPhysics = new Class({ { this.world = new World(this.scene, this.config); this.add = new Factory(this.world); + this.bodyBounds = new BodyBounds(); this.systems.events.once(SceneEvents.DESTROY, this.destroy, this); }, @@ -191755,12 +195260,12 @@ var MatterPhysics = new Class({ }, /** - * [description] + * This internal method is called when this class starts and retrieves the final Matter World Config. * * @method Phaser.Physics.Matter.MatterPhysics#getConfig * @since 3.0.0 * - * @return {object} [description] + * @return {Phaser.Types.Physics.Matter.MatterWorldConfig} The Matter World Config. */ getConfig: function () { @@ -191776,12 +195281,20 @@ var MatterPhysics = new Class({ }, /** - * [description] + * Enables the Matter Attractors Plugin. + * + * The attractors plugin that makes it easy to apply continual forces on bodies. + * It's possible to simulate effects such as wind, gravity and magnetism. + * + * https://github.com/liabru/matter-attractors + * + * This method is called automatically if `plugins.attractors` is set in the Matter World Config. + * However, you can also call it directly from within your game. * * @method Phaser.Physics.Matter.MatterPhysics#enableAttractorPlugin * @since 3.0.0 * - * @return {Phaser.Physics.Matter.MatterPhysics} This Matter Physics instance. + * @return {this} This Matter Physics instance. */ enableAttractorPlugin: function () { @@ -191792,12 +195305,21 @@ var MatterPhysics = new Class({ }, /** - * [description] + * Enables the Matter Wrap Plugin. + * + * The coordinate wrapping plugin that automatically wraps the position of bodies such that they always stay + * within the given bounds. Upon crossing a boundary the body will appear on the opposite side of the bounds, + * while maintaining its velocity. + * + * https://github.com/liabru/matter-wrap + * + * This method is called automatically if `plugins.wrap` is set in the Matter World Config. + * However, you can also call it directly from within your game. * * @method Phaser.Physics.Matter.MatterPhysics#enableWrapPlugin * @since 3.0.0 * - * @return {Phaser.Physics.Matter.MatterPhysics} This Matter Physics instance. + * @return {this} This Matter Physics instance. */ enableWrapPlugin: function () { @@ -191808,9 +195330,51 @@ var MatterPhysics = new Class({ }, /** - * [description] + * Enables the Matter Collision Events Plugin. + * + * Note that this plugin is enabled by default. So you should only ever need to call this + * method if you have specifically disabled the plugin in your Matter World Config. + * You can disable it by setting `plugins.collisionevents: false` in your Matter World Config. + * + * This plugin triggers three new events on Matter.Body: + * + * 1. `onCollide` + * 2. `onCollideEnd` + * 3. `onCollideActive` + * + * These events correspond to the Matter.js events `collisionStart`, `collisionActive` and `collisionEnd`, respectively. + * You can listen to these events via Matter.Events or they will also be emitted from the Matter World. + * + * This plugin also extends Matter.Body with three convenience functions: + * + * `Matter.Body.setOnCollide(callback)` + * `Matter.Body.setOnCollideEnd(callback)` + * `Matter.Body.setOnCollideActive(callback)` + * + * You can register event callbacks by providing a function of type (pair: Matter.Pair) => void + * + * https://github.com/dxu/matter-collision-events + * + * @method Phaser.Physics.Matter.MatterPhysics#enableCollisionEventsPlugin + * @since 3.22.0 + * + * @return {this} This Matter Physics instance. + */ + enableCollisionEventsPlugin: function () + { + Plugin.register(MatterCollisionEvents); + Plugin.use(MatterLib, MatterCollisionEvents); + + return this; + }, + + /** + * Pauses the Matter World instance and sets `enabled` to `false`. + * + * A paused world will not run any simulations for the duration it is paused. * * @method Phaser.Physics.Matter.MatterPhysics#pause + * @fires Phaser.Physics.Matter.Events#PAUSE * @since 3.0.0 * * @return {Phaser.Physics.Matter.World} The Matter World object. @@ -191821,7 +195385,7 @@ var MatterPhysics = new Class({ }, /** - * [description] + * Resumes this Matter World instance from a paused state and sets `enabled` to `true`. * * @method Phaser.Physics.Matter.MatterPhysics#resume * @since 3.0.0 @@ -191840,7 +195404,7 @@ var MatterPhysics = new Class({ * @method Phaser.Physics.Matter.MatterPhysics#set60Hz * @since 3.4.0 * - * @return {Phaser.Physics.Matter.MatterPhysics} This Matter Physics instance. + * @return {this} This Matter Physics instance. */ set60Hz: function () { @@ -191857,7 +195421,7 @@ var MatterPhysics = new Class({ * @method Phaser.Physics.Matter.MatterPhysics#set30Hz * @since 3.4.0 * - * @return {Phaser.Physics.Matter.MatterPhysics} This Matter Physics instance. + * @return {this} This Matter Physics instance. */ set30Hz: function () { @@ -191891,14 +195455,749 @@ var MatterPhysics = new Class({ * @method Phaser.Physics.Matter.MatterPhysics#step * @since 3.4.0 * - * @param {number} [delta=16.666] - [description] - * @param {number} [correction=1] - [description] + * @param {number} [delta=16.666] - The delta value. + * @param {number} [correction=1] - Optional delta correction value. */ step: function (delta, correction) { this.world.step(delta, correction); }, + /** + * Checks if the vertices of the given body, or an array of bodies, contains the given point, or not. + * + * You can pass in either a single body, or an array of bodies to be checked. This method will + * return `true` if _any_ of the bodies in the array contain the point. See the `intersectPoint` method if you need + * to get a list of intersecting bodies. + * + * The point should be transformed into the Matter World coordinate system in advance. This happens by + * default with Input Pointers, but if you wish to use points from another system you may need to + * transform them before passing them. + * + * @method Phaser.Physics.Matter.MatterPhysics#containsPoint + * @since 3.22.0 + * + * @param {(Phaser.Types.Physics.Matter.MatterBody|Phaser.Types.Physics.Matter.MatterBody[])} body - The body, or an array of bodies, to check against the point. + * @param {number} x - The horizontal coordinate of the point. + * @param {number} y - The vertical coordinate of the point. + * + * @return {boolean} `true` if the point is within one of the bodies given, otherwise `false`. + */ + containsPoint: function (body, x, y) + { + body = this.getMatterBodies(body); + + var position = Vector.create(x, y); + + var result = Query.point(body, position); + + return (result.length > 0) ? true : false; + }, + + /** + * Checks the given coordinates to see if any vertices of the given bodies contain it. + * + * If no bodies are provided it will search all bodies in the Matter World, including within Composites. + * + * The coordinates should be transformed into the Matter World coordinate system in advance. This happens by + * default with Input Pointers, but if you wish to use coordinates from another system you may need to + * transform them before passing them. + * + * @method Phaser.Physics.Matter.MatterPhysics#intersectPoint + * @since 3.22.0 + * + * @param {number} x - The horizontal coordinate of the point. + * @param {number} y - The vertical coordinate of the point. + * @param {Phaser.Types.Physics.Matter.MatterBody[]} [bodies] - An array of bodies to check. If not provided it will search all bodies in the world. + * + * @return {Phaser.Types.Physics.Matter.MatterBody[]} An array of bodies which contain the given point. + */ + intersectPoint: function (x, y, bodies) + { + bodies = this.getMatterBodies(bodies); + + var position = Vector.create(x, y); + + var output = []; + + var result = Query.point(bodies, position); + + result.forEach(function (body) + { + if (output.indexOf(body) === -1) + { + output.push(body); + } + }); + + return output; + }, + + /** + * Checks the given rectangular area to see if any vertices of the given bodies intersect with it. + * Or, if the `outside` parameter is set to `true`, it checks to see which bodies do not + * intersect with it. + * + * If no bodies are provided it will search all bodies in the Matter World, including within Composites. + * + * @method Phaser.Physics.Matter.MatterPhysics#intersectRect + * @since 3.22.0 + * + * @param {number} x - The horizontal coordinate of the top-left of the area. + * @param {number} y - The vertical coordinate of the top-left of the area. + * @param {number} width - The width of the area. + * @param {number} height - The height of the area. + * @param {boolean} [outside=false] - If `false` it checks for vertices inside the area, if `true` it checks for vertices outside the area. + * @param {Phaser.Types.Physics.Matter.MatterBody[]} [bodies] - An array of bodies to check. If not provided it will search all bodies in the world. + * + * @return {Phaser.Types.Physics.Matter.MatterBody[]} An array of bodies that intersect with the given area. + */ + intersectRect: function (x, y, width, height, outside, bodies) + { + if (outside === undefined) { outside = false; } + + bodies = this.getMatterBodies(bodies); + + var bounds = { + min: { x: x, y: y }, + max: { x: x + width, y: y + height } + }; + + var output = []; + + var result = Query.region(bodies, bounds, outside); + + result.forEach(function (body) + { + if (output.indexOf(body) === -1) + { + output.push(body); + } + }); + + return output; + }, + + /** + * Checks the given ray segment to see if any vertices of the given bodies intersect with it. + * + * If no bodies are provided it will search all bodies in the Matter World. + * + * The width of the ray can be specified via the `rayWidth` parameter. + * + * @method Phaser.Physics.Matter.MatterPhysics#intersectRay + * @since 3.22.0 + * + * @param {number} x1 - The horizontal coordinate of the start of the ray segment. + * @param {number} y1 - The vertical coordinate of the start of the ray segment. + * @param {number} x2 - The horizontal coordinate of the end of the ray segment. + * @param {number} y2 - The vertical coordinate of the end of the ray segment. + * @param {number} [rayWidth=1] - The width of the ray segment. + * @param {Phaser.Types.Physics.Matter.MatterBody[]} [bodies] - An array of bodies to check. If not provided it will search all bodies in the world. + * + * @return {Phaser.Types.Physics.Matter.MatterBody[]} An array of bodies whos vertices intersect with the ray segment. + */ + intersectRay: function (x1, y1, x2, y2, rayWidth, bodies) + { + if (rayWidth === undefined) { rayWidth = 1; } + + bodies = this.getMatterBodies(bodies); + + var result = []; + var collisions = Query.ray(bodies, Vector.create(x1, y1), Vector.create(x2, y2), rayWidth); + + for (var i = 0; i < collisions.length; i++) + { + result.push(collisions[i].body); + } + + return result; + }, + + /** + * Checks the given Matter Body to see if it intersects with any of the given bodies. + * + * If no bodies are provided it will check against all bodies in the Matter World. + * + * @method Phaser.Physics.Matter.MatterPhysics#intersectBody + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The target body. + * @param {Phaser.Types.Physics.Matter.MatterBody[]} [bodies] - An array of bodies to check the target body against. If not provided it will search all bodies in the world. + * + * @return {Phaser.Types.Physics.Matter.MatterBody[]} An array of bodies whos vertices intersect with target body. + */ + intersectBody: function (body, bodies) + { + bodies = this.getMatterBodies(bodies); + + var result = []; + var collisions = Query.collides(body, bodies); + + for (var i = 0; i < collisions.length; i++) + { + var pair = collisions[i]; + + if (pair.bodyA === body) + { + result.push(pair.bodyB); + } + else + { + result.push(pair.bodyA); + } + } + + return result; + }, + + /** + * Checks to see if the target body, or an array of target bodies, intersects with any of the given bodies. + * + * If intersection occurs this method will return `true` and, if provided, invoke the callbacks. + * + * If no bodies are provided for the second parameter the target will check again all bodies in the Matter World. + * + * Note that bodies can only overlap if they are in non-colliding collision groups or categories. + * + * If you provide a `processCallback` then the two bodies that overlap are sent to it. This callback + * must return a boolean and is used to allow you to perform additional processing tests before a final + * outcome is decided. If it returns `true` then the bodies are finally passed to the `overlapCallback`, if set. + * + * If you provide an `overlapCallback` then the matching pairs of overlapping bodies will be sent to it. + * + * Both callbacks have the following signature: `function (bodyA, bodyB, collisionInfo)` where `bodyA` is always + * the target body. The `collisionInfo` object contains additional data, such as the angle and depth of penetration. + * + * @method Phaser.Physics.Matter.MatterPhysics#overlap + * @since 3.22.0 + * + * @param {(Phaser.Types.Physics.Matter.MatterBody|Phaser.Types.Physics.Matter.MatterBody[])} target - The target body, or array of target bodies, to check. + * @param {Phaser.Types.Physics.Matter.MatterBody[]} [bodies] - The second body, or array of bodies, to check. If falsey it will check against all bodies in the world. + * @param {ArcadePhysicsCallback} [overlapCallback] - An optional callback function that is called if the bodies overlap. + * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two bodies if they overlap. If this is set then `overlapCallback` will only be invoked if this callback returns `true`. + * @param {*} [callbackContext] - The context, or scope, in which to run the callbacks. + * + * @return {boolean} `true` if the target body intersects with _any_ of the bodies given, otherwise `false`. + */ + overlap: function (target, bodies, overlapCallback, processCallback, callbackContext) + { + if (overlapCallback === undefined) { overlapCallback = null; } + if (processCallback === undefined) { processCallback = null; } + if (callbackContext === undefined) { callbackContext = overlapCallback; } + + if (!Array.isArray(target)) + { + target = [ target ]; + } + + target = this.getMatterBodies(target); + bodies = this.getMatterBodies(bodies); + + var match = false; + + for (var i = 0; i < target.length; i++) + { + var entry = target[i]; + + var collisions = Query.collides(entry, bodies); + + for (var c = 0; c < collisions.length; c++) + { + var info = collisions[c]; + var bodyB = (info.bodyA.id === entry.id) ? info.bodyB : info.bodyA; + + if (!processCallback || processCallback.call(callbackContext, entry, bodyB, info)) + { + match = true; + + if (overlapCallback) + { + overlapCallback.call(callbackContext, entry, bodyB, info); + } + else if (!processCallback) + { + // If there are no callbacks we don't need to test every body, just exit when the first is found + return true; + } + } + } + } + + return match; + }, + + /** + * Sets the collision filter category of all given Matter Bodies to the given value. + * + * This number must be a power of two between 2^0 (= 1) and 2^31. + * + * Bodies with different collision groups (see {@link #setCollisionGroup}) will only collide if their collision + * categories are included in their collision masks (see {@link #setCollidesWith}). + * + * @method Phaser.Physics.Matter.MatterPhysics#setCollisionCategory + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody[]} bodies - An array of bodies to update. If falsey it will use all bodies in the world. + * @param {number} value - Unique category bitfield. + * + * @return {this} This Matter Physics instance. + */ + setCollisionCategory: function (bodies, value) + { + bodies = this.getMatterBodies(bodies); + + bodies.forEach(function (body) + { + body.collisionFilter.category = value; + }); + + return this; + }, + + /** + * Sets the collision filter group of all given Matter Bodies to the given value. + * + * If the group value is zero, or if two Matter Bodies have different group values, + * they will collide according to the usual collision filter rules (see {@link #setCollisionCategory} and {@link #setCollisionGroup}). + * + * If two Matter Bodies have the same positive group value, they will always collide; + * if they have the same negative group value they will never collide. + * + * @method Phaser.Physics.Matter.MatterPhysics#setCollisionGroup + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody[]} bodies - An array of bodies to update. If falsey it will use all bodies in the world. + * @param {number} value - Unique group index. + * + * @return {this} This Matter Physics instance. + */ + setCollisionGroup: function (bodies, value) + { + bodies = this.getMatterBodies(bodies); + + bodies.forEach(function (body) + { + body.collisionFilter.group = value; + }); + + return this; + }, + + /** + * Sets the collision filter mask of all given Matter Bodies to the given value. + * + * Two Matter Bodies with different collision groups will only collide if each one includes the others + * category in its mask based on a bitwise AND operation: `(categoryA & maskB) !== 0` and + * `(categoryB & maskA) !== 0` are both true. + * + * @method Phaser.Physics.Matter.MatterPhysics#setCollidesWith + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody[]} bodies - An array of bodies to update. If falsey it will use all bodies in the world. + * @param {(number|number[])} categories - A unique category bitfield, or an array of them. + * + * @return {this} This Matter Physics instance. + */ + setCollidesWith: function (bodies, categories) + { + bodies = this.getMatterBodies(bodies); + + var flags = 0; + + if (!Array.isArray(categories)) + { + flags = categories; + } + else + { + for (var i = 0; i < categories.length; i++) + { + flags |= categories[i]; + } + } + + bodies.forEach(function (body) + { + body.collisionFilter.mask = flags; + }); + + return this; + }, + + /** + * Takes an array and returns a new array made from all of the Matter Bodies found in the original array. + * + * For example, passing in Matter Game Objects, such as a bunch of Matter Sprites, to this method, would + * return an array containing all of their native Matter Body objects. + * + * If the `bodies` argument is falsey, it will return all bodies in the world. + * + * @method Phaser.Physics.Matter.MatterPhysics#getMatterBodies + * @since 3.22.0 + * + * @param {array} [bodies] - An array of objects to extract the bodies from. If falsey, it will return all bodies in the world. + * + * @return {MatterJS.BodyType[]} An array of native Matter Body objects. + */ + getMatterBodies: function (bodies) + { + if (!bodies) + { + return this.world.getAllBodies(); + } + + if (!Array.isArray(bodies)) + { + bodies = [ bodies ]; + } + + var output = []; + + for (var i = 0; i < bodies.length; i++) + { + var body = (bodies[i].hasOwnProperty('body')) ? bodies[i].body : bodies[i]; + + output.push(body); + } + + return output; + }, + + /** + * Sets both the horizontal and vertical linear velocity of the physics bodies. + * + * @method Phaser.Physics.Matter.MatterPhysics#setVelocity + * @since 3.22.0 + * + * @param {(Phaser.Types.Physics.Matter.MatterBody|Phaser.Types.Physics.Matter.MatterBody[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param {number} x - The horizontal linear velocity value. + * @param {number} y - The vertical linear velocity value. + * + * @return {this} This Matter Physics instance. + */ + setVelocity: function (bodies, x, y) + { + bodies = this.getMatterBodies(bodies); + + var vec2 = this._tempVec2; + + vec2.x = x; + vec2.y = y; + + bodies.forEach(function (body) + { + Body.setVelocity(body, vec2); + }); + + return this; + }, + + /** + * Sets just the horizontal linear velocity of the physics bodies. + * The vertical velocity of the body is unchanged. + * + * @method Phaser.Physics.Matter.MatterPhysics#setVelocityX + * @since 3.22.0 + * + * @param {(Phaser.Types.Physics.Matter.MatterBody|Phaser.Types.Physics.Matter.MatterBody[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param {number} x - The horizontal linear velocity value. + * + * @return {this} This Matter Physics instance. + */ + setVelocityX: function (bodies, x) + { + bodies = this.getMatterBodies(bodies); + + var vec2 = this._tempVec2; + + vec2.x = x; + + bodies.forEach(function (body) + { + vec2.y = body.velocity.y; + Body.setVelocity(body, vec2); + }); + + return this; + }, + + /** + * Sets just the vertical linear velocity of the physics bodies. + * The horizontal velocity of the body is unchanged. + * + * @method Phaser.Physics.Matter.MatterPhysics#setVelocityY + * @since 3.22.0 + * + * @param {(Phaser.Types.Physics.Matter.MatterBody|Phaser.Types.Physics.Matter.MatterBody[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param {number} y - The vertical linear velocity value. + * + * @return {this} This Matter Physics instance. + */ + setVelocityY: function (bodies, y) + { + bodies = this.getMatterBodies(bodies); + + var vec2 = this._tempVec2; + + vec2.y = y; + + bodies.forEach(function (body) + { + vec2.x = body.velocity.x; + Body.setVelocity(body, vec2); + }); + + return this; + }, + + /** + * Sets the angular velocity of the bodies instantly. + * Position, angle, force etc. are unchanged. + * + * @method Phaser.Physics.Matter.MatterPhysics#setAngularVelocity + * @since 3.22.0 + * + * @param {(Phaser.Types.Physics.Matter.MatterBody|Phaser.Types.Physics.Matter.MatterBody[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param {number} value - The angular velocity. + * + * @return {this} This Matter Physics instance. + */ + setAngularVelocity: function (bodies, value) + { + bodies = this.getMatterBodies(bodies); + + bodies.forEach(function (body) + { + Body.setAngularVelocity(body, value); + }); + + return this; + }, + + /** + * Applies a force to a body, at the bodies current position, including resulting torque. + * + * @method Phaser.Physics.Matter.MatterPhysics#applyForce + * @since 3.22.0 + * + * @param {(Phaser.Types.Physics.Matter.MatterBody|Phaser.Types.Physics.Matter.MatterBody[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param {Phaser.Types.Math.Vector2Like} force - A Vector that specifies the force to apply. + * + * @return {this} This Matter Physics instance. + */ + applyForce: function (bodies, force) + { + bodies = this.getMatterBodies(bodies); + + var vec2 = this._tempVec2; + + bodies.forEach(function (body) + { + vec2.x = body.position.x; + vec2.y = body.position.y; + + Body.applyForce(body, vec2, force); + }); + + return this; + }, + + /** + * Applies a force to a body, from the given world position, including resulting torque. + * If no angle is given, the current body angle is used. + * + * Use very small speed values, such as 0.1, depending on the mass and required velocity. + * + * @method Phaser.Physics.Matter.MatterPhysics#applyForceFromPosition + * @since 3.22.0 + * + * @param {(Phaser.Types.Physics.Matter.MatterBody|Phaser.Types.Physics.Matter.MatterBody[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param {Phaser.Types.Math.Vector2Like} position - A Vector that specifies the world-space position to apply the force at. + * @param {number} speed - A speed value to be applied to a directional force. + * @param {number} [angle] - The angle, in radians, to apply the force from. Leave undefined to use the current body angle. + * + * @return {this} This Matter Physics instance. + */ + applyForceFromPosition: function (bodies, position, speed, angle) + { + bodies = this.getMatterBodies(bodies); + + var vec2 = this._tempVec2; + + bodies.forEach(function (body) + { + if (angle === undefined) + { + angle = body.angle; + } + + vec2.x = speed * Math.cos(angle); + vec2.y = speed * Math.sin(angle); + + Body.applyForce(body, position, vec2); + }); + + return this; + }, + + /** + * Apply a force to a body based on the given angle and speed. + * If no angle is given, the current body angle is used. + * + * Use very small speed values, such as 0.1, depending on the mass and required velocity. + * + * @method Phaser.Physics.Matter.MatterPhysics#applyForceFromAngle + * @since 3.22.0 + * + * @param {(Phaser.Types.Physics.Matter.MatterBody|Phaser.Types.Physics.Matter.MatterBody[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param {number} speed - A speed value to be applied to a directional force. + * @param {number} [angle] - The angle, in radians, to apply the force from. Leave undefined to use the current body angle. + * + * @return {this} This Matter Physics instance. + */ + applyForceFromAngle: function (bodies, speed, angle) + { + bodies = this.getMatterBodies(bodies); + + var vec2 = this._tempVec2; + + bodies.forEach(function (body) + { + if (angle === undefined) + { + angle = body.angle; + } + + vec2.x = speed * Math.cos(angle); + vec2.y = speed * Math.sin(angle); + + Body.applyForce(body, { x: body.position.x, y: body.position.y }, vec2); + }); + + return this; + }, + + /** + * Returns the length of the given constraint, which is the distance between the two points. + * + * @method Phaser.Physics.Matter.MatterPhysics#getConstraintLength + * @since 3.22.0 + * + * @param {MatterJS.ConstraintType} constraint - The constraint to get the length from. + * + * @return {number} The length of the constraint. + */ + getConstraintLength: function (constraint) + { + var aX = constraint.pointA.x; + var aY = constraint.pointA.y; + var bX = constraint.pointB.x; + var bY = constraint.pointB.y; + + if (constraint.bodyA) + { + aX += constraint.bodyA.position.x; + aY += constraint.bodyA.position.y; + } + + if (constraint.bodyB) + { + bX += constraint.bodyB.position.x; + bY += constraint.bodyB.position.y; + } + + return DistanceBetween(aX, aY, bX, bY); + }, + + /** + * Aligns a Body, or Matter Game Object, against the given coordinates. + * + * The alignment takes place using the body bounds, which take into consideration things + * like body scale and rotation. + * + * Although a Body has a `position` property, it is based on the center of mass for the body, + * not a dimension based center. This makes aligning bodies difficult, especially if they have + * rotated or scaled. This method will derive the correct position based on the body bounds and + * its center of mass offset, in order to align the body with the given coordinate. + * + * For example, if you wanted to align a body so it sat in the bottom-center of the + * Scene, and the world was 800 x 600 in size: + * + * ```javascript + * this.matter.alignBody(body, 400, 600, Phaser.Display.Align.BOTTOM_CENTER); + * ``` + * + * You pass in 400 for the x coordinate, because that is the center of the world, and 600 for + * the y coordinate, as that is the base of the world. + * + * @method Phaser.Physics.Matter.MatterPhysics#alignBody + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to align. + * @param {number} x - The horizontal position to align the body to. + * @param {number} y - The vertical position to align the body to. + * @param {integer} align - One of the `Phaser.Display.Align` constants, such as `Phaser.Display.Align.TOP_LEFT`. + * + * @return {this} This Matter Physics instance. + */ + alignBody: function (body, x, y, align) + { + body = (body.hasOwnProperty('body')) ? body.body : body; + + var pos; + + switch (align) + { + case ALIGN_CONST.TOP_LEFT: + case ALIGN_CONST.LEFT_TOP: + pos = this.bodyBounds.getTopLeft(body, x, y); + break; + + case ALIGN_CONST.TOP_CENTER: + pos = this.bodyBounds.getTopCenter(body, x, y); + break; + + case ALIGN_CONST.TOP_RIGHT: + case ALIGN_CONST.RIGHT_TOP: + pos = this.bodyBounds.getTopRight(body, x, y); + break; + + case ALIGN_CONST.LEFT_CENTER: + pos = this.bodyBounds.getLeftCenter(body, x, y); + break; + + case ALIGN_CONST.CENTER: + pos = this.bodyBounds.getCenter(body, x, y); + break; + + case ALIGN_CONST.RIGHT_CENTER: + pos = this.bodyBounds.getRightCenter(body, x, y); + break; + + case ALIGN_CONST.LEFT_BOTTOM: + case ALIGN_CONST.BOTTOM_LEFT: + pos = this.bodyBounds.getBottomLeft(body, x, y); + break; + + case ALIGN_CONST.BOTTOM_CENTER: + pos = this.bodyBounds.getBottomCenter(body, x, y); + break; + + case ALIGN_CONST.BOTTOM_RIGHT: + case ALIGN_CONST.RIGHT_BOTTOM: + pos = this.bodyBounds.getBottomRight(body, x, y); + break; + } + + if (pos) + { + Body.setPosition(body, pos); + } + + return this; + }, + /** * The Scene that owns this plugin is shutting down. * We need to kill and reset all internal properties as well as stop listening to Scene events. @@ -191959,10 +196258,10 @@ module.exports = MatterPhysics; /***/ }), -/* 1358 */ +/* 1372 */ /***/ (function(module, exports, __webpack_require__) { -var Matter = __webpack_require__(235); +var Matter = __webpack_require__(239); /** * An attractors plugin for matter.js. @@ -191973,7 +196272,7 @@ var MatterAttractors = { // plugin meta name: 'matter-attractors', // PLUGIN_NAME version: '0.1.7', // PLUGIN_VERSION - for: 'matter-js@^0.13.1', + for: 'matter-js@^0.14.2', silent: true, // no console log please // installs the plugin where `base` is `Matter` @@ -192101,10 +196400,143 @@ module.exports = MatterAttractors; /***/ }), -/* 1359 */ +/* 1373 */ +/***/ (function(module, exports) { + +/** + * @author @dxu https://github.com/dxu/matter-collision-events + * @author Richard Davey + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var MatterCollisionEvents = { + + name: 'matter-collision-events', + version: '0.1.6', + for: 'matter-js@^0.14.2', + silent: true, + + install: function (matter) + { + matter.after('Engine.create', function () + { + matter.Events.on(this, 'collisionStart', function (event) + { + event.pairs.map(function (pair) + { + var bodyA = pair.bodyA; + var bodyB = pair.bodyB; + + if (bodyA.gameObject) + { + bodyA.gameObject.emit('collide', bodyA, bodyB, pair); + } + + if (bodyB.gameObject) + { + bodyB.gameObject.emit('collide', bodyB, bodyA, pair); + } + + matter.Events.trigger(bodyA, 'onCollide', { pair: pair }); + matter.Events.trigger(bodyB, 'onCollide', { pair: pair }); + + if (bodyA.onCollideCallback) + { + bodyA.onCollideCallback(pair); + } + + if (bodyB.onCollideCallback) + { + bodyB.onCollideCallback(pair); + } + + if (bodyA.onCollideWith[bodyB.id]) + { + bodyA.onCollideWith[bodyB.id](bodyB, pair); + } + + if (bodyB.onCollideWith[bodyA.id]) + { + bodyB.onCollideWith[bodyA.id](bodyA, pair); + } + }); + }); + + matter.Events.on(this, 'collisionActive', function (event) + { + event.pairs.map(function (pair) + { + var bodyA = pair.bodyA; + var bodyB = pair.bodyB; + + if (bodyA.gameObject) + { + bodyA.gameObject.emit('collideActive', bodyA, bodyB, pair); + } + + if (bodyB.gameObject) + { + bodyB.gameObject.emit('collideActive', bodyB, bodyA, pair); + } + + matter.Events.trigger(bodyA, 'onCollideActive', { pair: pair }); + matter.Events.trigger(bodyB, 'onCollideActive', { pair: pair }); + + if (bodyA.onCollideActiveCallback) + { + bodyA.onCollideActiveCallback(pair); + } + + if (bodyB.onCollideActiveCallback) + { + bodyB.onCollideActiveCallback(pair); + } + }); + }); + + matter.Events.on(this, 'collisionEnd', function (event) + { + event.pairs.map(function (pair) + { + var bodyA = pair.bodyA; + var bodyB = pair.bodyB; + + if (bodyA.gameObject) + { + bodyA.gameObject.emit('collideEnd', bodyA, bodyB, pair); + } + + if (bodyB.gameObject) + { + bodyB.gameObject.emit('collideEnd', bodyB, bodyA, pair); + } + + matter.Events.trigger(bodyA, 'onCollideEnd', { pair: pair }); + matter.Events.trigger(bodyB, 'onCollideEnd', { pair: pair }); + + if (bodyA.onCollideEndCallback) + { + bodyA.onCollideEndCallback(pair); + } + + if (bodyB.onCollideEndCallback) + { + bodyB.onCollideEndCallback(pair); + } + }); + }); + }); + } +}; + +module.exports = MatterCollisionEvents; + + +/***/ }), +/* 1374 */ /***/ (function(module, exports, __webpack_require__) { -var Matter = __webpack_require__(235); +var Matter = __webpack_require__(239); /** * A coordinate wrapping plugin for matter.js. @@ -192115,7 +196547,7 @@ var MatterWrap = { // plugin meta name: 'matter-wrap', // PLUGIN_NAME version: '0.1.4', // PLUGIN_VERSION - for: 'matter-js@^0.13.1', + for: 'matter-js@^0.14.2', silent: true, // no console log please // installs the plugin where `base` is `Matter` @@ -192283,12 +196715,12 @@ module.exports = MatterWrap; */ /***/ }), -/* 1360 */ +/* 1375 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192298,28 +196730,28 @@ module.exports = MatterWrap; module.exports = { - BasePlugin: __webpack_require__(496), - DefaultPlugins: __webpack_require__(183), - PluginCache: __webpack_require__(20), - PluginManager: __webpack_require__(375), - ScenePlugin: __webpack_require__(1361) + BasePlugin: __webpack_require__(512), + DefaultPlugins: __webpack_require__(186), + PluginCache: __webpack_require__(22), + PluginManager: __webpack_require__(394), + ScenePlugin: __webpack_require__(1376) }; /***/ }), -/* 1361 */ +/* 1376 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey -* @copyright 2019 Photon Storm Ltd. +* @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ -var BasePlugin = __webpack_require__(496); +var BasePlugin = __webpack_require__(512); var Class = __webpack_require__(0); -var SceneEvents = __webpack_require__(21); +var SceneEvents = __webpack_require__(18); /** * @classdesc @@ -192436,12 +196868,12 @@ module.exports = ScenePlugin; /***/ }), -/* 1362 */ +/* 1377 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192455,20 +196887,20 @@ module.exports = ScenePlugin; module.exports = { - Canvas: __webpack_require__(1363), - Snapshot: __webpack_require__(1364), - WebGL: __webpack_require__(1365) + Canvas: __webpack_require__(1378), + Snapshot: __webpack_require__(1379), + WebGL: __webpack_require__(1380) }; /***/ }), -/* 1363 */ +/* 1378 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192478,20 +196910,20 @@ module.exports = { module.exports = { - CanvasRenderer: __webpack_require__(339), - GetBlendModes: __webpack_require__(341), + CanvasRenderer: __webpack_require__(358), + GetBlendModes: __webpack_require__(360), SetTransform: __webpack_require__(29) }; /***/ }), -/* 1364 */ +/* 1379 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192501,19 +196933,19 @@ module.exports = { module.exports = { - Canvas: __webpack_require__(340), - WebGL: __webpack_require__(343) + Canvas: __webpack_require__(359), + WebGL: __webpack_require__(362) }; /***/ }), -/* 1365 */ +/* 1380 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192524,9 +196956,9 @@ module.exports = { module.exports = { Utils: __webpack_require__(10), - WebGLPipeline: __webpack_require__(184), - WebGLRenderer: __webpack_require__(342), - Pipelines: __webpack_require__(1366), + WebGLPipeline: __webpack_require__(187), + WebGLRenderer: __webpack_require__(361), + Pipelines: __webpack_require__(1381), // Constants BYTE: 0, @@ -192539,12 +196971,12 @@ module.exports = { /***/ }), -/* 1366 */ +/* 1381 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192554,26 +196986,26 @@ module.exports = { module.exports = { - BitmapMaskPipeline: __webpack_require__(344), - ForwardDiffuseLightPipeline: __webpack_require__(345), - TextureTintPipeline: __webpack_require__(185), - ModelViewProjection: __webpack_require__(346) + BitmapMaskPipeline: __webpack_require__(363), + ForwardDiffuseLightPipeline: __webpack_require__(364), + TextureTintPipeline: __webpack_require__(188), + ModelViewProjection: __webpack_require__(365) }; /***/ }), -/* 1367 */ +/* 1382 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Extend = __webpack_require__(17); -var CONST = __webpack_require__(187); +var CONST = __webpack_require__(190); /** * @namespace Phaser.Scale @@ -192601,12 +197033,12 @@ var CONST = __webpack_require__(187); var Scale = { - Center: __webpack_require__(364), - Events: __webpack_require__(102), - Orientation: __webpack_require__(365), - ScaleManager: __webpack_require__(376), - ScaleModes: __webpack_require__(366), - Zoom: __webpack_require__(367) + Center: __webpack_require__(383), + Events: __webpack_require__(104), + Orientation: __webpack_require__(384), + ScaleManager: __webpack_require__(395), + ScaleModes: __webpack_require__(385), + Zoom: __webpack_require__(386) }; @@ -192619,16 +197051,16 @@ module.exports = Scale; /***/ }), -/* 1368 */ +/* 1383 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(129); +var CONST = __webpack_require__(132); var Extend = __webpack_require__(17); /** @@ -192637,11 +197069,11 @@ var Extend = __webpack_require__(17); var Scene = { - Events: __webpack_require__(21), - SceneManager: __webpack_require__(378), - ScenePlugin: __webpack_require__(1369), - Settings: __webpack_require__(380), - Systems: __webpack_require__(190) + Events: __webpack_require__(18), + SceneManager: __webpack_require__(397), + ScenePlugin: __webpack_require__(1384), + Settings: __webpack_require__(399), + Systems: __webpack_require__(193) }; @@ -192652,20 +197084,20 @@ module.exports = Scene; /***/ }), -/* 1369 */ +/* 1384 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(24); +var Clamp = __webpack_require__(20); var Class = __webpack_require__(0); -var Events = __webpack_require__(21); +var Events = __webpack_require__(18); var GetFastValue = __webpack_require__(1); -var PluginCache = __webpack_require__(20); +var PluginCache = __webpack_require__(22); /** * @classdesc @@ -192845,6 +197277,8 @@ var ScenePlugin = new Class({ /** * Shutdown this Scene and run the given one. * + * This will happen at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#start * @since 3.0.0 * @@ -192866,6 +197300,8 @@ var ScenePlugin = new Class({ /** * Restarts this Scene. * + * This will happen at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#restart * @since 3.4.0 * @@ -193101,6 +197537,8 @@ var ScenePlugin = new Class({ /** * Launch the given Scene and run it in parallel with this one. * + * This will happen at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#launch * @since 3.0.0 * @@ -193122,6 +197560,8 @@ var ScenePlugin = new Class({ /** * Runs the given Scene, but does not change the state of this Scene. * + * This will happen at the next Scene Manager update, not immediately. + * * If the given Scene is paused, it will resume it. If sleeping, it will wake it. * If not running at all, it will be started. * @@ -193149,6 +197589,8 @@ var ScenePlugin = new Class({ /** * Pause the Scene - this stops the update step from happening but it still renders. * + * This will happen at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#pause * @since 3.0.0 * @@ -193169,6 +197611,8 @@ var ScenePlugin = new Class({ /** * Resume the Scene - starts the update loop again. * + * This will happen at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#resume * @since 3.0.0 * @@ -193189,6 +197633,8 @@ var ScenePlugin = new Class({ /** * Makes the Scene sleep (no update, no render) but doesn't shutdown. * + * This will happen at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#sleep * @since 3.0.0 * @@ -193209,6 +197655,8 @@ var ScenePlugin = new Class({ /** * Makes the Scene wake-up (starts update and render) * + * This will happen at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#wake * @since 3.0.0 * @@ -193228,11 +197676,8 @@ var ScenePlugin = new Class({ /** * Makes this Scene sleep then starts the Scene given. - * - * No checks are made to see if an instance of the given Scene is already running. - * Because Scenes in Phaser are non-exclusive, you are allowed to run multiple - * instances of them _at the same time_. This means, calling this function - * may launch another instance of the requested Scene if it's already running. + * + * This will happen at the next Scene Manager update, not immediately. * * @method Phaser.Scenes.ScenePlugin#switch * @since 3.0.0 @@ -193254,6 +197699,8 @@ var ScenePlugin = new Class({ /** * Shutdown the Scene, clearing display list, timers, etc. * + * This happens at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#stop * @since 3.0.0 * @@ -193471,7 +197918,7 @@ var ScenePlugin = new Class({ * The Scene is removed from the local scenes array, it's key is cleared from the keys * cache and Scene.Systems.destroy is then called on it. * - * If the SceneManager is processing the Scenes when this method is called it wil + * If the SceneManager is processing the Scenes when this method is called it will * queue the operation for the next update sequence. * * @method Phaser.Scenes.ScenePlugin#remove @@ -193647,12 +198094,12 @@ module.exports = ScenePlugin; /***/ }), -/* 1370 */ +/* 1385 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -193662,28 +198109,28 @@ module.exports = ScenePlugin; module.exports = { - List: __webpack_require__(132), - Map: __webpack_require__(168), - ProcessQueue: __webpack_require__(196), - RTree: __webpack_require__(474), - Set: __webpack_require__(108), - Size: __webpack_require__(377) + List: __webpack_require__(135), + Map: __webpack_require__(172), + ProcessQueue: __webpack_require__(199), + RTree: __webpack_require__(493), + Set: __webpack_require__(110), + Size: __webpack_require__(396) }; /***/ }), -/* 1371 */ +/* 1386 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Extend = __webpack_require__(17); -var FilterMode = __webpack_require__(1372); +var FilterMode = __webpack_require__(1387); /** * @namespace Phaser.Textures @@ -193709,14 +198156,14 @@ var FilterMode = __webpack_require__(1372); var Textures = { - CanvasTexture: __webpack_require__(382), - Events: __webpack_require__(125), + CanvasTexture: __webpack_require__(401), + Events: __webpack_require__(128), FilterMode: FilterMode, - Frame: __webpack_require__(104), - Parsers: __webpack_require__(384), - Texture: __webpack_require__(192), - TextureManager: __webpack_require__(381), - TextureSource: __webpack_require__(383) + Frame: __webpack_require__(106), + Parsers: __webpack_require__(403), + Texture: __webpack_require__(195), + TextureManager: __webpack_require__(400), + TextureSource: __webpack_require__(402) }; @@ -193726,12 +198173,12 @@ module.exports = Textures; /***/ }), -/* 1372 */ +/* 1387 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -193770,12 +198217,12 @@ module.exports = CONST; /***/ }), -/* 1373 */ +/* 1388 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -193785,40 +198232,40 @@ module.exports = CONST; module.exports = { - Components: __webpack_require__(145), - Parsers: __webpack_require__(1403), + Components: __webpack_require__(150), + Parsers: __webpack_require__(1418), Formats: __webpack_require__(34), - ImageCollection: __webpack_require__(507), - ParseToTilemap: __webpack_require__(245), - Tile: __webpack_require__(79), - Tilemap: __webpack_require__(516), - TilemapCreator: __webpack_require__(1412), - TilemapFactory: __webpack_require__(1413), - Tileset: __webpack_require__(149), + ImageCollection: __webpack_require__(523), + ParseToTilemap: __webpack_require__(252), + Tile: __webpack_require__(80), + Tilemap: __webpack_require__(532), + TilemapCreator: __webpack_require__(1427), + TilemapFactory: __webpack_require__(1428), + Tileset: __webpack_require__(154), - LayerData: __webpack_require__(114), - MapData: __webpack_require__(115), - ObjectLayer: __webpack_require__(510), + LayerData: __webpack_require__(116), + MapData: __webpack_require__(117), + ObjectLayer: __webpack_require__(526), - DynamicTilemapLayer: __webpack_require__(517), - StaticTilemapLayer: __webpack_require__(518) + DynamicTilemapLayer: __webpack_require__(533), + StaticTilemapLayer: __webpack_require__(534) }; /***/ }), -/* 1374 */ +/* 1389 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetTilesWithin = __webpack_require__(26); -var CalculateFacesWithin = __webpack_require__(58); +var CalculateFacesWithin = __webpack_require__(59); /** * Copies the tiles in the source rectangular area to a new destination (all specified in tile @@ -193873,19 +198320,19 @@ module.exports = Copy; /***/ }), -/* 1375 */ +/* 1390 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileToWorldX = __webpack_require__(147); -var TileToWorldY = __webpack_require__(148); +var TileToWorldX = __webpack_require__(152); +var TileToWorldY = __webpack_require__(153); var GetTilesWithin = __webpack_require__(26); -var ReplaceByIndex = __webpack_require__(497); +var ReplaceByIndex = __webpack_require__(513); /** * Creates a Sprite for every object matching the given tile indexes in the layer. You can @@ -193958,17 +198405,17 @@ module.exports = CreateFromTiles; /***/ }), -/* 1376 */ +/* 1391 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SnapFloor = __webpack_require__(103); -var SnapCeil = __webpack_require__(328); +var SnapFloor = __webpack_require__(105); +var SnapCeil = __webpack_require__(347); /** * Returns the tiles in the given layer that are within the camera's viewport. This is used internally. @@ -194115,18 +198562,18 @@ module.exports = CullTiles; /***/ }), -/* 1377 */ +/* 1392 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetTilesWithin = __webpack_require__(26); -var CalculateFacesWithin = __webpack_require__(58); -var SetTileCollision = __webpack_require__(78); +var CalculateFacesWithin = __webpack_require__(59); +var SetTileCollision = __webpack_require__(79); /** * Sets the tiles in the given rectangular area (in tile coordinates) of the layer with the @@ -194169,12 +198616,12 @@ module.exports = Fill; /***/ }), -/* 1378 */ +/* 1393 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194217,12 +198664,12 @@ module.exports = FilterTiles; /***/ }), -/* 1379 */ +/* 1394 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194305,12 +198752,12 @@ module.exports = FindByIndex; /***/ }), -/* 1380 */ +/* 1395 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194359,12 +198806,12 @@ module.exports = FindTile; /***/ }), -/* 1381 */ +/* 1396 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194409,18 +198856,18 @@ module.exports = ForEachTile; /***/ }), -/* 1382 */ +/* 1397 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(146); -var WorldToTileX = __webpack_require__(68); -var WorldToTileY = __webpack_require__(69); +var GetTileAt = __webpack_require__(151); +var WorldToTileX = __webpack_require__(69); +var WorldToTileY = __webpack_require__(70); /** * Gets a tile at the given world coordinates from the given layer. @@ -194450,23 +198897,23 @@ module.exports = GetTileAtWorldXY; /***/ }), -/* 1383 */ +/* 1398 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Geom = __webpack_require__(434); +var Geom = __webpack_require__(453); var GetTilesWithin = __webpack_require__(26); -var Intersects = __webpack_require__(435); +var Intersects = __webpack_require__(454); var NOOP = __webpack_require__(2); -var TileToWorldX = __webpack_require__(147); -var TileToWorldY = __webpack_require__(148); -var WorldToTileX = __webpack_require__(68); -var WorldToTileY = __webpack_require__(69); +var TileToWorldX = __webpack_require__(152); +var TileToWorldY = __webpack_require__(153); +var WorldToTileX = __webpack_require__(69); +var WorldToTileY = __webpack_require__(70); var TriangleToRectangle = function (triangle, rect) { @@ -194547,18 +198994,18 @@ module.exports = GetTilesWithinShape; /***/ }), -/* 1384 */ +/* 1399 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetTilesWithin = __webpack_require__(26); -var WorldToTileX = __webpack_require__(68); -var WorldToTileY = __webpack_require__(69); +var WorldToTileX = __webpack_require__(69); +var WorldToTileY = __webpack_require__(70); /** * Gets the tiles in the given rectangular area (in world coordinates) of the layer. @@ -194597,18 +199044,18 @@ module.exports = GetTilesWithinWorldXY; /***/ }), -/* 1385 */ +/* 1400 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HasTileAt = __webpack_require__(498); -var WorldToTileX = __webpack_require__(68); -var WorldToTileY = __webpack_require__(69); +var HasTileAt = __webpack_require__(514); +var WorldToTileX = __webpack_require__(69); +var WorldToTileY = __webpack_require__(70); /** * Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns @@ -194637,18 +199084,18 @@ module.exports = HasTileAtWorldXY; /***/ }), -/* 1386 */ +/* 1401 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PutTileAt = __webpack_require__(239); -var WorldToTileX = __webpack_require__(68); -var WorldToTileY = __webpack_require__(69); +var PutTileAt = __webpack_require__(246); +var WorldToTileX = __webpack_require__(69); +var WorldToTileY = __webpack_require__(70); /** * Puts a tile at the given world coordinates (pixels) in the specified layer. You can pass in either @@ -194680,17 +199127,17 @@ module.exports = PutTileAtWorldXY; /***/ }), -/* 1387 */ +/* 1402 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CalculateFacesWithin = __webpack_require__(58); -var PutTileAt = __webpack_require__(239); +var CalculateFacesWithin = __webpack_require__(59); +var PutTileAt = __webpack_require__(246); /** * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified @@ -194744,17 +199191,17 @@ module.exports = PutTilesAt; /***/ }), -/* 1388 */ +/* 1403 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetTilesWithin = __webpack_require__(26); -var GetRandom = __webpack_require__(195); +var GetRandom = __webpack_require__(198); /** * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the @@ -194802,18 +199249,18 @@ module.exports = Randomize; /***/ }), -/* 1389 */ +/* 1404 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RemoveTileAt = __webpack_require__(499); -var WorldToTileX = __webpack_require__(68); -var WorldToTileY = __webpack_require__(69); +var RemoveTileAt = __webpack_require__(515); +var WorldToTileX = __webpack_require__(69); +var WorldToTileY = __webpack_require__(70); /** * Removes the tile at the given world coordinates in the specified layer and updates the layer's @@ -194843,17 +199290,17 @@ module.exports = RemoveTileAtWorldXY; /***/ }), -/* 1390 */ +/* 1405 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetTilesWithin = __webpack_require__(26); -var Color = __webpack_require__(359); +var Color = __webpack_require__(378); var defaultTileColor = new Color(105, 210, 231, 150); var defaultCollidingTileColor = new Color(243, 134, 48, 200); @@ -194932,18 +199379,18 @@ module.exports = RenderDebug; /***/ }), -/* 1391 */ +/* 1406 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetTileCollision = __webpack_require__(78); -var CalculateFacesWithin = __webpack_require__(58); -var SetLayerCollisionIndex = __webpack_require__(240); +var SetTileCollision = __webpack_require__(79); +var CalculateFacesWithin = __webpack_require__(59); +var SetLayerCollisionIndex = __webpack_require__(247); /** * Sets collision on the given tile or tiles within a layer by index. You can pass in either a @@ -195001,18 +199448,18 @@ module.exports = SetCollision; /***/ }), -/* 1392 */ +/* 1407 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetTileCollision = __webpack_require__(78); -var CalculateFacesWithin = __webpack_require__(58); -var SetLayerCollisionIndex = __webpack_require__(240); +var SetTileCollision = __webpack_require__(79); +var CalculateFacesWithin = __webpack_require__(59); +var SetLayerCollisionIndex = __webpack_require__(247); /** * Sets collision on a range of tiles in a layer whose index is between the specified `start` and @@ -195076,18 +199523,18 @@ module.exports = SetCollisionBetween; /***/ }), -/* 1393 */ +/* 1408 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetTileCollision = __webpack_require__(78); -var CalculateFacesWithin = __webpack_require__(58); -var SetLayerCollisionIndex = __webpack_require__(240); +var SetTileCollision = __webpack_require__(79); +var CalculateFacesWithin = __webpack_require__(59); +var SetLayerCollisionIndex = __webpack_require__(247); /** * Sets collision on all tiles in the given layer, except for tiles that have an index specified in @@ -195133,18 +199580,18 @@ module.exports = SetCollisionByExclusion; /***/ }), -/* 1394 */ +/* 1409 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetTileCollision = __webpack_require__(78); -var CalculateFacesWithin = __webpack_require__(58); -var HasValue = __webpack_require__(90); +var SetTileCollision = __webpack_require__(79); +var CalculateFacesWithin = __webpack_require__(59); +var HasValue = __webpack_require__(91); /** * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property @@ -195208,17 +199655,17 @@ module.exports = SetCollisionByProperty; /***/ }), -/* 1395 */ +/* 1410 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetTileCollision = __webpack_require__(78); -var CalculateFacesWithin = __webpack_require__(58); +var SetTileCollision = __webpack_require__(79); +var CalculateFacesWithin = __webpack_require__(59); /** * Sets collision on the tiles within a layer by checking each tile's collision group data @@ -195268,12 +199715,12 @@ module.exports = SetCollisionFromCollisionGroup; /***/ }), -/* 1396 */ +/* 1411 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195315,12 +199762,12 @@ module.exports = SetTileIndexCallback; /***/ }), -/* 1397 */ +/* 1412 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195358,17 +199805,17 @@ module.exports = SetTileLocationCallback; /***/ }), -/* 1398 */ +/* 1413 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetTilesWithin = __webpack_require__(26); -var ShuffleArray = __webpack_require__(120); +var ShuffleArray = __webpack_require__(122); /** * Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given @@ -195403,12 +199850,12 @@ module.exports = Shuffle; /***/ }), -/* 1399 */ +/* 1414 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195454,17 +199901,17 @@ module.exports = SwapByIndex; /***/ }), -/* 1400 */ +/* 1415 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileToWorldX = __webpack_require__(147); -var TileToWorldY = __webpack_require__(148); +var TileToWorldX = __webpack_require__(152); +var TileToWorldY = __webpack_require__(153); var Vector2 = __webpack_require__(3); /** @@ -195498,12 +199945,12 @@ module.exports = TileToWorldXY; /***/ }), -/* 1401 */ +/* 1416 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195578,17 +200025,17 @@ module.exports = WeightedRandomize; /***/ }), -/* 1402 */ +/* 1417 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var WorldToTileX = __webpack_require__(68); -var WorldToTileY = __webpack_require__(69); +var WorldToTileX = __webpack_require__(69); +var WorldToTileY = __webpack_require__(70); var Vector2 = __webpack_require__(3); /** @@ -195623,12 +200070,12 @@ module.exports = WorldToTileXY; /***/ }), -/* 1403 */ +/* 1418 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195638,23 +200085,23 @@ module.exports = WorldToTileXY; module.exports = { - Parse: __webpack_require__(500), - Parse2DArray: __webpack_require__(241), - ParseCSV: __webpack_require__(501), + Parse: __webpack_require__(516), + Parse2DArray: __webpack_require__(248), + ParseCSV: __webpack_require__(517), - Impact: __webpack_require__(1404), - Tiled: __webpack_require__(1405) + Impact: __webpack_require__(1419), + Tiled: __webpack_require__(1420) }; /***/ }), -/* 1404 */ +/* 1419 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195664,20 +200111,20 @@ module.exports = { module.exports = { - ParseTileLayers: __webpack_require__(514), - ParseTilesets: __webpack_require__(515), - ParseWeltmeister: __webpack_require__(513) + ParseTileLayers: __webpack_require__(530), + ParseTilesets: __webpack_require__(531), + ParseWeltmeister: __webpack_require__(529) }; /***/ }), -/* 1405 */ +/* 1420 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195687,27 +200134,27 @@ module.exports = { module.exports = { - AssignTileProperties: __webpack_require__(512), - Base64Decode: __webpack_require__(504), - BuildTilesetIndex: __webpack_require__(511), - ParseGID: __webpack_require__(242), - ParseImageLayers: __webpack_require__(505), - ParseJSONTiled: __webpack_require__(502), - ParseObject: __webpack_require__(244), - ParseObjectLayers: __webpack_require__(509), - ParseTileLayers: __webpack_require__(503), - ParseTilesets: __webpack_require__(506) + AssignTileProperties: __webpack_require__(528), + Base64Decode: __webpack_require__(520), + BuildTilesetIndex: __webpack_require__(527), + ParseGID: __webpack_require__(249), + ParseImageLayers: __webpack_require__(521), + ParseJSONTiled: __webpack_require__(518), + ParseObject: __webpack_require__(251), + ParseObjectLayers: __webpack_require__(525), + ParseTileLayers: __webpack_require__(519), + ParseTilesets: __webpack_require__(522) }; /***/ }), -/* 1406 */ +/* 1421 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195716,12 +200163,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(1407); + renderWebGL = __webpack_require__(1422); } if (true) { - renderCanvas = __webpack_require__(1408); + renderCanvas = __webpack_require__(1423); } module.exports = { @@ -195733,12 +200180,12 @@ module.exports = { /***/ }), -/* 1407 */ +/* 1422 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195774,7 +200221,7 @@ var DynamicTilemapLayerWebGLRenderer = function (renderer, src, interpolationPer var gidMap = src.gidMap; var pipeline = src.pipeline; - var getTint = Utils.getTintAppendFloatAlpha; + var getTint = Utils.getTintAppendFloatAlphaAndSwap; var scrollFactorX = src.scrollFactorX; var scrollFactorY = src.scrollFactorY; @@ -195850,12 +200297,12 @@ module.exports = DynamicTilemapLayerWebGLRenderer; /***/ }), -/* 1408 */ +/* 1423 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195982,12 +200429,12 @@ module.exports = DynamicTilemapLayerCanvasRenderer; /***/ }), -/* 1409 */ +/* 1424 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195996,12 +200443,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(1410); + renderWebGL = __webpack_require__(1425); } if (true) { - renderCanvas = __webpack_require__(1411); + renderCanvas = __webpack_require__(1426); } module.exports = { @@ -196013,12 +200460,12 @@ module.exports = { /***/ }), -/* 1410 */ +/* 1425 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -196085,12 +200532,12 @@ module.exports = StaticTilemapLayerWebGLRenderer; /***/ }), -/* 1411 */ +/* 1426 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -196219,17 +200666,17 @@ module.exports = StaticTilemapLayerCanvasRenderer; /***/ }), -/* 1412 */ +/* 1427 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectCreator = __webpack_require__(16); -var ParseToTilemap = __webpack_require__(245); +var ParseToTilemap = __webpack_require__(252); /** * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. @@ -196263,17 +200710,17 @@ GameObjectCreator.register('tilemap', function (config) /***/ }), -/* 1413 */ +/* 1428 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(6); -var ParseToTilemap = __webpack_require__(245); +var ParseToTilemap = __webpack_require__(252); /** * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. @@ -196329,12 +200776,12 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt /***/ }), -/* 1414 */ +/* 1429 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -196344,26 +200791,26 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt module.exports = { - Clock: __webpack_require__(1415), - TimerEvent: __webpack_require__(519) + Clock: __webpack_require__(1430), + TimerEvent: __webpack_require__(535) }; /***/ }), -/* 1415 */ +/* 1430 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var PluginCache = __webpack_require__(20); -var SceneEvents = __webpack_require__(21); -var TimerEvent = __webpack_require__(519); +var PluginCache = __webpack_require__(22); +var SceneEvents = __webpack_require__(18); +var TimerEvent = __webpack_require__(535); /** * @classdesc @@ -196757,16 +201204,16 @@ module.exports = Clock; /***/ }), -/* 1416 */ +/* 1431 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(98); +var CONST = __webpack_require__(100); var Extend = __webpack_require__(17); /** @@ -196775,13 +201222,13 @@ var Extend = __webpack_require__(17); var Tweens = { - Builders: __webpack_require__(1417), - Events: __webpack_require__(250), + Builders: __webpack_require__(1432), + Events: __webpack_require__(257), - TweenManager: __webpack_require__(1432), - Tween: __webpack_require__(249), - TweenData: __webpack_require__(251), - Timeline: __webpack_require__(524) + TweenManager: __webpack_require__(1447), + Tween: __webpack_require__(256), + TweenData: __webpack_require__(258), + Timeline: __webpack_require__(541) }; @@ -196792,12 +201239,12 @@ module.exports = Tweens; /***/ }), -/* 1417 */ +/* 1432 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -196807,27 +201254,28 @@ module.exports = Tweens; module.exports = { - GetBoolean: __webpack_require__(97), - GetEaseFunction: __webpack_require__(89), - GetNewValue: __webpack_require__(150), - GetProps: __webpack_require__(520), - GetTargets: __webpack_require__(246), - GetTweens: __webpack_require__(521), - GetValueOp: __webpack_require__(247), - NumberTweenBuilder: __webpack_require__(522), - TimelineBuilder: __webpack_require__(523), - TweenBuilder: __webpack_require__(151) + GetBoolean: __webpack_require__(99), + GetEaseFunction: __webpack_require__(90), + GetNewValue: __webpack_require__(155), + GetProps: __webpack_require__(536), + GetTargets: __webpack_require__(253), + GetTweens: __webpack_require__(537), + GetValueOp: __webpack_require__(254), + NumberTweenBuilder: __webpack_require__(538), + StaggerBuilder: __webpack_require__(539), + TimelineBuilder: __webpack_require__(540), + TweenBuilder: __webpack_require__(156) }; /***/ }), -/* 1418 */ +/* 1433 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -196897,12 +201345,12 @@ module.exports = [ /***/ }), -/* 1419 */ +/* 1434 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -196933,12 +201381,12 @@ module.exports = 'complete'; /***/ }), -/* 1420 */ +/* 1435 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -196970,12 +201418,12 @@ module.exports = 'loop'; /***/ }), -/* 1421 */ +/* 1436 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -197007,12 +201455,12 @@ module.exports = 'pause'; /***/ }), -/* 1422 */ +/* 1437 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -197044,12 +201492,12 @@ module.exports = 'resume'; /***/ }), -/* 1423 */ +/* 1438 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -197080,12 +201528,12 @@ module.exports = 'start'; /***/ }), -/* 1424 */ +/* 1439 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -197117,12 +201565,12 @@ module.exports = 'update'; /***/ }), -/* 1425 */ +/* 1440 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -197157,12 +201605,12 @@ module.exports = 'active'; /***/ }), -/* 1426 */ +/* 1441 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -197198,12 +201646,12 @@ module.exports = 'complete'; /***/ }), -/* 1427 */ +/* 1442 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -197242,12 +201690,12 @@ module.exports = 'loop'; /***/ }), -/* 1428 */ +/* 1443 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -197287,12 +201735,12 @@ module.exports = 'repeat'; /***/ }), -/* 1429 */ +/* 1444 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -197327,12 +201775,12 @@ module.exports = 'start'; /***/ }), -/* 1430 */ +/* 1445 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -197363,17 +201811,19 @@ module.exports = 'start'; * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event. * @param {string} key - The property that was updated, i.e. `x` or `scale`. * @param {any} target - The target object that was updated. Usually a Game Object, but can be of any type. + * @param {number} current - The current value of the property that was tweened. + * @param {number} previous - The previous value of the property that was tweened, prior to this update. */ module.exports = 'update'; /***/ }), -/* 1431 */ +/* 1446 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -197414,24 +201864,24 @@ module.exports = 'yoyo'; /***/ }), -/* 1432 */ +/* 1447 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayRemove = __webpack_require__(127); +var ArrayRemove = __webpack_require__(130); var Class = __webpack_require__(0); -var NumberTweenBuilder = __webpack_require__(522); -var PluginCache = __webpack_require__(20); -var SceneEvents = __webpack_require__(21); -var StaggerBuilder = __webpack_require__(1433); -var TimelineBuilder = __webpack_require__(523); -var TWEEN_CONST = __webpack_require__(98); -var TweenBuilder = __webpack_require__(151); +var NumberTweenBuilder = __webpack_require__(538); +var PluginCache = __webpack_require__(22); +var SceneEvents = __webpack_require__(18); +var StaggerBuilder = __webpack_require__(539); +var TimelineBuilder = __webpack_require__(540); +var TWEEN_CONST = __webpack_require__(100); +var TweenBuilder = __webpack_require__(156); /** * @classdesc @@ -197719,6 +202169,7 @@ var TweenManager = new Class({ * @method Phaser.Tweens.TweenManager#stagger * @since 3.19.0 * + * @param {(number|number[])} value - The amount to stagger by, or an array containing two elements representing the min and max values to stagger between. * @param {Phaser.Types.Tweens.StaggerConfig} config - The configuration object for the Stagger function. * * @return {function} The stagger function. @@ -198185,258 +202636,12 @@ module.exports = TweenManager; /***/ }), -/* 1433 */ +/* 1448 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetEaseFunction = __webpack_require__(89); -var GetValue = __webpack_require__(5); -var MATH_CONST = __webpack_require__(13); - -/** - * Creates a Stagger function to be used by a Tween property. - * - * The stagger function will allow you to stagger changes to the value of the property across all targets of the tween. - * - * This is only worth using if the tween has multiple targets. - * - * The following will stagger the delay by 100ms across all targets of the tween, causing them to scale down to 0.2 - * over the duration specified: - * - * ```javascript - * this.tweens.add({ - * targets: [ ... ], - * scale: 0.2, - * ease: 'linear', - * duration: 1000, - * delay: this.tweens.stagger(100) - * }); - * ``` - * - * The following will stagger the delay by 500ms across all targets of the tween using a 10 x 6 grid, staggering - * from the center out, using a cubic ease. - * - * ```javascript - * this.tweens.add({ - * targets: [ ... ], - * scale: 0.2, - * ease: 'linear', - * duration: 1000, - * delay: this.tweens.stagger(500, { grid: [ 10, 6 ], from: 'center', ease: 'cubic.out' }) - * }); - * ``` - * - * @function Phaser.Tweens.Builders.StaggerBuilder - * @since 3.19.0 - * - * @param {(number|number[])} value - The amount to stagger by, or an array containing two elements representing the min and max values to stagger between. - * @param {Phaser.Types.Tweens.StaggerConfig} [config] - A Stagger Configuration object. - * - * @return {function} The stagger function. - */ -var StaggerBuilder = function (value, options) -{ - if (options === undefined) { options = {}; } - - var result; - - var start = GetValue(options, 'start', 0); - var ease = GetValue(options, 'ease', null); - var grid = GetValue(options, 'grid', null); - - var from = GetValue(options, 'from', 0); - - var fromFirst = (from === 'first'); - var fromCenter = (from === 'center'); - var fromLast = (from === 'last'); - var fromValue = (typeof(from) === 'number'); - - var isRange = (Array.isArray(value)); - var value1 = (isRange) ? parseFloat(value[0]) : parseFloat(value); - var value2 = (isRange) ? parseFloat(value[1]) : 0; - var maxValue = Math.max(value1, value2); - - if (isRange) - { - start += value1; - } - - if (grid) - { - // Pre-calc the grid to save doing it for ever tweendata update - var gridWidth = grid[0]; - var gridHeight = grid[1]; - - var fromX = 0; - var fromY = 0; - - var distanceX = 0; - var distanceY = 0; - - var gridValues = []; - - if (fromLast) - { - fromX = gridWidth - 1; - fromY = gridHeight - 1; - } - else if (fromValue) - { - fromX = from % gridWidth; - fromY = Math.floor(from / gridWidth); - } - else if (fromCenter) - { - fromX = (gridWidth - 1) / 2; - fromY = (gridHeight - 1) / 2; - } - - var gridMax = MATH_CONST.MIN_SAFE_INTEGER; - - for (var toY = 0; toY < gridHeight; toY++) - { - gridValues[toY] = []; - - for (var toX = 0; toX < gridWidth; toX++) - { - distanceX = fromX - toX; - distanceY = fromY - toY; - - var dist = Math.sqrt(distanceX * distanceX + distanceY * distanceY); - - if (dist > gridMax) - { - gridMax = dist; - } - - gridValues[toY][toX] = dist; - } - } - } - - var easeFunction = (ease) ? GetEaseFunction(ease) : null; - - if (grid) - { - result = function (target, key, value, index) - { - var gridSpace = 0; - var toX = index % gridWidth; - var toY = Math.floor(index / gridWidth); - - if (toX >= 0 && toX < gridWidth && toY >= 0 && toY < gridHeight) - { - gridSpace = gridValues[toY][toX]; - } - - var output; - - if (isRange) - { - var diff = (value2 - value1); - - if (easeFunction) - { - output = ((gridSpace / gridMax) * diff) * easeFunction(gridSpace / gridMax); - } - else - { - output = (gridSpace / gridMax) * diff; - } - } - else if (easeFunction) - { - output = (gridSpace * value1) * easeFunction(gridSpace / gridMax); - } - else - { - output = gridSpace * value1; - } - - return output + start; - }; - } - else - { - result = function (target, key, value, index, total) - { - // zero offset - total--; - - var fromIndex; - - if (fromFirst) - { - fromIndex = index; - } - else if (fromCenter) - { - fromIndex = Math.abs((total / 2) - index); - } - else if (fromLast) - { - fromIndex = total - index; - } - else if (fromValue) - { - fromIndex = Math.abs(from - index); - } - - var output; - - if (isRange) - { - var spacing; - - if (fromCenter) - { - spacing = ((value2 - value1) / total) * (fromIndex * 2); - } - else - { - spacing = ((value2 - value1) / total) * fromIndex; - } - - if (easeFunction) - { - output = spacing * easeFunction(fromIndex / total); - } - else - { - output = spacing; - } - } - else if (easeFunction) - { - output = (total * maxValue) * easeFunction(fromIndex / total); - } - else - { - output = fromIndex * value1; - } - - return output + start; - }; - } - - return result; -}; - -module.exports = StaggerBuilder; - - -/***/ }), -/* 1434 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -198446,21 +202651,21 @@ module.exports = StaggerBuilder; module.exports = { - Array: __webpack_require__(193), - Base64: __webpack_require__(1435), - Objects: __webpack_require__(1437), - String: __webpack_require__(1441) + Array: __webpack_require__(196), + Base64: __webpack_require__(1449), + Objects: __webpack_require__(1451), + String: __webpack_require__(1455) }; /***/ }), -/* 1435 */ +/* 1449 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -198470,20 +202675,20 @@ module.exports = { module.exports = { - ArrayBufferToBase64: __webpack_require__(1436), - Base64ToArrayBuffer: __webpack_require__(391) + ArrayBufferToBase64: __webpack_require__(1450), + Base64ToArrayBuffer: __webpack_require__(410) }; /***/ }), -/* 1436 */ +/* 1450 */ /***/ (function(module, exports) { /** * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -198535,12 +202740,12 @@ module.exports = ArrayBufferToBase64; /***/ }), -/* 1437 */ +/* 1451 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -198550,36 +202755,36 @@ module.exports = ArrayBufferToBase64; module.exports = { - Clone: __webpack_require__(72), + Clone: __webpack_require__(73), Extend: __webpack_require__(17), GetAdvancedValue: __webpack_require__(15), GetFastValue: __webpack_require__(1), - GetMinMaxValue: __webpack_require__(1438), + GetMinMaxValue: __webpack_require__(1452), GetValue: __webpack_require__(5), - HasAll: __webpack_require__(1439), - HasAny: __webpack_require__(411), - HasValue: __webpack_require__(90), + HasAll: __webpack_require__(1453), + HasAny: __webpack_require__(430), + HasValue: __webpack_require__(91), IsPlainObject: __webpack_require__(7), - Merge: __webpack_require__(87), - MergeRight: __webpack_require__(1440), - Pick: __webpack_require__(508), - SetValue: __webpack_require__(431) + Merge: __webpack_require__(88), + MergeRight: __webpack_require__(1454), + Pick: __webpack_require__(524), + SetValue: __webpack_require__(450) }; /***/ }), -/* 1438 */ +/* 1452 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetValue = __webpack_require__(5); -var Clamp = __webpack_require__(24); +var Clamp = __webpack_require__(20); /** * Retrieves and clamps a numerical value from an object. @@ -198608,12 +202813,12 @@ module.exports = GetMinMaxValue; /***/ }), -/* 1439 */ +/* 1453 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -198645,16 +202850,16 @@ module.exports = HasAll; /***/ }), -/* 1440 */ +/* 1454 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clone = __webpack_require__(72); +var Clone = __webpack_require__(73); /** * Creates a new Object using all values from obj1. @@ -198688,12 +202893,12 @@ module.exports = MergeRight; /***/ }), -/* 1441 */ +/* 1455 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -198703,22 +202908,22 @@ module.exports = MergeRight; module.exports = { - Format: __webpack_require__(1442), - Pad: __webpack_require__(169), - Reverse: __webpack_require__(1443), - UppercaseFirst: __webpack_require__(191), - UUID: __webpack_require__(206) + Format: __webpack_require__(1456), + Pad: __webpack_require__(173), + Reverse: __webpack_require__(1457), + UppercaseFirst: __webpack_require__(194), + UUID: __webpack_require__(209) }; /***/ }), -/* 1442 */ +/* 1456 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -198748,12 +202953,12 @@ module.exports = Format; /***/ }), -/* 1443 */ +/* 1457 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -198777,13 +202982,13 @@ module.exports = Reverse; /***/ }), -/* 1444 */ +/* 1458 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -198793,21 +202998,21 @@ module.exports = Reverse; module.exports = { - SoundManagerCreator: __webpack_require__(385), + SoundManagerCreator: __webpack_require__(404), Events: __webpack_require__(64), - BaseSound: __webpack_require__(131), - BaseSoundManager: __webpack_require__(130), + BaseSound: __webpack_require__(134), + BaseSoundManager: __webpack_require__(133), - WebAudioSound: __webpack_require__(392), - WebAudioSoundManager: __webpack_require__(390), + WebAudioSound: __webpack_require__(411), + WebAudioSoundManager: __webpack_require__(409), - HTML5AudioSound: __webpack_require__(387), - HTML5AudioSoundManager: __webpack_require__(386), + HTML5AudioSound: __webpack_require__(406), + HTML5AudioSoundManager: __webpack_require__(405), - NoAudioSound: __webpack_require__(389), - NoAudioSoundManager: __webpack_require__(388) + NoAudioSound: __webpack_require__(408), + NoAudioSoundManager: __webpack_require__(407) }; diff --git a/dist/phaser-facebook-instant-games.min.js b/dist/phaser-facebook-instant-games.min.js index 9511d0724..1c170e033 100644 --- a/dist/phaser-facebook-instant-games.min.js +++ b/dist/phaser-facebook-instant-games.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Phaser",[],e):"object"==typeof exports?exports.Phaser=e():t.Phaser=e()}(window,function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=525)}([function(t,e){function i(t,e,i){var n=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&n.value&&"object"==typeof n.value&&(n=n.value),!(!n||!function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(n))&&(void 0===n.enumerable&&(n.enumerable=!0),void 0===n.configurable&&(n.configurable=!0),n)}function n(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function s(t,e,s,r){for(var a in e)if(e.hasOwnProperty(a)){var h=i(e,a,s);if(!1!==h){if(n((r||t).prototype,a)){if(o.ignoreFinals)continue;throw new Error("cannot override final property '"+a+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,a,h)}else t.prototype[a]=e[a]}}function r(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this}});n.ZERO=new n,n.RIGHT=new n(1,0),n.LEFT=new n(-1,0),n.UP=new n(0,-1),n.DOWN=new n(0,1),n.ONE=new n(1,1),t.exports=n},function(t,e,i){var n=i(0),s=i(51),r=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=s.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=r},function(t,e){t.exports=function(t,e,i){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return t[e];if(-1!==e.indexOf(".")){for(var n=e.split("."),s=t,r=i,o=0;o>>0},getTintAppendFloatAlpha:function(t,e){return((255&(255*e|0))<<24|t)>>>0},getTintAppendFloatAlphaAndSwap:function(t,e){return((255&(255*e|0))<<24|(255&(0|t))<<16|(255&(t>>8|0))<<8|255&(t>>16|0))>>>0},getFloatsFromUintRGB:function(t){return[(255&(t>>16|0))/255,(255&(t>>8|0))/255,(255&(0|t))/255]},getComponentCount:function(t,e){for(var i=0,n=0;n=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},function(t,e,i){t.exports={Alpha:i(268),Animation:i(269),BlendMode:i(272),ComputedSize:i(558),Crop:i(559),Depth:i(273),Flip:i(560),GetBounds:i(561),Mask:i(277),Origin:i(578),PathFollower:i(579),Pipeline:i(119),ScrollFactor:i(280),Size:i(580),Texture:i(581),TextureCrop:i(582),Tint:i(583),ToJSON:i(281),Transform:i(282),TransformMatrix:i(35),Visible:i(283)}},function(t,e){var i={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=i},function(t,e,i){var n=i(0),s=i(281),r=i(99),o=i(9),a=i(100),h=new n({Extends:o,initialize:function(t,e){o.call(this),this.scene=t,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new r(this)),this},setData:function(t,e){return this.data||(this.data=new r(this)),this.data.set(t,e),this},getData:function(t){return this.data||(this.data=new r(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.input&&(this.input.enabled=!1),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},update:function(){},toJSON:function(){return s(this)},willRender:function(t){return!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return i.unshift(this.scene.sys.displayList.getIndex(t)),i},destroy:function(t){if(void 0===t&&(t=!1),this.scene&&!this.ignoreDestroy){this.preDestroy&&this.preDestroy.call(this),this.emit(a.DESTROY,this);var e=this.scene.sys;t||(e.displayList.remove(this),e.updateList.remove(this)),this.input&&(e.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),t||e.queueDepthSort(),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0,this.removeAllListeners()}}});h.RENDER_MASK=15,t.exports=h},function(t,e,i){var n=i(177),s=i(5);t.exports=function(t,e,i){var r=s(t,e,null);if(null===r)return i;if(Array.isArray(r))return n.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return n.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return n.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},function(t,e,i){var n=i(0),s=i(20),r=i(21),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.displayList,this.updateList,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},s.register("GameObjectCreator",o,"make"),t.exports=o},function(t,e,i){var n=i(7),s=function(){var t,e,i,r,o,a,h=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof h&&(c=h,h=arguments[1]||{},l=2),u===l&&(h=this,--l);l0;e--){var n=Math.floor(i.random()*(e+1)),s=t[e];t[e]=t[n],t[n]=s}return t},i.choose=function(t){return t[Math.floor(i.random()*t.length)]},i.isElement=function(t){return"undefined"!=typeof HTMLElement?t instanceof HTMLElement:!!(t&&t.nodeType&&t.nodeName)},i.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},i.isFunction=function(t){return"function"==typeof t},i.isPlainObject=function(t){return"object"==typeof t&&t.constructor===Object},i.isString=function(t){return"[object String]"===toString.call(t)},i.clamp=function(t,e,i){return ti?i:t},i.sign=function(t){return t<0?-1:1},i.now=function(){if(window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return new Date-i._nowStartTime},i.random=function(e,i){return e=void 0!==e?e:0,i=void 0!==i?i:1,e+t()*(i-e)};var t=function(){return i._seed=(9301*i._seed+49297)%233280,i._seed/233280};i.colorToNumber=function(t){return 3==(t=t.replace("#","")).length&&(t=t.charAt(0)+t.charAt(0)+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2)),parseInt(t,16)},i.logLevel=1,i.log=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.info=function(){console&&i.logLevel>0&&i.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.warn=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.nextId=function(){return i._nextId++},i.indexOf=function(t,e){if(t.indexOf)return t.indexOf(e);for(var i=0;i=400&&t.status<=599&&(n=!1),this.resetXHR(),this.loader.nextFile(this,n)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(r.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=s.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=s.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){this.state=s.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.cache.add(this.key,this.data),this.pendingDestroy()},pendingDestroy:function(t){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(r.FILE_COMPLETE,e,i,t),this.loader.emit(r.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this)},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var n=new FileReader;n.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+n.result.split(",")[1]},n.onerror=t.onerror,n.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},function(t,e){t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},function(t,e,i){var n={};t.exports=n;var s=i(31),r=i(37),o=i(112),a=i(18),h=i(38),l=i(230);!function(){n._inertiaScale=4,n._nextCollidingGroupId=1,n._nextNonCollidingGroupId=-1,n._nextCategory=1,n.create=function(e){var i={id:a.nextId(),type:"body",label:"Body",gameObject:null,parts:[],plugin:{},angle:0,vertices:s.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"),position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},previousPositionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,ignoreGravity:!1,ignorePointer:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,render:{visible:!0,opacity:1,sprite:{xScale:1,yScale:1,xOffset:0,yOffset:0},lineWidth:0},events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inertia:0,_original:null},n=a.extend(i,e);return t(n,e),n},n.nextGroup=function(t){return t?n._nextNonCollidingGroupId--:n._nextCollidingGroupId++},n.nextCategory=function(){return n._nextCategory=n._nextCategory<<1,n._nextCategory};var t=function(t,e){e=e||{},n.set(t,{bounds:t.bounds||h.create(t.vertices),positionPrev:t.positionPrev||r.clone(t.position),anglePrev:t.anglePrev||t.angle,vertices:t.vertices,parts:t.parts||[t],isStatic:t.isStatic,isSleeping:t.isSleeping,parent:t.parent||t}),s.rotate(t.vertices,t.angle,t.position),l.rotate(t.axes,t.angle),h.update(t.bounds,t.vertices,t.velocity),n.set(t,{axes:e.axes||t.axes,area:e.area||t.area,mass:e.mass||t.mass,inertia:e.inertia||t.inertia});var i=t.isStatic?"#2e2b44":a.choose(["#006BA6","#0496FF","#FFBC42","#D81159","#8F2D56"]);t.render.fillStyle=t.render.fillStyle||i,t.render.strokeStyle=t.render.strokeStyle||"#000",t.render.sprite.xOffset+=-(t.bounds.min.x-t.position.x)/(t.bounds.max.x-t.bounds.min.x),t.render.sprite.yOffset+=-(t.bounds.min.y-t.position.y)/(t.bounds.max.y-t.bounds.min.y)};n.set=function(t,e,i){var s;for(s in"string"==typeof e&&(s=e,(e={})[s]=i),e)if(e.hasOwnProperty(s))switch(i=e[s],s){case"isStatic":n.setStatic(t,i);break;case"isSleeping":o.set(t,i);break;case"mass":n.setMass(t,i);break;case"density":n.setDensity(t,i);break;case"inertia":n.setInertia(t,i);break;case"vertices":n.setVertices(t,i);break;case"position":n.setPosition(t,i);break;case"angle":n.setAngle(t,i);break;case"velocity":n.setVelocity(t,i);break;case"angularVelocity":n.setAngularVelocity(t,i);break;case"parts":n.setParts(t,i);break;default:t[s]=i}},n.setStatic=function(t,e){for(var i=0;i0&&(o.angle+=t.angularVelocity,r.rotateAbout(o.position,i,t.position,o.position))}},n.setVelocity=function(t,e){t.positionPrev.x=t.position.x-e.x,t.positionPrev.y=t.position.y-e.y,t.velocity.x=e.x,t.velocity.y=e.y,t.speed=r.magnitude(t.velocity)},n.setAngularVelocity=function(t,e){t.anglePrev=t.angle-e,t.angularVelocity=e,t.angularSpeed=Math.abs(t.angularVelocity)},n.translate=function(t,e){n.setPosition(t,r.add(t.position,e))},n.rotate=function(t,e,i){if(i){var s=Math.cos(e),r=Math.sin(e),o=t.position.x-i.x,a=t.position.y-i.y;n.setPosition(t,{x:i.x+(o*s-a*r),y:i.y+(o*r+a*s)}),n.setAngle(t,t.angle+e)}else n.setAngle(t,t.angle+e)},n.scale=function(t,e,i,r){var o=0,a=0;r=r||t.position;for(var u=0;u0&&(o+=c.area,a+=c.inertia),c.position.x=r.x+(c.position.x-r.x)*e,c.position.y=r.y+(c.position.y-r.y)*i,h.update(c.bounds,c.vertices,t.velocity)}t.parts.length>1&&(t.area=o,t.isStatic||(n.setMass(t,t.density*o),n.setInertia(t,a))),t.circleRadius&&(e===i?t.circleRadius*=e:t.circleRadius=null)},n.update=function(t,e,i,n){var o=Math.pow(e*i*t.timeScale,2),a=1-t.frictionAir*i*t.timeScale,u=t.position.x-t.positionPrev.x,c=t.position.y-t.positionPrev.y;t.velocity.x=u*a*n+t.force.x/t.mass*o,t.velocity.y=c*a*n+t.force.y/t.mass*o,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.position.x+=t.velocity.x,t.position.y+=t.velocity.y,t.angularVelocity=(t.angle-t.anglePrev)*a*n+t.torque/t.inertia*o,t.anglePrev=t.angle,t.angle+=t.angularVelocity,t.speed=r.magnitude(t.velocity),t.angularSpeed=Math.abs(t.angularVelocity);for(var d=0;d0&&(f.position.x+=t.velocity.x,f.position.y+=t.velocity.y),0!==t.angularVelocity&&(s.rotate(f.vertices,t.angularVelocity,t.position),l.rotate(f.axes,t.angularVelocity),d>0&&r.rotateAbout(f.position,t.angularVelocity,t.position,f.position)),h.update(f.bounds,f.vertices,t.velocity)}},n.applyForce=function(t,e,i){t.force.x+=i.x,t.force.y+=i.y;var n=e.x-t.position.x,s=e.y-t.position.y;t.torque+=n*i.y-s*i.x},n._totalProperties=function(t){for(var e={mass:0,area:0,inertia:0,centre:{x:0,y:0}},i=1===t.parts.length?0:1;io.width&&(i=Math.max(o.width-t,0)),e+s>o.height&&(s=Math.max(o.height-e,0));for(var u=[],c=e;c=0;o--)t[o][e]=i+a*n,a++;return t}},function(t,e,i){var n,s,r,o=i(32),a=i(173),h=[],l=!1;t.exports={create2D:function(t,e,i){return n(t,e,i,o.CANVAS)},create:n=function(t,e,i,n,r){var u;void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=o.CANVAS),void 0===r&&(r=!1);var c=s(n);return null===c?(c={parent:t,canvas:document.createElement("canvas"),type:n},n===o.CANVAS&&h.push(c),u=c.canvas):(c.parent=t,u=c.canvas),r&&(c.parent=u),u.width=e,u.height=i,l&&n===o.CANVAS&&a.disable(u.getContext("2d")),u},createWebGL:function(t,e,i){return n(t,e,i,o.WEBGL)},disableSmoothing:function(){l=!0},enableSmoothing:function(){l=!1},first:s=function(t){if(void 0===t&&(t=o.CANVAS),t===o.WEBGL)return null;for(var e=0;e0)return!1}return!0},n.scale=function(t,e,i,r){if(1===e&&1===i)return t;var o,a;r=r||n.centre(t);for(var h=0;h=0?h-1:t.length-1],u=t[h],c=t[(h+1)%t.length],d=e[h0&&(r|=2),3===r)return!1;return 0!==r||null},n.hull=function(t){var e,i,n=[],r=[];for((t=t.slice(0)).sort(function(t,e){var i=t.x-e.x;return 0!==i?i:t.y-e.y}),i=0;i=2&&s.cross3(r[r.length-2],r[r.length-1],e)<=0;)r.pop();r.push(e)}for(i=t.length-1;i>=0;i-=1){for(e=t[i];n.length>=2&&s.cross3(n[n.length-2],n[n.length-1],e)<=0;)n.pop();n.push(e)}return n.pop(),r.pop(),n.concat(r)}},function(t,e,i){var n={VERSION:"3.21.0",BlendModes:i(42),ScaleModes:i(152),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};t.exports=n},function(t,e,i){var n=i(0),s=i(12),r=i(14),o=i(60),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.ComputedSize,s.Depth,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Transform,s.Visible],initialize:function(t,e,i){void 0===e&&(e="Shape"),r.call(this,t,e),this.geom=i,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new o,this.initPipeline()},setFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.isFilled=!1:(this.fillColor=t,this.fillAlpha=e,this.isFilled=!0),this},setStrokeStyle:function(t,e,i){return void 0===i&&(i=1),void 0===t?this.isStroked=!1:(this.lineWidth=t,this.strokeColor=e,this.strokeAlpha=i,this.isStroked=!0),this},setClosePath:function(t){return this.closePath=t,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]}});t.exports=a},function(t,e){t.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},function(t,e,i){var n=i(0),s=i(13),r=i(3),o=new n({initialize:function(t,e,i,n,s,r){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=1),void 0===s&&(s=0),void 0===r&&(r=0),this.matrix=new Float32Array([t,e,i,n,s,r,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0}},a:{get:function(){return this.matrix[0]},set:function(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],r=t[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):n||r?s.TAU-(r>0?Math.acos(-n/this.scaleY):-Math.acos(n/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),n=this.matrix,s=n[0],r=n[1],o=n[2],a=n[3];return n[0]=s*i+o*e,n[1]=r*i+a*e,n[2]=s*-e+o*i,n[3]=r*-e+a*i,this},multiply:function(t,e){var i=this.matrix,n=t.matrix,s=i[0],r=i[1],o=i[2],a=i[3],h=i[4],l=i[5],u=n[0],c=n[1],d=n[2],f=n[3],p=n[4],g=n[5],v=void 0===e?this:e;return v.a=u*s+c*o,v.b=u*r+c*a,v.c=d*s+f*o,v.d=d*r+f*a,v.e=p*s+g*o+h,v.f=p*r+g*a+l,v},multiplyWithOffset:function(t,e,i){var n=this.matrix,s=t.matrix,r=n[0],o=n[1],a=n[2],h=n[3],l=e*r+i*a+n[4],u=e*o+i*h+n[5],c=s[0],d=s[1],f=s[2],p=s[3],g=s[4],v=s[5];return n[0]=c*r+d*a,n[1]=c*o+d*h,n[2]=f*r+p*a,n[3]=f*o+p*h,n[4]=g*r+v*a+l,n[5]=g*o+v*h+u,this},transform:function(t,e,i,n,s,r){var o=this.matrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],d=o[5];return o[0]=t*a+e*l,o[1]=t*h+e*u,o[2]=i*a+n*l,o[3]=i*h+n*u,o[4]=s*a+r*l+c,o[5]=s*h+r*u+d,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var n=this.matrix,s=n[0],r=n[1],o=n[2],a=n[3],h=n[4],l=n[5];return i.x=t*s+e*o+h,i.y=t*r+e*a+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=e*s-i*n;return t[0]=s/a,t[1]=-i/a,t[2]=-n/a,t[3]=e/a,t[4]=(n*o-s*r)/a,t[5]=-(e*o-i*r)/a,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){var e=this.matrix;return t.setTransform(e[0],e[1],e[2],e[3],e[4],e[5]),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,i,n,s,r){var o=this.matrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=n,o[4]=s,o[5]=r,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],n=e[1],s=e[2],r=e[3],o=i*r-n*s;if(t.translateX=e[4],t.translateY=e[5],i||n){var a=Math.sqrt(i*i+n*n);t.rotation=n>0?Math.acos(i/a):-Math.acos(i/a),t.scaleX=a,t.scaleY=o/a}else if(s||r){var h=Math.sqrt(s*s+r*r);t.rotation=.5*Math.PI-(r>0?Math.acos(-s/h):-Math.acos(s/h)),t.scaleX=o/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,i,n,s){var r=this.matrix,o=Math.sin(i),a=Math.cos(i);return r[4]=t,r[5]=e,r[0]=a*n,r[1]=o*n,r[2]=-o*s,r[3]=a*s,this},applyInverse:function(t,e,i){void 0===i&&(i=new r);var n=this.matrix,s=n[0],o=n[1],a=n[2],h=n[3],l=n[4],u=n[5],c=1/(s*h+a*-o);return i.x=h*c*t+-a*c*e+(u*a-l*h)*c,i.y=s*c*e+-o*c*t+(-u*s+l*o)*c,i},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.decomposedMatrix=null}});t.exports=o},function(t,e,i){var n=i(0),s=i(171),r=i(295),o=i(172),a=i(296),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(t,e,i,n)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(t,e,i,n,s){return void 0===n&&(n=255),void 0===s&&(s=!0),this._locked=!0,this.red=t,this.green=e,this.blue=i,this.alpha=n,this._locked=!1,this.update(s)},setGLTo:function(t,e,i,n){return void 0===n&&(n=1),this._locked=!0,this.redGL=t,this.greenGL=e,this.blueGL=i,this.alphaGL=n,this._locked=!1,this.update(!0)},setFromRGB:function(t){return this._locked=!0,this.red=t.r,this.green=t.g,this.blue=t.b,t.hasOwnProperty("a")&&(this.alpha=t.a),this._locked=!1,this.update(!0)},setFromHSV:function(t,e,i){return o(t,e,i,this)},update:function(t){if(void 0===t&&(t=!1),this._locked)return this;var e=this.r,i=this.g,n=this.b,o=this.a;return this._color=s(e,i,n),this._color32=r(e,i,n,o),this._rgba="rgba("+e+","+i+","+n+","+o/255+")",t&&a(e,i,n,this),this},updateHSV:function(){var t=this.r,e=this.g,i=this.b;return a(t,e,i,this),this},clone:function(){return new h(this.r,this.g,this.b,this.a)},gray:function(t){return this.setTo(t,t,t)},random:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t)),n=Math.floor(t+Math.random()*(e-t)),s=Math.floor(t+Math.random()*(e-t));return this.setTo(i,n,s)},randomGray:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t));return this.setTo(i,i,i)},saturate:function(t){return this.s+=t/100,this},desaturate:function(t){return this.s-=t/100,this},lighten:function(t){return this.v+=t/100,this},darken:function(t){return this.v-=t/100,this},brighten:function(t){var e=this.r,i=this.g,n=this.b;return e=Math.max(0,Math.min(255,e-Math.round(-t/100*255))),i=Math.max(0,Math.min(255,i-Math.round(-t/100*255))),n=Math.max(0,Math.min(255,n-Math.round(-t/100*255))),this.setTo(e,i,n)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(t){this.gl[0]=Math.min(Math.abs(t),1),this.r=Math.floor(255*this.gl[0]),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(t){this.gl[1]=Math.min(Math.abs(t),1),this.g=Math.floor(255*this.gl[1]),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(t){this.gl[2]=Math.min(Math.abs(t),1),this.b=Math.floor(255*this.gl[2]),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(t){this.gl[3]=Math.min(Math.abs(t),1),this.a=Math.floor(255*this.gl[3]),this.update()}},red:{get:function(){return this.r},set:function(t){t=Math.floor(Math.abs(t)),this.r=Math.min(t,255),this.gl[0]=t/255,this.update(!0)}},green:{get:function(){return this.g},set:function(t){t=Math.floor(Math.abs(t)),this.g=Math.min(t,255),this.gl[1]=t/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(t){t=Math.floor(Math.abs(t)),this.b=Math.min(t,255),this.gl[2]=t/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(t){t=Math.floor(Math.abs(t)),this.a=Math.min(t,255),this.gl[3]=t/255,this.update()}},h:{get:function(){return this._h},set:function(t){this._h=t,o(t,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(t){this._s=t,o(this._h,t,this._v,this)}},v:{get:function(){return this._v},set:function(t){this._v=t,o(this._h,this._s,t,this)}}});t.exports=h},function(t,e){var i={};t.exports=i,i.create=function(t,e){return{x:t||0,y:e||0}},i.clone=function(t){return{x:t.x,y:t.y}},i.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},i.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},i.rotate=function(t,e,i){var n=Math.cos(e),s=Math.sin(e);i||(i={});var r=t.x*n-t.y*s;return i.y=t.x*s+t.y*n,i.x=r,i},i.rotateAbout=function(t,e,i,n){var s=Math.cos(e),r=Math.sin(e);n||(n={});var o=i.x+((t.x-i.x)*s-(t.y-i.y)*r);return n.y=i.y+((t.x-i.x)*r+(t.y-i.y)*s),n.x=o,n},i.normalise=function(t){var e=i.magnitude(t);return 0===e?{x:0,y:0}:{x:t.x/e,y:t.y/e}},i.dot=function(t,e){return t.x*e.x+t.y*e.y},i.cross=function(t,e){return t.x*e.y-t.y*e.x},i.cross3=function(t,e,i){return(e.x-t.x)*(i.y-t.y)-(e.y-t.y)*(i.x-t.x)},i.add=function(t,e,i){return i||(i={}),i.x=t.x+e.x,i.y=t.y+e.y,i},i.sub=function(t,e,i){return i||(i={}),i.x=t.x-e.x,i.y=t.y-e.y,i},i.mult=function(t,e){return{x:t.x*e,y:t.y*e}},i.div=function(t,e){return{x:t.x/e,y:t.y/e}},i.perp=function(t,e){return{x:(e=!0===e?-1:1)*-t.y,y:e*t.x}},i.neg=function(t){return{x:-t.x,y:-t.y}},i.angle=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)},i._temp=[i.create(),i.create(),i.create(),i.create(),i.create(),i.create()]},function(t,e){var i={};t.exports=i,i.create=function(t){var e={min:{x:0,y:0},max:{x:0,y:0}};return t&&i.update(e,t),e},i.update=function(t,e,i){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var n=0;nt.max.x&&(t.max.x=s.x),s.xt.max.y&&(t.max.y=s.y),s.y0?t.max.x+=i.x:t.min.x+=i.x,i.y>0?t.max.y+=i.y:t.min.y+=i.y)},i.contains=function(t,e){return e.x>=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},i.overlaps=function(t,e){return t.min.x<=e.max.x&&t.max.x>=e.min.x&&t.max.y>=e.min.y&&t.min.y<=e.max.y},i.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},i.shift=function(t,e){var i=t.max.x-t.min.x,n=t.max.y-t.min.y;t.min.x=e.x,t.max.x=e.x+i,t.min.y=e.y,t.max.y=e.y+n}},function(t,e){t.exports=function(t,e,i,n,s,r){var o;void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=1);var a=0,h=t.length;if(1===r)for(o=s;o=0;o--)t[o][e]+=i+a*n,a++;return t}},function(t,e,i){var n=i(13);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.fillColor,r=n||e.fillAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.fillStyle="rgba("+o+","+a+","+h+","+r+")"}},function(t,e){t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},function(t,e){t.exports=function(t){return t.y+t.height-t.height*t.originY}},function(t,e){t.exports=function(t,e){return t.y=e-t.height+t.height*t.originY,t}},function(t,e){t.exports=function(t){return t.x-t.width*t.originX}},function(t,e){t.exports=function(t,e){return t.x=e+t.width*t.originX,t}},function(t,e){t.exports=function(t){return t.x+t.width-t.width*t.originX}},function(t,e){t.exports=function(t,e){return t.x=e-t.width+t.width*t.originX,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY}},function(t,e){t.exports=function(t,e){return t.y=e+t.height*t.originY,t}},function(t,e){t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},function(t,e){t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i}},function(t,e,i){t.exports={DESTROY:i(653),FADE_IN_COMPLETE:i(654),FADE_IN_START:i(655),FADE_OUT_COMPLETE:i(656),FADE_OUT_START:i(657),FLASH_COMPLETE:i(658),FLASH_START:i(659),PAN_COMPLETE:i(660),PAN_START:i(661),POST_RENDER:i(662),PRE_RENDER:i(663),SHAKE_COMPLETE:i(664),SHAKE_START:i(665),ZOOM_COMPLETE:i(666),ZOOM_START:i(667)}},function(t,e,i){t.exports={BOOT:i(834),DESTROY:i(835),DRAG_END:i(836),DRAG_ENTER:i(837),DRAG:i(838),DRAG_LEAVE:i(839),DRAG_OVER:i(840),DRAG_START:i(841),DROP:i(842),GAME_OUT:i(843),GAME_OVER:i(844),GAMEOBJECT_DOWN:i(845),GAMEOBJECT_DRAG_END:i(846),GAMEOBJECT_DRAG_ENTER:i(847),GAMEOBJECT_DRAG:i(848),GAMEOBJECT_DRAG_LEAVE:i(849),GAMEOBJECT_DRAG_OVER:i(850),GAMEOBJECT_DRAG_START:i(851),GAMEOBJECT_DROP:i(852),GAMEOBJECT_MOVE:i(853),GAMEOBJECT_OUT:i(854),GAMEOBJECT_OVER:i(855),GAMEOBJECT_POINTER_DOWN:i(856),GAMEOBJECT_POINTER_MOVE:i(857),GAMEOBJECT_POINTER_OUT:i(858),GAMEOBJECT_POINTER_OVER:i(859),GAMEOBJECT_POINTER_UP:i(860),GAMEOBJECT_POINTER_WHEEL:i(861),GAMEOBJECT_UP:i(862),GAMEOBJECT_WHEEL:i(863),MANAGER_BOOT:i(864),MANAGER_PROCESS:i(865),MANAGER_UPDATE:i(866),POINTER_DOWN:i(867),POINTER_DOWN_OUTSIDE:i(868),POINTER_MOVE:i(869),POINTER_OUT:i(870),POINTER_OVER:i(871),POINTER_UP:i(872),POINTER_UP_OUTSIDE:i(873),POINTER_WHEEL:i(874),POINTERLOCK_CHANGE:i(875),PRE_UPDATE:i(876),SHUTDOWN:i(877),START:i(878),UPDATE:i(879)}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.strokeColor,r=n||e.strokeAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.strokeStyle="rgba("+o+","+a+","+h+","+r+")",t.lineWidth=e.lineWidth}},function(t,e){t.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},function(t,e,i){var n={};t.exports=n;var s=i(31),r=i(18),o=i(25),a=i(38),h=i(37),l=i(485);n.rectangle=function(t,e,i,n,a){a=a||{};var h={label:"Rectangle Body",position:{x:t,y:e},vertices:s.fromPath("L 0 0 L "+i+" 0 L "+i+" "+n+" L 0 "+n)};if(a.chamfer){var l=a.chamfer;h.vertices=s.chamfer(h.vertices,l.radius,l.quality,l.qualityMin,l.qualityMax),delete a.chamfer}return o.create(r.extend({},h,a))},n.trapezoid=function(t,e,i,n,a,h){h=h||{};var l,u=i*(a*=.5),c=u+(1-2*a)*i,d=c+u;l=a<.5?"L 0 0 L "+u+" "+-n+" L "+c+" "+-n+" L "+d+" 0":"L 0 0 L "+c+" "+-n+" L "+d+" 0";var f={label:"Trapezoid Body",position:{x:t,y:e},vertices:s.fromPath(l)};if(h.chamfer){var p=h.chamfer;f.vertices=s.chamfer(f.vertices,p.radius,p.quality,p.qualityMin,p.qualityMax),delete h.chamfer}return o.create(r.extend({},f,h))},n.circle=function(t,e,i,s,o){s=s||{};var a={label:"Circle Body",circleRadius:i};o=o||25;var h=Math.ceil(Math.max(10,Math.min(o,i)));return h%2==1&&(h+=1),n.polygon(t,e,h,i,r.extend({},a,s))},n.polygon=function(t,e,i,a,h){if(h=h||{},i<3)return n.circle(t,e,a,h);for(var l=2*Math.PI/i,u="",c=.5*l,d=0;d0&&s.area(E)1?(f=o.create(r.extend({parts:p.slice(0)},n)),o.setPosition(f,{x:t,y:e}),f):p[0]}},function(t,e,i){var n=i(146),s=i(26);t.exports=function(t,e,i,r,o){for(var a=null,h=null,l=null,u=null,c=s(t,e,i,r,null,o),d=0;d0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e,i){var n=i(0),s=i(275),r=i(158),o=i(51),a=i(159),h=i(3),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=o.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(t){return void 0===t&&(t=new h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=l},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return Math.sqrt(s*s+r*r)}},function(t,e,i){t.exports={COMPLETE:i(902),DECODED:i(903),DECODED_ALL:i(904),DESTROY:i(905),DETUNE:i(906),GLOBAL_DETUNE:i(907),GLOBAL_MUTE:i(908),GLOBAL_RATE:i(909),GLOBAL_VOLUME:i(910),LOOP:i(911),LOOPED:i(912),MUTE:i(913),PAUSE_ALL:i(914),PAUSE:i(915),PLAY:i(916),RATE:i(917),RESUME_ALL:i(918),RESUME:i(919),SEEK:i(920),STOP_ALL:i(921),STOP:i(922),UNLOCKED:i(923),VOLUME:i(924)}},function(t,e,i){var n=i(0),s=i(12),r=i(14),o=i(985),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Size,s.TextureCrop,s.Tint,s.Transform,s.Visible,o],initialize:function(t,e,i,n,o){r.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new s.Animation(this),this.setTexture(n,o),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e,i){return this.anims.play(t,e,i),this},toJSON:function(){return s.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=a},function(t,e,i){var n=i(0),s=i(22),r=i(23),o=i(8),a=i(1),h=i(5),l=i(7),u=new n({Extends:r,initialize:function(t,e,i,n,o){var u="json";if(l(e)){var c=e;e=a(c,"key"),i=a(c,"url"),n=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"dataKey",o)}var d={type:"json",cache:t.cacheManager.json,extension:u,responseType:"text",key:e,url:i,xhrSettings:n,config:o};r.call(this,t,d),l(i)&&(this.data=o?h(i,o):i,this.state=s.FILE_POPULATED)},onProcess:function(){if(this.state!==s.FILE_POPULATED){this.state=s.FILE_PROCESSING;var t=JSON.parse(this.xhrLoader.responseText),e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});o.register("json",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s80*i){n=h=t[0],a=l=t[1];for(var T=i;Th&&(h=u),f>l&&(l=f);g=0!==(g=Math.max(h-n,l-a))?1/g:0}return o(y,x,i,n,a,g),x}function s(t,e,i,n,s){var r,o;if(s===A(t,e,i,n)>0)for(r=e;r=e;r-=n)o=b(r,t[r],t[r+1],o);return o&&y(o,o.next)&&(S(o),o=o.next),o}function r(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!y(n,n.next)&&0!==m(n.prev,n,n.next))n=n.next;else{if(S(n),(n=e=n.prev)===n.next)break;i=!0}}while(i||n!==e);return e}function o(t,e,i,n,s,c,d){if(t){!d&&c&&function(t,e,i,n){var s=t;do{null===s.z&&(s.z=f(s.x,s.y,e,i,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,i,n,s,r,o,a,h,l=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||h>0&&n;)0!==a&&(0===h||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,h--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,l*=2}while(o>1)}(s)}(t,n,s,c);for(var p,g,v=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,n,s,c):a(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),S(t),t=g.next,v=g.next;else if((t=g)===v){d?1===d?o(t=l(t,e,i),e,i,n,s,c,2):2===d&&u(t,e,i,n,s,c):o(r(t),e,i,n,s,c,1);break}}}function a(t){var e=t.prev,i=t,n=t.next;if(m(e,i,n)>=0)return!1;for(var s=t.next.next;s!==t.prev;){if(g(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&m(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function h(t,e,i,n){var s=t.prev,r=t,o=t.next;if(m(s,r,o)>=0)return!1;for(var a=s.xr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,u=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=f(a,h,e,i,n),d=f(l,u,e,i,n),p=t.prevZ,v=t.nextZ;p&&p.z>=c&&v&&v.z<=d;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&m(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,v!==t.prev&&v!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&m(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;v&&v.z<=d;){if(v!==t.prev&&v!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function l(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!y(s,r)&&x(s,n,n.next,r)&&T(s,r)&&T(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),S(n),S(n.next),n=t=r),n=n.next}while(n!==t);return n}function u(t,e,i,n,s,a){var h=t;do{for(var l=h.next.next;l!==h.prev;){if(h.i!==l.i&&v(h,l)){var u=w(h,l);return h=r(h,h.next),u=r(u,u.next),o(h,e,i,n,s,a),void o(u,e,i,n,s,a)}l=l.next}h=h.next}while(h!==t)}function c(t,e){return t.x-e.x}function d(t,e){if(e=function(t,e){var i,n=e,s=t.x,r=t.y,o=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&a>o){if(o=a,a===s){if(r===n.y)return n;if(r===n.next.y)return n.next}i=n.x=n.x&&n.x>=u&&s!==n.x&&g(ri.x)&&T(n,t)&&(i=n,d=h),n=n.next;return i}(t,e)){var i=w(e,t);r(i,i.next)}}function f(t,e,i,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*s)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*s)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{e.x=0&&(t-o)*(n-a)-(i-o)*(e-a)>=0&&(i-o)*(r-a)-(s-o)*(n-a)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&x(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&T(t,e)&&T(e,t)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(t,e)}function m(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function y(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,i,n){return!!(y(t,e)&&y(i,n)||y(t,n)&&y(i,e))||m(t,e,i)>0!=m(t,e,n)>0&&m(i,n,t)>0!=m(i,n,e)>0}function T(t,e){return m(t.prev,t,t.next)<0?m(t,e,t.next)>=0&&m(t,t.prev,e)>=0:m(t,e,t.prev)<0||m(t,t.next,e)<0}function w(t,e){var i=new E(t.i,t.x,t.y),n=new E(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function b(t,e,i,n){var s=new E(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function S(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function E(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(t,e,i,n){for(var s=0,r=e,o=i-n;r0&&(n+=t[s-1].length,i.holes.push(n))}return i}},function(t,e){t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},function(t,e){t.exports=function(t,e,i,n){var s=t.length;if(e<0||e>s||e>=i||i>s||e+i>s){if(n)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},function(t,e,i){var n=i(10);t.exports=function(t,e,i,s,r){var o=t.strokeTint,a=n.getTintAppendFloatAlphaAndSwap(e.strokeColor,e.strokeAlpha*i);o.TL=a,o.TR=a,o.BL=a,o.BR=a;var h=e.pathData,l=h.length-1,u=e.lineWidth,c=u/2,d=h[0]-s,f=h[1]-r;e.closePath||(l-=2);for(var p=2;p=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=u},function(t,e,i){var n=i(0),s=i(22),r=i(23),o=i(8),a=i(1),h=i(7),l=new n({Extends:r,initialize:function t(e,i,n,s,o){var l,u="png";if(h(i)){var c=i;i=a(c,"key"),n=a(c,"url"),l=a(c,"normalMap"),s=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"frameConfig")}Array.isArray(n)&&(l=n[1],n=n[0]);var d={type:"image",cache:e.textureManager,extension:u,responseType:"blob",key:i,url:n,xhrSettings:s,config:o};if(r.call(this,e,d),l){var f=new t(e,this.key,l,s,o);f.type="normalMap",this.setLink(f),e.addFile(f)}},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){r.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(t.data),t.onProcessError()},r.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===s.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});o.register("image",function(t,e,i){if(Array.isArray(t))for(var n=0;nthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=t.properties,this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(t){var e=this.tilemapLayer;return e?e.tileToWorldX(this.x,t):this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return void 0===e&&(e=new r),e.x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-e.y,e},getCenterX:function(t){return(this.getLeft(t)+this.getRight(t))/2},getCenterY:function(t){return(this.getTop(t)+this.getBottom(t))/2},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){(void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){(void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight,this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.layer.tilemapLayer;if(t){var e=t.gidMap[this.index];if(e)return e}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=o},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,n=t[e],s=e;si&&(e=i/2);var n=Math.max(1,Math.round(i/e));return s(this.getSpacedPoints(n),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],n=this.getPoint(0,this._tmpVec2A),s=0;i.push(0);for(var r=1;r<=t;r++)s+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(n),i.push(s),n.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var n=0;n<=t;n++)i.push(this.getPoint(n/t));return i},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++){var n=this.getUtoTmapping(i/t,null,t);e.push(this.getPoint(n))}return e},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=t-1e-4,n=t+1e-4;return i<0&&(i=0),n>1&&(n=1),this.getPoint(i,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var n,s=this.getLengths(i),r=0,o=s.length;n=e?Math.min(e,s[o-1]):t*s[o-1];for(var a,h=0,l=o-1;h<=l;)if((a=s[r=Math.floor(h+(l-h)/2)]-n)<0)h=r+1;else{if(!(a>0)){l=r;break}l=r-1}if(s[r=l]===n)return r/(o-1);var u=s[r];return(r+(n-u)/(s[r+1]-u))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},function(t,e,i){t.exports={ADD:i(881),COMPLETE:i(882),FILE_COMPLETE:i(883),FILE_KEY_COMPLETE:i(884),FILE_LOAD_ERROR:i(885),FILE_LOAD:i(886),FILE_PROGRESS:i(887),POST_PROCESS:i(888),PROGRESS:i(889),START:i(890)}},function(t,e,i){var n=i(72);t.exports=function(t,e){var i=n(t);for(var s in e)i.hasOwnProperty(s)||(i[s]=e[s]);return i}},function(t,e,i){var n=i(0),s=i(12),r=i(14),o=i(988),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Size,s.TextureCrop,s.Tint,s.Transform,s.Visible,o],initialize:function(t,e,i,n,s){r.call(this,t,"Image"),this._crop=this.resetCropObject(),this.setTexture(n,s),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()}});t.exports=a},function(t,e,i){var n=i(175),s=i(191);t.exports=function(t,e){var i=n.Power0;if("string"==typeof t)if(n.hasOwnProperty(t))i=n[t];else{var r="";t.indexOf(".")&&("in"===(r=t.substr(t.indexOf(".")+1)).toLowerCase()?r="easeIn":"out"===r.toLowerCase()?r="easeOut":"inout"===r.toLowerCase()&&(r="easeInOut")),t=s(t.substr(0,t.indexOf(".")+1)+r),n.hasOwnProperty(t)&&(i=n[t])}else"function"==typeof t?i=t:Array.isArray(t)&&t.length;if(!e)return i;var o=e.slice(0);return o.unshift(0),function(t){return o[0]=t,i.apply(this,o)}}},function(t,e){t.exports=function(t,e){return t.hasOwnProperty(e)}},function(t,e){t.exports=function(t,e,i){var n=t.x3-t.x1,s=t.y3-t.y1,r=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,h=i-t.y1,l=n*n+s*s,u=n*r+s*o,c=n*a+s*h,d=r*r+o*o,f=r*a+o*h,p=l*d-u*u,g=0===p?0:1/p,v=(d*c-u*f)*g,m=(l*f-u*c)*g;return v>=0&&m>=0&&v+m<1}},function(t,e,i){var n=i(4);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.x1,r=t.y1,o=t.x2,a=t.y2,h=e.x1,l=e.y1,u=e.x2,c=e.y2,d=(u-h)*(r-l)-(c-l)*(s-h),f=(o-s)*(r-l)-(a-r)*(s-h),p=(c-l)*(o-s)-(u-h)*(a-r);if(0===p)return!1;var g=d/p,v=f/p;return g>=0&&g<=1&&v>=0&&v<=1&&(i.x=s+g*(o-s),i.y=r+g*(a-r),!0)}},function(t,e){t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},function(t,e,i){var n={};t.exports=n;var s=i(18);n.on=function(t,e,i){for(var n,s=e.split(" "),r=0;r0){i||(i={}),n=e.split(" ");for(var l=0;l0?1:.7),e.damping=e.damping||0,e.angularStiffness=e.angularStiffness||0,e.angleA=e.bodyA?e.bodyA.angle:e.angleA,e.angleB=e.bodyB?e.bodyB.angle:e.angleB,e.plugin={};var o={visible:!0,lineWidth:2,strokeStyle:"#ffffff",type:"line",anchors:!0};return 0===e.length&&e.stiffness>.1?(o.type="pin",o.anchors=!1):e.stiffness<.9&&(o.type="spring"),e.render=l.extend(o,e.render),e},n.preSolveAll=function(t){for(var e=0;e0&&(c.position.x+=l.x,c.position.y+=l.y),0!==l.angle&&(s.rotate(c.vertices,l.angle,i.position),h.rotate(c.axes,l.angle),u>0&&r.rotateAbout(c.position,l.angle,i.position,c.position)),a.update(c.bounds,c.vertices,i.velocity)}l.angle*=n._warming,l.x*=n._warming,l.y*=n._warming}}}},function(t,e,i){var n=i(24);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e){t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},function(t,e){t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},function(t,e,i){var n=i(0),s=i(284),r=new n({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once("destroy",this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;nC&&wA&&b<_&&f.push(v)}else f.push(v)}return f},getWorldPoint:function(t,e,i){void 0===i&&(i=new c);var n=this.matrix.matrix,s=n[0],r=n[1],o=n[2],a=n[3],h=n[4],l=n[5],u=s*a-r*o;if(!u)return i.x=t,i.y=e,i;var d=a*(u=1/u),f=-r*u,p=-o*u,g=s*u,v=(o*l-a*h)*u,m=(r*h-s*l)*u,y=Math.cos(this.rotation),x=Math.sin(this.rotation),T=this.zoom,w=this.resolution,b=this.scrollX,S=this.scrollY,E=t+(b*y-S*x)*T,A=e+(b*x+S*y)*T;return i.x=(E*d+A*p)*w+v,i.y=(E*f+A*g)*w+m,i},ignore:function(t){var e=this.id;Array.isArray(t)||(t=[t]);for(var i=0;is&&(t=s),t},clampY:function(t){var e=this._bounds,i=this.displayHeight,n=e.y+(i-this.height)/2,s=Math.max(n,n+e.height-i);return ts&&(t=s),t},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=r(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=u(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n,s){return void 0===s&&(s=!1),this._bounds.setTo(t,e,i,n),this.dirty=!0,this.useBounds=!0,s?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(t){void 0===t&&(t=new h);var e=this._bounds;return t.setTo(e.x,e.y,e.width,e.height),t},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t){this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=t;var e=t.sys;this.sceneManager=e.game.scene,this.scaleManager=e.scale,this.cameraManager=e.cameras;var i=this.scaleManager.resolution;return this.resolution=i,this._cx=this._x*i,this._cy=this._y*i,this._cw=this._width*i,this._ch=this._height*i,this.updateSystem(),this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setZoom:function(t){return void 0===t&&(t=1),0===t&&(t=.001),this.zoom=t,this},setMask:function(t,e){return void 0===e&&(e=!0),this.mask=t,this._maskCamera=e?this.cameraManager.default:this,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},update:function(){},updateSystem:function(){if(this.scaleManager){var t=0!==this._x||0!==this._y||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,e=this.sceneManager;t&&!this._customViewport?e.customViewports++:!t&&this._customViewport&&e.customViewports--,this.dirty=!0,this._customViewport=t}},destroy:function(){this.emit(a.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(t){this._x=t,this._cx=t*this.resolution,this.updateSystem()}},y:{get:function(){return this._y},set:function(t){this._y=t,this._cy=t*this.resolution,this.updateSystem()}},width:{get:function(){return this._width},set:function(t){this._width=t,this._cw=t*this.resolution,this.updateSystem()}},height:{get:function(){return this._height},set:function(t){this._height=t,this._ch=t*this.resolution,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(t){this._scrollX=t,this.dirty=!0}},scrollY:{get:function(){return this._scrollY},set:function(t){this._scrollY=t,this.dirty=!0}},zoom:{get:function(){return this._zoom},set:function(t){this._zoom=t,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoom}},displayHeight:{get:function(){return this.height/this.zoom}}});t.exports=d},function(t,e,i){t.exports={ENTER_FULLSCREEN:i(706),FULLSCREEN_FAILED:i(707),FULLSCREEN_UNSUPPORTED:i(708),LEAVE_FULLSCREEN:i(709),ORIENTATION_CHANGE:i(710),RESIZE:i(711)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),n?(i+t)/e:i+t)}},function(t,e,i){var n=i(0),s=i(24),r=i(17),o=new n({initialize:function(t,e,i,n,s,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0}},this.setSize(r,o,n,s)},setSize:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=0),this.cutX=i,this.cutY=n,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var s=this.data,r=s.cut;r.x=i,r.y=n,r.w=t,r.h=e,r.r=i+t,r.b=n+e,s.sourceSize.w=t,s.sourceSize.h=e,s.spriteSourceSize.w=t,s.spriteSourceSize.h=e,s.radius=.5*Math.sqrt(t*t+e*e);var o=s.drawImage;return o.x=i,o.y=n,o.width=t,o.height=e,this.updateUVs()},setTrim:function(t,e,i,n,s,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=n,a.w=s,a.h=r,a.r=i+s,a.b=n+r,this.x=i,this.y=n,this.width=s,this.height=r,this.halfWidth=.5*s,this.halfHeight=.5*r,this.centerX=Math.floor(s/2),this.centerY=Math.floor(r/2),this.updateUVs()},setCropUVs:function(t,e,i,n,r,o,a){var h=this.cutX,l=this.cutY,u=this.cutWidth,c=this.cutHeight,d=this.realWidth,f=this.realHeight,p=h+(e=s(e,0,d)),g=l+(i=s(i,0,f)),v=n=s(n,0,d-e),m=r=s(r,0,f-i),y=this.data;if(y.trim){var x=y.spriteSourceSize,T=e+(n=s(n,0,u-e)),w=i+(r=s(r,0,c-i));if(!(x.rT||x.y>w)){var b=Math.max(x.x,e),S=Math.max(x.y,i),E=Math.min(x.r,T)-b,A=Math.min(x.b,w)-S;v=E,m=A,p=o?h+(u-(b-x.x)-E):h+(b-x.x),g=a?l+(c-(S-x.y)-A):l+(S-x.y),e=b,i=S,n=E,r=A}else p=0,g=0,v=0,m=0}else o&&(p=h+(u-e-n)),a&&(g=l+(c-i-r));var _=this.source.width,C=this.source.height;return t.u0=Math.max(0,p/_),t.v0=Math.max(0,g/C),t.u1=Math.min(1,(p+v)/_),t.v1=Math.min(1,(g+m)/C),t.x=e,t.y=i,t.cx=p,t.cy=g,t.cw=v,t.ch=m,t.width=n,t.height=r,t.flipX=o,t.flipY=a,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=n;var r=this.source.width,o=this.source.height;return this.u0=t/r,this.v0=e/o,this.u1=(t+i)/r,this.v1=(e+n)/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new o(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=r(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=o},function(t,e,i){var n=i(0),s=i(106),r=i(402),o=i(403),a=i(51),h=i(163),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=a.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=l},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var n=i(253),s=i(0),r=i(100),o=i(1),a=i(5),h=i(7),l=i(396),u=i(108),c=i(65),d=new s({initialize:function(t,e,i){i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?h(e[0])&&(i=e,e=null):h(e)&&(i=e,e=null),this.scene=t,this.children=new u(e),this.isParent=!0,this.type="Group",this.classType=o(i,"classType",c),this.name=o(i,"name",""),this.active=o(i,"active",!0),this.maxSize=o(i,"maxSize",-1),this.defaultKey=o(i,"defaultKey",null),this.defaultFrame=o(i,"defaultFrame",null),this.runChildUpdate=o(i,"runChildUpdate",!1),this.createCallback=o(i,"createCallback",null),this.removeCallback=o(i,"removeCallback",null),this.createMultipleCallback=o(i,"createMultipleCallback",null),i&&this.createMultiple(i)},create:function(t,e,i,n,s,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(o),o.preUpdate&&this.scene.sys.updateList.add(o),o.visible=s,o.setActive(r),this.add(o),o},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i=0;u--)if((l=d[u]).active===i){if(++c===e)break}else l=null;return l?("number"==typeof s&&(l.x=s),"number"==typeof r&&(l.y=r),l):n?this.create(s,r,o,a,h):null},get:function(t,e,i,n,s){return this.getFirst(!1,!0,t,e,i,n,s)},getFirstAlive:function(t,e,i,n,s,r){return this.getFirst(!0,t,e,i,n,s,r)},getFirstDead:function(t,e,i,n,s,r){return this.getFirst(!1,t,e,i,n,s,r)},playAnimation:function(t,e){return n.PlayAnimation(this.children.entries,t,e),this},isFull:function(){return-1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t-1},union:function(t){var e=new n;return t.entries.forEach(function(t){e.set(t)}),this.entries.forEach(function(t){e.set(t)}),e},intersect:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)&&e.set(i)}),e},difference:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)||e.set(i)}),e},size:{get:function(){return this.entries.length},set:function(t){return t0&&r.motion=r.sleepThreshold&&n.set(r,!0)):r.sleepCounter>0&&(r.sleepCounter-=1)}else n.set(r,!1)}},n.afterCollisions=function(t,e){for(var i=e*e*e,s=0;sn._motionWakeThreshold*i&&n.set(l,!1)}}}},n.set=function(t,e){var i=t.isSleeping;e?(t.isSleeping=!0,t.sleepCounter=t.sleepThreshold,t.positionImpulse.x=0,t.positionImpulse.y=0,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.anglePrev=t.angle,t.speed=0,t.angularSpeed=0,t.motion=0,i||s.trigger(t,"sleepStart")):(t.isSleeping=!1,t.sleepCounter=0,i&&s.trigger(t,"sleepEnd"))}},function(t,e){t.exports=function(t,e,i){return t>=0&&t=0&&e0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e,i){(function(e){var i={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){var t=navigator.userAgent;/Windows/.test(t)?i.windows=!0:/Mac OS/.test(t)&&!/like Mac OS/.test(t)?i.macOS=!0:/Android/.test(t)?i.android=!0:/Linux/.test(t)?i.linux=!0:/iP[ao]d|iPhone/i.test(t)?(i.iOS=!0,navigator.appVersion.match(/OS (\d+)/),i.iOSVersion=parseInt(RegExp.$1,10),i.iPhone=-1!==t.toLowerCase().indexOf("iphone"),i.iPad=-1!==t.toLowerCase().indexOf("ipad")):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?i.kindle=!0:/CrOS/.test(t)&&(i.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(i.android=!1,i.iOS=!1,i.macOS=!1,i.windows=!0,i.windowsPhone=!0);var n=/Silk/.test(t);return(i.windows||i.macOS||i.linux&&!n||i.chromeOS)&&(i.desktop=!0),(i.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(i.desktop=!1),navigator.standalone&&(i.webApp=!0),void 0!==window.cordova&&(i.cordova=!0),void 0!==e&&e.versions&&e.versions.node&&(i.node=!0),i.node&&"object"==typeof e.versions&&(i.nodeWebkit=!!e.versions["node-webkit"],i.electron=!!e.versions.electron),void 0!==window.ejecta&&(i.ejecta=!0),/Crosswalk/.test(t)&&(i.crosswalk=!0),i.pixelRatio=window.devicePixelRatio||1,i}()}).call(this,i(732))},function(t,e,i){var n,s=i(122),r={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0};t.exports=(n=navigator.userAgent,/Edge\/\d+/.test(n)?r.edge=!0:/Chrome\/(\d+)/.test(n)&&!s.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(n)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(n)&&s.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(n)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(n)?r.opera=!0:/Safari/.test(n)&&!s.windowsPhone?r.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(n)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(n)&&(r.silk=!0),r)},function(t,e){t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e,i){t.exports={ADD:i(779),ERROR:i(780),LOAD:i(781),READY:i(782),REMOVE:i(783)}},function(t,e){t.exports=function(t,e){var i;if(e)"string"==typeof e?i=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(i=e);else if(t.parentElement)return t;return i||(i=document.body),i.appendChild(t),t}},function(t,e,i){var n=i(84);t.exports=function(t,e,i,s){var r;if(void 0===s&&(s=t),!Array.isArray(e))return-1!==(r=t.indexOf(e))?(n(t,r),i&&i.call(s,e),e):null;for(var o=e.length-1;o>=0;){var a=e[o];-1!==(r=t.indexOf(a))?(n(t,r),i&&i.call(s,a)):e.pop(),o--}return e}},function(t,e){t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175}},function(t,e){t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},function(t,e,i){var n=i(0),s=i(72),r=i(9),o=i(64),a=i(19),h=i(2),l=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.jsonCache=t.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,t.events.on(a.BLUR,function(){this.pauseOnBlur&&this.onBlur()},this),t.events.on(a.FOCUS,function(){this.pauseOnBlur&&this.onFocus()},this),t.events.on(a.PRE_STEP,this.update,this),t.events.once(a.DESTROY,this.destroy,this)},add:h,addAudioSprite:function(t,e){void 0===e&&(e={});var i=this.add(t,e);for(var n in i.spritemap=this.jsonCache.get(t).spritemap,i.spritemap)if(i.spritemap.hasOwnProperty(n)){var r=s(e),o=i.spritemap[n];r.loop=!!o.hasOwnProperty("loop")&&o.loop,i.addMarker({name:n,start:o.start,duration:o.end-o.start,config:r})}return i},play:function(t,e){var i=this.add(t);return i.once(o.COMPLETE,i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var n=this.addAudioSprite(t);return n.once(o.COMPLETE,n.destroy,n),n.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var n=this.sounds[i];n.key===t&&(n.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound(function(t){t.pause()}),this.emit(o.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit(o.RESUME_ALL,this)},stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit(o.STOP_ALL,this)},unlock:h,onBlur:h,onFocus:h,update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(o.UNLOCKED,this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach(function(i){i.update(t,e)})},destroy:function(){this.removeAllListeners(),this.forEachActiveSound(function(t){t.destroy()}),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach(function(n,s){n&&!n.pendingRemove&&t.call(e||i,n,s,i.sounds)})},setRate:function(t){return this.rate=t,this},rate:{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound(function(t){t.calculateRate()}),this.emit(o.GLOBAL_RATE,this,t)}},setDetune:function(t){return this.detune=t,this},detune:{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound(function(t){t.calculateRate()}),this.emit(o.GLOBAL_DETUNE,this,t)}}});t.exports=l},function(t,e,i){var n=i(0),s=i(9),r=i(64),o=i(17),a=i(2),h=new n({Extends:s,initialize:function(t,e,i){s.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},this.currentConfig=this.config,this.config=o(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(console.error("addMarker "+t.name+" already exists in Sound"),!1):(t=o(!0,{name:"",start:0,duration:this.totalDuration-(t.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0}},t),this.markers[t.name]=t,!0))},updateMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(this.markers[t.name]=o(!0,this.markers[t.name],t),!0):(console.warn("Audio Marker: "+t.name+" missing in Sound: "+this.key),!1))},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):null},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return!1;if(t){if(!this.markers[t])return console.warn("Marker: "+t+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=o(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:a,calculateRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e},destroy:function(){this.pendingRemove||(this.emit(r.DESTROY,this),this.pendingRemove=!0,this.manager=null,this.key="",this.removeAllListeners(),this.isPlaying=!1,this.isPaused=!1,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});t.exports=h},function(t,e,i){var n=i(193),s=i(0),r=i(2),o=i(134),a=new s({initialize:function(t){this.parent=t,this.list=[],this.position=0,this.addCallback=r,this.removeCallback=r,this._sortKey=""},add:function(t,e){return e?n.Add(this.list,t):n.Add(this.list,t,0,this.addCallback,this)},addAt:function(t,e,i){return i?n.AddAt(this.list,t,e):n.AddAt(this.list,t,e,0,this.addCallback,this)},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(t,e){return t?(void 0===e&&(e=function(e,i){return e[t]-i[t]}),o.inplace(this.list,e),this):this},getByName:function(t){return n.GetFirst(this.list,"name",t)},getRandom:function(t,e){return n.GetRandom(this.list,t,e)},getFirst:function(t,e,i,s){return n.GetFirst(this.list,t,e,i,s)},getAll:function(t,e,i,s){return n.GetAll(this.list,t,e,i,s)},count:function(t,e){return n.CountAllMatching(this.list,t,e)},swap:function(t,e){n.Swap(this.list,t,e)},moveTo:function(t,e){return n.MoveTo(this.list,t,e)},remove:function(t,e){return e?n.Remove(this.list,t):n.Remove(this.list,t,this.removeCallback,this)},removeAt:function(t,e){return e?n.RemoveAt(this.list,t):n.RemoveAt(this.list,t,this.removeCallback,this)},removeBetween:function(t,e,i){return i?n.RemoveBetween(this.list,t,e):n.RemoveBetween(this.list,t,e,this.removeCallback,this)},removeAll:function(t){for(var e=this.list.length;e--;)this.remove(this.list[e],t);return this},bringToTop:function(t){return n.BringToTop(this.list,t)},sendToBack:function(t){return n.SendToBack(this.list,t)},moveUp:function(t){return n.MoveUp(this.list,t),t},moveDown:function(t){return n.MoveDown(this.list,t),t},reverse:function(){return this.list.reverse(),this},shuffle:function(){return n.Shuffle(this.list),this},replace:function(t,e){return n.Replace(this.list,t,e)},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e,i,s){return n.SetAll(this.list,t,e,i,s),this},each:function(t,e){for(var i=[null],n=2;n0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});t.exports=a},function(t,e,i){var n=i(194),s=i(394);t.exports=function(t,e){if(void 0===e&&(e=90),!n(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=s(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=s(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;il&&(r=l),o>l&&(o=l),a=s,h=r;;)if(a0&&o.length0&&a.lengthe.right||t.y>e.bottom)}},function(t,e,i){var n=i(5),s={},r={register:function(t,e,i,n,r){s[t]={plugin:e,mapping:i,settingsKey:n,configKey:r}},getPlugin:function(t){return s[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,r=e.game.config;for(var o in s){var a=s[o].plugin,h=s[o].mapping,l=s[o].settingsKey,u=s[o].configKey;n(i,l,r[u])&&(t[h]=new a(t))}},remove:function(t){s.hasOwnProperty(t)&&delete s[t]}};t.exports=r},function(t,e,i){t.exports={ANY_KEY_DOWN:i(1228),ANY_KEY_UP:i(1229),COMBO_MATCH:i(1230),DOWN:i(1231),KEY_DOWN:i(1232),KEY_UP:i(1233),UP:i(1234)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e){t.exports=function(t,e,i,n,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),{responseType:t,async:e,user:i,password:n,timeout:s,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0}}},function(t,e,i){var n=i(0),s=i(226),r=i(65),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.body=null}});t.exports=o},function(t,e,i){t.exports={Bounce:i(1329),Collision:i(1330),Force:i(1331),Friction:i(1332),Gravity:i(1333),Mass:i(1334),Static:i(1335),Sensor:i(1336),SetBody:i(1337),Sleep:i(1338),Transform:i(1351),Velocity:i(1352)}},function(t,e){var i={};t.exports=i,i.create=function(t,e){var n=t.bodyA,s=t.bodyB,r={id:i.id(n,s),bodyA:n,bodyB:s,activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:n.isSensor||s.isSensor,timeCreated:e,timeUpdated:e,collision:null,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return i.update(r,t,e),r},i.update=function(t,e,n){if(t.collision=e,e.collided){var s=e.supports,r=t.activeContacts,o=e.parentA,a=e.parentB;t.inverseMass=o.inverseMass+a.inverseMass,t.friction=Math.min(o.friction,a.friction),t.frictionStatic=Math.max(o.frictionStatic,a.frictionStatic),t.restitution=Math.max(o.restitution,a.restitution),t.slop=Math.max(o.slop,a.slop);for(var h=0;h=this.firstgid&&t1?2-s:s,o=r*Math.cos(i),a=r*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},function(t,e,i){var n=i(24),s=i(0),r=i(9),o=i(117),a=i(270),h=i(271),l=i(5),u=new s({Extends:r,initialize:function(t,e,i){r.call(this),this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,l(i,"frames",[]),l(i,"defaultTextureKey",null)),this.frameRate=l(i,"frameRate",null),this.duration=l(i,"duration",null),null===this.duration&&null===this.frameRate?(this.frameRate=24,this.duration=this.frameRate/this.frames.length*1e3):this.duration&&null===this.frameRate?this.frameRate=this.frames.length/(this.duration/1e3):this.duration=this.frames.length/this.frameRate*1e3,this.msPerFrame=1e3/this.frameRate,this.skipMissedFrames=l(i,"skipMissedFrames",!0),this.delay=l(i,"delay",0),this.repeat=l(i,"repeat",0),this.repeatDelay=l(i,"repeatDelay",0),this.yoyo=l(i,"yoyo",!1),this.showOnStart=l(i,"showOnStart",!1),this.hideOnComplete=l(i,"hideOnComplete",!1),this.paused=!1,this.manager.on(o.PAUSE_ALL,this.pause,this),this.manager.on(o.RESUME_ALL,this.resume,this)},addFrame:function(t){return this.addFrameAt(this.frames.length,t)},addFrameAt:function(t,e){var i=this.getFrames(this.manager.textureManager,e);if(i.length>0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var n=this.frames.slice(0,t),s=this.frames.slice(t);this.frames=n.concat(i,s)}this.updateFrameSequence()}return this},checkFrame:function(t){return t>=0&&t0){s.isLast=!0,s.nextFrame=a[0],a[0].prevFrame=s;var v=1/(a.length-1);for(r=0;r=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo);var i=this.frames[e];0!==e||t.forward||(i=this.getLastFrame()),t.updateFrame(i)},getFrameByProgress:function(t){return t=n(t,0,1),a(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t._yoyo?this.handleYoyoFrame(t,!1):t.repeatCounter>0?t._reverse&&t.forward?t.forward=!1:this.repeatAnimation(t):this.completeAnimation(t):this.updateAndGetNextTick(t,e.nextFrame)},handleYoyoFrame:function(t,e){if(e||(e=!1),t._reverse===!e&&t.repeatCounter>0)return t.forward=e,void this.repeatAnimation(t);if(t._reverse===e||0!==t.repeatCounter){t.forward=e;var i=e?t.currentFrame.nextFrame:t.currentFrame.prevFrame;this.updateAndGetNextTick(t,i)}else this.completeAnimation(t)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t._yoyo?this.handleYoyoFrame(t,!0):t.repeatCounter>0?t._reverse&&!t.forward?(t.currentFrame=this.getLastFrame(),this.repeatAnimation(t)):(t.forward=!0,this.repeatAnimation(t)):this.completeAnimation(t):this.updateAndGetNextTick(t,e.prevFrame)},updateAndGetNextTick:function(t,e){t.updateFrame(e),this.getNextTick(t)},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){if(2===t._pendingStop)return this.completeAnimation(t);if(t._repeatDelay>0&&!1===t.pendingRepeat)t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t._repeatDelay;else if(t.repeatCounter--,t.updateFrame(t.currentFrame[t.forward?"nextFrame":"prevFrame"]),t.isPlaying){this.getNextTick(t),t.pendingRepeat=!1;var e=t.currentFrame,i=t.parent;this.emit(o.ANIMATION_REPEAT,this,e),i.emit(o.SPRITE_ANIMATION_KEY_REPEAT+this.key,this,e,t.repeatCounter,i),i.emit(o.SPRITE_ANIMATION_REPEAT,this,e,t.repeatCounter,i)}},setFrame:function(t){t.forward?this.nextFrame(t):this.previousFrame(t)},toJSON:function(){var t={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(e){t.frames.push(e.toJSON())}),t},updateFrameSequence:function(){for(var t,e=this.frames.length,i=1/(e-1),n=0;n1?(t.isLast=!0,t.prevFrame=this.frames[e-2],t.nextFrame=this.frames[0]):e>1&&(t.prevFrame=this.frames[n-1],t.nextFrame=this.frames[n+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.removeAllListeners(),this.manager.off(o.PAUSE_ALL,this.pause,this),this.manager.off(o.RESUME_ALL,this.resume,this),this.manager.remove(this.key);for(var t=0;t=1)return i.x=t.x,i.y=t.y,i;var r=n(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},function(t,e,i){var n=i(61),s=i(4);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=n(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,l=t.y2,u=0;u=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(s*a+o*h),e}},function(t,e){t.exports=function(t,e,i,n,s){var r=n+Math.atan2(t.y-i,t.x-e);return t.x=e+s*Math.cos(r),t.y=i+s*Math.sin(r),t}},function(t,e){t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},function(t,e){t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},function(t,e,i){var n=new(i(0))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(s-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(294),s=i(297),r=i(299),o=i(300);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?o(t):n(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var n=i(171);t.exports=function(t,e,i,s){void 0===e&&(e=1),void 0===i&&(i=1);var r=Math.floor(6*t),o=6*t-r,a=Math.floor(i*(1-e)*255),h=Math.floor(i*(1-o*e)*255),l=Math.floor(i*(1-(1-o)*e)*255),u=i=Math.floor(i*=255),c=i,d=i,f=r%6;return 0===f?(c=l,d=a):1===f?(u=h,d=a):2===f?(u=a,d=l):3===f?(u=a,c=h):4===f?(u=l,c=a):5===f&&(c=a,d=h),s?s.setTo?s.setTo(u,c,d,s.alpha,!1):(s.r=u,s.g=c,s.b=d,s.color=n(u,c,d),s):{r:u,g:c,b:d,color:n(u,c,d)}}},function(t,e){var i,n="";t.exports={disable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!1),t},enable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!0),t},getPrefix:i=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z;return this.x=i*o-n*r,this.y=n*s-e*o,this.z=e*r-i*s,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=e*s[0]+i*s[3]+n*s[6],this.y=e*s[1]+i*s[4]+n*s[7],this.z=e*s[2]+i*s[5]+n*s[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12],this.y=s[1]*e+s[5]*i+s[9]*n+s[13],this.z=s[2]*e+s[6]*i+s[10]*n+s[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=e*s[0]+i*s[4]+n*s[8]+s[12],o=e*s[1]+i*s[5]+n*s[9]+s[13],a=e*s[2]+i*s[6]+n*s[10]+s[14],h=e*s[3]+i*s[7]+n*s[11]+s[15];return this.x=r/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},project:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=s[0],o=s[1],a=s[2],h=s[3],l=s[4],u=s[5],c=s[6],d=s[7],f=s[8],p=s[9],g=s[10],v=s[11],m=s[12],y=s[13],x=s[14],T=1/(e*h+i*d+n*v+s[15]);return this.x=(e*r+i*l+n*f+m)*T,this.y=(e*o+i*u+n*p+y)*T,this.z=(e*a+i*c+n*g+x)*T,this},unproject:function(t,e){var i=t.x,n=t.y,s=t.z,r=t.w,o=this.x-i,a=r-this.y-1-n,h=this.z;return this.x=2*o/s-1,this.y=2*a/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});n.ZERO=new n,n.RIGHT=new n(1,0,0),n.LEFT=new n(-1,0,0),n.UP=new n(0,-1,0),n.DOWN=new n(0,1,0),n.FORWARD=new n(0,0,1),n.BACK=new n(0,0,-1),n.ONE=new n(1,1,1),t.exports=n},function(t,e,i){var n={Global:["game","anims","cache","plugins","registry","scale","sound","textures"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]};n.Global.push("facebook"),t.exports=n},function(t,e,i){var n=i(0),s=i(10),r=new n({initialize:function(t){this.name="WebGLPipeline",this.game=t.game,this.view=t.game.canvas,this.resolution=1,this.width=0,this.height=0,this.gl=t.gl,this.vertexCount=0,this.vertexCapacity=t.vertexCapacity,this.renderer=t.renderer,this.vertexData=t.vertices?t.vertices:new ArrayBuffer(t.vertexCapacity*t.vertexSize),this.vertexBuffer=this.renderer.createVertexBuffer(t.vertices?t.vertices:this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=this.renderer.createProgram(t.vertShader,t.fragShader),this.attributes=t.attributes,this.vertexSize=t.vertexSize,this.topology=t.topology,this.bytes=new Uint8Array(this.vertexData),this.vertexComponentCount=s.getComponentCount(t.attributes,this.gl),this.flushLocked=!1,this.active=!1},boot:function(){},addAttribute:function(t,e,i,n,r){return this.attributes.push({name:t,size:e,type:this.renderer.glFormats[i],normalized:n,offset:r}),this.vertexComponentCount=s.getComponentCount(this.attributes,this.gl),this},shouldFlush:function(){return this.vertexCount>=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this.resolution=i,this},bind:function(){var t=this.gl,e=this.vertexBuffer,i=this.attributes,n=this.program,s=this.renderer,r=this.vertexSize;s.setProgram(n),s.setVertexBuffer(e);for(var o=0;o=0?(t.enableVertexAttribArray(h),t.vertexAttribPointer(h,a.size,a.type,a.normalized,r,a.offset)):-1!==h&&t.disableVertexAttribArray(h)}return this},onBind:function(){return this},onPreRender:function(){return this},onRender:function(){return this},onPostRender:function(){return this},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.vertexCount,i=this.topology,n=this.vertexSize;if(0!==e)return t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,e*n)),t.drawArrays(i,0,e),this.vertexCount=0,this.flushLocked=!1,this;this.flushLocked=!1},destroy:function(){var t=this.gl;return t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),delete this.program,delete this.vertexBuffer,delete this.gl,this},setFloat1:function(t,e){return this.renderer.setFloat1(this.program,t,e),this},setFloat2:function(t,e,i){return this.renderer.setFloat2(this.program,t,e,i),this},setFloat3:function(t,e,i,n){return this.renderer.setFloat3(this.program,t,e,i,n),this},setFloat4:function(t,e,i,n,s){return this.renderer.setFloat4(this.program,t,e,i,n,s),this},setFloat1v:function(t,e){return this.renderer.setFloat1v(this.program,t,e),this},setFloat2v:function(t,e){return this.renderer.setFloat2v(this.program,t,e),this},setFloat3v:function(t,e){return this.renderer.setFloat3v(this.program,t,e),this},setFloat4v:function(t,e){return this.renderer.setFloat4v(this.program,t,e),this},setInt1:function(t,e){return this.renderer.setInt1(this.program,t,e),this},setInt2:function(t,e,i){return this.renderer.setInt2(this.program,t,e,i),this},setInt3:function(t,e,i,n){return this.renderer.setInt3(this.program,t,e,i,n),this},setInt4:function(t,e,i,n,s){return this.renderer.setInt4(this.program,t,e,i,n,s),this},setMatrix2:function(t,e,i){return this.renderer.setMatrix2(this.program,t,e,i),this},setMatrix3:function(t,e,i){return this.renderer.setMatrix3(this.program,t,e,i),this},setMatrix4:function(t,e,i){return this.renderer.setMatrix4(this.program,t,e,i),this}});t.exports=r},function(t,e,i){var n=i(0),s=i(71),r=i(1),o=i(346),a=i(787),h=i(788),l=i(35),u=i(10),c=i(184),d=new n({Extends:c,Mixins:[o],initialize:function(t){var e=t.renderer.config;c.call(this,{game:t.game,renderer:t.renderer,gl:t.renderer.gl,topology:r(t,"topology",t.renderer.gl.TRIANGLES),vertShader:r(t,"vertShader",h),fragShader:r(t,"fragShader",a),vertexCapacity:r(t,"vertexCapacity",6*e.batchSize),vertexSize:r(t,"vertexSize",5*Float32Array.BYTES_PER_ELEMENT+4*Uint8Array.BYTES_PER_ELEMENT),attributes:[{name:"inPosition",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:0},{name:"inTexCoord",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:2*Float32Array.BYTES_PER_ELEMENT},{name:"inTintEffect",size:1,type:t.renderer.gl.FLOAT,normalized:!1,offset:4*Float32Array.BYTES_PER_ELEMENT},{name:"inTint",size:4,type:t.renderer.gl.UNSIGNED_BYTE,normalized:!0,offset:5*Float32Array.BYTES_PER_ELEMENT}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.vertexViewU32=new Uint32Array(this.vertexData),this.maxQuads=e.batchSize,this.batches=[],this._tempMatrix1=new l,this._tempMatrix2=new l,this._tempMatrix3=new l,this._tempMatrix4=new l,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.tintEffect=2,this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[],this.mvpInit()},onBind:function(){return c.prototype.onBind.call(this),this.mvpUpdate(),this},resize:function(t,e,i){return c.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},setTexture2D:function(t,e){return void 0===t&&(t=this.renderer.blankTexture.glTexture),void 0===e&&(e=0),this.requireTextureBatch(t,e)&&this.pushBatch(t,e),this},requireTextureBatch:function(t,e){var i=this.batches,n=i.length;return!(n>0)||!((e>0?i[n-1].textures[e-1]:i[n-1].texture)===t)},pushBatch:function(t,e){if(0===e)this.batches.push({first:this.vertexCount,texture:t,textures:[]});else{var i=[];i[e-1]=t,this.batches.push({first:this.vertexCount,texture:null,textures:i})}},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t,e,i,n=this.gl,s=this.vertexCount,r=this.topology,o=this.vertexSize,a=this.renderer,h=this.batches,l=h.length,u=0,c=null;if(0===l||0===s)return this.flushLocked=!1,this;n.bufferSubData(n.ARRAY_BUFFER,0,this.bytes.subarray(0,s*o));for(var d=0;d0){for(e=0;e0){for(e=0;e0&&(a.setTexture2D(c.texture,0,!1),n.drawArrays(r,c.first,u)),this.vertexCount=0,h.length=0,this.flushLocked=!1,this},batchSprite:function(t,e,i){this.renderer.setPipeline(this);var n=this._tempMatrix1,s=this._tempMatrix2,r=this._tempMatrix3,o=t.frame,a=o.glTexture,h=o.u0,l=o.v0,c=o.u1,d=o.v1,f=o.x,p=o.y,g=o.cutWidth,v=o.cutHeight,m=o.customPivot,y=t.displayOriginX,x=t.displayOriginY,T=-y+f,w=-x+p;if(t.isCropped){var b=t._crop;b.flipX===t.flipX&&b.flipY===t.flipY||o.updateCropUVs(b,t.flipX,t.flipY),h=b.u0,l=b.v0,c=b.u1,d=b.v1,g=b.width,v=b.height,T=-y+(f=b.x),w=-x+(p=b.y)}var S=1,E=1;t.flipX&&(m||(T+=-o.realWidth+2*y),S=-1),(t.flipY||o.source.isGLTexture&&!a.flipY)&&(m||(w+=-o.realHeight+2*x),E=-1),s.applyITRS(t.x,t.y,t.rotation,t.scaleX*S,t.scaleY*E),n.copyFrom(e.matrix),i?(n.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),s.e=t.x,s.f=t.y,n.multiply(s,r)):(s.e-=e.scrollX*t.scrollFactorX,s.f-=e.scrollY*t.scrollFactorY,n.multiply(s,r));var A=T+g,_=w+v,C=r.getX(T,w),M=r.getY(T,w),P=r.getX(T,_),O=r.getY(T,_),R=r.getX(A,_),L=r.getY(A,_),D=r.getX(A,w),k=r.getY(A,w),F=u.getTintAppendFloatAlpha(t._tintTL,e.alpha*t._alphaTL),I=u.getTintAppendFloatAlpha(t._tintTR,e.alpha*t._alphaTR),B=u.getTintAppendFloatAlpha(t._tintBL,e.alpha*t._alphaBL),N=u.getTintAppendFloatAlpha(t._tintBR,e.alpha*t._alphaBR);e.roundPixels&&(C=Math.round(C),M=Math.round(M),P=Math.round(P),O=Math.round(O),R=Math.round(R),L=Math.round(L),D=Math.round(D),k=Math.round(k)),this.setTexture2D(a,0);var Y=t._isTinted&&t.tintFill;this.batchQuad(C,M,P,O,R,L,D,k,h,l,c,d,F,I,B,N,Y,a,0)},batchQuad:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,m,y){var x=!1;this.vertexCount+6>this.vertexCapacity&&(this.flush(),x=!0,this.setTexture2D(m,y));var T=this.vertexViewF32,w=this.vertexViewU32,b=this.vertexCount*this.vertexComponentCount-1;return T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=v,w[++b]=d,T[++b]=i,T[++b]=n,T[++b]=h,T[++b]=c,T[++b]=v,w[++b]=p,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=v,w[++b]=g,T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=v,w[++b]=d,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=v,w[++b]=g,T[++b]=o,T[++b]=a,T[++b]=u,T[++b]=l,T[++b]=v,w[++b]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g){var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),this.setTexture2D(p,g),v=!0);var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=f,y[++x]=u,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=l,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=l,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},batchTexture:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,m,y,x,T,w,b,S,E,A,_,C,M,P,O){this.renderer.setPipeline(this,t);var R=this._tempMatrix1,L=this._tempMatrix2,D=this._tempMatrix3,k=m/i+_,F=y/n+C,I=(m+x)/i+_,B=(y+T)/n+C,N=o,Y=a,X=-g,z=-v;if(t.isCropped){var U=t._crop;N=U.width,Y=U.height,o=U.width,a=U.height;var G=m=U.x,W=y=U.y;c&&(G=x-U.x-U.width),d&&!e.isRenderTexture&&(W=T-U.y-U.height),k=G/i+_,F=W/n+C,I=(G+U.width)/i+_,B=(W+U.height)/n+C,X=-g+m,z=-v+y}d^=!O&&e.isRenderTexture?1:0,c&&(N*=-1,X+=o),d&&(Y*=-1,z+=a);var V=X+N,H=z+Y;L.applyITRS(s,r,u,h,l),R.copyFrom(M.matrix),P?(R.multiplyWithOffset(P,-M.scrollX*f,-M.scrollY*p),L.e=s,L.f=r,R.multiply(L,D)):(L.e-=M.scrollX*f,L.f-=M.scrollY*p,R.multiply(L,D));var j=D.getX(X,z),q=D.getY(X,z),K=D.getX(X,H),J=D.getY(X,H),Z=D.getX(V,H),Q=D.getY(V,H),$=D.getX(V,z),tt=D.getY(V,z);M.roundPixels&&(j=Math.round(j),q=Math.round(q),K=Math.round(K),J=Math.round(J),Z=Math.round(Z),Q=Math.round(Q),$=Math.round($),tt=Math.round(tt)),this.setTexture2D(e,0),this.batchQuad(j,q,K,J,Z,Q,$,tt,k,F,I,B,w,b,S,E,A,e,0)},batchTextureFrame:function(t,e,i,n,s,r,o){this.renderer.setPipeline(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2,l=e+t.width,c=i+t.height;o?a.multiply(o,h):h=a;var d=h.getX(e,i),f=h.getY(e,i),p=h.getX(e,c),g=h.getY(e,c),v=h.getX(l,c),m=h.getY(l,c),y=h.getX(l,i),x=h.getY(l,i);this.setTexture2D(t.glTexture,0),n=u.getTintAppendFloatAlpha(n,s),this.batchQuad(d,f,p,g,v,m,y,x,t.u0,t.v0,t.u1,t.v1,n,n,n,n,0,t.glTexture,0)},drawFillRect:function(t,e,i,n,s,r){var o=t+i,a=e+n;this.setTexture2D();var h=u.getTintAppendFloatAlphaAndSwap(s,r);this.batchQuad(t,e,t,a,o,a,o,e,0,0,1,1,h,h,h,h,2)},batchFillRect:function(t,e,i,n,s,r){this.renderer.setPipeline(this);var o=this._tempMatrix3;r&&r.multiply(s,o);var a=t+i,h=e+n,l=o.getX(t,e),u=o.getY(t,e),c=o.getX(t,h),d=o.getY(t,h),f=o.getX(a,h),p=o.getY(a,h),g=o.getX(a,e),v=o.getY(a,e),m=this.currentFrame,y=m.u0,x=m.v0,T=m.u1,w=m.v1;this.batchQuad(l,u,c,d,f,p,g,v,y,x,T,w,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.fillTint.BR,this.tintEffect)},batchFillTriangle:function(t,e,i,n,s,r,o,a){this.renderer.setPipeline(this);var h=this._tempMatrix3;a&&a.multiply(o,h);var l=h.getX(t,e),u=h.getY(t,e),c=h.getX(i,n),d=h.getY(i,n),f=h.getX(s,r),p=h.getY(s,r),g=this.currentFrame,v=g.u0,m=g.v0,y=g.u1,x=g.v1;this.batchTri(l,u,c,d,f,p,v,m,y,x,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.tintEffect)},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h){var l=this.tempTriangle;l[0].x=t,l[0].y=e,l[0].width=o,l[1].x=i,l[1].y=n,l[1].width=o,l[2].x=s,l[2].y=r,l[2].width=o,l[3].x=t,l[3].y=e,l[3].width=o,this.batchStrokePath(l,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.setPipeline(this);var n=this._tempMatrix3;i&&i.multiply(e,n);for(var r,o,a=t.length,h=this.polygonCache,l=this.fillTint.TL,u=this.fillTint.TR,c=this.fillTint.BL,d=this.tintEffect,f=0;f0&&H[4]?this.batchQuad(D,k,P,O,H[0],H[1],H[2],H[3],U,G,W,V,B,N,Y,X,I):(j[0]=D,j[1]=k,j[2]=P,j[3]=O,j[4]=1),h&&j[4]?this.batchQuad(C,M,R,L,j[0],j[1],j[2],j[3],U,G,W,V,B,N,Y,X,I):(H[0]=C,H[1]=M,H[2]=R,H[3]=L,H[4]=1)}}});t.exports=d},function(t,e,i){var n=i(11),s=i(13);t.exports=function(t,e){if(void 0===e&&(e=new n),0===t.length)return e;for(var i,r,o,a=Number.MAX_VALUE,h=Number.MAX_VALUE,l=s.MIN_SAFE_INTEGER,u=s.MIN_SAFE_INTEGER,c=0;c0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t,e){return t?this.resume(e):this.pause(e)},start:function(t){t&&(this.settings.data=t),this.settings.status=s.START,this.settings.active=!0,this.settings.visible=!0,this.events.emit(o.START,this),this.events.emit(o.READY,this,t)},shutdown:function(t){this.events.off(o.TRANSITION_INIT),this.events.off(o.TRANSITION_START),this.events.off(o.TRANSITION_COMPLETE),this.events.off(o.TRANSITION_OUT),this.settings.status=s.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit(o.SHUTDOWN,this,t)},destroy:function(){this.settings.status=s.DESTROYED,this.settings.active=!1,this.settings.visible=!1,this.events.emit(o.DESTROY,this),this.events.removeAllListeners();for(var t=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],e=0;e0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});t.exports=u},function(t,e,i){var n=i(193),s=i(42),r=i(0),o=i(12),a=i(100),h=i(14),l=i(11),u=i(972),c=i(398),d=i(3),f=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Depth,o.Mask,o.Transform,o.Visible,u],initialize:function(t,e,i,n){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new o.TransformMatrix,this.tempTransformMatrix=new o.TransformMatrix,this._displayList=t.sys.displayList,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.setPosition(e,i),this.clearAlpha(),this.setBlendMode(s.SKIP_CHECK),n&&this.add(n)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.list.length>0)for(var e=this.list,i=new l,n=0;n-1},setAll:function(t,e,i,s){return n.SetAll(this.list,t,e,i,s),this},each:function(t,e){var i,n=[null],s=this.list.slice(),r=s.length;for(i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null}});t.exports=f},function(t,e,i){var n=i(135),s=i(0),r=i(977),o=new s({Extends:n,Mixins:[r],initialize:function(t,e,i,s,r,o,a){n.call(this,t,e,i,s,r,o,a),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this}});t.exports=o},function(t,e,i){var n=i(101),s=i(0),r=i(202),o=i(268),a=i(272),h=i(273),l=i(277),u=i(119),c=i(282),d=i(283),f=i(280),p=i(35),g=i(105),v=i(14),m=i(1),y=i(5),x=i(13),T=i(983),w=new s({Extends:v,Mixins:[o,a,h,l,u,c,d,f,T],initialize:function(t,e){var i=y(e,"x",0),n=y(e,"y",0);v.call(this,t,"Graphics"),this.setPosition(i,n),this.initPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this._tempMatrix1=new p,this._tempMatrix2=new p,this._tempMatrix3=new p,this.setDefaultStyles(e)},setDefaultStyles:function(t){return y(t,"lineStyle",null)&&(this.defaultStrokeWidth=y(t,"lineStyle.width",1),this.defaultStrokeColor=y(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=y(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),y(t,"fillStyle",null)&&(this.defaultFillColor=y(t,"fillStyle.color",16777215),this.defaultFillAlpha=y(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(r.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(r.FILL_STYLE,t,e),this},fillGradientStyle:function(t,e,i,n,s){return void 0===s&&(s=1),this.commandBuffer.push(r.GRADIENT_FILL_STYLE,s,t,e,i,n),this},lineGradientStyle:function(t,e,i,n,s,o){return void 0===o&&(o=1),this.commandBuffer.push(r.GRADIENT_LINE_STYLE,t,o,e,i,n,s),this},setTexture:function(t,e,i){if(void 0===i&&(i=0),void 0===t)this.commandBuffer.push(r.CLEAR_TEXTURE);else{var n=this.scene.sys.textures.getFrame(t,e);n&&(2===i&&(i=3),this.commandBuffer.push(r.SET_TEXTURE,n,i))}return this},beginPath:function(){return this.commandBuffer.push(r.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(r.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(r.FILL_PATH),this},fill:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(r.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,x.PI2),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,x.PI2),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,n){return this.commandBuffer.push(r.FILL_RECT,t,e,i,n),this},strokeRect:function(t,e,i,n){var s=this._lineWidth/2,r=t-s,o=t+s;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+n),this.strokePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+n),this.strokePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(o+i,e),this.strokePath(),this.beginPath(),this.moveTo(r,e+n),this.lineTo(o+i,e+n),this.strokePath(),this},fillRoundedRect:function(t,e,i,n,s){void 0===s&&(s=20);var r=s,o=s,a=s,h=s;return"number"!=typeof s&&(r=m(s,"tl",20),o=m(s,"tr",20),a=m(s,"bl",20),h=m(s,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-x.TAU,0),this.lineTo(t+i,e+n-h),this.arc(t+i-h,e+n-h,h,0,x.TAU),this.lineTo(t+a,e+n),this.arc(t+a,e+n-a,a,x.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-x.TAU),this.fillPath(),this},strokeRoundedRect:function(t,e,i,n,s){void 0===s&&(s=20);var r=s,o=s,a=s,h=s;return"number"!=typeof s&&(r=m(s,"tl",20),o=m(s,"tr",20),a=m(s,"bl",20),h=m(s,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-x.TAU,0),this.lineTo(t+i,e+n-h),this.arc(t+i-h,e+n-h,h,0,x.TAU),this.lineTo(t+a,e+n),this.arc(t+a,e+n-a,a,x.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-x.TAU),this.strokePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,n,s,o),this},strokeTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,n,s,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,n){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,n),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(r.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(r.MOVE_TO,t,e),this},strokePoints:function(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===n&&(n=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var s=1;s-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var n,s,r=this.scene.sys,o=r.game.renderer;if(void 0===e&&(e=r.scale.width),void 0===i&&(i=r.scale.height),w.TargetCamera.setScene(this.scene),w.TargetCamera.setViewport(0,0,e,i),w.TargetCamera.scrollX=this.x,w.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var a=(n=r.textures.get(t)).getSourceImage();a instanceof HTMLCanvasElement&&(s=a.getContext("2d"))}else s=(n=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(s=t.getContext("2d"));return s&&(this.renderCanvas(o,this,0,w.TargetCamera,null,s,!1),n&&n.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});w.TargetCamera=new n,t.exports=w},function(t,e){t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,SET_TEXTURE:19,CLEAR_TEXTURE:20,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},function(t,e,i){var n=i(4);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.width/2,r=t.height/2;return i.x=t.x+s*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},function(t,e,i){var n=i(0),s=i(12),r=i(14),o=i(406),a=i(132),h=i(408),l=i(993),u=new n({Extends:r,Mixins:[s.Depth,s.Mask,s.Pipeline,s.Transform,s.Visible,l],initialize:function(t,e,i,n){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline(),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var s=0;s0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;ss.width&&(t=s.width-this.frame.cutX),this.frame.cutY+e>s.height&&(e=s.height-this.frame.cutY),this.frame.setSize(t,e,this.frame.cutX,this.frame.cutY)}this.updateDisplayOrigin();var r=this.input;return r&&!r.customHitArea&&(r.hitArea.width=t,r.hitArea.height=e),this},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this},saveTexture:function(t){return this.textureManager.renameTexture(this.texture.key,t),this._saved=!0,this.texture},fill:function(t,e,i,n,s,r){void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.frame.cutWidth),void 0===r&&(r=this.frame.cutHeight);var o=255&(t>>16|0),a=255&(t>>8|0),h=255&(0|t),l=this.gl,u=this.frame;if(this.camera.preRender(1,1),l){var c=this.camera._cx,f=this.camera._cy,p=this.camera._cw,g=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(c,f,p,g,g);var v=this.pipeline;v.projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),v.drawFillRect(i,n,s,r,d.getTintFromFloats(o/255,a/255,h/255,1),e),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),v.projOrtho(0,v.width,v.height,0,-1e3,1e3)}else this.renderer.setContext(this.context),this.context.fillStyle="rgba("+o+","+a+","+h+","+e+")",this.context.fillRect(i+u.cutX,n+u.cutY,s,r),this.renderer.setContext();return this.dirty=!0,this},clear:function(){if(this.dirty){var t=this.gl;if(t){var e=this.renderer;e.setFramebuffer(this.framebuffer,!0),this.frame.cutWidth===this.canvas.width&&this.frame.cutHeight===this.canvas.height||t.scissor(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),e.setFramebuffer(null,!0)}else{var i=this.context;i.save(),i.setTransform(1,0,0,1,0,0),i.clearRect(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),i.restore()}this.dirty=!1}return this},erase:function(t,e,i){this._eraseMode=!0;var s=this.renderer.currentBlendMode;return this.renderer.setBlendMode(n.ERASE),this.draw(t,e,i,1,16777215),this.renderer.setBlendMode(s),this._eraseMode=!1,this},draw:function(t,e,i,n,s){void 0===n&&(n=this.globalAlpha),s=void 0===s?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(s>>16)+(65280&s)+((255&s)<<16),Array.isArray(t)||(t=[t]);var r=this.gl;if(this.camera.preRender(1,1),r){var o=this.camera._cx,a=this.camera._cy,h=this.camera._cw,l=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(o,a,h,l,l);var u=this.pipeline;u.projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),this.batchList(t,e,i,n,s),u.flush(),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),u.projOrtho(0,u.width,u.height,0,-1e3,1e3)}else this.renderer.setContext(this.context),this.batchList(t,e,i,n,s),this.renderer.setContext();return this.dirty=!0,this},drawFrame:function(t,e,i,n,s,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.globalAlpha),r=void 0===r?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(r>>16)+(65280&r)+((255&r)<<16);var o=this.gl,a=this.textureManager.getFrame(t,e);if(a){if(this.camera.preRender(1,1),o){var h=this.camera._cx,l=this.camera._cy,u=this.camera._cw,c=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(h,l,u,c,c);var d=this.pipeline;d.projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),d.batchTextureFrame(a,i+this.frame.cutX,n+this.frame.cutY,r,s,this.camera.matrix,null),d.flush(),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),d.projOrtho(0,d.width,d.height,0,-1e3,1e3)}else this.batchTextureFrame(a,i+this.frame.cutX,n+this.frame.cutY,s,r);this.dirty=!0}return this},batchList:function(t,e,i,n,s){for(var r=0;rl){if(0===c){for(var g=f;g.length&&(g=g.slice(0,-1),!((p=e.measureText(g).width)<=l)););if(!g.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var v=d.substr(g.length);u[c]=v,h+=g}var m=u[c].length?c:c+1,y=u.slice(m).join(" ").replace(/[ \n]*$/gi,"");s[o+1]=y+" "+(s[o+1]||""),r=s.length;break}h+=f,l-=p}n+=h.replace(/[ \n]*$/gi,"")+"\n"}}return n=n.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var n="",s=t.split(this.splitRegExp),r=0;ro?(h>0&&(n+="\n"),n+=a[h]+" ",o=i-l):(o-=l,n+=a[h],h0&&(d+=h.lineSpacing*g),i.rtl)c=f-c;else if("right"===i.align)c+=o-h.lineWidths[g];else if("center"===i.align)c+=(o-h.lineWidths[g])/2;else if("justify"===i.align){if(h.lineWidths[g]/h.width>=.85){var v=h.width-h.lineWidths[g],m=e.measureText(" ").width,y=a[g].trim(),x=y.split(" ");v+=(a[g].length-y.length)*m;for(var T=Math.floor(v/m),w=0;T>0;)x[w]+=" ",w=(w+1)%(x.length-1||1),--T;a[g]=x.join(" ")}}this.autoRound&&(c=Math.round(c),d=Math.round(d)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(a[g],c,d)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(a[g],c,d))}e.restore(),this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(t,this.frame.source.glTexture,!0),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0;var b=this.input;return b&&!b.customHitArea&&(b.hitArea.width=this.width,b.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(t){this.setText(t)}},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this._text,style:this.style.toJSON(),padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&c(this.canvas),s.remove(this.canvas),this.texture.destroy()}});t.exports=p},function(t,e,i){var n=i(28),s=i(0),r=i(12),o=i(19),a=i(14),h=i(327),l=i(173),u=i(1009),c=i(3),d=new s({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Tint,r.Transform,r.Visible,u],initialize:function(t,e,i,s,r,l,u){var d=t.sys.game.renderer;a.call(this,t,"TileSprite");var f=t.sys.textures.get(l),p=f.get(u);s&&r?(s=Math.floor(s),r=Math.floor(r)):(s=p.width,r=p.height),this._tilePosition=new c,this._tileScale=new c(1,1),this.dirty=!1,this.renderer=d,this.canvas=n.create(this,s,r),this.context=this.canvas.getContext("2d"),this.displayTexture=f,this.displayFrame=p,this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.potWidth=h(p.width),this.potHeight=h(p.height),this.fillCanvas=n.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d"),this.fillPattern=null,this.setPosition(e,i),this.setSize(s,r),this.setFrame(u),this.setOriginFromFrame(),this.initPipeline(),t.sys.game.events.on(o.CONTEXT_RESTORED,function(t){var e=t.gl;this.dirty=!0,this.fillPattern=null,this.fillPattern=t.createTexture2D(0,e.LINEAR,e.LINEAR,e.REPEAT,e.REPEAT,e.RGBA,this.fillCanvas,this.potWidth,this.potHeight)},this)},setTexture:function(t,e){return this.displayTexture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){var e=this.displayTexture.get(t);return this.potWidth=h(e.width),this.potHeight=h(e.height),this.canvas.width=0,e.cutWidth&&e.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.displayFrame=e,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(t,e){return void 0!==t&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},setTileScale:function(t,e){return void 0===t&&(t=this.tileScaleX),void 0===e&&(e=t),this.tileScaleX=t,this.tileScaleY=e,this},updateTileTexture:function(){if(this.dirty&&this.renderer){var t=this.displayFrame;if(t.source.isRenderTexture||t.source.isGLTexture)return console.warn("TileSprites can only use Image or Canvas based textures"),void(this.dirty=!1);var e=this.fillContext,i=this.fillCanvas,n=this.potWidth,s=this.potHeight;this.renderer.gl||(n=t.cutWidth,s=t.cutHeight),e.clearRect(0,0,n,s),i.width=n,i.height=s,e.drawImage(t.source.image,t.cutX,t.cutY,t.cutWidth,t.cutHeight,0,0,n,s),this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(i,this.fillPattern):this.fillPattern=e.createPattern(i,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var t=this.canvas;if(t.width===this.width&&t.height===this.height||(t.width=this.width,t.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl)this.dirty=!1;else{var e=this.context;this.scene.sys.game.config.antialias||l.disable(e);var i=this._tileScale.x,n=this._tileScale.y,s=this._tilePosition.x,r=this._tilePosition.y;e.clearRect(0,0,this.width,this.height),e.save(),e.scale(i,n),e.translate(-s,-r),e.fillStyle=this.fillPattern,e.fillRect(s,r,this.width/i,this.height/n),e.restore(),this.dirty=!1}},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),n.remove(this.canvas),n.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null,this.texture.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(t){this._tilePosition.x=t,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(t){this._tilePosition.y=t,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(t){this._tileScale.x=t,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(t){this._tileScale.y=t,this.dirty=!0}}});t.exports=d},function(t,e,i){var n=i(0),s=i(24),r=i(12),o=i(100),a=i(19),h=i(14),l=i(64),u=i(206),c=i(1012),d=i(13),f=new n({Extends:h,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,c],initialize:function(t,e,i,n){h.call(this,t,"Video"),this.video=null,this.videoTexture=null,this.videoTextureSource=null,this.snapshotTexture=null,this.flipY=!1,this._key=u(),this.touchLocked=!0,this.playWhenUnlocked=!1,this.retryLimit=20,this.retry=0,this.retryInterval=500,this._retryID=null,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={play:this.playHandler.bind(this),error:this.loadErrorHandler.bind(this),end:this.completeHandler.bind(this),time:this.timeUpdateHandler.bind(this),seeking:this.seekingHandler.bind(this),seeked:this.seekedHandler.bind(this)},this._crop=this.resetCropObject(),this.markers={},this._markerIn=-1,this._markerOut=d.MAX_SAFE_INTEGER,this._lastUpdate=0,this._cacheKey="",this._isSeeking=!1,this.removeVideoElementOnDestroy=!1,this.setPosition(e,i),this.initPipeline(),n&&this.changeSource(n,!1);var s=t.sys.game.events;s.on(a.PAUSE,this.globalPause,this),s.on(a.RESUME,this.globalResume,this);var r=t.sys.sound;r&&r.on(l.GLOBAL_MUTE,this.globalMute,this)},play:function(t,e,i){if(this.touchLocked&&this.playWhenUnlocked||this.isPlaying())return this;var n=this.video;if(!n)return console.warn("Video not loaded"),this;void 0===t&&(t=n.loop);var s=this.scene.sys.sound;s&&s.mute&&this.setMute(!0),isNaN(e)||(this._markerIn=e),!isNaN(i)&&i>e&&(this._markerOut=i),n.loop=t;var r=this._callbacks,o=n.play();return void 0!==o?o.then(this.playPromiseSuccessHandler.bind(this)).catch(this.playPromiseErrorHandler.bind(this)):(n.addEventListener("playing",r.play,!0),n.readyState<2&&(this.retry=this.retryLimit,this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval))),n.addEventListener("ended",r.end,!0),n.addEventListener("timeupdate",r.time,!0),n.addEventListener("seeking",r.seeking,!0),n.addEventListener("seeked",r.seeked,!0),this},changeSource:function(t,e,i,n,s){void 0===e&&(e=!0),this.video&&this.stop();var r=this.scene.sys.cache.video.get(t);return r?(this.video=r,this._cacheKey=t,this._codePaused=r.paused,this._codeMuted=r.muted,this.videoTexture?(this.scene.sys.textures.remove(this._key),this.videoTexture=this.scene.sys.textures.create(this._key,r,r.videoWidth,r.videoHeight),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,r.videoWidth,r.videoHeight),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,r.videoWidth,r.videoHeight)):this.updateTexture(),r.currentTime=0,this._lastUpdate=0,e&&this.play(i,n,s)):this.video=null,this},addMarker:function(t,e,i){return!isNaN(e)&&e>=0&&!isNaN(i)&&(this.markers[t]=[e,i]),this},playMarker:function(t,e){var i=this.markers[t];return i&&this.play(e,i[0],i[1]),this},removeMarker:function(t){return delete this.markers[t],this},snapshot:function(t,e){return void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.snapshotArea(0,0,this.width,this.height,t,e)},snapshotArea:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=this.height),void 0===s&&(s=i),void 0===r&&(r=n);var o=this.video,a=this.snapshotTexture;return a?(a.setSize(s,r),o&&a.context.drawImage(o,t,e,i,n,0,0,s,r)):(a=this.scene.sys.textures.createCanvas(u(),s,r),this.snapshotTexture=a,o&&a.context.drawImage(o,t,e,i,n,0,0,s,r)),a.update()},saveSnapshotTexture:function(t){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,t):this.snapshotTexture=this.scene.sys.textures.createCanvas(t,this.width,this.height),this.snapshotTexture},loadURL:function(t,e,i){void 0===e&&(e="loadeddata"),void 0===i&&(i=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var n=document.createElement("video");return n.controls=!1,i&&(n.muted=!0,n.defaultMuted=!0,n.setAttribute("autoplay","autoplay")),n.setAttribute("playsinline","playsinline"),n.setAttribute("preload","auto"),n.addEventListener("error",this._callbacks.error,!0),n.src=t,n.load(),this.video=n,this},playPromiseSuccessHandler:function(){this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn)},playPromiseErrorHandler:function(t){this.scene.sys.input.once("pointerdown",this.unlockHandler,this),this.touchLocked=!0,this.playWhenUnlocked=!0,this.emit(o.VIDEO_ERROR,this,t)},playHandler:function(){this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this.video.removeEventListener("playing",this._callbacks.play,!0)},loadErrorHandler:function(t){this.stop(),this.emit(o.VIDEO_ERROR,this,t)},unlockHandler:function(){this.touchLocked=!1,this.playWhenUnlocked=!1,this.emit(o.VIDEO_UNLOCKED,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn),this.video.play(),this.emit(o.VIDEO_PLAY,this)},completeHandler:function(){this.emit(o.VIDEO_COMPLETE,this)},timeUpdateHandler:function(){this.video&&this.video.currentTime=this._markerOut&&(t.loop?(t.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=e,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),this.stop())))}},checkVideoProgress:function(){this.video.readyState>=2?this.updateTexture():(this.retry--,this.retry>0?this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval):this.emit(o.VIDEO_TIMEOUT,this))},updateTexture:function(){var t=this.video,e=t.videoWidth,i=t.videoHeight;if(this.videoTexture){var n=this.videoTextureSource;n.source!==t&&(n.source=t,n.width=e,n.height=i),n.update()}else this.videoTexture=this.scene.sys.textures.create(this._key,t,e,i),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,e,i),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,e,i)},getVideoKey:function(){return this._cacheKey},seekTo:function(t){var e=this.video;if(e){var i=e.duration;if(i!==1/0&&!isNaN(i)){var n=i*t;this.setCurrentTime(n)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(t){var e=this.video;if(e){if("string"==typeof t){var i=t[0],n=parseFloat(t.substr(1));"+"===i?t=e.currentTime+n:"-"===i&&(t=e.currentTime-n)}e.currentTime=t,this._lastUpdate=t}return this},isSeeking:function(){return this._isSeeking},seekingHandler:function(){this._isSeeking=!0,this.emit(o.VIDEO_SEEKING,this)},seekedHandler:function(){this._isSeeking=!1,this.emit(o.VIDEO_SEEKED,this),this.video&&this.updateTexture()},getProgress:function(){var t=this.video;if(t){var e=t.currentTime,i=t.duration;if(i!==1/0&&!isNaN(i))return e/i}return 0},getDuration:function(){return this.video?this.video.duration:0},setMute:function(t){void 0===t&&(t=!0),this._codeMuted=t;var e=this.video;return e&&(e.muted=!!this._systemMuted||t),this},isMuted:function(){return this._codeMuted},globalMute:function(t,e){this._systemMuted=e;var i=this.video;i&&(i.muted=!!this._codeMuted||e)},globalPause:function(){this._systemPaused=!0,this.video&&this.video.pause()},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&this.video.play()},setPaused:function(t){void 0===t&&(t=!0);var e=this.video;return this._codePaused=t,e&&(t?e.paused||e.pause():t||e.paused&&!this._systemPaused&&e.play()),this},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(t){return void 0===t&&(t=1),this.video&&(this.video.volume=s(t,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(t){return this.video&&(this.video.playbackRate=t),this},getLoop:function(){return!!this.video&&this.video.loop},setLoop:function(t){return void 0===t&&(t=!0),this.video&&(this.video.loop=t),this},isPlaying:function(){return!!this.video&&!(this.video.paused||this.video.ended)},isPaused:function(){return this.video&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(t,e){return void 0===e&&(e=!1),this.videoTexture&&this.scene.sys.textures.renameTexture(this._key,t),this._key=t,this.flipY=e,this.videoTextureSource&&this.videoTextureSource.setFlipY(e),this.videoTexture},stop:function(){var t=this.video;if(t){var e=this._callbacks;for(var i in e)t.removeEventListener(i,e[i],!0);t.pause()}return this._retryID&&window.clearTimeout(this._retryID),this.emit(o.VIDEO_STOP,this),this},removeVideoElement:function(){var t=this.video;if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("autoplay"),t.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(),this.removeVideoElementOnDestroy&&this.removeVideoElement();var t=this.scene.sys.game.events;t.off(a.PAUSE,this.globalPause,this),t.off(a.RESUME,this.globalResume,this);var e=this.scene.sys.sound;e&&e.off(l.GLOBAL_MUTE,this.globalMute,this),this._retryID&&window.clearTimeout(this._retryID)}});t.exports=f},function(t,e,i){var n=i(0),s=i(211),r=i(423),o=i(51),a=new n({initialize:function(t){this.type=o.POLYGON,this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return s(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],"string"==typeof t&&(t=t.split(" ")),!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,n=0;no||r>a)return!1;if(s<=i||r<=n)return!0;var h=s-i,l=r-n;return h*h+l*l<=t.radius*t.radius}},function(t,e,i){var n=i(4),s=i(217);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r,o,a=t.x1,h=t.y1,l=t.x2,u=t.y2,c=e.x,d=e.y,f=e.radius,p=l-a,g=u-h,v=a-c,m=h-d,y=p*p+g*g,x=2*(p*v+g*m),T=x*x-4*y*(v*v+m*m-f*f);if(0===T){var w=-x/(2*y);r=a+w*p,o=h+w*g,w>=0&&w<=1&&i.push(new n(r,o))}else if(T>0){var b=(-x-Math.sqrt(T))/(2*y);r=a+b*p,o=h+b*g,b>=0&&b<=1&&i.push(new n(r,o));var S=(-x+Math.sqrt(T))/(2*y);r=a+S*p,o=h+S*g,S>=0&&S<=1&&i.push(new n(r,o))}}return i}},function(t,e,i){var n=i(59),s=new(i(4));t.exports=function(t,e,i){if(void 0===i&&(i=s),n(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(n(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,l=r*r+o*o,u=r,c=o;if(l>0){var d=(a*r+h*o)/l;u*=d,c*=d}return i.x=t.x1+u,i.y=t.y1+c,u*u+c*c<=l&&u*r+c*o>=0&&n(e,i.x,i.y)}},function(t,e,i){var n=i(4),s=i(92),r=i(436);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e))for(var o=e.getLineA(),a=e.getLineB(),h=e.getLineC(),l=e.getLineD(),u=[new n,new n,new n,new n],c=[s(o,t,u[0]),s(a,t,u[1]),s(h,t,u[2]),s(l,t,u[3])],d=0;d<4;d++)c[d]&&i.push(u[d]);return i}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=[]);for(var s,r,o,a,h,l,u=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,f=t.y2-t.y1,p=u*u+c*c,g=u*d+c*f,v=d*d+f*f,m=p*v-g*g,y=0===m?0:1/m,x=t.x1,T=t.y1,w=0;w=0&&r>=0&&s+r<1&&(n.push({x:e[w].x,y:e[w].y}),i)));w++);return n}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,t}},function(t,e){t.exports=function(t){return 0===t.height?NaN:t.width/t.height}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,o=t.x3-e,a=t.y3-i,t.x3=o*s-a*r+e,t.y3=o*r+a*s+i,t}},function(t,e,i){t.exports={BUTTON_DOWN:i(1214),BUTTON_UP:i(1215),CONNECTED:i(1216),DISCONNECTED:i(1217),GAMEPAD_BUTTON_DOWN:i(1218),GAMEPAD_BUTTON_UP:i(1219)}},function(t,e,i){var n=i(17),s=i(141);t.exports=function(t,e){var i=void 0===t?s():n({},t);if(e)for(var r in e)void 0!==e[r]&&(i[r]=e[r]);return i}},function(t,e,i){var n=i(0),s=i(22),r=i(23),o=i(8),a=i(1),h=i(7),l=i(369),u=new n({Extends:r,initialize:function(t,e,i,n){var s="xml";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),s=a(o,"extension",s)}var l={type:"xml",cache:t.cacheManager.xml,extension:s,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,l)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=l(this.xhrLoader.responseText),this.data?this.onProcessComplete():(console.warn("Invalid XMLFile: "+this.key),this.onProcessError())}});o.register("xml",function(t,e,i){if(Array.isArray(t))for(var n=0;n0?this.setFromTileCollision(i):this.setFromTileRectangle(i)}},setFromTileRectangle:function(t){void 0===t&&(t={}),h(t,"isStatic")||(t.isStatic=!0),h(t,"addToWorld")||(t.addToWorld=!0);var e=this.tile.getBounds(),i=e.x+e.width/2,s=e.y+e.height/2,r=n.rectangle(i,s,e.width,e.height,t);return this.setBody(r,t.addToWorld),this},setFromTileCollision:function(t){void 0===t&&(t={}),h(t,"isStatic")||(t.isStatic=!0),h(t,"addToWorld")||(t.addToWorld=!0);for(var e=this.tile.tilemapLayer.scaleX,i=this.tile.tilemapLayer.scaleY,r=this.tile.getLeft(),o=this.tile.getTop(),u=this.tile.getCollisionGroup(),c=a(u,"objects",[]),d=[],f=0;f1&&(t.parts=d,this.setBody(s.create(t),t.addToWorld)),this},setBody:function(t,e){return void 0===e&&(e=!0),this.body&&this.removeBody(),this.body=t,this.body.gameObject=this,e&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0}});t.exports=u},function(t,e,i){var n={};t.exports=n;var s=i(234),r=i(144),o=i(38);n.collisions=function(t,e){for(var i=[],a=e.pairs.table,h=e.metrics,l=0;l1?1:0;d1?1:0;p0:0!=(t.mask&e.category)&&0!=(e.mask&t.category)}},function(t,e,i){var n={};t.exports=n;var s=i(31),r=i(37);n.collides=function(t,e,i){var o,a,h,l,u=!1;if(i){var c=t.parent,d=e.parent,f=c.speed*c.speed+c.angularSpeed*c.angularSpeed+d.speed*d.speed+d.angularSpeed*d.angularSpeed;u=i&&i.collided&&f<.2,l=i}else l={collided:!1,bodyA:t,bodyB:e};if(i&&u){var p=l.axisBody,g=p===t?e:t,v=[p.axes[i.axisNumber]];if(h=n._overlapAxes(p.vertices,g.vertices,v),l.reused=!0,h.overlap<=0)return l.collided=!1,l}else{if((o=n._overlapAxes(t.vertices,e.vertices,t.axes)).overlap<=0)return l.collided=!1,l;if((a=n._overlapAxes(e.vertices,t.vertices,e.axes)).overlap<=0)return l.collided=!1,l;o.overlaps?s=a:a=0?o.index-1:u.length-1],l.x=s.x-c.x,l.y=s.y-c.y,h=-r.dot(i,l),a=s,s=u[(o.index+1)%u.length],l.x=s.x-c.x,l.y=s.y-c.y,(n=-r.dot(i,l))r?(s.warn("Plugin.register:",n.toString(e),"was upgraded to",n.toString(t)),n._registry[t.name]=t):i-1},n.isFor=function(t,e){var i=t.for&&n.dependencyParse(t.for);return!t.for||e.name===i.name&&n.versionSatisfies(e.version,i.range)},n.use=function(t,e){if(t.uses=(t.uses||[]).concat(e||[]),0!==t.uses.length){for(var i=n.dependencies(t),r=s.topologicalSort(i),o=[],a=0;a0&&!h.silent&&s.info(o.join(" "))}else s.warn("Plugin.use:",n.toString(t),"does not specify any dependencies to install.")},n.dependencies=function(t,e){var i=n.dependencyParse(t),r=i.name;if(!(r in(e=e||{}))){t=n.resolve(t)||t,e[r]=s.map(t.uses||[],function(e){n.isPlugin(e)&&n.register(e);var r=n.dependencyParse(e),o=n.resolve(e);return o&&!n.versionSatisfies(o.version,r.range)?(s.warn("Plugin.dependencies:",n.toString(o),"does not satisfy",n.toString(r),"used by",n.toString(i)+"."),o._warned=!0,t._warned=!0):o||(s.warn("Plugin.dependencies:",n.toString(e),"used by",n.toString(i),"could not be resolved."),t._warned=!0),r.name});for(var o=0;o=s[2];if("^"===i.operator)return s[0]>0?o[0]===s[0]&&r.number>=i.number:s[1]>0?o[1]===s[1]&&o[2]>=s[2]:o[2]===s[2]}return t===e||"*"===t}},function(t,e,i){var n={};t.exports=n;var s=i(77),r=(i(95),i(18));n.create=function(t){var e=s.create(),i={label:"World",gravity:{x:0,y:1,scale:.001},bounds:{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}};return r.extend(e,i,t)}},function(t,e,i){var n=i(146);t.exports=function(t,e,i){var s=n(t,e,!0,i),r=n(t,e-1,!0,i),o=n(t,e+1,!0,i),a=n(t-1,e,!0,i),h=n(t+1,e,!0,i),l=s&&s.collides;return l&&(s.faceTop=!0,s.faceBottom=!0,s.faceLeft=!0,s.faceRight=!0),r&&r.collides&&(l&&(s.faceTop=!1),r.faceBottom=!l),o&&o.collides&&(l&&(s.faceBottom=!1),o.faceTop=!l),a&&a.collides&&(l&&(s.faceLeft=!1),a.faceRight=!l),h&&h.collides&&(l&&(s.faceRight=!1),h.faceLeft=!l),s&&!s.collides&&s.resetFaces(),s}},function(t,e,i){var n=i(79),s=i(113),r=i(238),o=i(78);t.exports=function(t,e,i,a,h){if(!s(e,i,h))return null;void 0===a&&(a=!0);var l=h.data[i][e],u=l&&l.collides;if(t instanceof n)null===h.data[i][e]&&(h.data[i][e]=new n(h,t.index,e,i,t.width,t.height)),h.data[i][e].copy(t);else{var c=t;null===h.data[i][e]?h.data[i][e]=new n(h,c,e,i,h.tileWidth,h.tileHeight):h.data[i][e].index=c}var d=h.data[i][e],f=-1!==h.collideIndexes.indexOf(d.index);return o(d,f),a&&u!==d.collides&&r(e,i,h),d}},function(t,e){t.exports=function(t,e,i){var n=i.collideIndexes.indexOf(t);e&&-1===n?i.collideIndexes.push(t):e||-1===n||i.collideIndexes.splice(n,1)}},function(t,e,i){var n=i(34),s=i(114),r=i(115),o=i(79);t.exports=function(t,e,i,a,h){for(var l=new s({tileWidth:i,tileHeight:a}),u=new r({name:t,tileWidth:i,tileHeight:a,format:n.ARRAY_2D,layers:[l]}),c=[],d=e.length,f=0,p=0;p0&&(s.totalDuration+=s.t2*s.repeat),s.totalDuration>t&&(t=s.totalDuration),s.delay0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay,this.startDelay=e},init:function(){if(this.paused&&!this.parentIsTimeline)return this.state=h.PENDING_ADD,this._pausedState=h.INIT,!1;for(var t=this.data,e=this.totalTargets,i=0;i0?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=h.LOOP_DELAY):(this.state=h.ACTIVE,this.dispatchTweenEvent(r.TWEEN_LOOP,this.callbacks.onLoop))):this.completeDelay>0?(this.state=h.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=h.PENDING_REMOVE,this.dispatchTweenEvent(r.TWEEN_COMPLETE,this.callbacks.onComplete))},pause:function(){return this.state===h.PAUSED?this:(this.paused=!0,this._pausedState=this.state,this.state=h.PAUSED,this)},play:function(t){void 0===t&&(t=!1);var e=this.state;return e!==h.INIT||this.parentIsTimeline?e===h.ACTIVE||e===h.PENDING_ADD&&this._pausedState===h.PENDING_ADD?this:this.parentIsTimeline||e!==h.PENDING_REMOVE&&e!==h.REMOVED?(this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?this.state=h.ACTIVE:(this.countdown=this.calculatedOffset,this.state=h.OFFSET_DELAY)):this.paused?(this.paused=!1,this.makeActive()):(this.resetTweenData(t),this.state=h.ACTIVE,this.makeActive()),this):(this.seek(0),this.parent.makeActive(this),this):(this.resetTweenData(!1),this.state=h.ACTIVE,this)},resetTweenData:function(t){for(var e=this.data,i=this.totalData,n=this.totalTargets,s=0;s0&&(r.elapsed=r.delay,r.state=h.DELAY),r.getActiveValue&&(o[a]=r.getActiveValue(r.target,r.key,r.start))}},resume:function(){return this.state===h.PAUSED?(this.paused=!1,this.state=this._pausedState):this.play(),this},seek:function(t,e){if(void 0===e&&(e=16.6),this.totalDuration>=36e5)return console.warn("Tween.seek duration too long"),this;this.state===h.REMOVED&&this.makeActive(),this.elapsed=0,this.progress=0,this.totalElapsed=0,this.totalProgress=0;for(var i=this.data,n=this.totalTargets,s=0;s0&&(r.elapsed=r.delay,r.state=h.DELAY)}this.calcDuration();var c=!1;this.state===h.PAUSED&&(c=!0,this.state=h.ACTIVE),this.isSeeking=!0;do{this.update(0,e)}while(this.totalProgress0?(e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY(),e.start=e.getStartValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.end=e.getEndValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,h.REPEAT_DELAY):(this.dispatchTweenDataEvent(r.TWEEN_REPEAT,t.callbacks.onRepeat,e),h.PLAYING_FORWARD)):h.COMPLETE},setStateFromStart:function(t,e,i){return e.repeatCounter>0?(e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY(),e.end=e.getEndValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,h.REPEAT_DELAY):(this.dispatchTweenDataEvent(r.TWEEN_REPEAT,t.callbacks.onRepeat,e),h.PLAYING_FORWARD)):h.COMPLETE},updateTweenData:function(t,e,i){var n=e.target;switch(e.state){case h.PLAYING_FORWARD:case h.PLAYING_BACKWARD:if(!n){e.state=h.COMPLETE;break}var s=e.elapsed,o=e.duration,a=0;(s+=i)>o&&(a=s-o,s=o);var l=e.state===h.PLAYING_FORWARD,u=s/o;if(e.elapsed=s,e.progress=u,1===u)l?(e.current=e.end,n[e.key]=e.end,e.hold>0?(e.elapsed=e.hold-a,e.state=h.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,a)):(e.current=e.start,n[e.key]=e.start,e.state=this.setStateFromStart(t,e,a));else{var c=l?e.ease(u):e.ease(1-u);e.current=e.start+(e.end-e.start)*c,n[e.key]=e.current}this.dispatchTweenDataEvent(r.TWEEN_UPDATE,t.callbacks.onUpdate,e);break;case h.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=h.PENDING_RENDER);break;case h.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=h.PLAYING_FORWARD,this.dispatchTweenDataEvent(r.TWEEN_REPEAT,t.callbacks.onRepeat,e));break;case h.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case h.PENDING_RENDER:n?(e.start=e.getStartValue(n,e.key,n[e.key],e.index,t.totalTargets,t),e.end=e.getEndValue(n,e.key,e.start,e.index,t.totalTargets,t),e.current=e.start,n[e.key]=e.start,e.state=h.PLAYING_FORWARD):e.state=h.COMPLETE}return e.state!==h.COMPLETE}});u.TYPES=["onActive","onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],a.register("tween",function(t){return this.scene.sys.tweens.add(t)}),o.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=u},function(t,e,i){t.exports={TIMELINE_COMPLETE:i(1419),TIMELINE_LOOP:i(1420),TIMELINE_PAUSE:i(1421),TIMELINE_RESUME:i(1422),TIMELINE_START:i(1423),TIMELINE_UPDATE:i(1424),TWEEN_ACTIVE:i(1425),TWEEN_COMPLETE:i(1426),TWEEN_LOOP:i(1427),TWEEN_REPEAT:i(1428),TWEEN_START:i(1429),TWEEN_UPDATE:i(1430),TWEEN_YOYO:i(1431)}},function(t,e){t.exports=function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p){return{target:t,index:e,key:i,getActiveValue:r,getEndValue:n,getStartValue:s,ease:o,duration:0,totalDuration:0,delay:0,yoyo:l,hold:0,repeat:0,repeatDelay:0,flipX:f,flipY:p,progress:0,elapsed:0,repeatCounter:0,start:0,current:0,end:0,t1:0,t2:0,gen:{delay:a,duration:h,hold:u,repeat:c,repeatDelay:d},state:0}}},function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){t.exports={Angle:i(535),Call:i(536),GetFirst:i(537),GetLast:i(538),GridAlign:i(539),IncAlpha:i(599),IncX:i(600),IncXY:i(601),IncY:i(602),PlaceOnCircle:i(603),PlaceOnEllipse:i(604),PlaceOnLine:i(605),PlaceOnRectangle:i(606),PlaceOnTriangle:i(607),PlayAnimation:i(608),PropertyValueInc:i(39),PropertyValueSet:i(27),RandomCircle:i(609),RandomEllipse:i(610),RandomLine:i(611),RandomRectangle:i(612),RandomTriangle:i(613),Rotate:i(614),RotateAround:i(615),RotateAroundDistance:i(616),ScaleX:i(617),ScaleXY:i(618),ScaleY:i(619),SetAlpha:i(620),SetBlendMode:i(621),SetDepth:i(622),SetHitArea:i(623),SetOrigin:i(624),SetRotation:i(625),SetScale:i(626),SetScaleX:i(627),SetScaleY:i(628),SetScrollFactor:i(629),SetScrollFactorX:i(630),SetScrollFactorY:i(631),SetTint:i(632),SetVisible:i(633),SetX:i(634),SetXY:i(635),SetY:i(636),ShiftPosition:i(637),Shuffle:i(638),SmootherStep:i(639),SmoothStep:i(640),Spread:i(641),ToggleVisible:i(642),WrapInRectangle:i(643)}},function(t,e,i){var n=i(153),s=[];s[n.BOTTOM_CENTER]=i(255),s[n.BOTTOM_LEFT]=i(256),s[n.BOTTOM_RIGHT]=i(257),s[n.CENTER]=i(258),s[n.LEFT_CENTER]=i(260),s[n.RIGHT_CENTER]=i(261),s[n.TOP_CENTER]=i(262),s[n.TOP_LEFT]=i(263),s[n.TOP_RIGHT]=i(264);t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e,i){var n=i(43),s=i(80),r=i(44),o=i(81);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(43),s=i(45),r=i(44),o=i(46);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(43),s=i(47),r=i(44),o=i(48);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(259),s=i(80),r=i(83);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)+i,r(e)+o),t}},function(t,e,i){var n=i(81),s=i(82);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var n=i(83),s=i(45),r=i(82),o=i(46);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(83),s=i(47),r=i(82),o=i(48);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(80),s=i(49),r=i(81),o=i(50);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(45),s=i(49),r=i(46),o=i(50);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)-a),t}},function(t,e,i){var n=i(47),s=i(49),r=i(48),o=i(50);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(154),s=i(96),r=i(13),o=i(4);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=s(e,0,r.PI2);return n(t,a,i)}},function(t,e,i){var n=i(267),s=i(154),r=i(96),o=i(13);t.exports=function(t,e,i,a){void 0===a&&(a=[]),e||(e=n(t)/i);for(var h=0;h=this.nextTick&&this.currentAnim.setFrame(this)}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.isCropped&&e.frame.updateCropUVs(e._crop,e.flipX,e.flipY),e.setSizeToFrame(),t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin(),e},updateFrame:function(t){var e=this.setCurrentFrame(t);if(this.isPlaying){t.setAlpha&&(e.alpha=t.alpha);var i=this.currentAnim;e.emit(r.SPRITE_ANIMATION_KEY_UPDATE+i.key,i,t,e),e.emit(r.SPRITE_ANIMATION_UPDATE,i,t,e),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this)}},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off(r.REMOVE_ANIMATION,this.remove,this),this.animationManager=null,this.parent=null,this.currentAnim=null,this.currentFrame=null}});t.exports=o},function(t,e){t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var n,s,r=1;if(i){if(te.length&&(r=e.length),i?(n=e[r-1][i],(s=e[r][i])-t<=t-n?e[r]:e[r-1]):(n=e[r-1],(s=e[r])-t<=t-n?s:n)}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=n,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0}});t.exports=n},function(t,e,i){var n=i(42),s={_blendMode:n.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=n[t]),(t|=0)>=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e,i){var n=i(157),s=i(118);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=s(t)/i);for(var o=0;o=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n-h&&(c-=h,n+=l),fd.right&&(f=u(f,f+(g-d.right),this.lerp.x)),vd.bottom&&(p=u(p,p+(v-d.bottom),this.lerp.y))):(f=u(f,g-h,this.lerp.x),p=u(p,v-l,this.lerp.y))}this.useBounds&&(f=this.clampX(f),p=this.clampY(p)),this.roundPixels&&(h=Math.round(h),l=Math.round(l)),this.scrollX=f,this.scrollY=p;var m=f+n,y=p+s;this.midPoint.set(m,y);var x=e/o,T=i/o;this.worldView.setTo(m-x/2,y-T/2,x,T),a.applyITRS(this.x+h,this.y+l,this.rotation,o,o),a.translate(-h,-l),this.shakeEffect.preRender()},setLerp:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.lerp.set(t,e),this},setFollowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.followOffset.set(t,e),this},startFollow:function(t,e,i,n,s,r){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===s&&(s=0),void 0===r&&(r=s),this._follow=t,this.roundPixels=e,i=o(i,0,1),n=o(n,0,1),this.lerp.set(i,n),this.followOffset.set(s,r);var a=this.width/2,h=this.height/2,l=t.x-s,u=t.y-r;return this.midPoint.set(l,u),this.scrollX=l-a,this.scrollY=u-h,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.visible&&(this.panEffect.update(t,e),this.zoomEffect.update(t,e),this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e))},destroy:function(){this.clearRenderToTexture(),this.resetFX(),n.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=f},function(t,e,i){var n=i(36);t.exports=function(t){var e=new n;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var s=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16);e.setTo(s,r,o)}return e}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e){t.exports=function(t,e,i,n){void 0===n&&(n={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var s=Math.min(t,e,i),r=Math.max(t,e,i),o=r-s,a=0,h=0===r?0:o/r,l=r;return r!==s&&(r===t?a=(e-i)/o+(e16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},function(t,e,i){var n=i(36);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var n=i(36);t.exports=function(t){var e=new n,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var s=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(s,r,o,255*a)}return e}},function(t,e,i){t.exports={Fade:i(668),Flash:i(669),Pan:i(670),Shake:i(703),Zoom:i(704)}},function(t,e,i){t.exports={In:i(671),Out:i(672),InOut:i(673)}},function(t,e,i){t.exports={In:i(674),Out:i(675),InOut:i(676)}},function(t,e,i){t.exports={In:i(677),Out:i(678),InOut:i(679)}},function(t,e,i){t.exports={In:i(680),Out:i(681),InOut:i(682)}},function(t,e,i){t.exports={In:i(683),Out:i(684),InOut:i(685)}},function(t,e,i){t.exports={In:i(686),Out:i(687),InOut:i(688)}},function(t,e,i){t.exports=i(689)},function(t,e,i){t.exports={In:i(690),Out:i(691),InOut:i(692)}},function(t,e,i){t.exports={In:i(693),Out:i(694),InOut:i(695)}},function(t,e,i){t.exports={In:i(696),Out:i(697),InOut:i(698)}},function(t,e,i){t.exports={In:i(699),Out:i(700),InOut:i(701)}},function(t,e,i){t.exports=i(702)},function(t,e,i){var n=i(0),s=i(32),r=i(315),o=i(1),a=i(5),h=i(7),l=i(177),u=i(2),c=i(183),d=i(170),f=new n({initialize:function(t){void 0===t&&(t={});this.width=a(t,"width",1024),this.height=a(t,"height",768),this.zoom=a(t,"zoom",1),this.resolution=a(t,"resolution",1),this.parent=a(t,"parent",void 0),this.scaleMode=a(t,"scaleMode",0),this.expandParent=a(t,"expandParent",!0),this.autoRound=a(t,"autoRound",!1),this.autoCenter=a(t,"autoCenter",0),this.resizeInterval=a(t,"resizeInterval",500),this.fullscreenTarget=a(t,"fullscreenTarget",null),this.minWidth=a(t,"minWidth",0),this.maxWidth=a(t,"maxWidth",0),this.minHeight=a(t,"minHeight",0),this.maxHeight=a(t,"maxHeight",0);var e=a(t,"scale",null);e&&(this.width=a(e,"width",this.width),this.height=a(e,"height",this.height),this.zoom=a(e,"zoom",this.zoom),this.resolution=a(e,"resolution",this.resolution),this.parent=a(e,"parent",this.parent),this.scaleMode=a(e,"mode",this.scaleMode),this.expandParent=a(e,"expandParent",this.expandParent),this.autoRound=a(e,"autoRound",this.autoRound),this.autoCenter=a(e,"autoCenter",this.autoCenter),this.resizeInterval=a(e,"resizeInterval",this.resizeInterval),this.fullscreenTarget=a(e,"fullscreenTarget",this.fullscreenTarget),this.minWidth=a(e,"min.width",this.minWidth),this.maxWidth=a(e,"max.width",this.maxWidth),this.minHeight=a(e,"min.height",this.minHeight),this.maxHeight=a(e,"max.height",this.maxHeight)),this.renderType=a(t,"type",s.AUTO),this.canvas=a(t,"canvas",null),this.context=a(t,"context",null),this.canvasStyle=a(t,"canvasStyle",null),this.customEnvironment=a(t,"customEnvironment",!1),this.sceneConfig=a(t,"scene",null),this.seed=a(t,"seed",[(Date.now()*Math.random()).toString()]),l.RND=new l.RandomDataGenerator(this.seed),this.gameTitle=a(t,"title",""),this.gameURL=a(t,"url","https://phaser.io"),this.gameVersion=a(t,"version",""),this.autoFocus=a(t,"autoFocus",!0),this.domCreateContainer=a(t,"dom.createContainer",!1),this.domBehindCanvas=a(t,"dom.behindCanvas",!1),this.inputKeyboard=a(t,"input.keyboard",!0),this.inputKeyboardEventTarget=a(t,"input.keyboard.target",window),this.inputKeyboardCapture=a(t,"input.keyboard.capture",[]),this.inputMouse=a(t,"input.mouse",!0),this.inputMouseEventTarget=a(t,"input.mouse.target",null),this.inputMouseCapture=a(t,"input.mouse.capture",!0),this.inputTouch=a(t,"input.touch",r.input.touch),this.inputTouchEventTarget=a(t,"input.touch.target",null),this.inputTouchCapture=a(t,"input.touch.capture",!0),this.inputActivePointers=a(t,"input.activePointers",1),this.inputSmoothFactor=a(t,"input.smoothFactor",0),this.inputWindowEvents=a(t,"input.windowEvents",!0),this.inputGamepad=a(t,"input.gamepad",!1),this.inputGamepadEventTarget=a(t,"input.gamepad.target",window),this.disableContextMenu=a(t,"disableContextMenu",!1),this.audio=a(t,"audio"),this.hideBanner=!1===a(t,"banner",null),this.hidePhaser=a(t,"banner.hidePhaser",!1),this.bannerTextColor=a(t,"banner.text","#ffffff"),this.bannerBackgroundColor=a(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=a(t,"fps",null);var i=a(t,"render",t);this.antialias=a(i,"antialias",!0),this.antialiasGL=a(i,"antialiasGL",!0),this.mipmapFilter=a(i,"mipmapFilter","LINEAR"),this.desynchronized=a(i,"desynchronized",!1),this.roundPixels=a(i,"roundPixels",!1),this.pixelArt=a(i,"pixelArt",1!==this.zoom),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=a(i,"transparent",!1),this.clearBeforeRender=a(i,"clearBeforeRender",!0),this.premultipliedAlpha=a(i,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=a(i,"failIfMajorPerformanceCaveat",!1),this.powerPreference=a(i,"powerPreference","default"),this.batchSize=a(i,"batchSize",2e3),this.maxLights=a(i,"maxLights",10);var n=a(t,"backgroundColor",0);this.backgroundColor=d(n),0===n&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=a(t,"callbacks.preBoot",u),this.postBoot=a(t,"callbacks.postBoot",u),this.physics=a(t,"physics",{}),this.defaultPhysicsSystem=a(this.physics,"default",!1),this.loaderBaseURL=a(t,"loader.baseURL",""),this.loaderPath=a(t,"loader.path",""),this.loaderMaxParallelDownloads=a(t,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=a(t,"loader.crossOrigin",void 0),this.loaderResponseType=a(t,"loader.responseType",""),this.loaderAsync=a(t,"loader.async",!0),this.loaderUser=a(t,"loader.user",""),this.loaderPassword=a(t,"loader.password",""),this.loaderTimeout=a(t,"loader.timeout",0),this.installGlobalPlugins=[],this.installScenePlugins=[];var f=a(t,"plugins",null),p=c.DefaultScene;f&&(Array.isArray(f)?this.defaultPlugins=f:h(f)&&(this.installGlobalPlugins=o(f,"global",[]),this.installScenePlugins=o(f,"scene",[]),Array.isArray(f.default)?p=f.default:Array.isArray(f.defaultMerge)&&(p=p.concat(f.defaultMerge)))),this.defaultPlugins=p;var g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=a(t,"images.default",g+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=a(t,"images.missing",g+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),window&&(window.FORCE_WEBGL?this.renderType=s.WEBGL:window.FORCE_CANVAS&&(this.renderType=s.CANVAS))}});t.exports=f},function(t,e,i){t.exports={os:i(122),browser:i(123),features:i(176),input:i(733),audio:i(734),video:i(735),fullscreen:i(736),canvasFeatures:i(316)}},function(t,e,i){var n,s,r,o=i(28),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create(t,6,1).getContext("2d");if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return s*s+r*r}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t0?Math.ceil(t):Math.floor(t)}},function(t,e,i){var n=i(3);t.exports=function(t,e,i,s,r,o,a,h){void 0===h&&(h=new n);var l=Math.sin(r),u=Math.cos(r),c=u*o,d=l*o,f=-l*a,p=u*a,g=1/(c*p+f*-d);return h.x=p*g*t+-f*g*e+(s*f-i*p)*g,h.y=c*g*e+-d*g*t+(-s*c+i*d)*g,h}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},clone:function(){return new n(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return e*e+i*i+n*n+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12]*s,this.y=r[1]*e+r[5]*i+r[9]*n+r[13]*s,this.z=r[2]*e+r[6]*i+r[10]*n+r[14]*s,this.w=r[3]*e+r[7]*i+r[11]*n+r[15]*s,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*r-o*h,c=-l*s+o*a,d=h*s-r*a,f=e*u+i*c+n*d;return f?(f=1/f,t[0]=u*f,t[1]=(-l*i+n*h)*f,t[2]=(o*i-n*r)*f,t[3]=c*f,t[4]=(l*e-n*a)*f,t[5]=(-o*e+n*s)*f,t[6]=d*f,t[7]=(-h*e+i*a)*f,t[8]=(r*e-i*s)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=r*l-o*h,t[1]=n*h-i*l,t[2]=i*o-n*r,t[3]=o*a-s*l,t[4]=e*l-n*a,t[5]=n*s-e*o,t[6]=s*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*s,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*(l*r-o*h)+i*(-l*s+o*a)+n*(h*s-r*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],m=c[5],y=c[6],x=c[7],T=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*n+f*o+p*l,e[2]=d*s+f*a+p*u,e[3]=g*i+v*r+m*h,e[4]=g*n+v*o+m*l,e[5]=g*s+v*a+m*u,e[6]=y*i+x*r+T*h,e[7]=y*n+x*o+T*l,e[8]=y*s+x*a+T*u,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*r,e[1]=l*n+h*o,e[2]=l*s+h*a,e[3]=l*r-h*i,e[4]=l*o-h*n,e[5]=l*a-h*s,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,o=i+i,a=n+n,h=e*r,l=e*o,u=e*a,c=i*o,d=i*a,f=n*a,p=s*r,g=s*o,v=s*a,m=this.val;return m[0]=1-(c+f),m[3]=l+v,m[6]=u-g,m[1]=l-v,m[4]=1-(h+f),m[7]=d+p,m[2]=u+g,m[5]=d-p,m[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],v=e[13],m=e[14],y=e[15],x=n*h-s*a,T=n*l-r*a,w=n*u-o*a,b=s*l-r*h,S=s*u-o*h,E=r*u-o*l,A=c*v-d*g,_=c*m-f*g,C=c*y-p*g,M=d*m-f*v,P=d*y-p*v,O=f*y-p*m,R=x*O-T*P+w*M+b*C-S*_+E*A;return R?(R=1/R,i[0]=(h*O-l*P+u*M)*R,i[1]=(l*C-a*O-u*_)*R,i[2]=(a*P-h*C+u*A)*R,i[3]=(r*P-s*O-o*M)*R,i[4]=(n*O-r*C+o*_)*R,i[5]=(s*C-n*P-o*A)*R,i[6]=(v*E-m*S+y*b)*R,i[7]=(m*w-g*E-y*T)*R,i[8]=(g*S-v*w+y*x)*R,this):null}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this},zero:function(){var t=this.val;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=0,this},xyz:function(t,e,i){this.identity();var n=this.val;return n[12]=t,n[13]=e,n[14]=i,this},scaling:function(t,e,i){this.zero();var n=this.val;return n[0]=t,n[5]=e,n[10]=i,n[15]=1,this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[3],s=t[6],r=t[7],o=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=s,t[11]=t[14],t[12]=n,t[13]=r,t[14]=o,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15],m=e*o-i*r,y=e*a-n*r,x=e*h-s*r,T=i*a-n*o,w=i*h-s*o,b=n*h-s*a,S=l*p-u*f,E=l*g-c*f,A=l*v-d*f,_=u*g-c*p,C=u*v-d*p,M=c*v-d*g,P=m*M-y*C+x*_+T*A-w*E+b*S;return P?(P=1/P,t[0]=(o*M-a*C+h*_)*P,t[1]=(n*C-i*M-s*_)*P,t[2]=(p*b-g*w+v*T)*P,t[3]=(c*w-u*b-d*T)*P,t[4]=(a*A-r*M-h*E)*P,t[5]=(e*M-n*A+s*E)*P,t[6]=(g*x-f*b-v*y)*P,t[7]=(l*b-c*x+d*y)*P,t[8]=(r*C-o*A+h*S)*P,t[9]=(i*A-e*C-s*S)*P,t[10]=(f*w-p*x+v*m)*P,t[11]=(u*x-l*w-d*m)*P,t[12]=(o*E-r*_-a*S)*P,t[13]=(e*_-i*E+n*S)*P,t[14]=(p*y-f*T-g*m)*P,t[15]=(l*T-u*y+c*m)*P,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return t[0]=o*(c*v-d*g)-u*(a*v-h*g)+p*(a*d-h*c),t[1]=-(i*(c*v-d*g)-u*(n*v-s*g)+p*(n*d-s*c)),t[2]=i*(a*v-h*g)-o*(n*v-s*g)+p*(n*h-s*a),t[3]=-(i*(a*d-h*c)-o*(n*d-s*c)+u*(n*h-s*a)),t[4]=-(r*(c*v-d*g)-l*(a*v-h*g)+f*(a*d-h*c)),t[5]=e*(c*v-d*g)-l*(n*v-s*g)+f*(n*d-s*c),t[6]=-(e*(a*v-h*g)-r*(n*v-s*g)+f*(n*h-s*a)),t[7]=e*(a*d-h*c)-r*(n*d-s*c)+l*(n*h-s*a),t[8]=r*(u*v-d*p)-l*(o*v-h*p)+f*(o*d-h*u),t[9]=-(e*(u*v-d*p)-l*(i*v-s*p)+f*(i*d-s*u)),t[10]=e*(o*v-h*p)-r*(i*v-s*p)+f*(i*h-s*o),t[11]=-(e*(o*d-h*u)-r*(i*d-s*u)+l*(i*h-s*o)),t[12]=-(r*(u*g-c*p)-l*(o*g-a*p)+f*(o*c-a*u)),t[13]=e*(u*g-c*p)-l*(i*g-n*p)+f*(i*c-n*u),t[14]=-(e*(o*g-a*p)-r*(i*g-n*p)+f*(i*a-n*o)),t[15]=e*(o*c-a*u)-r*(i*c-n*u)+l*(i*a-n*o),this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return(e*o-i*r)*(c*v-d*g)-(e*a-n*r)*(u*v-d*p)+(e*h-s*r)*(u*g-c*p)+(i*a-n*o)*(l*v-d*f)-(i*h-s*o)*(l*g-c*f)+(n*h-s*a)*(l*p-u*f)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=e[9],d=e[10],f=e[11],p=e[12],g=e[13],v=e[14],m=e[15],y=t.val,x=y[0],T=y[1],w=y[2],b=y[3];return e[0]=x*i+T*o+w*u+b*p,e[1]=x*n+T*a+w*c+b*g,e[2]=x*s+T*h+w*d+b*v,e[3]=x*r+T*l+w*f+b*m,x=y[4],T=y[5],w=y[6],b=y[7],e[4]=x*i+T*o+w*u+b*p,e[5]=x*n+T*a+w*c+b*g,e[6]=x*s+T*h+w*d+b*v,e[7]=x*r+T*l+w*f+b*m,x=y[8],T=y[9],w=y[10],b=y[11],e[8]=x*i+T*o+w*u+b*p,e[9]=x*n+T*a+w*c+b*g,e[10]=x*s+T*h+w*d+b*v,e[11]=x*r+T*l+w*f+b*m,x=y[12],T=y[13],w=y[14],b=y[15],e[12]=x*i+T*o+w*u+b*p,e[13]=x*n+T*a+w*c+b*g,e[14]=x*s+T*h+w*d+b*v,e[15]=x*r+T*l+w*f+b*m,this},multiplyLocal:function(t){var e=[],i=this.val,n=t.val;return e[0]=i[0]*n[0]+i[1]*n[4]+i[2]*n[8]+i[3]*n[12],e[1]=i[0]*n[1]+i[1]*n[5]+i[2]*n[9]+i[3]*n[13],e[2]=i[0]*n[2]+i[1]*n[6]+i[2]*n[10]+i[3]*n[14],e[3]=i[0]*n[3]+i[1]*n[7]+i[2]*n[11]+i[3]*n[15],e[4]=i[4]*n[0]+i[5]*n[4]+i[6]*n[8]+i[7]*n[12],e[5]=i[4]*n[1]+i[5]*n[5]+i[6]*n[9]+i[7]*n[13],e[6]=i[4]*n[2]+i[5]*n[6]+i[6]*n[10]+i[7]*n[14],e[7]=i[4]*n[3]+i[5]*n[7]+i[6]*n[11]+i[7]*n[15],e[8]=i[8]*n[0]+i[9]*n[4]+i[10]*n[8]+i[11]*n[12],e[9]=i[8]*n[1]+i[9]*n[5]+i[10]*n[9]+i[11]*n[13],e[10]=i[8]*n[2]+i[9]*n[6]+i[10]*n[10]+i[11]*n[14],e[11]=i[8]*n[3]+i[9]*n[7]+i[10]*n[11]+i[11]*n[15],e[12]=i[12]*n[0]+i[13]*n[4]+i[14]*n[8]+i[15]*n[12],e[13]=i[12]*n[1]+i[13]*n[5]+i[14]*n[9]+i[15]*n[13],e[14]=i[12]*n[2]+i[13]*n[6]+i[14]*n[10]+i[15]*n[14],e[15]=i[12]*n[3]+i[13]*n[7]+i[14]*n[11]+i[15]*n[15],this.fromArray(e)},translate:function(t){var e=t.x,i=t.y,n=t.z,s=this.val;return s[12]=s[0]*e+s[4]*i+s[8]*n+s[12],s[13]=s[1]*e+s[5]*i+s[9]*n+s[13],s[14]=s[2]*e+s[6]*i+s[10]*n+s[14],s[15]=s[3]*e+s[7]*i+s[11]*n+s[15],this},translateXYZ:function(t,e,i){var n=this.val;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this},scale:function(t){var e=t.x,i=t.y,n=t.z,s=this.val;return s[0]=s[0]*e,s[1]=s[1]*e,s[2]=s[2]*e,s[3]=s[3]*e,s[4]=s[4]*i,s[5]=s[5]*i,s[6]=s[6]*i,s[7]=s[7]*i,s[8]=s[8]*n,s[9]=s[9]*n,s[10]=s[10]*n,s[11]=s[11]*n,this},scaleXYZ:function(t,e,i){var n=this.val;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),s=1-i,r=t.x,o=t.y,a=t.z,h=s*r,l=s*o;return this.fromArray([h*r+i,h*o-n*a,h*a+n*o,0,h*o+n*a,l*o+i,l*a-n*r,0,h*a-n*o,l*a+n*r,s*a*a+i,0,0,0,0,1]),this},rotate:function(t,e){var i=this.val,n=e.x,s=e.y,r=e.z,o=Math.sqrt(n*n+s*s+r*r);if(Math.abs(o)<1e-6)return null;n*=o=1/o,s*=o,r*=o;var a=Math.sin(t),h=Math.cos(t),l=1-h,u=i[0],c=i[1],d=i[2],f=i[3],p=i[4],g=i[5],v=i[6],m=i[7],y=i[8],x=i[9],T=i[10],w=i[11],b=n*n*l+h,S=s*n*l+r*a,E=r*n*l-s*a,A=n*s*l-r*a,_=s*s*l+h,C=r*s*l+n*a,M=n*r*l+s*a,P=s*r*l-n*a,O=r*r*l+h;return i[0]=u*b+p*S+y*E,i[1]=c*b+g*S+x*E,i[2]=d*b+v*S+T*E,i[3]=f*b+m*S+w*E,i[4]=u*A+p*_+y*C,i[5]=c*A+g*_+x*C,i[6]=d*A+v*_+T*C,i[7]=f*A+m*_+w*C,i[8]=u*M+p*P+y*O,i[9]=c*M+g*P+x*O,i[10]=d*M+v*P+T*O,i[11]=f*M+m*P+w*O,this},rotateX:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this},rotateY:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this},rotateZ:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this},fromRotationTranslation:function(t,e){var i=this.val,n=t.x,s=t.y,r=t.z,o=t.w,a=n+n,h=s+s,l=r+r,u=n*a,c=n*h,d=n*l,f=s*h,p=s*l,g=r*l,v=o*a,m=o*h,y=o*l;return i[0]=1-(f+g),i[1]=c+y,i[2]=d-m,i[3]=0,i[4]=c-y,i[5]=1-(u+g),i[6]=p+v,i[7]=0,i[8]=d+m,i[9]=p-v,i[10]=1-(u+f),i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this},fromQuat:function(t){var e=this.val,i=t.x,n=t.y,s=t.z,r=t.w,o=i+i,a=n+n,h=s+s,l=i*o,u=i*a,c=i*h,d=n*a,f=n*h,p=s*h,g=r*o,v=r*a,m=r*h;return e[0]=1-(d+p),e[1]=u+m,e[2]=c-v,e[3]=0,e[4]=u-m,e[5]=1-(l+p),e[6]=f+g,e[7]=0,e[8]=c+v,e[9]=f-g,e[10]=1-(l+d),e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},frustum:function(t,e,i,n,s,r){var o=this.val,a=1/(e-t),h=1/(n-i),l=1/(s-r);return o[0]=2*s*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=2*s*h,o[6]=0,o[7]=0,o[8]=(e+t)*a,o[9]=(n+i)*h,o[10]=(r+s)*l,o[11]=-1,o[12]=0,o[13]=0,o[14]=r*s*2*l,o[15]=0,this},perspective:function(t,e,i,n){var s=this.val,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this},perspectiveLH:function(t,e,i,n){var s=this.val;return s[0]=2*i/t,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=2*i/e,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=-n/(i-n),s[11]=1,s[12]=0,s[13]=0,s[14]=i*n/(i-n),s[15]=0,this},ortho:function(t,e,i,n,s,r){var o=this.val,a=t-e,h=i-n,l=s-r;return a=0===a?a:1/a,h=0===h?h:1/h,l=0===l?l:1/l,o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*l,o[15]=1,this},lookAt:function(t,e,i){var n=this.val,s=t.x,r=t.y,o=t.z,a=i.x,h=i.y,l=i.z,u=e.x,c=e.y,d=e.z;if(Math.abs(s-u)<1e-6&&Math.abs(r-c)<1e-6&&Math.abs(o-d)<1e-6)return this.identity();var f=s-u,p=r-c,g=o-d,v=1/Math.sqrt(f*f+p*p+g*g),m=h*(g*=v)-l*(p*=v),y=l*(f*=v)-a*g,x=a*p-h*f;(v=Math.sqrt(m*m+y*y+x*x))?(m*=v=1/v,y*=v,x*=v):(m=0,y=0,x=0);var T=p*x-g*y,w=g*m-f*x,b=f*y-p*m;return(v=Math.sqrt(T*T+w*w+b*b))?(T*=v=1/v,w*=v,b*=v):(T=0,w=0,b=0),n[0]=m,n[1]=T,n[2]=f,n[3]=0,n[4]=y,n[5]=w,n[6]=p,n[7]=0,n[8]=x,n[9]=b,n[10]=g,n[11]=0,n[12]=-(m*s+y*r+x*o),n[13]=-(T*s+w*r+b*o),n[14]=-(f*s+p*r+g*o),n[15]=1,this},yawPitchRoll:function(t,e,i){this.zero(),s.zero(),r.zero();var n=this.val,o=s.val,a=r.val,h=Math.sin(i),l=Math.cos(i);return n[10]=1,n[15]=1,n[0]=l,n[1]=h,n[4]=-h,n[5]=l,h=Math.sin(e),l=Math.cos(e),o[0]=1,o[15]=1,o[5]=l,o[10]=l,o[9]=-h,o[6]=h,h=Math.sin(t),l=Math.cos(t),a[5]=1,a[15]=1,a[0]=l,a[2]=-h,a[8]=h,a[10]=l,this.multiplyLocal(s),this.multiplyLocal(r),this},setWorldMatrix:function(t,e,i,n,o){return this.yawPitchRoll(t.y,t.x,t.z),s.scaling(i.x,i.y,i.z),r.xyz(e.x,e.y,e.z),this.multiplyLocal(s),this.multiplyLocal(r),void 0!==n&&this.multiplyLocal(n),void 0!==o&&this.multiplyLocal(o),this}}),s=new n,r=new n;t.exports=n},function(t,e,i){var n=i(0),s=i(182),r=i(334),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new s(1,0,0),l=new s(0,1,0),u=new s,c=new r,d=new n({initialize:function(t,e,i,n){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(u.copy(h).cross(t).length()<1e-6&&u.copy(l).cross(t),u.normalize(),this.setAxisAngle(u,Math.PI)):i>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(u.copy(t).cross(e),this.x=u.x,this.y=u.y,this.z=u.z,this.w=1+i,this.normalize())},setAxes:function(t,e,i){var n=c.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.x=i*t.x,this.y=i*t.y,this.z=i*t.z,this.w=Math.cos(e),this},multiply:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.x=e*h+s*r+i*a-n*o,this.y=i*h+s*o+n*r-e*a,this.z=n*h+s*a+e*o-i*r,this.w=s*h-e*r-i*o-n*a,this},slerp:function(t,e){var i=this.x,n=this.y,s=this.z,r=this.w,o=t.x,a=t.y,h=t.z,l=t.w,u=i*o+n*a+s*h+r*l;u<0&&(u=-u,o=-o,a=-a,h=-h,l=-l);var c=1-e,d=e;if(1-u>1e-6){var f=Math.acos(u),p=Math.sin(f);c=Math.sin((1-e)*f)/p,d=Math.sin(e*f)/p}return this.x=c*i+d*o,this.y=c*n+d*a,this.z=c*s+d*h,this.w=c*r+d*l,this},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n,r=s?1/s:0;return this.x=-t*r,this.y=-e*r,this.z=-i*r,this.w=n*r,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+s*r,this.y=i*o+n*r,this.z=n*o-i*r,this.w=s*o-e*r,this},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o-n*r,this.y=i*o+s*r,this.z=n*o+e*r,this.w=s*o-i*r,this},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+i*r,this.y=i*o-e*r,this.z=n*o+s*r,this.w=s*o-n*r,this},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this.x=(i[7]-i[5])*e,this.y=(i[2]-i[6])*e,this.z=(i[3]-i[1])*e;else{var s=0;i[4]>i[0]&&(s=1),i[8]>i[3*s+s]&&(s=2);var r=o[s],h=o[r];e=Math.sqrt(i[3*s+s]-i[3*r+r]-i[3*h+h]+1),a[s]=.5*e,e=.5/e,a[r]=(i[3*r+s]+i[3*s+r])*e,a[h]=(i[3*h+s]+i[3*s+h])*e,this.x=a[0],this.y=a[1],this.z=a[2],this.w=(i[3*h+r]-i[3*r+h])*e}return this}});t.exports=d},function(t,e,i){var n=i(338),s=i(28),r=i(32),o=i(176);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===r.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==r.HEADLESS)if(e.renderType===r.CANVAS||e.renderType!==r.CANVAS&&!o.webGL){if(!o.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");e.renderType=r.CANVAS}else e.renderType=r.WEBGL;e.antialias||s.disableSmoothing();var a,h,l=t.scale.baseSize,u=l.width,c=l.height;e.canvas?(t.canvas=e.canvas,t.canvas.width=u,t.canvas.height=c):t.canvas=s.create(t,u,c,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||n.setCrisp(t.canvas),e.renderType!==r.HEADLESS&&(a=i(339),h=i(342),e.renderType===r.WEBGL?t.renderer=new h(t):(t.renderer=new a(t),t.context=t.renderer.gameContext))}},function(t,e){t.exports={setCrisp:function(t){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach(function(e){t.style["image-rendering"]=e}),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},function(t,e,i){var n=i(340),s=i(53),r=i(0),o=i(32),a=i(341),h=i(102),l=i(35),u=new r({initialize:function(t){this.game=t,this.type=o.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.config={clearBeforeRender:t.config.clearBeforeRender,backgroundColor:t.config.backgroundColor,resolution:t.config.resolution,antialias:t.config.antialias,roundPixels:t.config.roundPixels},this.gameCanvas=t.canvas;var e={alpha:t.config.transparent,desynchronized:t.config.desynchronized};this.gameContext=this.game.config.context?this.game.config.context:this.gameCanvas.getContext("2d",e),this.currentContext=this.gameContext,this.antialias=t.config.antialias,this.blendModes=a(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new l,this._tempMatrix2=new l,this._tempMatrix3=new l,this._tempMatrix4=new l,this.init()},init:function(){this.game.scale.on(h.RESIZE,this.onResize,this);var t=this.game.scale.baseSize;this.resize(t.width,t.height)},onResize:function(t,e){e.width===this.width&&e.height===this.height||this.resize(e.width,e.height)},resize:function(t,e){this.width=t,this.height=e},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(t){return this.currentContext.globalCompositeOperation=t,this},setContext:function(t){return this.currentContext=t||this.gameContext,this},setAlpha:function(t){return this.currentContext.globalAlpha=t,this},preRender:function(){var t=this.gameContext,e=this.config,i=this.width,n=this.height;t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),e.clearBeforeRender&&t.clearRect(0,0,i,n),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,n)),t.save(),this.drawCount=0},render:function(t,e,i,n){var r=e.list,o=r.length,a=n._cx,h=n._cy,l=n._cw,u=n._ch,c=n.renderToTexture?n.context:t.sys.context;c.save(),this.game.scene.customViewports&&(c.beginPath(),c.rect(a,h,l,u),c.clip()),this.currentContext=c;var d=n.mask;d&&d.preRenderCanvas(this,null,n._maskCamera),n.transparent||(c.fillStyle=n.backgroundColor.rgba,c.fillRect(a,h,l,u)),c.globalAlpha=n.alpha,c.globalCompositeOperation="source-over",this.drawCount+=r.length,n.renderToTexture&&n.emit(s.PRE_RENDER,n),n.matrix.copyToContext(c);for(var f=0;f=0?y=-(y+d):y<0&&(y=Math.abs(y)-d)),t.flipY&&(x>=0?x=-(x+f):x<0&&(x=Math.abs(x)-f))}var w=1,b=1;t.flipX&&(p||(y+=-e.realWidth+2*v),w=-1),t.flipY&&(p||(x+=-e.realHeight+2*m),b=-1),a.applyITRS(t.x,t.y,t.rotation,t.scaleX*w,t.scaleY*b),o.copyFrom(i.matrix),n?(o.multiplyWithOffset(n,-i.scrollX*t.scrollFactorX,-i.scrollY*t.scrollFactorY),a.e=t.x,a.f=t.y,o.multiply(a,h)):(a.e-=i.scrollX*t.scrollFactorX,a.f-=i.scrollY*t.scrollFactorY,o.multiply(a,h)),r.save(),h.setToContext(r),r.globalCompositeOperation=this.blendModes[t.blendMode],r.globalAlpha=s,r.imageSmoothingEnabled=!(!this.antialias||e.source.scaleMode),r.drawImage(e.source.image,u,c,d,f,y,x,d/g,f/g),r.restore()}},destroy:function(){this.gameCanvas=null,this.gameContext=null,this.game=null}});t.exports=u},function(t,e,i){var n=i(28),s=i(36),r=i(1);t.exports=function(t,e){var i=r(e,"callback"),o=r(e,"type","image/png"),a=r(e,"encoder",.92),h=Math.abs(Math.round(r(e,"x",0))),l=Math.abs(Math.round(r(e,"y",0))),u=r(e,"width",t.width),c=r(e,"height",t.height);if(r(e,"getPixel",!1)){var d=t.getContext("2d").getImageData(h,l,1,1).data;i.call(null,new s(d[0],d[1],d[2],d[3]/255))}else if(0!==h||0!==l||u!==t.width||c!==t.height){var f=n.createWebGL(this,u,c);f.getContext("2d").drawImage(t,h,l,u,c,0,0,u,c);var p=new Image;p.onerror=function(){i.call(null),n.remove(f)},p.onload=function(){i.call(null,p),n.remove(f)},p.src=f.toDataURL(o,a)}else{var g=new Image;g.onerror=function(){i.call(null)},g.onload=function(){i.call(null,g)},g.src=t.toDataURL(o,a)}}},function(t,e,i){var n=i(42),s=i(316);t.exports=function(){var t=[],e=s.supportNewBlendModes,i="source-over";return t[n.NORMAL]=i,t[n.ADD]="lighter",t[n.MULTIPLY]=e?"multiply":i,t[n.SCREEN]=e?"screen":i,t[n.OVERLAY]=e?"overlay":i,t[n.DARKEN]=e?"darken":i,t[n.LIGHTEN]=e?"lighten":i,t[n.COLOR_DODGE]=e?"color-dodge":i,t[n.COLOR_BURN]=e?"color-burn":i,t[n.HARD_LIGHT]=e?"hard-light":i,t[n.SOFT_LIGHT]=e?"soft-light":i,t[n.DIFFERENCE]=e?"difference":i,t[n.EXCLUSION]=e?"exclusion":i,t[n.HUE]=e?"hue":i,t[n.SATURATION]=e?"saturation":i,t[n.COLOR]=e?"color":i,t[n.LUMINOSITY]=e?"luminosity":i,t[n.ERASE]="destination-out",t[n.SOURCE_IN]="source-in",t[n.SOURCE_OUT]="source-out",t[n.SOURCE_ATOP]="source-atop",t[n.DESTINATION_OVER]="destination-over",t[n.DESTINATION_IN]="destination-in",t[n.DESTINATION_OUT]="destination-out",t[n.DESTINATION_ATOP]="destination-atop",t[n.LIGHTER]="lighter",t[n.COPY]="copy",t[n.XOR]="xor",t}},function(t,e,i){var n=i(101),s=i(53),r=i(0),o=i(32),a=i(19),h=i(124),l=i(2),u=i(102),c=i(84),d=i(125),f=i(35),p=i(10),g=i(343),v=i(344),m=i(345),y=i(185),x=new r({initialize:function(t){var e=t.config,i={alpha:e.transparent,desynchronized:e.desynchronized,depth:!1,antialias:e.antialiasGL,premultipliedAlpha:e.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:e.failIfMajorPerformanceCaveat,powerPreference:e.powerPreference};this.config={clearBeforeRender:e.clearBeforeRender,antialias:e.antialias,backgroundColor:e.backgroundColor,contextCreation:i,resolution:e.resolution,roundPixels:e.roundPixels,maxTextures:e.maxTextures,maxTextureSize:e.maxTextureSize,batchSize:e.batchSize,maxLights:e.maxLights,mipmapFilter:e.mipmapFilter},this.game=t,this.type=o.WEBGL,this.width=0,this.height=0,this.canvas=t.canvas,this.blendModes=[],this.nativeTextures=[],this.contextLost=!1,this.pipelines=null,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92,isFramebuffer:!1,bufferWidth:0,bufferHeight:0},this.currentActiveTextureUnit=0,this.currentTextures=new Array(16),this.currentFramebuffer=null,this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=l,this.contextRestoredHandler=l,this.gl=null,this.supportedExtensions=null,this.extensions={},this.glFormats=[],this.compression={ETC1:!1,PVRTC:!1,S3TC:!1},this.drawingBufferHeight=0,this.blankTexture=null,this.defaultCamera=new n(0,0,0,0),this._tempMatrix1=new f,this._tempMatrix2=new f,this._tempMatrix3=new f,this._tempMatrix4=new f,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.mipmapFilter=null,this.init(this.config)},init:function(t){var e,i=this.game,n=this.canvas,s=t.backgroundColor;if(!(e=i.config.context?i.config.context:n.getContext("webgl",t.contextCreation)||n.getContext("experimental-webgl",t.contextCreation))||e.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=e;var r=this;this.contextLostHandler=function(t){r.contextLost=!0,r.game.events.emit(a.CONTEXT_LOST,r),t.preventDefault()},this.contextRestoredHandler=function(){r.contextLost=!1,r.init(r.config),r.game.events.emit(a.CONTEXT_RESTORED,r)},n.addEventListener("webglcontextlost",this.contextLostHandler,!1),n.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),i.context=e;for(var h=0;h<=27;h++)this.blendModes.push({func:[e.ONE,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_ADD});this.blendModes[1].func=[e.ONE,e.DST_ALPHA],this.blendModes[2].func=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[e.ONE,e.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[e.ZERO,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_REVERSE_SUBTRACT},this.glFormats[0]=e.BYTE,this.glFormats[1]=e.SHORT,this.glFormats[2]=e.UNSIGNED_BYTE,this.glFormats[3]=e.UNSIGNED_SHORT,this.glFormats[4]=e.FLOAT,this.glFuncMap={mat2:{func:e.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:e.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:e.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:e.uniform1f,length:1},"1fv":{func:e.uniform1fv,length:1},"1i":{func:e.uniform1i,length:1},"1iv":{func:e.uniform1iv,length:1},"2f":{func:e.uniform2f,length:2},"2fv":{func:e.uniform2fv,length:1},"2i":{func:e.uniform2i,length:2},"2iv":{func:e.uniform2iv,length:1},"3f":{func:e.uniform3f,length:3},"3fv":{func:e.uniform3fv,length:1},"3i":{func:e.uniform3i,length:3},"3iv":{func:e.uniform3iv,length:1},"4f":{func:e.uniform4f,length:4},"4fv":{func:e.uniform4fv,length:1},"4i":{func:e.uniform4i,length:4},"4iv":{func:e.uniform4iv,length:1}};var l=e.getSupportedExtensions();t.maxTextures||(t.maxTextures=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),t.maxTextureSize||(t.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE));var u="WEBGL_compressed_texture_",c="WEBKIT_"+u;this.compression.ETC1=e.getExtension(u+"etc1")||e.getExtension(c+"etc1"),this.compression.PVRTC=e.getExtension(u+"pvrtc")||e.getExtension(c+"pvrtc"),this.compression.S3TC=e.getExtension(u+"s3tc")||e.getExtension(c+"s3tc"),this.supportedExtensions=l,e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),e.enable(e.BLEND),e.clearColor(s.redGL,s.greenGL,s.blueGL,s.alphaGL),this.mipmapFilter=e[t.mipmapFilter];for(var f=0;f0&&n>0;if(o&&a){var h=o[0],l=o[1],u=o[2],c=o[3];a=h!==t||l!==e||u!==i||c!==n}a&&(this.flush(),r.scissor(t,s-e-n,i,n))},popScissor:function(){var t=this.scissorStack;t.pop();var e=t[t.length-1];e&&this.setScissor(e[0],e[1],e[2],e[3]),this.currentScissor=e},setPipeline:function(t,e){return this.currentPipeline===t&&this.currentPipeline.vertexBuffer===this.currentVertexBuffer&&this.currentPipeline.program===this.currentProgram||(this.flush(),this.currentPipeline=t,this.currentPipeline.bind()),this.currentPipeline.onBind(e),this.currentPipeline},hasActiveStencilMask:function(){var t=this.currentMask.mask,e=this.currentCameraMask.mask;return t&&t.isStencil||e&&e.isStencil},rebindPipeline:function(t){var e=this.gl;e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),this.hasActiveStencilMask()?e.clear(e.DEPTH_BUFFER_BIT):(e.disable(e.STENCIL_TEST),e.clear(e.DEPTH_BUFFER_BIT|e.STENCIL_BUFFER_BIT)),e.viewport(0,0,this.width,this.height),this.setBlendMode(0,!0),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.blankTexture.glTexture),this.currentActiveTextureUnit=0,this.currentTextures[0]=this.blankTexture.glTexture,this.currentPipeline=t,this.currentPipeline.bind(),this.currentPipeline.onBind()},clearPipeline:function(){this.flush(),this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.setBlendMode(0,!0)},setBlendMode:function(t,e){void 0===e&&(e=!1);var i=this.gl,n=this.blendModes[t];return!!(e||t!==o.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t)&&(this.flush(),i.enable(i.BLEND),i.blendEquation(n.equation),n.func.length>2?i.blendFuncSeparate(n.func[0],n.func[1],n.func[2],n.func[3]):i.blendFunc(n.func[0],n.func[1]),this.currentBlendMode=t,!0)},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return t>17&&this.blendModes[t]&&this.blendModes.splice(t,1),this},setBlankTexture:function(t){void 0===t&&(t=!1),!t&&0===this.currentActiveTextureUnit&&this.currentTextures[0]||this.setTexture2D(this.blankTexture.glTexture,0)},setTexture2D:function(t,e,i){void 0===i&&(i=!0);var n=this.gl;return t!==this.currentTextures[e]&&(i&&this.flush(),this.currentActiveTextureUnit!==e&&(n.activeTexture(n.TEXTURE0+e),this.currentActiveTextureUnit=e),n.bindTexture(n.TEXTURE_2D,t),this.currentTextures[e]=t),this},setFramebuffer:function(t,e){void 0===e&&(e=!1);var i=this.gl,n=this.width,s=this.height;return t!==this.currentFramebuffer&&(t&&t.renderTexture?(n=t.renderTexture.width,s=t.renderTexture.height):this.flush(),i.bindFramebuffer(i.FRAMEBUFFER,t),i.viewport(0,0,n,s),e&&(t?(this.drawingBufferHeight=s,this.pushScissor(0,0,n,s)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=t),this},setProgram:function(t){var e=this.gl;return t!==this.currentProgram&&(this.flush(),e.useProgram(t),this.currentProgram=t),this},setVertexBuffer:function(t){var e=this.gl;return t!==this.currentVertexBuffer&&(this.flush(),e.bindBuffer(e.ARRAY_BUFFER,t),this.currentVertexBuffer=t),this},setIndexBuffer:function(t){var e=this.gl;return t!==this.currentIndexBuffer&&(this.flush(),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.currentIndexBuffer=t),this},createTextureFromSource:function(t,e,i,n){var s=this.gl,r=s.NEAREST,a=s.NEAREST,l=s.CLAMP_TO_EDGE;e=t?t.width:e,i=t?t.height:i;var u=h(e,i);return u&&(l=s.REPEAT),n===o.ScaleModes.LINEAR&&this.config.antialias&&(r=u?this.mipmapFilter:s.LINEAR,a=s.LINEAR),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,r,a,l,l,s.RGBA,t):this.createTexture2D(0,r,a,l,l,s.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,s,r,o,a,l,u,c,d){u=void 0===u||null===u||u,void 0===c&&(c=!1),void 0===d&&(d=!1);var f=this.gl,p=f.createTexture();return this.setTexture2D(p,0),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,e),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,i),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_S,s),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_T,n),f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,d),null===o||void 0===o?f.texImage2D(f.TEXTURE_2D,t,r,a,l,0,r,f.UNSIGNED_BYTE,null):(c||(a=o.width,l=o.height),f.texImage2D(f.TEXTURE_2D,t,r,r,f.UNSIGNED_BYTE,o)),h(a,l)&&f.generateMipmap(f.TEXTURE_2D),this.setTexture2D(null,0),p.isAlphaPremultiplied=u,p.isRenderTexture=!1,p.width=a,p.height=l,this.nativeTextures.push(p),p},createFramebuffer:function(t,e,i,n){var s,r=this.gl,o=r.createFramebuffer();if(this.setFramebuffer(o),n){var a=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,a),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,a)}if(i.isRenderTexture=!0,i.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0),(s=r.checkFramebufferStatus(r.FRAMEBUFFER))!==r.FRAMEBUFFER_COMPLETE){throw new Error("Framebuffer incomplete. Framebuffer status: "+{36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"}[s])}return o.renderTexture=i,this.setFramebuffer(null),o},createProgram:function(t,e){var i=this.gl,n=i.createProgram(),s=i.createShader(i.VERTEX_SHADER),r=i.createShader(i.FRAGMENT_SHADER);if(i.shaderSource(s,t),i.shaderSource(r,e),i.compileShader(s),i.compileShader(r),!i.getShaderParameter(s,i.COMPILE_STATUS))throw new Error("Failed to compile Vertex Shader:\n"+i.getShaderInfoLog(s));if(!i.getShaderParameter(r,i.COMPILE_STATUS))throw new Error("Failed to compile Fragment Shader:\n"+i.getShaderInfoLog(r));if(i.attachShader(n,s),i.attachShader(n,r),i.linkProgram(n),!i.getProgramParameter(n,i.LINK_STATUS))throw new Error("Failed to link program:\n"+i.getProgramInfoLog(n));return n},createVertexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setVertexBuffer(n),i.bufferData(i.ARRAY_BUFFER,t,e),this.setVertexBuffer(null),n},createIndexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setIndexBuffer(n),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t,e),this.setIndexBuffer(null),n},deleteTexture:function(t){var e=this.nativeTextures.indexOf(t);return-1!==e&&c(this.nativeTextures,e),this.gl.deleteTexture(t),this.currentTextures[0]!==t||this.game.pendingDestroy||this.setBlankTexture(!0),this},deleteFramebuffer:function(t){return this.gl.deleteFramebuffer(t),this},deleteProgram:function(t){return this.gl.deleteProgram(t),this},deleteBuffer:function(t){return this.gl.deleteBuffer(t),this},preRenderCamera:function(t){var e=t._cx,i=t._cy,n=t._cw,r=t._ch,o=this.pipelines.TextureTintPipeline,a=t.backgroundColor;if(t.renderToTexture){this.flush(),this.pushScissor(e,i,n,-r),this.setFramebuffer(t.framebuffer);var h=this.gl;h.clearColor(0,0,0,0),h.clear(h.COLOR_BUFFER_BIT),o.projOrtho(e,n+e,i,r+i,-1e3,1e3),t.mask&&(this.currentCameraMask.mask=t.mask,this.currentCameraMask.camera=t._maskCamera,t.mask.preRenderWebGL(this,t,t._maskCamera)),a.alphaGL>0&&o.drawFillRect(e,i,n+e,r+i,p.getTintFromFloats(a.redGL,a.greenGL,a.blueGL,1),a.alphaGL),t.emit(s.PRE_RENDER,t)}else this.pushScissor(e,i,n,r),t.mask&&(this.currentCameraMask.mask=t.mask,this.currentCameraMask.camera=t._maskCamera,t.mask.preRenderWebGL(this,t,t._maskCamera)),a.alphaGL>0&&o.drawFillRect(e,i,n,r,p.getTintFromFloats(a.redGL,a.greenGL,a.blueGL,1),a.alphaGL)},getCurrentStencilMask:function(){var t=null,e=this.maskStack,i=this.currentCameraMask;return e.length>0?t=e[e.length-1]:i.mask&&i.mask.isStencil&&(t=i),t},postRenderCamera:function(t){var e=this.pipelines.TextureTintPipeline;if(t.flashEffect.postRenderWebGL(e,p.getTintFromFloats),t.fadeEffect.postRenderWebGL(e,p.getTintFromFloats),t.dirty=!1,this.popScissor(),t.renderToTexture){e.flush(),this.setFramebuffer(null),t.emit(s.POST_RENDER,t),e.projOrtho(0,e.width,e.height,0,-1e3,1e3);var i=p.getTintAppendFloatAlpha;(t.pipeline?t.pipeline:e).batchTexture(t,t.glTexture,t.width,t.height,t.x,t.y,t.width,t.height,t.zoom,t.zoom,t.rotation,t.flipX,!t.flipY,1,1,0,0,0,0,t.width,t.height,i(t._tintTL,t._alphaTL),i(t._tintTR,t._alphaTR),i(t._tintBL,t._alphaBL),i(t._tintBR,t._alphaBR),t._isTinted&&t.tintFill,0,0,this.defaultCamera,null),this.setBlankTexture(!0)}t.mask&&(this.currentCameraMask.mask=null,t.mask.postRenderWebGL(this,t._maskCamera))},preRender:function(){if(!this.contextLost){var t=this.gl,e=this.pipelines;if(t.bindFramebuffer(t.FRAMEBUFFER,null),this.config.clearBeforeRender){var i=this.config.backgroundColor;t.clearColor(i.redGL,i.greenGL,i.blueGL,i.alphaGL),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT)}for(var n in t.enable(t.SCISSOR_TEST),e)e[n].onPreRender();this.currentScissor=[0,0,this.width,this.height],this.scissorStack=[this.currentScissor],this.game.scene.customViewports&&t.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.setPipeline(this.pipelines.TextureTintPipeline)}},render:function(t,e,i,n){if(!this.contextLost){var s=e.list,r=s.length,a=this.pipelines;for(var h in a)a[h].onRender(t,n);if(this.preRenderCamera(n),0===r)return this.setBlendMode(o.BlendModes.NORMAL),void this.postRenderCamera(n);this.currentType="";for(var l=this.currentMask,u=0;u0&&r>0&&(this.setTexture2D(e,0),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,i),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.width=s,e.height=r,this.setTexture2D(null,0)),e},createVideoTexture:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=this.gl,s=n.NEAREST,r=n.NEAREST,o=t.videoWidth,a=t.videoHeight,l=n.CLAMP_TO_EDGE,u=h(o,a);return!e&&u&&(l=n.REPEAT),this.config.antialias&&(s=u?this.mipmapFilter:n.LINEAR,r=n.LINEAR),this.createTexture2D(0,s,r,l,l,n.RGBA,t,o,a,!0,!0,i)},updateVideoTexture:function(t,e,i){void 0===i&&(i=!1);var n=this.gl,s=t.videoWidth,r=t.videoHeight;return s>0&&r>0&&(this.setTexture2D(e,0),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,i),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.width=s,e.height=r,this.setTexture2D(null,0)),e},setTextureFilter:function(t,e){var i=this.gl,n=[i.LINEAR,i.NEAREST][e];return this.setTexture2D(t,0),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,n),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,n),this.setTexture2D(null,0),this},setFloat1:function(t,e,i){return this.setProgram(t),this.gl.uniform1f(this.gl.getUniformLocation(t,e),i),this},setFloat2:function(t,e,i,n){return this.setProgram(t),this.gl.uniform2f(this.gl.getUniformLocation(t,e),i,n),this},setFloat3:function(t,e,i,n,s){return this.setProgram(t),this.gl.uniform3f(this.gl.getUniformLocation(t,e),i,n,s),this},setFloat4:function(t,e,i,n,s,r){return this.setProgram(t),this.gl.uniform4f(this.gl.getUniformLocation(t,e),i,n,s,r),this},setFloat1v:function(t,e,i){return this.setProgram(t),this.gl.uniform1fv(this.gl.getUniformLocation(t,e),i),this},setFloat2v:function(t,e,i){return this.setProgram(t),this.gl.uniform2fv(this.gl.getUniformLocation(t,e),i),this},setFloat3v:function(t,e,i){return this.setProgram(t),this.gl.uniform3fv(this.gl.getUniformLocation(t,e),i),this},setFloat4v:function(t,e,i){return this.setProgram(t),this.gl.uniform4fv(this.gl.getUniformLocation(t,e),i),this},setInt1:function(t,e,i){return this.setProgram(t),this.gl.uniform1i(this.gl.getUniformLocation(t,e),i),this},setInt2:function(t,e,i,n){return this.setProgram(t),this.gl.uniform2i(this.gl.getUniformLocation(t,e),i,n),this},setInt3:function(t,e,i,n,s){return this.setProgram(t),this.gl.uniform3i(this.gl.getUniformLocation(t,e),i,n,s),this},setInt4:function(t,e,i,n,s,r){return this.setProgram(t),this.gl.uniform4i(this.gl.getUniformLocation(t,e),i,n,s,r),this},setMatrix2:function(t,e,i,n){return this.setProgram(t),this.gl.uniformMatrix2fv(this.gl.getUniformLocation(t,e),i,n),this},setMatrix3:function(t,e,i,n){return this.setProgram(t),this.gl.uniformMatrix3fv(this.gl.getUniformLocation(t,e),i,n),this},setMatrix4:function(t,e,i,n){return this.setProgram(t),this.gl.uniformMatrix4fv(this.gl.getUniformLocation(t,e),i,n),this},getMaxTextures:function(){return this.config.maxTextures},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){for(var t=0;t0&&this.flush();var e=this.inverseRotationMatrix;if(t){var i=-t,n=Math.cos(i),s=Math.sin(i);e[1]=s,e[3]=-s,e[0]=e[4]=n}else e[0]=e[4]=1,e[1]=e[3]=0;this.renderer.setMatrix3(this.program,"uInverseRotationMatrix",!1,e),this.currentNormalMapRotation=t}},batchSprite:function(t,e,i){if(this.active){var n=t.texture.dataSource[t.frame.sourceIndex];n&&(this.renderer.setPipeline(this),this.setTexture2D(n.glTexture,1),this.setNormalMapRotation(t.rotation),r.prototype.batchSprite.call(this,t,e,i))}}});a.LIGHT_COUNT=o,t.exports=a},function(t,e){var i={modelMatrixDirty:!1,viewMatrixDirty:!1,projectionMatrixDirty:!1,modelMatrix:null,viewMatrix:null,projectionMatrix:null,mvpInit:function(){return this.modelMatrixDirty=!0,this.viewMatrixDirty=!0,this.projectionMatrixDirty=!0,this.modelMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this},mvpUpdate:function(){var t=this.program;return this.modelMatrixDirty&&(this.renderer.setMatrix4(t,"uModelMatrix",!1,this.modelMatrix),this.modelMatrixDirty=!1),this.viewMatrixDirty&&(this.renderer.setMatrix4(t,"uViewMatrix",!1,this.viewMatrix),this.viewMatrixDirty=!1),this.projectionMatrixDirty&&(this.renderer.setMatrix4(t,"uProjectionMatrix",!1,this.projectionMatrix),this.projectionMatrixDirty=!1),this},modelIdentity:function(){var t=this.modelMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.modelMatrixDirty=!0,this},modelScale:function(t,e,i){var n=this.modelMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.modelMatrixDirty=!0,this},modelTranslate:function(t,e,i){var n=this.modelMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.modelMatrixDirty=!0,this},modelRotateX:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this.modelMatrixDirty=!0,this},modelRotateY:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this.modelMatrixDirty=!0,this},modelRotateZ:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this.modelMatrixDirty=!0,this},viewIdentity:function(){var t=this.viewMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.viewMatrixDirty=!0,this},viewScale:function(t,e,i){var n=this.viewMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.viewMatrixDirty=!0,this},viewTranslate:function(t,e,i){var n=this.viewMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.viewMatrixDirty=!0,this},viewRotateX:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this.viewMatrixDirty=!0,this},viewRotateY:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this.viewMatrixDirty=!0,this},viewRotateZ:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this.viewMatrixDirty=!0,this},viewLoad2D:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=0,e[4]=t[2],e[5]=t[3],e[6]=0,e[7]=0,e[8]=t[4],e[9]=t[5],e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this.viewMatrixDirty=!0,this},viewLoad:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this.viewMatrixDirty=!0,this},projIdentity:function(){var t=this.projectionMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.projectionMatrixDirty=!0,this},projOrtho:function(t,e,i,n,s,r){var o=this.projectionMatrix,a=1/(t-e),h=1/(i-n),l=1/(s-r);return o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*l,o[15]=1,this.projectionMatrixDirty=!0,this},projPersp:function(t,e,i,n){var s=this.projectionMatrix,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this.projectionMatrixDirty=!0,this}};t.exports=i},function(t,e,i){var n=i(32);t.exports=function(t){var e=t.config;if(!e.hideBanner){var i="WebGL";e.renderType===n.CANVAS?i="Canvas":e.renderType===n.HEADLESS&&(i="Headless");var s,r=e.audio,o=t.device.audio;if(s=!o.webAudio||r&&r.disableWebAudio?r&&r.noAudio||!o.webAudio&&!o.audioData?"No Audio":"HTML5 Audio":"Web Audio",t.device.browser.ie)window.console&&console.log("Phaser v"+n.VERSION+" / https://phaser.io");else{var a,h="",l=[h];Array.isArray(e.bannerBackgroundColor)?(e.bannerBackgroundColor.forEach(function(t){h=h.concat("%c "),l.push("background: "+t),a=t}),l[l.length-1]="color: "+e.bannerTextColor+"; background: "+a):(h=h.concat("%c "),l.push("color: "+e.bannerTextColor+"; background: "+e.bannerBackgroundColor)),l.push("background: #fff"),e.gameTitle&&(h=h.concat(e.gameTitle),e.gameVersion&&(h=h.concat(" v"+e.gameVersion)),e.hidePhaser||(h=h.concat(" / "))),e.hidePhaser||(h=h.concat("Phaser v"+n.VERSION+"-FB ("+i+" | "+s+")")),h=h.concat(" %c "+e.gameURL),l[0]=h,console.log.apply(console,l)}}}},function(t,e,i){var n=i(0),s=i(5),r=i(2),o=i(349),a=new n({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=s(e,"min",5),this.targetFps=s(e,"target",60),this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=r,this.forceSetTimeOut=s(e,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=s(e,"deltaHistory",10),this.panicMax=s(e,"panicMax",120),this.rawDelta=0,this.now=0},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var t=window.performance.now();this.time=t,this.lastTime=t,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0;for(var e=0;e0||!this.inFocus)&&(this._coolDown--,r=Math.min(r,this._target)),r>this._min&&(r=n[i],r=Math.min(r,this._min)),n[i]=r,this.deltaIndex++,this.deltaIndex>s&&(this.deltaIndex=0);for(var o=0,a=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t,this.frame++},tick:function(){this.step()},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running?this.sleep():t&&(this.startTime+=-this.lastTime+(this.lastTime+window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step()},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(2),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0,this.target=0;var t=this;this.step=function e(){var i=window.performance.now();t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.requestAnimationFrame(e)},this.stepTimeout=function e(){var i=Date.now(),n=Math.min(Math.max(2*t.target+t.tick-i,0),t.target);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,n)}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.target=i,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=s}});t.exports=r},function(t,e,i){var n=i(19);t.exports=function(t){var e,i=t.events;void 0!==document.hidden?e="visibilitychange":["webkit","moz","ms"].forEach(function(t){void 0!==document[t+"Hidden"]&&(document.hidden=function(){return document[t+"Hidden"]},e=t+"visibilitychange")});e&&document.addEventListener(e,function(t){document.hidden||"pause"===t.type?i.emit(n.HIDDEN):i.emit(n.VISIBLE)},!1),window.onblur=function(){i.emit(n.BLUR)},window.onfocus=function(){i.emit(n.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},function(t,e,i){var n=i(352),s=i(28),r=i(5);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",n),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),l=r(t,"resizeCanvas",!0),u=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),f=Math.floor(Math.abs(e[0].length*a)),p=Math.floor(Math.abs(e.length*h));i||(i=s.create2D(this,f,p),l=!1,u=!1),l&&(i.width=f,i.height=p);var g=i.getContext("2d");u&&g.clearRect(0,0,f,p),c&&c(i,g);for(var v=0;vi;)n-=i;ni.length-2?i.length-1:r+1],c=i[r>i.length-3?i.length-1:r+2];return e.set(n(a,h.x,l.x,u.x,c.x),n(a,h.y,l.y,u.y,c.y))},toJSON:function(){for(var t=[],e=0;e1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}},function(t,e,i){var n=i(122);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?n.cordova?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},function(t,e,i){var n=i(187);t.exports=function(t,e){var i=window.screen,s=!!i&&(i.orientation||i.mozOrientation||i.msOrientation);if(s&&"string"==typeof s.type)return s.type;if("string"==typeof s)return s;if(i)return i.height>i.width?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE;if("number"==typeof window.orientation)return 0===window.orientation||180===window.orientation?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return n.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return n.ORIENTATION.LANDSCAPE}return e>t?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE}},function(t,e){t.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},function(t,e){t.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},function(t,e){t.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5}},function(t,e){t.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},function(t,e){t.exports=function(t){var e;return""!==t&&("string"==typeof t?e=document.getElementById(t):t&&1===t.nodeType&&(e=t)),e||(e=document.body),e}},function(t,e){t.exports=function(t){var e="";try{window.DOMParser?e=(new DOMParser).parseFromString(t,"text/xml"):(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},function(t,e,i){var n=i(0),s=i(189),r=i(9),o=i(54),a=i(19),h=i(371),l=i(372),u=i(373),c=i(374),d=i(35),f=i(332),p=new n({initialize:function(t,e){this.game=t,this.scaleManager,this.canvas,this.config=e,this.enabled=!0,this.events=new r,this.isOver=!0,this.defaultCursor="",this.keyboard=e.inputKeyboard?new h(this):null,this.mouse=e.inputMouse?new l(this):null,this.touch=e.inputTouch?new c(this):null,this.pointers=[],this.pointersTotal=e.inputActivePointers,e.inputTouch&&1===this.pointersTotal&&(this.pointersTotal=2);for(var i=0;i<=this.pointersTotal;i++){var n=new u(this,i);n.smoothFactor=e.inputSmoothFactor,this.pointers.push(n)}this.mousePointer=e.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new d,this._tempMatrix2=new d,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],t.events.once(a.BOOT,this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.scaleManager=this.game.scale,this.events.emit(o.MANAGER_BOOT),this.game.events.on(a.PRE_RENDER,this.preRender,this),this.game.events.once(a.DESTROY,this.destroy,this)},setCanvasOver:function(t){this.isOver=!0,this.events.emit(o.GAME_OVER,t)},setCanvasOut:function(t){this.isOver=!1,this.events.emit(o.GAME_OUT,t)},preRender:function(){var t=this.game.loop.now,e=this.game.loop.delta,i=this.game.scene.getScenes(!0,!0);this.time=t,this.events.emit(o.MANAGER_UPDATE);for(var n=0;n10&&(t=10-this.pointersTotal);for(var i=0;i-1&&e.preventDefault()}},this.onKeyUp=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.useQueue||t.manager.events.emit(o.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}};var e=this.target;e&&(e.addEventListener("keydown",this.onKeyDown,!1),e.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var t=this.target;t.removeEventListener("keydown",this.onKeyDown,!1),t.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},removeCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(r.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});t.exports=l},function(t,e,i){var n=i(0),s=i(176),r=i(54),o=i(0),a=new n({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=o,this.onMouseDown=o,this.onMouseUp=o,this.onMouseDownWindow=o,this.onMouseUpWindow=o,this.onMouseOver=o,this.onMouseOut=o,this.onMouseWheel=o,this.pointerLockChange=o,t.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.capture=t.inputMouseCapture,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return document.body.addEventListener("contextmenu",function(t){return t.preventDefault(),!1}),this},requestPointerLock:function(){if(s.pointerLock){var t=this.target;t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock()}},releasePointerLock:function(){s.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t=this,e=this.manager.canvas,i=window&&window.focus&&this.manager.game.config.autoFocus;this.onMouseMove=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onMouseMove(e),t.capture&&e.preventDefault())},this.onMouseDown=function(n){i&&window.focus(),!n.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onMouseDown(n),t.capture&&n.target===e&&n.preventDefault())},this.onMouseDownWindow=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&i.target!==e&&t.manager.onMouseDown(i)},this.onMouseUp=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onMouseUp(i),t.capture&&i.target===e&&i.preventDefault())},this.onMouseUpWindow=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&i.target!==e&&t.manager.onMouseUp(i)},this.onMouseOver=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.setCanvasOver(e)},this.onMouseOut=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.setCanvasOut(e)},this.onMouseWheel=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.onMouseWheel(e)};var n=this.target;if(n){var r={passive:!0},o={passive:!1};n.addEventListener("mousemove",this.onMouseMove,this.capture?o:r),n.addEventListener("mousedown",this.onMouseDown,this.capture?o:r),n.addEventListener("mouseup",this.onMouseUp,this.capture?o:r),n.addEventListener("mouseover",this.onMouseOver,this.capture?o:r),n.addEventListener("mouseout",this.onMouseOut,this.capture?o:r),n.addEventListener("wheel",this.onMouseWheel,this.capture?o:r),window&&this.manager.game.config.inputWindowEvents&&(window.addEventListener("mousedown",this.onMouseDownWindow,o),window.addEventListener("mouseup",this.onMouseUpWindow,o)),s.pointerLock&&(this.pointerLockChange=function(e){var i=t.target;t.locked=document.pointerLockElement===i||document.mozPointerLockElement===i||document.webkitPointerLockElement===i,t.manager.onPointerLockChange(e)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("mouseover",this.onMouseOver),t.removeEventListener("mouseout",this.onMouseOut),window&&(window.removeEventListener("mousedown",this.onMouseDownWindow),window.removeEventListener("mouseup",this.onMouseUpWindow)),s.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=a},function(t,e,i){var n=i(317),s=i(0),r=i(63),o=i(178),a=i(326),h=i(3),l=new s({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new h,this.prevPosition=new h,this.midPoint=new h(-1,-1),this.velocity=new h,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=0===e,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(t){var e=this.x,i=this.y;1!==t.resolution&&(e+=t._x,i+=t._y);var n=t.getWorldPoint(e,i);return this.worldX=n.x,this.worldY=n.y,this},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},updateMotion:function(){var t=this.position.x,e=this.position.y,i=this.midPoint.x,s=this.midPoint.y;if(t!==i||e!==s){var r=a(this.motionFactor,i,t),h=a(this.motionFactor,s,e);o(r,t,.1)&&(r=t),o(h,e,.1)&&(h=e),this.midPoint.set(r,h);var l=t-r,u=e-h;this.velocity.set(l,u),this.angle=n(r,h,t,e),this.distance=Math.sqrt(l*l+u*u)}},up:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=t.timeStamp),this.isDown=!1,this.wasTouch=!1},down:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=t.timeStamp),this.isDown=!0,this.wasTouch=!1},move:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.locked&&(this.movementX=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.movementY=t.movementY||t.mozMovementY||t.webkitMovementY||0),this.moveTime=t.timeStamp,this.wasTouch=!1},wheel:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.deltaX=t.deltaX,this.deltaY=t.deltaY,this.deltaZ=t.deltaZ,this.wasTouch=!1},touchstart:function(t,e){t.pointerId&&(this.pointerId=t.pointerId),this.identifier=t.identifier,this.target=t.target,this.active=!0,this.buttons=1,this.event=e,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(t,e){this.event=e,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.moveTime=e.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return!!(1&this.buttons)},rightButtonDown:function(){return!!(2&this.buttons)},middleButtonDown:function(){return!!(4&this.buttons)},backButtonDown:function(){return!!(8&this.buttons)},forwardButtonDown:function(){return!!(16&this.buttons)},leftButtonReleased:function(){return 0===this.button&&!this.isDown},rightButtonReleased:function(){return 2===this.button&&!this.isDown},middleButtonReleased:function(){return 1===this.button&&!this.isDown},backButtonReleased:function(){return 3===this.button&&!this.isDown},forwardButtonReleased:function(){return 4===this.button&&!this.isDown},getDistance:function(){return this.isDown?r(this.downX,this.downY,this.x,this.y):r(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?n(this.downX,this.downY,this.x,this.y):n(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(t,e){void 0===t&&(t=10),void 0===e&&(e=[]);for(var i=this.prevPosition.x,n=this.prevPosition.y,s=this.position.x,r=this.position.y,o=0;o0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),t.events.on(a.PRE_STEP,this.step,this),this.startListeners()},parseConfig:function(t){this.getParent(t),this.getParentBounds();var e=t.width,i=t.height,s=t.scaleMode,r=t.resolution,o=t.zoom,a=t.autoRound;if("string"==typeof e){var h=this.parentSize.width;0===h&&(h=window.innerWidth);var l=parseInt(e,10)/100;e=Math.floor(h*l)}if("string"==typeof i){var c=this.parentSize.height;0===c&&(c=window.innerHeight);var d=parseInt(i,10)/100;i=Math.floor(c*d)}this.resolution=1,this.scaleMode=s,this.autoRound=a,this.autoCenter=t.autoCenter,this.resizeInterval=t.resizeInterval,a&&(e=Math.floor(e),i=Math.floor(i)),this.gameSize.setSize(e,i),o===n.ZOOM.MAX_ZOOM&&(o=this.getMaxZoom()),this.zoom=o,1!==o&&(this._resetZoom=!0),this.baseSize.setSize(e*r,i*r),a&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),t.minWidth>0&&this.displaySize.setMin(t.minWidth*o,t.minHeight*o),t.maxWidth>0&&this.displaySize.setMax(t.maxWidth*o,t.maxHeight*o),this.displaySize.setSize(e,i),this.orientation=u(e,i)},getParent:function(t){var e=t.parent;if(null!==e){if(this.parent=l(e),this.parentIsWindow=this.parent===document.body,t.expandParent&&t.scaleMode!==n.SCALE_MODE.NONE){var i=this.parent.getBoundingClientRect();(this.parentIsWindow||0===i.height)&&(document.documentElement.style.height="100%",document.body.style.height="100%",i=this.parent.getBoundingClientRect(),this.parentIsWindow||0!==i.height||(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}t.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=l(t.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var t=this.parentSize,e=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(e.height=h(!0));var i=this.resolution,n=e.width*i,s=e.height*i;return(t.width!==n||t.height!==s)&&(t.setSize(n,s),!0)},lockOrientation:function(t){var e=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return!!e&&e(t)},setParentSize:function(t,e){return this.parentSize.setSize(t,e),this.refresh()},setGameSize:function(t,e){var i=this.autoRound,n=this.resolution;i&&(t=Math.floor(t),e=Math.floor(e));var s=this.width,r=this.height;return this.gameSize.resize(t,e),this.baseSize.resize(t*n,e*n),i&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(t,e),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(s,r)},resize:function(t,e){var i=this.zoom,n=this.resolution,s=this.autoRound;s&&(t=Math.floor(t),e=Math.floor(e));var r=this.width,o=this.height;this.gameSize.resize(t,e),this.baseSize.resize(t*n,e*n),s&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(t*i*n,e*i*n),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var a=this.canvas.style,h=t*i,l=e*i;return s&&(h=Math.floor(h),l=Math.floor(l)),h===t&&l===e||(a.width=h+"px",a.height=l+"px"),this.refresh(r,o)},setZoom:function(t){return this.zoom=t,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},refresh:function(t,e){void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var i=this.game.domContainer;if(i){this.baseSize.setCSS(i);var n=this.canvas.style,s=i.style;s.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",s.marginLeft=n.marginLeft,s.marginTop=n.marginTop}return this.emit(o.RESIZE,this.gameSize,this.baseSize,this.displaySize,this.resolution,t,e),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var t=u(this.width,this.height);t!==this.orientation&&(this.orientation=t,this.emit(o.ORIENTATION_CHANGE,t))}},updateScale:function(){var t,e,i=this.canvas.style,s=this.gameSize.width,r=this.gameSize.height,o=this.zoom,a=this.autoRound;this.scaleMode===n.SCALE_MODE.NONE?(this.displaySize.setSize(s*o*1,r*o*1),t=this.displaySize.width/1,e=this.displaySize.height/1,a&&(t=Math.floor(t),e=Math.floor(e)),this._resetZoom&&(i.width=t+"px",i.height=e+"px",this._resetZoom=!1)):this.scaleMode===n.SCALE_MODE.RESIZE?(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(1*this.displaySize.width,1*this.displaySize.height),t=this.displaySize.width/1,e=this.displaySize.height/1,a&&(t=Math.floor(t),e=Math.floor(e)),this.canvas.width=t,this.canvas.height=e):(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),t=this.displaySize.width/1,e=this.displaySize.height/1,a&&(t=Math.floor(t),e=Math.floor(e)),i.width=t+"px",i.height=e+"px"),this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var t=p(this.parentSize.width,this.gameSize.width,0,!0),e=p(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(t,e),1)},updateCenter:function(){var t=this.autoCenter;if(t!==n.CENTER.NO_CENTER){var e=this.canvas,i=e.style,s=e.getBoundingClientRect(),r=s.width,o=s.height,a=Math.floor((this.parentSize.width-r)/2),h=Math.floor((this.parentSize.height-o)/2);t===n.CENTER.CENTER_HORIZONTALLY?h=0:t===n.CENTER.CENTER_VERTICALLY&&(a=0),i.marginLeft=a+"px",i.marginTop=h+"px"}},updateBounds:function(){var t=this.canvasBounds,e=this.canvas.getBoundingClientRect();t.x=e.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),t.y=e.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),t.width=e.width,t.height=e.height},transformX:function(t){return(t-this.canvasBounds.left)*this.displayScale.x},transformY:function(t){return(t-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(t){void 0===t&&(t={navigationUI:"hide"});var e=this.fullscreen;if(e.available){if(!e.active){var i,n=this.getFullscreenTarget();this._requestedFullscreenChange=!0,(i=e.keyboard?n[e.request](Element.ALLOW_KEYBOARD_INPUT):n[e.request](t))?i.then(this.fullscreenSuccessHandler.bind(this)).catch(this.fullscreenErrorHandler.bind(this)):e.active?this.fullscreenSuccessHandler():this.fullscreenErrorHandler()}}else this.emit(o.FULLSCREEN_UNSUPPORTED)},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(o.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(t){this.removeFullscreenTarget(),this.emit(o.FULLSCREEN_FAILED,t)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var t=document.createElement("div");t.style.margin="0",t.style.padding="0",t.style.width="100%",t.style.height="100%",this.fullscreenTarget=t,this._createdFullscreenTarget=!0}this._createdFullscreenTarget&&(this.canvas.parentNode.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas));return this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var t=this.fullscreenTarget;if(t&&t.parentNode){var e=t.parentNode;e.insertBefore(this.canvas,t),e.removeChild(t)}}},stopFullscreen:function(){var t=this.fullscreen;if(!t.available)return this.emit(o.FULLSCREEN_UNSUPPORTED),!1;t.active&&(this._requestedFullscreenChange=!0,document[t.cancel]()),this.removeFullscreenTarget(),this.getParentBounds(),this.emit(o.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(t){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(t)},startListeners:function(){var t=this,e=this.listeners;if(e.orientationChange=function(){t._checkOrientation=!0,t.dirty=!0},e.windowResize=function(){t.dirty=!0},window.addEventListener("orientationchange",e.orientationChange,!1),window.addEventListener("resize",e.windowResize,!1),this.fullscreen.available){e.fullScreenChange=function(e){return t.onFullScreenChange(e)},e.fullScreenError=function(e){return t.onFullScreenError(e)};["webkit","moz",""].forEach(function(t){document.addEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.addEventListener(t+"fullscreenerror",e.fullScreenError,!1)}),document.addEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.addEventListener("MSFullscreenError",e.fullScreenError,!1)}},onFullScreenChange:function(){this._requestedFullscreenChange||this.stopFullscreen(),this._requestedFullscreenChange=!1},onFullScreenError:function(){this.removeFullscreenTarget()},step:function(t,e){this.parent&&(this._lastCheck+=e,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var t=this.listeners;window.removeEventListener("orientationchange",t.orientationChange,!1),window.removeEventListener("resize",t.windowResize,!1);["webkit","moz",""].forEach(function(e){document.removeEventListener(e+"fullscreenchange",t.fullScreenChange,!1),document.removeEventListener(e+"fullscreenerror",t.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",t.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",t.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===n.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===n.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=v},function(t,e,i){var n=i(24),s=i(0),r=i(103),o=i(3),a=new s({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=null),this._width=t,this._height=e,this._parent=n,this.aspectMode=i,this.aspectRatio=0===e?1:t/e,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new o},setAspectMode:function(t){return void 0===t&&(t=0),this.aspectMode=t,this.setSize(this._width,this._height)},setSnap:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.snapTo.set(t,e),this.setSize(this._width,this._height)},setParent:function(t){return this._parent=t,this.setSize(this._width,this._height)},setMin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.minWidth=n(t,0,this.maxWidth),this.minHeight=n(e,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(t,e){return void 0===t&&(t=Number.MAX_VALUE),void 0===e&&(e=t),this.maxWidth=n(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=n(e,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(t,e){switch(void 0===t&&(t=0),void 0===e&&(e=t),this.aspectMode){case a.NONE:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case a.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case a.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(r(e,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case a.FIT:this.constrain(t,e,!0);break;case a.ENVELOP:this.constrain(t,e,!1)}return this},setAspectRatio:function(t){return this.aspectRatio=t,this.setSize(this._width,this._height)},resize:function(t,e){return this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minWidth,this.maxWidth),e&&this._parent&&t>this._parent.width&&(t=Math.max(this.minWidth,this._parent.width)),t},getNewHeight:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minHeight,this.maxHeight),e&&this._parent&&t>this._parent.height&&(t=Math.max(this.minHeight,this._parent.height)),t},constrain:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=!0),t=this.getNewWidth(t),e=this.getNewHeight(e);var n=this.snapTo,s=0===e?1:t/e;return i&&this.aspectRatio>s||!i&&this.aspectRatio0&&(t=(e=r(e,n.y))*this.aspectRatio)):(i&&this.aspectRatios)&&(t=(e=r(e,n.y))*this.aspectRatio,n.x>0&&(e=(t=r(t,n.x))*(1/this.aspectRatio))),this._width=t,this._height=e,this},fitTo:function(t,e){return this.constrain(t,e,!0)},envelop:function(t,e){return this.constrain(t,e,!1)},setWidth:function(t){return this.setSize(t,this._height)},setHeight:function(t){return this.setSize(this._width,t)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(t){t&&t.style&&(t.style.width=this._width+"px",t.style.height=this._height+"px")},copy:function(t){return t.setAspectMode(this.aspectMode),t.aspectRatio=this.aspectRatio,t.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(t){this.setSize(t,this._height)}},height:{get:function(){return this._height},set:function(t){this.setSize(this._width,t)}}});a.NONE=0,a.WIDTH_CONTROLS_HEIGHT=1,a.HEIGHT_CONTROLS_WIDTH=2,a.FIT=3,a.ENVELOP=4,t.exports=a},function(t,e,i){var n=i(0),s=i(129),r=i(21),o=i(19),a=i(5),h=i(86),l=i(2),u=i(379),c=i(190),d=new n({initialize:function(t,e){if(this.game=t,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,e){Array.isArray(e)||(e=[e]);for(var i=0;i-1&&(delete this.keys[n],this.scenes.splice(i,1),this._start.indexOf(n)>-1&&(i=this._start.indexOf(n),this._start.splice(i,1)),e.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,n=i.settings;t.init&&(t.init.call(t,n.data),n.status=s.INIT,n.isTransition&&i.events.emit(r.TRANSITION_INIT,n.transitionFrom,n.transitionDuration)),i.load&&(e=i.load).reset(),e&&t.preload?(t.preload.call(t),0===e.list.size?this.create(t):(n.status=s.LOADING,e.once(h.COMPLETE,this.loadComplete,this),e.start())):this.create(t)},loadComplete:function(t){var e=t.scene;this.game.sound&&this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(e)},payloadComplete:function(t){this.bootScene(t.scene)},update:function(t,e){this.processQueue(),this.isProcessing=!0;for(var i=this.scenes.length-1;i>=0;i--){var n=this.scenes[i].sys;n.settings.status>s.START&&n.settings.status<=s.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e=s.LOADING&&i.settings.status0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,n=this.getScene(t),s=this.getAt(i);this.scenes[e]=s,this.scenes[i]=n}}return this},moveUp:function(t){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e=r.x&&t=r.y&&e=r.x&&t=r.y&&e-1){var o=this.context.getImageData(t,e,1,1);o.data[0]=i,o.data[1]=n,o.data[2]=s,o.data[3]=r,this.context.putImageData(o,t,e)}return this},putData:function(t,e,i,n,s,r,o){return void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=t.width),void 0===o&&(o=t.height),this.context.putImageData(t,e,i,n,s,r,o),this},getData:function(t,e,i,n){return t=s(Math.floor(t),0,this.width-1),e=s(Math.floor(e),0,this.height-1),i=s(i,1,this.width-t),n=s(n,1,this.height-e),this.context.getImageData(t,e,i,n)},getPixel:function(t,e,i){i||(i=new r);var n=this.getIndex(t,e);if(n>-1){var s=this.data,o=s[n+0],a=s[n+1],h=s[n+2],l=s[n+3];i.setTo(o,a,h,l)}return i},getPixels:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=i),t=Math.abs(Math.round(t)),e=Math.abs(Math.round(e));for(var o=s(t,0,this.width),a=s(t+i,0,this.width),h=s(e,0,this.height),l=s(e+n,0,this.height),u=new r,c=[],d=h;d0)&&(!!n.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(r.PAUSE,this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!n.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit(r.RESUME,this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!n.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit(r.STOP,this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t0)this.startTime=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s=n)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit(r.COMPLETE,this);this.previousTime=s}},destroy:function(){n.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=this.currentConfig.volume*this.manager.volume)},calculateRate:function(){n.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.updateMute(),this.emit(r.MUTE,this,t))}},setMute:function(t){return this.mute=t,this},volume:{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.updateVolume(),this.emit(r.VOLUME,this,t))}},setVolume:function(t){return this.volume=t,this},rate:{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,r.RATE,t)||(this.calculateRate(),this.emit(r.RATE,this,t))}},setRate:function(t){return this.rate=t,this},detune:{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,r.DETUNE,t)||(this.calculateRate(),this.emit(r.DETUNE,this,t))}},setDetune:function(t){return this.detune=t,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit(r.SEEK,this,t))}},setSeek:function(t){return this.seek=t,this},loop:{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit(r.LOOP,this,t))}},setLoop:function(t){return this.loop=t,this}});t.exports=o},function(t,e,i){var n=i(130),s=i(0),r=i(9),o=i(389),a=i(2),h=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return n.prototype.remove.call(this,t)},removeByKey:function(t){return n.prototype.removeByKey.call(this,t)},pauseAll:a,resumeAll:a,stopAll:a,update:a,setRate:a,setDetune:a,setMute:a,setVolume:a,forEachActiveSound:function(t,e){n.prototype.forEachActiveSound.call(this,t,e)},destroy:function(){n.prototype.destroy.call(this)}});t.exports=h},function(t,e,i){var n=i(131),s=i(0),r=i(9),o=i(17),a=new s({Extends:r,initialize:function(t,e,i){void 0===i&&(i={}),r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!1},updateMarker:function(t){return!1},removeMarker:function(t){return null},play:function(t,e){return!1},pause:function(){return!1},resume:function(){return!1},stop:function(){return!1},destroy:function(){this.manager.remove(this),n.prototype.destroy.call(this)}});t.exports=a},function(t,e,i){var n=i(391),s=i(130),r=i(0),o=i(64),a=i(392),h=new r({Extends:s,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&("ontouchstart"in window||"onclick"in window),s.call(this,t),this.locked&&this.unlock()},createAudioContext:function(t){var e=t.config.audio;return e&&e.context?(e.context.resume(),e.context):new AudioContext},setAudioContext:function(t){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=t,this.masterMuteNode=t.createGain(),this.masterVolumeNode=t.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(t.destination),this.destination=this.masterMuteNode,this},add:function(t,e){var i=new a(this,t,e);return this.sounds.push(i),i},decodeAudio:function(t,e){var i;i=Array.isArray(t)?t:[{key:t,data:e}];for(var s=this.game.cache.audio,r=i.length,a=0;a>4,u[h++]=(15&i)<<4|s>>2,u[h++]=(3&s)<<6|63&r;return l}},function(t,e,i){var n=i(131),s=i(0),r=i(64),o=new s({Extends:n,initialize:function(t,e,i){void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),this.audioBuffer?(this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,n.call(this,t,e,i)):console.warn("Audio cache entry missing: "+e)},play:function(t,e){return!!n.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime1e3)return console.warn("Switch Game data too long. Max 1000 chars."),this;var i=this;return FBInstant.switchGameAsync(t,e).then(function(){i.emit("switchgame",t)}).catch(function(t){i.emit("switchgamefail",t)}),this},createShortcut:function(){var t=this;return FBInstant.canCreateShortcutAsync().then(function(e){e&&FBInstant.createShortcutAsync().then(function(){t.emit("shortcutcreated")}).catch(function(e){t.emit("shortcutfailed",e)})}),this},quit:function(){FBInstant.quit()},log:function(t,e,i){return this.checkAPI("logEvent")?(void 0===i&&(i={}),t.length>=2&&t.length<=40&&FBInstant.logEvent(t,parseFloat(e),i),this):this},preloadAds:function(t){if(!this.checkAPI("getInterstitialAdAsync"))return this;var e;Array.isArray(t)||(t=[t]);var i=this,s=0;for(e=0;e=3)return console.warn("Too many AdInstances. Show an ad before loading more"),this;for(e=0;e=3)return console.warn("Too many AdInstances. Show an ad before loading more"),this;for(e=0;e-1;r--)n[s][r]=t[r][s]}return n}},function(t,e){function i(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function n(t,e){return te?1:0}var s=function(t,e,r,o,a){for(void 0===r&&(r=0),void 0===o&&(o=t.length-1),void 0===a&&(a=n);o>r;){if(o-r>600){var h=o-r+1,l=e-r+1,u=Math.log(h),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),f=Math.max(r,Math.floor(e-l*c/h+d)),p=Math.min(o,Math.floor(e+(h-l)*c/h+d));s(t,e,f,p,a)}var g=t[e],v=r,m=o;for(i(t,r,e),a(t[o],g)>0&&i(t,r,o);v0;)m--}0===a(t[r],g)?i(t,r,m):i(t,++m,o),m<=e&&(r=m+1),e<=m&&(o=m-1)}};t.exports=s},function(t,e,i){var n=i(5),s=i(120),r=function(t,e,i){for(var n=[],s=0;s0?s.delayedPlay(d,r,o):s.load(r)}return t}},function(t,e,i){var n=i(11);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=Math.min(t.x,e.x),r=Math.min(t.y,e.y),o=Math.max(t.right,e.right)-s,a=Math.max(t.bottom,e.bottom)-r;return i.setTo(s,r,o,a)}},function(t,e,i){var n=i(0),s=i(12),r=i(975),o=i(14),a=i(7),h=i(188),l=i(333),u=new n({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.ScrollFactor,s.Transform,s.Visible,r],initialize:function(t,e,i,n,s,r){o.call(this,t,"DOMElement"),this.parent=t.sys.game.domContainer,this.cache=t.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new l,this.rotate3dAngle="deg",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(e,i),"string"==typeof n?"#"===n[0]?this.setElement(n.substr(1),s,r):this.createElement(n,s,r):n&&this.setElement(n,s,r)},setSkew:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.skewX=t,this.skewY=e,this},setPerspective:function(t){return this.parent.style.perspective=t+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(t){this.parent.style.perspective=t+"px"}},addListener:function(t){if(this.node){t=t.split(" ");for(var e=0;e>>16,y=(65280&p)>>>8,x=255&p,c.strokeStyle="rgba("+m+","+y+","+x+","+d+")",c.lineWidth=v,T+=3;break;case n.FILL_STYLE:g=l[T+1],f=l[T+2],m=(16711680&g)>>>16,y=(65280&g)>>>8,x=255&g,c.fillStyle="rgba("+m+","+y+","+x+","+f+")",T+=2;break;case n.BEGIN_PATH:c.beginPath();break;case n.CLOSE_PATH:c.closePath();break;case n.FILL_PATH:h||c.fill();break;case n.STROKE_PATH:h||c.stroke();break;case n.FILL_RECT:h?c.rect(l[T+1],l[T+2],l[T+3],l[T+4]):c.fillRect(l[T+1],l[T+2],l[T+3],l[T+4]),T+=4;break;case n.FILL_TRIANGLE:c.beginPath(),c.moveTo(l[T+1],l[T+2]),c.lineTo(l[T+3],l[T+4]),c.lineTo(l[T+5],l[T+6]),c.closePath(),h||c.fill(),T+=6;break;case n.STROKE_TRIANGLE:c.beginPath(),c.moveTo(l[T+1],l[T+2]),c.lineTo(l[T+3],l[T+4]),c.lineTo(l[T+5],l[T+6]),c.closePath(),h||c.stroke(),T+=6;break;case n.LINE_TO:c.lineTo(l[T+1],l[T+2]),T+=2;break;case n.MOVE_TO:c.moveTo(l[T+1],l[T+2]),T+=2;break;case n.LINE_FX_TO:c.lineTo(l[T+1],l[T+2]),T+=5;break;case n.MOVE_FX_TO:c.moveTo(l[T+1],l[T+2]),T+=5;break;case n.SAVE:c.save();break;case n.RESTORE:c.restore();break;case n.TRANSLATE:c.translate(l[T+1],l[T+2]),T+=2;break;case n.SCALE:c.scale(l[T+1],l[T+2]),T+=2;break;case n.ROTATE:c.rotate(l[T+1]),T+=1;break;case n.GRADIENT_FILL_STYLE:T+=5;break;case n.GRADIENT_LINE_STYLE:T+=6;break;case n.SET_TEXTURE:T+=2}c.restore()}}},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(t,e,i,n,r){if("object"==typeof t){var o=t;t=s(o,"x",0),e=s(o,"y",0),i=s(o,"power",0),n=s(o,"epsilon",100),r=s(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i=this.x-t.x,n=this.y-t.y,s=i*i+n*n;if(0!==s){var r=Math.sqrt(s);s0},resetPosition:function(){this.x=0,this.y=0},fire:function(t,e){var i=this.emitter;this.frame=i.getFrame(),i.emitZone&&i.emitZone.getPoint(this),void 0===t?(i.follow&&(this.x+=i.follow.x+i.followOffset.x),this.x+=i.x.onEmit(this,"x")):this.x+=t,void 0===e?(i.follow&&(this.y+=i.follow.y+i.followOffset.y),this.y+=i.y.onEmit(this,"y")):this.y+=e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var n=i.speedX.onEmit(this,"speedX"),o=i.speedY?i.speedY.onEmit(this,"speedY"):n;if(i.radial){var a=s(i.angle.onEmit(this,"angle"));this.velocityX=Math.cos(a)*Math.abs(n),this.velocityY=Math.sin(a)*Math.abs(o)}else if(i.moveTo){var h=i.moveToX.onEmit(this,"moveToX"),l=i.moveToY?i.moveToY.onEmit(this,"moveToY"):h,u=Math.atan2(l-this.y,h-this.x),c=r(this.x,this.y,h,l)/(this.life/1e3);this.velocityX=Math.cos(u)*c,this.velocityY=Math.sin(u)*c}else this.velocityX=n,this.velocityY=o;i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY?i.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=s(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint")},computeVelocity:function(t,e,i,n){var s=this.velocityX,r=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,l=this.maxVelocityY;s+=t.gravityX*i,r+=t.gravityY*i,o&&(s+=o*i),a&&(r+=a*i),s>h?s=h:s<-h&&(s=-h),r>l?r=l:r<-l&&(r=-l),this.velocityX=s,this.velocityY=r;for(var u=0;ue.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(this.delayCurrent>0)return this.delayCurrent-=t,!1;var n=this.emitter,r=1-this.lifeCurrent/this.life;return this.lifeT=r,this.computeVelocity(n,t,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,n.bounds&&this.checkBounds(n),n.deathZone&&n.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=n.scaleX.onUpdate(this,"scaleX",r,this.scaleX),n.scaleY?this.scaleY=n.scaleY.onUpdate(this,"scaleY",r,this.scaleY):this.scaleY=this.scaleX,this.angle=n.rotate.onUpdate(this,"rotate",r,this.angle),this.rotation=s(this.angle),this.alpha=n.alpha.onUpdate(this,"alpha",r,this.alpha),this.tint=n.tint.onUpdate(this,"tint",r,this.tint),this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=o},function(t,e,i){var n=i(42),s=i(0),r=i(12),o=i(409),a=i(410),h=i(992),l=i(1),u=i(195),c=i(411),d=i(90),f=i(407),p=i(412),g=i(11),v=i(134),m=i(3),y=i(62),x=new s({Mixins:[r.BlendMode,r.Mask,r.ScrollFactor,r.Visible],initialize:function(t,e){this.manager=t,this.texture=t.texture,this.frames=[t.defaultFrame],this.defaultFrame=t.defaultFrame,this.configFastMap=["active","blendMode","collideBottom","collideLeft","collideRight","collideTop","deathCallback","deathCallbackScope","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxParticles","name","on","particleBringToTop","particleClass","radial","timeScale","trackVisible","visible"],this.configOpMap=["accelerationX","accelerationY","angle","alpha","bounce","delay","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],this.name="",this.particleClass=f,this.x=new h(e,"x",0,!0),this.y=new h(e,"y",0,!0),this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.accelerationX=new h(e,"accelerationX",0,!0),this.accelerationY=new h(e,"accelerationY",0,!0),this.maxVelocityX=new h(e,"maxVelocityX",1e4,!0),this.maxVelocityY=new h(e,"maxVelocityY",1e4,!0),this.speedX=new h(e,"speedX",0,!0),this.speedY=new h(e,"speedY",0,!0),this.moveTo=!1,this.moveToX=new h(e,"moveToX",0,!0),this.moveToY=new h(e,"moveToY",0,!0),this.bounce=new h(e,"bounce",0,!0),this.scaleX=new h(e,"scaleX",1),this.scaleY=new h(e,"scaleY",1),this.tint=new h(e,"tint",4294967295),this.alpha=new h(e,"alpha",1),this.lifespan=new h(e,"lifespan",1e3,!0),this.angle=new h(e,"angle",{min:0,max:360},!0),this.rotate=new h(e,"rotate",0),this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.quantity=new h(e,"quantity",1,!0),this.delay=new h(e,"delay",0,!0),this.frequency=0,this.on=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZone=null,this.deathZone=null,this.bounds=null,this.collideLeft=!0,this.collideRight=!0,this.collideTop=!0,this.collideBottom=!0,this.active=!0,this.visible=!0,this.blendMode=n.NORMAL,this.follow=null,this.followOffset=new m,this.trackVisible=!1,this.currentFrame=0,this.randomFrame=!0,this.frameQuantity=1,this.dead=[],this.alive=[],this._counter=0,this._frameCounter=0,e&&this.fromJSON(e)},fromJSON:function(t){if(!t)return this;var e=0,i="";for(e=0;e0&&this.getParticleCount()===this.maxParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,n=i.length,s=0;s0){var u=this.deathCallback,c=this.deathCallbackScope;for(o=h-1;o>=0;o--){var d=a[o];s.splice(d.index,1),r.push(d.particle),u&&u.call(c,d.particle),d.particle.resetPosition()}}this.on&&(0===this.frequency?this.emitParticle():this.frequency>0&&(this._counter-=e,this._counter<=0&&(this.emitParticle(),this._counter=this.frequency-Math.abs(this._counter))))},depthSortCallback:function(t,e){return t.y-e.y}});t.exports=x},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=this.source.contains(t.x,t.y);return e&&this.killOnEnter||!e&&!this.killOnEnter}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s){void 0===n&&(n=!1),void 0===s&&(s=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=s,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=n},function(t,e){t.exports=function(t,e){for(var i=0;i0&&(s=-h.PI2+s%h.PI2):s>h.PI2?s=h.PI2:s<0&&(s=h.PI2+s%h.PI2);for(var u,c=[a+Math.cos(n)*i,l+Math.sin(n)*i];e<1;)u=s*e+n,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),e+=t;return u=s+n,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),c.push(a+Math.cos(n)*i,l+Math.sin(n)*i),this.pathIndexes=o(c),this.pathData=c,this}});t.exports=u},function(t,e,i){var n=i(0),s=i(1018),r=i(71),o=i(11),a=i(33),h=new n({Extends:a,Mixins:[s],initialize:function(t,e,i,n,s,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",n),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==s&&this.setFillStyle(s,r),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){var t=this._curveBounds,e=this._smoothness;this.geom.getBounds(t,e),this.setSize(t.width,t.height),this.updateDisplayOrigin();for(var i=[],n=this.geom.getPoints(e),s=0;sc+v)){var m=g.getPoint((u-c)/v);o.push(m);break}c+=v}return o}},function(t,e,i){var n=i(61),s=i(60);t.exports=function(t){for(var e=t.points,i=0,r=0;r0&&r.push(i([0,0],n[0])),e=0;e1&&r.push(i([0,0],n[n.length-1])),t.setTo(r)}},function(t,e,i){var n=i(0),s=i(11),r=i(33),o=i(1039),a=new n({Extends:r,Mixins:[o],initialize:function(t,e,i,n,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===o&&(o=128),r.call(this,t,"Rectangle",new s(0,0,n,o)),this.setPosition(e,i),this.setSize(n,o),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),e.getLineD(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=a},function(t,e,i){var n=i(1042),s=i(0),r=i(71),o=i(33),a=new s({Extends:o,Mixins:[n],initialize:function(t,e,i,n,s,r,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=5),void 0===s&&(s=32),void 0===r&&(r=64),o.call(this,t,"Star",null),this._points=n,this._innerRadius=s,this._outerRadius=r,this.setPosition(e,i),this.setSize(2*r,2*r),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},setPoints:function(t){return this._points=t,this.updateData()},setInnerRadius:function(t){return this._innerRadius=t,this.updateData()},setOuterRadius:function(t){return this._outerRadius=t,this.updateData()},points:{get:function(){return this._points},set:function(t){this._points=t,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(t){this._innerRadius=t,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(t){this._outerRadius=t,this.updateData()}},updateData:function(){var t=[],e=this._points,i=this._innerRadius,n=this._outerRadius,s=Math.PI/2*3,o=Math.PI/e,a=n,h=n;t.push(a,h+-n);for(var l=0;l=1)return i.x=r.x1,i.y=r.y1,i;var h=s(r),l=s(o),u=s(a),c=(h+l+u)*e,d=0;return ch+l?(d=(c-=h+l)/u,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/l,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},function(t,e,i){var n=i(61),s=i(4);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),l=n(o),u=n(a),c=n(h),d=l+u+c;e||(e=d/i);for(var f=0;fl+u?(g=(p-=l+u)/c,v.x=h.x1+(h.x2-h.x1)*g,v.y=h.y1+(h.y2-h.y1)*g):(g=(p-=l)/u,v.x=a.x1+(a.x2-a.x1)*g,v.y=a.y1+(a.y2-a.y1)*g),r.push(v)}return r}},function(t,e){t.exports=function(t,e,i){if(!t||"number"==typeof t)return!1;if(t.hasOwnProperty(e))return t[e]=i,!0;if(-1!==e.indexOf(".")){for(var n=e.split("."),s=t,r=t,o=0;o0?(h=this.lightPool.pop()).set(t,e,i,a[0],a[1],a[2],o):h=new s(t,e,i,a[0],a[1],a[2],o),this.lights.push(h),h},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&(this.lightPool.push(t),this.lights.splice(e,1)),this},shutdown:function(){for(;this.lights.length>0;)this.lightPool.push(this.lights.pop());this.ambientColor={r:.1,g:.1,b:.1},this.culledLights.length=0,this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=o},function(t,e,i){var n=i(51),s=i(17),r={Circle:i(1103),Ellipse:i(1113),Intersects:i(435),Line:i(1132),Point:i(1153),Polygon:i(1167),Rectangle:i(448),Triangle:i(1197)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={CircleToCircle:i(214),CircleToRectangle:i(215),GetCircleToCircle:i(1123),GetCircleToRectangle:i(1124),GetLineToCircle:i(216),GetLineToRectangle:i(218),GetRectangleIntersection:i(1125),GetRectangleToRectangle:i(1126),GetRectangleToTriangle:i(1127),GetTriangleToCircle:i(1128),GetTriangleToLine:i(440),GetTriangleToTriangle:i(1129),LineToCircle:i(217),LineToLine:i(92),LineToRectangle:i(436),PointToLine:i(444),PointToLineSegment:i(1130),RectangleToRectangle:i(137),RectangleToTriangle:i(437),RectangleToValues:i(1131),TriangleToCircle:i(439),TriangleToLine:i(441),TriangleToTriangle:i(442)}},function(t,e){t.exports=function(t,e){var i=t.x1,n=t.y1,s=t.x2,r=t.y2,o=e.x,a=e.y,h=e.right,l=e.bottom,u=0;if(i>=o&&i<=h&&n>=a&&n<=l||s>=o&&s<=h&&r>=a&&r<=l)return!0;if(i=o){if((u=n+(r-n)*(o-i)/(s-i))>a&&u<=l)return!0}else if(i>h&&s<=h&&(u=n+(r-n)*(h-i)/(s-i))>=a&&u<=l)return!0;if(n=a){if((u=i+(s-i)*(a-n)/(r-n))>=o&&u<=h)return!0}else if(n>l&&r<=l&&(u=i+(s-i)*(l-n)/(r-n))>=o&&u<=h)return!0;return!1}},function(t,e,i){var n=i(92),s=i(52),r=i(219),o=i(438);t.exports=function(t,e){if(e.left>t.right||e.rightt.bottom||e.bottom0}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},function(t,e,i){var n=i(217),s=i(91);t.exports=function(t,e){return!(t.left>e.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottom0||(c=s(e),(d=n(t,c,!0)).length>0)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},function(t,e){t.exports=function(t,e,i){void 0===i&&(i=1);var n=e.x1,s=e.y1,r=e.x2,o=e.y2,a=t.x,h=t.y,l=(r-n)*(r-n)+(o-s)*(o-s);if(0===l)return!1;var u=((a-n)*(r-n)+(h-s)*(o-s))/l;if(u<0)return Math.sqrt((n-a)*(n-a)+(s-h)*(s-h))<=i;if(u>=0&&u<=1){var c=((s-h)*(r-n)-(n-a)*(o-s))/l;return Math.abs(c)*Math.sqrt(l)<=i}return Math.sqrt((r-a)*(r-a)+(o-h)*(o-h))<=i}},function(t,e,i){var n=i(13),s=i(62),r=i(93);t.exports=function(t){var e=r(t)-n.TAU;return s(e,-Math.PI,Math.PI)}},function(t,e){t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},function(t,e){t.exports=function(t){return t.x*t.x+t.y*t.y}},function(t,e,i){var n=i(11);n.Area=i(1172),n.Ceil=i(1173),n.CeilAll=i(1174),n.CenterOn=i(174),n.Clone=i(1175),n.Contains=i(52),n.ContainsPoint=i(1176),n.ContainsRect=i(449),n.CopyFrom=i(1177),n.Decompose=i(438),n.Equals=i(1178),n.FitInside=i(1179),n.FitOutside=i(1180),n.Floor=i(1181),n.FloorAll=i(1182),n.FromPoints=i(186),n.GetAspectRatio=i(221),n.GetCenter=i(1183),n.GetPoint=i(157),n.GetPoints=i(274),n.GetSize=i(1184),n.Inflate=i(1185),n.Intersection=i(1186),n.MarchingAnts=i(285),n.MergePoints=i(1187),n.MergeRect=i(1188),n.MergeXY=i(1189),n.Offset=i(1190),n.OffsetPoint=i(1191),n.Overlaps=i(1192),n.Perimeter=i(118),n.PerimeterPoint=i(1193),n.Random=i(160),n.RandomOutside=i(1194),n.SameDimensions=i(1195),n.Scale=i(1196),n.Union=i(398),t.exports=n},function(t,e){t.exports=function(t,e){return!(e.width*e.height>t.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(s.BUTTON_DOWN,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(s.BUTTON_UP,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},function(t,e,i){var n=i(454),s=i(455),r=i(0),o=i(9),a=i(3),h=new r({Extends:o,initialize:function(t,e){o.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],r=0;r=2&&(this.leftStick.set(r[0].getValue(),r[1].getValue()),s>=4&&this.rightStick.set(r[2].getValue(),r[3].getValue()))},destroy:function(){var t;for(this.removeAllListeners(),this.manager=null,this.pad=null,t=0;t=r;for(i=0;i=r;)this._elapsed-=r,this.step(s)}},step:function(t){var e,i,n=this.bodies.entries,s=n.length;for(e=0;e0){var l=this.tree,u=this.staticTree;for(n=(i=h.entries).length,t=0;t-1&&p>g&&(t.velocity.normalize().scale(g),p=g),t.speed=p},separate:function(t,e,i,n,s){if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,s);if(t.isCircle!==e.isCircle){var r=t.isCircle?e:t,o=t.isCircle?t:e,a={x:r.x,y:r.y,right:r.right,bottom:r.bottom},h=o.center;if((h.ya.bottom)&&(h.xa.right))return this.separateCircle(t,e,s)}var l=!1,c=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)r.right&&(s=h(o.x,o.y,r.right,r.y)-o.radius):o.y>r.bottom&&(o.xr.right&&(s=h(o.x,o.y,r.right,r.bottom)-o.radius)),s*=-1}else s=t.halfWidth+e.halfWidth-h(t.center.x,t.center.y,e.center.x,e.center.y);if(i||0===s||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==s&&(t.onOverlap||e.onOverlap)&&this.emit(u.OVERLAP,t.gameObject,e.gameObject,t,e),0!==s;var a=t.center.x-e.center.x,l=t.center.y-e.center.y,c=Math.sqrt(Math.pow(a,2)+Math.pow(l,2)),d=(e.center.x-t.center.x)/c||0,f=(e.center.y-t.center.y)/c||0,v=2*(t.velocity.x*d+t.velocity.y*f-e.velocity.x*d-e.velocity.y*f)/(t.mass+e.mass);t.immovable||(t.velocity.x=t.velocity.x-v*t.mass*d,t.velocity.y=t.velocity.y-v*t.mass*f),e.immovable||(e.velocity.x=e.velocity.x+v*e.mass*d,e.velocity.y=e.velocity.y+v*e.mass*f);var m=e.velocity.x-t.velocity.x,y=e.velocity.y-t.velocity.y,x=Math.atan2(y,m),T=this._frameTime;return t.immovable||e.immovable||(s/=2),t.immovable||(t.x+=t.velocity.x*T-s*Math.cos(x),t.y+=t.velocity.y*T-s*Math.sin(x)),e.immovable||(e.x+=e.velocity.x*T+s*Math.cos(x),e.y+=e.velocity.y*T+s*Math.sin(x)),t.velocity.x*=t.bounce.x,t.velocity.y*=t.bounce.y,e.velocity.x*=e.bounce.x,e.velocity.y*=e.bounce.y,(t.onCollide||e.onCollide)&&this.emit(u.COLLIDE,t.gameObject,e.gameObject,t,e),!0},intersects:function(t,e){return t!==e&&(t.isCircle||e.isCircle?t.isCircle?e.isCircle?h(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):this.circleBodyIntersects(e,t):!(t.right<=e.position.x||t.bottom<=e.position.y||t.position.x>=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=s(t.center.x,e.left,e.right),n=s(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o,a;t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var h=Array.isArray(t),l=Array.isArray(e);if(this._total=0,h||l)if(!h&&l)for(o=0;o0},collideHandler:function(t,e,i,n,s,r){if(void 0===e&&t.isParent)return this.collideGroupVsGroup(t,t,i,n,s,r);if(!t||!e)return!1;if(t.body){if(e.body)return this.collideSpriteVsSprite(t,e,i,n,s,r);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,n,s,r)}else if(t.isParent){if(e.body)return this.collideSpriteVsGroup(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,n,s,r)}else if(t.isTilemap){if(e.body)return this.collideSpriteVsTilemapLayer(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,n,s,r)}},collideSpriteVsSprite:function(t,e,i,n,s,r){return!(!t.body||!e.body)&&(this.separate(t.body,e.body,n,s,r)&&(i&&i.call(s,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,n,s,r){var o,h,l,u=t.body;if(0!==e.length&&u&&u.enable)if(this.useTree){var c=this.treeMinMax;c.minX=u.left,c.minY=u.top,c.maxX=u.right,c.maxY=u.bottom;var d=e.physicsType===a.DYNAMIC_BODY?this.tree.search(c):this.staticTree.search(c);for(h=d.length,o=0;oc.baseTileWidth){var d=(c.tileWidth-c.baseTileWidth)*e.scaleX;a-=d,l+=d}c.tileHeight>c.baseTileHeight&&(u+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var f=e.getTilesWithinWorldXY(a,h,l,u);return 0!==f.length&&this.collideSpriteVsTilesHandler(t,f,i,n,s,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,n,s,r,o){for(var a,h,l=t.body,c={left:0,right:0,top:0,bottom:0},d=!1,f=0;f0&&t>i&&(t=i)),0!==n&&0!==e&&(e<0&&e<-n?e=-n:e>0&&e>n&&(e=n)),this.gameObject.x+=t,this.gameObject.y+=e}t<0?this.facing=s.FACING_LEFT:t>0&&(this.facing=s.FACING_RIGHT),e<0?this.facing=s.FACING_UP:e>0&&(this.facing=s.FACING_DOWN),this.allowRotation&&(this.gameObject.angle+=this.deltaZ())},setBoundsRectangle:function(t){return this.customBoundsRectangle=t||this.world.bounds,this},checkWorldBounds:function(){var t=this.position,e=this.customBoundsRectangle,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,s=this.worldBounce?-this.worldBounce.y:-this.bounce.y,r=!1;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,this.blocked.right=!0,r=!0),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,this.blocked.down=!0,r=!0),r&&(this.blocked.none=!1),r},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this.updateCenter(),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;if(!t&&n.frame&&(t=n.frame.realWidth),!e&&n.frame&&(e=n.frame.realHeight),this.sourceWidth=t,this.sourceHeight=e,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),i&&n.getCenter){var s=n.displayWidth/2,r=n.displayHeight/2;this.offset.set(s-this.halfWidth,r-this.halfHeight)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i.setPosition(t,e),i.getTopLeft?i.getTopLeft(this.position):this.position.set(t,e),this.prev.copy(this.position),this.prevFrame.copy(this.position),this.rotation=i.angle,this.preRotation=i.angle,this.updateBounds(),this.updateCenter()},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?this.radius>0&&t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom&&(this.center.x-t)*(this.center.x-t)+(this.center.y-e)*(this.center.y-e)<=this.radius*this.radius:h(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.width/2):(this.checkCollision.up&&t.lineBetween(e.x,e.y,e.x+this.width,e.y),this.checkCollision.right&&t.lineBetween(e.x+this.width,e.y,e.x+this.width,e.y+this.height),this.checkCollision.down&&t.lineBetween(e.x,e.y+this.height,e.x+this.width,e.y+this.height),this.checkCollision.left&&t.lineBetween(e.x,e.y,e.x,e.y+this.height))),this.debugShowVelocity&&(t.lineStyle(t.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,n,i+this.velocity.x/2,n+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t,e,i){void 0===t&&(t=!0),this.collideWorldBounds=t;var n=void 0!==e,s=void 0!==i;return(n||s)&&(this.worldBounce||(this.worldBounce=new l),n&&(this.worldBounce.x=e),s&&(this.worldBounce.y=i)),this},setVelocity:function(t,e){return this.velocity.set(t,e),t=this.velocity.x,e=this.velocity.y,this.speed=Math.sqrt(t*t+e*e),this},setVelocityX:function(t){this.velocity.x=t;var e=t,i=this.velocity.y;return this.speed=Math.sqrt(e*e+i*i),this},setVelocityY:function(t){this.velocity.y=t;var e=this.velocity.x,i=t;return this.speed=Math.sqrt(e*e+i*i),this},setMaxVelocity:function(t,e){return this.maxVelocity.set(t,e),this},setMaxSpeed:function(t){return this.maxSpeed=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setAllowDrag:function(t){return void 0===t&&(t=!0),this.allowDrag=t,this},setAllowGravity:function(t){return void 0===t&&(t=!0),this.allowGravity=t,this},setAllowRotation:function(t){return void 0===t&&(t=!0),this.allowRotation=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return void 0===t&&(t=!0),this.immovable=t,this},setEnable:function(t){return void 0===t&&(t=!0),this.enable=t,this},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=u},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=n,this.collideCallback=s,this.processCallback=r,this.callbackContext=o},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=n},function(t,e,i){var n=i(56);t.exports=function(t,e,i,s){var r=0,o=t.deltaAbsX()+e.deltaAbsX()+s;return 0===t._dx&&0===e._dx?(t.embedded=!0,e.embedded=!0):t._dx>e._dx?(r=t.right-e.x)>o&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?r=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.right=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.left=!0)):t._dxo&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?r=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.left=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.right=!0))),t.overlapX=r,e.overlapX=r,r}},function(t,e,i){var n=i(56);t.exports=function(t,e,i,s){var r=0,o=t.deltaAbsY()+e.deltaAbsY()+s;return 0===t._dy&&0===e._dy?(t.embedded=!0,e.embedded=!0):t._dy>e._dy?(r=t.bottom-e.y)>o&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?r=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.down=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.up=!0)):t._dyo&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?r=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.up=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.down=!0))),t.overlapY=r,e.overlapY=r,r}},function(t,e,i){var n=i(395);function s(t){if(!(this instanceof s))return new s(t,[".left",".top",".right",".bottom"]);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}function r(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,i,s,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=s||(o=e+Math.ceil((i-e)/s/2)*s,n(t,o,e,i,r),a.push(e,o,o,i))}s.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!p(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;s=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),a=g(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,s,r,o,h,l,u,d,f,p,g,v,m,y;for(l=u=1/0,n=e;n<=i-e;n++)s=a(t,0,n,this.toBBox),r=a(t,n,i,this.toBBox),f=s,p=r,void 0,void 0,void 0,void 0,g=Math.max(f.minX,p.minX),v=Math.max(f.minY,p.minY),m=Math.min(f.maxX,p.maxX),y=Math.min(f.maxY,p.maxY),o=Math.max(0,m-g)*Math.max(0,y-v),h=c(s)+c(r),o=e;s--)r=t.children[s],h(u,t.leaf?o(r):r),c+=d(u);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)h(e[n],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},compareMinX:function(t,e){return t.left-e.left},compareMinY:function(t,e){return t.top-e.top},toBBox:function(t){return{minX:t.left,minY:t.top,maxX:t.right,maxY:t.bottom}}},t.exports=s},function(t,e){t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},function(t,e,i){var n=i(59),s=i(0),r=i(56),o=i(52),a=i(3),h=new s({initialize:function(t,e){var i=e.width?e.width:64,n=e.height?e.height:64;this.world=t,this.gameObject=e,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(e.x-e.displayOriginX,e.y-e.displayOriginY),this.width=i,this.height=n,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new a(e.x+this.halfWidth,e.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY,this._dx=0,this._dy=0},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(t,e){return void 0===e&&(e=t),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(t,e),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;if(!t&&n.frame&&(t=n.frame.realWidth),!e&&n.frame&&(e=n.frame.realHeight),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),i&&n.getCenter){var s=n.displayWidth/2,r=n.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(s-this.halfWidth,r-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.setPosition(t,e),i.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):o(this,t,e)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?t.strokeCircle(i,n,this.width/2):t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=h},function(t,e,i){var n=i(0),s=i(110),r=i(1305),o=i(111),a=i(1306),h=new n({initialize:function(t,e,i,n,r){void 0===n&&(n=16),void 0===r&&(r=n),this.world=t,this.gameObject=null,this.enabled=!0,this.parent,this.id=t.getNextID(),this.name="",this.size={x:n,y:r},this.offset={x:0,y:0},this.pos={x:e,y:i},this.last={x:e,y:i},this.vel={x:0,y:0},this.accel={x:0,y:0},this.friction={x:0,y:0},this.maxVel={x:t.defaults.maxVelocityX,y:t.defaults.maxVelocityY},this.standing=!1,this.gravityFactor=t.defaults.gravityFactor,this.bounciness=t.defaults.bounciness,this.minBounceVelocity=t.defaults.minBounceVelocity,this.accelGround=0,this.accelAir=0,this.jumpSpeed=0,this.type=o.NONE,this.checkAgainst=o.NONE,this.collides=s.NEVER,this.debugShowBody=t.defaults.debugShowBody,this.debugShowVelocity=t.defaults.debugShowVelocity,this.debugBodyColor=t.defaults.bodyDebugColor,this.updateCallback,this.slopeStanding={min:.767944870877505,max:2.3736477827122884}},reset:function(t,e){this.pos={x:t,y:e},this.last={x:t,y:e},this.vel={x:0,y:0},this.accel={x:0,y:0},this.friction={x:0,y:0},this.maxVel={x:100,y:100},this.standing=!1,this.gravityFactor=1,this.bounciness=0,this.minBounceVelocity=40,this.accelGround=0,this.accelAir=0,this.jumpSpeed=0,this.type=o.NONE,this.checkAgainst=o.NONE,this.collides=s.NEVER},update:function(t){var e=this.pos;this.last.x=e.x,this.last.y=e.y,this.vel.y+=this.world.gravity*t*this.gravityFactor,this.vel.x=r(t,this.vel.x,this.accel.x,this.friction.x,this.maxVel.x),this.vel.y=r(t,this.vel.y,this.accel.y,this.friction.y,this.maxVel.y);var i=this.vel.x*t,n=this.vel.y*t,s=this.world.collisionMap.trace(e.x,e.y,i,n,this.size.x,this.size.y);this.handleMovementTrace(s)&&a(this,s);var o=this.gameObject;o&&(o.x=e.x-this.offset.x+o.displayOriginX*o.scaleX,o.y=e.y-this.offset.y+o.displayOriginY*o.scaleY),this.updateCallback&&this.updateCallback(this)},drawDebug:function(t){var e=this.pos;if(this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor,1),t.strokeRect(e.x,e.y,this.size.x,this.size.y)),this.debugShowVelocity){var i=e.x+this.size.x/2,n=e.y+this.size.y/2;t.lineStyle(1,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,n,i+this.vel.x,n+this.vel.y)}},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},skipHash:function(){return!this.enabled||0===this.type&&0===this.checkAgainst&&0===this.collides},touches:function(t){return!(this.pos.x>=t.pos.x+t.size.x||this.pos.x+this.size.x<=t.pos.x||this.pos.y>=t.pos.y+t.size.y||this.pos.y+this.size.y<=t.pos.y)},resetSize:function(t,e,i,n){return this.pos.x=t,this.pos.y=e,this.size.x=i,this.size.y=n,this},toJSON:function(){return{name:this.name,size:{x:this.size.x,y:this.size.y},pos:{x:this.pos.x,y:this.pos.y},vel:{x:this.vel.x,y:this.vel.y},accel:{x:this.accel.x,y:this.accel.y},friction:{x:this.friction.x,y:this.friction.y},maxVel:{x:this.maxVel.x,y:this.maxVel.y},gravityFactor:this.gravityFactor,bounciness:this.bounciness,minBounceVelocity:this.minBounceVelocity,type:this.type,checkAgainst:this.checkAgainst,collides:this.collides}},fromJSON:function(){},check:function(){},collideWith:function(t,e){this.parent&&this.parent._collideCallback&&this.parent._collideCallback.call(this.parent._callbackScope,this,t,e)},handleMovementTrace:function(){return!0},destroy:function(){this.world.remove(this),this.enabled=!1,this.world=null,this.gameObject=null,this.parent=null}});t.exports=h},function(t,e,i){var n=i(0),s=i(1310),r=new n({initialize:function(t,e){void 0===t&&(t=32),this.tilesize=t,this.data=Array.isArray(e)?e:[],this.width=Array.isArray(e)?e[0].length:0,this.height=Array.isArray(e)?e.length:0,this.lastSlope=55,this.tiledef=s},trace:function(t,e,i,n,s,r){var o={collision:{x:!1,y:!1,slope:!1},pos:{x:t+i,y:e+n},tile:{x:0,y:0}};if(!this.data)return o;var a=Math.ceil(Math.max(Math.abs(i),Math.abs(n))/this.tilesize);if(a>1)for(var h=i/a,l=n/a,u=0;u0?r:0,m=n<0?f:0,y=Math.max(Math.floor(i/f),0),x=Math.min(Math.ceil((i+o)/f),g);u=Math.floor((t.pos.x+v)/f);var T=Math.floor((e+v)/f);if((l>0||u===T||T<0||T>=p)&&(T=-1),u>=0&&u1&&d<=this.lastSlope&&this.checkDef(t,d,e,i,a,h,r,o,T,c));c++)if(1===(d=this.data[c][u])||d>this.lastSlope||d>1&&this.checkDef(t,d,e,i,a,h,r,o,u,c)){if(d>1&&d<=this.lastSlope&&t.collision.slope)break;t.collision.x=!0,t.tile.x=d,t.pos.x=u*f-v+m,e=t.pos.x,a=0;break}}if(s){var w=s>0?o:0,b=s<0?f:0,S=Math.max(Math.floor(t.pos.x/f),0),E=Math.min(Math.ceil((t.pos.x+r)/f),p);c=Math.floor((t.pos.y+w)/f);var A=Math.floor((i+w)/f);if((l>0||c===A||A<0||A>=g)&&(A=-1),c>=0&&c1&&d<=this.lastSlope&&this.checkDef(t,d,e,i,a,h,r,o,u,A));u++)if(1===(d=this.data[c][u])||d>this.lastSlope||d>1&&this.checkDef(t,d,e,i,a,h,r,o,u,c)){if(d>1&&d<=this.lastSlope&&t.collision.slope)break;t.collision.y=!0,t.tile.y=d,t.pos.y=c*f-w+b;break}}},checkDef:function(t,e,i,n,s,r,o,a,h,l){var u=this.tiledef[e];if(!u)return!1;var c=this.tilesize,d=(h+u[0])*c,f=(l+u[1])*c,p=(u[2]-u[0])*c,g=(u[3]-u[1])*c,v=u[4],m=i+s+(g<0?o:0)-d,y=n+r+(p>0?a:0)-f;if(p*y-g*m>0){if(s*-g+r*p<0)return v;var x=Math.sqrt(p*p+g*g),T=g/x,w=-p/x,b=m*T+y*w,S=T*b,E=w*b;return S*S+E*E>=s*s+r*r?v||p*(y-r)-g*(m-s)<.5:(t.pos.x=i+s-S,t.pos.y=n+r-E,t.collision.slope={x:p,y:g,nx:T,ny:w},!0)}return!1}});t.exports=r},function(t,e,i){var n=i(0),s=i(480),r=i(481),o=i(482),a=new n({initialize:function(t){this.world=t,this.sys=t.scene.sys},body:function(t,e,i,n){return new s(this.world,t,e,i,n)},existing:function(t){var e=t.x-t.frame.centerX,i=t.y-t.frame.centerY,n=t.width,s=t.height;return t.body=this.world.create(e,i,n,s),t.body.parent=t,t.body.gameObject=t,t},image:function(t,e,i,n){var s=new r(this.world,t,e,i,n);return this.sys.displayList.add(s),s},sprite:function(t,e,i,n){var s=new o(this.world,t,e,i,n);return this.sys.displayList.add(s),this.sys.updateList.add(s),s},destroy:function(){this.world=null,this.sys=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(229),r=new n({Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){this.body=t.create(e,i,n,s),this.body.parent=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=r},function(t,e,i){var n=i(0),s=i(229),r=i(88),o=new n({Extends:r,Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t.scene,e,i,n,s),this.body=t.create(e-this.frame.centerX,i-this.frame.centerY,this.width,this.height),this.body.parent=this,this.body.gameObject=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=o},function(t,e,i){var n=i(0),s=i(229),r=i(65),o=new n({Extends:r,Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t.scene,e,i,n,s),this.body=t.create(e-this.frame.centerX,i-this.frame.centerY,this.width,this.height),this.body.parent=this,this.body.gameObject=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=o},function(t,e,i){var n=i(477),s=i(0),r=i(110),o=i(478),a=i(9),h=i(228),l=i(1),u=i(90),c=i(108),d=i(1324),f=i(34),p=i(111),g=new s({Extends:a,initialize:function(t,e){a.call(this),this.scene=t,this.bodies=new c,this.gravity=l(e,"gravity",0),this.cellSize=l(e,"cellSize",64),this.collisionMap=new o,this.timeScale=l(e,"timeScale",1),this.maxStep=l(e,"maxStep",.05),this.enabled=!0,this.drawDebug=l(e,"debug",!1),this.debugGraphic;var i=l(e,"maxVelocity",100);if(this.defaults={debugShowBody:l(e,"debugShowBody",!0),debugShowVelocity:l(e,"debugShowVelocity",!0),bodyDebugColor:l(e,"debugBodyColor",16711935),velocityDebugColor:l(e,"debugVelocityColor",65280),maxVelocityX:l(e,"maxVelocityX",i),maxVelocityY:l(e,"maxVelocityY",i),minBounceVelocity:l(e,"minBounceVelocity",40),gravityFactor:l(e,"gravityFactor",1),bounciness:l(e,"bounciness",0)},this.walls={left:null,right:null,top:null,bottom:null},this.delta=0,this._lastId=0,l(e,"setBounds",!1)){var n=e.setBounds;if("boolean"==typeof n)this.setBounds();else{var s=l(n,"x",0),r=l(n,"y",0),h=l(n,"width",t.sys.scale.width),u=l(n,"height",t.sys.scale.height),d=l(n,"thickness",64),f=l(n,"left",!0),p=l(n,"right",!0),g=l(n,"top",!0),v=l(n,"bottom",!0);this.setBounds(s,r,h,u,d,f,p,g,v)}}this.drawDebug&&this.createDebugGraphic()},setCollisionMap:function(t,e){if("string"==typeof t){var i=this.scene.cache.tilemap.get(t);if(!i||i.format!==f.WELTMEISTER)return console.warn("The specified key does not correspond to a Weltmeister tilemap: "+t),null;for(var n,s=i.data.layer,r=0;rr.ACTIVE&&d(this,t,e))},setCollidesNever:function(t){for(var e=0;e=0&&h<=1&&l>=0&&l<=1}function s(t,e,i){return(e[0]-t[0])*(i[1]-t[1])-(i[0]-t[0])*(e[1]-t[1])}function r(t,e,i){return s(t,e,i)>0}function o(t,e,i){return s(t,e,i)>=0}function a(t,e,i){return s(t,e,i)<0}function h(t,e,i){return s(t,e,i)<=0}t.exports={decomp:function(t){var e=function t(e){var i=[],n=[],s=[],r=[];var o=Number.MAX_VALUE;for(var a=0;a0?function t(e,i){if(0===i.length)return[e];if(i instanceof Array&&i.length&&i[0]instanceof Array&&2===i[0].length&&i[0][0]instanceof Array){for(var n=[e],s=0;su)return console.warn("quickDecomp: max level ("+u+") reached."),i;for(var L=0;LA&&(A+=e.length),E=Number.MAX_VALUE,A<_)return i;for(var D=_;D<=A;++D)o(f(O,L-1),f(O,L),f(O,D))&&h(f(O,L+1),f(O,L),f(O,D))&&(S=d(f(O,L),f(O,D)))3&&n>=0;--n)c(f(t,n-1),f(t,n),f(t,n+1),e)&&(t.splice(n%t.length,1),i++);return i},removeDuplicatePoints:function(t,e){for(var i=t.length-1;i>=1;--i)for(var n=t[i],s=i-1;s>=0;--s)S(n,t[s],e)&&t.splice(i,1)},makeCCW:function(t){for(var e=0,i=t,n=1;ni[e][0])&&(e=n);return!r(f(t,e-1),f(t,e),f(t,e+1))&&(function(t){for(var e=[],i=t.length,n=0;n!==i;n++)e.push(t.pop());for(var n=0;n!==i;n++)t[n]=e[n]}(t),!0)}};var l=[],u=[];function c(t,e,i,n){if(n){var r=l,o=u;r[0]=e[0]-t[0],r[1]=e[1]-t[1],o[0]=i[0]-e[0],o[1]=i[1]-e[1];var a=r[0]*o[0]+r[1]*o[1],h=Math.sqrt(r[0]*r[0]+r[1]*r[1]),c=Math.sqrt(o[0]*o[0]+o[1]*o[1]);return Math.acos(a/(h*c))g&&(g=y),a.translate(m,{x:.5*x,y:.5*y}),c=m.bounds.max.x+r,s.addBody(u,m),l=m,f+=1}else c+=r}d+=g+o,c=t}return u},n.chain=function(t,e,i,n,a,h){for(var l=t.bodies,u=1;u0)for(l=0;l0&&(d=f[l-1+(h-1)*e],s.addConstraint(t,r.create(o.extend({bodyA:d,bodyB:c},a)))),n&&ld||o<(l=d-l)||o>i-1-l))return 1===c&&a.translate(u,{x:(o+(i%2==1?1:-1))*f,y:0}),h(t+(u?o*f:0)+o*r,n,o,l,u,c)})},n.newtonsCradle=function(t,e,i,n,o){for(var a=s.create({label:"Newtons Cradle"}),l=0;lu.bounds.max.x||p.bounds.max.yu.bounds.max.y)){var g=n._getRegion(t,p);if(!p.region||g.id!==p.region.id||s){f.broadphaseTests+=1,p.region&&!s||(p.region=g);var v=n._regionUnion(g,p.region);for(o=v.startCol;o<=v.endCol;o++)for(a=v.startRow;a<=v.endRow;a++){h=c[l=n._getBucketId(o,a)];var m=o>=g.startCol&&o<=g.endCol&&a>=g.startRow&&a<=g.endRow,y=o>=p.region.startCol&&o<=p.region.endCol&&a>=p.region.startRow&&a<=p.region.endRow;!m&&y&&y&&h&&n._bucketRemoveBody(t,h,p),(p.region===g||m&&!y||s)&&(h||(h=n._createBucket(c,l)),n._bucketAddBody(t,h,p))}p.region=g,d=!0}}}d&&(t.pairsList=n._createActivePairsList(t))},n.clear=function(t){t.buckets={},t.pairs={},t.pairsList=[]},n._regionUnion=function(t,e){var i=Math.min(t.startCol,e.startCol),s=Math.max(t.endCol,e.endCol),r=Math.min(t.startRow,e.startRow),o=Math.max(t.endRow,e.endRow);return n._createRegion(i,s,r,o)},n._getRegion=function(t,e){var i=e.bounds,s=Math.floor(i.min.x/t.bucketWidth),r=Math.floor(i.max.x/t.bucketWidth),o=Math.floor(i.min.y/t.bucketHeight),a=Math.floor(i.max.y/t.bucketHeight);return n._createRegion(s,r,o,a)},n._createRegion=function(t,e,i,n){return{id:t+","+e+","+i+","+n,startCol:t,endCol:e,startRow:i,endRow:n}},n._getBucketId=function(t,e){return"C"+t+"R"+e},n._createBucket=function(t,e){return t[e]=[]},n._bucketAddBody=function(t,e,i){for(var n=0;n0?n.push(i):delete t.pairs[e[s]];return n}},function(t,e,i){var n={};t.exports=n;var s=i(144),r=i(18);n._pairMaxIdleLife=1e3,n.create=function(t){return r.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},t)},n.update=function(t,e,i){var n,r,o,a,h=t.list,l=t.table,u=t.collisionStart,c=t.collisionEnd,d=t.collisionActive;for(u.length=0,c.length=0,d.length=0,a=0;an._pairMaxIdleLife&&l.push(o);for(o=0;of.friction*f.frictionStatic*k*i&&(I=R,F=o.clamp(f.friction*L*i,-I,I));var B=r.cross(E,m),N=r.cross(A,m),Y=T/(g.inverseMass+v.inverseMass+g.inverseInertia*B*B+v.inverseInertia*N*N);if(D*=Y,F*=Y,P<0&&P*P>n._restingThresh*i)b.normalImpulse=0;else{var X=b.normalImpulse;b.normalImpulse=Math.min(b.normalImpulse+D,0),D=b.normalImpulse-X}if(O*O>n._restingThreshTangent*i)b.tangentImpulse=0;else{var z=b.tangentImpulse;b.tangentImpulse=o.clamp(b.tangentImpulse+F,-I,I),F=b.tangentImpulse-z}s.x=m.x*D+y.x*F,s.y=m.y*D+y.y*F,g.isStatic||g.isSleeping||(g.positionPrev.x+=s.x*g.inverseMass,g.positionPrev.y+=s.y*g.inverseMass,g.anglePrev+=r.cross(E,s)*g.inverseInertia),v.isStatic||v.isSleeping||(v.positionPrev.x-=s.x*v.inverseMass,v.positionPrev.y-=s.y*v.inverseMass,v.anglePrev-=r.cross(A,s)*v.inverseInertia)}}}}},function(t,e,i){var n={};t.exports=n;var s=i(237),r=i(112),o=i(493),a=i(492),h=i(1355),l=i(491),u=i(94),c=i(77),d=i(95),f=i(18),p=i(25);n.create=function(t,e){e=f.isElement(t)?e:t,t=f.isElement(t)?t:null,e=e||{},(t||e.render)&&f.warn("Engine.create: engine.render is deprecated (see docs)");var i={positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},timing:{timestamp:0,timeScale:1},broadphase:{controller:l}},n=f.extend(i,e);if(t||n.render){var r={element:t,controller:Render};n.render=f.extend(r,n.render)}return n.render&&n.render.controller&&(n.render=n.render.controller.create(n.render)),n.render&&(n.render.engine=n),n.world=e.world||s.create(n.world),n.pairs=a.create(),n.broadphase=n.broadphase.controller.create(n.broadphase),n.metrics=n.metrics||{extended:!1},n.metrics=h.create(n.metrics),n},n.update=function(t,e,i){e=e||1e3/60,i=i||1;var s,l=t.world,f=t.timing,p=t.broadphase,g=[];f.timestamp+=e*f.timeScale;var v={timestamp:f.timestamp};u.trigger(t,"beforeUpdate",v);var m=c.allBodies(l),y=c.allConstraints(l);for(h.reset(t.metrics),t.enableSleeping&&r.update(m,f.timeScale),n._bodiesApplyGravity(m,l.gravity),n._bodiesUpdate(m,e,f.timeScale,i,l.bounds),d.preSolveAll(m),s=0;s0&&u.trigger(t,"collisionStart",{pairs:T.collisionStart}),o.preSolvePosition(T.list),s=0;s0&&u.trigger(t,"collisionActive",{pairs:T.collisionActive}),T.collisionEnd.length>0&&u.trigger(t,"collisionEnd",{pairs:T.collisionEnd}),h.update(t.metrics,t),n._bodiesClearForces(m),u.trigger(t,"afterUpdate",v),t},n.merge=function(t,e){if(f.extend(t,e),e.world){t.world=e.world,n.clear(t);for(var i=c.allBodies(t.world),s=0;s0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit(u.COLLISION_START,e,i,n)}),p.on(e,"collisionActive",function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit(u.COLLISION_ACTIVE,e,i,n)}),p.on(e,"collisionEnd",function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit(u.COLLISION_END,e,i,n)})},setBounds:function(t,e,i,n,s,r,o,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),void 0===s&&(s=128),void 0===r&&(r=!0),void 0===o&&(o=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),this.updateWall(r,"left",t-s,e-s,s,n+2*s),this.updateWall(o,"right",t+i,e-s,s,n+2*s),this.updateWall(a,"top",t,e-s,i,s),this.updateWall(h,"bottom",t,e+n,i,s),this},updateWall:function(t,e,i,n,s,r){var o=this.walls[e];t?(o&&v.remove(this.localWorld,o),i+=s/2,n+=r/2,this.walls[e]=this.create(i,n,s,r,{isStatic:!0,friction:0,frictionStatic:0})):(o&&v.remove(this.localWorld,o),this.walls[e]=null)},createDebugGraphic:function(){var t=this.scene.sys.add.graphics({x:0,y:0});return t.setDepth(Number.MAX_VALUE),this.debugGraphic=t,this.drawDebug=!0,t},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=1),this.localWorld.gravity.x=t,this.localWorld.gravity.y=e,void 0!==i&&(this.localWorld.gravity.scale=i),this},create:function(t,e,i,s,r){var o=n.rectangle(t,e,i,s,r);return v.add(this.localWorld,o),o},add:function(t){return v.add(this.localWorld,t),this},remove:function(t,e){var i=t.body?t.body:t;return a.remove(this.localWorld,i,e),this},removeConstraint:function(t,e){return a.remove(this.localWorld,t,e),this},convertTilemapLayer:function(t,e){var i=t.layer,n=t.getTilesWithin(0,0,i.width,i.height,{isColliding:!0});return this.convertTiles(n,e),this},convertTiles:function(t,e){if(0===t.length)return this;for(var i=0;i1?1:0;r1?1:0;s-1}return!1}},function(t,e,i){var n=i(79),s=i(113),r=i(238);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!1),void 0===o&&(o=!0),!s(t,e,a))return null;var h=a.data[e][t];return h?(a.data[e][t]=i?null:new n(a,-1,t,e,h.width,h.height),o&&h&&h.collides&&r(t,e,a),h):null}},function(t,e,i){var n=i(34),s=i(241),r=i(501),o=i(502),a=i(513);t.exports=function(t,e,i,h,l,u){var c;switch(e){case n.ARRAY_2D:c=s(t,i,h,l,u);break;case n.CSV:c=r(t,i,h,l,u);break;case n.TILED_JSON:c=o(t,i,u);break;case n.WELTMEISTER:c=a(t,i,u);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},function(t,e,i){var n=i(34),s=i(241);t.exports=function(t,e,i,r,o){var a=e.trim().split("\n").map(function(t){return t.split(",")}),h=s(t,a,i,r,o);return h.format=n.CSV,h}},function(t,e,i){var n=i(34),s=i(115),r=i(503),o=i(505),a=i(506),h=i(509),l=i(511),u=i(512);t.exports=function(t,e,i){if("orthogonal"!==e.orientation)return console.warn("Only orthogonal map types are supported in this version of Phaser"),null;var c=new s({width:e.width,height:e.height,name:t,tileWidth:e.tilewidth,tileHeight:e.tileheight,orientation:e.orientation,format:n.TILED_JSON,version:e.version,properties:e.properties,renderOrder:e.renderorder,infinite:e.infinite});c.layers=r(e,i),c.images=o(e);var d=a(e);return c.tilesets=d.tilesets,c.imageCollections=d.imageCollections,c.objects=h(e),c.tiles=l(c),u(c),c}},function(t,e,i){var n=i(504),s=i(1),r=i(114),o=i(242),a=i(79),h=i(243);t.exports=function(t,e){for(var i=s(t,"infinite",!1),l=[],u=[],c=h(t);c.i0;)if(c.i>=c.layers.length){if(u.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}c=u.pop()}else{var d=c.layers[c.i];if(c.i++,"tilelayer"===d.type)if(d.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+d.name+"'");else{if(d.encoding&&"base64"===d.encoding){if(d.chunks)for(var f=0;f0?((v=new a(p,g.gid,O,R,t.tilewidth,t.tileheight)).rotation=g.rotation,v.flipX=g.flipped,y[R][O]=v):(m=e?null:new a(p,-1,O,R,t.tilewidth,t.tileheight),y[R][O]=m),++x===E.width&&(C++,x=0)}}else{p=new r({name:c.name+d.name,x:c.x+s(d,"offsetx",0)+d.x,y:c.y+s(d,"offsety",0)+d.y,width:d.width,height:d.height,tileWidth:t.tilewidth,tileHeight:t.tileheight,alpha:c.opacity*d.opacity,visible:c.visible&&d.visible,properties:s(d,"properties",{})});for(var L=[],D=0,k=d.data.length;D0?((v=new a(p,g.gid,x,y.length,t.tilewidth,t.tileheight)).rotation=g.rotation,v.flipX=g.flipped,L.push(v)):(m=e?null:new a(p,-1,x,y.length,t.tilewidth,t.tileheight),L.push(m)),++x===d.width&&(y.push(L),x=0,L=[])}p.data=y,l.push(p)}else if("group"===d.type){var F=h(t,d,c);u.push(c),c=F}}return l}},function(t,e){t.exports=function(t){for(var e=window.atob(t),i=e.length,n=new Array(i/4),s=0;s>>0;return n}},function(t,e,i){var n=i(1),s=i(243);t.exports=function(t){for(var e=[],i=[],r=s(t);r.i0;)if(r.i>=r.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=i.pop()}else{var o=r.layers[r.i];if(r.i++,"imagelayer"===o.type){var a=n(o,"offsetx",0)+n(o,"startx",0),h=n(o,"offsety",0)+n(o,"starty",0);e.push({name:r.name+o.name,image:o.image,x:r.x+a+o.x,y:r.y+h+o.y,alpha:r.opacity*o.opacity,visible:r.visible&&o.visible,properties:n(o,"properties",{})})}else if("group"===o.type){var l=s(t,o,r);i.push(r),r=l}}return e}},function(t,e,i){var n=i(149),s=i(507),r=i(244);t.exports=function(t){for(var e,i=[],o=[],a=null,h=0;h1){if(Array.isArray(l.tiles)){for(var c={},d={},f=0;f=this.firstgid&&t0;)if(a.i>=a.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}a=i.pop()}else{var h=a.layers[a.i];if(a.i++,h.opacity*=a.opacity,h.visible=a.visible&&h.visible,"objectgroup"===h.type){h.name=a.name+h.name;for(var l=a.x+n(h,"startx",0)+n(h,"offsetx",0),u=a.y+n(h,"starty",0)+n(h,"offsety",0),c=[],d=0;da&&(a=e.layer[l].width),e.layer[l].height>h&&(h=e.layer[l].height);var u=new s({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:n.WELTMEISTER});return u.layers=r(e,i),u.tilesets=o(e),u}},function(t,e,i){var n=i(114),s=i(79);t.exports=function(t,e){for(var i=[],r=0;r-1?new s(a,f,c,u,o.tilesize,o.tilesize):e?null:new s(a,-1,c,u,o.tilesize,o.tilesize),h.push(d)}l.push(h),h=[]}a.data=l,i.push(a)}return i}},function(t,e,i){var n=i(149);t.exports=function(t){for(var e=[],i=[],s=0;s-1&&(this.renderOrder=t),this},addTilesetImage:function(t,e,i,n,s,r,o){if(void 0===t)return null;if(void 0!==e&&null!==e||(e=t),!this.scene.sys.textures.exists(e))return console.warn("Invalid Tileset Image: "+e),null;var h=this.scene.sys.textures.get(e),l=this.getTilesetIndex(t);if(null===l&&this.format===a.TILED_JSON)return console.warn("No data found for Tileset: "+t),null;var u=this.tilesets[l];return u?(u.setTileSize(i,n),u.setSpacing(s,r),u.setImage(h),u):(void 0===i&&(i=this.tileWidth),void 0===n&&(n=this.tileHeight),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o=0),(u=new p(t,o,i,n,s,r)).setImage(h),this.tilesets.push(u),u)},convertLayerToStatic:function(t){if(null===(t=this.getLayer(t)))return null;var e=t.tilemapLayer;if(!(e&&e instanceof r))return null;var i=new c(e.scene,e.tilemap,e.layerIndex,e.tileset,e.x,e.y);return this.scene.sys.displayList.add(i),e.destroy(),i},copy:function(t,e,i,n,s,r,o,a){return a=this.getLayer(a),this._isStaticCall(a,"copy")?this:null!==a?(f.Copy(t,e,i,n,s,r,o,a),this):null},createBlankDynamicLayer:function(t,e,i,n,s,o,a,l){if(void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.width),void 0===o&&(o=this.height),void 0===a&&(a=this.tileWidth),void 0===l&&(l=this.tileHeight),null!==this.getLayerIndex(t))return console.warn("Invalid Tilemap Layer ID: "+t),null;for(var u,c=new h({name:t,tileWidth:a,tileHeight:l,width:s,height:o}),f=0;f-1&&this.putTileAt(e,r.x,r.y,i,r.tilemapLayer)}return n},removeTileAt:function(t,e,i,n,s){return s=this.getLayer(s),this._isStaticCall(s,"removeTileAt")?null:null===s?null:f.RemoveTileAt(t,e,i,n,s)},removeTileAtWorldXY:function(t,e,i,n,s,r){return r=this.getLayer(r),this._isStaticCall(r,"removeTileAtWorldXY")?null:null===r?null:f.RemoveTileAtWorldXY(t,e,i,n,s,r)},renderDebug:function(t,e,i){return null===(i=this.getLayer(i))?null:(f.RenderDebug(t,e,i),this)},renderDebugFull:function(t,e){for(var i=this.layers,n=0;n=0&&t<4&&(this._renderOrder=t),this},calculateFacesAt:function(t,e){return a.CalculateFacesAt(t,e,this.layer),this},calculateFacesWithin:function(t,e,i,n){return a.CalculateFacesWithin(t,e,i,n,this.layer),this},createFromTiles:function(t,e,i,n,s){return a.CreateFromTiles(t,e,i,n,s,this.layer)},cull:function(t){return this.cullCallback(this.layer,t,this.culledTiles,this._renderOrder)},copy:function(t,e,i,n,s,r,o){return a.Copy(t,e,i,n,s,r,o,this.layer),this},destroy:function(t){void 0===t&&(t=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),t&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],o.prototype.destroy.call(this))},fill:function(t,e,i,n,s,r){return a.Fill(t,e,i,n,s,r,this.layer),this},filterTiles:function(t,e,i,n,s,r,o){return a.FilterTiles(t,e,i,n,s,r,o,this.layer)},findByIndex:function(t,e,i){return a.FindByIndex(t,e,i,this.layer)},findTile:function(t,e,i,n,s,r,o){return a.FindTile(t,e,i,n,s,r,o,this.layer)},forEachTile:function(t,e,i,n,s,r,o){return a.ForEachTile(t,e,i,n,s,r,o,this.layer),this},getTileAt:function(t,e,i){return a.GetTileAt(t,e,i,this.layer)},getTileAtWorldXY:function(t,e,i,n){return a.GetTileAtWorldXY(t,e,i,n,this.layer)},getTilesWithin:function(t,e,i,n,s){return a.GetTilesWithin(t,e,i,n,s,this.layer)},getTilesWithinShape:function(t,e,i){return a.GetTilesWithinShape(t,e,i,this.layer)},getTilesWithinWorldXY:function(t,e,i,n,s,r){return a.GetTilesWithinWorldXY(t,e,i,n,s,r,this.layer)},hasTileAt:function(t,e){return a.HasTileAt(t,e,this.layer)},hasTileAtWorldXY:function(t,e,i){return a.HasTileAtWorldXY(t,e,i,this.layer)},putTileAt:function(t,e,i,n){return a.PutTileAt(t,e,i,n,this.layer)},putTileAtWorldXY:function(t,e,i,n,s){return a.PutTileAtWorldXY(t,e,i,n,s,this.layer)},putTilesAt:function(t,e,i,n){return a.PutTilesAt(t,e,i,n,this.layer),this},randomize:function(t,e,i,n,s){return a.Randomize(t,e,i,n,s,this.layer),this},removeTileAt:function(t,e,i,n){return a.RemoveTileAt(t,e,i,n,this.layer)},removeTileAtWorldXY:function(t,e,i,n,s){return a.RemoveTileAtWorldXY(t,e,i,n,s,this.layer)},renderDebug:function(t,e){return a.RenderDebug(t,e,this.layer),this},replaceByIndex:function(t,e,i,n,s,r){return a.ReplaceByIndex(t,e,i,n,s,r,this.layer),this},setSkipCull:function(t){return void 0===t&&(t=!0),this.skipCull=t,this},setCullPadding:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=1),this.cullPaddingX=t,this.cullPaddingY=e,this},setCollision:function(t,e,i,n){return a.SetCollision(t,e,i,this.layer,n),this},setCollisionBetween:function(t,e,i,n){return a.SetCollisionBetween(t,e,i,n,this.layer),this},setCollisionByProperty:function(t,e,i){return a.SetCollisionByProperty(t,e,i,this.layer),this},setCollisionByExclusion:function(t,e,i){return a.SetCollisionByExclusion(t,e,i,this.layer),this},setCollisionFromCollisionGroup:function(t,e){return a.SetCollisionFromCollisionGroup(t,e,this.layer),this},setTileIndexCallback:function(t,e,i){return a.SetTileIndexCallback(t,e,i,this.layer),this},setTileLocationCallback:function(t,e,i,n,s,r){return a.SetTileLocationCallback(t,e,i,n,s,r,this.layer),this},shuffle:function(t,e,i,n){return a.Shuffle(t,e,i,n,this.layer),this},swapByIndex:function(t,e,i,n,s,r){return a.SwapByIndex(t,e,i,n,s,r,this.layer),this},tileToWorldX:function(t,e){return a.TileToWorldX(t,e,this.layer)},tileToWorldY:function(t,e){return a.TileToWorldY(t,e,this.layer)},tileToWorldXY:function(t,e,i,n){return a.TileToWorldXY(t,e,i,n,this.layer)},weightedRandomize:function(t,e,i,n,s){return a.WeightedRandomize(t,e,i,n,s,this.layer),this},worldToTileX:function(t,e,i){return a.WorldToTileX(t,e,i,this.layer)},worldToTileY:function(t,e,i){return a.WorldToTileY(t,e,i,this.layer)},worldToTileXY:function(t,e,i,n,s){return a.WorldToTileXY(t,e,i,n,s,this.layer)}});t.exports=h},function(t,e,i){var n=i(0),s=i(12),r=i(19),o=i(14),a=i(1409),h=i(145),l=i(35),u=i(10),c=new n({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.ComputedSize,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.Transform,s.Visible,s.ScrollFactor,a],initialize:function(t,e,i,n,s,a){o.call(this,t,"StaticTilemapLayer"),this.isTilemap=!0,this.tilemap=e,this.layerIndex=i,this.layer=e.layers[i],this.layer.tilemapLayer=this,this.tileset=[],this.culledTiles=[],this.skipCull=!1,this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=h.CullTiles,this.renderer=t.sys.game.renderer,this.vertexBuffer=[],this.bufferData=[],this.vertexViewF32=[],this.vertexViewU32=[],this.dirty=[],this.vertexCount=[],this._renderOrder=0,this._tempMatrix=new l,this.gidMap=[],this.setTilesets(n),this.setAlpha(this.layer.alpha),this.setPosition(s,a),this.setOrigin(),this.setSize(e.tileWidth*this.layer.width,e.tileHeight*this.layer.height),this.updateVBOData(),this.initPipeline("TextureTintPipeline"),t.sys.game.events.on(r.CONTEXT_RESTORED,function(){this.updateVBOData()},this)},setTilesets:function(t){var e=[],i=[],n=this.tilemap;Array.isArray(t)||(t=[t]);for(var s=0;sv||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(1===p)for(o=0;o=0;a--)!(r=f[o][a])||r.indexv||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(2===p)for(o=u-1;o>=0;o--)for(a=0;av||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(3===p)for(o=u-1;o>=0;o--)for(a=l-1;a>=0;a--)!(r=f[o][a])||r.indexv||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));this.dirty[e]=!1,null===m?(m=i.createVertexBuffer(y,n.STATIC_DRAW),this.vertexBuffer[e]=m):(i.setVertexBuffer(m),n.bufferSubData(n.ARRAY_BUFFER,0,y))}return this},batchTile:function(t,e,i,n,s,r,o){var a=i.getTileTextureCoordinates(e.index);if(!a)return t;var h=i.tileWidth,l=i.tileHeight,c=h/2,d=l/2,f=a.x/n,p=a.y/s,g=(a.x+h)/n,v=(a.y+l)/s,m=this._tempMatrix,y=-c,x=-d;e.flipX&&(h*=-1,y+=i.tileWidth),e.flipY&&(l*=-1,x+=i.tileHeight);var T=y+h,w=x+l;m.applyITRS(c+e.pixelX,d+e.pixelY,e.rotation,1,1);var b=u.getTintAppendFloatAlpha(16777215,r.alpha*this.alpha*e.alpha),S=m.getX(y,x),E=m.getY(y,x),A=m.getX(y,w),_=m.getY(y,w),C=m.getX(T,w),M=m.getY(T,w),P=m.getX(T,x),O=m.getY(T,x);r.roundPixels&&(S=Math.round(S),E=Math.round(E),A=Math.round(A),_=Math.round(_),C=Math.round(C),M=Math.round(M),P=Math.round(P),O=Math.round(O));var R=this.vertexViewF32[o],L=this.vertexViewU32[o];return R[++t]=S,R[++t]=E,R[++t]=f,R[++t]=p,R[++t]=0,L[++t]=b,R[++t]=A,R[++t]=_,R[++t]=f,R[++t]=v,R[++t]=0,L[++t]=b,R[++t]=C,R[++t]=M,R[++t]=g,R[++t]=v,R[++t]=0,L[++t]=b,R[++t]=S,R[++t]=E,R[++t]=f,R[++t]=p,R[++t]=0,L[++t]=b,R[++t]=C,R[++t]=M,R[++t]=g,R[++t]=v,R[++t]=0,L[++t]=b,R[++t]=P,R[++t]=O,R[++t]=g,R[++t]=p,R[++t]=0,L[++t]=b,this.vertexCount[o]+=6,t},setRenderOrder:function(t){if("string"==typeof t&&(t=["right-down","left-down","right-up","left-up"].indexOf(t)),t>=0&&t<4){this._renderOrder=t;for(var e=0;e0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=r},function(t,e,i){var n=i(1418);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substr(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===n.indexOf(e)&&"_"!==e.substr(0,1)&&i.push({key:e,value:t[e]});return i}},function(t,e,i){var n=i(5);t.exports=function(t){var e=n(t,"tweens",null);return null===e?[]:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},function(t,e,i){var n=i(248),s=i(15),r=i(97),o=i(89),a=i(150),h=i(5),l=i(247),u=i(249),c=i(251);t.exports=function(t,e,i){void 0===i&&(i=n);var d=h(e,"from",0),f=h(e,"to",1),p=[{value:d}],g=a(e,"delay",i.delay),v=a(e,"duration",i.duration),m=h(e,"easeParams",i.easeParams),y=o(h(e,"ease",i.ease),m),x=a(e,"hold",i.hold),T=a(e,"repeat",i.repeat),w=a(e,"repeatDelay",i.repeatDelay),b=r(e,"yoyo",i.yoyo),S=[],E=l("value",f),A=c(p[0],0,"value",E.getEnd,E.getStart,E.getActive,y,g,v,b,x,T,w,!1,!1);A.start=d,A.current=d,A.to=f,S.push(A);var _=new u(t,S,p);_.offset=s(e,"offset",null),_.completeDelay=s(e,"completeDelay",0),_.loop=Math.round(s(e,"loop",0)),_.loopDelay=Math.round(s(e,"loopDelay",0)),_.paused=r(e,"paused",!1),_.useFrames=r(e,"useFrames",!1);for(var C=h(e,"callbackScope",_),M=[_,null],P=u.TYPES,O=0;O0?Math.floor(v/p.length):h(e,"duration",g.duration),g.delay=h(e,"delay",g.delay),g.easeParams=c(e,"easeParams",g.easeParams),g.ease=a(c(e,"ease",g.ease),g.easeParams),g.hold=h(e,"hold",g.hold),g.repeat=h(e,"repeat",g.repeat),g.repeatDelay=h(e,"repeatDelay",g.repeatDelay),g.yoyo=o(e,"yoyo",g.yoyo),g.flipX=o(e,"flipX",g.flipX),g.flipY=o(e,"flipY",g.flipY);for(var m=0;m0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){return this.calcDuration(),this.progress=0,this.totalProgress=0,!this.paused||(this.state=a.PAUSED,!1)},resetTweens:function(t){for(var e=0;e0?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=a.LOOP_DELAY):(this.state=a.ACTIVE,this.dispatchTimelineEvent(r.TIMELINE_LOOP,this.callbacks.onLoop))):this.completeDelay>0?(this.state=a.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=a.PENDING_REMOVE,this.dispatchTimelineEvent(r.TIMELINE_COMPLETE,this.callbacks.onComplete))},update:function(t,e){if(this.state!==a.PAUSED){switch(this.useFrames&&(e=1*this.manager.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case a.ACTIVE:for(var i=this.totalData,n=0;n>>0;if("function"!=typeof t)throw new TypeError;for(var n=arguments.length>=2?arguments[1]:void 0,s=0;s>16)+(65280&t)+((255&t)<<16)},n={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,_isTinted:!1,tintFill:!1,clearTint:function(){return this.setTint(16777215),this._isTinted=!1,this},setTint:function(t,e,n,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,n=t,s=t),this._tintTL=i(t),this._tintTR=i(e),this._tintBL=i(n),this._tintBR=i(s),this._isTinted=!0,this.tintFill=!1,this},setTintFill:function(t,e,i,n){return this.setTint(t,e,i,n),this.tintFill=!0,this},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=i(t),this._isTinted=!0}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=i(t),this._isTinted=!0}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=i(t),this._isTinted=!0}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=i(t),this._isTinted=!0}},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){return this._isTinted}}};t.exports=n},function(t,e){t.exports="changedata"},function(t,e){t.exports="changedata-"},function(t,e){t.exports="removedata"},function(t,e){t.exports="setdata"},function(t,e){t.exports="destroy"},function(t,e){t.exports="complete"},function(t,e){t.exports="created"},function(t,e){t.exports="error"},function(t,e){t.exports="loop"},function(t,e){t.exports="play"},function(t,e){t.exports="seeked"},function(t,e){t.exports="seeking"},function(t,e){t.exports="stop"},function(t,e){t.exports="timeout"},function(t,e){t.exports="unlocked"},function(t,e,i){var n=i(39);t.exports=function(t,e,i,s,r){return n(t,"alpha",e,i,s,r)}},function(t,e,i){var n=i(39);t.exports=function(t,e,i,s,r){return n(t,"x",e,i,s,r)}},function(t,e,i){var n=i(39);t.exports=function(t,e,i,s,r,o,a){return void 0!==i&&null!==i||(i=e),n(t,"x",e,s,o,a),n(t,"y",i,r,o,a)}},function(t,e,i){var n=i(39);t.exports=function(t,e,i,s,r){return n(t,"y",e,i,s,r)}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=6.28);for(var s=i,r=(n-i)/t.length,o=0;o0?s(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a1)if(0===s){var d=t.length-1;for(o=t[d].x,a=t[d].y,h=d-1;h>=0;h--)l=(c=t[h]).x,u=c.y,c.x=o,c.y=a,o=l,a=u;t[d].x=e,t[d].y=i}else{for(o=t[0].x,a=t[0].y,h=1;h0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<.001&&(e.zoom=.001))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){t.exports={Camera:i(293),BaseCamera:i(101),CameraManager:i(705),Effects:i(301),Events:i(53)}},function(t,e){t.exports="cameradestroy"},function(t,e){t.exports="camerafadeincomplete"},function(t,e){t.exports="camerafadeinstart"},function(t,e){t.exports="camerafadeoutcomplete"},function(t,e){t.exports="camerafadeoutstart"},function(t,e){t.exports="cameraflashcomplete"},function(t,e){t.exports="cameraflashstart"},function(t,e){t.exports="camerapancomplete"},function(t,e){t.exports="camerapanstart"},function(t,e){t.exports="postrender"},function(t,e){t.exports="prerender"},function(t,e){t.exports="camerashakecomplete"},function(t,e){t.exports="camerashakestart"},function(t,e){t.exports="camerazoomcomplete"},function(t,e){t.exports="camerazoomstart"},function(t,e,i){var n=i(24),s=i(0),r=i(53),o=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,o,a,h){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===o&&(o=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene),!o&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=t,this.progress=0,this.red=i,this.green=n,this.blue=s,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h;var l=t?r.FADE_OUT_START:r.FADE_IN_START;return this.camera.emit(l,this.camera,this,e,i,n,s),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed=1?1:1/e*(1+(e*t|0))}},function(t,e,i){var n=i(24),s=i(0),r=i(53),o=i(3),a=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.intensity=new o,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s){return void 0===t&&(t=100),void 0===e&&(e=.05),void 0===i&&(i=!1),void 0===n&&(n=null),void 0===s&&(s=this.camera.scene),!i&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=t,this.progress=0,"number"==typeof e?this.intensity.set(e):this.intensity.set(e.x,e.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=n,this._onUpdateScope=s,this.camera.emit(r.SHAKE_START,this.camera,this,t,e),this.camera)},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(t,e){if(this.isRunning)if(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed0&&(o.preRender(1),t.render(n,e,i,o))}},resetAll:function(){for(var t=0;t1)for(var i=1;i=1)&&(s.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(s.mspointer=!0),navigator.getGamepads&&(s.gamepads=!0),"onwheel"in window||n.ie&&"WheelEvent"in window?s.wheelEvent="wheel":"onmousewheel"in window?s.wheelEvent="mousewheel":n.firefox&&"MouseScrollEvent"in window&&(s.wheelEvent="DOMMouseScroll"),s)},function(t,e,i){var n=i(123),s={audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){s.audioData=!!window.Audio,s.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e&&(t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(s.ogg=!0),(t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||t.canPlayType("audio/opus;").replace(/^no$/,""))&&(s.opus=!0),t.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(s.mp3=!0),t.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")&&(s.wav=!0),(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/aac;").replace(/^no$/,""))&&(s.m4a=!0),t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(s.webm=!0),""!==t.canPlayType('audio/mp4;codecs="ec-3"')))if(n.edge)s.dolby=!0;else if(n.safari&&n.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var i=parseInt(RegExp.$1,10),r=parseInt(RegExp.$2,10);(10===i&&r>=11||i>10)&&(s.dolby=!0)}}catch(t){}return s}()},function(t,e){var i={h264:!1,hls:!1,mp4:!1,ogg:!1,vp9:!1,webm:!1};t.exports=function(){var t=document.createElement("video"),e=!!t.canPlayType;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(i.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.h264=!0,i.mp4=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(i.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(i.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.hls=!0))}catch(t){}return i}()},function(t,e){var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){var t,e="Fullscreen",n="FullScreen",s=["request"+e,"request"+n,"webkitRequest"+e,"webkitRequest"+n,"msRequest"+e,"msRequest"+n,"mozRequest"+n,"mozRequest"+e];for(t=0;tMath.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){var n=i(318);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(13);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e?t:(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e1?t[i]-(n(s-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(s-r,t[r?r-1:0],t[r],t[i1?n(t[i],t[i-1],i-s):n(t[r],t[r+1>i?i:r+1],s-r)}},function(t,e,i){var n=i(166);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){t.exports={GetNext:i(327),IsSize:i(124),IsValue:i(757)}},function(t,e){t.exports=function(t){return t>0&&0==(t&t-1)}},function(t,e,i){t.exports={Ceil:i(328),Floor:i(103),To:i(759)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),n?(i+t)/e:i+t)}},function(t,e,i){var n=new(i(0))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var n=0;n>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e0;e--){var i=Math.floor(this.frac()*(e+1)),n=t[i];t[i]=t[e],t[e]=n}return t}});t.exports=n},function(t,e){t.exports=function(t){for(var e=0,i=0;i1?void 0!==n?(s=(n-t)/(n-i))<0&&(s=0):s=1:s<0&&(s=0),s}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,s=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*s,t.y=Math.sin(i)*s,t.z=n*e,t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var s=[],r=[],o=0;o0&&t<=e*i&&(r=t>e-1?t-(o=Math.floor(t/e))*e:t,s.set(r,o)),s}},function(t,e){t.exports=function(t,e,i){return Math.abs(t-e)<=i}},function(t,e,i){var n=i(182),s=i(335),r=i(336),o=new s,a=new r,h=new n;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},function(t,e){t.exports="addtexture"},function(t,e){t.exports="onerror"},function(t,e){t.exports="onload"},function(t,e){t.exports="ready"},function(t,e){t.exports="removetexture"},function(t,e){t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","","void main()","{"," vec2 uv = gl_FragCoord.xy / uResolution;"," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);"," float alpha = mainColor.a;",""," if (!uInvertMaskAlpha)"," {"," alpha *= (maskColor.a);"," }"," else"," {"," alpha *= (1.0 - maskColor.a);"," }",""," gl_FragColor = vec4(mainColor.rgb * alpha, alpha);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","","precision mediump float;","","attribute vec2 inPosition;","","void main()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_FORWARD_DIFFUSE_FS","","precision mediump float;","","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","","const int kMaxLights = %LIGHT_COUNT%;","","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","","varying vec2 outTexCoord;","varying vec4 outTint;","","void main()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);"," vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.rgb * outTint.a, outTint.a);"," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;",""," for (int index = 0; index < kMaxLights; ++index)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }",""," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);"," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_TEXTURE_TINT_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.rgb * outTint.a, outTint.a);"," vec4 color = texture;",""," if (outTintEffect == 0.0)"," {"," // Multiply texture tint"," color = texture * texel;"," }"," else if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.rgb * outTint.a, texture.a);"," color.a = texture.a * texel.a;"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_TEXTURE_TINT_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform mat4 uModelMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}","",""].join("\n")},function(t,e,i){t.exports={GenerateTexture:i(351),Palettes:i(790)}},function(t,e,i){t.exports={ARNE16:i(352),C64:i(791),CGA:i(792),JMP:i(793),MSX:i(794)}},function(t,e){t.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},function(t,e){t.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},function(t,e){t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},function(t,e){t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},function(t,e,i){t.exports={Path:i(796),CubicBezier:i(353),Curve:i(85),Ellipse:i(354),Line:i(355),QuadraticBezier:i(356),Spline:i(357)}},function(t,e,i){var n=i(0),s=i(353),r=i(354),o=i(6),a=i(355),h=i(797),l=i(356),u=i(11),c=i(357),d=i(3),f=i(13),p=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.name="",this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new d,this._tmpVec2A=new d,this._tmpVec2B=new d,"object"==typeof t?this.fromJSON(t):this.startPoint.set(t,e)},add:function(t){return this.curves.push(t),this},circleTo:function(t,e,i){return void 0===e&&(e=!1),this.ellipseTo(t,t,0,360,e,i)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);return t.equals(e)||this.curves.push(new a(e,t)),this},cubicBezierTo:function(t,e,i,n,r,o){var a,h,l,u=this.getEndPoint();return t instanceof d?(a=t,h=e,l=i):(a=new d(i,n),h=new d(r,o),l=new d(t,e)),this.add(new s(u,a,h,l))},quadraticBezierTo:function(t,e,i,n){var s,r,o=this.getEndPoint();return t instanceof d?(s=t,r=e):(s=new d(i,n),r=new d(t,e)),this.add(new l(o,s,r))},draw:function(t,e){for(var i=0;i0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new d);for(var i=t*this.getLength(),n=this.getCurveLengths(),s=0;s=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new d),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new d),t.copy(this.startPoint)},lineTo:function(t,e){t instanceof d?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new a([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new c(t))},moveTo:function(t,e){return t instanceof d?this.add(new h(t.x,t.y)):this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},function(t,e,i){var n=i(36),s=i(361);t.exports=function(t,e,i){var r=i,o=i,a=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,l=2*i-h;r=s(l,h,t+1/3),o=s(l,h,t),a=s(l,h,t-1/3)}return(new n).setGLTo(r,o,a,1)}},function(t,e,i){var n=i(172);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],s=0;s<=359;s++)i.push(n(s/359,t,e));return i}},function(t,e,i){var n=i(121),s=function(t,e,i,s,r,o,a,h){void 0===a&&(a=100),void 0===h&&(h=0);var l=h/a;return{r:n(t,s,l),g:n(e,r,l),b:n(i,o,l)}};t.exports={RGBWithRGB:s,ColorWithRGB:function(t,e,i,n,r,o){return void 0===r&&(r=100),void 0===o&&(o=0),s(t.r,t.g,t.b,e,i,n,r,o)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),s(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(180),s=i(36);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e,i){var n=i(360);t.exports=function(t,e,i,s,r){return void 0===s&&(s=255),void 0===r&&(r="#"),"#"===r?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1):"0x"+n(s)+n(t)+n(e)+n(i)}},function(t,e,i){t.exports={BitmapMask:i(278),GeometryMask:i(279)}},function(t,e,i){var n={AddToDOM:i(126),DOMContentLoaded:i(362),GetScreenOrientation:i(363),GetTarget:i(368),ParseXML:i(369),RemoveFromDOM:i(188),RequestAnimationFrame:i(349)};t.exports=n},function(t,e,i){t.exports={EventEmitter:i(831)}},function(t,e,i){var n=i(0),s=i(9),r=i(20),o=new n({Extends:s,initialize:function(){s.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},function(t,e,i){var n=i(126),s=i(289),r=i(292),o=i(28),a=i(0),h=i(314),l=i(833),u=i(337),c=i(99),d=i(347),f=i(315),p=i(362),g=i(9),v=i(19),m=i(370),y=i(20),x=i(375),T=i(376),w=i(378),b=i(125),S=i(381),E=i(348),A=i(350),_=i(385),C=i(393),M=new a({initialize:function(t){this.config=new h(t),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new g,this.anims=new s(this),this.textures=new S(this),this.cache=new r(this),this.registry=new c(this),this.input=new m(this,this.config),this.scene=new w(this,this.config.sceneConfig),this.device=f,this.scale=new T(this,this.config),this.sound=null,this.sound=_.create(this),this.loop=new E(this,this.config.fps),this.plugins=new x(this,this.config),this.facebook=new C(this),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,p(this.boot.bind(this))},boot:function(){y.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),u(this),l(this),d(this),n(this.canvas,this.config.parent),this.textures.once(b.READY,this.texturesReady,this),this.events.emit(v.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(v.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),A(this);var t=this.events;t.on(v.HIDDEN,this.onHidden,this),t.on(v.VISIBLE,this.onVisible,this),t.on(v.BLUR,this.onBlur,this),t.on(v.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e);var n=this.renderer;n.preRender(),i.emit(v.PRE_RENDER,n,t,e),this.scene.render(n),n.postRender(),i.emit(v.POST_RENDER,n,t,e)},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e),i.emit(v.PRE_RENDER),i.emit(v.POST_RENDER)},onHidden:function(){this.loop.pause(),this.events.emit(v.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(v.RESUME)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.events.emit(v.DESTROY),this.events.removeAllListeners(),this.scene.destroy(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=M},function(t,e,i){var n=i(126);t.exports=function(t){var e=t.config;if(e.parent&&e.domCreateContainer){var i=document.createElement("div");i.style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: none;","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=i,n(i,e.parent)}}},function(t,e){t.exports="boot"},function(t,e){t.exports="destroy"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameout"},function(t,e){t.exports="gameover"},function(t,e){t.exports="gameobjectdown"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameobjectmove"},function(t,e){t.exports="gameobjectout"},function(t,e){t.exports="gameobjectover"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="wheel"},function(t,e){t.exports="gameobjectup"},function(t,e){t.exports="gameobjectwheel"},function(t,e){t.exports="boot"},function(t,e){t.exports="process"},function(t,e){t.exports="update"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointerdownoutside"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="pointerupoutside"},function(t,e){t.exports="wheel"},function(t,e){t.exports="pointerlockchange"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="start"},function(t,e){t.exports="update"},function(t,e){t.exports=function(t){if(!t)return window.innerHeight;var e=Math.abs(window.orientation),i={w:0,h:0},n=document.createElement("div");return n.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(n),i.w=90===e?n.offsetHeight:window.innerWidth,i.h=90===e?window.innerWidth:n.offsetHeight,document.documentElement.removeChild(n),n=null,90!==Math.abs(window.orientation)?i.h:i.w}},function(t,e){t.exports="addfile"},function(t,e){t.exports="complete"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="load"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="progress"},function(t,e){t.exports="start"},function(t,e,i){var n=i(1),s=i(191);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=n(t.settings,"physics",!1);if(e||i){var r=[];if(e&&r.push(s(e+"Physics")),i)for(var o in i)o=s(o.concat("Physics")),-1===r.indexOf(o)&&r.push(o);return r}}},function(t,e,i){var n=i(1);t.exports=function(t){var e=t.plugins.getDefaultScenePlugins(),i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e,i){var n={game:"game",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"};n.facebook="facebook",t.exports=n},function(t,e){t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var s,r=i.getElementsByTagName("SubTexture"),o=0;og||c<-g)&&(c=0),c<0&&(c=g+c),-1!==d&&(g=c+(d+1));for(var v=f,m=f,y=0,x=0,T=0;Tr&&(y=w-r),b>o&&(x=b-o),t.add(T,e,i+v,s+m,h-y,l-x),(v+=h+p)+h>r&&(v=f,m+=l+p)}return t}},function(t,e,i){var n=i(1);t.exports=function(t,e,i){var s=n(i,"frameWidth",null),r=n(i,"frameHeight",s);if(!s)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o=t.source[0];t.add("__BASE",0,0,0,o.width,o.height);var a,h=n(i,"startFrame",0),l=n(i,"endFrame",-1),u=n(i,"margin",0),c=n(i,"spacing",0),d=e.cutX,f=e.cutY,p=e.cutWidth,g=e.cutHeight,v=e.realWidth,m=e.realHeight,y=Math.floor((v-u+c)/(s+c)),x=Math.floor((m-u+c)/(r+c)),T=y*x,w=e.x,b=s-w,S=s-(v-p-w),E=e.y,A=r-E,_=r-(m-g-E);(h>T||h<-T)&&(h=0),h<0&&(h=T+h),-1!==l&&(T=h+(l+1));for(var C=u,M=u,P=0,O=e.sourceIndex,R=0;R0){var r=i-t.length;if(r<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),n&&n.call(s,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.splice(o,1),o--;if(0===(o=e.length))return null;i>0&&o>r&&(e.splice(r),o=r);for(var a=0;a0){var o=n-t.length;if(o<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),s&&s.call(r,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.pop(),a--;if(0===(a=e.length))return null;n>0&&a>o&&(e.splice(o),a=o);for(var h=a-1;h>=0;h--){var l=e[h];t.splice(i,0,l),s&&s.call(r,l)}return e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i0){var n=t[i-1],s=t.indexOf(n);t[i]=n,t[s]=e}return t}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e);if(-1===n||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&it.length-1)throw new Error("Index out of bounds");var r=n(t,e);return i&&i.call(s,r),r}},function(t,e,i){var n=i(73);t.exports=function(t,e,i,s,r){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===r&&(r=t),n(t,e,i)){var o=i-e,a=t.splice(e,o);if(s)for(var h=0;h0&&(t.splice(i,1),t.unshift(e)),e}},function(t,e,i){var n=i(73);t.exports=function(t,e,i,s,r){if(void 0===s&&(s=0),void 0===r&&(r=t.length),n(t,s,r))for(var o=s;o0&&i.maxWidth!==l){for(n=0;nl||U-N>l?(Y.push(X.i-1),X.cr?(Y.push(X.i+X.word.length),N=0,B=null):B=X):X.cr&&(Y.push(X.i+X.word.length),N=0,B=null)}for(n=Y.length-1;n>=0;n--)s=a,r=Y[n],o="\n",a=s.substr(0,r)+o+s.substr(r+1);i.maxWidth=l,i.wrappedText=a,h=a.length,k=[],F=null}for(n=0;nb&&(c=b),d>S&&(d=S);var W=b+w.xAdvance,V=S+v;fR&&(R=D),DR&&(R=D),D0&&(a=(o=z.wrappedText).length);var U=e._bounds.lines;1===N?X=(U.longest-U.lengths[0])/2:2===N&&(X=U.longest-U.lengths[0]);for(var G=s.roundPixels,W=0;W0&&(a=(o=L.wrappedText).length);var D=e._bounds.lines;1===P?R=(D.longest-D.lengths[0])/2:2===P&&(R=D.longest-D.lengths[0]),h.translate(-e.displayOriginX,-e.displayOriginY);for(var k=s.roundPixels,F=0;F0!=t>0,this._alpha=t}}});t.exports=r},function(t,e,i){var n=i(2),s=i(2);n=i(973),s=i(974),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){var r=e.list;if(0!==r.length){var o=e.localTransform;s?(o.loadIdentity(),o.multiply(s),o.translate(e.x,e.y),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY)):o.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);for(var h=e.alphaTopLeft,l=e.alphaTopRight,u=e.alphaBottomLeft,c=e.alphaBottomRight,d=e.scrollFactorX,f=e.scrollFactorY,p=r,g=r.length,v=0;v0||e.cropHeight>0;l&&(h.flush(),t.pushScissor(e.x,e.y,e.cropWidth*e.scaleX,e.cropHeight*e.scaleY));var u=h._tempMatrix1,c=h._tempMatrix2,d=h._tempMatrix3,f=h._tempMatrix4;c.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),u.copyFrom(s.matrix),r?(u.multiplyWithOffset(r,-s.scrollX*e.scrollFactorX,-s.scrollY*e.scrollFactorY),c.e=e.x,c.f=e.y,u.multiply(c,d)):(c.e-=s.scrollX*e.scrollFactorX,c.f-=s.scrollY*e.scrollFactorY,u.multiply(c,d));var p=e.frame,g=p.glTexture,v=p.cutX,m=p.cutY,y=g.width,x=g.height,T=e._isTinted&&e.tintFill,w=n.getTintAppendFloatAlpha(e._tintTL,s.alpha*e._alphaTL),b=n.getTintAppendFloatAlpha(e._tintTR,s.alpha*e._alphaTR),S=n.getTintAppendFloatAlpha(e._tintBL,s.alpha*e._alphaBL),E=n.getTintAppendFloatAlpha(e._tintBR,s.alpha*e._alphaBR);h.setTexture2D(g,0);var A,_,C=0,M=0,P=0,O=0,R=e.letterSpacing,L=0,D=0,k=0,F=0,I=e.scrollX,B=e.scrollY,N=e.fontData,Y=N.chars,X=N.lineHeight,z=e.fontSize/N.size,U=0,G=e._align,W=0,V=0;e.getTextBounds(!1);var H=e._bounds.lines;1===G?V=(H.longest-H.lengths[0])/2:2===G&&(V=H.longest-H.lengths[0]);for(var j=s.roundPixels,q=e.displayCallback,K=e.callbackData,J=0;J0&&e.cropHeight>0&&(h.beginPath(),h.rect(0,0,e.cropWidth,e.cropHeight),h.clip());for(var N=0;N0&&(Y=Y%b-b):Y>b?Y=b:Y<0&&(Y=b+Y%b),null===_&&(_=new o(F+Math.cos(N)*B,I+Math.sin(N)*B,v),S.push(_),k+=.01);k<1+z;)w=Y*k+N,x=F+Math.cos(w)*B,T=I+Math.sin(w)*B,_.points.push(new r(x,T,v)),k+=.01;w=Y+N,x=F+Math.cos(w)*B,T=I+Math.sin(w)*B,_.points.push(new r(x,T,v));break;case n.FILL_RECT:u.setTexture2D(M),u.batchFillRect(p[++P],p[++P],p[++P],p[++P],f,c);break;case n.FILL_TRIANGLE:u.setTexture2D(M),u.batchFillTriangle(p[++P],p[++P],p[++P],p[++P],p[++P],p[++P],f,c);break;case n.STROKE_TRIANGLE:u.setTexture2D(M),u.batchStrokeTriangle(p[++P],p[++P],p[++P],p[++P],p[++P],p[++P],v,f,c);break;case n.LINE_TO:null!==_?_.points.push(new r(p[++P],p[++P],v)):(_=new o(p[++P],p[++P],v),S.push(_));break;case n.MOVE_TO:_=new o(p[++P],p[++P],v),S.push(_);break;case n.SAVE:a.push(f.copyToArray());break;case n.RESTORE:f.copyFromArray(a.pop());break;case n.TRANSLATE:F=p[++P],I=p[++P],f.translate(F,I);break;case n.SCALE:F=p[++P],I=p[++P],f.scale(F,I);break;case n.ROTATE:f.rotate(p[++P]);break;case n.SET_TEXTURE:var U=p[++P],G=p[++P];u.currentFrame=U,u.setTexture2D(U.glTexture,0),u.tintEffect=G,M=U.glTexture;break;case n.CLEAR_TEXTURE:u.currentFrame=t.blankTexture,u.tintEffect=2,M=t.blankTexture.glTexture}}}},function(t,e,i){var n=i(2),s=i(2);n=i(986),s=i(987),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){this.pipeline.batchSprite(e,n,s)}},function(t,e){t.exports=function(t,e,i,n,s){t.batchSprite(e,e.frame,n,s)}},function(t,e,i){var n=i(2),s=i(2);n=i(989),s=i(990),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){this.pipeline.batchSprite(e,n,s)}},function(t,e){t.exports=function(t,e,i,n,s){t.batchSprite(e,e.frame,n,s)}},function(t,e,i){t.exports={GravityWell:i(406),Particle:i(407),ParticleEmitter:i(408),ParticleEmitterManager:i(204),Zones:i(996)}},function(t,e,i){var n=i(0),s=i(329),r=i(89),o=i(1),a=i(62),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return this.propertyValue},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if("number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&(this.has(t,"random")||this.hasBoth(t,"start","end")||this.hasBoth(t,"min","max"))){this.start=this.has(t,"start")?t.start:t.min,this.end=this.has(t,"end")?t.end:t.max;var i=this.hasBoth(t,"min","max")||!!t.random;if(i){var n=t.random;Array.isArray(n)&&(this.start=n[0],this.end=n[1]),this.onEmit=this.randomRangedValueEmit}if(this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var s=this.has(t,"ease")?t.ease:"Linear";this.ease=r(s),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i){var n=t.data[e];return(n.max-n.min)*this.ease(i)+n.min}});t.exports=h},function(t,e,i){var n=i(2),s=i(2);n=i(994),s=i(995),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(10);t.exports=function(t,e,i,s,r){var o=e.emitters.list,a=o.length;if(0!==a){var h=this.pipeline,l=h._tempMatrix1.copyFrom(s.matrix),u=h._tempMatrix2,c=h._tempMatrix3,d=h._tempMatrix4.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);l.multiply(d),t.setPipeline(h);var f=s.roundPixels,p=e.defaultFrame.glTexture,g=n.getTintAppendFloatAlphaAndSwap;h.setTexture2D(p,0);for(var v=0;v?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:"ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",TEXT_SET7:"AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:"ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789"}},function(t,e,i){var n=i(5);t.exports=function(t,e){var i=e.width,s=e.height,r=Math.floor(i/2),o=Math.floor(s/2),a=n(e,"chars","");if(""!==a){var h=n(e,"image",""),l=n(e,"offset.x",0),u=n(e,"offset.y",0),c=n(e,"spacing.x",0),d=n(e,"spacing.y",0),f=n(e,"lineSpacing",0),p=n(e,"charsPerRow",null);null===p&&(p=t.sys.textures.getFrame(h).width/i)>a.length&&(p=a.length);for(var g=l,v=u,m={retroFont:!0,font:h,size:i,lineHeight:s+f,chars:{}},y=0,x=0;x0&&r.maxLines1&&(d+=f*(h-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:f,lineHeight:c}}},function(t,e,i){var n=i(2),s=i(2);n=i(1005),s=i(1006),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(10);t.exports=function(t,e,i,s,r){if(0!==e.width&&0!==e.height){var o=e.frame,a=o.width,h=o.height,l=n.getTintAppendFloatAlpha;this.pipeline.batchTexture(e,o.glTexture,a,h,e.x,e.y,a/e.style.resolution,h/e.style.resolution,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,a,h,l(e._tintTL,s.alpha*e._alphaTL),l(e._tintTR,s.alpha*e._alphaTR),l(e._tintBL,s.alpha*e._alphaBL),l(e._tintBR,s.alpha*e._alphaBR),e._isTinted&&e.tintFill,0,0,s,r)}}},function(t,e){t.exports=function(t,e,i,n,s){0!==e.width&&0!==e.height&&t.batchSprite(e,e.frame,n,s)}},function(t,e,i){var n=i(0),s=i(15),r=i(5),o=i(1008),a={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},h=new n({initialize:function(t,e){this.parent=t,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this._font,this.setStyle(e,!1,!0);var i=r(e,"metrics",!1);this.metrics=i?{ascent:r(i,"ascent",0),descent:r(i,"descent",0),fontSize:r(i,"fontSize",0)}:o(this)},setStyle:function(t,e,i){for(var n in void 0===e&&(e=!0),void 0===i&&(i=!1),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px"),a){var o=i?a[n][1]:this[n];this[n]="wordWrapCallback"===n||"wordWrapCallbackScope"===n?r(t,a[n][0],o):s(t,a[n][0],o)}var h=r(t,"font",null);null!==h&&this.setFont(h,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var l=r(t,"fill",null);return null!==l&&(this.color=l),e?this.update(!0):this.parent},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow:function(t,e){e?(t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur):(t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor=0,t.shadowBlur=0)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=o(this)),this.parent.updateText()},setFont:function(t,e){void 0===e&&(e=!0);var i=t,n="",s="";if("string"!=typeof t)i=r(t,"fontFamily","Courier"),n=r(t,"fontSize","16px"),s=r(t,"fontStyle","");else{var o=t.split(" "),a=0;s=o.length>2?o[a++]:"",n=o[a++]||"16px",i=o[a++]||"Courier"}return i===this.fontFamily&&n===this.fontSize&&s===this.fontStyle||(this.fontFamily=i,this.fontSize=n,this.fontStyle=s,e&&this.update(!0)),this.parent},setFontFamily:function(t){return this.fontFamily!==t&&(this.fontFamily=t,this.update(!0)),this.parent},setFontStyle:function(t){return this.fontStyle!==t&&(this.fontStyle=t,this.update(!0)),this.parent},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize!==t&&(this.fontSize=t,this.update(!0)),this.parent},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.parent.width=t),e&&(this.parent.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setResolution:function(t){return this.resolution=t,this.update(!1)},setStroke:function(t,e){return void 0===e&&(e=this.strokeThickness),void 0===t&&0!==this.strokeThickness?(this.strokeThickness=0,this.update(!0)):this.stroke===t&&this.strokeThickness===e||(this.stroke=t,this.strokeThickness=e,this.update(!0)),this.parent},setShadow:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===n&&(n=0),void 0===s&&(s=!1),void 0===r&&(r=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=n,this.shadowStroke=s,this.shadowFill=r,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},function(t,e,i){var n=i(28);t.exports=function(t){var e=n.create(this),i=e.getContext("2d");t.syncFont(e,i);var s=Math.ceil(i.measureText(t.testString).width*t.baselineX),r=s,o=2*r;r=r*t.baselineY|0,e.width=s,e.height=o,i.fillStyle="#f00",i.fillRect(0,0,s,o),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,r);var a={ascent:0,descent:0,fontSize:0};if(!i.getImageData(0,0,s,o))return a.ascent=r,a.descent=r+6,a.fontSize=a.ascent+a.descent,n.remove(e),a;var h,l,u=i.getImageData(0,0,s,o).data,c=u.length,d=4*s,f=0,p=!1;for(h=0;hr;h--){for(l=0;l0)for(u=o.fillTint,c=n.getTintAppendFloatAlphaAndSwap(e.fillColor,e.fillAlpha*d),u.TL=c,u.TR=c,u.BL=c,u.BR=c,C=0;C0)for(u=o.fillTint,c=n.getTintAppendFloatAlphaAndSwap(e.altFillColor,e.altFillAlpha*d),u.TL=c,u.TR=c,u.BL=c,u.BR=c,C=0;C0){var R=o.strokeTint,L=n.getTintAppendFloatAlphaAndSwap(e.outlineFillColor,e.outlineFillAlpha*d);for(R.TL=L,R.TR=L,R.BL=L,R.BR=L,_=1;_0)for(n(h,e),_=0;_0)for(n(h,e,e.altFillColor,e.altFillAlpha*c),_=0;_0){for(s(h,e,e.outlineFillColor,e.outlineFillAlpha*c),A=1;Ao.vertexCapacity&&o.flush(),o.setTexture2D(u,0);for(var m=o.vertexViewF32,y=o.vertexViewU32,x=o.vertexCount*o.vertexComponentCount-1,T=0,w=e.tintFill,b=0;b0?Math.PI*t.radius*t.radius:0}},function(t,e,i){var n=i(70);t.exports=function(t){return new n(t.x,t.y,t.radius)}},function(t,e,i){var n=i(59);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(59);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},function(t,e,i){var n=i(11);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(105);n.Area=i(1114),n.Circumference=i(404),n.CircumferencePoint=i(203),n.Clone=i(1115),n.Contains=i(106),n.ContainsPoint=i(1116),n.ContainsRect=i(1117),n.CopyFrom=i(1118),n.Equals=i(1119),n.GetBounds=i(1120),n.GetPoint=i(402),n.GetPoints=i(403),n.Offset=i(1121),n.OffsetPoint=i(1122),n.Random=i(163),t.exports=n},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},function(t,e,i){var n=i(105);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(106);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(106);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e,i){var n=i(11);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(4),s=i(214);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r,o,a,h,l=t.x,u=t.y,c=t.radius,d=e.x,f=e.y,p=e.radius;if(u===f)0==(a=(o=-2*f)*o-4*(r=1)*(d*d+(h=(p*p-c*c-d*d+l*l)/(2*(l-d)))*h-2*d*h+f*f-p*p))?i.push(new n(h,-o/(2*r))):a>0&&(i.push(new n(h,(-o+Math.sqrt(a))/(2*r))),i.push(new n(h,(-o-Math.sqrt(a))/(2*r))));else{var g=(l-d)/(u-f),v=(p*p-c*c-d*d+l*l-f*f+u*u)/(2*(u-f));0==(a=(o=2*u*g-2*v*g-2*l)*o-4*(r=g*g+1)*(l*l+u*u+v*v-c*c-2*u*v))?(h=-o/(2*r),i.push(new n(h,v-h*g))):a>0&&(h=(-o+Math.sqrt(a))/(2*r),i.push(new n(h,v-h*g)),h=(-o-Math.sqrt(a))/(2*r),i.push(new n(h,v-h*g)))}}return i}},function(t,e,i){var n=i(216),s=i(215);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC(),h=e.getLineD();n(r,t,i),n(o,t,i),n(a,t,i),n(h,t,i)}return i}},function(t,e,i){var n=i(11),s=i(137);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},function(t,e,i){var n=i(218),s=i(137);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=t.getLineA(),o=t.getLineB(),a=t.getLineC(),h=t.getLineD();n(r,e,i),n(o,e,i),n(a,e,i),n(h,e,i)}return i}},function(t,e,i){var n=i(437),s=i(218);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC();s(r,t,i),s(o,t,i),s(a,t,i)}return i}},function(t,e,i){var n=i(216),s=i(439);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=t.getLineA(),o=t.getLineB(),a=t.getLineC();n(r,e,i),n(o,e,i),n(a,e,i)}return i}},function(t,e,i){var n=i(442),s=i(440);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC();s(t,r,i),s(t,o,i),s(t,a,i)}return i}},function(t,e,i){var n=i(444);t.exports=function(t,e){if(!n(t,e))return!1;var i=Math.min(e.x1,e.x2),s=Math.max(e.x1,e.x2),r=Math.min(e.y1,e.y2),o=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=s&&t.y>=r&&t.y<=o}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===r&&(r=0),!(e>t.right+r||it.bottom+r||si&&(i=h.x),h.xr&&(r=h.y),h.yn(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.centerX,e.y=t.centerY,e}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var n=i(174);t.exports=function(t,e,i){var s=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),n(t,s,r)}},function(t,e,i){var n=i(11),s=i(137);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)?(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y):i.setEmpty(),i}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var n=i(4),s=i(40);t.exports=function(t,e,i){void 0===i&&(i=new n),e=s(e);var r=Math.sin(e),o=Math.cos(e),a=o>0?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r)-1&&(s.splice(a,1),this.clear(o,!0))}t.length=0,this._pendingRemoval.length=0,this._list=s.concat(e.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.isActive()},updatePoll:function(t,e){if(!this.isActive())return!1;if(this.pluginEvents.emit(d.UPDATE,t,e),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var i,n=this.manager,s=n.pointers,r=n.pointersTotal;for(i=0;i0){if(this._pollTimer-=e,!(this._pollTimer<0))return!1;this._pollTimer=this.pollRate}var a=!1;for(i=0;i0&&(a=!0)}return a},update:function(t,e){if(!this.isActive())return!1;for(var i=e.length,n=!1,s=0;s0&&(n=!0)}return this._updatedThisFrame=!0,n},clear:function(t,e){void 0===e&&(e=!1);var i=t.input;if(i){e||this.queueForRemoval(t),i.gameObject=void 0,i.target=void 0,i.hitArea=void 0,i.hitAreaCallback=void 0,i.callbackContext=void 0,this.manager.resetCursor(i),t.input=null;var n=this._draggable.indexOf(t);return n>-1&&this._draggable.splice(n,1),(n=this._drag[0].indexOf(t))>-1&&this._drag[0].splice(n,1),(n=this._over[0].indexOf(t))>-1&&this._over[0].splice(n,1),t}},disable:function(t){t.input.enabled=!1},enable:function(t,e,i,n){return void 0===n&&(n=!1),t.input?t.input.enabled=!0:this.setHitArea(t,e,i),t.input&&n&&!t.input.dropZone&&(t.input.dropZone=n),this},hitTestPointer:function(t){for(var e=this.cameras.getCamerasBelowPointer(t),i=0;i0)return t.camera=n,s}return t.camera=e[0],[]},processDownEvents:function(t){var e=0,i=this._temp,n=this._eventData,s=this._eventContainer;n.cancelled=!1;for(var r=!1,o=0;o0&&l(t.x,t.y,t.downX,t.downY)>=s?i=!0:n>0&&e>=t.downTime+n&&(i=!0),i)return this.setDragState(t,3),this.processDragStartList(t)},processDragStartList:function(t){if(3!==this.getDragState(t))return 0;for(var e=this._drag[t.id],i=0;i1&&(this.sortGameObjects(i),this.topOnly&&i.splice(1)),this._drag[t.id]=i,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?(this.setDragState(t,3),this.processDragStartList(t)):(this.setDragState(t,2),0))},processDragMoveEvent:function(t){if(2===this.getDragState(t)&&this.processDragThresholdEvent(t,this.manager.game.loop.now),4!==this.getDragState(t))return 0;for(var e=this._tempZones,i=this._drag[t.id],n=0;n0?(o.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,o,h),a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h)):(o.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,o,h),e[0]?(a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h)):a.target=null)}else!h&&e[0]&&(a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h));if(o.parentContainer){var u=t.x-a.dragStartXGlobal,c=t.y-a.dragStartYGlobal,f=o.getParentRotation(),p=u*Math.cos(f)+c*Math.sin(f),g=c*Math.cos(f)-u*Math.sin(f);p*=1/o.parentContainer.scaleX,g*=1/o.parentContainer.scaleY,s=p+a.dragStartX,r=g+a.dragStartY}else s=t.x-a.dragX,r=t.y-a.dragY;o.emit(d.GAMEOBJECT_DRAG,t,s,r),this.emit(d.DRAG,t,o,s,r)}return i.length},processDragUpEvent:function(t){for(var e=this._drag[t.id],i=0;i0){var r=this.manager,o=this._eventData,a=this._eventContainer;o.cancelled=!1;for(var h=!1,l=0;l0){var s=this.manager,r=this._eventData,o=this._eventContainer;r.cancelled=!1;var a=!1;this.sortGameObjects(e);for(var h=0;h0){for(this.sortGameObjects(s),e=0;e0){for(this.sortGameObjects(r),e=0;e-1&&this._draggable.splice(s,1)}return this},makePixelPerfect:function(t){void 0===t&&(t=1);var e=this.systems.textures;return h(e,t)},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);var n=!1,s=!1,r=!1,o=!1,h=!1,l=!0;if(m(e)){var u=e;e=p(u,"hitArea",null),i=p(u,"hitAreaCallback",null),n=p(u,"draggable",!1),s=p(u,"dropZone",!1),r=p(u,"cursor",!1),o=p(u,"useHandCursor",!1),h=p(u,"pixelPerfect",!1);var c=p(u,"alphaTolerance",1);h&&(e={},i=this.makePixelPerfect(c)),e&&i||(this.setHitAreaFromTexture(t),l=!1)}else"function"!=typeof e||i||(i=e,e={});for(var d=0;d=e}}},function(t,e,i){t.exports={Events:i(139),KeyboardManager:i(371),KeyboardPlugin:i(1235),Key:i(457),KeyCodes:i(128),KeyCombo:i(458),JustDown:i(1240),JustUp:i(1241),DownDuration:i(1242),UpDuration:i(1243)}},function(t,e){t.exports="keydown"},function(t,e){t.exports="keyup"},function(t,e){t.exports="keycombomatch"},function(t,e){t.exports="down"},function(t,e){t.exports="keydown-"},function(t,e){t.exports="keyup-"},function(t,e){t.exports="up"},function(t,e,i){var n=i(0),s=i(9),r=i(139),o=i(19),a=i(5),h=i(54),l=i(138),u=i(457),c=i(128),d=i(458),f=i(1239),p=i(103),g=new n({Extends:s,initialize:function(t){s.call(this),this.game=t.systems.game,this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.manager=t.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],t.pluginEvents.once(h.BOOT,this.boot,this),t.pluginEvents.on(h.START,this.start,this)},boot:function(){var t=this.settings.input;this.enabled=a(t,"keyboard",!0);var e=a(t,"keyboard.capture",null);e&&this.addCaptures(e),this.sceneInputPlugin.pluginEvents.once(h.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.useQueue?this.sceneInputPlugin.pluginEvents.on(h.UPDATE,this.update,this):this.sceneInputPlugin.manager.events.on(h.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(h.SHUTDOWN,this.shutdown,this),this.game.events.on(o.BLUR,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},addCapture:function(t){return this.manager.addCapture(t),this},removeCapture:function(t){return this.manager.removeCapture(t),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:c.UP,down:c.DOWN,left:c.LEFT,right:c.RIGHT,space:c.SPACE,shift:c.SHIFT})},addKeys:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!1);var n={};if("string"==typeof t){t=t.split(",");for(var s=0;s-1?n[s]=t:n[t.keyCode]=t,e&&this.addCapture(t.keyCode),t.setEmitOnRepeat(i),t}return"string"==typeof t&&(t=c[t.toUpperCase()]),n[t]||(n[t]=new u(this,t),e&&this.addCapture(t),n[t].setEmitOnRepeat(i)),n[t]},removeKey:function(t,e){void 0===e&&(e=!1);var i,n=this.keys;if(t instanceof u){var s=n.indexOf(t);s>-1&&(i=this.keys[s],this.keys[s]=void 0)}else"string"==typeof t&&(t=c[t.toUpperCase()]);return n[t]&&(i=n[t],n[t]=void 0),i&&(i.plugin=null,e&&i.destroy()),this},createCombo:function(t,e){return new d(this,t,e)},checkDown:function(t,e){if(this.enabled&&t.isDown){var i=p(this.time-t.timeDown,e);if(i>t._tick)return t._tick=i,!0}return!1},update:function(){var t=this.manager.queue,e=t.length;if(this.isActive()&&0!==e)for(var i=this.keys,n=0;n0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(s=!0,i=n(t,e))}else s=!0,i=n(t,e);return!s&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},function(t,e){t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},function(t,e){t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},function(t,e,i){var n=i(128),s={};for(var r in n)s[n[r]]=r;t.exports=s},function(t,e){t.exports=function(t){return!!t._justDown&&(t._justDown=!1,!0)}},function(t,e){t.exports=function(t){return!!t._justUp&&(t._justUp=!1,!0)}},function(t,e){t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeDown;return t.isDown&&i'),i.push(''),i.push(''),i.push(this.xhrLoader.responseText),i.push(""),i.push(""),i.push("");var n=[i.join("\n")],o=this;try{var a=new window.Blob(n,{type:"image/svg+xml;charset=utf-8"})}catch(t){return o.state=s.FILE_ERRORED,void o.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(o.data),o.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(o.data),o.onProcessError()},r.createObjectURL(this.data,a,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});o.register("htmlTexture",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r0},isLoading:function(){return this.state===s.LOADER_LOADING||this.state===s.LOADER_PROCESSING},isReady:function(){return this.state===s.LOADER_IDLE||this.state===s.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(a.START,this),0===this.list.size?this.loadComplete():(this.state=s.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(c.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(a.PROGRESS,this.progress)},update:function(){this.state===s.LOADER_LOADING&&this.list.size>0&&this.inflight.sizei&&(n=l,i=c)}}return n},moveTo:function(t,e,i,n,s){void 0===n&&(n=60),void 0===s&&(s=0);var o=Math.atan2(i-t.y,e-t.x);return s>0&&(n=r(t.x,t.y,e,i)/(s/1e3)),t.body.velocity.setToPolar(o,n),o},moveToObject:function(t,e,i,n){return this.moveTo(t,e.x,e.y,i,n)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new p),i.setToPolar(s(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new p),i.setToPolar(t,e)},overlapRect:function(t,e,i,n,s,r){return c(this.world,t,e,i,n,s,r)},overlapCirc:function(t,e,i,n,s){return u(this.world,t,e,i,n,s)},shutdown:function(){if(this.world){var t=this.systems.events;t.off(f.UPDATE,this.world.update,this.world),t.off(f.POST_UPDATE,this.world.postUpdate,this.world),t.off(f.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null}},destroy:function(){this.shutdown(),this.scene.sys.events.off(f.START,this.start,this),this.scene=null,this.systems=null}});d.register("ArcadePhysics",v,"arcadePhysics"),t.exports=v},function(t,e){t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},function(t,e){t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},function(t,e){t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,e,i){return this.body.setCollideWorldBounds(t,e,i),this}}},function(t,e){t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},function(t,e){t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this},setDamping:function(t){return this.body.useDamping=t,this}}},function(t,e){var i={enableBody:function(t,e,i,n,s){return t&&this.body.reset(e,i),n&&(this.body.gameObject.active=!0),s&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};t.exports=i},function(t,e){t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},function(t,e){t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},function(t,e){var i={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}};t.exports=i},function(t,e){t.exports={setMass:function(t){return this.body.mass=t,this}}},function(t,e){t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},function(t,e){t.exports={setVelocity:function(t,e){return this.body.setVelocity(t,e),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,e){return this.body.maxVelocity.set(t,e),this}}},function(t,e,i){var n=i(468),s=i(70),r=i(214),o=i(215);t.exports=function(t,e,i,a,h,l){var u=n(t,e-a,i-a,2*a,2*a,h,l);if(0===u.length)return u;for(var c=new s(e,i,a),d=new s,f=[],p=0;pe.deltaAbsY()?y=-1:e.deltaAbsX()0&&u&&t.checkCollision.right&&h&&t.right>i&&(a=t.right-i)>r&&(a=0),0!==a&&(t.customSeparateX?t.overlapX=a:n(t,a)),a}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):e>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=e,0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},function(t,e,i){var n=i(1301);t.exports=function(t,e,i,s,r,o){var a=0,h=e.faceTop,l=e.faceBottom,u=e.collideUp,c=e.collideDown;return o||(h=!0,l=!0,u=!0,c=!0),t.deltaY()<0&&c&&t.checkCollision.up?l&&t.y0&&u&&t.checkCollision.down&&h&&t.bottom>i&&(a=t.bottom-i)>r&&(a=0),0!==a&&(t.customSeparateY?t.overlapY=a:n(t,a)),a}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):e>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=e,0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},function(t,e,i){var n=i(472);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.x,a=e.velocity.x;if(t.immovable||e.immovable)t.immovable?(e.x+=r,e.velocity.x=o-a*e.bounce.x,t.moves&&(e.y+=(t.y-t.prev.y)*t.friction.y)):(t.x-=r,t.velocity.x=a-o*t.bounce.x,e.moves&&(t.y+=(e.y-e.prev.y)*e.friction.y));else{r*=.5,t.x-=r,e.x+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),l=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),u=.5*(h+l);h-=u,l-=u,t.velocity.x=u+h*t.bounce.x,e.velocity.x=u+l*e.bounce.x}return!0}},function(t,e,i){var n=i(473);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateY||e.customSeparateY)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.y,a=e.velocity.y;if(t.immovable||e.immovable)t.immovable?(e.y+=r,e.velocity.y=o-a*e.bounce.y,t.moves&&(e.x+=(t.x-t.prev.x)*t.friction.x)):(t.y-=r,t.velocity.y=a-o*t.bounce.y,e.moves&&(t.x+=(e.x-e.prev.x)*e.friction.x));else{r*=.5,t.y-=r,e.y+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),l=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),u=.5*(h+l);h-=u,l-=u,t.velocity.y=u+h*t.bounce.y,e.velocity.y=u+l*e.bounce.y}return!0}},function(t,e,i){t.exports={Body:i(477),Events:i(228),COLLIDES:i(110),CollisionMap:i(478),Factory:i(479),Image:i(481),ImpactBody:i(480),ImpactPhysics:i(1323),Sprite:i(482),TYPE:i(111),World:i(483)}},function(t,e,i){var n=i(24);t.exports=function(t,e,i,s,r){if(i)return n(e+i*t,-r,r);if(s){var o=s*t;return e-o>0?e-o:e+o<0?e+o:0}return n(e,-r,r)}},function(t,e){t.exports=function(t,e){if(t.standing=!1,e.collision.y&&(t.bounciness>0&&Math.abs(t.vel.y)>t.minBounceVelocity?t.vel.y*=-t.bounciness:(t.vel.y>0&&(t.standing=!0),t.vel.y=0)),e.collision.x&&(t.bounciness>0&&Math.abs(t.vel.x)>t.minBounceVelocity?t.vel.x*=-t.bounciness:t.vel.x=0),e.collision.slope){var i=e.collision.slope;if(t.bounciness>0){var n=t.vel.x*i.nx+t.vel.y*i.ny;t.vel.x=(t.vel.x-i.nx*n*2)*t.bounciness,t.vel.y=(t.vel.y-i.ny*n*2)*t.bounciness}else{var s=i.x*i.x+i.y*i.y,r=(t.vel.x*i.x+t.vel.y*i.y)/s;t.vel.x=i.x*r,t.vel.y=i.y*r;var o=Math.atan2(i.x,i.y);o>t.slopeStanding.min&&oi.last.x&&e.last.xi.last.y&&e.last.y0))r=t.collisionMap.trace(e.pos.x,e.pos.y,0,-(e.pos.y+e.size.y-i.pos.y),e.size.x,e.size.y),e.pos.y=r.pos.y,e.bounciness>0&&e.vel.y>e.minBounceVelocity?e.vel.y*=-e.bounciness:(e.standing=!0,e.vel.y=0);else{var l=(e.vel.y-i.vel.y)/2;e.vel.y=-l,i.vel.y=l,s=i.vel.x*t.delta,r=t.collisionMap.trace(e.pos.x,e.pos.y,s,-o/2,e.size.x,e.size.y),e.pos.y=r.pos.y;var u=t.collisionMap.trace(i.pos.x,i.pos.y,0,o/2,i.size.x,i.size.y);i.pos.y=u.pos.y}}},function(t,e,i){t.exports={Factory:i(484),Image:i(488),Matter:i(235),MatterPhysics:i(1357),PolyDecomp:i(485),Sprite:i(489),TileBody:i(232),PhysicsEditorParser:i(487),World:i(495)}},function(t,e,i){var n=i(143),s=i(1),r=i(3);t.exports=function(t,e,i){void 0===i&&(i={});var o=e.x,a=e.y;if(e.body={temp:!0,position:{x:o,y:a}},[n.Bounce,n.Collision,n.Force,n.Friction,n.Gravity,n.Mass,n.Sensor,n.SetBody,n.Sleep,n.Static,n.Transform,n.Velocity].forEach(function(t){for(var i in t)(n=t[i]).get&&"function"==typeof n.get||n.set&&"function"==typeof n.set?Object.defineProperty(e,i,{get:t[i].get,set:t[i].set}):Object.defineProperty(e,i,{value:t[i]});var n}),e.world=t,e._tempVec2=new r(o,a),i.hasOwnProperty("type")&&"body"===i.type)e.setExistingBody(i,!0);else{var h=s(i,"shape",null);h||(h="rectangle"),e.setBody(h,i)}return e}},function(t,e){t.exports={setBounce:function(t){return this.body.restitution=t,this}}},function(t,e){var i={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var e=0;if(Array.isArray(t))for(var i=0;i1?1:0;n1;if(!d||t!=d.x||e!=d.y){d&&n?(f=d.x,p=d.y):(f=0,p=0);var s={x:f+t,y:p+e};!n&&d||(d=s),g.push(s),m=f+t,y=p+e}},T=function(t){var e=t.pathSegTypeAsLetter.toUpperCase();if("Z"!==e){switch(e){case"M":case"L":case"T":case"C":case"S":case"Q":m=t.x,y=t.y;break;case"H":m=t.x;break;case"V":y=t.y}x(m,y,t.pathSegType)}};for(n._svgPathToAbsolute(t),o=t.getTotalLength(),l=[],i=0;i0)for(var a=s+1;ae.max.x?i=e.min.x-t.max.x:t.max.xe.max.y?n=e.min.y-t.max.y:t.max.y=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;this.systems.events.off(r.UPDATE,this.step,this),t.events.emit(r.TRANSITION_COMPLETE,this.scene),e.isTransition=!1,e.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(t,e,i,n){return this.manager.add(t,e,i,n)},launch:function(t,e){return t&&t!==this.key&&this.manager.queueOp("start",t,e),this},run:function(t,e){return t&&t!==this.key&&this.manager.queueOp("run",t,e),this},pause:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("pause",t,e),this},resume:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("resume",t,e),this},sleep:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("sleep",t,e),this},wake:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("wake",t,e),this},switch:function(t){return t!==this.key&&this.manager.queueOp("switch",this.key,t),this},stop:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t,e),this},setActive:function(t,e,i){void 0===e&&(e=this.key);var n=this.manager.getScene(e);return n&&n.sys.setActive(t,i),this},setVisible:function(t,e){void 0===e&&(e=this.key);var i=this.manager.getScene(e);return i&&i.sys.setVisible(t),this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isPaused:function(t){return void 0===t&&(t=this.key),this.manager.isPaused(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.swapPosition(t,e),this},moveAbove:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveAbove(t,e),this},moveBelow:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveBelow(t,e),this},remove:function(t){return void 0===t&&(t=this.key),this.manager.remove(t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(r.SHUTDOWN,this.shutdown,this),t.off(r.POST_UPDATE,this.step,this),t.off(r.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});a.register("ScenePlugin",h,"scenePlugin"),t.exports=h},function(t,e,i){t.exports={List:i(132),Map:i(168),ProcessQueue:i(196),RTree:i(474),Set:i(108),Size:i(377)}},function(t,e,i){var n=i(17),s=i(1372),r={CanvasTexture:i(382),Events:i(125),FilterMode:s,Frame:i(104),Parsers:i(384),Texture:i(192),TextureManager:i(381),TextureSource:i(383)};r=n(!1,r,s),t.exports=r},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(145),Parsers:i(1403),Formats:i(34),ImageCollection:i(507),ParseToTilemap:i(245),Tile:i(79),Tilemap:i(516),TilemapCreator:i(1412),TilemapFactory:i(1413),Tileset:i(149),LayerData:i(114),MapData:i(115),ObjectLayer:i(510),DynamicTilemapLayer:i(517),StaticTilemapLayer:i(518)}},function(t,e,i){var n=i(26),s=i(58);t.exports=function(t,e,i,r,o,a,h,l){t<0&&(t=0),e<0&&(e=0),void 0===h&&(h=!0);for(var u=n(t,e,i,r,null,l),c=o-t,d=a-e,f=0;f=0&&p=0&&g=v;o--)(h=c[a][o])&&-1!==h.index&&h.visible&&0!==h.alpha&&i.push(h);else if(2===r)for(a=x;a>=y;a--)for(o=v;c[a]&&o=y;a--)for(o=m;c[a]&&o>=v;o--)(h=c[a][o])&&-1!==h.index&&h.visible&&0!==h.alpha&&i.push(h);return u.tilesDrawn=i.length,u.tilesTotal=d*f,i}},function(t,e,i){var n=i(26),s=i(58),r=i(78);t.exports=function(t,e,i,o,a,h,l){for(var u=-1!==l.collideIndexes.indexOf(t),c=n(e,i,o,a,null,l),d=0;d=0;r--)for(s=n.width-1;s>=0;s--)if((o=n.data[r][s])&&o.index===t){if(a===e)return o;a+=1}}else for(r=0;re)){for(var l=t;l<=e;l++)r(l,i,a);if(h)for(var u=0;u=t&&d.index<=e&&n(d,i)}o&&s(0,0,a.width,a.height,a)}}},function(t,e,i){var n=i(78),s=i(58),r=i(240);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a0&&n(a,t)}}e&&s(0,0,i.width,i.height,i)}},function(t,e){t.exports=function(t,e,i,n){if("number"==typeof t)n.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var s=0,r=t.length;s1||e.scaleY>1)&&(u.imageSmoothingEnabled=!1);for(var f=0;f0&&(t.currentPipeline&&t.currentPipeline.vertexCount>0&&t.flush(),r.vertexBuffer=e.vertexBuffer[a],t.setPipeline(r),t.setTexture2D(s[a].glTexture,0),t.gl.drawArrays(r.topology,0,e.vertexCount[a]));r.vertexBuffer=o,r.viewIdentity(),r.modelIdentity()}},function(t,e){t.exports=function(t,e,i,n,s){e.cull(n);var r=e.culledTiles,o=r.length;if(0!==o){var a=t._tempMatrix1,h=t._tempMatrix2,l=t._tempMatrix3;h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),a.copyFrom(n.matrix);var u=t.currentContext,c=e.gidMap;u.save(),s?(a.multiplyWithOffset(s,-n.scrollX*e.scrollFactorX,-n.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y,a.multiply(h,l),l.copyToContext(u)):(h.e-=n.scrollX*e.scrollFactorX,h.f-=n.scrollY*e.scrollFactorY,h.copyToContext(u));var d=n.alpha*e.alpha;(!t.antialias||e.scaleX>1||e.scaleY>1)&&(u.imageSmoothingEnabled=!1);for(var f=0;f-1&&this._active.splice(s,1),n.destroy()}for(i=0;i=n.delay)){var s=n.elapsed-n.delay;n.elapsed=n.delay,!n.hasDispatched&&n.callback&&(n.hasDispatched=!0,n.callback.apply(n.callbackScope,n.args)),n.repeatCount>0?(n.repeatCount--,n.elapsed=s,n.hasDispatched=!1):this._pendingRemoval.push(n)}}}},shutdown:function(){var t;for(t=0;t-1&&(e.state=u.REMOVED,s.splice(r,1)):(e.state=u.REMOVED,n.splice(r,1))}for(i.length=0,i=this._add,t=0;tE&&(E=C),S[A][_]=C}}}var M=o?n(o):null;return a?function(t,e,n,s){var r,o=0,a=s%m,h=Math.floor(s/m);if(a>=0&&a=0&&h>2],r+=i[(3&n[o])<<4|n[o+1]>>4],r+=i[(15&n[o+1])<<2|n[o+2]>>6],r+=i[63&n[o+2]];return s%3==2?r=r.substring(0,r.length-1)+"=":s%3==1&&(r=r.substring(0,r.length-2)+"=="),r}},function(t,e,i){t.exports={Clone:i(72),Extend:i(17),GetAdvancedValue:i(15),GetFastValue:i(1),GetMinMaxValue:i(1438),GetValue:i(5),HasAll:i(1439),HasAny:i(411),HasValue:i(90),IsPlainObject:i(7),Merge:i(87),MergeRight:i(1440),Pick:i(508),SetValue:i(431)}},function(t,e,i){var n=i(5),s=i(24);t.exports=function(t,e,i,r,o){void 0===o&&(o=i);var a=n(t,e,o);return s(a,i,r)}},function(t,e){t.exports=function(t,e){for(var i=0;i0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this}});n.ZERO=new n,n.RIGHT=new n(1,0),n.LEFT=new n(-1,0),n.UP=new n(0,-1),n.DOWN=new n(0,1),n.ONE=new n(1,1),t.exports=n},function(t,e,i){var n=i(0),s=i(52),r=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=s.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=r},function(t,e){t.exports=function(t,e,i){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return t[e];if(-1!==e.indexOf(".")){for(var n=e.split("."),s=t,r=i,o=0;o>>0},getTintAppendFloatAlpha:function(t,e){return((255&(255*e|0))<<24|t)>>>0},getTintAppendFloatAlphaAndSwap:function(t,e){return((255&(255*e|0))<<24|(255&(0|t))<<16|(255&(t>>8|0))<<8|255&(t>>16|0))>>>0},getFloatsFromUintRGB:function(t){return[(255&(t>>16|0))/255,(255&(t>>8|0))/255,(255&(0|t))/255]},getComponentCount:function(t,e){for(var i=0,n=0;n=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},function(t,e,i){t.exports={Alpha:i(559),AlphaSingle:i(287),Animation:i(288),BlendMode:i(291),ComputedSize:i(578),Crop:i(579),Depth:i(292),Flip:i(580),GetBounds:i(581),Mask:i(296),Origin:i(598),PathFollower:i(599),Pipeline:i(121),ScrollFactor:i(299),Size:i(600),Texture:i(601),TextureCrop:i(602),Tint:i(603),ToJSON:i(300),Transform:i(301),TransformMatrix:i(35),Visible:i(302)}},function(t,e){var i={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=i},function(t,e,i){var n=i(0),s=i(300),r=i(101),o=i(9),a=i(102),h=new n({Extends:o,initialize:function(t,e){o.call(this),this.scene=t,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new r(this)),this},setData:function(t,e){return this.data||(this.data=new r(this)),this.data.set(t,e),this},getData:function(t){return this.data||(this.data=new r(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.input&&(this.input.enabled=!1),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},update:function(){},toJSON:function(){return s(this)},willRender:function(t){return!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return i.unshift(this.scene.sys.displayList.getIndex(t)),i},destroy:function(t){if(void 0===t&&(t=!1),this.scene&&!this.ignoreDestroy){this.preDestroy&&this.preDestroy.call(this),this.emit(a.DESTROY,this);var e=this.scene.sys;t||(e.displayList.remove(this),e.updateList.remove(this)),this.input&&(e.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),t||e.queueDepthSort(),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0,this.removeAllListeners()}}});h.RENDER_MASK=15,t.exports=h},function(t,e,i){var n=i(181),s=i(5);t.exports=function(t,e,i){var r=s(t,e,null);if(null===r)return i;if(Array.isArray(r))return n.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return n.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return n.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},function(t,e,i){var n=i(0),s=i(22),r=i(18),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.displayList,this.updateList,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},s.register("GameObjectCreator",o,"make"),t.exports=o},function(t,e,i){var n=i(7),s=function(){var t,e,i,r,o,a,h=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof h&&(c=h,h=arguments[1]||{},l=2),u===l&&(h=this,--l);l0;e--){var n=Math.floor(i.random()*(e+1)),s=t[e];t[e]=t[n],t[n]=s}return t},i.choose=function(t){return t[Math.floor(i.random()*t.length)]},i.isElement=function(t){return"undefined"!=typeof HTMLElement?t instanceof HTMLElement:!!(t&&t.nodeType&&t.nodeName)},i.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},i.isFunction=function(t){return"function"==typeof t},i.isPlainObject=function(t){return"object"==typeof t&&t.constructor===Object},i.isString=function(t){return"[object String]"===toString.call(t)},i.clamp=function(t,e,i){return ti?i:t},i.sign=function(t){return t<0?-1:1},i.now=function(){if("undefined"!=typeof window&&window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return new Date-i._nowStartTime},i.random=function(e,i){return e=void 0!==e?e:0,i=void 0!==i?i:1,e+t()*(i-e)};var t=function(){return i._seed=(9301*i._seed+49297)%233280,i._seed/233280};i.colorToNumber=function(t){return 3==(t=t.replace("#","")).length&&(t=t.charAt(0)+t.charAt(0)+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2)),parseInt(t,16)},i.logLevel=1,i.log=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.info=function(){console&&i.logLevel>0&&i.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.warn=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.nextId=function(){return i._nextId++},i.indexOf=function(t,e){if(t.indexOf)return t.indexOf(e);for(var i=0;i=400&&t.status<=599&&(n=!1),this.resetXHR(),this.loader.nextFile(this,n)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(r.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=s.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=s.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){this.state=s.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.cache.add(this.key,this.data),this.pendingDestroy()},pendingDestroy:function(t){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(r.FILE_COMPLETE,e,i,t),this.loader.emit(r.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this)},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var n=new FileReader;n.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+n.result.split(",")[1]},n.onerror=t.onerror,n.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},function(t,e,i){var n={};t.exports=n;var s=i(31),r=i(37),o=i(95),a=i(19),h=i(38),l=i(146);!function(){n._inertiaScale=4,n._nextCollidingGroupId=1,n._nextNonCollidingGroupId=-1,n._nextCategory=1,n.create=function(e){var i={id:a.nextId(),type:"body",label:"Body",parts:[],plugin:{},angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},previousPositionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inverseMass:0,inertia:0,inverseInertia:0,_original:null,render:{visible:!0,opacity:1,sprite:{xOffset:0,yOffset:0},fillColor:null,fillOpacity:null,lineColor:null,lineOpacity:null,lineThickness:null},gameObject:null,scale:{x:1,y:1},centerOfMass:{x:0,y:0},centerOffset:{x:0,y:0},gravityScale:{x:1,y:1},ignoreGravity:!1,ignorePointer:!1,onCollideCallback:null,onCollideEndCallback:null,onCollideActiveCallback:null,onCollideWith:{}};!e.hasOwnProperty("position")&&e.hasOwnProperty("vertices")?e.position=s.centre(e.vertices):e.hasOwnProperty("vertices")||(i.vertices=s.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var n=a.extend(i,e);return t(n,e),n.setOnCollideWith=function(t,e){return e?this.onCollideWith[t.id]=e:delete this.onCollideWith[t.id],this},n},n.nextGroup=function(t){return t?n._nextNonCollidingGroupId--:n._nextCollidingGroupId++},n.nextCategory=function(){return n._nextCategory=n._nextCategory<<1,n._nextCategory};var t=function(t,e){e=e||{},n.set(t,{bounds:t.bounds||h.create(t.vertices),positionPrev:t.positionPrev||r.clone(t.position),anglePrev:t.anglePrev||t.angle,vertices:t.vertices,parts:t.parts||[t],isStatic:t.isStatic,isSleeping:t.isSleeping,parent:t.parent||t});var i=t.bounds;if(s.rotate(t.vertices,t.angle,t.position),l.rotate(t.axes,t.angle),h.update(i,t.vertices,t.velocity),n.set(t,{axes:e.axes||t.axes,area:e.area||t.area,mass:e.mass||t.mass,inertia:e.inertia||t.inertia}),1===t.parts.length){var o=t.centerOfMass,a=t.centerOffset,u=i.max.x-i.min.x,c=i.max.y-i.min.y;o.x=-(i.min.x-t.position.x)/u,o.y=-(i.min.y-t.position.y)/c,a.x=u*o.x,a.y=c*o.y}};n.set=function(t,e,i){var s;for(s in"string"==typeof e&&(s=e,(e={})[s]=i),e)if(Object.prototype.hasOwnProperty.call(e,s))switch(i=e[s],s){case"isStatic":n.setStatic(t,i);break;case"isSleeping":o.set(t,i);break;case"mass":n.setMass(t,i);break;case"density":n.setDensity(t,i);break;case"inertia":n.setInertia(t,i);break;case"vertices":n.setVertices(t,i);break;case"position":n.setPosition(t,i);break;case"angle":n.setAngle(t,i);break;case"velocity":n.setVelocity(t,i);break;case"angularVelocity":n.setAngularVelocity(t,i);break;case"parts":n.setParts(t,i);break;case"centre":n.setCentre(t,i);break;default:t[s]=i}},n.setStatic=function(t,e){for(var i=0;i0&&r.rotateAbout(o.position,i,t.position,o.position)}},n.setVelocity=function(t,e){t.positionPrev.x=t.position.x-e.x,t.positionPrev.y=t.position.y-e.y,t.velocity.x=e.x,t.velocity.y=e.y,t.speed=r.magnitude(t.velocity)},n.setAngularVelocity=function(t,e){t.anglePrev=t.angle-e,t.angularVelocity=e,t.angularSpeed=Math.abs(t.angularVelocity)},n.translate=function(t,e){n.setPosition(t,r.add(t.position,e))},n.rotate=function(t,e,i){if(i){var s=Math.cos(e),r=Math.sin(e),o=t.position.x-i.x,a=t.position.y-i.y;n.setPosition(t,{x:i.x+(o*s-a*r),y:i.y+(o*r+a*s)}),n.setAngle(t,t.angle+e)}else n.setAngle(t,t.angle+e)},n.scale=function(t,e,i,r){var o=0,a=0;r=r||t.position;for(var u=0;u0&&(o+=c.area,a+=c.inertia),c.position.x=r.x+(c.position.x-r.x)*e,c.position.y=r.y+(c.position.y-r.y)*i,h.update(c.bounds,c.vertices,t.velocity)}t.parts.length>1&&(t.area=o,t.isStatic||(n.setMass(t,t.density*o),n.setInertia(t,a))),t.circleRadius&&(e===i?t.circleRadius*=e:t.circleRadius=null)},n.update=function(t,e,i,n){var o=Math.pow(e*i*t.timeScale,2),a=1-t.frictionAir*i*t.timeScale,u=t.position.x-t.positionPrev.x,c=t.position.y-t.positionPrev.y;t.velocity.x=u*a*n+t.force.x/t.mass*o,t.velocity.y=c*a*n+t.force.y/t.mass*o,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.position.x+=t.velocity.x,t.position.y+=t.velocity.y,t.angularVelocity=(t.angle-t.anglePrev)*a*n+t.torque/t.inertia*o,t.anglePrev=t.angle,t.angle+=t.angularVelocity,t.speed=r.magnitude(t.velocity),t.angularSpeed=Math.abs(t.angularVelocity);for(var d=0;d0&&(f.position.x+=t.velocity.x,f.position.y+=t.velocity.y),0!==t.angularVelocity&&(s.rotate(f.vertices,t.angularVelocity,t.position),l.rotate(f.axes,t.angularVelocity),d>0&&r.rotateAbout(f.position,t.angularVelocity,t.position,f.position)),h.update(f.bounds,f.vertices,t.velocity)}},n.applyForce=function(t,e,i){t.force.x+=i.x,t.force.y+=i.y;var n=e.x-t.position.x,s=e.y-t.position.y;t.torque+=n*i.y-s*i.x},n._totalProperties=function(t){for(var e={mass:0,area:0,inertia:0,centre:{x:0,y:0}},i=1===t.parts.length?0:1;io.width&&(i=Math.max(o.width-t,0)),e+s>o.height&&(s=Math.max(o.height-e,0));for(var u=[],c=e;c=0;o--)t[o][e]=i+a*n,a++;return t}},function(t,e,i){var n,s,r,o=i(32),a=i(177),h=[],l=!1;t.exports={create2D:function(t,e,i){return n(t,e,i,o.CANVAS)},create:n=function(t,e,i,n,r){var u;void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=o.CANVAS),void 0===r&&(r=!1);var c=s(n);return null===c?(c={parent:t,canvas:document.createElement("canvas"),type:n},n===o.CANVAS&&h.push(c),u=c.canvas):(c.parent=t,u=c.canvas),r&&(c.parent=u),u.width=e,u.height=i,l&&n===o.CANVAS&&a.disable(u.getContext("2d")),u},createWebGL:function(t,e,i){return n(t,e,i,o.WEBGL)},disableSmoothing:function(){l=!0},enableSmoothing:function(){l=!1},first:s=function(t){if(void 0===t&&(t=o.CANVAS),t===o.WEBGL)return null;for(var e=0;e0)return!1}return!0},n.scale=function(t,e,i,r){if(1===e&&1===i)return t;var o,a;r=r||n.centre(t);for(var h=0;h=0?h-1:t.length-1],u=t[h],c=t[(h+1)%t.length],d=e[h0&&(r|=2),3===r)return!1;return 0!==r||null},n.hull=function(t){var e,i,n=[],r=[];for((t=t.slice(0)).sort(function(t,e){var i=t.x-e.x;return 0!==i?i:t.y-e.y}),i=0;i=2&&s.cross3(r[r.length-2],r[r.length-1],e)<=0;)r.pop();r.push(e)}for(i=t.length-1;i>=0;i-=1){for(e=t[i];n.length>=2&&s.cross3(n[n.length-2],n[n.length-1],e)<=0;)n.pop();n.push(e)}return n.pop(),r.pop(),n.concat(r)}},function(t,e,i){var n={VERSION:"3.22.0",BlendModes:i(43),ScaleModes:i(157),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};t.exports=n},function(t,e,i){var n=i(0),s=i(12),r=i(14),o=i(61),a=new n({Extends:r,Mixins:[s.AlphaSingle,s.BlendMode,s.ComputedSize,s.Depth,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Transform,s.Visible],initialize:function(t,e,i){void 0===e&&(e="Shape"),r.call(this,t,e),this.geom=i,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new o,this.initPipeline()},setFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.isFilled=!1:(this.fillColor=t,this.fillAlpha=e,this.isFilled=!0),this},setStrokeStyle:function(t,e,i){return void 0===i&&(i=1),void 0===t?this.isStroked=!1:(this.lineWidth=t,this.strokeColor=e,this.strokeAlpha=i,this.isStroked=!0),this},setClosePath:function(t){return this.closePath=t,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]}});t.exports=a},function(t,e){t.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},function(t,e,i){var n=i(0),s=i(13),r=i(3),o=new n({initialize:function(t,e,i,n,s,r){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=1),void 0===s&&(s=0),void 0===r&&(r=0),this.matrix=new Float32Array([t,e,i,n,s,r,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0}},a:{get:function(){return this.matrix[0]},set:function(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],r=t[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):n||r?s.TAU-(r>0?Math.acos(-n/this.scaleY):-Math.acos(n/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),n=this.matrix,s=n[0],r=n[1],o=n[2],a=n[3];return n[0]=s*i+o*e,n[1]=r*i+a*e,n[2]=s*-e+o*i,n[3]=r*-e+a*i,this},multiply:function(t,e){var i=this.matrix,n=t.matrix,s=i[0],r=i[1],o=i[2],a=i[3],h=i[4],l=i[5],u=n[0],c=n[1],d=n[2],f=n[3],p=n[4],g=n[5],v=void 0===e?this:e;return v.a=u*s+c*o,v.b=u*r+c*a,v.c=d*s+f*o,v.d=d*r+f*a,v.e=p*s+g*o+h,v.f=p*r+g*a+l,v},multiplyWithOffset:function(t,e,i){var n=this.matrix,s=t.matrix,r=n[0],o=n[1],a=n[2],h=n[3],l=e*r+i*a+n[4],u=e*o+i*h+n[5],c=s[0],d=s[1],f=s[2],p=s[3],g=s[4],v=s[5];return n[0]=c*r+d*a,n[1]=c*o+d*h,n[2]=f*r+p*a,n[3]=f*o+p*h,n[4]=g*r+v*a+l,n[5]=g*o+v*h+u,this},transform:function(t,e,i,n,s,r){var o=this.matrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],d=o[5];return o[0]=t*a+e*l,o[1]=t*h+e*u,o[2]=i*a+n*l,o[3]=i*h+n*u,o[4]=s*a+r*l+c,o[5]=s*h+r*u+d,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var n=this.matrix,s=n[0],r=n[1],o=n[2],a=n[3],h=n[4],l=n[5];return i.x=t*s+e*o+h,i.y=t*r+e*a+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=e*s-i*n;return t[0]=s/a,t[1]=-i/a,t[2]=-n/a,t[3]=e/a,t[4]=(n*o-s*r)/a,t[5]=-(e*o-i*r)/a,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){var e=this.matrix;return t.setTransform(e[0],e[1],e[2],e[3],e[4],e[5]),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,i,n,s,r){var o=this.matrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=n,o[4]=s,o[5]=r,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],n=e[1],s=e[2],r=e[3],o=i*r-n*s;if(t.translateX=e[4],t.translateY=e[5],i||n){var a=Math.sqrt(i*i+n*n);t.rotation=n>0?Math.acos(i/a):-Math.acos(i/a),t.scaleX=a,t.scaleY=o/a}else if(s||r){var h=Math.sqrt(s*s+r*r);t.rotation=.5*Math.PI-(r>0?Math.acos(-s/h):-Math.acos(s/h)),t.scaleX=o/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,i,n,s){var r=this.matrix,o=Math.sin(i),a=Math.cos(i);return r[4]=t,r[5]=e,r[0]=a*n,r[1]=o*n,r[2]=-o*s,r[3]=a*s,this},applyInverse:function(t,e,i){void 0===i&&(i=new r);var n=this.matrix,s=n[0],o=n[1],a=n[2],h=n[3],l=n[4],u=n[5],c=1/(s*h+a*-o);return i.x=h*c*t+-a*c*e+(u*a-l*h)*c,i.y=s*c*e+-o*c*t+(-u*s+l*o)*c,i},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.decomposedMatrix=null}});t.exports=o},function(t,e,i){var n=i(0),s=i(175),r=i(314),o=i(176),a=i(315),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(t,e,i,n)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(t,e,i,n,s){return void 0===n&&(n=255),void 0===s&&(s=!0),this._locked=!0,this.red=t,this.green=e,this.blue=i,this.alpha=n,this._locked=!1,this.update(s)},setGLTo:function(t,e,i,n){return void 0===n&&(n=1),this._locked=!0,this.redGL=t,this.greenGL=e,this.blueGL=i,this.alphaGL=n,this._locked=!1,this.update(!0)},setFromRGB:function(t){return this._locked=!0,this.red=t.r,this.green=t.g,this.blue=t.b,t.hasOwnProperty("a")&&(this.alpha=t.a),this._locked=!1,this.update(!0)},setFromHSV:function(t,e,i){return o(t,e,i,this)},update:function(t){if(void 0===t&&(t=!1),this._locked)return this;var e=this.r,i=this.g,n=this.b,o=this.a;return this._color=s(e,i,n),this._color32=r(e,i,n,o),this._rgba="rgba("+e+","+i+","+n+","+o/255+")",t&&a(e,i,n,this),this},updateHSV:function(){var t=this.r,e=this.g,i=this.b;return a(t,e,i,this),this},clone:function(){return new h(this.r,this.g,this.b,this.a)},gray:function(t){return this.setTo(t,t,t)},random:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t)),n=Math.floor(t+Math.random()*(e-t)),s=Math.floor(t+Math.random()*(e-t));return this.setTo(i,n,s)},randomGray:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t));return this.setTo(i,i,i)},saturate:function(t){return this.s+=t/100,this},desaturate:function(t){return this.s-=t/100,this},lighten:function(t){return this.v+=t/100,this},darken:function(t){return this.v-=t/100,this},brighten:function(t){var e=this.r,i=this.g,n=this.b;return e=Math.max(0,Math.min(255,e-Math.round(-t/100*255))),i=Math.max(0,Math.min(255,i-Math.round(-t/100*255))),n=Math.max(0,Math.min(255,n-Math.round(-t/100*255))),this.setTo(e,i,n)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(t){this.gl[0]=Math.min(Math.abs(t),1),this.r=Math.floor(255*this.gl[0]),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(t){this.gl[1]=Math.min(Math.abs(t),1),this.g=Math.floor(255*this.gl[1]),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(t){this.gl[2]=Math.min(Math.abs(t),1),this.b=Math.floor(255*this.gl[2]),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(t){this.gl[3]=Math.min(Math.abs(t),1),this.a=Math.floor(255*this.gl[3]),this.update()}},red:{get:function(){return this.r},set:function(t){t=Math.floor(Math.abs(t)),this.r=Math.min(t,255),this.gl[0]=t/255,this.update(!0)}},green:{get:function(){return this.g},set:function(t){t=Math.floor(Math.abs(t)),this.g=Math.min(t,255),this.gl[1]=t/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(t){t=Math.floor(Math.abs(t)),this.b=Math.min(t,255),this.gl[2]=t/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(t){t=Math.floor(Math.abs(t)),this.a=Math.min(t,255),this.gl[3]=t/255,this.update()}},h:{get:function(){return this._h},set:function(t){this._h=t,o(t,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(t){this._s=t,o(this._h,t,this._v,this)}},v:{get:function(){return this._v},set:function(t){this._v=t,o(this._h,this._s,t,this)}}});t.exports=h},function(t,e){var i={};t.exports=i,i.create=function(t,e){return{x:t||0,y:e||0}},i.clone=function(t){return{x:t.x,y:t.y}},i.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},i.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},i.rotate=function(t,e,i){var n=Math.cos(e),s=Math.sin(e);i||(i={});var r=t.x*n-t.y*s;return i.y=t.x*s+t.y*n,i.x=r,i},i.rotateAbout=function(t,e,i,n){var s=Math.cos(e),r=Math.sin(e);n||(n={});var o=i.x+((t.x-i.x)*s-(t.y-i.y)*r);return n.y=i.y+((t.x-i.x)*r+(t.y-i.y)*s),n.x=o,n},i.normalise=function(t){var e=i.magnitude(t);return 0===e?{x:0,y:0}:{x:t.x/e,y:t.y/e}},i.dot=function(t,e){return t.x*e.x+t.y*e.y},i.cross=function(t,e){return t.x*e.y-t.y*e.x},i.cross3=function(t,e,i){return(e.x-t.x)*(i.y-t.y)-(e.y-t.y)*(i.x-t.x)},i.add=function(t,e,i){return i||(i={}),i.x=t.x+e.x,i.y=t.y+e.y,i},i.sub=function(t,e,i){return i||(i={}),i.x=t.x-e.x,i.y=t.y-e.y,i},i.mult=function(t,e){return{x:t.x*e,y:t.y*e}},i.div=function(t,e){return{x:t.x/e,y:t.y/e}},i.perp=function(t,e){return{x:(e=!0===e?-1:1)*-t.y,y:e*t.x}},i.neg=function(t){return{x:-t.x,y:-t.y}},i.angle=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)},i._temp=[i.create(),i.create(),i.create(),i.create(),i.create(),i.create()]},function(t,e){var i={};t.exports=i,i.create=function(t){var e={min:{x:0,y:0},max:{x:0,y:0}};return t&&i.update(e,t),e},i.update=function(t,e,i){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var n=0;nt.max.x&&(t.max.x=s.x),s.xt.max.y&&(t.max.y=s.y),s.y0?t.max.x+=i.x:t.min.x+=i.x,i.y>0?t.max.y+=i.y:t.min.y+=i.y)},i.contains=function(t,e){return e.x>=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},i.overlaps=function(t,e){return t.min.x<=e.max.x&&t.max.x>=e.min.x&&t.max.y>=e.min.y&&t.min.y<=e.max.y},i.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},i.shift=function(t,e){var i=t.max.x-t.min.x,n=t.max.y-t.min.y;t.min.x=e.x,t.max.x=e.x+i,t.min.y=e.y,t.max.y=e.y+n}},function(t,e){t.exports=function(t,e,i,n,s,r){var o;void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=1);var a=0,h=t.length;if(1===r)for(o=s;o=0;o--)t[o][e]+=i+a*n,a++;return t}},function(t,e,i){var n=i(13);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.fillColor,r=n||e.fillAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.fillStyle="rgba("+o+","+a+","+h+","+r+")"}},function(t,e,i){var n={};t.exports=n;var s=i(31),r=i(19),o=i(25),a=i(38),h=i(37),l=i(505);n.rectangle=function(t,e,i,n,a){a=a||{};var h={label:"Rectangle Body",position:{x:t,y:e},vertices:s.fromPath("L 0 0 L "+i+" 0 L "+i+" "+n+" L 0 "+n)};if(a.chamfer){var l=a.chamfer;h.vertices=s.chamfer(h.vertices,l.radius,l.quality,l.qualityMin,l.qualityMax),delete a.chamfer}return o.create(r.extend({},h,a))},n.trapezoid=function(t,e,i,n,a,h){h=h||{};var l,u=i*(a*=.5),c=u+(1-2*a)*i,d=c+u;l=a<.5?"L 0 0 L "+u+" "+-n+" L "+c+" "+-n+" L "+d+" 0":"L 0 0 L "+c+" "+-n+" L "+d+" 0";var f={label:"Trapezoid Body",position:{x:t,y:e},vertices:s.fromPath(l)};if(h.chamfer){var p=h.chamfer;f.vertices=s.chamfer(f.vertices,p.radius,p.quality,p.qualityMin,p.qualityMax),delete h.chamfer}return o.create(r.extend({},f,h))},n.circle=function(t,e,i,s,o){s=s||{};var a={label:"Circle Body",circleRadius:i};o=o||25;var h=Math.ceil(Math.max(10,Math.min(o,i)));return h%2==1&&(h+=1),n.polygon(t,e,h,i,r.extend({},a,s))},n.polygon=function(t,e,i,a,h){if(h=h||{},i<3)return n.circle(t,e,a,h);for(var l=2*Math.PI/i,u="",c=.5*l,d=0;d0&&s.area(T)1?(d=o.create(r.extend({parts:f.slice(0)},a)),o.setPosition(d,{x:t,y:e}),d):f[0]},n.flagCoincidentParts=function(t,e){void 0===e&&(e=5);for(var i=0;i=e&&t.y<=i&&t.y+t.height>=i}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return Math.sqrt(s*s+r*r)}},function(t,e,i){t.exports={DESTROY:i(673),FADE_IN_COMPLETE:i(674),FADE_IN_START:i(675),FADE_OUT_COMPLETE:i(676),FADE_OUT_START:i(677),FLASH_COMPLETE:i(678),FLASH_START:i(679),PAN_COMPLETE:i(680),PAN_START:i(681),POST_RENDER:i(682),PRE_RENDER:i(683),SHAKE_COMPLETE:i(684),SHAKE_START:i(685),ZOOM_COMPLETE:i(686),ZOOM_START:i(687)}},function(t,e,i){t.exports={BOOT:i(846),DESTROY:i(847),DRAG_END:i(848),DRAG_ENTER:i(849),DRAG:i(850),DRAG_LEAVE:i(851),DRAG_OVER:i(852),DRAG_START:i(853),DROP:i(854),GAME_OUT:i(855),GAME_OVER:i(856),GAMEOBJECT_DOWN:i(857),GAMEOBJECT_DRAG_END:i(858),GAMEOBJECT_DRAG_ENTER:i(859),GAMEOBJECT_DRAG:i(860),GAMEOBJECT_DRAG_LEAVE:i(861),GAMEOBJECT_DRAG_OVER:i(862),GAMEOBJECT_DRAG_START:i(863),GAMEOBJECT_DROP:i(864),GAMEOBJECT_MOVE:i(865),GAMEOBJECT_OUT:i(866),GAMEOBJECT_OVER:i(867),GAMEOBJECT_POINTER_DOWN:i(868),GAMEOBJECT_POINTER_MOVE:i(869),GAMEOBJECT_POINTER_OUT:i(870),GAMEOBJECT_POINTER_OVER:i(871),GAMEOBJECT_POINTER_UP:i(872),GAMEOBJECT_POINTER_WHEEL:i(873),GAMEOBJECT_UP:i(874),GAMEOBJECT_WHEEL:i(875),MANAGER_BOOT:i(876),MANAGER_PROCESS:i(877),MANAGER_UPDATE:i(878),POINTER_DOWN:i(879),POINTER_DOWN_OUTSIDE:i(880),POINTER_MOVE:i(881),POINTER_OUT:i(882),POINTER_OVER:i(883),POINTER_UP:i(884),POINTER_UP_OUTSIDE:i(885),POINTER_WHEEL:i(886),POINTERLOCK_CHANGE:i(887),PRE_UPDATE:i(888),SHUTDOWN:i(889),START:i(890),UPDATE:i(891)}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.strokeColor,r=n||e.strokeAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.strokeStyle="rgba("+o+","+a+","+h+","+r+")",t.lineWidth=e.lineWidth}},function(t,e){t.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},function(t,e,i){var n=i(151),s=i(26);t.exports=function(t,e,i,r,o){for(var a=null,h=null,l=null,u=null,c=s(t,e,i,r,null,o),d=0;d0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e,i){var n=i(0),s=i(294),r=i(162),o=i(52),a=i(163),h=i(3),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=o.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(t){return void 0===t&&(t=new h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=l},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e,i){t.exports={COMPLETE:i(914),DECODED:i(915),DECODED_ALL:i(916),DESTROY:i(917),DETUNE:i(918),GLOBAL_DETUNE:i(919),GLOBAL_MUTE:i(920),GLOBAL_RATE:i(921),GLOBAL_VOLUME:i(922),LOOP:i(923),LOOPED:i(924),MUTE:i(925),PAUSE_ALL:i(926),PAUSE:i(927),PLAY:i(928),RATE:i(929),RESUME_ALL:i(930),RESUME:i(931),SEEK:i(932),STOP_ALL:i(933),STOP:i(934),UNLOCKED:i(935),VOLUME:i(936)}},function(t,e,i){var n=i(0),s=i(12),r=i(14),o=i(997),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Size,s.TextureCrop,s.Tint,s.Transform,s.Visible,o],initialize:function(t,e,i,n,o){r.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new s.Animation(this),this.setTexture(n,o),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e,i){return this.anims.play(t,e,i),this},toJSON:function(){return s.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=a},function(t,e,i){var n=i(0),s=i(23),r=i(24),o=i(8),a=i(1),h=i(5),l=i(7),u=new n({Extends:r,initialize:function(t,e,i,n,o){var u="json";if(l(e)){var c=e;e=a(c,"key"),i=a(c,"url"),n=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"dataKey",o)}var d={type:"json",cache:t.cacheManager.json,extension:u,responseType:"text",key:e,url:i,xhrSettings:n,config:o};r.call(this,t,d),l(i)&&(this.data=o?h(i,o):i,this.state=s.FILE_POPULATED)},onProcess:function(){if(this.state!==s.FILE_POPULATED){this.state=s.FILE_PROCESSING;var t=JSON.parse(this.xhrLoader.responseText),e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});o.register("json",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s80*i){n=h=t[0],a=l=t[1];for(var T=i;Th&&(h=u),f>l&&(l=f);g=0!==(g=Math.max(h-n,l-a))?1/g:0}return o(m,x,i,n,a,g),x}function s(t,e,i,n,s){var r,o;if(s===A(t,e,i,n)>0)for(r=e;r=e;r-=n)o=b(r,t[r],t[r+1],o);return o&&m(o,o.next)&&(E(o),o=o.next),o}function r(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!m(n,n.next)&&0!==y(n.prev,n,n.next))n=n.next;else{if(E(n),(n=e=n.prev)===n.next)break;i=!0}}while(i||n!==e);return e}function o(t,e,i,n,s,c,d){if(t){!d&&c&&function(t,e,i,n){var s=t;do{null===s.z&&(s.z=f(s.x,s.y,e,i,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,i,n,s,r,o,a,h,l=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||h>0&&n;)0!==a&&(0===h||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,h--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,l*=2}while(o>1)}(s)}(t,n,s,c);for(var p,g,v=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,n,s,c):a(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),E(t),t=g.next,v=g.next;else if((t=g)===v){d?1===d?o(t=l(t,e,i),e,i,n,s,c,2):2===d&&u(t,e,i,n,s,c):o(r(t),e,i,n,s,c,1);break}}}function a(t){var e=t.prev,i=t,n=t.next;if(y(e,i,n)>=0)return!1;for(var s=t.next.next;s!==t.prev;){if(g(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&y(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function h(t,e,i,n){var s=t.prev,r=t,o=t.next;if(y(s,r,o)>=0)return!1;for(var a=s.xr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,u=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=f(a,h,e,i,n),d=f(l,u,e,i,n),p=t.prevZ,v=t.nextZ;p&&p.z>=c&&v&&v.z<=d;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,v!==t.prev&&v!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,v.x,v.y)&&y(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;v&&v.z<=d;){if(v!==t.prev&&v!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,v.x,v.y)&&y(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function l(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!m(s,r)&&x(s,n,n.next,r)&&T(s,r)&&T(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),E(n),E(n.next),n=t=r),n=n.next}while(n!==t);return n}function u(t,e,i,n,s,a){var h=t;do{for(var l=h.next.next;l!==h.prev;){if(h.i!==l.i&&v(h,l)){var u=w(h,l);return h=r(h,h.next),u=r(u,u.next),o(h,e,i,n,s,a),void o(u,e,i,n,s,a)}l=l.next}h=h.next}while(h!==t)}function c(t,e){return t.x-e.x}function d(t,e){if(e=function(t,e){var i,n=e,s=t.x,r=t.y,o=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&a>o){if(o=a,a===s){if(r===n.y)return n;if(r===n.next.y)return n.next}i=n.x=n.x&&n.x>=u&&s!==n.x&&g(ri.x)&&T(n,t)&&(i=n,d=h),n=n.next;return i}(t,e)){var i=w(e,t);r(i,i.next)}}function f(t,e,i,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*s)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*s)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{e.x=0&&(t-o)*(n-a)-(i-o)*(e-a)>=0&&(i-o)*(r-a)-(s-o)*(n-a)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&x(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&T(t,e)&&T(e,t)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(t,e)}function y(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function m(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,i,n){return!!(m(t,e)&&m(i,n)||m(t,n)&&m(i,e))||y(t,e,i)>0!=y(t,e,n)>0&&y(i,n,t)>0!=y(i,n,e)>0}function T(t,e){return y(t.prev,t,t.next)<0?y(t,e,t.next)>=0&&y(t,t.prev,e)>=0:y(t,e,t.prev)<0||y(t,t.next,e)<0}function w(t,e){var i=new S(t.i,t.x,t.y),n=new S(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function b(t,e,i,n){var s=new S(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function E(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function S(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(t,e,i,n){for(var s=0,r=e,o=i-n;r0&&(n+=t[s-1].length,i.holes.push(n))}return i}},function(t,e){t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},function(t,e){t.exports=function(t,e,i,n){var s=t.length;if(e<0||e>s||e>=i||i>s||e+i>s){if(n)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},function(t,e,i){var n=i(10);t.exports=function(t,e,i,s,r){var o=t.strokeTint,a=n.getTintAppendFloatAlphaAndSwap(e.strokeColor,e.strokeAlpha*i);o.TL=a,o.TR=a,o.BL=a,o.BR=a;var h=e.pathData,l=h.length-1,u=e.lineWidth,c=u/2,d=h[0]-s,f=h[1]-r;e.closePath||(l-=2);for(var p=2;p=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=u},function(t,e,i){var n=i(0),s=i(23),r=i(24),o=i(8),a=i(1),h=i(7),l=new n({Extends:r,initialize:function t(e,i,n,s,o){var l,u="png";if(h(i)){var c=i;i=a(c,"key"),n=a(c,"url"),l=a(c,"normalMap"),s=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"frameConfig")}Array.isArray(n)&&(l=n[1],n=n[0]);var d={type:"image",cache:e.textureManager,extension:u,responseType:"blob",key:i,url:n,xhrSettings:s,config:o};if(r.call(this,e,d),l){var f=new t(e,this.key,l,s,o);f.type="normalMap",this.setLink(f),e.addFile(f)}},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){r.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(t.data),t.onProcessError()},r.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===s.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});o.register("image",function(t,e,i){if(Array.isArray(t))for(var n=0;n0?1:.7),e.damping=e.damping||0,e.angularStiffness=e.angularStiffness||0,e.angleA=e.bodyA?e.bodyA.angle:e.angleA,e.angleB=e.bodyB?e.bodyB.angle:e.angleB,e.plugin={};var o={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return 0===e.length&&e.stiffness>.1?(o.type="pin",o.anchors=!1):e.stiffness<.9&&(o.type="spring"),e.render=l.extend(o,e.render),e},n.preSolveAll=function(t){for(var e=0;e0&&(c.position.x+=l.x,c.position.y+=l.y),0!==l.angle&&(s.rotate(c.vertices,l.angle,i.position),h.rotate(c.axes,l.angle),u>0&&r.rotateAbout(c.position,l.angle,i.position,c.position)),a.update(c.bounds,c.vertices,i.velocity)}l.angle*=n._warming,l.x*=n._warming,l.y*=n._warming}}},n.pointAWorld=function(t){return{x:(t.bodyA?t.bodyA.position.x:0)+t.pointA.x,y:(t.bodyA?t.bodyA.position.y:0)+t.pointA.y}},n.pointBWorld=function(t){return{x:(t.bodyB?t.bodyB.position.x:0)+t.pointB.x,y:(t.bodyB?t.bodyB.position.y:0)+t.pointB.y}}},function(t,e){t.exports=function(t,e){e?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)}},function(t,e,i){var n=i(0),s=i(12),r=i(467),o=new n({Mixins:[s.Alpha,s.Flip,s.Visible],initialize:function(t,e,i,n,s,r,o,a){this.layer=t,this.index=e,this.x=i,this.y=n,this.width=s,this.height=r,this.baseWidth=void 0!==o?o:s,this.baseHeight=void 0!==a?a:r,this.pixelX=0,this.pixelY=0,this.updatePixelXY(),this.properties={},this.rotation=0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceLeft=!1,this.faceRight=!1,this.faceTop=!1,this.faceBottom=!1,this.collisionCallback=null,this.collisionCallbackContext=this,this.tint=16777215,this.physics={}},containsPoint:function(t,e){return!(tthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=t.properties,this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(t){var e=this.tilemapLayer;return e?e.tileToWorldX(this.x,t):this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return void 0===e&&(e=new r),e.x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-e.y,e},getCenterX:function(t){return(this.getLeft(t)+this.getRight(t))/2},getCenterY:function(t){return(this.getTop(t)+this.getBottom(t))/2},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){(void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){(void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight,this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.layer.tilemapLayer;if(t){var e=t.gidMap[this.index];if(e)return e}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=o},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e){t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,n=t[e],s=e;si&&(e=i/2);var n=Math.max(1,Math.round(i/e));return s(this.getSpacedPoints(n),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],n=this.getPoint(0,this._tmpVec2A),s=0;i.push(0);for(var r=1;r<=t;r++)s+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(n),i.push(s),n.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var n=0;n<=t;n++)i.push(this.getPoint(n/t));return i},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var n=0;n<=t;n++){var s=this.getUtoTmapping(n/t,null,t);i.push(this.getPoint(s))}return i},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=t-1e-4,n=t+1e-4;return i<0&&(i=0),n>1&&(n=1),this.getPoint(i,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var n,s=this.getLengths(i),r=0,o=s.length;n=e?Math.min(e,s[o-1]):t*s[o-1];for(var a,h=0,l=o-1;h<=l;)if((a=s[r=Math.floor(h+(l-h)/2)]-n)<0)h=r+1;else{if(!(a>0)){l=r;break}l=r-1}if(s[r=l]===n)return r/(o-1);var u=s[r];return(r+(n-u)/(s[r+1]-u))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},function(t,e,i){t.exports={ADD:i(893),COMPLETE:i(894),FILE_COMPLETE:i(895),FILE_KEY_COMPLETE:i(896),FILE_LOAD_ERROR:i(897),FILE_LOAD:i(898),FILE_PROGRESS:i(899),POST_PROCESS:i(900),PROGRESS:i(901),START:i(902)}},function(t,e,i){var n=i(73);t.exports=function(t,e){var i=n(t);for(var s in e)i.hasOwnProperty(s)||(i[s]=e[s]);return i}},function(t,e,i){var n=i(0),s=i(12),r=i(14),o=i(1e3),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Size,s.TextureCrop,s.Tint,s.Transform,s.Visible,o],initialize:function(t,e,i,n,s){r.call(this,t,"Image"),this._crop=this.resetCropObject(),this.setTexture(n,s),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()}});t.exports=a},function(t,e,i){var n=i(179),s=i(194);t.exports=function(t,e){var i=n.Power0;if("string"==typeof t)if(n.hasOwnProperty(t))i=n[t];else{var r="";t.indexOf(".")&&("in"===(r=t.substr(t.indexOf(".")+1)).toLowerCase()?r="easeIn":"out"===r.toLowerCase()?r="easeOut":"inout"===r.toLowerCase()&&(r="easeInOut")),t=s(t.substr(0,t.indexOf(".")+1)+r),n.hasOwnProperty(t)&&(i=n[t])}else"function"==typeof t?i=t:Array.isArray(t)&&t.length;if(!e)return i;var o=e.slice(0);return o.unshift(0),function(t){return o[0]=t,i.apply(this,o)}}},function(t,e){t.exports=function(t,e){return t.hasOwnProperty(e)}},function(t,e){t.exports=function(t,e,i){var n=t.x3-t.x1,s=t.y3-t.y1,r=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,h=i-t.y1,l=n*n+s*s,u=n*r+s*o,c=n*a+s*h,d=r*r+o*o,f=r*a+o*h,p=l*d-u*u,g=0===p?0:1/p,v=(d*c-u*f)*g,y=(l*f-u*c)*g;return v>=0&&y>=0&&v+y<1}},function(t,e,i){var n=i(4);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.x1,r=t.y1,o=t.x2,a=t.y2,h=e.x1,l=e.y1,u=e.x2,c=e.y2,d=(u-h)*(r-l)-(c-l)*(s-h),f=(o-s)*(r-l)-(a-r)*(s-h),p=(c-l)*(o-s)-(u-h)*(a-r);if(0===p)return!1;var g=d/p,v=f/p;return g>=0&&g<=1&&v>=0&&v<=1&&(i.x=s+g*(o-s),i.y=r+g*(a-r),!0)}},function(t,e){t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},function(t,e,i){var n={};t.exports=n;var s=i(96);n._motionWakeThreshold=.18,n._motionSleepThreshold=.08,n._minBias=.9,n.update=function(t,e){for(var i=e*e*e,s=0;s0&&r.motion=r.sleepThreshold&&n.set(r,!0)):r.sleepCounter>0&&(r.sleepCounter-=1)}else n.set(r,!1)}},n.afterCollisions=function(t,e){for(var i=e*e*e,s=0;sn._motionWakeThreshold*i&&n.set(l,!1)}}}},n.set=function(t,e){var i=t.isSleeping;e?(t.isSleeping=!0,t.sleepCounter=t.sleepThreshold,t.positionImpulse.x=0,t.positionImpulse.y=0,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.anglePrev=t.angle,t.speed=0,t.angularSpeed=0,t.motion=0,i||s.trigger(t,"sleepStart")):(t.isSleeping=!1,t.sleepCounter=0,i&&s.trigger(t,"sleepEnd"))}},function(t,e,i){var n={};t.exports=n;var s=i(19);n.on=function(t,e,i){for(var n,s=e.split(" "),r=0;r0){i||(i={}),n=e.split(" ");for(var l=0;lC&&wA&&b<_&&f.push(v)}else f.push(v)}return f},getWorldPoint:function(t,e,i){void 0===i&&(i=new c);var n=this.matrix.matrix,s=n[0],r=n[1],o=n[2],a=n[3],h=n[4],l=n[5],u=s*a-r*o;if(!u)return i.x=t,i.y=e,i;var d=a*(u=1/u),f=-r*u,p=-o*u,g=s*u,v=(o*l-a*h)*u,y=(r*h-s*l)*u,m=Math.cos(this.rotation),x=Math.sin(this.rotation),T=this.zoom,w=this.resolution,b=this.scrollX,E=this.scrollY,S=t+(b*m-E*x)*T,A=e+(b*x+E*m)*T;return i.x=(S*d+A*p)*w+v,i.y=(S*f+A*g)*w+y,i},ignore:function(t){var e=this.id;Array.isArray(t)||(t=[t]);for(var i=0;is&&(t=s),t},clampY:function(t){var e=this._bounds,i=this.displayHeight,n=e.y+(i-this.height)/2,s=Math.max(n,n+e.height-i);return ts&&(t=s),t},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=r(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=u(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n,s){return void 0===s&&(s=!1),this._bounds.setTo(t,e,i,n),this.dirty=!0,this.useBounds=!0,s?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(t){void 0===t&&(t=new h);var e=this._bounds;return t.setTo(e.x,e.y,e.width,e.height),t},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t){this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=t;var e=t.sys;this.sceneManager=e.game.scene,this.scaleManager=e.scale,this.cameraManager=e.cameras;var i=this.scaleManager.resolution;return this.resolution=i,this._cx=this._x*i,this._cy=this._y*i,this._cw=this._width*i,this._ch=this._height*i,this.updateSystem(),this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setZoom:function(t){return void 0===t&&(t=1),0===t&&(t=.001),this.zoom=t,this},setMask:function(t,e){return void 0===e&&(e=!0),this.mask=t,this._maskCamera=e?this.cameraManager.default:this,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},update:function(){},updateSystem:function(){if(this.scaleManager){var t=0!==this._x||0!==this._y||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,e=this.sceneManager;t&&!this._customViewport?e.customViewports++:!t&&this._customViewport&&e.customViewports--,this.dirty=!0,this._customViewport=t}},destroy:function(){this.emit(a.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(t){this._x=t,this._cx=t*this.resolution,this.updateSystem()}},y:{get:function(){return this._y},set:function(t){this._y=t,this._cy=t*this.resolution,this.updateSystem()}},width:{get:function(){return this._width},set:function(t){this._width=t,this._cw=t*this.resolution,this.updateSystem()}},height:{get:function(){return this._height},set:function(t){this._height=t,this._ch=t*this.resolution,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(t){this._scrollX=t,this.dirty=!0}},scrollY:{get:function(){return this._scrollY},set:function(t){this._scrollY=t,this.dirty=!0}},zoom:{get:function(){return this._zoom},set:function(t){this._zoom=t,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoom}},displayHeight:{get:function(){return this.height/this.zoom}}});t.exports=d},function(t,e,i){t.exports={ENTER_FULLSCREEN:i(726),FULLSCREEN_FAILED:i(727),FULLSCREEN_UNSUPPORTED:i(728),LEAVE_FULLSCREEN:i(729),ORIENTATION_CHANGE:i(730),RESIZE:i(731)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),n?(i+t)/e:i+t)}},function(t,e,i){var n=i(0),s=i(20),r=i(17),o=new n({initialize:function(t,e,i,n,s,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0}},this.setSize(r,o,n,s)},setSize:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=0),this.cutX=i,this.cutY=n,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var s=this.data,r=s.cut;r.x=i,r.y=n,r.w=t,r.h=e,r.r=i+t,r.b=n+e,s.sourceSize.w=t,s.sourceSize.h=e,s.spriteSourceSize.w=t,s.spriteSourceSize.h=e,s.radius=.5*Math.sqrt(t*t+e*e);var o=s.drawImage;return o.x=i,o.y=n,o.width=t,o.height=e,this.updateUVs()},setTrim:function(t,e,i,n,s,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=n,a.w=s,a.h=r,a.r=i+s,a.b=n+r,this.x=i,this.y=n,this.width=s,this.height=r,this.halfWidth=.5*s,this.halfHeight=.5*r,this.centerX=Math.floor(s/2),this.centerY=Math.floor(r/2),this.updateUVs()},setCropUVs:function(t,e,i,n,r,o,a){var h=this.cutX,l=this.cutY,u=this.cutWidth,c=this.cutHeight,d=this.realWidth,f=this.realHeight,p=h+(e=s(e,0,d)),g=l+(i=s(i,0,f)),v=n=s(n,0,d-e),y=r=s(r,0,f-i),m=this.data;if(m.trim){var x=m.spriteSourceSize,T=e+(n=s(n,0,u-e)),w=i+(r=s(r,0,c-i));if(!(x.rT||x.y>w)){var b=Math.max(x.x,e),E=Math.max(x.y,i),S=Math.min(x.r,T)-b,A=Math.min(x.b,w)-E;v=S,y=A,p=o?h+(u-(b-x.x)-S):h+(b-x.x),g=a?l+(c-(E-x.y)-A):l+(E-x.y),e=b,i=E,n=S,r=A}else p=0,g=0,v=0,y=0}else o&&(p=h+(u-e-n)),a&&(g=l+(c-i-r));var _=this.source.width,C=this.source.height;return t.u0=Math.max(0,p/_),t.v0=Math.max(0,g/C),t.u1=Math.min(1,(p+v)/_),t.v1=Math.min(1,(g+y)/C),t.x=e,t.y=i,t.cx=p,t.cy=g,t.cw=v,t.ch=y,t.width=n,t.height=r,t.flipX=o,t.flipY=a,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=n;var r=this.source.width,o=this.source.height;return this.u0=t/r,this.v0=e/o,this.u1=(t+i)/r,this.v1=(e+n)/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new o(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=r(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=o},function(t,e,i){var n=i(0),s=i(108),r=i(421),o=i(422),a=i(52),h=i(167),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=a.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=l},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var n=i(259),s=i(0),r=i(102),o=i(1),a=i(5),h=i(7),l=i(415),u=i(110),c=i(65),d=new s({initialize:function(t,e,i){i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?h(e[0])&&(i=e,e=null):h(e)&&(i=e,e=null),this.scene=t,this.children=new u(e),this.isParent=!0,this.type="Group",this.classType=o(i,"classType",c),this.name=o(i,"name",""),this.active=o(i,"active",!0),this.maxSize=o(i,"maxSize",-1),this.defaultKey=o(i,"defaultKey",null),this.defaultFrame=o(i,"defaultFrame",null),this.runChildUpdate=o(i,"runChildUpdate",!1),this.createCallback=o(i,"createCallback",null),this.removeCallback=o(i,"removeCallback",null),this.createMultipleCallback=o(i,"createMultipleCallback",null),this.internalCreateCallback=o(i,"internalCreateCallback",null),this.internalRemoveCallback=o(i,"internalRemoveCallback",null),i&&this.createMultiple(i)},create:function(t,e,i,n,s,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(o),o.preUpdate&&this.scene.sys.updateList.add(o),o.visible=s,o.setActive(r),this.add(o),o},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i=0;u--)if((l=d[u]).active===i){if(++c===e)break}else l=null;return l?("number"==typeof s&&(l.x=s),"number"==typeof r&&(l.y=r),l):n?this.create(s,r,o,a,h):null},get:function(t,e,i,n,s){return this.getFirst(!1,!0,t,e,i,n,s)},getFirstAlive:function(t,e,i,n,s,r){return this.getFirst(!0,t,e,i,n,s,r)},getFirstDead:function(t,e,i,n,s,r){return this.getFirst(!1,t,e,i,n,s,r)},playAnimation:function(t,e){return n.PlayAnimation(this.children.entries,t,e),this},isFull:function(){return-1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t-1},union:function(t){var e=new n;return t.entries.forEach(function(t){e.set(t)}),this.entries.forEach(function(t){e.set(t)}),e},intersect:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)&&e.set(i)}),e},difference:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)||e.set(i)}),e},size:{get:function(){return this.entries.length},set:function(t){return t=0&&t=0&&e0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e,i){(function(e){var i={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){var t=navigator.userAgent;/Windows/.test(t)?i.windows=!0:/Mac OS/.test(t)&&!/like Mac OS/.test(t)?i.macOS=!0:/Android/.test(t)?i.android=!0:/Linux/.test(t)?i.linux=!0:/iP[ao]d|iPhone/i.test(t)?(i.iOS=!0,navigator.appVersion.match(/OS (\d+)/),i.iOSVersion=parseInt(RegExp.$1,10),i.iPhone=-1!==t.toLowerCase().indexOf("iphone"),i.iPad=-1!==t.toLowerCase().indexOf("ipad")):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?i.kindle=!0:/CrOS/.test(t)&&(i.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(i.android=!1,i.iOS=!1,i.macOS=!1,i.windows=!0,i.windowsPhone=!0);var n=/Silk/.test(t);return(i.windows||i.macOS||i.linux&&!n||i.chromeOS)&&(i.desktop=!0),(i.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(i.desktop=!1),navigator.standalone&&(i.webApp=!0),void 0!==window.cordova&&(i.cordova=!0),void 0!==e&&e.versions&&e.versions.node&&(i.node=!0),i.node&&"object"==typeof e.versions&&(i.nodeWebkit=!!e.versions["node-webkit"],i.electron=!!e.versions.electron),void 0!==window.ejecta&&(i.ejecta=!0),/Crosswalk/.test(t)&&(i.crosswalk=!0),i.pixelRatio=window.devicePixelRatio||1,i}()}).call(this,i(752))},function(t,e,i){var n,s=i(124),r={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0};t.exports=(n=navigator.userAgent,/Edge\/\d+/.test(n)?r.edge=!0:/Chrome\/(\d+)/.test(n)&&!s.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(n)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(n)&&s.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(n)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(n)?r.opera=!0:/Safari/.test(n)&&!s.windowsPhone?r.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(n)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(n)&&(r.silk=!0),r)},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e)0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e,i){t.exports={ADD:i(803),ERROR:i(804),LOAD:i(805),READY:i(806),REMOVE:i(807)}},function(t,e){t.exports=function(t,e){var i;if(e)"string"==typeof e?i=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(i=e);else if(t.parentElement)return t;return i||(i=document.body),i.appendChild(t),t}},function(t,e,i){var n=i(85);t.exports=function(t,e,i,s){var r;if(void 0===s&&(s=t),!Array.isArray(e))return-1!==(r=t.indexOf(e))?(n(t,r),i&&i.call(s,e),e):null;for(var o=e.length-1;o>=0;){var a=e[o];-1!==(r=t.indexOf(a))?(n(t,r),i&&i.call(s,a)):e.pop(),o--}return e}},function(t,e){t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175}},function(t,e){t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},function(t,e,i){var n=i(0),s=i(73),r=i(9),o=i(64),a=i(21),h=i(2),l=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.jsonCache=t.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,t.events.on(a.BLUR,function(){this.pauseOnBlur&&this.onBlur()},this),t.events.on(a.FOCUS,function(){this.pauseOnBlur&&this.onFocus()},this),t.events.on(a.PRE_STEP,this.update,this),t.events.once(a.DESTROY,this.destroy,this)},add:h,addAudioSprite:function(t,e){void 0===e&&(e={});var i=this.add(t,e);for(var n in i.spritemap=this.jsonCache.get(t).spritemap,i.spritemap)if(i.spritemap.hasOwnProperty(n)){var r=s(e),o=i.spritemap[n];r.loop=!!o.hasOwnProperty("loop")&&o.loop,i.addMarker({name:n,start:o.start,duration:o.end-o.start,config:r})}return i},play:function(t,e){var i=this.add(t);return i.once(o.COMPLETE,i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var n=this.addAudioSprite(t);return n.once(o.COMPLETE,n.destroy,n),n.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var n=this.sounds[i];n.key===t&&(n.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound(function(t){t.pause()}),this.emit(o.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit(o.RESUME_ALL,this)},stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit(o.STOP_ALL,this)},unlock:h,onBlur:h,onFocus:h,update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(o.UNLOCKED,this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach(function(i){i.update(t,e)})},destroy:function(){this.removeAllListeners(),this.forEachActiveSound(function(t){t.destroy()}),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach(function(n,s){n&&!n.pendingRemove&&t.call(e||i,n,s,i.sounds)})},setRate:function(t){return this.rate=t,this},rate:{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound(function(t){t.calculateRate()}),this.emit(o.GLOBAL_RATE,this,t)}},setDetune:function(t){return this.detune=t,this},detune:{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound(function(t){t.calculateRate()}),this.emit(o.GLOBAL_DETUNE,this,t)}}});t.exports=l},function(t,e,i){var n=i(0),s=i(9),r=i(64),o=i(17),a=i(2),h=new n({Extends:s,initialize:function(t,e,i){s.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},this.currentConfig=this.config,this.config=o(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(console.error("addMarker "+t.name+" already exists in Sound"),!1):(t=o(!0,{name:"",start:0,duration:this.totalDuration-(t.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0}},t),this.markers[t.name]=t,!0))},updateMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(this.markers[t.name]=o(!0,this.markers[t.name],t),!0):(console.warn("Audio Marker: "+t.name+" missing in Sound: "+this.key),!1))},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):null},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return!1;if(t){if(!this.markers[t])return console.warn("Marker: "+t+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=o(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:a,calculateRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e},destroy:function(){this.pendingRemove||(this.emit(r.DESTROY,this),this.pendingRemove=!0,this.manager=null,this.key="",this.removeAllListeners(),this.isPlaying=!1,this.isPaused=!1,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});t.exports=h},function(t,e,i){var n=i(196),s=i(0),r=i(2),o=i(137),a=new s({initialize:function(t){this.parent=t,this.list=[],this.position=0,this.addCallback=r,this.removeCallback=r,this._sortKey=""},add:function(t,e){return e?n.Add(this.list,t):n.Add(this.list,t,0,this.addCallback,this)},addAt:function(t,e,i){return i?n.AddAt(this.list,t,e):n.AddAt(this.list,t,e,0,this.addCallback,this)},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(t,e){return t?(void 0===e&&(e=function(e,i){return e[t]-i[t]}),o.inplace(this.list,e),this):this},getByName:function(t){return n.GetFirst(this.list,"name",t)},getRandom:function(t,e){return n.GetRandom(this.list,t,e)},getFirst:function(t,e,i,s){return n.GetFirst(this.list,t,e,i,s)},getAll:function(t,e,i,s){return n.GetAll(this.list,t,e,i,s)},count:function(t,e){return n.CountAllMatching(this.list,t,e)},swap:function(t,e){n.Swap(this.list,t,e)},moveTo:function(t,e){return n.MoveTo(this.list,t,e)},remove:function(t,e){return e?n.Remove(this.list,t):n.Remove(this.list,t,this.removeCallback,this)},removeAt:function(t,e){return e?n.RemoveAt(this.list,t):n.RemoveAt(this.list,t,this.removeCallback,this)},removeBetween:function(t,e,i){return i?n.RemoveBetween(this.list,t,e):n.RemoveBetween(this.list,t,e,this.removeCallback,this)},removeAll:function(t){for(var e=this.list.length;e--;)this.remove(this.list[e],t);return this},bringToTop:function(t){return n.BringToTop(this.list,t)},sendToBack:function(t){return n.SendToBack(this.list,t)},moveUp:function(t){return n.MoveUp(this.list,t),t},moveDown:function(t){return n.MoveDown(this.list,t),t},reverse:function(){return this.list.reverse(),this},shuffle:function(){return n.Shuffle(this.list),this},replace:function(t,e){return n.Replace(this.list,t,e)},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e,i,s){return n.SetAll(this.list,t,e,i,s),this},each:function(t,e){for(var i=[null],n=2;n0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});t.exports=a},function(t,e,i){var n=i(197),s=i(413);t.exports=function(t,e){if(void 0===e&&(e=90),!n(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=s(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=s(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;il&&(r=l),o>l&&(o=l),a=s,h=r;;)if(a0&&o.length0&&a.lengthe.right||t.y>e.bottom)}},function(t,e,i){var n=i(5),s={},r={register:function(t,e,i,n,r){s[t]={plugin:e,mapping:i,settingsKey:n,configKey:r}},getPlugin:function(t){return s[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,r=e.game.config;for(var o in s){var a=s[o].plugin,h=s[o].mapping,l=s[o].settingsKey,u=s[o].configKey;n(i,l,r[u])&&(t[h]=new a(t))}},remove:function(t){s.hasOwnProperty(t)&&delete s[t]}};t.exports=r},function(t,e,i){t.exports={ANY_KEY_DOWN:i(1240),ANY_KEY_UP:i(1241),COMBO_MATCH:i(1242),DOWN:i(1243),KEY_DOWN:i(1244),KEY_UP:i(1245),UP:i(1246)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e){t.exports=function(t,e,i,n,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),{responseType:t,async:e,user:i,password:n,timeout:s,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0}}},function(t,e,i){var n=i(0),s=i(229),r=i(65),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.body=null}});t.exports=o},function(t,e,i){var n={};t.exports=n;var s=i(37),r=i(19);n.fromVertices=function(t){for(var e={},i=0;i1?1:0;d1?1:0;p0:0!=(t.mask&e.category)&&0!=(e.mask&t.category)}},function(t,e,i){var n={};t.exports=n;var s=i(31),r=i(37);n.collides=function(t,e,i){var o,a,h,l,u=!1;if(i){var c=t.parent,d=e.parent,f=c.speed*c.speed+c.angularSpeed*c.angularSpeed+d.speed*d.speed+d.angularSpeed*d.angularSpeed;u=i&&i.collided&&f<.2,l=i}else l={collided:!1,bodyA:t,bodyB:e};if(i&&u){var p=l.axisBody,g=p===t?e:t,v=[p.axes[i.axisNumber]];if(h=n._overlapAxes(p.vertices,g.vertices,v),l.reused=!0,h.overlap<=0)return l.collided=!1,l}else{if((o=n._overlapAxes(t.vertices,e.vertices,t.axes)).overlap<=0)return l.collided=!1,l;if((a=n._overlapAxes(e.vertices,t.vertices,e.axes)).overlap<=0)return l.collided=!1,l;o.overlaps?s=a:a=0?o.index-1:u.length-1],l.x=s.x-c.x,l.y=s.y-c.y,h=-r.dot(i,l),a=s,s=u[(o.index+1)%u.length],l.x=s.x-c.x,l.y=s.y-c.y,(n=-r.dot(i,l))=this.firstgid&&t1?2-s:s,o=r*Math.cos(i),a=r*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},function(t,e,i){var n=i(20),s=i(0),r=i(9),o=i(119),a=i(289),h=i(290),l=i(5),u=new s({Extends:r,initialize:function(t,e,i){r.call(this),this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,l(i,"frames",[]),l(i,"defaultTextureKey",null)),this.frameRate=l(i,"frameRate",null),this.duration=l(i,"duration",null),null===this.duration&&null===this.frameRate?(this.frameRate=24,this.duration=this.frameRate/this.frames.length*1e3):this.duration&&null===this.frameRate?this.frameRate=this.frames.length/(this.duration/1e3):this.duration=this.frames.length/this.frameRate*1e3,this.msPerFrame=1e3/this.frameRate,this.skipMissedFrames=l(i,"skipMissedFrames",!0),this.delay=l(i,"delay",0),this.repeat=l(i,"repeat",0),this.repeatDelay=l(i,"repeatDelay",0),this.yoyo=l(i,"yoyo",!1),this.showOnStart=l(i,"showOnStart",!1),this.hideOnComplete=l(i,"hideOnComplete",!1),this.paused=!1,this.manager.on(o.PAUSE_ALL,this.pause,this),this.manager.on(o.RESUME_ALL,this.resume,this)},addFrame:function(t){return this.addFrameAt(this.frames.length,t)},addFrameAt:function(t,e){var i=this.getFrames(this.manager.textureManager,e);if(i.length>0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var n=this.frames.slice(0,t),s=this.frames.slice(t);this.frames=n.concat(i,s)}this.updateFrameSequence()}return this},checkFrame:function(t){return t>=0&&t0){s.isLast=!0,s.nextFrame=a[0],a[0].prevFrame=s;var v=1/(a.length-1);for(r=0;r=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo);var i=this.frames[e];0!==e||t.forward||(i=this.getLastFrame()),t.updateFrame(i)},getFrameByProgress:function(t){return t=n(t,0,1),a(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t._yoyo?this.handleYoyoFrame(t,!1):t.repeatCounter>0?t._reverse&&t.forward?t.forward=!1:this.repeatAnimation(t):this.completeAnimation(t):this.updateAndGetNextTick(t,e.nextFrame)},handleYoyoFrame:function(t,e){if(e||(e=!1),t._reverse===!e&&t.repeatCounter>0)return t.forward=e,void this.repeatAnimation(t);if(t._reverse===e||0!==t.repeatCounter){t.forward=e;var i=e?t.currentFrame.nextFrame:t.currentFrame.prevFrame;this.updateAndGetNextTick(t,i)}else this.completeAnimation(t)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t._yoyo?this.handleYoyoFrame(t,!0):t.repeatCounter>0?t._reverse&&!t.forward?(t.currentFrame=this.getLastFrame(),this.repeatAnimation(t)):(t.forward=!0,this.repeatAnimation(t)):this.completeAnimation(t):this.updateAndGetNextTick(t,e.prevFrame)},updateAndGetNextTick:function(t,e){t.updateFrame(e),this.getNextTick(t)},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){if(2===t._pendingStop)return this.completeAnimation(t);if(t._repeatDelay>0&&!1===t.pendingRepeat)t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t._repeatDelay;else if(t.repeatCounter--,t.updateFrame(t.currentFrame[t.forward?"nextFrame":"prevFrame"]),t.isPlaying){this.getNextTick(t),t.pendingRepeat=!1;var e=t.currentFrame,i=t.parent;this.emit(o.ANIMATION_REPEAT,this,e),i.emit(o.SPRITE_ANIMATION_KEY_REPEAT+this.key,this,e,t.repeatCounter,i),i.emit(o.SPRITE_ANIMATION_REPEAT,this,e,t.repeatCounter,i)}},setFrame:function(t){t.forward?this.nextFrame(t):this.previousFrame(t)},toJSON:function(){var t={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(e){t.frames.push(e.toJSON())}),t},updateFrameSequence:function(){for(var t,e=this.frames.length,i=1/(e-1),n=0;n1?(t.isLast=!0,t.prevFrame=this.frames[e-2],t.nextFrame=this.frames[0]):e>1&&(t.prevFrame=this.frames[n-1],t.nextFrame=this.frames[n+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.removeAllListeners(),this.manager.off(o.PAUSE_ALL,this.pause,this),this.manager.off(o.RESUME_ALL,this.resume,this),this.manager.remove(this.key);for(var t=0;t=1)return i.x=t.x,i.y=t.y,i;var r=n(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},function(t,e,i){var n=i(62),s=i(4);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=n(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,l=t.y2,u=0;u=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(s*a+o*h),e}},function(t,e){t.exports=function(t,e,i,n,s){var r=n+Math.atan2(t.y-i,t.x-e);return t.x=e+s*Math.cos(r),t.y=i+s*Math.sin(r),t}},function(t,e){t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},function(t,e){t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},function(t,e,i){var n=new(i(0))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(s-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(313),s=i(316),r=i(318),o=i(319);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?o(t):n(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var n=i(175);t.exports=function(t,e,i,s){void 0===e&&(e=1),void 0===i&&(i=1);var r=Math.floor(6*t),o=6*t-r,a=Math.floor(i*(1-e)*255),h=Math.floor(i*(1-o*e)*255),l=Math.floor(i*(1-(1-o)*e)*255),u=i=Math.floor(i*=255),c=i,d=i,f=r%6;return 0===f?(c=l,d=a):1===f?(u=h,d=a):2===f?(u=a,d=l):3===f?(u=a,c=h):4===f?(u=l,c=a):5===f&&(c=a,d=h),s?s.setTo?s.setTo(u,c,d,s.alpha,!1):(s.r=u,s.g=c,s.b=d,s.color=n(u,c,d),s):{r:u,g:c,b:d,color:n(u,c,d)}}},function(t,e){var i,n="";t.exports={disable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!1),t},enable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!0),t},getPrefix:i=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z;return this.x=i*o-n*r,this.y=n*s-e*o,this.z=e*r-i*s,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=e*s[0]+i*s[3]+n*s[6],this.y=e*s[1]+i*s[4]+n*s[7],this.z=e*s[2]+i*s[5]+n*s[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12],this.y=s[1]*e+s[5]*i+s[9]*n+s[13],this.z=s[2]*e+s[6]*i+s[10]*n+s[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=e*s[0]+i*s[4]+n*s[8]+s[12],o=e*s[1]+i*s[5]+n*s[9]+s[13],a=e*s[2]+i*s[6]+n*s[10]+s[14],h=e*s[3]+i*s[7]+n*s[11]+s[15];return this.x=r/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},project:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=s[0],o=s[1],a=s[2],h=s[3],l=s[4],u=s[5],c=s[6],d=s[7],f=s[8],p=s[9],g=s[10],v=s[11],y=s[12],m=s[13],x=s[14],T=1/(e*h+i*d+n*v+s[15]);return this.x=(e*r+i*l+n*f+y)*T,this.y=(e*o+i*u+n*p+m)*T,this.z=(e*a+i*c+n*g+x)*T,this},unproject:function(t,e){var i=t.x,n=t.y,s=t.z,r=t.w,o=this.x-i,a=r-this.y-1-n,h=this.z;return this.x=2*o/s-1,this.y=2*a/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});n.ZERO=new n,n.RIGHT=new n(1,0,0),n.LEFT=new n(-1,0,0),n.UP=new n(0,-1,0),n.DOWN=new n(0,1,0),n.FORWARD=new n(0,0,1),n.BACK=new n(0,0,-1),n.ONE=new n(1,1,1),t.exports=n},function(t,e,i){var n={Global:["game","anims","cache","plugins","registry","scale","sound","textures"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]};n.Global.push("facebook"),t.exports=n},function(t,e,i){var n=i(0),s=i(10),r=new n({initialize:function(t){this.name="WebGLPipeline",this.game=t.game,this.view=t.game.canvas,this.resolution=1,this.width=0,this.height=0,this.gl=t.gl,this.vertexCount=0,this.vertexCapacity=t.vertexCapacity,this.renderer=t.renderer,this.vertexData=t.vertices?t.vertices:new ArrayBuffer(t.vertexCapacity*t.vertexSize),this.vertexBuffer=this.renderer.createVertexBuffer(t.vertices?t.vertices:this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=this.renderer.createProgram(t.vertShader,t.fragShader),this.attributes=t.attributes,this.vertexSize=t.vertexSize,this.topology=t.topology,this.bytes=new Uint8Array(this.vertexData),this.vertexComponentCount=s.getComponentCount(t.attributes,this.gl),this.flushLocked=!1,this.active=!1},boot:function(){},addAttribute:function(t,e,i,n,r){return this.attributes.push({name:t,size:e,type:this.renderer.glFormats[i],normalized:n,offset:r}),this.vertexComponentCount=s.getComponentCount(this.attributes,this.gl),this},shouldFlush:function(){return this.vertexCount>=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this.resolution=i,this},bind:function(){var t=this.gl,e=this.vertexBuffer,i=this.attributes,n=this.program,s=this.renderer,r=this.vertexSize;s.setProgram(n),s.setVertexBuffer(e);for(var o=0;o=0?(t.enableVertexAttribArray(h),t.vertexAttribPointer(h,a.size,a.type,a.normalized,r,a.offset)):-1!==h&&t.disableVertexAttribArray(h)}return this},onBind:function(){return this},onPreRender:function(){return this},onRender:function(){return this},onPostRender:function(){return this},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.vertexCount,i=this.topology,n=this.vertexSize;if(0!==e)return t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,e*n)),t.drawArrays(i,0,e),this.vertexCount=0,this.flushLocked=!1,this;this.flushLocked=!1},destroy:function(){var t=this.gl;return t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),delete this.program,delete this.vertexBuffer,delete this.gl,this},setFloat1:function(t,e){return this.renderer.setFloat1(this.program,t,e),this},setFloat2:function(t,e,i){return this.renderer.setFloat2(this.program,t,e,i),this},setFloat3:function(t,e,i,n){return this.renderer.setFloat3(this.program,t,e,i,n),this},setFloat4:function(t,e,i,n,s){return this.renderer.setFloat4(this.program,t,e,i,n,s),this},setFloat1v:function(t,e){return this.renderer.setFloat1v(this.program,t,e),this},setFloat2v:function(t,e){return this.renderer.setFloat2v(this.program,t,e),this},setFloat3v:function(t,e){return this.renderer.setFloat3v(this.program,t,e),this},setFloat4v:function(t,e){return this.renderer.setFloat4v(this.program,t,e),this},setInt1:function(t,e){return this.renderer.setInt1(this.program,t,e),this},setInt2:function(t,e,i){return this.renderer.setInt2(this.program,t,e,i),this},setInt3:function(t,e,i,n){return this.renderer.setInt3(this.program,t,e,i,n),this},setInt4:function(t,e,i,n,s){return this.renderer.setInt4(this.program,t,e,i,n,s),this},setMatrix2:function(t,e,i){return this.renderer.setMatrix2(this.program,t,e,i),this},setMatrix3:function(t,e,i){return this.renderer.setMatrix3(this.program,t,e,i),this},setMatrix4:function(t,e,i){return this.renderer.setMatrix4(this.program,t,e,i),this}});t.exports=r},function(t,e,i){var n=i(0),s=i(72),r=i(1),o=i(365),a=i(811),h=i(812),l=i(35),u=i(10),c=i(187),d=new n({Extends:c,Mixins:[o],initialize:function(t){var e=t.renderer.config;c.call(this,{game:t.game,renderer:t.renderer,gl:t.renderer.gl,topology:r(t,"topology",t.renderer.gl.TRIANGLES),vertShader:r(t,"vertShader",h),fragShader:r(t,"fragShader",a),vertexCapacity:r(t,"vertexCapacity",6*e.batchSize),vertexSize:r(t,"vertexSize",5*Float32Array.BYTES_PER_ELEMENT+4*Uint8Array.BYTES_PER_ELEMENT),attributes:[{name:"inPosition",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:0},{name:"inTexCoord",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:2*Float32Array.BYTES_PER_ELEMENT},{name:"inTintEffect",size:1,type:t.renderer.gl.FLOAT,normalized:!1,offset:4*Float32Array.BYTES_PER_ELEMENT},{name:"inTint",size:4,type:t.renderer.gl.UNSIGNED_BYTE,normalized:!0,offset:5*Float32Array.BYTES_PER_ELEMENT}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.vertexViewU32=new Uint32Array(this.vertexData),this.maxQuads=e.batchSize,this.batches=[],this._tempMatrix1=new l,this._tempMatrix2=new l,this._tempMatrix3=new l,this._tempMatrix4=new l,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.tintEffect=2,this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[],this.mvpInit()},onBind:function(){return c.prototype.onBind.call(this),this.mvpUpdate(),this},resize:function(t,e,i){return c.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},setTexture2D:function(t,e){return void 0===t&&(t=this.renderer.blankTexture.glTexture),void 0===e&&(e=0),this.requireTextureBatch(t,e)&&this.pushBatch(t,e),this},requireTextureBatch:function(t,e){var i=this.batches,n=i.length;return!(n>0)||!((e>0?i[n-1].textures[e-1]:i[n-1].texture)===t)},pushBatch:function(t,e){if(0===e)this.batches.push({first:this.vertexCount,texture:t,textures:[]});else{var i=[];i[e-1]=t,this.batches.push({first:this.vertexCount,texture:null,textures:i})}},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t,e,i,n=this.gl,s=this.vertexCount,r=this.topology,o=this.vertexSize,a=this.renderer,h=this.batches,l=h.length,u=0,c=null;if(0===l||0===s)return this.flushLocked=!1,this;n.bufferSubData(n.ARRAY_BUFFER,0,this.bytes.subarray(0,s*o));for(var d=0;d0){for(e=0;e0){for(e=0;e0&&(a.setTexture2D(c.texture,0,!1),n.drawArrays(r,c.first,u)),this.vertexCount=0,h.length=0,this.flushLocked=!1,this},batchSprite:function(t,e,i){this.renderer.setPipeline(this);var n=this._tempMatrix1,s=this._tempMatrix2,r=this._tempMatrix3,o=t.frame,a=o.glTexture,h=o.u0,l=o.v0,c=o.u1,d=o.v1,f=o.x,p=o.y,g=o.cutWidth,v=o.cutHeight,y=o.customPivot,m=t.displayOriginX,x=t.displayOriginY,T=-m+f,w=-x+p;if(t.isCropped){var b=t._crop;b.flipX===t.flipX&&b.flipY===t.flipY||o.updateCropUVs(b,t.flipX,t.flipY),h=b.u0,l=b.v0,c=b.u1,d=b.v1,g=b.width,v=b.height,T=-m+(f=b.x),w=-x+(p=b.y)}var E=1,S=1;t.flipX&&(y||(T+=-o.realWidth+2*m),E=-1),(t.flipY||o.source.isGLTexture&&!a.flipY)&&(y||(w+=-o.realHeight+2*x),S=-1),s.applyITRS(t.x,t.y,t.rotation,t.scaleX*E,t.scaleY*S),n.copyFrom(e.matrix),i?(n.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),s.e=t.x,s.f=t.y,n.multiply(s,r)):(s.e-=e.scrollX*t.scrollFactorX,s.f-=e.scrollY*t.scrollFactorY,n.multiply(s,r));var A=T+g,_=w+v,C=r.getX(T,w),M=r.getY(T,w),P=r.getX(T,_),O=r.getY(T,_),R=r.getX(A,_),L=r.getY(A,_),D=r.getX(A,w),k=r.getY(A,w),F=u.getTintAppendFloatAlpha(t._tintTL,e.alpha*t._alphaTL),I=u.getTintAppendFloatAlpha(t._tintTR,e.alpha*t._alphaTR),B=u.getTintAppendFloatAlpha(t._tintBL,e.alpha*t._alphaBL),N=u.getTintAppendFloatAlpha(t._tintBR,e.alpha*t._alphaBR);e.roundPixels&&(C=Math.round(C),M=Math.round(M),P=Math.round(P),O=Math.round(O),R=Math.round(R),L=Math.round(L),D=Math.round(D),k=Math.round(k)),this.setTexture2D(a,0);var Y=t._isTinted&&t.tintFill;this.batchQuad(C,M,P,O,R,L,D,k,h,l,c,d,F,I,B,N,Y,a,0)},batchQuad:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,y,m){var x=!1;this.vertexCount+6>this.vertexCapacity&&(this.flush(),x=!0,this.setTexture2D(y,m));var T=this.vertexViewF32,w=this.vertexViewU32,b=this.vertexCount*this.vertexComponentCount-1;return T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=v,w[++b]=d,T[++b]=i,T[++b]=n,T[++b]=h,T[++b]=c,T[++b]=v,w[++b]=p,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=v,w[++b]=g,T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=v,w[++b]=d,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=v,w[++b]=g,T[++b]=o,T[++b]=a,T[++b]=u,T[++b]=l,T[++b]=v,w[++b]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g){var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),this.setTexture2D(p,g),v=!0);var y=this.vertexViewF32,m=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return y[++x]=t,y[++x]=e,y[++x]=o,y[++x]=a,y[++x]=f,m[++x]=u,y[++x]=i,y[++x]=n,y[++x]=o,y[++x]=l,y[++x]=f,m[++x]=c,y[++x]=s,y[++x]=r,y[++x]=h,y[++x]=l,y[++x]=f,m[++x]=d,this.vertexCount+=3,v},batchTexture:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,y,m,x,T,w,b,E,S,A,_,C,M,P,O){this.renderer.setPipeline(this,t);var R=this._tempMatrix1,L=this._tempMatrix2,D=this._tempMatrix3,k=y/i+_,F=m/n+C,I=(y+x)/i+_,B=(m+T)/n+C,N=o,Y=a,X=-g,z=-v;if(t.isCropped){var U=t._crop;N=U.width,Y=U.height,o=U.width,a=U.height;var G=y=U.x,W=m=U.y;c&&(G=x-U.x-U.width),d&&!e.isRenderTexture&&(W=T-U.y-U.height),k=G/i+_,F=W/n+C,I=(G+U.width)/i+_,B=(W+U.height)/n+C,X=-g+y,z=-v+m}d^=!O&&e.isRenderTexture?1:0,c&&(N*=-1,X+=o),d&&(Y*=-1,z+=a);var V=X+N,H=z+Y;L.applyITRS(s,r,u,h,l),R.copyFrom(M.matrix),P?(R.multiplyWithOffset(P,-M.scrollX*f,-M.scrollY*p),L.e=s,L.f=r,R.multiply(L,D)):(L.e-=M.scrollX*f,L.f-=M.scrollY*p,R.multiply(L,D));var j=D.getX(X,z),q=D.getY(X,z),K=D.getX(X,H),J=D.getY(X,H),Z=D.getX(V,H),Q=D.getY(V,H),$=D.getX(V,z),tt=D.getY(V,z);M.roundPixels&&(j=Math.round(j),q=Math.round(q),K=Math.round(K),J=Math.round(J),Z=Math.round(Z),Q=Math.round(Q),$=Math.round($),tt=Math.round(tt)),this.setTexture2D(e,0),this.batchQuad(j,q,K,J,Z,Q,$,tt,k,F,I,B,w,b,E,S,A,e,0)},batchTextureFrame:function(t,e,i,n,s,r,o){this.renderer.setPipeline(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2,l=e+t.width,c=i+t.height;o?a.multiply(o,h):h=a;var d=h.getX(e,i),f=h.getY(e,i),p=h.getX(e,c),g=h.getY(e,c),v=h.getX(l,c),y=h.getY(l,c),m=h.getX(l,i),x=h.getY(l,i);this.setTexture2D(t.glTexture,0),n=u.getTintAppendFloatAlpha(n,s),this.batchQuad(d,f,p,g,v,y,m,x,t.u0,t.v0,t.u1,t.v1,n,n,n,n,0,t.glTexture,0)},drawFillRect:function(t,e,i,n,s,r){var o=t+i,a=e+n;this.setTexture2D();var h=u.getTintAppendFloatAlphaAndSwap(s,r);this.batchQuad(t,e,t,a,o,a,o,e,0,0,1,1,h,h,h,h,2)},batchFillRect:function(t,e,i,n,s,r){this.renderer.setPipeline(this);var o=this._tempMatrix3;r&&r.multiply(s,o);var a=t+i,h=e+n,l=o.getX(t,e),u=o.getY(t,e),c=o.getX(t,h),d=o.getY(t,h),f=o.getX(a,h),p=o.getY(a,h),g=o.getX(a,e),v=o.getY(a,e),y=this.currentFrame,m=y.u0,x=y.v0,T=y.u1,w=y.v1;this.batchQuad(l,u,c,d,f,p,g,v,m,x,T,w,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.fillTint.BR,this.tintEffect)},batchFillTriangle:function(t,e,i,n,s,r,o,a){this.renderer.setPipeline(this);var h=this._tempMatrix3;a&&a.multiply(o,h);var l=h.getX(t,e),u=h.getY(t,e),c=h.getX(i,n),d=h.getY(i,n),f=h.getX(s,r),p=h.getY(s,r),g=this.currentFrame,v=g.u0,y=g.v0,m=g.u1,x=g.v1;this.batchTri(l,u,c,d,f,p,v,y,m,x,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.tintEffect)},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h){var l=this.tempTriangle;l[0].x=t,l[0].y=e,l[0].width=o,l[1].x=i,l[1].y=n,l[1].width=o,l[2].x=s,l[2].y=r,l[2].width=o,l[3].x=t,l[3].y=e,l[3].width=o,this.batchStrokePath(l,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.setPipeline(this);var n=this._tempMatrix3;i&&i.multiply(e,n);for(var r,o,a=t.length,h=this.polygonCache,l=this.fillTint.TL,u=this.fillTint.TR,c=this.fillTint.BL,d=this.tintEffect,f=0;f0&&H[4]?this.batchQuad(D,k,P,O,H[0],H[1],H[2],H[3],U,G,W,V,B,N,Y,X,I):(j[0]=D,j[1]=k,j[2]=P,j[3]=O,j[4]=1),h&&j[4]?this.batchQuad(C,M,R,L,j[0],j[1],j[2],j[3],U,G,W,V,B,N,Y,X,I):(H[0]=C,H[1]=M,H[2]=R,H[3]=L,H[4]=1)}}});t.exports=d},function(t,e,i){var n=i(11),s=i(13);t.exports=function(t,e){if(void 0===e&&(e=new n),0===t.length)return e;for(var i,r,o,a=Number.MAX_VALUE,h=Number.MAX_VALUE,l=s.MIN_SAFE_INTEGER,u=s.MIN_SAFE_INTEGER,c=0;c0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t,e){return t?this.resume(e):this.pause(e)},start:function(t){t&&(this.settings.data=t),this.settings.status=s.START,this.settings.active=!0,this.settings.visible=!0,this.events.emit(o.START,this),this.events.emit(o.READY,this,t)},shutdown:function(t){this.events.off(o.TRANSITION_INIT),this.events.off(o.TRANSITION_START),this.events.off(o.TRANSITION_COMPLETE),this.events.off(o.TRANSITION_OUT),this.settings.status=s.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit(o.SHUTDOWN,this,t)},destroy:function(){this.settings.status=s.DESTROYED,this.settings.active=!1,this.settings.visible=!1,this.events.emit(o.DESTROY,this),this.events.removeAllListeners();for(var t=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],e=0;e0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});t.exports=u},function(t,e,i){var n=i(196),s=i(43),r=i(0),o=i(12),a=i(102),h=i(14),l=i(11),u=i(984),c=i(417),d=i(3),f=new r({Extends:h,Mixins:[o.AlphaSingle,o.BlendMode,o.ComputedSize,o.Depth,o.Mask,o.Transform,o.Visible,u],initialize:function(t,e,i,n){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new o.TransformMatrix,this.tempTransformMatrix=new o.TransformMatrix,this._displayList=t.sys.displayList,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.setPosition(e,i),this.clearAlpha(),this.setBlendMode(s.SKIP_CHECK),n&&this.add(n)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.list.length>0)for(var e=this.list,i=new l,n=0;n-1},setAll:function(t,e,i,s){return n.SetAll(this.list,t,e,i,s),this},each:function(t,e){var i,n=[null],s=this.list.slice(),r=s.length;for(i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null}});t.exports=f},function(t,e,i){var n=i(138),s=i(0),r=i(989),o=new s({Extends:n,Mixins:[r],initialize:function(t,e,i,s,r,o,a){n.call(this,t,e,i,s,r,o,a),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this}});t.exports=o},function(t,e,i){var n=i(103),s=i(0),r=i(205),o=i(287),a=i(291),h=i(292),l=i(296),u=i(121),c=i(301),d=i(302),f=i(299),p=i(35),g=i(107),v=i(14),y=i(1),m=i(5),x=i(13),T=i(995),w=new s({Extends:v,Mixins:[o,a,h,l,u,c,d,f,T],initialize:function(t,e){var i=m(e,"x",0),n=m(e,"y",0);v.call(this,t,"Graphics"),this.setPosition(i,n),this.initPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this._tempMatrix1=new p,this._tempMatrix2=new p,this._tempMatrix3=new p,this.setDefaultStyles(e)},setDefaultStyles:function(t){return m(t,"lineStyle",null)&&(this.defaultStrokeWidth=m(t,"lineStyle.width",1),this.defaultStrokeColor=m(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=m(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),m(t,"fillStyle",null)&&(this.defaultFillColor=m(t,"fillStyle.color",16777215),this.defaultFillAlpha=m(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(r.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(r.FILL_STYLE,t,e),this},fillGradientStyle:function(t,e,i,n,s){return void 0===s&&(s=1),this.commandBuffer.push(r.GRADIENT_FILL_STYLE,s,t,e,i,n),this},lineGradientStyle:function(t,e,i,n,s,o){return void 0===o&&(o=1),this.commandBuffer.push(r.GRADIENT_LINE_STYLE,t,o,e,i,n,s),this},setTexture:function(t,e,i){if(void 0===i&&(i=0),void 0===t)this.commandBuffer.push(r.CLEAR_TEXTURE);else{var n=this.scene.sys.textures.getFrame(t,e);n&&(2===i&&(i=3),this.commandBuffer.push(r.SET_TEXTURE,n,i))}return this},beginPath:function(){return this.commandBuffer.push(r.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(r.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(r.FILL_PATH),this},fill:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(r.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,x.PI2),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,x.PI2),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,n){return this.commandBuffer.push(r.FILL_RECT,t,e,i,n),this},strokeRect:function(t,e,i,n){var s=this._lineWidth/2,r=t-s,o=t+s;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+n),this.strokePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+n),this.strokePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(o+i,e),this.strokePath(),this.beginPath(),this.moveTo(r,e+n),this.lineTo(o+i,e+n),this.strokePath(),this},fillRoundedRect:function(t,e,i,n,s){void 0===s&&(s=20);var r=s,o=s,a=s,h=s;return"number"!=typeof s&&(r=y(s,"tl",20),o=y(s,"tr",20),a=y(s,"bl",20),h=y(s,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-x.TAU,0),this.lineTo(t+i,e+n-h),this.arc(t+i-h,e+n-h,h,0,x.TAU),this.lineTo(t+a,e+n),this.arc(t+a,e+n-a,a,x.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-x.TAU),this.fillPath(),this},strokeRoundedRect:function(t,e,i,n,s){void 0===s&&(s=20);var r=s,o=s,a=s,h=s;return"number"!=typeof s&&(r=y(s,"tl",20),o=y(s,"tr",20),a=y(s,"bl",20),h=y(s,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-x.TAU,0),this.lineTo(t+i,e+n-h),this.arc(t+i-h,e+n-h,h,0,x.TAU),this.lineTo(t+a,e+n),this.arc(t+a,e+n-a,a,x.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-x.TAU),this.strokePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,n,s,o),this},strokeTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,n,s,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,n){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,n),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(r.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(r.MOVE_TO,t,e),this},strokePoints:function(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===n&&(n=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var s=1;s-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var n,s,r=this.scene.sys,o=r.game.renderer;if(void 0===e&&(e=r.scale.width),void 0===i&&(i=r.scale.height),w.TargetCamera.setScene(this.scene),w.TargetCamera.setViewport(0,0,e,i),w.TargetCamera.scrollX=this.x,w.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var a=(n=r.textures.get(t)).getSourceImage();a instanceof HTMLCanvasElement&&(s=a.getContext("2d"))}else s=(n=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(s=t.getContext("2d"));return s&&(this.renderCanvas(o,this,0,w.TargetCamera,null,s,!1),n&&n.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});w.TargetCamera=new n,t.exports=w},function(t,e){t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,SET_TEXTURE:19,CLEAR_TEXTURE:20,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},function(t,e,i){var n=i(4);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.width/2,r=t.height/2;return i.x=t.x+s*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},function(t,e,i){var n=i(0),s=i(12),r=i(14),o=i(425),a=i(135),h=i(427),l=i(1005),u=new n({Extends:r,Mixins:[s.Depth,s.Mask,s.Pipeline,s.Transform,s.Visible,l],initialize:function(t,e,i,n){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline(),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var s=0;s0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},removeEmitter:function(t){return this.emitters.remove(t,!0)},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;ss.width&&(t=s.width-this.frame.cutX),this.frame.cutY+e>s.height&&(e=s.height-this.frame.cutY),this.frame.setSize(t,e,this.frame.cutX,this.frame.cutY)}this.updateDisplayOrigin();var r=this.input;return r&&!r.customHitArea&&(r.hitArea.width=t,r.hitArea.height=e),this},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this},saveTexture:function(t){return this.textureManager.renameTexture(this.texture.key,t),this._saved=!0,this.texture},fill:function(t,e,i,n,s,r){void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.frame.cutWidth),void 0===r&&(r=this.frame.cutHeight);var o=255&(t>>16|0),a=255&(t>>8|0),h=255&(0|t),l=this.gl,u=this.frame;if(this.camera.preRender(1,1),l){var c=this.camera._cx,f=this.camera._cy,p=this.camera._cw,g=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(c,f,p,g,g);var v=this.pipeline;v.projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),v.drawFillRect(i,n,s,r,d.getTintFromFloats(o/255,a/255,h/255,1),e),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),v.projOrtho(0,v.width,v.height,0,-1e3,1e3)}else this.renderer.setContext(this.context),this.context.fillStyle="rgba("+o+","+a+","+h+","+e+")",this.context.fillRect(i+u.cutX,n+u.cutY,s,r),this.renderer.setContext();return this.dirty=!0,this},clear:function(){if(this.dirty){var t=this.gl;if(t){var e=this.renderer;e.setFramebuffer(this.framebuffer,!0),this.frame.cutWidth===this.canvas.width&&this.frame.cutHeight===this.canvas.height||t.scissor(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),e.setFramebuffer(null,!0)}else{var i=this.context;i.save(),i.setTransform(1,0,0,1,0,0),i.clearRect(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),i.restore()}this.dirty=!1}return this},erase:function(t,e,i){this._eraseMode=!0;var s=this.renderer.currentBlendMode;return this.renderer.setBlendMode(n.ERASE),this.draw(t,e,i,1,16777215),this.renderer.setBlendMode(s),this._eraseMode=!1,this},draw:function(t,e,i,n,s){void 0===n&&(n=this.globalAlpha),s=void 0===s?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(s>>16)+(65280&s)+((255&s)<<16),Array.isArray(t)||(t=[t]);var r=this.gl;if(this.camera.preRender(1,1),r){var o=this.camera._cx,a=this.camera._cy,h=this.camera._cw,l=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(o,a,h,l,l);var u=this.pipeline;u.projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),this.batchList(t,e,i,n,s),u.flush(),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),u.projOrtho(0,u.width,u.height,0,-1e3,1e3)}else this.renderer.setContext(this.context),this.batchList(t,e,i,n,s),this.renderer.setContext();return this.dirty=!0,this},drawFrame:function(t,e,i,n,s,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.globalAlpha),r=void 0===r?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(r>>16)+(65280&r)+((255&r)<<16);var o=this.gl,a=this.textureManager.getFrame(t,e);if(a){if(this.camera.preRender(1,1),o){var h=this.camera._cx,l=this.camera._cy,u=this.camera._cw,c=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(h,l,u,c,c);var d=this.pipeline;d.projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),d.batchTextureFrame(a,i+this.frame.cutX,n+this.frame.cutY,r,s,this.camera.matrix,null),d.flush(),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),d.projOrtho(0,d.width,d.height,0,-1e3,1e3)}else this.batchTextureFrame(a,i+this.frame.cutX,n+this.frame.cutY,s,r);this.dirty=!0}return this},batchList:function(t,e,i,n,s){for(var r=0;rl){if(0===c){for(var g=f;g.length&&(g=g.slice(0,-1),!((p=e.measureText(g).width)<=l)););if(!g.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var v=d.substr(g.length);u[c]=v,h+=g}var y=u[c].length?c:c+1,m=u.slice(y).join(" ").replace(/[ \n]*$/gi,"");s[o+1]=m+" "+(s[o+1]||""),r=s.length;break}h+=f,l-=p}n+=h.replace(/[ \n]*$/gi,"")+"\n"}}return n=n.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var n="",s=t.split(this.splitRegExp),r=s.length-1,o=e.measureText(" ").width,a=0;a<=r;a++){for(var h=i,l=s[a].split(" "),u=l.length-1,c=0;c<=u;c++){var d=l[c],f=e.measureText(d).width,p=f+o;p>h&&c>0&&(n+="\n",h=i),n+=d,c0&&(d+=h.lineSpacing*g),i.rtl)c=f-c;else if("right"===i.align)c+=o-h.lineWidths[g];else if("center"===i.align)c+=(o-h.lineWidths[g])/2;else if("justify"===i.align){if(h.lineWidths[g]/h.width>=.85){var v=h.width-h.lineWidths[g],y=e.measureText(" ").width,m=a[g].trim(),x=m.split(" ");v+=(a[g].length-m.length)*y;for(var T=Math.floor(v/y),w=0;T>0;)x[w]+=" ",w=(w+1)%(x.length-1||1),--T;a[g]=x.join(" ")}}this.autoRound&&(c=Math.round(c),d=Math.round(d)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(a[g],c,d)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(a[g],c,d))}e.restore(),this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(t,this.frame.source.glTexture,!0),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0;var b=this.input;return b&&!b.customHitArea&&(b.hitArea.width=this.width,b.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(t){this.setText(t)}},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this._text,style:this.style.toJSON(),padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&c(this.canvas),s.remove(this.canvas),this.texture.destroy()}});t.exports=p},function(t,e,i){var n=i(28),s=i(0),r=i(12),o=i(21),a=i(14),h=i(346),l=i(177),u=i(1021),c=i(3),d=new s({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Tint,r.Transform,r.Visible,u],initialize:function(t,e,i,s,r,l,u){var d=t.sys.game.renderer;a.call(this,t,"TileSprite");var f=t.sys.textures.get(l),p=f.get(u);s&&r?(s=Math.floor(s),r=Math.floor(r)):(s=p.width,r=p.height),this._tilePosition=new c,this._tileScale=new c(1,1),this.dirty=!1,this.renderer=d,this.canvas=n.create(this,s,r),this.context=this.canvas.getContext("2d"),this.displayTexture=f,this.displayFrame=p,this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.potWidth=h(p.width),this.potHeight=h(p.height),this.fillCanvas=n.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d"),this.fillPattern=null,this.setPosition(e,i),this.setSize(s,r),this.setFrame(u),this.setOriginFromFrame(),this.initPipeline(),t.sys.game.events.on(o.CONTEXT_RESTORED,function(t){var e=t.gl;this.dirty=!0,this.fillPattern=null,this.fillPattern=t.createTexture2D(0,e.LINEAR,e.LINEAR,e.REPEAT,e.REPEAT,e.RGBA,this.fillCanvas,this.potWidth,this.potHeight)},this)},setTexture:function(t,e){return this.displayTexture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){var e=this.displayTexture.get(t);return this.potWidth=h(e.width),this.potHeight=h(e.height),this.canvas.width=0,e.cutWidth&&e.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.displayFrame=e,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(t,e){return void 0!==t&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},setTileScale:function(t,e){return void 0===t&&(t=this.tileScaleX),void 0===e&&(e=t),this.tileScaleX=t,this.tileScaleY=e,this},updateTileTexture:function(){if(this.dirty&&this.renderer){var t=this.displayFrame;if(t.source.isRenderTexture||t.source.isGLTexture)return console.warn("TileSprites can only use Image or Canvas based textures"),void(this.dirty=!1);var e=this.fillContext,i=this.fillCanvas,n=this.potWidth,s=this.potHeight;this.renderer.gl||(n=t.cutWidth,s=t.cutHeight),e.clearRect(0,0,n,s),i.width=n,i.height=s,e.drawImage(t.source.image,t.cutX,t.cutY,t.cutWidth,t.cutHeight,0,0,n,s),this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(i,this.fillPattern):this.fillPattern=e.createPattern(i,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var t=this.canvas;if(t.width===this.width&&t.height===this.height||(t.width=this.width,t.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl)this.dirty=!1;else{var e=this.context;this.scene.sys.game.config.antialias||l.disable(e);var i=this._tileScale.x,n=this._tileScale.y,s=this._tilePosition.x,r=this._tilePosition.y;e.clearRect(0,0,this.width,this.height),e.save(),e.scale(i,n),e.translate(-s,-r),e.fillStyle=this.fillPattern,e.fillRect(s,r,this.width/i,this.height/n),e.restore(),this.dirty=!1}},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),n.remove(this.canvas),n.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null,this.texture.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(t){this._tilePosition.x=t,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(t){this._tilePosition.y=t,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(t){this._tileScale.x=t,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(t){this._tileScale.y=t,this.dirty=!0}}});t.exports=d},function(t,e,i){var n=i(0),s=i(20),r=i(12),o=i(102),a=i(21),h=i(14),l=i(64),u=i(209),c=i(1024),d=i(13),f=new n({Extends:h,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,c],initialize:function(t,e,i,n){h.call(this,t,"Video"),this.video=null,this.videoTexture=null,this.videoTextureSource=null,this.snapshotTexture=null,this.flipY=!1,this._key=u(),this.touchLocked=!0,this.playWhenUnlocked=!1,this.retryLimit=20,this.retry=0,this.retryInterval=500,this._retryID=null,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={play:this.playHandler.bind(this),error:this.loadErrorHandler.bind(this),end:this.completeHandler.bind(this),time:this.timeUpdateHandler.bind(this),seeking:this.seekingHandler.bind(this),seeked:this.seekedHandler.bind(this)},this._crop=this.resetCropObject(),this.markers={},this._markerIn=-1,this._markerOut=d.MAX_SAFE_INTEGER,this._lastUpdate=0,this._cacheKey="",this._isSeeking=!1,this.removeVideoElementOnDestroy=!1,this.setPosition(e,i),this.initPipeline(),n&&this.changeSource(n,!1);var s=t.sys.game.events;s.on(a.PAUSE,this.globalPause,this),s.on(a.RESUME,this.globalResume,this);var r=t.sys.sound;r&&r.on(l.GLOBAL_MUTE,this.globalMute,this)},play:function(t,e,i){if(this.touchLocked&&this.playWhenUnlocked||this.isPlaying())return this;var n=this.video;if(!n)return console.warn("Video not loaded"),this;void 0===t&&(t=n.loop);var s=this.scene.sys.sound;s&&s.mute&&this.setMute(!0),isNaN(e)||(this._markerIn=e),!isNaN(i)&&i>e&&(this._markerOut=i),n.loop=t;var r=this._callbacks,o=n.play();return void 0!==o?o.then(this.playPromiseSuccessHandler.bind(this)).catch(this.playPromiseErrorHandler.bind(this)):(n.addEventListener("playing",r.play,!0),n.readyState<2&&(this.retry=this.retryLimit,this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval))),n.addEventListener("ended",r.end,!0),n.addEventListener("timeupdate",r.time,!0),n.addEventListener("seeking",r.seeking,!0),n.addEventListener("seeked",r.seeked,!0),this},changeSource:function(t,e,i,n,s){void 0===e&&(e=!0),this.video&&this.stop();var r=this.scene.sys.cache.video.get(t);return r?(this.video=r,this._cacheKey=t,this._codePaused=r.paused,this._codeMuted=r.muted,this.videoTexture?(this.scene.sys.textures.remove(this._key),this.videoTexture=this.scene.sys.textures.create(this._key,r,r.videoWidth,r.videoHeight),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,r.videoWidth,r.videoHeight),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,r.videoWidth,r.videoHeight)):this.updateTexture(),r.currentTime=0,this._lastUpdate=0,e&&this.play(i,n,s)):this.video=null,this},addMarker:function(t,e,i){return!isNaN(e)&&e>=0&&!isNaN(i)&&(this.markers[t]=[e,i]),this},playMarker:function(t,e){var i=this.markers[t];return i&&this.play(e,i[0],i[1]),this},removeMarker:function(t){return delete this.markers[t],this},snapshot:function(t,e){return void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.snapshotArea(0,0,this.width,this.height,t,e)},snapshotArea:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=this.height),void 0===s&&(s=i),void 0===r&&(r=n);var o=this.video,a=this.snapshotTexture;return a?(a.setSize(s,r),o&&a.context.drawImage(o,t,e,i,n,0,0,s,r)):(a=this.scene.sys.textures.createCanvas(u(),s,r),this.snapshotTexture=a,o&&a.context.drawImage(o,t,e,i,n,0,0,s,r)),a.update()},saveSnapshotTexture:function(t){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,t):this.snapshotTexture=this.scene.sys.textures.createCanvas(t,this.width,this.height),this.snapshotTexture},loadURL:function(t,e,i){void 0===e&&(e="loadeddata"),void 0===i&&(i=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var n=document.createElement("video");return n.controls=!1,i&&(n.muted=!0,n.defaultMuted=!0,n.setAttribute("autoplay","autoplay")),n.setAttribute("playsinline","playsinline"),n.setAttribute("preload","auto"),n.addEventListener("error",this._callbacks.error,!0),n.src=t,n.load(),this.video=n,this},playPromiseSuccessHandler:function(){this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn)},playPromiseErrorHandler:function(t){this.scene.sys.input.once("pointerdown",this.unlockHandler,this),this.touchLocked=!0,this.playWhenUnlocked=!0,this.emit(o.VIDEO_ERROR,this,t)},playHandler:function(){this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this.video.removeEventListener("playing",this._callbacks.play,!0)},loadErrorHandler:function(t){this.stop(),this.emit(o.VIDEO_ERROR,this,t)},unlockHandler:function(){this.touchLocked=!1,this.playWhenUnlocked=!1,this.emit(o.VIDEO_UNLOCKED,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn),this.video.play(),this.emit(o.VIDEO_PLAY,this)},completeHandler:function(){this.emit(o.VIDEO_COMPLETE,this)},timeUpdateHandler:function(){this.video&&this.video.currentTime=this._markerOut&&(t.loop?(t.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=e,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),this.stop())))}},checkVideoProgress:function(){this.video.readyState>=2?this.updateTexture():(this.retry--,this.retry>0?this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval):this.emit(o.VIDEO_TIMEOUT,this))},updateTexture:function(){var t=this.video,e=t.videoWidth,i=t.videoHeight;if(this.videoTexture){var n=this.videoTextureSource;n.source!==t&&(n.source=t,n.width=e,n.height=i),n.update()}else this.videoTexture=this.scene.sys.textures.create(this._key,t,e,i),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,e,i),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,e,i)},getVideoKey:function(){return this._cacheKey},seekTo:function(t){var e=this.video;if(e){var i=e.duration;if(i!==1/0&&!isNaN(i)){var n=i*t;this.setCurrentTime(n)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(t){var e=this.video;if(e){if("string"==typeof t){var i=t[0],n=parseFloat(t.substr(1));"+"===i?t=e.currentTime+n:"-"===i&&(t=e.currentTime-n)}e.currentTime=t,this._lastUpdate=t}return this},isSeeking:function(){return this._isSeeking},seekingHandler:function(){this._isSeeking=!0,this.emit(o.VIDEO_SEEKING,this)},seekedHandler:function(){this._isSeeking=!1,this.emit(o.VIDEO_SEEKED,this),this.video&&this.updateTexture()},getProgress:function(){var t=this.video;if(t){var e=t.currentTime,i=t.duration;if(i!==1/0&&!isNaN(i))return e/i}return 0},getDuration:function(){return this.video?this.video.duration:0},setMute:function(t){void 0===t&&(t=!0),this._codeMuted=t;var e=this.video;return e&&(e.muted=!!this._systemMuted||t),this},isMuted:function(){return this._codeMuted},globalMute:function(t,e){this._systemMuted=e;var i=this.video;i&&(i.muted=!!this._codeMuted||e)},globalPause:function(){this._systemPaused=!0,this.video&&this.video.pause()},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&this.video.play()},setPaused:function(t){void 0===t&&(t=!0);var e=this.video;return this._codePaused=t,e&&(t?e.paused||e.pause():t||e.paused&&!this._systemPaused&&e.play()),this},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(t){return void 0===t&&(t=1),this.video&&(this.video.volume=s(t,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(t){return this.video&&(this.video.playbackRate=t),this},getLoop:function(){return!!this.video&&this.video.loop},setLoop:function(t){return void 0===t&&(t=!0),this.video&&(this.video.loop=t),this},isPlaying:function(){return!!this.video&&!(this.video.paused||this.video.ended)},isPaused:function(){return this.video&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(t,e){return void 0===e&&(e=!1),this.videoTexture&&this.scene.sys.textures.renameTexture(this._key,t),this._key=t,this.flipY=e,this.videoTextureSource&&this.videoTextureSource.setFlipY(e),this.videoTexture},stop:function(){var t=this.video;if(t){var e=this._callbacks;for(var i in e)t.removeEventListener(i,e[i],!0);t.pause()}return this._retryID&&window.clearTimeout(this._retryID),this.emit(o.VIDEO_STOP,this),this},removeVideoElement:function(){var t=this.video;if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("autoplay"),t.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(),this.removeVideoElementOnDestroy&&this.removeVideoElement();var t=this.scene.sys.game.events;t.off(a.PAUSE,this.globalPause,this),t.off(a.RESUME,this.globalResume,this);var e=this.scene.sys.sound;e&&e.off(l.GLOBAL_MUTE,this.globalMute,this),this._retryID&&window.clearTimeout(this._retryID)}});t.exports=f},function(t,e,i){var n=i(0),s=i(214),r=i(442),o=i(52),a=new n({initialize:function(t){this.type=o.POLYGON,this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return s(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],"string"==typeof t&&(t=t.split(" ")),!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,n=0;no||r>a)return!1;if(s<=i||r<=n)return!0;var h=s-i,l=r-n;return h*h+l*l<=t.radius*t.radius}},function(t,e,i){var n=i(4),s=i(220);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r,o,a=t.x1,h=t.y1,l=t.x2,u=t.y2,c=e.x,d=e.y,f=e.radius,p=l-a,g=u-h,v=a-c,y=h-d,m=p*p+g*g,x=2*(p*v+g*y),T=x*x-4*m*(v*v+y*y-f*f);if(0===T){var w=-x/(2*m);r=a+w*p,o=h+w*g,w>=0&&w<=1&&i.push(new n(r,o))}else if(T>0){var b=(-x-Math.sqrt(T))/(2*m);r=a+b*p,o=h+b*g,b>=0&&b<=1&&i.push(new n(r,o));var E=(-x+Math.sqrt(T))/(2*m);r=a+E*p,o=h+E*g,E>=0&&E<=1&&i.push(new n(r,o))}}return i}},function(t,e,i){var n=i(60),s=new(i(4));t.exports=function(t,e,i){if(void 0===i&&(i=s),n(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(n(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,l=r*r+o*o,u=r,c=o;if(l>0){var d=(a*r+h*o)/l;u*=d,c*=d}return i.x=t.x1+u,i.y=t.y1+c,u*u+c*c<=l&&u*r+c*o>=0&&n(e,i.x,i.y)}},function(t,e,i){var n=i(4),s=i(93),r=i(455);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e))for(var o=e.getLineA(),a=e.getLineB(),h=e.getLineC(),l=e.getLineD(),u=[new n,new n,new n,new n],c=[s(o,t,u[0]),s(a,t,u[1]),s(h,t,u[2]),s(l,t,u[3])],d=0;d<4;d++)c[d]&&i.push(u[d]);return i}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=[]);for(var s,r,o,a,h,l,u=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,f=t.y2-t.y1,p=u*u+c*c,g=u*d+c*f,v=d*d+f*f,y=p*v-g*g,m=0===y?0:1/y,x=t.x1,T=t.y1,w=0;w=0&&r>=0&&s+r<1&&(n.push({x:e[w].x,y:e[w].y}),i)));w++);return n}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,t}},function(t,e){t.exports=function(t){return 0===t.height?NaN:t.width/t.height}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,o=t.x3-e,a=t.y3-i,t.x3=o*s-a*r+e,t.y3=o*r+a*s+i,t}},function(t,e,i){t.exports={BUTTON_DOWN:i(1226),BUTTON_UP:i(1227),CONNECTED:i(1228),DISCONNECTED:i(1229),GAMEPAD_BUTTON_DOWN:i(1230),GAMEPAD_BUTTON_UP:i(1231)}},function(t,e,i){var n=i(17),s=i(144);t.exports=function(t,e){var i=void 0===t?s():n({},t);if(e)for(var r in e)void 0!==e[r]&&(i[r]=e[r]);return i}},function(t,e,i){var n=i(0),s=i(23),r=i(24),o=i(8),a=i(1),h=i(7),l=i(388),u=new n({Extends:r,initialize:function(t,e,i,n){var s="xml";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),s=a(o,"extension",s)}var l={type:"xml",cache:t.cacheManager.xml,extension:s,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,l)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=l(this.xhrLoader.responseText),this.data?this.onProcessComplete():(console.warn("Invalid XMLFile: "+this.key),this.onProcessError())}});o.register("xml",function(t,e,i){if(Array.isArray(t))for(var n=0;ng&&(g=m),a.translate(y,{x:.5*x,y:.5*m}),c=y.bounds.max.x+r,s.addBody(u,y),l=y,f+=1}else c+=r}d+=g+o,c=t}return u},n.chain=function(t,e,i,n,a,h){for(var l=t.bodies,u=1;u0)for(l=0;l0&&(d=f[l-1+(h-1)*e],s.addConstraint(t,r.create(o.extend({bodyA:d,bodyB:c},a)))),n&&ld||o<(l=d-l)||o>i-1-l))return 1===c&&a.translate(u,{x:(o+(i%2==1?1:-1))*f,y:0}),h(t+(u?o*f:0)+o*r,n,o,l,u,c)})},n.newtonsCradle=function(t,e,i,n,o){for(var a=s.create({label:"Newtons Cradle"}),l=0;l1;if(!d||t!=d.x||e!=d.y){d&&n?(f=d.x,p=d.y):(f=0,p=0);var s={x:f+t,y:p+e};!n&&d||(d=s),g.push(s),y=f+t,m=p+e}},T=function(t){var e=t.pathSegTypeAsLetter.toUpperCase();if("Z"!==e){switch(e){case"M":case"L":case"T":case"C":case"S":case"Q":y=t.x,m=t.y;break;case"H":y=t.x;break;case"V":m=t.y}x(y,m,t.pathSegType)}};for(n._svgPathToAbsolute(t),o=t.getTotalLength(),l=[],i=0;i0?this.setFromTileCollision(i):this.setFromTileRectangle(i)}},setFromTileRectangle:function(t){void 0===t&&(t={}),h(t,"isStatic")||(t.isStatic=!0),h(t,"addToWorld")||(t.addToWorld=!0);var e=this.tile.getBounds(),i=e.x+e.width/2,s=e.y+e.height/2,r=n.rectangle(i,s,e.width,e.height,t);return this.setBody(r,t.addToWorld),this},setFromTileCollision:function(t){void 0===t&&(t={}),h(t,"isStatic")||(t.isStatic=!0),h(t,"addToWorld")||(t.addToWorld=!0);for(var e=this.tile.tilemapLayer.scaleX,i=this.tile.tilemapLayer.scaleY,r=this.tile.getLeft(),o=this.tile.getTop(),u=this.tile.getCollisionGroup(),c=a(u,"objects",[]),d=[],f=0;f1&&(t.parts=d,this.setBody(s.create(t),t.addToWorld)),this},setBody:function(t,e){return void 0===e&&(e=!0),this.body&&this.removeBody(),this.body=t,this.body.gameObject=this,e&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0}});t.exports=u},function(t,e,i){var n=i(508);n.Body=i(25),n.Composite=i(68),n.World=i(241),n.Detector=i(148),n.Grid=i(242),n.Pairs=i(243),n.Pair=i(114),n.Query=i(509),n.Resolver=i(244),n.SAT=i(149),n.Constraint=i(78),n.Common=i(19),n.Engine=i(510),n.Events=i(96),n.Sleeping=i(95),n.Plugin=i(240),n.Bodies=i(42),n.Composites=i(233),n.Axes=i(146),n.Bounds=i(38),n.Svg=i(234),n.Vector=i(37),n.Vertices=i(31),n.World.add=n.Composite.add,n.World.remove=n.Composite.remove,n.World.addComposite=n.Composite.addComposite,n.World.addBody=n.Composite.addBody,n.World.addConstraint=n.Composite.addConstraint,n.World.clear=n.Composite.clear,t.exports=n},function(t,e,i){var n={};t.exports=n;var s=i(19);n._registry={},n.register=function(t){if(n.isPlugin(t)||s.warn("Plugin.register:",n.toString(t),"does not implement all required fields."),t.name in n._registry){var e=n._registry[t.name],i=n.versionParse(t.version).number,r=n.versionParse(e.version).number;i>r?(s.warn("Plugin.register:",n.toString(e),"was upgraded to",n.toString(t)),n._registry[t.name]=t):i-1},n.isFor=function(t,e){var i=t.for&&n.dependencyParse(t.for);return!t.for||e.name===i.name&&n.versionSatisfies(e.version,i.range)},n.use=function(t,e){if(t.uses=(t.uses||[]).concat(e||[]),0!==t.uses.length){for(var i=n.dependencies(t),r=s.topologicalSort(i),o=[],a=0;a0&&!h.silent&&s.info(o.join(" "))}else s.warn("Plugin.use:",n.toString(t),"does not specify any dependencies to install.")},n.dependencies=function(t,e){var i=n.dependencyParse(t),r=i.name;if(!(r in(e=e||{}))){t=n.resolve(t)||t,e[r]=s.map(t.uses||[],function(e){n.isPlugin(e)&&n.register(e);var r=n.dependencyParse(e),o=n.resolve(e);return o&&!n.versionSatisfies(o.version,r.range)?(s.warn("Plugin.dependencies:",n.toString(o),"does not satisfy",n.toString(r),"used by",n.toString(i)+"."),o._warned=!0,t._warned=!0):o||(s.warn("Plugin.dependencies:",n.toString(e),"used by",n.toString(i),"could not be resolved."),t._warned=!0),r.name});for(var o=0;o=s[2];if("^"===i.operator)return s[0]>0?o[0]===s[0]&&r.number>=i.number:s[1]>0?o[1]===s[1]&&o[2]>=s[2]:o[2]===s[2]}return t===e||"*"===t}},function(t,e,i){var n={};t.exports=n;var s=i(68),r=(i(78),i(19));n.create=function(t){var e=s.create(),i={label:"World",gravity:{x:0,y:1,scale:.001},bounds:{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}};return r.extend(e,i,t)}},function(t,e,i){var n={};t.exports=n;var s=i(114),r=i(148),o=i(19);n.create=function(t){var e={controller:n,detector:r.collisions,buckets:{},pairs:{},pairsList:[],bucketWidth:48,bucketHeight:48};return o.extend(e,t)},n.update=function(t,e,i,s){var r,o,a,h,l,u=i.world,c=t.buckets,d=!1,f=i.metrics;for(f.broadphaseTests=0,r=0;ru.bounds.max.x||p.bounds.max.yu.bounds.max.y)){var g=n._getRegion(t,p);if(!p.region||g.id!==p.region.id||s){f.broadphaseTests+=1,p.region&&!s||(p.region=g);var v=n._regionUnion(g,p.region);for(o=v.startCol;o<=v.endCol;o++)for(a=v.startRow;a<=v.endRow;a++){h=c[l=n._getBucketId(o,a)];var y=o>=g.startCol&&o<=g.endCol&&a>=g.startRow&&a<=g.endRow,m=o>=p.region.startCol&&o<=p.region.endCol&&a>=p.region.startRow&&a<=p.region.endRow;!y&&m&&m&&h&&n._bucketRemoveBody(t,h,p),(p.region===g||y&&!m||s)&&(h||(h=n._createBucket(c,l)),n._bucketAddBody(t,h,p))}p.region=g,d=!0}}}d&&(t.pairsList=n._createActivePairsList(t))},n.clear=function(t){t.buckets={},t.pairs={},t.pairsList=[]},n._regionUnion=function(t,e){var i=Math.min(t.startCol,e.startCol),s=Math.max(t.endCol,e.endCol),r=Math.min(t.startRow,e.startRow),o=Math.max(t.endRow,e.endRow);return n._createRegion(i,s,r,o)},n._getRegion=function(t,e){var i=e.bounds,s=Math.floor(i.min.x/t.bucketWidth),r=Math.floor(i.max.x/t.bucketWidth),o=Math.floor(i.min.y/t.bucketHeight),a=Math.floor(i.max.y/t.bucketHeight);return n._createRegion(s,r,o,a)},n._createRegion=function(t,e,i,n){return{id:t+","+e+","+i+","+n,startCol:t,endCol:e,startRow:i,endRow:n}},n._getBucketId=function(t,e){return"C"+t+"R"+e},n._createBucket=function(t,e){return t[e]=[]},n._bucketAddBody=function(t,e,i){for(var n=0;n0?n.push(i):delete t.pairs[e[s]];return n}},function(t,e,i){var n={};t.exports=n;var s=i(114),r=i(19);n._pairMaxIdleLife=1e3,n.create=function(t){return r.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},t)},n.update=function(t,e,i){var n,r,o,a,h=t.list,l=t.table,u=t.collisionStart,c=t.collisionEnd,d=t.collisionActive;for(u.length=0,c.length=0,d.length=0,a=0;an._pairMaxIdleLife&&l.push(o);for(o=0;of.friction*f.frictionStatic*k*i&&(I=R,F=o.clamp(f.friction*L*i,-I,I));var B=r.cross(S,y),N=r.cross(A,y),Y=T/(g.inverseMass+v.inverseMass+g.inverseInertia*B*B+v.inverseInertia*N*N);if(D*=Y,F*=Y,P<0&&P*P>n._restingThresh*i)b.normalImpulse=0;else{var X=b.normalImpulse;b.normalImpulse=Math.min(b.normalImpulse+D,0),D=b.normalImpulse-X}if(O*O>n._restingThreshTangent*i)b.tangentImpulse=0;else{var z=b.tangentImpulse;b.tangentImpulse=o.clamp(b.tangentImpulse+F,-I,I),F=b.tangentImpulse-z}s.x=y.x*D+m.x*F,s.y=y.y*D+m.y*F,g.isStatic||g.isSleeping||(g.positionPrev.x+=s.x*g.inverseMass,g.positionPrev.y+=s.y*g.inverseMass,g.anglePrev+=r.cross(S,s)*g.inverseInertia),v.isStatic||v.isSleeping||(v.positionPrev.x-=s.x*v.inverseMass,v.positionPrev.y-=s.y*v.inverseMass,v.anglePrev-=r.cross(A,s)*v.inverseInertia)}}}}},function(t,e,i){var n=i(151);t.exports=function(t,e,i){var s=n(t,e,!0,i),r=n(t,e-1,!0,i),o=n(t,e+1,!0,i),a=n(t-1,e,!0,i),h=n(t+1,e,!0,i),l=s&&s.collides;return l&&(s.faceTop=!0,s.faceBottom=!0,s.faceLeft=!0,s.faceRight=!0),r&&r.collides&&(l&&(s.faceTop=!1),r.faceBottom=!l),o&&o.collides&&(l&&(s.faceBottom=!1),o.faceTop=!l),a&&a.collides&&(l&&(s.faceLeft=!1),a.faceRight=!l),h&&h.collides&&(l&&(s.faceRight=!1),h.faceLeft=!l),s&&!s.collides&&s.resetFaces(),s}},function(t,e,i){var n=i(80),s=i(115),r=i(245),o=i(79);t.exports=function(t,e,i,a,h){if(!s(e,i,h))return null;void 0===a&&(a=!0);var l=h.data[i][e],u=l&&l.collides;if(t instanceof n)null===h.data[i][e]&&(h.data[i][e]=new n(h,t.index,e,i,t.width,t.height)),h.data[i][e].copy(t);else{var c=t;null===h.data[i][e]?h.data[i][e]=new n(h,c,e,i,h.tileWidth,h.tileHeight):h.data[i][e].index=c}var d=h.data[i][e],f=-1!==h.collideIndexes.indexOf(d.index);return o(d,f),a&&u!==d.collides&&r(e,i,h),d}},function(t,e){t.exports=function(t,e,i){var n=i.collideIndexes.indexOf(t);e&&-1===n?i.collideIndexes.push(t):e||-1===n||i.collideIndexes.splice(n,1)}},function(t,e,i){var n=i(34),s=i(116),r=i(117),o=i(80);t.exports=function(t,e,i,a,h){for(var l=new s({tileWidth:i,tileHeight:a}),u=new r({name:t,tileWidth:i,tileHeight:a,format:n.ARRAY_2D,layers:[l]}),c=[],d=e.length,f=0,p=0;p0&&(s.totalDuration+=s.t2*s.repeat),s.totalDuration>t&&(t=s.totalDuration),s.delay0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay,this.startDelay=e},init:function(){if(this.paused&&!this.parentIsTimeline)return this.state=h.PENDING_ADD,this._pausedState=h.INIT,!1;for(var t=this.data,e=this.totalTargets,i=0;i0?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=h.LOOP_DELAY):(this.state=h.ACTIVE,this.dispatchTweenEvent(r.TWEEN_LOOP,this.callbacks.onLoop))):this.completeDelay>0?(this.state=h.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=h.PENDING_REMOVE,this.dispatchTweenEvent(r.TWEEN_COMPLETE,this.callbacks.onComplete))},pause:function(){return this.state===h.PAUSED?this:(this.paused=!0,this._pausedState=this.state,this.state=h.PAUSED,this)},play:function(t){void 0===t&&(t=!1);var e=this.state;return e!==h.INIT||this.parentIsTimeline?e===h.ACTIVE||e===h.PENDING_ADD&&this._pausedState===h.PENDING_ADD?this:this.parentIsTimeline||e!==h.PENDING_REMOVE&&e!==h.REMOVED?(this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?this.state=h.ACTIVE:(this.countdown=this.calculatedOffset,this.state=h.OFFSET_DELAY)):this.paused?(this.paused=!1,this.makeActive()):(this.resetTweenData(t),this.state=h.ACTIVE,this.makeActive()),this):(this.seek(0),this.parent.makeActive(this),this):(this.resetTweenData(!1),this.state=h.ACTIVE,this)},resetTweenData:function(t){for(var e=this.data,i=this.totalData,n=this.totalTargets,s=0;s0&&(r.elapsed=r.delay,r.state=h.DELAY),r.getActiveValue&&(o[a]=r.getActiveValue(r.target,r.key,r.start))}},resume:function(){return this.state===h.PAUSED?(this.paused=!1,this.state=this._pausedState):this.play(),this},seek:function(t,e){if(void 0===e&&(e=16.6),this.totalDuration>=36e5)return console.warn("Tween.seek duration too long"),this;this.state===h.REMOVED&&this.makeActive(),this.elapsed=0,this.progress=0,this.totalElapsed=0,this.totalProgress=0;for(var i=this.data,n=this.totalTargets,s=0;s0&&(r.elapsed=r.delay,r.state=h.DELAY)}this.calcDuration();var c=!1;this.state===h.PAUSED&&(c=!0,this.state=h.ACTIVE),this.isSeeking=!0;do{this.update(0,e)}while(this.totalProgress0?(e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY(),e.start=e.getStartValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.end=e.getEndValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,h.REPEAT_DELAY):(this.dispatchTweenDataEvent(r.TWEEN_REPEAT,t.callbacks.onRepeat,e),h.PLAYING_FORWARD)):h.COMPLETE},setStateFromStart:function(t,e,i){return e.repeatCounter>0?(e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY(),e.end=e.getEndValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,h.REPEAT_DELAY):(this.dispatchTweenDataEvent(r.TWEEN_REPEAT,t.callbacks.onRepeat,e),h.PLAYING_FORWARD)):h.COMPLETE},updateTweenData:function(t,e,i){var n=e.target;switch(e.state){case h.PLAYING_FORWARD:case h.PLAYING_BACKWARD:if(!n){e.state=h.COMPLETE;break}var s=e.elapsed,o=e.duration,a=0;(s+=i)>o&&(a=s-o,s=o);var l=e.state===h.PLAYING_FORWARD,u=s/o;if(e.elapsed=s,e.progress=u,e.previous=e.current,1===u)l?(e.current=e.end,n[e.key]=e.end,e.hold>0?(e.elapsed=e.hold-a,e.state=h.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,a)):(e.current=e.start,n[e.key]=e.start,e.state=this.setStateFromStart(t,e,a));else{var c=l?e.ease(u):e.ease(1-u);e.current=e.start+(e.end-e.start)*c,n[e.key]=e.current}this.dispatchTweenDataEvent(r.TWEEN_UPDATE,t.callbacks.onUpdate,e);break;case h.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=h.PENDING_RENDER);break;case h.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=h.PLAYING_FORWARD,this.dispatchTweenDataEvent(r.TWEEN_REPEAT,t.callbacks.onRepeat,e));break;case h.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case h.PENDING_RENDER:n?(e.start=e.getStartValue(n,e.key,n[e.key],e.index,t.totalTargets,t),e.end=e.getEndValue(n,e.key,e.start,e.index,t.totalTargets,t),e.current=e.start,n[e.key]=e.start,e.state=h.PLAYING_FORWARD):e.state=h.COMPLETE}return e.state!==h.COMPLETE}});u.TYPES=["onActive","onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],a.register("tween",function(t){return this.scene.sys.tweens.add(t)}),o.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=u},function(t,e,i){t.exports={TIMELINE_COMPLETE:i(1434),TIMELINE_LOOP:i(1435),TIMELINE_PAUSE:i(1436),TIMELINE_RESUME:i(1437),TIMELINE_START:i(1438),TIMELINE_UPDATE:i(1439),TWEEN_ACTIVE:i(1440),TWEEN_COMPLETE:i(1441),TWEEN_LOOP:i(1442),TWEEN_REPEAT:i(1443),TWEEN_START:i(1444),TWEEN_UPDATE:i(1445),TWEEN_YOYO:i(1446)}},function(t,e){t.exports=function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p){return{target:t,index:e,key:i,getActiveValue:r,getEndValue:n,getStartValue:s,ease:o,duration:0,totalDuration:0,delay:0,yoyo:l,hold:0,repeat:0,repeatDelay:0,flipX:f,flipY:p,progress:0,elapsed:0,repeatCounter:0,start:0,previous:0,current:0,end:0,t1:0,t2:0,gen:{delay:a,duration:h,hold:u,repeat:c,repeatDelay:d},state:0}}},function(t,e,i){t.exports={AlignTo:i(553),Angle:i(554),Call:i(555),GetFirst:i(556),GetLast:i(557),GridAlign:i(558),IncAlpha:i(619),IncX:i(620),IncXY:i(621),IncY:i(622),PlaceOnCircle:i(623),PlaceOnEllipse:i(624),PlaceOnLine:i(625),PlaceOnRectangle:i(626),PlaceOnTriangle:i(627),PlayAnimation:i(628),PropertyValueInc:i(39),PropertyValueSet:i(27),RandomCircle:i(629),RandomEllipse:i(630),RandomLine:i(631),RandomRectangle:i(632),RandomTriangle:i(633),Rotate:i(634),RotateAround:i(635),RotateAroundDistance:i(636),ScaleX:i(637),ScaleXY:i(638),ScaleY:i(639),SetAlpha:i(640),SetBlendMode:i(641),SetDepth:i(642),SetHitArea:i(643),SetOrigin:i(644),SetRotation:i(645),SetScale:i(646),SetScaleX:i(647),SetScaleY:i(648),SetScrollFactor:i(649),SetScrollFactorX:i(650),SetScrollFactorY:i(651),SetTint:i(652),SetVisible:i(653),SetX:i(654),SetXY:i(655),SetY:i(656),ShiftPosition:i(657),Shuffle:i(658),SmootherStep:i(659),SmoothStep:i(660),Spread:i(661),ToggleVisible:i(662),WrapInRectangle:i(663)}},function(t,e,i){var n=i(97),s=[];s[n.BOTTOM_CENTER]=i(261),s[n.BOTTOM_LEFT]=i(262),s[n.BOTTOM_RIGHT]=i(263),s[n.LEFT_BOTTOM]=i(264),s[n.LEFT_CENTER]=i(265),s[n.LEFT_TOP]=i(266),s[n.RIGHT_BOTTOM]=i(267),s[n.RIGHT_CENTER]=i(268),s[n.RIGHT_TOP]=i(269),s[n.TOP_CENTER]=i(270),s[n.TOP_LEFT]=i(271),s[n.TOP_RIGHT]=i(272);t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e,i){var n=i(44),s=i(81),r=i(82),o=i(45);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)+i),o(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(46),r=i(47),o=i(45);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)-i),o(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(48),r=i(49),o=i(45);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)+i),o(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(46),r=i(50),o=i(49);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(83),s=i(46),r=i(84),o=i(49);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(46),s=i(51),r=i(49),o=i(45);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)-a),t}},function(t,e,i){var n=i(44),s=i(48),r=i(50),o=i(47);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(83),s=i(48),r=i(84),o=i(47);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(48),s=i(51),r=i(47),o=i(45);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(81),s=i(51),r=i(50),o=i(82);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)-a),t}},function(t,e,i){var n=i(46),s=i(51),r=i(50),o=i(47);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)-i),r(t,s(e)-a),t}},function(t,e,i){var n=i(48),s=i(51),r=i(50),o=i(49);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)-a),t}},function(t,e,i){var n=i(97),s=[];s[n.BOTTOM_CENTER]=i(274),s[n.BOTTOM_LEFT]=i(275),s[n.BOTTOM_RIGHT]=i(276),s[n.CENTER]=i(277),s[n.LEFT_CENTER]=i(279),s[n.RIGHT_CENTER]=i(280),s[n.TOP_CENTER]=i(281),s[n.TOP_LEFT]=i(282),s[n.TOP_RIGHT]=i(283),s[n.LEFT_BOTTOM]=s[n.BOTTOM_LEFT],s[n.LEFT_TOP]=s[n.TOP_LEFT],s[n.RIGHT_BOTTOM]=s[n.BOTTOM_RIGHT],s[n.RIGHT_TOP]=s[n.TOP_RIGHT];t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e,i){var n=i(44),s=i(81),r=i(50),o=i(82);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(46),r=i(50),o=i(47);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(48),r=i(50),o=i(49);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(278),s=i(81),r=i(83);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)+i,r(e)+o),t}},function(t,e,i){var n=i(82),s=i(84);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var n=i(83),s=i(46),r=i(84),o=i(47);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(83),s=i(48),r=i(84),o=i(49);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(81),s=i(51),r=i(82),o=i(45);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(46),s=i(51),r=i(47),o=i(45);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)-a),t}},function(t,e,i){var n=i(48),s=i(51),r=i(49),o=i(45);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(158),s=i(98),r=i(13),o=i(4);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=s(e,0,r.PI2);return n(t,a,i)}},function(t,e,i){var n=i(286),s=i(158),r=i(98),o=i(13);t.exports=function(t,e,i,a){void 0===a&&(a=[]),e||(e=n(t)/i);for(var h=0;h=this.nextTick&&this.currentAnim.setFrame(this)}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.isCropped&&e.frame.updateCropUVs(e._crop,e.flipX,e.flipY),e.setSizeToFrame(),t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin(),e},updateFrame:function(t){var e=this.setCurrentFrame(t);if(this.isPlaying){t.setAlpha&&(e.alpha=t.alpha);var i=this.currentAnim;e.emit(r.SPRITE_ANIMATION_KEY_UPDATE+i.key,i,t,e),e.emit(r.SPRITE_ANIMATION_UPDATE,i,t,e),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this)}},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off(r.REMOVE_ANIMATION,this.remove,this),this.animationManager=null,this.parent=null,this.currentAnim=null,this.currentFrame=null}});t.exports=o},function(t,e){t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var n,s,r=1;if(i){if(te.length&&(r=e.length),i?(n=e[r-1][i],(s=e[r][i])-t<=t-n?e[r]:e[r-1]):(n=e[r-1],(s=e[r])-t<=t-n?s:n)}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=n,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0}});t.exports=n},function(t,e,i){var n=i(43),s={_blendMode:n.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=n[t]),(t|=0)>=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e,i){var n=i(161),s=i(120);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=s(t)/i);for(var o=0;o=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n-h&&(c-=h,n+=l),fd.right&&(f=u(f,f+(g-d.right),this.lerp.x)),vd.bottom&&(p=u(p,p+(v-d.bottom),this.lerp.y))):(f=u(f,g-h,this.lerp.x),p=u(p,v-l,this.lerp.y))}this.useBounds&&(f=this.clampX(f),p=this.clampY(p)),this.roundPixels&&(h=Math.round(h),l=Math.round(l)),this.scrollX=f,this.scrollY=p;var y=f+n,m=p+s;this.midPoint.set(y,m);var x=e/o,T=i/o;this.worldView.setTo(y-x/2,m-T/2,x,T),a.applyITRS(this.x+h,this.y+l,this.rotation,o,o),a.translate(-h,-l),this.shakeEffect.preRender()},setLerp:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.lerp.set(t,e),this},setFollowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.followOffset.set(t,e),this},startFollow:function(t,e,i,n,s,r){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===s&&(s=0),void 0===r&&(r=s),this._follow=t,this.roundPixels=e,i=o(i,0,1),n=o(n,0,1),this.lerp.set(i,n),this.followOffset.set(s,r);var a=this.width/2,h=this.height/2,l=t.x-s,u=t.y-r;return this.midPoint.set(l,u),this.scrollX=l-a,this.scrollY=u-h,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.visible&&(this.panEffect.update(t,e),this.zoomEffect.update(t,e),this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e))},destroy:function(){this.clearRenderToTexture(),this.resetFX(),n.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=f},function(t,e,i){var n=i(36);t.exports=function(t){var e=new n;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var s=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16);e.setTo(s,r,o)}return e}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e){t.exports=function(t,e,i,n){void 0===n&&(n={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var s=Math.min(t,e,i),r=Math.max(t,e,i),o=r-s,a=0,h=0===r?0:o/r,l=r;return r!==s&&(r===t?a=(e-i)/o+(e16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},function(t,e,i){var n=i(36);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var n=i(36);t.exports=function(t){var e=new n,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var s=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(s,r,o,255*a)}return e}},function(t,e,i){t.exports={Fade:i(688),Flash:i(689),Pan:i(690),Shake:i(723),Zoom:i(724)}},function(t,e,i){t.exports={In:i(691),Out:i(692),InOut:i(693)}},function(t,e,i){t.exports={In:i(694),Out:i(695),InOut:i(696)}},function(t,e,i){t.exports={In:i(697),Out:i(698),InOut:i(699)}},function(t,e,i){t.exports={In:i(700),Out:i(701),InOut:i(702)}},function(t,e,i){t.exports={In:i(703),Out:i(704),InOut:i(705)}},function(t,e,i){t.exports={In:i(706),Out:i(707),InOut:i(708)}},function(t,e,i){t.exports=i(709)},function(t,e,i){t.exports={In:i(710),Out:i(711),InOut:i(712)}},function(t,e,i){t.exports={In:i(713),Out:i(714),InOut:i(715)}},function(t,e,i){t.exports={In:i(716),Out:i(717),InOut:i(718)}},function(t,e,i){t.exports={In:i(719),Out:i(720),InOut:i(721)}},function(t,e,i){t.exports=i(722)},function(t,e,i){var n=i(0),s=i(32),r=i(334),o=i(1),a=i(5),h=i(7),l=i(181),u=i(2),c=i(186),d=i(174),f=new n({initialize:function(t){void 0===t&&(t={});this.width=a(t,"width",1024),this.height=a(t,"height",768),this.zoom=a(t,"zoom",1),this.resolution=a(t,"resolution",1),this.parent=a(t,"parent",void 0),this.scaleMode=a(t,"scaleMode",0),this.expandParent=a(t,"expandParent",!0),this.autoRound=a(t,"autoRound",!1),this.autoCenter=a(t,"autoCenter",0),this.resizeInterval=a(t,"resizeInterval",500),this.fullscreenTarget=a(t,"fullscreenTarget",null),this.minWidth=a(t,"minWidth",0),this.maxWidth=a(t,"maxWidth",0),this.minHeight=a(t,"minHeight",0),this.maxHeight=a(t,"maxHeight",0);var e=a(t,"scale",null);e&&(this.width=a(e,"width",this.width),this.height=a(e,"height",this.height),this.zoom=a(e,"zoom",this.zoom),this.resolution=a(e,"resolution",this.resolution),this.parent=a(e,"parent",this.parent),this.scaleMode=a(e,"mode",this.scaleMode),this.expandParent=a(e,"expandParent",this.expandParent),this.autoRound=a(e,"autoRound",this.autoRound),this.autoCenter=a(e,"autoCenter",this.autoCenter),this.resizeInterval=a(e,"resizeInterval",this.resizeInterval),this.fullscreenTarget=a(e,"fullscreenTarget",this.fullscreenTarget),this.minWidth=a(e,"min.width",this.minWidth),this.maxWidth=a(e,"max.width",this.maxWidth),this.minHeight=a(e,"min.height",this.minHeight),this.maxHeight=a(e,"max.height",this.maxHeight)),this.renderType=a(t,"type",s.AUTO),this.canvas=a(t,"canvas",null),this.context=a(t,"context",null),this.canvasStyle=a(t,"canvasStyle",null),this.customEnvironment=a(t,"customEnvironment",!1),this.sceneConfig=a(t,"scene",null),this.seed=a(t,"seed",[(Date.now()*Math.random()).toString()]),l.RND=new l.RandomDataGenerator(this.seed),this.gameTitle=a(t,"title",""),this.gameURL=a(t,"url","https://phaser.io"),this.gameVersion=a(t,"version",""),this.autoFocus=a(t,"autoFocus",!0),this.domCreateContainer=a(t,"dom.createContainer",!1),this.domBehindCanvas=a(t,"dom.behindCanvas",!1),this.inputKeyboard=a(t,"input.keyboard",!0),this.inputKeyboardEventTarget=a(t,"input.keyboard.target",window),this.inputKeyboardCapture=a(t,"input.keyboard.capture",[]),this.inputMouse=a(t,"input.mouse",!0),this.inputMouseEventTarget=a(t,"input.mouse.target",null),this.inputMouseCapture=a(t,"input.mouse.capture",!0),this.inputTouch=a(t,"input.touch",r.input.touch),this.inputTouchEventTarget=a(t,"input.touch.target",null),this.inputTouchCapture=a(t,"input.touch.capture",!0),this.inputActivePointers=a(t,"input.activePointers",1),this.inputSmoothFactor=a(t,"input.smoothFactor",0),this.inputWindowEvents=a(t,"input.windowEvents",!0),this.inputGamepad=a(t,"input.gamepad",!1),this.inputGamepadEventTarget=a(t,"input.gamepad.target",window),this.disableContextMenu=a(t,"disableContextMenu",!1),this.audio=a(t,"audio"),this.hideBanner=!1===a(t,"banner",null),this.hidePhaser=a(t,"banner.hidePhaser",!1),this.bannerTextColor=a(t,"banner.text","#ffffff"),this.bannerBackgroundColor=a(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=a(t,"fps",null);var i=a(t,"render",t);this.antialias=a(i,"antialias",!0),this.antialiasGL=a(i,"antialiasGL",!0),this.mipmapFilter=a(i,"mipmapFilter","LINEAR"),this.desynchronized=a(i,"desynchronized",!1),this.roundPixels=a(i,"roundPixels",!1),this.pixelArt=a(i,"pixelArt",1!==this.zoom),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=a(i,"transparent",!1),this.clearBeforeRender=a(i,"clearBeforeRender",!0),this.premultipliedAlpha=a(i,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=a(i,"failIfMajorPerformanceCaveat",!1),this.powerPreference=a(i,"powerPreference","default"),this.batchSize=a(i,"batchSize",2e3),this.maxLights=a(i,"maxLights",10);var n=a(t,"backgroundColor",0);this.backgroundColor=d(n),0===n&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=a(t,"callbacks.preBoot",u),this.postBoot=a(t,"callbacks.postBoot",u),this.physics=a(t,"physics",{}),this.defaultPhysicsSystem=a(this.physics,"default",!1),this.loaderBaseURL=a(t,"loader.baseURL",""),this.loaderPath=a(t,"loader.path",""),this.loaderMaxParallelDownloads=a(t,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=a(t,"loader.crossOrigin",void 0),this.loaderResponseType=a(t,"loader.responseType",""),this.loaderAsync=a(t,"loader.async",!0),this.loaderUser=a(t,"loader.user",""),this.loaderPassword=a(t,"loader.password",""),this.loaderTimeout=a(t,"loader.timeout",0),this.installGlobalPlugins=[],this.installScenePlugins=[];var f=a(t,"plugins",null),p=c.DefaultScene;f&&(Array.isArray(f)?this.defaultPlugins=f:h(f)&&(this.installGlobalPlugins=o(f,"global",[]),this.installScenePlugins=o(f,"scene",[]),Array.isArray(f.default)?p=f.default:Array.isArray(f.defaultMerge)&&(p=p.concat(f.defaultMerge)))),this.defaultPlugins=p;var g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=a(t,"images.default",g+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=a(t,"images.missing",g+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),window&&(window.FORCE_WEBGL?this.renderType=s.WEBGL:window.FORCE_CANVAS&&(this.renderType=s.CANVAS))}});t.exports=f},function(t,e,i){t.exports={os:i(124),browser:i(125),features:i(180),input:i(753),audio:i(754),video:i(755),fullscreen:i(756),canvasFeatures:i(335)}},function(t,e,i){var n,s,r,o=i(28),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create(t,6,1).getContext("2d");if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return s*s+r*r}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t0?Math.ceil(t):Math.floor(t)}},function(t,e,i){var n=i(3);t.exports=function(t,e,i,s,r,o,a,h){void 0===h&&(h=new n);var l=Math.sin(r),u=Math.cos(r),c=u*o,d=l*o,f=-l*a,p=u*a,g=1/(c*p+f*-d);return h.x=p*g*t+-f*g*e+(s*f-i*p)*g,h.y=c*g*e+-d*g*t+(-s*c+i*d)*g,h}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},clone:function(){return new n(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return e*e+i*i+n*n+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12]*s,this.y=r[1]*e+r[5]*i+r[9]*n+r[13]*s,this.z=r[2]*e+r[6]*i+r[10]*n+r[14]*s,this.w=r[3]*e+r[7]*i+r[11]*n+r[15]*s,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*r-o*h,c=-l*s+o*a,d=h*s-r*a,f=e*u+i*c+n*d;return f?(f=1/f,t[0]=u*f,t[1]=(-l*i+n*h)*f,t[2]=(o*i-n*r)*f,t[3]=c*f,t[4]=(l*e-n*a)*f,t[5]=(-o*e+n*s)*f,t[6]=d*f,t[7]=(-h*e+i*a)*f,t[8]=(r*e-i*s)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=r*l-o*h,t[1]=n*h-i*l,t[2]=i*o-n*r,t[3]=o*a-s*l,t[4]=e*l-n*a,t[5]=n*s-e*o,t[6]=s*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*s,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*(l*r-o*h)+i*(-l*s+o*a)+n*(h*s-r*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],y=c[5],m=c[6],x=c[7],T=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*n+f*o+p*l,e[2]=d*s+f*a+p*u,e[3]=g*i+v*r+y*h,e[4]=g*n+v*o+y*l,e[5]=g*s+v*a+y*u,e[6]=m*i+x*r+T*h,e[7]=m*n+x*o+T*l,e[8]=m*s+x*a+T*u,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*r,e[1]=l*n+h*o,e[2]=l*s+h*a,e[3]=l*r-h*i,e[4]=l*o-h*n,e[5]=l*a-h*s,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,o=i+i,a=n+n,h=e*r,l=e*o,u=e*a,c=i*o,d=i*a,f=n*a,p=s*r,g=s*o,v=s*a,y=this.val;return y[0]=1-(c+f),y[3]=l+v,y[6]=u-g,y[1]=l-v,y[4]=1-(h+f),y[7]=d+p,y[2]=u+g,y[5]=d-p,y[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],v=e[13],y=e[14],m=e[15],x=n*h-s*a,T=n*l-r*a,w=n*u-o*a,b=s*l-r*h,E=s*u-o*h,S=r*u-o*l,A=c*v-d*g,_=c*y-f*g,C=c*m-p*g,M=d*y-f*v,P=d*m-p*v,O=f*m-p*y,R=x*O-T*P+w*M+b*C-E*_+S*A;return R?(R=1/R,i[0]=(h*O-l*P+u*M)*R,i[1]=(l*C-a*O-u*_)*R,i[2]=(a*P-h*C+u*A)*R,i[3]=(r*P-s*O-o*M)*R,i[4]=(n*O-r*C+o*_)*R,i[5]=(s*C-n*P-o*A)*R,i[6]=(v*S-y*E+m*b)*R,i[7]=(y*w-g*S-m*T)*R,i[8]=(g*E-v*w+m*x)*R,this):null}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this},zero:function(){var t=this.val;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=0,this},xyz:function(t,e,i){this.identity();var n=this.val;return n[12]=t,n[13]=e,n[14]=i,this},scaling:function(t,e,i){this.zero();var n=this.val;return n[0]=t,n[5]=e,n[10]=i,n[15]=1,this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[3],s=t[6],r=t[7],o=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=s,t[11]=t[14],t[12]=n,t[13]=r,t[14]=o,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15],y=e*o-i*r,m=e*a-n*r,x=e*h-s*r,T=i*a-n*o,w=i*h-s*o,b=n*h-s*a,E=l*p-u*f,S=l*g-c*f,A=l*v-d*f,_=u*g-c*p,C=u*v-d*p,M=c*v-d*g,P=y*M-m*C+x*_+T*A-w*S+b*E;return P?(P=1/P,t[0]=(o*M-a*C+h*_)*P,t[1]=(n*C-i*M-s*_)*P,t[2]=(p*b-g*w+v*T)*P,t[3]=(c*w-u*b-d*T)*P,t[4]=(a*A-r*M-h*S)*P,t[5]=(e*M-n*A+s*S)*P,t[6]=(g*x-f*b-v*m)*P,t[7]=(l*b-c*x+d*m)*P,t[8]=(r*C-o*A+h*E)*P,t[9]=(i*A-e*C-s*E)*P,t[10]=(f*w-p*x+v*y)*P,t[11]=(u*x-l*w-d*y)*P,t[12]=(o*S-r*_-a*E)*P,t[13]=(e*_-i*S+n*E)*P,t[14]=(p*m-f*T-g*y)*P,t[15]=(l*T-u*m+c*y)*P,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return t[0]=o*(c*v-d*g)-u*(a*v-h*g)+p*(a*d-h*c),t[1]=-(i*(c*v-d*g)-u*(n*v-s*g)+p*(n*d-s*c)),t[2]=i*(a*v-h*g)-o*(n*v-s*g)+p*(n*h-s*a),t[3]=-(i*(a*d-h*c)-o*(n*d-s*c)+u*(n*h-s*a)),t[4]=-(r*(c*v-d*g)-l*(a*v-h*g)+f*(a*d-h*c)),t[5]=e*(c*v-d*g)-l*(n*v-s*g)+f*(n*d-s*c),t[6]=-(e*(a*v-h*g)-r*(n*v-s*g)+f*(n*h-s*a)),t[7]=e*(a*d-h*c)-r*(n*d-s*c)+l*(n*h-s*a),t[8]=r*(u*v-d*p)-l*(o*v-h*p)+f*(o*d-h*u),t[9]=-(e*(u*v-d*p)-l*(i*v-s*p)+f*(i*d-s*u)),t[10]=e*(o*v-h*p)-r*(i*v-s*p)+f*(i*h-s*o),t[11]=-(e*(o*d-h*u)-r*(i*d-s*u)+l*(i*h-s*o)),t[12]=-(r*(u*g-c*p)-l*(o*g-a*p)+f*(o*c-a*u)),t[13]=e*(u*g-c*p)-l*(i*g-n*p)+f*(i*c-n*u),t[14]=-(e*(o*g-a*p)-r*(i*g-n*p)+f*(i*a-n*o)),t[15]=e*(o*c-a*u)-r*(i*c-n*u)+l*(i*a-n*o),this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return(e*o-i*r)*(c*v-d*g)-(e*a-n*r)*(u*v-d*p)+(e*h-s*r)*(u*g-c*p)+(i*a-n*o)*(l*v-d*f)-(i*h-s*o)*(l*g-c*f)+(n*h-s*a)*(l*p-u*f)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=e[9],d=e[10],f=e[11],p=e[12],g=e[13],v=e[14],y=e[15],m=t.val,x=m[0],T=m[1],w=m[2],b=m[3];return e[0]=x*i+T*o+w*u+b*p,e[1]=x*n+T*a+w*c+b*g,e[2]=x*s+T*h+w*d+b*v,e[3]=x*r+T*l+w*f+b*y,x=m[4],T=m[5],w=m[6],b=m[7],e[4]=x*i+T*o+w*u+b*p,e[5]=x*n+T*a+w*c+b*g,e[6]=x*s+T*h+w*d+b*v,e[7]=x*r+T*l+w*f+b*y,x=m[8],T=m[9],w=m[10],b=m[11],e[8]=x*i+T*o+w*u+b*p,e[9]=x*n+T*a+w*c+b*g,e[10]=x*s+T*h+w*d+b*v,e[11]=x*r+T*l+w*f+b*y,x=m[12],T=m[13],w=m[14],b=m[15],e[12]=x*i+T*o+w*u+b*p,e[13]=x*n+T*a+w*c+b*g,e[14]=x*s+T*h+w*d+b*v,e[15]=x*r+T*l+w*f+b*y,this},multiplyLocal:function(t){var e=[],i=this.val,n=t.val;return e[0]=i[0]*n[0]+i[1]*n[4]+i[2]*n[8]+i[3]*n[12],e[1]=i[0]*n[1]+i[1]*n[5]+i[2]*n[9]+i[3]*n[13],e[2]=i[0]*n[2]+i[1]*n[6]+i[2]*n[10]+i[3]*n[14],e[3]=i[0]*n[3]+i[1]*n[7]+i[2]*n[11]+i[3]*n[15],e[4]=i[4]*n[0]+i[5]*n[4]+i[6]*n[8]+i[7]*n[12],e[5]=i[4]*n[1]+i[5]*n[5]+i[6]*n[9]+i[7]*n[13],e[6]=i[4]*n[2]+i[5]*n[6]+i[6]*n[10]+i[7]*n[14],e[7]=i[4]*n[3]+i[5]*n[7]+i[6]*n[11]+i[7]*n[15],e[8]=i[8]*n[0]+i[9]*n[4]+i[10]*n[8]+i[11]*n[12],e[9]=i[8]*n[1]+i[9]*n[5]+i[10]*n[9]+i[11]*n[13],e[10]=i[8]*n[2]+i[9]*n[6]+i[10]*n[10]+i[11]*n[14],e[11]=i[8]*n[3]+i[9]*n[7]+i[10]*n[11]+i[11]*n[15],e[12]=i[12]*n[0]+i[13]*n[4]+i[14]*n[8]+i[15]*n[12],e[13]=i[12]*n[1]+i[13]*n[5]+i[14]*n[9]+i[15]*n[13],e[14]=i[12]*n[2]+i[13]*n[6]+i[14]*n[10]+i[15]*n[14],e[15]=i[12]*n[3]+i[13]*n[7]+i[14]*n[11]+i[15]*n[15],this.fromArray(e)},translate:function(t){var e=t.x,i=t.y,n=t.z,s=this.val;return s[12]=s[0]*e+s[4]*i+s[8]*n+s[12],s[13]=s[1]*e+s[5]*i+s[9]*n+s[13],s[14]=s[2]*e+s[6]*i+s[10]*n+s[14],s[15]=s[3]*e+s[7]*i+s[11]*n+s[15],this},translateXYZ:function(t,e,i){var n=this.val;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this},scale:function(t){var e=t.x,i=t.y,n=t.z,s=this.val;return s[0]=s[0]*e,s[1]=s[1]*e,s[2]=s[2]*e,s[3]=s[3]*e,s[4]=s[4]*i,s[5]=s[5]*i,s[6]=s[6]*i,s[7]=s[7]*i,s[8]=s[8]*n,s[9]=s[9]*n,s[10]=s[10]*n,s[11]=s[11]*n,this},scaleXYZ:function(t,e,i){var n=this.val;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),s=1-i,r=t.x,o=t.y,a=t.z,h=s*r,l=s*o;return this.fromArray([h*r+i,h*o-n*a,h*a+n*o,0,h*o+n*a,l*o+i,l*a-n*r,0,h*a-n*o,l*a+n*r,s*a*a+i,0,0,0,0,1]),this},rotate:function(t,e){var i=this.val,n=e.x,s=e.y,r=e.z,o=Math.sqrt(n*n+s*s+r*r);if(Math.abs(o)<1e-6)return null;n*=o=1/o,s*=o,r*=o;var a=Math.sin(t),h=Math.cos(t),l=1-h,u=i[0],c=i[1],d=i[2],f=i[3],p=i[4],g=i[5],v=i[6],y=i[7],m=i[8],x=i[9],T=i[10],w=i[11],b=n*n*l+h,E=s*n*l+r*a,S=r*n*l-s*a,A=n*s*l-r*a,_=s*s*l+h,C=r*s*l+n*a,M=n*r*l+s*a,P=s*r*l-n*a,O=r*r*l+h;return i[0]=u*b+p*E+m*S,i[1]=c*b+g*E+x*S,i[2]=d*b+v*E+T*S,i[3]=f*b+y*E+w*S,i[4]=u*A+p*_+m*C,i[5]=c*A+g*_+x*C,i[6]=d*A+v*_+T*C,i[7]=f*A+y*_+w*C,i[8]=u*M+p*P+m*O,i[9]=c*M+g*P+x*O,i[10]=d*M+v*P+T*O,i[11]=f*M+y*P+w*O,this},rotateX:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this},rotateY:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this},rotateZ:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this},fromRotationTranslation:function(t,e){var i=this.val,n=t.x,s=t.y,r=t.z,o=t.w,a=n+n,h=s+s,l=r+r,u=n*a,c=n*h,d=n*l,f=s*h,p=s*l,g=r*l,v=o*a,y=o*h,m=o*l;return i[0]=1-(f+g),i[1]=c+m,i[2]=d-y,i[3]=0,i[4]=c-m,i[5]=1-(u+g),i[6]=p+v,i[7]=0,i[8]=d+y,i[9]=p-v,i[10]=1-(u+f),i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this},fromQuat:function(t){var e=this.val,i=t.x,n=t.y,s=t.z,r=t.w,o=i+i,a=n+n,h=s+s,l=i*o,u=i*a,c=i*h,d=n*a,f=n*h,p=s*h,g=r*o,v=r*a,y=r*h;return e[0]=1-(d+p),e[1]=u+y,e[2]=c-v,e[3]=0,e[4]=u-y,e[5]=1-(l+p),e[6]=f+g,e[7]=0,e[8]=c+v,e[9]=f-g,e[10]=1-(l+d),e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},frustum:function(t,e,i,n,s,r){var o=this.val,a=1/(e-t),h=1/(n-i),l=1/(s-r);return o[0]=2*s*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=2*s*h,o[6]=0,o[7]=0,o[8]=(e+t)*a,o[9]=(n+i)*h,o[10]=(r+s)*l,o[11]=-1,o[12]=0,o[13]=0,o[14]=r*s*2*l,o[15]=0,this},perspective:function(t,e,i,n){var s=this.val,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this},perspectiveLH:function(t,e,i,n){var s=this.val;return s[0]=2*i/t,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=2*i/e,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=-n/(i-n),s[11]=1,s[12]=0,s[13]=0,s[14]=i*n/(i-n),s[15]=0,this},ortho:function(t,e,i,n,s,r){var o=this.val,a=t-e,h=i-n,l=s-r;return a=0===a?a:1/a,h=0===h?h:1/h,l=0===l?l:1/l,o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*l,o[15]=1,this},lookAt:function(t,e,i){var n=this.val,s=t.x,r=t.y,o=t.z,a=i.x,h=i.y,l=i.z,u=e.x,c=e.y,d=e.z;if(Math.abs(s-u)<1e-6&&Math.abs(r-c)<1e-6&&Math.abs(o-d)<1e-6)return this.identity();var f=s-u,p=r-c,g=o-d,v=1/Math.sqrt(f*f+p*p+g*g),y=h*(g*=v)-l*(p*=v),m=l*(f*=v)-a*g,x=a*p-h*f;(v=Math.sqrt(y*y+m*m+x*x))?(y*=v=1/v,m*=v,x*=v):(y=0,m=0,x=0);var T=p*x-g*m,w=g*y-f*x,b=f*m-p*y;return(v=Math.sqrt(T*T+w*w+b*b))?(T*=v=1/v,w*=v,b*=v):(T=0,w=0,b=0),n[0]=y,n[1]=T,n[2]=f,n[3]=0,n[4]=m,n[5]=w,n[6]=p,n[7]=0,n[8]=x,n[9]=b,n[10]=g,n[11]=0,n[12]=-(y*s+m*r+x*o),n[13]=-(T*s+w*r+b*o),n[14]=-(f*s+p*r+g*o),n[15]=1,this},yawPitchRoll:function(t,e,i){this.zero(),s.zero(),r.zero();var n=this.val,o=s.val,a=r.val,h=Math.sin(i),l=Math.cos(i);return n[10]=1,n[15]=1,n[0]=l,n[1]=h,n[4]=-h,n[5]=l,h=Math.sin(e),l=Math.cos(e),o[0]=1,o[15]=1,o[5]=l,o[10]=l,o[9]=-h,o[6]=h,h=Math.sin(t),l=Math.cos(t),a[5]=1,a[15]=1,a[0]=l,a[2]=-h,a[8]=h,a[10]=l,this.multiplyLocal(s),this.multiplyLocal(r),this},setWorldMatrix:function(t,e,i,n,o){return this.yawPitchRoll(t.y,t.x,t.z),s.scaling(i.x,i.y,i.z),r.xyz(e.x,e.y,e.z),this.multiplyLocal(s),this.multiplyLocal(r),void 0!==n&&this.multiplyLocal(n),void 0!==o&&this.multiplyLocal(o),this}}),s=new n,r=new n;t.exports=n},function(t,e,i){var n=i(0),s=i(185),r=i(353),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new s(1,0,0),l=new s(0,1,0),u=new s,c=new r,d=new n({initialize:function(t,e,i,n){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(u.copy(h).cross(t).length()<1e-6&&u.copy(l).cross(t),u.normalize(),this.setAxisAngle(u,Math.PI)):i>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(u.copy(t).cross(e),this.x=u.x,this.y=u.y,this.z=u.z,this.w=1+i,this.normalize())},setAxes:function(t,e,i){var n=c.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.x=i*t.x,this.y=i*t.y,this.z=i*t.z,this.w=Math.cos(e),this},multiply:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.x=e*h+s*r+i*a-n*o,this.y=i*h+s*o+n*r-e*a,this.z=n*h+s*a+e*o-i*r,this.w=s*h-e*r-i*o-n*a,this},slerp:function(t,e){var i=this.x,n=this.y,s=this.z,r=this.w,o=t.x,a=t.y,h=t.z,l=t.w,u=i*o+n*a+s*h+r*l;u<0&&(u=-u,o=-o,a=-a,h=-h,l=-l);var c=1-e,d=e;if(1-u>1e-6){var f=Math.acos(u),p=Math.sin(f);c=Math.sin((1-e)*f)/p,d=Math.sin(e*f)/p}return this.x=c*i+d*o,this.y=c*n+d*a,this.z=c*s+d*h,this.w=c*r+d*l,this},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n,r=s?1/s:0;return this.x=-t*r,this.y=-e*r,this.z=-i*r,this.w=n*r,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+s*r,this.y=i*o+n*r,this.z=n*o-i*r,this.w=s*o-e*r,this},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o-n*r,this.y=i*o+s*r,this.z=n*o+e*r,this.w=s*o-i*r,this},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+i*r,this.y=i*o-e*r,this.z=n*o+s*r,this.w=s*o-n*r,this},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this.x=(i[7]-i[5])*e,this.y=(i[2]-i[6])*e,this.z=(i[3]-i[1])*e;else{var s=0;i[4]>i[0]&&(s=1),i[8]>i[3*s+s]&&(s=2);var r=o[s],h=o[r];e=Math.sqrt(i[3*s+s]-i[3*r+r]-i[3*h+h]+1),a[s]=.5*e,e=.5/e,a[r]=(i[3*r+s]+i[3*s+r])*e,a[h]=(i[3*h+s]+i[3*s+h])*e,this.x=a[0],this.y=a[1],this.z=a[2],this.w=(i[3*h+r]-i[3*r+h])*e}return this}});t.exports=d},function(t,e,i){var n=i(357),s=i(28),r=i(32),o=i(180);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===r.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==r.HEADLESS)if(e.renderType===r.CANVAS||e.renderType!==r.CANVAS&&!o.webGL){if(!o.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");e.renderType=r.CANVAS}else e.renderType=r.WEBGL;e.antialias||s.disableSmoothing();var a,h,l=t.scale.baseSize,u=l.width,c=l.height;e.canvas?(t.canvas=e.canvas,t.canvas.width=u,t.canvas.height=c):t.canvas=s.create(t,u,c,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||n.setCrisp(t.canvas),e.renderType!==r.HEADLESS&&(a=i(358),h=i(361),e.renderType===r.WEBGL?t.renderer=new h(t):(t.renderer=new a(t),t.context=t.renderer.gameContext))}},function(t,e){t.exports={setCrisp:function(t){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach(function(e){t.style["image-rendering"]=e}),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},function(t,e,i){var n=i(359),s=i(55),r=i(0),o=i(32),a=i(360),h=i(104),l=i(35),u=new r({initialize:function(t){this.game=t,this.type=o.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.config={clearBeforeRender:t.config.clearBeforeRender,backgroundColor:t.config.backgroundColor,resolution:t.config.resolution,antialias:t.config.antialias,roundPixels:t.config.roundPixels},this.gameCanvas=t.canvas;var e={alpha:t.config.transparent,desynchronized:t.config.desynchronized};this.gameContext=this.game.config.context?this.game.config.context:this.gameCanvas.getContext("2d",e),this.currentContext=this.gameContext,this.antialias=t.config.antialias,this.blendModes=a(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new l,this._tempMatrix2=new l,this._tempMatrix3=new l,this._tempMatrix4=new l,this.init()},init:function(){this.game.scale.on(h.RESIZE,this.onResize,this);var t=this.game.scale.baseSize;this.resize(t.width,t.height)},onResize:function(t,e){e.width===this.width&&e.height===this.height||this.resize(e.width,e.height)},resize:function(t,e){this.width=t,this.height=e},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(t){return this.currentContext.globalCompositeOperation=t,this},setContext:function(t){return this.currentContext=t||this.gameContext,this},setAlpha:function(t){return this.currentContext.globalAlpha=t,this},preRender:function(){var t=this.gameContext,e=this.config,i=this.width,n=this.height;t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),e.clearBeforeRender&&t.clearRect(0,0,i,n),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,n)),t.save(),this.drawCount=0},render:function(t,e,i,n){var r=e.list,o=r.length,a=n._cx,h=n._cy,l=n._cw,u=n._ch,c=n.renderToTexture?n.context:t.sys.context;c.save(),this.game.scene.customViewports&&(c.beginPath(),c.rect(a,h,l,u),c.clip()),this.currentContext=c;var d=n.mask;d&&d.preRenderCanvas(this,null,n._maskCamera),n.transparent||(c.fillStyle=n.backgroundColor.rgba,c.fillRect(a,h,l,u)),c.globalAlpha=n.alpha,c.globalCompositeOperation="source-over",this.drawCount+=r.length,n.renderToTexture&&n.emit(s.PRE_RENDER,n),n.matrix.copyToContext(c);for(var f=0;f=0?m=-(m+d):m<0&&(m=Math.abs(m)-d)),t.flipY&&(x>=0?x=-(x+f):x<0&&(x=Math.abs(x)-f))}var w=1,b=1;t.flipX&&(p||(m+=-e.realWidth+2*v),w=-1),t.flipY&&(p||(x+=-e.realHeight+2*y),b=-1),a.applyITRS(t.x,t.y,t.rotation,t.scaleX*w,t.scaleY*b),o.copyFrom(i.matrix),n?(o.multiplyWithOffset(n,-i.scrollX*t.scrollFactorX,-i.scrollY*t.scrollFactorY),a.e=t.x,a.f=t.y,o.multiply(a,h)):(a.e-=i.scrollX*t.scrollFactorX,a.f-=i.scrollY*t.scrollFactorY,o.multiply(a,h)),r.save(),h.setToContext(r),r.globalCompositeOperation=this.blendModes[t.blendMode],r.globalAlpha=s,r.imageSmoothingEnabled=!(!this.antialias||e.source.scaleMode),r.drawImage(e.source.image,u,c,d,f,m,x,d/g,f/g),r.restore()}},destroy:function(){this.gameCanvas=null,this.gameContext=null,this.game=null}});t.exports=u},function(t,e,i){var n=i(28),s=i(36),r=i(1);t.exports=function(t,e){var i=r(e,"callback"),o=r(e,"type","image/png"),a=r(e,"encoder",.92),h=Math.abs(Math.round(r(e,"x",0))),l=Math.abs(Math.round(r(e,"y",0))),u=r(e,"width",t.width),c=r(e,"height",t.height);if(r(e,"getPixel",!1)){var d=t.getContext("2d").getImageData(h,l,1,1).data;i.call(null,new s(d[0],d[1],d[2],d[3]/255))}else if(0!==h||0!==l||u!==t.width||c!==t.height){var f=n.createWebGL(this,u,c);f.getContext("2d").drawImage(t,h,l,u,c,0,0,u,c);var p=new Image;p.onerror=function(){i.call(null),n.remove(f)},p.onload=function(){i.call(null,p),n.remove(f)},p.src=f.toDataURL(o,a)}else{var g=new Image;g.onerror=function(){i.call(null)},g.onload=function(){i.call(null,g)},g.src=t.toDataURL(o,a)}}},function(t,e,i){var n=i(43),s=i(335);t.exports=function(){var t=[],e=s.supportNewBlendModes,i="source-over";return t[n.NORMAL]=i,t[n.ADD]="lighter",t[n.MULTIPLY]=e?"multiply":i,t[n.SCREEN]=e?"screen":i,t[n.OVERLAY]=e?"overlay":i,t[n.DARKEN]=e?"darken":i,t[n.LIGHTEN]=e?"lighten":i,t[n.COLOR_DODGE]=e?"color-dodge":i,t[n.COLOR_BURN]=e?"color-burn":i,t[n.HARD_LIGHT]=e?"hard-light":i,t[n.SOFT_LIGHT]=e?"soft-light":i,t[n.DIFFERENCE]=e?"difference":i,t[n.EXCLUSION]=e?"exclusion":i,t[n.HUE]=e?"hue":i,t[n.SATURATION]=e?"saturation":i,t[n.COLOR]=e?"color":i,t[n.LUMINOSITY]=e?"luminosity":i,t[n.ERASE]="destination-out",t[n.SOURCE_IN]="source-in",t[n.SOURCE_OUT]="source-out",t[n.SOURCE_ATOP]="source-atop",t[n.DESTINATION_OVER]="destination-over",t[n.DESTINATION_IN]="destination-in",t[n.DESTINATION_OUT]="destination-out",t[n.DESTINATION_ATOP]="destination-atop",t[n.LIGHTER]="lighter",t[n.COPY]="copy",t[n.XOR]="xor",t}},function(t,e,i){var n=i(103),s=i(55),r=i(0),o=i(32),a=i(21),h=i(127),l=i(2),u=i(104),c=i(85),d=i(128),f=i(35),p=i(10),g=i(362),v=i(363),y=i(364),m=i(188),x=new r({initialize:function(t){var e=t.config,i={alpha:e.transparent,desynchronized:e.desynchronized,depth:!1,antialias:e.antialiasGL,premultipliedAlpha:e.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:e.failIfMajorPerformanceCaveat,powerPreference:e.powerPreference};this.config={clearBeforeRender:e.clearBeforeRender,antialias:e.antialias,backgroundColor:e.backgroundColor,contextCreation:i,resolution:e.resolution,roundPixels:e.roundPixels,maxTextures:e.maxTextures,maxTextureSize:e.maxTextureSize,batchSize:e.batchSize,maxLights:e.maxLights,mipmapFilter:e.mipmapFilter},this.game=t,this.type=o.WEBGL,this.width=0,this.height=0,this.canvas=t.canvas,this.blendModes=[],this.nativeTextures=[],this.contextLost=!1,this.pipelines=null,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92,isFramebuffer:!1,bufferWidth:0,bufferHeight:0},this.currentActiveTextureUnit=0,this.currentTextures=new Array(16),this.currentFramebuffer=null,this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=l,this.contextRestoredHandler=l,this.gl=null,this.supportedExtensions=null,this.extensions={},this.glFormats=[],this.compression={ETC1:!1,PVRTC:!1,S3TC:!1},this.drawingBufferHeight=0,this.blankTexture=null,this.defaultCamera=new n(0,0,0,0),this._tempMatrix1=new f,this._tempMatrix2=new f,this._tempMatrix3=new f,this._tempMatrix4=new f,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.mipmapFilter=null,this.init(this.config)},init:function(t){var e,i=this.game,n=this.canvas,s=t.backgroundColor;if(!(e=i.config.context?i.config.context:n.getContext("webgl",t.contextCreation)||n.getContext("experimental-webgl",t.contextCreation))||e.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=e;var r=this;this.contextLostHandler=function(t){r.contextLost=!0,r.game.events.emit(a.CONTEXT_LOST,r),t.preventDefault()},this.contextRestoredHandler=function(){r.contextLost=!1,r.init(r.config),r.game.events.emit(a.CONTEXT_RESTORED,r)},n.addEventListener("webglcontextlost",this.contextLostHandler,!1),n.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),i.context=e;for(var h=0;h<=27;h++)this.blendModes.push({func:[e.ONE,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_ADD});this.blendModes[1].func=[e.ONE,e.DST_ALPHA],this.blendModes[2].func=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[e.ONE,e.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[e.ZERO,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_REVERSE_SUBTRACT},this.glFormats[0]=e.BYTE,this.glFormats[1]=e.SHORT,this.glFormats[2]=e.UNSIGNED_BYTE,this.glFormats[3]=e.UNSIGNED_SHORT,this.glFormats[4]=e.FLOAT,this.glFuncMap={mat2:{func:e.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:e.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:e.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:e.uniform1f,length:1},"1fv":{func:e.uniform1fv,length:1},"1i":{func:e.uniform1i,length:1},"1iv":{func:e.uniform1iv,length:1},"2f":{func:e.uniform2f,length:2},"2fv":{func:e.uniform2fv,length:1},"2i":{func:e.uniform2i,length:2},"2iv":{func:e.uniform2iv,length:1},"3f":{func:e.uniform3f,length:3},"3fv":{func:e.uniform3fv,length:1},"3i":{func:e.uniform3i,length:3},"3iv":{func:e.uniform3iv,length:1},"4f":{func:e.uniform4f,length:4},"4fv":{func:e.uniform4fv,length:1},"4i":{func:e.uniform4i,length:4},"4iv":{func:e.uniform4iv,length:1}};var l=e.getSupportedExtensions();t.maxTextures||(t.maxTextures=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),t.maxTextureSize||(t.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE));var u="WEBGL_compressed_texture_",c="WEBKIT_"+u;this.compression.ETC1=e.getExtension(u+"etc1")||e.getExtension(c+"etc1"),this.compression.PVRTC=e.getExtension(u+"pvrtc")||e.getExtension(c+"pvrtc"),this.compression.S3TC=e.getExtension(u+"s3tc")||e.getExtension(c+"s3tc"),this.supportedExtensions=l,e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),e.enable(e.BLEND),e.clearColor(s.redGL,s.greenGL,s.blueGL,s.alphaGL),this.mipmapFilter=e[t.mipmapFilter];for(var f=0;f0&&n>0;if(o&&a){var h=o[0],l=o[1],u=o[2],c=o[3];a=h!==t||l!==e||u!==i||c!==n}a&&(this.flush(),r.scissor(t,s-e-n,i,n))},popScissor:function(){var t=this.scissorStack;t.pop();var e=t[t.length-1];e&&this.setScissor(e[0],e[1],e[2],e[3]),this.currentScissor=e},setPipeline:function(t,e){return this.currentPipeline===t&&this.currentPipeline.vertexBuffer===this.currentVertexBuffer&&this.currentPipeline.program===this.currentProgram||(this.flush(),this.currentPipeline=t,this.currentPipeline.bind()),this.currentPipeline.onBind(e),this.currentPipeline},hasActiveStencilMask:function(){var t=this.currentMask.mask,e=this.currentCameraMask.mask;return t&&t.isStencil||e&&e.isStencil},rebindPipeline:function(t){var e=this.gl;e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),this.hasActiveStencilMask()?e.clear(e.DEPTH_BUFFER_BIT):(e.disable(e.STENCIL_TEST),e.clear(e.DEPTH_BUFFER_BIT|e.STENCIL_BUFFER_BIT)),e.viewport(0,0,this.width,this.height),this.setBlendMode(0,!0),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.blankTexture.glTexture),this.currentActiveTextureUnit=0,this.currentTextures[0]=this.blankTexture.glTexture,this.currentPipeline=t,this.currentPipeline.bind(),this.currentPipeline.onBind()},clearPipeline:function(){this.flush(),this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.setBlendMode(0,!0)},setBlendMode:function(t,e){void 0===e&&(e=!1);var i=this.gl,n=this.blendModes[t];return!!(e||t!==o.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t)&&(this.flush(),i.enable(i.BLEND),i.blendEquation(n.equation),n.func.length>2?i.blendFuncSeparate(n.func[0],n.func[1],n.func[2],n.func[3]):i.blendFunc(n.func[0],n.func[1]),this.currentBlendMode=t,!0)},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return t>17&&this.blendModes[t]&&this.blendModes.splice(t,1),this},setBlankTexture:function(t){void 0===t&&(t=!1),!t&&0===this.currentActiveTextureUnit&&this.currentTextures[0]||this.setTexture2D(this.blankTexture.glTexture,0)},setTexture2D:function(t,e,i){void 0===i&&(i=!0);var n=this.gl;return t!==this.currentTextures[e]&&(i&&this.flush(),this.currentActiveTextureUnit!==e&&(n.activeTexture(n.TEXTURE0+e),this.currentActiveTextureUnit=e),n.bindTexture(n.TEXTURE_2D,t),this.currentTextures[e]=t),this},setFramebuffer:function(t,e){void 0===e&&(e=!1);var i=this.gl,n=this.width,s=this.height;return t!==this.currentFramebuffer&&(t&&t.renderTexture?(n=t.renderTexture.width,s=t.renderTexture.height):this.flush(),i.bindFramebuffer(i.FRAMEBUFFER,t),i.viewport(0,0,n,s),e&&(t?(this.drawingBufferHeight=s,this.pushScissor(0,0,n,s)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=t),this},setProgram:function(t){var e=this.gl;return t!==this.currentProgram&&(this.flush(),e.useProgram(t),this.currentProgram=t),this},setVertexBuffer:function(t){var e=this.gl;return t!==this.currentVertexBuffer&&(this.flush(),e.bindBuffer(e.ARRAY_BUFFER,t),this.currentVertexBuffer=t),this},setIndexBuffer:function(t){var e=this.gl;return t!==this.currentIndexBuffer&&(this.flush(),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.currentIndexBuffer=t),this},createTextureFromSource:function(t,e,i,n){var s=this.gl,r=s.NEAREST,a=s.NEAREST,l=s.CLAMP_TO_EDGE;e=t?t.width:e,i=t?t.height:i;var u=h(e,i);return u&&(l=s.REPEAT),n===o.ScaleModes.LINEAR&&this.config.antialias&&(r=u?this.mipmapFilter:s.LINEAR,a=s.LINEAR),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,r,a,l,l,s.RGBA,t):this.createTexture2D(0,r,a,l,l,s.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,s,r,o,a,l,u,c,d){u=void 0===u||null===u||u,void 0===c&&(c=!1),void 0===d&&(d=!1);var f=this.gl,p=f.createTexture();return this.setTexture2D(p,0),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,e),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,i),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_S,s),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_T,n),f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,d),null===o||void 0===o?f.texImage2D(f.TEXTURE_2D,t,r,a,l,0,r,f.UNSIGNED_BYTE,null):(c||(a=o.width,l=o.height),f.texImage2D(f.TEXTURE_2D,t,r,r,f.UNSIGNED_BYTE,o)),h(a,l)&&f.generateMipmap(f.TEXTURE_2D),this.setTexture2D(null,0),p.isAlphaPremultiplied=u,p.isRenderTexture=!1,p.width=a,p.height=l,this.nativeTextures.push(p),p},createFramebuffer:function(t,e,i,n){var s,r=this.gl,o=r.createFramebuffer();if(this.setFramebuffer(o),n){var a=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,a),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,a)}if(i.isRenderTexture=!0,i.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0),(s=r.checkFramebufferStatus(r.FRAMEBUFFER))!==r.FRAMEBUFFER_COMPLETE){throw new Error("Framebuffer incomplete. Framebuffer status: "+{36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"}[s])}return o.renderTexture=i,this.setFramebuffer(null),o},createProgram:function(t,e){var i=this.gl,n=i.createProgram(),s=i.createShader(i.VERTEX_SHADER),r=i.createShader(i.FRAGMENT_SHADER);if(i.shaderSource(s,t),i.shaderSource(r,e),i.compileShader(s),i.compileShader(r),!i.getShaderParameter(s,i.COMPILE_STATUS))throw new Error("Failed to compile Vertex Shader:\n"+i.getShaderInfoLog(s));if(!i.getShaderParameter(r,i.COMPILE_STATUS))throw new Error("Failed to compile Fragment Shader:\n"+i.getShaderInfoLog(r));if(i.attachShader(n,s),i.attachShader(n,r),i.linkProgram(n),!i.getProgramParameter(n,i.LINK_STATUS))throw new Error("Failed to link program:\n"+i.getProgramInfoLog(n));return n},createVertexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setVertexBuffer(n),i.bufferData(i.ARRAY_BUFFER,t,e),this.setVertexBuffer(null),n},createIndexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setIndexBuffer(n),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t,e),this.setIndexBuffer(null),n},deleteTexture:function(t){var e=this.nativeTextures.indexOf(t);return-1!==e&&c(this.nativeTextures,e),this.gl.deleteTexture(t),this.currentTextures[0]!==t||this.game.pendingDestroy||this.setBlankTexture(!0),this},deleteFramebuffer:function(t){return this.gl.deleteFramebuffer(t),this},deleteProgram:function(t){return this.gl.deleteProgram(t),this},deleteBuffer:function(t){return this.gl.deleteBuffer(t),this},preRenderCamera:function(t){var e=t._cx,i=t._cy,n=t._cw,r=t._ch,o=this.pipelines.TextureTintPipeline,a=t.backgroundColor;if(t.renderToTexture){this.flush(),this.pushScissor(e,i,n,-r),this.setFramebuffer(t.framebuffer);var h=this.gl;h.clearColor(0,0,0,0),h.clear(h.COLOR_BUFFER_BIT),o.projOrtho(e,n+e,i,r+i,-1e3,1e3),t.mask&&(this.currentCameraMask.mask=t.mask,this.currentCameraMask.camera=t._maskCamera,t.mask.preRenderWebGL(this,t,t._maskCamera)),a.alphaGL>0&&o.drawFillRect(e,i,n+e,r+i,p.getTintFromFloats(a.redGL,a.greenGL,a.blueGL,1),a.alphaGL),t.emit(s.PRE_RENDER,t)}else this.pushScissor(e,i,n,r),t.mask&&(this.currentCameraMask.mask=t.mask,this.currentCameraMask.camera=t._maskCamera,t.mask.preRenderWebGL(this,t,t._maskCamera)),a.alphaGL>0&&o.drawFillRect(e,i,n,r,p.getTintFromFloats(a.redGL,a.greenGL,a.blueGL,1),a.alphaGL)},getCurrentStencilMask:function(){var t=null,e=this.maskStack,i=this.currentCameraMask;return e.length>0?t=e[e.length-1]:i.mask&&i.mask.isStencil&&(t=i),t},postRenderCamera:function(t){var e=this.pipelines.TextureTintPipeline;if(t.flashEffect.postRenderWebGL(e,p.getTintFromFloats),t.fadeEffect.postRenderWebGL(e,p.getTintFromFloats),t.dirty=!1,this.popScissor(),t.renderToTexture){e.flush(),this.setFramebuffer(null),t.emit(s.POST_RENDER,t),e.projOrtho(0,e.width,e.height,0,-1e3,1e3);var i=p.getTintAppendFloatAlpha;(t.pipeline?t.pipeline:e).batchTexture(t,t.glTexture,t.width,t.height,t.x,t.y,t.width,t.height,t.zoom,t.zoom,t.rotation,t.flipX,!t.flipY,1,1,0,0,0,0,t.width,t.height,i(t._tintTL,t._alphaTL),i(t._tintTR,t._alphaTR),i(t._tintBL,t._alphaBL),i(t._tintBR,t._alphaBR),t._isTinted&&t.tintFill,0,0,this.defaultCamera,null),this.setBlankTexture(!0)}t.mask&&(this.currentCameraMask.mask=null,t.mask.postRenderWebGL(this,t._maskCamera))},preRender:function(){if(!this.contextLost){var t=this.gl,e=this.pipelines;if(t.bindFramebuffer(t.FRAMEBUFFER,null),this.config.clearBeforeRender){var i=this.config.backgroundColor;t.clearColor(i.redGL,i.greenGL,i.blueGL,i.alphaGL),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT)}for(var n in t.enable(t.SCISSOR_TEST),e)e[n].onPreRender();this.currentScissor=[0,0,this.width,this.height],this.scissorStack=[this.currentScissor],this.game.scene.customViewports&&t.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.setPipeline(this.pipelines.TextureTintPipeline)}},render:function(t,e,i,n){if(!this.contextLost){var s=e.list,r=s.length,a=this.pipelines;for(var h in a)a[h].onRender(t,n);if(this.preRenderCamera(n),0===r)return this.setBlendMode(o.BlendModes.NORMAL),void this.postRenderCamera(n);this.currentType="";for(var l=this.currentMask,u=0;u0&&r>0&&(this.setTexture2D(e,0),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,i),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.width=s,e.height=r,this.setTexture2D(null,0)),e},createVideoTexture:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=this.gl,s=n.NEAREST,r=n.NEAREST,o=t.videoWidth,a=t.videoHeight,l=n.CLAMP_TO_EDGE,u=h(o,a);return!e&&u&&(l=n.REPEAT),this.config.antialias&&(s=u?this.mipmapFilter:n.LINEAR,r=n.LINEAR),this.createTexture2D(0,s,r,l,l,n.RGBA,t,o,a,!0,!0,i)},updateVideoTexture:function(t,e,i){void 0===i&&(i=!1);var n=this.gl,s=t.videoWidth,r=t.videoHeight;return s>0&&r>0&&(this.setTexture2D(e,0),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,i),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.width=s,e.height=r,this.setTexture2D(null,0)),e},setTextureFilter:function(t,e){var i=this.gl,n=[i.LINEAR,i.NEAREST][e];return this.setTexture2D(t,0),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,n),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,n),this.setTexture2D(null,0),this},setFloat1:function(t,e,i){return this.setProgram(t),this.gl.uniform1f(this.gl.getUniformLocation(t,e),i),this},setFloat2:function(t,e,i,n){return this.setProgram(t),this.gl.uniform2f(this.gl.getUniformLocation(t,e),i,n),this},setFloat3:function(t,e,i,n,s){return this.setProgram(t),this.gl.uniform3f(this.gl.getUniformLocation(t,e),i,n,s),this},setFloat4:function(t,e,i,n,s,r){return this.setProgram(t),this.gl.uniform4f(this.gl.getUniformLocation(t,e),i,n,s,r),this},setFloat1v:function(t,e,i){return this.setProgram(t),this.gl.uniform1fv(this.gl.getUniformLocation(t,e),i),this},setFloat2v:function(t,e,i){return this.setProgram(t),this.gl.uniform2fv(this.gl.getUniformLocation(t,e),i),this},setFloat3v:function(t,e,i){return this.setProgram(t),this.gl.uniform3fv(this.gl.getUniformLocation(t,e),i),this},setFloat4v:function(t,e,i){return this.setProgram(t),this.gl.uniform4fv(this.gl.getUniformLocation(t,e),i),this},setInt1:function(t,e,i){return this.setProgram(t),this.gl.uniform1i(this.gl.getUniformLocation(t,e),i),this},setInt2:function(t,e,i,n){return this.setProgram(t),this.gl.uniform2i(this.gl.getUniformLocation(t,e),i,n),this},setInt3:function(t,e,i,n,s){return this.setProgram(t),this.gl.uniform3i(this.gl.getUniformLocation(t,e),i,n,s),this},setInt4:function(t,e,i,n,s,r){return this.setProgram(t),this.gl.uniform4i(this.gl.getUniformLocation(t,e),i,n,s,r),this},setMatrix2:function(t,e,i,n){return this.setProgram(t),this.gl.uniformMatrix2fv(this.gl.getUniformLocation(t,e),i,n),this},setMatrix3:function(t,e,i,n){return this.setProgram(t),this.gl.uniformMatrix3fv(this.gl.getUniformLocation(t,e),i,n),this},setMatrix4:function(t,e,i,n){return this.setProgram(t),this.gl.uniformMatrix4fv(this.gl.getUniformLocation(t,e),i,n),this},getMaxTextures:function(){return this.config.maxTextures},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){for(var t=0;t0&&this.flush();var e=this.inverseRotationMatrix;if(t){var i=-t,n=Math.cos(i),s=Math.sin(i);e[1]=s,e[3]=-s,e[0]=e[4]=n}else e[0]=e[4]=1,e[1]=e[3]=0;this.renderer.setMatrix3(this.program,"uInverseRotationMatrix",!1,e),this.currentNormalMapRotation=t}},batchSprite:function(t,e,i){if(this.active){var n=t.texture.dataSource[t.frame.sourceIndex];n&&(this.renderer.setPipeline(this),this.setTexture2D(n.glTexture,1),this.setNormalMapRotation(t.rotation),r.prototype.batchSprite.call(this,t,e,i))}}});a.LIGHT_COUNT=o,t.exports=a},function(t,e){var i={modelMatrixDirty:!1,viewMatrixDirty:!1,projectionMatrixDirty:!1,modelMatrix:null,viewMatrix:null,projectionMatrix:null,mvpInit:function(){return this.modelMatrixDirty=!0,this.viewMatrixDirty=!0,this.projectionMatrixDirty=!0,this.modelMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this},mvpUpdate:function(){var t=this.program;return this.modelMatrixDirty&&(this.renderer.setMatrix4(t,"uModelMatrix",!1,this.modelMatrix),this.modelMatrixDirty=!1),this.viewMatrixDirty&&(this.renderer.setMatrix4(t,"uViewMatrix",!1,this.viewMatrix),this.viewMatrixDirty=!1),this.projectionMatrixDirty&&(this.renderer.setMatrix4(t,"uProjectionMatrix",!1,this.projectionMatrix),this.projectionMatrixDirty=!1),this},modelIdentity:function(){var t=this.modelMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.modelMatrixDirty=!0,this},modelScale:function(t,e,i){var n=this.modelMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.modelMatrixDirty=!0,this},modelTranslate:function(t,e,i){var n=this.modelMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.modelMatrixDirty=!0,this},modelRotateX:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this.modelMatrixDirty=!0,this},modelRotateY:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this.modelMatrixDirty=!0,this},modelRotateZ:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this.modelMatrixDirty=!0,this},viewIdentity:function(){var t=this.viewMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.viewMatrixDirty=!0,this},viewScale:function(t,e,i){var n=this.viewMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.viewMatrixDirty=!0,this},viewTranslate:function(t,e,i){var n=this.viewMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.viewMatrixDirty=!0,this},viewRotateX:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this.viewMatrixDirty=!0,this},viewRotateY:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this.viewMatrixDirty=!0,this},viewRotateZ:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this.viewMatrixDirty=!0,this},viewLoad2D:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=0,e[4]=t[2],e[5]=t[3],e[6]=0,e[7]=0,e[8]=t[4],e[9]=t[5],e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this.viewMatrixDirty=!0,this},viewLoad:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this.viewMatrixDirty=!0,this},projIdentity:function(){var t=this.projectionMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.projectionMatrixDirty=!0,this},projOrtho:function(t,e,i,n,s,r){var o=this.projectionMatrix,a=1/(t-e),h=1/(i-n),l=1/(s-r);return o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*l,o[15]=1,this.projectionMatrixDirty=!0,this},projPersp:function(t,e,i,n){var s=this.projectionMatrix,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this.projectionMatrixDirty=!0,this}};t.exports=i},function(t,e,i){var n=i(32);t.exports=function(t){var e=t.config;if(!e.hideBanner){var i="WebGL";e.renderType===n.CANVAS?i="Canvas":e.renderType===n.HEADLESS&&(i="Headless");var s,r=e.audio,o=t.device.audio;if(s=!o.webAudio||r&&r.disableWebAudio?r&&r.noAudio||!o.webAudio&&!o.audioData?"No Audio":"HTML5 Audio":"Web Audio",t.device.browser.ie)window.console&&console.log("Phaser v"+n.VERSION+" / https://phaser.io");else{var a,h="",l=[h];Array.isArray(e.bannerBackgroundColor)?(e.bannerBackgroundColor.forEach(function(t){h=h.concat("%c "),l.push("background: "+t),a=t}),l[l.length-1]="color: "+e.bannerTextColor+"; background: "+a):(h=h.concat("%c "),l.push("color: "+e.bannerTextColor+"; background: "+e.bannerBackgroundColor)),l.push("background: #fff"),e.gameTitle&&(h=h.concat(e.gameTitle),e.gameVersion&&(h=h.concat(" v"+e.gameVersion)),e.hidePhaser||(h=h.concat(" / "))),e.hidePhaser||(h=h.concat("Phaser v"+n.VERSION+"-FB ("+i+" | "+s+")")),h=h.concat(" %c "+e.gameURL),l[0]=h,console.log.apply(console,l)}}}},function(t,e,i){var n=i(0),s=i(5),r=i(2),o=i(368),a=new n({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=s(e,"min",5),this.targetFps=s(e,"target",60),this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=r,this.forceSetTimeOut=s(e,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=s(e,"deltaHistory",10),this.panicMax=s(e,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=s(e,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var t=window.performance.now();this.time=t,this.lastTime=t,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0;for(var e=0;e0||!this.inFocus)&&(this._coolDown--,r=Math.min(r,this._target)),r>this._min&&(r=n[i],r=Math.min(r,this._min)),n[i]=r,this.deltaIndex++,this.deltaIndex>s&&(this.deltaIndex=0),o=0;for(var a=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t,this.frame++},tick:function(){this.step()},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running?this.sleep():t&&(this.startTime+=-this.lastTime+(this.lastTime+window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step()},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(2),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0,this.target=0;var t=this;this.step=function e(){var i=window.performance.now();t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.requestAnimationFrame(e)},this.stepTimeout=function e(){var i=Date.now(),n=Math.min(Math.max(2*t.target+t.tick-i,0),t.target);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,n)}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.target=i,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=s}});t.exports=r},function(t,e,i){var n=i(21);t.exports=function(t){var e,i=t.events;void 0!==document.hidden?e="visibilitychange":["webkit","moz","ms"].forEach(function(t){void 0!==document[t+"Hidden"]&&(document.hidden=function(){return document[t+"Hidden"]},e=t+"visibilitychange")});e&&document.addEventListener(e,function(t){document.hidden||"pause"===t.type?i.emit(n.HIDDEN):i.emit(n.VISIBLE)},!1),window.onblur=function(){i.emit(n.BLUR)},window.onfocus=function(){i.emit(n.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},function(t,e,i){var n=i(371),s=i(28),r=i(5);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",n),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),l=r(t,"resizeCanvas",!0),u=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),f=Math.floor(Math.abs(e[0].length*a)),p=Math.floor(Math.abs(e.length*h));i||(i=s.create2D(this,f,p),l=!1,u=!1),l&&(i.width=f,i.height=p);var g=i.getContext("2d");u&&g.clearRect(0,0,f,p),c&&c(i,g);for(var v=0;vi;)n-=i;ni.length-2?i.length-1:r+1],c=i[r>i.length-3?i.length-1:r+2];return e.set(n(a,h.x,l.x,u.x,c.x),n(a,h.y,l.y,u.y,c.y))},toJSON:function(){for(var t=[],e=0;e1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}},function(t,e,i){var n=i(124);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?n.cordova?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},function(t,e,i){var n=i(190);t.exports=function(t,e){var i=window.screen,s=!!i&&(i.orientation||i.mozOrientation||i.msOrientation);if(s&&"string"==typeof s.type)return s.type;if("string"==typeof s)return s;if(i)return i.height>i.width?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE;if("number"==typeof window.orientation)return 0===window.orientation||180===window.orientation?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return n.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return n.ORIENTATION.LANDSCAPE}return e>t?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE}},function(t,e){t.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},function(t,e){t.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},function(t,e){t.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5}},function(t,e){t.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},function(t,e){t.exports=function(t){var e;return""!==t&&("string"==typeof t?e=document.getElementById(t):t&&1===t.nodeType&&(e=t)),e||(e=document.body),e}},function(t,e){t.exports=function(t){var e="";try{window.DOMParser?e=(new DOMParser).parseFromString(t,"text/xml"):(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},function(t,e,i){var n=i(0),s=i(192),r=i(9),o=i(56),a=i(21),h=i(390),l=i(391),u=i(392),c=i(393),d=i(35),f=i(351),p=new n({initialize:function(t,e){this.game=t,this.scaleManager,this.canvas,this.config=e,this.enabled=!0,this.events=new r,this.isOver=!0,this.defaultCursor="",this.keyboard=e.inputKeyboard?new h(this):null,this.mouse=e.inputMouse?new l(this):null,this.touch=e.inputTouch?new c(this):null,this.pointers=[],this.pointersTotal=e.inputActivePointers,e.inputTouch&&1===this.pointersTotal&&(this.pointersTotal=2);for(var i=0;i<=this.pointersTotal;i++){var n=new u(this,i);n.smoothFactor=e.inputSmoothFactor,this.pointers.push(n)}this.mousePointer=e.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new d,this._tempMatrix2=new d,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],t.events.once(a.BOOT,this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.scaleManager=this.game.scale,this.events.emit(o.MANAGER_BOOT),this.game.events.on(a.PRE_RENDER,this.preRender,this),this.game.events.once(a.DESTROY,this.destroy,this)},setCanvasOver:function(t){this.isOver=!0,this.events.emit(o.GAME_OVER,t)},setCanvasOut:function(t){this.isOver=!1,this.events.emit(o.GAME_OUT,t)},preRender:function(){var t=this.game.loop.now,e=this.game.loop.delta,i=this.game.scene.getScenes(!0,!0);this.time=t,this.events.emit(o.MANAGER_UPDATE);for(var n=0;n10&&(t=10-this.pointersTotal);for(var i=0;i-1&&e.preventDefault()}},this.onKeyUp=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.useQueue||t.manager.events.emit(o.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}};var e=this.target;e&&(e.addEventListener("keydown",this.onKeyDown,!1),e.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var t=this.target;t.removeEventListener("keydown",this.onKeyDown,!1),t.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},removeCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(r.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});t.exports=l},function(t,e,i){var n=i(0),s=i(180),r=i(56),o=i(0),a=new n({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=o,this.onMouseDown=o,this.onMouseUp=o,this.onMouseDownWindow=o,this.onMouseUpWindow=o,this.onMouseOver=o,this.onMouseOut=o,this.onMouseWheel=o,this.pointerLockChange=o,t.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.capture=t.inputMouseCapture,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return document.body.addEventListener("contextmenu",function(t){return t.preventDefault(),!1}),this},requestPointerLock:function(){if(s.pointerLock){var t=this.target;t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock()}},releasePointerLock:function(){s.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t=this,e=this.manager.canvas,i=window&&window.focus&&this.manager.game.config.autoFocus;this.onMouseMove=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onMouseMove(e),t.capture&&e.preventDefault())},this.onMouseDown=function(n){i&&window.focus(),!n.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onMouseDown(n),t.capture&&n.target===e&&n.preventDefault())},this.onMouseDownWindow=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&i.target!==e&&t.manager.onMouseDown(i)},this.onMouseUp=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onMouseUp(i),t.capture&&i.target===e&&i.preventDefault())},this.onMouseUpWindow=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&i.target!==e&&t.manager.onMouseUp(i)},this.onMouseOver=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.setCanvasOver(e)},this.onMouseOut=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.setCanvasOut(e)},this.onMouseWheel=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.onMouseWheel(e)};var n=this.target;if(n){var r={passive:!0},o={passive:!1};n.addEventListener("mousemove",this.onMouseMove,this.capture?o:r),n.addEventListener("mousedown",this.onMouseDown,this.capture?o:r),n.addEventListener("mouseup",this.onMouseUp,this.capture?o:r),n.addEventListener("mouseover",this.onMouseOver,this.capture?o:r),n.addEventListener("mouseout",this.onMouseOut,this.capture?o:r),n.addEventListener("wheel",this.onMouseWheel,this.capture?o:r),window&&this.manager.game.config.inputWindowEvents&&(window.addEventListener("mousedown",this.onMouseDownWindow,o),window.addEventListener("mouseup",this.onMouseUpWindow,o)),s.pointerLock&&(this.pointerLockChange=function(e){var i=t.target;t.locked=document.pointerLockElement===i||document.mozPointerLockElement===i||document.webkitPointerLockElement===i,t.manager.onPointerLockChange(e)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("mouseover",this.onMouseOver),t.removeEventListener("mouseout",this.onMouseOut),window&&(window.removeEventListener("mousedown",this.onMouseDownWindow),window.removeEventListener("mouseup",this.onMouseUpWindow)),s.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=a},function(t,e,i){var n=i(336),s=i(0),r=i(54),o=i(126),a=i(345),h=i(3),l=new s({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new h,this.prevPosition=new h,this.midPoint=new h(-1,-1),this.velocity=new h,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=0===e,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(t){var e=this.x,i=this.y;1!==t.resolution&&(e+=t._x,i+=t._y);var n=t.getWorldPoint(e,i);return this.worldX=n.x,this.worldY=n.y,this},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},updateMotion:function(){var t=this.position.x,e=this.position.y,i=this.midPoint.x,s=this.midPoint.y;if(t!==i||e!==s){var r=a(this.motionFactor,i,t),h=a(this.motionFactor,s,e);o(r,t,.1)&&(r=t),o(h,e,.1)&&(h=e),this.midPoint.set(r,h);var l=t-r,u=e-h;this.velocity.set(l,u),this.angle=n(r,h,t,e),this.distance=Math.sqrt(l*l+u*u)}},up:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=t.timeStamp),this.isDown=!1,this.wasTouch=!1},down:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=t.timeStamp),this.isDown=!0,this.wasTouch=!1},move:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.locked&&(this.movementX=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.movementY=t.movementY||t.mozMovementY||t.webkitMovementY||0),this.moveTime=t.timeStamp,this.wasTouch=!1},wheel:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.deltaX=t.deltaX,this.deltaY=t.deltaY,this.deltaZ=t.deltaZ,this.wasTouch=!1},touchstart:function(t,e){t.pointerId&&(this.pointerId=t.pointerId),this.identifier=t.identifier,this.target=t.target,this.active=!0,this.buttons=1,this.event=e,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(t,e){this.event=e,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.moveTime=e.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return!!(1&this.buttons)},rightButtonDown:function(){return!!(2&this.buttons)},middleButtonDown:function(){return!!(4&this.buttons)},backButtonDown:function(){return!!(8&this.buttons)},forwardButtonDown:function(){return!!(16&this.buttons)},leftButtonReleased:function(){return 0===this.button&&!this.isDown},rightButtonReleased:function(){return 2===this.button&&!this.isDown},middleButtonReleased:function(){return 1===this.button&&!this.isDown},backButtonReleased:function(){return 3===this.button&&!this.isDown},forwardButtonReleased:function(){return 4===this.button&&!this.isDown},getDistance:function(){return this.isDown?r(this.downX,this.downY,this.x,this.y):r(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?n(this.downX,this.downY,this.x,this.y):n(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(t,e){void 0===t&&(t=10),void 0===e&&(e=[]);for(var i=this.prevPosition.x,n=this.prevPosition.y,s=this.position.x,r=this.position.y,o=0;o0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),t.events.on(a.PRE_STEP,this.step,this),t.events.once(a.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(t){this.getParent(t),this.getParentBounds();var e=t.width,i=t.height,s=t.scaleMode,r=t.resolution,o=t.zoom,a=t.autoRound;if("string"==typeof e){var h=this.parentSize.width;0===h&&(h=window.innerWidth);var l=parseInt(e,10)/100;e=Math.floor(h*l)}if("string"==typeof i){var c=this.parentSize.height;0===c&&(c=window.innerHeight);var d=parseInt(i,10)/100;i=Math.floor(c*d)}this.resolution=1,this.scaleMode=s,this.autoRound=a,this.autoCenter=t.autoCenter,this.resizeInterval=t.resizeInterval,a&&(e=Math.floor(e),i=Math.floor(i)),this.gameSize.setSize(e,i),o===n.ZOOM.MAX_ZOOM&&(o=this.getMaxZoom()),this.zoom=o,1!==o&&(this._resetZoom=!0),this.baseSize.setSize(e*r,i*r),a&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),t.minWidth>0&&this.displaySize.setMin(t.minWidth*o,t.minHeight*o),t.maxWidth>0&&this.displaySize.setMax(t.maxWidth*o,t.maxHeight*o),this.displaySize.setSize(e,i),this.orientation=u(e,i)},getParent:function(t){var e=t.parent;if(null!==e){if(this.parent=l(e),this.parentIsWindow=this.parent===document.body,t.expandParent&&t.scaleMode!==n.SCALE_MODE.NONE){var i=this.parent.getBoundingClientRect();(this.parentIsWindow||0===i.height)&&(document.documentElement.style.height="100%",document.body.style.height="100%",i=this.parent.getBoundingClientRect(),this.parentIsWindow||0!==i.height||(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}t.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=l(t.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var t=this.parentSize,e=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(e.height=h(!0));var i=this.resolution,n=e.width*i,s=e.height*i;return(t.width!==n||t.height!==s)&&(t.setSize(n,s),!0)},lockOrientation:function(t){var e=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return!!e&&e(t)},setParentSize:function(t,e){return this.parentSize.setSize(t,e),this.refresh()},setGameSize:function(t,e){var i=this.autoRound,n=this.resolution;i&&(t=Math.floor(t),e=Math.floor(e));var s=this.width,r=this.height;return this.gameSize.resize(t,e),this.baseSize.resize(t*n,e*n),i&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(t,e),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(s,r)},resize:function(t,e){var i=this.zoom,n=this.resolution,s=this.autoRound;s&&(t=Math.floor(t),e=Math.floor(e));var r=this.width,o=this.height;this.gameSize.resize(t,e),this.baseSize.resize(t*n,e*n),s&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(t*i*n,e*i*n),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var a=this.canvas.style,h=t*i,l=e*i;return s&&(h=Math.floor(h),l=Math.floor(l)),h===t&&l===e||(a.width=h+"px",a.height=l+"px"),this.refresh(r,o)},setZoom:function(t){return this.zoom=t,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},refresh:function(t,e){void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var i=this.game.domContainer;if(i){this.baseSize.setCSS(i);var n=this.canvas.style,s=i.style;s.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",s.marginLeft=n.marginLeft,s.marginTop=n.marginTop}return this.emit(o.RESIZE,this.gameSize,this.baseSize,this.displaySize,this.resolution,t,e),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var t=u(this.width,this.height);t!==this.orientation&&(this.orientation=t,this.emit(o.ORIENTATION_CHANGE,t))}},updateScale:function(){var t,e,i=this.canvas.style,s=this.gameSize.width,r=this.gameSize.height,o=this.zoom,a=this.autoRound;this.scaleMode===n.SCALE_MODE.NONE?(this.displaySize.setSize(s*o*1,r*o*1),t=this.displaySize.width/1,e=this.displaySize.height/1,a&&(t=Math.floor(t),e=Math.floor(e)),this._resetZoom&&(i.width=t+"px",i.height=e+"px",this._resetZoom=!1)):this.scaleMode===n.SCALE_MODE.RESIZE?(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(1*this.displaySize.width,1*this.displaySize.height),t=this.displaySize.width/1,e=this.displaySize.height/1,a&&(t=Math.floor(t),e=Math.floor(e)),this.canvas.width=t,this.canvas.height=e):(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),t=this.displaySize.width/1,e=this.displaySize.height/1,a&&(t=Math.floor(t),e=Math.floor(e)),i.width=t+"px",i.height=e+"px"),this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var t=p(this.parentSize.width,this.gameSize.width,0,!0),e=p(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(t,e),1)},updateCenter:function(){var t=this.autoCenter;if(t!==n.CENTER.NO_CENTER){var e=this.canvas,i=e.style,s=e.getBoundingClientRect(),r=s.width,o=s.height,a=Math.floor((this.parentSize.width-r)/2),h=Math.floor((this.parentSize.height-o)/2);t===n.CENTER.CENTER_HORIZONTALLY?h=0:t===n.CENTER.CENTER_VERTICALLY&&(a=0),i.marginLeft=a+"px",i.marginTop=h+"px"}},updateBounds:function(){var t=this.canvasBounds,e=this.canvas.getBoundingClientRect();t.x=e.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),t.y=e.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),t.width=e.width,t.height=e.height},transformX:function(t){return(t-this.canvasBounds.left)*this.displayScale.x},transformY:function(t){return(t-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(t){void 0===t&&(t={navigationUI:"hide"});var e=this.fullscreen;if(e.available){if(!e.active){var i,n=this.getFullscreenTarget();(i=e.keyboard?n[e.request](Element.ALLOW_KEYBOARD_INPUT):n[e.request](t))?i.then(this.fullscreenSuccessHandler.bind(this)).catch(this.fullscreenErrorHandler.bind(this)):e.active?this.fullscreenSuccessHandler():this.fullscreenErrorHandler()}}else this.emit(o.FULLSCREEN_UNSUPPORTED)},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(o.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(t){this.removeFullscreenTarget(),this.emit(o.FULLSCREEN_FAILED,t)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var t=document.createElement("div");t.style.margin="0",t.style.padding="0",t.style.width="100%",t.style.height="100%",this.fullscreenTarget=t,this._createdFullscreenTarget=!0}this._createdFullscreenTarget&&(this.canvas.parentNode.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas));return this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var t=this.fullscreenTarget;if(t&&t.parentNode){var e=t.parentNode;e.insertBefore(this.canvas,t),e.removeChild(t)}}},stopFullscreen:function(){var t=this.fullscreen;if(!t.available)return this.emit(o.FULLSCREEN_UNSUPPORTED),!1;t.active&&document[t.cancel](),this.removeFullscreenTarget(),this.getParentBounds(),this.emit(o.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(t){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(t)},startListeners:function(){var t=this,e=this.listeners;if(e.orientationChange=function(){t._checkOrientation=!0,t.dirty=!0},e.windowResize=function(){t.dirty=!0},window.addEventListener("orientationchange",e.orientationChange,!1),window.addEventListener("resize",e.windowResize,!1),this.fullscreen.available){e.fullScreenChange=function(e){return t.onFullScreenChange(e)},e.fullScreenError=function(e){return t.onFullScreenError(e)};["webkit","moz",""].forEach(function(t){document.addEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.addEventListener(t+"fullscreenerror",e.fullScreenError,!1)}),document.addEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.addEventListener("MSFullscreenError",e.fullScreenError,!1)}},onFullScreenChange:function(){document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||this.stopFullscreen()},onFullScreenError:function(){this.removeFullscreenTarget()},step:function(t,e){this.parent&&(this._lastCheck+=e,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var t=this.listeners;window.removeEventListener("orientationchange",t.orientationChange,!1),window.removeEventListener("resize",t.windowResize,!1);["webkit","moz",""].forEach(function(e){document.removeEventListener(e+"fullscreenchange",t.fullScreenChange,!1),document.removeEventListener(e+"fullscreenerror",t.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",t.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",t.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===n.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===n.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=v},function(t,e,i){var n=i(20),s=i(0),r=i(105),o=i(3),a=new s({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=null),this._width=t,this._height=e,this._parent=n,this.aspectMode=i,this.aspectRatio=0===e?1:t/e,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new o},setAspectMode:function(t){return void 0===t&&(t=0),this.aspectMode=t,this.setSize(this._width,this._height)},setSnap:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.snapTo.set(t,e),this.setSize(this._width,this._height)},setParent:function(t){return this._parent=t,this.setSize(this._width,this._height)},setMin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.minWidth=n(t,0,this.maxWidth),this.minHeight=n(e,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(t,e){return void 0===t&&(t=Number.MAX_VALUE),void 0===e&&(e=t),this.maxWidth=n(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=n(e,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(t,e){switch(void 0===t&&(t=0),void 0===e&&(e=t),this.aspectMode){case a.NONE:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case a.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case a.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(r(e,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case a.FIT:this.constrain(t,e,!0);break;case a.ENVELOP:this.constrain(t,e,!1)}return this},setAspectRatio:function(t){return this.aspectRatio=t,this.setSize(this._width,this._height)},resize:function(t,e){return this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minWidth,this.maxWidth),e&&this._parent&&t>this._parent.width&&(t=Math.max(this.minWidth,this._parent.width)),t},getNewHeight:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minHeight,this.maxHeight),e&&this._parent&&t>this._parent.height&&(t=Math.max(this.minHeight,this._parent.height)),t},constrain:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=!0),t=this.getNewWidth(t),e=this.getNewHeight(e);var n=this.snapTo,s=0===e?1:t/e;return i&&this.aspectRatio>s||!i&&this.aspectRatio0&&(t=(e=r(e,n.y))*this.aspectRatio)):(i&&this.aspectRatios)&&(t=(e=r(e,n.y))*this.aspectRatio,n.x>0&&(e=(t=r(t,n.x))*(1/this.aspectRatio))),this._width=t,this._height=e,this},fitTo:function(t,e){return this.constrain(t,e,!0)},envelop:function(t,e){return this.constrain(t,e,!1)},setWidth:function(t){return this.setSize(t,this._height)},setHeight:function(t){return this.setSize(this._width,t)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(t){t&&t.style&&(t.style.width=this._width+"px",t.style.height=this._height+"px")},copy:function(t){return t.setAspectMode(this.aspectMode),t.aspectRatio=this.aspectRatio,t.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(t){this.setSize(t,this._height)}},height:{get:function(){return this._height},set:function(t){this.setSize(this._width,t)}}});a.NONE=0,a.WIDTH_CONTROLS_HEIGHT=1,a.HEIGHT_CONTROLS_WIDTH=2,a.FIT=3,a.ENVELOP=4,t.exports=a},function(t,e,i){var n=i(0),s=i(132),r=i(18),o=i(21),a=i(5),h=i(87),l=i(2),u=i(398),c=i(193),d=new n({initialize:function(t,e){if(this.game=t,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,e){Array.isArray(e)||(e=[e]);for(var i=0;i-1&&(delete this.keys[n],this.scenes.splice(i,1),this._start.indexOf(n)>-1&&(i=this._start.indexOf(n),this._start.splice(i,1)),e.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,n=i.settings;t.init&&(t.init.call(t,n.data),n.status=s.INIT,n.isTransition&&i.events.emit(r.TRANSITION_INIT,n.transitionFrom,n.transitionDuration)),i.load&&(e=i.load).reset(),e&&t.preload?(t.preload.call(t),0===e.list.size?this.create(t):(n.status=s.LOADING,e.once(h.COMPLETE,this.loadComplete,this),e.start())):this.create(t)},loadComplete:function(t){var e=t.scene;this.game.sound&&this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(e)},payloadComplete:function(t){this.bootScene(t.scene)},update:function(t,e){this.processQueue(),this.isProcessing=!0;for(var i=this.scenes.length-1;i>=0;i--){var n=this.scenes[i].sys;n.settings.status>s.START&&n.settings.status<=s.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e=s.LOADING&&i.settings.status0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,n=this.getScene(t),s=this.getAt(i);this.scenes[e]=s,this.scenes[i]=n}}return this},moveUp:function(t){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e=r.x&&t=r.y&&e=r.x&&t=r.y&&e-1){var o=this.context.getImageData(t,e,1,1);o.data[0]=i,o.data[1]=n,o.data[2]=s,o.data[3]=r,this.context.putImageData(o,t,e)}return this},putData:function(t,e,i,n,s,r,o){return void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=t.width),void 0===o&&(o=t.height),this.context.putImageData(t,e,i,n,s,r,o),this},getData:function(t,e,i,n){return t=s(Math.floor(t),0,this.width-1),e=s(Math.floor(e),0,this.height-1),i=s(i,1,this.width-t),n=s(n,1,this.height-e),this.context.getImageData(t,e,i,n)},getPixel:function(t,e,i){i||(i=new r);var n=this.getIndex(t,e);if(n>-1){var s=this.data,o=s[n+0],a=s[n+1],h=s[n+2],l=s[n+3];i.setTo(o,a,h,l)}return i},getPixels:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=i),t=Math.abs(Math.round(t)),e=Math.abs(Math.round(e));for(var o=s(t,0,this.width),a=s(t+i,0,this.width),h=s(e,0,this.height),l=s(e+n,0,this.height),u=new r,c=[],d=h;d0)&&(!!n.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(r.PAUSE,this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!n.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit(r.RESUME,this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!n.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit(r.STOP,this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t0)this.startTime=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s=n)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit(r.COMPLETE,this);this.previousTime=s}},destroy:function(){n.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=this.currentConfig.volume*this.manager.volume)},calculateRate:function(){n.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.updateMute(),this.emit(r.MUTE,this,t))}},setMute:function(t){return this.mute=t,this},volume:{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.updateVolume(),this.emit(r.VOLUME,this,t))}},setVolume:function(t){return this.volume=t,this},rate:{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,r.RATE,t)||(this.calculateRate(),this.emit(r.RATE,this,t))}},setRate:function(t){return this.rate=t,this},detune:{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,r.DETUNE,t)||(this.calculateRate(),this.emit(r.DETUNE,this,t))}},setDetune:function(t){return this.detune=t,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit(r.SEEK,this,t))}},setSeek:function(t){return this.seek=t,this},loop:{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit(r.LOOP,this,t))}},setLoop:function(t){return this.loop=t,this}});t.exports=o},function(t,e,i){var n=i(133),s=i(0),r=i(9),o=i(408),a=i(2),h=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return n.prototype.remove.call(this,t)},removeByKey:function(t){return n.prototype.removeByKey.call(this,t)},pauseAll:a,resumeAll:a,stopAll:a,update:a,setRate:a,setDetune:a,setMute:a,setVolume:a,forEachActiveSound:function(t,e){n.prototype.forEachActiveSound.call(this,t,e)},destroy:function(){n.prototype.destroy.call(this)}});t.exports=h},function(t,e,i){var n=i(134),s=i(0),r=i(9),o=i(17),a=new s({Extends:r,initialize:function(t,e,i){void 0===i&&(i={}),r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!1},updateMarker:function(t){return!1},removeMarker:function(t){return null},play:function(t,e){return!1},pause:function(){return!1},resume:function(){return!1},stop:function(){return!1},destroy:function(){this.manager.remove(this),n.prototype.destroy.call(this)}});t.exports=a},function(t,e,i){var n=i(410),s=i(133),r=i(0),o=i(64),a=i(411),h=new r({Extends:s,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&("ontouchstart"in window||"onclick"in window),s.call(this,t),this.locked&&this.unlock()},createAudioContext:function(t){var e=t.config.audio;return e&&e.context?(e.context.resume(),e.context):new AudioContext},setAudioContext:function(t){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=t,this.masterMuteNode=t.createGain(),this.masterVolumeNode=t.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(t.destination),this.destination=this.masterMuteNode,this},add:function(t,e){var i=new a(this,t,e);return this.sounds.push(i),i},decodeAudio:function(t,e){var i;i=Array.isArray(t)?t:[{key:t,data:e}];for(var s=this.game.cache.audio,r=i.length,a=0;a>4,u[h++]=(15&i)<<4|s>>2,u[h++]=(3&s)<<6|63&r;return l}},function(t,e,i){var n=i(134),s=i(0),r=i(64),o=new s({Extends:n,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('There is no audio asset with key "'+e+'" in the audio cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,n.call(this,t,e,i)},play:function(t,e){return!!n.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime1e3)return console.warn("Switch Game data too long. Max 1000 chars."),this;var i=this;return FBInstant.switchGameAsync(t,e).then(function(){i.emit("switchgame",t)}).catch(function(t){i.emit("switchgamefail",t)}),this},createShortcut:function(){var t=this;return FBInstant.canCreateShortcutAsync().then(function(e){e&&FBInstant.createShortcutAsync().then(function(){t.emit("shortcutcreated")}).catch(function(e){t.emit("shortcutfailed",e)})}),this},quit:function(){FBInstant.quit()},log:function(t,e,i){return this.checkAPI("logEvent")?(void 0===i&&(i={}),t.length>=2&&t.length<=40&&FBInstant.logEvent(t,parseFloat(e),i),this):this},preloadAds:function(t){if(!this.checkAPI("getInterstitialAdAsync"))return this;var e;Array.isArray(t)||(t=[t]);var i=this,s=0;for(e=0;e=3)return console.warn("Too many AdInstances. Show an ad before loading more"),this;for(e=0;e=3)return console.warn("Too many AdInstances. Show an ad before loading more"),this;for(e=0;e-1;r--)n[s][r]=t[r][s]}return n}},function(t,e){function i(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function n(t,e){return te?1:0}var s=function(t,e,r,o,a){for(void 0===r&&(r=0),void 0===o&&(o=t.length-1),void 0===a&&(a=n);o>r;){if(o-r>600){var h=o-r+1,l=e-r+1,u=Math.log(h),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),f=Math.max(r,Math.floor(e-l*c/h+d)),p=Math.min(o,Math.floor(e+(h-l)*c/h+d));s(t,e,f,p,a)}var g=t[e],v=r,y=o;for(i(t,r,e),a(t[o],g)>0&&i(t,r,o);v0;)y--}0===a(t[r],g)?i(t,r,y):i(t,++y,o),y<=e&&(r=y+1),e<=y&&(o=y-1)}};t.exports=s},function(t,e,i){var n=i(5),s=i(122),r=function(t,e,i){for(var n=[],s=0;s0?s.delayedPlay(d,r,o):s.load(r)}return t}},function(t,e,i){var n=i(11);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=Math.min(t.x,e.x),r=Math.min(t.y,e.y),o=Math.max(t.right,e.right)-s,a=Math.max(t.bottom,e.bottom)-r;return i.setTo(s,r,o,a)}},function(t,e,i){var n=i(0),s=i(12),r=i(987),o=i(14),a=i(7),h=i(191),l=i(18),u=i(352),c=new n({Extends:o,Mixins:[s.AlphaSingle,s.BlendMode,s.Depth,s.Origin,s.ScrollFactor,s.Transform,s.Visible,r],initialize:function(t,e,i,n,s,r){o.call(this,t,"DOMElement"),this.parent=t.sys.game.domContainer,this.cache=t.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new u,this.rotate3dAngle="deg",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(e,i),"string"==typeof n?"#"===n[0]?this.setElement(n.substr(1),s,r):this.createElement(n,s,r):n&&this.setElement(n,s,r),t.sys.events.on(l.SLEEP,this.handleSceneEvent,this),t.sys.events.on(l.WAKE,this.handleSceneEvent,this)},handleSceneEvent:function(t){var e=this.node,i=e.style;e&&(i.display=t.settings.visible?"block":"none")},setSkew:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.skewX=t,this.skewY=e,this},setPerspective:function(t){return this.parent.style.perspective=t+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(t){this.parent.style.perspective=t+"px"}},addListener:function(t){if(this.node){t=t.split(" ");for(var e=0;e>>16,m=(65280&p)>>>8,x=255&p,c.strokeStyle="rgba("+y+","+m+","+x+","+d+")",c.lineWidth=v,T+=3;break;case n.FILL_STYLE:g=l[T+1],f=l[T+2],y=(16711680&g)>>>16,m=(65280&g)>>>8,x=255&g,c.fillStyle="rgba("+y+","+m+","+x+","+f+")",T+=2;break;case n.BEGIN_PATH:c.beginPath();break;case n.CLOSE_PATH:c.closePath();break;case n.FILL_PATH:h||c.fill();break;case n.STROKE_PATH:h||c.stroke();break;case n.FILL_RECT:h?c.rect(l[T+1],l[T+2],l[T+3],l[T+4]):c.fillRect(l[T+1],l[T+2],l[T+3],l[T+4]),T+=4;break;case n.FILL_TRIANGLE:c.beginPath(),c.moveTo(l[T+1],l[T+2]),c.lineTo(l[T+3],l[T+4]),c.lineTo(l[T+5],l[T+6]),c.closePath(),h||c.fill(),T+=6;break;case n.STROKE_TRIANGLE:c.beginPath(),c.moveTo(l[T+1],l[T+2]),c.lineTo(l[T+3],l[T+4]),c.lineTo(l[T+5],l[T+6]),c.closePath(),h||c.stroke(),T+=6;break;case n.LINE_TO:c.lineTo(l[T+1],l[T+2]),T+=2;break;case n.MOVE_TO:c.moveTo(l[T+1],l[T+2]),T+=2;break;case n.LINE_FX_TO:c.lineTo(l[T+1],l[T+2]),T+=5;break;case n.MOVE_FX_TO:c.moveTo(l[T+1],l[T+2]),T+=5;break;case n.SAVE:c.save();break;case n.RESTORE:c.restore();break;case n.TRANSLATE:c.translate(l[T+1],l[T+2]),T+=2;break;case n.SCALE:c.scale(l[T+1],l[T+2]),T+=2;break;case n.ROTATE:c.rotate(l[T+1]),T+=1;break;case n.GRADIENT_FILL_STYLE:T+=5;break;case n.GRADIENT_LINE_STYLE:T+=6;break;case n.SET_TEXTURE:T+=2}c.restore()}}},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(t,e,i,n,r){if("object"==typeof t){var o=t;t=s(o,"x",0),e=s(o,"y",0),i=s(o,"power",0),n=s(o,"epsilon",100),r=s(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i=this.x-t.x,n=this.y-t.y,s=i*i+n*n;if(0!==s){var r=Math.sqrt(s);s0},resetPosition:function(){this.x=0,this.y=0},fire:function(t,e){var i=this.emitter;this.frame=i.getFrame(),i.emitZone&&i.emitZone.getPoint(this),void 0===t?(i.follow&&(this.x+=i.follow.x+i.followOffset.x),this.x+=i.x.onEmit(this,"x")):this.x+=t,void 0===e?(i.follow&&(this.y+=i.follow.y+i.followOffset.y),this.y+=i.y.onEmit(this,"y")):this.y+=e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var n=i.speedX.onEmit(this,"speedX"),o=i.speedY?i.speedY.onEmit(this,"speedY"):n;if(i.radial){var a=s(i.angle.onEmit(this,"angle"));this.velocityX=Math.cos(a)*Math.abs(n),this.velocityY=Math.sin(a)*Math.abs(o)}else if(i.moveTo){var h=i.moveToX.onEmit(this,"moveToX"),l=i.moveToY?i.moveToY.onEmit(this,"moveToY"):h,u=Math.atan2(l-this.y,h-this.x),c=r(this.x,this.y,h,l)/(this.life/1e3);this.velocityX=Math.cos(u)*c,this.velocityY=Math.sin(u)*c}else this.velocityX=n,this.velocityY=o;i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY?i.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=s(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint")},computeVelocity:function(t,e,i,n){var s=this.velocityX,r=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,l=this.maxVelocityY;s+=t.gravityX*i,r+=t.gravityY*i,o&&(s+=o*i),a&&(r+=a*i),s>h?s=h:s<-h&&(s=-h),r>l?r=l:r<-l&&(r=-l),this.velocityX=s,this.velocityY=r;for(var u=0;ue.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(this.delayCurrent>0)return this.delayCurrent-=t,!1;var n=this.emitter,r=1-this.lifeCurrent/this.life;return this.lifeT=r,this.computeVelocity(n,t,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,n.bounds&&this.checkBounds(n),n.deathZone&&n.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=n.scaleX.onUpdate(this,"scaleX",r,this.scaleX),n.scaleY?this.scaleY=n.scaleY.onUpdate(this,"scaleY",r,this.scaleY):this.scaleY=this.scaleX,this.angle=n.rotate.onUpdate(this,"rotate",r,this.angle),this.rotation=s(this.angle),this.alpha=n.alpha.onUpdate(this,"alpha",r,this.alpha),this.tint=n.tint.onUpdate(this,"tint",r,this.tint),this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=o},function(t,e,i){var n=i(43),s=i(0),r=i(12),o=i(428),a=i(429),h=i(1004),l=i(1),u=i(198),c=i(430),d=i(91),f=i(426),p=i(431),g=i(11),v=i(137),y=i(3),m=i(63),x=new s({Mixins:[r.BlendMode,r.Mask,r.ScrollFactor,r.Visible],initialize:function(t,e){this.manager=t,this.texture=t.texture,this.frames=[t.defaultFrame],this.defaultFrame=t.defaultFrame,this.configFastMap=["active","blendMode","collideBottom","collideLeft","collideRight","collideTop","deathCallback","deathCallbackScope","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxParticles","name","on","particleBringToTop","particleClass","radial","timeScale","trackVisible","visible"],this.configOpMap=["accelerationX","accelerationY","angle","alpha","bounce","delay","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],this.name="",this.particleClass=f,this.x=new h(e,"x",0,!0),this.y=new h(e,"y",0,!0),this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.accelerationX=new h(e,"accelerationX",0,!0),this.accelerationY=new h(e,"accelerationY",0,!0),this.maxVelocityX=new h(e,"maxVelocityX",1e4,!0),this.maxVelocityY=new h(e,"maxVelocityY",1e4,!0),this.speedX=new h(e,"speedX",0,!0),this.speedY=new h(e,"speedY",0,!0),this.moveTo=!1,this.moveToX=new h(e,"moveToX",0,!0),this.moveToY=new h(e,"moveToY",0,!0),this.bounce=new h(e,"bounce",0,!0),this.scaleX=new h(e,"scaleX",1),this.scaleY=new h(e,"scaleY",1),this.tint=new h(e,"tint",4294967295),this.alpha=new h(e,"alpha",1),this.lifespan=new h(e,"lifespan",1e3,!0),this.angle=new h(e,"angle",{min:0,max:360},!0),this.rotate=new h(e,"rotate",0),this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.quantity=new h(e,"quantity",1,!0),this.delay=new h(e,"delay",0,!0),this.frequency=0,this.on=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZone=null,this.deathZone=null,this.bounds=null,this.collideLeft=!0,this.collideRight=!0,this.collideTop=!0,this.collideBottom=!0,this.active=!0,this.visible=!0,this.blendMode=n.NORMAL,this.follow=null,this.followOffset=new y,this.trackVisible=!1,this.currentFrame=0,this.randomFrame=!0,this.frameQuantity=1,this.dead=[],this.alive=[],this._counter=0,this._frameCounter=0,e&&this.fromJSON(e)},fromJSON:function(t){if(!t)return this;var e=0,i="";for(e=0;e0&&this.getParticleCount()===this.maxParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,n=i.length,s=0;s0){var u=this.deathCallback,c=this.deathCallbackScope;for(o=h-1;o>=0;o--){var d=a[o];s.splice(d.index,1),r.push(d.particle),u&&u.call(c,d.particle),d.particle.resetPosition()}}this.on&&(0===this.frequency?this.emitParticle():this.frequency>0&&(this._counter-=e,this._counter<=0&&(this.emitParticle(),this._counter=this.frequency-Math.abs(this._counter))))},depthSortCallback:function(t,e){return t.y-e.y}});t.exports=x},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=this.source.contains(t.x,t.y);return e&&this.killOnEnter||!e&&!this.killOnEnter}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s){void 0===n&&(n=!1),void 0===s&&(s=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=s,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=n},function(t,e){t.exports=function(t,e){for(var i=0;i0&&(s=-h.PI2+s%h.PI2):s>h.PI2?s=h.PI2:s<0&&(s=h.PI2+s%h.PI2);for(var u,c=[a+Math.cos(n)*i,l+Math.sin(n)*i];e<1;)u=s*e+n,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),e+=t;return u=s+n,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),c.push(a+Math.cos(n)*i,l+Math.sin(n)*i),this.pathIndexes=o(c),this.pathData=c,this}});t.exports=u},function(t,e,i){var n=i(0),s=i(1030),r=i(72),o=i(11),a=i(33),h=new n({Extends:a,Mixins:[s],initialize:function(t,e,i,n,s,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",n),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==s&&this.setFillStyle(s,r),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){var t=this._curveBounds,e=this._smoothness;this.geom.getBounds(t,e),this.setSize(t.width,t.height),this.updateDisplayOrigin();for(var i=[],n=this.geom.getPoints(e),s=0;sc+v)){var y=g.getPoint((u-c)/v);o.push(y);break}c+=v}return o}},function(t,e,i){var n=i(62),s=i(61);t.exports=function(t){for(var e=t.points,i=0,r=0;r0&&r.push(i([0,0],n[0])),e=0;e1&&r.push(i([0,0],n[n.length-1])),t.setTo(r)}},function(t,e,i){var n=i(0),s=i(11),r=i(33),o=i(1051),a=new n({Extends:r,Mixins:[o],initialize:function(t,e,i,n,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===o&&(o=128),r.call(this,t,"Rectangle",new s(0,0,n,o)),this.setPosition(e,i),this.setSize(n,o),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),e.getLineD(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=a},function(t,e,i){var n=i(1054),s=i(0),r=i(72),o=i(33),a=new s({Extends:o,Mixins:[n],initialize:function(t,e,i,n,s,r,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=5),void 0===s&&(s=32),void 0===r&&(r=64),o.call(this,t,"Star",null),this._points=n,this._innerRadius=s,this._outerRadius=r,this.setPosition(e,i),this.setSize(2*r,2*r),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},setPoints:function(t){return this._points=t,this.updateData()},setInnerRadius:function(t){return this._innerRadius=t,this.updateData()},setOuterRadius:function(t){return this._outerRadius=t,this.updateData()},points:{get:function(){return this._points},set:function(t){this._points=t,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(t){this._innerRadius=t,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(t){this._outerRadius=t,this.updateData()}},updateData:function(){var t=[],e=this._points,i=this._innerRadius,n=this._outerRadius,s=Math.PI/2*3,o=Math.PI/e,a=n,h=n;t.push(a,h+-n);for(var l=0;l=1)return i.x=r.x1,i.y=r.y1,i;var h=s(r),l=s(o),u=s(a),c=(h+l+u)*e,d=0;return ch+l?(d=(c-=h+l)/u,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/l,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},function(t,e,i){var n=i(62),s=i(4);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),l=n(o),u=n(a),c=n(h),d=l+u+c;e||(e=d/i);for(var f=0;fl+u?(g=(p-=l+u)/c,v.x=h.x1+(h.x2-h.x1)*g,v.y=h.y1+(h.y2-h.y1)*g):(g=(p-=l)/u,v.x=a.x1+(a.x2-a.x1)*g,v.y=a.y1+(a.y2-a.y1)*g),r.push(v)}return r}},function(t,e){t.exports=function(t,e,i){if(!t||"number"==typeof t)return!1;if(t.hasOwnProperty(e))return t[e]=i,!0;if(-1!==e.indexOf(".")){for(var n=e.split("."),s=t,r=t,o=0;o0?(h=this.lightPool.pop()).set(t,e,i,a[0],a[1],a[2],o):h=new s(t,e,i,a[0],a[1],a[2],o),this.lights.push(h),h},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&(this.lightPool.push(t),this.lights.splice(e,1)),this},shutdown:function(){for(;this.lights.length>0;)this.lightPool.push(this.lights.pop());this.ambientColor={r:.1,g:.1,b:.1},this.culledLights.length=0,this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=o},function(t,e,i){var n=i(52),s=i(17),r={Circle:i(1115),Ellipse:i(1125),Intersects:i(454),Line:i(1144),Point:i(1165),Polygon:i(1179),Rectangle:i(467),Triangle:i(1209)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={CircleToCircle:i(217),CircleToRectangle:i(218),GetCircleToCircle:i(1135),GetCircleToRectangle:i(1136),GetLineToCircle:i(219),GetLineToRectangle:i(221),GetRectangleIntersection:i(1137),GetRectangleToRectangle:i(1138),GetRectangleToTriangle:i(1139),GetTriangleToCircle:i(1140),GetTriangleToLine:i(459),GetTriangleToTriangle:i(1141),LineToCircle:i(220),LineToLine:i(93),LineToRectangle:i(455),PointToLine:i(463),PointToLineSegment:i(1142),RectangleToRectangle:i(140),RectangleToTriangle:i(456),RectangleToValues:i(1143),TriangleToCircle:i(458),TriangleToLine:i(460),TriangleToTriangle:i(461)}},function(t,e){t.exports=function(t,e){var i=t.x1,n=t.y1,s=t.x2,r=t.y2,o=e.x,a=e.y,h=e.right,l=e.bottom,u=0;if(i>=o&&i<=h&&n>=a&&n<=l||s>=o&&s<=h&&r>=a&&r<=l)return!0;if(i=o){if((u=n+(r-n)*(o-i)/(s-i))>a&&u<=l)return!0}else if(i>h&&s<=h&&(u=n+(r-n)*(h-i)/(s-i))>=a&&u<=l)return!0;if(n=a){if((u=i+(s-i)*(a-n)/(r-n))>=o&&u<=h)return!0}else if(n>l&&r<=l&&(u=i+(s-i)*(l-n)/(r-n))>=o&&u<=h)return!0;return!1}},function(t,e,i){var n=i(93),s=i(53),r=i(222),o=i(457);t.exports=function(t,e){if(e.left>t.right||e.rightt.bottom||e.bottom0}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},function(t,e,i){var n=i(220),s=i(92);t.exports=function(t,e){return!(t.left>e.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottom0||(c=s(e),(d=n(t,c,!0)).length>0)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},function(t,e){t.exports=function(t,e,i){void 0===i&&(i=1);var n=e.x1,s=e.y1,r=e.x2,o=e.y2,a=t.x,h=t.y,l=(r-n)*(r-n)+(o-s)*(o-s);if(0===l)return!1;var u=((a-n)*(r-n)+(h-s)*(o-s))/l;if(u<0)return Math.sqrt((n-a)*(n-a)+(s-h)*(s-h))<=i;if(u>=0&&u<=1){var c=((s-h)*(r-n)-(n-a)*(o-s))/l;return Math.abs(c)*Math.sqrt(l)<=i}return Math.sqrt((r-a)*(r-a)+(o-h)*(o-h))<=i}},function(t,e,i){var n=i(13),s=i(63),r=i(94);t.exports=function(t){var e=r(t)-n.TAU;return s(e,-Math.PI,Math.PI)}},function(t,e){t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},function(t,e){t.exports=function(t){return t.x*t.x+t.y*t.y}},function(t,e,i){var n=i(11);n.Area=i(1184),n.Ceil=i(1185),n.CeilAll=i(1186),n.CenterOn=i(178),n.Clone=i(1187),n.Contains=i(53),n.ContainsPoint=i(1188),n.ContainsRect=i(468),n.CopyFrom=i(1189),n.Decompose=i(457),n.Equals=i(1190),n.FitInside=i(1191),n.FitOutside=i(1192),n.Floor=i(1193),n.FloorAll=i(1194),n.FromPoints=i(189),n.GetAspectRatio=i(224),n.GetCenter=i(1195),n.GetPoint=i(161),n.GetPoints=i(293),n.GetSize=i(1196),n.Inflate=i(1197),n.Intersection=i(1198),n.MarchingAnts=i(304),n.MergePoints=i(1199),n.MergeRect=i(1200),n.MergeXY=i(1201),n.Offset=i(1202),n.OffsetPoint=i(1203),n.Overlaps=i(1204),n.Perimeter=i(120),n.PerimeterPoint=i(1205),n.Random=i(164),n.RandomOutside=i(1206),n.SameDimensions=i(1207),n.Scale=i(1208),n.Union=i(417),t.exports=n},function(t,e){t.exports=function(t,e){return!(e.width*e.height>t.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(s.BUTTON_DOWN,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(s.BUTTON_UP,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},function(t,e,i){var n=i(473),s=i(474),r=i(0),o=i(9),a=i(3),h=new r({Extends:o,initialize:function(t,e){o.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],r=0;r=2&&(this.leftStick.set(r[0].getValue(),r[1].getValue()),s>=4&&this.rightStick.set(r[2].getValue(),r[3].getValue()))},destroy:function(){var t;for(this.removeAllListeners(),this.manager=null,this.pad=null,t=0;t=r;for(i=0;i=r;)this._elapsed-=r,this.step(s)}},step:function(t){var e,i,n=this.bodies.entries,s=n.length;for(e=0;e0){var l=this.tree,u=this.staticTree;for(n=(i=h.entries).length,t=0;t-1&&p>g&&(t.velocity.normalize().scale(g),p=g),t.speed=p},separate:function(t,e,i,n,s){if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,s);if(t.isCircle!==e.isCircle){var r=t.isCircle?e:t,o=t.isCircle?t:e,a={x:r.x,y:r.y,right:r.right,bottom:r.bottom},h=o.center;if((h.ya.bottom)&&(h.xa.right))return this.separateCircle(t,e,s)}var l=!1,c=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)r.right&&(s=h(o.x,o.y,r.right,r.y)-o.radius):o.y>r.bottom&&(o.xr.right&&(s=h(o.x,o.y,r.right,r.bottom)-o.radius)),s*=-1}else s=t.halfWidth+e.halfWidth-h(t.center.x,t.center.y,e.center.x,e.center.y);if(i||0===s||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==s&&(t.onOverlap||e.onOverlap)&&this.emit(u.OVERLAP,t.gameObject,e.gameObject,t,e),0!==s;var a=t.center.x-e.center.x,l=t.center.y-e.center.y,c=Math.sqrt(Math.pow(a,2)+Math.pow(l,2)),d=(e.center.x-t.center.x)/c||0,f=(e.center.y-t.center.y)/c||0,v=2*(t.velocity.x*d+t.velocity.y*f-e.velocity.x*d-e.velocity.y*f)/(t.mass+e.mass);t.immovable||(t.velocity.x=t.velocity.x-v*t.mass*d,t.velocity.y=t.velocity.y-v*t.mass*f),e.immovable||(e.velocity.x=e.velocity.x+v*e.mass*d,e.velocity.y=e.velocity.y+v*e.mass*f);var y=e.velocity.x-t.velocity.x,m=e.velocity.y-t.velocity.y,x=Math.atan2(m,y),T=this._frameTime;return t.immovable||e.immovable||(s/=2),t.immovable||(t.x+=t.velocity.x*T-s*Math.cos(x),t.y+=t.velocity.y*T-s*Math.sin(x)),e.immovable||(e.x+=e.velocity.x*T+s*Math.cos(x),e.y+=e.velocity.y*T+s*Math.sin(x)),t.velocity.x*=t.bounce.x,t.velocity.y*=t.bounce.y,e.velocity.x*=e.bounce.x,e.velocity.y*=e.bounce.y,(t.onCollide||e.onCollide)&&this.emit(u.COLLIDE,t.gameObject,e.gameObject,t,e),!0},intersects:function(t,e){return t!==e&&(t.isCircle||e.isCircle?t.isCircle?e.isCircle?h(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):this.circleBodyIntersects(e,t):!(t.right<=e.position.x||t.bottom<=e.position.y||t.position.x>=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=s(t.center.x,e.left,e.right),n=s(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o,a;t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var h=Array.isArray(t),l=Array.isArray(e);if(this._total=0,h||l)if(!h&&l)for(o=0;o0},collideHandler:function(t,e,i,n,s,r){if(void 0===e&&t.isParent)return this.collideGroupVsGroup(t,t,i,n,s,r);if(!t||!e)return!1;if(t.body){if(e.body)return this.collideSpriteVsSprite(t,e,i,n,s,r);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,n,s,r)}else if(t.isParent){if(e.body)return this.collideSpriteVsGroup(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,n,s,r)}else if(t.isTilemap){if(e.body)return this.collideSpriteVsTilemapLayer(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,n,s,r)}},collideSpriteVsSprite:function(t,e,i,n,s,r){return!(!t.body||!e.body)&&(this.separate(t.body,e.body,n,s,r)&&(i&&i.call(s,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,n,s,r){var o,h,l,u=t.body;if(0!==e.length&&u&&u.enable)if(this.useTree){var c=this.treeMinMax;c.minX=u.left,c.minY=u.top,c.maxX=u.right,c.maxY=u.bottom;var d=e.physicsType===a.DYNAMIC_BODY?this.tree.search(c):this.staticTree.search(c);for(h=d.length,o=0;oc.baseTileWidth){var d=(c.tileWidth-c.baseTileWidth)*e.scaleX;a-=d,l+=d}c.tileHeight>c.baseTileHeight&&(u+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var f=e.getTilesWithinWorldXY(a,h,l,u);return 0!==f.length&&this.collideSpriteVsTilesHandler(t,f,i,n,s,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,n,s,r,o){for(var a,h,l=t.body,c={left:0,right:0,top:0,bottom:0},d=!1,f=0;f0&&t>i&&(t=i)),0!==n&&0!==e&&(e<0&&e<-n?e=-n:e>0&&e>n&&(e=n)),this.gameObject.x+=t,this.gameObject.y+=e}t<0?this.facing=s.FACING_LEFT:t>0&&(this.facing=s.FACING_RIGHT),e<0?this.facing=s.FACING_UP:e>0&&(this.facing=s.FACING_DOWN),this.allowRotation&&(this.gameObject.angle+=this.deltaZ()),this._tx=t,this._ty=e},setBoundsRectangle:function(t){return this.customBoundsRectangle=t||this.world.bounds,this},checkWorldBounds:function(){var t=this.position,e=this.customBoundsRectangle,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,s=this.worldBounce?-this.worldBounce.y:-this.bounce.y,r=!1;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,this.blocked.right=!0,r=!0),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,this.blocked.down=!0,r=!0),r&&(this.blocked.none=!1),r},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this.updateCenter(),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;if(!t&&n.frame&&(t=n.frame.realWidth),!e&&n.frame&&(e=n.frame.realHeight),this.sourceWidth=t,this.sourceHeight=e,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),i&&n.getCenter){var s=n.displayWidth/2,r=n.displayHeight/2;this.offset.set(s-this.halfWidth,r-this.halfHeight)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i.setPosition(t,e),i.getTopLeft?i.getTopLeft(this.position):this.position.set(t,e),this.prev.copy(this.position),this.prevFrame.copy(this.position),this.rotation=i.angle,this.preRotation=i.angle,this.updateBounds(),this.updateCenter()},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?this.radius>0&&t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom&&(this.center.x-t)*(this.center.x-t)+(this.center.y-e)*(this.center.y-e)<=this.radius*this.radius:h(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.width/2):(this.checkCollision.up&&t.lineBetween(e.x,e.y,e.x+this.width,e.y),this.checkCollision.right&&t.lineBetween(e.x+this.width,e.y,e.x+this.width,e.y+this.height),this.checkCollision.down&&t.lineBetween(e.x,e.y+this.height,e.x+this.width,e.y+this.height),this.checkCollision.left&&t.lineBetween(e.x,e.y,e.x,e.y+this.height))),this.debugShowVelocity&&(t.lineStyle(t.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,n,i+this.velocity.x/2,n+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t,e,i){void 0===t&&(t=!0),this.collideWorldBounds=t;var n=void 0!==e,s=void 0!==i;return(n||s)&&(this.worldBounce||(this.worldBounce=new l),n&&(this.worldBounce.x=e),s&&(this.worldBounce.y=i)),this},setVelocity:function(t,e){return this.velocity.set(t,e),t=this.velocity.x,e=this.velocity.y,this.speed=Math.sqrt(t*t+e*e),this},setVelocityX:function(t){this.velocity.x=t;var e=t,i=this.velocity.y;return this.speed=Math.sqrt(e*e+i*i),this},setVelocityY:function(t){this.velocity.y=t;var e=this.velocity.x,i=t;return this.speed=Math.sqrt(e*e+i*i),this},setMaxVelocity:function(t,e){return this.maxVelocity.set(t,e),this},setMaxSpeed:function(t){return this.maxSpeed=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setAllowDrag:function(t){return void 0===t&&(t=!0),this.allowDrag=t,this},setAllowGravity:function(t){return void 0===t&&(t=!0),this.allowGravity=t,this},setAllowRotation:function(t){return void 0===t&&(t=!0),this.allowRotation=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return void 0===t&&(t=!0),this.immovable=t,this},setEnable:function(t){return void 0===t&&(t=!0),this.enable=t,this},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=u},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=n,this.collideCallback=s,this.processCallback=r,this.callbackContext=o},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=n},function(t,e,i){var n=i(58);t.exports=function(t,e,i,s){var r=0,o=t.deltaAbsX()+e.deltaAbsX()+s;return 0===t._dx&&0===e._dx?(t.embedded=!0,e.embedded=!0):t._dx>e._dx?(r=t.right-e.x)>o&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?r=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.right=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.left=!0)):t._dxo&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?r=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.left=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.right=!0))),t.overlapX=r,e.overlapX=r,r}},function(t,e,i){var n=i(58);t.exports=function(t,e,i,s){var r=0,o=t.deltaAbsY()+e.deltaAbsY()+s;return 0===t._dy&&0===e._dy?(t.embedded=!0,e.embedded=!0):t._dy>e._dy?(r=t.bottom-e.y)>o&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?r=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.down=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.up=!0)):t._dyo&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?r=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.up=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.down=!0))),t.overlapY=r,e.overlapY=r,r}},function(t,e,i){var n=i(414);function s(t){if(!(this instanceof s))return new s(t,[".left",".top",".right",".bottom"]);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}function r(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,i,s,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=s||(o=e+Math.ceil((i-e)/s/2)*s,n(t,o,e,i,r),a.push(e,o,o,i))}s.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!p(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;s=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),a=g(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,s,r,o,h,l,u,d,f,p,g,v,y,m;for(l=u=1/0,n=e;n<=i-e;n++)s=a(t,0,n,this.toBBox),r=a(t,n,i,this.toBBox),f=s,p=r,void 0,void 0,void 0,void 0,g=Math.max(f.minX,p.minX),v=Math.max(f.minY,p.minY),y=Math.min(f.maxX,p.maxX),m=Math.min(f.maxY,p.maxY),o=Math.max(0,y-g)*Math.max(0,m-v),h=c(s)+c(r),o=e;s--)r=t.children[s],h(u,t.leaf?o(r):r),c+=d(u);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)h(e[n],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},compareMinX:function(t,e){return t.left-e.left},compareMinY:function(t,e){return t.top-e.top},toBBox:function(t){return{minX:t.left,minY:t.top,maxX:t.right,maxY:t.bottom}}},t.exports=s},function(t,e){t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},function(t,e,i){var n=i(60),s=i(0),r=i(58),o=i(53),a=i(3),h=new s({initialize:function(t,e){var i=e.width?e.width:64,n=e.height?e.height:64;this.world=t,this.gameObject=e,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(e.x-e.displayOriginX,e.y-e.displayOriginY),this.width=i,this.height=n,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new a(e.x+this.halfWidth,e.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY,this._dx=0,this._dy=0},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(t,e){return void 0===e&&(e=t),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(t,e),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;if(!t&&n.frame&&(t=n.frame.realWidth),!e&&n.frame&&(e=n.frame.realHeight),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),i&&n.getCenter){var s=n.displayWidth/2,r=n.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(s-this.halfWidth,r-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.setPosition(t,e),i.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):o(this,t,e)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?t.strokeCircle(i,n,this.width/2):t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=h},function(t,e,i){var n=i(0),s=i(112),r=i(1317),o=i(113),a=i(1318),h=new n({initialize:function(t,e,i,n,r){void 0===n&&(n=16),void 0===r&&(r=n),this.world=t,this.gameObject=null,this.enabled=!0,this.parent,this.id=t.getNextID(),this.name="",this.size={x:n,y:r},this.offset={x:0,y:0},this.pos={x:e,y:i},this.last={x:e,y:i},this.vel={x:0,y:0},this.accel={x:0,y:0},this.friction={x:0,y:0},this.maxVel={x:t.defaults.maxVelocityX,y:t.defaults.maxVelocityY},this.standing=!1,this.gravityFactor=t.defaults.gravityFactor,this.bounciness=t.defaults.bounciness,this.minBounceVelocity=t.defaults.minBounceVelocity,this.accelGround=0,this.accelAir=0,this.jumpSpeed=0,this.type=o.NONE,this.checkAgainst=o.NONE,this.collides=s.NEVER,this.debugShowBody=t.defaults.debugShowBody,this.debugShowVelocity=t.defaults.debugShowVelocity,this.debugBodyColor=t.defaults.bodyDebugColor,this.updateCallback,this.slopeStanding={min:.767944870877505,max:2.3736477827122884}},reset:function(t,e){this.pos={x:t,y:e},this.last={x:t,y:e},this.vel={x:0,y:0},this.accel={x:0,y:0},this.friction={x:0,y:0},this.maxVel={x:100,y:100},this.standing=!1,this.gravityFactor=1,this.bounciness=0,this.minBounceVelocity=40,this.accelGround=0,this.accelAir=0,this.jumpSpeed=0,this.type=o.NONE,this.checkAgainst=o.NONE,this.collides=s.NEVER},update:function(t){var e=this.pos;this.last.x=e.x,this.last.y=e.y,this.vel.y+=this.world.gravity*t*this.gravityFactor,this.vel.x=r(t,this.vel.x,this.accel.x,this.friction.x,this.maxVel.x),this.vel.y=r(t,this.vel.y,this.accel.y,this.friction.y,this.maxVel.y);var i=this.vel.x*t,n=this.vel.y*t,s=this.world.collisionMap.trace(e.x,e.y,i,n,this.size.x,this.size.y);this.handleMovementTrace(s)&&a(this,s);var o=this.gameObject;o&&(o.x=e.x-this.offset.x+o.displayOriginX*o.scaleX,o.y=e.y-this.offset.y+o.displayOriginY*o.scaleY),this.updateCallback&&this.updateCallback(this)},drawDebug:function(t){var e=this.pos;if(this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor,1),t.strokeRect(e.x,e.y,this.size.x,this.size.y)),this.debugShowVelocity){var i=e.x+this.size.x/2,n=e.y+this.size.y/2;t.lineStyle(1,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,n,i+this.vel.x,n+this.vel.y)}},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},skipHash:function(){return!this.enabled||0===this.type&&0===this.checkAgainst&&0===this.collides},touches:function(t){return!(this.pos.x>=t.pos.x+t.size.x||this.pos.x+this.size.x<=t.pos.x||this.pos.y>=t.pos.y+t.size.y||this.pos.y+this.size.y<=t.pos.y)},resetSize:function(t,e,i,n){return this.pos.x=t,this.pos.y=e,this.size.x=i,this.size.y=n,this},toJSON:function(){return{name:this.name,size:{x:this.size.x,y:this.size.y},pos:{x:this.pos.x,y:this.pos.y},vel:{x:this.vel.x,y:this.vel.y},accel:{x:this.accel.x,y:this.accel.y},friction:{x:this.friction.x,y:this.friction.y},maxVel:{x:this.maxVel.x,y:this.maxVel.y},gravityFactor:this.gravityFactor,bounciness:this.bounciness,minBounceVelocity:this.minBounceVelocity,type:this.type,checkAgainst:this.checkAgainst,collides:this.collides}},fromJSON:function(){},check:function(){},collideWith:function(t,e){this.parent&&this.parent._collideCallback&&this.parent._collideCallback.call(this.parent._callbackScope,this,t,e)},handleMovementTrace:function(){return!0},destroy:function(){this.world.remove(this),this.enabled=!1,this.world=null,this.gameObject=null,this.parent=null}});t.exports=h},function(t,e,i){var n=i(0),s=i(1322),r=new n({initialize:function(t,e){void 0===t&&(t=32),this.tilesize=t,this.data=Array.isArray(e)?e:[],this.width=Array.isArray(e)?e[0].length:0,this.height=Array.isArray(e)?e.length:0,this.lastSlope=55,this.tiledef=s},trace:function(t,e,i,n,s,r){var o={collision:{x:!1,y:!1,slope:!1},pos:{x:t+i,y:e+n},tile:{x:0,y:0}};if(!this.data)return o;var a=Math.ceil(Math.max(Math.abs(i),Math.abs(n))/this.tilesize);if(a>1)for(var h=i/a,l=n/a,u=0;u0?r:0,y=n<0?f:0,m=Math.max(Math.floor(i/f),0),x=Math.min(Math.ceil((i+o)/f),g);u=Math.floor((t.pos.x+v)/f);var T=Math.floor((e+v)/f);if((l>0||u===T||T<0||T>=p)&&(T=-1),u>=0&&u1&&d<=this.lastSlope&&this.checkDef(t,d,e,i,a,h,r,o,T,c));c++)if(1===(d=this.data[c][u])||d>this.lastSlope||d>1&&this.checkDef(t,d,e,i,a,h,r,o,u,c)){if(d>1&&d<=this.lastSlope&&t.collision.slope)break;t.collision.x=!0,t.tile.x=d,t.pos.x=u*f-v+y,e=t.pos.x,a=0;break}}if(s){var w=s>0?o:0,b=s<0?f:0,E=Math.max(Math.floor(t.pos.x/f),0),S=Math.min(Math.ceil((t.pos.x+r)/f),p);c=Math.floor((t.pos.y+w)/f);var A=Math.floor((i+w)/f);if((l>0||c===A||A<0||A>=g)&&(A=-1),c>=0&&c1&&d<=this.lastSlope&&this.checkDef(t,d,e,i,a,h,r,o,u,A));u++)if(1===(d=this.data[c][u])||d>this.lastSlope||d>1&&this.checkDef(t,d,e,i,a,h,r,o,u,c)){if(d>1&&d<=this.lastSlope&&t.collision.slope)break;t.collision.y=!0,t.tile.y=d,t.pos.y=c*f-w+b;break}}},checkDef:function(t,e,i,n,s,r,o,a,h,l){var u=this.tiledef[e];if(!u)return!1;var c=this.tilesize,d=(h+u[0])*c,f=(l+u[1])*c,p=(u[2]-u[0])*c,g=(u[3]-u[1])*c,v=u[4],y=i+s+(g<0?o:0)-d,m=n+r+(p>0?a:0)-f;if(p*m-g*y>0){if(s*-g+r*p<0)return v;var x=Math.sqrt(p*p+g*g),T=g/x,w=-p/x,b=y*T+m*w,E=T*b,S=w*b;return E*E+S*S>=s*s+r*r?v||p*(m-r)-g*(y-s)<.5:(t.pos.x=i+s-E,t.pos.y=n+r-S,t.collision.slope={x:p,y:g,nx:T,ny:w},!0)}return!1}});t.exports=r},function(t,e,i){var n=i(0),s=i(499),r=i(500),o=i(501),a=new n({initialize:function(t){this.world=t,this.sys=t.scene.sys},body:function(t,e,i,n){return new s(this.world,t,e,i,n)},existing:function(t){var e=t.x-t.frame.centerX,i=t.y-t.frame.centerY,n=t.width,s=t.height;return t.body=this.world.create(e,i,n,s),t.body.parent=t,t.body.gameObject=t,t},image:function(t,e,i,n){var s=new r(this.world,t,e,i,n);return this.sys.displayList.add(s),s},sprite:function(t,e,i,n){var s=new o(this.world,t,e,i,n);return this.sys.displayList.add(s),this.sys.updateList.add(s),s},destroy:function(){this.world=null,this.sys=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(232),r=new n({Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){this.body=t.create(e,i,n,s),this.body.parent=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=r},function(t,e,i){var n=i(0),s=i(232),r=i(89),o=new n({Extends:r,Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t.scene,e,i,n,s),this.body=t.create(e-this.frame.centerX,i-this.frame.centerY,this.width,this.height),this.body.parent=this,this.body.gameObject=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=o},function(t,e,i){var n=i(0),s=i(232),r=i(65),o=new n({Extends:r,Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t.scene,e,i,n,s),this.body=t.create(e-this.frame.centerX,i-this.frame.centerY,this.width,this.height),this.body.parent=this,this.body.gameObject=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=o},function(t,e,i){var n=i(496),s=i(0),r=i(112),o=i(497),a=i(9),h=i(231),l=i(1),u=i(91),c=i(110),d=i(1336),f=i(34),p=i(113),g=new s({Extends:a,initialize:function(t,e){a.call(this),this.scene=t,this.bodies=new c,this.gravity=l(e,"gravity",0),this.cellSize=l(e,"cellSize",64),this.collisionMap=new o,this.timeScale=l(e,"timeScale",1),this.maxStep=l(e,"maxStep",.05),this.enabled=!0,this.drawDebug=l(e,"debug",!1),this.debugGraphic;var i=l(e,"maxVelocity",100);if(this.defaults={debugShowBody:l(e,"debugShowBody",!0),debugShowVelocity:l(e,"debugShowVelocity",!0),bodyDebugColor:l(e,"debugBodyColor",16711935),velocityDebugColor:l(e,"debugVelocityColor",65280),maxVelocityX:l(e,"maxVelocityX",i),maxVelocityY:l(e,"maxVelocityY",i),minBounceVelocity:l(e,"minBounceVelocity",40),gravityFactor:l(e,"gravityFactor",1),bounciness:l(e,"bounciness",0)},this.walls={left:null,right:null,top:null,bottom:null},this.delta=0,this._lastId=0,l(e,"setBounds",!1)){var n=e.setBounds;if("boolean"==typeof n)this.setBounds();else{var s=l(n,"x",0),r=l(n,"y",0),h=l(n,"width",t.sys.scale.width),u=l(n,"height",t.sys.scale.height),d=l(n,"thickness",64),f=l(n,"left",!0),p=l(n,"right",!0),g=l(n,"top",!0),v=l(n,"bottom",!0);this.setBounds(s,r,h,u,d,f,p,g,v)}}this.drawDebug&&this.createDebugGraphic()},setCollisionMap:function(t,e){if("string"==typeof t){var i=this.scene.cache.tilemap.get(t);if(!i||i.format!==f.WELTMEISTER)return console.warn("The specified key does not correspond to a Weltmeister tilemap: "+t),null;for(var n,s=i.data.layer,r=0;rr.ACTIVE&&d(this,t,e))},setCollidesNever:function(t){for(var e=0;e=0&&h<=1&&l>=0&&l<=1}function s(t,e,i){return(e[0]-t[0])*(i[1]-t[1])-(i[0]-t[0])*(e[1]-t[1])}function r(t,e,i){return s(t,e,i)>0}function o(t,e,i){return s(t,e,i)>=0}function a(t,e,i){return s(t,e,i)<0}function h(t,e,i){return s(t,e,i)<=0}t.exports={decomp:function(t){var e=function t(e){var i=[],n=[],s=[],r=[];var o=Number.MAX_VALUE;for(var a=0;a0?function t(e,i){if(0===i.length)return[e];if(i instanceof Array&&i.length&&i[0]instanceof Array&&2===i[0].length&&i[0][0]instanceof Array){for(var n=[e],s=0;su)return console.warn("quickDecomp: max level ("+u+") reached."),i;for(var L=0;LA&&(A+=e.length),S=Number.MAX_VALUE,A<_)return i;for(var D=_;D<=A;++D)o(f(O,L-1),f(O,L),f(O,D))&&h(f(O,L+1),f(O,L),f(O,D))&&(E=d(f(O,L),f(O,D)))3&&n>=0;--n)c(f(t,n-1),f(t,n),f(t,n+1),e)&&(t.splice(n%t.length,1),i++);return i},removeDuplicatePoints:function(t,e){for(var i=t.length-1;i>=1;--i)for(var n=t[i],s=i-1;s>=0;--s)E(n,t[s],e)&&t.splice(i,1)},makeCCW:function(t){for(var e=0,i=t,n=1;ni[e][0])&&(e=n);return!r(f(t,e-1),f(t,e),f(t,e+1))&&(function(t){for(var e=[],i=t.length,n=0;n!==i;n++)e.push(t.pop());for(var n=0;n!==i;n++)t[n]=e[n]}(t),!0)}};var l=[],u=[];function c(t,e,i,n){if(n){var r=l,o=u;r[0]=e[0]-t[0],r[1]=e[1]-t[1],o[0]=i[0]-e[0],o[1]=i[1]-e[1];var a=r[0]*o[0]+r[1]*o[1],h=Math.sqrt(r[0]*r[0]+r[1]*r[1]),c=Math.sqrt(o[0]*o[0]+o[1]*o[1]);return Math.acos(a/(h*c))0&&u.trigger(t,"collisionStart",{pairs:T.collisionStart}),o.preSolvePosition(T.list),s=0;s0&&u.trigger(t,"collisionActive",{pairs:T.collisionActive}),T.collisionEnd.length>0&&u.trigger(t,"collisionEnd",{pairs:T.collisionEnd}),h.update(t.metrics,t),n._bodiesClearForces(y),u.trigger(t,"afterUpdate",v),t},n.merge=function(t,e){if(f.extend(t,e),e.world){t.world=e.world,n.clear(t);for(var i=c.allBodies(t.world),s=0;s0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit(u.COLLISION_START,e,i,n)}),p.on(e,"collisionActive",function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit(u.COLLISION_ACTIVE,e,i,n)}),p.on(e,"collisionEnd",function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit(u.COLLISION_END,e,i,n)})},setBounds:function(t,e,i,n,s,r,o,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),void 0===s&&(s=64),void 0===r&&(r=!0),void 0===o&&(o=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),this.updateWall(r,"left",t-s,e-s,s,n+2*s),this.updateWall(o,"right",t+i,e-s,s,n+2*s),this.updateWall(a,"top",t,e-s,i,s),this.updateWall(h,"bottom",t,e+n,i,s),this},updateWall:function(t,e,i,n,s,r){var o=this.walls[e];t?(o&&v.remove(this.localWorld,o),i+=s/2,n+=r/2,this.walls[e]=this.create(i,n,s,r,{isStatic:!0,friction:0,frictionStatic:0})):(o&&v.remove(this.localWorld,o),this.walls[e]=null)},createDebugGraphic:function(){var t=this.scene.sys.add.graphics({x:0,y:0});return t.setDepth(Number.MAX_VALUE),this.debugGraphic=t,this.drawDebug=!0,t},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=1),this.localWorld.gravity.x=t,this.localWorld.gravity.y=e,void 0!==i&&(this.localWorld.gravity.scale=i),this},create:function(t,e,i,s,r){var o=n.rectangle(t,e,i,s,r);return v.add(this.localWorld,o),o},add:function(t){return v.add(this.localWorld,t),this},remove:function(t,e){Array.isArray(t)||(t=[t]);for(var i=0;in.deltaMax?n.deltaMax:e)/n.delta,n.delta=e),0!==n.timeScalePrev&&(r*=s.timeScale/n.timeScalePrev),0===s.timeScale&&(r=0),n.timeScalePrev=s.timeScale,n.correction=r,n.frameCounter+=1,t-n.counterTimestamp>=1e3&&(n.fps=n.frameCounter*((t-n.counterTimestamp)/1e3),n.counterTimestamp=t,n.frameCounter=0),h.update(i,e,r)}},step:function(t,e){h.update(this.engine,t,e)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(t){var e=t.hasOwnProperty("body")?t.body:t;return null!==a.get(this.localWorld,e.id,e.type)},getAllBodies:function(){return a.allBodies(this.localWorld)},getAllConstraints:function(){return a.allConstraints(this.localWorld)},getAllComposites:function(){return a.allComposites(this.localWorld)},postUpdate:function(){if(this.drawDebug){var t=this.debugConfig,e=this.engine,i=this.debugGraphic,n=a.allBodies(this.localWorld);this.debugGraphic.clear(),t.showBroadphase&&e.broadphase.controller&&this.renderGrid(e.broadphase,i,t.broadphaseColor,.5),t.showBounds&&this.renderBodyBounds(n,i,t.boundsColor,.5),(t.showBody||t.showStaticBody)&&this.renderBodies(n),t.showJoint&&this.renderJoints(),(t.showAxes||t.showAngleIndicator)&&this.renderBodyAxes(n,i,t.showAxes,t.angleColor,.5),t.showVelocity&&this.renderBodyVelocity(n,i,t.velocityColor,1,2),t.showSeparations&&this.renderSeparations(e.pairs.list,i,t.separationColor),t.showCollisions&&this.renderCollisions(e.pairs.list,i,t.collisionColor)}},renderGrid:function(t,e,i,n){e.lineStyle(1,i,n);for(var s=o.keys(t.buckets),r=0;r0){var l=h[0].vertex.x,u=h[0].vertex.y;2===h.length&&(l=(h[0].vertex.x+h[1].vertex.x)/2,u=(h[0].vertex.y+h[1].vertex.y)/2),a.bodyB===a.supports[0].body||a.bodyA.isStatic?e.lineBetween(l-8*a.normal.x,u-8*a.normal.y,l,u):e.lineBetween(l+8*a.normal.x,u+8*a.normal.y,l,u)}}return this},renderBodyBounds:function(t,e,i,n){e.lineStyle(1,i,n);for(var s=0;s1?1:0;h1?1:0;a1?1:0;a1&&this.renderConvexHull(g,e,f,m)}}},renderBody:function(t,e,i,n,s,r,o,a){void 0===n&&(n=null),void 0===s&&(s=null),void 0===r&&(r=1),void 0===o&&(o=null),void 0===a&&(a=null);for(var h=this.debugConfig,l=h.sensorFillColor,u=h.sensorLineColor,c=t.parts,d=c.length,f=d>1?1:0;f1){var s=t.vertices;e.lineStyle(n,i),e.beginPath(),e.moveTo(s[0].x,s[0].y);for(var r=1;r0&&(e.fillStyle(a),e.fillCircle(u.x,u.y,h),e.fillCircle(c.x,c.y,h)),this},resetCollisionIDs:function(){return s._nextCollidingGroupId=1,s._nextNonCollidingGroupId=-1,s._nextCategory=1,this},shutdown:function(){p.off(this.engine),this.removeAllListeners(),v.clear(this.localWorld,!1),h.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});t.exports=m},function(t,e,i){var n=new(i(0))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=n},function(t,e,i){var n=i(26);t.exports=function(t,e,i,s,r,o,a){for(var h=n(i,s,r,o,null,a),l=0;l-1}return!1}},function(t,e,i){var n=i(80),s=i(115),r=i(245);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!1),void 0===o&&(o=!0),!s(t,e,a))return null;var h=a.data[e][t];return h?(a.data[e][t]=i?null:new n(a,-1,t,e,h.width,h.height),o&&h&&h.collides&&r(t,e,a),h):null}},function(t,e,i){var n=i(34),s=i(248),r=i(517),o=i(518),a=i(529);t.exports=function(t,e,i,h,l,u){var c;switch(e){case n.ARRAY_2D:c=s(t,i,h,l,u);break;case n.CSV:c=r(t,i,h,l,u);break;case n.TILED_JSON:c=o(t,i,u);break;case n.WELTMEISTER:c=a(t,i,u);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},function(t,e,i){var n=i(34),s=i(248);t.exports=function(t,e,i,r,o){var a=e.trim().split("\n").map(function(t){return t.split(",")}),h=s(t,a,i,r,o);return h.format=n.CSV,h}},function(t,e,i){var n=i(34),s=i(117),r=i(519),o=i(521),a=i(522),h=i(525),l=i(527),u=i(528);t.exports=function(t,e,i){if("orthogonal"!==e.orientation)return console.warn("Only orthogonal map types are supported in this version of Phaser"),null;var c=new s({width:e.width,height:e.height,name:t,tileWidth:e.tilewidth,tileHeight:e.tileheight,orientation:e.orientation,format:n.TILED_JSON,version:e.version,properties:e.properties,renderOrder:e.renderorder,infinite:e.infinite});c.layers=r(e,i),c.images=o(e);var d=a(e);return c.tilesets=d.tilesets,c.imageCollections=d.imageCollections,c.objects=h(e),c.tiles=l(c),u(c),c}},function(t,e,i){var n=i(520),s=i(1),r=i(116),o=i(249),a=i(80),h=i(250);t.exports=function(t,e){for(var i=s(t,"infinite",!1),l=[],u=[],c=h(t);c.i0;)if(c.i>=c.layers.length){if(u.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}c=u.pop()}else{var d=c.layers[c.i];if(c.i++,"tilelayer"===d.type)if(d.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+d.name+"'");else{if(d.encoding&&"base64"===d.encoding){if(d.chunks)for(var f=0;f0?((v=new a(p,g.gid,O,R,t.tilewidth,t.tileheight)).rotation=g.rotation,v.flipX=g.flipped,m[R][O]=v):(y=e?null:new a(p,-1,O,R,t.tilewidth,t.tileheight),m[R][O]=y),++x===S.width&&(C++,x=0)}}else{p=new r({name:c.name+d.name,x:c.x+s(d,"offsetx",0)+d.x,y:c.y+s(d,"offsety",0)+d.y,width:d.width,height:d.height,tileWidth:t.tilewidth,tileHeight:t.tileheight,alpha:c.opacity*d.opacity,visible:c.visible&&d.visible,properties:s(d,"properties",{})});for(var L=[],D=0,k=d.data.length;D0?((v=new a(p,g.gid,x,m.length,t.tilewidth,t.tileheight)).rotation=g.rotation,v.flipX=g.flipped,L.push(v)):(y=e?null:new a(p,-1,x,m.length,t.tilewidth,t.tileheight),L.push(y)),++x===d.width&&(m.push(L),x=0,L=[])}p.data=m,l.push(p)}else if("group"===d.type){var F=h(t,d,c);u.push(c),c=F}}return l}},function(t,e){t.exports=function(t){for(var e=window.atob(t),i=e.length,n=new Array(i/4),s=0;s>>0;return n}},function(t,e,i){var n=i(1),s=i(250);t.exports=function(t){for(var e=[],i=[],r=s(t);r.i0;)if(r.i>=r.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=i.pop()}else{var o=r.layers[r.i];if(r.i++,"imagelayer"===o.type){var a=n(o,"offsetx",0)+n(o,"startx",0),h=n(o,"offsety",0)+n(o,"starty",0);e.push({name:r.name+o.name,image:o.image,x:r.x+a+o.x,y:r.y+h+o.y,alpha:r.opacity*o.opacity,visible:r.visible&&o.visible,properties:n(o,"properties",{})})}else if("group"===o.type){var l=s(t,o,r);i.push(r),r=l}}return e}},function(t,e,i){var n=i(154),s=i(523),r=i(251);t.exports=function(t){for(var e,i=[],o=[],a=null,h=0;h1){if(Array.isArray(l.tiles)){for(var c={},d={},f=0;f=this.firstgid&&t0;)if(a.i>=a.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}a=i.pop()}else{var h=a.layers[a.i];if(a.i++,h.opacity*=a.opacity,h.visible=a.visible&&h.visible,"objectgroup"===h.type){h.name=a.name+h.name;for(var l=a.x+n(h,"startx",0)+n(h,"offsetx",0),u=a.y+n(h,"starty",0)+n(h,"offsety",0),c=[],d=0;da&&(a=e.layer[l].width),e.layer[l].height>h&&(h=e.layer[l].height);var u=new s({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:n.WELTMEISTER});return u.layers=r(e,i),u.tilesets=o(e),u}},function(t,e,i){var n=i(116),s=i(80);t.exports=function(t,e){for(var i=[],r=0;r-1?new s(a,f,c,u,o.tilesize,o.tilesize):e?null:new s(a,-1,c,u,o.tilesize,o.tilesize),h.push(d)}l.push(h),h=[]}a.data=l,i.push(a)}return i}},function(t,e,i){var n=i(154);t.exports=function(t){for(var e=[],i=[],s=0;s-1&&(this.renderOrder=t),this},addTilesetImage:function(t,e,i,n,s,r,o){if(void 0===t)return null;if(void 0!==e&&null!==e||(e=t),!this.scene.sys.textures.exists(e))return console.warn("Invalid Tileset Image: "+e),null;var h=this.scene.sys.textures.get(e),l=this.getTilesetIndex(t);if(null===l&&this.format===a.TILED_JSON)return console.warn("No data found for Tileset: "+t),null;var u=this.tilesets[l];return u?(u.setTileSize(i,n),u.setSpacing(s,r),u.setImage(h),u):(void 0===i&&(i=this.tileWidth),void 0===n&&(n=this.tileHeight),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o=0),(u=new p(t,o,i,n,s,r)).setImage(h),this.tilesets.push(u),u)},convertLayerToStatic:function(t){if(null===(t=this.getLayer(t)))return null;var e=t.tilemapLayer;if(!(e&&e instanceof r))return null;var i=new c(e.scene,e.tilemap,e.layerIndex,e.tileset,e.x,e.y);return this.scene.sys.displayList.add(i),e.destroy(),i},copy:function(t,e,i,n,s,r,o,a){return a=this.getLayer(a),this._isStaticCall(a,"copy")?this:null!==a?(f.Copy(t,e,i,n,s,r,o,a),this):null},createBlankDynamicLayer:function(t,e,i,n,s,o,a,l){if(void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.width),void 0===o&&(o=this.height),void 0===a&&(a=this.tileWidth),void 0===l&&(l=this.tileHeight),null!==this.getLayerIndex(t))return console.warn("Invalid Tilemap Layer ID: "+t),null;for(var u,c=new h({name:t,tileWidth:a,tileHeight:l,width:s,height:o}),f=0;f-1&&this.putTileAt(e,r.x,r.y,i,r.tilemapLayer)}return n},removeTileAt:function(t,e,i,n,s){return s=this.getLayer(s),this._isStaticCall(s,"removeTileAt")?null:null===s?null:f.RemoveTileAt(t,e,i,n,s)},removeTileAtWorldXY:function(t,e,i,n,s,r){return r=this.getLayer(r),this._isStaticCall(r,"removeTileAtWorldXY")?null:null===r?null:f.RemoveTileAtWorldXY(t,e,i,n,s,r)},renderDebug:function(t,e,i){return null===(i=this.getLayer(i))?null:(f.RenderDebug(t,e,i),this)},renderDebugFull:function(t,e){for(var i=this.layers,n=0;n=0&&t<4&&(this._renderOrder=t),this},calculateFacesAt:function(t,e){return a.CalculateFacesAt(t,e,this.layer),this},calculateFacesWithin:function(t,e,i,n){return a.CalculateFacesWithin(t,e,i,n,this.layer),this},createFromTiles:function(t,e,i,n,s){return a.CreateFromTiles(t,e,i,n,s,this.layer)},cull:function(t){return this.cullCallback(this.layer,t,this.culledTiles,this._renderOrder)},copy:function(t,e,i,n,s,r,o){return a.Copy(t,e,i,n,s,r,o,this.layer),this},destroy:function(t){void 0===t&&(t=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),t&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],o.prototype.destroy.call(this))},fill:function(t,e,i,n,s,r){return a.Fill(t,e,i,n,s,r,this.layer),this},filterTiles:function(t,e,i,n,s,r,o){return a.FilterTiles(t,e,i,n,s,r,o,this.layer)},findByIndex:function(t,e,i){return a.FindByIndex(t,e,i,this.layer)},findTile:function(t,e,i,n,s,r,o){return a.FindTile(t,e,i,n,s,r,o,this.layer)},forEachTile:function(t,e,i,n,s,r,o){return a.ForEachTile(t,e,i,n,s,r,o,this.layer),this},getTileAt:function(t,e,i){return a.GetTileAt(t,e,i,this.layer)},getTileAtWorldXY:function(t,e,i,n){return a.GetTileAtWorldXY(t,e,i,n,this.layer)},getTilesWithin:function(t,e,i,n,s){return a.GetTilesWithin(t,e,i,n,s,this.layer)},getTilesWithinShape:function(t,e,i){return a.GetTilesWithinShape(t,e,i,this.layer)},getTilesWithinWorldXY:function(t,e,i,n,s,r){return a.GetTilesWithinWorldXY(t,e,i,n,s,r,this.layer)},hasTileAt:function(t,e){return a.HasTileAt(t,e,this.layer)},hasTileAtWorldXY:function(t,e,i){return a.HasTileAtWorldXY(t,e,i,this.layer)},putTileAt:function(t,e,i,n){return a.PutTileAt(t,e,i,n,this.layer)},putTileAtWorldXY:function(t,e,i,n,s){return a.PutTileAtWorldXY(t,e,i,n,s,this.layer)},putTilesAt:function(t,e,i,n){return a.PutTilesAt(t,e,i,n,this.layer),this},randomize:function(t,e,i,n,s){return a.Randomize(t,e,i,n,s,this.layer),this},removeTileAt:function(t,e,i,n){return a.RemoveTileAt(t,e,i,n,this.layer)},removeTileAtWorldXY:function(t,e,i,n,s){return a.RemoveTileAtWorldXY(t,e,i,n,s,this.layer)},renderDebug:function(t,e){return a.RenderDebug(t,e,this.layer),this},replaceByIndex:function(t,e,i,n,s,r){return a.ReplaceByIndex(t,e,i,n,s,r,this.layer),this},setSkipCull:function(t){return void 0===t&&(t=!0),this.skipCull=t,this},setCullPadding:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=1),this.cullPaddingX=t,this.cullPaddingY=e,this},setCollision:function(t,e,i,n){return a.SetCollision(t,e,i,this.layer,n),this},setCollisionBetween:function(t,e,i,n){return a.SetCollisionBetween(t,e,i,n,this.layer),this},setCollisionByProperty:function(t,e,i){return a.SetCollisionByProperty(t,e,i,this.layer),this},setCollisionByExclusion:function(t,e,i){return a.SetCollisionByExclusion(t,e,i,this.layer),this},setCollisionFromCollisionGroup:function(t,e){return a.SetCollisionFromCollisionGroup(t,e,this.layer),this},setTileIndexCallback:function(t,e,i){return a.SetTileIndexCallback(t,e,i,this.layer),this},setTileLocationCallback:function(t,e,i,n,s,r){return a.SetTileLocationCallback(t,e,i,n,s,r,this.layer),this},shuffle:function(t,e,i,n){return a.Shuffle(t,e,i,n,this.layer),this},swapByIndex:function(t,e,i,n,s,r){return a.SwapByIndex(t,e,i,n,s,r,this.layer),this},tileToWorldX:function(t,e){return a.TileToWorldX(t,e,this.layer)},tileToWorldY:function(t,e){return a.TileToWorldY(t,e,this.layer)},tileToWorldXY:function(t,e,i,n){return a.TileToWorldXY(t,e,i,n,this.layer)},weightedRandomize:function(t,e,i,n,s){return a.WeightedRandomize(t,e,i,n,s,this.layer),this},worldToTileX:function(t,e,i){return a.WorldToTileX(t,e,i,this.layer)},worldToTileY:function(t,e,i){return a.WorldToTileY(t,e,i,this.layer)},worldToTileXY:function(t,e,i,n,s){return a.WorldToTileXY(t,e,i,n,s,this.layer)}});t.exports=h},function(t,e,i){var n=i(0),s=i(12),r=i(21),o=i(14),a=i(1424),h=i(150),l=i(35),u=i(10),c=new n({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.ComputedSize,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.Transform,s.Visible,s.ScrollFactor,a],initialize:function(t,e,i,n,s,a){o.call(this,t,"StaticTilemapLayer"),this.isTilemap=!0,this.tilemap=e,this.layerIndex=i,this.layer=e.layers[i],this.layer.tilemapLayer=this,this.tileset=[],this.culledTiles=[],this.skipCull=!1,this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=h.CullTiles,this.renderer=t.sys.game.renderer,this.vertexBuffer=[],this.bufferData=[],this.vertexViewF32=[],this.vertexViewU32=[],this.dirty=[],this.vertexCount=[],this._renderOrder=0,this._tempMatrix=new l,this.gidMap=[],this.setTilesets(n),this.setAlpha(this.layer.alpha),this.setPosition(s,a),this.setOrigin(),this.setSize(e.tileWidth*this.layer.width,e.tileHeight*this.layer.height),this.updateVBOData(),this.initPipeline("TextureTintPipeline"),t.sys.game.events.on(r.CONTEXT_RESTORED,function(){this.updateVBOData()},this)},setTilesets:function(t){var e=[],i=[],n=this.tilemap;Array.isArray(t)||(t=[t]);for(var s=0;sv||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(1===p)for(o=0;o=0;a--)!(r=f[o][a])||r.indexv||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(2===p)for(o=u-1;o>=0;o--)for(a=0;av||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(3===p)for(o=u-1;o>=0;o--)for(a=l-1;a>=0;a--)!(r=f[o][a])||r.indexv||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));this.dirty[e]=!1,null===y?(y=i.createVertexBuffer(m,n.STATIC_DRAW),this.vertexBuffer[e]=y):(i.setVertexBuffer(y),n.bufferSubData(n.ARRAY_BUFFER,0,m))}return this},batchTile:function(t,e,i,n,s,r,o){var a=i.getTileTextureCoordinates(e.index);if(!a)return t;var h=i.tileWidth,l=i.tileHeight,c=h/2,d=l/2,f=a.x/n,p=a.y/s,g=(a.x+h)/n,v=(a.y+l)/s,y=this._tempMatrix,m=-c,x=-d;e.flipX&&(h*=-1,m+=i.tileWidth),e.flipY&&(l*=-1,x+=i.tileHeight);var T=m+h,w=x+l;y.applyITRS(c+e.pixelX,d+e.pixelY,e.rotation,1,1);var b=u.getTintAppendFloatAlpha(16777215,r.alpha*this.alpha*e.alpha),E=y.getX(m,x),S=y.getY(m,x),A=y.getX(m,w),_=y.getY(m,w),C=y.getX(T,w),M=y.getY(T,w),P=y.getX(T,x),O=y.getY(T,x);r.roundPixels&&(E=Math.round(E),S=Math.round(S),A=Math.round(A),_=Math.round(_),C=Math.round(C),M=Math.round(M),P=Math.round(P),O=Math.round(O));var R=this.vertexViewF32[o],L=this.vertexViewU32[o];return R[++t]=E,R[++t]=S,R[++t]=f,R[++t]=p,R[++t]=0,L[++t]=b,R[++t]=A,R[++t]=_,R[++t]=f,R[++t]=v,R[++t]=0,L[++t]=b,R[++t]=C,R[++t]=M,R[++t]=g,R[++t]=v,R[++t]=0,L[++t]=b,R[++t]=E,R[++t]=S,R[++t]=f,R[++t]=p,R[++t]=0,L[++t]=b,R[++t]=C,R[++t]=M,R[++t]=g,R[++t]=v,R[++t]=0,L[++t]=b,R[++t]=P,R[++t]=O,R[++t]=g,R[++t]=p,R[++t]=0,L[++t]=b,this.vertexCount[o]+=6,t},setRenderOrder:function(t){if("string"==typeof t&&(t=["right-down","left-down","right-up","left-up"].indexOf(t)),t>=0&&t<4){this._renderOrder=t;for(var e=0;e0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=r},function(t,e,i){var n=i(1433);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substr(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===n.indexOf(e)&&"_"!==e.substr(0,1)&&i.push({key:e,value:t[e]});return i}},function(t,e,i){var n=i(5);t.exports=function(t){var e=n(t,"tweens",null);return null===e?[]:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},function(t,e,i){var n=i(255),s=i(15),r=i(99),o=i(90),a=i(155),h=i(5),l=i(254),u=i(256),c=i(258);t.exports=function(t,e,i){void 0===i&&(i=n);var d=h(e,"from",0),f=h(e,"to",1),p=[{value:d}],g=a(e,"delay",i.delay),v=a(e,"duration",i.duration),y=h(e,"easeParams",i.easeParams),m=o(h(e,"ease",i.ease),y),x=a(e,"hold",i.hold),T=a(e,"repeat",i.repeat),w=a(e,"repeatDelay",i.repeatDelay),b=r(e,"yoyo",i.yoyo),E=[],S=l("value",f),A=c(p[0],0,"value",S.getEnd,S.getStart,S.getActive,m,g,v,b,x,T,w,!1,!1);A.start=d,A.current=d,A.to=f,E.push(A);var _=new u(t,E,p);_.offset=s(e,"offset",null),_.completeDelay=s(e,"completeDelay",0),_.loop=Math.round(s(e,"loop",0)),_.loopDelay=Math.round(s(e,"loopDelay",0)),_.paused=r(e,"paused",!1),_.useFrames=r(e,"useFrames",!1);for(var C=h(e,"callbackScope",_),M=[_,null],P=u.TYPES,O=0;OS&&(S=C),E[A][_]=C}}}var M=o?n(o):null;return a?function(t,e,n,s){var r,o=0,a=s%y,h=Math.floor(s/y);if(a>=0&&a=0&&h0?Math.floor(v/p.length):h(e,"duration",g.duration),g.delay=h(e,"delay",g.delay),g.easeParams=c(e,"easeParams",g.easeParams),g.ease=a(c(e,"ease",g.ease),g.easeParams),g.hold=h(e,"hold",g.hold),g.repeat=h(e,"repeat",g.repeat),g.repeatDelay=h(e,"repeatDelay",g.repeatDelay),g.yoyo=o(e,"yoyo",g.yoyo),g.flipX=o(e,"flipX",g.flipX),g.flipY=o(e,"flipY",g.flipY);for(var y=0;y0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){return this.calcDuration(),this.progress=0,this.totalProgress=0,!this.paused||(this.state=a.PAUSED,!1)},resetTweens:function(t){for(var e=0;e0?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=a.LOOP_DELAY):(this.state=a.ACTIVE,this.dispatchTimelineEvent(r.TIMELINE_LOOP,this.callbacks.onLoop))):this.completeDelay>0?(this.state=a.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=a.PENDING_REMOVE,this.dispatchTimelineEvent(r.TIMELINE_COMPLETE,this.callbacks.onComplete))},update:function(t,e){if(this.state!==a.PAUSED){switch(this.useFrames&&(e=1*this.manager.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case a.ACTIVE:for(var i=this.totalData,n=0;n>>0;if("function"!=typeof t)throw new TypeError;for(var n=arguments.length>=2?arguments[1]:void 0,s=0;s>16)+(65280&t)+((255&t)<<16)},n={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,_isTinted:!1,tintFill:!1,clearTint:function(){return this.setTint(16777215),this._isTinted=!1,this},setTint:function(t,e,n,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,n=t,s=t),this._tintTL=i(t),this._tintTR=i(e),this._tintBL=i(n),this._tintBR=i(s),this._isTinted=!0,this.tintFill=!1,this},setTintFill:function(t,e,i,n){return this.setTint(t,e,i,n),this.tintFill=!0,this},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=i(t),this._isTinted=!0}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=i(t),this._isTinted=!0}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=i(t),this._isTinted=!0}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=i(t),this._isTinted=!0}},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){return this._isTinted}}};t.exports=n},function(t,e){t.exports="changedata"},function(t,e){t.exports="changedata-"},function(t,e){t.exports="removedata"},function(t,e){t.exports="setdata"},function(t,e){t.exports="destroy"},function(t,e){t.exports="complete"},function(t,e){t.exports="created"},function(t,e){t.exports="error"},function(t,e){t.exports="loop"},function(t,e){t.exports="play"},function(t,e){t.exports="seeked"},function(t,e){t.exports="seeking"},function(t,e){t.exports="stop"},function(t,e){t.exports="timeout"},function(t,e){t.exports="unlocked"},function(t,e,i){var n=i(39);t.exports=function(t,e,i,s,r){return n(t,"alpha",e,i,s,r)}},function(t,e,i){var n=i(39);t.exports=function(t,e,i,s,r){return n(t,"x",e,i,s,r)}},function(t,e,i){var n=i(39);t.exports=function(t,e,i,s,r,o,a){return void 0!==i&&null!==i||(i=e),n(t,"x",e,s,o,a),n(t,"y",i,r,o,a)}},function(t,e,i){var n=i(39);t.exports=function(t,e,i,s,r){return n(t,"y",e,i,s,r)}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=6.28);for(var s=i,r=(n-i)/t.length,o=0;o0?s(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a1)if(0===s){var d=t.length-1;for(o=t[d].x,a=t[d].y,h=d-1;h>=0;h--)l=(c=t[h]).x,u=c.y,c.x=o,c.y=a,o=l,a=u;t[d].x=e,t[d].y=i}else{for(o=t[0].x,a=t[0].y,h=1;h0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<.001&&(e.zoom=.001))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){t.exports={Camera:i(312),BaseCamera:i(103),CameraManager:i(725),Effects:i(320),Events:i(55)}},function(t,e){t.exports="cameradestroy"},function(t,e){t.exports="camerafadeincomplete"},function(t,e){t.exports="camerafadeinstart"},function(t,e){t.exports="camerafadeoutcomplete"},function(t,e){t.exports="camerafadeoutstart"},function(t,e){t.exports="cameraflashcomplete"},function(t,e){t.exports="cameraflashstart"},function(t,e){t.exports="camerapancomplete"},function(t,e){t.exports="camerapanstart"},function(t,e){t.exports="postrender"},function(t,e){t.exports="prerender"},function(t,e){t.exports="camerashakecomplete"},function(t,e){t.exports="camerashakestart"},function(t,e){t.exports="camerazoomcomplete"},function(t,e){t.exports="camerazoomstart"},function(t,e,i){var n=i(20),s=i(0),r=i(55),o=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,o,a,h){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===o&&(o=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene),!o&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=t,this.progress=0,this.red=i,this.green=n,this.blue=s,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h;var l=t?r.FADE_OUT_START:r.FADE_IN_START;return this.camera.emit(l,this.camera,this,e,i,n,s),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed=1?1:1/e*(1+(e*t|0))}},function(t,e,i){var n=i(20),s=i(0),r=i(55),o=i(3),a=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.intensity=new o,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s){return void 0===t&&(t=100),void 0===e&&(e=.05),void 0===i&&(i=!1),void 0===n&&(n=null),void 0===s&&(s=this.camera.scene),!i&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=t,this.progress=0,"number"==typeof e?this.intensity.set(e):this.intensity.set(e.x,e.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=n,this._onUpdateScope=s,this.camera.emit(r.SHAKE_START,this.camera,this,t,e),this.camera)},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(t,e){if(this.isRunning)if(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed0&&(o.preRender(1),t.render(n,e,i,o))}},resetAll:function(){for(var t=0;t1)for(var i=1;i=1)&&(s.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(s.mspointer=!0),navigator.getGamepads&&(s.gamepads=!0),"onwheel"in window||n.ie&&"WheelEvent"in window?s.wheelEvent="wheel":"onmousewheel"in window?s.wheelEvent="mousewheel":n.firefox&&"MouseScrollEvent"in window&&(s.wheelEvent="DOMMouseScroll"),s)},function(t,e,i){var n=i(125),s={audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){s.audioData=!!window.Audio,s.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e&&(t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(s.ogg=!0),(t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||t.canPlayType("audio/opus;").replace(/^no$/,""))&&(s.opus=!0),t.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(s.mp3=!0),t.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")&&(s.wav=!0),(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/aac;").replace(/^no$/,""))&&(s.m4a=!0),t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(s.webm=!0),""!==t.canPlayType('audio/mp4;codecs="ec-3"')))if(n.edge)s.dolby=!0;else if(n.safari&&n.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var i=parseInt(RegExp.$1,10),r=parseInt(RegExp.$2,10);(10===i&&r>=11||i>10)&&(s.dolby=!0)}}catch(t){}return s}()},function(t,e){var i={h264:!1,hls:!1,mp4:!1,ogg:!1,vp9:!1,webm:!1};t.exports=function(){var t=document.createElement("video"),e=!!t.canPlayType;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(i.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.h264=!0,i.mp4=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(i.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(i.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.hls=!0))}catch(t){}return i}()},function(t,e){var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){var t,e="Fullscreen",n="FullScreen",s=["request"+e,"request"+n,"webkitRequest"+e,"webkitRequest"+n,"msRequest"+e,"msRequest"+n,"mozRequest"+n,"mozRequest"+e];for(t=0;tMath.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){var n=i(337);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(13);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e?t:(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e1?t[i]-(n(s-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(s-r,t[r?r-1:0],t[r],t[i1?n(t[i],t[i-1],i-s):n(t[r],t[r+1>i?i:r+1],s-r)}},function(t,e,i){var n=i(170);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){t.exports={GetNext:i(346),IsSize:i(127),IsValue:i(781)}},function(t,e){t.exports=function(t){return t>0&&0==(t&t-1)}},function(t,e,i){t.exports={Ceil:i(347),Floor:i(105),To:i(783)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),n?(i+t)/e:i+t)}},function(t,e,i){var n=new(i(0))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var n=0;n>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e0;e--){var i=Math.floor(this.frac()*(e+1)),n=t[i];t[i]=t[e],t[e]=n}return t}});t.exports=n},function(t,e){t.exports=function(t){for(var e=0,i=0;i1?void 0!==n?(s=(n-t)/(n-i))<0&&(s=0):s=1:s<0&&(s=0),s}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,s=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*s,t.y=Math.sin(i)*s,t.z=n*e,t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var s=[],r=[],o=0;o0&&t<=e*i&&(r=t>e-1?t-(o=Math.floor(t/e))*e:t,s.set(r,o)),s}},function(t,e){t.exports=function(t,e,i){return Math.abs(t-e)<=i}},function(t,e,i){var n=i(185),s=i(354),r=i(355),o=new s,a=new r,h=new n;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},function(t,e){t.exports="addtexture"},function(t,e){t.exports="onerror"},function(t,e){t.exports="onload"},function(t,e){t.exports="ready"},function(t,e){t.exports="removetexture"},function(t,e){t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","","void main()","{"," vec2 uv = gl_FragCoord.xy / uResolution;"," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);"," float alpha = mainColor.a;",""," if (!uInvertMaskAlpha)"," {"," alpha *= (maskColor.a);"," }"," else"," {"," alpha *= (1.0 - maskColor.a);"," }",""," gl_FragColor = vec4(mainColor.rgb * alpha, alpha);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","","precision mediump float;","","attribute vec2 inPosition;","","void main()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_FORWARD_DIFFUSE_FS","","precision mediump float;","","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","","const int kMaxLights = %LIGHT_COUNT%;","","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","","varying vec2 outTexCoord;","varying vec4 outTint;","","void main()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);"," vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.rgb * outTint.a, outTint.a);"," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;",""," for (int index = 0; index < kMaxLights; ++index)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }",""," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);"," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_TEXTURE_TINT_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.rgb * outTint.a, outTint.a);"," vec4 color = texture;",""," if (outTintEffect == 0.0)"," {"," // Multiply texture tint"," color = texture * texel;"," }"," else if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.rgb * outTint.a, texture.a);"," color.a = texture.a * texel.a;"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_TEXTURE_TINT_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform mat4 uModelMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}","",""].join("\n")},function(t,e,i){t.exports={GenerateTexture:i(370),Palettes:i(814)}},function(t,e,i){t.exports={ARNE16:i(371),C64:i(815),CGA:i(816),JMP:i(817),MSX:i(818)}},function(t,e){t.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},function(t,e){t.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},function(t,e){t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},function(t,e){t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},function(t,e,i){t.exports={Path:i(820),CubicBezier:i(372),Curve:i(86),Ellipse:i(373),Line:i(374),QuadraticBezier:i(375),Spline:i(376)}},function(t,e,i){var n=i(0),s=i(372),r=i(373),o=i(6),a=i(374),h=i(821),l=i(375),u=i(11),c=i(376),d=i(3),f=i(13),p=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.name="",this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new d,this._tmpVec2A=new d,this._tmpVec2B=new d,"object"==typeof t?this.fromJSON(t):this.startPoint.set(t,e)},add:function(t){return this.curves.push(t),this},circleTo:function(t,e,i){return void 0===e&&(e=!1),this.ellipseTo(t,t,0,360,e,i)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);return t.equals(e)||this.curves.push(new a(e,t)),this},cubicBezierTo:function(t,e,i,n,r,o){var a,h,l,u=this.getEndPoint();return t instanceof d?(a=t,h=e,l=i):(a=new d(i,n),h=new d(r,o),l=new d(t,e)),this.add(new s(u,a,h,l))},quadraticBezierTo:function(t,e,i,n){var s,r,o=this.getEndPoint();return t instanceof d?(s=t,r=e):(s=new d(i,n),r=new d(t,e)),this.add(new l(o,s,r))},draw:function(t,e){for(var i=0;i0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new d);for(var i=t*this.getLength(),n=this.getCurveLengths(),s=0;s=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new d),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new d),t.copy(this.startPoint)},lineTo:function(t,e){t instanceof d?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new a([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new c(t))},moveTo:function(t,e){return t instanceof d?this.add(new h(t.x,t.y)):this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},function(t,e,i){var n=i(36),s=i(380);t.exports=function(t,e,i){var r=i,o=i,a=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,l=2*i-h;r=s(l,h,t+1/3),o=s(l,h,t),a=s(l,h,t-1/3)}return(new n).setGLTo(r,o,a,1)}},function(t,e,i){var n=i(176);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],s=0;s<=359;s++)i.push(n(s/359,t,e));return i}},function(t,e,i){var n=i(123),s=function(t,e,i,s,r,o,a,h){void 0===a&&(a=100),void 0===h&&(h=0);var l=h/a;return{r:n(t,s,l),g:n(e,r,l),b:n(i,o,l)}};t.exports={RGBWithRGB:s,ColorWithRGB:function(t,e,i,n,r,o){return void 0===r&&(r=100),void 0===o&&(o=0),s(t.r,t.g,t.b,e,i,n,r,o)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),s(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(183),s=i(36);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e,i){var n=i(379);t.exports=function(t,e,i,s,r){return void 0===s&&(s=255),void 0===r&&(r="#"),"#"===r?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1):"0x"+n(s)+n(t)+n(e)+n(i)}},function(t,e,i){t.exports={BitmapMask:i(297),GeometryMask:i(298)}},function(t,e,i){var n={AddToDOM:i(129),DOMContentLoaded:i(381),GetScreenOrientation:i(382),GetTarget:i(387),ParseXML:i(388),RemoveFromDOM:i(191),RequestAnimationFrame:i(368)};t.exports=n},function(t,e,i){t.exports={EventEmitter:i(843)}},function(t,e,i){var n=i(0),s=i(9),r=i(22),o=new n({Extends:s,initialize:function(){s.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},function(t,e,i){var n=i(129),s=i(308),r=i(311),o=i(28),a=i(0),h=i(333),l=i(845),u=i(356),c=i(101),d=i(366),f=i(334),p=i(381),g=i(9),v=i(21),y=i(389),m=i(22),x=i(394),T=i(395),w=i(397),b=i(128),E=i(400),S=i(367),A=i(369),_=i(404),C=i(412),M=new a({initialize:function(t){this.config=new h(t),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new g,this.anims=new s(this),this.textures=new E(this),this.cache=new r(this),this.registry=new c(this),this.input=new y(this,this.config),this.scene=new w(this,this.config.sceneConfig),this.device=f,this.scale=new T(this,this.config),this.sound=null,this.sound=_.create(this),this.loop=new S(this,this.config.fps),this.plugins=new x(this,this.config),this.facebook=new C(this),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,p(this.boot.bind(this))},boot:function(){m.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),u(this),l(this),d(this),n(this.canvas,this.config.parent),this.textures.once(b.READY,this.texturesReady,this),this.events.emit(v.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(v.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),A(this);var t=this.events;t.on(v.HIDDEN,this.onHidden,this),t.on(v.VISIBLE,this.onVisible,this),t.on(v.BLUR,this.onBlur,this),t.on(v.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e);var n=this.renderer;n.preRender(),i.emit(v.PRE_RENDER,n,t,e),this.scene.render(n),n.postRender(),i.emit(v.POST_RENDER,n,t,e)},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e),i.emit(v.PRE_RENDER),i.emit(v.POST_RENDER)},onHidden:function(){this.loop.pause(),this.events.emit(v.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(v.RESUME)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.scene.destroy(),this.events.emit(v.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=M},function(t,e,i){var n=i(129);t.exports=function(t){var e=t.config;if(e.parent&&e.domCreateContainer){var i=document.createElement("div");i.style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: none;","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=i,n(i,e.parent)}}},function(t,e){t.exports="boot"},function(t,e){t.exports="destroy"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameout"},function(t,e){t.exports="gameover"},function(t,e){t.exports="gameobjectdown"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameobjectmove"},function(t,e){t.exports="gameobjectout"},function(t,e){t.exports="gameobjectover"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="wheel"},function(t,e){t.exports="gameobjectup"},function(t,e){t.exports="gameobjectwheel"},function(t,e){t.exports="boot"},function(t,e){t.exports="process"},function(t,e){t.exports="update"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointerdownoutside"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="pointerupoutside"},function(t,e){t.exports="wheel"},function(t,e){t.exports="pointerlockchange"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="start"},function(t,e){t.exports="update"},function(t,e){t.exports=function(t){if(!t)return window.innerHeight;var e=Math.abs(window.orientation),i={w:0,h:0},n=document.createElement("div");return n.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(n),i.w=90===e?n.offsetHeight:window.innerWidth,i.h=90===e?window.innerWidth:n.offsetHeight,document.documentElement.removeChild(n),n=null,90!==Math.abs(window.orientation)?i.h:i.w}},function(t,e){t.exports="addfile"},function(t,e){t.exports="complete"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="load"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="progress"},function(t,e){t.exports="start"},function(t,e,i){var n=i(1),s=i(194);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=n(t.settings,"physics",!1);if(e||i){var r=[];if(e&&r.push(s(e+"Physics")),i)for(var o in i)o=s(o.concat("Physics")),-1===r.indexOf(o)&&r.push(o);return r}}},function(t,e,i){var n=i(1);t.exports=function(t){var e=t.plugins.getDefaultScenePlugins(),i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e,i){var n={game:"game",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"};n.facebook="facebook",t.exports=n},function(t,e){t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var s,r=i.getElementsByTagName("SubTexture"),o=0;og||c<-g)&&(c=0),c<0&&(c=g+c),-1!==d&&(g=c+(d+1));for(var v=f,y=f,m=0,x=0,T=0;Tr&&(m=w-r),b>o&&(x=b-o),t.add(T,e,i+v,s+y,h-m,l-x),(v+=h+p)+h>r&&(v=f,y+=l+p)}return t}},function(t,e,i){var n=i(1);t.exports=function(t,e,i){var s=n(i,"frameWidth",null),r=n(i,"frameHeight",s);if(!s)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o=t.source[0];t.add("__BASE",0,0,0,o.width,o.height);var a,h=n(i,"startFrame",0),l=n(i,"endFrame",-1),u=n(i,"margin",0),c=n(i,"spacing",0),d=e.cutX,f=e.cutY,p=e.cutWidth,g=e.cutHeight,v=e.realWidth,y=e.realHeight,m=Math.floor((v-u+c)/(s+c)),x=Math.floor((y-u+c)/(r+c)),T=m*x,w=e.x,b=s-w,E=s-(v-p-w),S=e.y,A=r-S,_=r-(y-g-S);(h>T||h<-T)&&(h=0),h<0&&(h=T+h),-1!==l&&(T=h+(l+1));for(var C=u,M=u,P=0,O=e.sourceIndex,R=0;R0){var r=i-t.length;if(r<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),n&&n.call(s,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.splice(o,1),o--;if(0===(o=e.length))return null;i>0&&o>r&&(e.splice(r),o=r);for(var a=0;a0){var o=n-t.length;if(o<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),s&&s.call(r,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.pop(),a--;if(0===(a=e.length))return null;n>0&&a>o&&(e.splice(o),a=o);for(var h=a-1;h>=0;h--){var l=e[h];t.splice(i,0,l),s&&s.call(r,l)}return e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i0){var n=t[i-1],s=t.indexOf(n);t[i]=n,t[s]=e}return t}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e);if(-1===n||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&it.length-1)throw new Error("Index out of bounds");var r=n(t,e);return i&&i.call(s,r),r}},function(t,e,i){var n=i(74);t.exports=function(t,e,i,s,r){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===r&&(r=t),n(t,e,i)){var o=i-e,a=t.splice(e,o);if(s)for(var h=0;h0&&(t.splice(i,1),t.unshift(e)),e}},function(t,e,i){var n=i(74);t.exports=function(t,e,i,s,r){if(void 0===s&&(s=0),void 0===r&&(r=t.length),n(t,s,r))for(var o=s;o0){for(n=0;nl||U-N>l?(Y.push(X.i-1),X.cr?(Y.push(X.i+X.word.length),N=0,B=null):B=X):X.cr&&(Y.push(X.i+X.word.length),N=0,B=null)}for(n=Y.length-1;n>=0;n--)s=a,r=Y[n],o="\n",a=s.substr(0,r)+o+s.substr(r+1);i.wrappedText=a,h=a.length,k=[],F=null}for(n=0;nb&&(c=b),d>E&&(d=E);var W=b+w.xAdvance,V=E+v;fR&&(R=D),DR&&(R=D),D0&&(a=(o=z.wrappedText).length);var U=e._bounds.lines;1===N?X=(U.longest-U.lengths[0])/2:2===N&&(X=U.longest-U.lengths[0]);for(var G=s.roundPixels,W=0;W0&&(a=(o=L.wrappedText).length);var D=e._bounds.lines;1===P?R=(D.longest-D.lengths[0])/2:2===P&&(R=D.longest-D.lengths[0]),h.translate(-e.displayOriginX,-e.displayOriginY);for(var k=s.roundPixels,F=0;F0!=t>0,this._alpha=t}}});t.exports=r},function(t,e,i){var n=i(2),s=i(2);n=i(985),s=i(986),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){var r=e.list;if(0!==r.length){var o=e.localTransform;s?(o.loadIdentity(),o.multiply(s),o.translate(e.x,e.y),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY)):o.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);for(var h=e.alpha,l=e.scrollFactorX,u=e.scrollFactorY,c=r,d=r.length,f=0;f0||e.cropHeight>0;l&&(h.flush(),t.pushScissor(e.x,e.y,e.cropWidth*e.scaleX,e.cropHeight*e.scaleY));var u=h._tempMatrix1,c=h._tempMatrix2,d=h._tempMatrix3,f=h._tempMatrix4;c.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),u.copyFrom(s.matrix),r?(u.multiplyWithOffset(r,-s.scrollX*e.scrollFactorX,-s.scrollY*e.scrollFactorY),c.e=e.x,c.f=e.y,u.multiply(c,d)):(c.e-=s.scrollX*e.scrollFactorX,c.f-=s.scrollY*e.scrollFactorY,u.multiply(c,d));var p=e.frame,g=p.glTexture,v=p.cutX,y=p.cutY,m=g.width,x=g.height,T=e._isTinted&&e.tintFill,w=n.getTintAppendFloatAlpha(e._tintTL,s.alpha*e._alphaTL),b=n.getTintAppendFloatAlpha(e._tintTR,s.alpha*e._alphaTR),E=n.getTintAppendFloatAlpha(e._tintBL,s.alpha*e._alphaBL),S=n.getTintAppendFloatAlpha(e._tintBR,s.alpha*e._alphaBR);h.setTexture2D(g,0);var A,_,C=0,M=0,P=0,O=0,R=e.letterSpacing,L=0,D=0,k=0,F=0,I=e.scrollX,B=e.scrollY,N=e.fontData,Y=N.chars,X=N.lineHeight,z=e.fontSize/N.size,U=0,G=e._align,W=0,V=0;e.getTextBounds(!1);var H=e._bounds.lines;1===G?V=(H.longest-H.lengths[0])/2:2===G&&(V=H.longest-H.lengths[0]);for(var j=s.roundPixels,q=e.displayCallback,K=e.callbackData,J=0;J0&&e.cropHeight>0&&(h.beginPath(),h.rect(0,0,e.cropWidth,e.cropHeight),h.clip());for(var N=0;N0&&(Y=Y%b-b):Y>b?Y=b:Y<0&&(Y=b+Y%b),null===_&&(_=new o(F+Math.cos(N)*B,I+Math.sin(N)*B,v),E.push(_),k+=.01);k<1+z;)w=Y*k+N,x=F+Math.cos(w)*B,T=I+Math.sin(w)*B,_.points.push(new r(x,T,v)),k+=.01;w=Y+N,x=F+Math.cos(w)*B,T=I+Math.sin(w)*B,_.points.push(new r(x,T,v));break;case n.FILL_RECT:u.setTexture2D(M),u.batchFillRect(p[++P],p[++P],p[++P],p[++P],f,c);break;case n.FILL_TRIANGLE:u.setTexture2D(M),u.batchFillTriangle(p[++P],p[++P],p[++P],p[++P],p[++P],p[++P],f,c);break;case n.STROKE_TRIANGLE:u.setTexture2D(M),u.batchStrokeTriangle(p[++P],p[++P],p[++P],p[++P],p[++P],p[++P],v,f,c);break;case n.LINE_TO:null!==_?_.points.push(new r(p[++P],p[++P],v)):(_=new o(p[++P],p[++P],v),E.push(_));break;case n.MOVE_TO:_=new o(p[++P],p[++P],v),E.push(_);break;case n.SAVE:a.push(f.copyToArray());break;case n.RESTORE:f.copyFromArray(a.pop());break;case n.TRANSLATE:F=p[++P],I=p[++P],f.translate(F,I);break;case n.SCALE:F=p[++P],I=p[++P],f.scale(F,I);break;case n.ROTATE:f.rotate(p[++P]);break;case n.SET_TEXTURE:var U=p[++P],G=p[++P];u.currentFrame=U,u.setTexture2D(U.glTexture,0),u.tintEffect=G,M=U.glTexture;break;case n.CLEAR_TEXTURE:u.currentFrame=t.blankTexture,u.tintEffect=2,M=t.blankTexture.glTexture}}}},function(t,e,i){var n=i(2),s=i(2);n=i(998),s=i(999),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){this.pipeline.batchSprite(e,n,s)}},function(t,e){t.exports=function(t,e,i,n,s){t.batchSprite(e,e.frame,n,s)}},function(t,e,i){var n=i(2),s=i(2);n=i(1001),s=i(1002),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){this.pipeline.batchSprite(e,n,s)}},function(t,e){t.exports=function(t,e,i,n,s){t.batchSprite(e,e.frame,n,s)}},function(t,e,i){t.exports={GravityWell:i(425),Particle:i(426),ParticleEmitter:i(427),ParticleEmitterManager:i(207),Zones:i(1008)}},function(t,e,i){var n=i(0),s=i(348),r=i(90),o=i(1),a=i(63),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return this.propertyValue},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if("number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&(this.has(t,"random")||this.hasBoth(t,"start","end")||this.hasBoth(t,"min","max"))){this.start=this.has(t,"start")?t.start:t.min,this.end=this.has(t,"end")?t.end:t.max;var i=this.hasBoth(t,"min","max")||!!t.random;if(i){var n=t.random;Array.isArray(n)&&(this.start=n[0],this.end=n[1]),this.onEmit=this.randomRangedValueEmit}if(this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var s=this.has(t,"ease")?t.ease:"Linear";this.ease=r(s),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i){var n=t.data[e];return(n.max-n.min)*this.ease(i)+n.min}});t.exports=h},function(t,e,i){var n=i(2),s=i(2);n=i(1006),s=i(1007),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(10);t.exports=function(t,e,i,s,r){var o=e.emitters.list,a=o.length;if(0!==a){var h=this.pipeline,l=h._tempMatrix1.copyFrom(s.matrix),u=h._tempMatrix2,c=h._tempMatrix3,d=h._tempMatrix4.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);l.multiply(d),t.setPipeline(h);var f=s.roundPixels,p=e.defaultFrame.glTexture,g=n.getTintAppendFloatAlphaAndSwap;h.setTexture2D(p,0);for(var v=0;v?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:"ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",TEXT_SET7:"AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:"ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789"}},function(t,e,i){var n=i(5);t.exports=function(t,e){var i=e.width,s=e.height,r=Math.floor(i/2),o=Math.floor(s/2),a=n(e,"chars","");if(""!==a){var h=n(e,"image",""),l=n(e,"offset.x",0),u=n(e,"offset.y",0),c=n(e,"spacing.x",0),d=n(e,"spacing.y",0),f=n(e,"lineSpacing",0),p=n(e,"charsPerRow",null);null===p&&(p=t.sys.textures.getFrame(h).width/i)>a.length&&(p=a.length);for(var g=l,v=u,y={retroFont:!0,font:h,size:i,lineHeight:s+f,chars:{}},m=0,x=0;x0&&r.maxLines1&&(d+=f*(h-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:f,lineHeight:c}}},function(t,e,i){var n=i(2),s=i(2);n=i(1017),s=i(1018),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(10);t.exports=function(t,e,i,s,r){if(0!==e.width&&0!==e.height){var o=e.frame,a=o.width,h=o.height,l=n.getTintAppendFloatAlpha;this.pipeline.batchTexture(e,o.glTexture,a,h,e.x,e.y,a/e.style.resolution,h/e.style.resolution,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,a,h,l(e._tintTL,s.alpha*e._alphaTL),l(e._tintTR,s.alpha*e._alphaTR),l(e._tintBL,s.alpha*e._alphaBL),l(e._tintBR,s.alpha*e._alphaBR),e._isTinted&&e.tintFill,0,0,s,r)}}},function(t,e){t.exports=function(t,e,i,n,s){0!==e.width&&0!==e.height&&t.batchSprite(e,e.frame,n,s)}},function(t,e,i){var n=i(0),s=i(15),r=i(5),o=i(1020),a={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},h=new n({initialize:function(t,e){this.parent=t,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this._font,this.setStyle(e,!1,!0);var i=r(e,"metrics",!1);this.metrics=i?{ascent:r(i,"ascent",0),descent:r(i,"descent",0),fontSize:r(i,"fontSize",0)}:o(this)},setStyle:function(t,e,i){for(var n in void 0===e&&(e=!0),void 0===i&&(i=!1),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px"),a){var o=i?a[n][1]:this[n];this[n]="wordWrapCallback"===n||"wordWrapCallbackScope"===n?r(t,a[n][0],o):s(t,a[n][0],o)}var h=r(t,"font",null);null!==h&&this.setFont(h,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var l=r(t,"fill",null);return null!==l&&(this.color=l),e?this.update(!0):this.parent},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow:function(t,e){e?(t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur):(t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor=0,t.shadowBlur=0)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=o(this)),this.parent.updateText()},setFont:function(t,e){void 0===e&&(e=!0);var i=t,n="",s="";if("string"!=typeof t)i=r(t,"fontFamily","Courier"),n=r(t,"fontSize","16px"),s=r(t,"fontStyle","");else{var o=t.split(" "),a=0;s=o.length>2?o[a++]:"",n=o[a++]||"16px",i=o[a++]||"Courier"}return i===this.fontFamily&&n===this.fontSize&&s===this.fontStyle||(this.fontFamily=i,this.fontSize=n,this.fontStyle=s,e&&this.update(!0)),this.parent},setFontFamily:function(t){return this.fontFamily!==t&&(this.fontFamily=t,this.update(!0)),this.parent},setFontStyle:function(t){return this.fontStyle!==t&&(this.fontStyle=t,this.update(!0)),this.parent},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize!==t&&(this.fontSize=t,this.update(!0)),this.parent},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.parent.width=t),e&&(this.parent.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setResolution:function(t){return this.resolution=t,this.update(!1)},setStroke:function(t,e){return void 0===e&&(e=this.strokeThickness),void 0===t&&0!==this.strokeThickness?(this.strokeThickness=0,this.update(!0)):this.stroke===t&&this.strokeThickness===e||(this.stroke=t,this.strokeThickness=e,this.update(!0)),this.parent},setShadow:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===n&&(n=0),void 0===s&&(s=!1),void 0===r&&(r=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=n,this.shadowStroke=s,this.shadowFill=r,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},function(t,e,i){var n=i(28);t.exports=function(t){var e=n.create(this),i=e.getContext("2d");t.syncFont(e,i);var s=Math.ceil(i.measureText(t.testString).width*t.baselineX),r=s,o=2*r;r=r*t.baselineY|0,e.width=s,e.height=o,i.fillStyle="#f00",i.fillRect(0,0,s,o),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,r);var a={ascent:0,descent:0,fontSize:0};if(!i.getImageData(0,0,s,o))return a.ascent=r,a.descent=r+6,a.fontSize=a.ascent+a.descent,n.remove(e),a;var h,l,u=i.getImageData(0,0,s,o).data,c=u.length,d=4*s,f=0,p=!1;for(h=0;hr;h--){for(l=0;l0)for(u=o.fillTint,c=n.getTintAppendFloatAlphaAndSwap(e.fillColor,e.fillAlpha*d),u.TL=c,u.TR=c,u.BL=c,u.BR=c,C=0;C0)for(u=o.fillTint,c=n.getTintAppendFloatAlphaAndSwap(e.altFillColor,e.altFillAlpha*d),u.TL=c,u.TR=c,u.BL=c,u.BR=c,C=0;C0){var R=o.strokeTint,L=n.getTintAppendFloatAlphaAndSwap(e.outlineFillColor,e.outlineFillAlpha*d);for(R.TL=L,R.TR=L,R.BL=L,R.BR=L,_=1;_0)for(n(h,e),_=0;_0)for(n(h,e,e.altFillColor,e.altFillAlpha*c),_=0;_0){for(s(h,e,e.outlineFillColor,e.outlineFillAlpha*c),A=1;Ao.vertexCapacity&&o.flush(),o.setTexture2D(u,0);for(var y=o.vertexViewF32,m=o.vertexViewU32,x=o.vertexCount*o.vertexComponentCount-1,T=0,w=e.tintFill,b=0;b0?Math.PI*t.radius*t.radius:0}},function(t,e,i){var n=i(71);t.exports=function(t){return new n(t.x,t.y,t.radius)}},function(t,e,i){var n=i(60);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(60);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},function(t,e,i){var n=i(11);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(107);n.Area=i(1126),n.Circumference=i(423),n.CircumferencePoint=i(206),n.Clone=i(1127),n.Contains=i(108),n.ContainsPoint=i(1128),n.ContainsRect=i(1129),n.CopyFrom=i(1130),n.Equals=i(1131),n.GetBounds=i(1132),n.GetPoint=i(421),n.GetPoints=i(422),n.Offset=i(1133),n.OffsetPoint=i(1134),n.Random=i(167),t.exports=n},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},function(t,e,i){var n=i(107);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(108);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(108);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e,i){var n=i(11);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(4),s=i(217);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r,o,a,h,l=t.x,u=t.y,c=t.radius,d=e.x,f=e.y,p=e.radius;if(u===f)0==(a=(o=-2*f)*o-4*(r=1)*(d*d+(h=(p*p-c*c-d*d+l*l)/(2*(l-d)))*h-2*d*h+f*f-p*p))?i.push(new n(h,-o/(2*r))):a>0&&(i.push(new n(h,(-o+Math.sqrt(a))/(2*r))),i.push(new n(h,(-o-Math.sqrt(a))/(2*r))));else{var g=(l-d)/(u-f),v=(p*p-c*c-d*d+l*l-f*f+u*u)/(2*(u-f));0==(a=(o=2*u*g-2*v*g-2*l)*o-4*(r=g*g+1)*(l*l+u*u+v*v-c*c-2*u*v))?(h=-o/(2*r),i.push(new n(h,v-h*g))):a>0&&(h=(-o+Math.sqrt(a))/(2*r),i.push(new n(h,v-h*g)),h=(-o-Math.sqrt(a))/(2*r),i.push(new n(h,v-h*g)))}}return i}},function(t,e,i){var n=i(219),s=i(218);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC(),h=e.getLineD();n(r,t,i),n(o,t,i),n(a,t,i),n(h,t,i)}return i}},function(t,e,i){var n=i(11),s=i(140);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},function(t,e,i){var n=i(221),s=i(140);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=t.getLineA(),o=t.getLineB(),a=t.getLineC(),h=t.getLineD();n(r,e,i),n(o,e,i),n(a,e,i),n(h,e,i)}return i}},function(t,e,i){var n=i(456),s=i(221);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC();s(r,t,i),s(o,t,i),s(a,t,i)}return i}},function(t,e,i){var n=i(219),s=i(458);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=t.getLineA(),o=t.getLineB(),a=t.getLineC();n(r,e,i),n(o,e,i),n(a,e,i)}return i}},function(t,e,i){var n=i(461),s=i(459);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC();s(t,r,i),s(t,o,i),s(t,a,i)}return i}},function(t,e,i){var n=i(463);t.exports=function(t,e){if(!n(t,e))return!1;var i=Math.min(e.x1,e.x2),s=Math.max(e.x1,e.x2),r=Math.min(e.y1,e.y2),o=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=s&&t.y>=r&&t.y<=o}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===r&&(r=0),!(e>t.right+r||it.bottom+r||si&&(i=h.x),h.xr&&(r=h.y),h.yn(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.centerX,e.y=t.centerY,e}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var n=i(178);t.exports=function(t,e,i){var s=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),n(t,s,r)}},function(t,e,i){var n=i(11),s=i(140);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)?(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y):i.setEmpty(),i}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var n=i(4),s=i(40);t.exports=function(t,e,i){void 0===i&&(i=new n),e=s(e);var r=Math.sin(e),o=Math.cos(e),a=o>0?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r)-1&&(s.splice(a,1),this.clear(o,!0))}t.length=0,this._pendingRemoval.length=0,this._list=s.concat(e.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.isActive()},updatePoll:function(t,e){if(!this.isActive())return!1;if(this.pluginEvents.emit(d.UPDATE,t,e),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var i,n=this.manager,s=n.pointers,r=n.pointersTotal;for(i=0;i0){if(this._pollTimer-=e,!(this._pollTimer<0))return!1;this._pollTimer=this.pollRate}var a=!1;for(i=0;i0&&(a=!0)}return a},update:function(t,e){if(!this.isActive())return!1;for(var i=e.length,n=!1,s=0;s0&&(n=!0)}return this._updatedThisFrame=!0,n},clear:function(t,e){void 0===e&&(e=!1);var i=t.input;if(i){e||this.queueForRemoval(t),i.gameObject=void 0,i.target=void 0,i.hitArea=void 0,i.hitAreaCallback=void 0,i.callbackContext=void 0,this.manager.resetCursor(i),t.input=null;var n=this._draggable.indexOf(t);return n>-1&&this._draggable.splice(n,1),(n=this._drag[0].indexOf(t))>-1&&this._drag[0].splice(n,1),(n=this._over[0].indexOf(t))>-1&&this._over[0].splice(n,1),t}},disable:function(t){t.input.enabled=!1},enable:function(t,e,i,n){return void 0===n&&(n=!1),t.input?t.input.enabled=!0:this.setHitArea(t,e,i),t.input&&n&&!t.input.dropZone&&(t.input.dropZone=n),this},hitTestPointer:function(t){for(var e=this.cameras.getCamerasBelowPointer(t),i=0;i0)return t.camera=n,s}return t.camera=e[0],[]},processDownEvents:function(t){var e=0,i=this._temp,n=this._eventData,s=this._eventContainer;n.cancelled=!1;for(var r=!1,o=0;o0&&l(t.x,t.y,t.downX,t.downY)>=s?i=!0:n>0&&e>=t.downTime+n&&(i=!0),i)return this.setDragState(t,3),this.processDragStartList(t)},processDragStartList:function(t){if(3!==this.getDragState(t))return 0;for(var e=this._drag[t.id],i=0;i1&&(this.sortGameObjects(i),this.topOnly&&i.splice(1)),this._drag[t.id]=i,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?(this.setDragState(t,3),this.processDragStartList(t)):(this.setDragState(t,2),0))},processDragMoveEvent:function(t){if(2===this.getDragState(t)&&this.processDragThresholdEvent(t,this.manager.game.loop.now),4!==this.getDragState(t))return 0;for(var e=this._tempZones,i=this._drag[t.id],n=0;n0?(o.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,o,h),a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h)):(o.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,o,h),e[0]?(a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h)):a.target=null)}else!h&&e[0]&&(a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h));if(o.parentContainer){var u=t.x-a.dragStartXGlobal,c=t.y-a.dragStartYGlobal,f=o.getParentRotation(),p=u*Math.cos(f)+c*Math.sin(f),g=c*Math.cos(f)-u*Math.sin(f);p*=1/o.parentContainer.scaleX,g*=1/o.parentContainer.scaleY,s=p+a.dragStartX,r=g+a.dragStartY}else s=t.x-a.dragX,r=t.y-a.dragY;o.emit(d.GAMEOBJECT_DRAG,t,s,r),this.emit(d.DRAG,t,o,s,r)}return i.length},processDragUpEvent:function(t){for(var e=this._drag[t.id],i=0;i0){var r=this.manager,o=this._eventData,a=this._eventContainer;o.cancelled=!1;for(var h=!1,l=0;l0){var s=this.manager,r=this._eventData,o=this._eventContainer;r.cancelled=!1;var a=!1;this.sortGameObjects(e);for(var h=0;h0){for(this.sortGameObjects(s),e=0;e0){for(this.sortGameObjects(r),e=0;e-1&&this._draggable.splice(s,1)}return this},makePixelPerfect:function(t){void 0===t&&(t=1);var e=this.systems.textures;return h(e,t)},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);var n=!1,s=!1,r=!1,o=!1,h=!1,l=!0;if(y(e)){var u=e;e=p(u,"hitArea",null),i=p(u,"hitAreaCallback",null),n=p(u,"draggable",!1),s=p(u,"dropZone",!1),r=p(u,"cursor",!1),o=p(u,"useHandCursor",!1),h=p(u,"pixelPerfect",!1);var c=p(u,"alphaTolerance",1);h&&(e={},i=this.makePixelPerfect(c)),e&&i||(this.setHitAreaFromTexture(t),l=!1)}else"function"!=typeof e||i||(i=e,e={});for(var d=0;d=e}}},function(t,e,i){t.exports={Events:i(142),KeyboardManager:i(390),KeyboardPlugin:i(1247),Key:i(476),KeyCodes:i(131),KeyCombo:i(477),JustDown:i(1252),JustUp:i(1253),DownDuration:i(1254),UpDuration:i(1255)}},function(t,e){t.exports="keydown"},function(t,e){t.exports="keyup"},function(t,e){t.exports="keycombomatch"},function(t,e){t.exports="down"},function(t,e){t.exports="keydown-"},function(t,e){t.exports="keyup-"},function(t,e){t.exports="up"},function(t,e,i){var n=i(0),s=i(9),r=i(142),o=i(21),a=i(5),h=i(56),l=i(141),u=i(476),c=i(131),d=i(477),f=i(1251),p=i(105),g=new n({Extends:s,initialize:function(t){s.call(this),this.game=t.systems.game,this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.manager=t.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],t.pluginEvents.once(h.BOOT,this.boot,this),t.pluginEvents.on(h.START,this.start,this)},boot:function(){var t=this.settings.input;this.enabled=a(t,"keyboard",!0);var e=a(t,"keyboard.capture",null);e&&this.addCaptures(e),this.sceneInputPlugin.pluginEvents.once(h.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.useQueue?this.sceneInputPlugin.pluginEvents.on(h.UPDATE,this.update,this):this.sceneInputPlugin.manager.events.on(h.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(h.SHUTDOWN,this.shutdown,this),this.game.events.on(o.BLUR,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},addCapture:function(t){return this.manager.addCapture(t),this},removeCapture:function(t){return this.manager.removeCapture(t),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:c.UP,down:c.DOWN,left:c.LEFT,right:c.RIGHT,space:c.SPACE,shift:c.SHIFT})},addKeys:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!1);var n={};if("string"==typeof t){t=t.split(",");for(var s=0;s-1?n[s]=t:n[t.keyCode]=t,e&&this.addCapture(t.keyCode),t.setEmitOnRepeat(i),t}return"string"==typeof t&&(t=c[t.toUpperCase()]),n[t]||(n[t]=new u(this,t),e&&this.addCapture(t),n[t].setEmitOnRepeat(i)),n[t]},removeKey:function(t,e){void 0===e&&(e=!1);var i,n=this.keys;if(t instanceof u){var s=n.indexOf(t);s>-1&&(i=this.keys[s],this.keys[s]=void 0)}else"string"==typeof t&&(t=c[t.toUpperCase()]);return n[t]&&(i=n[t],n[t]=void 0),i&&(i.plugin=null,e&&i.destroy()),this},createCombo:function(t,e){return new d(this,t,e)},checkDown:function(t,e){if(this.enabled&&t.isDown){var i=p(this.time-t.timeDown,e);if(i>t._tick)return t._tick=i,!0}return!1},update:function(){var t=this.manager.queue,e=t.length;if(this.isActive()&&0!==e)for(var i=this.keys,n=0;n0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(s=!0,i=n(t,e))}else s=!0,i=n(t,e);return!s&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},function(t,e){t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},function(t,e){t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},function(t,e,i){var n=i(131),s={};for(var r in n)s[n[r]]=r;t.exports=s},function(t,e){t.exports=function(t){return!!t._justDown&&(t._justDown=!1,!0)}},function(t,e){t.exports=function(t){return!!t._justUp&&(t._justUp=!1,!0)}},function(t,e){t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeDown;return t.isDown&&i'),i.push(''),i.push(''),i.push(this.xhrLoader.responseText),i.push(""),i.push(""),i.push("");var n=[i.join("\n")],o=this;try{var a=new window.Blob(n,{type:"image/svg+xml;charset=utf-8"})}catch(t){return o.state=s.FILE_ERRORED,void o.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(o.data),o.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(o.data),o.onProcessError()},r.createObjectURL(this.data,a,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});o.register("htmlTexture",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r0},isLoading:function(){return this.state===s.LOADER_LOADING||this.state===s.LOADER_PROCESSING},isReady:function(){return this.state===s.LOADER_IDLE||this.state===s.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(a.START,this),0===this.list.size?this.loadComplete():(this.state=s.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(c.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(a.PROGRESS,this.progress)},update:function(){this.state===s.LOADER_LOADING&&this.list.size>0&&this.inflight.sizei&&(n=l,i=c)}}return n},moveTo:function(t,e,i,n,s){void 0===n&&(n=60),void 0===s&&(s=0);var o=Math.atan2(i-t.y,e-t.x);return s>0&&(n=r(t.x,t.y,e,i)/(s/1e3)),t.body.velocity.setToPolar(o,n),o},moveToObject:function(t,e,i,n){return this.moveTo(t,e.x,e.y,i,n)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new p),i.setToPolar(s(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new p),i.setToPolar(t,e)},overlapRect:function(t,e,i,n,s,r){return c(this.world,t,e,i,n,s,r)},overlapCirc:function(t,e,i,n,s){return u(this.world,t,e,i,n,s)},shutdown:function(){if(this.world){var t=this.systems.events;t.off(f.UPDATE,this.world.update,this.world),t.off(f.POST_UPDATE,this.world.postUpdate,this.world),t.off(f.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null}},destroy:function(){this.shutdown(),this.scene.sys.events.off(f.START,this.start,this),this.scene=null,this.systems=null}});d.register("ArcadePhysics",v,"arcadePhysics"),t.exports=v},function(t,e){t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},function(t,e){t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},function(t,e){t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,e,i){return this.body.setCollideWorldBounds(t,e,i),this}}},function(t,e){t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},function(t,e){t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this},setDamping:function(t){return this.body.useDamping=t,this}}},function(t,e){var i={enableBody:function(t,e,i,n,s){return t&&this.body.reset(e,i),n&&(this.body.gameObject.active=!0),s&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};t.exports=i},function(t,e){t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},function(t,e){t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},function(t,e){var i={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}};t.exports=i},function(t,e){t.exports={setMass:function(t){return this.body.mass=t,this}}},function(t,e){t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},function(t,e){t.exports={setVelocity:function(t,e){return this.body.setVelocity(t,e),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,e){return this.body.maxVelocity.set(t,e),this}}},function(t,e,i){var n=i(487),s=i(71),r=i(217),o=i(218);t.exports=function(t,e,i,a,h,l){var u=n(t,e-a,i-a,2*a,2*a,h,l);if(0===u.length)return u;for(var c=new s(e,i,a),d=new s,f=[],p=0;pe.deltaAbsY()?m=-1:e.deltaAbsX()0&&u&&t.checkCollision.right&&h&&t.right>i&&(a=t.right-i)>r&&(a=0),0!==a&&(t.customSeparateX?t.overlapX=a:n(t,a)),a}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):e>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=e,0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},function(t,e,i){var n=i(1313);t.exports=function(t,e,i,s,r,o){var a=0,h=e.faceTop,l=e.faceBottom,u=e.collideUp,c=e.collideDown;return o||(h=!0,l=!0,u=!0,c=!0),t.deltaY()<0&&c&&t.checkCollision.up?l&&t.y0&&u&&t.checkCollision.down&&h&&t.bottom>i&&(a=t.bottom-i)>r&&(a=0),0!==a&&(t.customSeparateY?t.overlapY=a:n(t,a)),a}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):e>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=e,0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},function(t,e,i){var n=i(491);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.x,a=e.velocity.x;if(t.immovable||e.immovable)t.immovable?(e.x+=r,e.velocity.x=o-a*e.bounce.x,t.moves&&(e.y+=(t.y-t.prev.y)*t.friction.y)):(t.x-=r,t.velocity.x=a-o*t.bounce.x,e.moves&&(t.y+=(e.y-e.prev.y)*e.friction.y));else{r*=.5,t.x-=r,e.x+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),l=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),u=.5*(h+l);h-=u,l-=u,t.velocity.x=u+h*t.bounce.x,e.velocity.x=u+l*e.bounce.x}return!0}},function(t,e,i){var n=i(492);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateY||e.customSeparateY)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.y,a=e.velocity.y;if(t.immovable||e.immovable)t.immovable?(e.y+=r,e.velocity.y=o-a*e.bounce.y,t.moves&&(e.x+=(t.x-t.prev.x)*t.friction.x)):(t.y-=r,t.velocity.y=a-o*t.bounce.y,e.moves&&(t.x+=(e.x-e.prev.x)*e.friction.x));else{r*=.5,t.y-=r,e.y+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),l=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),u=.5*(h+l);h-=u,l-=u,t.velocity.y=u+h*t.bounce.y,e.velocity.y=u+l*e.bounce.y}return!0}},function(t,e,i){t.exports={Body:i(496),Events:i(231),COLLIDES:i(112),CollisionMap:i(497),Factory:i(498),Image:i(500),ImpactBody:i(499),ImpactPhysics:i(1335),Sprite:i(501),TYPE:i(113),World:i(502)}},function(t,e,i){var n=i(20);t.exports=function(t,e,i,s,r){if(i)return n(e+i*t,-r,r);if(s){var o=s*t;return e-o>0?e-o:e+o<0?e+o:0}return n(e,-r,r)}},function(t,e){t.exports=function(t,e){if(t.standing=!1,e.collision.y&&(t.bounciness>0&&Math.abs(t.vel.y)>t.minBounceVelocity?t.vel.y*=-t.bounciness:(t.vel.y>0&&(t.standing=!0),t.vel.y=0)),e.collision.x&&(t.bounciness>0&&Math.abs(t.vel.x)>t.minBounceVelocity?t.vel.x*=-t.bounciness:t.vel.x=0),e.collision.slope){var i=e.collision.slope;if(t.bounciness>0){var n=t.vel.x*i.nx+t.vel.y*i.ny;t.vel.x=(t.vel.x-i.nx*n*2)*t.bounciness,t.vel.y=(t.vel.y-i.ny*n*2)*t.bounciness}else{var s=i.x*i.x+i.y*i.y,r=(t.vel.x*i.x+t.vel.y*i.y)/s;t.vel.x=i.x*r,t.vel.y=i.y*r;var o=Math.atan2(i.x,i.y);o>t.slopeStanding.min&&oi.last.x&&e.last.xi.last.y&&e.last.y0))r=t.collisionMap.trace(e.pos.x,e.pos.y,0,-(e.pos.y+e.size.y-i.pos.y),e.size.x,e.size.y),e.pos.y=r.pos.y,e.bounciness>0&&e.vel.y>e.minBounceVelocity?e.vel.y*=-e.bounciness:(e.standing=!0,e.vel.y=0);else{var l=(e.vel.y-i.vel.y)/2;e.vel.y=-l,i.vel.y=l,s=i.vel.x*t.delta,r=t.collisionMap.trace(e.pos.x,e.pos.y,s,-o/2,e.size.x,e.size.y),e.pos.y=r.pos.y;var u=t.collisionMap.trace(i.pos.x,i.pos.y,0,o/2,i.size.x,i.size.y);i.pos.y=u.pos.y}}},function(t,e,i){t.exports={BodyBounds:i(503),Factory:i(504),Image:i(506),Matter:i(239),MatterPhysics:i(1371),PolyDecomp:i(505),Sprite:i(507),TileBody:i(238),PhysicsEditorParser:i(235),PhysicsJSONParser:i(236),World:i(511)}},function(t,e,i){var n=i(147),s=i(1),r=i(3);t.exports=function(t,e,i,o){void 0===i&&(i={}),void 0===o&&(o=!0);var a=e.x,h=e.y;if(e.body={temp:!0,position:{x:a,y:h}},[n.Bounce,n.Collision,n.Force,n.Friction,n.Gravity,n.Mass,n.Sensor,n.SetBody,n.Sleep,n.Static,n.Transform,n.Velocity].forEach(function(t){for(var i in t)(n=t[i]).get&&"function"==typeof n.get||n.set&&"function"==typeof n.set?Object.defineProperty(e,i,{get:t[i].get,set:t[i].set}):Object.defineProperty(e,i,{value:t[i]});var n}),e.world=t,e._tempVec2=new r(a,h),i.hasOwnProperty("type")&&"body"===i.type)e.setExistingBody(i,o);else{var l=s(i,"shape",null);l||(l="rectangle"),i.addToWorld=o,e.setBody(l,i)}return e}},function(t,e){t.exports={setBounce:function(t){return this.body.restitution=t,this}}},function(t,e){var i={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var e=0;if(Array.isArray(t))for(var i=0;i1?1:0;s0},intersectPoint:function(t,e,i){i=this.getMatterBodies(i);var n=D.create(t,e),s=[];return M.point(i,n).forEach(function(t){-1===s.indexOf(t)&&s.push(t)}),s},intersectRect:function(t,e,i,n,s,r){void 0===s&&(s=!1),r=this.getMatterBodies(r);var o={min:{x:t,y:e},max:{x:t+i,y:e+n}},a=[];return M.region(r,o,s).forEach(function(t){-1===a.indexOf(t)&&a.push(t)}),a},intersectRay:function(t,e,i,n,s,r){void 0===s&&(s=1),r=this.getMatterBodies(r);for(var o=[],a=M.ray(r,D.create(t,e),D.create(i,n),s),h=0;h0)for(var a=s+1;ae.max.x?i=e.min.x-t.max.x:t.max.xe.max.y?n=e.min.y-t.max.y:t.max.y=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;this.systems.events.off(r.UPDATE,this.step,this),t.events.emit(r.TRANSITION_COMPLETE,this.scene),e.isTransition=!1,e.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(t,e,i,n){return this.manager.add(t,e,i,n)},launch:function(t,e){return t&&t!==this.key&&this.manager.queueOp("start",t,e),this},run:function(t,e){return t&&t!==this.key&&this.manager.queueOp("run",t,e),this},pause:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("pause",t,e),this},resume:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("resume",t,e),this},sleep:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("sleep",t,e),this},wake:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("wake",t,e),this},switch:function(t){return t!==this.key&&this.manager.queueOp("switch",this.key,t),this},stop:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t,e),this},setActive:function(t,e,i){void 0===e&&(e=this.key);var n=this.manager.getScene(e);return n&&n.sys.setActive(t,i),this},setVisible:function(t,e){void 0===e&&(e=this.key);var i=this.manager.getScene(e);return i&&i.sys.setVisible(t),this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isPaused:function(t){return void 0===t&&(t=this.key),this.manager.isPaused(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.swapPosition(t,e),this},moveAbove:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveAbove(t,e),this},moveBelow:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveBelow(t,e),this},remove:function(t){return void 0===t&&(t=this.key),this.manager.remove(t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(r.SHUTDOWN,this.shutdown,this),t.off(r.POST_UPDATE,this.step,this),t.off(r.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});a.register("ScenePlugin",h,"scenePlugin"),t.exports=h},function(t,e,i){t.exports={List:i(135),Map:i(172),ProcessQueue:i(199),RTree:i(493),Set:i(110),Size:i(396)}},function(t,e,i){var n=i(17),s=i(1387),r={CanvasTexture:i(401),Events:i(128),FilterMode:s,Frame:i(106),Parsers:i(403),Texture:i(195),TextureManager:i(400),TextureSource:i(402)};r=n(!1,r,s),t.exports=r},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(150),Parsers:i(1418),Formats:i(34),ImageCollection:i(523),ParseToTilemap:i(252),Tile:i(80),Tilemap:i(532),TilemapCreator:i(1427),TilemapFactory:i(1428),Tileset:i(154),LayerData:i(116),MapData:i(117),ObjectLayer:i(526),DynamicTilemapLayer:i(533),StaticTilemapLayer:i(534)}},function(t,e,i){var n=i(26),s=i(59);t.exports=function(t,e,i,r,o,a,h,l){t<0&&(t=0),e<0&&(e=0),void 0===h&&(h=!0);for(var u=n(t,e,i,r,null,l),c=o-t,d=a-e,f=0;f=0&&p=0&&g=v;o--)(h=c[a][o])&&-1!==h.index&&h.visible&&0!==h.alpha&&i.push(h);else if(2===r)for(a=x;a>=m;a--)for(o=v;c[a]&&o=m;a--)for(o=y;c[a]&&o>=v;o--)(h=c[a][o])&&-1!==h.index&&h.visible&&0!==h.alpha&&i.push(h);return u.tilesDrawn=i.length,u.tilesTotal=d*f,i}},function(t,e,i){var n=i(26),s=i(59),r=i(79);t.exports=function(t,e,i,o,a,h,l){for(var u=-1!==l.collideIndexes.indexOf(t),c=n(e,i,o,a,null,l),d=0;d=0;r--)for(s=n.width-1;s>=0;s--)if((o=n.data[r][s])&&o.index===t){if(a===e)return o;a+=1}}else for(r=0;re)){for(var l=t;l<=e;l++)r(l,i,a);if(h)for(var u=0;u=t&&d.index<=e&&n(d,i)}o&&s(0,0,a.width,a.height,a)}}},function(t,e,i){var n=i(79),s=i(59),r=i(247);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a0&&n(a,t)}}e&&s(0,0,i.width,i.height,i)}},function(t,e){t.exports=function(t,e,i,n){if("number"==typeof t)n.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var s=0,r=t.length;s1||e.scaleY>1)&&(u.imageSmoothingEnabled=!1);for(var f=0;f0&&(t.currentPipeline&&t.currentPipeline.vertexCount>0&&t.flush(),r.vertexBuffer=e.vertexBuffer[a],t.setPipeline(r),t.setTexture2D(s[a].glTexture,0),t.gl.drawArrays(r.topology,0,e.vertexCount[a]));r.vertexBuffer=o,r.viewIdentity(),r.modelIdentity()}},function(t,e){t.exports=function(t,e,i,n,s){e.cull(n);var r=e.culledTiles,o=r.length;if(0!==o){var a=t._tempMatrix1,h=t._tempMatrix2,l=t._tempMatrix3;h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),a.copyFrom(n.matrix);var u=t.currentContext,c=e.gidMap;u.save(),s?(a.multiplyWithOffset(s,-n.scrollX*e.scrollFactorX,-n.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y,a.multiply(h,l),l.copyToContext(u)):(h.e-=n.scrollX*e.scrollFactorX,h.f-=n.scrollY*e.scrollFactorY,h.copyToContext(u));var d=n.alpha*e.alpha;(!t.antialias||e.scaleX>1||e.scaleY>1)&&(u.imageSmoothingEnabled=!1);for(var f=0;f-1&&this._active.splice(s,1),n.destroy()}for(i=0;i=n.delay)){var s=n.elapsed-n.delay;n.elapsed=n.delay,!n.hasDispatched&&n.callback&&(n.hasDispatched=!0,n.callback.apply(n.callbackScope,n.args)),n.repeatCount>0?(n.repeatCount--,n.elapsed=s,n.hasDispatched=!1):this._pendingRemoval.push(n)}}}},shutdown:function(){var t;for(t=0;t-1&&(e.state=u.REMOVED,s.splice(r,1)):(e.state=u.REMOVED,n.splice(r,1))}for(i.length=0,i=this._add,t=0;t>2],r+=i[(3&n[o])<<4|n[o+1]>>4],r+=i[(15&n[o+1])<<2|n[o+2]>>6],r+=i[63&n[o+2]];return s%3==2?r=r.substring(0,r.length-1)+"=":s%3==1&&(r=r.substring(0,r.length-2)+"=="),r}},function(t,e,i){t.exports={Clone:i(73),Extend:i(17),GetAdvancedValue:i(15),GetFastValue:i(1),GetMinMaxValue:i(1452),GetValue:i(5),HasAll:i(1453),HasAny:i(430),HasValue:i(91),IsPlainObject:i(7),Merge:i(88),MergeRight:i(1454),Pick:i(524),SetValue:i(450)}},function(t,e,i){var n=i(5),s=i(20);t.exports=function(t,e,i,r,o){void 0===o&&(o=i);var a=n(t,e,o);return s(a,i,r)}},function(t,e){t.exports=function(t,e){for(var i=0;i - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -354,7 +354,7 @@ module.exports = Class; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -381,7 +381,7 @@ module.exports = NOOP; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -424,7 +424,7 @@ module.exports = GetFastValue; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1063,7 +1063,7 @@ module.exports = Vector2; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1156,13 +1156,13 @@ module.exports = Point; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var PluginCache = __webpack_require__(21); -var SceneEvents = __webpack_require__(22); +var PluginCache = __webpack_require__(23); +var SceneEvents = __webpack_require__(19); /** * @classdesc @@ -1218,7 +1218,7 @@ var GameObjectFactory = new Class({ /** * A reference to the Scene Update List. * - * @name Phaser.GameObjects.GameObjectFactory#updateList; + * @name Phaser.GameObjects.GameObjectFactory#updateList * @type {Phaser.GameObjects.UpdateList} * @protected * @since 3.0.0 @@ -1261,14 +1261,14 @@ var GameObjectFactory = new Class({ /** * Adds an existing Game Object to this Scene. - * + * * If the Game Object renders, it will be added to the Display List. * If it has a `preUpdate` method, it will be added to the Update List. * * @method Phaser.GameObjects.GameObjectFactory#existing * @since 3.0.0 * - * @param {Phaser.GameObjects.GameObject} child - The child to be added to this Scene. + * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group)} child - The child to be added to this Scene. * * @return {Phaser.GameObjects.GameObject} The Game Object that was added. */ @@ -1323,8 +1323,19 @@ var GameObjectFactory = new Class({ }); -// Static method called directly by the Game Object factory functions - +/** + * Static method called directly by the Game Object factory functions. + * With this method you can register a custom GameObject factory in the GameObjectFactory, + * providing a name (`factoryType`) and the constructor (`factoryFunction`) in order + * to be called when you call to Phaser.Scene.add[ factoryType ] method. + * + * @method Phaser.GameObjects.GameObjectFactory.register + * @static + * @since 3.0.0 + * + * @param {string} factoryType - The key of the factory that you will use to call to Phaser.Scene.add[ factoryType ] method. + * @param {function} factoryFunction - The constructor function to be called when you invoke to the Phaser.Scene.add method. + */ GameObjectFactory.register = function (factoryType, factoryFunction) { if (!GameObjectFactory.prototype.hasOwnProperty(factoryType)) @@ -1333,6 +1344,17 @@ GameObjectFactory.register = function (factoryType, factoryFunction) } }; +/** + * Static method called directly by the Game Object factory functions. + * With this method you can remove a custom GameObject factory registered in the GameObjectFactory, + * providing a its `factoryType`. + * + * @method Phaser.GameObjects.GameObjectFactory.remove + * @static + * @since 3.0.0 + * + * @param {string} factoryType - The key of the factory that you want to remove from the GameObjectFactory. + */ GameObjectFactory.remove = function (factoryType) { if (GameObjectFactory.prototype.hasOwnProperty(factoryType)) @@ -1352,7 +1374,7 @@ module.exports = GameObjectFactory; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1423,7 +1445,7 @@ module.exports = GetValue; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1479,7 +1501,7 @@ module.exports = IsPlainObject; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1892,7 +1914,7 @@ if (true) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2026,17 +2048,17 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Contains = __webpack_require__(47); -var GetPoint = __webpack_require__(147); -var GetPoints = __webpack_require__(257); +var GetPoint = __webpack_require__(149); +var GetPoints = __webpack_require__(271); var GEOM_CONST = __webpack_require__(46); -var Line = __webpack_require__(55); -var Random = __webpack_require__(150); +var Line = __webpack_require__(56); +var Random = __webpack_require__(152); /** * @classdesc @@ -2537,7 +2559,7 @@ module.exports = Rectangle; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2547,27 +2569,28 @@ module.exports = Rectangle; module.exports = { - Alpha: __webpack_require__(252), - Animation: __webpack_require__(484), - BlendMode: __webpack_require__(255), - ComputedSize: __webpack_require__(527), - Crop: __webpack_require__(528), - Depth: __webpack_require__(256), - Flip: __webpack_require__(529), - GetBounds: __webpack_require__(530), - Mask: __webpack_require__(260), - Origin: __webpack_require__(547), - PathFollower: __webpack_require__(548), - Pipeline: __webpack_require__(151), - ScrollFactor: __webpack_require__(263), - Size: __webpack_require__(549), - Texture: __webpack_require__(550), - TextureCrop: __webpack_require__(551), - Tint: __webpack_require__(552), - ToJSON: __webpack_require__(264), - Transform: __webpack_require__(265), + Alpha: __webpack_require__(527), + AlphaSingle: __webpack_require__(266), + Animation: __webpack_require__(498), + BlendMode: __webpack_require__(269), + ComputedSize: __webpack_require__(546), + Crop: __webpack_require__(547), + Depth: __webpack_require__(270), + Flip: __webpack_require__(548), + GetBounds: __webpack_require__(549), + Mask: __webpack_require__(274), + Origin: __webpack_require__(566), + PathFollower: __webpack_require__(567), + Pipeline: __webpack_require__(153), + ScrollFactor: __webpack_require__(277), + Size: __webpack_require__(568), + Texture: __webpack_require__(569), + TextureCrop: __webpack_require__(570), + Tint: __webpack_require__(571), + ToJSON: __webpack_require__(278), + Transform: __webpack_require__(279), TransformMatrix: __webpack_require__(32), - Visible: __webpack_require__(266) + Visible: __webpack_require__(280) }; @@ -2578,7 +2601,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2670,13 +2693,13 @@ module.exports = MATH_CONST; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var ComponentsToJSON = __webpack_require__(264); -var DataManager = __webpack_require__(111); +var ComponentsToJSON = __webpack_require__(278); +var DataManager = __webpack_require__(113); var EventEmitter = __webpack_require__(9); var Events = __webpack_require__(90); @@ -2731,7 +2754,7 @@ var GameObject = new Class({ * * Phaser itself will never modify this value, although plugins may do so. * - * Use this property to track the state of a Game Object during its lifetime. For example, it could move from + * Use this property to track the state of a Game Object during its lifetime. For example, it could change from * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons. * If you need to store complex data about your Game Object, look at using the Data Component instead. @@ -3311,11 +3334,11 @@ module.exports = GameObject; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH = __webpack_require__(166); +var MATH = __webpack_require__(168); var GetValue = __webpack_require__(6); /** @@ -3398,13 +3421,13 @@ module.exports = GetAdvancedValue; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var PluginCache = __webpack_require__(21); -var SceneEvents = __webpack_require__(22); +var PluginCache = __webpack_require__(23); +var SceneEvents = __webpack_require__(19); /** * @classdesc @@ -3461,7 +3484,7 @@ var GameObjectCreator = new Class({ /** * A reference to the Scene Update List. * - * @name Phaser.GameObjects.GameObjectCreator#updateList; + * @name Phaser.GameObjects.GameObjectCreator#updateList * @type {Phaser.GameObjects.UpdateList} * @protected * @since 3.0.0 @@ -3566,7 +3589,7 @@ module.exports = GameObjectCreator; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3665,7 +3688,7 @@ module.exports = Extend; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3675,33 +3698,72 @@ module.exports = Extend; module.exports = { - BLUR: __webpack_require__(531), - BOOT: __webpack_require__(532), - CONTEXT_LOST: __webpack_require__(533), - CONTEXT_RESTORED: __webpack_require__(534), - DESTROY: __webpack_require__(535), - FOCUS: __webpack_require__(536), - HIDDEN: __webpack_require__(537), - PAUSE: __webpack_require__(538), - POST_RENDER: __webpack_require__(539), - POST_STEP: __webpack_require__(540), - PRE_RENDER: __webpack_require__(541), - PRE_STEP: __webpack_require__(542), - READY: __webpack_require__(543), - RESUME: __webpack_require__(544), - STEP: __webpack_require__(545), - VISIBLE: __webpack_require__(546) + BLUR: __webpack_require__(550), + BOOT: __webpack_require__(551), + CONTEXT_LOST: __webpack_require__(552), + CONTEXT_RESTORED: __webpack_require__(553), + DESTROY: __webpack_require__(554), + FOCUS: __webpack_require__(555), + HIDDEN: __webpack_require__(556), + PAUSE: __webpack_require__(557), + POST_RENDER: __webpack_require__(558), + POST_STEP: __webpack_require__(559), + PRE_RENDER: __webpack_require__(560), + PRE_STEP: __webpack_require__(561), + READY: __webpack_require__(562), + RESUME: __webpack_require__(563), + STEP: __webpack_require__(564), + VISIBLE: __webpack_require__(565) }; /***/ }), /* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Scenes.Events + */ + +module.exports = { + + BOOT: __webpack_require__(700), + CREATE: __webpack_require__(701), + DESTROY: __webpack_require__(702), + PAUSE: __webpack_require__(703), + POST_UPDATE: __webpack_require__(704), + PRE_UPDATE: __webpack_require__(705), + READY: __webpack_require__(706), + RENDER: __webpack_require__(707), + RESUME: __webpack_require__(708), + SHUTDOWN: __webpack_require__(709), + SLEEP: __webpack_require__(710), + START: __webpack_require__(711), + TRANSITION_COMPLETE: __webpack_require__(712), + TRANSITION_INIT: __webpack_require__(713), + TRANSITION_OUT: __webpack_require__(714), + TRANSITION_START: __webpack_require__(715), + TRANSITION_WAKE: __webpack_require__(716), + UPDATE: __webpack_require__(717), + WAKE: __webpack_require__(718) + +}; + + +/***/ }), +/* 20 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3848,23 +3910,23 @@ module.exports = FILE_CONST; /***/ }), -/* 20 */ +/* 21 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); +var CONST = __webpack_require__(20); var Events = __webpack_require__(81); var GetFastValue = __webpack_require__(2); -var GetURL = __webpack_require__(132); -var MergeXHRSettings = __webpack_require__(211); -var XHRLoader = __webpack_require__(433); -var XHRSettings = __webpack_require__(133); +var GetURL = __webpack_require__(134); +var MergeXHRSettings = __webpack_require__(212); +var XHRLoader = __webpack_require__(447); +var XHRSettings = __webpack_require__(135); /** * @classdesc @@ -4389,12 +4451,42 @@ module.exports = File; /***/ }), -/* 21 */ +/* 22 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Force a value within the boundaries by clamping it to the range `min`, `max`. + * + * @function Phaser.Math.Clamp + * @since 3.0.0 + * + * @param {number} value - The value to be clamped. + * @param {number} min - The minimum bounds. + * @param {number} max - The maximum bounds. + * + * @return {number} The clamped value. + */ +var Clamp = function (value, min, max) +{ + return Math.max(min, Math.min(max, value)); +}; + +module.exports = Clamp; + + +/***/ }), +/* 23 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4597,82 +4689,13 @@ PluginCache.destroyCustomPlugins = function () module.exports = PluginCache; -/***/ }), -/* 22 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Scenes.Events - */ - -module.exports = { - - BOOT: __webpack_require__(681), - CREATE: __webpack_require__(682), - DESTROY: __webpack_require__(683), - PAUSE: __webpack_require__(684), - POST_UPDATE: __webpack_require__(685), - PRE_UPDATE: __webpack_require__(686), - READY: __webpack_require__(687), - RENDER: __webpack_require__(688), - RESUME: __webpack_require__(689), - SHUTDOWN: __webpack_require__(690), - SLEEP: __webpack_require__(691), - START: __webpack_require__(692), - TRANSITION_COMPLETE: __webpack_require__(693), - TRANSITION_INIT: __webpack_require__(694), - TRANSITION_OUT: __webpack_require__(695), - TRANSITION_START: __webpack_require__(696), - TRANSITION_WAKE: __webpack_require__(697), - UPDATE: __webpack_require__(698), - WAKE: __webpack_require__(699) - -}; - - -/***/ }), -/* 23 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Force a value within the boundaries by clamping it to the range `min`, `max`. - * - * @function Phaser.Math.Clamp - * @since 3.0.0 - * - * @param {number} value - The value to be clamped. - * @param {number} min - The minimum bounds. - * @param {number} max - The maximum bounds. - * - * @return {number} The clamped value. - */ -var Clamp = function (value, min, max) -{ - return Math.max(min, Math.min(max, value)); -}; - -module.exports = Clamp; - - /***/ }), /* 24 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4756,7 +4779,7 @@ module.exports = GetTilesWithin; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4823,12 +4846,12 @@ module.exports = PropertyValueSet; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var CONST = __webpack_require__(29); -var Smoothing = __webpack_require__(162); +var Smoothing = __webpack_require__(164); // The pool into which the canvas elements are placed. var pool = []; @@ -5084,7 +5107,7 @@ module.exports = CanvasPool(); /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -5172,7 +5195,7 @@ module.exports = SetTransform; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -5300,7 +5323,7 @@ module.exports = BuildGameObject; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -5320,11 +5343,11 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.21.0', + VERSION: '3.22.0', BlendModes: __webpack_require__(52), - ScaleModes: __webpack_require__(230), + ScaleModes: __webpack_require__(231), /** * AUTO Detect Renderer. @@ -5438,14 +5461,14 @@ module.exports = CONST; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var Line = __webpack_require__(55); +var Line = __webpack_require__(56); /** * @classdesc @@ -5458,7 +5481,7 @@ var Line = __webpack_require__(55); * @constructor * @since 3.13.0 * - * @extends Phaser.GameObjects.Components.Alpha + * @extends Phaser.GameObjects.Components.AlphaSingle * @extends Phaser.GameObjects.Components.BlendMode * @extends Phaser.GameObjects.Components.ComputedSize * @extends Phaser.GameObjects.Components.Depth @@ -5479,7 +5502,7 @@ var Shape = new Class({ Extends: GameObject, Mixins: [ - Components.Alpha, + Components.AlphaSingle, Components.BlendMode, Components.ComputedSize, Components.Depth, @@ -5738,7 +5761,7 @@ module.exports = Shape; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -5793,7 +5816,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -6761,15 +6784,15 @@ module.exports = TransformMatrix; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var GetColor = __webpack_require__(160); -var GetColor32 = __webpack_require__(278); -var HSVToRGB = __webpack_require__(161); -var RGBToHSV = __webpack_require__(279); +var GetColor = __webpack_require__(162); +var GetColor32 = __webpack_require__(292); +var HSVToRGB = __webpack_require__(163); +var RGBToHSV = __webpack_require__(293); /** * @namespace Phaser.Display.Color @@ -7624,7 +7647,7 @@ module.exports = Color; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7691,7 +7714,7 @@ module.exports = PropertyValueInc; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7721,7 +7744,7 @@ module.exports = DegToRad; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7754,9 +7777,9 @@ module.exports = FillStyleCanvas; /***/ }), /* 37 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -/* WEBPACK VAR INJECTION */(function(global) {/** +/** * The `Matter.Common` module contains utility functions that are common to all modules. * * @class Common @@ -8015,7 +8038,7 @@ module.exports = Common; * @return {number} the current timestamp */ Common.now = function() { - if (window.performance) { + if (typeof window !== 'undefined' && window.performance) { if (window.performance.now) { return window.performance.now(); } else if (window.performance.webkitNow) { @@ -8293,28 +8316,8 @@ module.exports = Common; func )); }; - - /** - * Used to require external libraries outside of the bundle. - * It first looks for the `globalName` on the environment's global namespace. - * If the global is not found, it will fall back to using the standard `require` using the `moduleName`. - * @private - * @method _requireGlobal - * @param {string} globalName The global module name - * @param {string} moduleName The fallback CommonJS module name - * @return {} The loaded module - */ - Common._requireGlobal = function(globalName, moduleName) { - var obj = (typeof window !== 'undefined' ? window[globalName] : typeof global !== 'undefined' ? global[globalName] : null); - - // Breaks webpack :( - // return obj || require(moduleName); - - return obj; - }; })(); -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(483))) /***/ }), /* 38 */ @@ -8322,7 +8325,7 @@ module.exports = Common; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8350,14 +8353,14 @@ module.exports = GetBottom; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * Positions the Game Object so that the bottom of its bounds aligns with the given coordinate. + * Positions the Game Object so that the top of its bounds aligns with the given coordinate. * - * @function Phaser.Display.Bounds.SetBottom + * @function Phaser.Display.Bounds.SetTop * @since 3.0.0 * * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] @@ -8367,14 +8370,14 @@ module.exports = GetBottom; * * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned. */ -var SetBottom = function (gameObject, value) +var SetTop = function (gameObject, value) { - gameObject.y = (value - gameObject.height) + (gameObject.height * gameObject.originY); + gameObject.y = value + (gameObject.height * gameObject.originY); return gameObject; }; -module.exports = SetBottom; +module.exports = SetTop; /***/ }), @@ -8383,7 +8386,7 @@ module.exports = SetBottom; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8411,7 +8414,7 @@ module.exports = GetLeft; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8444,7 +8447,7 @@ module.exports = SetLeft; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8472,7 +8475,7 @@ module.exports = GetRight; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8505,7 +8508,40 @@ module.exports = SetRight; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Positions the Game Object so that the bottom of its bounds aligns with the given coordinate. + * + * @function Phaser.Display.Bounds.SetBottom + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned. + * @param {number} value - The coordinate to position the Game Object bounds on. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned. + */ +var SetBottom = function (gameObject, value) +{ + gameObject.y = (value - gameObject.height) + (gameObject.height * gameObject.originY); + + return gameObject; +}; + +module.exports = SetBottom; + + +/***/ }), +/* 45 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8527,46 +8563,13 @@ var GetTop = function (gameObject) module.exports = GetTop; -/***/ }), -/* 45 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Positions the Game Object so that the top of its bounds aligns with the given coordinate. - * - * @function Phaser.Display.Bounds.SetTop - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned. - * @param {number} value - The coordinate to position the Game Object bounds on. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned. - */ -var SetTop = function (gameObject, value) -{ - gameObject.y = value + (gameObject.height * gameObject.originY); - - return gameObject; -}; - -module.exports = SetTop; - - /***/ }), /* 46 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8646,7 +8649,7 @@ module.exports = GEOM_CONST; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8681,7 +8684,7 @@ module.exports = Contains; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8691,21 +8694,21 @@ module.exports = Contains; module.exports = { - DESTROY: __webpack_require__(622), - FADE_IN_COMPLETE: __webpack_require__(623), - FADE_IN_START: __webpack_require__(624), - FADE_OUT_COMPLETE: __webpack_require__(625), - FADE_OUT_START: __webpack_require__(626), - FLASH_COMPLETE: __webpack_require__(627), - FLASH_START: __webpack_require__(628), - PAN_COMPLETE: __webpack_require__(629), - PAN_START: __webpack_require__(630), - POST_RENDER: __webpack_require__(631), - PRE_RENDER: __webpack_require__(632), - SHAKE_COMPLETE: __webpack_require__(633), - SHAKE_START: __webpack_require__(634), - ZOOM_COMPLETE: __webpack_require__(635), - ZOOM_START: __webpack_require__(636) + DESTROY: __webpack_require__(641), + FADE_IN_COMPLETE: __webpack_require__(642), + FADE_IN_START: __webpack_require__(643), + FADE_OUT_COMPLETE: __webpack_require__(644), + FADE_OUT_START: __webpack_require__(645), + FLASH_COMPLETE: __webpack_require__(646), + FLASH_START: __webpack_require__(647), + PAN_COMPLETE: __webpack_require__(648), + PAN_START: __webpack_require__(649), + POST_RENDER: __webpack_require__(650), + PRE_RENDER: __webpack_require__(651), + SHAKE_COMPLETE: __webpack_require__(652), + SHAKE_START: __webpack_require__(653), + ZOOM_COMPLETE: __webpack_require__(654), + ZOOM_START: __webpack_require__(655) }; @@ -8716,7 +8719,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8754,7 +8757,7 @@ module.exports = LineStyleCanvas; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8883,11 +8886,11 @@ module.exports = CONST; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(137); +var GetTileAt = __webpack_require__(138); var GetTilesWithin = __webpack_require__(24); /** @@ -8949,7 +8952,7 @@ module.exports = CalculateFacesWithin; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9284,11 +9287,45 @@ module.exports = { /***/ }), /* 53 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the distance between two sets of coordinates (points). + * + * @function Phaser.Math.Distance.Between + * @since 3.0.0 + * + * @param {number} x1 - The x coordinate of the first point. + * @param {number} y1 - The y coordinate of the first point. + * @param {number} x2 - The x coordinate of the second point. + * @param {number} y2 - The y coordinate of the second point. + * + * @return {number} The distance between each point. + */ +var DistanceBetween = function (x1, y1, x2, y2) +{ + var dx = x1 - x2; + var dy = y1 - y2; + + return Math.sqrt(dx * dx + dy * dy); +}; + +module.exports = DistanceBetween; + + +/***/ }), +/* 54 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9298,63 +9335,63 @@ module.exports = { module.exports = { - BOOT: __webpack_require__(803), - DESTROY: __webpack_require__(804), - DRAG_END: __webpack_require__(805), - DRAG_ENTER: __webpack_require__(806), - DRAG: __webpack_require__(807), - DRAG_LEAVE: __webpack_require__(808), - DRAG_OVER: __webpack_require__(809), - DRAG_START: __webpack_require__(810), - DROP: __webpack_require__(811), - GAME_OUT: __webpack_require__(812), - GAME_OVER: __webpack_require__(813), - GAMEOBJECT_DOWN: __webpack_require__(814), - GAMEOBJECT_DRAG_END: __webpack_require__(815), - GAMEOBJECT_DRAG_ENTER: __webpack_require__(816), - GAMEOBJECT_DRAG: __webpack_require__(817), - GAMEOBJECT_DRAG_LEAVE: __webpack_require__(818), - GAMEOBJECT_DRAG_OVER: __webpack_require__(819), - GAMEOBJECT_DRAG_START: __webpack_require__(820), - GAMEOBJECT_DROP: __webpack_require__(821), - GAMEOBJECT_MOVE: __webpack_require__(822), - GAMEOBJECT_OUT: __webpack_require__(823), - GAMEOBJECT_OVER: __webpack_require__(824), - GAMEOBJECT_POINTER_DOWN: __webpack_require__(825), - GAMEOBJECT_POINTER_MOVE: __webpack_require__(826), - GAMEOBJECT_POINTER_OUT: __webpack_require__(827), - GAMEOBJECT_POINTER_OVER: __webpack_require__(828), - GAMEOBJECT_POINTER_UP: __webpack_require__(829), - GAMEOBJECT_POINTER_WHEEL: __webpack_require__(830), - GAMEOBJECT_UP: __webpack_require__(831), - GAMEOBJECT_WHEEL: __webpack_require__(832), - MANAGER_BOOT: __webpack_require__(833), - MANAGER_PROCESS: __webpack_require__(834), - MANAGER_UPDATE: __webpack_require__(835), - POINTER_DOWN: __webpack_require__(836), - POINTER_DOWN_OUTSIDE: __webpack_require__(837), - POINTER_MOVE: __webpack_require__(838), - POINTER_OUT: __webpack_require__(839), - POINTER_OVER: __webpack_require__(840), - POINTER_UP: __webpack_require__(841), - POINTER_UP_OUTSIDE: __webpack_require__(842), - POINTER_WHEEL: __webpack_require__(843), - POINTERLOCK_CHANGE: __webpack_require__(844), - PRE_UPDATE: __webpack_require__(845), - SHUTDOWN: __webpack_require__(846), - START: __webpack_require__(847), - UPDATE: __webpack_require__(848) + BOOT: __webpack_require__(814), + DESTROY: __webpack_require__(815), + DRAG_END: __webpack_require__(816), + DRAG_ENTER: __webpack_require__(817), + DRAG: __webpack_require__(818), + DRAG_LEAVE: __webpack_require__(819), + DRAG_OVER: __webpack_require__(820), + DRAG_START: __webpack_require__(821), + DROP: __webpack_require__(822), + GAME_OUT: __webpack_require__(823), + GAME_OVER: __webpack_require__(824), + GAMEOBJECT_DOWN: __webpack_require__(825), + GAMEOBJECT_DRAG_END: __webpack_require__(826), + GAMEOBJECT_DRAG_ENTER: __webpack_require__(827), + GAMEOBJECT_DRAG: __webpack_require__(828), + GAMEOBJECT_DRAG_LEAVE: __webpack_require__(829), + GAMEOBJECT_DRAG_OVER: __webpack_require__(830), + GAMEOBJECT_DRAG_START: __webpack_require__(831), + GAMEOBJECT_DROP: __webpack_require__(832), + GAMEOBJECT_MOVE: __webpack_require__(833), + GAMEOBJECT_OUT: __webpack_require__(834), + GAMEOBJECT_OVER: __webpack_require__(835), + GAMEOBJECT_POINTER_DOWN: __webpack_require__(836), + GAMEOBJECT_POINTER_MOVE: __webpack_require__(837), + GAMEOBJECT_POINTER_OUT: __webpack_require__(838), + GAMEOBJECT_POINTER_OVER: __webpack_require__(839), + GAMEOBJECT_POINTER_UP: __webpack_require__(840), + GAMEOBJECT_POINTER_WHEEL: __webpack_require__(841), + GAMEOBJECT_UP: __webpack_require__(842), + GAMEOBJECT_WHEEL: __webpack_require__(843), + MANAGER_BOOT: __webpack_require__(844), + MANAGER_PROCESS: __webpack_require__(845), + MANAGER_UPDATE: __webpack_require__(846), + POINTER_DOWN: __webpack_require__(847), + POINTER_DOWN_OUTSIDE: __webpack_require__(848), + POINTER_MOVE: __webpack_require__(849), + POINTER_OUT: __webpack_require__(850), + POINTER_OVER: __webpack_require__(851), + POINTER_UP: __webpack_require__(852), + POINTER_UP_OUTSIDE: __webpack_require__(853), + POINTER_WHEEL: __webpack_require__(854), + POINTERLOCK_CHANGE: __webpack_require__(855), + PRE_UPDATE: __webpack_require__(856), + SHUTDOWN: __webpack_require__(857), + START: __webpack_require__(858), + UPDATE: __webpack_require__(859) }; /***/ }), -/* 54 */ +/* 55 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9390,20 +9427,20 @@ module.exports = Contains; /***/ }), -/* 55 */ +/* 56 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var GetPoint = __webpack_require__(258); -var GetPoints = __webpack_require__(148); +var GetPoint = __webpack_require__(272); +var GetPoints = __webpack_require__(150); var GEOM_CONST = __webpack_require__(46); -var Random = __webpack_require__(149); +var Random = __webpack_require__(151); var Vector2 = __webpack_require__(3); /** @@ -9508,7 +9545,7 @@ var Line = new Class({ * @method Phaser.Geom.Line#getPoints * @since 3.0.0 * - * @generic {Phaser.Geom.Point} O - [output,$return] + * @generic {Phaser.Geom.Point[]} O - [output,$return] * * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead. * @param {integer} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`. @@ -9727,12 +9764,12 @@ module.exports = Line; /***/ }), -/* 56 */ +/* 57 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9755,12 +9792,12 @@ module.exports = Length; /***/ }), -/* 57 */ +/* 58 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9786,47 +9823,13 @@ var Wrap = function (value, min, max) module.exports = Wrap; -/***/ }), -/* 58 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Calculate the distance between two sets of coordinates (points). - * - * @function Phaser.Math.Distance.Between - * @since 3.0.0 - * - * @param {number} x1 - The x coordinate of the first point. - * @param {number} y1 - The y coordinate of the first point. - * @param {number} x2 - The x coordinate of the second point. - * @param {number} y2 - The y coordinate of the second point. - * - * @return {number} The distance between each point. - */ -var DistanceBetween = function (x1, y1, x2, y2) -{ - var dx = x1 - x2; - var dy = y1 - y2; - - return Math.sqrt(dx * dx + dy * dy); -}; - -module.exports = DistanceBetween; - - /***/ }), /* 59 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9836,29 +9839,29 @@ module.exports = DistanceBetween; module.exports = { - COMPLETE: __webpack_require__(871), - DECODED: __webpack_require__(872), - DECODED_ALL: __webpack_require__(873), - DESTROY: __webpack_require__(874), - DETUNE: __webpack_require__(875), - GLOBAL_DETUNE: __webpack_require__(876), - GLOBAL_MUTE: __webpack_require__(877), - GLOBAL_RATE: __webpack_require__(878), - GLOBAL_VOLUME: __webpack_require__(879), - LOOP: __webpack_require__(880), - LOOPED: __webpack_require__(881), - MUTE: __webpack_require__(882), - PAUSE_ALL: __webpack_require__(883), - PAUSE: __webpack_require__(884), - PLAY: __webpack_require__(885), - RATE: __webpack_require__(886), - RESUME_ALL: __webpack_require__(887), - RESUME: __webpack_require__(888), - SEEK: __webpack_require__(889), - STOP_ALL: __webpack_require__(890), - STOP: __webpack_require__(891), - UNLOCKED: __webpack_require__(892), - VOLUME: __webpack_require__(893) + COMPLETE: __webpack_require__(882), + DECODED: __webpack_require__(883), + DECODED_ALL: __webpack_require__(884), + DESTROY: __webpack_require__(885), + DETUNE: __webpack_require__(886), + GLOBAL_DETUNE: __webpack_require__(887), + GLOBAL_MUTE: __webpack_require__(888), + GLOBAL_RATE: __webpack_require__(889), + GLOBAL_VOLUME: __webpack_require__(890), + LOOP: __webpack_require__(891), + LOOPED: __webpack_require__(892), + MUTE: __webpack_require__(893), + PAUSE_ALL: __webpack_require__(894), + PAUSE: __webpack_require__(895), + PLAY: __webpack_require__(896), + RATE: __webpack_require__(897), + RESUME_ALL: __webpack_require__(898), + RESUME: __webpack_require__(899), + SEEK: __webpack_require__(900), + STOP_ALL: __webpack_require__(901), + STOP: __webpack_require__(902), + UNLOCKED: __webpack_require__(903), + VOLUME: __webpack_require__(904) }; @@ -9869,13 +9872,13 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var File = __webpack_require__(20); +var CONST = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); @@ -10099,7 +10102,7 @@ module.exports = JSONFile; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10332,14 +10335,13 @@ module.exports = MultiFile; /***/ (function(module, exports, __webpack_require__) { /** -* The `Matter.Body` module contains methods for creating and manipulating body models. -* A `Matter.Body` is a rigid body that can be simulated by a `Matter.Engine`. -* Factories for commonly used body configurations (such as rectangles, circles and other polygons) can be found in the module `Matter.Bodies`. -* -* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). - -* @class Body -*/ + * The `Matter.Body` module contains methods for creating and manipulating body models. + * A `Matter.Body` is a rigid body that can be simulated by a `Matter.Engine`. + * Factories for commonly used body configurations (such as rectangles, circles and other polygons) can be found in the module `Matter.Bodies`. + * + * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). + * @class Body + */ var Body = {}; @@ -10347,10 +10349,10 @@ module.exports = Body; var Vertices = __webpack_require__(86); var Vector = __webpack_require__(101); -var Sleeping = __webpack_require__(453); +var Sleeping = __webpack_require__(236); var Common = __webpack_require__(37); var Bounds = __webpack_require__(102); -var Axes = __webpack_require__(1269); +var Axes = __webpack_require__(507); (function() { @@ -10373,11 +10375,10 @@ var Axes = __webpack_require__(1269); id: Common.nextId(), type: 'body', label: 'Body', - gameObject: null, parts: [], plugin: {}, angle: 0, - vertices: Vertices.fromPath('L 0 0 L 40 0 L 40 40 L 0 40'), + vertices: null, // Phaser change: no point calling fromPath if they pass in vertices anyway position: { x: 0, y: 0 }, force: { x: 0, y: 0 }, torque: 0, @@ -10392,8 +10393,6 @@ var Axes = __webpack_require__(1269); isSensor: false, isStatic: false, isSleeping: false, - ignoreGravity: false, - ignorePointer: false, motion: 0, sleepThreshold: 60, density: 0.001, @@ -10408,18 +10407,6 @@ var Axes = __webpack_require__(1269); }, slop: 0.05, timeScale: 1, - render: { - visible: true, - opacity: 1, - sprite: { - xScale: 1, - yScale: 1, - xOffset: 0, - yOffset: 0 - }, - lineWidth: 0 - }, - events: null, bounds: null, chamfer: null, @@ -10427,19 +10414,67 @@ var Axes = __webpack_require__(1269); positionPrev: null, anglePrev: 0, parent: null, - axes: null, area: 0, mass: 0, + inverseMass: 0, inertia: 0, - - _original: null + inverseInertia: 0, + _original: null, + render: { + visible: true, + opacity: 1, + sprite: { + xOffset: 0, + yOffset: 0 + }, + fillColor: null, // custom Phaser property + fillOpacity: null, // custom Phaser property + lineColor: null, // custom Phaser property + lineOpacity: null, // custom Phaser property + lineThickness: null // custom Phaser property + }, + gameObject: null, // custom Phaser property + scale: { x: 1, y: 1 }, // custom Phaser property + centerOfMass: { x: 0, y: 0 }, // custom Phaser property (float, 0 - 1) + centerOffset: { x: 0, y: 0 }, // custom Phaser property (pixel values) + gravityScale: { x: 1, y: 1 }, // custom Phaser property + ignoreGravity: false, // custom Phaser property + ignorePointer: false, // custom Phaser property + onCollideCallback: null, // custom Phaser property + onCollideEndCallback: null, // custom Phaser property + onCollideActiveCallback: null, // custom Phaser property + onCollideWith: {} // custom Phaser property }; + if (!options.hasOwnProperty('position') && options.hasOwnProperty('vertices')) + { + options.position = Vertices.centre(options.vertices); + } + else if (!options.hasOwnProperty('vertices')) + { + defaults.vertices = Vertices.fromPath('L 0 0 L 40 0 L 40 40 L 0 40'); + } + var body = Common.extend(defaults, options); _initProperties(body, options); + // Helper function + body.setOnCollideWith = function (body, callback) + { + if (callback) + { + this.onCollideWith[body.id] = callback; + } + else + { + delete this.onCollideWith[body.id]; + } + + return this; + } + return body; }; @@ -10491,9 +10526,11 @@ var Axes = __webpack_require__(1269); parent: body.parent || body }); + var bounds = body.bounds; + Vertices.rotate(body.vertices, body.angle, body.position); Axes.rotate(body.axes, body.angle); - Bounds.update(body.bounds, body.vertices, body.velocity); + Bounds.update(bounds, body.vertices, body.velocity); // allow options to override the automatically calculated properties Body.set(body, { @@ -10503,13 +10540,20 @@ var Axes = __webpack_require__(1269); inertia: options.inertia || body.inertia }); - // render properties - var defaultFillStyle = (body.isStatic ? '#2e2b44' : Common.choose(['#006BA6', '#0496FF', '#FFBC42', '#D81159', '#8F2D56'])), - defaultStrokeStyle = '#000'; - body.render.fillStyle = body.render.fillStyle || defaultFillStyle; - body.render.strokeStyle = body.render.strokeStyle || defaultStrokeStyle; - body.render.sprite.xOffset += -(body.bounds.min.x - body.position.x) / (body.bounds.max.x - body.bounds.min.x); - body.render.sprite.yOffset += -(body.bounds.min.y - body.position.y) / (body.bounds.max.y - body.bounds.min.y); + if (body.parts.length === 1) + { + var centerOfMass = body.centerOfMass; + var centerOffset = body.centerOffset; + + var bodyWidth = bounds.max.x - bounds.min.x; + var bodyHeight = bounds.max.y - bounds.min.y; + + centerOfMass.x = -(bounds.min.x - body.position.x) / bodyWidth; + centerOfMass.y = -(bounds.min.y - body.position.y) / bodyHeight; + + centerOffset.x = bodyWidth * centerOfMass.x; + centerOffset.y = bodyHeight * centerOfMass.y; + } }; /** @@ -10530,8 +10574,7 @@ var Axes = __webpack_require__(1269); } for (property in settings) { - - if (!settings.hasOwnProperty(property)) + if (!Object.prototype.hasOwnProperty.call(settings, property)) continue; value = settings[property]; @@ -10570,9 +10613,11 @@ var Axes = __webpack_require__(1269); case 'parts': Body.setParts(body, value); break; + case 'centre': + Body.setCentre(body, value); + break; default: body[property] = value; - } } }; @@ -10653,7 +10698,7 @@ var Axes = __webpack_require__(1269); }; /** - * Sets the moment of inertia (i.e. second moment of area) of the body of the body. + * Sets the moment of inertia (i.e. second moment of area) of the body. * Inverse inertia is automatically updated to reflect the change. Mass is not changed. * @method setInertia * @param {body} body @@ -10698,6 +10743,7 @@ var Axes = __webpack_require__(1269); // update geometry Vertices.translate(body.vertices, body.position); + Bounds.update(body.bounds, body.vertices, body.velocity); }; @@ -10752,18 +10798,59 @@ var Axes = __webpack_require__(1269); // sum the properties of all compound parts of the parent body var total = Body._totalProperties(body); + // Phaser addition + var cx = total.centre.x; + var cy = total.centre.y; + + var bounds = body.bounds; + var centerOfMass = body.centerOfMass; + var centerOffset = body.centerOffset; + + Bounds.update(bounds, body.vertices, body.velocity); + + centerOfMass.x = -(bounds.min.x - cx) / (bounds.max.x - bounds.min.x); + centerOfMass.y = -(bounds.min.y - cy) / (bounds.max.y - bounds.min.y); + + centerOffset.x = cx; + centerOffset.y = cy; + body.area = total.area; body.parent = body; - body.position.x = total.centre.x; - body.position.y = total.centre.y; - body.positionPrev.x = total.centre.x; - body.positionPrev.y = total.centre.y; + body.position.x = cx; + body.position.y = cy; + body.positionPrev.x = cx; + body.positionPrev.y = cy; Body.setMass(body, total.mass); Body.setInertia(body, total.inertia); Body.setPosition(body, total.centre); }; + /** + * Set the centre of mass of the body. + * The `centre` is a vector in world-space unless `relative` is set, in which case it is a translation. + * The centre of mass is the point the body rotates about and can be used to simulate non-uniform density. + * This is equal to moving `body.position` but not the `body.vertices`. + * Invalid if the `centre` falls outside the body's convex hull. + * @method setCentre + * @param {body} body + * @param {vector} centre + * @param {bool} relative + */ + Body.setCentre = function(body, centre, relative) { + if (!relative) { + body.positionPrev.x = centre.x - (body.position.x - body.positionPrev.x); + body.positionPrev.y = centre.y - (body.position.y - body.positionPrev.y); + body.position.x = centre.x; + body.position.y = centre.y; + } else { + body.positionPrev.x += centre.x; + body.positionPrev.y += centre.y; + body.position.x += centre.x; + body.position.y += centre.y; + } + }; + /** * Sets the position of the body instantly. Velocity, angle, force etc. are unchanged. * @method setPosition @@ -10801,7 +10888,6 @@ var Axes = __webpack_require__(1269); Axes.rotate(part.axes, delta); Bounds.update(part.bounds, part.vertices, body.velocity); if (i > 0) { - part.angle += body.angularVelocity; Vector.rotateAbout(part.position, delta, body.position, part.position); } } @@ -10885,6 +10971,9 @@ var Axes = __webpack_require__(1269); for (var i = 0; i < body.parts.length; i++) { var part = body.parts[i]; + part.scale.x = scaleX; + part.scale.y = scaleY; + // scale vertices Vertices.scale(part.vertices, scaleX, scaleY, point); @@ -11154,6 +11243,14 @@ var Axes = __webpack_require__(1269); * @default { x: 0, y: 0 } */ + /** + * A `Vector` that holds the current scale values as set by `Body.setScale`. + * + * @property scale + * @type vector + * @default { x: 1, y: 1 } + */ + /** * A `Vector` that specifies the force to apply in the current step. It is zeroed after every `Body.update`. See also `Body.applyForce`. * @@ -11450,29 +11547,6 @@ var Axes = __webpack_require__(1269); * @type object */ - /** - * An `String` that defines the path to the image to use as the sprite texture, if any. - * - * @property render.sprite.texture - * @type string - */ - - /** - * A `Number` that defines the scaling in the x-axis for the sprite, if any. - * - * @property render.sprite.xScale - * @type number - * @default 1 - */ - - /** - * A `Number` that defines the scaling in the y-axis for the sprite, if any. - * - * @property render.sprite.yScale - * @type number - * @default 1 - */ - /** * A `Number` that defines the offset in the x-axis for the sprite (normalised by texture width). * @@ -11490,30 +11564,38 @@ var Axes = __webpack_require__(1269); */ /** - * A `Number` that defines the line width to use when rendering the body outline (if a sprite is not defined). - * A value of `0` means no outline will be rendered. + * A hex color value that defines the fill color to use when rendering the body. * - * @property render.lineWidth + * @property render.fillColor * @type number - * @default 0 */ /** - * A `String` that defines the fill style to use when rendering the body (if a sprite is not defined). - * It is the same as when using a canvas, so it accepts CSS style property values. + * A value that defines the fill opacity to use when rendering the body. * - * @property render.fillStyle - * @type string - * @default a random colour + * @property render.fillOpacity + * @type number + */ + + /** + * A hex color value that defines the line color to use when rendering the body. + * + * @property render.lineColor + * @type number */ /** - * A `String` that defines the stroke style to use when rendering the body outline (if a sprite is not defined). - * It is the same as when using a canvas, so it accepts CSS style property values. + * A value that defines the line opacity to use when rendering the body. * - * @property render.strokeStyle - * @type string - * @default a random colour + * @property render.lineOpacity + * @type number + */ + + /** + * A `Number` that defines the line width to use when rendering the body outline. + * + * @property render.lineThickness + * @type number */ /** @@ -11541,6 +11623,92 @@ var Axes = __webpack_require__(1269); * @type bounds */ + /** + * A reference to the Phaser Game Object this body belongs to, if any. + * + * @property gameObject + * @type Phaser.GameObjects.GameObject + */ + + /** + * The center of mass of the Body. + * + * @property centerOfMass + * @type vector + * @default { x: 0, y: 0 } + */ + + /** + * The center of the body in pixel values. + * Used by Phaser for texture aligment. + * + * @property centerOffset + * @type vector + * @default { x: 0, y: 0 } + */ + + /** + * Will this Body ignore World gravity during the Engine update? + * + * @property ignoreGravity + * @type boolean + * @default false + */ + + /** + * Scale the influence of World gravity when applied to this body. + * + * @property gravityScale + * @type vector + * @default { x: 1, y: 1 } + */ + + /** + * Will this Body ignore Phaser Pointer input events? + * + * @property ignorePointer + * @type boolean + * @default false + */ + + /** + * A callback that is invoked when this Body starts colliding with any other Body. + * + * You can register callbacks by providing a function of type `( pair: Matter.Pair) => void`. + * + * @property onCollideCallback + * @type function + * @default null + */ + + /** + * A callback that is invoked when this Body stops colliding with any other Body. + * + * You can register callbacks by providing a function of type `( pair: Matter.Pair) => void`. + * + * @property onCollideEndCallback + * @type function + * @default null + */ + + /** + * A callback that is invoked for the duration that this Body is colliding with any other Body. + * + * You can register callbacks by providing a function of type `( pair: Matter.Pair) => void`. + * + * @property onCollideActiveCallback + * @type function + * @default null + */ + + /** + * A collision callback dictionary used by the `Body.setOnCollideWith` function. + * + * @property onCollideWith + * @type object + * @default null + */ + })(); @@ -11550,7 +11718,7 @@ var Axes = __webpack_require__(1269); /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11601,7 +11769,7 @@ module.exports = WorldToTileX; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11652,16 +11820,16 @@ module.exports = WorldToTileY; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(54); -var GetPoint = __webpack_require__(249); -var GetPoints = __webpack_require__(250); +var Contains = __webpack_require__(55); +var GetPoint = __webpack_require__(263); +var GetPoints = __webpack_require__(264); var GEOM_CONST = __webpack_require__(46); -var Random = __webpack_require__(145); +var Random = __webpack_require__(147); /** * @classdesc @@ -12028,7 +12196,7 @@ module.exports = Circle; "use strict"; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12709,7 +12877,7 @@ earcut.flatten = function (data) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12751,7 +12919,7 @@ module.exports = Clone; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12800,14 +12968,14 @@ module.exports = SafeRange; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var SpriteRender = __webpack_require__(949); +var SpriteRender = __webpack_require__(960); /** * @classdesc @@ -12978,7 +13146,7 @@ module.exports = Sprite; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13053,17 +13221,17 @@ module.exports = StrokePathWebGL; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Contains = __webpack_require__(83); -var GetPoint = __webpack_require__(403); -var GetPoints = __webpack_require__(404); +var GetPoint = __webpack_require__(417); +var GetPoints = __webpack_require__(418); var GEOM_CONST = __webpack_require__(46); -var Line = __webpack_require__(55); -var Random = __webpack_require__(153); +var Line = __webpack_require__(56); +var Random = __webpack_require__(155); /** * @classdesc @@ -13500,13 +13668,13 @@ module.exports = Triangle; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var File = __webpack_require__(20); +var CONST = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -13774,7 +13942,7 @@ module.exports = ImageFile; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13810,13 +13978,13 @@ module.exports = SetTileCollision; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var Rectangle = __webpack_require__(422); +var Rectangle = __webpack_require__(436); /** * @classdesc @@ -14648,7 +14816,7 @@ module.exports = Tile; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14676,7 +14844,7 @@ module.exports = GetCenterX; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14711,7 +14879,35 @@ module.exports = SetCenterX; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Returns the center y coordinate from the bounds of the Game Object. + * + * @function Phaser.Display.Bounds.GetCenterY + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from. + * + * @return {number} The center y coordinate of the bounds of the Game Object. + */ +var GetCenterY = function (gameObject) +{ + return gameObject.y - (gameObject.height * gameObject.originY) + (gameObject.height * 0.5); +}; + +module.exports = GetCenterY; + + +/***/ }), +/* 78 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14740,41 +14936,13 @@ var SetCenterY = function (gameObject, y) module.exports = SetCenterY; -/***/ }), -/* 78 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Returns the center y coordinate from the bounds of the Game Object. - * - * @function Phaser.Display.Bounds.GetCenterY - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from. - * - * @return {number} The center y coordinate of the bounds of the Game Object. - */ -var GetCenterY = function (gameObject) -{ - return gameObject.y - (gameObject.height * gameObject.originY) + (gameObject.height * 0.5); -}; - -module.exports = GetCenterY; - - /***/ }), /* 79 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14820,12 +14988,12 @@ module.exports = SpliceOne; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var FromPoints = __webpack_require__(173); +var FromPoints = __webpack_require__(174); var Rectangle = __webpack_require__(11); var Vector2 = __webpack_require__(3); @@ -14840,7 +15008,7 @@ var Vector2 = __webpack_require__(3); * @constructor * @since 3.0.0 * - * @param {string} type - [description] + * @param {string} type - The curve type. */ var Curve = new Class({ @@ -14898,7 +15066,7 @@ var Curve = new Class({ this.needsUpdate = true; /** - * [description] + * For a curve on a Path, `false` means the Path will ignore this curve. * * @name Phaser.Curves.Curve#active * @type {boolean} @@ -14951,7 +15119,7 @@ var Curve = new Class({ // So you can chain graphics calls return graphics.strokePoints(this.getPoints(pointsTotal)); }, - + /** * Returns a Rectangle where the position and dimensions match the bounds of this Curve. * @@ -15007,7 +15175,7 @@ var Curve = new Class({ }, /** - * [description] + * Get a point at the end of the curve. * * @method Phaser.Curves.Curve#getEndPoint * @since 3.0.0 @@ -15029,7 +15197,7 @@ var Curve = new Class({ * @method Phaser.Curves.Curve#getLength * @since 3.0.0 * - * @return {number} [description] + * @return {number} The total length of the curve. */ getLength: function () { @@ -15040,14 +15208,22 @@ var Curve = new Class({ /** - * Get list of cumulative segment lengths + * Get a list of cumulative segment lengths. + * + * These lengths are + * + * - [0] 0 + * - [1] The first segment + * - [2] The first and second segment + * - ... + * - [divisions] All segments * * @method Phaser.Curves.Curve#getLengths * @since 3.0.0 * - * @param {integer} [divisions] - [description] + * @param {integer} [divisions] - The number of divisions or segments. * - * @return {number[]} [description] + * @return {number[]} An array of cumulative lengths. */ getLengths: function (divisions) { @@ -15088,17 +15264,17 @@ var Curve = new Class({ // - u [0 .. 1] /** - * [description] + * Get a point at a relative position on the curve, by arc length. * * @method Phaser.Curves.Curve#getPointAt * @since 3.0.0 * * @generic {Phaser.Math.Vector2} O - [out,$return] * - * @param {number} u - [description] - * @param {Phaser.Math.Vector2} [out] - [description] + * @param {number} u - The relative position, [0..1]. + * @param {Phaser.Math.Vector2} [out] - A point to store the result in. * - * @return {Phaser.Math.Vector2} [description] + * @return {Phaser.Math.Vector2} The point. */ getPointAt: function (u, out) { @@ -15110,13 +15286,25 @@ var Curve = new Class({ // Get sequence of points using getPoint( t ) /** - * [description] + * Get a sequence of evenly spaced points from the curve. + * + * You can pass `divisions`, `stepRate`, or neither. + * + * The number of divisions will be + * + * 1. `divisions`, if `divisions` > 0; or + * 2. `this.getLength / stepRate`, if `stepRate` > 0; or + * 3. `this.defaultDivisions` + * + * `1 + divisions` points will be returned. * * @method Phaser.Curves.Curve#getPoints * @since 3.0.0 * - * @param {integer} divisions - The number of evenly spaced points from the curve to return. If falsy, step param will be used to calculate the number of points. - * @param {number} step - Step between points. Used to calculate the number of points to return when divisions is falsy. Ignored if divisions is positive. + * @generic {Phaser.Math.Vector2[]} O - [out,$return] + * + * @param {integer} [divisions] - The number of divisions to make. + * @param {number} [stepRate] - The curve distance between points, implying `divisions`. * @param {(array|Phaser.Math.Vector2[])} [out] - An optional array to store the points in. * * @return {(array|Phaser.Math.Vector2[])} An array of Points from the curve. @@ -15147,16 +15335,16 @@ var Curve = new Class({ }, /** - * [description] + * Get a random point from the curve. * * @method Phaser.Curves.Curve#getRandomPoint * @since 3.0.0 * * @generic {Phaser.Math.Vector2} O - [out,$return] * - * @param {Phaser.Math.Vector2} [out] - [description] + * @param {Phaser.Math.Vector2} [out] - A point object to store the result in. * - * @return {Phaser.Math.Vector2} [description] + * @return {Phaser.Math.Vector2} The point. */ getRandomPoint: function (out) { @@ -15168,42 +15356,57 @@ var Curve = new Class({ // Get sequence of points using getPointAt( u ) /** - * [description] + * Get a sequence of equally spaced points (by arc distance) from the curve. + * + * `1 + divisions` points will be returned. * * @method Phaser.Curves.Curve#getSpacedPoints * @since 3.0.0 * - * @param {integer} [divisions] - [description] + * @param {integer} [divisions=this.defaultDivisions] - The number of divisions to make. + * @param {number} [stepRate] - Step between points. Used to calculate the number of points to return when divisions is falsy. Ignored if divisions is positive. + * @param {(array|Phaser.Math.Vector2[])} [out] - An optional array to store the points in. * - * @return {Phaser.Math.Vector2[]} [description] + * @return {Phaser.Math.Vector2[]} An array of points. */ - getSpacedPoints: function (divisions) + getSpacedPoints: function (divisions, stepRate, out) { - if (divisions === undefined) { divisions = this.defaultDivisions; } + if (out === undefined) { out = []; } - var points = []; + // If divisions is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. + if (!divisions) + { + if (!stepRate) + { + divisions = this.defaultDivisions; + } + else + { + divisions = this.getLength() / stepRate; + } + } for (var d = 0; d <= divisions; d++) { var t = this.getUtoTmapping(d / divisions, null, divisions); - points.push(this.getPoint(t)); + out.push(this.getPoint(t)); } - return points; + return out; }, /** - * [description] + * Get a point at the start of the curve. * * @method Phaser.Curves.Curve#getStartPoint * @since 3.0.0 * * @generic {Phaser.Math.Vector2} O - [out,$return] * - * @param {Phaser.Math.Vector2} [out] - [description] + * @param {Phaser.Math.Vector2} [out] - A point to store the result in. * - * @return {Phaser.Math.Vector2} [description] + * @return {Phaser.Math.Vector2} The point. */ getStartPoint: function (out) { @@ -15213,7 +15416,7 @@ var Curve = new Class({ }, /** - * Returns a unit vector tangent at t + * Get a unit vector tangent at a relative position on the curve. * In case any sub curve does not implement its tangent derivation, * 2 points a small delta apart will be used to find its gradient * which seems to give a reasonable approximation @@ -15223,8 +15426,8 @@ var Curve = new Class({ * * @generic {Phaser.Math.Vector2} O - [out,$return] * - * @param {number} t - [description] - * @param {Phaser.Math.Vector2} [out] - [description] + * @param {number} t - The relative position on the curve, [0..1]. + * @param {Phaser.Math.Vector2} [out] - A vector to store the result in. * * @return {Phaser.Math.Vector2} Vector approximating the tangent line at the point t (delta +/- 0.0001) */ @@ -15255,17 +15458,17 @@ var Curve = new Class({ }, /** - * [description] + * Get a unit vector tangent at a relative position on the curve, by arc length. * * @method Phaser.Curves.Curve#getTangentAt * @since 3.0.0 * * @generic {Phaser.Math.Vector2} O - [out,$return] * - * @param {number} u - [description] - * @param {Phaser.Math.Vector2} [out] - [description] + * @param {number} u - The relative position on the curve, [0..1]. + * @param {Phaser.Math.Vector2} [out] - A vector to store the result in. * - * @return {Phaser.Math.Vector2} [description] + * @return {Phaser.Math.Vector2} The tangent vector. */ getTangentAt: function (u, out) { @@ -15380,10 +15583,12 @@ var Curve = new Class({ }, /** - * [description] + * Calculate and cache the arc lengths. * * @method Phaser.Curves.Curve#updateArcLengths * @since 3.0.0 + * + * @see Phaser.Curves.Curve#getLengths() */ updateArcLengths: function () { @@ -15403,7 +15608,7 @@ module.exports = Curve; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15413,16 +15618,16 @@ module.exports = Curve; module.exports = { - ADD: __webpack_require__(850), - COMPLETE: __webpack_require__(851), - FILE_COMPLETE: __webpack_require__(852), - FILE_KEY_COMPLETE: __webpack_require__(853), - FILE_LOAD_ERROR: __webpack_require__(854), - FILE_LOAD: __webpack_require__(855), - FILE_PROGRESS: __webpack_require__(856), - POST_PROCESS: __webpack_require__(857), - PROGRESS: __webpack_require__(858), - START: __webpack_require__(859) + ADD: __webpack_require__(861), + COMPLETE: __webpack_require__(862), + FILE_COMPLETE: __webpack_require__(863), + FILE_KEY_COMPLETE: __webpack_require__(864), + FILE_LOAD_ERROR: __webpack_require__(865), + FILE_LOAD: __webpack_require__(866), + FILE_PROGRESS: __webpack_require__(867), + POST_PROCESS: __webpack_require__(868), + PROGRESS: __webpack_require__(869), + START: __webpack_require__(870) }; @@ -15433,12 +15638,12 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var EaseMap = __webpack_require__(164); -var UppercaseFirst = __webpack_require__(178); +var EaseMap = __webpack_require__(166); +var UppercaseFirst = __webpack_require__(179); /** * This internal function is used to return the correct ease function for a Tween. @@ -15542,7 +15747,7 @@ module.exports = GetEaseFunction; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15595,7 +15800,7 @@ module.exports = Contains; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15671,7 +15876,7 @@ module.exports = LineToLine; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15744,7 +15949,8 @@ var Common = __webpack_require__(37); index: i, body: body, isInternal: false, - contact: null + contact: null, + offset: null }; vertex.contact = { @@ -15769,7 +15975,7 @@ var Common = __webpack_require__(37); * @return {vertices} vertices */ Vertices.fromPath = function(path, body) { - var pathPattern = /L?\s*([\-\d\.e]+)[\s,]*([\-\d\.e]+)*/ig, + var pathPattern = /L?\s*([-\d.e]+)[\s,]*([-\d.e]+)*/ig, points = []; path.replace(pathPattern, function(match, x, y) { @@ -16159,11 +16365,11 @@ var Common = __webpack_require__(37); /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(23); +var Clamp = __webpack_require__(22); /** * Return a value based on the range between `min` and `max` and the percentage given. @@ -16193,7 +16399,7 @@ module.exports = FromPercent; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16234,7 +16440,7 @@ module.exports = GetBoolean; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16406,7 +16612,7 @@ module.exports = TWEEN_CONST; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16416,17 +16622,17 @@ module.exports = TWEEN_CONST; module.exports = { - DESTROY: __webpack_require__(557), - VIDEO_COMPLETE: __webpack_require__(558), - VIDEO_CREATED: __webpack_require__(559), - VIDEO_ERROR: __webpack_require__(560), - VIDEO_LOOP: __webpack_require__(561), - VIDEO_PLAY: __webpack_require__(562), - VIDEO_SEEKED: __webpack_require__(563), - VIDEO_SEEKING: __webpack_require__(564), - VIDEO_STOP: __webpack_require__(565), - VIDEO_TIMEOUT: __webpack_require__(566), - VIDEO_UNLOCKED: __webpack_require__(567) + DESTROY: __webpack_require__(576), + VIDEO_COMPLETE: __webpack_require__(577), + VIDEO_CREATED: __webpack_require__(578), + VIDEO_ERROR: __webpack_require__(579), + VIDEO_LOOP: __webpack_require__(580), + VIDEO_PLAY: __webpack_require__(581), + VIDEO_SEEKED: __webpack_require__(582), + VIDEO_SEEKING: __webpack_require__(583), + VIDEO_STOP: __webpack_require__(584), + VIDEO_TIMEOUT: __webpack_require__(585), + VIDEO_UNLOCKED: __webpack_require__(586) }; @@ -16437,7 +16643,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16448,7 +16654,7 @@ var EventEmitter = __webpack_require__(9); var Events = __webpack_require__(48); var Rectangle = __webpack_require__(11); var TransformMatrix = __webpack_require__(32); -var ValueToColor = __webpack_require__(159); +var ValueToColor = __webpack_require__(161); var Vector2 = __webpack_require__(3); /** @@ -17014,7 +17220,7 @@ var BaseCamera = new Class({ * * @param {number} x - The horizontal coordinate to center on. * @param {number} y - The vertical coordinate to center on. - * @param {Phaser.Math.Vector2} [out] - A Vec2 to store the values in. If not given a new Vec2 is created. + * @param {Phaser.Math.Vector2} [out] - A Vector2 to store the values in. If not given a new Vector2 is created. * * @return {Phaser.Math.Vector2} The scroll coordinates stored in the `x` and `y` properties. */ @@ -18358,7 +18564,7 @@ module.exports = BaseCamera; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18368,12 +18574,12 @@ module.exports = BaseCamera; module.exports = { - ENTER_FULLSCREEN: __webpack_require__(675), - FULLSCREEN_FAILED: __webpack_require__(676), - FULLSCREEN_UNSUPPORTED: __webpack_require__(677), - LEAVE_FULLSCREEN: __webpack_require__(678), - ORIENTATION_CHANGE: __webpack_require__(679), - RESIZE: __webpack_require__(680) + ENTER_FULLSCREEN: __webpack_require__(694), + FULLSCREEN_FAILED: __webpack_require__(695), + FULLSCREEN_UNSUPPORTED: __webpack_require__(696), + LEAVE_FULLSCREEN: __webpack_require__(697), + ORIENTATION_CHANGE: __webpack_require__(698), + RESIZE: __webpack_require__(699) }; @@ -18384,7 +18590,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18428,12 +18634,12 @@ module.exports = SnapFloor; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Clamp = __webpack_require__(23); +var Clamp = __webpack_require__(22); var Extend = __webpack_require__(17); /** @@ -19247,16 +19453,16 @@ module.exports = Frame; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Contains = __webpack_require__(96); -var GetPoint = __webpack_require__(376); -var GetPoints = __webpack_require__(377); +var GetPoint = __webpack_require__(390); +var GetPoints = __webpack_require__(391); var GEOM_CONST = __webpack_require__(46); -var Random = __webpack_require__(152); +var Random = __webpack_require__(154); /** * @classdesc @@ -19382,11 +19588,13 @@ var Ellipse = new Class({ * @method Phaser.Geom.Ellipse#getPoints * @since 3.0.0 * + * @generic {Phaser.Geom.Point[]} O - [output,$return] + * * @param {integer} quantity - The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead. * @param {number} [stepRate] - Sets the quantity by getting the circumference of the ellipse and dividing it by the stepRate. - * @param {array} [output] - An array to insert the points in to. If not provided a new array will be created. + * @param {(array|Phaser.Geom.Point[])} [output] - An array to insert the points in to. If not provided a new array will be created. * - * @return {Phaser.Geom.Point[]} An array of Point objects pertaining to the points around the circumference of the ellipse. + * @return {(array|Phaser.Geom.Point[])} An array of Point objects pertaining to the points around the circumference of the ellipse. */ getPoints: function (quantity, stepRate, output) { @@ -19627,7 +19835,7 @@ module.exports = Ellipse; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19669,18 +19877,18 @@ module.exports = Contains; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Actions = __webpack_require__(237); +var Actions = __webpack_require__(238); var Class = __webpack_require__(0); var Events = __webpack_require__(90); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); var IsPlainObject = __webpack_require__(7); -var Range = __webpack_require__(370); -var Set = __webpack_require__(107); +var Range = __webpack_require__(384); +var Set = __webpack_require__(108); var Sprite = __webpack_require__(69); /** @@ -19883,6 +20091,28 @@ var Group = new Class({ */ this.createMultipleCallback = GetFastValue(config, 'createMultipleCallback', null); + /** + * A function to be called when adding or creating group members. + * For internal use only by a Group, or any class that extends it. + * + * @name Phaser.GameObjects.Group#internalCreateCallback + * @type {?Phaser.Types.GameObjects.Group.GroupCallback} + * @private + * @since 3.22.0 + */ + this.internalCreateCallback = GetFastValue(config, 'internalCreateCallback', null); + + /** + * A function to be called when removing group members. + * For internal use only by a Group, or any class that extends it. + * + * @name Phaser.GameObjects.Group#internalRemoveCallback + * @type {?Phaser.Types.GameObjects.Group.GroupCallback} + * @private + * @since 3.22.0 + */ + this.internalRemoveCallback = GetFastValue(config, 'internalRemoveCallback', null); + if (config) { this.createMultiple(config); @@ -20181,6 +20411,11 @@ var Group = new Class({ this.children.set(child); + if (this.internalCreateCallback) + { + this.internalCreateCallback.call(this, child); + } + if (this.createCallback) { this.createCallback.call(this, child); @@ -20255,6 +20490,11 @@ var Group = new Class({ this.children.delete(child); + if (this.internalRemoveCallback) + { + this.internalRemoveCallback.call(this, child); + } + if (this.removeCallback) { this.removeCallback.call(this, child); @@ -21275,14 +21515,14 @@ module.exports = Group; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var ImageRender = __webpack_require__(952); +var ImageRender = __webpack_require__(963); /** * @classdesc @@ -21376,7 +21616,7 @@ module.exports = Image; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21405,7 +21645,7 @@ module.exports = HasValue; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21839,7 +22079,7 @@ module.exports = Bounds; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21870,7 +22110,7 @@ module.exports = IsInLayerBounds; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22064,7 +22304,7 @@ var LayerData = new Class({ * An array of the tile indexes * * @name Phaser.Tilemaps.LayerData#data - * @type {(number[])} + * @type {Phaser.Tilemaps.Tile[][]} * @since 3.0.0 */ this.data = GetFastValue(config, 'data', []); @@ -22090,7 +22330,7 @@ module.exports = LayerData; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22311,11 +22551,145 @@ module.exports = MapData; /***/ }), /* 106 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var ALIGN_CONST = { + + /** + * A constant representing a top-left alignment or position. + * @constant + * @name Phaser.Display.Align.TOP_LEFT + * @since 3.0.0 + * @type {integer} + */ + TOP_LEFT: 0, + + /** + * A constant representing a top-center alignment or position. + * @constant + * @name Phaser.Display.Align.TOP_CENTER + * @since 3.0.0 + * @type {integer} + */ + TOP_CENTER: 1, + + /** + * A constant representing a top-right alignment or position. + * @constant + * @name Phaser.Display.Align.TOP_RIGHT + * @since 3.0.0 + * @type {integer} + */ + TOP_RIGHT: 2, + + /** + * A constant representing a left-top alignment or position. + * @constant + * @name Phaser.Display.Align.LEFT_TOP + * @since 3.0.0 + * @type {integer} + */ + LEFT_TOP: 3, + + /** + * A constant representing a left-center alignment or position. + * @constant + * @name Phaser.Display.Align.LEFT_CENTER + * @since 3.0.0 + * @type {integer} + */ + LEFT_CENTER: 4, + + /** + * A constant representing a left-bottom alignment or position. + * @constant + * @name Phaser.Display.Align.LEFT_BOTTOM + * @since 3.0.0 + * @type {integer} + */ + LEFT_BOTTOM: 5, + + /** + * A constant representing a center alignment or position. + * @constant + * @name Phaser.Display.Align.CENTER + * @since 3.0.0 + * @type {integer} + */ + CENTER: 6, + + /** + * A constant representing a right-top alignment or position. + * @constant + * @name Phaser.Display.Align.RIGHT_TOP + * @since 3.0.0 + * @type {integer} + */ + RIGHT_TOP: 7, + + /** + * A constant representing a right-center alignment or position. + * @constant + * @name Phaser.Display.Align.RIGHT_CENTER + * @since 3.0.0 + * @type {integer} + */ + RIGHT_CENTER: 8, + + /** + * A constant representing a right-bottom alignment or position. + * @constant + * @name Phaser.Display.Align.RIGHT_BOTTOM + * @since 3.0.0 + * @type {integer} + */ + RIGHT_BOTTOM: 9, + + /** + * A constant representing a bottom-left alignment or position. + * @constant + * @name Phaser.Display.Align.BOTTOM_LEFT + * @since 3.0.0 + * @type {integer} + */ + BOTTOM_LEFT: 10, + + /** + * A constant representing a bottom-center alignment or position. + * @constant + * @name Phaser.Display.Align.BOTTOM_CENTER + * @since 3.0.0 + * @type {integer} + */ + BOTTOM_CENTER: 11, + + /** + * A constant representing a bottom-right alignment or position. + * @constant + * @name Phaser.Display.Align.BOTTOM_RIGHT + * @since 3.0.0 + * @type {integer} + */ + BOTTOM_RIGHT: 12 + +}; + +module.exports = ALIGN_CONST; + + +/***/ }), +/* 107 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22355,12 +22729,12 @@ module.exports = Merge; /***/ }), -/* 107 */ +/* 108 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22804,18 +23178,376 @@ module.exports = Set; /***/ }), -/* 108 */ +/* 109 */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* The `Matter.Bodies` module contains factory methods for creating rigid body models +* with commonly used body configurations (such as rectangles, circles and other polygons). +* +* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). +* +* @class Bodies +*/ + +// TODO: true circle bodies + +var Bodies = {}; + +module.exports = Bodies; + +var Vertices = __webpack_require__(86); +var Common = __webpack_require__(37); +var Body = __webpack_require__(62); +var Bounds = __webpack_require__(102); +var Vector = __webpack_require__(101); +var decomp = __webpack_require__(1380); + +(function() { + + /** + * Creates a new rigid body model with a rectangle hull. + * The options parameter is an object that specifies any properties you wish to override the defaults. + * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. + * @method rectangle + * @param {number} x + * @param {number} y + * @param {number} width + * @param {number} height + * @param {object} [options] + * @return {body} A new rectangle body + */ + Bodies.rectangle = function(x, y, width, height, options) { + options = options || {}; + + var rectangle = { + label: 'Rectangle Body', + position: { x: x, y: y }, + vertices: Vertices.fromPath('L 0 0 L ' + width + ' 0 L ' + width + ' ' + height + ' L 0 ' + height) + }; + + if (options.chamfer) { + var chamfer = options.chamfer; + rectangle.vertices = Vertices.chamfer(rectangle.vertices, chamfer.radius, + chamfer.quality, chamfer.qualityMin, chamfer.qualityMax); + delete options.chamfer; + } + + return Body.create(Common.extend({}, rectangle, options)); + }; + + /** + * Creates a new rigid body model with a trapezoid hull. + * The options parameter is an object that specifies any properties you wish to override the defaults. + * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. + * @method trapezoid + * @param {number} x + * @param {number} y + * @param {number} width + * @param {number} height + * @param {number} slope + * @param {object} [options] + * @return {body} A new trapezoid body + */ + Bodies.trapezoid = function(x, y, width, height, slope, options) { + options = options || {}; + + slope *= 0.5; + var roof = (1 - (slope * 2)) * width; + + var x1 = width * slope, + x2 = x1 + roof, + x3 = x2 + x1, + verticesPath; + + if (slope < 0.5) { + verticesPath = 'L 0 0 L ' + x1 + ' ' + (-height) + ' L ' + x2 + ' ' + (-height) + ' L ' + x3 + ' 0'; + } else { + verticesPath = 'L 0 0 L ' + x2 + ' ' + (-height) + ' L ' + x3 + ' 0'; + } + + var trapezoid = { + label: 'Trapezoid Body', + position: { x: x, y: y }, + vertices: Vertices.fromPath(verticesPath) + }; + + if (options.chamfer) { + var chamfer = options.chamfer; + trapezoid.vertices = Vertices.chamfer(trapezoid.vertices, chamfer.radius, + chamfer.quality, chamfer.qualityMin, chamfer.qualityMax); + delete options.chamfer; + } + + return Body.create(Common.extend({}, trapezoid, options)); + }; + + /** + * Creates a new rigid body model with a circle hull. + * The options parameter is an object that specifies any properties you wish to override the defaults. + * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. + * @method circle + * @param {number} x + * @param {number} y + * @param {number} radius + * @param {object} [options] + * @param {number} [maxSides] + * @return {body} A new circle body + */ + Bodies.circle = function(x, y, radius, options, maxSides) { + options = options || {}; + + var circle = { + label: 'Circle Body', + circleRadius: radius + }; + + // approximate circles with polygons until true circles implemented in SAT + maxSides = maxSides || 25; + var sides = Math.ceil(Math.max(10, Math.min(maxSides, radius))); + + // optimisation: always use even number of sides (half the number of unique axes) + if (sides % 2 === 1) + sides += 1; + + return Bodies.polygon(x, y, sides, radius, Common.extend({}, circle, options)); + }; + + /** + * Creates a new rigid body model with a regular polygon hull with the given number of sides. + * The options parameter is an object that specifies any properties you wish to override the defaults. + * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. + * @method polygon + * @param {number} x + * @param {number} y + * @param {number} sides + * @param {number} radius + * @param {object} [options] + * @return {body} A new regular polygon body + */ + Bodies.polygon = function(x, y, sides, radius, options) { + options = options || {}; + + if (sides < 3) + return Bodies.circle(x, y, radius, options); + + var theta = 2 * Math.PI / sides, + path = '', + offset = theta * 0.5; + + for (var i = 0; i < sides; i += 1) { + var angle = offset + (i * theta), + xx = Math.cos(angle) * radius, + yy = Math.sin(angle) * radius; + + path += 'L ' + xx.toFixed(3) + ' ' + yy.toFixed(3) + ' '; + } + + var polygon = { + label: 'Polygon Body', + position: { x: x, y: y }, + vertices: Vertices.fromPath(path) + }; + + if (options.chamfer) { + var chamfer = options.chamfer; + polygon.vertices = Vertices.chamfer(polygon.vertices, chamfer.radius, + chamfer.quality, chamfer.qualityMin, chamfer.qualityMax); + delete options.chamfer; + } + + return Body.create(Common.extend({}, polygon, options)); + }; + + /** + * Creates a body using the supplied vertices (or an array containing multiple sets of vertices). + * If the vertices are convex, they will pass through as supplied. + * Otherwise if the vertices are concave, they will be decomposed if [poly-decomp.js](https://github.com/schteppe/poly-decomp.js) is available. + * Note that this process is not guaranteed to support complex sets of vertices (e.g. those with holes may fail). + * By default the decomposition will discard collinear edges (to improve performance). + * It can also optionally discard any parts that have an area less than `minimumArea`. + * If the vertices can not be decomposed, the result will fall back to using the convex hull. + * The options parameter is an object that specifies any `Matter.Body` properties you wish to override the defaults. + * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. + * @method fromVertices + * @param {number} x + * @param {number} y + * @param [[vector]] vertexSets + * @param {object} [options] + * @param {bool} [flagInternal=false] + * @param {number} [removeCollinear=0.01] + * @param {number} [minimumArea=10] + * @return {body} + */ + Bodies.fromVertices = function(x, y, vertexSets, options, flagInternal, removeCollinear, minimumArea) { + var body, + parts, + isConvex, + vertices, + i, + j, + k, + v, + z; + + options = options || {}; + parts = []; + + flagInternal = typeof flagInternal !== 'undefined' ? flagInternal : false; + removeCollinear = typeof removeCollinear !== 'undefined' ? removeCollinear : 0.01; + minimumArea = typeof minimumArea !== 'undefined' ? minimumArea : 10; + + if (!decomp) { + Common.warn('Bodies.fromVertices: poly-decomp.js required. Could not decompose vertices. Fallback to convex hull.'); + } + + // ensure vertexSets is an array of arrays + if (!Common.isArray(vertexSets[0])) { + vertexSets = [vertexSets]; + } + + for (v = 0; v < vertexSets.length; v += 1) { + vertices = vertexSets[v]; + isConvex = Vertices.isConvex(vertices); + + if (isConvex || !decomp) { + if (isConvex) { + vertices = Vertices.clockwiseSort(vertices); + } else { + // fallback to convex hull when decomposition is not possible + vertices = Vertices.hull(vertices); + } + + parts.push({ + position: { x: x, y: y }, + vertices: vertices + }); + } else { + // initialise a decomposition + var concave = vertices.map(function(vertex) { + return [vertex.x, vertex.y]; + }); + + // vertices are concave and simple, we can decompose into parts + decomp.makeCCW(concave); + if (removeCollinear !== false) + decomp.removeCollinearPoints(concave, removeCollinear); + + // use the quick decomposition algorithm (Bayazit) + var decomposed = decomp.quickDecomp(concave); + + // for each decomposed chunk + for (i = 0; i < decomposed.length; i++) { + var chunk = decomposed[i]; + + // convert vertices into the correct structure + var chunkVertices = chunk.map(function(vertices) { + return { + x: vertices[0], + y: vertices[1] + }; + }); + + // skip small chunks + if (minimumArea > 0 && Vertices.area(chunkVertices) < minimumArea) + continue; + + // create a compound part + parts.push({ + position: Vertices.centre(chunkVertices), + vertices: chunkVertices + }); + } + } + } + + // create body parts + for (i = 0; i < parts.length; i++) { + parts[i] = Body.create(Common.extend(parts[i], options)); + } + + if (flagInternal) + { + Bodies.flagCoincidentParts(parts, 5); + } + + if (parts.length > 1) { + // create the parent body to be returned, that contains generated compound parts + body = Body.create(Common.extend({ parts: parts.slice(0) }, options)); + Body.setPosition(body, { x: x, y: y }); + + return body; + } else { + return parts[0]; + } + }; + + /** + * Takes an array of Body objects and flags all internal edges (coincident parts) based on the maxDistance + * value. The array is changed in-place and returned, so you can pass this function a `Body.parts` property. + * + * @method flagCoincidentParts + * @param {body[]} parts - The Body parts, or array of bodies, to flag. + * @param {number} [maxDistance=5] + * @return {body[]} The modified `parts` parameter. + */ + Bodies.flagCoincidentParts = function (parts, maxDistance) + { + if (maxDistance === undefined) { maxDistance = 5; } + + for (var i = 0; i < parts.length; i++) + { + var partA = parts[i]; + + for (var j = i + 1; j < parts.length; j++) + { + var partB = parts[j]; + + if (Bounds.overlaps(partA.bounds, partB.bounds)) + { + var pav = partA.vertices; + var pbv = partB.vertices; + + // iterate vertices of both parts + for (var k = 0; k < partA.vertices.length; k++) + { + for (var z = 0; z < partB.vertices.length; z++) + { + // find distances between the vertices + var da = Vector.magnitudeSquared(Vector.sub(pav[(k + 1) % pav.length], pbv[z])); + var db = Vector.magnitudeSquared(Vector.sub(pav[k], pbv[(z + 1) % pbv.length])); + + // if both vertices are very close, consider the edge concident (internal) + if (da < maxDistance && db < maxDistance) + { + pav[k].isInternal = true; + pbv[z].isInternal = true; + } + } + } + } + } + } + + return parts; + }; + +})(); + + +/***/ }), +/* 110 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BlendModes = __webpack_require__(52); var Circle = __webpack_require__(65); -var CircleContains = __webpack_require__(54); +var CircleContains = __webpack_require__(55); var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); @@ -23117,12 +23849,12 @@ module.exports = Zone; /***/ }), -/* 109 */ +/* 111 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23132,35 +23864,35 @@ module.exports = Zone; module.exports = { - ADD_ANIMATION: __webpack_require__(509), - ANIMATION_COMPLETE: __webpack_require__(510), - ANIMATION_REPEAT: __webpack_require__(511), - ANIMATION_RESTART: __webpack_require__(512), - ANIMATION_START: __webpack_require__(513), - PAUSE_ALL: __webpack_require__(514), - REMOVE_ANIMATION: __webpack_require__(515), - RESUME_ALL: __webpack_require__(516), - SPRITE_ANIMATION_COMPLETE: __webpack_require__(517), - SPRITE_ANIMATION_KEY_COMPLETE: __webpack_require__(518), - SPRITE_ANIMATION_KEY_REPEAT: __webpack_require__(519), - SPRITE_ANIMATION_KEY_RESTART: __webpack_require__(520), - SPRITE_ANIMATION_KEY_START: __webpack_require__(521), - SPRITE_ANIMATION_KEY_UPDATE: __webpack_require__(522), - SPRITE_ANIMATION_REPEAT: __webpack_require__(523), - SPRITE_ANIMATION_RESTART: __webpack_require__(524), - SPRITE_ANIMATION_START: __webpack_require__(525), - SPRITE_ANIMATION_UPDATE: __webpack_require__(526) + ADD_ANIMATION: __webpack_require__(528), + ANIMATION_COMPLETE: __webpack_require__(529), + ANIMATION_REPEAT: __webpack_require__(530), + ANIMATION_RESTART: __webpack_require__(531), + ANIMATION_START: __webpack_require__(532), + PAUSE_ALL: __webpack_require__(533), + REMOVE_ANIMATION: __webpack_require__(534), + RESUME_ALL: __webpack_require__(535), + SPRITE_ANIMATION_COMPLETE: __webpack_require__(536), + SPRITE_ANIMATION_KEY_COMPLETE: __webpack_require__(537), + SPRITE_ANIMATION_KEY_REPEAT: __webpack_require__(538), + SPRITE_ANIMATION_KEY_RESTART: __webpack_require__(539), + SPRITE_ANIMATION_KEY_START: __webpack_require__(540), + SPRITE_ANIMATION_KEY_UPDATE: __webpack_require__(541), + SPRITE_ANIMATION_REPEAT: __webpack_require__(542), + SPRITE_ANIMATION_RESTART: __webpack_require__(543), + SPRITE_ANIMATION_START: __webpack_require__(544), + SPRITE_ANIMATION_UPDATE: __webpack_require__(545) }; /***/ }), -/* 110 */ +/* 112 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23183,17 +23915,17 @@ module.exports = Perimeter; /***/ }), -/* 111 */ +/* 113 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Events = __webpack_require__(267); +var Events = __webpack_require__(281); /** * @callback DataEachCallback @@ -23824,12 +24556,12 @@ module.exports = DataManager; /***/ }), -/* 112 */ +/* 114 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23841,9 +24573,12 @@ module.exports = DataManager; * @function Phaser.Utils.Array.Shuffle * @since 3.0.0 * - * @param {array} array - The array to shuffle. This array is modified in place. + * @generic T + * @genericUse {T[]} - [array,$return] * - * @return {array} The shuffled array. + * @param {T[]} array - The array to shuffle. This array is modified in place. + * + * @return {T[]} The shuffled array. */ var Shuffle = function (array) { @@ -23862,12 +24597,12 @@ module.exports = Shuffle; /***/ }), -/* 113 */ +/* 115 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23892,12 +24627,12 @@ module.exports = Linear; /***/ }), -/* 114 */ +/* 116 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24061,19 +24796,19 @@ function init () module.exports = init(); -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(701))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(720))) /***/ }), -/* 115 */ +/* 117 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(114); +var OS = __webpack_require__(116); /** * Determines the browser type and version running this Phaser Game instance. @@ -24174,12 +24909,12 @@ module.exports = init(); /***/ }), -/* 116 */ +/* 118 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24204,12 +24939,12 @@ module.exports = IsSizePowerOfTwo; /***/ }), -/* 117 */ +/* 119 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24219,22 +24954,22 @@ module.exports = IsSizePowerOfTwo; module.exports = { - ADD: __webpack_require__(748), - ERROR: __webpack_require__(749), - LOAD: __webpack_require__(750), - READY: __webpack_require__(751), - REMOVE: __webpack_require__(752) + ADD: __webpack_require__(771), + ERROR: __webpack_require__(772), + LOAD: __webpack_require__(773), + READY: __webpack_require__(774), + REMOVE: __webpack_require__(775) }; /***/ }), -/* 118 */ +/* 120 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24287,12 +25022,12 @@ module.exports = AddToDOM; /***/ }), -/* 119 */ +/* 121 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24378,12 +25113,12 @@ module.exports = Remove; /***/ }), -/* 120 */ +/* 122 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25284,12 +26019,12 @@ module.exports = KeyCodes; /***/ }), -/* 121 */ +/* 123 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25407,13 +26142,13 @@ module.exports = CONST; /***/ }), -/* 122 */ +/* 124 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25639,8 +26374,9 @@ var BaseSoundManager = new Class({ }, /** - * Enables playing sound on the fly without the need to keep a reference to it. - * Sound will auto destroy once its playback ends. + * Adds a new sound to the sound manager and plays it. + * The sound will be automatically removed (destroyed) once playback ends. + * This lets you play a new sound on the fly without the need to keep a reference to it. * * @method Phaser.Sound.BaseSoundManager#play * @listens Phaser.Sound.Events#COMPLETE @@ -26031,13 +26767,13 @@ module.exports = BaseSoundManager; /***/ }), -/* 123 */ +/* 125 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26531,19 +27267,19 @@ module.exports = BaseSound; /***/ }), -/* 124 */ +/* 126 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayUtils = __webpack_require__(180); +var ArrayUtils = __webpack_require__(181); var Class = __webpack_require__(0); var NOOP = __webpack_require__(1); -var StableSort = __webpack_require__(126); +var StableSort = __webpack_require__(128); /** * @callback EachListCallback @@ -27347,17 +28083,17 @@ module.exports = List; /***/ }), -/* 125 */ +/* 127 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CheckMatrix = __webpack_require__(181); -var TransposeMatrix = __webpack_require__(368); +var CheckMatrix = __webpack_require__(182); +var TransposeMatrix = __webpack_require__(382); /** * Rotates the array matrix based on the given rotation value. @@ -27419,12 +28155,12 @@ module.exports = RotateMatrix; /***/ }), -/* 126 */ +/* 128 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27564,27 +28300,27 @@ else {} })(); /***/ }), -/* 127 */ +/* 129 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var GetBitmapTextSize = __webpack_require__(927); -var ParseFromAtlas = __webpack_require__(928); -var ParseXMLBitmapFont = __webpack_require__(184); -var Render = __webpack_require__(929); +var GetBitmapTextSize = __webpack_require__(938); +var ParseFromAtlas = __webpack_require__(939); +var ParseXMLBitmapFont = __webpack_require__(185); +var Render = __webpack_require__(940); /** * @classdesc * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure. - * + * * During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to * match the font structure. * @@ -27754,7 +28490,7 @@ var BitmapText = new Class({ /** * Internal cache var holding the maxWidth. - * + * * @name Phaser.GameObjects.BitmapText#_maxWidth * @type {number} * @private @@ -28000,7 +28736,7 @@ var BitmapText = new Class({ * If no whitespace was found then no wrapping will take place and consequently the `maxWidth` value will not be honored. * * Disable maxWidth by setting the value to 0. - * + * * You can set the whitespace character to be searched for by setting the `wordWrapCharCode` parameter or property. * * @method Phaser.GameObjects.BitmapText#setMaxWidth @@ -28259,8 +28995,7 @@ BitmapText.ALIGN_RIGHT = 2; * * Adds the parsed Bitmap Font data to the cache with the `fontName` key. * - * @name Phaser.GameObjects.BitmapText.ParseFromAtlas - * @type {function} + * @method Phaser.GameObjects.BitmapText.ParseFromAtlas * @since 3.0.0 * * @param {Phaser.Scene} scene - The Scene to parse the Bitmap Font for. @@ -28278,8 +29013,7 @@ BitmapText.ParseFromAtlas = ParseFromAtlas; /** * Parse an XML font to Bitmap Font data for the Bitmap Font cache. * - * @name Phaser.GameObjects.BitmapText.ParseXMLBitmapFont - * @type {function} + * @method Phaser.GameObjects.BitmapText.ParseXMLBitmapFont * @since 3.17.0 * * @param {XMLDocument} xml - The XML Document to parse the font from. @@ -28295,19 +29029,19 @@ module.exports = BitmapText; /***/ }), -/* 128 */ +/* 130 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var MeshRender = __webpack_require__(1054); +var MeshRender = __webpack_require__(1065); var NOOP = __webpack_require__(1); /** @@ -28323,7 +29057,6 @@ var NOOP = __webpack_require__(1); * * @extends Phaser.GameObjects.Components.BlendMode * @extends Phaser.GameObjects.Components.Depth - * @extends Phaser.GameObjects.Components.GetBounds * @extends Phaser.GameObjects.Components.Mask * @extends Phaser.GameObjects.Components.Pipeline * @extends Phaser.GameObjects.Components.Size @@ -28349,7 +29082,6 @@ var Mesh = new Class({ Mixins: [ Components.BlendMode, Components.Depth, - Components.GetBounds, Components.Mask, Components.Pipeline, Components.Size, @@ -28468,12 +29200,12 @@ module.exports = Mesh; /***/ }), -/* 129 */ +/* 131 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28506,12 +29238,12 @@ module.exports = RectangleToRectangle; /***/ }), -/* 130 */ +/* 132 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28533,11 +29265,10 @@ var InputPluginCache = {}; * Plugin is the object to instantiate to create the plugin * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input) * - * @name Phaser.Input.InputPluginCache.register - * @type {function} + * @function Phaser.Input.InputPluginCache.register * @static * @since 3.10.0 - * + * * @param {string} key - A reference used to get this plugin from the plugin cache. * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated. * @param {string} mapping - If this plugin is to be injected into the Input Plugin, this is the property key used. @@ -28552,11 +29283,10 @@ InputPluginCache.register = function (key, plugin, mapping, settingsKey, configK /** * Returns the input plugin object from the cache based on the given key. * - * @name Phaser.Input.InputPluginCache.getCore - * @type {function} + * @function Phaser.Input.InputPluginCache.getCore * @static * @since 3.10.0 - * + * * @param {string} key - The key of the input plugin to get. * * @return {Phaser.Types.Input.InputPluginContainer} The input plugin object. @@ -28569,11 +29299,10 @@ InputPluginCache.getPlugin = function (key) /** * Installs all of the registered Input Plugins into the given target. * - * @name Phaser.Input.InputPluginCache.install - * @type {function} + * @function Phaser.Input.InputPluginCache.install * @static * @since 3.10.0 - * + * * @param {Phaser.Input.InputPlugin} target - The target InputPlugin to install the plugins into. */ InputPluginCache.install = function (target) @@ -28599,11 +29328,10 @@ InputPluginCache.install = function (target) /** * Removes an input plugin based on the given key. * - * @name Phaser.Input.InputPluginCache.remove - * @type {function} + * @function Phaser.Input.InputPluginCache.remove * @static * @since 3.10.0 - * + * * @param {string} key - The key of the input plugin to remove. */ InputPluginCache.remove = function (key) @@ -28618,12 +29346,12 @@ module.exports = InputPluginCache; /***/ }), -/* 131 */ +/* 133 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28633,24 +29361,24 @@ module.exports = InputPluginCache; module.exports = { - ANY_KEY_DOWN: __webpack_require__(1192), - ANY_KEY_UP: __webpack_require__(1193), - COMBO_MATCH: __webpack_require__(1194), - DOWN: __webpack_require__(1195), - KEY_DOWN: __webpack_require__(1196), - KEY_UP: __webpack_require__(1197), - UP: __webpack_require__(1198) + ANY_KEY_DOWN: __webpack_require__(1203), + ANY_KEY_UP: __webpack_require__(1204), + COMBO_MATCH: __webpack_require__(1205), + DOWN: __webpack_require__(1206), + KEY_DOWN: __webpack_require__(1207), + KEY_UP: __webpack_require__(1208), + UP: __webpack_require__(1209) }; /***/ }), -/* 132 */ +/* 134 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28686,12 +29414,12 @@ module.exports = GetURL; /***/ }), -/* 133 */ +/* 135 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28750,17 +29478,17 @@ module.exports = XHRSettings; /***/ }), -/* 134 */ +/* 136 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Components = __webpack_require__(213); +var Components = __webpack_require__(214); var Sprite = __webpack_require__(69); /** @@ -28851,349 +29579,12 @@ module.exports = ArcadeSprite; /***/ }), -/* 135 */ -/***/ (function(module, exports, __webpack_require__) { - -/** -* The `Matter.Bodies` module contains factory methods for creating rigid body models -* with commonly used body configurations (such as rectangles, circles and other polygons). -* -* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). -* -* @class Bodies -*/ - -// TODO: true circle bodies - -var Bodies = {}; - -module.exports = Bodies; - -var Vertices = __webpack_require__(86); -var Common = __webpack_require__(37); -var Body = __webpack_require__(62); -var Bounds = __webpack_require__(102); -var Vector = __webpack_require__(101); -var decomp = __webpack_require__(1365); - -(function() { - - /** - * Creates a new rigid body model with a rectangle hull. - * The options parameter is an object that specifies any properties you wish to override the defaults. - * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. - * @method rectangle - * @param {number} x - * @param {number} y - * @param {number} width - * @param {number} height - * @param {object} [options] - * @return {body} A new rectangle body - */ - Bodies.rectangle = function(x, y, width, height, options) { - options = options || {}; - - var rectangle = { - label: 'Rectangle Body', - position: { x: x, y: y }, - vertices: Vertices.fromPath('L 0 0 L ' + width + ' 0 L ' + width + ' ' + height + ' L 0 ' + height) - }; - - if (options.chamfer) { - var chamfer = options.chamfer; - rectangle.vertices = Vertices.chamfer(rectangle.vertices, chamfer.radius, - chamfer.quality, chamfer.qualityMin, chamfer.qualityMax); - delete options.chamfer; - } - - return Body.create(Common.extend({}, rectangle, options)); - }; - - /** - * Creates a new rigid body model with a trapezoid hull. - * The options parameter is an object that specifies any properties you wish to override the defaults. - * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. - * @method trapezoid - * @param {number} x - * @param {number} y - * @param {number} width - * @param {number} height - * @param {number} slope - * @param {object} [options] - * @return {body} A new trapezoid body - */ - Bodies.trapezoid = function(x, y, width, height, slope, options) { - options = options || {}; - - slope *= 0.5; - var roof = (1 - (slope * 2)) * width; - - var x1 = width * slope, - x2 = x1 + roof, - x3 = x2 + x1, - verticesPath; - - if (slope < 0.5) { - verticesPath = 'L 0 0 L ' + x1 + ' ' + (-height) + ' L ' + x2 + ' ' + (-height) + ' L ' + x3 + ' 0'; - } else { - verticesPath = 'L 0 0 L ' + x2 + ' ' + (-height) + ' L ' + x3 + ' 0'; - } - - var trapezoid = { - label: 'Trapezoid Body', - position: { x: x, y: y }, - vertices: Vertices.fromPath(verticesPath) - }; - - if (options.chamfer) { - var chamfer = options.chamfer; - trapezoid.vertices = Vertices.chamfer(trapezoid.vertices, chamfer.radius, - chamfer.quality, chamfer.qualityMin, chamfer.qualityMax); - delete options.chamfer; - } - - return Body.create(Common.extend({}, trapezoid, options)); - }; - - /** - * Creates a new rigid body model with a circle hull. - * The options parameter is an object that specifies any properties you wish to override the defaults. - * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. - * @method circle - * @param {number} x - * @param {number} y - * @param {number} radius - * @param {object} [options] - * @param {number} [maxSides] - * @return {body} A new circle body - */ - Bodies.circle = function(x, y, radius, options, maxSides) { - options = options || {}; - - var circle = { - label: 'Circle Body', - circleRadius: radius - }; - - // approximate circles with polygons until true circles implemented in SAT - maxSides = maxSides || 25; - var sides = Math.ceil(Math.max(10, Math.min(maxSides, radius))); - - // optimisation: always use even number of sides (half the number of unique axes) - if (sides % 2 === 1) - sides += 1; - - return Bodies.polygon(x, y, sides, radius, Common.extend({}, circle, options)); - }; - - /** - * Creates a new rigid body model with a regular polygon hull with the given number of sides. - * The options parameter is an object that specifies any properties you wish to override the defaults. - * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. - * @method polygon - * @param {number} x - * @param {number} y - * @param {number} sides - * @param {number} radius - * @param {object} [options] - * @return {body} A new regular polygon body - */ - Bodies.polygon = function(x, y, sides, radius, options) { - options = options || {}; - - if (sides < 3) - return Bodies.circle(x, y, radius, options); - - var theta = 2 * Math.PI / sides, - path = '', - offset = theta * 0.5; - - for (var i = 0; i < sides; i += 1) { - var angle = offset + (i * theta), - xx = Math.cos(angle) * radius, - yy = Math.sin(angle) * radius; - - path += 'L ' + xx.toFixed(3) + ' ' + yy.toFixed(3) + ' '; - } - - var polygon = { - label: 'Polygon Body', - position: { x: x, y: y }, - vertices: Vertices.fromPath(path) - }; - - if (options.chamfer) { - var chamfer = options.chamfer; - polygon.vertices = Vertices.chamfer(polygon.vertices, chamfer.radius, - chamfer.quality, chamfer.qualityMin, chamfer.qualityMax); - delete options.chamfer; - } - - return Body.create(Common.extend({}, polygon, options)); - }; - - /** - * Creates a body using the supplied vertices (or an array containing multiple sets of vertices). - * If the vertices are convex, they will pass through as supplied. - * Otherwise if the vertices are concave, they will be decomposed if [poly-decomp.js](https://github.com/schteppe/poly-decomp.js) is available. - * Note that this process is not guaranteed to support complex sets of vertices (e.g. those with holes may fail). - * By default the decomposition will discard collinear edges (to improve performance). - * It can also optionally discard any parts that have an area less than `minimumArea`. - * If the vertices can not be decomposed, the result will fall back to using the convex hull. - * The options parameter is an object that specifies any `Matter.Body` properties you wish to override the defaults. - * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object. - * @method fromVertices - * @param {number} x - * @param {number} y - * @param [[vector]] vertexSets - * @param {object} [options] - * @param {bool} [flagInternal=false] - * @param {number} [removeCollinear=0.01] - * @param {number} [minimumArea=10] - * @return {body} - */ - Bodies.fromVertices = function(x, y, vertexSets, options, flagInternal, removeCollinear, minimumArea) { - var body, - parts, - isConvex, - vertices, - i, - j, - k, - v, - z; - - options = options || {}; - parts = []; - - flagInternal = typeof flagInternal !== 'undefined' ? flagInternal : false; - removeCollinear = typeof removeCollinear !== 'undefined' ? removeCollinear : 0.01; - minimumArea = typeof minimumArea !== 'undefined' ? minimumArea : 10; - - if (!decomp) { - Common.warn('Bodies.fromVertices: poly-decomp.js required. Could not decompose vertices. Fallback to convex hull.'); - } - - // ensure vertexSets is an array of arrays - if (!Common.isArray(vertexSets[0])) { - vertexSets = [vertexSets]; - } - - for (v = 0; v < vertexSets.length; v += 1) { - vertices = vertexSets[v]; - isConvex = Vertices.isConvex(vertices); - - if (isConvex || !decomp) { - if (isConvex) { - vertices = Vertices.clockwiseSort(vertices); - } else { - // fallback to convex hull when decomposition is not possible - vertices = Vertices.hull(vertices); - } - - parts.push({ - position: { x: x, y: y }, - vertices: vertices - }); - } else { - // initialise a decomposition - var concave = vertices.map(function(vertex) { - return [vertex.x, vertex.y]; - }); - - // vertices are concave and simple, we can decompose into parts - decomp.makeCCW(concave); - if (removeCollinear !== false) - decomp.removeCollinearPoints(concave, removeCollinear); - - // use the quick decomposition algorithm (Bayazit) - var decomposed = decomp.quickDecomp(concave); - - // for each decomposed chunk - for (i = 0; i < decomposed.length; i++) { - var chunk = decomposed[i]; - - // convert vertices into the correct structure - var chunkVertices = chunk.map(function(vertices) { - return { - x: vertices[0], - y: vertices[1] - }; - }); - - // skip small chunks - if (minimumArea > 0 && Vertices.area(chunkVertices) < minimumArea) - continue; - - // create a compound part - parts.push({ - position: Vertices.centre(chunkVertices), - vertices: chunkVertices - }); - } - } - } - - // create body parts - for (i = 0; i < parts.length; i++) { - parts[i] = Body.create(Common.extend(parts[i], options)); - } - - // flag internal edges (coincident part edges) - if (flagInternal) { - var coincident_max_dist = 5; - - for (i = 0; i < parts.length; i++) { - var partA = parts[i]; - - for (j = i + 1; j < parts.length; j++) { - var partB = parts[j]; - - if (Bounds.overlaps(partA.bounds, partB.bounds)) { - var pav = partA.vertices, - pbv = partB.vertices; - - // iterate vertices of both parts - for (k = 0; k < partA.vertices.length; k++) { - for (z = 0; z < partB.vertices.length; z++) { - // find distances between the vertices - var da = Vector.magnitudeSquared(Vector.sub(pav[(k + 1) % pav.length], pbv[z])), - db = Vector.magnitudeSquared(Vector.sub(pav[k], pbv[(z + 1) % pbv.length])); - - // if both vertices are very close, consider the edge concident (internal) - if (da < coincident_max_dist && db < coincident_max_dist) { - pav[k].isInternal = true; - pbv[z].isInternal = true; - } - } - } - - } - } - } - } - - if (parts.length > 1) { - // create the parent body to be returned, that contains generated compound parts - body = Body.create(Common.extend({ parts: parts.slice(0) }, options)); - Body.setPosition(body, { x: x, y: y }); - - return body; - } else { - return parts[0]; - } - }; - -})(); - - -/***/ }), -/* 136 */ +/* 137 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29203,59 +29594,59 @@ var decomp = __webpack_require__(1365); module.exports = { - CalculateFacesAt: __webpack_require__(216), + CalculateFacesAt: __webpack_require__(217), CalculateFacesWithin: __webpack_require__(51), - Copy: __webpack_require__(1286), - CreateFromTiles: __webpack_require__(1287), - CullTiles: __webpack_require__(1288), - Fill: __webpack_require__(1289), - FilterTiles: __webpack_require__(1290), - FindByIndex: __webpack_require__(1291), - FindTile: __webpack_require__(1292), - ForEachTile: __webpack_require__(1293), - GetTileAt: __webpack_require__(137), - GetTileAtWorldXY: __webpack_require__(1294), + Copy: __webpack_require__(1301), + CreateFromTiles: __webpack_require__(1302), + CullTiles: __webpack_require__(1303), + Fill: __webpack_require__(1304), + FilterTiles: __webpack_require__(1305), + FindByIndex: __webpack_require__(1306), + FindTile: __webpack_require__(1307), + ForEachTile: __webpack_require__(1308), + GetTileAt: __webpack_require__(138), + GetTileAtWorldXY: __webpack_require__(1309), GetTilesWithin: __webpack_require__(24), - GetTilesWithinShape: __webpack_require__(1295), - GetTilesWithinWorldXY: __webpack_require__(1296), - HasTileAt: __webpack_require__(456), - HasTileAtWorldXY: __webpack_require__(1297), + GetTilesWithinShape: __webpack_require__(1310), + GetTilesWithinWorldXY: __webpack_require__(1311), + HasTileAt: __webpack_require__(470), + HasTileAtWorldXY: __webpack_require__(1312), IsInLayerBounds: __webpack_require__(103), - PutTileAt: __webpack_require__(217), - PutTileAtWorldXY: __webpack_require__(1298), - PutTilesAt: __webpack_require__(1299), - Randomize: __webpack_require__(1300), - RemoveTileAt: __webpack_require__(457), - RemoveTileAtWorldXY: __webpack_require__(1301), - RenderDebug: __webpack_require__(1302), - ReplaceByIndex: __webpack_require__(455), - SetCollision: __webpack_require__(1303), - SetCollisionBetween: __webpack_require__(1304), - SetCollisionByExclusion: __webpack_require__(1305), - SetCollisionByProperty: __webpack_require__(1306), - SetCollisionFromCollisionGroup: __webpack_require__(1307), - SetTileIndexCallback: __webpack_require__(1308), - SetTileLocationCallback: __webpack_require__(1309), - Shuffle: __webpack_require__(1310), - SwapByIndex: __webpack_require__(1311), - TileToWorldX: __webpack_require__(138), - TileToWorldXY: __webpack_require__(1312), - TileToWorldY: __webpack_require__(139), - WeightedRandomize: __webpack_require__(1313), + PutTileAt: __webpack_require__(218), + PutTileAtWorldXY: __webpack_require__(1313), + PutTilesAt: __webpack_require__(1314), + Randomize: __webpack_require__(1315), + RemoveTileAt: __webpack_require__(471), + RemoveTileAtWorldXY: __webpack_require__(1316), + RenderDebug: __webpack_require__(1317), + ReplaceByIndex: __webpack_require__(469), + SetCollision: __webpack_require__(1318), + SetCollisionBetween: __webpack_require__(1319), + SetCollisionByExclusion: __webpack_require__(1320), + SetCollisionByProperty: __webpack_require__(1321), + SetCollisionFromCollisionGroup: __webpack_require__(1322), + SetTileIndexCallback: __webpack_require__(1323), + SetTileLocationCallback: __webpack_require__(1324), + Shuffle: __webpack_require__(1325), + SwapByIndex: __webpack_require__(1326), + TileToWorldX: __webpack_require__(139), + TileToWorldXY: __webpack_require__(1327), + TileToWorldY: __webpack_require__(140), + WeightedRandomize: __webpack_require__(1328), WorldToTileX: __webpack_require__(63), - WorldToTileXY: __webpack_require__(1314), + WorldToTileXY: __webpack_require__(1329), WorldToTileY: __webpack_require__(64) }; /***/ }), -/* 137 */ +/* 138 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29306,12 +29697,12 @@ module.exports = GetTileAt; /***/ }), -/* 138 */ +/* 139 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29351,12 +29742,12 @@ module.exports = TileToWorldX; /***/ }), -/* 139 */ +/* 140 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29396,12 +29787,12 @@ module.exports = TileToWorldY; /***/ }), -/* 140 */ +/* 141 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29800,12 +30191,12 @@ module.exports = Tileset; /***/ }), -/* 141 */ +/* 142 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29864,26 +30255,26 @@ module.exports = GetNewValue; /***/ }), -/* 142 */ +/* 143 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Defaults = __webpack_require__(226); +var Defaults = __webpack_require__(227); var GetAdvancedValue = __webpack_require__(15); var GetBoolean = __webpack_require__(88); var GetEaseFunction = __webpack_require__(82); -var GetNewValue = __webpack_require__(141); -var GetProps = __webpack_require__(478); -var GetTargets = __webpack_require__(224); +var GetNewValue = __webpack_require__(142); +var GetProps = __webpack_require__(492); +var GetTargets = __webpack_require__(225); var GetValue = __webpack_require__(6); -var GetValueOp = __webpack_require__(225); -var Tween = __webpack_require__(227); -var TweenData = __webpack_require__(229); +var GetValueOp = __webpack_require__(226); +var Tween = __webpack_require__(228); +var TweenData = __webpack_require__(230); /** * Creates a new Tween. @@ -29997,146 +30388,740 @@ module.exports = TweenBuilder; /***/ }), -/* 143 */ +/* 144 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ALIGN_CONST = { - - /** - * A constant representing a top-left alignment or position. - * @constant - * @name Phaser.Display.Align.TOP_LEFT - * @since 3.0.0 - * @type {integer} - */ - TOP_LEFT: 0, - - /** - * A constant representing a top-center alignment or position. - * @constant - * @name Phaser.Display.Align.TOP_CENTER - * @since 3.0.0 - * @type {integer} - */ - TOP_CENTER: 1, - - /** - * A constant representing a top-right alignment or position. - * @constant - * @name Phaser.Display.Align.TOP_RIGHT - * @since 3.0.0 - * @type {integer} - */ - TOP_RIGHT: 2, - - /** - * A constant representing a left-top alignment or position. - * @constant - * @name Phaser.Display.Align.LEFT_TOP - * @since 3.0.0 - * @type {integer} - */ - LEFT_TOP: 3, - - /** - * A constant representing a left-center alignment or position. - * @constant - * @name Phaser.Display.Align.LEFT_CENTER - * @since 3.0.0 - * @type {integer} - */ - LEFT_CENTER: 4, - - /** - * A constant representing a left-bottom alignment or position. - * @constant - * @name Phaser.Display.Align.LEFT_BOTTOM - * @since 3.0.0 - * @type {integer} - */ - LEFT_BOTTOM: 5, - - /** - * A constant representing a center alignment or position. - * @constant - * @name Phaser.Display.Align.CENTER - * @since 3.0.0 - * @type {integer} - */ - CENTER: 6, - - /** - * A constant representing a right-top alignment or position. - * @constant - * @name Phaser.Display.Align.RIGHT_TOP - * @since 3.0.0 - * @type {integer} - */ - RIGHT_TOP: 7, - - /** - * A constant representing a right-center alignment or position. - * @constant - * @name Phaser.Display.Align.RIGHT_CENTER - * @since 3.0.0 - * @type {integer} - */ - RIGHT_CENTER: 8, - - /** - * A constant representing a right-bottom alignment or position. - * @constant - * @name Phaser.Display.Align.RIGHT_BOTTOM - * @since 3.0.0 - * @type {integer} - */ - RIGHT_BOTTOM: 9, - - /** - * A constant representing a bottom-left alignment or position. - * @constant - * @name Phaser.Display.Align.BOTTOM_LEFT - * @since 3.0.0 - * @type {integer} - */ - BOTTOM_LEFT: 10, - - /** - * A constant representing a bottom-center alignment or position. - * @constant - * @name Phaser.Display.Align.BOTTOM_CENTER - * @since 3.0.0 - * @type {integer} - */ - BOTTOM_CENTER: 11, - - /** - * A constant representing a bottom-right alignment or position. - * @constant - * @name Phaser.Display.Align.BOTTOM_RIGHT - * @since 3.0.0 - * @type {integer} - */ - BOTTOM_RIGHT: 12 +/** + * Check whether the given values are fuzzily equal. + * + * Two numbers are fuzzily equal if their difference is less than `epsilon`. + * + * @function Phaser.Math.Fuzzy.Equal + * @since 3.0.0 + * + * @param {number} a - The first value. + * @param {number} b - The second value. + * @param {number} [epsilon=0.0001] - The epsilon. + * + * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`. + */ +var Equal = function (a, b, epsilon) +{ + if (epsilon === undefined) { epsilon = 0.0001; } + return Math.abs(a - b) < epsilon; }; -module.exports = ALIGN_CONST; +module.exports = Equal; /***/ }), -/* 144 */ +/* 145 */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* The `Matter.Composite` module contains methods for creating and manipulating composite bodies. +* A composite body is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`, therefore composites form a tree structure. +* It is important to use the functions in this module to modify composites, rather than directly modifying their properties. +* Note that the `Matter.World` object is also a type of `Matter.Composite` and as such all composite methods here can also operate on a `Matter.World`. +* +* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). +* +* @class Composite +*/ + +var Composite = {}; + +module.exports = Composite; + +var Events = __webpack_require__(237); +var Common = __webpack_require__(37); +var Bounds = __webpack_require__(102); +var Body = __webpack_require__(62); + +(function() { + + /** + * Creates a new composite. The options parameter is an object that specifies any properties you wish to override the defaults. + * See the properites section below for detailed information on what you can pass via the `options` object. + * @method create + * @param {} [options] + * @return {composite} A new composite + */ + Composite.create = function(options) { + return Common.extend({ + id: Common.nextId(), + type: 'composite', + parent: null, + isModified: false, + bodies: [], + constraints: [], + composites: [], + label: 'Composite', + plugin: {} + }, options); + }; + + /** + * Sets the composite's `isModified` flag. + * If `updateParents` is true, all parents will be set (default: false). + * If `updateChildren` is true, all children will be set (default: false). + * @method setModified + * @param {composite} composite + * @param {boolean} isModified + * @param {boolean} [updateParents=false] + * @param {boolean} [updateChildren=false] + */ + Composite.setModified = function(composite, isModified, updateParents, updateChildren) { + + Events.trigger(composite, 'compositeModified', composite); + + composite.isModified = isModified; + + if (updateParents && composite.parent) { + Composite.setModified(composite.parent, isModified, updateParents, updateChildren); + } + + if (updateChildren) { + for(var i = 0; i < composite.composites.length; i++) { + var childComposite = composite.composites[i]; + Composite.setModified(childComposite, isModified, updateParents, updateChildren); + } + } + }; + + /** + * Generic add function. Adds one or many body(s), constraint(s) or a composite(s) to the given composite. + * Triggers `beforeAdd` and `afterAdd` events on the `composite`. + * @method add + * @param {composite} composite + * @param {} object + * @return {composite} The original composite with the objects added + */ + Composite.add = function(composite, object) { + var objects = [].concat(object); + + Events.trigger(composite, 'beforeAdd', { object: object }); + + for (var i = 0; i < objects.length; i++) { + var obj = objects[i]; + + switch (obj.type) { + + case 'body': + // skip adding compound parts + if (obj.parent !== obj) { + Common.warn('Composite.add: skipped adding a compound body part (you must add its parent instead)'); + break; + } + + Composite.addBody(composite, obj); + break; + case 'constraint': + Composite.addConstraint(composite, obj); + break; + case 'composite': + Composite.addComposite(composite, obj); + break; + case 'mouseConstraint': + Composite.addConstraint(composite, obj.constraint); + break; + + } + } + + Events.trigger(composite, 'afterAdd', { object: object }); + + return composite; + }; + + /** + * Generic remove function. Removes one or many body(s), constraint(s) or a composite(s) to the given composite. + * Optionally searching its children recursively. + * Triggers `beforeRemove` and `afterRemove` events on the `composite`. + * @method remove + * @param {composite} composite + * @param {} object + * @param {boolean} [deep=false] + * @return {composite} The original composite with the objects removed + */ + Composite.remove = function(composite, object, deep) { + var objects = [].concat(object); + + Events.trigger(composite, 'beforeRemove', { object: object }); + + for (var i = 0; i < objects.length; i++) { + var obj = objects[i]; + + switch (obj.type) { + + case 'body': + Composite.removeBody(composite, obj, deep); + break; + case 'constraint': + Composite.removeConstraint(composite, obj, deep); + break; + case 'composite': + Composite.removeComposite(composite, obj, deep); + break; + case 'mouseConstraint': + Composite.removeConstraint(composite, obj.constraint); + break; + + } + } + + Events.trigger(composite, 'afterRemove', { object: object }); + + return composite; + }; + + /** + * Adds a composite to the given composite. + * @private + * @method addComposite + * @param {composite} compositeA + * @param {composite} compositeB + * @return {composite} The original compositeA with the objects from compositeB added + */ + Composite.addComposite = function(compositeA, compositeB) { + compositeA.composites.push(compositeB); + compositeB.parent = compositeA; + Composite.setModified(compositeA, true, true, false); + return compositeA; + }; + + /** + * Removes a composite from the given composite, and optionally searching its children recursively. + * @private + * @method removeComposite + * @param {composite} compositeA + * @param {composite} compositeB + * @param {boolean} [deep=false] + * @return {composite} The original compositeA with the composite removed + */ + Composite.removeComposite = function(compositeA, compositeB, deep) { + var position = compositeA.composites.indexOf(compositeB); + if (position !== -1) { + Composite.removeCompositeAt(compositeA, position); + Composite.setModified(compositeA, true, true, false); + } + + if (deep) { + for (var i = 0; i < compositeA.composites.length; i++){ + Composite.removeComposite(compositeA.composites[i], compositeB, true); + } + } + + return compositeA; + }; + + /** + * Removes a composite from the given composite. + * @private + * @method removeCompositeAt + * @param {composite} composite + * @param {number} position + * @return {composite} The original composite with the composite removed + */ + Composite.removeCompositeAt = function(composite, position) { + composite.composites.splice(position, 1); + Composite.setModified(composite, true, true, false); + return composite; + }; + + /** + * Adds a body to the given composite. + * @private + * @method addBody + * @param {composite} composite + * @param {body} body + * @return {composite} The original composite with the body added + */ + Composite.addBody = function(composite, body) { + composite.bodies.push(body); + Composite.setModified(composite, true, true, false); + return composite; + }; + + /** + * Removes a body from the given composite, and optionally searching its children recursively. + * @private + * @method removeBody + * @param {composite} composite + * @param {body} body + * @param {boolean} [deep=false] + * @return {composite} The original composite with the body removed + */ + Composite.removeBody = function(composite, body, deep) { + var position = composite.bodies.indexOf(body); + if (position !== -1) { + Composite.removeBodyAt(composite, position); + Composite.setModified(composite, true, true, false); + } + + if (deep) { + for (var i = 0; i < composite.composites.length; i++){ + Composite.removeBody(composite.composites[i], body, true); + } + } + + return composite; + }; + + /** + * Removes a body from the given composite. + * @private + * @method removeBodyAt + * @param {composite} composite + * @param {number} position + * @return {composite} The original composite with the body removed + */ + Composite.removeBodyAt = function(composite, position) { + composite.bodies.splice(position, 1); + Composite.setModified(composite, true, true, false); + return composite; + }; + + /** + * Adds a constraint to the given composite. + * @private + * @method addConstraint + * @param {composite} composite + * @param {constraint} constraint + * @return {composite} The original composite with the constraint added + */ + Composite.addConstraint = function(composite, constraint) { + composite.constraints.push(constraint); + Composite.setModified(composite, true, true, false); + return composite; + }; + + /** + * Removes a constraint from the given composite, and optionally searching its children recursively. + * @private + * @method removeConstraint + * @param {composite} composite + * @param {constraint} constraint + * @param {boolean} [deep=false] + * @return {composite} The original composite with the constraint removed + */ + Composite.removeConstraint = function(composite, constraint, deep) { + var position = composite.constraints.indexOf(constraint); + if (position !== -1) { + Composite.removeConstraintAt(composite, position); + } + + if (deep) { + for (var i = 0; i < composite.composites.length; i++){ + Composite.removeConstraint(composite.composites[i], constraint, true); + } + } + + return composite; + }; + + /** + * Removes a body from the given composite. + * @private + * @method removeConstraintAt + * @param {composite} composite + * @param {number} position + * @return {composite} The original composite with the constraint removed + */ + Composite.removeConstraintAt = function(composite, position) { + composite.constraints.splice(position, 1); + Composite.setModified(composite, true, true, false); + return composite; + }; + + /** + * Removes all bodies, constraints and composites from the given composite. + * Optionally clearing its children recursively. + * @method clear + * @param {composite} composite + * @param {boolean} keepStatic + * @param {boolean} [deep=false] + */ + Composite.clear = function(composite, keepStatic, deep) { + if (deep) { + for (var i = 0; i < composite.composites.length; i++){ + Composite.clear(composite.composites[i], keepStatic, true); + } + } + + if (keepStatic) { + composite.bodies = composite.bodies.filter(function(body) { return body.isStatic; }); + } else { + composite.bodies.length = 0; + } + + composite.constraints.length = 0; + composite.composites.length = 0; + Composite.setModified(composite, true, true, false); + + return composite; + }; + + /** + * Returns all bodies in the given composite, including all bodies in its children, recursively. + * @method allBodies + * @param {composite} composite + * @return {body[]} All the bodies + */ + Composite.allBodies = function(composite) { + var bodies = [].concat(composite.bodies); + + for (var i = 0; i < composite.composites.length; i++) + bodies = bodies.concat(Composite.allBodies(composite.composites[i])); + + return bodies; + }; + + /** + * Returns all constraints in the given composite, including all constraints in its children, recursively. + * @method allConstraints + * @param {composite} composite + * @return {constraint[]} All the constraints + */ + Composite.allConstraints = function(composite) { + var constraints = [].concat(composite.constraints); + + for (var i = 0; i < composite.composites.length; i++) + constraints = constraints.concat(Composite.allConstraints(composite.composites[i])); + + return constraints; + }; + + /** + * Returns all composites in the given composite, including all composites in its children, recursively. + * @method allComposites + * @param {composite} composite + * @return {composite[]} All the composites + */ + Composite.allComposites = function(composite) { + var composites = [].concat(composite.composites); + + for (var i = 0; i < composite.composites.length; i++) + composites = composites.concat(Composite.allComposites(composite.composites[i])); + + return composites; + }; + + /** + * Searches the composite recursively for an object matching the type and id supplied, null if not found. + * @method get + * @param {composite} composite + * @param {number} id + * @param {string} type + * @return {object} The requested object, if found + */ + Composite.get = function(composite, id, type) { + var objects, + object; + + switch (type) { + case 'body': + objects = Composite.allBodies(composite); + break; + case 'constraint': + objects = Composite.allConstraints(composite); + break; + case 'composite': + objects = Composite.allComposites(composite).concat(composite); + break; + } + + if (!objects) + return null; + + object = objects.filter(function(object) { + return object.id.toString() === id.toString(); + }); + + return object.length === 0 ? null : object[0]; + }; + + /** + * Moves the given object(s) from compositeA to compositeB (equal to a remove followed by an add). + * @method move + * @param {compositeA} compositeA + * @param {object[]} objects + * @param {compositeB} compositeB + * @return {composite} Returns compositeA + */ + Composite.move = function(compositeA, objects, compositeB) { + Composite.remove(compositeA, objects); + Composite.add(compositeB, objects); + return compositeA; + }; + + /** + * Assigns new ids for all objects in the composite, recursively. + * @method rebase + * @param {composite} composite + * @return {composite} Returns composite + */ + Composite.rebase = function(composite) { + var objects = Composite.allBodies(composite) + .concat(Composite.allConstraints(composite)) + .concat(Composite.allComposites(composite)); + + for (var i = 0; i < objects.length; i++) { + objects[i].id = Common.nextId(); + } + + Composite.setModified(composite, true, true, false); + + return composite; + }; + + /** + * Translates all children in the composite by a given vector relative to their current positions, + * without imparting any velocity. + * @method translate + * @param {composite} composite + * @param {vector} translation + * @param {bool} [recursive=true] + */ + Composite.translate = function(composite, translation, recursive) { + var bodies = recursive ? Composite.allBodies(composite) : composite.bodies; + + for (var i = 0; i < bodies.length; i++) { + Body.translate(bodies[i], translation); + } + + Composite.setModified(composite, true, true, false); + + return composite; + }; + + /** + * Rotates all children in the composite by a given angle about the given point, without imparting any angular velocity. + * @method rotate + * @param {composite} composite + * @param {number} rotation + * @param {vector} point + * @param {bool} [recursive=true] + */ + Composite.rotate = function(composite, rotation, point, recursive) { + var cos = Math.cos(rotation), + sin = Math.sin(rotation), + bodies = recursive ? Composite.allBodies(composite) : composite.bodies; + + for (var i = 0; i < bodies.length; i++) { + var body = bodies[i], + dx = body.position.x - point.x, + dy = body.position.y - point.y; + + Body.setPosition(body, { + x: point.x + (dx * cos - dy * sin), + y: point.y + (dx * sin + dy * cos) + }); + + Body.rotate(body, rotation); + } + + Composite.setModified(composite, true, true, false); + + return composite; + }; + + /** + * Scales all children in the composite, including updating physical properties (mass, area, axes, inertia), from a world-space point. + * @method scale + * @param {composite} composite + * @param {number} scaleX + * @param {number} scaleY + * @param {vector} point + * @param {bool} [recursive=true] + */ + Composite.scale = function(composite, scaleX, scaleY, point, recursive) { + var bodies = recursive ? Composite.allBodies(composite) : composite.bodies; + + for (var i = 0; i < bodies.length; i++) { + var body = bodies[i], + dx = body.position.x - point.x, + dy = body.position.y - point.y; + + Body.setPosition(body, { + x: point.x + dx * scaleX, + y: point.y + dy * scaleY + }); + + Body.scale(body, scaleX, scaleY); + } + + Composite.setModified(composite, true, true, false); + + return composite; + }; + + /** + * Returns the union of the bounds of all of the composite's bodies. + * @method bounds + * @param {composite} composite The composite. + * @returns {bounds} The composite bounds. + */ + Composite.bounds = function(composite) { + var bodies = Composite.allBodies(composite), + vertices = []; + + for (var i = 0; i < bodies.length; i += 1) { + var body = bodies[i]; + vertices.push(body.bounds.min, body.bounds.max); + } + + return Bounds.create(vertices); + }; + + /* + * + * Events Documentation + * + */ + + /** + * Fired when a call to `Composite.add` is made, before objects have been added. + * + * @event beforeAdd + * @param {} event An event object + * @param {} event.object The object(s) to be added (may be a single body, constraint, composite or a mixed array of these) + * @param {} event.source The source object of the event + * @param {} event.name The name of the event + */ + + /** + * Fired when a call to `Composite.add` is made, after objects have been added. + * + * @event afterAdd + * @param {} event An event object + * @param {} event.object The object(s) that have been added (may be a single body, constraint, composite or a mixed array of these) + * @param {} event.source The source object of the event + * @param {} event.name The name of the event + */ + + /** + * Fired when a call to `Composite.remove` is made, before objects have been removed. + * + * @event beforeRemove + * @param {} event An event object + * @param {} event.object The object(s) to be removed (may be a single body, constraint, composite or a mixed array of these) + * @param {} event.source The source object of the event + * @param {} event.name The name of the event + */ + + /** + * Fired when a call to `Composite.remove` is made, after objects have been removed. + * + * @event afterRemove + * @param {} event An event object + * @param {} event.object The object(s) that have been removed (may be a single body, constraint, composite or a mixed array of these) + * @param {} event.source The source object of the event + * @param {} event.name The name of the event + */ + + /* + * + * Properties Documentation + * + */ + + /** + * An integer `Number` uniquely identifying number generated in `Composite.create` by `Common.nextId`. + * + * @property id + * @type number + */ + + /** + * A `String` denoting the type of object. + * + * @property type + * @type string + * @default "composite" + * @readOnly + */ + + /** + * An arbitrary `String` name to help the user identify and manage composites. + * + * @property label + * @type string + * @default "Composite" + */ + + /** + * A flag that specifies whether the composite has been modified during the current step. + * Most `Matter.Composite` methods will automatically set this flag to `true` to inform the engine of changes to be handled. + * If you need to change it manually, you should use the `Composite.setModified` method. + * + * @property isModified + * @type boolean + * @default false + */ + + /** + * The `Composite` that is the parent of this composite. It is automatically managed by the `Matter.Composite` methods. + * + * @property parent + * @type composite + * @default null + */ + + /** + * An array of `Body` that are _direct_ children of this composite. + * To add or remove bodies you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property. + * If you wish to recursively find all descendants, you should use the `Composite.allBodies` method. + * + * @property bodies + * @type body[] + * @default [] + */ + + /** + * An array of `Constraint` that are _direct_ children of this composite. + * To add or remove constraints you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property. + * If you wish to recursively find all descendants, you should use the `Composite.allConstraints` method. + * + * @property constraints + * @type constraint[] + * @default [] + */ + + /** + * An array of `Composite` that are _direct_ children of this composite. + * To add or remove composites you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property. + * If you wish to recursively find all descendants, you should use the `Composite.allComposites` method. + * + * @property composites + * @type composite[] + * @default [] + */ + + /** + * An object reserved for storing plugin-specific properties. + * + * @property plugin + * @type {} + */ + +})(); + + +/***/ }), +/* 146 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30170,12 +31155,12 @@ module.exports = CircumferencePoint; /***/ }), -/* 145 */ +/* 147 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30214,21 +31199,21 @@ module.exports = Random; /***/ }), -/* 146 */ +/* 148 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(23); +var Clamp = __webpack_require__(22); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(109); -var FindClosestInSorted = __webpack_require__(253); -var Frame = __webpack_require__(254); +var Events = __webpack_require__(111); +var FindClosestInSorted = __webpack_require__(267); +var Frame = __webpack_require__(268); var GetValue = __webpack_require__(6); /** @@ -31167,16 +32152,16 @@ module.exports = Animation; /***/ }), -/* 147 */ +/* 149 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Perimeter = __webpack_require__(110); +var Perimeter = __webpack_require__(112); var Point = __webpack_require__(4); /** @@ -31244,16 +32229,16 @@ module.exports = GetPoint; /***/ }), -/* 148 */ +/* 150 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(56); +var Length = __webpack_require__(57); var Point = __webpack_require__(4); /** @@ -31309,12 +32294,12 @@ module.exports = GetPoints; /***/ }), -/* 149 */ +/* 151 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31349,12 +32334,12 @@ module.exports = Random; /***/ }), -/* 150 */ +/* 152 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31387,12 +32372,12 @@ module.exports = Random; /***/ }), -/* 151 */ +/* 153 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31516,12 +32501,12 @@ module.exports = Pipeline; /***/ }), -/* 152 */ +/* 154 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31557,12 +32542,12 @@ module.exports = Random; /***/ }), -/* 153 */ +/* 155 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31613,12 +32598,12 @@ module.exports = Random; /***/ }), -/* 154 */ +/* 156 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31650,12 +32635,12 @@ module.exports = RotateAroundDistance; /***/ }), -/* 155 */ +/* 157 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31689,12 +32674,12 @@ module.exports = SmootherStep; /***/ }), -/* 156 */ +/* 158 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31736,12 +32721,12 @@ module.exports = SmoothStep; /***/ }), -/* 157 */ +/* 159 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32109,12 +33094,12 @@ module.exports = Map; /***/ }), -/* 158 */ +/* 160 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32185,19 +33170,19 @@ module.exports = Pad; /***/ }), -/* 159 */ +/* 161 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HexStringToColor = __webpack_require__(277); -var IntegerToColor = __webpack_require__(280); -var ObjectToColor = __webpack_require__(282); -var RGBStringToColor = __webpack_require__(283); +var HexStringToColor = __webpack_require__(291); +var IntegerToColor = __webpack_require__(294); +var ObjectToColor = __webpack_require__(296); +var RGBStringToColor = __webpack_require__(297); /** * Converts the given source color value into an instance of a Color class. @@ -32241,12 +33226,12 @@ module.exports = ValueToColor; /***/ }), -/* 160 */ +/* 162 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32271,16 +33256,16 @@ module.exports = GetColor; /***/ }), -/* 161 */ +/* 163 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetColor = __webpack_require__(160); +var GetColor = __webpack_require__(162); /** * Converts an HSV (hue, saturation and value) color value to RGB. @@ -32372,12 +33357,12 @@ module.exports = HSVToRGB; /***/ }), -/* 162 */ +/* 164 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32504,12 +33489,12 @@ module.exports = Smoothing(); /***/ }), -/* 163 */ +/* 165 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32541,27 +33526,27 @@ module.exports = CenterOn; /***/ }), -/* 164 */ +/* 166 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Back = __webpack_require__(285); -var Bounce = __webpack_require__(286); -var Circular = __webpack_require__(287); -var Cubic = __webpack_require__(288); -var Elastic = __webpack_require__(289); -var Expo = __webpack_require__(290); -var Linear = __webpack_require__(291); -var Quadratic = __webpack_require__(292); -var Quartic = __webpack_require__(293); -var Quintic = __webpack_require__(294); -var Sine = __webpack_require__(295); -var Stepped = __webpack_require__(296); +var Back = __webpack_require__(299); +var Bounce = __webpack_require__(300); +var Circular = __webpack_require__(301); +var Cubic = __webpack_require__(302); +var Elastic = __webpack_require__(303); +var Expo = __webpack_require__(304); +var Linear = __webpack_require__(305); +var Quadratic = __webpack_require__(306); +var Quartic = __webpack_require__(307); +var Quintic = __webpack_require__(308); +var Sine = __webpack_require__(309); +var Stepped = __webpack_require__(310); // EaseMap module.exports = { @@ -32622,17 +33607,17 @@ module.exports = { /***/ }), -/* 165 */ +/* 167 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(114); -var Browser = __webpack_require__(115); +var OS = __webpack_require__(116); +var Browser = __webpack_require__(117); var CanvasPool = __webpack_require__(26); /** @@ -32814,12 +33799,12 @@ module.exports = init(); /***/ }), -/* 166 */ +/* 168 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32833,62 +33818,62 @@ var Extend = __webpack_require__(17); var PhaserMath = { // Collections of functions - Angle: __webpack_require__(706), - Distance: __webpack_require__(714), - Easing: __webpack_require__(716), - Fuzzy: __webpack_require__(717), - Interpolation: __webpack_require__(720), - Pow2: __webpack_require__(725), - Snap: __webpack_require__(727), + Angle: __webpack_require__(725), + Distance: __webpack_require__(733), + Easing: __webpack_require__(739), + Fuzzy: __webpack_require__(740), + Interpolation: __webpack_require__(743), + Pow2: __webpack_require__(748), + Snap: __webpack_require__(750), // Expose the RNG Class - RandomDataGenerator: __webpack_require__(729), + RandomDataGenerator: __webpack_require__(752), // Single functions - Average: __webpack_require__(730), - Bernstein: __webpack_require__(305), - Between: __webpack_require__(169), - CatmullRom: __webpack_require__(168), - CeilTo: __webpack_require__(731), - Clamp: __webpack_require__(23), + Average: __webpack_require__(753), + Bernstein: __webpack_require__(319), + Between: __webpack_require__(170), + CatmullRom: __webpack_require__(169), + CeilTo: __webpack_require__(754), + Clamp: __webpack_require__(22), DegToRad: __webpack_require__(35), - Difference: __webpack_require__(732), - Factorial: __webpack_require__(306), - FloatBetween: __webpack_require__(312), - FloorTo: __webpack_require__(733), + Difference: __webpack_require__(755), + Factorial: __webpack_require__(320), + FloatBetween: __webpack_require__(326), + FloorTo: __webpack_require__(756), FromPercent: __webpack_require__(87), - GetSpeed: __webpack_require__(734), - IsEven: __webpack_require__(735), - IsEvenStrict: __webpack_require__(736), - Linear: __webpack_require__(113), - MaxAdd: __webpack_require__(737), - MinSub: __webpack_require__(738), - Percent: __webpack_require__(739), - RadToDeg: __webpack_require__(170), - RandomXY: __webpack_require__(740), - RandomXYZ: __webpack_require__(741), - RandomXYZW: __webpack_require__(742), - Rotate: __webpack_require__(313), - RotateAround: __webpack_require__(259), - RotateAroundDistance: __webpack_require__(154), - RoundAwayFromZero: __webpack_require__(314), - RoundTo: __webpack_require__(743), - SinCosTableGenerator: __webpack_require__(744), - SmootherStep: __webpack_require__(155), - SmoothStep: __webpack_require__(156), - ToXY: __webpack_require__(745), - TransformXY: __webpack_require__(315), - Within: __webpack_require__(746), - Wrap: __webpack_require__(57), + GetSpeed: __webpack_require__(757), + IsEven: __webpack_require__(758), + IsEvenStrict: __webpack_require__(759), + Linear: __webpack_require__(115), + MaxAdd: __webpack_require__(760), + MinSub: __webpack_require__(761), + Percent: __webpack_require__(762), + RadToDeg: __webpack_require__(171), + RandomXY: __webpack_require__(763), + RandomXYZ: __webpack_require__(764), + RandomXYZW: __webpack_require__(765), + Rotate: __webpack_require__(327), + RotateAround: __webpack_require__(273), + RotateAroundDistance: __webpack_require__(156), + RoundAwayFromZero: __webpack_require__(328), + RoundTo: __webpack_require__(766), + SinCosTableGenerator: __webpack_require__(767), + SmootherStep: __webpack_require__(157), + SmoothStep: __webpack_require__(158), + ToXY: __webpack_require__(768), + TransformXY: __webpack_require__(329), + Within: __webpack_require__(769), + Wrap: __webpack_require__(58), // Vector classes Vector2: __webpack_require__(3), - Vector3: __webpack_require__(171), - Vector4: __webpack_require__(316), - Matrix3: __webpack_require__(317), - Matrix4: __webpack_require__(318), - Quaternion: __webpack_require__(319), - RotateVec3: __webpack_require__(747) + Vector3: __webpack_require__(172), + Vector4: __webpack_require__(330), + Matrix3: __webpack_require__(331), + Matrix4: __webpack_require__(332), + Quaternion: __webpack_require__(333), + RotateVec3: __webpack_require__(770) }; @@ -32902,46 +33887,12 @@ module.exports = PhaserMath; /***/ }), -/* 167 */ +/* 169 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Check whether the given values are fuzzily equal. - * - * Two numbers are fuzzily equal if their difference is less than `epsilon`. - * - * @function Phaser.Math.Fuzzy.Equal - * @since 3.0.0 - * - * @param {number} a - The first value. - * @param {number} b - The second value. - * @param {number} [epsilon=0.0001] - The epsilon. - * - * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`. - */ -var Equal = function (a, b, epsilon) -{ - if (epsilon === undefined) { epsilon = 0.0001; } - - return Math.abs(a - b) < epsilon; -}; - -module.exports = Equal; - - -/***/ }), -/* 168 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32973,12 +33924,12 @@ module.exports = CatmullRom; /***/ }), -/* 169 */ +/* 170 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -33002,12 +33953,12 @@ module.exports = Between; /***/ }), -/* 170 */ +/* 171 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -33032,12 +33983,12 @@ module.exports = RadToDeg; /***/ }), -/* 171 */ +/* 172 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -33842,12 +34793,12 @@ module.exports = Vector3; /***/ }), -/* 172 */ +/* 173 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -33943,12 +34894,12 @@ module.exports = DefaultPlugins; /***/ }), -/* 173 */ +/* 174 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34029,21 +34980,21 @@ module.exports = FromPoints; /***/ }), -/* 174 */ +/* 175 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var CONST = { - CENTER: __webpack_require__(339), - ORIENTATION: __webpack_require__(340), - SCALE_MODE: __webpack_require__(341), - ZOOM: __webpack_require__(342) + CENTER: __webpack_require__(353), + ORIENTATION: __webpack_require__(354), + SCALE_MODE: __webpack_require__(355), + ZOOM: __webpack_require__(356) }; @@ -34051,12 +35002,12 @@ module.exports = CONST; /***/ }), -/* 175 */ +/* 176 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34080,12 +35031,12 @@ module.exports = RemoveFromDOM; /***/ }), -/* 176 */ +/* 177 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34178,23 +35129,23 @@ module.exports = INPUT_CONST; /***/ }), -/* 177 */ +/* 178 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(121); -var DefaultPlugins = __webpack_require__(172); -var Events = __webpack_require__(22); -var GetPhysicsPlugins = __webpack_require__(860); -var GetScenePlugins = __webpack_require__(861); +var CONST = __webpack_require__(123); +var DefaultPlugins = __webpack_require__(173); +var Events = __webpack_require__(19); +var GetPhysicsPlugins = __webpack_require__(871); +var GetScenePlugins = __webpack_require__(872); var NOOP = __webpack_require__(1); -var Settings = __webpack_require__(355); +var Settings = __webpack_require__(369); /** * @classdesc @@ -34654,8 +35605,8 @@ var Systems = new Class({ /** * Send this Scene to sleep. * - * A sleeping Scene doesn't run it's update step or render anything, but it also isn't shut down - * or have any of its systems or children removed, meaning it can be re-activated at any point and + * A sleeping Scene doesn't run its update step or render anything, but it also isn't shut down + * or has any of its systems or children removed, meaning it can be re-activated at any point and * will carry on from where it left off. It also keeps everything in memory and events and callbacks * from other Scenes may still invoke changes within it, so be careful what is left active. * @@ -34709,6 +35660,22 @@ var Systems = new Class({ return this; }, + /** + * Returns any data that was sent to this Scene by another Scene. + * + * The data is also passed to `Scene.init` and in various Scene events, but + * you can access it at any point via this method. + * + * @method Phaser.Scenes.Systems#getData + * @since 3.22.0 + * + * @return {any} + */ + getData: function () + { + return this.settings.data; + }, + /** * Is this Scene sleeping? * @@ -34936,12 +35903,12 @@ module.exports = Systems; /***/ }), -/* 178 */ +/* 179 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34973,18 +35940,18 @@ module.exports = UppercaseFirst; /***/ }), -/* 179 */ +/* 180 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Frame = __webpack_require__(94); -var TextureSource = __webpack_require__(358); +var TextureSource = __webpack_require__(372); var TEXTURE_MISSING_ERROR = 'Texture.frame missing: '; @@ -35493,12 +36460,12 @@ module.exports = Texture; /***/ }), -/* 180 */ +/* 181 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -35508,50 +36475,50 @@ module.exports = Texture; module.exports = { - Matrix: __webpack_require__(896), + Matrix: __webpack_require__(907), - Add: __webpack_require__(903), - AddAt: __webpack_require__(904), - BringToTop: __webpack_require__(905), - CountAllMatching: __webpack_require__(906), - Each: __webpack_require__(907), - EachInRange: __webpack_require__(908), - FindClosestInSorted: __webpack_require__(253), - GetAll: __webpack_require__(909), - GetFirst: __webpack_require__(910), - GetRandom: __webpack_require__(182), - MoveDown: __webpack_require__(911), - MoveTo: __webpack_require__(912), - MoveUp: __webpack_require__(913), - NumberArray: __webpack_require__(914), - NumberArrayStep: __webpack_require__(915), - QuickSelect: __webpack_require__(369), - Range: __webpack_require__(370), - Remove: __webpack_require__(119), - RemoveAt: __webpack_require__(916), - RemoveBetween: __webpack_require__(917), - RemoveRandomElement: __webpack_require__(918), - Replace: __webpack_require__(919), - RotateLeft: __webpack_require__(269), - RotateRight: __webpack_require__(270), + Add: __webpack_require__(914), + AddAt: __webpack_require__(915), + BringToTop: __webpack_require__(916), + CountAllMatching: __webpack_require__(917), + Each: __webpack_require__(918), + EachInRange: __webpack_require__(919), + FindClosestInSorted: __webpack_require__(267), + GetAll: __webpack_require__(920), + GetFirst: __webpack_require__(921), + GetRandom: __webpack_require__(183), + MoveDown: __webpack_require__(922), + MoveTo: __webpack_require__(923), + MoveUp: __webpack_require__(924), + NumberArray: __webpack_require__(925), + NumberArrayStep: __webpack_require__(926), + QuickSelect: __webpack_require__(383), + Range: __webpack_require__(384), + Remove: __webpack_require__(121), + RemoveAt: __webpack_require__(927), + RemoveBetween: __webpack_require__(928), + RemoveRandomElement: __webpack_require__(929), + Replace: __webpack_require__(930), + RotateLeft: __webpack_require__(283), + RotateRight: __webpack_require__(284), SafeRange: __webpack_require__(68), - SendToBack: __webpack_require__(920), - SetAll: __webpack_require__(921), - Shuffle: __webpack_require__(112), + SendToBack: __webpack_require__(931), + SetAll: __webpack_require__(932), + Shuffle: __webpack_require__(114), SpliceOne: __webpack_require__(79), - StableSort: __webpack_require__(126), - Swap: __webpack_require__(922) + StableSort: __webpack_require__(128), + Swap: __webpack_require__(933) }; /***/ }), -/* 181 */ +/* 182 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -35607,12 +36574,12 @@ module.exports = CheckMatrix; /***/ }), -/* 182 */ +/* 183 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -35642,18 +36609,18 @@ module.exports = GetRandom; /***/ }), -/* 183 */ +/* 184 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(924); +var Events = __webpack_require__(935); /** * @classdesc @@ -35933,12 +36900,12 @@ module.exports = ProcessQueue; /***/ }), -/* 184 */ +/* 185 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -36072,22 +37039,22 @@ module.exports = ParseXMLBitmapFont; /***/ }), -/* 185 */ +/* 186 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlitterRender = __webpack_require__(932); -var Bob = __webpack_require__(935); +var BlitterRender = __webpack_require__(943); +var Bob = __webpack_require__(946); var Class = __webpack_require__(0); var Components = __webpack_require__(12); var Frame = __webpack_require__(94); var GameObject = __webpack_require__(14); -var List = __webpack_require__(124); +var List = __webpack_require__(126); /** * @callback CreateCallback @@ -36371,25 +37338,25 @@ module.exports = Blitter; /***/ }), -/* 186 */ +/* 187 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayUtils = __webpack_require__(180); +var ArrayUtils = __webpack_require__(181); var BlendModes = __webpack_require__(52); var Class = __webpack_require__(0); var Components = __webpack_require__(12); var Events = __webpack_require__(90); var GameObject = __webpack_require__(14); var Rectangle = __webpack_require__(11); -var Render = __webpack_require__(936); -var Union = __webpack_require__(372); +var Render = __webpack_require__(947); +var Union = __webpack_require__(386); var Vector2 = __webpack_require__(3); /** @@ -36434,7 +37401,7 @@ var Vector2 = __webpack_require__(3); * @constructor * @since 3.4.0 * - * @extends Phaser.GameObjects.Components.Alpha + * @extends Phaser.GameObjects.Components.AlphaSingle * @extends Phaser.GameObjects.Components.BlendMode * @extends Phaser.GameObjects.Components.ComputedSize * @extends Phaser.GameObjects.Components.Depth @@ -36452,7 +37419,7 @@ var Container = new Class({ Extends: GameObject, Mixins: [ - Components.Alpha, + Components.AlphaSingle, Components.BlendMode, Components.ComputedSize, Components.Depth, @@ -37696,18 +38663,18 @@ module.exports = Container; /***/ }), -/* 187 */ +/* 188 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(127); +var BitmapText = __webpack_require__(129); var Class = __webpack_require__(0); -var Render = __webpack_require__(941); +var Render = __webpack_require__(952); /** * @classdesc @@ -37929,26 +38896,26 @@ module.exports = DynamicBitmapText; /***/ }), -/* 188 */ +/* 189 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BaseCamera = __webpack_require__(91); var Class = __webpack_require__(0); -var Commands = __webpack_require__(189); -var ComponentsAlpha = __webpack_require__(252); -var ComponentsBlendMode = __webpack_require__(255); -var ComponentsDepth = __webpack_require__(256); -var ComponentsMask = __webpack_require__(260); -var ComponentsPipeline = __webpack_require__(151); -var ComponentsTransform = __webpack_require__(265); -var ComponentsVisible = __webpack_require__(266); -var ComponentsScrollFactor = __webpack_require__(263); +var Commands = __webpack_require__(190); +var ComponentsAlpha = __webpack_require__(266); +var ComponentsBlendMode = __webpack_require__(269); +var ComponentsDepth = __webpack_require__(270); +var ComponentsMask = __webpack_require__(274); +var ComponentsPipeline = __webpack_require__(153); +var ComponentsTransform = __webpack_require__(279); +var ComponentsVisible = __webpack_require__(280); +var ComponentsScrollFactor = __webpack_require__(277); var TransformMatrix = __webpack_require__(32); @@ -37957,7 +38924,7 @@ var GameObject = __webpack_require__(14); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); var MATH_CONST = __webpack_require__(13); -var Render = __webpack_require__(947); +var Render = __webpack_require__(958); /** * @classdesc @@ -38006,7 +38973,7 @@ var Render = __webpack_require__(947); * @constructor * @since 3.0.0 * - * @extends Phaser.GameObjects.Components.Alpha + * @extends Phaser.GameObjects.Components.AlphaSingle * @extends Phaser.GameObjects.Components.BlendMode * @extends Phaser.GameObjects.Components.Depth * @extends Phaser.GameObjects.Components.Mask @@ -39479,12 +40446,12 @@ module.exports = Graphics; /***/ }), -/* 189 */ +/* 190 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -39516,12 +40483,12 @@ module.exports = { /***/ }), -/* 190 */ +/* 191 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -39558,22 +40525,22 @@ module.exports = CircumferencePoint; /***/ }), -/* 191 */ +/* 192 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var GravityWell = __webpack_require__(380); -var List = __webpack_require__(124); -var ParticleEmitter = __webpack_require__(382); -var Render = __webpack_require__(957); +var GravityWell = __webpack_require__(394); +var List = __webpack_require__(126); +var ParticleEmitter = __webpack_require__(396); +var Render = __webpack_require__(968); /** * @classdesc @@ -39840,6 +40807,21 @@ var ParticleEmitterManager = new Class({ return this.addEmitter(new ParticleEmitter(this, config)); }, + /** + * Removes a Particle Emitter from this Emitter Manager, if the Emitter belongs to this Manager. + * + * @method Phaser.GameObjects.Particles.ParticleEmitterManager#removeEmitter + * @since 3.22.0 + * + * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter + * + * @return {?Phaser.GameObjects.Particles.ParticleEmitter} The Particle Emitter if it was removed or null if it was not. + */ + removeEmitter: function (emitter) + { + return this.emitters.remove(emitter, true); + }, + /** * Adds an existing Gravity Well object to this Emitter Manager. * @@ -40032,12 +41014,12 @@ module.exports = ParticleEmitterManager; /***/ }), -/* 192 */ +/* 193 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -40049,9 +41031,9 @@ var Components = __webpack_require__(12); var CONST = __webpack_require__(29); var Frame = __webpack_require__(94); var GameObject = __webpack_require__(14); -var Render = __webpack_require__(961); +var Render = __webpack_require__(972); var Utils = __webpack_require__(10); -var UUID = __webpack_require__(193); +var UUID = __webpack_require__(194); /** * @classdesc @@ -40075,6 +41057,7 @@ var UUID = __webpack_require__(193); * @extends Phaser.GameObjects.Components.Alpha * @extends Phaser.GameObjects.Components.BlendMode * @extends Phaser.GameObjects.Components.ComputedSize + * @extends Phaser.GameObjects.Components.Crop * @extends Phaser.GameObjects.Components.Depth * @extends Phaser.GameObjects.Components.Flip * @extends Phaser.GameObjects.Components.GetBounds @@ -41270,12 +42253,12 @@ module.exports = RenderTexture; /***/ }), -/* 193 */ +/* 194 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -41305,26 +42288,26 @@ module.exports = UUID; /***/ }), -/* 194 */ +/* 195 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(118); +var AddToDOM = __webpack_require__(120); var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameEvents = __webpack_require__(18); var GameObject = __webpack_require__(14); -var GetTextSize = __webpack_require__(967); +var GetTextSize = __webpack_require__(978); var GetValue = __webpack_require__(6); -var RemoveFromDOM = __webpack_require__(175); -var TextRender = __webpack_require__(968); -var TextStyle = __webpack_require__(971); +var RemoveFromDOM = __webpack_require__(176); +var TextRender = __webpack_require__(979); +var TextStyle = __webpack_require__(982); /** * @classdesc @@ -41595,7 +42578,7 @@ var Text = new Class({ if (style && style.lineSpacing) { - this.lineSpacing = style.lineSpacing; + this.setLineSpacing(style.lineSpacing); } scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function () @@ -41818,16 +42801,20 @@ var Text = new Class({ { var result = ''; var lines = text.split(this.splitRegExp); + var lastLineIndex = lines.length - 1; + var whiteSpaceWidth = context.measureText(' ').width; - for (var i = 0; i < lines.length; i++) + for (var i = 0; i <= lastLineIndex; i++) { var spaceLeft = wordWrapWidth; var words = lines[i].split(' '); + var lastWordIndex = words.length - 1; - for (var j = 0; j < words.length; j++) + for (var j = 0; j <= lastWordIndex; j++) { - var wordWidth = context.measureText(words[j]).width; - var wordWidthWithSpace = wordWidth + context.measureText(' ').width; + var word = words[j]; + var wordWidth = context.measureText(word).width; + var wordWidthWithSpace = wordWidth + whiteSpaceWidth; if (wordWidthWithSpace > spaceLeft) { @@ -41836,24 +42823,24 @@ var Text = new Class({ if (j > 0) { result += '\n'; + spaceLeft = wordWrapWidth; } + } - result += words[j] + ' '; - spaceLeft = wordWrapWidth - wordWidthWithSpace; + result += word; + + if (j < lastWordIndex) + { + result += ' '; + spaceLeft -= wordWidthWithSpace; } else { - spaceLeft -= wordWidthWithSpace; - result += words[j]; - - if (j < (words.length - 1)) - { - result += ' '; - } + spaceLeft -= wordWidth; } } - if (i < lines.length - 1) + if (i < lastLineIndex) { result += '\n'; } @@ -42710,12 +43697,12 @@ module.exports = Text; /***/ }), -/* 195 */ +/* 196 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -42724,9 +43711,9 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameEvents = __webpack_require__(18); var GameObject = __webpack_require__(14); -var GetPowerOfTwo = __webpack_require__(310); -var Smoothing = __webpack_require__(162); -var TileSpriteRender = __webpack_require__(973); +var GetPowerOfTwo = __webpack_require__(324); +var Smoothing = __webpack_require__(164); +var TileSpriteRender = __webpack_require__(984); var Vector2 = __webpack_require__(3); // bitmask flag for GameObject.renderMask @@ -43362,24 +44349,24 @@ module.exports = TileSprite; /***/ }), -/* 196 */ +/* 197 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Clamp = __webpack_require__(23); +var Clamp = __webpack_require__(22); var Components = __webpack_require__(12); var Events = __webpack_require__(90); var GameEvents = __webpack_require__(18); var GameObject = __webpack_require__(14); var SoundEvents = __webpack_require__(59); -var UUID = __webpack_require__(193); -var VideoRender = __webpack_require__(976); +var UUID = __webpack_require__(194); +var VideoRender = __webpack_require__(987); var MATH_CONST = __webpack_require__(13); /** @@ -45131,25 +46118,24 @@ module.exports = Video; /***/ }), -/* 197 */ +/* 198 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(198); -var GetPoints = __webpack_require__(397); +var Contains = __webpack_require__(199); +var GetPoints = __webpack_require__(411); var GEOM_CONST = __webpack_require__(46); /** * @classdesc * A Polygon object * - * The polygon is a closed shape consists of a series of connected straight lines defined by list of ordered points. * Several formats are supported to define the list of points, check the setTo method for details. * This is a geometry object allowing you to define and inspect the shape. @@ -45347,11 +46333,13 @@ var Polygon = new Class({ * @method Phaser.Geom.Polygon#getPoints * @since 3.12.0 * + * @generic {Phaser.Geom.Point[]} O - [output,$return] + * * @param {integer} quantity - The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead. * @param {number} [stepRate] - Sets the quantity by getting the perimeter of the Polygon and dividing it by the stepRate. - * @param {array} [output] - An array to insert the points in to. If not provided a new array will be created. + * @param {(array|Phaser.Geom.Point[])} [output] - An array to insert the points in to. If not provided a new array will be created. * - * @return {Phaser.Geom.Point[]} An array of Point objects pertaining to the points around the perimeter of the Polygon. + * @return {(array|Phaser.Geom.Point[])} An array of Point objects pertaining to the points around the perimeter of the Polygon. */ getPoints: function (quantity, step, output) { @@ -45364,12 +46352,12 @@ module.exports = Polygon; /***/ }), -/* 198 */ +/* 199 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45413,17 +46401,17 @@ module.exports = Contains; /***/ }), -/* 199 */ +/* 200 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Mesh = __webpack_require__(128); +var Mesh = __webpack_require__(130); /** * @classdesc @@ -46074,12 +47062,12 @@ module.exports = Quad; /***/ }), -/* 200 */ +/* 201 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -46088,8 +47076,8 @@ var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); var GetFastValue = __webpack_require__(2); var Extend = __webpack_require__(17); -var SetValue = __webpack_require__(405); -var ShaderRender = __webpack_require__(1057); +var SetValue = __webpack_require__(419); +var ShaderRender = __webpack_require__(1068); var TransformMatrix = __webpack_require__(32); /** @@ -47297,16 +48285,16 @@ module.exports = Shader; /***/ }), -/* 201 */ +/* 202 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DistanceBetween = __webpack_require__(58); +var DistanceBetween = __webpack_require__(53); /** * Checks if two Circles intersect. @@ -47328,12 +48316,12 @@ module.exports = CircleToCircle; /***/ }), -/* 202 */ +/* 203 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47382,18 +48370,18 @@ module.exports = CircleToRectangle; /***/ }), -/* 203 */ +/* 204 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Point = __webpack_require__(4); -var LineToCircle = __webpack_require__(204); +var LineToCircle = __webpack_require__(205); /** * Checks for intersection between the line segment and circle, @@ -47474,16 +48462,16 @@ module.exports = GetLineToCircle; /***/ }), -/* 204 */ +/* 205 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(54); +var Contains = __webpack_require__(55); var Point = __webpack_require__(4); var tmp = new Point(); @@ -47558,19 +48546,19 @@ module.exports = LineToCircle; /***/ }), -/* 205 */ +/* 206 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Point = __webpack_require__(4); var LineToLine = __webpack_require__(84); -var LineToRectangle = __webpack_require__(410); +var LineToRectangle = __webpack_require__(424); /** * Checks for intersection between the Line and a Rectangle shape, @@ -47618,12 +48606,12 @@ module.exports = GetLineToRectangle; /***/ }), -/* 206 */ +/* 207 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47705,12 +48693,12 @@ module.exports = ContainsArray; /***/ }), -/* 207 */ +/* 208 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47753,12 +48741,12 @@ module.exports = RotateAroundXY; /***/ }), -/* 208 */ +/* 209 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47781,12 +48769,12 @@ module.exports = GetAspectRatio; /***/ }), -/* 209 */ +/* 210 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47835,12 +48823,12 @@ module.exports = RotateAroundXY; /***/ }), -/* 210 */ +/* 211 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47850,28 +48838,28 @@ module.exports = RotateAroundXY; module.exports = { - BUTTON_DOWN: __webpack_require__(1178), - BUTTON_UP: __webpack_require__(1179), - CONNECTED: __webpack_require__(1180), - DISCONNECTED: __webpack_require__(1181), - GAMEPAD_BUTTON_DOWN: __webpack_require__(1182), - GAMEPAD_BUTTON_UP: __webpack_require__(1183) + BUTTON_DOWN: __webpack_require__(1189), + BUTTON_UP: __webpack_require__(1190), + CONNECTED: __webpack_require__(1191), + DISCONNECTED: __webpack_require__(1192), + GAMEPAD_BUTTON_DOWN: __webpack_require__(1193), + GAMEPAD_BUTTON_UP: __webpack_require__(1194) }; /***/ }), -/* 211 */ +/* 212 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Extend = __webpack_require__(17); -var XHRSettings = __webpack_require__(133); +var XHRSettings = __webpack_require__(135); /** * Takes two XHRSettings Objects and creates a new XHRSettings object from them. @@ -47909,22 +48897,22 @@ module.exports = MergeXHRSettings; /***/ }), -/* 212 */ +/* 213 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var File = __webpack_require__(20); +var CONST = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); -var ParseXML = __webpack_require__(344); +var ParseXML = __webpack_require__(358); /** * @classdesc @@ -48094,12 +49082,12 @@ module.exports = XMLFile; /***/ }), -/* 213 */ +/* 214 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -48109,46 +49097,18 @@ module.exports = XMLFile; module.exports = { - Acceleration: __webpack_require__(1238), - Angular: __webpack_require__(1239), - Bounce: __webpack_require__(1240), - Debug: __webpack_require__(1241), - Drag: __webpack_require__(1242), - Enable: __webpack_require__(1243), - Friction: __webpack_require__(1244), - Gravity: __webpack_require__(1245), - Immovable: __webpack_require__(1246), - Mass: __webpack_require__(1247), - Size: __webpack_require__(1248), - Velocity: __webpack_require__(1249) - -}; - - -/***/ }), -/* 214 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Physics.Arcade.Events - */ - -module.exports = { - - COLLIDE: __webpack_require__(1251), - OVERLAP: __webpack_require__(1252), - PAUSE: __webpack_require__(1253), - RESUME: __webpack_require__(1254), - TILE_COLLIDE: __webpack_require__(1255), - TILE_OVERLAP: __webpack_require__(1256), - WORLD_BOUNDS: __webpack_require__(1257), - WORLD_STEP: __webpack_require__(1258) + Acceleration: __webpack_require__(1249), + Angular: __webpack_require__(1250), + Bounce: __webpack_require__(1251), + Debug: __webpack_require__(1252), + Drag: __webpack_require__(1253), + Enable: __webpack_require__(1254), + Friction: __webpack_require__(1255), + Gravity: __webpack_require__(1256), + Immovable: __webpack_require__(1257), + Mass: __webpack_require__(1258), + Size: __webpack_require__(1259), + Velocity: __webpack_require__(1260) }; @@ -48158,604 +49118,365 @@ module.exports = { /***/ (function(module, exports, __webpack_require__) { /** -* The `Matter.Composite` module contains methods for creating and manipulating composite bodies. -* A composite body is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`, therefore composites form a tree structure. -* It is important to use the functions in this module to modify composites, rather than directly modifying their properties. -* Note that the `Matter.World` object is also a type of `Matter.Composite` and as such all composite methods here can also operate on a `Matter.World`. + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Physics.Arcade.Events + */ + +module.exports = { + + COLLIDE: __webpack_require__(1262), + OVERLAP: __webpack_require__(1263), + PAUSE: __webpack_require__(1264), + RESUME: __webpack_require__(1265), + TILE_COLLIDE: __webpack_require__(1266), + TILE_OVERLAP: __webpack_require__(1267), + WORLD_BOUNDS: __webpack_require__(1268), + WORLD_STEP: __webpack_require__(1269) + +}; + + +/***/ }), +/* 216 */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* The `Matter.Constraint` module contains methods for creating and manipulating constraints. +* Constraints are used for specifying that a fixed distance must be maintained between two bodies (or a body and a fixed world-space position). +* The stiffness of constraints can be modified to create springs or elastic. * * See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). * -* @class Composite +* @class Constraint */ -var Composite = {}; +var Constraint = {}; -module.exports = Composite; +module.exports = Constraint; -var Events = __webpack_require__(235); -var Common = __webpack_require__(37); +var Vertices = __webpack_require__(86); +var Vector = __webpack_require__(101); +var Sleeping = __webpack_require__(236); var Bounds = __webpack_require__(102); -var Body = __webpack_require__(62); +var Axes = __webpack_require__(507); +var Common = __webpack_require__(37); (function() { + Constraint._warming = 0.4; + Constraint._torqueDampen = 1; + Constraint._minLength = 0.000001; + /** - * Creates a new composite. The options parameter is an object that specifies any properties you wish to override the defaults. - * See the properites section below for detailed information on what you can pass via the `options` object. + * Creates a new constraint. + * All properties have default values, and many are pre-calculated automatically based on other properties. + * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` value (e.g. `0.7` or above). + * If the constraint is unstable, try lowering the `stiffness` value and / or increasing `engine.constraintIterations`. + * For compound bodies, constraints must be applied to the parent body (not one of its parts). + * See the properties section below for detailed information on what you can pass via the `options` object. * @method create - * @param {} [options] - * @return {composite} A new composite + * @param {} options + * @return {constraint} constraint */ - Composite.create = function(options) { - return Common.extend({ - id: Common.nextId(), - type: 'composite', - parent: null, - isModified: false, - bodies: [], - constraints: [], - composites: [], - label: 'Composite', - plugin: {} - }, options); + Constraint.create = function(options) { + var constraint = options; + + // if bodies defined but no points, use body centre + if (constraint.bodyA && !constraint.pointA) + constraint.pointA = { x: 0, y: 0 }; + if (constraint.bodyB && !constraint.pointB) + constraint.pointB = { x: 0, y: 0 }; + + // calculate static length using initial world space points + var initialPointA = constraint.bodyA ? Vector.add(constraint.bodyA.position, constraint.pointA) : constraint.pointA, + initialPointB = constraint.bodyB ? Vector.add(constraint.bodyB.position, constraint.pointB) : constraint.pointB, + length = Vector.magnitude(Vector.sub(initialPointA, initialPointB)); + + constraint.length = typeof constraint.length !== 'undefined' ? constraint.length : length; + + // option defaults + constraint.id = constraint.id || Common.nextId(); + constraint.label = constraint.label || 'Constraint'; + constraint.type = 'constraint'; + constraint.stiffness = constraint.stiffness || (constraint.length > 0 ? 1 : 0.7); + constraint.damping = constraint.damping || 0; + constraint.angularStiffness = constraint.angularStiffness || 0; + constraint.angleA = constraint.bodyA ? constraint.bodyA.angle : constraint.angleA; + constraint.angleB = constraint.bodyB ? constraint.bodyB.angle : constraint.angleB; + constraint.plugin = {}; + + // render + var render = { + visible: true, + type: 'line', + anchors: true, + lineColor: null, // custom Phaser property + lineOpacity: null, // custom Phaser property + lineThickness: null, // custom Phaser property + pinSize: null, // custom Phaser property + anchorColor: null, // custom Phaser property + anchorSize: null // custom Phaser property + }; + + if (constraint.length === 0 && constraint.stiffness > 0.1) { + render.type = 'pin'; + render.anchors = false; + } else if (constraint.stiffness < 0.9) { + render.type = 'spring'; + } + + constraint.render = Common.extend(render, constraint.render); + + return constraint; }; /** - * Sets the composite's `isModified` flag. - * If `updateParents` is true, all parents will be set (default: false). - * If `updateChildren` is true, all children will be set (default: false). - * @method setModified - * @param {composite} composite - * @param {boolean} isModified - * @param {boolean} [updateParents=false] - * @param {boolean} [updateChildren=false] + * Prepares for solving by constraint warming. + * @private + * @method preSolveAll + * @param {body[]} bodies */ - Composite.setModified = function(composite, isModified, updateParents, updateChildren) { - composite.isModified = isModified; + Constraint.preSolveAll = function(bodies) { + for (var i = 0; i < bodies.length; i += 1) { + var body = bodies[i], + impulse = body.constraintImpulse; - if (updateParents && composite.parent) { - Composite.setModified(composite.parent, isModified, updateParents, updateChildren); + if (body.isStatic || (impulse.x === 0 && impulse.y === 0 && impulse.angle === 0)) { + continue; + } + + body.position.x += impulse.x; + body.position.y += impulse.y; + body.angle += impulse.angle; + } + }; + + /** + * Solves all constraints in a list of collisions. + * @private + * @method solveAll + * @param {constraint[]} constraints + * @param {number} timeScale + */ + Constraint.solveAll = function(constraints, timeScale) { + // Solve fixed constraints first. + for (var i = 0; i < constraints.length; i += 1) { + var constraint = constraints[i], + fixedA = !constraint.bodyA || (constraint.bodyA && constraint.bodyA.isStatic), + fixedB = !constraint.bodyB || (constraint.bodyB && constraint.bodyB.isStatic); + + if (fixedA || fixedB) { + Constraint.solve(constraints[i], timeScale); + } } - if (updateChildren) { - for(var i = 0; i < composite.composites.length; i++) { - var childComposite = composite.composites[i]; - Composite.setModified(childComposite, isModified, updateParents, updateChildren); + // Solve free constraints last. + for (i = 0; i < constraints.length; i += 1) { + constraint = constraints[i]; + fixedA = !constraint.bodyA || (constraint.bodyA && constraint.bodyA.isStatic); + fixedB = !constraint.bodyB || (constraint.bodyB && constraint.bodyB.isStatic); + + if (!fixedA && !fixedB) { + Constraint.solve(constraints[i], timeScale); } } }; /** - * Generic add function. Adds one or many body(s), constraint(s) or a composite(s) to the given composite. - * Triggers `beforeAdd` and `afterAdd` events on the `composite`. - * @method add - * @param {composite} composite - * @param {} object - * @return {composite} The original composite with the objects added - */ - Composite.add = function(composite, object) { - var objects = [].concat(object); - - Events.trigger(composite, 'beforeAdd', { object: object }); - - for (var i = 0; i < objects.length; i++) { - var obj = objects[i]; - - switch (obj.type) { - - case 'body': - // skip adding compound parts - if (obj.parent !== obj) { - Common.warn('Composite.add: skipped adding a compound body part (you must add its parent instead)'); - break; - } - - Composite.addBody(composite, obj); - break; - case 'constraint': - Composite.addConstraint(composite, obj); - break; - case 'composite': - Composite.addComposite(composite, obj); - break; - case 'mouseConstraint': - Composite.addConstraint(composite, obj.constraint); - break; - - } - } - - Events.trigger(composite, 'afterAdd', { object: object }); - - return composite; - }; - - /** - * Generic remove function. Removes one or many body(s), constraint(s) or a composite(s) to the given composite. - * Optionally searching its children recursively. - * Triggers `beforeRemove` and `afterRemove` events on the `composite`. - * @method remove - * @param {composite} composite - * @param {} object - * @param {boolean} [deep=false] - * @return {composite} The original composite with the objects removed - */ - Composite.remove = function(composite, object, deep) { - var objects = [].concat(object); - - Events.trigger(composite, 'beforeRemove', { object: object }); - - for (var i = 0; i < objects.length; i++) { - var obj = objects[i]; - - switch (obj.type) { - - case 'body': - Composite.removeBody(composite, obj, deep); - break; - case 'constraint': - Composite.removeConstraint(composite, obj, deep); - break; - case 'composite': - Composite.removeComposite(composite, obj, deep); - break; - case 'mouseConstraint': - Composite.removeConstraint(composite, obj.constraint); - break; - - } - } - - Events.trigger(composite, 'afterRemove', { object: object }); - - return composite; - }; - - /** - * Adds a composite to the given composite. + * Solves a distance constraint with Gauss-Siedel method. * @private - * @method addComposite - * @param {composite} compositeA - * @param {composite} compositeB - * @return {composite} The original compositeA with the objects from compositeB added - */ - Composite.addComposite = function(compositeA, compositeB) { - compositeA.composites.push(compositeB); - compositeB.parent = compositeA; - Composite.setModified(compositeA, true, true, false); - return compositeA; - }; - - /** - * Removes a composite from the given composite, and optionally searching its children recursively. - * @private - * @method removeComposite - * @param {composite} compositeA - * @param {composite} compositeB - * @param {boolean} [deep=false] - * @return {composite} The original compositeA with the composite removed - */ - Composite.removeComposite = function(compositeA, compositeB, deep) { - var position = compositeA.composites.indexOf(compositeB); - if (position !== -1) { - Composite.removeCompositeAt(compositeA, position); - Composite.setModified(compositeA, true, true, false); - } - - if (deep) { - for (var i = 0; i < compositeA.composites.length; i++){ - Composite.removeComposite(compositeA.composites[i], compositeB, true); - } - } - - return compositeA; - }; - - /** - * Removes a composite from the given composite. - * @private - * @method removeCompositeAt - * @param {composite} composite - * @param {number} position - * @return {composite} The original composite with the composite removed - */ - Composite.removeCompositeAt = function(composite, position) { - composite.composites.splice(position, 1); - Composite.setModified(composite, true, true, false); - return composite; - }; - - /** - * Adds a body to the given composite. - * @private - * @method addBody - * @param {composite} composite - * @param {body} body - * @return {composite} The original composite with the body added - */ - Composite.addBody = function(composite, body) { - composite.bodies.push(body); - Composite.setModified(composite, true, true, false); - return composite; - }; - - /** - * Removes a body from the given composite, and optionally searching its children recursively. - * @private - * @method removeBody - * @param {composite} composite - * @param {body} body - * @param {boolean} [deep=false] - * @return {composite} The original composite with the body removed - */ - Composite.removeBody = function(composite, body, deep) { - var position = composite.bodies.indexOf(body); - if (position !== -1) { - Composite.removeBodyAt(composite, position); - Composite.setModified(composite, true, true, false); - } - - if (deep) { - for (var i = 0; i < composite.composites.length; i++){ - Composite.removeBody(composite.composites[i], body, true); - } - } - - return composite; - }; - - /** - * Removes a body from the given composite. - * @private - * @method removeBodyAt - * @param {composite} composite - * @param {number} position - * @return {composite} The original composite with the body removed - */ - Composite.removeBodyAt = function(composite, position) { - composite.bodies.splice(position, 1); - Composite.setModified(composite, true, true, false); - return composite; - }; - - /** - * Adds a constraint to the given composite. - * @private - * @method addConstraint - * @param {composite} composite + * @method solve * @param {constraint} constraint - * @return {composite} The original composite with the constraint added + * @param {number} timeScale */ - Composite.addConstraint = function(composite, constraint) { - composite.constraints.push(constraint); - Composite.setModified(composite, true, true, false); - return composite; - }; + Constraint.solve = function(constraint, timeScale) { + var bodyA = constraint.bodyA, + bodyB = constraint.bodyB, + pointA = constraint.pointA, + pointB = constraint.pointB; - /** - * Removes a constraint from the given composite, and optionally searching its children recursively. - * @private - * @method removeConstraint - * @param {composite} composite - * @param {constraint} constraint - * @param {boolean} [deep=false] - * @return {composite} The original composite with the constraint removed - */ - Composite.removeConstraint = function(composite, constraint, deep) { - var position = composite.constraints.indexOf(constraint); - if (position !== -1) { - Composite.removeConstraintAt(composite, position); - } + if (!bodyA && !bodyB) + return; - if (deep) { - for (var i = 0; i < composite.composites.length; i++){ - Composite.removeConstraint(composite.composites[i], constraint, true); - } - } - - return composite; - }; - - /** - * Removes a body from the given composite. - * @private - * @method removeConstraintAt - * @param {composite} composite - * @param {number} position - * @return {composite} The original composite with the constraint removed - */ - Composite.removeConstraintAt = function(composite, position) { - composite.constraints.splice(position, 1); - Composite.setModified(composite, true, true, false); - return composite; - }; - - /** - * Removes all bodies, constraints and composites from the given composite. - * Optionally clearing its children recursively. - * @method clear - * @param {composite} composite - * @param {boolean} keepStatic - * @param {boolean} [deep=false] - */ - Composite.clear = function(composite, keepStatic, deep) { - if (deep) { - for (var i = 0; i < composite.composites.length; i++){ - Composite.clear(composite.composites[i], keepStatic, true); - } + // update reference angle + if (bodyA && !bodyA.isStatic) { + Vector.rotate(pointA, bodyA.angle - constraint.angleA, pointA); + constraint.angleA = bodyA.angle; } - if (keepStatic) { - composite.bodies = composite.bodies.filter(function(body) { return body.isStatic; }); - } else { - composite.bodies.length = 0; + // update reference angle + if (bodyB && !bodyB.isStatic) { + Vector.rotate(pointB, bodyB.angle - constraint.angleB, pointB); + constraint.angleB = bodyB.angle; } - composite.constraints.length = 0; - composite.composites.length = 0; - Composite.setModified(composite, true, true, false); + var pointAWorld = pointA, + pointBWorld = pointB; - return composite; - }; + if (bodyA) pointAWorld = Vector.add(bodyA.position, pointA); + if (bodyB) pointBWorld = Vector.add(bodyB.position, pointB); - /** - * Returns all bodies in the given composite, including all bodies in its children, recursively. - * @method allBodies - * @param {composite} composite - * @return {body[]} All the bodies - */ - Composite.allBodies = function(composite) { - var bodies = [].concat(composite.bodies); + if (!pointAWorld || !pointBWorld) + return; - for (var i = 0; i < composite.composites.length; i++) - bodies = bodies.concat(Composite.allBodies(composite.composites[i])); + var delta = Vector.sub(pointAWorld, pointBWorld), + currentLength = Vector.magnitude(delta); - return bodies; - }; - - /** - * Returns all constraints in the given composite, including all constraints in its children, recursively. - * @method allConstraints - * @param {composite} composite - * @return {constraint[]} All the constraints - */ - Composite.allConstraints = function(composite) { - var constraints = [].concat(composite.constraints); - - for (var i = 0; i < composite.composites.length; i++) - constraints = constraints.concat(Composite.allConstraints(composite.composites[i])); - - return constraints; - }; - - /** - * Returns all composites in the given composite, including all composites in its children, recursively. - * @method allComposites - * @param {composite} composite - * @return {composite[]} All the composites - */ - Composite.allComposites = function(composite) { - var composites = [].concat(composite.composites); - - for (var i = 0; i < composite.composites.length; i++) - composites = composites.concat(Composite.allComposites(composite.composites[i])); - - return composites; - }; - - /** - * Searches the composite recursively for an object matching the type and id supplied, null if not found. - * @method get - * @param {composite} composite - * @param {number} id - * @param {string} type - * @return {object} The requested object, if found - */ - Composite.get = function(composite, id, type) { - var objects, - object; - - switch (type) { - case 'body': - objects = Composite.allBodies(composite); - break; - case 'constraint': - objects = Composite.allConstraints(composite); - break; - case 'composite': - objects = Composite.allComposites(composite).concat(composite); - break; + // prevent singularity + if (currentLength < Constraint._minLength) { + currentLength = Constraint._minLength; } - if (!objects) - return null; + // solve distance constraint with Gauss-Siedel method + var difference = (currentLength - constraint.length) / currentLength, + stiffness = constraint.stiffness < 1 ? constraint.stiffness * timeScale : constraint.stiffness, + force = Vector.mult(delta, difference * stiffness), + massTotal = (bodyA ? bodyA.inverseMass : 0) + (bodyB ? bodyB.inverseMass : 0), + inertiaTotal = (bodyA ? bodyA.inverseInertia : 0) + (bodyB ? bodyB.inverseInertia : 0), + resistanceTotal = massTotal + inertiaTotal, + torque, + share, + normal, + normalVelocity, + relativeVelocity; - object = objects.filter(function(object) { - return object.id.toString() === id.toString(); - }); + if (constraint.damping) { + var zero = Vector.create(); + normal = Vector.div(delta, currentLength); - return object.length === 0 ? null : object[0]; - }; + relativeVelocity = Vector.sub( + bodyB && Vector.sub(bodyB.position, bodyB.positionPrev) || zero, + bodyA && Vector.sub(bodyA.position, bodyA.positionPrev) || zero + ); - /** - * Moves the given object(s) from compositeA to compositeB (equal to a remove followed by an add). - * @method move - * @param {compositeA} compositeA - * @param {object[]} objects - * @param {compositeB} compositeB - * @return {composite} Returns compositeA - */ - Composite.move = function(compositeA, objects, compositeB) { - Composite.remove(compositeA, objects); - Composite.add(compositeB, objects); - return compositeA; - }; - - /** - * Assigns new ids for all objects in the composite, recursively. - * @method rebase - * @param {composite} composite - * @return {composite} Returns composite - */ - Composite.rebase = function(composite) { - var objects = Composite.allBodies(composite) - .concat(Composite.allConstraints(composite)) - .concat(Composite.allComposites(composite)); - - for (var i = 0; i < objects.length; i++) { - objects[i].id = Common.nextId(); + normalVelocity = Vector.dot(normal, relativeVelocity); } - Composite.setModified(composite, true, true, false); + if (bodyA && !bodyA.isStatic) { + share = bodyA.inverseMass / massTotal; - return composite; - }; + // keep track of applied impulses for post solving + bodyA.constraintImpulse.x -= force.x * share; + bodyA.constraintImpulse.y -= force.y * share; - /** - * Translates all children in the composite by a given vector relative to their current positions, - * without imparting any velocity. - * @method translate - * @param {composite} composite - * @param {vector} translation - * @param {bool} [recursive=true] - */ - Composite.translate = function(composite, translation, recursive) { - var bodies = recursive ? Composite.allBodies(composite) : composite.bodies; + // apply forces + bodyA.position.x -= force.x * share; + bodyA.position.y -= force.y * share; - for (var i = 0; i < bodies.length; i++) { - Body.translate(bodies[i], translation); + // apply damping + if (constraint.damping) { + bodyA.positionPrev.x -= constraint.damping * normal.x * normalVelocity * share; + bodyA.positionPrev.y -= constraint.damping * normal.y * normalVelocity * share; + } + + // apply torque + torque = (Vector.cross(pointA, force) / resistanceTotal) * Constraint._torqueDampen * bodyA.inverseInertia * (1 - constraint.angularStiffness); + bodyA.constraintImpulse.angle -= torque; + bodyA.angle -= torque; } - Composite.setModified(composite, true, true, false); + if (bodyB && !bodyB.isStatic) { + share = bodyB.inverseMass / massTotal; + + // keep track of applied impulses for post solving + bodyB.constraintImpulse.x += force.x * share; + bodyB.constraintImpulse.y += force.y * share; + + // apply forces + bodyB.position.x += force.x * share; + bodyB.position.y += force.y * share; + + // apply damping + if (constraint.damping) { + bodyB.positionPrev.x += constraint.damping * normal.x * normalVelocity * share; + bodyB.positionPrev.y += constraint.damping * normal.y * normalVelocity * share; + } + + // apply torque + torque = (Vector.cross(pointB, force) / resistanceTotal) * Constraint._torqueDampen * bodyB.inverseInertia * (1 - constraint.angularStiffness); + bodyB.constraintImpulse.angle += torque; + bodyB.angle += torque; + } - return composite; }; /** - * Rotates all children in the composite by a given angle about the given point, without imparting any angular velocity. - * @method rotate - * @param {composite} composite - * @param {number} rotation - * @param {vector} point - * @param {bool} [recursive=true] + * Performs body updates required after solving constraints. + * @private + * @method postSolveAll + * @param {body[]} bodies */ - Composite.rotate = function(composite, rotation, point, recursive) { - var cos = Math.cos(rotation), - sin = Math.sin(rotation), - bodies = recursive ? Composite.allBodies(composite) : composite.bodies; - + Constraint.postSolveAll = function(bodies) { for (var i = 0; i < bodies.length; i++) { var body = bodies[i], - dx = body.position.x - point.x, - dy = body.position.y - point.y; + impulse = body.constraintImpulse; + + if (body.isStatic || (impulse.x === 0 && impulse.y === 0 && impulse.angle === 0)) { + continue; + } + + Sleeping.set(body, false); + + // update geometry and reset + for (var j = 0; j < body.parts.length; j++) { + var part = body.parts[j]; - Body.setPosition(body, { - x: point.x + (dx * cos - dy * sin), - y: point.y + (dx * sin + dy * cos) - }); + Vertices.translate(part.vertices, impulse); - Body.rotate(body, rotation); + if (j > 0) { + part.position.x += impulse.x; + part.position.y += impulse.y; + } + + if (impulse.angle !== 0) { + Vertices.rotate(part.vertices, impulse.angle, body.position); + Axes.rotate(part.axes, impulse.angle); + if (j > 0) { + Vector.rotateAbout(part.position, impulse.angle, body.position, part.position); + } + } + + Bounds.update(part.bounds, part.vertices, body.velocity); + } + + // dampen the cached impulse for warming next step + impulse.angle *= Constraint._warming; + impulse.x *= Constraint._warming; + impulse.y *= Constraint._warming; } - - Composite.setModified(composite, true, true, false); - - return composite; }; /** - * Scales all children in the composite, including updating physical properties (mass, area, axes, inertia), from a world-space point. - * @method scale - * @param {composite} composite - * @param {number} scaleX - * @param {number} scaleY - * @param {vector} point - * @param {bool} [recursive=true] + * Returns the world-space position of `constraint.pointA`, accounting for `constraint.bodyA`. + * @method pointAWorld + * @param {constraint} constraint + * @returns {vector} the world-space position */ - Composite.scale = function(composite, scaleX, scaleY, point, recursive) { - var bodies = recursive ? Composite.allBodies(composite) : composite.bodies; - - for (var i = 0; i < bodies.length; i++) { - var body = bodies[i], - dx = body.position.x - point.x, - dy = body.position.y - point.y; - - Body.setPosition(body, { - x: point.x + dx * scaleX, - y: point.y + dy * scaleY - }); - - Body.scale(body, scaleX, scaleY); - } - - Composite.setModified(composite, true, true, false); - - return composite; + Constraint.pointAWorld = function(constraint) { + return { + x: (constraint.bodyA ? constraint.bodyA.position.x : 0) + constraint.pointA.x, + y: (constraint.bodyA ? constraint.bodyA.position.y : 0) + constraint.pointA.y + }; }; /** - * Returns the union of the bounds of all of the composite's bodies. - * @method bounds - * @param {composite} composite The composite. - * @returns {bounds} The composite bounds. + * Returns the world-space position of `constraint.pointB`, accounting for `constraint.bodyB`. + * @method pointBWorld + * @param {constraint} constraint + * @returns {vector} the world-space position */ - Composite.bounds = function(composite) { - var bodies = Composite.allBodies(composite), - vertices = []; - - for (var i = 0; i < bodies.length; i += 1) { - var body = bodies[i]; - vertices.push(body.bounds.min, body.bounds.max); - } - - return Bounds.create(vertices); + Constraint.pointBWorld = function(constraint) { + return { + x: (constraint.bodyB ? constraint.bodyB.position.x : 0) + constraint.pointB.x, + y: (constraint.bodyB ? constraint.bodyB.position.y : 0) + constraint.pointB.y + }; }; - /* - * - * Events Documentation - * - */ - - /** - * Fired when a call to `Composite.add` is made, before objects have been added. - * - * @event beforeAdd - * @param {} event An event object - * @param {} event.object The object(s) to be added (may be a single body, constraint, composite or a mixed array of these) - * @param {} event.source The source object of the event - * @param {} event.name The name of the event - */ - - /** - * Fired when a call to `Composite.add` is made, after objects have been added. - * - * @event afterAdd - * @param {} event An event object - * @param {} event.object The object(s) that have been added (may be a single body, constraint, composite or a mixed array of these) - * @param {} event.source The source object of the event - * @param {} event.name The name of the event - */ - - /** - * Fired when a call to `Composite.remove` is made, before objects have been removed. - * - * @event beforeRemove - * @param {} event An event object - * @param {} event.object The object(s) to be removed (may be a single body, constraint, composite or a mixed array of these) - * @param {} event.source The source object of the event - * @param {} event.name The name of the event - */ - - /** - * Fired when a call to `Composite.remove` is made, after objects have been removed. - * - * @event afterRemove - * @param {} event An event object - * @param {} event.object The object(s) that have been removed (may be a single body, constraint, composite or a mixed array of these) - * @param {} event.source The source object of the event - * @param {} event.name The name of the event - */ - /* * * Properties Documentation @@ -48774,64 +49495,129 @@ var Body = __webpack_require__(62); * * @property type * @type string - * @default "composite" + * @default "constraint" * @readOnly */ /** - * An arbitrary `String` name to help the user identify and manage composites. + * An arbitrary `String` name to help the user identify and manage bodies. * * @property label * @type string - * @default "Composite" + * @default "Constraint" */ /** - * A flag that specifies whether the composite has been modified during the current step. - * Most `Matter.Composite` methods will automatically set this flag to `true` to inform the engine of changes to be handled. - * If you need to change it manually, you should use the `Composite.setModified` method. + * An `Object` that defines the rendering properties to be consumed by the module `Matter.Render`. * - * @property isModified + * @property render + * @type object + */ + + /** + * A flag that indicates if the constraint should be rendered. + * + * @property render.visible * @type boolean - * @default false + * @default true */ /** - * The `Composite` that is the parent of this composite. It is automatically managed by the `Matter.Composite` methods. + * A `Number` that defines the line width to use when rendering the constraint outline. + * A value of `0` means no outline will be rendered. * - * @property parent - * @type composite + * @property render.lineWidth + * @type number + * @default 2 + */ + + /** + * A `String` that defines the stroke style to use when rendering the constraint outline. + * It is the same as when using a canvas, so it accepts CSS style property values. + * + * @property render.strokeStyle + * @type string + * @default a random colour + */ + + /** + * A `String` that defines the constraint rendering type. + * The possible values are 'line', 'pin', 'spring'. + * An appropriate render type will be automatically chosen unless one is given in options. + * + * @property render.type + * @type string + * @default 'line' + */ + + /** + * A `Boolean` that defines if the constraint's anchor points should be rendered. + * + * @property render.anchors + * @type boolean + * @default true + */ + + /** + * The first possible `Body` that this constraint is attached to. + * + * @property bodyA + * @type body * @default null */ /** - * An array of `Body` that are _direct_ children of this composite. - * To add or remove bodies you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property. - * If you wish to recursively find all descendants, you should use the `Composite.allBodies` method. + * The second possible `Body` that this constraint is attached to. * - * @property bodies - * @type body[] - * @default [] + * @property bodyB + * @type body + * @default null */ /** - * An array of `Constraint` that are _direct_ children of this composite. - * To add or remove constraints you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property. - * If you wish to recursively find all descendants, you should use the `Composite.allConstraints` method. + * A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyA` if defined, otherwise a world-space position. * - * @property constraints - * @type constraint[] - * @default [] + * @property pointA + * @type vector + * @default { x: 0, y: 0 } */ /** - * An array of `Composite` that are _direct_ children of this composite. - * To add or remove composites you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property. - * If you wish to recursively find all descendants, you should use the `Composite.allComposites` method. + * A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyB` if defined, otherwise a world-space position. * - * @property composites - * @type composite[] - * @default [] + * @property pointB + * @type vector + * @default { x: 0, y: 0 } + */ + + /** + * A `Number` that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. + * A value of `1` means the constraint should be very stiff. + * A value of `0.2` means the constraint acts like a soft spring. + * + * @property stiffness + * @type number + * @default 1 + */ + + /** + * A `Number` that specifies the damping of the constraint, + * i.e. the amount of resistance applied to each body based on their velocities to limit the amount of oscillation. + * Damping will only be apparent when the constraint also has a very low `stiffness`. + * A value of `0.1` means the constraint will apply heavy damping, resulting in little to no oscillation. + * A value of `0` means the constraint will apply no damping. + * + * @property damping + * @type number + * @default 0 + */ + + /** + * A `Number` that specifies the target resting length of the constraint. + * It is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. + * + * @property length + * @type number */ /** @@ -48845,16 +49631,16 @@ var Body = __webpack_require__(62); /***/ }), -/* 216 */ +/* 217 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(137); +var GetTileAt = __webpack_require__(138); /** * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting @@ -48921,18 +49707,18 @@ module.exports = CalculateFacesAt; /***/ }), -/* 217 */ +/* 218 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Tile = __webpack_require__(74); var IsInLayerBounds = __webpack_require__(103); -var CalculateFacesAt = __webpack_require__(216); +var CalculateFacesAt = __webpack_require__(217); var SetTileCollision = __webpack_require__(73); /** @@ -49001,12 +49787,12 @@ module.exports = PutTileAt; /***/ }), -/* 218 */ +/* 219 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -49040,12 +49826,12 @@ module.exports = SetLayerCollisionIndex; /***/ }), -/* 219 */ +/* 220 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -49132,12 +49918,12 @@ module.exports = Parse2DArray; /***/ }), -/* 220 */ +/* 221 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -49222,12 +50008,12 @@ module.exports = ParseGID; /***/ }), -/* 221 */ +/* 222 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Seth Berrier - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -49283,17 +50069,17 @@ module.exports = CreateGroupLayer; /***/ }), -/* 222 */ +/* 223 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Pick = __webpack_require__(466); -var ParseGID = __webpack_require__(220); +var Pick = __webpack_require__(480); +var ParseGID = __webpack_require__(221); var copyPoints = function (p) { return { x: p.x, y: p.y }; }; @@ -49365,19 +50151,19 @@ module.exports = ParseObject; /***/ }), -/* 223 */ +/* 224 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Formats = __webpack_require__(31); var MapData = __webpack_require__(105); -var Parse = __webpack_require__(458); -var Tilemap = __webpack_require__(474); +var Parse = __webpack_require__(472); +var Tilemap = __webpack_require__(488); /** * Create a Tilemap from the given key or data. If neither is given, make a blank Tilemap. When @@ -49451,12 +50237,12 @@ module.exports = ParseToTilemap; /***/ }), -/* 224 */ +/* 225 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -49500,12 +50286,12 @@ module.exports = GetTargets; /***/ }), -/* 225 */ +/* 226 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -49768,12 +50554,12 @@ module.exports = GetValueOp; /***/ }), -/* 226 */ +/* 227 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -49812,18 +50598,18 @@ module.exports = TWEEN_DEFAULTS; /***/ }), -/* 227 */ +/* 228 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(228); +var Events = __webpack_require__(229); var GameObjectCreator = __webpack_require__(16); var GameObjectFactory = __webpack_require__(5); var TWEEN_CONST = __webpack_require__(89); @@ -51057,7 +51843,7 @@ var Tween = new Class({ { if (!this.isSeeking) { - this.emit(event, this, tweenData.key, tweenData.target); + this.emit(event, this, tweenData.key, tweenData.target, tweenData.current, tweenData.previous); if (callback) { @@ -51282,6 +52068,7 @@ var Tween = new Class({ tweenData.elapsed = elapsed; tweenData.progress = progress; + tweenData.previous = tweenData.current; if (progress === 1) { @@ -51455,12 +52242,12 @@ module.exports = Tween; /***/ }), -/* 228 */ +/* 229 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51470,30 +52257,30 @@ module.exports = Tween; module.exports = { - TIMELINE_COMPLETE: __webpack_require__(1331), - TIMELINE_LOOP: __webpack_require__(1332), - TIMELINE_PAUSE: __webpack_require__(1333), - TIMELINE_RESUME: __webpack_require__(1334), - TIMELINE_START: __webpack_require__(1335), - TIMELINE_UPDATE: __webpack_require__(1336), - TWEEN_ACTIVE: __webpack_require__(1337), - TWEEN_COMPLETE: __webpack_require__(1338), - TWEEN_LOOP: __webpack_require__(1339), - TWEEN_REPEAT: __webpack_require__(1340), - TWEEN_START: __webpack_require__(1341), - TWEEN_UPDATE: __webpack_require__(1342), - TWEEN_YOYO: __webpack_require__(1343) + TIMELINE_COMPLETE: __webpack_require__(1346), + TIMELINE_LOOP: __webpack_require__(1347), + TIMELINE_PAUSE: __webpack_require__(1348), + TIMELINE_RESUME: __webpack_require__(1349), + TIMELINE_START: __webpack_require__(1350), + TIMELINE_UPDATE: __webpack_require__(1351), + TWEEN_ACTIVE: __webpack_require__(1352), + TWEEN_COMPLETE: __webpack_require__(1353), + TWEEN_LOOP: __webpack_require__(1354), + TWEEN_REPEAT: __webpack_require__(1355), + TWEEN_START: __webpack_require__(1356), + TWEEN_UPDATE: __webpack_require__(1357), + TWEEN_YOYO: __webpack_require__(1358) }; /***/ }), -/* 229 */ +/* 230 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51589,6 +52376,7 @@ var TweenData = function (target, index, key, getEnd, getStart, getActive, ease, // Ease Value Data: start: 0, + previous: 0, current: 0, end: 0, @@ -51614,12 +52402,12 @@ module.exports = TweenData; /***/ }), -/* 230 */ +/* 231 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51668,16 +52456,16 @@ module.exports = ScaleModes; /***/ }), -/* 231 */ +/* 232 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathWrap = __webpack_require__(57); +var MathWrap = __webpack_require__(58); /** * Wrap an angle. @@ -51700,16 +52488,16 @@ module.exports = Wrap; /***/ }), -/* 232 */ +/* 233 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Wrap = __webpack_require__(57); +var Wrap = __webpack_require__(58); /** * Wrap an angle in degrees. @@ -51732,13 +52520,13 @@ module.exports = WrapDegrees; /***/ }), -/* 233 */ +/* 234 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -52501,25 +53289,25 @@ module.exports = WebGLPipeline; /***/ }), -/* 234 */ +/* 235 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Earcut = __webpack_require__(66); var GetFastValue = __webpack_require__(2); -var ModelViewProjection = __webpack_require__(492); -var ShaderSourceFS = __webpack_require__(756); -var ShaderSourceVS = __webpack_require__(757); +var ModelViewProjection = __webpack_require__(506); +var ShaderSourceFS = __webpack_require__(779); +var ShaderSourceVS = __webpack_require__(780); var TransformMatrix = __webpack_require__(32); var Utils = __webpack_require__(10); -var WebGLPipeline = __webpack_require__(233); +var WebGLPipeline = __webpack_require__(234); /** * @classdesc @@ -54009,7 +54797,142 @@ module.exports = TextureTintPipeline; /***/ }), -/* 235 */ +/* 236 */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* The `Matter.Sleeping` module contains methods to manage the sleeping state of bodies. +* +* @class Sleeping +*/ + +var Sleeping = {}; + +module.exports = Sleeping; + +var Events = __webpack_require__(237); + +(function() { + + Sleeping._motionWakeThreshold = 0.18; + Sleeping._motionSleepThreshold = 0.08; + Sleeping._minBias = 0.9; + + /** + * Puts bodies to sleep or wakes them up depending on their motion. + * @method update + * @param {body[]} bodies + * @param {number} timeScale + */ + Sleeping.update = function(bodies, timeScale) { + var timeFactor = timeScale * timeScale * timeScale; + + // update bodies sleeping status + for (var i = 0; i < bodies.length; i++) { + var body = bodies[i], + motion = body.speed * body.speed + body.angularSpeed * body.angularSpeed; + + // wake up bodies if they have a force applied + if (body.force.x !== 0 || body.force.y !== 0) { + Sleeping.set(body, false); + continue; + } + + var minMotion = Math.min(body.motion, motion), + maxMotion = Math.max(body.motion, motion); + + // biased average motion estimation between frames + body.motion = Sleeping._minBias * minMotion + (1 - Sleeping._minBias) * maxMotion; + + if (body.sleepThreshold > 0 && body.motion < Sleeping._motionSleepThreshold * timeFactor) { + body.sleepCounter += 1; + + if (body.sleepCounter >= body.sleepThreshold) + Sleeping.set(body, true); + } else if (body.sleepCounter > 0) { + body.sleepCounter -= 1; + } + } + }; + + /** + * Given a set of colliding pairs, wakes the sleeping bodies involved. + * @method afterCollisions + * @param {pair[]} pairs + * @param {number} timeScale + */ + Sleeping.afterCollisions = function(pairs, timeScale) { + var timeFactor = timeScale * timeScale * timeScale; + + // wake up bodies involved in collisions + for (var i = 0; i < pairs.length; i++) { + var pair = pairs[i]; + + // don't wake inactive pairs + if (!pair.isActive) + continue; + + var collision = pair.collision, + bodyA = collision.bodyA.parent, + bodyB = collision.bodyB.parent; + + // don't wake if at least one body is static + if ((bodyA.isSleeping && bodyB.isSleeping) || bodyA.isStatic || bodyB.isStatic) + continue; + + if (bodyA.isSleeping || bodyB.isSleeping) { + var sleepingBody = (bodyA.isSleeping && !bodyA.isStatic) ? bodyA : bodyB, + movingBody = sleepingBody === bodyA ? bodyB : bodyA; + + if (!sleepingBody.isStatic && movingBody.motion > Sleeping._motionWakeThreshold * timeFactor) { + Sleeping.set(sleepingBody, false); + } + } + } + }; + + /** + * Set a body as sleeping or awake. + * @method set + * @param {body} body + * @param {boolean} isSleeping + */ + Sleeping.set = function(body, isSleeping) { + var wasSleeping = body.isSleeping; + + if (isSleeping) { + body.isSleeping = true; + body.sleepCounter = body.sleepThreshold; + + body.positionImpulse.x = 0; + body.positionImpulse.y = 0; + + body.positionPrev.x = body.position.x; + body.positionPrev.y = body.position.y; + + body.anglePrev = body.angle; + body.speed = 0; + body.angularSpeed = 0; + body.motion = 0; + + if (!wasSleeping) { + Events.trigger(body, 'sleepStart'); + } + } else { + body.isSleeping = false; + body.sleepCounter = 0; + + if (wasSleeping) { + Events.trigger(body, 'sleepEnd'); + } + } + }; + +})(); + + +/***/ }), +/* 237 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54127,471 +55050,12 @@ var Common = __webpack_require__(37); /***/ }), -/* 236 */ -/***/ (function(module, exports, __webpack_require__) { - -/** -* The `Matter.Constraint` module contains methods for creating and manipulating constraints. -* Constraints are used for specifying that a fixed distance must be maintained between two bodies (or a body and a fixed world-space position). -* The stiffness of constraints can be modified to create springs or elastic. -* -* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). -* -* @class Constraint -*/ - -var Constraint = {}; - -module.exports = Constraint; - -var Vertices = __webpack_require__(86); -var Vector = __webpack_require__(101); -var Sleeping = __webpack_require__(453); -var Bounds = __webpack_require__(102); -var Axes = __webpack_require__(1269); -var Common = __webpack_require__(37); - -(function() { - - Constraint._warming = 0.4; - Constraint._torqueDampen = 1; - Constraint._minLength = 0.000001; - - /** - * Creates a new constraint. - * All properties have default values, and many are pre-calculated automatically based on other properties. - * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` value (e.g. `0.7` or above). - * If the constraint is unstable, try lowering the `stiffness` value and / or increasing `engine.constraintIterations`. - * For compound bodies, constraints must be applied to the parent body (not one of its parts). - * See the properties section below for detailed information on what you can pass via the `options` object. - * @method create - * @param {} options - * @return {constraint} constraint - */ - Constraint.create = function(options) { - var constraint = options; - - // if bodies defined but no points, use body centre - if (constraint.bodyA && !constraint.pointA) - constraint.pointA = { x: 0, y: 0 }; - if (constraint.bodyB && !constraint.pointB) - constraint.pointB = { x: 0, y: 0 }; - - // calculate static length using initial world space points - var initialPointA = constraint.bodyA ? Vector.add(constraint.bodyA.position, constraint.pointA) : constraint.pointA, - initialPointB = constraint.bodyB ? Vector.add(constraint.bodyB.position, constraint.pointB) : constraint.pointB, - length = Vector.magnitude(Vector.sub(initialPointA, initialPointB)); - - constraint.length = typeof constraint.length !== 'undefined' ? constraint.length : length; - - // option defaults - constraint.id = constraint.id || Common.nextId(); - constraint.label = constraint.label || 'Constraint'; - constraint.type = 'constraint'; - constraint.stiffness = constraint.stiffness || (constraint.length > 0 ? 1 : 0.7); - constraint.damping = constraint.damping || 0; - constraint.angularStiffness = constraint.angularStiffness || 0; - constraint.angleA = constraint.bodyA ? constraint.bodyA.angle : constraint.angleA; - constraint.angleB = constraint.bodyB ? constraint.bodyB.angle : constraint.angleB; - constraint.plugin = {}; - - // render - var render = { - visible: true, - lineWidth: 2, - strokeStyle: '#ffffff', - type: 'line', - anchors: true - }; - - if (constraint.length === 0 && constraint.stiffness > 0.1) { - render.type = 'pin'; - render.anchors = false; - } else if (constraint.stiffness < 0.9) { - render.type = 'spring'; - } - - constraint.render = Common.extend(render, constraint.render); - - return constraint; - }; - - /** - * Prepares for solving by constraint warming. - * @private - * @method preSolveAll - * @param {body[]} bodies - */ - Constraint.preSolveAll = function(bodies) { - for (var i = 0; i < bodies.length; i += 1) { - var body = bodies[i], - impulse = body.constraintImpulse; - - if (body.isStatic || (impulse.x === 0 && impulse.y === 0 && impulse.angle === 0)) { - continue; - } - - body.position.x += impulse.x; - body.position.y += impulse.y; - body.angle += impulse.angle; - } - }; - - /** - * Solves all constraints in a list of collisions. - * @private - * @method solveAll - * @param {constraint[]} constraints - * @param {number} timeScale - */ - Constraint.solveAll = function(constraints, timeScale) { - // Solve fixed constraints first. - for (var i = 0; i < constraints.length; i += 1) { - var constraint = constraints[i], - fixedA = !constraint.bodyA || (constraint.bodyA && constraint.bodyA.isStatic), - fixedB = !constraint.bodyB || (constraint.bodyB && constraint.bodyB.isStatic); - - if (fixedA || fixedB) { - Constraint.solve(constraints[i], timeScale); - } - } - - // Solve free constraints last. - for (i = 0; i < constraints.length; i += 1) { - constraint = constraints[i]; - fixedA = !constraint.bodyA || (constraint.bodyA && constraint.bodyA.isStatic); - fixedB = !constraint.bodyB || (constraint.bodyB && constraint.bodyB.isStatic); - - if (!fixedA && !fixedB) { - Constraint.solve(constraints[i], timeScale); - } - } - }; - - /** - * Solves a distance constraint with Gauss-Siedel method. - * @private - * @method solve - * @param {constraint} constraint - * @param {number} timeScale - */ - Constraint.solve = function(constraint, timeScale) { - var bodyA = constraint.bodyA, - bodyB = constraint.bodyB, - pointA = constraint.pointA, - pointB = constraint.pointB; - - if (!bodyA && !bodyB) - return; - - // update reference angle - if (bodyA && !bodyA.isStatic) { - Vector.rotate(pointA, bodyA.angle - constraint.angleA, pointA); - constraint.angleA = bodyA.angle; - } - - // update reference angle - if (bodyB && !bodyB.isStatic) { - Vector.rotate(pointB, bodyB.angle - constraint.angleB, pointB); - constraint.angleB = bodyB.angle; - } - - var pointAWorld = pointA, - pointBWorld = pointB; - - if (bodyA) pointAWorld = Vector.add(bodyA.position, pointA); - if (bodyB) pointBWorld = Vector.add(bodyB.position, pointB); - - if (!pointAWorld || !pointBWorld) - return; - - var delta = Vector.sub(pointAWorld, pointBWorld), - currentLength = Vector.magnitude(delta); - - // prevent singularity - if (currentLength < Constraint._minLength) { - currentLength = Constraint._minLength; - } - - // solve distance constraint with Gauss-Siedel method - var difference = (currentLength - constraint.length) / currentLength, - stiffness = constraint.stiffness < 1 ? constraint.stiffness * timeScale : constraint.stiffness, - force = Vector.mult(delta, difference * stiffness), - massTotal = (bodyA ? bodyA.inverseMass : 0) + (bodyB ? bodyB.inverseMass : 0), - inertiaTotal = (bodyA ? bodyA.inverseInertia : 0) + (bodyB ? bodyB.inverseInertia : 0), - resistanceTotal = massTotal + inertiaTotal, - torque, - share, - normal, - normalVelocity, - relativeVelocity; - - if (constraint.damping) { - var zero = Vector.create(); - normal = Vector.div(delta, currentLength); - - relativeVelocity = Vector.sub( - bodyB && Vector.sub(bodyB.position, bodyB.positionPrev) || zero, - bodyA && Vector.sub(bodyA.position, bodyA.positionPrev) || zero - ); - - normalVelocity = Vector.dot(normal, relativeVelocity); - } - - if (bodyA && !bodyA.isStatic) { - share = bodyA.inverseMass / massTotal; - - // keep track of applied impulses for post solving - bodyA.constraintImpulse.x -= force.x * share; - bodyA.constraintImpulse.y -= force.y * share; - - // apply forces - bodyA.position.x -= force.x * share; - bodyA.position.y -= force.y * share; - - // apply damping - if (constraint.damping) { - bodyA.positionPrev.x -= constraint.damping * normal.x * normalVelocity * share; - bodyA.positionPrev.y -= constraint.damping * normal.y * normalVelocity * share; - } - - // apply torque - torque = (Vector.cross(pointA, force) / resistanceTotal) * Constraint._torqueDampen * bodyA.inverseInertia * (1 - constraint.angularStiffness); - bodyA.constraintImpulse.angle -= torque; - bodyA.angle -= torque; - } - - if (bodyB && !bodyB.isStatic) { - share = bodyB.inverseMass / massTotal; - - // keep track of applied impulses for post solving - bodyB.constraintImpulse.x += force.x * share; - bodyB.constraintImpulse.y += force.y * share; - - // apply forces - bodyB.position.x += force.x * share; - bodyB.position.y += force.y * share; - - // apply damping - if (constraint.damping) { - bodyB.positionPrev.x += constraint.damping * normal.x * normalVelocity * share; - bodyB.positionPrev.y += constraint.damping * normal.y * normalVelocity * share; - } - - // apply torque - torque = (Vector.cross(pointB, force) / resistanceTotal) * Constraint._torqueDampen * bodyB.inverseInertia * (1 - constraint.angularStiffness); - bodyB.constraintImpulse.angle += torque; - bodyB.angle += torque; - } - - }; - - /** - * Performs body updates required after solving constraints. - * @private - * @method postSolveAll - * @param {body[]} bodies - */ - Constraint.postSolveAll = function(bodies) { - for (var i = 0; i < bodies.length; i++) { - var body = bodies[i], - impulse = body.constraintImpulse; - - if (body.isStatic || (impulse.x === 0 && impulse.y === 0 && impulse.angle === 0)) { - continue; - } - - Sleeping.set(body, false); - - // update geometry and reset - for (var j = 0; j < body.parts.length; j++) { - var part = body.parts[j]; - - Vertices.translate(part.vertices, impulse); - - if (j > 0) { - part.position.x += impulse.x; - part.position.y += impulse.y; - } - - if (impulse.angle !== 0) { - Vertices.rotate(part.vertices, impulse.angle, body.position); - Axes.rotate(part.axes, impulse.angle); - if (j > 0) { - Vector.rotateAbout(part.position, impulse.angle, body.position, part.position); - } - } - - Bounds.update(part.bounds, part.vertices, body.velocity); - } - - // dampen the cached impulse for warming next step - impulse.angle *= Constraint._warming; - impulse.x *= Constraint._warming; - impulse.y *= Constraint._warming; - } - }; - - /* - * - * Properties Documentation - * - */ - - /** - * An integer `Number` uniquely identifying number generated in `Composite.create` by `Common.nextId`. - * - * @property id - * @type number - */ - - /** - * A `String` denoting the type of object. - * - * @property type - * @type string - * @default "constraint" - * @readOnly - */ - - /** - * An arbitrary `String` name to help the user identify and manage bodies. - * - * @property label - * @type string - * @default "Constraint" - */ - - /** - * An `Object` that defines the rendering properties to be consumed by the module `Matter.Render`. - * - * @property render - * @type object - */ - - /** - * A flag that indicates if the constraint should be rendered. - * - * @property render.visible - * @type boolean - * @default true - */ - - /** - * A `Number` that defines the line width to use when rendering the constraint outline. - * A value of `0` means no outline will be rendered. - * - * @property render.lineWidth - * @type number - * @default 2 - */ - - /** - * A `String` that defines the stroke style to use when rendering the constraint outline. - * It is the same as when using a canvas, so it accepts CSS style property values. - * - * @property render.strokeStyle - * @type string - * @default a random colour - */ - - /** - * A `String` that defines the constraint rendering type. - * The possible values are 'line', 'pin', 'spring'. - * An appropriate render type will be automatically chosen unless one is given in options. - * - * @property render.type - * @type string - * @default 'line' - */ - - /** - * A `Boolean` that defines if the constraint's anchor points should be rendered. - * - * @property render.anchors - * @type boolean - * @default true - */ - - /** - * The first possible `Body` that this constraint is attached to. - * - * @property bodyA - * @type body - * @default null - */ - - /** - * The second possible `Body` that this constraint is attached to. - * - * @property bodyB - * @type body - * @default null - */ - - /** - * A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyA` if defined, otherwise a world-space position. - * - * @property pointA - * @type vector - * @default { x: 0, y: 0 } - */ - - /** - * A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyB` if defined, otherwise a world-space position. - * - * @property pointB - * @type vector - * @default { x: 0, y: 0 } - */ - - /** - * A `Number` that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. - * A value of `1` means the constraint should be very stiff. - * A value of `0.2` means the constraint acts like a soft spring. - * - * @property stiffness - * @type number - * @default 1 - */ - - /** - * A `Number` that specifies the damping of the constraint, - * i.e. the amount of resistance applied to each body based on their velocities to limit the amount of oscillation. - * Damping will only be apparent when the constraint also has a very low `stiffness`. - * A value of `0.1` means the constraint will apply heavy damping, resulting in little to no oscillation. - * A value of `0` means the constraint will apply no damping. - * - * @property damping - * @type number - * @default 0 - */ - - /** - * A `Number` that specifies the target resting length of the constraint. - * It is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. - * - * @property length - * @type number - */ - - /** - * An object reserved for storing plugin-specific properties. - * - * @property plugin - * @type {} - */ - -})(); - - -/***/ }), -/* 237 */ +/* 238 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -54601,85 +55065,670 @@ var Common = __webpack_require__(37); module.exports = { - Angle: __webpack_require__(504), - Call: __webpack_require__(505), - GetFirst: __webpack_require__(506), - GetLast: __webpack_require__(507), - GridAlign: __webpack_require__(508), - IncAlpha: __webpack_require__(568), - IncX: __webpack_require__(569), - IncXY: __webpack_require__(570), - IncY: __webpack_require__(571), - PlaceOnCircle: __webpack_require__(572), - PlaceOnEllipse: __webpack_require__(573), - PlaceOnLine: __webpack_require__(574), - PlaceOnRectangle: __webpack_require__(575), - PlaceOnTriangle: __webpack_require__(576), - PlayAnimation: __webpack_require__(577), + AlignTo: __webpack_require__(521), + Angle: __webpack_require__(522), + Call: __webpack_require__(523), + GetFirst: __webpack_require__(524), + GetLast: __webpack_require__(525), + GridAlign: __webpack_require__(526), + IncAlpha: __webpack_require__(587), + IncX: __webpack_require__(588), + IncXY: __webpack_require__(589), + IncY: __webpack_require__(590), + PlaceOnCircle: __webpack_require__(591), + PlaceOnEllipse: __webpack_require__(592), + PlaceOnLine: __webpack_require__(593), + PlaceOnRectangle: __webpack_require__(594), + PlaceOnTriangle: __webpack_require__(595), + PlayAnimation: __webpack_require__(596), PropertyValueInc: __webpack_require__(34), PropertyValueSet: __webpack_require__(25), - RandomCircle: __webpack_require__(578), - RandomEllipse: __webpack_require__(579), - RandomLine: __webpack_require__(580), - RandomRectangle: __webpack_require__(581), - RandomTriangle: __webpack_require__(582), - Rotate: __webpack_require__(583), - RotateAround: __webpack_require__(584), - RotateAroundDistance: __webpack_require__(585), - ScaleX: __webpack_require__(586), - ScaleXY: __webpack_require__(587), - ScaleY: __webpack_require__(588), - SetAlpha: __webpack_require__(589), - SetBlendMode: __webpack_require__(590), - SetDepth: __webpack_require__(591), - SetHitArea: __webpack_require__(592), - SetOrigin: __webpack_require__(593), - SetRotation: __webpack_require__(594), - SetScale: __webpack_require__(595), - SetScaleX: __webpack_require__(596), - SetScaleY: __webpack_require__(597), - SetScrollFactor: __webpack_require__(598), - SetScrollFactorX: __webpack_require__(599), - SetScrollFactorY: __webpack_require__(600), - SetTint: __webpack_require__(601), - SetVisible: __webpack_require__(602), - SetX: __webpack_require__(603), - SetXY: __webpack_require__(604), - SetY: __webpack_require__(605), - ShiftPosition: __webpack_require__(606), - Shuffle: __webpack_require__(607), - SmootherStep: __webpack_require__(608), - SmoothStep: __webpack_require__(609), - Spread: __webpack_require__(610), - ToggleVisible: __webpack_require__(611), - WrapInRectangle: __webpack_require__(612) + RandomCircle: __webpack_require__(597), + RandomEllipse: __webpack_require__(598), + RandomLine: __webpack_require__(599), + RandomRectangle: __webpack_require__(600), + RandomTriangle: __webpack_require__(601), + Rotate: __webpack_require__(602), + RotateAround: __webpack_require__(603), + RotateAroundDistance: __webpack_require__(604), + ScaleX: __webpack_require__(605), + ScaleXY: __webpack_require__(606), + ScaleY: __webpack_require__(607), + SetAlpha: __webpack_require__(608), + SetBlendMode: __webpack_require__(609), + SetDepth: __webpack_require__(610), + SetHitArea: __webpack_require__(611), + SetOrigin: __webpack_require__(612), + SetRotation: __webpack_require__(613), + SetScale: __webpack_require__(614), + SetScaleX: __webpack_require__(615), + SetScaleY: __webpack_require__(616), + SetScrollFactor: __webpack_require__(617), + SetScrollFactorX: __webpack_require__(618), + SetScrollFactorY: __webpack_require__(619), + SetTint: __webpack_require__(620), + SetVisible: __webpack_require__(621), + SetX: __webpack_require__(622), + SetXY: __webpack_require__(623), + SetY: __webpack_require__(624), + ShiftPosition: __webpack_require__(625), + Shuffle: __webpack_require__(626), + SmootherStep: __webpack_require__(627), + SmoothStep: __webpack_require__(628), + Spread: __webpack_require__(629), + ToggleVisible: __webpack_require__(630), + WrapInRectangle: __webpack_require__(631) }; /***/ }), -/* 238 */ +/* 239 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var ALIGN_CONST = __webpack_require__(106); + +var AlignToMap = []; + +AlignToMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(240); +AlignToMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(241); +AlignToMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(242); +AlignToMap[ALIGN_CONST.LEFT_BOTTOM] = __webpack_require__(243); +AlignToMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(244); +AlignToMap[ALIGN_CONST.LEFT_TOP] = __webpack_require__(245); +AlignToMap[ALIGN_CONST.RIGHT_BOTTOM] = __webpack_require__(246); +AlignToMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(247); +AlignToMap[ALIGN_CONST.RIGHT_TOP] = __webpack_require__(248); +AlignToMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(249); +AlignToMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(250); +AlignToMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(251); + +/** + * Takes a Game Object and aligns it next to another, at the given position. + * The alignment used is based on the `position` argument, which is a `Phaser.Display.Align` property such as `LEFT_CENTER` or `TOP_RIGHT`. + * + * @function Phaser.Display.Align.To.QuickSet + * @since 3.22.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [child,$return] + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {integer} position - The position to align the Game Object with. This is an align constant, such as `Phaser.Display.Align.LEFT_CENTER`. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var QuickSet = function (child, alignTo, position, offsetX, offsetY) +{ + return AlignToMap[position](child, alignTo, offsetX, offsetY); +}; + +module.exports = QuickSet; + + +/***/ }), +/* 240 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ALIGN_CONST = __webpack_require__(143); +var GetBottom = __webpack_require__(38); +var GetCenterX = __webpack_require__(75); +var SetCenterX = __webpack_require__(76); +var SetTop = __webpack_require__(39); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the bottom center position of the other. + * + * @function Phaser.Display.Align.To.BottomCenter + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var BottomCenter = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetCenterX(gameObject, GetCenterX(alignTo) + offsetX); + SetTop(gameObject, GetBottom(alignTo) + offsetY); + + return gameObject; +}; + +module.exports = BottomCenter; + + +/***/ }), +/* 241 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetBottom = __webpack_require__(38); +var GetLeft = __webpack_require__(40); +var SetLeft = __webpack_require__(41); +var SetTop = __webpack_require__(39); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the bottom left position of the other. + * + * @function Phaser.Display.Align.To.BottomLeft + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var BottomLeft = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetLeft(gameObject, GetLeft(alignTo) - offsetX); + SetTop(gameObject, GetBottom(alignTo) + offsetY); + + return gameObject; +}; + +module.exports = BottomLeft; + + +/***/ }), +/* 242 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetBottom = __webpack_require__(38); +var GetRight = __webpack_require__(42); +var SetRight = __webpack_require__(43); +var SetTop = __webpack_require__(39); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the bottom right position of the other. + * + * @function Phaser.Display.Align.To.BottomRight + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var BottomRight = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetRight(gameObject, GetRight(alignTo) + offsetX); + SetTop(gameObject, GetBottom(alignTo) + offsetY); + + return gameObject; +}; + +module.exports = BottomRight; + + +/***/ }), +/* 243 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetBottom = __webpack_require__(38); +var GetLeft = __webpack_require__(40); +var SetBottom = __webpack_require__(44); +var SetRight = __webpack_require__(43); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the left bottom position of the other. + * + * @function Phaser.Display.Align.To.LeftBottom + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var LeftBottom = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetRight(gameObject, GetLeft(alignTo) - offsetX); + SetBottom(gameObject, GetBottom(alignTo) + offsetY); + + return gameObject; +}; + +module.exports = LeftBottom; + + +/***/ }), +/* 244 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetCenterY = __webpack_require__(77); +var GetLeft = __webpack_require__(40); +var SetCenterY = __webpack_require__(78); +var SetRight = __webpack_require__(43); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the left center position of the other. + * + * @function Phaser.Display.Align.To.LeftCenter + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var LeftCenter = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetRight(gameObject, GetLeft(alignTo) - offsetX); + SetCenterY(gameObject, GetCenterY(alignTo) + offsetY); + + return gameObject; +}; + +module.exports = LeftCenter; + + +/***/ }), +/* 245 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetLeft = __webpack_require__(40); +var GetTop = __webpack_require__(45); +var SetRight = __webpack_require__(43); +var SetTop = __webpack_require__(39); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the left top position of the other. + * + * @function Phaser.Display.Align.To.LeftTop + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var LeftTop = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetRight(gameObject, GetLeft(alignTo) - offsetX); + SetTop(gameObject, GetTop(alignTo) - offsetY); + + return gameObject; +}; + +module.exports = LeftTop; + + +/***/ }), +/* 246 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetBottom = __webpack_require__(38); +var GetRight = __webpack_require__(42); +var SetBottom = __webpack_require__(44); +var SetLeft = __webpack_require__(41); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the right bottom position of the other. + * + * @function Phaser.Display.Align.To.RightBottom + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var RightBottom = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetLeft(gameObject, GetRight(alignTo) + offsetX); + SetBottom(gameObject, GetBottom(alignTo) + offsetY); + + return gameObject; +}; + +module.exports = RightBottom; + + +/***/ }), +/* 247 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetCenterY = __webpack_require__(77); +var GetRight = __webpack_require__(42); +var SetCenterY = __webpack_require__(78); +var SetLeft = __webpack_require__(41); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the right center position of the other. + * + * @function Phaser.Display.Align.To.RightCenter + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var RightCenter = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetLeft(gameObject, GetRight(alignTo) + offsetX); + SetCenterY(gameObject, GetCenterY(alignTo) + offsetY); + + return gameObject; +}; + +module.exports = RightCenter; + + +/***/ }), +/* 248 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetRight = __webpack_require__(42); +var GetTop = __webpack_require__(45); +var SetLeft = __webpack_require__(41); +var SetTop = __webpack_require__(39); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the right top position of the other. + * + * @function Phaser.Display.Align.To.RightTop + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var RightTop = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetLeft(gameObject, GetRight(alignTo) + offsetX); + SetTop(gameObject, GetTop(alignTo) - offsetY); + + return gameObject; +}; + +module.exports = RightTop; + + +/***/ }), +/* 249 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetCenterX = __webpack_require__(75); +var GetTop = __webpack_require__(45); +var SetBottom = __webpack_require__(44); +var SetCenterX = __webpack_require__(76); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the top center position of the other. + * + * @function Phaser.Display.Align.To.TopCenter + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var TopCenter = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetCenterX(gameObject, GetCenterX(alignTo) + offsetX); + SetBottom(gameObject, GetTop(alignTo) - offsetY); + + return gameObject; +}; + +module.exports = TopCenter; + + +/***/ }), +/* 250 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetLeft = __webpack_require__(40); +var GetTop = __webpack_require__(45); +var SetBottom = __webpack_require__(44); +var SetLeft = __webpack_require__(41); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the top left position of the other. + * + * @function Phaser.Display.Align.To.TopLeft + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var TopLeft = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetLeft(gameObject, GetLeft(alignTo) - offsetX); + SetBottom(gameObject, GetTop(alignTo) - offsetY); + + return gameObject; +}; + +module.exports = TopLeft; + + +/***/ }), +/* 251 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetRight = __webpack_require__(42); +var GetTop = __webpack_require__(45); +var SetBottom = __webpack_require__(44); +var SetRight = __webpack_require__(43); + +/** + * Takes given Game Object and aligns it so that it is positioned next to the top right position of the other. + * + * @function Phaser.Display.Align.To.TopRight + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. + * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. + */ +var TopRight = function (gameObject, alignTo, offsetX, offsetY) +{ + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + SetRight(gameObject, GetRight(alignTo) + offsetX); + SetBottom(gameObject, GetTop(alignTo) - offsetY); + + return gameObject; +}; + +module.exports = TopRight; + + +/***/ }), +/* 252 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var ALIGN_CONST = __webpack_require__(106); var AlignInMap = []; -AlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(239); -AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(240); -AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(241); -AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(242); -AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(244); -AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(245); -AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(246); -AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(247); -AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(248); +AlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(253); +AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(254); +AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(255); +AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(256); +AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(258); +AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(259); +AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(260); +AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(261); +AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(262); +AlignInMap[ALIGN_CONST.LEFT_BOTTOM] = AlignInMap[ALIGN_CONST.BOTTOM_LEFT]; +AlignInMap[ALIGN_CONST.LEFT_TOP] = AlignInMap[ALIGN_CONST.TOP_LEFT]; +AlignInMap[ALIGN_CONST.RIGHT_BOTTOM] = AlignInMap[ALIGN_CONST.BOTTOM_RIGHT]; +AlignInMap[ALIGN_CONST.RIGHT_TOP] = AlignInMap[ALIGN_CONST.TOP_RIGHT]; /** * Takes given Game Object and aligns it so that it is positioned relative to the other. @@ -54707,18 +55756,18 @@ module.exports = QuickSet; /***/ }), -/* 239 */ +/* 253 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetBottom = __webpack_require__(38); var GetCenterX = __webpack_require__(75); -var SetBottom = __webpack_require__(39); +var SetBottom = __webpack_require__(44); var SetCenterX = __webpack_require__(76); /** @@ -54751,18 +55800,18 @@ module.exports = BottomCenter; /***/ }), -/* 240 */ +/* 254 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetBottom = __webpack_require__(38); var GetLeft = __webpack_require__(40); -var SetBottom = __webpack_require__(39); +var SetBottom = __webpack_require__(44); var SetLeft = __webpack_require__(41); /** @@ -54795,18 +55844,18 @@ module.exports = BottomLeft; /***/ }), -/* 241 */ +/* 255 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetBottom = __webpack_require__(38); var GetRight = __webpack_require__(42); -var SetBottom = __webpack_require__(39); +var SetBottom = __webpack_require__(44); var SetRight = __webpack_require__(43); /** @@ -54839,18 +55888,18 @@ module.exports = BottomRight; /***/ }), -/* 242 */ +/* 256 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CenterOn = __webpack_require__(243); +var CenterOn = __webpack_require__(257); var GetCenterX = __webpack_require__(75); -var GetCenterY = __webpack_require__(78); +var GetCenterY = __webpack_require__(77); /** * Takes given Game Object and aligns it so that it is positioned in the center of the other. @@ -54881,17 +55930,17 @@ module.exports = Center; /***/ }), -/* 243 */ +/* 257 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var SetCenterX = __webpack_require__(76); -var SetCenterY = __webpack_require__(77); +var SetCenterY = __webpack_require__(78); /** * Positions the Game Object so that it is centered on the given coordinates. @@ -54918,18 +55967,18 @@ module.exports = CenterOn; /***/ }), -/* 244 */ +/* 258 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetCenterY = __webpack_require__(78); +var GetCenterY = __webpack_require__(77); var GetLeft = __webpack_require__(40); -var SetCenterY = __webpack_require__(77); +var SetCenterY = __webpack_require__(78); var SetLeft = __webpack_require__(41); /** @@ -54962,18 +56011,18 @@ module.exports = LeftCenter; /***/ }), -/* 245 */ +/* 259 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetCenterY = __webpack_require__(78); +var GetCenterY = __webpack_require__(77); var GetRight = __webpack_require__(42); -var SetCenterY = __webpack_require__(77); +var SetCenterY = __webpack_require__(78); var SetRight = __webpack_require__(43); /** @@ -55006,19 +56055,19 @@ module.exports = RightCenter; /***/ }), -/* 246 */ +/* 260 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetCenterX = __webpack_require__(75); -var GetTop = __webpack_require__(44); +var GetTop = __webpack_require__(45); var SetCenterX = __webpack_require__(76); -var SetTop = __webpack_require__(45); +var SetTop = __webpack_require__(39); /** * Takes given Game Object and aligns it so that it is positioned in the top center of the other. @@ -55050,19 +56099,19 @@ module.exports = TopCenter; /***/ }), -/* 247 */ +/* 261 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetLeft = __webpack_require__(40); -var GetTop = __webpack_require__(44); +var GetTop = __webpack_require__(45); var SetLeft = __webpack_require__(41); -var SetTop = __webpack_require__(45); +var SetTop = __webpack_require__(39); /** * Takes given Game Object and aligns it so that it is positioned in the top left of the other. @@ -55094,19 +56143,19 @@ module.exports = TopLeft; /***/ }), -/* 248 */ +/* 262 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetRight = __webpack_require__(42); -var GetTop = __webpack_require__(44); +var GetTop = __webpack_require__(45); var SetRight = __webpack_require__(43); -var SetTop = __webpack_require__(45); +var SetTop = __webpack_require__(39); /** * Takes given Game Object and aligns it so that it is positioned in the top right of the other. @@ -55138,16 +56187,16 @@ module.exports = TopRight; /***/ }), -/* 249 */ +/* 263 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CircumferencePoint = __webpack_require__(144); +var CircumferencePoint = __webpack_require__(146); var FromPercent = __webpack_require__(87); var MATH_CONST = __webpack_require__(13); var Point = __webpack_require__(4); @@ -55181,17 +56230,17 @@ module.exports = GetPoint; /***/ }), -/* 250 */ +/* 264 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circumference = __webpack_require__(251); -var CircumferencePoint = __webpack_require__(144); +var Circumference = __webpack_require__(265); +var CircumferencePoint = __webpack_require__(146); var FromPercent = __webpack_require__(87); var MATH_CONST = __webpack_require__(13); @@ -55233,12 +56282,12 @@ module.exports = GetPoints; /***/ }), -/* 251 */ +/* 265 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -55261,34 +56310,34 @@ module.exports = Circumference; /***/ }), -/* 252 */ +/* 266 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(23); +var Clamp = __webpack_require__(22); // bitmask flag for GameObject.renderMask var _FLAG = 2; // 0010 /** - * Provides methods used for setting the alpha properties of a Game Object. + * Provides methods used for setting the alpha property of a Game Object. * Should be applied as a mixin and not used directly. * - * @namespace Phaser.GameObjects.Components.Alpha - * @since 3.0.0 + * @namespace Phaser.GameObjects.Components.AlphaSingle + * @since 3.22.0 */ -var Alpha = { +var AlphaSingle = { /** * Private internal value. Holds the global alpha value. * - * @name Phaser.GameObjects.Components.Alpha#_alpha + * @name Phaser.GameObjects.Components.AlphaSingle#_alpha * @type {number} * @private * @default 1 @@ -55296,56 +56345,12 @@ var Alpha = { */ _alpha: 1, - /** - * Private internal value. Holds the top-left alpha value. - * - * @name Phaser.GameObjects.Components.Alpha#_alphaTL - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - _alphaTL: 1, - - /** - * Private internal value. Holds the top-right alpha value. - * - * @name Phaser.GameObjects.Components.Alpha#_alphaTR - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - _alphaTR: 1, - - /** - * Private internal value. Holds the bottom-left alpha value. - * - * @name Phaser.GameObjects.Components.Alpha#_alphaBL - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - _alphaBL: 1, - - /** - * Private internal value. Holds the bottom-right alpha value. - * - * @name Phaser.GameObjects.Components.Alpha#_alphaBR - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - _alphaBR: 1, - /** * Clears all alpha values associated with this Game Object. * * Immediately sets the alpha levels back to 1 (fully opaque). * - * @method Phaser.GameObjects.Components.Alpha#clearAlpha + * @method Phaser.GameObjects.Components.AlphaSingle#clearAlpha * @since 3.0.0 * * @return {this} This Game Object instance. @@ -55359,35 +56364,18 @@ var Alpha = { * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. * - * If your game is running under WebGL you can optionally specify four different alpha values, each of which - * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. - * - * @method Phaser.GameObjects.Components.Alpha#setAlpha + * @method Phaser.GameObjects.Components.AlphaSingle#setAlpha * @since 3.0.0 * - * @param {number} [topLeft=1] - The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. - * @param {number} [topRight] - The alpha value used for the top-right of the Game Object. WebGL only. - * @param {number} [bottomLeft] - The alpha value used for the bottom-left of the Game Object. WebGL only. - * @param {number} [bottomRight] - The alpha value used for the bottom-right of the Game Object. WebGL only. + * @param {number} [value=1] - The alpha value applied across the whole Game Object. * * @return {this} This Game Object instance. */ - setAlpha: function (topLeft, topRight, bottomLeft, bottomRight) + setAlpha: function (value) { - if (topLeft === undefined) { topLeft = 1; } + if (value === undefined) { value = 1; } - // Treat as if there is only one alpha value for the whole Game Object - if (topRight === undefined) - { - this.alpha = topLeft; - } - else - { - this._alphaTL = Clamp(topLeft, 0, 1); - this._alphaTR = Clamp(topRight, 0, 1); - this._alphaBL = Clamp(bottomLeft, 0, 1); - this._alphaBR = Clamp(bottomRight, 0, 1); - } + this.alpha = value; return this; }, @@ -55397,7 +56385,7 @@ var Alpha = { * * This is a global value, impacting the entire Game Object, not just a region of it. * - * @name Phaser.GameObjects.Components.Alpha#alpha + * @name Phaser.GameObjects.Components.AlphaSingle#alpha * @type {number} * @since 3.0.0 */ @@ -55413,10 +56401,6 @@ var Alpha = { var v = Clamp(value, 0, 1); this._alpha = v; - this._alphaTL = v; - this._alphaTR = v; - this._alphaBL = v; - this._alphaBR = v; if (v === 0) { @@ -55428,140 +56412,20 @@ var Alpha = { } } - }, - - /** - * The alpha value starting from the top-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * - * @name Phaser.GameObjects.Components.Alpha#alphaTopLeft - * @type {number} - * @webglOnly - * @since 3.0.0 - */ - alphaTopLeft: { - - get: function () - { - return this._alphaTL; - }, - - set: function (value) - { - var v = Clamp(value, 0, 1); - - this._alphaTL = v; - - if (v !== 0) - { - this.renderFlags |= _FLAG; - } - } - - }, - - /** - * The alpha value starting from the top-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * - * @name Phaser.GameObjects.Components.Alpha#alphaTopRight - * @type {number} - * @webglOnly - * @since 3.0.0 - */ - alphaTopRight: { - - get: function () - { - return this._alphaTR; - }, - - set: function (value) - { - var v = Clamp(value, 0, 1); - - this._alphaTR = v; - - if (v !== 0) - { - this.renderFlags |= _FLAG; - } - } - - }, - - /** - * The alpha value starting from the bottom-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * - * @name Phaser.GameObjects.Components.Alpha#alphaBottomLeft - * @type {number} - * @webglOnly - * @since 3.0.0 - */ - alphaBottomLeft: { - - get: function () - { - return this._alphaBL; - }, - - set: function (value) - { - var v = Clamp(value, 0, 1); - - this._alphaBL = v; - - if (v !== 0) - { - this.renderFlags |= _FLAG; - } - } - - }, - - /** - * The alpha value starting from the bottom-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * - * @name Phaser.GameObjects.Components.Alpha#alphaBottomRight - * @type {number} - * @webglOnly - * @since 3.0.0 - */ - alphaBottomRight: { - - get: function () - { - return this._alphaBR; - }, - - set: function (value) - { - var v = Clamp(value, 0, 1); - - this._alphaBR = v; - - if (v !== 0) - { - this.renderFlags |= _FLAG; - } - } - } }; -module.exports = Alpha; +module.exports = AlphaSingle; /***/ }), -/* 253 */ +/* 267 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -55640,12 +56504,12 @@ module.exports = FindClosestInSorted; /***/ }), -/* 254 */ +/* 268 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -55814,12 +56678,12 @@ module.exports = AnimationFrame; /***/ }), -/* 255 */ +/* 269 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -55936,12 +56800,12 @@ module.exports = BlendMode; /***/ }), -/* 256 */ +/* 270 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -56029,17 +56893,17 @@ module.exports = Depth; /***/ }), -/* 257 */ +/* 271 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetPoint = __webpack_require__(147); -var Perimeter = __webpack_require__(110); +var GetPoint = __webpack_require__(149); +var Perimeter = __webpack_require__(112); // Return an array of points from the perimeter of the rectangle // each spaced out based on the quantity or step required @@ -56083,12 +56947,12 @@ module.exports = GetPoints; /***/ }), -/* 258 */ +/* 272 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -56122,12 +56986,12 @@ module.exports = GetPoint; /***/ }), -/* 259 */ +/* 273 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -56162,17 +57026,17 @@ module.exports = RotateAround; /***/ }), -/* 260 */ +/* 274 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapMask = __webpack_require__(261); -var GeometryMask = __webpack_require__(262); +var BitmapMask = __webpack_require__(275); +var GeometryMask = __webpack_require__(276); /** * Provides methods used for getting and setting the mask of a Game Object. @@ -56309,12 +57173,12 @@ module.exports = Mask; /***/ }), -/* 261 */ +/* 275 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -56602,12 +57466,12 @@ module.exports = BitmapMask; /***/ }), -/* 262 */ +/* 276 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -56917,12 +57781,12 @@ module.exports = GeometryMask; /***/ }), -/* 263 */ +/* 277 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -57024,12 +57888,12 @@ module.exports = ScrollFactor; /***/ }), -/* 264 */ +/* 278 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -57085,19 +57949,19 @@ module.exports = ToJSON; /***/ }), -/* 265 */ +/* 279 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var MATH_CONST = __webpack_require__(13); var TransformMatrix = __webpack_require__(32); -var WrapAngle = __webpack_require__(231); -var WrapAngleDegrees = __webpack_require__(232); +var WrapAngle = __webpack_require__(232); +var WrapAngleDegrees = __webpack_require__(233); // global bitmask flag for GameObject.renderMask (used by Scale) var _FLAG = 4; // 0100 @@ -57113,7 +57977,7 @@ var Transform = { /** * Private internal value. Holds the horizontal scale value. - * + * * @name Phaser.GameObjects.Components.Transform#_scaleX * @type {number} * @private @@ -57124,7 +57988,7 @@ var Transform = { /** * Private internal value. Holds the vertical scale value. - * + * * @name Phaser.GameObjects.Components.Transform#_scaleY * @type {number} * @private @@ -57135,7 +57999,7 @@ var Transform = { /** * Private internal value. Holds the rotation value in radians. - * + * * @name Phaser.GameObjects.Components.Transform#_rotation * @type {number} * @private @@ -57166,7 +58030,9 @@ var Transform = { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. * * @name Phaser.GameObjects.Components.Transform#z * @type {number} @@ -57188,7 +58054,7 @@ var Transform = { /** * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`. - * + * * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this * isn't the case, use the `scaleX` or `scaleY` properties instead. * @@ -57285,7 +58151,7 @@ var Transform = { /** * The angle of this Game Object as expressed in degrees. - * + * * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left * and -90 is up. * @@ -57312,7 +58178,7 @@ var Transform = { /** * The angle of this Game Object in radians. - * + * * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left * and -90 is up. * @@ -57368,7 +58234,7 @@ var Transform = { /** * Sets the position of this Game Object to be a random position within the confines of * the given area. - * + * * If no area is specified a random position between 0 x 0 and the game width x height is used instead. * * The position does not factor in the size of this Game Object, meaning that only the origin is @@ -57498,6 +58364,9 @@ var Transform = { /** * Sets the z position of this Game Object. * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. + * * @method Phaser.GameObjects.Components.Transform#setZ * @since 3.0.0 * @@ -57589,7 +58458,7 @@ var Transform = { /** * Gets the sum total rotation of all of this Game Objects parent Containers. - * + * * The returned value is in radians and will be zero if this Game Object has no parent container. * * @method Phaser.GameObjects.Components.Transform#getParentRotation @@ -57619,12 +58488,12 @@ module.exports = Transform; /***/ }), -/* 266 */ +/* 280 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -57708,12 +58577,12 @@ module.exports = Visible; /***/ }), -/* 267 */ +/* 281 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -57723,25 +58592,25 @@ module.exports = Visible; module.exports = { - CHANGE_DATA: __webpack_require__(553), - CHANGE_DATA_KEY: __webpack_require__(554), - REMOVE_DATA: __webpack_require__(555), - SET_DATA: __webpack_require__(556) + CHANGE_DATA: __webpack_require__(572), + CHANGE_DATA_KEY: __webpack_require__(573), + REMOVE_DATA: __webpack_require__(574), + SET_DATA: __webpack_require__(575) }; /***/ }), -/* 268 */ +/* 282 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Perimeter = __webpack_require__(110); +var Perimeter = __webpack_require__(112); var Point = __webpack_require__(4); @@ -57851,12 +58720,12 @@ module.exports = MarchingAnts; /***/ }), -/* 269 */ +/* 283 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -57891,12 +58760,12 @@ module.exports = RotateLeft; /***/ }), -/* 270 */ +/* 284 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -57931,12 +58800,12 @@ module.exports = RotateRight; /***/ }), -/* 271 */ +/* 285 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -57950,9 +58819,9 @@ module.exports = RotateRight; * * @param {Phaser.Geom.Line} line - The line. * @param {integer} [stepRate=1] - The optional step rate for the points on the line. - * @param {array} [results] - An optional array to push the resulting coordinates into. + * @param {Phaser.Types.Math.Vector2Like[]} [results] - An optional array to push the resulting coordinates into. * - * @return {object[]} The array of coordinates on the line. + * @return {Phaser.Types.Math.Vector2Like[]} The array of coordinates on the line. */ var BresenhamPoints = function (line, stepRate, results) { @@ -58005,23 +58874,23 @@ module.exports = BresenhamPoints; /***/ }), -/* 272 */ +/* 286 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Animation = __webpack_require__(146); +var Animation = __webpack_require__(148); var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(157); +var CustomMap = __webpack_require__(159); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(109); +var Events = __webpack_require__(111); var GameEvents = __webpack_require__(18); var GetValue = __webpack_require__(6); -var Pad = __webpack_require__(158); +var Pad = __webpack_require__(160); /** * @classdesc @@ -58654,19 +59523,19 @@ module.exports = AnimationManager; /***/ }), -/* 273 */ +/* 287 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(157); +var CustomMap = __webpack_require__(159); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(274); +var Events = __webpack_require__(288); /** * @classdesc @@ -58840,12 +59709,12 @@ module.exports = BaseCache; /***/ }), -/* 274 */ +/* 288 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -58855,23 +59724,23 @@ module.exports = BaseCache; module.exports = { - ADD: __webpack_require__(615), - REMOVE: __webpack_require__(616) + ADD: __webpack_require__(634), + REMOVE: __webpack_require__(635) }; /***/ }), -/* 275 */ +/* 289 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseCache = __webpack_require__(273); +var BaseCache = __webpack_require__(287); var Class = __webpack_require__(0); var GameEvents = __webpack_require__(18); @@ -59096,23 +59965,23 @@ module.exports = CacheManager; /***/ }), -/* 276 */ +/* 290 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BaseCamera = __webpack_require__(91); var CanvasPool = __webpack_require__(26); -var CenterOn = __webpack_require__(163); -var Clamp = __webpack_require__(23); +var CenterOn = __webpack_require__(165); +var Clamp = __webpack_require__(22); var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var Effects = __webpack_require__(284); -var Linear = __webpack_require__(113); +var Effects = __webpack_require__(298); +var Linear = __webpack_require__(115); var Rectangle = __webpack_require__(11); var Vector2 = __webpack_require__(3); @@ -60089,12 +60958,12 @@ module.exports = Camera; /***/ }), -/* 277 */ +/* 291 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -60142,12 +61011,12 @@ module.exports = HexStringToColor; /***/ }), -/* 278 */ +/* 292 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -60173,12 +61042,12 @@ module.exports = GetColor32; /***/ }), -/* 279 */ +/* 293 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -60253,17 +61122,17 @@ module.exports = RGBToHSV; /***/ }), -/* 280 */ +/* 294 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Color = __webpack_require__(33); -var IntegerToRGB = __webpack_require__(281); +var IntegerToRGB = __webpack_require__(295); /** * Converts the given color value into an instance of a Color object. @@ -60286,12 +61155,12 @@ module.exports = IntegerToColor; /***/ }), -/* 281 */ +/* 295 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -60334,12 +61203,12 @@ module.exports = IntegerToRGB; /***/ }), -/* 282 */ +/* 296 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -60364,12 +61233,12 @@ module.exports = ObjectToColor; /***/ }), -/* 283 */ +/* 297 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -60410,12 +61279,12 @@ module.exports = RGBStringToColor; /***/ }), -/* 284 */ +/* 298 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -60425,22 +61294,22 @@ module.exports = RGBStringToColor; module.exports = { - Fade: __webpack_require__(637), - Flash: __webpack_require__(638), - Pan: __webpack_require__(639), - Shake: __webpack_require__(672), - Zoom: __webpack_require__(673) + Fade: __webpack_require__(656), + Flash: __webpack_require__(657), + Pan: __webpack_require__(658), + Shake: __webpack_require__(691), + Zoom: __webpack_require__(692) }; /***/ }), -/* 285 */ +/* 299 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -60448,161 +61317,6 @@ module.exports = { * @namespace Phaser.Math.Easing.Back */ -module.exports = { - - In: __webpack_require__(640), - Out: __webpack_require__(641), - InOut: __webpack_require__(642) - -}; - - -/***/ }), -/* 286 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Bounce - */ - -module.exports = { - - In: __webpack_require__(643), - Out: __webpack_require__(644), - InOut: __webpack_require__(645) - -}; - - -/***/ }), -/* 287 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Circular - */ - -module.exports = { - - In: __webpack_require__(646), - Out: __webpack_require__(647), - InOut: __webpack_require__(648) - -}; - - -/***/ }), -/* 288 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Cubic - */ - -module.exports = { - - In: __webpack_require__(649), - Out: __webpack_require__(650), - InOut: __webpack_require__(651) - -}; - - -/***/ }), -/* 289 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Elastic - */ - -module.exports = { - - In: __webpack_require__(652), - Out: __webpack_require__(653), - InOut: __webpack_require__(654) - -}; - - -/***/ }), -/* 290 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Expo - */ - -module.exports = { - - In: __webpack_require__(655), - Out: __webpack_require__(656), - InOut: __webpack_require__(657) - -}; - - -/***/ }), -/* 291 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Linear - */ - -module.exports = __webpack_require__(658); - - -/***/ }), -/* 292 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Quadratic - */ - module.exports = { In: __webpack_require__(659), @@ -60613,17 +61327,17 @@ module.exports = { /***/ }), -/* 293 */ +/* 300 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * @namespace Phaser.Math.Easing.Quartic + * @namespace Phaser.Math.Easing.Bounce */ module.exports = { @@ -60636,17 +61350,17 @@ module.exports = { /***/ }), -/* 294 */ +/* 301 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * @namespace Phaser.Math.Easing.Quintic + * @namespace Phaser.Math.Easing.Circular */ module.exports = { @@ -60659,17 +61373,17 @@ module.exports = { /***/ }), -/* 295 */ +/* 302 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * @namespace Phaser.Math.Easing.Sine + * @namespace Phaser.Math.Easing.Cubic */ module.exports = { @@ -60682,12 +61396,167 @@ module.exports = { /***/ }), -/* 296 */ +/* 303 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Elastic + */ + +module.exports = { + + In: __webpack_require__(671), + Out: __webpack_require__(672), + InOut: __webpack_require__(673) + +}; + + +/***/ }), +/* 304 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Expo + */ + +module.exports = { + + In: __webpack_require__(674), + Out: __webpack_require__(675), + InOut: __webpack_require__(676) + +}; + + +/***/ }), +/* 305 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Linear + */ + +module.exports = __webpack_require__(677); + + +/***/ }), +/* 306 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Quadratic + */ + +module.exports = { + + In: __webpack_require__(678), + Out: __webpack_require__(679), + InOut: __webpack_require__(680) + +}; + + +/***/ }), +/* 307 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Quartic + */ + +module.exports = { + + In: __webpack_require__(681), + Out: __webpack_require__(682), + InOut: __webpack_require__(683) + +}; + + +/***/ }), +/* 308 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Quintic + */ + +module.exports = { + + In: __webpack_require__(684), + Out: __webpack_require__(685), + InOut: __webpack_require__(686) + +}; + + +/***/ }), +/* 309 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Sine + */ + +module.exports = { + + In: __webpack_require__(687), + Out: __webpack_require__(688), + InOut: __webpack_require__(689) + +}; + + +/***/ }), +/* 310 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -60695,29 +61564,29 @@ module.exports = { * @namespace Phaser.Math.Easing.Stepped */ -module.exports = __webpack_require__(671); +module.exports = __webpack_require__(690); /***/ }), -/* 297 */ +/* 311 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var CONST = __webpack_require__(29); -var Device = __webpack_require__(298); +var Device = __webpack_require__(312); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); var IsPlainObject = __webpack_require__(7); -var PhaserMath = __webpack_require__(166); +var PhaserMath = __webpack_require__(168); var NOOP = __webpack_require__(1); -var DefaultPlugins = __webpack_require__(172); -var ValueToColor = __webpack_require__(159); +var DefaultPlugins = __webpack_require__(173); +var ValueToColor = __webpack_require__(161); /** * @classdesc @@ -61275,12 +62144,12 @@ module.exports = Config; /***/ }), -/* 298 */ +/* 312 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61309,25 +62178,25 @@ module.exports = Config; module.exports = { - os: __webpack_require__(114), - browser: __webpack_require__(115), - features: __webpack_require__(165), - input: __webpack_require__(702), - audio: __webpack_require__(703), - video: __webpack_require__(704), - fullscreen: __webpack_require__(705), - canvasFeatures: __webpack_require__(299) + os: __webpack_require__(116), + browser: __webpack_require__(117), + features: __webpack_require__(167), + input: __webpack_require__(721), + audio: __webpack_require__(722), + video: __webpack_require__(723), + fullscreen: __webpack_require__(724), + canvasFeatures: __webpack_require__(313) }; /***/ }), -/* 299 */ +/* 313 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61436,12 +62305,12 @@ module.exports = init(); /***/ }), -/* 300 */ +/* 314 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61467,12 +62336,12 @@ module.exports = Between; /***/ }), -/* 301 */ +/* 315 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61504,12 +62373,12 @@ module.exports = Normalize; /***/ }), -/* 302 */ +/* 316 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61538,12 +62407,12 @@ module.exports = DistanceSquared; /***/ }), -/* 303 */ +/* 317 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61572,12 +62441,12 @@ module.exports = GreaterThan; /***/ }), -/* 304 */ +/* 318 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61606,16 +62475,16 @@ module.exports = LessThan; /***/ }), -/* 305 */ +/* 319 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Factorial = __webpack_require__(306); +var Factorial = __webpack_require__(320); /** * [description] @@ -61637,12 +62506,12 @@ module.exports = Bernstein; /***/ }), -/* 306 */ +/* 320 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61677,12 +62546,12 @@ module.exports = Factorial; /***/ }), -/* 307 */ +/* 321 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61747,12 +62616,12 @@ module.exports = CubicBezierInterpolation; /***/ }), -/* 308 */ +/* 322 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61806,16 +62675,16 @@ module.exports = QuadraticBezierInterpolation; /***/ }), -/* 309 */ +/* 323 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmoothStep = __webpack_require__(156); +var SmoothStep = __webpack_require__(158); /** * A Smooth Step interpolation method. @@ -61839,12 +62708,12 @@ module.exports = SmoothStepInterpolation; /***/ }), -/* 310 */ +/* 324 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61869,12 +62738,12 @@ module.exports = GetPowerOfTwo; /***/ }), -/* 311 */ +/* 325 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61913,12 +62782,12 @@ module.exports = SnapCeil; /***/ }), -/* 312 */ +/* 326 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61942,12 +62811,12 @@ module.exports = FloatBetween; /***/ }), -/* 313 */ +/* 327 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61977,12 +62846,12 @@ module.exports = Rotate; /***/ }), -/* 314 */ +/* 328 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -62006,12 +62875,12 @@ module.exports = RoundAwayFromZero; /***/ }), -/* 315 */ +/* 329 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -62061,12 +62930,12 @@ module.exports = TransformXY; /***/ }), -/* 316 */ +/* 330 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -62606,12 +63475,12 @@ module.exports = Vector4; /***/ }), -/* 317 */ +/* 331 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -63199,12 +64068,12 @@ module.exports = Matrix3; /***/ }), -/* 318 */ +/* 332 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64661,12 +65530,12 @@ module.exports = Matrix4; /***/ }), -/* 319 */ +/* 333 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64674,8 +65543,8 @@ module.exports = Matrix4; // and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl var Class = __webpack_require__(0); -var Vector3 = __webpack_require__(171); -var Matrix3 = __webpack_require__(317); +var Vector3 = __webpack_require__(172); +var Matrix3 = __webpack_require__(331); var EPSILON = 0.000001; @@ -65433,19 +66302,19 @@ module.exports = Quaternion; /***/ }), -/* 320 */ +/* 334 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CanvasInterpolation = __webpack_require__(321); +var CanvasInterpolation = __webpack_require__(335); var CanvasPool = __webpack_require__(26); var CONST = __webpack_require__(29); -var Features = __webpack_require__(165); +var Features = __webpack_require__(167); /** * Called automatically by Phaser.Game and responsible for creating the renderer it will use. @@ -65535,8 +66404,8 @@ var CreateRenderer = function (game) if (true) { - CanvasRenderer = __webpack_require__(485); - WebGLRenderer = __webpack_require__(488); + CanvasRenderer = __webpack_require__(499); + WebGLRenderer = __webpack_require__(502); // Let the config pick the renderer type, as both are included if (config.renderType === CONST.WEBGL) @@ -65561,12 +66430,12 @@ module.exports = CreateRenderer; /***/ }), -/* 321 */ +/* 335 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -65624,12 +66493,12 @@ module.exports = CanvasInterpolation; /***/ }), -/* 322 */ +/* 336 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -65754,34 +66623,36 @@ module.exports = DebugHeader; /***/ }), -/* 323 */ +/* 337 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var GetValue = __webpack_require__(6); var NOOP = __webpack_require__(1); -var RequestAnimationFrame = __webpack_require__(324); - -// Frame Rate config -// fps: { -// min: 10, -// target: 60, -// forceSetTimeOut: false, -// deltaHistory: 10, -// panicMax: 120 -// } +var RequestAnimationFrame = __webpack_require__(338); // http://www.testufo.com/#test=animation-time-graph /** * @classdesc - * [description] + * The core runner class that Phaser uses to handle the game loop. It can use either Request Animation Frame, + * or SetTimeout, based on browser support and config settings, to create a continuous loop within the browser. + * + * Each time the loop fires, `TimeStep.step` is called and this is then passed onto the core Game update loop, + * it is the core heartbeat of your game. It will fire as often as Request Animation Frame is capable of handling + * on the target device. + * + * Note that there are lots of situations where a browser will stop updating your game. Such as if the player + * switches tabs, or covers up the browser window with another application. In these cases, the 'heartbeat' + * of your game will pause, and only resume when focus is returned to it by the player. There is no way to avoid + * this situation, all you can do is use the visibility events the browser, and Phaser, provide to detect when + * it has happened and then gracefully recover. * * @class TimeStep * @memberof Phaser.Core @@ -65808,7 +66679,7 @@ var TimeStep = new Class({ this.game = game; /** - * [description] + * The Request Animation Frame DOM Event handler. * * @name Phaser.Core.TimeStep#raf * @type {Phaser.DOM.RequestAnimationFrame} @@ -65900,7 +66771,8 @@ var TimeStep = new Class({ this.actualFps = this.targetFps; /** - * [description] + * The time at which the next fps rate update will take place. + * When an fps update happens, the `framesThisSecond` value is reset. * * @name Phaser.Core.TimeStep#nextFpsUpdate * @type {integer} @@ -66097,6 +66969,22 @@ var TimeStep = new Class({ * @since 3.18.0 */ this.now = 0; + + /** + * Apply smoothing to the delta value used within Phasers internal calculations? + * + * This can be changed in the Game Config via the `fps.smoothStep` property. The default is `true`. + * + * Smoothing helps settle down the delta values after browser tab switches, or other situations + * which could cause significant delta spikes or dips. By default it has been enabled in Phaser 3 + * since the first version, but is now exposed under this property (and the corresponding game config + * `smoothStep` value), to allow you to easily disable it, should you require. + * + * @name Phaser.Core.TimeStep#smoothStep + * @type {boolean} + * @since 3.22.0 + */ + this.smoothStep = GetValue(config, 'smoothStep', true); }, /** @@ -66220,7 +67108,7 @@ var TimeStep = new Class({ step: function () { // Because the timestamp passed in from raf represents the beginning of the main thread frame that we’re currently in, - // not the actual time now. As we want to compare this time value against Event timeStamps and the like, we need a + // not the actual time now, and as we want to compare this time value against Event timeStamps and the like, we need a // more accurate one: var time = window.performance.now(); @@ -66244,55 +67132,59 @@ var TimeStep = new Class({ // delta time (time is in ms) var dt = before; + // Delta Average + var avg = before; + // When a browser switches tab, then comes back again, it takes around 10 frames before // the delta time settles down so we employ a 'cooling down' period before we start // trusting the delta values again, to avoid spikes flooding through our delta average - if (this._coolDown > 0 || !this.inFocus) + if (this.smoothStep) { - this._coolDown--; - - dt = Math.min(dt, this._target); + if (this._coolDown > 0 || !this.inFocus) + { + this._coolDown--; + + dt = Math.min(dt, this._target); + } + + if (dt > this._min) + { + // Probably super bad start time or browser tab context loss, + // so use the last 'sane' dt value + + dt = history[idx]; + + // Clamp delta to min (in case history has become corrupted somehow) + dt = Math.min(dt, this._min); + } + + // Smooth out the delta over the previous X frames + + // add the delta to the smoothing array + history[idx] = dt; + + // adjusts the delta history array index based on the smoothing count + // this stops the array growing beyond the size of deltaSmoothingMax + this.deltaIndex++; + + if (this.deltaIndex > max) + { + this.deltaIndex = 0; + } + + // Loop the history array, adding the delta values together + avg = 0; + + for (var i = 0; i < max; i++) + { + avg += history[i]; + } + + // Then divide by the array length to get the average delta + avg /= max; } - if (dt > this._min) - { - // Probably super bad start time or browser tab context loss, - // so use the last 'sane' dt value - - dt = history[idx]; - - // Clamp delta to min (in case history has become corrupted somehow) - dt = Math.min(dt, this._min); - } - - // Smooth out the delta over the previous X frames - - // add the delta to the smoothing array - history[idx] = dt; - - // adjusts the delta history array index based on the smoothing count - // this stops the array growing beyond the size of deltaSmoothingMax - this.deltaIndex++; - - if (this.deltaIndex > max) - { - this.deltaIndex = 0; - } - - // Delta Average - var avg = 0; - - // Loop the history array, adding the delta values together - - for (var i = 0; i < max; i++) - { - avg += history[i]; - } - - // Then divide by the array length to get the average delta - avg /= max; - // Set as the world delta value this.delta = avg; @@ -66426,7 +67318,7 @@ var TimeStep = new Class({ * @method Phaser.Core.TimeStep#stop * @since 3.0.0 * - * @return {Phaser.Core.TimeStep} The TimeStep object. + * @return {this} The TimeStep object. */ stop: function () { @@ -66461,12 +67353,12 @@ module.exports = TimeStep; /***/ }), -/* 324 */ +/* 338 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -66675,12 +67567,12 @@ module.exports = RequestAnimationFrame; /***/ }), -/* 325 */ +/* 339 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -66766,16 +67658,16 @@ module.exports = VisibilityHandler; /***/ }), -/* 326 */ +/* 340 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Arne16 = __webpack_require__(327); +var Arne16 = __webpack_require__(341); var CanvasPool = __webpack_require__(26); var GetValue = __webpack_require__(6); @@ -66860,12 +67752,12 @@ module.exports = GenerateTexture; /***/ }), -/* 327 */ +/* 341 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -66898,19 +67790,19 @@ module.exports = { /***/ }), -/* 328 */ +/* 342 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) var Class = __webpack_require__(0); -var CubicBezier = __webpack_require__(307); +var CubicBezier = __webpack_require__(321); var Curve = __webpack_require__(80); var Vector2 = __webpack_require__(3); @@ -67125,12 +68017,12 @@ module.exports = CubicBezierCurve; /***/ }), -/* 329 */ +/* 343 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67140,7 +68032,7 @@ var Class = __webpack_require__(0); var Curve = __webpack_require__(80); var DegToRad = __webpack_require__(35); var GetValue = __webpack_require__(6); -var RadToDeg = __webpack_require__(170); +var RadToDeg = __webpack_require__(171); var Vector2 = __webpack_require__(3); /** @@ -67749,12 +68641,12 @@ module.exports = EllipseCurve; /***/ }), -/* 330 */ +/* 344 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67762,7 +68654,7 @@ module.exports = EllipseCurve; var Class = __webpack_require__(0); var Curve = __webpack_require__(80); -var FromPoints = __webpack_require__(173); +var FromPoints = __webpack_require__(174); var Rectangle = __webpack_require__(11); var Vector2 = __webpack_require__(3); @@ -67948,6 +68840,42 @@ var LineCurve = new Class({ return tangent.normalize(); }, + // Override default Curve.getUtoTmapping + + /** + * [description] + * + * @method Phaser.Curves.Line#getUtoTmapping + * @since 3.0.0 + * + * @param {number} u - [description] + * @param {integer} distance - [description] + * @param {integer} [divisions] - [description] + * + * @return {number} [description] + */ + getUtoTmapping: function (u, distance, divisions) + { + var t; + + if (distance) + { + var arcLengths = this.getLengths(divisions); + var lineLength = arcLengths[arcLengths.length - 1]; + + // Cannot overshoot the curve + var targetLineLength = Math.min(distance, lineLength); + + t = targetLineLength / lineLength; + } + else + { + t = u; + } + + return t; + }, + // Override default Curve.draw because this is better than calling getPoints on a line! /** @@ -68018,18 +68946,18 @@ module.exports = LineCurve; /***/ }), -/* 331 */ +/* 345 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Curve = __webpack_require__(80); -var QuadraticBezierInterpolation = __webpack_require__(308); +var QuadraticBezierInterpolation = __webpack_require__(322); var Vector2 = __webpack_require__(3); /** @@ -68232,25 +69160,25 @@ module.exports = QuadraticBezier; /***/ }), -/* 332 */ +/* 346 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) -var CatmullRom = __webpack_require__(168); +var CatmullRom = __webpack_require__(169); var Class = __webpack_require__(0); var Curve = __webpack_require__(80); var Vector2 = __webpack_require__(3); /** * @classdesc - * [description] + * Create a smooth 2d spline curve from a series of points. * * @class Spline * @extends Phaser.Curves.Curve @@ -68258,7 +69186,7 @@ var Vector2 = __webpack_require__(3); * @constructor * @since 3.0.0 * - * @param {Phaser.Math.Vector2[]} [points] - [description] + * @param {(Phaser.Math.Vector2[]|number[]|number[][])} [points] - The points that configure the curve. */ var SplineCurve = new Class({ @@ -68273,7 +69201,7 @@ var SplineCurve = new Class({ Curve.call(this, 'SplineCurve'); /** - * [description] + * The Vector2 points that configure the curve. * * @name Phaser.Curves.Spline#points * @type {Phaser.Math.Vector2[]} @@ -68286,12 +69214,12 @@ var SplineCurve = new Class({ }, /** - * [description] + * Add a list of points to the current list of Vector2 points of the curve. * * @method Phaser.Curves.Spline#addPoints * @since 3.0.0 * - * @param {(Phaser.Math.Vector2[]|number[]|number[][])} points - [description] + * @param {(Phaser.Math.Vector2[]|number[]|number[][])} points - The points that configure the curve. * * @return {Phaser.Curves.Spline} This curve object. */ @@ -68326,15 +69254,15 @@ var SplineCurve = new Class({ }, /** - * [description] + * Add a point to the current list of Vector2 points of the curve. * * @method Phaser.Curves.Spline#addPoint * @since 3.0.0 * - * @param {number} x - [description] - * @param {number} y - [description] + * @param {number} x - The x coordinate of this curve + * @param {number} y - The y coordinate of this curve * - * @return {Phaser.Math.Vector2} [description] + * @return {Phaser.Math.Vector2} The new Vector2 added to the curve */ addPoint: function (x, y) { @@ -68413,7 +69341,7 @@ var SplineCurve = new Class({ }, /** - * [description] + * Exports a JSON object containing this curve data. * * @method Phaser.Curves.Spline#toJSON * @since 3.0.0 @@ -68439,14 +69367,14 @@ var SplineCurve = new Class({ }); /** - * [description] + * Imports a JSON object containing this curve data. * * @function Phaser.Curves.Spline.fromJSON * @since 3.0.0 * * @param {Phaser.Types.Curves.JSONCurve} data - The JSON object containing this curve data. * - * @return {Phaser.Curves.Spline} [description] + * @return {Phaser.Curves.Spline} The spline curve created. */ SplineCurve.fromJSON = function (data) { @@ -68457,12 +69385,12 @@ module.exports = SplineCurve; /***/ }), -/* 333 */ +/* 347 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68581,46 +69509,46 @@ module.exports = BaseShader; /***/ }), -/* 334 */ +/* 348 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Color = __webpack_require__(33); -Color.ColorToRGBA = __webpack_require__(791); -Color.ComponentToHex = __webpack_require__(335); -Color.GetColor = __webpack_require__(160); -Color.GetColor32 = __webpack_require__(278); -Color.HexStringToColor = __webpack_require__(277); -Color.HSLToColor = __webpack_require__(792); -Color.HSVColorWheel = __webpack_require__(793); -Color.HSVToRGB = __webpack_require__(161); -Color.HueToComponent = __webpack_require__(336); -Color.IntegerToColor = __webpack_require__(280); -Color.IntegerToRGB = __webpack_require__(281); -Color.Interpolate = __webpack_require__(794); -Color.ObjectToColor = __webpack_require__(282); -Color.RandomRGB = __webpack_require__(795); -Color.RGBStringToColor = __webpack_require__(283); -Color.RGBToHSV = __webpack_require__(279); -Color.RGBToString = __webpack_require__(796); -Color.ValueToColor = __webpack_require__(159); +Color.ColorToRGBA = __webpack_require__(802); +Color.ComponentToHex = __webpack_require__(349); +Color.GetColor = __webpack_require__(162); +Color.GetColor32 = __webpack_require__(292); +Color.HexStringToColor = __webpack_require__(291); +Color.HSLToColor = __webpack_require__(803); +Color.HSVColorWheel = __webpack_require__(804); +Color.HSVToRGB = __webpack_require__(163); +Color.HueToComponent = __webpack_require__(350); +Color.IntegerToColor = __webpack_require__(294); +Color.IntegerToRGB = __webpack_require__(295); +Color.Interpolate = __webpack_require__(805); +Color.ObjectToColor = __webpack_require__(296); +Color.RandomRGB = __webpack_require__(806); +Color.RGBStringToColor = __webpack_require__(297); +Color.RGBToHSV = __webpack_require__(293); +Color.RGBToString = __webpack_require__(807); +Color.ValueToColor = __webpack_require__(161); module.exports = Color; /***/ }), -/* 335 */ +/* 349 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68645,12 +69573,12 @@ module.exports = ComponentToHex; /***/ }), -/* 336 */ +/* 350 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68701,16 +69629,16 @@ module.exports = HueToComponent; /***/ }), -/* 337 */ +/* 351 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(114); +var OS = __webpack_require__(116); /** * @callback ContentLoadedCallback @@ -68764,16 +69692,16 @@ module.exports = DOMContentLoaded; /***/ }), -/* 338 */ +/* 352 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(174); +var CONST = __webpack_require__(175); /** * Attempts to determine the screen orientation using the Orientation API. @@ -68830,12 +69758,12 @@ module.exports = GetScreenOrientation; /***/ }), -/* 339 */ +/* 353 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68916,12 +69844,12 @@ module.exports = { /***/ }), -/* 340 */ +/* 354 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68969,12 +69897,12 @@ module.exports = { /***/ }), -/* 341 */ +/* 355 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69067,12 +69995,12 @@ module.exports = { /***/ }), -/* 342 */ +/* 356 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69141,12 +70069,12 @@ module.exports = { /***/ }), -/* 343 */ +/* 357 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69192,12 +70120,12 @@ module.exports = GetTarget; /***/ }), -/* 344 */ +/* 358 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69249,26 +70177,26 @@ module.exports = ParseXML; /***/ }), -/* 345 */ +/* 359 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(176); +var CONST = __webpack_require__(177); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(53); +var Events = __webpack_require__(54); var GameEvents = __webpack_require__(18); -var Keyboard = __webpack_require__(346); -var Mouse = __webpack_require__(347); -var Pointer = __webpack_require__(348); -var Touch = __webpack_require__(349); +var Keyboard = __webpack_require__(360); +var Mouse = __webpack_require__(361); +var Pointer = __webpack_require__(362); +var Touch = __webpack_require__(363); var TransformMatrix = __webpack_require__(32); -var TransformXY = __webpack_require__(315); +var TransformXY = __webpack_require__(329); /** * @classdesc @@ -70331,20 +71259,20 @@ module.exports = InputManager; /***/ }), -/* 346 */ +/* 360 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayRemove = __webpack_require__(119); +var ArrayRemove = __webpack_require__(121); var Class = __webpack_require__(0); var GameEvents = __webpack_require__(18); -var InputEvents = __webpack_require__(53); -var KeyCodes = __webpack_require__(120); +var InputEvents = __webpack_require__(54); +var KeyCodes = __webpack_require__(122); var NOOP = __webpack_require__(0); /** @@ -70781,18 +71709,18 @@ module.exports = KeyboardManager; /***/ }), -/* 347 */ +/* 361 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Features = __webpack_require__(165); -var InputEvents = __webpack_require__(53); +var Features = __webpack_require__(167); +var InputEvents = __webpack_require__(54); var NOOP = __webpack_require__(0); // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent @@ -71267,20 +72195,20 @@ module.exports = MouseManager; /***/ }), -/* 348 */ +/* 362 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Angle = __webpack_require__(300); +var Angle = __webpack_require__(314); var Class = __webpack_require__(0); -var Distance = __webpack_require__(58); -var FuzzyEqual = __webpack_require__(167); -var SmoothStepInterpolation = __webpack_require__(309); +var Distance = __webpack_require__(53); +var FuzzyEqual = __webpack_require__(144); +var SmoothStepInterpolation = __webpack_require__(323); var Vector2 = __webpack_require__(3); /** @@ -72545,17 +73473,17 @@ module.exports = Pointer; /***/ }), -/* 349 */ +/* 363 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var InputEvents = __webpack_require__(53); +var InputEvents = __webpack_require__(54); var NOOP = __webpack_require__(1); // https://developer.mozilla.org/en-US/docs/Web/API/Touch_events @@ -72958,12 +73886,12 @@ module.exports = TouchManager; /***/ }), -/* 350 */ +/* 364 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72974,8 +73902,8 @@ var FileTypesManager = __webpack_require__(8); var GameObjectCreator = __webpack_require__(16); var GameObjectFactory = __webpack_require__(5); var GetFastValue = __webpack_require__(2); -var PluginCache = __webpack_require__(21); -var Remove = __webpack_require__(119); +var PluginCache = __webpack_require__(23); +var Remove = __webpack_require__(121); /** * @classdesc @@ -73860,26 +74788,26 @@ module.exports = PluginManager; /***/ }), -/* 351 */ +/* 365 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(174); +var CONST = __webpack_require__(175); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); var Events = __webpack_require__(92); var GameEvents = __webpack_require__(18); -var GetInnerHeight = __webpack_require__(849); -var GetTarget = __webpack_require__(343); -var GetScreenOrientation = __webpack_require__(338); +var GetInnerHeight = __webpack_require__(860); +var GetTarget = __webpack_require__(357); +var GetScreenOrientation = __webpack_require__(352); var NOOP = __webpack_require__(1); var Rectangle = __webpack_require__(11); -var Size = __webpack_require__(352); +var Size = __webpack_require__(366); var SnapFloor = __webpack_require__(93); var Vector2 = __webpack_require__(3); @@ -74211,16 +75139,6 @@ var ScaleManager = new Class({ */ this._createdFullscreenTarget = false; - /** - * Internal var that keeps track of the user, or the browser, requesting fullscreen changes. - * - * @name Phaser.Scale.ScaleManager#_requestedFullscreenChange - * @type {boolean} - * @private - * @since 3.16.2 - */ - this._requestedFullscreenChange = false; - /** * The dirty state of the Scale Manager. * Set if there is a change between the parent size and the current size. @@ -74339,6 +75257,7 @@ var ScaleManager = new Class({ } game.events.on(GameEvents.PRE_STEP, this.step, this); + game.events.once(GameEvents.DESTROY, this.destroy, this); this.startListeners(); }, @@ -75103,8 +76022,6 @@ var ScaleManager = new Class({ { var fsTarget = this.getFullscreenTarget(); - this._requestedFullscreenChange = true; - var fsPromise; if (fullscreen.keyboard) @@ -75247,8 +76164,6 @@ var ScaleManager = new Class({ if (fullscreen.active) { - this._requestedFullscreenChange = true; - document[fullscreen.cancel](); } @@ -75355,12 +76270,10 @@ var ScaleManager = new Class({ onFullScreenChange: function () { // They pressed ESC while in fullscreen mode - if (!this._requestedFullscreenChange) + if (!(document.fullscreenElement || document.webkitFullscreenElement || document.msFullscreenElement || document.mozFullScreenElement)) { this.stopFullscreen(); } - - this._requestedFullscreenChange = false; }, /** @@ -75592,16 +76505,16 @@ module.exports = ScaleManager; /***/ }), -/* 352 */ +/* 366 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(23); +var Clamp = __webpack_require__(22); var Class = __webpack_require__(0); var SnapFloor = __webpack_require__(93); var Vector2 = __webpack_require__(3); @@ -76370,24 +77283,24 @@ module.exports = Size; /***/ }), -/* 353 */ +/* 367 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(121); -var Events = __webpack_require__(22); +var CONST = __webpack_require__(123); +var Events = __webpack_require__(19); var GameEvents = __webpack_require__(18); var GetValue = __webpack_require__(6); var LoaderEvents = __webpack_require__(81); var NOOP = __webpack_require__(1); -var Scene = __webpack_require__(354); -var Systems = __webpack_require__(177); +var Scene = __webpack_require__(368); +var Systems = __webpack_require__(178); /** * @classdesc @@ -78010,17 +78923,17 @@ module.exports = SceneManager; /***/ }), -/* 354 */ +/* 368 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Systems = __webpack_require__(177); +var Systems = __webpack_require__(178); /** * @classdesc @@ -78306,19 +79219,19 @@ module.exports = Scene; /***/ }), -/* 355 */ +/* 369 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(121); +var CONST = __webpack_require__(123); var GetValue = __webpack_require__(6); -var Merge = __webpack_require__(106); -var InjectionMap = __webpack_require__(862); +var Merge = __webpack_require__(107); +var InjectionMap = __webpack_require__(873); /** * @namespace Phaser.Scenes.Settings @@ -78402,27 +79315,27 @@ module.exports = Settings; /***/ }), -/* 356 */ +/* 370 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var CanvasPool = __webpack_require__(26); -var CanvasTexture = __webpack_require__(357); +var CanvasTexture = __webpack_require__(371); var Class = __webpack_require__(0); var Color = __webpack_require__(33); var CONST = __webpack_require__(29); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(117); +var Events = __webpack_require__(119); var GameEvents = __webpack_require__(18); -var GenerateTexture = __webpack_require__(326); +var GenerateTexture = __webpack_require__(340); var GetValue = __webpack_require__(6); -var Parser = __webpack_require__(359); -var Texture = __webpack_require__(179); +var Parser = __webpack_require__(373); +var Texture = __webpack_require__(180); /** * @callback EachTextureCallback @@ -79574,21 +80487,21 @@ module.exports = TextureManager; /***/ }), -/* 357 */ +/* 371 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Clamp = __webpack_require__(23); +var Clamp = __webpack_require__(22); var Color = __webpack_require__(33); var CONST = __webpack_require__(29); -var IsSizePowerOfTwo = __webpack_require__(116); -var Texture = __webpack_require__(179); +var IsSizePowerOfTwo = __webpack_require__(118); +var Texture = __webpack_require__(180); /** * @classdesc @@ -80205,19 +81118,19 @@ module.exports = CanvasTexture; /***/ }), -/* 358 */ +/* 372 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); -var IsSizePowerOfTwo = __webpack_require__(116); -var ScaleModes = __webpack_require__(230); +var IsSizePowerOfTwo = __webpack_require__(118); +var ScaleModes = __webpack_require__(231); /** * @classdesc @@ -80546,12 +81459,12 @@ module.exports = TextureSource; /***/ }), -/* 359 */ +/* 373 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80561,32 +81474,32 @@ module.exports = TextureSource; module.exports = { - AtlasXML: __webpack_require__(863), - Canvas: __webpack_require__(864), - Image: __webpack_require__(865), - JSONArray: __webpack_require__(866), - JSONHash: __webpack_require__(867), - SpriteSheet: __webpack_require__(868), - SpriteSheetFromAtlas: __webpack_require__(869), - UnityYAML: __webpack_require__(870) + AtlasXML: __webpack_require__(874), + Canvas: __webpack_require__(875), + Image: __webpack_require__(876), + JSONArray: __webpack_require__(877), + JSONHash: __webpack_require__(878), + SpriteSheet: __webpack_require__(879), + SpriteSheetFromAtlas: __webpack_require__(880), + UnityYAML: __webpack_require__(881) }; /***/ }), -/* 360 */ +/* 374 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HTML5AudioSoundManager = __webpack_require__(361); -var NoAudioSoundManager = __webpack_require__(363); -var WebAudioSoundManager = __webpack_require__(365); +var HTML5AudioSoundManager = __webpack_require__(375); +var NoAudioSoundManager = __webpack_require__(377); +var WebAudioSoundManager = __webpack_require__(379); /** * Creates a Web Audio, HTML5 Audio or No Audio Sound Manager based on config and device settings. @@ -80597,6 +81510,8 @@ var WebAudioSoundManager = __webpack_require__(365); * @since 3.0.0 * * @param {Phaser.Game} game - Reference to the current game instance. + * + * @return {(Phaser.Sound.HTML5AudioSoundManager|Phaser.Sound.WebAudioSoundManager|Phaser.Sound.NoAudioSoundManager)} The Sound Manager instance that was created. */ var SoundManagerCreator = { @@ -80624,20 +81539,20 @@ module.exports = SoundManagerCreator; /***/ }), -/* 361 */ +/* 375 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSoundManager = __webpack_require__(122); +var BaseSoundManager = __webpack_require__(124); var Class = __webpack_require__(0); var Events = __webpack_require__(59); -var HTML5AudioSound = __webpack_require__(362); +var HTML5AudioSound = __webpack_require__(376); /** * HTML5 Audio implementation of the Sound Manager. @@ -81089,17 +82004,17 @@ module.exports = HTML5AudioSoundManager; /***/ }), -/* 362 */ +/* 376 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(123); +var BaseSound = __webpack_require__(125); var Class = __webpack_require__(0); var Events = __webpack_require__(59); @@ -81141,9 +82056,7 @@ var HTML5AudioSound = new Class({ if (!this.tags) { - // eslint-disable-next-line no-console - console.warn('Audio cache entry missing: ' + key); - return; + throw new Error('There is no audio asset with key "' + key + '" in the audio cache'); } /** @@ -82016,20 +82929,20 @@ module.exports = HTML5AudioSound; /***/ }), -/* 363 */ +/* 377 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSoundManager = __webpack_require__(122); +var BaseSoundManager = __webpack_require__(124); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var NoAudioSound = __webpack_require__(364); +var NoAudioSound = __webpack_require__(378); var NOOP = __webpack_require__(1); /** @@ -82134,17 +83047,17 @@ module.exports = NoAudioSoundManager; /***/ }), -/* 364 */ +/* 378 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(123); +var BaseSound = __webpack_require__(125); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); var Extend = __webpack_require__(17); @@ -82261,21 +83174,21 @@ module.exports = NoAudioSound; /***/ }), -/* 365 */ +/* 379 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Base64ToArrayBuffer = __webpack_require__(366); -var BaseSoundManager = __webpack_require__(122); +var Base64ToArrayBuffer = __webpack_require__(380); +var BaseSoundManager = __webpack_require__(124); var Class = __webpack_require__(0); var Events = __webpack_require__(59); -var WebAudioSound = __webpack_require__(367); +var WebAudioSound = __webpack_require__(381); /** * @classdesc @@ -82720,13 +83633,13 @@ module.exports = WebAudioSoundManager; /***/ }), -/* 366 */ +/* 380 */ /***/ (function(module, exports) { /** * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82795,17 +83708,17 @@ module.exports = Base64ToArrayBuffer; /***/ }), -/* 367 */ +/* 381 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(123); +var BaseSound = __webpack_require__(125); var Class = __webpack_require__(0); var Events = __webpack_require__(59); @@ -82845,9 +83758,7 @@ var WebAudioSound = new Class({ if (!this.audioBuffer) { - // eslint-disable-next-line no-console - console.warn('Audio cache entry missing: ' + key); - return; + throw new Error('There is no audio asset with key "' + key + '" in the audio cache'); } /** @@ -83703,12 +84614,12 @@ module.exports = WebAudioSound; /***/ }), -/* 368 */ +/* 382 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83751,12 +84662,12 @@ module.exports = TransposeMatrix; /***/ }), -/* 369 */ +/* 383 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83873,17 +84784,17 @@ module.exports = QuickSelect; /***/ }), -/* 370 */ +/* 384 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetValue = __webpack_require__(6); -var Shuffle = __webpack_require__(112); +var Shuffle = __webpack_require__(114); var BuildChunk = function (a, b, qty) { @@ -84011,12 +84922,12 @@ module.exports = Range; /***/ }), -/* 371 */ +/* 385 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84100,12 +85011,12 @@ module.exports = BuildGameObjectAnimation; /***/ }), -/* 372 */ +/* 386 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84142,22 +85053,23 @@ module.exports = Union; /***/ }), -/* 373 */ +/* 387 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var DOMElementRender = __webpack_require__(939); +var DOMElementRender = __webpack_require__(950); var GameObject = __webpack_require__(14); var IsPlainObject = __webpack_require__(7); -var RemoveFromDOM = __webpack_require__(175); -var Vector4 = __webpack_require__(316); +var RemoveFromDOM = __webpack_require__(176); +var SCENE_EVENTS = __webpack_require__(19); +var Vector4 = __webpack_require__(330); /** * @classdesc @@ -84219,7 +85131,7 @@ var Vector4 = __webpack_require__(316); * @constructor * @since 3.17.0 * - * @extends Phaser.GameObjects.Components.Alpha + * @extends Phaser.GameObjects.Components.AlphaSingle * @extends Phaser.GameObjects.Components.BlendMode * @extends Phaser.GameObjects.Components.Depth * @extends Phaser.GameObjects.Components.Origin @@ -84239,7 +85151,7 @@ var DOMElement = new Class({ Extends: GameObject, Mixins: [ - Components.Alpha, + Components.AlphaSingle, Components.BlendMode, Components.Depth, Components.Origin, @@ -84427,6 +85339,29 @@ var DOMElement = new Class({ { this.setElement(element, style, innerText); } + + scene.sys.events.on(SCENE_EVENTS.SLEEP, this.handleSceneEvent, this); + scene.sys.events.on(SCENE_EVENTS.WAKE, this.handleSceneEvent, this); + }, + + /** + * Handles a Scene Sleep and Wake event. + * + * @method Phaser.GameObjects.DOMElement#handleSceneEvent + * @private + * @since 3.22.0 + * + * @param {Phaser.Scenes.Systems} sys - The Scene Systems. + */ + handleSceneEvent: function (sys) + { + var node = this.node; + var style = node.style; + + if (node) + { + style.display = (sys.settings.visible) ? 'block' : 'none'; + } }, /** @@ -85081,6 +86016,9 @@ var DOMElement = new Class({ preDestroy: function () { this.removeElement(); + + this.scene.sys.events.off(SCENE_EVENTS.SLEEP, this.handleSceneEvent, this); + this.scene.sys.events.off(SCENE_EVENTS.WAKE, this.handleSceneEvent, this); } }); @@ -85089,16 +86027,16 @@ module.exports = DOMElement; /***/ }), -/* 374 */ +/* 388 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CSSBlendModes = __webpack_require__(940); +var CSSBlendModes = __webpack_require__(951); var GameObject = __webpack_require__(14); /** @@ -85120,8 +86058,9 @@ var DOMElementCSSRenderer = function (renderer, src, interpolationPercentage, ca { var node = src.node; var style = node.style; + var settings = src.scene.sys.settings; - if (!node || !style || GameObject.RENDER_MASK !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || (src.parentContainer && !src.parentContainer.willRender())) + if (!node || !style || !settings.visible || GameObject.RENDER_MASK !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || (src.parentContainer && !src.parentContainer.willRender())) { if (node) { @@ -85210,19 +86149,19 @@ module.exports = DOMElementCSSRenderer; /***/ }), -/* 375 */ +/* 389 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var ExternRender = __webpack_require__(944); +var ExternRender = __webpack_require__(955); /** * @classdesc @@ -85306,16 +86245,16 @@ module.exports = Extern; /***/ }), -/* 376 */ +/* 390 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CircumferencePoint = __webpack_require__(190); +var CircumferencePoint = __webpack_require__(191); var FromPercent = __webpack_require__(87); var MATH_CONST = __webpack_require__(13); var Point = __webpack_require__(4); @@ -85349,17 +86288,17 @@ module.exports = GetPoint; /***/ }), -/* 377 */ +/* 391 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circumference = __webpack_require__(378); -var CircumferencePoint = __webpack_require__(190); +var Circumference = __webpack_require__(392); +var CircumferencePoint = __webpack_require__(191); var FromPercent = __webpack_require__(87); var MATH_CONST = __webpack_require__(13); @@ -85403,12 +86342,12 @@ module.exports = GetPoints; /***/ }), -/* 378 */ +/* 392 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -85435,16 +86374,16 @@ module.exports = Circumference; /***/ }), -/* 379 */ +/* 393 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Commands = __webpack_require__(189); +var Commands = __webpack_require__(190); var SetTransform = __webpack_require__(27); /** @@ -85685,12 +86624,12 @@ module.exports = GraphicsCanvasRenderer; /***/ }), -/* 380 */ +/* 394 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -85904,18 +86843,18 @@ module.exports = GravityWell; /***/ }), -/* 381 */ +/* 395 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var DegToRad = __webpack_require__(35); -var DistanceBetween = __webpack_require__(58); +var DistanceBetween = __webpack_require__(53); /** * @classdesc @@ -86473,31 +87412,31 @@ module.exports = Particle; /***/ }), -/* 382 */ +/* 396 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BlendModes = __webpack_require__(52); var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var DeathZone = __webpack_require__(383); -var EdgeZone = __webpack_require__(384); -var EmitterOp = __webpack_require__(956); +var DeathZone = __webpack_require__(397); +var EdgeZone = __webpack_require__(398); +var EmitterOp = __webpack_require__(967); var GetFastValue = __webpack_require__(2); -var GetRandom = __webpack_require__(182); -var HasAny = __webpack_require__(385); +var GetRandom = __webpack_require__(183); +var HasAny = __webpack_require__(399); var HasValue = __webpack_require__(99); -var Particle = __webpack_require__(381); -var RandomZone = __webpack_require__(386); +var Particle = __webpack_require__(395); +var RandomZone = __webpack_require__(400); var Rectangle = __webpack_require__(11); -var StableSort = __webpack_require__(126); +var StableSort = __webpack_require__(128); var Vector2 = __webpack_require__(3); -var Wrap = __webpack_require__(57); +var Wrap = __webpack_require__(58); /** * @classdesc @@ -87801,6 +88740,23 @@ var ParticleEmitter = new Class({ return this; }, + /** + * Sets the color tint of emitted particles. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#setTint + * @since 3.22.0 + * + * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - A value between 0 and 0xffffff. + * + * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + */ + setTint: function (value) + { + this.tint.onChange(value); + + return this; + }, + /** * Sets the angle of a {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle stream. * @@ -88260,6 +89216,21 @@ var ParticleEmitter = new Class({ return this; }, + /** + * Removes the emitter from its manager and the scene. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#remove + * @since 3.22.0 + * + * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + */ + remove: function () + { + this.manager.removeEmitter(this); + + return this; + }, + /** * Sorts active particles with {@link Phaser.GameObjects.Particles.ParticleEmitter#depthSortCallback}. * @@ -88512,12 +89483,12 @@ module.exports = ParticleEmitter; /***/ }), -/* 383 */ +/* 397 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -88590,12 +89561,12 @@ module.exports = DeathZone; /***/ }), -/* 384 */ +/* 398 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -88834,12 +89805,12 @@ module.exports = EdgeZone; /***/ }), -/* 385 */ +/* 399 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -88871,12 +89842,12 @@ module.exports = HasAny; /***/ }), -/* 386 */ +/* 400 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -88944,12 +89915,12 @@ module.exports = RandomZone; /***/ }), -/* 387 */ +/* 401 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89026,16 +89997,16 @@ module.exports = PathFollower; /***/ }), -/* 388 */ +/* 402 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcRender = __webpack_require__(979); +var ArcRender = __webpack_require__(990); var Class = __webpack_require__(0); var DegToRad = __webpack_require__(35); var Earcut = __webpack_require__(66); @@ -89435,17 +90406,17 @@ module.exports = Arc; /***/ }), -/* 389 */ +/* 403 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CurveRender = __webpack_require__(982); +var CurveRender = __webpack_require__(993); var Earcut = __webpack_require__(66); var Rectangle = __webpack_require__(11); var Shape = __webpack_require__(30); @@ -89617,18 +90588,18 @@ module.exports = Curve; /***/ }), -/* 390 */ +/* 404 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Earcut = __webpack_require__(66); -var EllipseRender = __webpack_require__(985); +var EllipseRender = __webpack_require__(996); var GeomEllipse = __webpack_require__(95); var Shape = __webpack_require__(30); @@ -89804,18 +90775,18 @@ module.exports = Ellipse; /***/ }), -/* 391 */ +/* 405 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Shape = __webpack_require__(30); -var GridRender = __webpack_require__(988); +var GridRender = __webpack_require__(999); /** * @classdesc @@ -90086,16 +91057,16 @@ module.exports = Grid; /***/ }), -/* 392 */ +/* 406 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsoBoxRender = __webpack_require__(991); +var IsoBoxRender = __webpack_require__(1002); var Class = __webpack_require__(0); var Shape = __webpack_require__(30); @@ -90301,17 +91272,17 @@ module.exports = IsoBox; /***/ }), -/* 393 */ +/* 407 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var IsoTriangleRender = __webpack_require__(994); +var IsoTriangleRender = __webpack_require__(1005); var Shape = __webpack_require__(30); /** @@ -90547,19 +91518,19 @@ module.exports = IsoTriangle; /***/ }), -/* 394 */ +/* 408 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Shape = __webpack_require__(30); -var GeomLine = __webpack_require__(55); -var LineRender = __webpack_require__(997); +var GeomLine = __webpack_require__(56); +var LineRender = __webpack_require__(1008); /** * @classdesc @@ -90714,22 +91685,22 @@ module.exports = Line; /***/ }), -/* 395 */ +/* 409 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PolygonRender = __webpack_require__(1000); +var PolygonRender = __webpack_require__(1011); var Class = __webpack_require__(0); var Earcut = __webpack_require__(66); -var GetAABB = __webpack_require__(396); -var GeomPolygon = __webpack_require__(197); +var GetAABB = __webpack_require__(410); +var GeomPolygon = __webpack_require__(198); var Shape = __webpack_require__(30); -var Smooth = __webpack_require__(399); +var Smooth = __webpack_require__(413); /** * @classdesc @@ -90744,7 +91715,7 @@ var Smooth = __webpack_require__(399); * internal Polygon geometry object. The points can be set from a variety of formats: * * - A string containing paired values separated by a single space: `'40 0 40 20 100 20 100 80 40 80 40 100 0 50'` - * - An array of Point or Vector2 objects: `[new Phaser.Math.Vec2(x1, y1), ...]` + * - An array of Point or Vector2 objects: `[new Phaser.Math.Vector2(x1, y1), ...]` * - An array of objects with public x/y properties: `[obj1, obj2, ...]` * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]` * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]` @@ -90853,12 +91824,12 @@ module.exports = Polygon; /***/ }), -/* 396 */ +/* 410 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90909,18 +91880,18 @@ module.exports = GetAABB; /***/ }), -/* 397 */ +/* 411 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(56); -var Line = __webpack_require__(55); -var Perimeter = __webpack_require__(398); +var Length = __webpack_require__(57); +var Line = __webpack_require__(56); +var Perimeter = __webpack_require__(412); /** * Returns an array of Point objects containing the coordinates of the points around the perimeter of the Polygon, @@ -90986,17 +91957,17 @@ module.exports = GetPoints; /***/ }), -/* 398 */ +/* 412 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(56); -var Line = __webpack_require__(55); +var Length = __webpack_require__(57); +var Line = __webpack_require__(56); /** * Returns the perimeter of the given Polygon. @@ -91034,13 +92005,13 @@ module.exports = Perimeter; /***/ }), -/* 399 */ +/* 413 */ /***/ (function(module, exports) { /** * @author Richard Davey * @author Igor Ognichenko - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -91110,19 +92081,19 @@ module.exports = Smooth; /***/ }), -/* 400 */ +/* 414 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var GeomRectangle = __webpack_require__(11); var Shape = __webpack_require__(30); -var RectangleRender = __webpack_require__(1003); +var RectangleRender = __webpack_require__(1014); /** * @classdesc @@ -91222,16 +92193,16 @@ module.exports = Rectangle; /***/ }), -/* 401 */ +/* 415 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var StarRender = __webpack_require__(1006); +var StarRender = __webpack_require__(1017); var Class = __webpack_require__(0); var Earcut = __webpack_require__(66); var Shape = __webpack_require__(30); @@ -91510,19 +92481,19 @@ module.exports = Star; /***/ }), -/* 402 */ +/* 416 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Shape = __webpack_require__(30); var GeomTriangle = __webpack_require__(71); -var TriangleRender = __webpack_require__(1009); +var TriangleRender = __webpack_require__(1020); /** * @classdesc @@ -91653,17 +92624,17 @@ module.exports = Triangle; /***/ }), -/* 403 */ +/* 417 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Point = __webpack_require__(4); -var Length = __webpack_require__(56); +var Length = __webpack_require__(57); /** * Returns a Point from around the perimeter of a Triangle. @@ -91740,16 +92711,16 @@ module.exports = GetPoint; /***/ }), -/* 404 */ +/* 418 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(56); +var Length = __webpack_require__(57); var Point = __webpack_require__(4); /** @@ -91833,12 +92804,12 @@ module.exports = GetPoints; /***/ }), -/* 405 */ +/* 419 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -91916,12 +92887,12 @@ module.exports = SetValue; /***/ }), -/* 406 */ +/* 420 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92179,17 +93150,17 @@ module.exports = Light; /***/ }), -/* 407 */ +/* 421 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Light = __webpack_require__(406); +var Light = __webpack_require__(420); var Utils = __webpack_require__(10); /** @@ -92542,12 +93513,12 @@ module.exports = LightsManager; /***/ }), -/* 408 */ +/* 422 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92560,14 +93531,14 @@ var Extend = __webpack_require__(17); var Geom = { - Circle: __webpack_require__(1067), - Ellipse: __webpack_require__(1077), - Intersects: __webpack_require__(409), - Line: __webpack_require__(1096), - Point: __webpack_require__(1117), - Polygon: __webpack_require__(1131), - Rectangle: __webpack_require__(422), - Triangle: __webpack_require__(1161) + Circle: __webpack_require__(1078), + Ellipse: __webpack_require__(1088), + Intersects: __webpack_require__(423), + Line: __webpack_require__(1107), + Point: __webpack_require__(1128), + Polygon: __webpack_require__(1142), + Rectangle: __webpack_require__(436), + Triangle: __webpack_require__(1172) }; @@ -92578,12 +93549,12 @@ module.exports = Geom; /***/ }), -/* 409 */ +/* 423 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92593,40 +93564,40 @@ module.exports = Geom; module.exports = { - CircleToCircle: __webpack_require__(201), - CircleToRectangle: __webpack_require__(202), - GetCircleToCircle: __webpack_require__(1087), - GetCircleToRectangle: __webpack_require__(1088), - GetLineToCircle: __webpack_require__(203), - GetLineToRectangle: __webpack_require__(205), - GetRectangleIntersection: __webpack_require__(1089), - GetRectangleToRectangle: __webpack_require__(1090), - GetRectangleToTriangle: __webpack_require__(1091), - GetTriangleToCircle: __webpack_require__(1092), - GetTriangleToLine: __webpack_require__(414), - GetTriangleToTriangle: __webpack_require__(1093), - LineToCircle: __webpack_require__(204), + CircleToCircle: __webpack_require__(202), + CircleToRectangle: __webpack_require__(203), + GetCircleToCircle: __webpack_require__(1098), + GetCircleToRectangle: __webpack_require__(1099), + GetLineToCircle: __webpack_require__(204), + GetLineToRectangle: __webpack_require__(206), + GetRectangleIntersection: __webpack_require__(1100), + GetRectangleToRectangle: __webpack_require__(1101), + GetRectangleToTriangle: __webpack_require__(1102), + GetTriangleToCircle: __webpack_require__(1103), + GetTriangleToLine: __webpack_require__(428), + GetTriangleToTriangle: __webpack_require__(1104), + LineToCircle: __webpack_require__(205), LineToLine: __webpack_require__(84), - LineToRectangle: __webpack_require__(410), - PointToLine: __webpack_require__(418), - PointToLineSegment: __webpack_require__(1094), - RectangleToRectangle: __webpack_require__(129), - RectangleToTriangle: __webpack_require__(411), - RectangleToValues: __webpack_require__(1095), - TriangleToCircle: __webpack_require__(413), - TriangleToLine: __webpack_require__(415), - TriangleToTriangle: __webpack_require__(416) + LineToRectangle: __webpack_require__(424), + PointToLine: __webpack_require__(432), + PointToLineSegment: __webpack_require__(1105), + RectangleToRectangle: __webpack_require__(131), + RectangleToTriangle: __webpack_require__(425), + RectangleToValues: __webpack_require__(1106), + TriangleToCircle: __webpack_require__(427), + TriangleToLine: __webpack_require__(429), + TriangleToTriangle: __webpack_require__(430) }; /***/ }), -/* 410 */ +/* 424 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92722,19 +93693,19 @@ module.exports = LineToRectangle; /***/ }), -/* 411 */ +/* 425 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var LineToLine = __webpack_require__(84); var Contains = __webpack_require__(47); -var ContainsArray = __webpack_require__(206); -var Decompose = __webpack_require__(412); +var ContainsArray = __webpack_require__(207); +var Decompose = __webpack_require__(426); /** * Checks for intersection between Rectangle shape and Triangle shape. @@ -92815,12 +93786,12 @@ module.exports = RectangleToTriangle; /***/ }), -/* 412 */ +/* 426 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92852,16 +93823,16 @@ module.exports = Decompose; /***/ }), -/* 413 */ +/* 427 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var LineToCircle = __webpack_require__(204); +var LineToCircle = __webpack_require__(205); var Contains = __webpack_require__(83); /** @@ -92917,18 +93888,18 @@ module.exports = TriangleToCircle; /***/ }), -/* 414 */ +/* 428 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Point = __webpack_require__(4); -var TriangleToLine = __webpack_require__(415); +var TriangleToLine = __webpack_require__(429); var LineToLine = __webpack_require__(84); /** @@ -92976,12 +93947,12 @@ module.exports = GetTriangleToLine; /***/ }), -/* 415 */ +/* 429 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -93032,17 +94003,17 @@ module.exports = TriangleToLine; /***/ }), -/* 416 */ +/* 430 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ContainsArray = __webpack_require__(206); -var Decompose = __webpack_require__(417); +var ContainsArray = __webpack_require__(207); +var Decompose = __webpack_require__(431); var LineToLine = __webpack_require__(84); /** @@ -93122,12 +94093,12 @@ module.exports = TriangleToTriangle; /***/ }), -/* 417 */ +/* 431 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -93157,13 +94128,13 @@ module.exports = Decompose; /***/ }), -/* 418 */ +/* 432 */ /***/ (function(module, exports) { /** * @author Richard Davey * @author Florian Mertens - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -93227,17 +94198,17 @@ module.exports = PointToLine; /***/ }), -/* 419 */ +/* 433 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var MATH_CONST = __webpack_require__(13); -var Wrap = __webpack_require__(57); +var Wrap = __webpack_require__(58); var Angle = __webpack_require__(85); /** @@ -93261,12 +94232,12 @@ module.exports = NormalAngle; /***/ }), -/* 420 */ +/* 434 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -93289,12 +94260,12 @@ module.exports = GetMagnitude; /***/ }), -/* 421 */ +/* 435 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -93317,65 +94288,65 @@ module.exports = GetMagnitudeSq; /***/ }), -/* 422 */ +/* 436 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Rectangle = __webpack_require__(11); -Rectangle.Area = __webpack_require__(1136); -Rectangle.Ceil = __webpack_require__(1137); -Rectangle.CeilAll = __webpack_require__(1138); -Rectangle.CenterOn = __webpack_require__(163); -Rectangle.Clone = __webpack_require__(1139); +Rectangle.Area = __webpack_require__(1147); +Rectangle.Ceil = __webpack_require__(1148); +Rectangle.CeilAll = __webpack_require__(1149); +Rectangle.CenterOn = __webpack_require__(165); +Rectangle.Clone = __webpack_require__(1150); Rectangle.Contains = __webpack_require__(47); -Rectangle.ContainsPoint = __webpack_require__(1140); -Rectangle.ContainsRect = __webpack_require__(423); -Rectangle.CopyFrom = __webpack_require__(1141); -Rectangle.Decompose = __webpack_require__(412); -Rectangle.Equals = __webpack_require__(1142); -Rectangle.FitInside = __webpack_require__(1143); -Rectangle.FitOutside = __webpack_require__(1144); -Rectangle.Floor = __webpack_require__(1145); -Rectangle.FloorAll = __webpack_require__(1146); -Rectangle.FromPoints = __webpack_require__(173); -Rectangle.GetAspectRatio = __webpack_require__(208); -Rectangle.GetCenter = __webpack_require__(1147); -Rectangle.GetPoint = __webpack_require__(147); -Rectangle.GetPoints = __webpack_require__(257); -Rectangle.GetSize = __webpack_require__(1148); -Rectangle.Inflate = __webpack_require__(1149); -Rectangle.Intersection = __webpack_require__(1150); -Rectangle.MarchingAnts = __webpack_require__(268); -Rectangle.MergePoints = __webpack_require__(1151); -Rectangle.MergeRect = __webpack_require__(1152); -Rectangle.MergeXY = __webpack_require__(1153); -Rectangle.Offset = __webpack_require__(1154); -Rectangle.OffsetPoint = __webpack_require__(1155); -Rectangle.Overlaps = __webpack_require__(1156); -Rectangle.Perimeter = __webpack_require__(110); -Rectangle.PerimeterPoint = __webpack_require__(1157); -Rectangle.Random = __webpack_require__(150); -Rectangle.RandomOutside = __webpack_require__(1158); -Rectangle.SameDimensions = __webpack_require__(1159); -Rectangle.Scale = __webpack_require__(1160); -Rectangle.Union = __webpack_require__(372); +Rectangle.ContainsPoint = __webpack_require__(1151); +Rectangle.ContainsRect = __webpack_require__(437); +Rectangle.CopyFrom = __webpack_require__(1152); +Rectangle.Decompose = __webpack_require__(426); +Rectangle.Equals = __webpack_require__(1153); +Rectangle.FitInside = __webpack_require__(1154); +Rectangle.FitOutside = __webpack_require__(1155); +Rectangle.Floor = __webpack_require__(1156); +Rectangle.FloorAll = __webpack_require__(1157); +Rectangle.FromPoints = __webpack_require__(174); +Rectangle.GetAspectRatio = __webpack_require__(209); +Rectangle.GetCenter = __webpack_require__(1158); +Rectangle.GetPoint = __webpack_require__(149); +Rectangle.GetPoints = __webpack_require__(271); +Rectangle.GetSize = __webpack_require__(1159); +Rectangle.Inflate = __webpack_require__(1160); +Rectangle.Intersection = __webpack_require__(1161); +Rectangle.MarchingAnts = __webpack_require__(282); +Rectangle.MergePoints = __webpack_require__(1162); +Rectangle.MergeRect = __webpack_require__(1163); +Rectangle.MergeXY = __webpack_require__(1164); +Rectangle.Offset = __webpack_require__(1165); +Rectangle.OffsetPoint = __webpack_require__(1166); +Rectangle.Overlaps = __webpack_require__(1167); +Rectangle.Perimeter = __webpack_require__(112); +Rectangle.PerimeterPoint = __webpack_require__(1168); +Rectangle.Random = __webpack_require__(152); +Rectangle.RandomOutside = __webpack_require__(1169); +Rectangle.SameDimensions = __webpack_require__(1170); +Rectangle.Scale = __webpack_require__(1171); +Rectangle.Union = __webpack_require__(386); module.exports = Rectangle; /***/ }), -/* 423 */ +/* 437 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -93410,12 +94381,12 @@ module.exports = ContainsRect; /***/ }), -/* 424 */ +/* 438 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -93454,12 +94425,12 @@ module.exports = Centroid; /***/ }), -/* 425 */ +/* 439 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -93495,12 +94466,12 @@ module.exports = Offset; /***/ }), -/* 426 */ +/* 440 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -93560,12 +94531,12 @@ module.exports = InCenter; /***/ }), -/* 427 */ +/* 441 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -93631,12 +94602,12 @@ module.exports = CreateInteractiveObject; /***/ }), -/* 428 */ +/* 442 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -93756,17 +94727,17 @@ module.exports = Axis; /***/ }), -/* 429 */ +/* 443 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Events = __webpack_require__(210); +var Events = __webpack_require__(211); /** * @classdesc @@ -93902,17 +94873,17 @@ module.exports = Button; /***/ }), -/* 430 */ +/* 444 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Axis = __webpack_require__(428); -var Button = __webpack_require__(429); +var Axis = __webpack_require__(442); +var Button = __webpack_require__(443); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); var Vector2 = __webpack_require__(3); @@ -94660,18 +95631,18 @@ module.exports = Gamepad; /***/ }), -/* 431 */ +/* 445 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(131); +var Events = __webpack_require__(133); /** * @classdesc @@ -95062,20 +96033,20 @@ module.exports = Key; /***/ }), -/* 432 */ +/* 446 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Events = __webpack_require__(131); +var Events = __webpack_require__(133); var GetFastValue = __webpack_require__(2); -var ProcessKeyCombo = __webpack_require__(1200); -var ResetKeyCombo = __webpack_require__(1202); +var ProcessKeyCombo = __webpack_require__(1211); +var ResetKeyCombo = __webpack_require__(1213); /** * @classdesc @@ -95355,16 +96326,16 @@ module.exports = KeyCombo; /***/ }), -/* 433 */ +/* 447 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MergeXHRSettings = __webpack_require__(211); +var MergeXHRSettings = __webpack_require__(212); /** * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings @@ -95423,21 +96394,21 @@ module.exports = XHRLoader; /***/ }), -/* 434 */ +/* 448 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var CONST = __webpack_require__(29); -var File = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); -var HTML5AudioFile = __webpack_require__(435); +var HTML5AudioFile = __webpack_require__(449); var IsPlainObject = __webpack_require__(7); /** @@ -95694,20 +96665,20 @@ module.exports = AudioFile; /***/ }), -/* 435 */ +/* 449 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Events = __webpack_require__(81); -var File = __webpack_require__(20); +var File = __webpack_require__(21); var GetFastValue = __webpack_require__(2); -var GetURL = __webpack_require__(132); +var GetURL = __webpack_require__(134); var IsPlainObject = __webpack_require__(7); /** @@ -95892,18 +96863,18 @@ module.exports = HTML5AudioFile; /***/ }), -/* 436 */ +/* 450 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var File = __webpack_require__(20); +var CONST = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -96063,18 +97034,18 @@ module.exports = ScriptFile; /***/ }), -/* 437 */ +/* 451 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var File = __webpack_require__(20); +var CONST = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -96238,21 +97209,21 @@ module.exports = TextFile; /***/ }), -/* 438 */ +/* 452 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeImage = __webpack_require__(439); -var ArcadeSprite = __webpack_require__(134); +var ArcadeImage = __webpack_require__(453); +var ArcadeSprite = __webpack_require__(136); var Class = __webpack_require__(0); var CONST = __webpack_require__(50); -var PhysicsGroup = __webpack_require__(440); -var StaticPhysicsGroup = __webpack_require__(441); +var PhysicsGroup = __webpack_require__(454); +var StaticPhysicsGroup = __webpack_require__(455); /** * @classdesc @@ -96509,17 +97480,17 @@ module.exports = Factory; /***/ }), -/* 439 */ +/* 453 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Components = __webpack_require__(213); +var Components = __webpack_require__(214); var Image = __webpack_require__(98); /** @@ -96609,16 +97580,16 @@ module.exports = ArcadeImage; /***/ }), -/* 440 */ +/* 454 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeSprite = __webpack_require__(134); +var ArcadeSprite = __webpack_require__(136); var Class = __webpack_require__(0); var CONST = __webpack_require__(50); var GetFastValue = __webpack_require__(2); @@ -96655,8 +97626,8 @@ var PhysicsGroup = new Class({ if (!children && !config) { config = { - createCallback: this.createCallbackHandler, - removeCallback: this.removeCallbackHandler + internalCreateCallback: this.createCallbackHandler, + internalRemoveCallback: this.removeCallbackHandler }; } else if (IsPlainObject(children)) @@ -96665,8 +97636,8 @@ var PhysicsGroup = new Class({ config = children; children = null; - config.createCallback = this.createCallbackHandler; - config.removeCallback = this.removeCallbackHandler; + config.internalCreateCallback = this.createCallbackHandler; + config.internalRemoveCallback = this.removeCallbackHandler; } else if (Array.isArray(children) && IsPlainObject(children[0])) { @@ -96677,16 +97648,16 @@ var PhysicsGroup = new Class({ children.forEach(function (singleConfig) { - singleConfig.createCallback = _this.createCallbackHandler; - singleConfig.removeCallback = _this.removeCallbackHandler; + singleConfig.internalCreateCallback = _this.createCallbackHandler; + singleConfig.internalRemoveCallback = _this.removeCallbackHandler; }); } else { // config is not defined and children is not a plain object nor an array of plain objects config = { - createCallback: this.createCallbackHandler, - removeCallback: this.removeCallbackHandler + internalCreateCallback: this.createCallbackHandler, + internalRemoveCallback: this.removeCallbackHandler }; } @@ -96894,16 +97865,16 @@ module.exports = PhysicsGroup; /***/ }), -/* 441 */ +/* 455 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeSprite = __webpack_require__(134); +var ArcadeSprite = __webpack_require__(136); var Class = __webpack_require__(0); var CONST = __webpack_require__(50); var GetFastValue = __webpack_require__(2); @@ -96940,8 +97911,8 @@ var StaticPhysicsGroup = new Class({ if (!children && !config) { config = { - createCallback: this.createCallbackHandler, - removeCallback: this.removeCallbackHandler, + internalCreateCallback: this.createCallbackHandler, + internalRemoveCallback: this.removeCallbackHandler, createMultipleCallback: this.createMultipleCallbackHandler, classType: ArcadeSprite }; @@ -96952,8 +97923,8 @@ var StaticPhysicsGroup = new Class({ config = children; children = null; - config.createCallback = this.createCallbackHandler; - config.removeCallback = this.removeCallbackHandler; + config.internalCreateCallback = this.createCallbackHandler; + config.internalRemoveCallback = this.removeCallbackHandler; config.createMultipleCallback = this.createMultipleCallbackHandler; config.classType = GetFastValue(config, 'classType', ArcadeSprite); } @@ -96965,8 +97936,8 @@ var StaticPhysicsGroup = new Class({ config.forEach(function (singleConfig) { - singleConfig.createCallback = this.createCallbackHandler; - singleConfig.removeCallback = this.removeCallbackHandler; + singleConfig.internalCreateCallback = this.createCallbackHandler; + singleConfig.internalRemoveCallback = this.removeCallbackHandler; singleConfig.createMultipleCallback = this.createMultipleCallbackHandler; singleConfig.classType = GetFastValue(singleConfig, 'classType', ArcadeSprite); }); @@ -97085,7 +98056,7 @@ module.exports = StaticPhysicsGroup; /***/ }), -/* 442 */ +/* 456 */ /***/ (function(module, exports) { /** @@ -97170,42 +98141,42 @@ module.exports = OverlapRect; /***/ }), -/* 443 */ +/* 457 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Body = __webpack_require__(444); -var Clamp = __webpack_require__(23); +var Body = __webpack_require__(458); +var Clamp = __webpack_require__(22); var Class = __webpack_require__(0); -var Collider = __webpack_require__(445); +var Collider = __webpack_require__(459); var CONST = __webpack_require__(50); -var DistanceBetween = __webpack_require__(58); +var DistanceBetween = __webpack_require__(53); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(214); -var FuzzyEqual = __webpack_require__(167); -var FuzzyGreaterThan = __webpack_require__(303); -var FuzzyLessThan = __webpack_require__(304); -var GetOverlapX = __webpack_require__(446); -var GetOverlapY = __webpack_require__(447); +var Events = __webpack_require__(215); +var FuzzyEqual = __webpack_require__(144); +var FuzzyGreaterThan = __webpack_require__(317); +var FuzzyLessThan = __webpack_require__(318); +var GetOverlapX = __webpack_require__(460); +var GetOverlapY = __webpack_require__(461); var GetValue = __webpack_require__(6); -var ProcessQueue = __webpack_require__(183); -var ProcessTileCallbacks = __webpack_require__(1259); +var ProcessQueue = __webpack_require__(184); +var ProcessTileCallbacks = __webpack_require__(1270); var Rectangle = __webpack_require__(11); -var RTree = __webpack_require__(448); -var SeparateTile = __webpack_require__(1260); -var SeparateX = __webpack_require__(1265); -var SeparateY = __webpack_require__(1266); -var Set = __webpack_require__(107); -var StaticBody = __webpack_require__(450); -var TileIntersectsBody = __webpack_require__(449); +var RTree = __webpack_require__(462); +var SeparateTile = __webpack_require__(1271); +var SeparateX = __webpack_require__(1276); +var SeparateY = __webpack_require__(1277); +var Set = __webpack_require__(108); +var StaticBody = __webpack_require__(464); +var TileIntersectsBody = __webpack_require__(463); var TransformMatrix = __webpack_require__(32); var Vector2 = __webpack_require__(3); -var Wrap = __webpack_require__(57); +var Wrap = __webpack_require__(58); /** * @classdesc @@ -99123,7 +100094,7 @@ var World = new Class({ { bodyB = results[i]; - if (bodyA === bodyB || !group.contains(bodyB.gameObject)) + if (bodyA === bodyB || !bodyB.enable || !group.contains(bodyB.gameObject)) { // Skip if comparing against itself, or if bodyB isn't actually part of the Group continue; @@ -99559,20 +100530,20 @@ module.exports = World; /***/ }), -/* 444 */ +/* 458 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Benjamin D. Richards - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var CONST = __webpack_require__(50); -var Events = __webpack_require__(214); -var RadToDeg = __webpack_require__(170); +var Events = __webpack_require__(215); +var RadToDeg = __webpack_require__(171); var Rectangle = __webpack_require__(11); var RectangleContains = __webpack_require__(47); var Vector2 = __webpack_require__(3); @@ -99754,7 +100725,7 @@ var Body = new Class({ this.rotation = gameObject.angle; /** - * The Body's rotation, in degrees, during the previous step. + * The Body rotation, in degrees, during the previous step. * * @name Phaser.Physics.Arcade.Body#preRotation * @type {number} @@ -99763,22 +100734,26 @@ var Body = new Class({ this.preRotation = gameObject.angle; /** - * The width of the Body's boundary, in pixels. - * If the Body is circular, this is also the Body's diameter. + * The width of the Body boundary, in pixels. + * If the Body is circular, this is also the diameter. + * If you wish to change the width use the `Body.setSize` method. * * @name Phaser.Physics.Arcade.Body#width * @type {number} + * @readonly * @default 64 * @since 3.0.0 */ this.width = width; /** - * The height of the Body's boundary, in pixels. - * If the Body is circular, this is also the Body's diameter. + * The height of the Body boundary, in pixels. + * If the Body is circular, this is also the diameter. + * If you wish to change the height use the `Body.setSize` method. * * @name Phaser.Physics.Arcade.Body#height * @type {number} + * @readonly * @default 64 * @since 3.0.0 */ @@ -99850,7 +100825,9 @@ var Body = new Class({ this.velocity = new Vector2(); /** - * The Body's calculated velocity, in pixels per second, at the last step. + * The Body's change in position (due to velocity) at the last step, in pixels. + * + * The size of this value depends on the simulation's step rate. * * @name Phaser.Physics.Arcade.Body#newVelocity * @type {Phaser.Math.Vector2} @@ -100007,23 +100984,24 @@ var Body = new Class({ this.maxVelocity = new Vector2(10000, 10000); /** - * The maximum speed this Body is allowed to reach. + * The maximum speed this Body is allowed to reach, in pixels per second. * * If not negative it limits the scalar value of speed. * - * Any negative value means no maximum is being applied. + * Any negative value means no maximum is being applied (the default). * * @name Phaser.Physics.Arcade.Body#maxSpeed * @type {number} + * @default -1 * @since 3.16.0 */ this.maxSpeed = -1; /** * If this Body is `immovable` and in motion, `friction` is the proportion of this Body's motion received by the riding Body on each axis, relative to 1. - * The default value (1, 0) moves the riding Body horizontally in equal proportion to this Body and vertically not at all. * The horizontal component (x) is applied only when two colliding Bodies are separated vertically. * The vertical component (y) is applied only when two colliding Bodies are separated horizontally. + * The default value (1, 0) moves the riding Body horizontally in equal proportion to this Body and vertically not at all. * * @name Phaser.Physics.Arcade.Body#friction * @type {Phaser.Math.Vector2} @@ -100205,7 +101183,7 @@ var Body = new Class({ this.overlapR = 0; /** - * Whether this Body is overlapped with another and both are not moving. + * Whether this Body is overlapped with another and both are not moving, on at least one axis. * * @name Phaser.Physics.Arcade.Body#embedded * @type {boolean} @@ -100235,29 +101213,39 @@ var Body = new Class({ this.checkCollision = { none: false, up: true, down: true, left: true, right: true }; /** - * Whether this Body is colliding with another and in which direction. + * Whether this Body is colliding with a Body or Static Body and in which direction. + * In a collision where both bodies have zero velocity, `embedded` will be set instead. * * @name Phaser.Physics.Arcade.Body#touching * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision} * @since 3.0.0 + * + * @see Phaser.Physics.Arcade.Body#blocked + * @see Phaser.Physics.Arcade.Body#embedded */ this.touching = { none: true, up: false, down: false, left: false, right: false }; /** - * Whether this Body was colliding with another during the last step, and in which direction. + * This Body's `touching` value during the previous step. * * @name Phaser.Physics.Arcade.Body#wasTouching * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision} * @since 3.0.0 + * + * @see Phaser.Physics.Arcade.Body#touching */ this.wasTouching = { none: true, up: false, down: false, left: false, right: false }; /** - * Whether this Body is colliding with a tile or the world boundary. + * Whether this Body is colliding with a Static Body, a tile, or the world boundary. + * In a collision with a Static Body, if this Body has zero velocity then `embedded` will be set instead. * * @name Phaser.Physics.Arcade.Body#blocked * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision} * @since 3.0.0 + * + * @see Phaser.Physics.Arcade.Body#embedded + * @see Phaser.Physics.Arcade.Body#touching */ this.blocked = { none: true, up: false, down: false, left: false, right: false }; @@ -100325,6 +101313,28 @@ var Body = new Class({ */ this._dy = 0; + /** + * The final calculated change in the Body's horizontal position as of `postUpdate`. + * + * @name Phaser.Physics.Arcade.Body#_tx + * @type {number} + * @private + * @default 0 + * @since 3.22.0 + */ + this._tx = 0; + + /** + * The final calculated change in the Body's vertical position as of `postUpdate`. + * + * @name Phaser.Physics.Arcade.Body#_ty + * @type {number} + * @private + * @default 0 + * @since 3.22.0 + */ + this._ty = 0; + /** * Stores the Game Object's bounds. * @@ -100614,6 +101624,9 @@ var Body = new Class({ { this.gameObject.angle += this.deltaZ(); } + + this._tx = dx; + this._ty = dy; }, /** @@ -100987,6 +102000,9 @@ var Body = new Class({ /** * The change in this Body's horizontal position from the previous step. * This value is set during the Body's update phase. + * + * As a Body can update multiple times per step this may not hold the final + * delta value for the Body. In this case, please see the `deltaXFinal` method. * * @method Phaser.Physics.Arcade.Body#deltaX * @since 3.0.0 @@ -101001,6 +102017,9 @@ var Body = new Class({ /** * The change in this Body's vertical position from the previous step. * This value is set during the Body's update phase. + * + * As a Body can update multiple times per step this may not hold the final + * delta value for the Body. In this case, please see the `deltaYFinal` method. * * @method Phaser.Physics.Arcade.Body#deltaY * @since 3.0.0 @@ -101012,6 +102031,48 @@ var Body = new Class({ return this._dy; }, + /** + * The change in this Body's horizontal position from the previous game update. + * + * This value is set during the `postUpdate` phase and takes into account the + * `deltaMax` and final position of the Body. + * + * Because this value is not calculated until `postUpdate`, you must listen for it + * during a Scene `POST_UPDATE` or `RENDER` event, and not in `update`, as it will + * not be calculated by that point. If you _do_ use these values in `update` they + * will represent the delta from the _previous_ game frame. + * + * @method Phaser.Physics.Arcade.Body#deltaXFinal + * @since 3.22.0 + * + * @return {number} The final delta x value. + */ + deltaXFinal: function () + { + return this._tx; + }, + + /** + * The change in this Body's vertical position from the previous game update. + * + * This value is set during the `postUpdate` phase and takes into account the + * `deltaMax` and final position of the Body. + * + * Because this value is not calculated until `postUpdate`, you must listen for it + * during a Scene `POST_UPDATE` or `RENDER` event, and not in `update`, as it will + * not be calculated by that point. If you _do_ use these values in `update` they + * will represent the delta from the _previous_ game frame. + * + * @method Phaser.Physics.Arcade.Body#deltaYFinal + * @since 3.22.0 + * + * @return {number} The final delta y value. + */ + deltaYFinal: function () + { + return this._ty; + }, + /** * The change in this Body's rotation from the previous step, in degrees. * @@ -101112,7 +102173,7 @@ var Body = new Class({ /** * Sets whether this Body collides with the world boundary. * - * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Vec2 first. + * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Phaser.Math.Vector2 first. * * @method Phaser.Physics.Arcade.Body#setCollideWorldBounds * @since 3.0.0 @@ -101797,12 +102858,12 @@ module.exports = Body; /***/ }), -/* 445 */ +/* 459 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101980,12 +103041,12 @@ module.exports = Collider; /***/ }), -/* 446 */ +/* 460 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -102088,12 +103149,12 @@ module.exports = GetOverlapX; /***/ }), -/* 447 */ +/* 461 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -102196,17 +103257,17 @@ module.exports = GetOverlapY; /***/ }), -/* 448 */ +/* 462 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Vladimir Agafonkin * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var quickselect = __webpack_require__(369); +var quickselect = __webpack_require__(383); /** * @classdesc @@ -102807,12 +103868,12 @@ function multiSelect (arr, left, right, n, compare) module.exports = rbush; /***/ }), -/* 449 */ +/* 463 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -102843,16 +103904,16 @@ module.exports = TileIntersectsBody; /***/ }), -/* 450 */ +/* 464 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CircleContains = __webpack_require__(54); +var CircleContains = __webpack_require__(55); var Class = __webpack_require__(0); var CONST = __webpack_require__(50); var RectangleContains = __webpack_require__(47); @@ -103298,8 +104359,7 @@ var StaticBody = new Class({ }, /** - * Updates this Static Body so that its position and dimensions are updated - * based on the current Game Object it is bound to. + * Syncs the Body's position and size with its parent Game Object. * * @method Phaser.Physics.Arcade.StaticBody#updateFromGameObject * @since 3.1.0 @@ -103478,7 +104538,6 @@ var StaticBody = new Class({ /** * Resets this Body to the given coordinates. Also positions its parent Game Object to the same coordinates. - * Similar to `updateFromGameObject`, but doesn't modify the Body's dimensions. * * @method Phaser.Physics.Arcade.StaticBody#reset * @since 3.0.0 @@ -103832,12 +104891,12 @@ module.exports = StaticBody; /***/ }), -/* 451 */ +/* 465 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103911,12 +104970,12 @@ module.exports = { /***/ }), -/* 452 */ +/* 466 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103979,134 +105038,125 @@ module.exports = { /***/ }), -/* 453 */ -/***/ (function(module, exports, __webpack_require__) { +/* 467 */ +/***/ (function(module, exports) { /** -* The `Matter.Sleeping` module contains methods to manage the sleeping state of bodies. +* The `Matter.Pair` module contains methods for creating and manipulating collision pairs. * -* @class Sleeping +* @class Pair */ -var Sleeping = {}; +var Pair = {}; -module.exports = Sleeping; - -var Events = __webpack_require__(235); +module.exports = Pair; (function() { + + /** + * Creates a pair. + * @method create + * @param {collision} collision + * @param {number} timestamp + * @return {pair} A new pair + */ + Pair.create = function(collision, timestamp) { + var bodyA = collision.bodyA, + bodyB = collision.bodyB; - Sleeping._motionWakeThreshold = 0.18; - Sleeping._motionSleepThreshold = 0.08; - Sleeping._minBias = 0.9; + var pair = { + id: Pair.id(bodyA, bodyB), + bodyA: bodyA, + bodyB: bodyB, + activeContacts: [], + separation: 0, + isActive: true, + confirmedActive: true, + isSensor: bodyA.isSensor || bodyB.isSensor, + timeCreated: timestamp, + timeUpdated: timestamp, + collision: null, + inverseMass: 0, + friction: 0, + frictionStatic: 0, + restitution: 0, + slop: 0 + }; + + Pair.update(pair, collision, timestamp); + + return pair; + }; /** - * Puts bodies to sleep or wakes them up depending on their motion. + * Updates a pair given a collision. * @method update - * @param {body[]} bodies - * @param {number} timeScale + * @param {pair} pair + * @param {collision} collision + * @param {number} timestamp */ - Sleeping.update = function(bodies, timeScale) { - var timeFactor = timeScale * timeScale * timeScale; + Pair.update = function(pair, collision, timestamp) { + pair.collision = collision; - // update bodies sleeping status - for (var i = 0; i < bodies.length; i++) { - var body = bodies[i], - motion = body.speed * body.speed + body.angularSpeed * body.angularSpeed; + if (collision.collided) { + var supports = collision.supports, + activeContacts = pair.activeContacts, + parentA = collision.parentA, + parentB = collision.parentB; - // wake up bodies if they have a force applied - if (body.force.x !== 0 || body.force.y !== 0) { - Sleeping.set(body, false); - continue; + pair.inverseMass = parentA.inverseMass + parentB.inverseMass; + pair.friction = Math.min(parentA.friction, parentB.friction); + pair.frictionStatic = Math.max(parentA.frictionStatic, parentB.frictionStatic); + pair.restitution = Math.max(parentA.restitution, parentB.restitution); + pair.slop = Math.max(parentA.slop, parentB.slop); + + for (var i = 0; i < supports.length; i++) { + activeContacts[i] = supports[i].contact; } - var minMotion = Math.min(body.motion, motion), - maxMotion = Math.max(body.motion, motion); - - // biased average motion estimation between frames - body.motion = Sleeping._minBias * minMotion + (1 - Sleeping._minBias) * maxMotion; - - if (body.sleepThreshold > 0 && body.motion < Sleeping._motionSleepThreshold * timeFactor) { - body.sleepCounter += 1; - - if (body.sleepCounter >= body.sleepThreshold) - Sleeping.set(body, true); - } else if (body.sleepCounter > 0) { - body.sleepCounter -= 1; + // optimise array size + var supportCount = supports.length; + if (supportCount < activeContacts.length) { + activeContacts.length = supportCount; } - } - }; - /** - * Given a set of colliding pairs, wakes the sleeping bodies involved. - * @method afterCollisions - * @param {pair[]} pairs - * @param {number} timeScale - */ - Sleeping.afterCollisions = function(pairs, timeScale) { - var timeFactor = timeScale * timeScale * timeScale; - - // wake up bodies involved in collisions - for (var i = 0; i < pairs.length; i++) { - var pair = pairs[i]; - - // don't wake inactive pairs - if (!pair.isActive) - continue; - - var collision = pair.collision, - bodyA = collision.bodyA.parent, - bodyB = collision.bodyB.parent; - - // don't wake if at least one body is static - if ((bodyA.isSleeping && bodyB.isSleeping) || bodyA.isStatic || bodyB.isStatic) - continue; - - if (bodyA.isSleeping || bodyB.isSleeping) { - var sleepingBody = (bodyA.isSleeping && !bodyA.isStatic) ? bodyA : bodyB, - movingBody = sleepingBody === bodyA ? bodyB : bodyA; - - if (!sleepingBody.isStatic && movingBody.motion > Sleeping._motionWakeThreshold * timeFactor) { - Sleeping.set(sleepingBody, false); - } - } - } - }; - - /** - * Set a body as sleeping or awake. - * @method set - * @param {body} body - * @param {boolean} isSleeping - */ - Sleeping.set = function(body, isSleeping) { - var wasSleeping = body.isSleeping; - - if (isSleeping) { - body.isSleeping = true; - body.sleepCounter = body.sleepThreshold; - - body.positionImpulse.x = 0; - body.positionImpulse.y = 0; - - body.positionPrev.x = body.position.x; - body.positionPrev.y = body.position.y; - - body.anglePrev = body.angle; - body.speed = 0; - body.angularSpeed = 0; - body.motion = 0; - - if (!wasSleeping) { - Events.trigger(body, 'sleepStart'); - } + pair.separation = collision.depth; + Pair.setActive(pair, true, timestamp); } else { - body.isSleeping = false; - body.sleepCounter = 0; + if (pair.isActive === true) + Pair.setActive(pair, false, timestamp); + } + }; + + /** + * Set a pair as active or inactive. + * @method setActive + * @param {pair} pair + * @param {bool} isActive + * @param {number} timestamp + */ + Pair.setActive = function(pair, isActive, timestamp) { + if (isActive) { + pair.isActive = true; + pair.timeUpdated = timestamp; + } else { + pair.isActive = false; + pair.activeContacts.length = 0; + } + }; - if (wasSleeping) { - Events.trigger(body, 'sleepEnd'); - } + /** + * Get the id for the given pair. + * @method id + * @param {body} bodyA + * @param {body} bodyB + * @return {string} Unique pairId + */ + Pair.id = function(bodyA, bodyB) { + if (bodyA.id < bodyB.id) { + return 'A' + bodyA.id + 'B' + bodyB.id; + } else { + return 'A' + bodyB.id + 'B' + bodyA.id; } }; @@ -104114,12 +105164,12 @@ var Events = __webpack_require__(235); /***/ }), -/* 454 */ +/* 468 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey -* @copyright 2019 Photon Storm Ltd. +* @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ @@ -104244,12 +105294,12 @@ module.exports = BasePlugin; /***/ }), -/* 455 */ +/* 469 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -104289,12 +105339,12 @@ module.exports = ReplaceByIndex; /***/ }), -/* 456 */ +/* 470 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -104332,18 +105382,18 @@ module.exports = HasTileAt; /***/ }), -/* 457 */ +/* 471 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Tile = __webpack_require__(74); var IsInLayerBounds = __webpack_require__(103); -var CalculateFacesAt = __webpack_require__(216); +var CalculateFacesAt = __webpack_require__(217); /** * Removes the tile at the given tile coordinates in the specified layer and updates the layer's @@ -104395,20 +105445,20 @@ module.exports = RemoveTileAt; /***/ }), -/* 458 */ +/* 472 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Formats = __webpack_require__(31); -var Parse2DArray = __webpack_require__(219); -var ParseCSV = __webpack_require__(459); -var ParseJSONTiled = __webpack_require__(460); -var ParseWeltmeister = __webpack_require__(471); +var Parse2DArray = __webpack_require__(220); +var ParseCSV = __webpack_require__(473); +var ParseJSONTiled = __webpack_require__(474); +var ParseWeltmeister = __webpack_require__(485); /** * Parses raw data of a given Tilemap format into a new MapData object. If no recognized data format @@ -104465,17 +105515,17 @@ module.exports = Parse; /***/ }), -/* 459 */ +/* 473 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Formats = __webpack_require__(31); -var Parse2DArray = __webpack_require__(219); +var Parse2DArray = __webpack_require__(220); /** * Parses a CSV string of tile indexes into a new MapData object with a single layer. @@ -104513,23 +105563,23 @@ module.exports = ParseCSV; /***/ }), -/* 460 */ +/* 474 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Formats = __webpack_require__(31); var MapData = __webpack_require__(105); -var ParseTileLayers = __webpack_require__(461); -var ParseImageLayers = __webpack_require__(463); -var ParseTilesets = __webpack_require__(464); -var ParseObjectLayers = __webpack_require__(467); -var BuildTilesetIndex = __webpack_require__(469); -var AssignTileProperties = __webpack_require__(470); +var ParseTileLayers = __webpack_require__(475); +var ParseImageLayers = __webpack_require__(477); +var ParseTilesets = __webpack_require__(478); +var ParseObjectLayers = __webpack_require__(481); +var BuildTilesetIndex = __webpack_require__(483); +var AssignTileProperties = __webpack_require__(484); /** * Parses a Tiled JSON object into a new MapData object. @@ -104591,21 +105641,21 @@ module.exports = ParseJSONTiled; /***/ }), -/* 461 */ +/* 475 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Base64Decode = __webpack_require__(462); +var Base64Decode = __webpack_require__(476); var GetFastValue = __webpack_require__(2); var LayerData = __webpack_require__(104); -var ParseGID = __webpack_require__(220); +var ParseGID = __webpack_require__(221); var Tile = __webpack_require__(74); -var CreateGroupLayer = __webpack_require__(221); +var CreateGroupLayer = __webpack_require__(222); /** * Parses all tilemap layers in a Tiled JSON object into new LayerData objects. @@ -104849,12 +105899,12 @@ module.exports = ParseTileLayers; /***/ }), -/* 462 */ +/* 476 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -104892,17 +105942,17 @@ module.exports = Base64Decode; /***/ }), -/* 463 */ +/* 477 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetFastValue = __webpack_require__(2); -var CreateGroupLayer = __webpack_require__(221); +var CreateGroupLayer = __webpack_require__(222); /** * Parses a Tiled JSON object into an array of objects with details about the image layers. @@ -104980,18 +106030,18 @@ module.exports = ParseImageLayers; /***/ }), -/* 464 */ +/* 478 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tileset = __webpack_require__(140); -var ImageCollection = __webpack_require__(465); -var ParseObject = __webpack_require__(222); +var Tileset = __webpack_require__(141); +var ImageCollection = __webpack_require__(479); +var ParseObject = __webpack_require__(223); /** * Tilesets and Image Collections @@ -105149,12 +106199,12 @@ module.exports = ParseTilesets; /***/ }), -/* 465 */ +/* 479 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105321,12 +106371,12 @@ module.exports = ImageCollection; /***/ }), -/* 466 */ +/* 480 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105365,19 +106415,19 @@ module.exports = Pick; /***/ }), -/* 467 */ +/* 481 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetFastValue = __webpack_require__(2); -var ParseObject = __webpack_require__(222); -var ObjectLayer = __webpack_require__(468); -var CreateGroupLayer = __webpack_require__(221); +var ParseObject = __webpack_require__(223); +var ObjectLayer = __webpack_require__(482); +var CreateGroupLayer = __webpack_require__(222); /** * Parses a Tiled JSON object into an array of ObjectLayer objects. @@ -105464,12 +106514,12 @@ module.exports = ParseObjectLayers; /***/ }), -/* 468 */ +/* 482 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105586,12 +106636,12 @@ module.exports = ObjectLayer; /***/ }), -/* 469 */ +/* 483 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105659,12 +106709,12 @@ module.exports = BuildTilesetIndex; /***/ }), -/* 470 */ +/* 484 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105732,19 +106782,19 @@ module.exports = AssignTileProperties; /***/ }), -/* 471 */ +/* 485 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Formats = __webpack_require__(31); var MapData = __webpack_require__(105); -var ParseTileLayers = __webpack_require__(472); -var ParseTilesets = __webpack_require__(473); +var ParseTileLayers = __webpack_require__(486); +var ParseTilesets = __webpack_require__(487); /** * Parses a Weltmeister JSON object into a new MapData object. @@ -105799,12 +106849,12 @@ module.exports = ParseWeltmeister; /***/ }), -/* 472 */ +/* 486 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105883,16 +106933,16 @@ module.exports = ParseTileLayers; /***/ }), -/* 473 */ +/* 487 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tileset = __webpack_require__(140); +var Tileset = __webpack_require__(141); /** * [description] @@ -105934,27 +106984,27 @@ module.exports = ParseTilesets; /***/ }), -/* 474 */ +/* 488 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var DegToRad = __webpack_require__(35); -var DynamicTilemapLayer = __webpack_require__(475); +var DynamicTilemapLayer = __webpack_require__(489); var Extend = __webpack_require__(17); var Formats = __webpack_require__(31); var LayerData = __webpack_require__(104); -var Rotate = __webpack_require__(313); +var Rotate = __webpack_require__(327); var SpliceOne = __webpack_require__(79); -var StaticTilemapLayer = __webpack_require__(476); +var StaticTilemapLayer = __webpack_require__(490); var Tile = __webpack_require__(74); -var TilemapComponents = __webpack_require__(136); -var Tileset = __webpack_require__(140); +var TilemapComponents = __webpack_require__(137); +var Tileset = __webpack_require__(141); /** * @callback TilemapFilterCallback @@ -107195,7 +108245,7 @@ var Tilemap = new Class({ * @method Phaser.Tilemaps.Tilemap#getTileLayerNames * @since 3.21.0 * - * @return {[string]} Array of valid tilelayer names / IDs loaded into this Tilemap. + * @return {string[]} Array of valid tilelayer names / IDs loaded into this Tilemap. */ getTileLayerNames: function () { @@ -108491,20 +109541,20 @@ module.exports = Tilemap; /***/ }), -/* 475 */ +/* 489 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var DynamicTilemapLayerRender = __webpack_require__(1318); +var DynamicTilemapLayerRender = __webpack_require__(1333); var GameObject = __webpack_require__(14); -var TilemapComponents = __webpack_require__(136); +var TilemapComponents = __webpack_require__(137); /** * @classdesc @@ -109812,12 +110862,12 @@ module.exports = DynamicTilemapLayer; /***/ }), -/* 476 */ +/* 490 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -109825,8 +110875,8 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameEvents = __webpack_require__(18); var GameObject = __webpack_require__(14); -var StaticTilemapLayerRender = __webpack_require__(1321); -var TilemapComponents = __webpack_require__(136); +var StaticTilemapLayerRender = __webpack_require__(1336); +var TilemapComponents = __webpack_require__(137); var TransformMatrix = __webpack_require__(32); var Utils = __webpack_require__(10); @@ -111306,12 +112356,12 @@ module.exports = StaticTilemapLayer; /***/ }), -/* 477 */ +/* 491 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111619,16 +112669,16 @@ module.exports = TimerEvent; /***/ }), -/* 478 */ +/* 492 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RESERVED = __webpack_require__(1330); +var RESERVED = __webpack_require__(1345); /** * Internal function used by the Tween Builder to return an array of properties @@ -111680,12 +112730,12 @@ module.exports = GetProps; /***/ }), -/* 479 */ +/* 493 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111728,24 +112778,24 @@ module.exports = GetTweens; /***/ }), -/* 480 */ +/* 494 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Defaults = __webpack_require__(226); +var Defaults = __webpack_require__(227); var GetAdvancedValue = __webpack_require__(15); var GetBoolean = __webpack_require__(88); var GetEaseFunction = __webpack_require__(82); -var GetNewValue = __webpack_require__(141); +var GetNewValue = __webpack_require__(142); var GetValue = __webpack_require__(6); -var GetValueOp = __webpack_require__(225); -var Tween = __webpack_require__(227); -var TweenData = __webpack_require__(229); +var GetValueOp = __webpack_require__(226); +var Tween = __webpack_require__(228); +var TweenData = __webpack_require__(230); /** * Creates a new Number Tween. @@ -111858,26 +112908,272 @@ module.exports = NumberTweenBuilder; /***/ }), -/* 481 */ +/* 495 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetEaseFunction = __webpack_require__(82); +var GetValue = __webpack_require__(6); +var MATH_CONST = __webpack_require__(13); + +/** + * Creates a Stagger function to be used by a Tween property. + * + * The stagger function will allow you to stagger changes to the value of the property across all targets of the tween. + * + * This is only worth using if the tween has multiple targets. + * + * The following will stagger the delay by 100ms across all targets of the tween, causing them to scale down to 0.2 + * over the duration specified: + * + * ```javascript + * this.tweens.add({ + * targets: [ ... ], + * scale: 0.2, + * ease: 'linear', + * duration: 1000, + * delay: this.tweens.stagger(100) + * }); + * ``` + * + * The following will stagger the delay by 500ms across all targets of the tween using a 10 x 6 grid, staggering + * from the center out, using a cubic ease. + * + * ```javascript + * this.tweens.add({ + * targets: [ ... ], + * scale: 0.2, + * ease: 'linear', + * duration: 1000, + * delay: this.tweens.stagger(500, { grid: [ 10, 6 ], from: 'center', ease: 'cubic.out' }) + * }); + * ``` + * + * @function Phaser.Tweens.Builders.StaggerBuilder + * @since 3.19.0 + * + * @param {(number|number[])} value - The amount to stagger by, or an array containing two elements representing the min and max values to stagger between. + * @param {Phaser.Types.Tweens.StaggerConfig} [config] - A Stagger Configuration object. + * + * @return {function} The stagger function. + */ +var StaggerBuilder = function (value, options) +{ + if (options === undefined) { options = {}; } + + var result; + + var start = GetValue(options, 'start', 0); + var ease = GetValue(options, 'ease', null); + var grid = GetValue(options, 'grid', null); + + var from = GetValue(options, 'from', 0); + + var fromFirst = (from === 'first'); + var fromCenter = (from === 'center'); + var fromLast = (from === 'last'); + var fromValue = (typeof(from) === 'number'); + + var isRange = (Array.isArray(value)); + var value1 = (isRange) ? parseFloat(value[0]) : parseFloat(value); + var value2 = (isRange) ? parseFloat(value[1]) : 0; + var maxValue = Math.max(value1, value2); + + if (isRange) + { + start += value1; + } + + if (grid) + { + // Pre-calc the grid to save doing it for ever tweendata update + var gridWidth = grid[0]; + var gridHeight = grid[1]; + + var fromX = 0; + var fromY = 0; + + var distanceX = 0; + var distanceY = 0; + + var gridValues = []; + + if (fromLast) + { + fromX = gridWidth - 1; + fromY = gridHeight - 1; + } + else if (fromValue) + { + fromX = from % gridWidth; + fromY = Math.floor(from / gridWidth); + } + else if (fromCenter) + { + fromX = (gridWidth - 1) / 2; + fromY = (gridHeight - 1) / 2; + } + + var gridMax = MATH_CONST.MIN_SAFE_INTEGER; + + for (var toY = 0; toY < gridHeight; toY++) + { + gridValues[toY] = []; + + for (var toX = 0; toX < gridWidth; toX++) + { + distanceX = fromX - toX; + distanceY = fromY - toY; + + var dist = Math.sqrt(distanceX * distanceX + distanceY * distanceY); + + if (dist > gridMax) + { + gridMax = dist; + } + + gridValues[toY][toX] = dist; + } + } + } + + var easeFunction = (ease) ? GetEaseFunction(ease) : null; + + if (grid) + { + result = function (target, key, value, index) + { + var gridSpace = 0; + var toX = index % gridWidth; + var toY = Math.floor(index / gridWidth); + + if (toX >= 0 && toX < gridWidth && toY >= 0 && toY < gridHeight) + { + gridSpace = gridValues[toY][toX]; + } + + var output; + + if (isRange) + { + var diff = (value2 - value1); + + if (easeFunction) + { + output = ((gridSpace / gridMax) * diff) * easeFunction(gridSpace / gridMax); + } + else + { + output = (gridSpace / gridMax) * diff; + } + } + else if (easeFunction) + { + output = (gridSpace * value1) * easeFunction(gridSpace / gridMax); + } + else + { + output = gridSpace * value1; + } + + return output + start; + }; + } + else + { + result = function (target, key, value, index, total) + { + // zero offset + total--; + + var fromIndex; + + if (fromFirst) + { + fromIndex = index; + } + else if (fromCenter) + { + fromIndex = Math.abs((total / 2) - index); + } + else if (fromLast) + { + fromIndex = total - index; + } + else if (fromValue) + { + fromIndex = Math.abs(from - index); + } + + var output; + + if (isRange) + { + var spacing; + + if (fromCenter) + { + spacing = ((value2 - value1) / total) * (fromIndex * 2); + } + else + { + spacing = ((value2 - value1) / total) * fromIndex; + } + + if (easeFunction) + { + output = spacing * easeFunction(fromIndex / total); + } + else + { + output = spacing; + } + } + else if (easeFunction) + { + output = (total * maxValue) * easeFunction(fromIndex / total); + } + else + { + output = fromIndex * value1; + } + + return output + start; + }; + } + + return result; +}; + +module.exports = StaggerBuilder; + + +/***/ }), +/* 496 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Clone = __webpack_require__(67); -var Defaults = __webpack_require__(226); +var Defaults = __webpack_require__(227); var GetAdvancedValue = __webpack_require__(15); var GetBoolean = __webpack_require__(88); var GetEaseFunction = __webpack_require__(82); -var GetNewValue = __webpack_require__(141); -var GetTargets = __webpack_require__(224); -var GetTweens = __webpack_require__(479); +var GetNewValue = __webpack_require__(142); +var GetTargets = __webpack_require__(225); +var GetTweens = __webpack_require__(493); var GetValue = __webpack_require__(6); -var Timeline = __webpack_require__(482); -var TweenBuilder = __webpack_require__(142); +var Timeline = __webpack_require__(497); +var TweenBuilder = __webpack_require__(143); /** * Builds a Timeline of Tweens based on a configuration object. @@ -112010,19 +113306,19 @@ module.exports = TimelineBuilder; /***/ }), -/* 482 */ +/* 497 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(228); -var TweenBuilder = __webpack_require__(142); +var Events = __webpack_require__(229); +var TweenBuilder = __webpack_require__(143); var TWEEN_CONST = __webpack_require__(89); /** @@ -112915,44 +114211,18 @@ module.exports = Timeline; /***/ }), -/* 483 */ -/***/ (function(module, exports) { - -var g; - -// This works in non-strict mode -g = (function() { - return this; -})(); - -try { - // This works if eval is allowed (see CSP) - g = g || Function("return this")() || (1, eval)("this"); -} catch (e) { - // This works if the window reference is available - if (typeof window === "object") g = window; -} - -// g can still be undefined, but nothing to do about it... -// We return undefined, instead of nothing here, so it's -// easier to handle this case. if(!global) { ...} - -module.exports = g; - - -/***/ }), -/* 484 */ +/* 498 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseAnimation = __webpack_require__(146); +var BaseAnimation = __webpack_require__(148); var Class = __webpack_require__(0); -var Events = __webpack_require__(109); +var Events = __webpack_require__(111); /** * @classdesc @@ -113472,6 +114742,8 @@ var Animation = new Class({ this.forward = true; this._reverse = false; + this._paused = false; + this._wasPlaying = true; return this._startAnimation(key, startFrame); }, @@ -114114,21 +115386,21 @@ module.exports = Animation; /***/ }), -/* 485 */ +/* 499 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CanvasSnapshot = __webpack_require__(486); +var CanvasSnapshot = __webpack_require__(500); var CameraEvents = __webpack_require__(48); var Class = __webpack_require__(0); var CONST = __webpack_require__(29); -var GetBlendModes = __webpack_require__(487); +var GetBlendModes = __webpack_require__(501); var ScaleEvents = __webpack_require__(92); var TransformMatrix = __webpack_require__(32); @@ -114908,12 +116180,12 @@ module.exports = CanvasRenderer; /***/ }), -/* 486 */ +/* 500 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -115001,17 +116273,17 @@ module.exports = CanvasSnapshot; /***/ }), -/* 487 */ +/* 501 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var modes = __webpack_require__(52); -var CanvasFeatures = __webpack_require__(299); +var CanvasFeatures = __webpack_require__(313); /** * Returns an array which maps the default blend modes to supported Canvas blend modes. @@ -115065,13 +116337,13 @@ module.exports = GetBlendModes; /***/ }), -/* 488 */ +/* 502 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -115080,19 +116352,19 @@ var CameraEvents = __webpack_require__(48); var Class = __webpack_require__(0); var CONST = __webpack_require__(29); var GameEvents = __webpack_require__(18); -var IsSizePowerOfTwo = __webpack_require__(116); +var IsSizePowerOfTwo = __webpack_require__(118); var NOOP = __webpack_require__(1); var ScaleEvents = __webpack_require__(92); var SpliceOne = __webpack_require__(79); -var TextureEvents = __webpack_require__(117); +var TextureEvents = __webpack_require__(119); var TransformMatrix = __webpack_require__(32); var Utils = __webpack_require__(10); -var WebGLSnapshot = __webpack_require__(489); +var WebGLSnapshot = __webpack_require__(503); // Default Pipelines -var BitmapMaskPipeline = __webpack_require__(490); -var ForwardDiffuseLightPipeline = __webpack_require__(491); -var TextureTintPipeline = __webpack_require__(234); +var BitmapMaskPipeline = __webpack_require__(504); +var ForwardDiffuseLightPipeline = __webpack_require__(505); +var TextureTintPipeline = __webpack_require__(235); /** * @callback WebGLContextCallback @@ -118019,12 +119291,12 @@ module.exports = WebGLRenderer; /***/ }), -/* 489 */ +/* 503 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -118129,20 +119401,20 @@ module.exports = WebGLSnapshot; /***/ }), -/* 490 */ +/* 504 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(753); -var ShaderSourceVS = __webpack_require__(754); -var WebGLPipeline = __webpack_require__(233); +var ShaderSourceFS = __webpack_require__(776); +var ShaderSourceVS = __webpack_require__(777); +var WebGLPipeline = __webpack_require__(234); /** * @classdesc @@ -118392,19 +119664,19 @@ module.exports = BitmapMaskPipeline; /***/ }), -/* 491 */ +/* 505 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(755); -var TextureTintPipeline = __webpack_require__(234); +var ShaderSourceFS = __webpack_require__(778); +var TextureTintPipeline = __webpack_require__(235); var LIGHT_COUNT = 10; @@ -118913,12 +120185,12 @@ module.exports = ForwardDiffuseLightPipeline; /***/ }), -/* 492 */ +/* 506 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119663,12 +120935,82 @@ module.exports = ModelViewProjection; /***/ }), -/* 493 */ +/* 507 */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* The `Matter.Axes` module contains methods for creating and manipulating sets of axes. +* +* @class Axes +*/ + +var Axes = {}; + +module.exports = Axes; + +var Vector = __webpack_require__(101); +var Common = __webpack_require__(37); + +(function() { + + /** + * Creates a new set of axes from the given vertices. + * @method fromVertices + * @param {vertices} vertices + * @return {axes} A new axes from the given vertices + */ + Axes.fromVertices = function(vertices) { + var axes = {}; + + // find the unique axes, using edge normal gradients + for (var i = 0; i < vertices.length; i++) { + var j = (i + 1) % vertices.length, + normal = Vector.normalise({ + x: vertices[j].y - vertices[i].y, + y: vertices[i].x - vertices[j].x + }), + gradient = (normal.y === 0) ? Infinity : (normal.x / normal.y); + + // limit precision + gradient = gradient.toFixed(3).toString(); + axes[gradient] = normal; + } + + return Common.values(axes); + }; + + /** + * Rotates a set of axes by the given angle. + * @method rotate + * @param {axes} axes + * @param {number} angle + */ + Axes.rotate = function(axes, angle) { + if (angle === 0) + return; + + var cos = Math.cos(angle), + sin = Math.sin(angle); + + for (var i = 0; i < axes.length; i++) { + var axis = axes[i], + xx; + xx = axis.x * cos - axis.y * sin; + axis.y = axis.x * sin + axis.y * cos; + axis.x = xx; + } + }; + +})(); + + +/***/ }), +/* 508 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119678,164 +121020,453 @@ module.exports = ModelViewProjection; module.exports = { - Bounce: __webpack_require__(1403), - Collision: __webpack_require__(1404), - Force: __webpack_require__(1405), - Friction: __webpack_require__(1406), - Gravity: __webpack_require__(1407), - Mass: __webpack_require__(1408), - Static: __webpack_require__(1409), - Sensor: __webpack_require__(1410), - SetBody: __webpack_require__(1411), - Sleep: __webpack_require__(1412), - Transform: __webpack_require__(1425), - Velocity: __webpack_require__(1426) + Bounce: __webpack_require__(1414), + Collision: __webpack_require__(1415), + Force: __webpack_require__(1416), + Friction: __webpack_require__(1417), + Gravity: __webpack_require__(1418), + Mass: __webpack_require__(1419), + Static: __webpack_require__(1420), + Sensor: __webpack_require__(1421), + SetBody: __webpack_require__(1422), + Sleep: __webpack_require__(1423), + Transform: __webpack_require__(1440), + Velocity: __webpack_require__(1441) }; /***/ }), -/* 494 */ -/***/ (function(module, exports) { +/* 509 */ +/***/ (function(module, exports, __webpack_require__) { /** -* The `Matter.Pair` module contains methods for creating and manipulating collision pairs. +* The `Matter.Detector` module contains methods for detecting collisions given a set of pairs. * -* @class Pair +* @class Detector */ -var Pair = {}; +// TODO: speculative contacts -module.exports = Pair; +var Detector = {}; + +module.exports = Detector; + +var SAT = __webpack_require__(510); +var Pair = __webpack_require__(467); +var Bounds = __webpack_require__(102); (function() { - - /** - * Creates a pair. - * @method create - * @param {collision} collision - * @param {number} timestamp - * @return {pair} A new pair - */ - Pair.create = function(collision, timestamp) { - var bodyA = collision.bodyA, - bodyB = collision.bodyB; - - var pair = { - id: Pair.id(bodyA, bodyB), - bodyA: bodyA, - bodyB: bodyB, - activeContacts: [], - separation: 0, - isActive: true, - confirmedActive: true, - isSensor: bodyA.isSensor || bodyB.isSensor, - timeCreated: timestamp, - timeUpdated: timestamp, - collision: null, - inverseMass: 0, - friction: 0, - frictionStatic: 0, - restitution: 0, - slop: 0 - }; - - Pair.update(pair, collision, timestamp); - - return pair; - }; /** - * Updates a pair given a collision. - * @method update - * @param {pair} pair - * @param {collision} collision - * @param {number} timestamp + * Finds all collisions given a list of pairs. + * @method collisions + * @param {pair[]} broadphasePairs + * @param {engine} engine + * @return {array} collisions */ - Pair.update = function(pair, collision, timestamp) { - pair.collision = collision; + Detector.collisions = function(broadphasePairs, engine) { + var collisions = [], + pairsTable = engine.pairs.table; - if (collision.collided) { - var supports = collision.supports, - activeContacts = pair.activeContacts, - parentA = collision.parentA, - parentB = collision.parentB; + // @if DEBUG + var metrics = engine.metrics; + // @endif + + for (var i = 0; i < broadphasePairs.length; i++) { + var bodyA = broadphasePairs[i][0], + bodyB = broadphasePairs[i][1]; - pair.inverseMass = parentA.inverseMass + parentB.inverseMass; - pair.friction = Math.min(parentA.friction, parentB.friction); - pair.frictionStatic = Math.max(parentA.frictionStatic, parentB.frictionStatic); - pair.restitution = Math.max(parentA.restitution, parentB.restitution); - pair.slop = Math.max(parentA.slop, parentB.slop); + if ((bodyA.isStatic || bodyA.isSleeping) && (bodyB.isStatic || bodyB.isSleeping)) + continue; + + if (!Detector.canCollide(bodyA.collisionFilter, bodyB.collisionFilter)) + continue; - for (var i = 0; i < supports.length; i++) { - activeContacts[i] = supports[i].contact; + // @if DEBUG + metrics.midphaseTests += 1; + // @endif + + // mid phase + if (Bounds.overlaps(bodyA.bounds, bodyB.bounds)) { + for (var j = bodyA.parts.length > 1 ? 1 : 0; j < bodyA.parts.length; j++) { + var partA = bodyA.parts[j]; + + for (var k = bodyB.parts.length > 1 ? 1 : 0; k < bodyB.parts.length; k++) { + var partB = bodyB.parts[k]; + + if ((partA === bodyA && partB === bodyB) || Bounds.overlaps(partA.bounds, partB.bounds)) { + // find a previous collision we could reuse + var pairId = Pair.id(partA, partB), + pair = pairsTable[pairId], + previousCollision; + + if (pair && pair.isActive) { + previousCollision = pair.collision; + } else { + previousCollision = null; + } + + // narrow phase + var collision = SAT.collides(partA, partB, previousCollision); + + // @if DEBUG + metrics.narrowphaseTests += 1; + if (collision.reused) + metrics.narrowReuseCount += 1; + // @endif + + if (collision.collided) { + collisions.push(collision); + // @if DEBUG + metrics.narrowDetections += 1; + // @endif + } + } + } + } } - - // optimise array size - var supportCount = supports.length; - if (supportCount < activeContacts.length) { - activeContacts.length = supportCount; - } - - pair.separation = collision.depth; - Pair.setActive(pair, true, timestamp); - } else { - if (pair.isActive === true) - Pair.setActive(pair, false, timestamp); - } - }; - - /** - * Set a pair as active or inactive. - * @method setActive - * @param {pair} pair - * @param {bool} isActive - * @param {number} timestamp - */ - Pair.setActive = function(pair, isActive, timestamp) { - if (isActive) { - pair.isActive = true; - pair.timeUpdated = timestamp; - } else { - pair.isActive = false; - pair.activeContacts.length = 0; } + + return collisions; }; /** - * Get the id for the given pair. - * @method id - * @param {body} bodyA - * @param {body} bodyB - * @return {string} Unique pairId + * Returns `true` if both supplied collision filters will allow a collision to occur. + * See `body.collisionFilter` for more information. + * @method canCollide + * @param {} filterA + * @param {} filterB + * @return {bool} `true` if collision can occur */ - Pair.id = function(bodyA, bodyB) { - if (bodyA.id < bodyB.id) { - return 'A' + bodyA.id + 'B' + bodyB.id; - } else { - return 'A' + bodyB.id + 'B' + bodyA.id; - } + Detector.canCollide = function(filterA, filterB) { + if (filterA.group === filterB.group && filterA.group !== 0) + return filterA.group > 0; + + return (filterA.mask & filterB.category) !== 0 && (filterB.mask & filterA.category) !== 0; }; })(); /***/ }), -/* 495 */ +/* 510 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(496); -__webpack_require__(497); -__webpack_require__(498); -__webpack_require__(499); -__webpack_require__(500); -__webpack_require__(501); -__webpack_require__(502); -__webpack_require__(503); +/** +* The `Matter.SAT` module contains methods for detecting collisions using the Separating Axis Theorem. +* +* @class SAT +*/ + +// TODO: true circles and curves + +var SAT = {}; + +module.exports = SAT; + +var Vertices = __webpack_require__(86); +var Vector = __webpack_require__(101); + +(function() { + + /** + * Detect collision between two bodies using the Separating Axis Theorem. + * @method collides + * @param {body} bodyA + * @param {body} bodyB + * @param {collision} previousCollision + * @return {collision} collision + */ + SAT.collides = function(bodyA, bodyB, previousCollision) { + var overlapAB, + overlapBA, + minOverlap, + collision, + canReusePrevCol = false; + + if (previousCollision) { + // estimate total motion + var parentA = bodyA.parent, + parentB = bodyB.parent, + motion = parentA.speed * parentA.speed + parentA.angularSpeed * parentA.angularSpeed + + parentB.speed * parentB.speed + parentB.angularSpeed * parentB.angularSpeed; + + // we may be able to (partially) reuse collision result + // but only safe if collision was resting + canReusePrevCol = previousCollision && previousCollision.collided && motion < 0.2; + + // reuse collision object + collision = previousCollision; + } else { + collision = { collided: false, bodyA: bodyA, bodyB: bodyB }; + } + + if (previousCollision && canReusePrevCol) { + // if we can reuse the collision result + // we only need to test the previously found axis + var axisBodyA = collision.axisBody, + axisBodyB = axisBodyA === bodyA ? bodyB : bodyA, + axes = [axisBodyA.axes[previousCollision.axisNumber]]; + + minOverlap = SAT._overlapAxes(axisBodyA.vertices, axisBodyB.vertices, axes); + collision.reused = true; + + if (minOverlap.overlap <= 0) { + collision.collided = false; + return collision; + } + } else { + // if we can't reuse a result, perform a full SAT test + + overlapAB = SAT._overlapAxes(bodyA.vertices, bodyB.vertices, bodyA.axes); + + if (overlapAB.overlap <= 0) { + collision.collided = false; + return collision; + } + + overlapBA = SAT._overlapAxes(bodyB.vertices, bodyA.vertices, bodyB.axes); + + if (overlapBA.overlap <= 0) { + collision.collided = false; + return collision; + } + + if (overlapAB.overlap < overlapBA.overlap) { + minOverlap = overlapAB; + collision.axisBody = bodyA; + } else { + minOverlap = overlapBA; + collision.axisBody = bodyB; + } + + // important for reuse later + collision.axisNumber = minOverlap.axisNumber; + } + + collision.bodyA = bodyA.id < bodyB.id ? bodyA : bodyB; + collision.bodyB = bodyA.id < bodyB.id ? bodyB : bodyA; + collision.collided = true; + collision.depth = minOverlap.overlap; + collision.parentA = collision.bodyA.parent; + collision.parentB = collision.bodyB.parent; + + bodyA = collision.bodyA; + bodyB = collision.bodyB; + + // ensure normal is facing away from bodyA + if (Vector.dot(minOverlap.axis, Vector.sub(bodyB.position, bodyA.position)) < 0) { + collision.normal = { + x: minOverlap.axis.x, + y: minOverlap.axis.y + }; + } else { + collision.normal = { + x: -minOverlap.axis.x, + y: -minOverlap.axis.y + }; + } + + collision.tangent = Vector.perp(collision.normal); + + collision.penetration = collision.penetration || {}; + collision.penetration.x = collision.normal.x * collision.depth; + collision.penetration.y = collision.normal.y * collision.depth; + + // find support points, there is always either exactly one or two + var verticesB = SAT._findSupports(bodyA, bodyB, collision.normal), + supports = []; + + // find the supports from bodyB that are inside bodyA + if (Vertices.contains(bodyA.vertices, verticesB[0])) + supports.push(verticesB[0]); + + if (Vertices.contains(bodyA.vertices, verticesB[1])) + supports.push(verticesB[1]); + + // find the supports from bodyA that are inside bodyB + if (supports.length < 2) { + var verticesA = SAT._findSupports(bodyB, bodyA, Vector.neg(collision.normal)); + + if (Vertices.contains(bodyB.vertices, verticesA[0])) + supports.push(verticesA[0]); + + if (supports.length < 2 && Vertices.contains(bodyB.vertices, verticesA[1])) + supports.push(verticesA[1]); + } + + // account for the edge case of overlapping but no vertex containment + if (supports.length < 1) + supports = [verticesB[0]]; + + collision.supports = supports; + + return collision; + }; + + /** + * Find the overlap between two sets of vertices. + * @method _overlapAxes + * @private + * @param {} verticesA + * @param {} verticesB + * @param {} axes + * @return result + */ + SAT._overlapAxes = function(verticesA, verticesB, axes) { + var projectionA = Vector._temp[0], + projectionB = Vector._temp[1], + result = { overlap: Number.MAX_VALUE }, + overlap, + axis; + + for (var i = 0; i < axes.length; i++) { + axis = axes[i]; + + SAT._projectToAxis(projectionA, verticesA, axis); + SAT._projectToAxis(projectionB, verticesB, axis); + + overlap = Math.min(projectionA.max - projectionB.min, projectionB.max - projectionA.min); + + if (overlap <= 0) { + result.overlap = overlap; + return result; + } + + if (overlap < result.overlap) { + result.overlap = overlap; + result.axis = axis; + result.axisNumber = i; + } + } + + return result; + }; + + /** + * Projects vertices on an axis and returns an interval. + * @method _projectToAxis + * @private + * @param {} projection + * @param {} vertices + * @param {} axis + */ + SAT._projectToAxis = function(projection, vertices, axis) { + var min = Vector.dot(vertices[0], axis), + max = min; + + for (var i = 1; i < vertices.length; i += 1) { + var dot = Vector.dot(vertices[i], axis); + + if (dot > max) { + max = dot; + } else if (dot < min) { + min = dot; + } + } + + projection.min = min; + projection.max = max; + }; + + /** + * Finds supporting vertices given two bodies along a given direction using hill-climbing. + * @method _findSupports + * @private + * @param {} bodyA + * @param {} bodyB + * @param {} normal + * @return [vector] + */ + SAT._findSupports = function(bodyA, bodyB, normal) { + var nearestDistance = Number.MAX_VALUE, + vertexToBody = Vector._temp[0], + vertices = bodyB.vertices, + bodyAPosition = bodyA.position, + distance, + vertex, + vertexA, + vertexB; + + // find closest vertex on bodyB + for (var i = 0; i < vertices.length; i++) { + vertex = vertices[i]; + vertexToBody.x = vertex.x - bodyAPosition.x; + vertexToBody.y = vertex.y - bodyAPosition.y; + distance = -Vector.dot(normal, vertexToBody); + + if (distance < nearestDistance) { + nearestDistance = distance; + vertexA = vertex; + } + } + + // find next closest vertex using the two connected to it + var prevIndex = vertexA.index - 1 >= 0 ? vertexA.index - 1 : vertices.length - 1; + vertex = vertices[prevIndex]; + vertexToBody.x = vertex.x - bodyAPosition.x; + vertexToBody.y = vertex.y - bodyAPosition.y; + nearestDistance = -Vector.dot(normal, vertexToBody); + vertexB = vertex; + + var nextIndex = (vertexA.index + 1) % vertices.length; + vertex = vertices[nextIndex]; + vertexToBody.x = vertex.x - bodyAPosition.x; + vertexToBody.y = vertex.y - bodyAPosition.y; + distance = -Vector.dot(normal, vertexToBody); + if (distance < nearestDistance) { + vertexB = vertex; + } + + return [vertexA, vertexB]; + }; + +})(); /***/ }), -/* 496 */ +/* 511 */ +/***/ (function(module, exports) { + +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || new Function("return this")(); +} catch (e) { + // This works if the window reference is available + if (typeof window === "object") g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; + + +/***/ }), +/* 512 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(513); +__webpack_require__(514); +__webpack_require__(515); +__webpack_require__(516); +__webpack_require__(517); +__webpack_require__(518); +__webpack_require__(519); +__webpack_require__(520); + + +/***/ }), +/* 513 */ /***/ (function(module, exports) { /** @@ -119875,7 +121506,7 @@ if (!Array.prototype.forEach) /***/ }), -/* 497 */ +/* 514 */ /***/ (function(module, exports) { /** @@ -119891,7 +121522,7 @@ if (!Array.isArray) /***/ }), -/* 498 */ +/* 515 */ /***/ (function(module, exports) { /* Copyright 2013 Chris Wilson @@ -120078,7 +121709,7 @@ BiquadFilterNode.type and OscillatorNode.type. /***/ }), -/* 499 */ +/* 516 */ /***/ (function(module, exports) { /** @@ -120093,7 +121724,7 @@ if (!window.console) /***/ }), -/* 500 */ +/* 517 */ /***/ (function(module, exports) { // ES6 Math.trunc - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc @@ -120105,7 +121736,7 @@ if (!Math.trunc) { /***/ }), -/* 501 */ +/* 518 */ /***/ (function(module, exports) { /** @@ -120142,7 +121773,7 @@ if (!Math.trunc) { /***/ }), -/* 502 */ +/* 519 */ /***/ (function(module, exports) { // References: @@ -120199,7 +121830,7 @@ if (!window.cancelAnimationFrame) /***/ }), -/* 503 */ +/* 520 */ /***/ (function(module, exports) { /** @@ -120252,12 +121883,60 @@ if (typeof window.Uint32Array !== 'function' && typeof window.Uint32Array !== 'o /***/ }), -/* 504 */ +/* 521 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var QuickSet = __webpack_require__(239); + +/** + * Takes an array of Game Objects, or any objects that have public `x` and `y` properties, and aligns them next to each other. + * + * The first item isn't moved. The second item is aligned next to the first, then the third next to the second, and so on. + * + * @function Phaser.Actions.AlignTo + * @since 3.22.0 + * + * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return] + * + * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action. + * @param {integer} position - The position to align the items with. This is an align constant, such as `Phaser.Display.Align.LEFT_CENTER`. + * @param {number} [offsetX=0] - Optional horizontal offset from the position. + * @param {number} [offsetY=0] - Optional vertical offset from the position. + * + * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action. + */ +var AlignTo = function (items, position, offsetX, offsetY) +{ + var target = items[0]; + + for (var i = 1; i < items.length; i++) + { + var item = items[i]; + + QuickSet(item, target, position, offsetX, offsetY); + + target = item; + } + + return items; +}; + +module.exports = AlignTo; + + +/***/ }), +/* 522 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120293,12 +121972,12 @@ module.exports = Angle; /***/ }), -/* 505 */ +/* 523 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120332,12 +122011,12 @@ module.exports = Call; /***/ }), -/* 506 */ +/* 524 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120390,12 +122069,12 @@ module.exports = GetFirst; /***/ }), -/* 507 */ +/* 525 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120448,20 +122127,20 @@ module.exports = GetLast; /***/ }), -/* 508 */ +/* 526 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AlignIn = __webpack_require__(238); -var CONST = __webpack_require__(143); +var AlignIn = __webpack_require__(252); +var CONST = __webpack_require__(106); var GetFastValue = __webpack_require__(2); var NOOP = __webpack_require__(1); -var Zone = __webpack_require__(108); +var Zone = __webpack_require__(110); var tempZone = new Zone({ sys: { queueDepthSort: NOOP, events: { once: NOOP } } }, 0, 0, 1, 1); @@ -120483,10 +122162,15 @@ var GridAlign = function (items, options) { if (options === undefined) { options = {}; } + var widthSet = options.hasOwnProperty('width'); + var heightSet = options.hasOwnProperty('height'); + var width = GetFastValue(options, 'width', -1); var height = GetFastValue(options, 'height', -1); + var cellWidth = GetFastValue(options, 'cellWidth', 1); var cellHeight = GetFastValue(options, 'cellHeight', cellWidth); + var position = GetFastValue(options, 'position', CONST.TOP_LEFT); var x = GetFastValue(options, 'x', 0); var y = GetFastValue(options, 'y', 0); @@ -120503,31 +122187,15 @@ var GridAlign = function (items, options) { AlignIn(items[i], tempZone, position); - if (width === -1) + if (widthSet && width === -1) { // We keep laying them out horizontally until we've done them all - cy += cellHeight; - tempZone.y += cellHeight; - - if (cy === h) - { - cy = 0; - tempZone.x += cellWidth; - tempZone.y = y; - } + tempZone.x += cellWidth; } - else if (height === -1) + else if (heightSet && height === -1) { // We keep laying them out vertically until we've done them all - cx += cellWidth; - tempZone.x += cellWidth; - - if (cx === w) - { - cx = 0; - tempZone.x = x; - tempZone.y += cellHeight; - } + tempZone.y += cellHeight; } else { @@ -120558,12 +122226,307 @@ module.exports = GridAlign; /***/ }), -/* 509 */ +/* 527 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = __webpack_require__(22); + +// bitmask flag for GameObject.renderMask +var _FLAG = 2; // 0010 + +/** + * Provides methods used for setting the alpha properties of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.Alpha + * @since 3.0.0 + */ + +var Alpha = { + + /** + * Private internal value. Holds the global alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alpha + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alpha: 1, + + /** + * Private internal value. Holds the top-left alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaTL + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaTL: 1, + + /** + * Private internal value. Holds the top-right alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaTR + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaTR: 1, + + /** + * Private internal value. Holds the bottom-left alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaBL + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaBL: 1, + + /** + * Private internal value. Holds the bottom-right alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaBR + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaBR: 1, + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + * + * @method Phaser.GameObjects.Components.Alpha#clearAlpha + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + clearAlpha: function () + { + return this.setAlpha(1); + }, + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * + * @method Phaser.GameObjects.Components.Alpha#setAlpha + * @since 3.0.0 + * + * @param {number} [topLeft=1] - The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. + * @param {number} [topRight] - The alpha value used for the top-right of the Game Object. WebGL only. + * @param {number} [bottomLeft] - The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param {number} [bottomRight] - The alpha value used for the bottom-right of the Game Object. WebGL only. + * + * @return {this} This Game Object instance. + */ + setAlpha: function (topLeft, topRight, bottomLeft, bottomRight) + { + if (topLeft === undefined) { topLeft = 1; } + + // Treat as if there is only one alpha value for the whole Game Object + if (topRight === undefined) + { + this.alpha = topLeft; + } + else + { + this._alphaTL = Clamp(topLeft, 0, 1); + this._alphaTR = Clamp(topRight, 0, 1); + this._alphaBL = Clamp(bottomLeft, 0, 1); + this._alphaBR = Clamp(bottomRight, 0, 1); + } + + return this; + }, + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + * + * @name Phaser.GameObjects.Components.Alpha#alpha + * @type {number} + * @since 3.0.0 + */ + alpha: { + + get: function () + { + return this._alpha; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alpha = v; + this._alphaTL = v; + this._alphaTR = v; + this._alphaBL = v; + this._alphaBR = v; + + if (v === 0) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaTopLeft + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaTopLeft: { + + get: function () + { + return this._alphaTL; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaTL = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaTopRight + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaTopRight: { + + get: function () + { + return this._alphaTR; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaTR = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaBottomLeft + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaBottomLeft: { + + get: function () + { + return this._alphaBL; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaBL = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaBottomRight + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaBottomRight: { + + get: function () + { + return this._alphaBR; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaBR = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + } + +}; + +module.exports = Alpha; + + +/***/ }), +/* 528 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120585,12 +122548,12 @@ module.exports = 'add'; /***/ }), -/* 510 */ +/* 529 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120613,12 +122576,12 @@ module.exports = 'complete'; /***/ }), -/* 511 */ +/* 530 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120640,12 +122603,12 @@ module.exports = 'repeat'; /***/ }), -/* 512 */ +/* 531 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120668,12 +122631,12 @@ module.exports = 'restart'; /***/ }), -/* 513 */ +/* 532 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120696,12 +122659,12 @@ module.exports = 'start'; /***/ }), -/* 514 */ +/* 533 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120720,12 +122683,12 @@ module.exports = 'pauseall'; /***/ }), -/* 515 */ +/* 534 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120744,12 +122707,12 @@ module.exports = 'remove'; /***/ }), -/* 516 */ +/* 535 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120767,12 +122730,12 @@ module.exports = 'resumeall'; /***/ }), -/* 517 */ +/* 536 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120796,12 +122759,12 @@ module.exports = 'animationcomplete'; /***/ }), -/* 518 */ +/* 537 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120824,12 +122787,12 @@ module.exports = 'animationcomplete-'; /***/ }), -/* 519 */ +/* 538 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120853,12 +122816,12 @@ module.exports = 'animationrepeat-'; /***/ }), -/* 520 */ +/* 539 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120881,12 +122844,12 @@ module.exports = 'animationrestart-'; /***/ }), -/* 521 */ +/* 540 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120909,12 +122872,12 @@ module.exports = 'animationstart-'; /***/ }), -/* 522 */ +/* 541 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120938,12 +122901,12 @@ module.exports = 'animationupdate-'; /***/ }), -/* 523 */ +/* 542 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120968,12 +122931,12 @@ module.exports = 'animationrepeat'; /***/ }), -/* 524 */ +/* 543 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120997,12 +122960,12 @@ module.exports = 'animationrestart'; /***/ }), -/* 525 */ +/* 544 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -121026,12 +122989,12 @@ module.exports = 'animationstart'; /***/ }), -/* 526 */ +/* 545 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -121056,12 +123019,12 @@ module.exports = 'animationupdate'; /***/ }), -/* 527 */ +/* 546 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -121205,12 +123168,12 @@ module.exports = ComputedSize; /***/ }), -/* 528 */ +/* 547 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -121330,12 +123293,12 @@ module.exports = Crop; /***/ }), -/* 529 */ +/* 548 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -121494,17 +123457,17 @@ module.exports = Flip; /***/ }), -/* 530 */ +/* 549 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Rectangle = __webpack_require__(11); -var RotateAround = __webpack_require__(259); +var RotateAround = __webpack_require__(273); var Vector2 = __webpack_require__(3); /** @@ -121853,12 +123816,12 @@ module.exports = GetBounds; /***/ }), -/* 531 */ +/* 550 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -121876,12 +123839,12 @@ module.exports = 'blur'; /***/ }), -/* 532 */ +/* 551 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -121898,12 +123861,12 @@ module.exports = 'boot'; /***/ }), -/* 533 */ +/* 552 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -121921,12 +123884,12 @@ module.exports = 'contextlost'; /***/ }), -/* 534 */ +/* 553 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -121944,12 +123907,12 @@ module.exports = 'contextrestored'; /***/ }), -/* 535 */ +/* 554 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -121967,12 +123930,12 @@ module.exports = 'destroy'; /***/ }), -/* 536 */ +/* 555 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -121989,12 +123952,12 @@ module.exports = 'focus'; /***/ }), -/* 537 */ +/* 556 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122015,12 +123978,12 @@ module.exports = 'hidden'; /***/ }), -/* 538 */ +/* 557 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122036,12 +123999,12 @@ module.exports = 'pause'; /***/ }), -/* 539 */ +/* 558 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122062,12 +124025,12 @@ module.exports = 'postrender'; /***/ }), -/* 540 */ +/* 559 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122087,12 +124050,12 @@ module.exports = 'poststep'; /***/ }), -/* 541 */ +/* 560 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122112,12 +124075,12 @@ module.exports = 'prerender'; /***/ }), -/* 542 */ +/* 561 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122137,12 +124100,12 @@ module.exports = 'prestep'; /***/ }), -/* 543 */ +/* 562 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122159,12 +124122,12 @@ module.exports = 'ready'; /***/ }), -/* 544 */ +/* 563 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122180,12 +124143,12 @@ module.exports = 'resume'; /***/ }), -/* 545 */ +/* 564 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122205,12 +124168,12 @@ module.exports = 'step'; /***/ }), -/* 546 */ +/* 565 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122229,12 +124192,12 @@ module.exports = 'visible'; /***/ }), -/* 547 */ +/* 566 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122432,12 +124395,12 @@ module.exports = Origin; /***/ }), -/* 548 */ +/* 567 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122781,15 +124744,24 @@ var PathFollower = { if (tween) { var tweenData = tween.data[0]; + var pathVector = this.pathVector; - if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD) + if (tweenData.state !== TWEEN_CONST.COMPLETE) + { + this.path.getPoint(1, pathVector); + + pathVector.add(this.pathOffset); + + this.setPosition(pathVector.x, pathVector.y); + + return; + } + else if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD) { // If delayed, etc then bail out return; } - var pathVector = this.pathVector; - this.path.getPoint(tween.getValue(), pathVector); pathVector.add(this.pathOffset); @@ -122829,12 +124801,12 @@ module.exports = PathFollower; /***/ }), -/* 549 */ +/* 568 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -123016,12 +124988,12 @@ module.exports = Size; /***/ }), -/* 550 */ +/* 569 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -123146,12 +125118,12 @@ module.exports = Texture; /***/ }), -/* 551 */ +/* 570 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -123354,12 +125326,12 @@ module.exports = TextureCrop; /***/ }), -/* 552 */ +/* 571 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -123694,12 +125666,12 @@ module.exports = Tint; /***/ }), -/* 553 */ +/* 572 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -123726,12 +125698,12 @@ module.exports = 'changedata'; /***/ }), -/* 554 */ +/* 573 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -123749,7 +125721,6 @@ module.exports = 'changedata'; * @since 3.16.1 * * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event. - * @param {string} key - The unique key of the data item within the Data Manager. * @param {any} value - The item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance. * @param {any} previousValue - The previous item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance. */ @@ -123757,12 +125728,12 @@ module.exports = 'changedata-'; /***/ }), -/* 555 */ +/* 574 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -123785,12 +125756,12 @@ module.exports = 'removedata'; /***/ }), -/* 556 */ +/* 575 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -123813,12 +125784,12 @@ module.exports = 'setdata'; /***/ }), -/* 557 */ +/* 576 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -123838,12 +125809,12 @@ module.exports = 'destroy'; /***/ }), -/* 558 */ +/* 577 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -123870,12 +125841,12 @@ module.exports = 'complete'; /***/ }), -/* 559 */ +/* 578 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -123899,12 +125870,12 @@ module.exports = 'created'; /***/ }), -/* 560 */ +/* 579 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -123925,12 +125896,12 @@ module.exports = 'error'; /***/ }), -/* 561 */ +/* 580 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -123957,12 +125928,12 @@ module.exports = 'loop'; /***/ }), -/* 562 */ +/* 581 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -123985,12 +125956,12 @@ module.exports = 'play'; /***/ }), -/* 563 */ +/* 582 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124010,12 +125981,12 @@ module.exports = 'seeked'; /***/ }), -/* 564 */ +/* 583 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124036,12 +126007,12 @@ module.exports = 'seeking'; /***/ }), -/* 565 */ +/* 584 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124062,12 +126033,12 @@ module.exports = 'stop'; /***/ }), -/* 566 */ +/* 585 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124088,12 +126059,12 @@ module.exports = 'timeout'; /***/ }), -/* 567 */ +/* 586 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124114,12 +126085,12 @@ module.exports = 'unlocked'; /***/ }), -/* 568 */ +/* 587 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124155,12 +126126,12 @@ module.exports = IncAlpha; /***/ }), -/* 569 */ +/* 588 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124196,12 +126167,12 @@ module.exports = IncX; /***/ }), -/* 570 */ +/* 589 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124243,12 +126214,12 @@ module.exports = IncXY; /***/ }), -/* 571 */ +/* 590 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124284,12 +126255,12 @@ module.exports = IncY; /***/ }), -/* 572 */ +/* 591 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124333,12 +126304,12 @@ module.exports = PlaceOnCircle; /***/ }), -/* 573 */ +/* 592 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124385,16 +126356,16 @@ module.exports = PlaceOnEllipse; /***/ }), -/* 574 */ +/* 593 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetPoints = __webpack_require__(148); +var GetPoints = __webpack_require__(150); /** * Positions an array of Game Objects on evenly spaced points of a Line. @@ -124429,18 +126400,18 @@ module.exports = PlaceOnLine; /***/ }), -/* 575 */ +/* 594 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MarchingAnts = __webpack_require__(268); -var RotateLeft = __webpack_require__(269); -var RotateRight = __webpack_require__(270); +var MarchingAnts = __webpack_require__(282); +var RotateLeft = __webpack_require__(283); +var RotateRight = __webpack_require__(284); /** * Takes an array of Game Objects and positions them on evenly spaced points around the perimeter of a Rectangle. @@ -124487,16 +126458,16 @@ module.exports = PlaceOnRectangle; /***/ }), -/* 576 */ +/* 595 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BresenhamPoints = __webpack_require__(271); +var BresenhamPoints = __webpack_require__(285); /** * Takes an array of Game Objects and positions them on evenly spaced points around the edges of a Triangle. @@ -124548,12 +126519,12 @@ module.exports = PlaceOnTriangle; /***/ }), -/* 577 */ +/* 596 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124585,16 +126556,16 @@ module.exports = PlayAnimation; /***/ }), -/* 578 */ +/* 597 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(145); +var Random = __webpack_require__(147); /** * Takes an array of Game Objects and positions them at random locations within the Circle. @@ -124625,16 +126596,16 @@ module.exports = RandomCircle; /***/ }), -/* 579 */ +/* 598 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(152); +var Random = __webpack_require__(154); /** * Takes an array of Game Objects and positions them at random locations within the Ellipse. @@ -124665,16 +126636,16 @@ module.exports = RandomEllipse; /***/ }), -/* 580 */ +/* 599 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(149); +var Random = __webpack_require__(151); /** * Takes an array of Game Objects and positions them at random locations on the Line. @@ -124705,16 +126676,16 @@ module.exports = RandomLine; /***/ }), -/* 581 */ +/* 600 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(150); +var Random = __webpack_require__(152); /** * Takes an array of Game Objects and positions them at random locations within the Rectangle. @@ -124743,16 +126714,16 @@ module.exports = RandomRectangle; /***/ }), -/* 582 */ +/* 601 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(153); +var Random = __webpack_require__(155); /** * Takes an array of Game Objects and positions them at random locations within the Triangle. @@ -124783,12 +126754,12 @@ module.exports = RandomTriangle; /***/ }), -/* 583 */ +/* 602 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124824,17 +126795,17 @@ module.exports = Rotate; /***/ }), -/* 584 */ +/* 603 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundDistance = __webpack_require__(154); -var DistanceBetween = __webpack_require__(58); +var RotateAroundDistance = __webpack_require__(156); +var DistanceBetween = __webpack_require__(53); /** * Rotates each item around the given point by the given angle. @@ -124870,16 +126841,16 @@ module.exports = RotateAround; /***/ }), -/* 585 */ +/* 604 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathRotateAroundDistance = __webpack_require__(154); +var MathRotateAroundDistance = __webpack_require__(156); /** * Rotates an array of Game Objects around a point by the given angle and distance. @@ -124919,12 +126890,12 @@ module.exports = RotateAroundDistance; /***/ }), -/* 586 */ +/* 605 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124960,12 +126931,12 @@ module.exports = ScaleX; /***/ }), -/* 587 */ +/* 606 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -125007,12 +126978,12 @@ module.exports = ScaleXY; /***/ }), -/* 588 */ +/* 607 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -125048,12 +127019,12 @@ module.exports = ScaleY; /***/ }), -/* 589 */ +/* 608 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -125089,12 +127060,12 @@ module.exports = SetAlpha; /***/ }), -/* 590 */ +/* 609 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -125129,12 +127100,12 @@ module.exports = SetBlendMode; /***/ }), -/* 591 */ +/* 610 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -125170,12 +127141,12 @@ module.exports = SetDepth; /***/ }), -/* 592 */ +/* 611 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -125209,12 +127180,12 @@ module.exports = SetHitArea; /***/ }), -/* 593 */ +/* 612 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -125256,12 +127227,12 @@ module.exports = SetOrigin; /***/ }), -/* 594 */ +/* 613 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -125297,12 +127268,12 @@ module.exports = SetRotation; /***/ }), -/* 595 */ +/* 614 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -125344,12 +127315,12 @@ module.exports = SetScale; /***/ }), -/* 596 */ +/* 615 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -125385,12 +127356,12 @@ module.exports = SetScaleX; /***/ }), -/* 597 */ +/* 616 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -125426,12 +127397,12 @@ module.exports = SetScaleY; /***/ }), -/* 598 */ +/* 617 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -125473,12 +127444,12 @@ module.exports = SetScrollFactor; /***/ }), -/* 599 */ +/* 618 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -125514,12 +127485,12 @@ module.exports = SetScrollFactorX; /***/ }), -/* 600 */ +/* 619 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -125555,12 +127526,12 @@ module.exports = SetScrollFactorY; /***/ }), -/* 601 */ +/* 620 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -125594,12 +127565,12 @@ module.exports = SetTint; /***/ }), -/* 602 */ +/* 621 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -125632,12 +127603,12 @@ module.exports = SetVisible; /***/ }), -/* 603 */ +/* 622 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -125673,12 +127644,12 @@ module.exports = SetX; /***/ }), -/* 604 */ +/* 623 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -125720,12 +127691,12 @@ module.exports = SetXY; /***/ }), -/* 605 */ +/* 624 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -125761,12 +127732,12 @@ module.exports = SetY; /***/ }), -/* 606 */ +/* 625 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -125891,16 +127862,16 @@ module.exports = ShiftPosition; /***/ }), -/* 607 */ +/* 626 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayShuffle = __webpack_require__(112); +var ArrayShuffle = __webpack_require__(114); /** * Shuffles the array in place. The shuffled array is both modified and returned. @@ -125924,16 +127895,16 @@ module.exports = Shuffle; /***/ }), -/* 608 */ +/* 627 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathSmootherStep = __webpack_require__(155); +var MathSmootherStep = __webpack_require__(157); /** * Smootherstep is a sigmoid-like interpolation and clamping function. @@ -125982,16 +127953,16 @@ module.exports = SmootherStep; /***/ }), -/* 609 */ +/* 628 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathSmoothStep = __webpack_require__(156); +var MathSmoothStep = __webpack_require__(158); /** * Smoothstep is a sigmoid-like interpolation and clamping function. @@ -126040,12 +128011,12 @@ module.exports = SmoothStep; /***/ }), -/* 610 */ +/* 629 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126103,12 +128074,12 @@ module.exports = Spread; /***/ }), -/* 611 */ +/* 630 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126139,17 +128110,17 @@ module.exports = ToggleVisible; /***/ }), -/* 612 */ +/* 631 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author samme - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Wrap = __webpack_require__(57); +var Wrap = __webpack_require__(58); /** * Wrap each item's coordinates within a rectangle's area. @@ -126188,12 +128159,12 @@ module.exports = WrapInRectangle; /***/ }), -/* 613 */ +/* 632 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126203,21 +128174,21 @@ module.exports = WrapInRectangle; module.exports = { - Animation: __webpack_require__(146), - AnimationFrame: __webpack_require__(254), - AnimationManager: __webpack_require__(272), - Events: __webpack_require__(109) + Animation: __webpack_require__(148), + AnimationFrame: __webpack_require__(268), + AnimationManager: __webpack_require__(286), + Events: __webpack_require__(111) }; /***/ }), -/* 614 */ +/* 633 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126227,20 +128198,20 @@ module.exports = { module.exports = { - BaseCache: __webpack_require__(273), - CacheManager: __webpack_require__(275), - Events: __webpack_require__(274) + BaseCache: __webpack_require__(287), + CacheManager: __webpack_require__(289), + Events: __webpack_require__(288) }; /***/ }), -/* 615 */ +/* 634 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126260,12 +128231,12 @@ module.exports = 'add'; /***/ }), -/* 616 */ +/* 635 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126285,12 +128256,12 @@ module.exports = 'remove'; /***/ }), -/* 617 */ +/* 636 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126304,19 +128275,19 @@ module.exports = 'remove'; module.exports = { - Controls: __webpack_require__(618), - Scene2D: __webpack_require__(621) + Controls: __webpack_require__(637), + Scene2D: __webpack_require__(640) }; /***/ }), -/* 618 */ +/* 637 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126326,19 +128297,19 @@ module.exports = { module.exports = { - FixedKeyControl: __webpack_require__(619), - SmoothedKeyControl: __webpack_require__(620) + FixedKeyControl: __webpack_require__(638), + SmoothedKeyControl: __webpack_require__(639) }; /***/ }), -/* 619 */ +/* 638 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126639,12 +128610,12 @@ module.exports = FixedKeyControl; /***/ }), -/* 620 */ +/* 639 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127122,12 +129093,12 @@ module.exports = SmoothedKeyControl; /***/ }), -/* 621 */ +/* 640 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127137,22 +129108,22 @@ module.exports = SmoothedKeyControl; module.exports = { - Camera: __webpack_require__(276), + Camera: __webpack_require__(290), BaseCamera: __webpack_require__(91), - CameraManager: __webpack_require__(674), - Effects: __webpack_require__(284), + CameraManager: __webpack_require__(693), + Effects: __webpack_require__(298), Events: __webpack_require__(48) }; /***/ }), -/* 622 */ +/* 641 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127170,12 +129141,12 @@ module.exports = 'cameradestroy'; /***/ }), -/* 623 */ +/* 642 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127196,12 +129167,12 @@ module.exports = 'camerafadeincomplete'; /***/ }), -/* 624 */ +/* 643 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127226,12 +129197,12 @@ module.exports = 'camerafadeinstart'; /***/ }), -/* 625 */ +/* 644 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127252,12 +129223,12 @@ module.exports = 'camerafadeoutcomplete'; /***/ }), -/* 626 */ +/* 645 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127282,12 +129253,12 @@ module.exports = 'camerafadeoutstart'; /***/ }), -/* 627 */ +/* 646 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127306,12 +129277,12 @@ module.exports = 'cameraflashcomplete'; /***/ }), -/* 628 */ +/* 647 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127334,12 +129305,12 @@ module.exports = 'cameraflashstart'; /***/ }), -/* 629 */ +/* 648 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127358,12 +129329,12 @@ module.exports = 'camerapancomplete'; /***/ }), -/* 630 */ +/* 649 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127385,12 +129356,12 @@ module.exports = 'camerapanstart'; /***/ }), -/* 631 */ +/* 650 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127411,12 +129382,12 @@ module.exports = 'postrender'; /***/ }), -/* 632 */ +/* 651 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127437,12 +129408,12 @@ module.exports = 'prerender'; /***/ }), -/* 633 */ +/* 652 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127461,12 +129432,12 @@ module.exports = 'camerashakecomplete'; /***/ }), -/* 634 */ +/* 653 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127487,12 +129458,12 @@ module.exports = 'camerashakestart'; /***/ }), -/* 635 */ +/* 654 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127511,12 +129482,12 @@ module.exports = 'camerazoomcomplete'; /***/ }), -/* 636 */ +/* 655 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127537,16 +129508,16 @@ module.exports = 'camerazoomstart'; /***/ }), -/* 637 */ +/* 656 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(23); +var Clamp = __webpack_require__(22); var Class = __webpack_require__(0); var Events = __webpack_require__(48); @@ -127925,16 +129896,16 @@ module.exports = Fade; /***/ }), -/* 638 */ +/* 657 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(23); +var Clamp = __webpack_require__(22); var Class = __webpack_require__(0); var Events = __webpack_require__(48); @@ -128276,18 +130247,18 @@ module.exports = Flash; /***/ }), -/* 639 */ +/* 658 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(23); +var Clamp = __webpack_require__(22); var Class = __webpack_require__(0); -var EaseMap = __webpack_require__(164); +var EaseMap = __webpack_require__(166); var Events = __webpack_require__(48); var Vector2 = __webpack_require__(3); @@ -128601,12 +130572,12 @@ module.exports = Pan; /***/ }), -/* 640 */ +/* 659 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128632,12 +130603,12 @@ module.exports = In; /***/ }), -/* 641 */ +/* 660 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128663,12 +130634,12 @@ module.exports = Out; /***/ }), -/* 642 */ +/* 661 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128703,12 +130674,12 @@ module.exports = InOut; /***/ }), -/* 643 */ +/* 662 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128748,12 +130719,12 @@ module.exports = In; /***/ }), -/* 644 */ +/* 663 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128791,12 +130762,12 @@ module.exports = Out; /***/ }), -/* 645 */ +/* 664 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128855,12 +130826,12 @@ module.exports = InOut; /***/ }), -/* 646 */ +/* 665 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128883,12 +130854,12 @@ module.exports = In; /***/ }), -/* 647 */ +/* 666 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128911,12 +130882,12 @@ module.exports = Out; /***/ }), -/* 648 */ +/* 667 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128946,12 +130917,12 @@ module.exports = InOut; /***/ }), -/* 649 */ +/* 668 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128974,12 +130945,12 @@ module.exports = In; /***/ }), -/* 650 */ +/* 669 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129002,12 +130973,12 @@ module.exports = Out; /***/ }), -/* 651 */ +/* 670 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129037,12 +131008,12 @@ module.exports = InOut; /***/ }), -/* 652 */ +/* 671 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129092,12 +131063,12 @@ module.exports = In; /***/ }), -/* 653 */ +/* 672 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129147,12 +131118,12 @@ module.exports = Out; /***/ }), -/* 654 */ +/* 673 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129209,12 +131180,12 @@ module.exports = InOut; /***/ }), -/* 655 */ +/* 674 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129237,12 +131208,12 @@ module.exports = In; /***/ }), -/* 656 */ +/* 675 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129265,12 +131236,12 @@ module.exports = Out; /***/ }), -/* 657 */ +/* 676 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129300,12 +131271,12 @@ module.exports = InOut; /***/ }), -/* 658 */ +/* 677 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129328,12 +131299,12 @@ module.exports = Linear; /***/ }), -/* 659 */ +/* 678 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129356,12 +131327,12 @@ module.exports = In; /***/ }), -/* 660 */ +/* 679 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129384,12 +131355,12 @@ module.exports = Out; /***/ }), -/* 661 */ +/* 680 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129419,12 +131390,12 @@ module.exports = InOut; /***/ }), -/* 662 */ +/* 681 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129447,12 +131418,12 @@ module.exports = In; /***/ }), -/* 663 */ +/* 682 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129475,12 +131446,12 @@ module.exports = Out; /***/ }), -/* 664 */ +/* 683 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129510,12 +131481,12 @@ module.exports = InOut; /***/ }), -/* 665 */ +/* 684 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129538,12 +131509,12 @@ module.exports = In; /***/ }), -/* 666 */ +/* 685 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129566,12 +131537,12 @@ module.exports = Out; /***/ }), -/* 667 */ +/* 686 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129601,12 +131572,12 @@ module.exports = InOut; /***/ }), -/* 668 */ +/* 687 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129640,12 +131611,12 @@ module.exports = In; /***/ }), -/* 669 */ +/* 688 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129679,12 +131650,12 @@ module.exports = Out; /***/ }), -/* 670 */ +/* 689 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129718,12 +131689,12 @@ module.exports = InOut; /***/ }), -/* 671 */ +/* 690 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129760,16 +131731,16 @@ module.exports = Stepped; /***/ }), -/* 672 */ +/* 691 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(23); +var Clamp = __webpack_require__(22); var Class = __webpack_require__(0); var Events = __webpack_require__(48); var Vector2 = __webpack_require__(3); @@ -130079,18 +132050,18 @@ module.exports = Shake; /***/ }), -/* 673 */ +/* 692 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(23); +var Clamp = __webpack_require__(22); var Class = __webpack_require__(0); -var EaseMap = __webpack_require__(164); +var EaseMap = __webpack_require__(166); var Events = __webpack_require__(48); /** @@ -130372,22 +132343,22 @@ module.exports = Zoom; /***/ }), -/* 674 */ +/* 693 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Camera = __webpack_require__(276); +var Camera = __webpack_require__(290); var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(2); -var PluginCache = __webpack_require__(21); +var PluginCache = __webpack_require__(23); var RectangleContains = __webpack_require__(47); var ScaleEvents = __webpack_require__(92); -var SceneEvents = __webpack_require__(22); +var SceneEvents = __webpack_require__(19); /** * @classdesc @@ -131120,12 +133091,12 @@ module.exports = CameraManager; /***/ }), -/* 675 */ +/* 694 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131139,12 +133110,12 @@ module.exports = 'enterfullscreen'; /***/ }), -/* 676 */ +/* 695 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131158,12 +133129,12 @@ module.exports = 'fullscreenfailed'; /***/ }), -/* 677 */ +/* 696 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131177,12 +133148,12 @@ module.exports = 'fullscreenunsupported'; /***/ }), -/* 678 */ +/* 697 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131197,12 +133168,12 @@ module.exports = 'leavefullscreen'; /***/ }), -/* 679 */ +/* 698 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131218,12 +133189,12 @@ module.exports = 'orientationchange'; /***/ }), -/* 680 */ +/* 699 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131249,12 +133220,12 @@ module.exports = 'resize'; /***/ }), -/* 681 */ +/* 700 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131274,12 +133245,12 @@ module.exports = 'boot'; /***/ }), -/* 682 */ +/* 701 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131303,12 +133274,12 @@ module.exports = 'create'; /***/ }), -/* 683 */ +/* 702 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131330,12 +133301,12 @@ module.exports = 'destroy'; /***/ }), -/* 684 */ +/* 703 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131357,12 +133328,12 @@ module.exports = 'pause'; /***/ }), -/* 685 */ +/* 704 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131394,12 +133365,12 @@ module.exports = 'postupdate'; /***/ }), -/* 686 */ +/* 705 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131431,12 +133402,12 @@ module.exports = 'preupdate'; /***/ }), -/* 687 */ +/* 706 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131459,12 +133430,12 @@ module.exports = 'ready'; /***/ }), -/* 688 */ +/* 707 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131495,12 +133466,12 @@ module.exports = 'render'; /***/ }), -/* 689 */ +/* 708 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131522,12 +133493,12 @@ module.exports = 'resume'; /***/ }), -/* 690 */ +/* 709 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131552,12 +133523,12 @@ module.exports = 'shutdown'; /***/ }), -/* 691 */ +/* 710 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131579,12 +133550,12 @@ module.exports = 'sleep'; /***/ }), -/* 692 */ +/* 711 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131604,12 +133575,12 @@ module.exports = 'start'; /***/ }), -/* 693 */ +/* 712 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131640,12 +133611,12 @@ module.exports = 'transitioncomplete'; /***/ }), -/* 694 */ +/* 713 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131677,12 +133648,12 @@ module.exports = 'transitioninit'; /***/ }), -/* 695 */ +/* 714 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131711,12 +133682,12 @@ module.exports = 'transitionout'; /***/ }), -/* 696 */ +/* 715 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131751,12 +133722,12 @@ module.exports = 'transitionstart'; /***/ }), -/* 697 */ +/* 716 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131786,12 +133757,12 @@ module.exports = 'transitionwake'; /***/ }), -/* 698 */ +/* 717 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131823,12 +133794,12 @@ module.exports = 'update'; /***/ }), -/* 699 */ +/* 718 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131850,12 +133821,12 @@ module.exports = 'wake'; /***/ }), -/* 700 */ +/* 719 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131865,18 +133836,18 @@ module.exports = 'wake'; module.exports = { - Config: __webpack_require__(297), - CreateRenderer: __webpack_require__(320), - DebugHeader: __webpack_require__(322), + Config: __webpack_require__(311), + CreateRenderer: __webpack_require__(334), + DebugHeader: __webpack_require__(336), Events: __webpack_require__(18), - TimeStep: __webpack_require__(323), - VisibilityHandler: __webpack_require__(325) + TimeStep: __webpack_require__(337), + VisibilityHandler: __webpack_require__(339) }; /***/ }), -/* 701 */ +/* 720 */ /***/ (function(module, exports) { // shim for using process in browser @@ -132066,16 +134037,16 @@ process.umask = function() { return 0; }; /***/ }), -/* 702 */ +/* 721 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Browser = __webpack_require__(115); +var Browser = __webpack_require__(117); /** * Determines the input support of the browser running this Phaser Game instance. @@ -132141,16 +134112,16 @@ module.exports = init(); /***/ }), -/* 703 */ +/* 722 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Browser = __webpack_require__(115); +var Browser = __webpack_require__(117); /** * Determines the audio playback capabilities of the device running this Phaser Game instance. @@ -132266,12 +134237,12 @@ module.exports = init(); /***/ }), -/* 704 */ +/* 723 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132353,12 +134324,12 @@ module.exports = init(); /***/ }), -/* 705 */ +/* 724 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132457,12 +134428,12 @@ module.exports = init(); /***/ }), -/* 706 */ +/* 725 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132472,28 +134443,28 @@ module.exports = init(); module.exports = { - Between: __webpack_require__(300), - BetweenPoints: __webpack_require__(707), - BetweenPointsY: __webpack_require__(708), - BetweenY: __webpack_require__(709), - CounterClockwise: __webpack_require__(710), - Normalize: __webpack_require__(301), - Reverse: __webpack_require__(711), - RotateTo: __webpack_require__(712), - ShortestBetween: __webpack_require__(713), - Wrap: __webpack_require__(231), - WrapDegrees: __webpack_require__(232) + Between: __webpack_require__(314), + BetweenPoints: __webpack_require__(726), + BetweenPointsY: __webpack_require__(727), + BetweenY: __webpack_require__(728), + CounterClockwise: __webpack_require__(729), + Normalize: __webpack_require__(315), + Reverse: __webpack_require__(730), + RotateTo: __webpack_require__(731), + ShortestBetween: __webpack_require__(732), + Wrap: __webpack_require__(232), + WrapDegrees: __webpack_require__(233) }; /***/ }), -/* 707 */ +/* 726 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132519,12 +134490,12 @@ module.exports = BetweenPoints; /***/ }), -/* 708 */ +/* 727 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132551,12 +134522,12 @@ module.exports = BetweenPointsY; /***/ }), -/* 709 */ +/* 728 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132585,12 +134556,12 @@ module.exports = BetweenY; /***/ }), -/* 710 */ +/* 729 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132630,16 +134601,16 @@ module.exports = CounterClockwise; /***/ }), -/* 711 */ +/* 730 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Normalize = __webpack_require__(301); +var Normalize = __webpack_require__(315); /** * Reverse the given angle. @@ -132660,12 +134631,12 @@ module.exports = Reverse; /***/ }), -/* 712 */ +/* 731 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132727,12 +134698,12 @@ module.exports = RotateTo; /***/ }), -/* 713 */ +/* 732 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132776,12 +134747,12 @@ module.exports = ShortestBetween; /***/ }), -/* 714 */ +/* 733 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132791,20 +134762,122 @@ module.exports = ShortestBetween; module.exports = { - Between: __webpack_require__(58), - Power: __webpack_require__(715), - Squared: __webpack_require__(302) + Between: __webpack_require__(53), + BetweenPoints: __webpack_require__(734), + BetweenPointsSquared: __webpack_require__(735), + Chebyshev: __webpack_require__(736), + Power: __webpack_require__(737), + Snake: __webpack_require__(738), + Squared: __webpack_require__(316) }; /***/ }), -/* 715 */ +/* 734 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the distance between two points. + * + * @function Phaser.Math.Distance.BetweenPoints + * @since 3.22.0 + * + * @param {Phaser.Types.Math.Vector2Like} a - The first point. + * @param {Phaser.Types.Math.Vector2Like} b - The second point. + * + * @return {number} The distance between the points. + */ +var DistanceBetweenPoints = function (a, b) +{ + var dx = a.x - b.x; + var dy = a.y - b.y; + + return Math.sqrt(dx * dx + dy * dy); +}; + +module.exports = DistanceBetweenPoints; + + +/***/ }), +/* 735 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the squared distance between two points. + * + * @function Phaser.Math.Distance.BetweenPointsSquared + * @since 3.22.0 + * + * @param {Phaser.Types.Math.Vector2Like} a - The first point. + * @param {Phaser.Types.Math.Vector2Like} b - The second point. + * + * @return {number} The squared distance between the points. + */ +var DistanceBetweenPointsSquared = function (a, b) +{ + var dx = a.x - b.x; + var dy = a.y - b.y; + + return dx * dx + dy * dy; +}; + +module.exports = DistanceBetweenPointsSquared; + + +/***/ }), +/* 736 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the Chebyshev distance between two sets of coordinates (points). + * + * Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances. + * It's the effective distance when movement can be horizontal, vertical, or diagonal. + * + * @function Phaser.Math.Distance.Chebyshev + * @since 3.22.0 + * + * @param {number} x1 - The x coordinate of the first point. + * @param {number} y1 - The y coordinate of the first point. + * @param {number} x2 - The x coordinate of the second point. + * @param {number} y2 - The y coordinate of the second point. + * + * @return {number} The distance between each point. + */ +var ChebyshevDistance = function (x1, y1, x2, y2) +{ + return Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2)); +}; + +module.exports = ChebyshevDistance; + + +/***/ }), +/* 737 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132833,12 +134906,46 @@ module.exports = DistancePower; /***/ }), -/* 716 */ +/* 738 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the snake distance between two sets of coordinates (points). + * + * Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances. + * It's the effective distance when movement is allowed only horizontally or vertically (but not both). + * + * @function Phaser.Math.Distance.Snake + * @since 3.22.0 + * + * @param {number} x1 - The x coordinate of the first point. + * @param {number} y1 - The y coordinate of the first point. + * @param {number} x2 - The x coordinate of the second point. + * @param {number} y2 - The y coordinate of the second point. + * + * @return {number} The distance between each point. + */ +var SnakeDistance = function (x1, y1, x2, y2) +{ + return Math.abs(x1 - x2) + Math.abs(y1 - y2); +}; + +module.exports = SnakeDistance; + + +/***/ }), +/* 739 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132848,29 +134955,29 @@ module.exports = DistancePower; module.exports = { - Back: __webpack_require__(285), - Bounce: __webpack_require__(286), - Circular: __webpack_require__(287), - Cubic: __webpack_require__(288), - Elastic: __webpack_require__(289), - Expo: __webpack_require__(290), - Linear: __webpack_require__(291), - Quadratic: __webpack_require__(292), - Quartic: __webpack_require__(293), - Quintic: __webpack_require__(294), - Sine: __webpack_require__(295), - Stepped: __webpack_require__(296) + Back: __webpack_require__(299), + Bounce: __webpack_require__(300), + Circular: __webpack_require__(301), + Cubic: __webpack_require__(302), + Elastic: __webpack_require__(303), + Expo: __webpack_require__(304), + Linear: __webpack_require__(305), + Quadratic: __webpack_require__(306), + Quartic: __webpack_require__(307), + Quintic: __webpack_require__(308), + Sine: __webpack_require__(309), + Stepped: __webpack_require__(310) }; /***/ }), -/* 717 */ +/* 740 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132880,22 +134987,22 @@ module.exports = { module.exports = { - Ceil: __webpack_require__(718), - Equal: __webpack_require__(167), - Floor: __webpack_require__(719), - GreaterThan: __webpack_require__(303), - LessThan: __webpack_require__(304) + Ceil: __webpack_require__(741), + Equal: __webpack_require__(144), + Floor: __webpack_require__(742), + GreaterThan: __webpack_require__(317), + LessThan: __webpack_require__(318) }; /***/ }), -/* 718 */ +/* 741 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132921,12 +135028,12 @@ module.exports = Ceil; /***/ }), -/* 719 */ +/* 742 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132952,12 +135059,12 @@ module.exports = Floor; /***/ }), -/* 720 */ +/* 743 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132967,28 +135074,28 @@ module.exports = Floor; module.exports = { - Bezier: __webpack_require__(721), - CatmullRom: __webpack_require__(722), - CubicBezier: __webpack_require__(307), - Linear: __webpack_require__(723), - QuadraticBezier: __webpack_require__(308), - SmoothStep: __webpack_require__(309), - SmootherStep: __webpack_require__(724) + Bezier: __webpack_require__(744), + CatmullRom: __webpack_require__(745), + CubicBezier: __webpack_require__(321), + Linear: __webpack_require__(746), + QuadraticBezier: __webpack_require__(322), + SmoothStep: __webpack_require__(323), + SmootherStep: __webpack_require__(747) }; /***/ }), -/* 721 */ +/* 744 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bernstein = __webpack_require__(305); +var Bernstein = __webpack_require__(319); /** * A bezier interpolation method. @@ -133018,16 +135125,16 @@ module.exports = BezierInterpolation; /***/ }), -/* 722 */ +/* 745 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CatmullRom = __webpack_require__(168); +var CatmullRom = __webpack_require__(169); /** * A Catmull-Rom interpolation method. @@ -133075,16 +135182,16 @@ module.exports = CatmullRomInterpolation; /***/ }), -/* 723 */ +/* 746 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Linear = __webpack_require__(113); +var Linear = __webpack_require__(115); /** * A linear interpolation method. @@ -133122,16 +135229,16 @@ module.exports = LinearInterpolation; /***/ }), -/* 724 */ +/* 747 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmootherStep = __webpack_require__(155); +var SmootherStep = __webpack_require__(157); /** * A Smoother Step interpolation method. @@ -133155,12 +135262,12 @@ module.exports = SmootherStepInterpolation; /***/ }), -/* 725 */ +/* 748 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133170,20 +135277,20 @@ module.exports = SmootherStepInterpolation; module.exports = { - GetNext: __webpack_require__(310), - IsSize: __webpack_require__(116), - IsValue: __webpack_require__(726) + GetNext: __webpack_require__(324), + IsSize: __webpack_require__(118), + IsValue: __webpack_require__(749) }; /***/ }), -/* 726 */ +/* 749 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133206,12 +135313,12 @@ module.exports = IsValuePowerOfTwo; /***/ }), -/* 727 */ +/* 750 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133221,20 +135328,20 @@ module.exports = IsValuePowerOfTwo; module.exports = { - Ceil: __webpack_require__(311), + Ceil: __webpack_require__(325), Floor: __webpack_require__(93), - To: __webpack_require__(728) + To: __webpack_require__(751) }; /***/ }), -/* 728 */ +/* 751 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133272,12 +135379,12 @@ module.exports = SnapTo; /***/ }), -/* 729 */ +/* 752 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133624,10 +135731,14 @@ var RandomDataGenerator = new Class({ * * @method Phaser.Math.RandomDataGenerator#pick * @since 3.0.0 + * + * @generic T + * @genericUse {T[]} - [array] + * @genericUse {T} - [$return] * - * @param {array} array - The array to pick a random element from. + * @param {T[]} array - The array to pick a random element from. * - * @return {*} A random member of the array. + * @return {T} A random member of the array. */ pick: function (array) { @@ -133653,9 +135764,13 @@ var RandomDataGenerator = new Class({ * @method Phaser.Math.RandomDataGenerator#weightedPick * @since 3.0.0 * - * @param {array} array - The array to pick a random element from. + * @generic T + * @genericUse {T[]} - [array] + * @genericUse {T} - [$return] * - * @return {*} A random member of the array. + * @param {T[]} array - The array to pick a random element from. + * + * @return {T} A random member of the array. */ weightedPick: function (array) { @@ -133745,9 +135860,12 @@ var RandomDataGenerator = new Class({ * @method Phaser.Math.RandomDataGenerator#shuffle * @since 3.7.0 * - * @param {array} [array] - The array to be shuffled. + * @generic T + * @genericUse {T[]} - [array,$return] * - * @return {array} The shuffled array. + * @param {T[]} [array] - The array to be shuffled. + * + * @return {T[]} The shuffled array. */ shuffle: function (array) { @@ -133771,12 +135889,12 @@ module.exports = RandomDataGenerator; /***/ }), -/* 730 */ +/* 753 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133806,12 +135924,12 @@ module.exports = Average; /***/ }), -/* 731 */ +/* 754 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133843,12 +135961,12 @@ module.exports = CeilTo; /***/ }), -/* 732 */ +/* 755 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133872,12 +135990,12 @@ module.exports = Difference; /***/ }), -/* 733 */ +/* 756 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133909,25 +136027,29 @@ module.exports = FloorTo; /***/ }), -/* 734 */ +/* 757 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * Calculate the speed required to cover a distance in the time given. + * Calculate a per-ms speed from a distance and time (given in seconds). * * @function Phaser.Math.GetSpeed * @since 3.0.0 * - * @param {number} distance - The distance to travel in pixels. - * @param {integer} time - The time, in ms, to cover the distance in. + * @param {number} distance - The distance. + * @param {integer} time - The time, in seconds. * - * @return {number} The amount you will need to increment the position by each step in order to cover the distance in the time given. + * @return {number} The speed, in distance per ms. + * + * @example + * // 400px over 1 second is 0.4 px/ms + * Phaser.Math.GetSpeed(400, 1) // -> 0.4 */ var GetSpeed = function (distance, time) { @@ -133938,12 +136060,12 @@ module.exports = GetSpeed; /***/ }), -/* 735 */ +/* 758 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133969,12 +136091,12 @@ module.exports = IsEven; /***/ }), -/* 736 */ +/* 759 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -133998,12 +136120,12 @@ module.exports = IsEvenStrict; /***/ }), -/* 737 */ +/* 760 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134028,12 +136150,12 @@ module.exports = MaxAdd; /***/ }), -/* 738 */ +/* 761 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134058,12 +136180,12 @@ module.exports = MinSub; /***/ }), -/* 739 */ +/* 762 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134117,12 +136239,12 @@ module.exports = Percent; /***/ }), -/* 740 */ +/* 763 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134157,12 +136279,12 @@ module.exports = RandomXY; /***/ }), -/* 741 */ +/* 764 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134196,12 +136318,12 @@ module.exports = RandomXYZ; /***/ }), -/* 742 */ +/* 765 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134233,12 +136355,12 @@ module.exports = RandomXYZW; /***/ }), -/* 743 */ +/* 766 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134285,12 +136407,12 @@ module.exports = RoundTo; /***/ }), -/* 744 */ +/* 767 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134338,23 +136460,23 @@ module.exports = SinCosTableGenerator; /***/ }), -/* 745 */ +/* 768 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Vector2 = __webpack_require__(3); /** - * Returns a Vec2 containing the x and y position of the given index in a `width` x `height` sized grid. + * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid. * * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2. * - * If the given index is out of range an empty Vec2 is returned. + * If the given index is out of range an empty Vector2 is returned. * * @function Phaser.Math.ToXY * @since 3.19.0 @@ -134396,12 +136518,12 @@ module.exports = ToXY; /***/ }), -/* 746 */ +/* 769 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134426,18 +136548,18 @@ module.exports = Within; /***/ }), -/* 747 */ +/* 770 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector3 = __webpack_require__(171); -var Matrix4 = __webpack_require__(318); -var Quaternion = __webpack_require__(319); +var Vector3 = __webpack_require__(172); +var Matrix4 = __webpack_require__(332); +var Quaternion = __webpack_require__(333); var tmpMat4 = new Matrix4(); var tmpQuat = new Quaternion(); @@ -134474,12 +136596,12 @@ module.exports = RotateVec3; /***/ }), -/* 748 */ +/* 771 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134500,12 +136622,12 @@ module.exports = 'addtexture'; /***/ }), -/* 749 */ +/* 772 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134526,12 +136648,12 @@ module.exports = 'onerror'; /***/ }), -/* 750 */ +/* 773 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134555,12 +136677,12 @@ module.exports = 'onload'; /***/ }), -/* 751 */ +/* 774 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134578,12 +136700,12 @@ module.exports = 'ready'; /***/ }), -/* 752 */ +/* 775 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134606,7 +136728,7 @@ module.exports = 'removetexture'; /***/ }), -/* 753 */ +/* 776 */ /***/ (function(module, exports) { module.exports = [ @@ -134642,7 +136764,7 @@ module.exports = [ /***/ }), -/* 754 */ +/* 777 */ /***/ (function(module, exports) { module.exports = [ @@ -134661,7 +136783,7 @@ module.exports = [ /***/ }), -/* 755 */ +/* 778 */ /***/ (function(module, exports) { module.exports = [ @@ -134720,7 +136842,7 @@ module.exports = [ /***/ }), -/* 756 */ +/* 779 */ /***/ (function(module, exports) { module.exports = [ @@ -134764,7 +136886,7 @@ module.exports = [ /***/ }), -/* 757 */ +/* 780 */ /***/ (function(module, exports) { module.exports = [ @@ -134799,12 +136921,12 @@ module.exports = [ /***/ }), -/* 758 */ +/* 781 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134814,19 +136936,19 @@ module.exports = [ module.exports = { - GenerateTexture: __webpack_require__(326), - Palettes: __webpack_require__(759) + GenerateTexture: __webpack_require__(340), + Palettes: __webpack_require__(782) }; /***/ }), -/* 759 */ +/* 782 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134836,22 +136958,22 @@ module.exports = { module.exports = { - ARNE16: __webpack_require__(327), - C64: __webpack_require__(760), - CGA: __webpack_require__(761), - JMP: __webpack_require__(762), - MSX: __webpack_require__(763) + ARNE16: __webpack_require__(341), + C64: __webpack_require__(783), + CGA: __webpack_require__(784), + JMP: __webpack_require__(785), + MSX: __webpack_require__(786) }; /***/ }), -/* 760 */ +/* 783 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134884,12 +137006,12 @@ module.exports = { /***/ }), -/* 761 */ +/* 784 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134922,12 +137044,12 @@ module.exports = { /***/ }), -/* 762 */ +/* 785 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134960,12 +137082,12 @@ module.exports = { /***/ }), -/* 763 */ +/* 786 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134998,12 +137120,12 @@ module.exports = { /***/ }), -/* 764 */ +/* 787 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135012,38 +137134,38 @@ module.exports = { */ module.exports = { - Path: __webpack_require__(765), + Path: __webpack_require__(788), - CubicBezier: __webpack_require__(328), + CubicBezier: __webpack_require__(342), Curve: __webpack_require__(80), - Ellipse: __webpack_require__(329), - Line: __webpack_require__(330), - QuadraticBezier: __webpack_require__(331), - Spline: __webpack_require__(332) + Ellipse: __webpack_require__(343), + Line: __webpack_require__(344), + QuadraticBezier: __webpack_require__(345), + Spline: __webpack_require__(346) }; /***/ }), -/* 765 */ +/* 788 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) var Class = __webpack_require__(0); -var CubicBezierCurve = __webpack_require__(328); -var EllipseCurve = __webpack_require__(329); +var CubicBezierCurve = __webpack_require__(342); +var EllipseCurve = __webpack_require__(343); var GameObjectFactory = __webpack_require__(5); -var LineCurve = __webpack_require__(330); -var MovePathTo = __webpack_require__(766); -var QuadraticBezierCurve = __webpack_require__(331); +var LineCurve = __webpack_require__(344); +var MovePathTo = __webpack_require__(789); +var QuadraticBezierCurve = __webpack_require__(345); var Rectangle = __webpack_require__(11); -var SplineCurve = __webpack_require__(332); +var SplineCurve = __webpack_require__(346); var Vector2 = __webpack_require__(3); var MATH_CONST = __webpack_require__(13); @@ -135227,12 +137349,12 @@ var Path = new Class({ * @method Phaser.Curves.Path#cubicBezierTo * @since 3.0.0 * - * @param {(number|Phaser.Math.Vector2)} x - The x coordinate of the end point. Or, if a Vec2, the p1 value. - * @param {(number|Phaser.Math.Vector2)} y - The y coordinate of the end point. Or, if a Vec2, the p2 value. - * @param {(number|Phaser.Math.Vector2)} control1X - The x coordinate of the first control point. Or, if a Vec2, the p3 value. - * @param {number} [control1Y] - The y coordinate of the first control point. Not used if vec2s are provided as the first 3 arguments. - * @param {number} [control2X] - The x coordinate of the second control point. Not used if vec2s are provided as the first 3 arguments. - * @param {number} [control2Y] - The y coordinate of the second control point. Not used if vec2s are provided as the first 3 arguments. + * @param {(number|Phaser.Math.Vector2)} x - The x coordinate of the end point. Or, if a Vector2, the p1 value. + * @param {(number|Phaser.Math.Vector2)} y - The y coordinate of the end point. Or, if a Vector2, the p2 value. + * @param {(number|Phaser.Math.Vector2)} control1X - The x coordinate of the first control point. Or, if a Vector2, the p3 value. + * @param {number} [control1Y] - The y coordinate of the first control point. Not used if Vector2s are provided as the first 3 arguments. + * @param {number} [control2X] - The x coordinate of the second control point. Not used if Vector2s are provided as the first 3 arguments. + * @param {number} [control2Y] - The y coordinate of the second control point. Not used if Vector2s are provided as the first 3 arguments. * * @return {Phaser.Curves.Path} This Path object. */ @@ -135243,7 +137365,7 @@ var Path = new Class({ var p2; var p3; - // Assume they're all vec2s + // Assume they're all Vector2s if (x instanceof Vector2) { p1 = x; @@ -135281,7 +137403,7 @@ var Path = new Class({ var p1; var p2; - // Assume they're all vec2s + // Assume they're all Vector2s if (x instanceof Vector2) { p1 = x; @@ -135598,14 +137720,12 @@ var Path = new Class({ }, /** - * Returns the defined starting point of the Path. - * - * This is not necessarily equal to the starting point of the first Curve if it differs from {@link startPoint}. + * Get a sequence of points on the path. * * @method Phaser.Curves.Path#getPoints * @since 3.0.0 * - * @param {integer} [divisions=12] - The number of points to divide the path in to. + * @param {integer} [divisions=12] - The number of divisions per resolution per curve. * * @return {Phaser.Math.Vector2[]} An array of Vector2 objects that containing the points along the Path. */ @@ -135655,7 +137775,7 @@ var Path = new Class({ /** * Returns a randomly chosen point anywhere on the path. This follows the same rules as `getPoint` in that it may return a point on any Curve inside this path. - * + * * When calling this method multiple times, the points are not guaranteed to be equally spaced spatially. * * @method Phaser.Curves.Path#getRandomPoint @@ -135676,7 +137796,7 @@ var Path = new Class({ /** * Divides this Path into a set of equally spaced points, - * + * * The resulting points are equally spaced with respect to the points' position on the path, but not necessarily equally spaced spatially. * * @method Phaser.Curves.Path#getSpacedPoints @@ -135770,7 +137890,7 @@ var Path = new Class({ /** * Creates a "gap" in this path from the path's current end point to the given coordinates. - * + * * After calling this function, this Path's end point will be equal to the given coordinates * * @method Phaser.Curves.Path#moveTo @@ -135875,12 +137995,12 @@ module.exports = Path; /***/ }), -/* 766 */ +/* 789 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136015,12 +138135,12 @@ module.exports = MoveTo; /***/ }), -/* 767 */ +/* 790 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136030,27 +138150,27 @@ module.exports = MoveTo; module.exports = { - DataManager: __webpack_require__(111), - DataManagerPlugin: __webpack_require__(768), - Events: __webpack_require__(267) + DataManager: __webpack_require__(113), + DataManagerPlugin: __webpack_require__(791), + Events: __webpack_require__(281) }; /***/ }), -/* 768 */ +/* 791 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var DataManager = __webpack_require__(111); -var PluginCache = __webpack_require__(21); -var SceneEvents = __webpack_require__(22); +var DataManager = __webpack_require__(113); +var PluginCache = __webpack_require__(23); +var SceneEvents = __webpack_require__(19); /** * @classdesc @@ -136165,12 +138285,12 @@ module.exports = DataManagerPlugin; /***/ }), -/* 769 */ +/* 792 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136180,27 +138300,27 @@ module.exports = DataManagerPlugin; module.exports = { - Align: __webpack_require__(770), - BaseShader: __webpack_require__(333), - Bounds: __webpack_require__(785), - Canvas: __webpack_require__(788), - Color: __webpack_require__(334), - Masks: __webpack_require__(797) + Align: __webpack_require__(793), + BaseShader: __webpack_require__(347), + Bounds: __webpack_require__(796), + Canvas: __webpack_require__(799), + Color: __webpack_require__(348), + Masks: __webpack_require__(808) }; /***/ }), -/* 770 */ +/* 793 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(143); +var CONST = __webpack_require__(106); var Extend = __webpack_require__(17); /** @@ -136209,8 +138329,8 @@ var Extend = __webpack_require__(17); var Align = { - In: __webpack_require__(771), - To: __webpack_require__(772) + In: __webpack_require__(794), + To: __webpack_require__(795) }; @@ -136221,12 +138341,12 @@ module.exports = Align; /***/ }), -/* 771 */ +/* 794 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136236,27 +138356,27 @@ module.exports = Align; module.exports = { - BottomCenter: __webpack_require__(239), - BottomLeft: __webpack_require__(240), - BottomRight: __webpack_require__(241), - Center: __webpack_require__(242), - LeftCenter: __webpack_require__(244), - QuickSet: __webpack_require__(238), - RightCenter: __webpack_require__(245), - TopCenter: __webpack_require__(246), - TopLeft: __webpack_require__(247), - TopRight: __webpack_require__(248) + BottomCenter: __webpack_require__(253), + BottomLeft: __webpack_require__(254), + BottomRight: __webpack_require__(255), + Center: __webpack_require__(256), + LeftCenter: __webpack_require__(258), + QuickSet: __webpack_require__(252), + RightCenter: __webpack_require__(259), + TopCenter: __webpack_require__(260), + TopLeft: __webpack_require__(261), + TopRight: __webpack_require__(262) }; /***/ }), -/* 772 */ +/* 795 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136266,557 +138386,30 @@ module.exports = { module.exports = { - BottomCenter: __webpack_require__(773), - BottomLeft: __webpack_require__(774), - BottomRight: __webpack_require__(775), - LeftBottom: __webpack_require__(776), - LeftCenter: __webpack_require__(777), - LeftTop: __webpack_require__(778), - RightBottom: __webpack_require__(779), - RightCenter: __webpack_require__(780), - RightTop: __webpack_require__(781), - TopCenter: __webpack_require__(782), - TopLeft: __webpack_require__(783), - TopRight: __webpack_require__(784) + BottomCenter: __webpack_require__(240), + BottomLeft: __webpack_require__(241), + BottomRight: __webpack_require__(242), + LeftBottom: __webpack_require__(243), + LeftCenter: __webpack_require__(244), + LeftTop: __webpack_require__(245), + QuickSet: __webpack_require__(239), + RightBottom: __webpack_require__(246), + RightCenter: __webpack_require__(247), + RightTop: __webpack_require__(248), + TopCenter: __webpack_require__(249), + TopLeft: __webpack_require__(250), + TopRight: __webpack_require__(251) }; /***/ }), -/* 773 */ +/* 796 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetBottom = __webpack_require__(38); -var GetCenterX = __webpack_require__(75); -var SetCenterX = __webpack_require__(76); -var SetTop = __webpack_require__(45); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the bottom center position of the other. - * - * @function Phaser.Display.Align.To.BottomCenter - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var BottomCenter = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetCenterX(gameObject, GetCenterX(alignTo) + offsetX); - SetTop(gameObject, GetBottom(alignTo) + offsetY); - - return gameObject; -}; - -module.exports = BottomCenter; - - -/***/ }), -/* 774 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetBottom = __webpack_require__(38); -var GetLeft = __webpack_require__(40); -var SetLeft = __webpack_require__(41); -var SetTop = __webpack_require__(45); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the bottom left position of the other. - * - * @function Phaser.Display.Align.To.BottomLeft - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var BottomLeft = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetLeft(gameObject, GetLeft(alignTo) - offsetX); - SetTop(gameObject, GetBottom(alignTo) + offsetY); - - return gameObject; -}; - -module.exports = BottomLeft; - - -/***/ }), -/* 775 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetBottom = __webpack_require__(38); -var GetRight = __webpack_require__(42); -var SetRight = __webpack_require__(43); -var SetTop = __webpack_require__(45); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the bottom right position of the other. - * - * @function Phaser.Display.Align.To.BottomRight - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var BottomRight = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetRight(gameObject, GetRight(alignTo) + offsetX); - SetTop(gameObject, GetBottom(alignTo) + offsetY); - - return gameObject; -}; - -module.exports = BottomRight; - - -/***/ }), -/* 776 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetBottom = __webpack_require__(38); -var GetLeft = __webpack_require__(40); -var SetBottom = __webpack_require__(39); -var SetRight = __webpack_require__(43); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the left bottom position of the other. - * - * @function Phaser.Display.Align.To.LeftBottom - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var LeftBottom = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetRight(gameObject, GetLeft(alignTo) - offsetX); - SetBottom(gameObject, GetBottom(alignTo) + offsetY); - - return gameObject; -}; - -module.exports = LeftBottom; - - -/***/ }), -/* 777 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetCenterY = __webpack_require__(78); -var GetLeft = __webpack_require__(40); -var SetCenterY = __webpack_require__(77); -var SetRight = __webpack_require__(43); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the left center position of the other. - * - * @function Phaser.Display.Align.To.LeftCenter - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var LeftCenter = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetRight(gameObject, GetLeft(alignTo) - offsetX); - SetCenterY(gameObject, GetCenterY(alignTo) + offsetY); - - return gameObject; -}; - -module.exports = LeftCenter; - - -/***/ }), -/* 778 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetLeft = __webpack_require__(40); -var GetTop = __webpack_require__(44); -var SetRight = __webpack_require__(43); -var SetTop = __webpack_require__(45); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the left top position of the other. - * - * @function Phaser.Display.Align.To.LeftTop - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var LeftTop = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetRight(gameObject, GetLeft(alignTo) - offsetX); - SetTop(gameObject, GetTop(alignTo) - offsetY); - - return gameObject; -}; - -module.exports = LeftTop; - - -/***/ }), -/* 779 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetBottom = __webpack_require__(38); -var GetRight = __webpack_require__(42); -var SetBottom = __webpack_require__(39); -var SetLeft = __webpack_require__(41); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the right bottom position of the other. - * - * @function Phaser.Display.Align.To.RightBottom - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var RightBottom = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetLeft(gameObject, GetRight(alignTo) + offsetX); - SetBottom(gameObject, GetBottom(alignTo) + offsetY); - - return gameObject; -}; - -module.exports = RightBottom; - - -/***/ }), -/* 780 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetCenterY = __webpack_require__(78); -var GetRight = __webpack_require__(42); -var SetCenterY = __webpack_require__(77); -var SetLeft = __webpack_require__(41); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the right center position of the other. - * - * @function Phaser.Display.Align.To.RightCenter - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var RightCenter = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetLeft(gameObject, GetRight(alignTo) + offsetX); - SetCenterY(gameObject, GetCenterY(alignTo) + offsetY); - - return gameObject; -}; - -module.exports = RightCenter; - - -/***/ }), -/* 781 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetRight = __webpack_require__(42); -var GetTop = __webpack_require__(44); -var SetLeft = __webpack_require__(41); -var SetTop = __webpack_require__(45); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the right top position of the other. - * - * @function Phaser.Display.Align.To.RightTop - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var RightTop = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetLeft(gameObject, GetRight(alignTo) + offsetX); - SetTop(gameObject, GetTop(alignTo) - offsetY); - - return gameObject; -}; - -module.exports = RightTop; - - -/***/ }), -/* 782 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetCenterX = __webpack_require__(75); -var GetTop = __webpack_require__(44); -var SetBottom = __webpack_require__(39); -var SetCenterX = __webpack_require__(76); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the top center position of the other. - * - * @function Phaser.Display.Align.To.TopCenter - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var TopCenter = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetCenterX(gameObject, GetCenterX(alignTo) + offsetX); - SetBottom(gameObject, GetTop(alignTo) - offsetY); - - return gameObject; -}; - -module.exports = TopCenter; - - -/***/ }), -/* 783 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetLeft = __webpack_require__(40); -var GetTop = __webpack_require__(44); -var SetBottom = __webpack_require__(39); -var SetLeft = __webpack_require__(41); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the top left position of the other. - * - * @function Phaser.Display.Align.To.TopLeft - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var TopLeft = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetLeft(gameObject, GetLeft(alignTo) - offsetX); - SetBottom(gameObject, GetTop(alignTo) - offsetY); - - return gameObject; -}; - -module.exports = TopLeft; - - -/***/ }), -/* 784 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetRight = __webpack_require__(42); -var GetTop = __webpack_require__(44); -var SetBottom = __webpack_require__(39); -var SetRight = __webpack_require__(43); - -/** - * Takes given Game Object and aligns it so that it is positioned next to the top right position of the other. - * - * @function Phaser.Display.Align.To.TopRight - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned. - * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on. - * @param {number} [offsetX=0] - Optional horizontal offset from the position. - * @param {number} [offsetY=0] - Optional vertical offset from the position. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned. - */ -var TopRight = function (gameObject, alignTo, offsetX, offsetY) -{ - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - SetRight(gameObject, GetRight(alignTo) + offsetX); - SetBottom(gameObject, GetTop(alignTo) - offsetY); - - return gameObject; -}; - -module.exports = TopRight; - - -/***/ }), -/* 785 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136826,32 +138419,32 @@ module.exports = TopRight; module.exports = { - CenterOn: __webpack_require__(243), + CenterOn: __webpack_require__(257), GetBottom: __webpack_require__(38), GetCenterX: __webpack_require__(75), - GetCenterY: __webpack_require__(78), + GetCenterY: __webpack_require__(77), GetLeft: __webpack_require__(40), - GetOffsetX: __webpack_require__(786), - GetOffsetY: __webpack_require__(787), + GetOffsetX: __webpack_require__(797), + GetOffsetY: __webpack_require__(798), GetRight: __webpack_require__(42), - GetTop: __webpack_require__(44), - SetBottom: __webpack_require__(39), + GetTop: __webpack_require__(45), + SetBottom: __webpack_require__(44), SetCenterX: __webpack_require__(76), - SetCenterY: __webpack_require__(77), + SetCenterY: __webpack_require__(78), SetLeft: __webpack_require__(41), SetRight: __webpack_require__(43), - SetTop: __webpack_require__(45) + SetTop: __webpack_require__(39) }; /***/ }), -/* 786 */ +/* 797 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136876,12 +138469,12 @@ module.exports = GetOffsetX; /***/ }), -/* 787 */ +/* 798 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136906,12 +138499,12 @@ module.exports = GetOffsetY; /***/ }), -/* 788 */ +/* 799 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136921,22 +138514,22 @@ module.exports = GetOffsetY; module.exports = { - CanvasInterpolation: __webpack_require__(321), + CanvasInterpolation: __webpack_require__(335), CanvasPool: __webpack_require__(26), - Smoothing: __webpack_require__(162), - TouchAction: __webpack_require__(789), - UserSelect: __webpack_require__(790) + Smoothing: __webpack_require__(164), + TouchAction: __webpack_require__(800), + UserSelect: __webpack_require__(801) }; /***/ }), -/* 789 */ +/* 800 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136966,12 +138559,12 @@ module.exports = TouchAction; /***/ }), -/* 790 */ +/* 801 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137013,12 +138606,12 @@ module.exports = UserSelect; /***/ }), -/* 791 */ +/* 802 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137053,17 +138646,17 @@ module.exports = ColorToRGBA; /***/ }), -/* 792 */ +/* 803 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Color = __webpack_require__(33); -var HueToComponent = __webpack_require__(336); +var HueToComponent = __webpack_require__(350); /** * Converts HSL (hue, saturation and lightness) values to a Phaser Color object. @@ -137103,16 +138696,16 @@ module.exports = HSLToColor; /***/ }), -/* 793 */ +/* 804 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HSVToRGB = __webpack_require__(161); +var HSVToRGB = __webpack_require__(163); /** * Get HSV color wheel values in an array which will be 360 elements in size. @@ -137144,16 +138737,16 @@ module.exports = HSVColorWheel; /***/ }), -/* 794 */ +/* 805 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Linear = __webpack_require__(113); +var Linear = __webpack_require__(115); /** * @namespace Phaser.Display.Color.Interpolate @@ -137252,16 +138845,16 @@ module.exports = { /***/ }), -/* 795 */ +/* 806 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Between = __webpack_require__(169); +var Between = __webpack_require__(170); var Color = __webpack_require__(33); /** @@ -137288,16 +138881,16 @@ module.exports = RandomRGB; /***/ }), -/* 796 */ +/* 807 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ComponentToHex = __webpack_require__(335); +var ComponentToHex = __webpack_require__(349); /** * Converts the color values into an HTML compatible color string, prefixed with either `#` or `0x`. @@ -137332,12 +138925,12 @@ module.exports = RGBToString; /***/ }), -/* 797 */ +/* 808 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137347,19 +138940,19 @@ module.exports = RGBToString; module.exports = { - BitmapMask: __webpack_require__(261), - GeometryMask: __webpack_require__(262) + BitmapMask: __webpack_require__(275), + GeometryMask: __webpack_require__(276) }; /***/ }), -/* 798 */ +/* 809 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137369,13 +138962,13 @@ module.exports = { var Dom = { - AddToDOM: __webpack_require__(118), - DOMContentLoaded: __webpack_require__(337), - GetScreenOrientation: __webpack_require__(338), - GetTarget: __webpack_require__(343), - ParseXML: __webpack_require__(344), - RemoveFromDOM: __webpack_require__(175), - RequestAnimationFrame: __webpack_require__(324) + AddToDOM: __webpack_require__(120), + DOMContentLoaded: __webpack_require__(351), + GetScreenOrientation: __webpack_require__(352), + GetTarget: __webpack_require__(357), + ParseXML: __webpack_require__(358), + RemoveFromDOM: __webpack_require__(176), + RequestAnimationFrame: __webpack_require__(338) }; @@ -137383,12 +138976,12 @@ module.exports = Dom; /***/ }), -/* 799 */ +/* 810 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137396,22 +138989,22 @@ module.exports = Dom; * @namespace Phaser.Events */ -module.exports = { EventEmitter: __webpack_require__(800) }; +module.exports = { EventEmitter: __webpack_require__(811) }; /***/ }), -/* 800 */ +/* 811 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var EE = __webpack_require__(9); -var PluginCache = __webpack_require__(21); +var PluginCache = __webpack_require__(23); /** * @classdesc @@ -137463,7 +139056,7 @@ var EventEmitter = new Class({ * @method Phaser.Events.EventEmitter#eventNames * @since 3.0.0 * - * @return {array} + * @return {Array.} */ /** @@ -137474,7 +139067,7 @@ var EventEmitter = new Class({ * * @param {(string|symbol)} event - The event name. * - * @return {array} The registered listeners. + * @return {Function[]} The registered listeners. */ /** @@ -137510,7 +139103,7 @@ var EventEmitter = new Class({ * @param {function} fn - The listener function. * @param {*} [context=this] - The context to invoke the listener with. * - * @return {Phaser.Events.EventEmitter} `this`. + * @return {this} `this`. */ /** @@ -137523,7 +139116,7 @@ var EventEmitter = new Class({ * @param {function} fn - The listener function. * @param {*} [context=this] - The context to invoke the listener with. * - * @return {Phaser.Events.EventEmitter} `this`. + * @return {this} `this`. */ /** @@ -137536,7 +139129,7 @@ var EventEmitter = new Class({ * @param {function} fn - The listener function. * @param {*} [context=this] - The context to invoke the listener with. * - * @return {Phaser.Events.EventEmitter} `this`. + * @return {this} `this`. */ /** @@ -137550,7 +139143,7 @@ var EventEmitter = new Class({ * @param {*} [context] - Only remove the listeners that have this context. * @param {boolean} [once] - Only remove one-time listeners. * - * @return {Phaser.Events.EventEmitter} `this`. + * @return {this} `this`. */ /** @@ -137564,7 +139157,7 @@ var EventEmitter = new Class({ * @param {*} [context] - Only remove the listeners that have this context. * @param {boolean} [once] - Only remove one-time listeners. * - * @return {Phaser.Events.EventEmitter} `this`. + * @return {this} `this`. */ /** @@ -137575,7 +139168,7 @@ var EventEmitter = new Class({ * * @param {(string|symbol)} [event] - The event name. * - * @return {Phaser.Events.EventEmitter} `this`. + * @return {this} `this`. */ PluginCache.register('EventEmitter', EventEmitter, 'events'); @@ -137584,42 +139177,42 @@ module.exports = EventEmitter; /***/ }), -/* 801 */ +/* 812 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(118); -var AnimationManager = __webpack_require__(272); -var CacheManager = __webpack_require__(275); +var AddToDOM = __webpack_require__(120); +var AnimationManager = __webpack_require__(286); +var CacheManager = __webpack_require__(289); var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); -var Config = __webpack_require__(297); -var CreateDOMContainer = __webpack_require__(802); -var CreateRenderer = __webpack_require__(320); -var DataManager = __webpack_require__(111); -var DebugHeader = __webpack_require__(322); -var Device = __webpack_require__(298); -var DOMContentLoaded = __webpack_require__(337); +var Config = __webpack_require__(311); +var CreateDOMContainer = __webpack_require__(813); +var CreateRenderer = __webpack_require__(334); +var DataManager = __webpack_require__(113); +var DebugHeader = __webpack_require__(336); +var Device = __webpack_require__(312); +var DOMContentLoaded = __webpack_require__(351); var EventEmitter = __webpack_require__(9); var Events = __webpack_require__(18); -var InputManager = __webpack_require__(345); -var PluginCache = __webpack_require__(21); -var PluginManager = __webpack_require__(350); -var ScaleManager = __webpack_require__(351); -var SceneManager = __webpack_require__(353); -var TextureEvents = __webpack_require__(117); -var TextureManager = __webpack_require__(356); -var TimeStep = __webpack_require__(323); -var VisibilityHandler = __webpack_require__(325); +var InputManager = __webpack_require__(359); +var PluginCache = __webpack_require__(23); +var PluginManager = __webpack_require__(364); +var ScaleManager = __webpack_require__(365); +var SceneManager = __webpack_require__(367); +var TextureEvents = __webpack_require__(119); +var TextureManager = __webpack_require__(370); +var TimeStep = __webpack_require__(337); +var VisibilityHandler = __webpack_require__(339); if (true) { - var SoundManagerCreator = __webpack_require__(360); + var SoundManagerCreator = __webpack_require__(374); } if (false) @@ -138246,12 +139839,12 @@ var Game = new Class({ */ runDestroy: function () { + this.scene.destroy(); + this.events.emit(Events.DESTROY); this.events.removeAllListeners(); - this.scene.destroy(); - if (this.renderer) { this.renderer.destroy(); @@ -138287,16 +139880,16 @@ module.exports = Game; /***/ }), -/* 802 */ +/* 813 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(118); +var AddToDOM = __webpack_require__(120); var CreateDOMContainer = function (game) { @@ -138331,12 +139924,12 @@ module.exports = CreateDOMContainer; /***/ }), -/* 803 */ +/* 814 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138352,12 +139945,12 @@ module.exports = 'boot'; /***/ }), -/* 804 */ +/* 815 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138373,12 +139966,12 @@ module.exports = 'destroy'; /***/ }), -/* 805 */ +/* 816 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138401,12 +139994,12 @@ module.exports = 'dragend'; /***/ }), -/* 806 */ +/* 817 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138432,12 +140025,12 @@ module.exports = 'dragenter'; /***/ }), -/* 807 */ +/* 818 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138464,12 +140057,12 @@ module.exports = 'drag'; /***/ }), -/* 808 */ +/* 819 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138495,12 +140088,12 @@ module.exports = 'dragleave'; /***/ }), -/* 809 */ +/* 820 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138529,12 +140122,12 @@ module.exports = 'dragover'; /***/ }), -/* 810 */ +/* 821 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138559,12 +140152,12 @@ module.exports = 'dragstart'; /***/ }), -/* 811 */ +/* 822 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138588,12 +140181,12 @@ module.exports = 'drop'; /***/ }), -/* 812 */ +/* 823 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138615,12 +140208,12 @@ module.exports = 'gameout'; /***/ }), -/* 813 */ +/* 824 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138642,12 +140235,12 @@ module.exports = 'gameover'; /***/ }), -/* 814 */ +/* 825 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138683,12 +140276,12 @@ module.exports = 'gameobjectdown'; /***/ }), -/* 815 */ +/* 826 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138714,12 +140307,12 @@ module.exports = 'dragend'; /***/ }), -/* 816 */ +/* 827 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138744,12 +140337,12 @@ module.exports = 'dragenter'; /***/ }), -/* 817 */ +/* 828 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138775,12 +140368,12 @@ module.exports = 'drag'; /***/ }), -/* 818 */ +/* 829 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138805,12 +140398,12 @@ module.exports = 'dragleave'; /***/ }), -/* 819 */ +/* 830 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138838,12 +140431,12 @@ module.exports = 'dragover'; /***/ }), -/* 820 */ +/* 831 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138872,12 +140465,12 @@ module.exports = 'dragstart'; /***/ }), -/* 821 */ +/* 832 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138902,12 +140495,12 @@ module.exports = 'drop'; /***/ }), -/* 822 */ +/* 833 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138943,12 +140536,12 @@ module.exports = 'gameobjectmove'; /***/ }), -/* 823 */ +/* 834 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138984,12 +140577,12 @@ module.exports = 'gameobjectout'; /***/ }), -/* 824 */ +/* 835 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139025,12 +140618,12 @@ module.exports = 'gameobjectover'; /***/ }), -/* 825 */ +/* 836 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139066,12 +140659,12 @@ module.exports = 'pointerdown'; /***/ }), -/* 826 */ +/* 837 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139107,12 +140700,12 @@ module.exports = 'pointermove'; /***/ }), -/* 827 */ +/* 838 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139146,12 +140739,12 @@ module.exports = 'pointerout'; /***/ }), -/* 828 */ +/* 839 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139187,12 +140780,12 @@ module.exports = 'pointerover'; /***/ }), -/* 829 */ +/* 840 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139228,12 +140821,12 @@ module.exports = 'pointerup'; /***/ }), -/* 830 */ +/* 841 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139270,12 +140863,12 @@ module.exports = 'wheel'; /***/ }), -/* 831 */ +/* 842 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139311,12 +140904,12 @@ module.exports = 'gameobjectup'; /***/ }), -/* 832 */ +/* 843 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139355,12 +140948,12 @@ module.exports = 'gameobjectwheel'; /***/ }), -/* 833 */ +/* 844 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139376,12 +140969,12 @@ module.exports = 'boot'; /***/ }), -/* 834 */ +/* 845 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139401,12 +140994,12 @@ module.exports = 'process'; /***/ }), -/* 835 */ +/* 846 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139422,12 +141015,12 @@ module.exports = 'update'; /***/ }), -/* 836 */ +/* 847 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139457,12 +141050,12 @@ module.exports = 'pointerdown'; /***/ }), -/* 837 */ +/* 848 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139491,12 +141084,12 @@ module.exports = 'pointerdownoutside'; /***/ }), -/* 838 */ +/* 849 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139526,12 +141119,12 @@ module.exports = 'pointermove'; /***/ }), -/* 839 */ +/* 850 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139540,7 +141133,7 @@ module.exports = 'pointermove'; * * This event is dispatched by the Input Plugin belonging to a Scene if a pointer moves out of any interactive Game Object. * - * Listen to this event from within a Scene using: `this.input.on('pointerup', listener)`. + * Listen to this event from within a Scene using: `this.input.on('pointerout', listener)`. * * The event hierarchy is as follows: * @@ -139561,12 +141154,12 @@ module.exports = 'pointerout'; /***/ }), -/* 840 */ +/* 851 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139596,12 +141189,12 @@ module.exports = 'pointerover'; /***/ }), -/* 841 */ +/* 852 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139631,12 +141224,12 @@ module.exports = 'pointerup'; /***/ }), -/* 842 */ +/* 853 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139665,12 +141258,12 @@ module.exports = 'pointerupoutside'; /***/ }), -/* 843 */ +/* 854 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139703,12 +141296,12 @@ module.exports = 'wheel'; /***/ }), -/* 844 */ +/* 855 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139727,12 +141320,12 @@ module.exports = 'pointerlockchange'; /***/ }), -/* 845 */ +/* 856 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139749,12 +141342,12 @@ module.exports = 'preupdate'; /***/ }), -/* 846 */ +/* 857 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139770,12 +141363,12 @@ module.exports = 'shutdown'; /***/ }), -/* 847 */ +/* 858 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139792,12 +141385,12 @@ module.exports = 'start'; /***/ }), -/* 848 */ +/* 859 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139817,12 +141410,12 @@ module.exports = 'update'; /***/ }), -/* 849 */ +/* 860 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139876,12 +141469,12 @@ module.exports = GetInnerHeight; /***/ }), -/* 850 */ +/* 861 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139906,12 +141499,12 @@ module.exports = 'addfile'; /***/ }), -/* 851 */ +/* 862 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139934,12 +141527,12 @@ module.exports = 'complete'; /***/ }), -/* 852 */ +/* 863 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -139963,12 +141556,12 @@ module.exports = 'filecomplete'; /***/ }), -/* 853 */ +/* 864 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140017,12 +141610,12 @@ module.exports = 'filecomplete-'; /***/ }), -/* 854 */ +/* 865 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140042,12 +141635,12 @@ module.exports = 'loaderror'; /***/ }), -/* 855 */ +/* 866 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140068,12 +141661,12 @@ module.exports = 'load'; /***/ }), -/* 856 */ +/* 867 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140095,12 +141688,12 @@ module.exports = 'fileprogress'; /***/ }), -/* 857 */ +/* 868 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140124,12 +141717,12 @@ module.exports = 'postprocess'; /***/ }), -/* 858 */ +/* 869 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140149,12 +141742,12 @@ module.exports = 'progress'; /***/ }), -/* 859 */ +/* 870 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140176,17 +141769,17 @@ module.exports = 'start'; /***/ }), -/* 860 */ +/* 871 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetFastValue = __webpack_require__(2); -var UppercaseFirst = __webpack_require__(178); +var UppercaseFirst = __webpack_require__(179); /** * Builds an array of which physics plugins should be activated for the given Scene. @@ -140238,12 +141831,12 @@ module.exports = GetPhysicsPlugins; /***/ }), -/* 861 */ +/* 872 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140285,12 +141878,12 @@ module.exports = GetScenePlugins; /***/ }), -/* 862 */ +/* 873 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140346,12 +141939,12 @@ module.exports = InjectionMap; /***/ }), -/* 863 */ +/* 874 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140427,12 +142020,12 @@ module.exports = AtlasXML; /***/ }), -/* 864 */ +/* 875 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140462,12 +142055,12 @@ module.exports = Canvas; /***/ }), -/* 865 */ +/* 876 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140497,12 +142090,12 @@ module.exports = Image; /***/ }), -/* 866 */ +/* 877 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140604,12 +142197,12 @@ module.exports = JSONArray; /***/ }), -/* 867 */ +/* 878 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140703,12 +142296,12 @@ module.exports = JSONHash; /***/ }), -/* 868 */ +/* 879 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140828,12 +142421,12 @@ module.exports = SpriteSheet; /***/ }), -/* 869 */ +/* 880 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141019,12 +142612,12 @@ module.exports = SpriteSheetFromAtlas; /***/ }), -/* 870 */ +/* 881 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141189,12 +142782,12 @@ TextureImporter: /***/ }), -/* 871 */ +/* 882 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141220,12 +142813,12 @@ module.exports = 'complete'; /***/ }), -/* 872 */ +/* 883 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141250,12 +142843,12 @@ module.exports = 'decoded'; /***/ }), -/* 873 */ +/* 884 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141282,12 +142875,12 @@ module.exports = 'decodedall'; /***/ }), -/* 874 */ +/* 885 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141314,12 +142907,12 @@ module.exports = 'destroy'; /***/ }), -/* 875 */ +/* 886 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141347,12 +142940,12 @@ module.exports = 'detune'; /***/ }), -/* 876 */ +/* 887 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141375,12 +142968,12 @@ module.exports = 'detune'; /***/ }), -/* 877 */ +/* 888 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141402,12 +142995,12 @@ module.exports = 'mute'; /***/ }), -/* 878 */ +/* 889 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141430,12 +143023,12 @@ module.exports = 'rate'; /***/ }), -/* 879 */ +/* 890 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141457,12 +143050,12 @@ module.exports = 'volume'; /***/ }), -/* 880 */ +/* 891 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141491,12 +143084,12 @@ module.exports = 'loop'; /***/ }), -/* 881 */ +/* 892 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141525,12 +143118,12 @@ module.exports = 'looped'; /***/ }), -/* 882 */ +/* 893 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141558,12 +143151,12 @@ module.exports = 'mute'; /***/ }), -/* 883 */ +/* 894 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141585,12 +143178,12 @@ module.exports = 'pauseall'; /***/ }), -/* 884 */ +/* 895 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141617,12 +143210,12 @@ module.exports = 'pause'; /***/ }), -/* 885 */ +/* 896 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141648,12 +143241,12 @@ module.exports = 'play'; /***/ }), -/* 886 */ +/* 897 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141681,12 +143274,12 @@ module.exports = 'rate'; /***/ }), -/* 887 */ +/* 898 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141708,12 +143301,12 @@ module.exports = 'resumeall'; /***/ }), -/* 888 */ +/* 899 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141741,12 +143334,12 @@ module.exports = 'resume'; /***/ }), -/* 889 */ +/* 900 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141774,12 +143367,12 @@ module.exports = 'seek'; /***/ }), -/* 890 */ +/* 901 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141801,12 +143394,12 @@ module.exports = 'stopall'; /***/ }), -/* 891 */ +/* 902 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141833,12 +143426,12 @@ module.exports = 'stop'; /***/ }), -/* 892 */ +/* 903 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141860,12 +143453,12 @@ module.exports = 'unlocked'; /***/ }), -/* 893 */ +/* 904 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141893,12 +143486,12 @@ module.exports = 'volume'; /***/ }), -/* 894 */ +/* 905 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141910,100 +143503,100 @@ var GameObjects = { Events: __webpack_require__(90), - DisplayList: __webpack_require__(895), + DisplayList: __webpack_require__(906), GameObjectCreator: __webpack_require__(16), GameObjectFactory: __webpack_require__(5), - UpdateList: __webpack_require__(923), + UpdateList: __webpack_require__(934), Components: __webpack_require__(12), BuildGameObject: __webpack_require__(28), - BuildGameObjectAnimation: __webpack_require__(371), + BuildGameObjectAnimation: __webpack_require__(385), GameObject: __webpack_require__(14), - BitmapText: __webpack_require__(127), - Blitter: __webpack_require__(185), - Container: __webpack_require__(186), - DOMElement: __webpack_require__(373), - DynamicBitmapText: __webpack_require__(187), - Extern: __webpack_require__(375), - Graphics: __webpack_require__(188), + BitmapText: __webpack_require__(129), + Blitter: __webpack_require__(186), + Container: __webpack_require__(187), + DOMElement: __webpack_require__(387), + DynamicBitmapText: __webpack_require__(188), + Extern: __webpack_require__(389), + Graphics: __webpack_require__(189), Group: __webpack_require__(97), Image: __webpack_require__(98), - Particles: __webpack_require__(955), - PathFollower: __webpack_require__(387), - RenderTexture: __webpack_require__(192), - RetroFont: __webpack_require__(964), + Particles: __webpack_require__(966), + PathFollower: __webpack_require__(401), + RenderTexture: __webpack_require__(193), + RetroFont: __webpack_require__(975), Sprite: __webpack_require__(69), - Text: __webpack_require__(194), - TileSprite: __webpack_require__(195), - Zone: __webpack_require__(108), - Video: __webpack_require__(196), + Text: __webpack_require__(195), + TileSprite: __webpack_require__(196), + Zone: __webpack_require__(110), + Video: __webpack_require__(197), // Shapes Shape: __webpack_require__(30), - Arc: __webpack_require__(388), - Curve: __webpack_require__(389), - Ellipse: __webpack_require__(390), - Grid: __webpack_require__(391), - IsoBox: __webpack_require__(392), - IsoTriangle: __webpack_require__(393), - Line: __webpack_require__(394), - Polygon: __webpack_require__(395), - Rectangle: __webpack_require__(400), - Star: __webpack_require__(401), - Triangle: __webpack_require__(402), + Arc: __webpack_require__(402), + Curve: __webpack_require__(403), + Ellipse: __webpack_require__(404), + Grid: __webpack_require__(405), + IsoBox: __webpack_require__(406), + IsoTriangle: __webpack_require__(407), + Line: __webpack_require__(408), + Polygon: __webpack_require__(409), + Rectangle: __webpack_require__(414), + Star: __webpack_require__(415), + Triangle: __webpack_require__(416), // Game Object Factories Factories: { - Blitter: __webpack_require__(1012), - Container: __webpack_require__(1013), - DOMElement: __webpack_require__(1014), - DynamicBitmapText: __webpack_require__(1015), - Extern: __webpack_require__(1016), - Graphics: __webpack_require__(1017), - Group: __webpack_require__(1018), - Image: __webpack_require__(1019), - Particles: __webpack_require__(1020), - PathFollower: __webpack_require__(1021), - RenderTexture: __webpack_require__(1022), - Sprite: __webpack_require__(1023), - StaticBitmapText: __webpack_require__(1024), - Text: __webpack_require__(1025), - TileSprite: __webpack_require__(1026), - Zone: __webpack_require__(1027), - Video: __webpack_require__(1028), + Blitter: __webpack_require__(1023), + Container: __webpack_require__(1024), + DOMElement: __webpack_require__(1025), + DynamicBitmapText: __webpack_require__(1026), + Extern: __webpack_require__(1027), + Graphics: __webpack_require__(1028), + Group: __webpack_require__(1029), + Image: __webpack_require__(1030), + Particles: __webpack_require__(1031), + PathFollower: __webpack_require__(1032), + RenderTexture: __webpack_require__(1033), + Sprite: __webpack_require__(1034), + StaticBitmapText: __webpack_require__(1035), + Text: __webpack_require__(1036), + TileSprite: __webpack_require__(1037), + Zone: __webpack_require__(1038), + Video: __webpack_require__(1039), // Shapes - Arc: __webpack_require__(1029), - Curve: __webpack_require__(1030), - Ellipse: __webpack_require__(1031), - Grid: __webpack_require__(1032), - IsoBox: __webpack_require__(1033), - IsoTriangle: __webpack_require__(1034), - Line: __webpack_require__(1035), - Polygon: __webpack_require__(1036), - Rectangle: __webpack_require__(1037), - Star: __webpack_require__(1038), - Triangle: __webpack_require__(1039) + Arc: __webpack_require__(1040), + Curve: __webpack_require__(1041), + Ellipse: __webpack_require__(1042), + Grid: __webpack_require__(1043), + IsoBox: __webpack_require__(1044), + IsoTriangle: __webpack_require__(1045), + Line: __webpack_require__(1046), + Polygon: __webpack_require__(1047), + Rectangle: __webpack_require__(1048), + Star: __webpack_require__(1049), + Triangle: __webpack_require__(1050) }, Creators: { - Blitter: __webpack_require__(1040), - Container: __webpack_require__(1041), - DynamicBitmapText: __webpack_require__(1042), - Graphics: __webpack_require__(1043), - Group: __webpack_require__(1044), - Image: __webpack_require__(1045), - Particles: __webpack_require__(1046), - RenderTexture: __webpack_require__(1047), - Sprite: __webpack_require__(1048), - StaticBitmapText: __webpack_require__(1049), - Text: __webpack_require__(1050), - TileSprite: __webpack_require__(1051), - Zone: __webpack_require__(1052), - Video: __webpack_require__(1053) + Blitter: __webpack_require__(1051), + Container: __webpack_require__(1052), + DynamicBitmapText: __webpack_require__(1053), + Graphics: __webpack_require__(1054), + Group: __webpack_require__(1055), + Image: __webpack_require__(1056), + Particles: __webpack_require__(1057), + RenderTexture: __webpack_require__(1058), + Sprite: __webpack_require__(1059), + StaticBitmapText: __webpack_require__(1060), + Text: __webpack_require__(1061), + TileSprite: __webpack_require__(1062), + Zone: __webpack_require__(1063), + Video: __webpack_require__(1064) } }; @@ -142011,42 +143604,42 @@ var GameObjects = { if (true) { // WebGL only Game Objects - GameObjects.Mesh = __webpack_require__(128); - GameObjects.Quad = __webpack_require__(199); - GameObjects.Shader = __webpack_require__(200); + GameObjects.Mesh = __webpack_require__(130); + GameObjects.Quad = __webpack_require__(200); + GameObjects.Shader = __webpack_require__(201); - GameObjects.Factories.Mesh = __webpack_require__(1060); - GameObjects.Factories.Quad = __webpack_require__(1061); - GameObjects.Factories.Shader = __webpack_require__(1062); + GameObjects.Factories.Mesh = __webpack_require__(1071); + GameObjects.Factories.Quad = __webpack_require__(1072); + GameObjects.Factories.Shader = __webpack_require__(1073); - GameObjects.Creators.Mesh = __webpack_require__(1063); - GameObjects.Creators.Quad = __webpack_require__(1064); - GameObjects.Creators.Shader = __webpack_require__(1065); + GameObjects.Creators.Mesh = __webpack_require__(1074); + GameObjects.Creators.Quad = __webpack_require__(1075); + GameObjects.Creators.Shader = __webpack_require__(1076); - GameObjects.Light = __webpack_require__(406); + GameObjects.Light = __webpack_require__(420); - __webpack_require__(407); - __webpack_require__(1066); + __webpack_require__(421); + __webpack_require__(1077); } module.exports = GameObjects; /***/ }), -/* 895 */ +/* 906 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var List = __webpack_require__(124); -var PluginCache = __webpack_require__(21); -var SceneEvents = __webpack_require__(22); -var StableSort = __webpack_require__(126); +var List = __webpack_require__(126); +var PluginCache = __webpack_require__(23); +var SceneEvents = __webpack_require__(19); +var StableSort = __webpack_require__(128); /** * @classdesc @@ -142238,12 +143831,12 @@ module.exports = DisplayList; /***/ }), -/* 896 */ +/* 907 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142253,31 +143846,31 @@ module.exports = DisplayList; module.exports = { - CheckMatrix: __webpack_require__(181), - MatrixToString: __webpack_require__(897), - ReverseColumns: __webpack_require__(898), - ReverseRows: __webpack_require__(899), - Rotate180: __webpack_require__(900), - RotateLeft: __webpack_require__(901), - RotateMatrix: __webpack_require__(125), - RotateRight: __webpack_require__(902), - TransposeMatrix: __webpack_require__(368) + CheckMatrix: __webpack_require__(182), + MatrixToString: __webpack_require__(908), + ReverseColumns: __webpack_require__(909), + ReverseRows: __webpack_require__(910), + Rotate180: __webpack_require__(911), + RotateLeft: __webpack_require__(912), + RotateMatrix: __webpack_require__(127), + RotateRight: __webpack_require__(913), + TransposeMatrix: __webpack_require__(382) }; /***/ }), -/* 897 */ +/* 908 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Pad = __webpack_require__(158); -var CheckMatrix = __webpack_require__(181); +var Pad = __webpack_require__(160); +var CheckMatrix = __webpack_require__(182); /** * Generates a string (which you can pass to console.log) from the given Array Matrix. @@ -142348,12 +143941,12 @@ module.exports = MatrixToString; /***/ }), -/* 898 */ +/* 909 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142379,12 +143972,12 @@ module.exports = ReverseColumns; /***/ }), -/* 899 */ +/* 910 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142415,16 +144008,16 @@ module.exports = ReverseRows; /***/ }), -/* 900 */ +/* 911 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(125); +var RotateMatrix = __webpack_require__(127); /** * Rotates the array matrix 180 degrees. @@ -142448,16 +144041,16 @@ module.exports = Rotate180; /***/ }), -/* 901 */ +/* 912 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(125); +var RotateMatrix = __webpack_require__(127); /** * Rotates the array matrix to the left (or 90 degrees) @@ -142481,16 +144074,16 @@ module.exports = RotateLeft; /***/ }), -/* 902 */ +/* 913 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(125); +var RotateMatrix = __webpack_require__(127); /** * Rotates the array matrix to the left (or -90 degrees) @@ -142514,12 +144107,12 @@ module.exports = RotateRight; /***/ }), -/* 903 */ +/* 914 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142631,12 +144224,12 @@ module.exports = Add; /***/ }), -/* 904 */ +/* 915 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142753,12 +144346,12 @@ module.exports = AddAt; /***/ }), -/* 905 */ +/* 916 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142791,12 +144384,12 @@ module.exports = BringToTop; /***/ }), -/* 906 */ +/* 917 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142843,12 +144436,12 @@ module.exports = CountAllMatching; /***/ }), -/* 907 */ +/* 918 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142889,12 +144482,12 @@ module.exports = Each; /***/ }), -/* 908 */ +/* 919 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142945,12 +144538,12 @@ module.exports = EachInRange; /***/ }), -/* 909 */ +/* 920 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143007,12 +144600,12 @@ module.exports = GetAll; /***/ }), -/* 910 */ +/* 921 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143066,12 +144659,12 @@ module.exports = GetFirst; /***/ }), -/* 911 */ +/* 922 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143108,12 +144701,12 @@ module.exports = MoveDown; /***/ }), -/* 912 */ +/* 923 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143155,12 +144748,12 @@ module.exports = MoveTo; /***/ }), -/* 913 */ +/* 924 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143197,12 +144790,12 @@ module.exports = MoveUp; /***/ }), -/* 914 */ +/* 925 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143261,16 +144854,16 @@ module.exports = NumberArray; /***/ }), -/* 915 */ +/* 926 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RoundAwayFromZero = __webpack_require__(314); +var RoundAwayFromZero = __webpack_require__(328); /** * Create an array of numbers (positive and/or negative) progressing from `start` @@ -143338,12 +144931,12 @@ module.exports = NumberArrayStep; /***/ }), -/* 916 */ +/* 927 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143389,12 +144982,12 @@ module.exports = RemoveAt; /***/ }), -/* 917 */ +/* 928 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143452,12 +145045,12 @@ module.exports = RemoveBetween; /***/ }), -/* 918 */ +/* 929 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143490,12 +145083,12 @@ module.exports = RemoveRandomElement; /***/ }), -/* 919 */ +/* 930 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143534,12 +145127,12 @@ module.exports = Replace; /***/ }), -/* 920 */ +/* 931 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143572,12 +145165,12 @@ module.exports = SendToBack; /***/ }), -/* 921 */ +/* 932 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143627,12 +145220,12 @@ module.exports = SetAll; /***/ }), -/* 922 */ +/* 933 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143675,19 +145268,19 @@ module.exports = Swap; /***/ }), -/* 923 */ +/* 934 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var ProcessQueue = __webpack_require__(183); -var PluginCache = __webpack_require__(21); -var SceneEvents = __webpack_require__(22); +var ProcessQueue = __webpack_require__(184); +var PluginCache = __webpack_require__(23); +var SceneEvents = __webpack_require__(19); /** * @classdesc @@ -143976,12 +145569,12 @@ module.exports = UpdateList; /***/ }), -/* 924 */ +/* 935 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143991,19 +145584,19 @@ module.exports = UpdateList; module.exports = { - PROCESS_QUEUE_ADD: __webpack_require__(925), - PROCESS_QUEUE_REMOVE: __webpack_require__(926) + PROCESS_QUEUE_ADD: __webpack_require__(936), + PROCESS_QUEUE_REMOVE: __webpack_require__(937) }; /***/ }), -/* 925 */ +/* 936 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144025,12 +145618,12 @@ module.exports = 'add'; /***/ }), -/* 926 */ +/* 937 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144052,12 +145645,12 @@ module.exports = 'remove'; /***/ }), -/* 927 */ +/* 938 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144106,7 +145699,6 @@ var GetBitmapTextSize = function (src, round, out) }, wrappedText: '', words: [], - maxWidth: 0, scaleX: 0, scaleY: 0 }; @@ -144155,7 +145747,7 @@ var GetBitmapTextSize = function (src, round, out) var current = null; // Scan for breach of maxWidth and insert carriage-returns - if (maxWidth > 0 && out.maxWidth !== maxWidth) + if (maxWidth > 0) { for (i = 0; i < textLength; i++) { @@ -144310,7 +145902,6 @@ var GetBitmapTextSize = function (src, round, out) text = stringInsert(text, crs[i], "\n"); } - out.maxWidth = maxWidth; out.wrappedText = text; textLength = text.length; @@ -144507,16 +146098,16 @@ module.exports = GetBitmapTextSize; /***/ }), -/* 928 */ +/* 939 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ParseXMLBitmapFont = __webpack_require__(184); +var ParseXMLBitmapFont = __webpack_require__(185); /** * Parse an XML Bitmap Font from an Atlas. @@ -144532,8 +146123,8 @@ var ParseXMLBitmapFont = __webpack_require__(184); * @param {string} textureKey - The key of the BitmapFont's texture. * @param {string} frameKey - The key of the BitmapFont texture's frame. * @param {string} xmlKey - The key of the XML data of the font to parse. - * @param {integer} xSpacing - The x-axis spacing to add between each letter. - * @param {integer} ySpacing - The y-axis spacing to add to the line height. + * @param {integer} [xSpacing] - The x-axis spacing to add between each letter. + * @param {integer} [ySpacing] - The y-axis spacing to add to the line height. * * @return {boolean} Whether the parsing was successful or not. */ @@ -144560,12 +146151,12 @@ module.exports = ParseFromAtlas; /***/ }), -/* 929 */ +/* 940 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144574,12 +146165,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(930); + renderWebGL = __webpack_require__(941); } if (true) { - renderCanvas = __webpack_require__(931); + renderCanvas = __webpack_require__(942); } module.exports = { @@ -144591,12 +146182,12 @@ module.exports = { /***/ }), -/* 930 */ +/* 941 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144827,12 +146418,12 @@ module.exports = BitmapTextWebGLRenderer; /***/ }), -/* 931 */ +/* 942 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145009,12 +146600,12 @@ module.exports = BitmapTextCanvasRenderer; /***/ }), -/* 932 */ +/* 943 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145023,12 +146614,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(933); + renderWebGL = __webpack_require__(944); } if (true) { - renderCanvas = __webpack_require__(934); + renderCanvas = __webpack_require__(945); } module.exports = { @@ -145040,12 +146631,12 @@ module.exports = { /***/ }), -/* 933 */ +/* 944 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145170,12 +146761,12 @@ module.exports = BlitterWebGLRenderer; /***/ }), -/* 934 */ +/* 945 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145300,12 +146891,12 @@ module.exports = BlitterCanvasRenderer; /***/ }), -/* 935 */ +/* 946 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145730,13 +147321,13 @@ module.exports = Bob; /***/ }), -/* 936 */ +/* 947 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145745,12 +147336,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(937); + renderWebGL = __webpack_require__(948); } if (true) { - renderCanvas = __webpack_require__(938); + renderCanvas = __webpack_require__(949); } module.exports = { @@ -145762,13 +147353,13 @@ module.exports = { /***/ }), -/* 937 */ +/* 948 */ /***/ (function(module, exports) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145819,10 +147410,7 @@ var ContainerWebGLRenderer = function (renderer, container, interpolationPercent renderer.setBlendMode(0); } - var alphaTopLeft = container.alphaTopLeft; - var alphaTopRight = container.alphaTopRight; - var alphaBottomLeft = container.alphaBottomLeft; - var alphaBottomRight = container.alphaBottomRight; + var alpha = container.alpha; var scrollFactorX = container.scrollFactorX; var scrollFactorY = container.scrollFactorY; @@ -145890,7 +147478,7 @@ var ContainerWebGLRenderer = function (renderer, container, interpolationPercent // Set parent values child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY); - child.setAlpha(childAlphaTopLeft * alphaTopLeft, childAlphaTopRight * alphaTopRight, childAlphaBottomLeft * alphaBottomLeft, childAlphaBottomRight * alphaBottomRight); + child.setAlpha(childAlphaTopLeft * alpha, childAlphaTopRight * alpha, childAlphaBottomLeft * alpha, childAlphaBottomRight * alpha); // Render child.renderWebGL(renderer, child, interpolationPercentage, camera, transformMatrix); @@ -145914,13 +147502,13 @@ module.exports = ContainerWebGLRenderer; /***/ }), -/* 938 */ +/* 949 */ /***/ (function(module, exports) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146011,12 +147599,12 @@ module.exports = ContainerCanvasRenderer; /***/ }), -/* 939 */ +/* 950 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146025,12 +147613,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(374); + renderWebGL = __webpack_require__(388); } if (true) { - renderCanvas = __webpack_require__(374); + renderCanvas = __webpack_require__(388); } module.exports = { @@ -146042,12 +147630,12 @@ module.exports = { /***/ }), -/* 940 */ +/* 951 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146083,12 +147671,12 @@ module.exports = [ /***/ }), -/* 941 */ +/* 952 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146097,12 +147685,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(942); + renderWebGL = __webpack_require__(953); } if (true) { - renderCanvas = __webpack_require__(943); + renderCanvas = __webpack_require__(954); } module.exports = { @@ -146114,12 +147702,12 @@ module.exports = { /***/ }), -/* 942 */ +/* 953 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146420,12 +148008,12 @@ module.exports = DynamicBitmapTextWebGLRenderer; /***/ }), -/* 943 */ +/* 954 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146631,12 +148219,12 @@ module.exports = DynamicBitmapTextCanvasRenderer; /***/ }), -/* 944 */ +/* 955 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146645,12 +148233,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(945); + renderWebGL = __webpack_require__(956); } if (true) { - renderCanvas = __webpack_require__(946); + renderCanvas = __webpack_require__(957); } module.exports = { @@ -146662,12 +148250,12 @@ module.exports = { /***/ }), -/* 945 */ +/* 956 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146731,18 +148319,18 @@ module.exports = ExternWebGLRenderer; /***/ }), -/* 946 */ +/* 957 */ /***/ (function(module, exports) { /***/ }), -/* 947 */ +/* 958 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146751,15 +148339,15 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(948); + renderWebGL = __webpack_require__(959); // Needed for Graphics.generateTexture - renderCanvas = __webpack_require__(379); + renderCanvas = __webpack_require__(393); } if (true) { - renderCanvas = __webpack_require__(379); + renderCanvas = __webpack_require__(393); } module.exports = { @@ -146771,16 +148359,16 @@ module.exports = { /***/ }), -/* 948 */ +/* 959 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Commands = __webpack_require__(189); +var Commands = __webpack_require__(190); var Utils = __webpack_require__(10); // TODO: Remove the use of this @@ -147136,12 +148724,12 @@ module.exports = GraphicsWebGLRenderer; /***/ }), -/* 949 */ +/* 960 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -147150,12 +148738,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(950); + renderWebGL = __webpack_require__(961); } if (true) { - renderCanvas = __webpack_require__(951); + renderCanvas = __webpack_require__(962); } module.exports = { @@ -147167,12 +148755,12 @@ module.exports = { /***/ }), -/* 950 */ +/* 961 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -147200,12 +148788,12 @@ module.exports = SpriteWebGLRenderer; /***/ }), -/* 951 */ +/* 962 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -147233,12 +148821,12 @@ module.exports = SpriteCanvasRenderer; /***/ }), -/* 952 */ +/* 963 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -147247,12 +148835,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(953); + renderWebGL = __webpack_require__(964); } if (true) { - renderCanvas = __webpack_require__(954); + renderCanvas = __webpack_require__(965); } module.exports = { @@ -147264,12 +148852,12 @@ module.exports = { /***/ }), -/* 953 */ +/* 964 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -147297,12 +148885,12 @@ module.exports = ImageWebGLRenderer; /***/ }), -/* 954 */ +/* 965 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -147330,12 +148918,12 @@ module.exports = ImageCanvasRenderer; /***/ }), -/* 955 */ +/* 966 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -147345,30 +148933,30 @@ module.exports = ImageCanvasRenderer; module.exports = { - GravityWell: __webpack_require__(380), - Particle: __webpack_require__(381), - ParticleEmitter: __webpack_require__(382), - ParticleEmitterManager: __webpack_require__(191), - Zones: __webpack_require__(960) + GravityWell: __webpack_require__(394), + Particle: __webpack_require__(395), + ParticleEmitter: __webpack_require__(396), + ParticleEmitterManager: __webpack_require__(192), + Zones: __webpack_require__(971) }; /***/ }), -/* 956 */ +/* 967 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var FloatBetween = __webpack_require__(312); +var FloatBetween = __webpack_require__(326); var GetEaseFunction = __webpack_require__(82); var GetFastValue = __webpack_require__(2); -var Wrap = __webpack_require__(57); +var Wrap = __webpack_require__(58); /** * @classdesc @@ -147946,12 +149534,12 @@ module.exports = EmitterOp; /***/ }), -/* 957 */ +/* 968 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -147960,12 +149548,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(958); + renderWebGL = __webpack_require__(969); } if (true) { - renderCanvas = __webpack_require__(959); + renderCanvas = __webpack_require__(970); } module.exports = { @@ -147977,12 +149565,12 @@ module.exports = { /***/ }), -/* 958 */ +/* 969 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -148136,12 +149724,12 @@ module.exports = ParticleManagerWebGLRenderer; /***/ }), -/* 959 */ +/* 970 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -148259,12 +149847,12 @@ module.exports = ParticleManagerCanvasRenderer; /***/ }), -/* 960 */ +/* 971 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -148274,20 +149862,20 @@ module.exports = ParticleManagerCanvasRenderer; module.exports = { - DeathZone: __webpack_require__(383), - EdgeZone: __webpack_require__(384), - RandomZone: __webpack_require__(386) + DeathZone: __webpack_require__(397), + EdgeZone: __webpack_require__(398), + RandomZone: __webpack_require__(400) }; /***/ }), -/* 961 */ +/* 972 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -148296,12 +149884,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(962); + renderWebGL = __webpack_require__(973); } if (true) { - renderCanvas = __webpack_require__(963); + renderCanvas = __webpack_require__(974); } module.exports = { @@ -148313,12 +149901,12 @@ module.exports = { /***/ }), -/* 962 */ +/* 973 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -148376,12 +149964,12 @@ module.exports = RenderTextureWebGLRenderer; /***/ }), -/* 963 */ +/* 974 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -148409,16 +149997,16 @@ module.exports = RenderTextureCanvasRenderer; /***/ }), -/* 964 */ +/* 975 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RETRO_FONT_CONST = __webpack_require__(965); +var RETRO_FONT_CONST = __webpack_require__(976); var Extend = __webpack_require__(17); /** @@ -148426,7 +150014,7 @@ var Extend = __webpack_require__(17); * @since 3.6.0 */ -var RetroFont = { Parse: __webpack_require__(966) }; +var RetroFont = { Parse: __webpack_require__(977) }; // Merge in the consts RetroFont = Extend(false, RetroFont, RETRO_FONT_CONST); @@ -148435,12 +150023,12 @@ module.exports = RetroFont; /***/ }), -/* 965 */ +/* 976 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -148551,12 +150139,12 @@ module.exports = RETRO_FONT_CONST; /***/ }), -/* 966 */ +/* 977 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -148667,12 +150255,12 @@ module.exports = ParseRetroFont; /***/ }), -/* 967 */ +/* 978 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -148749,12 +150337,12 @@ module.exports = GetTextSize; /***/ }), -/* 968 */ +/* 979 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -148763,12 +150351,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(969); + renderWebGL = __webpack_require__(980); } if (true) { - renderCanvas = __webpack_require__(970); + renderCanvas = __webpack_require__(981); } module.exports = { @@ -148780,12 +150368,12 @@ module.exports = { /***/ }), -/* 969 */ +/* 980 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -148845,12 +150433,12 @@ module.exports = TextWebGLRenderer; /***/ }), -/* 970 */ +/* 981 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -148883,19 +150471,19 @@ module.exports = TextCanvasRenderer; /***/ }), -/* 971 */ +/* 982 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var GetAdvancedValue = __webpack_require__(15); var GetValue = __webpack_require__(6); -var MeasureText = __webpack_require__(972); +var MeasureText = __webpack_require__(983); // Key: [ Object Key, Default Value ] @@ -149936,12 +151524,12 @@ module.exports = TextStyle; /***/ }), -/* 972 */ +/* 983 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150071,12 +151659,12 @@ module.exports = MeasureText; /***/ }), -/* 973 */ +/* 984 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150085,12 +151673,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(974); + renderWebGL = __webpack_require__(985); } if (true) { - renderCanvas = __webpack_require__(975); + renderCanvas = __webpack_require__(986); } module.exports = { @@ -150102,12 +151690,12 @@ module.exports = { /***/ }), -/* 974 */ +/* 985 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150162,12 +151750,12 @@ module.exports = TileSpriteWebGLRenderer; /***/ }), -/* 975 */ +/* 986 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150197,12 +151785,12 @@ module.exports = TileSpriteCanvasRenderer; /***/ }), -/* 976 */ +/* 987 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150211,12 +151799,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(977); + renderWebGL = __webpack_require__(988); } if (true) { - renderCanvas = __webpack_require__(978); + renderCanvas = __webpack_require__(989); } module.exports = { @@ -150228,12 +151816,12 @@ module.exports = { /***/ }), -/* 977 */ +/* 988 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150264,12 +151852,12 @@ module.exports = VideoWebGLRenderer; /***/ }), -/* 978 */ +/* 989 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150300,12 +151888,12 @@ module.exports = VideoCanvasRenderer; /***/ }), -/* 979 */ +/* 990 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150314,12 +151902,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(980); + renderWebGL = __webpack_require__(991); } if (true) { - renderCanvas = __webpack_require__(981); + renderCanvas = __webpack_require__(992); } module.exports = { @@ -150331,12 +151919,12 @@ module.exports = { /***/ }), -/* 980 */ +/* 991 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150409,12 +151997,12 @@ module.exports = ArcWebGLRenderer; /***/ }), -/* 981 */ +/* 992 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150485,12 +152073,12 @@ module.exports = ArcCanvasRenderer; /***/ }), -/* 982 */ +/* 993 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150499,12 +152087,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(983); + renderWebGL = __webpack_require__(994); } if (true) { - renderCanvas = __webpack_require__(984); + renderCanvas = __webpack_require__(995); } module.exports = { @@ -150516,12 +152104,12 @@ module.exports = { /***/ }), -/* 983 */ +/* 994 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150594,12 +152182,12 @@ module.exports = CurveWebGLRenderer; /***/ }), -/* 984 */ +/* 995 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150682,12 +152270,12 @@ module.exports = CurveCanvasRenderer; /***/ }), -/* 985 */ +/* 996 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150696,12 +152284,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(986); + renderWebGL = __webpack_require__(997); } if (true) { - renderCanvas = __webpack_require__(987); + renderCanvas = __webpack_require__(998); } module.exports = { @@ -150713,12 +152301,12 @@ module.exports = { /***/ }), -/* 986 */ +/* 997 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150791,12 +152379,12 @@ module.exports = EllipseWebGLRenderer; /***/ }), -/* 987 */ +/* 998 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150876,12 +152464,12 @@ module.exports = EllipseCanvasRenderer; /***/ }), -/* 988 */ +/* 999 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150890,12 +152478,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(989); + renderWebGL = __webpack_require__(1000); } if (true) { - renderCanvas = __webpack_require__(990); + renderCanvas = __webpack_require__(1001); } module.exports = { @@ -150907,12 +152495,12 @@ module.exports = { /***/ }), -/* 989 */ +/* 1000 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151133,12 +152721,12 @@ module.exports = GridWebGLRenderer; /***/ }), -/* 990 */ +/* 1001 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151322,12 +152910,12 @@ module.exports = GridCanvasRenderer; /***/ }), -/* 991 */ +/* 1002 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151336,12 +152924,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(992); + renderWebGL = __webpack_require__(1003); } if (true) { - renderCanvas = __webpack_require__(993); + renderCanvas = __webpack_require__(1004); } module.exports = { @@ -151353,12 +152941,12 @@ module.exports = { /***/ }), -/* 992 */ +/* 1003 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151511,12 +153099,12 @@ module.exports = IsoBoxWebGLRenderer; /***/ }), -/* 993 */ +/* 1004 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151612,12 +153200,12 @@ module.exports = IsoBoxCanvasRenderer; /***/ }), -/* 994 */ +/* 1005 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151626,12 +153214,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(995); + renderWebGL = __webpack_require__(1006); } if (true) { - renderCanvas = __webpack_require__(996); + renderCanvas = __webpack_require__(1007); } module.exports = { @@ -151643,12 +153231,12 @@ module.exports = { /***/ }), -/* 995 */ +/* 1006 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151820,12 +153408,12 @@ module.exports = IsoTriangleWebGLRenderer; /***/ }), -/* 996 */ +/* 1007 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151934,12 +153522,12 @@ module.exports = IsoTriangleCanvasRenderer; /***/ }), -/* 997 */ +/* 1008 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151948,12 +153536,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(998); + renderWebGL = __webpack_require__(1009); } if (true) { - renderCanvas = __webpack_require__(999); + renderCanvas = __webpack_require__(1010); } module.exports = { @@ -151965,12 +153553,12 @@ module.exports = { /***/ }), -/* 998 */ +/* 1009 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152058,12 +153646,12 @@ module.exports = LineWebGLRenderer; /***/ }), -/* 999 */ +/* 1010 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152115,12 +153703,12 @@ module.exports = LineCanvasRenderer; /***/ }), -/* 1000 */ +/* 1011 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152129,12 +153717,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1001); + renderWebGL = __webpack_require__(1012); } if (true) { - renderCanvas = __webpack_require__(1002); + renderCanvas = __webpack_require__(1013); } module.exports = { @@ -152146,12 +153734,12 @@ module.exports = { /***/ }), -/* 1001 */ +/* 1012 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152224,12 +153812,12 @@ module.exports = PolygonWebGLRenderer; /***/ }), -/* 1002 */ +/* 1013 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152309,12 +153897,12 @@ module.exports = PolygonCanvasRenderer; /***/ }), -/* 1003 */ +/* 1014 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152323,12 +153911,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1004); + renderWebGL = __webpack_require__(1015); } if (true) { - renderCanvas = __webpack_require__(1005); + renderCanvas = __webpack_require__(1016); } module.exports = { @@ -152340,12 +153928,12 @@ module.exports = { /***/ }), -/* 1004 */ +/* 1015 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152432,12 +154020,12 @@ module.exports = RectangleWebGLRenderer; /***/ }), -/* 1005 */ +/* 1016 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152506,12 +154094,12 @@ module.exports = RectangleCanvasRenderer; /***/ }), -/* 1006 */ +/* 1017 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152520,12 +154108,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1007); + renderWebGL = __webpack_require__(1018); } if (true) { - renderCanvas = __webpack_require__(1008); + renderCanvas = __webpack_require__(1019); } module.exports = { @@ -152537,12 +154125,12 @@ module.exports = { /***/ }), -/* 1007 */ +/* 1018 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152615,12 +154203,12 @@ module.exports = StarWebGLRenderer; /***/ }), -/* 1008 */ +/* 1019 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152700,12 +154288,12 @@ module.exports = StarCanvasRenderer; /***/ }), -/* 1009 */ +/* 1020 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152714,12 +154302,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1010); + renderWebGL = __webpack_require__(1021); } if (true) { - renderCanvas = __webpack_require__(1011); + renderCanvas = __webpack_require__(1022); } module.exports = { @@ -152731,12 +154319,12 @@ module.exports = { /***/ }), -/* 1010 */ +/* 1021 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152834,12 +154422,12 @@ module.exports = TriangleWebGLRenderer; /***/ }), -/* 1011 */ +/* 1022 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -152909,16 +154497,16 @@ module.exports = TriangleCanvasRenderer; /***/ }), -/* 1012 */ +/* 1023 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Blitter = __webpack_require__(185); +var Blitter = __webpack_require__(186); var GameObjectFactory = __webpack_require__(5); /** @@ -152951,17 +154539,17 @@ GameObjectFactory.register('blitter', function (x, y, key, frame) /***/ }), -/* 1013 */ +/* 1024 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Container = __webpack_require__(186); +var Container = __webpack_require__(187); var GameObjectFactory = __webpack_require__(5); /** @@ -152985,16 +154573,16 @@ GameObjectFactory.register('container', function (x, y, children) /***/ }), -/* 1014 */ +/* 1025 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DOMElement = __webpack_require__(373); +var DOMElement = __webpack_require__(387); var GameObjectFactory = __webpack_require__(5); /** @@ -153075,16 +154663,16 @@ GameObjectFactory.register('dom', function (x, y, element, style, innerText) /***/ }), -/* 1015 */ +/* 1026 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DynamicBitmapText = __webpack_require__(187); +var DynamicBitmapText = __webpack_require__(188); var GameObjectFactory = __webpack_require__(5); /** @@ -153144,16 +154732,16 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size /***/ }), -/* 1016 */ +/* 1027 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Extern = __webpack_require__(375); +var Extern = __webpack_require__(389); var GameObjectFactory = __webpack_require__(5); /** @@ -153186,16 +154774,16 @@ GameObjectFactory.register('extern', function () /***/ }), -/* 1017 */ +/* 1028 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Graphics = __webpack_require__(188); +var Graphics = __webpack_require__(189); var GameObjectFactory = __webpack_require__(5); /** @@ -153225,12 +154813,12 @@ GameObjectFactory.register('graphics', function (config) /***/ }), -/* 1018 */ +/* 1029 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153257,12 +154845,12 @@ GameObjectFactory.register('group', function (children, config) /***/ }), -/* 1019 */ +/* 1030 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153299,17 +154887,17 @@ GameObjectFactory.register('image', function (x, y, key, frame) /***/ }), -/* 1020 */ +/* 1031 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(5); -var ParticleEmitterManager = __webpack_require__(191); +var ParticleEmitterManager = __webpack_require__(192); /** * Creates a new Particle Emitter Manager Game Object and adds it to the Scene. @@ -153345,17 +154933,17 @@ GameObjectFactory.register('particles', function (key, frame, emitters) /***/ }), -/* 1021 */ +/* 1032 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(5); -var PathFollower = __webpack_require__(387); +var PathFollower = __webpack_require__(401); /** * Creates a new PathFollower Game Object and adds it to the Scene. @@ -153393,17 +154981,17 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame) /***/ }), -/* 1022 */ +/* 1033 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(5); -var RenderTexture = __webpack_require__(192); +var RenderTexture = __webpack_require__(193); /** * Creates a new Render Texture Game Object and adds it to the Scene. @@ -153433,12 +155021,12 @@ GameObjectFactory.register('renderTexture', function (x, y, width, height, key, /***/ }), -/* 1023 */ +/* 1034 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153480,16 +155068,16 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) /***/ }), -/* 1024 */ +/* 1035 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(127); +var BitmapText = __webpack_require__(129); var GameObjectFactory = __webpack_require__(5); /** @@ -153544,16 +155132,16 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size, align /***/ }), -/* 1025 */ +/* 1036 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Text = __webpack_require__(194); +var Text = __webpack_require__(195); var GameObjectFactory = __webpack_require__(5); /** @@ -153609,16 +155197,16 @@ GameObjectFactory.register('text', function (x, y, text, style) /***/ }), -/* 1026 */ +/* 1037 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileSprite = __webpack_require__(195); +var TileSprite = __webpack_require__(196); var GameObjectFactory = __webpack_require__(5); /** @@ -153653,16 +155241,16 @@ GameObjectFactory.register('tileSprite', function (x, y, width, height, key, fra /***/ }), -/* 1027 */ +/* 1038 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Zone = __webpack_require__(108); +var Zone = __webpack_require__(110); var GameObjectFactory = __webpack_require__(5); /** @@ -153695,16 +155283,16 @@ GameObjectFactory.register('zone', function (x, y, width, height) /***/ }), -/* 1028 */ +/* 1039 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Video = __webpack_require__(196); +var Video = __webpack_require__(197); var GameObjectFactory = __webpack_require__(5); /** @@ -153742,16 +155330,16 @@ GameObjectFactory.register('video', function (x, y, key) /***/ }), -/* 1029 */ +/* 1040 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Arc = __webpack_require__(388); +var Arc = __webpack_require__(402); var GameObjectFactory = __webpack_require__(5); /** @@ -153815,17 +155403,17 @@ GameObjectFactory.register('circle', function (x, y, radius, fillColor, fillAlph /***/ }), -/* 1030 */ +/* 1041 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(5); -var Curve = __webpack_require__(389); +var Curve = __webpack_require__(403); /** * Creates a new Curve Shape Game Object and adds it to the Scene. @@ -153865,16 +155453,16 @@ GameObjectFactory.register('curve', function (x, y, curve, fillColor, fillAlpha) /***/ }), -/* 1031 */ +/* 1042 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Ellipse = __webpack_require__(390); +var Ellipse = __webpack_require__(404); var GameObjectFactory = __webpack_require__(5); /** @@ -153917,17 +155505,17 @@ GameObjectFactory.register('ellipse', function (x, y, width, height, fillColor, /***/ }), -/* 1032 */ +/* 1043 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(5); -var Grid = __webpack_require__(391); +var Grid = __webpack_require__(405); /** * Creates a new Grid Shape Game Object and adds it to the Scene. @@ -153972,17 +155560,17 @@ GameObjectFactory.register('grid', function (x, y, width, height, cellWidth, cel /***/ }), -/* 1033 */ +/* 1044 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(5); -var IsoBox = __webpack_require__(392); +var IsoBox = __webpack_require__(406); /** * Creates a new IsoBox Shape Game Object and adds it to the Scene. @@ -154023,17 +155611,17 @@ GameObjectFactory.register('isobox', function (x, y, size, height, fillTop, fill /***/ }), -/* 1034 */ +/* 1045 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(5); -var IsoTriangle = __webpack_require__(393); +var IsoTriangle = __webpack_require__(407); /** * Creates a new IsoTriangle Shape Game Object and adds it to the Scene. @@ -154076,17 +155664,17 @@ GameObjectFactory.register('isotriangle', function (x, y, size, height, reversed /***/ }), -/* 1035 */ +/* 1046 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(5); -var Line = __webpack_require__(394); +var Line = __webpack_require__(408); /** * Creates a new Line Shape Game Object and adds it to the Scene. @@ -154127,17 +155715,17 @@ GameObjectFactory.register('line', function (x, y, x1, y1, x2, y2, strokeColor, /***/ }), -/* 1036 */ +/* 1047 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(5); -var Polygon = __webpack_require__(395); +var Polygon = __webpack_require__(409); /** * Creates a new Polygon Shape Game Object and adds it to the Scene. @@ -154154,7 +155742,7 @@ var Polygon = __webpack_require__(395); * The Polygon Shape is created by providing a list of points, which are then used to create an * internal Polygon geometry object. The points can be set from a variety of formats: * - * - An array of Point or Vector2 objects: `[new Phaser.Math.Vec2(x1, y1), ...]` + * - An array of Point or Vector2 objects: `[new Phaser.Math.Vector2(x1, y1), ...]` * - An array of objects with public x/y properties: `[obj1, obj2, ...]` * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]` * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]` @@ -154180,17 +155768,17 @@ GameObjectFactory.register('polygon', function (x, y, points, fillColor, fillAlp /***/ }), -/* 1037 */ +/* 1048 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(5); -var Rectangle = __webpack_require__(400); +var Rectangle = __webpack_require__(414); /** * Creates a new Rectangle Shape Game Object and adds it to the Scene. @@ -154225,16 +155813,16 @@ GameObjectFactory.register('rectangle', function (x, y, width, height, fillColor /***/ }), -/* 1038 */ +/* 1049 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Star = __webpack_require__(401); +var Star = __webpack_require__(415); var GameObjectFactory = __webpack_require__(5); /** @@ -154277,17 +155865,17 @@ GameObjectFactory.register('star', function (x, y, points, innerRadius, outerRad /***/ }), -/* 1039 */ +/* 1050 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(5); -var Triangle = __webpack_require__(402); +var Triangle = __webpack_require__(416); /** * Creates a new Triangle Shape Game Object and adds it to the Scene. @@ -154328,16 +155916,16 @@ GameObjectFactory.register('triangle', function (x, y, x1, y1, x2, y2, x3, y3, f /***/ }), -/* 1040 */ +/* 1051 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Blitter = __webpack_require__(185); +var Blitter = __webpack_require__(186); var BuildGameObject = __webpack_require__(28); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -154378,18 +155966,18 @@ GameObjectCreator.register('blitter', function (config, addToScene) /***/ }), -/* 1041 */ +/* 1052 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BuildGameObject = __webpack_require__(28); -var Container = __webpack_require__(186); +var Container = __webpack_require__(187); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -154427,16 +156015,16 @@ GameObjectCreator.register('container', function (config, addToScene) /***/ }), -/* 1042 */ +/* 1053 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(187); +var BitmapText = __webpack_require__(188); var BuildGameObject = __webpack_require__(28); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -154478,17 +156066,17 @@ GameObjectCreator.register('dynamicBitmapText', function (config, addToScene) /***/ }), -/* 1043 */ +/* 1054 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectCreator = __webpack_require__(16); -var Graphics = __webpack_require__(188); +var Graphics = __webpack_require__(189); /** * Creates a new Graphics Game Object and returns it. @@ -154526,12 +156114,12 @@ GameObjectCreator.register('graphics', function (config, addToScene) /***/ }), -/* 1044 */ +/* 1055 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154559,12 +156147,12 @@ GameObjectCreator.register('group', function (config) /***/ }), -/* 1045 */ +/* 1056 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154609,19 +156197,19 @@ GameObjectCreator.register('image', function (config, addToScene) /***/ }), -/* 1046 */ +/* 1057 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); var GetFastValue = __webpack_require__(2); -var ParticleEmitterManager = __webpack_require__(191); +var ParticleEmitterManager = __webpack_require__(192); /** * Creates a new Particle Emitter Manager Game Object and returns it. @@ -154666,19 +156254,19 @@ GameObjectCreator.register('particles', function (config, addToScene) /***/ }), -/* 1047 */ +/* 1058 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BuildGameObject = __webpack_require__(28); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var RenderTexture = __webpack_require__(192); +var RenderTexture = __webpack_require__(193); /** * Creates a new Render Texture Game Object and returns it. @@ -154718,17 +156306,17 @@ GameObjectCreator.register('renderTexture', function (config, addToScene) /***/ }), -/* 1048 */ +/* 1059 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BuildGameObject = __webpack_require__(28); -var BuildGameObjectAnimation = __webpack_require__(371); +var BuildGameObjectAnimation = __webpack_require__(385); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); var Sprite = __webpack_require__(69); @@ -154771,16 +156359,16 @@ GameObjectCreator.register('sprite', function (config, addToScene) /***/ }), -/* 1049 */ +/* 1060 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(127); +var BitmapText = __webpack_require__(129); var BuildGameObject = __webpack_require__(28); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -154824,19 +156412,19 @@ GameObjectCreator.register('bitmapText', function (config, addToScene) /***/ }), -/* 1050 */ +/* 1061 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BuildGameObject = __webpack_require__(28); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Text = __webpack_require__(194); +var Text = __webpack_require__(195); /** * Creates a new Text Game Object and returns it. @@ -154911,19 +156499,19 @@ GameObjectCreator.register('text', function (config, addToScene) /***/ }), -/* 1051 */ +/* 1062 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BuildGameObject = __webpack_require__(28); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var TileSprite = __webpack_require__(195); +var TileSprite = __webpack_require__(196); /** * Creates a new TileSprite Game Object and returns it. @@ -154963,18 +156551,18 @@ GameObjectCreator.register('tileSprite', function (config, addToScene) /***/ }), -/* 1052 */ +/* 1063 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Zone = __webpack_require__(108); +var Zone = __webpack_require__(110); /** * Creates a new Zone Game Object and returns it. @@ -155002,19 +156590,19 @@ GameObjectCreator.register('zone', function (config) /***/ }), -/* 1053 */ +/* 1064 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BuildGameObject = __webpack_require__(28); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Video = __webpack_require__(196); +var Video = __webpack_require__(197); /** * Creates a new Video Game Object and returns it. @@ -155051,12 +156639,12 @@ GameObjectCreator.register('video', function (config, addToScene) /***/ }), -/* 1054 */ +/* 1065 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155065,12 +156653,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1055); + renderWebGL = __webpack_require__(1066); } if (true) { - renderCanvas = __webpack_require__(1056); + renderCanvas = __webpack_require__(1067); } module.exports = { @@ -155082,12 +156670,12 @@ module.exports = { /***/ }), -/* 1055 */ +/* 1066 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155200,12 +156788,12 @@ module.exports = MeshWebGLRenderer; /***/ }), -/* 1056 */ +/* 1067 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155229,12 +156817,12 @@ module.exports = MeshCanvasRenderer; /***/ }), -/* 1057 */ +/* 1068 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155243,12 +156831,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1058); + renderWebGL = __webpack_require__(1069); } if (true) { - renderCanvas = __webpack_require__(1059); + renderCanvas = __webpack_require__(1070); } module.exports = { @@ -155260,12 +156848,12 @@ module.exports = { /***/ }), -/* 1058 */ +/* 1069 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155344,12 +156932,12 @@ module.exports = ShaderWebGLRenderer; /***/ }), -/* 1059 */ +/* 1070 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155373,16 +156961,16 @@ module.exports = ShaderCanvasRenderer; /***/ }), -/* 1060 */ +/* 1071 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Mesh = __webpack_require__(128); +var Mesh = __webpack_require__(130); var GameObjectFactory = __webpack_require__(5); /** @@ -155423,16 +157011,16 @@ if (true) /***/ }), -/* 1061 */ +/* 1072 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Quad = __webpack_require__(199); +var Quad = __webpack_require__(200); var GameObjectFactory = __webpack_require__(5); /** @@ -155469,16 +157057,16 @@ if (true) /***/ }), -/* 1062 */ +/* 1073 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Shader = __webpack_require__(200); +var Shader = __webpack_require__(201); var GameObjectFactory = __webpack_require__(5); /** @@ -155510,12 +157098,12 @@ if (true) /***/ }), -/* 1063 */ +/* 1074 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155523,7 +157111,7 @@ var BuildGameObject = __webpack_require__(28); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); var GetValue = __webpack_require__(6); -var Mesh = __webpack_require__(128); +var Mesh = __webpack_require__(130); /** * Creates a new Mesh Game Object and returns it. @@ -155565,19 +157153,19 @@ GameObjectCreator.register('mesh', function (config, addToScene) /***/ }), -/* 1064 */ +/* 1075 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BuildGameObject = __webpack_require__(28); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Quad = __webpack_require__(199); +var Quad = __webpack_require__(200); /** * Creates a new Quad Game Object and returns it. @@ -155615,19 +157203,19 @@ GameObjectCreator.register('quad', function (config, addToScene) /***/ }), -/* 1065 */ +/* 1076 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BuildGameObject = __webpack_require__(28); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Shader = __webpack_require__(200); +var Shader = __webpack_require__(201); /** * Creates a new Shader Game Object and returns it. @@ -155668,19 +157256,19 @@ GameObjectCreator.register('shader', function (config, addToScene) /***/ }), -/* 1066 */ +/* 1077 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var LightsManager = __webpack_require__(407); -var PluginCache = __webpack_require__(21); -var SceneEvents = __webpack_require__(22); +var LightsManager = __webpack_require__(421); +var PluginCache = __webpack_require__(23); +var SceneEvents = __webpack_require__(19); /** * @classdesc @@ -155784,43 +157372,43 @@ module.exports = LightsPlugin; /***/ }), -/* 1067 */ +/* 1078 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Circle = __webpack_require__(65); -Circle.Area = __webpack_require__(1068); -Circle.Circumference = __webpack_require__(251); -Circle.CircumferencePoint = __webpack_require__(144); -Circle.Clone = __webpack_require__(1069); -Circle.Contains = __webpack_require__(54); -Circle.ContainsPoint = __webpack_require__(1070); -Circle.ContainsRect = __webpack_require__(1071); -Circle.CopyFrom = __webpack_require__(1072); -Circle.Equals = __webpack_require__(1073); -Circle.GetBounds = __webpack_require__(1074); -Circle.GetPoint = __webpack_require__(249); -Circle.GetPoints = __webpack_require__(250); -Circle.Offset = __webpack_require__(1075); -Circle.OffsetPoint = __webpack_require__(1076); -Circle.Random = __webpack_require__(145); +Circle.Area = __webpack_require__(1079); +Circle.Circumference = __webpack_require__(265); +Circle.CircumferencePoint = __webpack_require__(146); +Circle.Clone = __webpack_require__(1080); +Circle.Contains = __webpack_require__(55); +Circle.ContainsPoint = __webpack_require__(1081); +Circle.ContainsRect = __webpack_require__(1082); +Circle.CopyFrom = __webpack_require__(1083); +Circle.Equals = __webpack_require__(1084); +Circle.GetBounds = __webpack_require__(1085); +Circle.GetPoint = __webpack_require__(263); +Circle.GetPoints = __webpack_require__(264); +Circle.Offset = __webpack_require__(1086); +Circle.OffsetPoint = __webpack_require__(1087); +Circle.Random = __webpack_require__(147); module.exports = Circle; /***/ }), -/* 1068 */ +/* 1079 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155843,12 +157431,12 @@ module.exports = Area; /***/ }), -/* 1069 */ +/* 1080 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155873,16 +157461,16 @@ module.exports = Clone; /***/ }), -/* 1070 */ +/* 1081 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(54); +var Contains = __webpack_require__(55); /** * Check to see if the Circle contains the given Point object. @@ -155904,16 +157492,16 @@ module.exports = ContainsPoint; /***/ }), -/* 1071 */ +/* 1082 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(54); +var Contains = __webpack_require__(55); /** * Check to see if the Circle contains all four points of the given Rectangle object. @@ -155940,12 +157528,12 @@ module.exports = ContainsRect; /***/ }), -/* 1072 */ +/* 1083 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155972,12 +157560,12 @@ module.exports = CopyFrom; /***/ }), -/* 1073 */ +/* 1084 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -156006,12 +157594,12 @@ module.exports = Equals; /***/ }), -/* 1074 */ +/* 1085 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -156046,12 +157634,12 @@ module.exports = GetBounds; /***/ }), -/* 1075 */ +/* 1086 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -156081,12 +157669,12 @@ module.exports = Offset; /***/ }), -/* 1076 */ +/* 1087 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -156115,43 +157703,43 @@ module.exports = OffsetPoint; /***/ }), -/* 1077 */ +/* 1088 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Ellipse = __webpack_require__(95); -Ellipse.Area = __webpack_require__(1078); -Ellipse.Circumference = __webpack_require__(378); -Ellipse.CircumferencePoint = __webpack_require__(190); -Ellipse.Clone = __webpack_require__(1079); +Ellipse.Area = __webpack_require__(1089); +Ellipse.Circumference = __webpack_require__(392); +Ellipse.CircumferencePoint = __webpack_require__(191); +Ellipse.Clone = __webpack_require__(1090); Ellipse.Contains = __webpack_require__(96); -Ellipse.ContainsPoint = __webpack_require__(1080); -Ellipse.ContainsRect = __webpack_require__(1081); -Ellipse.CopyFrom = __webpack_require__(1082); -Ellipse.Equals = __webpack_require__(1083); -Ellipse.GetBounds = __webpack_require__(1084); -Ellipse.GetPoint = __webpack_require__(376); -Ellipse.GetPoints = __webpack_require__(377); -Ellipse.Offset = __webpack_require__(1085); -Ellipse.OffsetPoint = __webpack_require__(1086); -Ellipse.Random = __webpack_require__(152); +Ellipse.ContainsPoint = __webpack_require__(1091); +Ellipse.ContainsRect = __webpack_require__(1092); +Ellipse.CopyFrom = __webpack_require__(1093); +Ellipse.Equals = __webpack_require__(1094); +Ellipse.GetBounds = __webpack_require__(1095); +Ellipse.GetPoint = __webpack_require__(390); +Ellipse.GetPoints = __webpack_require__(391); +Ellipse.Offset = __webpack_require__(1096); +Ellipse.OffsetPoint = __webpack_require__(1097); +Ellipse.Random = __webpack_require__(154); module.exports = Ellipse; /***/ }), -/* 1078 */ +/* 1089 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -156180,12 +157768,12 @@ module.exports = Area; /***/ }), -/* 1079 */ +/* 1090 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -156210,12 +157798,12 @@ module.exports = Clone; /***/ }), -/* 1080 */ +/* 1091 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -156241,12 +157829,12 @@ module.exports = ContainsPoint; /***/ }), -/* 1081 */ +/* 1092 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -156277,12 +157865,12 @@ module.exports = ContainsRect; /***/ }), -/* 1082 */ +/* 1093 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -156309,12 +157897,12 @@ module.exports = CopyFrom; /***/ }), -/* 1083 */ +/* 1094 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -156344,12 +157932,12 @@ module.exports = Equals; /***/ }), -/* 1084 */ +/* 1095 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -156384,12 +157972,12 @@ module.exports = GetBounds; /***/ }), -/* 1085 */ +/* 1096 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -156419,12 +158007,12 @@ module.exports = Offset; /***/ }), -/* 1086 */ +/* 1097 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -156453,18 +158041,18 @@ module.exports = OffsetPoint; /***/ }), -/* 1087 */ +/* 1098 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Point = __webpack_require__(4); -var CircleToCircle = __webpack_require__(201); +var CircleToCircle = __webpack_require__(202); /** * Checks if two Circles intersect and returns the intersection points as a Point object array. @@ -156547,18 +158135,18 @@ module.exports = GetCircleToCircle; /***/ }), -/* 1088 */ +/* 1099 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLineToCircle = __webpack_require__(203); -var CircleToRectangle = __webpack_require__(202); +var GetLineToCircle = __webpack_require__(204); +var CircleToRectangle = __webpack_require__(203); /** * Checks for intersection between a circle and a rectangle, @@ -156597,17 +158185,17 @@ module.exports = GetCircleToRectangle; /***/ }), -/* 1089 */ +/* 1100 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Rectangle = __webpack_require__(11); -var RectangleToRectangle = __webpack_require__(129); +var RectangleToRectangle = __webpack_require__(131); /** * Checks if two Rectangle shapes intersect and returns the area of this intersection as Rectangle object. @@ -156646,18 +158234,18 @@ module.exports = GetRectangleIntersection; /***/ }), -/* 1090 */ +/* 1101 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLineToRectangle = __webpack_require__(205); -var RectangleToRectangle = __webpack_require__(129); +var GetLineToRectangle = __webpack_require__(206); +var RectangleToRectangle = __webpack_require__(131); /** * Checks if two Rectangles intersect and returns the intersection points as a Point object array. @@ -156697,18 +158285,18 @@ module.exports = GetRectangleToRectangle; /***/ }), -/* 1091 */ +/* 1102 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RectangleToTriangle = __webpack_require__(411); -var GetLineToRectangle = __webpack_require__(205); +var RectangleToTriangle = __webpack_require__(425); +var GetLineToRectangle = __webpack_require__(206); /** * Checks for intersection between Rectangle shape and Triangle shape, @@ -156745,18 +158333,18 @@ module.exports = GetRectangleToTriangle; /***/ }), -/* 1092 */ +/* 1103 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLineToCircle = __webpack_require__(203); -var TriangleToCircle = __webpack_require__(413); +var GetLineToCircle = __webpack_require__(204); +var TriangleToCircle = __webpack_require__(427); /** * Checks if a Triangle and a Circle intersect, and returns the intersection points as a Point object array. @@ -156794,18 +158382,18 @@ module.exports = GetTriangleToCircle; /***/ }), -/* 1093 */ +/* 1104 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TriangleToTriangle = __webpack_require__(416); -var GetTriangleToLine = __webpack_require__(414); +var TriangleToTriangle = __webpack_require__(430); +var GetTriangleToLine = __webpack_require__(428); /** * Checks if two Triangles intersect, and returns the intersection points as a Point object array. @@ -156843,16 +158431,16 @@ module.exports = GetTriangleToTriangle; /***/ }), -/* 1094 */ +/* 1105 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PointToLine = __webpack_require__(418); +var PointToLine = __webpack_require__(432); /** * Checks if a Point is located on the given line segment. @@ -156884,12 +158472,12 @@ module.exports = PointToLineSegment; /***/ }), -/* 1095 */ +/* 1106 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -156924,56 +158512,56 @@ module.exports = RectangleToValues; /***/ }), -/* 1096 */ +/* 1107 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Line = __webpack_require__(55); +var Line = __webpack_require__(56); Line.Angle = __webpack_require__(85); -Line.BresenhamPoints = __webpack_require__(271); -Line.CenterOn = __webpack_require__(1097); -Line.Clone = __webpack_require__(1098); -Line.CopyFrom = __webpack_require__(1099); -Line.Equals = __webpack_require__(1100); -Line.Extend = __webpack_require__(1101); -Line.GetMidPoint = __webpack_require__(1102); -Line.GetNearestPoint = __webpack_require__(1103); -Line.GetNormal = __webpack_require__(1104); -Line.GetPoint = __webpack_require__(258); -Line.GetPoints = __webpack_require__(148); -Line.GetShortestDistance = __webpack_require__(1105); -Line.Height = __webpack_require__(1106); -Line.Length = __webpack_require__(56); -Line.NormalAngle = __webpack_require__(419); -Line.NormalX = __webpack_require__(1107); -Line.NormalY = __webpack_require__(1108); -Line.Offset = __webpack_require__(1109); -Line.PerpSlope = __webpack_require__(1110); -Line.Random = __webpack_require__(149); -Line.ReflectAngle = __webpack_require__(1111); -Line.Rotate = __webpack_require__(1112); -Line.RotateAroundPoint = __webpack_require__(1113); -Line.RotateAroundXY = __webpack_require__(207); -Line.SetToAngle = __webpack_require__(1114); -Line.Slope = __webpack_require__(1115); -Line.Width = __webpack_require__(1116); +Line.BresenhamPoints = __webpack_require__(285); +Line.CenterOn = __webpack_require__(1108); +Line.Clone = __webpack_require__(1109); +Line.CopyFrom = __webpack_require__(1110); +Line.Equals = __webpack_require__(1111); +Line.Extend = __webpack_require__(1112); +Line.GetMidPoint = __webpack_require__(1113); +Line.GetNearestPoint = __webpack_require__(1114); +Line.GetNormal = __webpack_require__(1115); +Line.GetPoint = __webpack_require__(272); +Line.GetPoints = __webpack_require__(150); +Line.GetShortestDistance = __webpack_require__(1116); +Line.Height = __webpack_require__(1117); +Line.Length = __webpack_require__(57); +Line.NormalAngle = __webpack_require__(433); +Line.NormalX = __webpack_require__(1118); +Line.NormalY = __webpack_require__(1119); +Line.Offset = __webpack_require__(1120); +Line.PerpSlope = __webpack_require__(1121); +Line.Random = __webpack_require__(151); +Line.ReflectAngle = __webpack_require__(1122); +Line.Rotate = __webpack_require__(1123); +Line.RotateAroundPoint = __webpack_require__(1124); +Line.RotateAroundXY = __webpack_require__(208); +Line.SetToAngle = __webpack_require__(1125); +Line.Slope = __webpack_require__(1126); +Line.Width = __webpack_require__(1127); module.exports = Line; /***/ }), -/* 1097 */ +/* 1108 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -157008,16 +158596,16 @@ module.exports = CenterOn; /***/ }), -/* 1098 */ +/* 1109 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Line = __webpack_require__(55); +var Line = __webpack_require__(56); /** * Clone the given line. @@ -157038,12 +158626,12 @@ module.exports = Clone; /***/ }), -/* 1099 */ +/* 1110 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -157069,12 +158657,12 @@ module.exports = CopyFrom; /***/ }), -/* 1100 */ +/* 1111 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -157103,16 +158691,16 @@ module.exports = Equals; /***/ }), -/* 1101 */ +/* 1112 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(56); +var Length = __webpack_require__(57); /** * Extends the start and end points of a Line by the given amounts. @@ -157161,12 +158749,12 @@ module.exports = Extend; /***/ }), -/* 1102 */ +/* 1113 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -157199,13 +158787,13 @@ module.exports = GetMidPoint; /***/ }), -/* 1103 */ +/* 1114 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Florian Mertens - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -157254,12 +158842,12 @@ module.exports = GetNearestPoint; /***/ }), -/* 1104 */ +/* 1115 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -157298,13 +158886,13 @@ module.exports = GetNormal; /***/ }), -/* 1105 */ +/* 1116 */ /***/ (function(module, exports) { /** * @author Richard Davey * @author Florian Mertens - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -157345,12 +158933,12 @@ module.exports = GetShortestDistance; /***/ }), -/* 1106 */ +/* 1117 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -157373,12 +158961,12 @@ module.exports = Height; /***/ }), -/* 1107 */ +/* 1118 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -157404,12 +158992,12 @@ module.exports = NormalX; /***/ }), -/* 1108 */ +/* 1119 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -157436,12 +159024,12 @@ module.exports = NormalY; /***/ }), -/* 1109 */ +/* 1120 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -157474,12 +159062,12 @@ module.exports = Offset; /***/ }), -/* 1110 */ +/* 1121 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -157502,17 +159090,17 @@ module.exports = PerpSlope; /***/ }), -/* 1111 */ +/* 1122 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Angle = __webpack_require__(85); -var NormalAngle = __webpack_require__(419); +var NormalAngle = __webpack_require__(433); /** * Calculate the reflected angle between two lines. @@ -157536,16 +159124,16 @@ module.exports = ReflectAngle; /***/ }), -/* 1112 */ +/* 1123 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(207); +var RotateAroundXY = __webpack_require__(208); /** * Rotate a line around its midpoint by the given angle in radians. @@ -157572,16 +159160,16 @@ module.exports = Rotate; /***/ }), -/* 1113 */ +/* 1124 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(207); +var RotateAroundXY = __webpack_require__(208); /** * Rotate a line around a point by the given angle in radians. @@ -157606,12 +159194,12 @@ module.exports = RotateAroundPoint; /***/ }), -/* 1114 */ +/* 1125 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -157646,12 +159234,12 @@ module.exports = SetToAngle; /***/ }), -/* 1115 */ +/* 1126 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -157674,12 +159262,12 @@ module.exports = Slope; /***/ }), -/* 1116 */ +/* 1127 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -157702,43 +159290,43 @@ module.exports = Width; /***/ }), -/* 1117 */ +/* 1128 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Point = __webpack_require__(4); -Point.Ceil = __webpack_require__(1118); -Point.Clone = __webpack_require__(1119); -Point.CopyFrom = __webpack_require__(1120); -Point.Equals = __webpack_require__(1121); -Point.Floor = __webpack_require__(1122); -Point.GetCentroid = __webpack_require__(1123); -Point.GetMagnitude = __webpack_require__(420); -Point.GetMagnitudeSq = __webpack_require__(421); -Point.GetRectangleFromPoints = __webpack_require__(1124); -Point.Interpolate = __webpack_require__(1125); -Point.Invert = __webpack_require__(1126); -Point.Negative = __webpack_require__(1127); -Point.Project = __webpack_require__(1128); -Point.ProjectUnit = __webpack_require__(1129); -Point.SetMagnitude = __webpack_require__(1130); +Point.Ceil = __webpack_require__(1129); +Point.Clone = __webpack_require__(1130); +Point.CopyFrom = __webpack_require__(1131); +Point.Equals = __webpack_require__(1132); +Point.Floor = __webpack_require__(1133); +Point.GetCentroid = __webpack_require__(1134); +Point.GetMagnitude = __webpack_require__(434); +Point.GetMagnitudeSq = __webpack_require__(435); +Point.GetRectangleFromPoints = __webpack_require__(1135); +Point.Interpolate = __webpack_require__(1136); +Point.Invert = __webpack_require__(1137); +Point.Negative = __webpack_require__(1138); +Point.Project = __webpack_require__(1139); +Point.ProjectUnit = __webpack_require__(1140); +Point.SetMagnitude = __webpack_require__(1141); module.exports = Point; /***/ }), -/* 1118 */ +/* 1129 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -157763,12 +159351,12 @@ module.exports = Ceil; /***/ }), -/* 1119 */ +/* 1130 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -157793,12 +159381,12 @@ module.exports = Clone; /***/ }), -/* 1120 */ +/* 1131 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -157824,12 +159412,12 @@ module.exports = CopyFrom; /***/ }), -/* 1121 */ +/* 1132 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -157853,12 +159441,12 @@ module.exports = Equals; /***/ }), -/* 1122 */ +/* 1133 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -157883,12 +159471,12 @@ module.exports = Floor; /***/ }), -/* 1123 */ +/* 1134 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -157947,12 +159535,12 @@ module.exports = GetCentroid; /***/ }), -/* 1124 */ +/* 1135 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158017,12 +159605,12 @@ module.exports = GetRectangleFromPoints; /***/ }), -/* 1125 */ +/* 1136 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158058,12 +159646,12 @@ module.exports = Interpolate; /***/ }), -/* 1126 */ +/* 1137 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158088,12 +159676,12 @@ module.exports = Invert; /***/ }), -/* 1127 */ +/* 1138 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158123,17 +159711,17 @@ module.exports = Negative; /***/ }), -/* 1128 */ +/* 1139 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Point = __webpack_require__(4); -var GetMagnitudeSq = __webpack_require__(421); +var GetMagnitudeSq = __webpack_require__(435); /** * [description] @@ -158169,12 +159757,12 @@ module.exports = Project; /***/ }), -/* 1129 */ +/* 1140 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158213,16 +159801,16 @@ module.exports = ProjectUnit; /***/ }), -/* 1130 */ +/* 1141 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetMagnitude = __webpack_require__(420); +var GetMagnitude = __webpack_require__(434); /** * Changes the magnitude (length) of a two-dimensional vector without changing its direction. @@ -158257,41 +159845,41 @@ module.exports = SetMagnitude; /***/ }), -/* 1131 */ +/* 1142 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Polygon = __webpack_require__(197); +var Polygon = __webpack_require__(198); -Polygon.Clone = __webpack_require__(1132); -Polygon.Contains = __webpack_require__(198); -Polygon.ContainsPoint = __webpack_require__(1133); -Polygon.GetAABB = __webpack_require__(396); -Polygon.GetNumberArray = __webpack_require__(1134); -Polygon.GetPoints = __webpack_require__(397); -Polygon.Perimeter = __webpack_require__(398); -Polygon.Reverse = __webpack_require__(1135); -Polygon.Smooth = __webpack_require__(399); +Polygon.Clone = __webpack_require__(1143); +Polygon.Contains = __webpack_require__(199); +Polygon.ContainsPoint = __webpack_require__(1144); +Polygon.GetAABB = __webpack_require__(410); +Polygon.GetNumberArray = __webpack_require__(1145); +Polygon.GetPoints = __webpack_require__(411); +Polygon.Perimeter = __webpack_require__(412); +Polygon.Reverse = __webpack_require__(1146); +Polygon.Smooth = __webpack_require__(413); module.exports = Polygon; /***/ }), -/* 1132 */ +/* 1143 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Polygon = __webpack_require__(197); +var Polygon = __webpack_require__(198); /** * Create a new polygon which is a copy of the specified polygon @@ -158312,16 +159900,16 @@ module.exports = Clone; /***/ }), -/* 1133 */ +/* 1144 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(198); +var Contains = __webpack_require__(199); /** * [description] @@ -158343,12 +159931,12 @@ module.exports = ContainsPoint; /***/ }), -/* 1134 */ +/* 1145 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158386,12 +159974,12 @@ module.exports = GetNumberArray; /***/ }), -/* 1135 */ +/* 1146 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158418,12 +160006,12 @@ module.exports = Reverse; /***/ }), -/* 1136 */ +/* 1147 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158446,12 +160034,12 @@ module.exports = Area; /***/ }), -/* 1137 */ +/* 1148 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158479,12 +160067,12 @@ module.exports = Ceil; /***/ }), -/* 1138 */ +/* 1149 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158514,12 +160102,12 @@ module.exports = CeilAll; /***/ }), -/* 1139 */ +/* 1150 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158544,12 +160132,12 @@ module.exports = Clone; /***/ }), -/* 1140 */ +/* 1151 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158575,12 +160163,12 @@ module.exports = ContainsPoint; /***/ }), -/* 1141 */ +/* 1152 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158606,12 +160194,12 @@ module.exports = CopyFrom; /***/ }), -/* 1142 */ +/* 1153 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158640,16 +160228,16 @@ module.exports = Equals; /***/ }), -/* 1143 */ +/* 1154 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetAspectRatio = __webpack_require__(208); +var GetAspectRatio = __webpack_require__(209); /** * Adjusts the target rectangle, changing its width, height and position, @@ -158693,16 +160281,16 @@ module.exports = FitInside; /***/ }), -/* 1144 */ +/* 1155 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetAspectRatio = __webpack_require__(208); +var GetAspectRatio = __webpack_require__(209); /** * Adjusts the target rectangle, changing its width, height and position, @@ -158746,12 +160334,12 @@ module.exports = FitOutside; /***/ }), -/* 1145 */ +/* 1156 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158779,12 +160367,12 @@ module.exports = Floor; /***/ }), -/* 1146 */ +/* 1157 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158814,12 +160402,12 @@ module.exports = FloorAll; /***/ }), -/* 1147 */ +/* 1158 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158852,12 +160440,12 @@ module.exports = GetCenter; /***/ }), -/* 1148 */ +/* 1159 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158892,16 +160480,16 @@ module.exports = GetSize; /***/ }), -/* 1149 */ +/* 1160 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CenterOn = __webpack_require__(163); +var CenterOn = __webpack_require__(165); /** @@ -158934,17 +160522,17 @@ module.exports = Inflate; /***/ }), -/* 1150 */ +/* 1161 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Rectangle = __webpack_require__(11); -var Intersects = __webpack_require__(129); +var Intersects = __webpack_require__(131); /** * Takes two Rectangles and first checks to see if they intersect. @@ -158985,12 +160573,12 @@ module.exports = Intersection; /***/ }), -/* 1151 */ +/* 1162 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159034,12 +160622,12 @@ module.exports = MergePoints; /***/ }), -/* 1152 */ +/* 1163 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159081,12 +160669,12 @@ module.exports = MergeRect; /***/ }), -/* 1153 */ +/* 1164 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159125,12 +160713,12 @@ module.exports = MergeXY; /***/ }), -/* 1154 */ +/* 1165 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159160,12 +160748,12 @@ module.exports = Offset; /***/ }), -/* 1155 */ +/* 1166 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159194,12 +160782,12 @@ module.exports = OffsetPoint; /***/ }), -/* 1156 */ +/* 1167 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159228,12 +160816,12 @@ module.exports = Overlaps; /***/ }), -/* 1157 */ +/* 1168 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159285,17 +160873,17 @@ module.exports = PerimeterPoint; /***/ }), -/* 1158 */ +/* 1169 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Between = __webpack_require__(169); -var ContainsRect = __webpack_require__(423); +var Between = __webpack_require__(170); +var ContainsRect = __webpack_require__(437); var Point = __webpack_require__(4); /** @@ -159356,12 +160944,12 @@ module.exports = RandomOutside; /***/ }), -/* 1159 */ +/* 1170 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159385,12 +160973,12 @@ module.exports = SameDimensions; /***/ }), -/* 1160 */ +/* 1171 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159424,52 +161012,52 @@ module.exports = Scale; /***/ }), -/* 1161 */ +/* 1172 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Triangle = __webpack_require__(71); -Triangle.Area = __webpack_require__(1162); -Triangle.BuildEquilateral = __webpack_require__(1163); -Triangle.BuildFromPolygon = __webpack_require__(1164); -Triangle.BuildRight = __webpack_require__(1165); -Triangle.CenterOn = __webpack_require__(1166); -Triangle.Centroid = __webpack_require__(424); -Triangle.CircumCenter = __webpack_require__(1167); -Triangle.CircumCircle = __webpack_require__(1168); -Triangle.Clone = __webpack_require__(1169); +Triangle.Area = __webpack_require__(1173); +Triangle.BuildEquilateral = __webpack_require__(1174); +Triangle.BuildFromPolygon = __webpack_require__(1175); +Triangle.BuildRight = __webpack_require__(1176); +Triangle.CenterOn = __webpack_require__(1177); +Triangle.Centroid = __webpack_require__(438); +Triangle.CircumCenter = __webpack_require__(1178); +Triangle.CircumCircle = __webpack_require__(1179); +Triangle.Clone = __webpack_require__(1180); Triangle.Contains = __webpack_require__(83); -Triangle.ContainsArray = __webpack_require__(206); -Triangle.ContainsPoint = __webpack_require__(1170); -Triangle.CopyFrom = __webpack_require__(1171); -Triangle.Decompose = __webpack_require__(417); -Triangle.Equals = __webpack_require__(1172); -Triangle.GetPoint = __webpack_require__(403); -Triangle.GetPoints = __webpack_require__(404); -Triangle.InCenter = __webpack_require__(426); -Triangle.Perimeter = __webpack_require__(1173); -Triangle.Offset = __webpack_require__(425); -Triangle.Random = __webpack_require__(153); -Triangle.Rotate = __webpack_require__(1174); -Triangle.RotateAroundPoint = __webpack_require__(1175); -Triangle.RotateAroundXY = __webpack_require__(209); +Triangle.ContainsArray = __webpack_require__(207); +Triangle.ContainsPoint = __webpack_require__(1181); +Triangle.CopyFrom = __webpack_require__(1182); +Triangle.Decompose = __webpack_require__(431); +Triangle.Equals = __webpack_require__(1183); +Triangle.GetPoint = __webpack_require__(417); +Triangle.GetPoints = __webpack_require__(418); +Triangle.InCenter = __webpack_require__(440); +Triangle.Perimeter = __webpack_require__(1184); +Triangle.Offset = __webpack_require__(439); +Triangle.Random = __webpack_require__(155); +Triangle.Rotate = __webpack_require__(1185); +Triangle.RotateAroundPoint = __webpack_require__(1186); +Triangle.RotateAroundXY = __webpack_require__(210); module.exports = Triangle; /***/ }), -/* 1162 */ +/* 1173 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159503,12 +161091,12 @@ module.exports = Area; /***/ }), -/* 1163 */ +/* 1174 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159547,12 +161135,12 @@ module.exports = BuildEquilateral; /***/ }), -/* 1164 */ +/* 1175 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159622,12 +161210,12 @@ module.exports = BuildFromPolygon; /***/ }), -/* 1165 */ +/* 1176 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159671,17 +161259,17 @@ module.exports = BuildRight; /***/ }), -/* 1166 */ +/* 1177 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Centroid = __webpack_require__(424); -var Offset = __webpack_require__(425); +var Centroid = __webpack_require__(438); +var Offset = __webpack_require__(439); /** * @callback CenterFunction @@ -159724,12 +161312,12 @@ module.exports = CenterOn; /***/ }), -/* 1167 */ +/* 1178 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159800,12 +161388,12 @@ module.exports = CircumCenter; /***/ }), -/* 1168 */ +/* 1179 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159883,12 +161471,12 @@ module.exports = CircumCircle; /***/ }), -/* 1169 */ +/* 1180 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159913,12 +161501,12 @@ module.exports = Clone; /***/ }), -/* 1170 */ +/* 1181 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159944,12 +161532,12 @@ module.exports = ContainsPoint; /***/ }), -/* 1171 */ +/* 1182 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159975,12 +161563,12 @@ module.exports = CopyFrom; /***/ }), -/* 1172 */ +/* 1183 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -160011,16 +161599,16 @@ module.exports = Equals; /***/ }), -/* 1173 */ +/* 1184 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(56); +var Length = __webpack_require__(57); // The 2D area of a triangle. The area value is always non-negative. @@ -160047,17 +161635,17 @@ module.exports = Perimeter; /***/ }), -/* 1174 */ +/* 1185 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(209); -var InCenter = __webpack_require__(426); +var RotateAroundXY = __webpack_require__(210); +var InCenter = __webpack_require__(440); /** * Rotates a Triangle about its incenter, which is the point at which its three angle bisectors meet. @@ -160083,16 +161671,16 @@ module.exports = Rotate; /***/ }), -/* 1175 */ +/* 1186 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(209); +var RotateAroundXY = __webpack_require__(210); /** * Rotates a Triangle at a certain angle about a given Point or object with public `x` and `y` properties. @@ -160117,16 +161705,16 @@ module.exports = RotateAroundPoint; /***/ }), -/* 1176 */ +/* 1187 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(176); +var CONST = __webpack_require__(177); var Extend = __webpack_require__(17); /** @@ -160135,16 +161723,16 @@ var Extend = __webpack_require__(17); var Input = { - CreateInteractiveObject: __webpack_require__(427), - Events: __webpack_require__(53), - Gamepad: __webpack_require__(1177), - InputManager: __webpack_require__(345), - InputPlugin: __webpack_require__(1189), - InputPluginCache: __webpack_require__(130), - Keyboard: __webpack_require__(1191), - Mouse: __webpack_require__(1208), - Pointer: __webpack_require__(348), - Touch: __webpack_require__(1209) + CreateInteractiveObject: __webpack_require__(441), + Events: __webpack_require__(54), + Gamepad: __webpack_require__(1188), + InputManager: __webpack_require__(359), + InputPlugin: __webpack_require__(1200), + InputPluginCache: __webpack_require__(132), + Keyboard: __webpack_require__(1202), + Mouse: __webpack_require__(1219), + Pointer: __webpack_require__(362), + Touch: __webpack_require__(1220) }; @@ -160155,12 +161743,12 @@ module.exports = Input; /***/ }), -/* 1177 */ +/* 1188 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -160170,23 +161758,23 @@ module.exports = Input; module.exports = { - Axis: __webpack_require__(428), - Button: __webpack_require__(429), - Events: __webpack_require__(210), - Gamepad: __webpack_require__(430), - GamepadPlugin: __webpack_require__(1184), + Axis: __webpack_require__(442), + Button: __webpack_require__(443), + Events: __webpack_require__(211), + Gamepad: __webpack_require__(444), + GamepadPlugin: __webpack_require__(1195), - Configs: __webpack_require__(1185) + Configs: __webpack_require__(1196) }; /***/ }), -/* 1178 */ +/* 1189 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -160210,12 +161798,12 @@ module.exports = 'down'; /***/ }), -/* 1179 */ +/* 1190 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -160239,12 +161827,12 @@ module.exports = 'up'; /***/ }), -/* 1180 */ +/* 1191 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -160270,12 +161858,12 @@ module.exports = 'connected'; /***/ }), -/* 1181 */ +/* 1192 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -160296,12 +161884,12 @@ module.exports = 'disconnected'; /***/ }), -/* 1182 */ +/* 1193 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -160328,12 +161916,12 @@ module.exports = 'down'; /***/ }), -/* 1183 */ +/* 1194 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -160360,22 +161948,22 @@ module.exports = 'up'; /***/ }), -/* 1184 */ +/* 1195 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(210); -var Gamepad = __webpack_require__(430); +var Events = __webpack_require__(211); +var Gamepad = __webpack_require__(444); var GetValue = __webpack_require__(6); -var InputPluginCache = __webpack_require__(130); -var InputEvents = __webpack_require__(53); +var InputPluginCache = __webpack_require__(132); +var InputEvents = __webpack_require__(54); /** * @classdesc @@ -160998,12 +162586,12 @@ module.exports = GamepadPlugin; /***/ }), -/* 1185 */ +/* 1196 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -161013,20 +162601,20 @@ module.exports = GamepadPlugin; module.exports = { - DUALSHOCK_4: __webpack_require__(1186), - SNES_USB: __webpack_require__(1187), - XBOX_360: __webpack_require__(1188) + DUALSHOCK_4: __webpack_require__(1197), + SNES_USB: __webpack_require__(1198), + XBOX_360: __webpack_require__(1199) }; /***/ }), -/* 1186 */ +/* 1197 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -161071,12 +162659,12 @@ module.exports = { /***/ }), -/* 1187 */ +/* 1198 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -161110,12 +162698,12 @@ module.exports = { /***/ }), -/* 1188 */ +/* 1199 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -161161,34 +162749,34 @@ module.exports = { /***/ }), -/* 1189 */ +/* 1200 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Circle = __webpack_require__(65); -var CircleContains = __webpack_require__(54); +var CircleContains = __webpack_require__(55); var Class = __webpack_require__(0); -var CONST = __webpack_require__(176); -var CreateInteractiveObject = __webpack_require__(427); -var CreatePixelPerfectHandler = __webpack_require__(1190); -var DistanceBetween = __webpack_require__(58); +var CONST = __webpack_require__(177); +var CreateInteractiveObject = __webpack_require__(441); +var CreatePixelPerfectHandler = __webpack_require__(1201); +var DistanceBetween = __webpack_require__(53); var Ellipse = __webpack_require__(95); var EllipseContains = __webpack_require__(96); -var Events = __webpack_require__(53); +var Events = __webpack_require__(54); var EventEmitter = __webpack_require__(9); var GetFastValue = __webpack_require__(2); var GEOM_CONST = __webpack_require__(46); -var InputPluginCache = __webpack_require__(130); +var InputPluginCache = __webpack_require__(132); var IsPlainObject = __webpack_require__(7); -var PluginCache = __webpack_require__(21); +var PluginCache = __webpack_require__(23); var Rectangle = __webpack_require__(11); var RectangleContains = __webpack_require__(47); -var SceneEvents = __webpack_require__(22); +var SceneEvents = __webpack_require__(19); var Triangle = __webpack_require__(71); var TriangleContains = __webpack_require__(83); @@ -164313,12 +165901,12 @@ module.exports = InputPlugin; /***/ }), -/* 1190 */ +/* 1201 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -164349,12 +165937,12 @@ module.exports = CreatePixelPerfectHandler; /***/ }), -/* 1191 */ +/* 1202 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -164364,31 +165952,31 @@ module.exports = CreatePixelPerfectHandler; module.exports = { - Events: __webpack_require__(131), + Events: __webpack_require__(133), - KeyboardManager: __webpack_require__(346), - KeyboardPlugin: __webpack_require__(1199), + KeyboardManager: __webpack_require__(360), + KeyboardPlugin: __webpack_require__(1210), - Key: __webpack_require__(431), - KeyCodes: __webpack_require__(120), + Key: __webpack_require__(445), + KeyCodes: __webpack_require__(122), - KeyCombo: __webpack_require__(432), + KeyCombo: __webpack_require__(446), - JustDown: __webpack_require__(1204), - JustUp: __webpack_require__(1205), - DownDuration: __webpack_require__(1206), - UpDuration: __webpack_require__(1207) + JustDown: __webpack_require__(1215), + JustUp: __webpack_require__(1216), + DownDuration: __webpack_require__(1217), + UpDuration: __webpack_require__(1218) }; /***/ }), -/* 1192 */ +/* 1203 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -164419,12 +166007,12 @@ module.exports = 'keydown'; /***/ }), -/* 1193 */ +/* 1204 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -164448,12 +166036,12 @@ module.exports = 'keyup'; /***/ }), -/* 1194 */ +/* 1205 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -164482,12 +166070,12 @@ module.exports = 'keycombomatch'; /***/ }), -/* 1195 */ +/* 1206 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -164516,12 +166104,12 @@ module.exports = 'down'; /***/ }), -/* 1196 */ +/* 1207 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -164555,12 +166143,12 @@ module.exports = 'keydown-'; /***/ }), -/* 1197 */ +/* 1208 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -164587,12 +166175,12 @@ module.exports = 'keyup-'; /***/ }), -/* 1198 */ +/* 1209 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -164621,26 +166209,26 @@ module.exports = 'up'; /***/ }), -/* 1199 */ +/* 1210 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(131); +var Events = __webpack_require__(133); var GameEvents = __webpack_require__(18); var GetValue = __webpack_require__(6); -var InputEvents = __webpack_require__(53); -var InputPluginCache = __webpack_require__(130); -var Key = __webpack_require__(431); -var KeyCodes = __webpack_require__(120); -var KeyCombo = __webpack_require__(432); -var KeyMap = __webpack_require__(1203); +var InputEvents = __webpack_require__(54); +var InputPluginCache = __webpack_require__(132); +var Key = __webpack_require__(445); +var KeyCodes = __webpack_require__(122); +var KeyCombo = __webpack_require__(446); +var KeyMap = __webpack_require__(1214); var SnapFloor = __webpack_require__(93); /** @@ -165507,16 +167095,16 @@ module.exports = KeyboardPlugin; /***/ }), -/* 1200 */ +/* 1211 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AdvanceKeyCombo = __webpack_require__(1201); +var AdvanceKeyCombo = __webpack_require__(1212); /** * Used internally by the KeyCombo class. @@ -165588,12 +167176,12 @@ module.exports = ProcessKeyCombo; /***/ }), -/* 1201 */ +/* 1212 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -165630,12 +167218,12 @@ module.exports = AdvanceKeyCombo; /***/ }), -/* 1202 */ +/* 1213 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -165665,16 +167253,16 @@ module.exports = ResetKeyCombo; /***/ }), -/* 1203 */ +/* 1214 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var KeyCodes = __webpack_require__(120); +var KeyCodes = __webpack_require__(122); var KeyMap = {}; @@ -165687,12 +167275,12 @@ module.exports = KeyMap; /***/ }), -/* 1204 */ +/* 1215 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -165729,12 +167317,12 @@ module.exports = JustDown; /***/ }), -/* 1205 */ +/* 1216 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -165771,12 +167359,12 @@ module.exports = JustUp; /***/ }), -/* 1206 */ +/* 1217 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -165805,12 +167393,12 @@ module.exports = DownDuration; /***/ }), -/* 1207 */ +/* 1218 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -165839,12 +167427,12 @@ module.exports = UpDuration; /***/ }), -/* 1208 */ +/* 1219 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -165855,19 +167443,19 @@ module.exports = UpDuration; /* eslint-disable */ module.exports = { - MouseManager: __webpack_require__(347) + MouseManager: __webpack_require__(361) }; /* eslint-enable */ /***/ }), -/* 1209 */ +/* 1220 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -165878,23 +167466,23 @@ module.exports = { /* eslint-disable */ module.exports = { - TouchManager: __webpack_require__(349) + TouchManager: __webpack_require__(363) }; /* eslint-enable */ /***/ }), -/* 1210 */ +/* 1221 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(19); +var CONST = __webpack_require__(20); var Extend = __webpack_require__(17); /** @@ -165905,16 +167493,16 @@ var Loader = { Events: __webpack_require__(81), - FileTypes: __webpack_require__(1211), + FileTypes: __webpack_require__(1222), - File: __webpack_require__(20), + File: __webpack_require__(21), FileTypesManager: __webpack_require__(8), - GetURL: __webpack_require__(132), - LoaderPlugin: __webpack_require__(1235), - MergeXHRSettings: __webpack_require__(211), + GetURL: __webpack_require__(134), + LoaderPlugin: __webpack_require__(1246), + MergeXHRSettings: __webpack_require__(212), MultiFile: __webpack_require__(61), - XHRLoader: __webpack_require__(433), - XHRSettings: __webpack_require__(133) + XHRLoader: __webpack_require__(447), + XHRSettings: __webpack_require__(135) }; @@ -165925,12 +167513,12 @@ module.exports = Loader; /***/ }), -/* 1211 */ +/* 1222 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -165940,47 +167528,47 @@ module.exports = Loader; module.exports = { - AnimationJSONFile: __webpack_require__(1212), - AtlasJSONFile: __webpack_require__(1213), - AtlasXMLFile: __webpack_require__(1214), - AudioFile: __webpack_require__(434), - AudioSpriteFile: __webpack_require__(1215), - BinaryFile: __webpack_require__(1216), - BitmapFontFile: __webpack_require__(1217), - CSSFile: __webpack_require__(1218), - GLSLFile: __webpack_require__(1219), - HTML5AudioFile: __webpack_require__(435), - HTMLFile: __webpack_require__(1220), - HTMLTextureFile: __webpack_require__(1221), + AnimationJSONFile: __webpack_require__(1223), + AtlasJSONFile: __webpack_require__(1224), + AtlasXMLFile: __webpack_require__(1225), + AudioFile: __webpack_require__(448), + AudioSpriteFile: __webpack_require__(1226), + BinaryFile: __webpack_require__(1227), + BitmapFontFile: __webpack_require__(1228), + CSSFile: __webpack_require__(1229), + GLSLFile: __webpack_require__(1230), + HTML5AudioFile: __webpack_require__(449), + HTMLFile: __webpack_require__(1231), + HTMLTextureFile: __webpack_require__(1232), ImageFile: __webpack_require__(72), JSONFile: __webpack_require__(60), - MultiAtlasFile: __webpack_require__(1222), - MultiScriptFile: __webpack_require__(1223), - PackFile: __webpack_require__(1224), - PluginFile: __webpack_require__(1225), - SceneFile: __webpack_require__(1226), - ScenePluginFile: __webpack_require__(1227), - ScriptFile: __webpack_require__(436), - SpriteSheetFile: __webpack_require__(1228), - SVGFile: __webpack_require__(1229), - TextFile: __webpack_require__(437), - TilemapCSVFile: __webpack_require__(1230), - TilemapImpactFile: __webpack_require__(1231), - TilemapJSONFile: __webpack_require__(1232), - UnityAtlasFile: __webpack_require__(1233), - VideoFile: __webpack_require__(1234), - XMLFile: __webpack_require__(212) + MultiAtlasFile: __webpack_require__(1233), + MultiScriptFile: __webpack_require__(1234), + PackFile: __webpack_require__(1235), + PluginFile: __webpack_require__(1236), + SceneFile: __webpack_require__(1237), + ScenePluginFile: __webpack_require__(1238), + ScriptFile: __webpack_require__(450), + SpriteSheetFile: __webpack_require__(1239), + SVGFile: __webpack_require__(1240), + TextFile: __webpack_require__(451), + TilemapCSVFile: __webpack_require__(1241), + TilemapImpactFile: __webpack_require__(1242), + TilemapJSONFile: __webpack_require__(1243), + UnityAtlasFile: __webpack_require__(1244), + VideoFile: __webpack_require__(1245), + XMLFile: __webpack_require__(213) }; /***/ }), -/* 1212 */ +/* 1223 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -166178,12 +167766,12 @@ module.exports = AnimationJSONFile; /***/ }), -/* 1213 */ +/* 1224 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -166427,12 +168015,12 @@ module.exports = AtlasJSONFile; /***/ }), -/* 1214 */ +/* 1225 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -166442,7 +168030,7 @@ var GetFastValue = __webpack_require__(2); var ImageFile = __webpack_require__(72); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(61); -var XMLFile = __webpack_require__(212); +var XMLFile = __webpack_require__(213); /** * @classdesc @@ -166670,16 +168258,16 @@ module.exports = AtlasXMLFile; /***/ }), -/* 1215 */ +/* 1226 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AudioFile = __webpack_require__(434); +var AudioFile = __webpack_require__(448); var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -166960,18 +168548,18 @@ FileTypesManager.register('audioSprite', function (key, jsonURL, audioURL, audio /***/ }), -/* 1216 */ +/* 1227 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var File = __webpack_require__(20); +var CONST = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -167142,12 +168730,12 @@ module.exports = BinaryFile; /***/ }), -/* 1217 */ +/* 1228 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167157,8 +168745,8 @@ var GetFastValue = __webpack_require__(2); var ImageFile = __webpack_require__(72); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(61); -var ParseXMLBitmapFont = __webpack_require__(184); -var XMLFile = __webpack_require__(212); +var ParseXMLBitmapFont = __webpack_require__(185); +var XMLFile = __webpack_require__(213); /** * @classdesc @@ -167385,18 +168973,18 @@ module.exports = BitmapFontFile; /***/ }), -/* 1218 */ +/* 1229 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var File = __webpack_require__(20); +var CONST = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -167553,22 +169141,22 @@ module.exports = CSSFile; /***/ }), -/* 1219 */ +/* 1230 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var File = __webpack_require__(20); +var CONST = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); -var Shader = __webpack_require__(333); +var Shader = __webpack_require__(347); /** * @classdesc @@ -167964,18 +169552,18 @@ module.exports = GLSLFile; /***/ }), -/* 1220 */ +/* 1231 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var File = __webpack_require__(20); +var CONST = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -168139,18 +169727,18 @@ module.exports = HTMLFile; /***/ }), -/* 1221 */ +/* 1232 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var File = __webpack_require__(20); +var CONST = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -168397,12 +169985,12 @@ module.exports = HTMLTextureFile; /***/ }), -/* 1222 */ +/* 1233 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -168429,7 +170017,7 @@ var MultiFile = __webpack_require__(61); * @since 3.7.0 * * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file. - * @param {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager. + * @param {(string|Phaser.Types.Loader.FileTypes.MultiAtlasFileConfig)} key - The key of the file. Must be unique within both the Loader and the Texture Manager. Or a config object. * @param {string} [atlasURL] - The absolute or relative URL to load the multi atlas json file from. * @param {string} [path] - Optional path to use when loading the textures defined in the atlas data. * @param {string} [baseURL] - Optional Base URL to use when loading the textures defined in the atlas data. @@ -168449,7 +170037,16 @@ var MultiAtlasFile = new Class({ var config = key; key = GetFastValue(config, 'key'); - atlasURL = GetFastValue(config, 'url'); + + if (GetFastValue(config, 'url', false)) + { + atlasURL = GetFastValue(config, 'url'); + } + else + { + atlasURL = GetFastValue(config, 'atlasURL'); + } + atlasXhrSettings = GetFastValue(config, 'xhrSettings'); path = GetFastValue(config, 'path'); baseURL = GetFastValue(config, 'baseURL'); @@ -168721,12 +170318,12 @@ module.exports = MultiAtlasFile; /***/ }), -/* 1223 */ +/* 1234 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -168735,7 +170332,7 @@ var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(61); -var ScriptFile = __webpack_require__(436); +var ScriptFile = __webpack_require__(450); /** * @classdesc @@ -168938,17 +170535,17 @@ module.exports = MultiScriptFile; /***/ }), -/* 1224 */ +/* 1235 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); +var CONST = __webpack_require__(20); var FileTypesManager = __webpack_require__(8); var JSONFile = __webpack_require__(60); @@ -169156,18 +170753,18 @@ module.exports = PackFile; /***/ }), -/* 1225 */ +/* 1236 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var File = __webpack_require__(20); +var CONST = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -169368,18 +170965,18 @@ module.exports = PluginFile; /***/ }), -/* 1226 */ +/* 1237 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var File = __webpack_require__(20); +var CONST = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -169589,18 +171186,18 @@ module.exports = SceneFile; /***/ }), -/* 1227 */ +/* 1238 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var File = __webpack_require__(20); +var CONST = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -169795,12 +171392,12 @@ module.exports = ScenePluginFile; /***/ }), -/* 1228 */ +/* 1239 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169986,18 +171583,18 @@ module.exports = SpriteSheetFile; /***/ }), -/* 1229 */ +/* 1240 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var File = __webpack_require__(20); +var CONST = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -170325,18 +171922,18 @@ module.exports = SVGFile; /***/ }), -/* 1230 */ +/* 1241 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var File = __webpack_require__(20); +var CONST = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -170520,12 +172117,12 @@ module.exports = TilemapCSVFile; /***/ }), -/* 1231 */ +/* 1242 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -170676,12 +172273,12 @@ module.exports = TilemapImpactFile; /***/ }), -/* 1232 */ +/* 1243 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -170832,12 +172429,12 @@ module.exports = TilemapJSONFile; /***/ }), -/* 1233 */ +/* 1244 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -170847,7 +172444,7 @@ var GetFastValue = __webpack_require__(2); var ImageFile = __webpack_require__(72); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(61); -var TextFile = __webpack_require__(437); +var TextFile = __webpack_require__(451); /** * @classdesc @@ -171074,20 +172671,20 @@ module.exports = UnityAtlasFile; /***/ }), -/* 1234 */ +/* 1245 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var CONST = __webpack_require__(29); -var File = __webpack_require__(20); +var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); -var GetURL = __webpack_require__(132); +var GetURL = __webpack_require__(134); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -171465,25 +173062,25 @@ module.exports = VideoFile; /***/ }), -/* 1235 */ +/* 1246 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(19); -var CustomSet = __webpack_require__(107); +var CONST = __webpack_require__(20); +var CustomSet = __webpack_require__(108); var EventEmitter = __webpack_require__(9); var Events = __webpack_require__(81); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); -var PluginCache = __webpack_require__(21); -var SceneEvents = __webpack_require__(22); -var XHRSettings = __webpack_require__(133); +var PluginCache = __webpack_require__(23); +var SceneEvents = __webpack_require__(19); +var XHRSettings = __webpack_require__(135); /** * @classdesc @@ -172542,12 +174139,12 @@ module.exports = LoaderPlugin; /***/ }), -/* 1236 */ +/* 1247 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -172567,18 +174164,18 @@ var Extend = __webpack_require__(17); var Arcade = { - ArcadePhysics: __webpack_require__(1237), - Body: __webpack_require__(444), - Collider: __webpack_require__(445), - Components: __webpack_require__(213), - Events: __webpack_require__(214), - Factory: __webpack_require__(438), - Group: __webpack_require__(440), - Image: __webpack_require__(439), - Sprite: __webpack_require__(134), - StaticBody: __webpack_require__(450), - StaticGroup: __webpack_require__(441), - World: __webpack_require__(443) + ArcadePhysics: __webpack_require__(1248), + Body: __webpack_require__(458), + Collider: __webpack_require__(459), + Components: __webpack_require__(214), + Events: __webpack_require__(215), + Factory: __webpack_require__(452), + Group: __webpack_require__(454), + Image: __webpack_require__(453), + Sprite: __webpack_require__(136), + StaticBody: __webpack_require__(464), + StaticGroup: __webpack_require__(455), + World: __webpack_require__(457) }; @@ -172589,28 +174186,28 @@ module.exports = Arcade; /***/ }), -/* 1237 */ +/* 1248 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var DegToRad = __webpack_require__(35); -var DistanceBetween = __webpack_require__(58); -var DistanceSquared = __webpack_require__(302); -var Factory = __webpack_require__(438); +var DistanceBetween = __webpack_require__(53); +var DistanceSquared = __webpack_require__(316); +var Factory = __webpack_require__(452); var GetFastValue = __webpack_require__(2); -var Merge = __webpack_require__(106); -var OverlapCirc = __webpack_require__(1250); -var OverlapRect = __webpack_require__(442); -var PluginCache = __webpack_require__(21); -var SceneEvents = __webpack_require__(22); +var Merge = __webpack_require__(107); +var OverlapCirc = __webpack_require__(1261); +var OverlapRect = __webpack_require__(456); +var PluginCache = __webpack_require__(23); +var SceneEvents = __webpack_require__(19); var Vector2 = __webpack_require__(3); -var World = __webpack_require__(443); +var World = __webpack_require__(457); /** * @classdesc @@ -173278,12 +174875,12 @@ module.exports = ArcadePhysics; /***/ }), -/* 1238 */ +/* 1249 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -173353,12 +174950,12 @@ module.exports = Acceleration; /***/ }), -/* 1239 */ +/* 1250 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -173435,12 +175032,12 @@ module.exports = Angular; /***/ }), -/* 1240 */ +/* 1251 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -173510,7 +175107,7 @@ var Bounce = { /** * Sets whether this Body collides with the world boundary. * - * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Vec2 first. + * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Phaser.Math.Vector2 first. * * @method Phaser.Physics.Arcade.Components.Bounce#setCollideWorldBounds * @since 3.0.0 @@ -173534,12 +175131,12 @@ module.exports = Bounce; /***/ }), -/* 1241 */ +/* 1252 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -173661,12 +175258,12 @@ module.exports = Debug; /***/ }), -/* 1242 */ +/* 1253 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -173794,12 +175391,12 @@ module.exports = Drag; /***/ }), -/* 1243 */ +/* 1254 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -173918,12 +175515,12 @@ module.exports = Enable; /***/ }), -/* 1244 */ +/* 1255 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -173996,12 +175593,12 @@ module.exports = Friction; /***/ }), -/* 1245 */ +/* 1256 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -174074,12 +175671,12 @@ module.exports = Gravity; /***/ }), -/* 1246 */ +/* 1257 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -174116,12 +175713,12 @@ module.exports = Immovable; /***/ }), -/* 1247 */ +/* 1258 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -174156,12 +175753,12 @@ module.exports = Mass; /***/ }), -/* 1248 */ +/* 1259 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -174238,12 +175835,12 @@ module.exports = Size; /***/ }), -/* 1249 */ +/* 1260 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -174337,13 +175934,13 @@ module.exports = Velocity; /***/ }), -/* 1250 */ +/* 1261 */ /***/ (function(module, exports, __webpack_require__) { -var OverlapRect = __webpack_require__(442); +var OverlapRect = __webpack_require__(456); var Circle = __webpack_require__(65); -var CircleToCircle = __webpack_require__(201); -var CircleToRectangle = __webpack_require__(202); +var CircleToCircle = __webpack_require__(202); +var CircleToRectangle = __webpack_require__(203); /** * This method will search the given circular area and return an array of all physics bodies that @@ -174405,12 +176002,12 @@ module.exports = OverlapCirc; /***/ }), -/* 1251 */ +/* 1262 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -174438,12 +176035,12 @@ module.exports = 'collide'; /***/ }), -/* 1252 */ +/* 1263 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -174471,12 +176068,12 @@ module.exports = 'overlap'; /***/ }), -/* 1253 */ +/* 1264 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -174494,12 +176091,12 @@ module.exports = 'pause'; /***/ }), -/* 1254 */ +/* 1265 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -174517,12 +176114,12 @@ module.exports = 'resume'; /***/ }), -/* 1255 */ +/* 1266 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -174549,12 +176146,12 @@ module.exports = 'tilecollide'; /***/ }), -/* 1256 */ +/* 1267 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -174581,12 +176178,12 @@ module.exports = 'tileoverlap'; /***/ }), -/* 1257 */ +/* 1268 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -174613,12 +176210,12 @@ module.exports = 'worldbounds'; /***/ }), -/* 1258 */ +/* 1269 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -174639,12 +176236,12 @@ module.exports = 'worldstep'; /***/ }), -/* 1259 */ +/* 1270 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -174680,18 +176277,18 @@ module.exports = ProcessTileCallbacks; /***/ }), -/* 1260 */ +/* 1271 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileCheckX = __webpack_require__(1261); -var TileCheckY = __webpack_require__(1263); -var TileIntersectsBody = __webpack_require__(449); +var TileCheckX = __webpack_require__(1272); +var TileCheckY = __webpack_require__(1274); +var TileIntersectsBody = __webpack_require__(463); /** * The core separation function to separate a physics body and a tile. @@ -174800,16 +176397,16 @@ module.exports = SeparateTile; /***/ }), -/* 1261 */ +/* 1272 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ProcessTileSeparationX = __webpack_require__(1262); +var ProcessTileSeparationX = __webpack_require__(1273); /** * Check the body against the given tile on the X axis. @@ -174890,12 +176487,12 @@ module.exports = TileCheckX; /***/ }), -/* 1262 */ +/* 1273 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -174937,16 +176534,16 @@ module.exports = ProcessTileSeparationX; /***/ }), -/* 1263 */ +/* 1274 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ProcessTileSeparationY = __webpack_require__(1264); +var ProcessTileSeparationY = __webpack_require__(1275); /** * Check the body against the given tile on the Y axis. @@ -175027,12 +176624,12 @@ module.exports = TileCheckY; /***/ }), -/* 1264 */ +/* 1275 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -175074,16 +176671,16 @@ module.exports = ProcessTileSeparationY; /***/ }), -/* 1265 */ +/* 1276 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetOverlapX = __webpack_require__(446); +var GetOverlapX = __webpack_require__(460); /** * Separates two overlapping bodies on the X-axis (horizontally). @@ -175165,16 +176762,16 @@ module.exports = SeparateX; /***/ }), -/* 1266 */ +/* 1277 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetOverlapY = __webpack_require__(447); +var GetOverlapY = __webpack_require__(461); /** * Separates two overlapping bodies on the Y-axis (vertically). @@ -175256,12 +176853,12 @@ module.exports = SeparateY; /***/ }), -/* 1267 */ +/* 1278 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -175271,20 +176868,20 @@ module.exports = SeparateY; module.exports = { - COLLIDE: __webpack_require__(1381), - PAUSE: __webpack_require__(1382), - RESUME: __webpack_require__(1383) + COLLIDE: __webpack_require__(1392), + PAUSE: __webpack_require__(1393), + RESUME: __webpack_require__(1394) }; /***/ }), -/* 1268 */ +/* 1279 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -175294,99 +176891,852 @@ module.exports = { module.exports = { - Acceleration: __webpack_require__(1385), - BodyScale: __webpack_require__(1386), - BodyType: __webpack_require__(1387), - Bounce: __webpack_require__(1388), - CheckAgainst: __webpack_require__(1389), - Collides: __webpack_require__(1390), - Debug: __webpack_require__(1391), - Friction: __webpack_require__(1392), - Gravity: __webpack_require__(1393), - Offset: __webpack_require__(1394), - SetGameObject: __webpack_require__(1395), - Velocity: __webpack_require__(1396) + Acceleration: __webpack_require__(1396), + BodyScale: __webpack_require__(1397), + BodyType: __webpack_require__(1398), + Bounce: __webpack_require__(1399), + CheckAgainst: __webpack_require__(1400), + Collides: __webpack_require__(1401), + Debug: __webpack_require__(1402), + Friction: __webpack_require__(1403), + Gravity: __webpack_require__(1404), + Offset: __webpack_require__(1405), + SetGameObject: __webpack_require__(1406), + Velocity: __webpack_require__(1407) }; /***/ }), -/* 1269 */ +/* 1280 */ /***/ (function(module, exports, __webpack_require__) { /** -* The `Matter.Axes` module contains methods for creating and manipulating sets of axes. +* The `Matter.Composites` module contains factory methods for creating composite bodies +* with commonly used configurations (such as stacks and chains). * -* @class Axes +* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). +* +* @class Composites */ -var Axes = {}; +var Composites = {}; -module.exports = Axes; +module.exports = Composites; -var Vector = __webpack_require__(101); +var Composite = __webpack_require__(145); +var Constraint = __webpack_require__(216); var Common = __webpack_require__(37); +var Body = __webpack_require__(62); +var Bodies = __webpack_require__(109); (function() { /** - * Creates a new set of axes from the given vertices. - * @method fromVertices - * @param {vertices} vertices - * @return {axes} A new axes from the given vertices + * Create a new composite containing bodies created in the callback in a grid arrangement. + * This function uses the body's bounds to prevent overlaps. + * @method stack + * @param {number} xx + * @param {number} yy + * @param {number} columns + * @param {number} rows + * @param {number} columnGap + * @param {number} rowGap + * @param {function} callback + * @return {composite} A new composite containing objects created in the callback */ - Axes.fromVertices = function(vertices) { - var axes = {}; + Composites.stack = function(xx, yy, columns, rows, columnGap, rowGap, callback) { + var stack = Composite.create({ label: 'Stack' }), + x = xx, + y = yy, + lastBody, + i = 0; - // find the unique axes, using edge normal gradients - for (var i = 0; i < vertices.length; i++) { - var j = (i + 1) % vertices.length, - normal = Vector.normalise({ - x: vertices[j].y - vertices[i].y, - y: vertices[i].x - vertices[j].x - }), - gradient = (normal.y === 0) ? Infinity : (normal.x / normal.y); + for (var row = 0; row < rows; row++) { + var maxHeight = 0; - // limit precision - gradient = gradient.toFixed(3).toString(); - axes[gradient] = normal; + for (var column = 0; column < columns; column++) { + var body = callback(x, y, column, row, lastBody, i); + + if (body) { + var bodyHeight = body.bounds.max.y - body.bounds.min.y, + bodyWidth = body.bounds.max.x - body.bounds.min.x; + + if (bodyHeight > maxHeight) + maxHeight = bodyHeight; + + Body.translate(body, { x: bodyWidth * 0.5, y: bodyHeight * 0.5 }); + + x = body.bounds.max.x + columnGap; + + Composite.addBody(stack, body); + + lastBody = body; + i += 1; + } else { + x += columnGap; + } + } + + y += maxHeight + rowGap; + x = xx; } - return Common.values(axes); + return stack; + }; + + /** + * Chains all bodies in the given composite together using constraints. + * @method chain + * @param {composite} composite + * @param {number} xOffsetA + * @param {number} yOffsetA + * @param {number} xOffsetB + * @param {number} yOffsetB + * @param {object} options + * @return {composite} A new composite containing objects chained together with constraints + */ + Composites.chain = function(composite, xOffsetA, yOffsetA, xOffsetB, yOffsetB, options) { + var bodies = composite.bodies; + + for (var i = 1; i < bodies.length; i++) { + var bodyA = bodies[i - 1], + bodyB = bodies[i], + bodyAHeight = bodyA.bounds.max.y - bodyA.bounds.min.y, + bodyAWidth = bodyA.bounds.max.x - bodyA.bounds.min.x, + bodyBHeight = bodyB.bounds.max.y - bodyB.bounds.min.y, + bodyBWidth = bodyB.bounds.max.x - bodyB.bounds.min.x; + + var defaults = { + bodyA: bodyA, + pointA: { x: bodyAWidth * xOffsetA, y: bodyAHeight * yOffsetA }, + bodyB: bodyB, + pointB: { x: bodyBWidth * xOffsetB, y: bodyBHeight * yOffsetB } + }; + + var constraint = Common.extend(defaults, options); + + Composite.addConstraint(composite, Constraint.create(constraint)); + } + + composite.label += ' Chain'; + + return composite; }; /** - * Rotates a set of axes by the given angle. - * @method rotate - * @param {axes} axes - * @param {number} angle + * Connects bodies in the composite with constraints in a grid pattern, with optional cross braces. + * @method mesh + * @param {composite} composite + * @param {number} columns + * @param {number} rows + * @param {boolean} crossBrace + * @param {object} options + * @return {composite} The composite containing objects meshed together with constraints */ - Axes.rotate = function(axes, angle) { - if (angle === 0) - return; + Composites.mesh = function(composite, columns, rows, crossBrace, options) { + var bodies = composite.bodies, + row, + col, + bodyA, + bodyB, + bodyC; - var cos = Math.cos(angle), - sin = Math.sin(angle); + for (row = 0; row < rows; row++) { + for (col = 1; col < columns; col++) { + bodyA = bodies[(col - 1) + (row * columns)]; + bodyB = bodies[col + (row * columns)]; + Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyA, bodyB: bodyB }, options))); + } - for (var i = 0; i < axes.length; i++) { - var axis = axes[i], - xx; - xx = axis.x * cos - axis.y * sin; - axis.y = axis.x * sin + axis.y * cos; - axis.x = xx; + if (row > 0) { + for (col = 0; col < columns; col++) { + bodyA = bodies[col + ((row - 1) * columns)]; + bodyB = bodies[col + (row * columns)]; + Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyA, bodyB: bodyB }, options))); + + if (crossBrace && col > 0) { + bodyC = bodies[(col - 1) + ((row - 1) * columns)]; + Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyC, bodyB: bodyB }, options))); + } + + if (crossBrace && col < columns - 1) { + bodyC = bodies[(col + 1) + ((row - 1) * columns)]; + Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyC, bodyB: bodyB }, options))); + } + } + } } + + composite.label += ' Mesh'; + + return composite; + }; + + /** + * Create a new composite containing bodies created in the callback in a pyramid arrangement. + * This function uses the body's bounds to prevent overlaps. + * @method pyramid + * @param {number} xx + * @param {number} yy + * @param {number} columns + * @param {number} rows + * @param {number} columnGap + * @param {number} rowGap + * @param {function} callback + * @return {composite} A new composite containing objects created in the callback + */ + Composites.pyramid = function(xx, yy, columns, rows, columnGap, rowGap, callback) { + return Composites.stack(xx, yy, columns, rows, columnGap, rowGap, function(x, y, column, row, lastBody, i) { + var actualRows = Math.min(rows, Math.ceil(columns / 2)), + lastBodyWidth = lastBody ? lastBody.bounds.max.x - lastBody.bounds.min.x : 0; + + if (row > actualRows) + return; + + // reverse row order + row = actualRows - row; + + var start = row, + end = columns - 1 - row; + + if (column < start || column > end) + return; + + // retroactively fix the first body's position, since width was unknown + if (i === 1) { + Body.translate(lastBody, { x: (column + (columns % 2 === 1 ? 1 : -1)) * lastBodyWidth, y: 0 }); + } + + var xOffset = lastBody ? column * lastBodyWidth : 0; + + return callback(xx + xOffset + column * columnGap, y, column, row, lastBody, i); + }); + }; + + /** + * Creates a composite with a Newton's Cradle setup of bodies and constraints. + * @method newtonsCradle + * @param {number} xx + * @param {number} yy + * @param {number} number + * @param {number} size + * @param {number} length + * @return {composite} A new composite newtonsCradle body + */ + Composites.newtonsCradle = function(xx, yy, number, size, length) { + var newtonsCradle = Composite.create({ label: 'Newtons Cradle' }); + + for (var i = 0; i < number; i++) { + var separation = 1.9, + circle = Bodies.circle(xx + i * (size * separation), yy + length, size, + { inertia: Infinity, restitution: 1, friction: 0, frictionAir: 0.0001, slop: 1 }), + constraint = Constraint.create({ pointA: { x: xx + i * (size * separation), y: yy }, bodyB: circle }); + + Composite.addBody(newtonsCradle, circle); + Composite.addConstraint(newtonsCradle, constraint); + } + + return newtonsCradle; + }; + + /** + * Creates a composite with simple car setup of bodies and constraints. + * @method car + * @param {number} xx + * @param {number} yy + * @param {number} width + * @param {number} height + * @param {number} wheelSize + * @return {composite} A new composite car body + */ + Composites.car = function(xx, yy, width, height, wheelSize) { + var group = Body.nextGroup(true), + wheelBase = 20, + wheelAOffset = -width * 0.5 + wheelBase, + wheelBOffset = width * 0.5 - wheelBase, + wheelYOffset = 0; + + var car = Composite.create({ label: 'Car' }), + body = Bodies.rectangle(xx, yy, width, height, { + collisionFilter: { + group: group + }, + chamfer: { + radius: height * 0.5 + }, + density: 0.0002 + }); + + var wheelA = Bodies.circle(xx + wheelAOffset, yy + wheelYOffset, wheelSize, { + collisionFilter: { + group: group + }, + friction: 0.8 + }); + + var wheelB = Bodies.circle(xx + wheelBOffset, yy + wheelYOffset, wheelSize, { + collisionFilter: { + group: group + }, + friction: 0.8 + }); + + var axelA = Constraint.create({ + bodyB: body, + pointB: { x: wheelAOffset, y: wheelYOffset }, + bodyA: wheelA, + stiffness: 1, + length: 0 + }); + + var axelB = Constraint.create({ + bodyB: body, + pointB: { x: wheelBOffset, y: wheelYOffset }, + bodyA: wheelB, + stiffness: 1, + length: 0 + }); + + Composite.addBody(car, body); + Composite.addBody(car, wheelA); + Composite.addBody(car, wheelB); + Composite.addConstraint(car, axelA); + Composite.addConstraint(car, axelB); + + return car; + }; + + /** + * Creates a simple soft body like object. + * @method softBody + * @param {number} xx + * @param {number} yy + * @param {number} columns + * @param {number} rows + * @param {number} columnGap + * @param {number} rowGap + * @param {boolean} crossBrace + * @param {number} particleRadius + * @param {} particleOptions + * @param {} constraintOptions + * @return {composite} A new composite softBody + */ + Composites.softBody = function(xx, yy, columns, rows, columnGap, rowGap, crossBrace, particleRadius, particleOptions, constraintOptions) { + particleOptions = Common.extend({ inertia: Infinity }, particleOptions); + constraintOptions = Common.extend({ stiffness: 0.2, render: { type: 'line', anchors: false } }, constraintOptions); + + var softBody = Composites.stack(xx, yy, columns, rows, columnGap, rowGap, function(x, y) { + return Bodies.circle(x, y, particleRadius, particleOptions); + }); + + Composites.mesh(softBody, columns, rows, crossBrace, constraintOptions); + + softBody.label = 'Soft Body'; + + return softBody; }; })(); /***/ }), -/* 1270 */ +/* 1281 */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* The `Matter.Svg` module contains methods for converting SVG images into an array of vector points. +* +* To use this module you also need the SVGPathSeg polyfill: https://github.com/progers/pathseg +* +* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). +* +* @class Svg +*/ + +var Svg = {}; + +module.exports = Svg; + +var Bounds = __webpack_require__(102); +var Common = __webpack_require__(37); + +(function() { + + /** + * Converts an SVG path into an array of vector points. + * If the input path forms a concave shape, you must decompose the result into convex parts before use. + * See `Bodies.fromVertices` which provides support for this. + * Note that this function is not guaranteed to support complex paths (such as those with holes). + * You must load the `pathseg.js` polyfill on newer browsers. + * @method pathToVertices + * @param {SVGPathElement} path + * @param {Number} [sampleLength=15] + * @return {Vector[]} points + */ + Svg.pathToVertices = function(path, sampleLength) { + if (typeof window !== 'undefined' && !('SVGPathSeg' in window)) { + Common.warn('Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.'); + } + + // https://github.com/wout/svg.topoly.js/blob/master/svg.topoly.js + var i, il, total, point, segment, segments, + segmentsQueue, lastSegment, + lastPoint, segmentIndex, points = [], + lx, ly, length = 0, x = 0, y = 0; + + sampleLength = sampleLength || 15; + + var addPoint = function(px, py, pathSegType) { + // all odd-numbered path types are relative except PATHSEG_CLOSEPATH (1) + var isRelative = pathSegType % 2 === 1 && pathSegType > 1; + + // when the last point doesn't equal the current point add the current point + if (!lastPoint || px != lastPoint.x || py != lastPoint.y) { + if (lastPoint && isRelative) { + lx = lastPoint.x; + ly = lastPoint.y; + } else { + lx = 0; + ly = 0; + } + + var point = { + x: lx + px, + y: ly + py + }; + + // set last point + if (isRelative || !lastPoint) { + lastPoint = point; + } + + points.push(point); + + x = lx + px; + y = ly + py; + } + }; + + var addSegmentPoint = function(segment) { + var segType = segment.pathSegTypeAsLetter.toUpperCase(); + + // skip path ends + if (segType === 'Z') + return; + + // map segment to x and y + switch (segType) { + + case 'M': + case 'L': + case 'T': + case 'C': + case 'S': + case 'Q': + x = segment.x; + y = segment.y; + break; + case 'H': + x = segment.x; + break; + case 'V': + y = segment.y; + break; + } + + addPoint(x, y, segment.pathSegType); + }; + + // ensure path is absolute + Svg._svgPathToAbsolute(path); + + // get total length + total = path.getTotalLength(); + + // queue segments + segments = []; + for (i = 0; i < path.pathSegList.numberOfItems; i += 1) + segments.push(path.pathSegList.getItem(i)); + + segmentsQueue = segments.concat(); + + // sample through path + while (length < total) { + // get segment at position + segmentIndex = path.getPathSegAtLength(length); + segment = segments[segmentIndex]; + + // new segment + if (segment != lastSegment) { + while (segmentsQueue.length && segmentsQueue[0] != segment) + addSegmentPoint(segmentsQueue.shift()); + + lastSegment = segment; + } + + // add points in between when curving + // TODO: adaptive sampling + switch (segment.pathSegTypeAsLetter.toUpperCase()) { + + case 'C': + case 'T': + case 'S': + case 'Q': + case 'A': + point = path.getPointAtLength(length); + addPoint(point.x, point.y, 0); + break; + + } + + // increment by sample value + length += sampleLength; + } + + // add remaining segments not passed by sampling + for (i = 0, il = segmentsQueue.length; i < il; ++i) + addSegmentPoint(segmentsQueue[i]); + + return points; + }; + + Svg._svgPathToAbsolute = function(path) { + // http://phrogz.net/convert-svg-path-to-all-absolute-commands + // Copyright (c) Gavin Kistner + // http://phrogz.net/js/_ReuseLicense.txt + // Modifications: tidy formatting and naming + var x0, y0, x1, y1, x2, y2, segs = path.pathSegList, + x = 0, y = 0, len = segs.numberOfItems; + + for (var i = 0; i < len; ++i) { + var seg = segs.getItem(i), + segType = seg.pathSegTypeAsLetter; + + if (/[MLHVCSQTA]/.test(segType)) { + if ('x' in seg) x = seg.x; + if ('y' in seg) y = seg.y; + } else { + if ('x1' in seg) x1 = x + seg.x1; + if ('x2' in seg) x2 = x + seg.x2; + if ('y1' in seg) y1 = y + seg.y1; + if ('y2' in seg) y2 = y + seg.y2; + if ('x' in seg) x += seg.x; + if ('y' in seg) y += seg.y; + + switch (segType) { + + case 'm': + segs.replaceItem(path.createSVGPathSegMovetoAbs(x, y), i); + break; + case 'l': + segs.replaceItem(path.createSVGPathSegLinetoAbs(x, y), i); + break; + case 'h': + segs.replaceItem(path.createSVGPathSegLinetoHorizontalAbs(x), i); + break; + case 'v': + segs.replaceItem(path.createSVGPathSegLinetoVerticalAbs(y), i); + break; + case 'c': + segs.replaceItem(path.createSVGPathSegCurvetoCubicAbs(x, y, x1, y1, x2, y2), i); + break; + case 's': + segs.replaceItem(path.createSVGPathSegCurvetoCubicSmoothAbs(x, y, x2, y2), i); + break; + case 'q': + segs.replaceItem(path.createSVGPathSegCurvetoQuadraticAbs(x, y, x1, y1), i); + break; + case 't': + segs.replaceItem(path.createSVGPathSegCurvetoQuadraticSmoothAbs(x, y), i); + break; + case 'a': + segs.replaceItem(path.createSVGPathSegArcAbs(x, y, seg.r1, seg.r2, seg.angle, seg.largeArcFlag, seg.sweepFlag), i); + break; + case 'z': + case 'Z': + x = x0; + y = y0; + break; + + } + } + + if (segType == 'M' || segType == 'm') { + x0 = x; + y0 = y; + } + } + }; + +})(); + +/***/ }), +/* 1282 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Joachim Grill + * @author Richard Davey + * @copyright 2018 CodeAndWeb GmbH + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Bodies = __webpack_require__(109); +var Body = __webpack_require__(62); +var Common = __webpack_require__(37); +var GetFastValue = __webpack_require__(2); +var Vertices = __webpack_require__(86); + +/** + * Use PhysicsEditorParser.parseBody() to build a Matter body object, based on a physics data file + * created and exported with PhysicsEditor (https://www.codeandweb.com/physicseditor). + * + * @namespace Phaser.Physics.Matter.PhysicsEditorParser + * @since 3.10.0 + */ +var PhysicsEditorParser = { + + /** + * Parses a body element exported by PhysicsEditor. + * + * @function Phaser.Physics.Matter.PhysicsEditorParser.parseBody + * @since 3.10.0 + * + * @param {number} x - The horizontal world location of the body. + * @param {number} y - The vertical world location of the body. + * @param {object} config - The body configuration and fixture (child body) definitions, as exported by PhysicsEditor. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. + * + * @return {MatterJS.BodyType} A compound Matter JS Body. + */ + parseBody: function (x, y, config, options) + { + if (options === undefined) { options = {}; } + + var fixtureConfigs = GetFastValue(config, 'fixtures', []); + var fixtures = []; + + for (var fc = 0; fc < fixtureConfigs.length; fc++) + { + var fixtureParts = this.parseFixture(fixtureConfigs[fc]); + + for (var i = 0; i < fixtureParts.length; i++) + { + fixtures.push(fixtureParts[i]); + } + } + + var matterConfig = Common.clone(config, true); + + Common.extend(matterConfig, options, true); + + delete matterConfig.fixtures; + delete matterConfig.type; + + var body = Body.create(matterConfig); + + Body.setParts(body, fixtures); + + Body.setPosition(body, { x: x, y: y }); + + return body; + }, + + /** + * Parses an element of the "fixtures" list exported by PhysicsEditor + * + * @function Phaser.Physics.Matter.PhysicsEditorParser.parseFixture + * @since 3.10.0 + * + * @param {object} fixtureConfig - The fixture object to parse. + * + * @return {MatterJS.BodyType[]} - An array of Matter JS Bodies. + */ + parseFixture: function (fixtureConfig) + { + var matterConfig = Common.extend({}, false, fixtureConfig); + + delete matterConfig.circle; + delete matterConfig.vertices; + + var fixtures; + + if (fixtureConfig.circle) + { + var x = GetFastValue(fixtureConfig.circle, 'x'); + var y = GetFastValue(fixtureConfig.circle, 'y'); + var r = GetFastValue(fixtureConfig.circle, 'radius'); + fixtures = [ Bodies.circle(x, y, r, matterConfig) ]; + } + else if (fixtureConfig.vertices) + { + fixtures = this.parseVertices(fixtureConfig.vertices, matterConfig); + } + + return fixtures; + }, + + /** + * Parses the "vertices" lists exported by PhysicsEditor. + * + * @function Phaser.Physics.Matter.PhysicsEditorParser.parseVertices + * @since 3.10.0 + * + * @param {array} vertexSets - The vertex lists to parse. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. + * + * @return {MatterJS.BodyType[]} - An array of Matter JS Bodies. + */ + parseVertices: function (vertexSets, options) + { + if (options === undefined) { options = {}; } + + var parts = []; + + for (var v = 0; v < vertexSets.length; v++) + { + Vertices.clockwiseSort(vertexSets[v]); + + parts.push(Body.create(Common.extend({ + position: Vertices.centre(vertexSets[v]), + vertices: vertexSets[v] + }, options))); + } + + // flag coincident part edges + return Bodies.flagCoincidentParts(parts); + } +}; + +module.exports = PhysicsEditorParser; + + +/***/ }), +/* 1283 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Bodies = __webpack_require__(109); +var Body = __webpack_require__(62); + +/** + * Creates a body using the supplied physics data, as provided by a JSON file. + * + * The data file should be loaded as JSON: + * + * ```javascript + * preload () + * { + * this.load.json('ninjas', 'assets/ninjas.json); + * } + * + * create () + * { + * const ninjaShapes = this.cache.json.get('ninjas'); + * + * this.matter.add.fromJSON(400, 300, ninjaShapes.shinobi); + * } + * ``` + * + * Do not pass the entire JSON file to this method, but instead pass one of the shapes contained within it. + * + * If you pas in an `options` object, any settings in there will override those in the config object. + * + * The structure of the JSON file is as follows: + * + * ```text + * { + * 'generator_info': // The name of the application that created the JSON data + * 'shapeName': { + * 'type': // The type of body + * 'label': // Optional body label + * 'vertices': // An array, or an array of arrays, containing the vertex data in x/y object pairs + * } + * } + * ``` + * + * At the time of writing, only the Phaser Physics Tracer App exports in this format. + * + * @namespace Phaser.Physics.Matter.PhysicsJSONParser + * @since 3.22.0 + */ +var PhysicsJSONParser = { + + /** + * Parses a body element from the given JSON data. + * + * @function Phaser.Physics.Matter.PhysicsJSONParser.parseBody + * @since 3.22.0 + * + * @param {number} x - The horizontal world location of the body. + * @param {number} y - The vertical world location of the body. + * @param {object} config - The body configuration data. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. + * + * @return {MatterJS.BodyType} A Matter JS Body. + */ + parseBody: function (x, y, config, options) + { + if (options === undefined) { options = {}; } + + var body; + var vertexSets = config.vertices; + + if (vertexSets.length === 1) + { + // Just a single Body + options.vertices = vertexSets[0]; + + body = Body.create(options); + + Bodies.flagCoincidentParts(body.parts); + } + else + { + var parts = []; + + for (var i = 0; i < vertexSets.length; i++) + { + var part = Body.create({ + vertices: vertexSets[i] + }); + + parts.push(part); + } + + Bodies.flagCoincidentParts(parts); + + options.parts = parts; + + body = Body.create(options); + } + + body.label = config.label; + + Body.setPosition(body, { x: x, y: y }); + + return body; + } + +}; + +module.exports = PhysicsJSONParser; + + +/***/ }), +/* 1284 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -175396,36 +177746,40 @@ var Common = __webpack_require__(37); module.exports = { - AFTER_UPDATE: __webpack_require__(1413), - BEFORE_UPDATE: __webpack_require__(1414), - COLLISION_ACTIVE: __webpack_require__(1415), - COLLISION_END: __webpack_require__(1416), - COLLISION_START: __webpack_require__(1417), - DRAG_END: __webpack_require__(1418), - DRAG: __webpack_require__(1419), - DRAG_START: __webpack_require__(1420), - PAUSE: __webpack_require__(1421), - RESUME: __webpack_require__(1422), - SLEEP_END: __webpack_require__(1423), - SLEEP_START: __webpack_require__(1424) + AFTER_ADD: __webpack_require__(1424), + AFTER_REMOVE: __webpack_require__(1425), + AFTER_UPDATE: __webpack_require__(1426), + BEFORE_ADD: __webpack_require__(1427), + BEFORE_REMOVE: __webpack_require__(1428), + BEFORE_UPDATE: __webpack_require__(1429), + COLLISION_ACTIVE: __webpack_require__(1430), + COLLISION_END: __webpack_require__(1431), + COLLISION_START: __webpack_require__(1432), + DRAG_END: __webpack_require__(1433), + DRAG: __webpack_require__(1434), + DRAG_START: __webpack_require__(1435), + PAUSE: __webpack_require__(1436), + RESUME: __webpack_require__(1437), + SLEEP_END: __webpack_require__(1438), + SLEEP_START: __webpack_require__(1439) }; /***/ }), -/* 1271 */ +/* 1285 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bodies = __webpack_require__(135); +var Bodies = __webpack_require__(109); var Body = __webpack_require__(62); var Class = __webpack_require__(0); -var Components = __webpack_require__(493); +var Components = __webpack_require__(508); var GetFastValue = __webpack_require__(2); var HasValue = __webpack_require__(99); var Vertices = __webpack_require__(86); @@ -175457,7 +177811,7 @@ var Vertices = __webpack_require__(86); * @extends Phaser.Physics.Matter.Components.Sleep * @extends Phaser.Physics.Matter.Components.Static * - * @param {Phaser.Physics.Matter.World} world - [description] + * @param {Phaser.Physics.Matter.World} world - The Matter world instance this body belongs to. * @param {Phaser.Tilemaps.Tile} tile - The target tile that should have a Matter body. * @param {Phaser.Types.Physics.Matter.MatterTileOptions} [options] - Options to be used when creating the Matter body. */ @@ -175661,7 +178015,7 @@ var MatterTileBody = new Class({ * @method Phaser.Physics.Matter.TileBody#setBody * @since 3.0.0 * - * @param {MatterJS.Body} body - The new Matter body to use. + * @param {MatterJS.BodyType} body - The new Matter body to use. * @param {boolean} [addToWorld=true] - Whether or not to add the body to the Matter world. * * @return {Phaser.Physics.Matter.TileBody} This TileBody object. @@ -175726,401 +178080,12 @@ module.exports = MatterTileBody; /***/ }), -/* 1272 */ -/***/ (function(module, exports, __webpack_require__) { - -/** -* The `Matter.Detector` module contains methods for detecting collisions given a set of pairs. -* -* @class Detector -*/ - -// TODO: speculative contacts - -var Detector = {}; - -module.exports = Detector; - -var SAT = __webpack_require__(1273); -var Pair = __webpack_require__(494); -var Bounds = __webpack_require__(102); - -(function() { - - /** - * Finds all collisions given a list of pairs. - * @method collisions - * @param {pair[]} broadphasePairs - * @param {engine} engine - * @return {array} collisions - */ - Detector.collisions = function(broadphasePairs, engine) { - var collisions = [], - pairsTable = engine.pairs.table; - - // @if DEBUG - var metrics = engine.metrics; - // @endif - - for (var i = 0; i < broadphasePairs.length; i++) { - var bodyA = broadphasePairs[i][0], - bodyB = broadphasePairs[i][1]; - - if ((bodyA.isStatic || bodyA.isSleeping) && (bodyB.isStatic || bodyB.isSleeping)) - continue; - - if (!Detector.canCollide(bodyA.collisionFilter, bodyB.collisionFilter)) - continue; - - // @if DEBUG - metrics.midphaseTests += 1; - // @endif - - // mid phase - if (Bounds.overlaps(bodyA.bounds, bodyB.bounds)) { - for (var j = bodyA.parts.length > 1 ? 1 : 0; j < bodyA.parts.length; j++) { - var partA = bodyA.parts[j]; - - for (var k = bodyB.parts.length > 1 ? 1 : 0; k < bodyB.parts.length; k++) { - var partB = bodyB.parts[k]; - - if ((partA === bodyA && partB === bodyB) || Bounds.overlaps(partA.bounds, partB.bounds)) { - // find a previous collision we could reuse - var pairId = Pair.id(partA, partB), - pair = pairsTable[pairId], - previousCollision; - - if (pair && pair.isActive) { - previousCollision = pair.collision; - } else { - previousCollision = null; - } - - // narrow phase - var collision = SAT.collides(partA, partB, previousCollision); - - // @if DEBUG - metrics.narrowphaseTests += 1; - if (collision.reused) - metrics.narrowReuseCount += 1; - // @endif - - if (collision.collided) { - collisions.push(collision); - // @if DEBUG - metrics.narrowDetections += 1; - // @endif - } - } - } - } - } - } - - return collisions; - }; - - /** - * Returns `true` if both supplied collision filters will allow a collision to occur. - * See `body.collisionFilter` for more information. - * @method canCollide - * @param {} filterA - * @param {} filterB - * @return {bool} `true` if collision can occur - */ - Detector.canCollide = function(filterA, filterB) { - if (filterA.group === filterB.group && filterA.group !== 0) - return filterA.group > 0; - - return (filterA.mask & filterB.category) !== 0 && (filterB.mask & filterA.category) !== 0; - }; - -})(); - - -/***/ }), -/* 1273 */ -/***/ (function(module, exports, __webpack_require__) { - -/** -* The `Matter.SAT` module contains methods for detecting collisions using the Separating Axis Theorem. -* -* @class SAT -*/ - -// TODO: true circles and curves - -var SAT = {}; - -module.exports = SAT; - -var Vertices = __webpack_require__(86); -var Vector = __webpack_require__(101); - -(function() { - - /** - * Detect collision between two bodies using the Separating Axis Theorem. - * @method collides - * @param {body} bodyA - * @param {body} bodyB - * @param {collision} previousCollision - * @return {collision} collision - */ - SAT.collides = function(bodyA, bodyB, previousCollision) { - var overlapAB, - overlapBA, - minOverlap, - collision, - canReusePrevCol = false; - - if (previousCollision) { - // estimate total motion - var parentA = bodyA.parent, - parentB = bodyB.parent, - motion = parentA.speed * parentA.speed + parentA.angularSpeed * parentA.angularSpeed - + parentB.speed * parentB.speed + parentB.angularSpeed * parentB.angularSpeed; - - // we may be able to (partially) reuse collision result - // but only safe if collision was resting - canReusePrevCol = previousCollision && previousCollision.collided && motion < 0.2; - - // reuse collision object - collision = previousCollision; - } else { - collision = { collided: false, bodyA: bodyA, bodyB: bodyB }; - } - - if (previousCollision && canReusePrevCol) { - // if we can reuse the collision result - // we only need to test the previously found axis - var axisBodyA = collision.axisBody, - axisBodyB = axisBodyA === bodyA ? bodyB : bodyA, - axes = [axisBodyA.axes[previousCollision.axisNumber]]; - - minOverlap = SAT._overlapAxes(axisBodyA.vertices, axisBodyB.vertices, axes); - collision.reused = true; - - if (minOverlap.overlap <= 0) { - collision.collided = false; - return collision; - } - } else { - // if we can't reuse a result, perform a full SAT test - - overlapAB = SAT._overlapAxes(bodyA.vertices, bodyB.vertices, bodyA.axes); - - if (overlapAB.overlap <= 0) { - collision.collided = false; - return collision; - } - - overlapBA = SAT._overlapAxes(bodyB.vertices, bodyA.vertices, bodyB.axes); - - if (overlapBA.overlap <= 0) { - collision.collided = false; - return collision; - } - - if (overlapAB.overlap < overlapBA.overlap) { - minOverlap = overlapAB; - collision.axisBody = bodyA; - } else { - minOverlap = overlapBA; - collision.axisBody = bodyB; - } - - // important for reuse later - collision.axisNumber = minOverlap.axisNumber; - } - - collision.bodyA = bodyA.id < bodyB.id ? bodyA : bodyB; - collision.bodyB = bodyA.id < bodyB.id ? bodyB : bodyA; - collision.collided = true; - collision.depth = minOverlap.overlap; - collision.parentA = collision.bodyA.parent; - collision.parentB = collision.bodyB.parent; - - bodyA = collision.bodyA; - bodyB = collision.bodyB; - - // ensure normal is facing away from bodyA - if (Vector.dot(minOverlap.axis, Vector.sub(bodyB.position, bodyA.position)) < 0) { - collision.normal = { - x: minOverlap.axis.x, - y: minOverlap.axis.y - }; - } else { - collision.normal = { - x: -minOverlap.axis.x, - y: -minOverlap.axis.y - }; - } - - collision.tangent = Vector.perp(collision.normal); - - collision.penetration = collision.penetration || {}; - collision.penetration.x = collision.normal.x * collision.depth; - collision.penetration.y = collision.normal.y * collision.depth; - - // find support points, there is always either exactly one or two - var verticesB = SAT._findSupports(bodyA, bodyB, collision.normal), - supports = []; - - // find the supports from bodyB that are inside bodyA - if (Vertices.contains(bodyA.vertices, verticesB[0])) - supports.push(verticesB[0]); - - if (Vertices.contains(bodyA.vertices, verticesB[1])) - supports.push(verticesB[1]); - - // find the supports from bodyA that are inside bodyB - if (supports.length < 2) { - var verticesA = SAT._findSupports(bodyB, bodyA, Vector.neg(collision.normal)); - - if (Vertices.contains(bodyB.vertices, verticesA[0])) - supports.push(verticesA[0]); - - if (supports.length < 2 && Vertices.contains(bodyB.vertices, verticesA[1])) - supports.push(verticesA[1]); - } - - // account for the edge case of overlapping but no vertex containment - if (supports.length < 1) - supports = [verticesB[0]]; - - collision.supports = supports; - - return collision; - }; - - /** - * Find the overlap between two sets of vertices. - * @method _overlapAxes - * @private - * @param {} verticesA - * @param {} verticesB - * @param {} axes - * @return result - */ - SAT._overlapAxes = function(verticesA, verticesB, axes) { - var projectionA = Vector._temp[0], - projectionB = Vector._temp[1], - result = { overlap: Number.MAX_VALUE }, - overlap, - axis; - - for (var i = 0; i < axes.length; i++) { - axis = axes[i]; - - SAT._projectToAxis(projectionA, verticesA, axis); - SAT._projectToAxis(projectionB, verticesB, axis); - - overlap = Math.min(projectionA.max - projectionB.min, projectionB.max - projectionA.min); - - if (overlap <= 0) { - result.overlap = overlap; - return result; - } - - if (overlap < result.overlap) { - result.overlap = overlap; - result.axis = axis; - result.axisNumber = i; - } - } - - return result; - }; - - /** - * Projects vertices on an axis and returns an interval. - * @method _projectToAxis - * @private - * @param {} projection - * @param {} vertices - * @param {} axis - */ - SAT._projectToAxis = function(projection, vertices, axis) { - var min = Vector.dot(vertices[0], axis), - max = min; - - for (var i = 1; i < vertices.length; i += 1) { - var dot = Vector.dot(vertices[i], axis); - - if (dot > max) { - max = dot; - } else if (dot < min) { - min = dot; - } - } - - projection.min = min; - projection.max = max; - }; - - /** - * Finds supporting vertices given two bodies along a given direction using hill-climbing. - * @method _findSupports - * @private - * @param {} bodyA - * @param {} bodyB - * @param {} normal - * @return [vector] - */ - SAT._findSupports = function(bodyA, bodyB, normal) { - var nearestDistance = Number.MAX_VALUE, - vertexToBody = Vector._temp[0], - vertices = bodyB.vertices, - bodyAPosition = bodyA.position, - distance, - vertex, - vertexA, - vertexB; - - // find closest vertex on bodyB - for (var i = 0; i < vertices.length; i++) { - vertex = vertices[i]; - vertexToBody.x = vertex.x - bodyAPosition.x; - vertexToBody.y = vertex.y - bodyAPosition.y; - distance = -Vector.dot(normal, vertexToBody); - - if (distance < nearestDistance) { - nearestDistance = distance; - vertexA = vertex; - } - } - - // find next closest vertex using the two connected to it - var prevIndex = vertexA.index - 1 >= 0 ? vertexA.index - 1 : vertices.length - 1; - vertex = vertices[prevIndex]; - vertexToBody.x = vertex.x - bodyAPosition.x; - vertexToBody.y = vertex.y - bodyAPosition.y; - nearestDistance = -Vector.dot(normal, vertexToBody); - vertexB = vertex; - - var nextIndex = (vertexA.index + 1) % vertices.length; - vertex = vertices[nextIndex]; - vertexToBody.x = vertex.x - bodyAPosition.x; - vertexToBody.y = vertex.y - bodyAPosition.y; - distance = -Vector.dot(normal, vertexToBody); - if (distance < nearestDistance) { - vertexB = vertex; - } - - return [vertexA, vertexB]; - }; - -})(); - - -/***/ }), -/* 1274 */ +/* 1286 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -176128,34 +178093,34 @@ var Vector = __webpack_require__(101); * @namespace Phaser.Physics.Matter.Matter */ -var Matter = __webpack_require__(1370); +var Matter = __webpack_require__(1383); Matter.Body = __webpack_require__(62); -Matter.Composite = __webpack_require__(215); -Matter.World = __webpack_require__(1276); +Matter.Composite = __webpack_require__(145); +Matter.World = __webpack_require__(1288); -Matter.Detector = __webpack_require__(1272); -Matter.Grid = __webpack_require__(1371); -Matter.Pairs = __webpack_require__(1372); -Matter.Pair = __webpack_require__(494); -Matter.Query = __webpack_require__(1428); -Matter.Resolver = __webpack_require__(1373); -Matter.SAT = __webpack_require__(1273); +Matter.Detector = __webpack_require__(509); +Matter.Grid = __webpack_require__(1289); +Matter.Pairs = __webpack_require__(1290); +Matter.Pair = __webpack_require__(467); +Matter.Query = __webpack_require__(1384); +Matter.Resolver = __webpack_require__(1291); +Matter.SAT = __webpack_require__(510); -Matter.Constraint = __webpack_require__(236); +Matter.Constraint = __webpack_require__(216); Matter.Common = __webpack_require__(37); -Matter.Engine = __webpack_require__(1374); -Matter.Events = __webpack_require__(235); -Matter.Sleeping = __webpack_require__(453); -Matter.Plugin = __webpack_require__(1275); +Matter.Engine = __webpack_require__(1385); +Matter.Events = __webpack_require__(237); +Matter.Sleeping = __webpack_require__(236); +Matter.Plugin = __webpack_require__(1287); -Matter.Bodies = __webpack_require__(135); -Matter.Composites = __webpack_require__(1366); +Matter.Bodies = __webpack_require__(109); +Matter.Composites = __webpack_require__(1280); -Matter.Axes = __webpack_require__(1269); +Matter.Axes = __webpack_require__(507); Matter.Bounds = __webpack_require__(102); -Matter.Svg = __webpack_require__(1430); +Matter.Svg = __webpack_require__(1281); Matter.Vector = __webpack_require__(101); Matter.Vertices = __webpack_require__(86); @@ -176172,7 +178137,7 @@ module.exports = Matter; /***/ }), -/* 1275 */ +/* 1287 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176522,7 +178487,7 @@ var Common = __webpack_require__(37); /***/ }), -/* 1276 */ +/* 1288 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176542,8 +178507,8 @@ var World = {}; module.exports = World; -var Composite = __webpack_require__(215); -var Constraint = __webpack_require__(236); +var Composite = __webpack_require__(145); +var Constraint = __webpack_require__(216); var Common = __webpack_require__(37); (function() { @@ -176675,12 +178640,860 @@ var Common = __webpack_require__(37); /***/ }), -/* 1277 */ +/* 1289 */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* The `Matter.Grid` module contains methods for creating and manipulating collision broadphase grid structures. +* +* @class Grid +*/ + +var Grid = {}; + +module.exports = Grid; + +var Pair = __webpack_require__(467); +var Detector = __webpack_require__(509); +var Common = __webpack_require__(37); + +(function() { + + /** + * Creates a new grid. + * @method create + * @param {} options + * @return {grid} A new grid + */ + Grid.create = function(options) { + var defaults = { + controller: Grid, + detector: Detector.collisions, + buckets: {}, + pairs: {}, + pairsList: [], + bucketWidth: 48, + bucketHeight: 48 + }; + + return Common.extend(defaults, options); + }; + + /** + * The width of a single grid bucket. + * + * @property bucketWidth + * @type number + * @default 48 + */ + + /** + * The height of a single grid bucket. + * + * @property bucketHeight + * @type number + * @default 48 + */ + + /** + * Updates the grid. + * @method update + * @param {grid} grid + * @param {body[]} bodies + * @param {engine} engine + * @param {boolean} forceUpdate + */ + Grid.update = function(grid, bodies, engine, forceUpdate) { + var i, col, row, + world = engine.world, + buckets = grid.buckets, + bucket, + bucketId, + gridChanged = false; + + // @if DEBUG + var metrics = engine.metrics; + metrics.broadphaseTests = 0; + // @endif + + for (i = 0; i < bodies.length; i++) { + var body = bodies[i]; + + if (body.isSleeping && !forceUpdate) + continue; + + // don't update out of world bodies + if (body.bounds.max.x < world.bounds.min.x || body.bounds.min.x > world.bounds.max.x + || body.bounds.max.y < world.bounds.min.y || body.bounds.min.y > world.bounds.max.y) + continue; + + var newRegion = Grid._getRegion(grid, body); + + // if the body has changed grid region + if (!body.region || newRegion.id !== body.region.id || forceUpdate) { + + // @if DEBUG + metrics.broadphaseTests += 1; + // @endif + + if (!body.region || forceUpdate) + body.region = newRegion; + + var union = Grid._regionUnion(newRegion, body.region); + + // update grid buckets affected by region change + // iterate over the union of both regions + for (col = union.startCol; col <= union.endCol; col++) { + for (row = union.startRow; row <= union.endRow; row++) { + bucketId = Grid._getBucketId(col, row); + bucket = buckets[bucketId]; + + var isInsideNewRegion = (col >= newRegion.startCol && col <= newRegion.endCol + && row >= newRegion.startRow && row <= newRegion.endRow); + + var isInsideOldRegion = (col >= body.region.startCol && col <= body.region.endCol + && row >= body.region.startRow && row <= body.region.endRow); + + // remove from old region buckets + if (!isInsideNewRegion && isInsideOldRegion) { + if (isInsideOldRegion) { + if (bucket) + Grid._bucketRemoveBody(grid, bucket, body); + } + } + + // add to new region buckets + if (body.region === newRegion || (isInsideNewRegion && !isInsideOldRegion) || forceUpdate) { + if (!bucket) + bucket = Grid._createBucket(buckets, bucketId); + Grid._bucketAddBody(grid, bucket, body); + } + } + } + + // set the new region + body.region = newRegion; + + // flag changes so we can update pairs + gridChanged = true; + } + } + + // update pairs list only if pairs changed (i.e. a body changed region) + if (gridChanged) + grid.pairsList = Grid._createActivePairsList(grid); + }; + + /** + * Clears the grid. + * @method clear + * @param {grid} grid + */ + Grid.clear = function(grid) { + grid.buckets = {}; + grid.pairs = {}; + grid.pairsList = []; + }; + + /** + * Finds the union of two regions. + * @method _regionUnion + * @private + * @param {} regionA + * @param {} regionB + * @return {} region + */ + Grid._regionUnion = function(regionA, regionB) { + var startCol = Math.min(regionA.startCol, regionB.startCol), + endCol = Math.max(regionA.endCol, regionB.endCol), + startRow = Math.min(regionA.startRow, regionB.startRow), + endRow = Math.max(regionA.endRow, regionB.endRow); + + return Grid._createRegion(startCol, endCol, startRow, endRow); + }; + + /** + * Gets the region a given body falls in for a given grid. + * @method _getRegion + * @private + * @param {} grid + * @param {} body + * @return {} region + */ + Grid._getRegion = function(grid, body) { + var bounds = body.bounds, + startCol = Math.floor(bounds.min.x / grid.bucketWidth), + endCol = Math.floor(bounds.max.x / grid.bucketWidth), + startRow = Math.floor(bounds.min.y / grid.bucketHeight), + endRow = Math.floor(bounds.max.y / grid.bucketHeight); + + return Grid._createRegion(startCol, endCol, startRow, endRow); + }; + + /** + * Creates a region. + * @method _createRegion + * @private + * @param {} startCol + * @param {} endCol + * @param {} startRow + * @param {} endRow + * @return {} region + */ + Grid._createRegion = function(startCol, endCol, startRow, endRow) { + return { + id: startCol + ',' + endCol + ',' + startRow + ',' + endRow, + startCol: startCol, + endCol: endCol, + startRow: startRow, + endRow: endRow + }; + }; + + /** + * Gets the bucket id at the given position. + * @method _getBucketId + * @private + * @param {} column + * @param {} row + * @return {string} bucket id + */ + Grid._getBucketId = function(column, row) { + return 'C' + column + 'R' + row; + }; + + /** + * Creates a bucket. + * @method _createBucket + * @private + * @param {} buckets + * @param {} bucketId + * @return {} bucket + */ + Grid._createBucket = function(buckets, bucketId) { + var bucket = buckets[bucketId] = []; + return bucket; + }; + + /** + * Adds a body to a bucket. + * @method _bucketAddBody + * @private + * @param {} grid + * @param {} bucket + * @param {} body + */ + Grid._bucketAddBody = function(grid, bucket, body) { + // add new pairs + for (var i = 0; i < bucket.length; i++) { + var bodyB = bucket[i]; + + if (body.id === bodyB.id || (body.isStatic && bodyB.isStatic)) + continue; + + // keep track of the number of buckets the pair exists in + // important for Grid.update to work + var pairId = Pair.id(body, bodyB), + pair = grid.pairs[pairId]; + + if (pair) { + pair[2] += 1; + } else { + grid.pairs[pairId] = [body, bodyB, 1]; + } + } + + // add to bodies (after pairs, otherwise pairs with self) + bucket.push(body); + }; + + /** + * Removes a body from a bucket. + * @method _bucketRemoveBody + * @private + * @param {} grid + * @param {} bucket + * @param {} body + */ + Grid._bucketRemoveBody = function(grid, bucket, body) { + // remove from bucket + bucket.splice(bucket.indexOf(body), 1); + + // update pair counts + for (var i = 0; i < bucket.length; i++) { + // keep track of the number of buckets the pair exists in + // important for _createActivePairsList to work + var bodyB = bucket[i], + pairId = Pair.id(body, bodyB), + pair = grid.pairs[pairId]; + + if (pair) + pair[2] -= 1; + } + }; + + /** + * Generates a list of the active pairs in the grid. + * @method _createActivePairsList + * @private + * @param {} grid + * @return [] pairs + */ + Grid._createActivePairsList = function(grid) { + var pairKeys, + pair, + pairs = []; + + // grid.pairs is used as a hashmap + pairKeys = Common.keys(grid.pairs); + + // iterate over grid.pairs + for (var k = 0; k < pairKeys.length; k++) { + pair = grid.pairs[pairKeys[k]]; + + // if pair exists in at least one bucket + // it is a pair that needs further collision testing so push it + if (pair[2] > 0) { + pairs.push(pair); + } else { + delete grid.pairs[pairKeys[k]]; + } + } + + return pairs; + }; + +})(); + + +/***/ }), +/* 1290 */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* The `Matter.Pairs` module contains methods for creating and manipulating collision pair sets. +* +* @class Pairs +*/ + +var Pairs = {}; + +module.exports = Pairs; + +var Pair = __webpack_require__(467); +var Common = __webpack_require__(37); + +(function() { + + Pairs._pairMaxIdleLife = 1000; + + /** + * Creates a new pairs structure. + * @method create + * @param {object} options + * @return {pairs} A new pairs structure + */ + Pairs.create = function(options) { + return Common.extend({ + table: {}, + list: [], + collisionStart: [], + collisionActive: [], + collisionEnd: [] + }, options); + }; + + /** + * Updates pairs given a list of collisions. + * @method update + * @param {object} pairs + * @param {collision[]} collisions + * @param {number} timestamp + */ + Pairs.update = function(pairs, collisions, timestamp) { + var pairsList = pairs.list, + pairsTable = pairs.table, + collisionStart = pairs.collisionStart, + collisionEnd = pairs.collisionEnd, + collisionActive = pairs.collisionActive, + collision, + pairId, + pair, + i; + + // clear collision state arrays, but maintain old reference + collisionStart.length = 0; + collisionEnd.length = 0; + collisionActive.length = 0; + + for (i = 0; i < pairsList.length; i++) { + pairsList[i].confirmedActive = false; + } + + for (i = 0; i < collisions.length; i++) { + collision = collisions[i]; + + if (collision.collided) { + pairId = Pair.id(collision.bodyA, collision.bodyB); + + pair = pairsTable[pairId]; + + if (pair) { + // pair already exists (but may or may not be active) + if (pair.isActive) { + // pair exists and is active + collisionActive.push(pair); + } else { + // pair exists but was inactive, so a collision has just started again + collisionStart.push(pair); + } + + // update the pair + Pair.update(pair, collision, timestamp); + pair.confirmedActive = true; + } else { + // pair did not exist, create a new pair + pair = Pair.create(collision, timestamp); + pairsTable[pairId] = pair; + + // push the new pair + collisionStart.push(pair); + pairsList.push(pair); + } + } + } + + // deactivate previously active pairs that are now inactive + for (i = 0; i < pairsList.length; i++) { + pair = pairsList[i]; + if (pair.isActive && !pair.confirmedActive) { + Pair.setActive(pair, false, timestamp); + collisionEnd.push(pair); + } + } + }; + + /** + * Finds and removes pairs that have been inactive for a set amount of time. + * @method removeOld + * @param {object} pairs + * @param {number} timestamp + */ + Pairs.removeOld = function(pairs, timestamp) { + var pairsList = pairs.list, + pairsTable = pairs.table, + indexesToRemove = [], + pair, + collision, + pairIndex, + i; + + for (i = 0; i < pairsList.length; i++) { + pair = pairsList[i]; + collision = pair.collision; + + // never remove sleeping pairs + if (collision.bodyA.isSleeping || collision.bodyB.isSleeping) { + pair.timeUpdated = timestamp; + continue; + } + + // if pair is inactive for too long, mark it to be removed + if (timestamp - pair.timeUpdated > Pairs._pairMaxIdleLife) { + indexesToRemove.push(i); + } + } + + // remove marked pairs + for (i = 0; i < indexesToRemove.length; i++) { + pairIndex = indexesToRemove[i] - i; + pair = pairsList[pairIndex]; + delete pairsTable[pair.id]; + pairsList.splice(pairIndex, 1); + } + }; + + /** + * Clears the given pairs structure. + * @method clear + * @param {pairs} pairs + * @return {pairs} pairs + */ + Pairs.clear = function(pairs) { + pairs.table = {}; + pairs.list.length = 0; + pairs.collisionStart.length = 0; + pairs.collisionActive.length = 0; + pairs.collisionEnd.length = 0; + return pairs; + }; + +})(); + + +/***/ }), +/* 1291 */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* The `Matter.Resolver` module contains methods for resolving collision pairs. +* +* @class Resolver +*/ + +var Resolver = {}; + +module.exports = Resolver; + +var Vertices = __webpack_require__(86); +var Vector = __webpack_require__(101); +var Common = __webpack_require__(37); +var Bounds = __webpack_require__(102); + +(function() { + + Resolver._restingThresh = 4; + Resolver._restingThreshTangent = 6; + Resolver._positionDampen = 0.9; + Resolver._positionWarming = 0.8; + Resolver._frictionNormalMultiplier = 5; + + /** + * Prepare pairs for position solving. + * @method preSolvePosition + * @param {pair[]} pairs + */ + Resolver.preSolvePosition = function(pairs) { + var i, + pair, + activeCount; + + // find total contacts on each body + for (i = 0; i < pairs.length; i++) { + pair = pairs[i]; + + if (!pair.isActive) + continue; + + activeCount = pair.activeContacts.length; + pair.collision.parentA.totalContacts += activeCount; + pair.collision.parentB.totalContacts += activeCount; + } + }; + + /** + * Find a solution for pair positions. + * @method solvePosition + * @param {pair[]} pairs + * @param {body[]} bodies + * @param {number} timeScale + */ + Resolver.solvePosition = function(pairs, bodies, timeScale) { + var i, + normalX, + normalY, + pair, + collision, + bodyA, + bodyB, + normal, + separation, + penetration, + positionImpulseA, + positionImpulseB, + contactShare, + bodyBtoAX, + bodyBtoAY, + positionImpulse, + impulseCoefficient = timeScale * Resolver._positionDampen; + + for (i = 0; i < bodies.length; i++) { + var body = bodies[i]; + body.previousPositionImpulse.x = body.positionImpulse.x; + body.previousPositionImpulse.y = body.positionImpulse.y; + } + + // find impulses required to resolve penetration + for (i = 0; i < pairs.length; i++) { + pair = pairs[i]; + + if (!pair.isActive || pair.isSensor) + continue; + + collision = pair.collision; + bodyA = collision.parentA; + bodyB = collision.parentB; + normal = collision.normal; + + positionImpulseA = bodyA.previousPositionImpulse; + positionImpulseB = bodyB.previousPositionImpulse; + + penetration = collision.penetration; + + bodyBtoAX = positionImpulseB.x - positionImpulseA.x + penetration.x; + bodyBtoAY = positionImpulseB.y - positionImpulseA.y + penetration.y; + + normalX = normal.x; + normalY = normal.y; + + separation = normalX * bodyBtoAX + normalY * bodyBtoAY; + pair.separation = separation; + + positionImpulse = (separation - pair.slop) * impulseCoefficient; + + if (bodyA.isStatic || bodyB.isStatic) + positionImpulse *= 2; + + if (!(bodyA.isStatic || bodyA.isSleeping)) { + contactShare = positionImpulse / bodyA.totalContacts; + bodyA.positionImpulse.x += normalX * contactShare; + bodyA.positionImpulse.y += normalY * contactShare; + } + + if (!(bodyB.isStatic || bodyB.isSleeping)) { + contactShare = positionImpulse / bodyB.totalContacts; + bodyB.positionImpulse.x -= normalX * contactShare; + bodyB.positionImpulse.y -= normalY * contactShare; + } + } + }; + + /** + * Apply position resolution. + * @method postSolvePosition + * @param {body[]} bodies + */ + Resolver.postSolvePosition = function(bodies) { + for (var i = 0; i < bodies.length; i++) { + var body = bodies[i]; + + // reset contact count + body.totalContacts = 0; + + if (body.positionImpulse.x !== 0 || body.positionImpulse.y !== 0) { + // update body geometry + for (var j = 0; j < body.parts.length; j++) { + var part = body.parts[j]; + Vertices.translate(part.vertices, body.positionImpulse); + Bounds.update(part.bounds, part.vertices, body.velocity); + part.position.x += body.positionImpulse.x; + part.position.y += body.positionImpulse.y; + } + + // move the body without changing velocity + body.positionPrev.x += body.positionImpulse.x; + body.positionPrev.y += body.positionImpulse.y; + + if (Vector.dot(body.positionImpulse, body.velocity) < 0) { + // reset cached impulse if the body has velocity along it + body.positionImpulse.x = 0; + body.positionImpulse.y = 0; + } else { + // warm the next iteration + body.positionImpulse.x *= Resolver._positionWarming; + body.positionImpulse.y *= Resolver._positionWarming; + } + } + } + }; + + /** + * Prepare pairs for velocity solving. + * @method preSolveVelocity + * @param {pair[]} pairs + */ + Resolver.preSolveVelocity = function(pairs) { + var i, + j, + pair, + contacts, + collision, + bodyA, + bodyB, + normal, + tangent, + contact, + contactVertex, + normalImpulse, + tangentImpulse, + offset, + impulse = Vector._temp[0], + tempA = Vector._temp[1]; + + for (i = 0; i < pairs.length; i++) { + pair = pairs[i]; + + if (!pair.isActive || pair.isSensor) + continue; + + contacts = pair.activeContacts; + collision = pair.collision; + bodyA = collision.parentA; + bodyB = collision.parentB; + normal = collision.normal; + tangent = collision.tangent; + + // resolve each contact + for (j = 0; j < contacts.length; j++) { + contact = contacts[j]; + contactVertex = contact.vertex; + normalImpulse = contact.normalImpulse; + tangentImpulse = contact.tangentImpulse; + + if (normalImpulse !== 0 || tangentImpulse !== 0) { + // total impulse from contact + impulse.x = (normal.x * normalImpulse) + (tangent.x * tangentImpulse); + impulse.y = (normal.y * normalImpulse) + (tangent.y * tangentImpulse); + + // apply impulse from contact + if (!(bodyA.isStatic || bodyA.isSleeping)) { + offset = Vector.sub(contactVertex, bodyA.position, tempA); + bodyA.positionPrev.x += impulse.x * bodyA.inverseMass; + bodyA.positionPrev.y += impulse.y * bodyA.inverseMass; + bodyA.anglePrev += Vector.cross(offset, impulse) * bodyA.inverseInertia; + } + + if (!(bodyB.isStatic || bodyB.isSleeping)) { + offset = Vector.sub(contactVertex, bodyB.position, tempA); + bodyB.positionPrev.x -= impulse.x * bodyB.inverseMass; + bodyB.positionPrev.y -= impulse.y * bodyB.inverseMass; + bodyB.anglePrev -= Vector.cross(offset, impulse) * bodyB.inverseInertia; + } + } + } + } + }; + + /** + * Find a solution for pair velocities. + * @method solveVelocity + * @param {pair[]} pairs + * @param {number} timeScale + */ + Resolver.solveVelocity = function(pairs, timeScale) { + var timeScaleSquared = timeScale * timeScale, + impulse = Vector._temp[0], + tempA = Vector._temp[1], + tempB = Vector._temp[2], + tempC = Vector._temp[3], + tempD = Vector._temp[4], + tempE = Vector._temp[5]; + + for (var i = 0; i < pairs.length; i++) { + var pair = pairs[i]; + + if (!pair.isActive || pair.isSensor) + continue; + + var collision = pair.collision, + bodyA = collision.parentA, + bodyB = collision.parentB, + normal = collision.normal, + tangent = collision.tangent, + contacts = pair.activeContacts, + contactShare = 1 / contacts.length; + + // update body velocities + bodyA.velocity.x = bodyA.position.x - bodyA.positionPrev.x; + bodyA.velocity.y = bodyA.position.y - bodyA.positionPrev.y; + bodyB.velocity.x = bodyB.position.x - bodyB.positionPrev.x; + bodyB.velocity.y = bodyB.position.y - bodyB.positionPrev.y; + bodyA.angularVelocity = bodyA.angle - bodyA.anglePrev; + bodyB.angularVelocity = bodyB.angle - bodyB.anglePrev; + + // resolve each contact + for (var j = 0; j < contacts.length; j++) { + var contact = contacts[j], + contactVertex = contact.vertex, + offsetA = Vector.sub(contactVertex, bodyA.position, tempA), + offsetB = Vector.sub(contactVertex, bodyB.position, tempB), + velocityPointA = Vector.add(bodyA.velocity, Vector.mult(Vector.perp(offsetA), bodyA.angularVelocity), tempC), + velocityPointB = Vector.add(bodyB.velocity, Vector.mult(Vector.perp(offsetB), bodyB.angularVelocity), tempD), + relativeVelocity = Vector.sub(velocityPointA, velocityPointB, tempE), + normalVelocity = Vector.dot(normal, relativeVelocity); + + var tangentVelocity = Vector.dot(tangent, relativeVelocity), + tangentSpeed = Math.abs(tangentVelocity), + tangentVelocityDirection = Common.sign(tangentVelocity); + + // raw impulses + var normalImpulse = (1 + pair.restitution) * normalVelocity, + normalForce = Common.clamp(pair.separation + normalVelocity, 0, 1) * Resolver._frictionNormalMultiplier; + + // coulomb friction + var tangentImpulse = tangentVelocity, + maxFriction = Infinity; + + if (tangentSpeed > pair.friction * pair.frictionStatic * normalForce * timeScaleSquared) { + maxFriction = tangentSpeed; + tangentImpulse = Common.clamp( + pair.friction * tangentVelocityDirection * timeScaleSquared, + -maxFriction, maxFriction + ); + } + + // modify impulses accounting for mass, inertia and offset + var oAcN = Vector.cross(offsetA, normal), + oBcN = Vector.cross(offsetB, normal), + share = contactShare / (bodyA.inverseMass + bodyB.inverseMass + bodyA.inverseInertia * oAcN * oAcN + bodyB.inverseInertia * oBcN * oBcN); + + normalImpulse *= share; + tangentImpulse *= share; + + // handle high velocity and resting collisions separately + if (normalVelocity < 0 && normalVelocity * normalVelocity > Resolver._restingThresh * timeScaleSquared) { + // high normal velocity so clear cached contact normal impulse + contact.normalImpulse = 0; + } else { + // solve resting collision constraints using Erin Catto's method (GDC08) + // impulse constraint tends to 0 + var contactNormalImpulse = contact.normalImpulse; + contact.normalImpulse = Math.min(contact.normalImpulse + normalImpulse, 0); + normalImpulse = contact.normalImpulse - contactNormalImpulse; + } + + // handle high velocity and resting collisions separately + if (tangentVelocity * tangentVelocity > Resolver._restingThreshTangent * timeScaleSquared) { + // high tangent velocity so clear cached contact tangent impulse + contact.tangentImpulse = 0; + } else { + // solve resting collision constraints using Erin Catto's method (GDC08) + // tangent impulse tends to -tangentSpeed or +tangentSpeed + var contactTangentImpulse = contact.tangentImpulse; + contact.tangentImpulse = Common.clamp(contact.tangentImpulse + tangentImpulse, -maxFriction, maxFriction); + tangentImpulse = contact.tangentImpulse - contactTangentImpulse; + } + + // total impulse from contact + impulse.x = (normal.x * normalImpulse) + (tangent.x * tangentImpulse); + impulse.y = (normal.y * normalImpulse) + (tangent.y * tangentImpulse); + + // apply impulse from contact + if (!(bodyA.isStatic || bodyA.isSleeping)) { + bodyA.positionPrev.x += impulse.x * bodyA.inverseMass; + bodyA.positionPrev.y += impulse.y * bodyA.inverseMass; + bodyA.anglePrev += Vector.cross(offsetA, impulse) * bodyA.inverseInertia; + } + + if (!(bodyB.isStatic || bodyB.isSleeping)) { + bodyB.positionPrev.x -= impulse.x * bodyB.inverseMass; + bodyB.positionPrev.y -= impulse.y * bodyB.inverseMass; + bodyB.anglePrev -= Vector.cross(offsetB, impulse) * bodyB.inverseInertia; + } + } + } + }; + +})(); + + +/***/ }), +/* 1292 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -176690,28 +179503,28 @@ var Common = __webpack_require__(37); module.exports = { - BasePlugin: __webpack_require__(454), - DefaultPlugins: __webpack_require__(172), - PluginCache: __webpack_require__(21), - PluginManager: __webpack_require__(350), - ScenePlugin: __webpack_require__(1278) + BasePlugin: __webpack_require__(468), + DefaultPlugins: __webpack_require__(173), + PluginCache: __webpack_require__(23), + PluginManager: __webpack_require__(364), + ScenePlugin: __webpack_require__(1293) }; /***/ }), -/* 1278 */ +/* 1293 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey -* @copyright 2019 Photon Storm Ltd. +* @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ -var BasePlugin = __webpack_require__(454); +var BasePlugin = __webpack_require__(468); var Class = __webpack_require__(0); -var SceneEvents = __webpack_require__(22); +var SceneEvents = __webpack_require__(19); /** * @classdesc @@ -176828,17 +179641,17 @@ module.exports = ScenePlugin; /***/ }), -/* 1279 */ +/* 1294 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Extend = __webpack_require__(17); -var CONST = __webpack_require__(174); +var CONST = __webpack_require__(175); /** * @namespace Phaser.Scale @@ -176866,12 +179679,12 @@ var CONST = __webpack_require__(174); var Scale = { - Center: __webpack_require__(339), + Center: __webpack_require__(353), Events: __webpack_require__(92), - Orientation: __webpack_require__(340), - ScaleManager: __webpack_require__(351), - ScaleModes: __webpack_require__(341), - Zoom: __webpack_require__(342) + Orientation: __webpack_require__(354), + ScaleManager: __webpack_require__(365), + ScaleModes: __webpack_require__(355), + Zoom: __webpack_require__(356) }; @@ -176884,16 +179697,16 @@ module.exports = Scale; /***/ }), -/* 1280 */ +/* 1295 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(121); +var CONST = __webpack_require__(123); var Extend = __webpack_require__(17); /** @@ -176902,11 +179715,11 @@ var Extend = __webpack_require__(17); var Scene = { - Events: __webpack_require__(22), - SceneManager: __webpack_require__(353), - ScenePlugin: __webpack_require__(1281), - Settings: __webpack_require__(355), - Systems: __webpack_require__(177) + Events: __webpack_require__(19), + SceneManager: __webpack_require__(367), + ScenePlugin: __webpack_require__(1296), + Settings: __webpack_require__(369), + Systems: __webpack_require__(178) }; @@ -176917,20 +179730,20 @@ module.exports = Scene; /***/ }), -/* 1281 */ +/* 1296 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(23); +var Clamp = __webpack_require__(22); var Class = __webpack_require__(0); -var Events = __webpack_require__(22); +var Events = __webpack_require__(19); var GetFastValue = __webpack_require__(2); -var PluginCache = __webpack_require__(21); +var PluginCache = __webpack_require__(23); /** * @classdesc @@ -177110,6 +179923,8 @@ var ScenePlugin = new Class({ /** * Shutdown this Scene and run the given one. * + * This will happen at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#start * @since 3.0.0 * @@ -177131,6 +179946,8 @@ var ScenePlugin = new Class({ /** * Restarts this Scene. * + * This will happen at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#restart * @since 3.4.0 * @@ -177366,6 +180183,8 @@ var ScenePlugin = new Class({ /** * Launch the given Scene and run it in parallel with this one. * + * This will happen at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#launch * @since 3.0.0 * @@ -177387,6 +180206,8 @@ var ScenePlugin = new Class({ /** * Runs the given Scene, but does not change the state of this Scene. * + * This will happen at the next Scene Manager update, not immediately. + * * If the given Scene is paused, it will resume it. If sleeping, it will wake it. * If not running at all, it will be started. * @@ -177414,6 +180235,8 @@ var ScenePlugin = new Class({ /** * Pause the Scene - this stops the update step from happening but it still renders. * + * This will happen at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#pause * @since 3.0.0 * @@ -177434,6 +180257,8 @@ var ScenePlugin = new Class({ /** * Resume the Scene - starts the update loop again. * + * This will happen at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#resume * @since 3.0.0 * @@ -177454,6 +180279,8 @@ var ScenePlugin = new Class({ /** * Makes the Scene sleep (no update, no render) but doesn't shutdown. * + * This will happen at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#sleep * @since 3.0.0 * @@ -177474,6 +180301,8 @@ var ScenePlugin = new Class({ /** * Makes the Scene wake-up (starts update and render) * + * This will happen at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#wake * @since 3.0.0 * @@ -177493,11 +180322,8 @@ var ScenePlugin = new Class({ /** * Makes this Scene sleep then starts the Scene given. - * - * No checks are made to see if an instance of the given Scene is already running. - * Because Scenes in Phaser are non-exclusive, you are allowed to run multiple - * instances of them _at the same time_. This means, calling this function - * may launch another instance of the requested Scene if it's already running. + * + * This will happen at the next Scene Manager update, not immediately. * * @method Phaser.Scenes.ScenePlugin#switch * @since 3.0.0 @@ -177519,6 +180345,8 @@ var ScenePlugin = new Class({ /** * Shutdown the Scene, clearing display list, timers, etc. * + * This happens at the next Scene Manager update, not immediately. + * * @method Phaser.Scenes.ScenePlugin#stop * @since 3.0.0 * @@ -177736,7 +180564,7 @@ var ScenePlugin = new Class({ * The Scene is removed from the local scenes array, it's key is cleared from the keys * cache and Scene.Systems.destroy is then called on it. * - * If the SceneManager is processing the Scenes when this method is called it wil + * If the SceneManager is processing the Scenes when this method is called it will * queue the operation for the next update sequence. * * @method Phaser.Scenes.ScenePlugin#remove @@ -177912,12 +180740,12 @@ module.exports = ScenePlugin; /***/ }), -/* 1282 */ +/* 1297 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177927,28 +180755,28 @@ module.exports = ScenePlugin; module.exports = { - List: __webpack_require__(124), - Map: __webpack_require__(157), - ProcessQueue: __webpack_require__(183), - RTree: __webpack_require__(448), - Set: __webpack_require__(107), - Size: __webpack_require__(352) + List: __webpack_require__(126), + Map: __webpack_require__(159), + ProcessQueue: __webpack_require__(184), + RTree: __webpack_require__(462), + Set: __webpack_require__(108), + Size: __webpack_require__(366) }; /***/ }), -/* 1283 */ +/* 1298 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Extend = __webpack_require__(17); -var FilterMode = __webpack_require__(1284); +var FilterMode = __webpack_require__(1299); /** * @namespace Phaser.Textures @@ -177974,14 +180802,14 @@ var FilterMode = __webpack_require__(1284); var Textures = { - CanvasTexture: __webpack_require__(357), - Events: __webpack_require__(117), + CanvasTexture: __webpack_require__(371), + Events: __webpack_require__(119), FilterMode: FilterMode, Frame: __webpack_require__(94), - Parsers: __webpack_require__(359), - Texture: __webpack_require__(179), - TextureManager: __webpack_require__(356), - TextureSource: __webpack_require__(358) + Parsers: __webpack_require__(373), + Texture: __webpack_require__(180), + TextureManager: __webpack_require__(370), + TextureSource: __webpack_require__(372) }; @@ -177991,12 +180819,12 @@ module.exports = Textures; /***/ }), -/* 1284 */ +/* 1299 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -178035,12 +180863,12 @@ module.exports = CONST; /***/ }), -/* 1285 */ +/* 1300 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -178050,35 +180878,35 @@ module.exports = CONST; module.exports = { - Components: __webpack_require__(136), - Parsers: __webpack_require__(1315), + Components: __webpack_require__(137), + Parsers: __webpack_require__(1330), Formats: __webpack_require__(31), - ImageCollection: __webpack_require__(465), - ParseToTilemap: __webpack_require__(223), + ImageCollection: __webpack_require__(479), + ParseToTilemap: __webpack_require__(224), Tile: __webpack_require__(74), - Tilemap: __webpack_require__(474), - TilemapCreator: __webpack_require__(1324), - TilemapFactory: __webpack_require__(1325), - Tileset: __webpack_require__(140), + Tilemap: __webpack_require__(488), + TilemapCreator: __webpack_require__(1339), + TilemapFactory: __webpack_require__(1340), + Tileset: __webpack_require__(141), LayerData: __webpack_require__(104), MapData: __webpack_require__(105), - ObjectLayer: __webpack_require__(468), + ObjectLayer: __webpack_require__(482), - DynamicTilemapLayer: __webpack_require__(475), - StaticTilemapLayer: __webpack_require__(476) + DynamicTilemapLayer: __webpack_require__(489), + StaticTilemapLayer: __webpack_require__(490) }; /***/ }), -/* 1286 */ +/* 1301 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -178138,19 +180966,19 @@ module.exports = Copy; /***/ }), -/* 1287 */ +/* 1302 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileToWorldX = __webpack_require__(138); -var TileToWorldY = __webpack_require__(139); +var TileToWorldX = __webpack_require__(139); +var TileToWorldY = __webpack_require__(140); var GetTilesWithin = __webpack_require__(24); -var ReplaceByIndex = __webpack_require__(455); +var ReplaceByIndex = __webpack_require__(469); /** * Creates a Sprite for every object matching the given tile indexes in the layer. You can @@ -178223,17 +181051,17 @@ module.exports = CreateFromTiles; /***/ }), -/* 1288 */ +/* 1303 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var SnapFloor = __webpack_require__(93); -var SnapCeil = __webpack_require__(311); +var SnapCeil = __webpack_require__(325); /** * Returns the tiles in the given layer that are within the camera's viewport. This is used internally. @@ -178380,12 +181208,12 @@ module.exports = CullTiles; /***/ }), -/* 1289 */ +/* 1304 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -178434,12 +181262,12 @@ module.exports = Fill; /***/ }), -/* 1290 */ +/* 1305 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -178482,12 +181310,12 @@ module.exports = FilterTiles; /***/ }), -/* 1291 */ +/* 1306 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -178570,12 +181398,12 @@ module.exports = FindByIndex; /***/ }), -/* 1292 */ +/* 1307 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -178624,12 +181452,12 @@ module.exports = FindTile; /***/ }), -/* 1293 */ +/* 1308 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -178674,16 +181502,16 @@ module.exports = ForEachTile; /***/ }), -/* 1294 */ +/* 1309 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(137); +var GetTileAt = __webpack_require__(138); var WorldToTileX = __webpack_require__(63); var WorldToTileY = __webpack_require__(64); @@ -178715,21 +181543,21 @@ module.exports = GetTileAtWorldXY; /***/ }), -/* 1295 */ +/* 1310 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Geom = __webpack_require__(408); +var Geom = __webpack_require__(422); var GetTilesWithin = __webpack_require__(24); -var Intersects = __webpack_require__(409); +var Intersects = __webpack_require__(423); var NOOP = __webpack_require__(1); -var TileToWorldX = __webpack_require__(138); -var TileToWorldY = __webpack_require__(139); +var TileToWorldX = __webpack_require__(139); +var TileToWorldY = __webpack_require__(140); var WorldToTileX = __webpack_require__(63); var WorldToTileY = __webpack_require__(64); @@ -178812,12 +181640,12 @@ module.exports = GetTilesWithinShape; /***/ }), -/* 1296 */ +/* 1311 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -178862,16 +181690,16 @@ module.exports = GetTilesWithinWorldXY; /***/ }), -/* 1297 */ +/* 1312 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HasTileAt = __webpack_require__(456); +var HasTileAt = __webpack_require__(470); var WorldToTileX = __webpack_require__(63); var WorldToTileY = __webpack_require__(64); @@ -178902,16 +181730,16 @@ module.exports = HasTileAtWorldXY; /***/ }), -/* 1298 */ +/* 1313 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PutTileAt = __webpack_require__(217); +var PutTileAt = __webpack_require__(218); var WorldToTileX = __webpack_require__(63); var WorldToTileY = __webpack_require__(64); @@ -178945,17 +181773,17 @@ module.exports = PutTileAtWorldXY; /***/ }), -/* 1299 */ +/* 1314 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var CalculateFacesWithin = __webpack_require__(51); -var PutTileAt = __webpack_require__(217); +var PutTileAt = __webpack_require__(218); /** * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified @@ -179009,17 +181837,17 @@ module.exports = PutTilesAt; /***/ }), -/* 1300 */ +/* 1315 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetTilesWithin = __webpack_require__(24); -var GetRandom = __webpack_require__(182); +var GetRandom = __webpack_require__(183); /** * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the @@ -179067,16 +181895,16 @@ module.exports = Randomize; /***/ }), -/* 1301 */ +/* 1316 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RemoveTileAt = __webpack_require__(457); +var RemoveTileAt = __webpack_require__(471); var WorldToTileX = __webpack_require__(63); var WorldToTileY = __webpack_require__(64); @@ -179108,17 +181936,17 @@ module.exports = RemoveTileAtWorldXY; /***/ }), -/* 1302 */ +/* 1317 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetTilesWithin = __webpack_require__(24); -var Color = __webpack_require__(334); +var Color = __webpack_require__(348); var defaultTileColor = new Color(105, 210, 231, 150); var defaultCollidingTileColor = new Color(243, 134, 48, 200); @@ -179197,18 +182025,18 @@ module.exports = RenderDebug; /***/ }), -/* 1303 */ +/* 1318 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var SetTileCollision = __webpack_require__(73); var CalculateFacesWithin = __webpack_require__(51); -var SetLayerCollisionIndex = __webpack_require__(218); +var SetLayerCollisionIndex = __webpack_require__(219); /** * Sets collision on the given tile or tiles within a layer by index. You can pass in either a @@ -179266,18 +182094,18 @@ module.exports = SetCollision; /***/ }), -/* 1304 */ +/* 1319 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var SetTileCollision = __webpack_require__(73); var CalculateFacesWithin = __webpack_require__(51); -var SetLayerCollisionIndex = __webpack_require__(218); +var SetLayerCollisionIndex = __webpack_require__(219); /** * Sets collision on a range of tiles in a layer whose index is between the specified `start` and @@ -179341,18 +182169,18 @@ module.exports = SetCollisionBetween; /***/ }), -/* 1305 */ +/* 1320 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var SetTileCollision = __webpack_require__(73); var CalculateFacesWithin = __webpack_require__(51); -var SetLayerCollisionIndex = __webpack_require__(218); +var SetLayerCollisionIndex = __webpack_require__(219); /** * Sets collision on all tiles in the given layer, except for tiles that have an index specified in @@ -179398,12 +182226,12 @@ module.exports = SetCollisionByExclusion; /***/ }), -/* 1306 */ +/* 1321 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -179473,12 +182301,12 @@ module.exports = SetCollisionByProperty; /***/ }), -/* 1307 */ +/* 1322 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -179533,12 +182361,12 @@ module.exports = SetCollisionFromCollisionGroup; /***/ }), -/* 1308 */ +/* 1323 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -179580,12 +182408,12 @@ module.exports = SetTileIndexCallback; /***/ }), -/* 1309 */ +/* 1324 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -179623,17 +182451,17 @@ module.exports = SetTileLocationCallback; /***/ }), -/* 1310 */ +/* 1325 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetTilesWithin = __webpack_require__(24); -var ShuffleArray = __webpack_require__(112); +var ShuffleArray = __webpack_require__(114); /** * Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given @@ -179668,12 +182496,12 @@ module.exports = Shuffle; /***/ }), -/* 1311 */ +/* 1326 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -179719,17 +182547,17 @@ module.exports = SwapByIndex; /***/ }), -/* 1312 */ +/* 1327 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileToWorldX = __webpack_require__(138); -var TileToWorldY = __webpack_require__(139); +var TileToWorldX = __webpack_require__(139); +var TileToWorldY = __webpack_require__(140); var Vector2 = __webpack_require__(3); /** @@ -179763,12 +182591,12 @@ module.exports = TileToWorldXY; /***/ }), -/* 1313 */ +/* 1328 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -179843,12 +182671,12 @@ module.exports = WeightedRandomize; /***/ }), -/* 1314 */ +/* 1329 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -179888,12 +182716,12 @@ module.exports = WorldToTileXY; /***/ }), -/* 1315 */ +/* 1330 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -179903,23 +182731,23 @@ module.exports = WorldToTileXY; module.exports = { - Parse: __webpack_require__(458), - Parse2DArray: __webpack_require__(219), - ParseCSV: __webpack_require__(459), + Parse: __webpack_require__(472), + Parse2DArray: __webpack_require__(220), + ParseCSV: __webpack_require__(473), - Impact: __webpack_require__(1316), - Tiled: __webpack_require__(1317) + Impact: __webpack_require__(1331), + Tiled: __webpack_require__(1332) }; /***/ }), -/* 1316 */ +/* 1331 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -179929,20 +182757,20 @@ module.exports = { module.exports = { - ParseTileLayers: __webpack_require__(472), - ParseTilesets: __webpack_require__(473), - ParseWeltmeister: __webpack_require__(471) + ParseTileLayers: __webpack_require__(486), + ParseTilesets: __webpack_require__(487), + ParseWeltmeister: __webpack_require__(485) }; /***/ }), -/* 1317 */ +/* 1332 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -179952,27 +182780,27 @@ module.exports = { module.exports = { - AssignTileProperties: __webpack_require__(470), - Base64Decode: __webpack_require__(462), - BuildTilesetIndex: __webpack_require__(469), - ParseGID: __webpack_require__(220), - ParseImageLayers: __webpack_require__(463), - ParseJSONTiled: __webpack_require__(460), - ParseObject: __webpack_require__(222), - ParseObjectLayers: __webpack_require__(467), - ParseTileLayers: __webpack_require__(461), - ParseTilesets: __webpack_require__(464) + AssignTileProperties: __webpack_require__(484), + Base64Decode: __webpack_require__(476), + BuildTilesetIndex: __webpack_require__(483), + ParseGID: __webpack_require__(221), + ParseImageLayers: __webpack_require__(477), + ParseJSONTiled: __webpack_require__(474), + ParseObject: __webpack_require__(223), + ParseObjectLayers: __webpack_require__(481), + ParseTileLayers: __webpack_require__(475), + ParseTilesets: __webpack_require__(478) }; /***/ }), -/* 1318 */ +/* 1333 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -179981,12 +182809,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1319); + renderWebGL = __webpack_require__(1334); } if (true) { - renderCanvas = __webpack_require__(1320); + renderCanvas = __webpack_require__(1335); } module.exports = { @@ -179998,12 +182826,12 @@ module.exports = { /***/ }), -/* 1319 */ +/* 1334 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180039,7 +182867,7 @@ var DynamicTilemapLayerWebGLRenderer = function (renderer, src, interpolationPer var gidMap = src.gidMap; var pipeline = src.pipeline; - var getTint = Utils.getTintAppendFloatAlpha; + var getTint = Utils.getTintAppendFloatAlphaAndSwap; var scrollFactorX = src.scrollFactorX; var scrollFactorY = src.scrollFactorY; @@ -180115,12 +182943,12 @@ module.exports = DynamicTilemapLayerWebGLRenderer; /***/ }), -/* 1320 */ +/* 1335 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180247,12 +183075,12 @@ module.exports = DynamicTilemapLayerCanvasRenderer; /***/ }), -/* 1321 */ +/* 1336 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180261,12 +183089,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1322); + renderWebGL = __webpack_require__(1337); } if (true) { - renderCanvas = __webpack_require__(1323); + renderCanvas = __webpack_require__(1338); } module.exports = { @@ -180278,12 +183106,12 @@ module.exports = { /***/ }), -/* 1322 */ +/* 1337 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180350,12 +183178,12 @@ module.exports = StaticTilemapLayerWebGLRenderer; /***/ }), -/* 1323 */ +/* 1338 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180484,17 +183312,17 @@ module.exports = StaticTilemapLayerCanvasRenderer; /***/ }), -/* 1324 */ +/* 1339 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectCreator = __webpack_require__(16); -var ParseToTilemap = __webpack_require__(223); +var ParseToTilemap = __webpack_require__(224); /** * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. @@ -180528,17 +183356,17 @@ GameObjectCreator.register('tilemap', function (config) /***/ }), -/* 1325 */ +/* 1340 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(5); -var ParseToTilemap = __webpack_require__(223); +var ParseToTilemap = __webpack_require__(224); /** * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. @@ -180594,12 +183422,12 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt /***/ }), -/* 1326 */ +/* 1341 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180609,26 +183437,26 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt module.exports = { - Clock: __webpack_require__(1327), - TimerEvent: __webpack_require__(477) + Clock: __webpack_require__(1342), + TimerEvent: __webpack_require__(491) }; /***/ }), -/* 1327 */ +/* 1342 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var PluginCache = __webpack_require__(21); -var SceneEvents = __webpack_require__(22); -var TimerEvent = __webpack_require__(477); +var PluginCache = __webpack_require__(23); +var SceneEvents = __webpack_require__(19); +var TimerEvent = __webpack_require__(491); /** * @classdesc @@ -181022,12 +183850,12 @@ module.exports = Clock; /***/ }), -/* 1328 */ +/* 1343 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -181040,13 +183868,13 @@ var Extend = __webpack_require__(17); var Tweens = { - Builders: __webpack_require__(1329), - Events: __webpack_require__(228), + Builders: __webpack_require__(1344), + Events: __webpack_require__(229), - TweenManager: __webpack_require__(1344), - Tween: __webpack_require__(227), - TweenData: __webpack_require__(229), - Timeline: __webpack_require__(482) + TweenManager: __webpack_require__(1359), + Tween: __webpack_require__(228), + TweenData: __webpack_require__(230), + Timeline: __webpack_require__(497) }; @@ -181057,12 +183885,12 @@ module.exports = Tweens; /***/ }), -/* 1329 */ +/* 1344 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -181074,25 +183902,26 @@ module.exports = { GetBoolean: __webpack_require__(88), GetEaseFunction: __webpack_require__(82), - GetNewValue: __webpack_require__(141), - GetProps: __webpack_require__(478), - GetTargets: __webpack_require__(224), - GetTweens: __webpack_require__(479), - GetValueOp: __webpack_require__(225), - NumberTweenBuilder: __webpack_require__(480), - TimelineBuilder: __webpack_require__(481), - TweenBuilder: __webpack_require__(142) + GetNewValue: __webpack_require__(142), + GetProps: __webpack_require__(492), + GetTargets: __webpack_require__(225), + GetTweens: __webpack_require__(493), + GetValueOp: __webpack_require__(226), + NumberTweenBuilder: __webpack_require__(494), + StaggerBuilder: __webpack_require__(495), + TimelineBuilder: __webpack_require__(496), + TweenBuilder: __webpack_require__(143) }; /***/ }), -/* 1330 */ +/* 1345 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -181162,12 +183991,12 @@ module.exports = [ /***/ }), -/* 1331 */ +/* 1346 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -181198,12 +184027,12 @@ module.exports = 'complete'; /***/ }), -/* 1332 */ +/* 1347 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -181235,12 +184064,12 @@ module.exports = 'loop'; /***/ }), -/* 1333 */ +/* 1348 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -181272,12 +184101,12 @@ module.exports = 'pause'; /***/ }), -/* 1334 */ +/* 1349 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -181309,12 +184138,12 @@ module.exports = 'resume'; /***/ }), -/* 1335 */ +/* 1350 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -181345,12 +184174,12 @@ module.exports = 'start'; /***/ }), -/* 1336 */ +/* 1351 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -181382,12 +184211,12 @@ module.exports = 'update'; /***/ }), -/* 1337 */ +/* 1352 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -181422,12 +184251,12 @@ module.exports = 'active'; /***/ }), -/* 1338 */ +/* 1353 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -181463,12 +184292,12 @@ module.exports = 'complete'; /***/ }), -/* 1339 */ +/* 1354 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -181507,12 +184336,12 @@ module.exports = 'loop'; /***/ }), -/* 1340 */ +/* 1355 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -181552,12 +184381,12 @@ module.exports = 'repeat'; /***/ }), -/* 1341 */ +/* 1356 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -181592,12 +184421,12 @@ module.exports = 'start'; /***/ }), -/* 1342 */ +/* 1357 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -181628,17 +184457,19 @@ module.exports = 'start'; * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event. * @param {string} key - The property that was updated, i.e. `x` or `scale`. * @param {any} target - The target object that was updated. Usually a Game Object, but can be of any type. + * @param {number} current - The current value of the property that was tweened. + * @param {number} previous - The previous value of the property that was tweened, prior to this update. */ module.exports = 'update'; /***/ }), -/* 1343 */ +/* 1358 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -181679,24 +184510,24 @@ module.exports = 'yoyo'; /***/ }), -/* 1344 */ +/* 1359 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayRemove = __webpack_require__(119); +var ArrayRemove = __webpack_require__(121); var Class = __webpack_require__(0); -var NumberTweenBuilder = __webpack_require__(480); -var PluginCache = __webpack_require__(21); -var SceneEvents = __webpack_require__(22); -var StaggerBuilder = __webpack_require__(1345); -var TimelineBuilder = __webpack_require__(481); +var NumberTweenBuilder = __webpack_require__(494); +var PluginCache = __webpack_require__(23); +var SceneEvents = __webpack_require__(19); +var StaggerBuilder = __webpack_require__(495); +var TimelineBuilder = __webpack_require__(496); var TWEEN_CONST = __webpack_require__(89); -var TweenBuilder = __webpack_require__(142); +var TweenBuilder = __webpack_require__(143); /** * @classdesc @@ -181984,6 +184815,7 @@ var TweenManager = new Class({ * @method Phaser.Tweens.TweenManager#stagger * @since 3.19.0 * + * @param {(number|number[])} value - The amount to stagger by, or an array containing two elements representing the min and max values to stagger between. * @param {Phaser.Types.Tweens.StaggerConfig} config - The configuration object for the Stagger function. * * @return {function} The stagger function. @@ -182450,258 +185282,12 @@ module.exports = TweenManager; /***/ }), -/* 1345 */ +/* 1360 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetEaseFunction = __webpack_require__(82); -var GetValue = __webpack_require__(6); -var MATH_CONST = __webpack_require__(13); - -/** - * Creates a Stagger function to be used by a Tween property. - * - * The stagger function will allow you to stagger changes to the value of the property across all targets of the tween. - * - * This is only worth using if the tween has multiple targets. - * - * The following will stagger the delay by 100ms across all targets of the tween, causing them to scale down to 0.2 - * over the duration specified: - * - * ```javascript - * this.tweens.add({ - * targets: [ ... ], - * scale: 0.2, - * ease: 'linear', - * duration: 1000, - * delay: this.tweens.stagger(100) - * }); - * ``` - * - * The following will stagger the delay by 500ms across all targets of the tween using a 10 x 6 grid, staggering - * from the center out, using a cubic ease. - * - * ```javascript - * this.tweens.add({ - * targets: [ ... ], - * scale: 0.2, - * ease: 'linear', - * duration: 1000, - * delay: this.tweens.stagger(500, { grid: [ 10, 6 ], from: 'center', ease: 'cubic.out' }) - * }); - * ``` - * - * @function Phaser.Tweens.Builders.StaggerBuilder - * @since 3.19.0 - * - * @param {(number|number[])} value - The amount to stagger by, or an array containing two elements representing the min and max values to stagger between. - * @param {Phaser.Types.Tweens.StaggerConfig} [config] - A Stagger Configuration object. - * - * @return {function} The stagger function. - */ -var StaggerBuilder = function (value, options) -{ - if (options === undefined) { options = {}; } - - var result; - - var start = GetValue(options, 'start', 0); - var ease = GetValue(options, 'ease', null); - var grid = GetValue(options, 'grid', null); - - var from = GetValue(options, 'from', 0); - - var fromFirst = (from === 'first'); - var fromCenter = (from === 'center'); - var fromLast = (from === 'last'); - var fromValue = (typeof(from) === 'number'); - - var isRange = (Array.isArray(value)); - var value1 = (isRange) ? parseFloat(value[0]) : parseFloat(value); - var value2 = (isRange) ? parseFloat(value[1]) : 0; - var maxValue = Math.max(value1, value2); - - if (isRange) - { - start += value1; - } - - if (grid) - { - // Pre-calc the grid to save doing it for ever tweendata update - var gridWidth = grid[0]; - var gridHeight = grid[1]; - - var fromX = 0; - var fromY = 0; - - var distanceX = 0; - var distanceY = 0; - - var gridValues = []; - - if (fromLast) - { - fromX = gridWidth - 1; - fromY = gridHeight - 1; - } - else if (fromValue) - { - fromX = from % gridWidth; - fromY = Math.floor(from / gridWidth); - } - else if (fromCenter) - { - fromX = (gridWidth - 1) / 2; - fromY = (gridHeight - 1) / 2; - } - - var gridMax = MATH_CONST.MIN_SAFE_INTEGER; - - for (var toY = 0; toY < gridHeight; toY++) - { - gridValues[toY] = []; - - for (var toX = 0; toX < gridWidth; toX++) - { - distanceX = fromX - toX; - distanceY = fromY - toY; - - var dist = Math.sqrt(distanceX * distanceX + distanceY * distanceY); - - if (dist > gridMax) - { - gridMax = dist; - } - - gridValues[toY][toX] = dist; - } - } - } - - var easeFunction = (ease) ? GetEaseFunction(ease) : null; - - if (grid) - { - result = function (target, key, value, index) - { - var gridSpace = 0; - var toX = index % gridWidth; - var toY = Math.floor(index / gridWidth); - - if (toX >= 0 && toX < gridWidth && toY >= 0 && toY < gridHeight) - { - gridSpace = gridValues[toY][toX]; - } - - var output; - - if (isRange) - { - var diff = (value2 - value1); - - if (easeFunction) - { - output = ((gridSpace / gridMax) * diff) * easeFunction(gridSpace / gridMax); - } - else - { - output = (gridSpace / gridMax) * diff; - } - } - else if (easeFunction) - { - output = (gridSpace * value1) * easeFunction(gridSpace / gridMax); - } - else - { - output = gridSpace * value1; - } - - return output + start; - }; - } - else - { - result = function (target, key, value, index, total) - { - // zero offset - total--; - - var fromIndex; - - if (fromFirst) - { - fromIndex = index; - } - else if (fromCenter) - { - fromIndex = Math.abs((total / 2) - index); - } - else if (fromLast) - { - fromIndex = total - index; - } - else if (fromValue) - { - fromIndex = Math.abs(from - index); - } - - var output; - - if (isRange) - { - var spacing; - - if (fromCenter) - { - spacing = ((value2 - value1) / total) * (fromIndex * 2); - } - else - { - spacing = ((value2 - value1) / total) * fromIndex; - } - - if (easeFunction) - { - output = spacing * easeFunction(fromIndex / total); - } - else - { - output = spacing; - } - } - else if (easeFunction) - { - output = (total * maxValue) * easeFunction(fromIndex / total); - } - else - { - output = fromIndex * value1; - } - - return output + start; - }; - } - - return result; -}; - -module.exports = StaggerBuilder; - - -/***/ }), -/* 1346 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -182711,21 +185297,21 @@ module.exports = StaggerBuilder; module.exports = { - Array: __webpack_require__(180), - Base64: __webpack_require__(1347), - Objects: __webpack_require__(1349), - String: __webpack_require__(1353) + Array: __webpack_require__(181), + Base64: __webpack_require__(1361), + Objects: __webpack_require__(1363), + String: __webpack_require__(1367) }; /***/ }), -/* 1347 */ +/* 1361 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -182735,20 +185321,20 @@ module.exports = { module.exports = { - ArrayBufferToBase64: __webpack_require__(1348), - Base64ToArrayBuffer: __webpack_require__(366) + ArrayBufferToBase64: __webpack_require__(1362), + Base64ToArrayBuffer: __webpack_require__(380) }; /***/ }), -/* 1348 */ +/* 1362 */ /***/ (function(module, exports) { /** * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -182800,12 +185386,12 @@ module.exports = ArrayBufferToBase64; /***/ }), -/* 1349 */ +/* 1363 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -182819,32 +185405,32 @@ module.exports = { Extend: __webpack_require__(17), GetAdvancedValue: __webpack_require__(15), GetFastValue: __webpack_require__(2), - GetMinMaxValue: __webpack_require__(1350), + GetMinMaxValue: __webpack_require__(1364), GetValue: __webpack_require__(6), - HasAll: __webpack_require__(1351), - HasAny: __webpack_require__(385), + HasAll: __webpack_require__(1365), + HasAny: __webpack_require__(399), HasValue: __webpack_require__(99), IsPlainObject: __webpack_require__(7), - Merge: __webpack_require__(106), - MergeRight: __webpack_require__(1352), - Pick: __webpack_require__(466), - SetValue: __webpack_require__(405) + Merge: __webpack_require__(107), + MergeRight: __webpack_require__(1366), + Pick: __webpack_require__(480), + SetValue: __webpack_require__(419) }; /***/ }), -/* 1350 */ +/* 1364 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetValue = __webpack_require__(6); -var Clamp = __webpack_require__(23); +var Clamp = __webpack_require__(22); /** * Retrieves and clamps a numerical value from an object. @@ -182873,12 +185459,12 @@ module.exports = GetMinMaxValue; /***/ }), -/* 1351 */ +/* 1365 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -182910,12 +185496,12 @@ module.exports = HasAll; /***/ }), -/* 1352 */ +/* 1366 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -182953,12 +185539,12 @@ module.exports = MergeRight; /***/ }), -/* 1353 */ +/* 1367 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -182968,22 +185554,22 @@ module.exports = MergeRight; module.exports = { - Format: __webpack_require__(1354), - Pad: __webpack_require__(158), - Reverse: __webpack_require__(1355), - UppercaseFirst: __webpack_require__(178), - UUID: __webpack_require__(193) + Format: __webpack_require__(1368), + Pad: __webpack_require__(160), + Reverse: __webpack_require__(1369), + UppercaseFirst: __webpack_require__(179), + UUID: __webpack_require__(194) }; /***/ }), -/* 1354 */ +/* 1368 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -183013,12 +185599,12 @@ module.exports = Format; /***/ }), -/* 1355 */ +/* 1369 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -183042,13 +185628,13 @@ module.exports = Reverse; /***/ }), -/* 1356 */ +/* 1370 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -183058,40 +185644,40 @@ module.exports = Reverse; module.exports = { - SoundManagerCreator: __webpack_require__(360), + SoundManagerCreator: __webpack_require__(374), Events: __webpack_require__(59), - BaseSound: __webpack_require__(123), - BaseSoundManager: __webpack_require__(122), + BaseSound: __webpack_require__(125), + BaseSoundManager: __webpack_require__(124), - WebAudioSound: __webpack_require__(367), - WebAudioSoundManager: __webpack_require__(365), + WebAudioSound: __webpack_require__(381), + WebAudioSoundManager: __webpack_require__(379), - HTML5AudioSound: __webpack_require__(362), - HTML5AudioSoundManager: __webpack_require__(361), + HTML5AudioSound: __webpack_require__(376), + HTML5AudioSoundManager: __webpack_require__(375), - NoAudioSound: __webpack_require__(364), - NoAudioSoundManager: __webpack_require__(363) + NoAudioSound: __webpack_require__(378), + NoAudioSoundManager: __webpack_require__(377) }; /***/ }), -/* 1357 */ +/* 1371 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var COLLIDES = __webpack_require__(451); -var GetVelocity = __webpack_require__(1379); -var TYPE = __webpack_require__(452); -var UpdateMotion = __webpack_require__(1380); +var COLLIDES = __webpack_require__(465); +var GetVelocity = __webpack_require__(1390); +var TYPE = __webpack_require__(466); +var UpdateMotion = __webpack_require__(1391); /** * @callback Phaser.Types.Physics.Impact.BodyUpdateCallback @@ -183679,17 +186265,17 @@ module.exports = Body; /***/ }), -/* 1358 */ +/* 1372 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var DefaultDefs = __webpack_require__(1384); +var DefaultDefs = __webpack_require__(1395); /** * @classdesc @@ -184043,19 +186629,19 @@ module.exports = CollisionMap; /***/ }), -/* 1359 */ +/* 1373 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var ImpactBody = __webpack_require__(1360); -var ImpactImage = __webpack_require__(1361); -var ImpactSprite = __webpack_require__(1362); +var ImpactBody = __webpack_require__(1374); +var ImpactImage = __webpack_require__(1375); +var ImpactSprite = __webpack_require__(1376); /** * @classdesc @@ -184200,17 +186786,17 @@ module.exports = Factory; /***/ }), -/* 1360 */ +/* 1374 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Components = __webpack_require__(1268); +var Components = __webpack_require__(1279); /** * @classdesc @@ -184333,17 +186919,17 @@ module.exports = ImpactBody; /***/ }), -/* 1361 */ +/* 1375 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Components = __webpack_require__(1268); +var Components = __webpack_require__(1279); var Image = __webpack_require__(98); /** @@ -184491,17 +187077,17 @@ module.exports = ImpactImage; /***/ }), -/* 1362 */ +/* 1376 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Components = __webpack_require__(1268); +var Components = __webpack_require__(1279); var Sprite = __webpack_require__(69); /** @@ -184652,27 +187238,27 @@ module.exports = ImpactSprite; /***/ }), -/* 1363 */ +/* 1377 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Body = __webpack_require__(1357); +var Body = __webpack_require__(1371); var Class = __webpack_require__(0); -var COLLIDES = __webpack_require__(451); -var CollisionMap = __webpack_require__(1358); +var COLLIDES = __webpack_require__(465); +var CollisionMap = __webpack_require__(1372); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(1267); +var Events = __webpack_require__(1278); var GetFastValue = __webpack_require__(2); var HasValue = __webpack_require__(99); -var Set = __webpack_require__(107); -var Solver = __webpack_require__(1398); +var Set = __webpack_require__(108); +var Solver = __webpack_require__(1409); var TILEMAP_FORMATS = __webpack_require__(31); -var TYPE = __webpack_require__(452); +var TYPE = __webpack_require__(466); /** * @classdesc @@ -185637,30 +188223,449 @@ module.exports = World; /***/ }), -/* 1364 */ +/* 1378 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bodies = __webpack_require__(135); -var Body = __webpack_require__(62); var Class = __webpack_require__(0); -var Composites = __webpack_require__(1366); -var Constraint = __webpack_require__(236); -var MatterGameObject = __webpack_require__(1402); -var MatterImage = __webpack_require__(1368); -var MatterSprite = __webpack_require__(1369); -var MatterTileBody = __webpack_require__(1271); -var PointerConstraint = __webpack_require__(1427); +var Vector2 = __webpack_require__(3); + +/** + * @classdesc + * + * The Body Bounds class contains methods to help you extract the world coordinates from various points around + * the bounds of a Matter Body. Because Matter bodies are positioned based on their center of mass, and not a + * dimension based center, you often need to get the bounds coordinates in order to properly align them in the world. + * + * You can access this class via the MatterPhysics class from a Scene, i.e.: + * + * ```javascript + * this.matter.bodyBounds.getTopLeft(body); + * ``` + * + * See also the `MatterPhysics.alignBody` method. + * + * @class BodyBounds + * @memberof Phaser.Physics.Matter + * @constructor + * @since 3.22.0 + */ +var BodyBounds = new Class({ + + initialize: + + function BodyBounds () + { + /** + * A Vector2 that stores the temporary bounds center value during calculations by methods in this class. + * + * @name Phaser.Physics.Matter.BodyBounds#boundsCenter + * @type {Phaser.Math.Vector2} + * @since 3.22.0 + */ + this.boundsCenter = new Vector2(); + + /** + * A Vector2 that stores the temporary center diff values during calculations by methods in this class. + * + * @name Phaser.Physics.Matter.BodyBounds#centerDiff + * @type {Phaser.Math.Vector2} + * @since 3.22.0 + */ + this.centerDiff = new Vector2(); + }, + + /** + * Parses the given body to get the bounds diff values from it. + * + * They're stored in this class in the temporary properties `boundsCenter` and `centerDiff`. + * + * This method is called automatically by all other methods in this class. + * + * @method Phaser.Physics.Matter.BodyBounds#parseBody + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to get the bounds position from. + * + * @return {boolean} `true` if it was able to get the bounds, otherwise `false`. + */ + parseBody: function (body) + { + body = (body.hasOwnProperty('body')) ? body.body : body; + + if (!body.hasOwnProperty('bounds') || !body.hasOwnProperty('centerOfMass')) + { + return false; + } + + var boundsCenter = this.boundsCenter; + var centerDiff = this.centerDiff; + + var boundsWidth = body.bounds.max.x - body.bounds.min.x; + var boundsHeight = body.bounds.max.y - body.bounds.min.y; + + var bodyCenterX = boundsWidth * body.centerOfMass.x; + var bodyCenterY = boundsHeight * body.centerOfMass.y; + + boundsCenter.set(boundsWidth / 2, boundsHeight / 2); + centerDiff.set(bodyCenterX - boundsCenter.x, bodyCenterY - boundsCenter.y); + + return true; + }, + + /** + * Takes a Body and returns the world coordinates of the top-left of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * + * @method Phaser.Physics.Matter.BodyBounds#getTopLeft + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to get the position from. + * @param {number} [x=0] - Optional horizontal offset to add to the returned coordinates. + * @param {number} [y=0] - Optional vertical offset to add to the returned coordinates. + * + * @return {(Phaser.Math.Vector2|false)} A Vector2 containing the coordinates, or `false` if it was unable to parse the body. + */ + getTopLeft: function (body, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + if (this.parseBody(body)) + { + var center = this.boundsCenter; + var diff = this.centerDiff; + + return new Vector2( + x + center.x + diff.x, + y + center.y + diff.y + ); + } + + return false; + }, + + /** + * Takes a Body and returns the world coordinates of the top-center of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * + * @method Phaser.Physics.Matter.BodyBounds#getTopCenter + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to get the position from. + * @param {number} [x=0] - Optional horizontal offset to add to the returned coordinates. + * @param {number} [y=0] - Optional vertical offset to add to the returned coordinates. + * + * @return {(Phaser.Math.Vector2|false)} A Vector2 containing the coordinates, or `false` if it was unable to parse the body. + */ + getTopCenter: function (body, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + if (this.parseBody(body)) + { + var center = this.boundsCenter; + var diff = this.centerDiff; + + return new Vector2( + x + diff.x, + y + center.y + diff.y + ); + } + + return false; + }, + + /** + * Takes a Body and returns the world coordinates of the top-right of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * + * @method Phaser.Physics.Matter.BodyBounds#getTopRight + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to get the position from. + * @param {number} [x=0] - Optional horizontal offset to add to the returned coordinates. + * @param {number} [y=0] - Optional vertical offset to add to the returned coordinates. + * + * @return {(Phaser.Math.Vector2|false)} A Vector2 containing the coordinates, or `false` if it was unable to parse the body. + */ + getTopRight: function (body, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + if (this.parseBody(body)) + { + var center = this.boundsCenter; + var diff = this.centerDiff; + + return new Vector2( + x - (center.x - diff.x), + y + center.y + diff.y + ); + } + + return false; + }, + + /** + * Takes a Body and returns the world coordinates of the left-center of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * + * @method Phaser.Physics.Matter.BodyBounds#getLeftCenter + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to get the position from. + * @param {number} [x=0] - Optional horizontal offset to add to the returned coordinates. + * @param {number} [y=0] - Optional vertical offset to add to the returned coordinates. + * + * @return {(Phaser.Math.Vector2|false)} A Vector2 containing the coordinates, or `false` if it was unable to parse the body. + */ + getLeftCenter: function (body, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + if (this.parseBody(body)) + { + var center = this.boundsCenter; + var diff = this.centerDiff; + + return new Vector2( + x + center.x + diff.x, + y + diff.y + ); + } + + return false; + }, + + /** + * Takes a Body and returns the world coordinates of the center of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * + * @method Phaser.Physics.Matter.BodyBounds#getCenter + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to get the position from. + * @param {number} [x=0] - Optional horizontal offset to add to the returned coordinates. + * @param {number} [y=0] - Optional vertical offset to add to the returned coordinates. + * + * @return {(Phaser.Math.Vector2|false)} A Vector2 containing the coordinates, or `false` if it was unable to parse the body. + */ + getCenter: function (body, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + if (this.parseBody(body)) + { + var diff = this.centerDiff; + + return new Vector2( + x + diff.x, + y + diff.y + ); + } + + return false; + }, + + /** + * Takes a Body and returns the world coordinates of the right-center of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * + * @method Phaser.Physics.Matter.BodyBounds#getRightCenter + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to get the position from. + * @param {number} [x=0] - Optional horizontal offset to add to the returned coordinates. + * @param {number} [y=0] - Optional vertical offset to add to the returned coordinates. + * + * @return {(Phaser.Math.Vector2|false)} A Vector2 containing the coordinates, or `false` if it was unable to parse the body. + */ + getRightCenter: function (body, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + if (this.parseBody(body)) + { + var center = this.boundsCenter; + var diff = this.centerDiff; + + return new Vector2( + x - (center.x - diff.x), + y + diff.y + ); + } + + return false; + }, + + /** + * Takes a Body and returns the world coordinates of the bottom-left of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * + * @method Phaser.Physics.Matter.BodyBounds#getBottomLeft + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to get the position from. + * @param {number} [x=0] - Optional horizontal offset to add to the returned coordinates. + * @param {number} [y=0] - Optional vertical offset to add to the returned coordinates. + * + * @return {(Phaser.Math.Vector2|false)} A Vector2 containing the coordinates, or `false` if it was unable to parse the body. + */ + getBottomLeft: function (body, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + if (this.parseBody(body)) + { + var center = this.boundsCenter; + var diff = this.centerDiff; + + return new Vector2( + x + center.x + diff.x, + y - (center.y - diff.y) + ); + } + + return false; + }, + + /** + * Takes a Body and returns the world coordinates of the bottom-center of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * + * @method Phaser.Physics.Matter.BodyBounds#getBottomCenter + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to get the position from. + * @param {number} [x=0] - Optional horizontal offset to add to the returned coordinates. + * @param {number} [y=0] - Optional vertical offset to add to the returned coordinates. + * + * @return {(Phaser.Math.Vector2|false)} A Vector2 containing the coordinates, or `false` if it was unable to parse the body. + */ + getBottomCenter: function (body, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + if (this.parseBody(body)) + { + var center = this.boundsCenter; + var diff = this.centerDiff; + + return new Vector2( + x + diff.x, + y - (center.y - diff.y) + ); + } + + return false; + }, + + /** + * Takes a Body and returns the world coordinates of the bottom-right of its _bounds_. + * + * Body bounds are updated by Matter each step and factor in scale and rotation. + * This will return the world coordinate based on the bodies _current_ position and bounds. + * + * @method Phaser.Physics.Matter.BodyBounds#getBottomRight + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to get the position from. + * @param {number} [x=0] - Optional horizontal offset to add to the returned coordinates. + * @param {number} [y=0] - Optional vertical offset to add to the returned coordinates. + * + * @return {(Phaser.Math.Vector2|false)} A Vector2 containing the coordinates, or `false` if it was unable to parse the body. + */ + getBottomRight: function (body, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + if (this.parseBody(body)) + { + var center = this.boundsCenter; + var diff = this.centerDiff; + + return new Vector2( + x - (center.x - diff.x), + y - (center.y - diff.y) + ); + } + + return false; + } + +}); + +module.exports = BodyBounds; + + +/***/ }), +/* 1379 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Bodies = __webpack_require__(109); +var Class = __webpack_require__(0); +var Composites = __webpack_require__(1280); +var Constraint = __webpack_require__(216); +var Svg = __webpack_require__(1281); +var MatterGameObject = __webpack_require__(1413); +var MatterImage = __webpack_require__(1381); +var MatterSprite = __webpack_require__(1382); +var MatterTileBody = __webpack_require__(1285); +var PhysicsEditorParser = __webpack_require__(1282); +var PhysicsJSONParser = __webpack_require__(1283); +var PointerConstraint = __webpack_require__(1442); var Vertices = __webpack_require__(86); /** * @classdesc - * The Matter Factory can create different types of bodies and them to a physics world. + * The Matter Factory is responsible for quickly creating a variety of different types of + * bodies, constraints and Game Objects and adding them into the physics world. + * + * You access the factory from within a Scene using `add`: + * + * ```javascript + * this.matter.add.rectangle(x, y, width, height); + * ``` + * + * Use of the Factory is optional. All of the objects it creates can also be created + * directly via your own code or constructors. It is provided as a means to keep your + * code concise. * * @class Factory * @memberof Phaser.Physics.Matter @@ -185713,9 +188718,9 @@ var Factory = new Class({ * @param {number} y - The Y coordinate of the center of the Body. * @param {number} width - The width of the Body. * @param {number} height - The height of the Body. - * @param {object} options - An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * - * @return {MatterJS.Body} A Matter JS Body. + * @return {MatterJS.BodyType} A Matter JS Body. */ rectangle: function (x, y, width, height, options) { @@ -185734,12 +188739,12 @@ var Factory = new Class({ * * @param {number} x - The X coordinate of the center of the Body. * @param {number} y - The Y coordinate of the center of the Body. - * @param {number} width - The width of the trapezoid of the Body. - * @param {number} height - The height of the trapezoid of the Body. + * @param {number} width - The width of the trapezoid Body. + * @param {number} height - The height of the trapezoid Body. * @param {number} slope - The slope of the trapezoid. 0 creates a rectangle, while 1 creates a triangle. Positive values make the top side shorter, while negative values make the bottom side shorter. - * @param {object} options - An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * - * @return {MatterJS.Body} A Matter JS Body. + * @return {MatterJS.BodyType} A Matter JS Body. */ trapezoid: function (x, y, width, height, slope, options) { @@ -185759,10 +188764,10 @@ var Factory = new Class({ * @param {number} x - The X coordinate of the center of the Body. * @param {number} y - The Y coordinate of the center of the Body. * @param {number} radius - The radius of the circle. - * @param {object} [options] - An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * @param {number} [maxSides] - The maximum amount of sides to use for the polygon which will approximate this circle. * - * @return {MatterJS.Body} A Matter JS Body. + * @return {MatterJS.BodyType} A Matter JS Body. */ circle: function (x, y, radius, options, maxSides) { @@ -185783,9 +188788,9 @@ var Factory = new Class({ * @param {number} y - The Y coordinate of the center of the Body. * @param {number} sides - The number of sides the polygon will have. * @param {number} radius - The "radius" of the polygon, i.e. the distance from its center to any vertex. This is also the radius of its circumcircle. - * @param {object} options - An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * - * @return {MatterJS.Body} A Matter JS Body. + * @return {MatterJS.BodyType} A Matter JS Body. */ polygon: function (x, y, sides, radius, options) { @@ -185805,13 +188810,13 @@ var Factory = new Class({ * * @param {number} x - The X coordinate of the center of the Body. * @param {number} y - The Y coordinate of the center of the Body. - * @param {(string|array)} vertexSets - [description] - * @param {object} [options] - [description] + * @param {(string|array)} vertexSets - The vertices data. Either a path string or an array of vertices. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * @param {boolean} [flagInternal=false] - Flag internal edges (coincident part edges) * @param {number} [removeCollinear=0.01] - Whether Matter.js will discard collinear edges (to improve performance). * @param {number} [minimumArea=10] - During decomposition discard parts that have an area less than this. * - * @return {MatterJS.Body} A Matter JS Body. + * @return {MatterJS.BodyType} A Matter JS Body. */ fromVertices: function (x, y, vertexSets, options, flagInternal, removeCollinear, minimumArea) { @@ -185827,6 +188832,180 @@ var Factory = new Class({ return body; }, + /** + * Creates a body using data exported from the application PhysicsEditor (https://www.codeandweb.com/physicseditor) + * + * The PhysicsEditor file should be loaded as JSON: + * + * ```javascript + * preload () + * { + * this.load.json('vehicles', 'assets/vehicles.json); + * } + * + * create () + * { + * const vehicleShapes = this.cache.json.get('vehicles'); + * this.matter.add.fromPhysicsEditor(400, 300, vehicleShapes.truck); + * } + * ``` + * + * Do not pass the entire JSON file to this method, but instead pass one of the shapes contained within it. + * + * If you pas in an `options` object, any settings in there will override those in the PhysicsEditor config object. + * + * @method Phaser.Physics.Matter.Factory#fromPhysicsEditor + * @since 3.22.0 + * + * @param {number} x - The horizontal world location of the body. + * @param {number} y - The vertical world location of the body. + * @param {any} config - The JSON data exported from PhysicsEditor. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. + * @param {boolean} [addToWorld=true] - Should the newly created body be immediately added to the World? + * + * @return {MatterJS.BodyType} A Matter JS Body. + */ + fromPhysicsEditor: function (x, y, config, options, addToWorld) + { + if (addToWorld === undefined) { addToWorld = true; } + + var body = PhysicsEditorParser.parseBody(x, y, config, options); + + if (addToWorld && !this.world.has(body)) + { + this.world.add(body); + } + + return body; + }, + + /** + * Creates a body using the path data from an SVG file. + * + * SVG Parsing requires the pathseg polyfill from https://github.com/progers/pathseg + * + * The SVG file should be loaded as XML, as this method requires the ability to extract + * the path data from it. I.e.: + * + * ```javascript + * preload () + * { + * this.load.xml('face', 'assets/face.svg); + * } + * + * create () + * { + * this.matter.add.fromSVG(400, 300, this.cache.xml.get('face')); + * } + * ``` + * + * @method Phaser.Physics.Matter.Factory#fromSVG + * @since 3.22.0 + * + * @param {number} x - The X coordinate of the body. + * @param {number} y - The Y coordinate of the body. + * @param {object} xml - The SVG Path data. + * @param {number} [scale=1] - Scale the vertices by this amount after creation. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. + * @param {boolean} [addToWorld=true] - Should the newly created body be immediately added to the World? + * + * @return {MatterJS.BodyType} A Matter JS Body. + */ + fromSVG: function (x, y, xml, scale, options, addToWorld) + { + if (scale === undefined) { scale = 1; } + if (options === undefined) { options = {}; } + if (addToWorld === undefined) { addToWorld = true; } + + var path = xml.getElementsByTagName('path'); + var vertexSets = []; + + for (var i = 0; i < path.length; i++) + { + var points = Svg.pathToVertices(path[i], 30); + + if (scale !== 1) + { + Vertices.scale(points, scale, scale); + } + + vertexSets.push(points); + } + + var body = Bodies.fromVertices(x, y, vertexSets, options); + + if (addToWorld) + { + this.world.add(body); + } + + return body; + }, + + /** + * Creates a body using the supplied physics data, as provided by a JSON file. + * + * The data file should be loaded as JSON: + * + * ```javascript + * preload () + * { + * this.load.json('ninjas', 'assets/ninjas.json); + * } + * + * create () + * { + * const ninjaShapes = this.cache.json.get('ninjas'); + * + * this.matter.add.fromJSON(400, 300, ninjaShapes.shinobi); + * } + * ``` + * + * Do not pass the entire JSON file to this method, but instead pass one of the shapes contained within it. + * + * If you pas in an `options` object, any settings in there will override those in the config object. + * + * The structure of the JSON file is as follows: + * + * ```text + * { + * 'generator_info': // The name of the application that created the JSON data + * 'shapeName': { + * 'type': // The type of body + * 'label': // Optional body label + * 'vertices': // An array, or an array of arrays, containing the vertex data in x/y object pairs + * } + * } + * ``` + * + * At the time of writing, only the Phaser Physics Tracer App exports in this format. + * + * @method Phaser.Physics.Matter.Factory#fromJSON + * @since 3.22.0 + * + * @param {number} x - The X coordinate of the body. + * @param {number} y - The Y coordinate of the body. + * @param {any} config - The JSON physics data. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. + * @param {boolean} [addToWorld=true] - Should the newly created body be immediately added to the World? + * + * @return {MatterJS.BodyType} A Matter JS Body. + */ + fromJSON: function (x, y, config, options, addToWorld) + { + if (options === undefined) { options = {}; } + if (addToWorld === undefined) { addToWorld = true; } + + var body = PhysicsJSONParser.parseBody(x, y, config, options); + + if (body && addToWorld) + { + this.world.add(body); + } + + return body; + }, + /** * Create a new composite containing Matter Image objects created in a grid arrangement. * This function uses the body bounds to prevent overlaps. @@ -185842,9 +189021,9 @@ var Factory = new Class({ * @param {number} rows - The number of rows in the grid. * @param {number} [columnGap=0] - The distance between each column. * @param {number} [rowGap=0] - The distance between each row. - * @param {object} [options] - [description] + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * - * @return {MatterJS.Composite} A Matter JS Composite Stack. + * @return {MatterJS.CompositeType} A Matter JS Composite Stack. */ imageStack: function (key, frame, x, y, columns, rows, columnGap, rowGap, options) { @@ -185873,6 +189052,7 @@ var Factory = new Class({ /** * Create a new composite containing bodies created in the callback in a grid arrangement. + * * This function uses the body bounds to prevent overlaps. * * @method Phaser.Physics.Matter.Factory#stack @@ -185886,7 +189066,7 @@ var Factory = new Class({ * @param {number} rowGap - The distance between each row. * @param {function} callback - The callback that creates the stack. * - * @return {MatterJS.Composite} A new composite containing objects created in the callback. + * @return {MatterJS.CompositeType} A new composite containing objects created in the callback. */ stack: function (x, y, columns, rows, columnGap, rowGap, callback) { @@ -185912,7 +189092,7 @@ var Factory = new Class({ * @param {number} rowGap - The distance between each row. * @param {function} callback - The callback function to be invoked. * - * @return {MatterJS.Composite} A Matter JS Composite pyramid. + * @return {MatterJS.CompositeType} A Matter JS Composite pyramid. */ pyramid: function (x, y, columns, rows, columnGap, rowGap, callback) { @@ -185929,14 +189109,14 @@ var Factory = new Class({ * @method Phaser.Physics.Matter.Factory#chain * @since 3.0.0 * - * @param {MatterJS.Composite} composite - [description] - * @param {number} xOffsetA - [description] - * @param {number} yOffsetA - [description] - * @param {number} xOffsetB - [description] - * @param {number} yOffsetB - [description] - * @param {object} options - [description] + * @param {MatterJS.CompositeType} composite - The composite in which all bodies will be chained together sequentially. + * @param {number} xOffsetA - The horizontal offset of the BodyA constraint. This is a percentage based on the body size, not a world position. + * @param {number} yOffsetA - The vertical offset of the BodyA constraint. This is a percentage based on the body size, not a world position. + * @param {number} xOffsetB - The horizontal offset of the BodyB constraint. This is a percentage based on the body size, not a world position. + * @param {number} yOffsetB - The vertical offset of the BodyB constraint. This is a percentage based on the body size, not a world position. + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * - * @return {MatterJS.Composite} A new composite containing objects chained together with constraints. + * @return {MatterJS.CompositeType} The original composite that was passed to this method. */ chain: function (composite, xOffsetA, yOffsetA, xOffsetB, yOffsetB, options) { @@ -185949,13 +189129,13 @@ var Factory = new Class({ * @method Phaser.Physics.Matter.Factory#mesh * @since 3.0.0 * - * @param {MatterJS.Composite} composite - [description] - * @param {number} columns - [description] - * @param {number} rows - [description] - * @param {boolean} crossBrace - [description] - * @param {object} options - [description] + * @param {MatterJS.CompositeType} composite - The composite in which all bodies will be chained together. + * @param {number} columns - The number of columns in the mesh. + * @param {number} rows - The number of rows in the mesh. + * @param {boolean} crossBrace - Create cross braces for the mesh as well? + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * - * @return {MatterJS.Composite} The composite containing objects meshed together with constraints. + * @return {MatterJS.CompositeType} The original composite that was passed to this method. */ mesh: function (composite, columns, rows, crossBrace, options) { @@ -185968,13 +189148,13 @@ var Factory = new Class({ * @method Phaser.Physics.Matter.Factory#newtonsCradle * @since 3.0.0 * - * @param {number} x - [description] - * @param {number} y - [description] - * @param {number} number - [description] - * @param {number} size - [description] - * @param {number} length - [description] + * @param {number} x - The horizontal position of the start of the cradle. + * @param {number} y - The vertical position of the start of the cradle. + * @param {number} number - The number of balls in the cradle. + * @param {number} size - The radius of each ball in the cradle. + * @param {number} length - The length of the 'string' the balls hang from. * - * @return {MatterJS.Composite} A new composite newtonsCradle body. + * @return {MatterJS.CompositeType} A Newton's cradle composite. */ newtonsCradle: function (x, y, number, size, length) { @@ -185991,13 +189171,13 @@ var Factory = new Class({ * @method Phaser.Physics.Matter.Factory#car * @since 3.0.0 * - * @param {number} x - [description] - * @param {number} y - [description] - * @param {number} width - [description] - * @param {number} height - [description] - * @param {number} wheelSize - [description] + * @param {number} x - The horizontal position of the car in the world. + * @param {number} y - The vertical position of the car in the world. + * @param {number} width - The width of the car chasis. + * @param {number} height - The height of the car chasis. + * @param {number} wheelSize - The radius of the car wheels. * - * @return {MatterJS.Composite} A new composite car body. + * @return {MatterJS.CompositeType} A new composite car body. */ car: function (x, y, width, height, wheelSize) { @@ -186020,12 +189200,12 @@ var Factory = new Class({ * @param {number} rows - The number of rows in the Composite. * @param {number} columnGap - The distance between each column. * @param {number} rowGap - The distance between each row. - * @param {boolean} crossBrace - [description] + * @param {boolean} crossBrace - `true` to create cross braces between the bodies, or `false` to create just straight braces. * @param {number} particleRadius - The radius of this circlular composite. - * @param {object} particleOptions - [description] - * @param {object} constraintOptions - [description] + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [particleOptions] - An optional Body configuration object that is used to set initial Body properties on creation. + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [constraintOptions] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * - * @return {MatterJS.Composite} A new composite simple soft body. + * @return {MatterJS.CompositeType} A new composite simple soft body. */ softBody: function (x, y, columns, rows, columnGap, rowGap, crossBrace, particleRadius, particleOptions, constraintOptions) { @@ -186037,18 +189217,31 @@ var Factory = new Class({ }, /** - * [description] + * This method is an alias for `Factory.constraint`. + * + * Constraints (or joints) are used for specifying that a fixed distance must be maintained + * between two bodies, or a body and a fixed world-space position. + * + * The stiffness of constraints can be modified to create springs or elastic. + * + * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` + * value (e.g. `0.7` or above). + * + * If the constraint is unstable, try lowering the `stiffness` value and / or increasing + * `constraintIterations` within the Matter Config. + * + * For compound bodies, constraints must be applied to the parent body and not one of its parts. * * @method Phaser.Physics.Matter.Factory#joint * @since 3.0.0 * - * @param {MatterJS.Body} bodyA - The first possible `Body` that this constraint is attached to. - * @param {MatterJS.Body} bodyB - The second possible `Body` that this constraint is attached to. + * @param {MatterJS.BodyType} bodyA - The first possible `Body` that this constraint is attached to. + * @param {MatterJS.BodyType} bodyB - The second possible `Body` that this constraint is attached to. * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. - * @param {object} [options={}] - [description] + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * - * @return {MatterJS.Constraint} A Matter JS Constraint. + * @return {MatterJS.ConstraintType} A Matter JS Constraint. */ joint: function (bodyA, bodyB, length, stiffness, options) { @@ -186056,18 +189249,31 @@ var Factory = new Class({ }, /** - * [description] + * This method is an alias for `Factory.constraint`. + * + * Constraints (or joints) are used for specifying that a fixed distance must be maintained + * between two bodies, or a body and a fixed world-space position. + * + * The stiffness of constraints can be modified to create springs or elastic. + * + * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` + * value (e.g. `0.7` or above). + * + * If the constraint is unstable, try lowering the `stiffness` value and / or increasing + * `constraintIterations` within the Matter Config. + * + * For compound bodies, constraints must be applied to the parent body and not one of its parts. * * @method Phaser.Physics.Matter.Factory#spring * @since 3.0.0 * - * @param {MatterJS.Body} bodyA - The first possible `Body` that this constraint is attached to. - * @param {MatterJS.Body} bodyB - The second possible `Body` that this constraint is attached to. + * @param {MatterJS.BodyType} bodyA - The first possible `Body` that this constraint is attached to. + * @param {MatterJS.BodyType} bodyB - The second possible `Body` that this constraint is attached to. * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. - * @param {object} [options={}] - [description] + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * - * @return {MatterJS.Constraint} A Matter JS Constraint. + * @return {MatterJS.ConstraintType} A Matter JS Constraint. */ spring: function (bodyA, bodyB, length, stiffness, options) { @@ -186075,18 +189281,29 @@ var Factory = new Class({ }, /** - * [description] + * Constraints (or joints) are used for specifying that a fixed distance must be maintained + * between two bodies, or a body and a fixed world-space position. + * + * The stiffness of constraints can be modified to create springs or elastic. + * + * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` + * value (e.g. `0.7` or above). + * + * If the constraint is unstable, try lowering the `stiffness` value and / or increasing + * `constraintIterations` within the Matter Config. + * + * For compound bodies, constraints must be applied to the parent body and not one of its parts. * * @method Phaser.Physics.Matter.Factory#constraint * @since 3.0.0 * - * @param {MatterJS.Body} bodyA - The first possible `Body` that this constraint is attached to. - * @param {MatterJS.Body} bodyB - The second possible `Body` that this constraint is attached to. + * @param {MatterJS.BodyType} bodyA - The first possible `Body` that this constraint is attached to. + * @param {MatterJS.BodyType} bodyB - The second possible `Body` that this constraint is attached to. * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. - * @param {object} [options={}] - [description] + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * - * @return {MatterJS.Constraint} A Matter JS Constraint. + * @return {MatterJS.ConstraintType} A Matter JS Constraint. */ constraint: function (bodyA, bodyB, length, stiffness, options) { @@ -186111,24 +189328,38 @@ var Factory = new Class({ }, /** - * [description] + * Constraints (or joints) are used for specifying that a fixed distance must be maintained + * between two bodies, or a body and a fixed world-space position. + * + * A world constraint has only one body, you should specify a `pointA` position in + * the constraint options parameter to attach the constraint to the world. + * + * The stiffness of constraints can be modified to create springs or elastic. + * + * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` + * value (e.g. `0.7` or above). + * + * If the constraint is unstable, try lowering the `stiffness` value and / or increasing + * `constraintIterations` within the Matter Config. + * + * For compound bodies, constraints must be applied to the parent body and not one of its parts. * * @method Phaser.Physics.Matter.Factory#worldConstraint * @since 3.0.0 * - * @param {MatterJS.Body} bodyB - The second possible `Body` that this constraint is attached to. - * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. + * @param {MatterJS.BodyType} body - The Matter `Body` that this constraint is attached to. + * @param {number} [length] - A number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. - * @param {object} [options={}] - [description] + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * - * @return {MatterJS.Constraint} A Matter JS Constraint. + * @return {MatterJS.ConstraintType} A Matter JS Constraint. */ - worldConstraint: function (bodyB, length, stiffness, options) + worldConstraint: function (body, length, stiffness, options) { if (stiffness === undefined) { stiffness = 1; } if (options === undefined) { options = {}; } - options.bodyB = (bodyB.type === 'body') ? bodyB : bodyB.body; + options.bodyB = (body.type === 'body') ? body : body.body; if (!isNaN(length)) { @@ -186145,14 +189376,23 @@ var Factory = new Class({ }, /** - * [description] + * This method is an alias for `Factory.pointerConstraint`. + * + * A Pointer Constraint is a special type of constraint that allows you to click + * and drag bodies in a Matter World. It monitors the active Pointers in a Scene, + * and when one is pressed down it checks to see if that hit any part of any active + * body in the world. If it did, and the body has input enabled, it will begin to + * drag it until either released, or you stop it via the `stopDrag` method. + * + * You can adjust the stiffness, length and other properties of the constraint via + * the `options` object on creation. * * @method Phaser.Physics.Matter.Factory#mouseSpring * @since 3.0.0 * - * @param {object} options - [description] + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * - * @return {MatterJS.Constraint} A Matter JS Constraint. + * @return {MatterJS.ConstraintType} A Matter JS Constraint. */ mouseSpring: function (options) { @@ -186160,14 +189400,21 @@ var Factory = new Class({ }, /** - * [description] + * A Pointer Constraint is a special type of constraint that allows you to click + * and drag bodies in a Matter World. It monitors the active Pointers in a Scene, + * and when one is pressed down it checks to see if that hit any part of any active + * body in the world. If it did, and the body has input enabled, it will begin to + * drag it until either released, or you stop it via the `stopDrag` method. + * + * You can adjust the stiffness, length and other properties of the constraint via + * the `options` object on creation. * * @method Phaser.Physics.Matter.Factory#pointerConstraint * @since 3.0.0 * - * @param {object} options - [description] + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. * - * @return {MatterJS.Constraint} A Matter JS Constraint. + * @return {MatterJS.ConstraintType} A Matter JS Constraint. */ pointerConstraint: function (options) { @@ -186186,7 +189433,12 @@ var Factory = new Class({ }, /** - * [description] + * Creates a Matter Physics Image Game Object. + * + * An Image is a light-weight Game Object useful for the display of static images in your game, + * such as logos, backgrounds, scenery or other non-animated elements. Images can have input + * events and physics bodies, or be tweened, tinted or scrolled. The main difference between an + * Image and a Sprite is that you cannot animate an Image as they do not have the Animation component. * * @method Phaser.Physics.Matter.Factory#image * @since 3.0.0 @@ -186195,9 +189447,9 @@ var Factory = new Class({ * @param {number} y - The vertical position of this Game Object in the world. * @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value. - * @param {object} [options={}] - [description] + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * - * @return {Phaser.Physics.Matter.Image} [description] + * @return {Phaser.Physics.Matter.Image} The Matter Image Game Object. */ image: function (x, y, key, frame, options) { @@ -186209,25 +189461,40 @@ var Factory = new Class({ }, /** - * [description] + * Creates a wrapper around a Tile that provides access to a corresponding Matter body. A tile can only + * have one Matter body associated with it. You can either pass in an existing Matter body for + * the tile or allow the constructor to create the corresponding body for you. If the Tile has a + * collision group (defined in Tiled), those shapes will be used to create the body. If not, the + * tile's rectangle bounding box will be used. + * + * The corresponding body will be accessible on the Tile itself via Tile.physics.matterBody. + * + * Note: not all Tiled collision shapes are supported. See + * Phaser.Physics.Matter.TileBody#setFromTileCollision for more information. * * @method Phaser.Physics.Matter.Factory#tileBody * @since 3.0.0 * - * @param {Phaser.Tilemaps.Tile} tile - [description] - * @param {object} options - [description] + * @param {Phaser.Tilemaps.Tile} tile - The target tile that should have a Matter body. + * @param {Phaser.Types.Physics.Matter.MatterTileOptions} [options] - Options to be used when creating the Matter body. * - * @return {Phaser.Physics.Matter.TileBody} [description] + * @return {Phaser.Physics.Matter.TileBody} The Matter Tile Body Game Object. */ tileBody: function (tile, options) { - var tileBody = new MatterTileBody(this.world, tile, options); - - return tileBody; + return new MatterTileBody(this.world, tile, options); }, /** - * [description] + * Creates a Matter Physics Sprite Game Object. + * + * A Sprite Game Object is used for the display of both static and animated images in your game. + * Sprites can have input events and physics bodies. They can also be tweened, tinted, scrolled + * and animated. + * + * The main difference between a Sprite and an Image Game Object is that you cannot animate Images. + * As such, Sprites take a fraction longer to process and have a larger API footprint due to the Animation + * Component. If you do not require animation then you can safely use Images to replace Sprites in all cases. * * @method Phaser.Physics.Matter.Factory#sprite * @since 3.0.0 @@ -186236,9 +189503,9 @@ var Factory = new Class({ * @param {number} y - The vertical position of this Game Object in the world. * @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value. - * @param {object} [options={}] - [description] + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * - * @return {Phaser.Physics.Matter.Sprite} [description] + * @return {Phaser.Physics.Matter.Sprite} The Matter Sprite Game Object. */ sprite: function (x, y, key, frame, options) { @@ -186251,78 +189518,26 @@ var Factory = new Class({ }, /** - * [description] + * Takes an existing Game Object and injects all of the Matter Components into it. + * + * This enables you to use component methods such as `setVelocity` or `isSensor` directly from + * this Game Object. + * + * You can also pass in either a Matter Body Configuration object, or a Matter Body instance + * to link with this Game Object. * * @method Phaser.Physics.Matter.Factory#gameObject * @since 3.3.0 * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to inject the Matter Body in to. - * @param {(object|MatterJS.Body)} options - A Matter Body configuration object, or an instance of a Matter Body. + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to inject the Matter Components in to. + * @param {(Phaser.Types.Physics.Matter.MatterBodyConfig|MatterJS.Body)} [options] - A Matter Body configuration object, or an instance of a Matter Body. + * @param {boolean} [addToWorld=true] - Add this Matter Body to the World? * - * @return {Phaser.GameObjects.GameObject} The Game Object that had the Matter Body injected into it. + * @return {Phaser.GameObjects.GameObject} The Game Object that had the Matter Components injected into it. */ - gameObject: function (gameObject, options) + gameObject: function (gameObject, options, addToWorld) { - return MatterGameObject(this.world, gameObject, options); - }, - - /** - * Instantly sets the linear velocity of the given body. Position, angle, force etc. are unchanged. - * - * See also `force`. - * - * @method Phaser.Physics.Matter.Factory#velocity - * @since 3.18.0 - * - * @param {MatterJS.Body} body - The Matter Body to set the velocity on. - * @param {Phaser.Types.Math.Vector2Like} velocity - The velocity to set. An object with public `x` and `y` components. - * - * @return {MatterJS.Body} The Matter body. - */ - velocity: function (body, velocity) - { - Body.setVelocity(body, velocity); - - return body; - }, - - /** - * Instantly sets the angular velocity of the given body. Position, angle, force etc. are unchanged. - * - * See also `force`. - * - * @method Phaser.Physics.Matter.Factory#angularVelocity - * @since 3.18.0 - * - * @param {MatterJS.Body} body - The Matter Body to set the velocity on. - * @param {number} velocity - The angular velocity to set. - * - * @return {MatterJS.Body} The Matter body. - */ - angularVelocity: function (body, velocity) - { - Body.setAngularVelocity(body, velocity); - - return body; - }, - - /** - * Applies a force to a body from a given world-space position, including resulting torque. - * - * @method Phaser.Physics.Matter.Factory#force - * @since 3.18.0 - * - * @param {MatterJS.Body} body - The Matter Body to set the force on. - * @param {Phaser.Types.Math.Vector2Like} position - The world position to apply the force from. An object with public `x` and `y` components. - * @param {Phaser.Types.Math.Vector2Like} force - The force to set. An object with public `x` and `y` components. - * - * @return {MatterJS.Body} The Matter body. - */ - force: function (body, position, force) - { - Body.applyForce(body, position, force); - - return body; + return MatterGameObject(this.world, gameObject, options, addToWorld); }, /** @@ -186344,7 +189559,7 @@ module.exports = Factory; /***/ }), -/* 1365 */ +/* 1380 */ /***/ (function(module, exports) { /** @@ -187014,531 +190229,21 @@ function points_eq(a,b,precision){ /***/ }), -/* 1366 */ -/***/ (function(module, exports, __webpack_require__) { - -/** -* The `Matter.Composites` module contains factory methods for creating composite bodies -* with commonly used configurations (such as stacks and chains). -* -* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). -* -* @class Composites -*/ - -var Composites = {}; - -module.exports = Composites; - -var Composite = __webpack_require__(215); -var Constraint = __webpack_require__(236); -var Common = __webpack_require__(37); -var Body = __webpack_require__(62); -var Bodies = __webpack_require__(135); - -(function() { - - /** - * Create a new composite containing bodies created in the callback in a grid arrangement. - * This function uses the body's bounds to prevent overlaps. - * @method stack - * @param {number} xx - * @param {number} yy - * @param {number} columns - * @param {number} rows - * @param {number} columnGap - * @param {number} rowGap - * @param {function} callback - * @return {composite} A new composite containing objects created in the callback - */ - Composites.stack = function(xx, yy, columns, rows, columnGap, rowGap, callback) { - var stack = Composite.create({ label: 'Stack' }), - x = xx, - y = yy, - lastBody, - i = 0; - - for (var row = 0; row < rows; row++) { - var maxHeight = 0; - - for (var column = 0; column < columns; column++) { - var body = callback(x, y, column, row, lastBody, i); - - if (body) { - var bodyHeight = body.bounds.max.y - body.bounds.min.y, - bodyWidth = body.bounds.max.x - body.bounds.min.x; - - if (bodyHeight > maxHeight) - maxHeight = bodyHeight; - - Body.translate(body, { x: bodyWidth * 0.5, y: bodyHeight * 0.5 }); - - x = body.bounds.max.x + columnGap; - - Composite.addBody(stack, body); - - lastBody = body; - i += 1; - } else { - x += columnGap; - } - } - - y += maxHeight + rowGap; - x = xx; - } - - return stack; - }; - - /** - * Chains all bodies in the given composite together using constraints. - * @method chain - * @param {composite} composite - * @param {number} xOffsetA - * @param {number} yOffsetA - * @param {number} xOffsetB - * @param {number} yOffsetB - * @param {object} options - * @return {composite} A new composite containing objects chained together with constraints - */ - Composites.chain = function(composite, xOffsetA, yOffsetA, xOffsetB, yOffsetB, options) { - var bodies = composite.bodies; - - for (var i = 1; i < bodies.length; i++) { - var bodyA = bodies[i - 1], - bodyB = bodies[i], - bodyAHeight = bodyA.bounds.max.y - bodyA.bounds.min.y, - bodyAWidth = bodyA.bounds.max.x - bodyA.bounds.min.x, - bodyBHeight = bodyB.bounds.max.y - bodyB.bounds.min.y, - bodyBWidth = bodyB.bounds.max.x - bodyB.bounds.min.x; - - var defaults = { - bodyA: bodyA, - pointA: { x: bodyAWidth * xOffsetA, y: bodyAHeight * yOffsetA }, - bodyB: bodyB, - pointB: { x: bodyBWidth * xOffsetB, y: bodyBHeight * yOffsetB } - }; - - var constraint = Common.extend(defaults, options); - - Composite.addConstraint(composite, Constraint.create(constraint)); - } - - composite.label += ' Chain'; - - return composite; - }; - - /** - * Connects bodies in the composite with constraints in a grid pattern, with optional cross braces. - * @method mesh - * @param {composite} composite - * @param {number} columns - * @param {number} rows - * @param {boolean} crossBrace - * @param {object} options - * @return {composite} The composite containing objects meshed together with constraints - */ - Composites.mesh = function(composite, columns, rows, crossBrace, options) { - var bodies = composite.bodies, - row, - col, - bodyA, - bodyB, - bodyC; - - for (row = 0; row < rows; row++) { - for (col = 1; col < columns; col++) { - bodyA = bodies[(col - 1) + (row * columns)]; - bodyB = bodies[col + (row * columns)]; - Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyA, bodyB: bodyB }, options))); - } - - if (row > 0) { - for (col = 0; col < columns; col++) { - bodyA = bodies[col + ((row - 1) * columns)]; - bodyB = bodies[col + (row * columns)]; - Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyA, bodyB: bodyB }, options))); - - if (crossBrace && col > 0) { - bodyC = bodies[(col - 1) + ((row - 1) * columns)]; - Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyC, bodyB: bodyB }, options))); - } - - if (crossBrace && col < columns - 1) { - bodyC = bodies[(col + 1) + ((row - 1) * columns)]; - Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyC, bodyB: bodyB }, options))); - } - } - } - } - - composite.label += ' Mesh'; - - return composite; - }; - - /** - * Create a new composite containing bodies created in the callback in a pyramid arrangement. - * This function uses the body's bounds to prevent overlaps. - * @method pyramid - * @param {number} xx - * @param {number} yy - * @param {number} columns - * @param {number} rows - * @param {number} columnGap - * @param {number} rowGap - * @param {function} callback - * @return {composite} A new composite containing objects created in the callback - */ - Composites.pyramid = function(xx, yy, columns, rows, columnGap, rowGap, callback) { - return Composites.stack(xx, yy, columns, rows, columnGap, rowGap, function(x, y, column, row, lastBody, i) { - var actualRows = Math.min(rows, Math.ceil(columns / 2)), - lastBodyWidth = lastBody ? lastBody.bounds.max.x - lastBody.bounds.min.x : 0; - - if (row > actualRows) - return; - - // reverse row order - row = actualRows - row; - - var start = row, - end = columns - 1 - row; - - if (column < start || column > end) - return; - - // retroactively fix the first body's position, since width was unknown - if (i === 1) { - Body.translate(lastBody, { x: (column + (columns % 2 === 1 ? 1 : -1)) * lastBodyWidth, y: 0 }); - } - - var xOffset = lastBody ? column * lastBodyWidth : 0; - - return callback(xx + xOffset + column * columnGap, y, column, row, lastBody, i); - }); - }; - - /** - * Creates a composite with a Newton's Cradle setup of bodies and constraints. - * @method newtonsCradle - * @param {number} xx - * @param {number} yy - * @param {number} number - * @param {number} size - * @param {number} length - * @return {composite} A new composite newtonsCradle body - */ - Composites.newtonsCradle = function(xx, yy, number, size, length) { - var newtonsCradle = Composite.create({ label: 'Newtons Cradle' }); - - for (var i = 0; i < number; i++) { - var separation = 1.9, - circle = Bodies.circle(xx + i * (size * separation), yy + length, size, - { inertia: Infinity, restitution: 1, friction: 0, frictionAir: 0.0001, slop: 1 }), - constraint = Constraint.create({ pointA: { x: xx + i * (size * separation), y: yy }, bodyB: circle }); - - Composite.addBody(newtonsCradle, circle); - Composite.addConstraint(newtonsCradle, constraint); - } - - return newtonsCradle; - }; - - /** - * Creates a composite with simple car setup of bodies and constraints. - * @method car - * @param {number} xx - * @param {number} yy - * @param {number} width - * @param {number} height - * @param {number} wheelSize - * @return {composite} A new composite car body - */ - Composites.car = function(xx, yy, width, height, wheelSize) { - var group = Body.nextGroup(true), - wheelBase = 20, - wheelAOffset = -width * 0.5 + wheelBase, - wheelBOffset = width * 0.5 - wheelBase, - wheelYOffset = 0; - - var car = Composite.create({ label: 'Car' }), - body = Bodies.rectangle(xx, yy, width, height, { - collisionFilter: { - group: group - }, - chamfer: { - radius: height * 0.5 - }, - density: 0.0002 - }); - - var wheelA = Bodies.circle(xx + wheelAOffset, yy + wheelYOffset, wheelSize, { - collisionFilter: { - group: group - }, - friction: 0.8 - }); - - var wheelB = Bodies.circle(xx + wheelBOffset, yy + wheelYOffset, wheelSize, { - collisionFilter: { - group: group - }, - friction: 0.8 - }); - - var axelA = Constraint.create({ - bodyB: body, - pointB: { x: wheelAOffset, y: wheelYOffset }, - bodyA: wheelA, - stiffness: 1, - length: 0 - }); - - var axelB = Constraint.create({ - bodyB: body, - pointB: { x: wheelBOffset, y: wheelYOffset }, - bodyA: wheelB, - stiffness: 1, - length: 0 - }); - - Composite.addBody(car, body); - Composite.addBody(car, wheelA); - Composite.addBody(car, wheelB); - Composite.addConstraint(car, axelA); - Composite.addConstraint(car, axelB); - - return car; - }; - - /** - * Creates a simple soft body like object. - * @method softBody - * @param {number} xx - * @param {number} yy - * @param {number} columns - * @param {number} rows - * @param {number} columnGap - * @param {number} rowGap - * @param {boolean} crossBrace - * @param {number} particleRadius - * @param {} particleOptions - * @param {} constraintOptions - * @return {composite} A new composite softBody - */ - Composites.softBody = function(xx, yy, columns, rows, columnGap, rowGap, crossBrace, particleRadius, particleOptions, constraintOptions) { - particleOptions = Common.extend({ inertia: Infinity }, particleOptions); - constraintOptions = Common.extend({ stiffness: 0.2, render: { type: 'line', anchors: false } }, constraintOptions); - - var softBody = Composites.stack(xx, yy, columns, rows, columnGap, rowGap, function(x, y) { - return Bodies.circle(x, y, particleRadius, particleOptions); - }); - - Composites.mesh(softBody, columns, rows, crossBrace, constraintOptions); - - softBody.label = 'Soft Body'; - - return softBody; - }; - -})(); - - -/***/ }), -/* 1367 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Joachim Grill - * @copyright 2018 CodeAndWeb GmbH - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Bodies = __webpack_require__(135); -var Body = __webpack_require__(62); -var Bounds = __webpack_require__(102); -var Common = __webpack_require__(37); -var GetFastValue = __webpack_require__(2); -var Vector = __webpack_require__(101); -var Vertices = __webpack_require__(86); - -/** - * Use PhysicsEditorParser.parseBody() to build a Matter body object, based on a physics data file - * created and exported with PhysicsEditor (https://www.codeandweb.com/physicseditor). - * - * @namespace Phaser.Physics.Matter.PhysicsEditorParser - * @since 3.10.0 - */ -var PhysicsEditorParser = { - - /** - * Parses a body element exported by PhysicsEditor. - * - * @function Phaser.Physics.Matter.PhysicsEditorParser.parseBody - * @since 3.10.0 - * - * @param {number} x - x position. - * @param {number} y - y position. - * @param {number} w - width. - * @param {number} h - height. - * @param {object} config - body configuration and fixture (child body) definitions. - * - * @return {object} A matter body, consisting of several parts (child bodies) - */ - parseBody: function (x, y, w, h, config) - { - var fixtureConfigs = GetFastValue(config, 'fixtures', []); - var fixtures = []; - - for (var fc = 0; fc < fixtureConfigs.length; fc++) - { - var fixtureParts = this.parseFixture(fixtureConfigs[fc]); - - for (var i = 0; i < fixtureParts.length; i++) - { - fixtures.push(fixtureParts[i]); - } - } - - var matterConfig = Common.extend({}, false, config); - - delete matterConfig.fixtures; - delete matterConfig.type; - - var body = Body.create(matterConfig); - - Body.setParts(body, fixtures); - body.render.sprite.xOffset = body.position.x / w; - body.render.sprite.yOffset = body.position.y / h; - Body.setPosition(body, { x: x, y: y }); - - return body; - }, - - - /** - * Parses an element of the "fixtures" list exported by PhysicsEditor - * - * @function Phaser.Physics.Matter.PhysicsEditorParser.parseFixture - * @since 3.10.0 - * - * @param {object} fixtureConfig - the fixture object to parse - * - * @return {object[]} - A list of matter bodies - */ - parseFixture: function (fixtureConfig) - { - var matterConfig = Common.extend({}, false, fixtureConfig); - - delete matterConfig.circle; - delete matterConfig.vertices; - - var fixtures; - - if (fixtureConfig.circle) - { - var x = GetFastValue(fixtureConfig.circle, 'x'); - var y = GetFastValue(fixtureConfig.circle, 'y'); - var r = GetFastValue(fixtureConfig.circle, 'radius'); - fixtures = [ Bodies.circle(x, y, r, matterConfig) ]; - } - else if (fixtureConfig.vertices) - { - fixtures = this.parseVertices(fixtureConfig.vertices, matterConfig); - } - - return fixtures; - }, - - /** - * Parses the "vertices" lists exported by PhysicsEditor. - * - * @function Phaser.Physics.Matter.PhysicsEditorParser.parseVertices - * @since 3.10.0 - * - * @param {object} vertexSets - The vertex lists to parse. - * @param {object} options - Matter body options. - * - * @return {object[]} - A list of matter bodies. - */ - parseVertices: function (vertexSets, options) - { - var i, j, k, v, z; - var parts = []; - - options = options || {}; - - for (v = 0; v < vertexSets.length; v += 1) - { - parts.push(Body.create(Common.extend({ - position: Vertices.centre(vertexSets[v]), - vertices: vertexSets[v] - }, options))); - } - - // flag coincident part edges - var coincidentMaxDist = 5; - - for (i = 0; i < parts.length; i++) - { - var partA = parts[i]; - - for (j = i + 1; j < parts.length; j++) - { - var partB = parts[j]; - - if (Bounds.overlaps(partA.bounds, partB.bounds)) - { - var pav = partA.vertices, - pbv = partB.vertices; - - // iterate vertices of both parts - for (k = 0; k < partA.vertices.length; k++) - { - for (z = 0; z < partB.vertices.length; z++) - { - // find distances between the vertices - var da = Vector.magnitudeSquared(Vector.sub(pav[(k + 1) % pav.length], pbv[z])), - db = Vector.magnitudeSquared(Vector.sub(pav[k], pbv[(z + 1) % pbv.length])); - - // if both vertices are very close, consider the edge concident (internal) - if (da < coincidentMaxDist && db < coincidentMaxDist) - { - pav[k].isInternal = true; - pbv[z].isInternal = true; - } - } - } - - } - } - } - - return parts; - } -}; - -module.exports = PhysicsEditorParser; - - -/***/ }), -/* 1368 */ +/* 1381 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Components = __webpack_require__(493); +var Components = __webpack_require__(508); var GameObject = __webpack_require__(14); var GetFastValue = __webpack_require__(2); var Image = __webpack_require__(98); -var Pipeline = __webpack_require__(151); +var Pipeline = __webpack_require__(153); var Vector2 = __webpack_require__(3); /** @@ -187582,12 +190287,12 @@ var Vector2 = __webpack_require__(3); * @extends Phaser.GameObjects.Components.Transform * @extends Phaser.GameObjects.Components.Visible * - * @param {Phaser.Physics.Matter.World} world - [description] + * @param {Phaser.Physics.Matter.World} world - A reference to the Matter.World instance that this body belongs to. * @param {number} x - The horizontal position of this Game Object in the world. * @param {number} y - The vertical position of this Game Object in the world. * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. - * @param {object} [options={}] - Matter.js configuration object. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. */ var MatterImage = new Class({ @@ -187620,7 +190325,7 @@ var MatterImage = new Class({ this.setOrigin(); /** - * [description] + * A reference to the Matter.World instance that this body belongs to. * * @name Phaser.Physics.Matter.Image#world * @type {Phaser.Physics.Matter.World} @@ -187629,7 +190334,7 @@ var MatterImage = new Class({ this.world = world; /** - * [description] + * An internal temp vector used for velocity and force calculations. * * @name Phaser.Physics.Matter.Image#_tempVec2 * @type {Phaser.Math.Vector2} @@ -187660,21 +190365,21 @@ module.exports = MatterImage; /***/ }), -/* 1369 */ +/* 1382 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AnimationComponent = __webpack_require__(484); +var AnimationComponent = __webpack_require__(498); var Class = __webpack_require__(0); -var Components = __webpack_require__(493); +var Components = __webpack_require__(508); var GameObject = __webpack_require__(14); var GetFastValue = __webpack_require__(2); -var Pipeline = __webpack_require__(151); +var Pipeline = __webpack_require__(153); var Sprite = __webpack_require__(69); var Vector2 = __webpack_require__(3); @@ -187722,12 +190427,12 @@ var Vector2 = __webpack_require__(3); * @extends Phaser.GameObjects.Components.Transform * @extends Phaser.GameObjects.Components.Visible * - * @param {Phaser.Physics.Matter.World} world - [description] + * @param {Phaser.Physics.Matter.World} world - A reference to the Matter.World instance that this body belongs to. * @param {number} x - The horizontal position of this Game Object in the world. * @param {number} y - The vertical position of this Game Object in the world. * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. - * @param {object} [options={}] - Matter.js configuration object. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. */ var MatterSprite = new Class({ @@ -187762,7 +190467,7 @@ var MatterSprite = new Class({ this.setOrigin(); /** - * [description] + * A reference to the Matter.World instance that this body belongs to. * * @name Phaser.Physics.Matter.Sprite#world * @type {Phaser.Physics.Matter.World} @@ -187771,7 +190476,7 @@ var MatterSprite = new Class({ this.world = world; /** - * [description] + * An internal temp vector used for velocity and force calculations. * * @name Phaser.Physics.Matter.Sprite#_tempVec2 * @type {Phaser.Math.Vector2} @@ -187802,7 +190507,7 @@ module.exports = MatterSprite; /***/ }), -/* 1370 */ +/* 1383 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187815,7 +190520,7 @@ var Matter = {}; module.exports = Matter; -var Plugin = __webpack_require__(1275); +var Plugin = __webpack_require__(1287); var Common = __webpack_require__(37); (function() { @@ -187894,855 +190599,149 @@ var Common = __webpack_require__(37); /***/ }), -/* 1371 */ +/* 1384 */ /***/ (function(module, exports, __webpack_require__) { /** -* The `Matter.Grid` module contains methods for creating and manipulating collision broadphase grid structures. +* The `Matter.Query` module contains methods for performing collision queries. * -* @class Grid +* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). +* +* @class Query */ -var Grid = {}; +var Query = {}; -module.exports = Grid; +module.exports = Query; -var Pair = __webpack_require__(494); -var Detector = __webpack_require__(1272); -var Common = __webpack_require__(37); - -(function() { - - /** - * Creates a new grid. - * @method create - * @param {} options - * @return {grid} A new grid - */ - Grid.create = function(options) { - var defaults = { - controller: Grid, - detector: Detector.collisions, - buckets: {}, - pairs: {}, - pairsList: [], - bucketWidth: 48, - bucketHeight: 48 - }; - - return Common.extend(defaults, options); - }; - - /** - * The width of a single grid bucket. - * - * @property bucketWidth - * @type number - * @default 48 - */ - - /** - * The height of a single grid bucket. - * - * @property bucketHeight - * @type number - * @default 48 - */ - - /** - * Updates the grid. - * @method update - * @param {grid} grid - * @param {body[]} bodies - * @param {engine} engine - * @param {boolean} forceUpdate - */ - Grid.update = function(grid, bodies, engine, forceUpdate) { - var i, col, row, - world = engine.world, - buckets = grid.buckets, - bucket, - bucketId, - gridChanged = false; - - // @if DEBUG - var metrics = engine.metrics; - metrics.broadphaseTests = 0; - // @endif - - for (i = 0; i < bodies.length; i++) { - var body = bodies[i]; - - if (body.isSleeping && !forceUpdate) - continue; - - // don't update out of world bodies - if (body.bounds.max.x < world.bounds.min.x || body.bounds.min.x > world.bounds.max.x - || body.bounds.max.y < world.bounds.min.y || body.bounds.min.y > world.bounds.max.y) - continue; - - var newRegion = Grid._getRegion(grid, body); - - // if the body has changed grid region - if (!body.region || newRegion.id !== body.region.id || forceUpdate) { - - // @if DEBUG - metrics.broadphaseTests += 1; - // @endif - - if (!body.region || forceUpdate) - body.region = newRegion; - - var union = Grid._regionUnion(newRegion, body.region); - - // update grid buckets affected by region change - // iterate over the union of both regions - for (col = union.startCol; col <= union.endCol; col++) { - for (row = union.startRow; row <= union.endRow; row++) { - bucketId = Grid._getBucketId(col, row); - bucket = buckets[bucketId]; - - var isInsideNewRegion = (col >= newRegion.startCol && col <= newRegion.endCol - && row >= newRegion.startRow && row <= newRegion.endRow); - - var isInsideOldRegion = (col >= body.region.startCol && col <= body.region.endCol - && row >= body.region.startRow && row <= body.region.endRow); - - // remove from old region buckets - if (!isInsideNewRegion && isInsideOldRegion) { - if (isInsideOldRegion) { - if (bucket) - Grid._bucketRemoveBody(grid, bucket, body); - } - } - - // add to new region buckets - if (body.region === newRegion || (isInsideNewRegion && !isInsideOldRegion) || forceUpdate) { - if (!bucket) - bucket = Grid._createBucket(buckets, bucketId); - Grid._bucketAddBody(grid, bucket, body); - } - } - } - - // set the new region - body.region = newRegion; - - // flag changes so we can update pairs - gridChanged = true; - } - } - - // update pairs list only if pairs changed (i.e. a body changed region) - if (gridChanged) - grid.pairsList = Grid._createActivePairsList(grid); - }; - - /** - * Clears the grid. - * @method clear - * @param {grid} grid - */ - Grid.clear = function(grid) { - grid.buckets = {}; - grid.pairs = {}; - grid.pairsList = []; - }; - - /** - * Finds the union of two regions. - * @method _regionUnion - * @private - * @param {} regionA - * @param {} regionB - * @return {} region - */ - Grid._regionUnion = function(regionA, regionB) { - var startCol = Math.min(regionA.startCol, regionB.startCol), - endCol = Math.max(regionA.endCol, regionB.endCol), - startRow = Math.min(regionA.startRow, regionB.startRow), - endRow = Math.max(regionA.endRow, regionB.endRow); - - return Grid._createRegion(startCol, endCol, startRow, endRow); - }; - - /** - * Gets the region a given body falls in for a given grid. - * @method _getRegion - * @private - * @param {} grid - * @param {} body - * @return {} region - */ - Grid._getRegion = function(grid, body) { - var bounds = body.bounds, - startCol = Math.floor(bounds.min.x / grid.bucketWidth), - endCol = Math.floor(bounds.max.x / grid.bucketWidth), - startRow = Math.floor(bounds.min.y / grid.bucketHeight), - endRow = Math.floor(bounds.max.y / grid.bucketHeight); - - return Grid._createRegion(startCol, endCol, startRow, endRow); - }; - - /** - * Creates a region. - * @method _createRegion - * @private - * @param {} startCol - * @param {} endCol - * @param {} startRow - * @param {} endRow - * @return {} region - */ - Grid._createRegion = function(startCol, endCol, startRow, endRow) { - return { - id: startCol + ',' + endCol + ',' + startRow + ',' + endRow, - startCol: startCol, - endCol: endCol, - startRow: startRow, - endRow: endRow - }; - }; - - /** - * Gets the bucket id at the given position. - * @method _getBucketId - * @private - * @param {} column - * @param {} row - * @return {string} bucket id - */ - Grid._getBucketId = function(column, row) { - return 'C' + column + 'R' + row; - }; - - /** - * Creates a bucket. - * @method _createBucket - * @private - * @param {} buckets - * @param {} bucketId - * @return {} bucket - */ - Grid._createBucket = function(buckets, bucketId) { - var bucket = buckets[bucketId] = []; - return bucket; - }; - - /** - * Adds a body to a bucket. - * @method _bucketAddBody - * @private - * @param {} grid - * @param {} bucket - * @param {} body - */ - Grid._bucketAddBody = function(grid, bucket, body) { - // add new pairs - for (var i = 0; i < bucket.length; i++) { - var bodyB = bucket[i]; - - if (body.id === bodyB.id || (body.isStatic && bodyB.isStatic)) - continue; - - // keep track of the number of buckets the pair exists in - // important for Grid.update to work - var pairId = Pair.id(body, bodyB), - pair = grid.pairs[pairId]; - - if (pair) { - pair[2] += 1; - } else { - grid.pairs[pairId] = [body, bodyB, 1]; - } - } - - // add to bodies (after pairs, otherwise pairs with self) - bucket.push(body); - }; - - /** - * Removes a body from a bucket. - * @method _bucketRemoveBody - * @private - * @param {} grid - * @param {} bucket - * @param {} body - */ - Grid._bucketRemoveBody = function(grid, bucket, body) { - // remove from bucket - bucket.splice(Common.indexOf(bucket, body), 1); - - // update pair counts - for (var i = 0; i < bucket.length; i++) { - // keep track of the number of buckets the pair exists in - // important for _createActivePairsList to work - var bodyB = bucket[i], - pairId = Pair.id(body, bodyB), - pair = grid.pairs[pairId]; - - if (pair) - pair[2] -= 1; - } - }; - - /** - * Generates a list of the active pairs in the grid. - * @method _createActivePairsList - * @private - * @param {} grid - * @return [] pairs - */ - Grid._createActivePairsList = function(grid) { - var pairKeys, - pair, - pairs = []; - - // grid.pairs is used as a hashmap - pairKeys = Common.keys(grid.pairs); - - // iterate over grid.pairs - for (var k = 0; k < pairKeys.length; k++) { - pair = grid.pairs[pairKeys[k]]; - - // if pair exists in at least one bucket - // it is a pair that needs further collision testing so push it - if (pair[2] > 0) { - pairs.push(pair); - } else { - delete grid.pairs[pairKeys[k]]; - } - } - - return pairs; - }; - -})(); - - -/***/ }), -/* 1372 */ -/***/ (function(module, exports, __webpack_require__) { - -/** -* The `Matter.Pairs` module contains methods for creating and manipulating collision pair sets. -* -* @class Pairs -*/ - -var Pairs = {}; - -module.exports = Pairs; - -var Pair = __webpack_require__(494); -var Common = __webpack_require__(37); - -(function() { - - Pairs._pairMaxIdleLife = 1000; - - /** - * Creates a new pairs structure. - * @method create - * @param {object} options - * @return {pairs} A new pairs structure - */ - Pairs.create = function(options) { - return Common.extend({ - table: {}, - list: [], - collisionStart: [], - collisionActive: [], - collisionEnd: [] - }, options); - }; - - /** - * Updates pairs given a list of collisions. - * @method update - * @param {object} pairs - * @param {collision[]} collisions - * @param {number} timestamp - */ - Pairs.update = function(pairs, collisions, timestamp) { - var pairsList = pairs.list, - pairsTable = pairs.table, - collisionStart = pairs.collisionStart, - collisionEnd = pairs.collisionEnd, - collisionActive = pairs.collisionActive, - collision, - pairId, - pair, - i; - - // clear collision state arrays, but maintain old reference - collisionStart.length = 0; - collisionEnd.length = 0; - collisionActive.length = 0; - - for (i = 0; i < pairsList.length; i++) { - pairsList[i].confirmedActive = false; - } - - for (i = 0; i < collisions.length; i++) { - collision = collisions[i]; - - if (collision.collided) { - pairId = Pair.id(collision.bodyA, collision.bodyB); - - pair = pairsTable[pairId]; - - if (pair) { - // pair already exists (but may or may not be active) - if (pair.isActive) { - // pair exists and is active - collisionActive.push(pair); - } else { - // pair exists but was inactive, so a collision has just started again - collisionStart.push(pair); - } - - // update the pair - Pair.update(pair, collision, timestamp); - pair.confirmedActive = true; - } else { - // pair did not exist, create a new pair - pair = Pair.create(collision, timestamp); - pairsTable[pairId] = pair; - - // push the new pair - collisionStart.push(pair); - pairsList.push(pair); - } - } - } - - // deactivate previously active pairs that are now inactive - for (i = 0; i < pairsList.length; i++) { - pair = pairsList[i]; - if (pair.isActive && !pair.confirmedActive) { - Pair.setActive(pair, false, timestamp); - collisionEnd.push(pair); - } - } - }; - - /** - * Finds and removes pairs that have been inactive for a set amount of time. - * @method removeOld - * @param {object} pairs - * @param {number} timestamp - */ - Pairs.removeOld = function(pairs, timestamp) { - var pairsList = pairs.list, - pairsTable = pairs.table, - indexesToRemove = [], - pair, - collision, - pairIndex, - i; - - for (i = 0; i < pairsList.length; i++) { - pair = pairsList[i]; - collision = pair.collision; - - // never remove sleeping pairs - if (collision.bodyA.isSleeping || collision.bodyB.isSleeping) { - pair.timeUpdated = timestamp; - continue; - } - - // if pair is inactive for too long, mark it to be removed - if (timestamp - pair.timeUpdated > Pairs._pairMaxIdleLife) { - indexesToRemove.push(i); - } - } - - // remove marked pairs - for (i = 0; i < indexesToRemove.length; i++) { - pairIndex = indexesToRemove[i] - i; - pair = pairsList[pairIndex]; - delete pairsTable[pair.id]; - pairsList.splice(pairIndex, 1); - } - }; - - /** - * Clears the given pairs structure. - * @method clear - * @param {pairs} pairs - * @return {pairs} pairs - */ - Pairs.clear = function(pairs) { - pairs.table = {}; - pairs.list.length = 0; - pairs.collisionStart.length = 0; - pairs.collisionActive.length = 0; - pairs.collisionEnd.length = 0; - return pairs; - }; - -})(); - - -/***/ }), -/* 1373 */ -/***/ (function(module, exports, __webpack_require__) { - -/** -* The `Matter.Resolver` module contains methods for resolving collision pairs. -* -* @class Resolver -*/ - -var Resolver = {}; - -module.exports = Resolver; - -var Vertices = __webpack_require__(86); var Vector = __webpack_require__(101); -var Common = __webpack_require__(37); +var SAT = __webpack_require__(510); var Bounds = __webpack_require__(102); +var Bodies = __webpack_require__(109); +var Vertices = __webpack_require__(86); (function() { - Resolver._restingThresh = 4; - Resolver._restingThreshTangent = 6; - Resolver._positionDampen = 0.9; - Resolver._positionWarming = 0.8; - Resolver._frictionNormalMultiplier = 5; - /** - * Prepare pairs for position solving. - * @method preSolvePosition - * @param {pair[]} pairs + * Returns a list of collisions between `body` and `bodies`. + * @method collides + * @param {body} body + * @param {body[]} bodies + * @return {object[]} Collisions */ - Resolver.preSolvePosition = function(pairs) { - var i, - pair, - activeCount; + Query.collides = function(body, bodies) { + var collisions = []; - // find total contacts on each body - for (i = 0; i < pairs.length; i++) { - pair = pairs[i]; - - if (!pair.isActive) + for (var i = 0; i < bodies.length; i++) { + var bodyA = bodies[i]; + + // Phaser addition - skip same body checks + if (body === bodyA) + { continue; + } - activeCount = pair.activeContacts.length; - pair.collision.parentA.totalContacts += activeCount; - pair.collision.parentB.totalContacts += activeCount; + if (Bounds.overlaps(bodyA.bounds, body.bounds)) { + for (var j = bodyA.parts.length === 1 ? 0 : 1; j < bodyA.parts.length; j++) { + var part = bodyA.parts[j]; + + if (Bounds.overlaps(part.bounds, body.bounds)) { + var collision = SAT.collides(part, body); + + if (collision.collided) { + collisions.push(collision); + break; + } + } + } + } } + + return collisions; }; /** - * Find a solution for pair positions. - * @method solvePosition - * @param {pair[]} pairs + * Casts a ray segment against a set of bodies and returns all collisions, ray width is optional. Intersection points are not provided. + * @method ray * @param {body[]} bodies - * @param {number} timeScale + * @param {vector} startPoint + * @param {vector} endPoint + * @param {number} [rayWidth] + * @return {object[]} Collisions */ - Resolver.solvePosition = function(pairs, bodies, timeScale) { - var i, - normalX, - normalY, - pair, - collision, - bodyA, - bodyB, - normal, - separation, - penetration, - positionImpulseA, - positionImpulseB, - contactShare, - bodyBtoAX, - bodyBtoAY, - positionImpulse, - impulseCoefficient = timeScale * Resolver._positionDampen; + Query.ray = function(bodies, startPoint, endPoint, rayWidth) { + rayWidth = rayWidth || 1e-100; - for (i = 0; i < bodies.length; i++) { - var body = bodies[i]; - body.previousPositionImpulse.x = body.positionImpulse.x; - body.previousPositionImpulse.y = body.positionImpulse.y; + var rayAngle = Vector.angle(startPoint, endPoint), + rayLength = Vector.magnitude(Vector.sub(startPoint, endPoint)), + rayX = (endPoint.x + startPoint.x) * 0.5, + rayY = (endPoint.y + startPoint.y) * 0.5, + ray = Bodies.rectangle(rayX, rayY, rayLength, rayWidth, { angle: rayAngle }), + collisions = Query.collides(ray, bodies); + + for (var i = 0; i < collisions.length; i += 1) { + var collision = collisions[i]; + collision.body = collision.bodyB = collision.bodyA; } - // find impulses required to resolve penetration - for (i = 0; i < pairs.length; i++) { - pair = pairs[i]; - - if (!pair.isActive || pair.isSensor) - continue; - - collision = pair.collision; - bodyA = collision.parentA; - bodyB = collision.parentB; - normal = collision.normal; - - positionImpulseA = bodyA.previousPositionImpulse; - positionImpulseB = bodyB.previousPositionImpulse; - - penetration = collision.penetration; - - bodyBtoAX = positionImpulseB.x - positionImpulseA.x + penetration.x; - bodyBtoAY = positionImpulseB.y - positionImpulseA.y + penetration.y; - - normalX = normal.x; - normalY = normal.y; - - separation = normalX * bodyBtoAX + normalY * bodyBtoAY; - pair.separation = separation; - - positionImpulse = (separation - pair.slop) * impulseCoefficient; - - if (bodyA.isStatic || bodyB.isStatic) - positionImpulse *= 2; - - if (!(bodyA.isStatic || bodyA.isSleeping)) { - contactShare = positionImpulse / bodyA.totalContacts; - bodyA.positionImpulse.x += normalX * contactShare; - bodyA.positionImpulse.y += normalY * contactShare; - } - - if (!(bodyB.isStatic || bodyB.isSleeping)) { - contactShare = positionImpulse / bodyB.totalContacts; - bodyB.positionImpulse.x -= normalX * contactShare; - bodyB.positionImpulse.y -= normalY * contactShare; - } - } + return collisions; }; /** - * Apply position resolution. - * @method postSolvePosition + * Returns all bodies whose bounds are inside (or outside if set) the given set of bounds, from the given set of bodies. + * @method region * @param {body[]} bodies + * @param {bounds} bounds + * @param {bool} [outside=false] + * @return {body[]} The bodies matching the query */ - Resolver.postSolvePosition = function(bodies) { + Query.region = function(bodies, bounds, outside) { + var result = []; + + for (var i = 0; i < bodies.length; i++) { + var body = bodies[i], + overlaps = Bounds.overlaps(body.bounds, bounds); + if ((overlaps && !outside) || (!overlaps && outside)) + result.push(body); + } + + return result; + }; + + /** + * Returns all bodies whose vertices contain the given point, from the given set of bodies. + * @method point + * @param {body[]} bodies + * @param {vector} point + * @return {body[]} The bodies matching the query + */ + Query.point = function(bodies, point) { + var result = []; + for (var i = 0; i < bodies.length; i++) { var body = bodies[i]; - - // reset contact count - body.totalContacts = 0; - - if (body.positionImpulse.x !== 0 || body.positionImpulse.y !== 0) { - // update body geometry - for (var j = 0; j < body.parts.length; j++) { + + if (Bounds.contains(body.bounds, point)) { + for (var j = body.parts.length === 1 ? 0 : 1; j < body.parts.length; j++) { var part = body.parts[j]; - Vertices.translate(part.vertices, body.positionImpulse); - Bounds.update(part.bounds, part.vertices, body.velocity); - part.position.x += body.positionImpulse.x; - part.position.y += body.positionImpulse.y; - } - // move the body without changing velocity - body.positionPrev.x += body.positionImpulse.x; - body.positionPrev.y += body.positionImpulse.y; - - if (Vector.dot(body.positionImpulse, body.velocity) < 0) { - // reset cached impulse if the body has velocity along it - body.positionImpulse.x = 0; - body.positionImpulse.y = 0; - } else { - // warm the next iteration - body.positionImpulse.x *= Resolver._positionWarming; - body.positionImpulse.y *= Resolver._positionWarming; - } - } - } - }; - - /** - * Prepare pairs for velocity solving. - * @method preSolveVelocity - * @param {pair[]} pairs - */ - Resolver.preSolveVelocity = function(pairs) { - var i, - j, - pair, - contacts, - collision, - bodyA, - bodyB, - normal, - tangent, - contact, - contactVertex, - normalImpulse, - tangentImpulse, - offset, - impulse = Vector._temp[0], - tempA = Vector._temp[1]; - - for (i = 0; i < pairs.length; i++) { - pair = pairs[i]; - - if (!pair.isActive || pair.isSensor) - continue; - - contacts = pair.activeContacts; - collision = pair.collision; - bodyA = collision.parentA; - bodyB = collision.parentB; - normal = collision.normal; - tangent = collision.tangent; - - // resolve each contact - for (j = 0; j < contacts.length; j++) { - contact = contacts[j]; - contactVertex = contact.vertex; - normalImpulse = contact.normalImpulse; - tangentImpulse = contact.tangentImpulse; - - if (normalImpulse !== 0 || tangentImpulse !== 0) { - // total impulse from contact - impulse.x = (normal.x * normalImpulse) + (tangent.x * tangentImpulse); - impulse.y = (normal.y * normalImpulse) + (tangent.y * tangentImpulse); - - // apply impulse from contact - if (!(bodyA.isStatic || bodyA.isSleeping)) { - offset = Vector.sub(contactVertex, bodyA.position, tempA); - bodyA.positionPrev.x += impulse.x * bodyA.inverseMass; - bodyA.positionPrev.y += impulse.y * bodyA.inverseMass; - bodyA.anglePrev += Vector.cross(offset, impulse) * bodyA.inverseInertia; - } - - if (!(bodyB.isStatic || bodyB.isSleeping)) { - offset = Vector.sub(contactVertex, bodyB.position, tempA); - bodyB.positionPrev.x -= impulse.x * bodyB.inverseMass; - bodyB.positionPrev.y -= impulse.y * bodyB.inverseMass; - bodyB.anglePrev -= Vector.cross(offset, impulse) * bodyB.inverseInertia; + if (Bounds.contains(part.bounds, point) + && Vertices.contains(part.vertices, point)) { + result.push(body); + break; } } } } - }; - /** - * Find a solution for pair velocities. - * @method solveVelocity - * @param {pair[]} pairs - * @param {number} timeScale - */ - Resolver.solveVelocity = function(pairs, timeScale) { - var timeScaleSquared = timeScale * timeScale, - impulse = Vector._temp[0], - tempA = Vector._temp[1], - tempB = Vector._temp[2], - tempC = Vector._temp[3], - tempD = Vector._temp[4], - tempE = Vector._temp[5]; - - for (var i = 0; i < pairs.length; i++) { - var pair = pairs[i]; - - if (!pair.isActive || pair.isSensor) - continue; - - var collision = pair.collision, - bodyA = collision.parentA, - bodyB = collision.parentB, - normal = collision.normal, - tangent = collision.tangent, - contacts = pair.activeContacts, - contactShare = 1 / contacts.length; - - // update body velocities - bodyA.velocity.x = bodyA.position.x - bodyA.positionPrev.x; - bodyA.velocity.y = bodyA.position.y - bodyA.positionPrev.y; - bodyB.velocity.x = bodyB.position.x - bodyB.positionPrev.x; - bodyB.velocity.y = bodyB.position.y - bodyB.positionPrev.y; - bodyA.angularVelocity = bodyA.angle - bodyA.anglePrev; - bodyB.angularVelocity = bodyB.angle - bodyB.anglePrev; - - // resolve each contact - for (var j = 0; j < contacts.length; j++) { - var contact = contacts[j], - contactVertex = contact.vertex, - offsetA = Vector.sub(contactVertex, bodyA.position, tempA), - offsetB = Vector.sub(contactVertex, bodyB.position, tempB), - velocityPointA = Vector.add(bodyA.velocity, Vector.mult(Vector.perp(offsetA), bodyA.angularVelocity), tempC), - velocityPointB = Vector.add(bodyB.velocity, Vector.mult(Vector.perp(offsetB), bodyB.angularVelocity), tempD), - relativeVelocity = Vector.sub(velocityPointA, velocityPointB, tempE), - normalVelocity = Vector.dot(normal, relativeVelocity); - - var tangentVelocity = Vector.dot(tangent, relativeVelocity), - tangentSpeed = Math.abs(tangentVelocity), - tangentVelocityDirection = Common.sign(tangentVelocity); - - // raw impulses - var normalImpulse = (1 + pair.restitution) * normalVelocity, - normalForce = Common.clamp(pair.separation + normalVelocity, 0, 1) * Resolver._frictionNormalMultiplier; - - // coulomb friction - var tangentImpulse = tangentVelocity, - maxFriction = Infinity; - - if (tangentSpeed > pair.friction * pair.frictionStatic * normalForce * timeScaleSquared) { - maxFriction = tangentSpeed; - tangentImpulse = Common.clamp( - pair.friction * tangentVelocityDirection * timeScaleSquared, - -maxFriction, maxFriction - ); - } - - // modify impulses accounting for mass, inertia and offset - var oAcN = Vector.cross(offsetA, normal), - oBcN = Vector.cross(offsetB, normal), - share = contactShare / (bodyA.inverseMass + bodyB.inverseMass + bodyA.inverseInertia * oAcN * oAcN + bodyB.inverseInertia * oBcN * oBcN); - - normalImpulse *= share; - tangentImpulse *= share; - - // handle high velocity and resting collisions separately - if (normalVelocity < 0 && normalVelocity * normalVelocity > Resolver._restingThresh * timeScaleSquared) { - // high normal velocity so clear cached contact normal impulse - contact.normalImpulse = 0; - } else { - // solve resting collision constraints using Erin Catto's method (GDC08) - // impulse constraint tends to 0 - var contactNormalImpulse = contact.normalImpulse; - contact.normalImpulse = Math.min(contact.normalImpulse + normalImpulse, 0); - normalImpulse = contact.normalImpulse - contactNormalImpulse; - } - - // handle high velocity and resting collisions separately - if (tangentVelocity * tangentVelocity > Resolver._restingThreshTangent * timeScaleSquared) { - // high tangent velocity so clear cached contact tangent impulse - contact.tangentImpulse = 0; - } else { - // solve resting collision constraints using Erin Catto's method (GDC08) - // tangent impulse tends to -tangentSpeed or +tangentSpeed - var contactTangentImpulse = contact.tangentImpulse; - contact.tangentImpulse = Common.clamp(contact.tangentImpulse + tangentImpulse, -maxFriction, maxFriction); - tangentImpulse = contact.tangentImpulse - contactTangentImpulse; - } - - // total impulse from contact - impulse.x = (normal.x * normalImpulse) + (tangent.x * tangentImpulse); - impulse.y = (normal.y * normalImpulse) + (tangent.y * tangentImpulse); - - // apply impulse from contact - if (!(bodyA.isStatic || bodyA.isSleeping)) { - bodyA.positionPrev.x += impulse.x * bodyA.inverseMass; - bodyA.positionPrev.y += impulse.y * bodyA.inverseMass; - bodyA.anglePrev += Vector.cross(offsetA, impulse) * bodyA.inverseInertia; - } - - if (!(bodyB.isStatic || bodyB.isSleeping)) { - bodyB.positionPrev.x -= impulse.x * bodyB.inverseMass; - bodyB.positionPrev.y -= impulse.y * bodyB.inverseMass; - bodyB.anglePrev -= Vector.cross(offsetB, impulse) * bodyB.inverseInertia; - } - } - } + return result; }; })(); /***/ }), -/* 1374 */ +/* 1385 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -188759,15 +190758,15 @@ var Engine = {}; module.exports = Engine; -var World = __webpack_require__(1276); -var Sleeping = __webpack_require__(453); -var Resolver = __webpack_require__(1373); -var Pairs = __webpack_require__(1372); -var Metrics = __webpack_require__(1429); -var Grid = __webpack_require__(1371); -var Events = __webpack_require__(235); -var Composite = __webpack_require__(215); -var Constraint = __webpack_require__(236); +var World = __webpack_require__(1288); +var Sleeping = __webpack_require__(236); +var Resolver = __webpack_require__(1291); +var Pairs = __webpack_require__(1290); +var Metrics = __webpack_require__(1443); +var Grid = __webpack_require__(1289); +var Events = __webpack_require__(237); +var Composite = __webpack_require__(145); +var Constraint = __webpack_require__(216); var Common = __webpack_require__(37); var Body = __webpack_require__(62); @@ -188809,26 +190808,6 @@ var Body = __webpack_require__(62); var engine = Common.extend(defaults, options); - // @deprecated - if (element || engine.render) { - var renderDefaults = { - element: element, - controller: Render - }; - - engine.render = Common.extend(renderDefaults, engine.render); - } - - // @deprecated - if (engine.render && engine.render.controller) { - engine.render = engine.render.controller.create(engine.render); - } - - // @deprecated - if (engine.render) { - engine.render.engine = engine; - } - engine.world = options.world || World.create(engine.world); engine.pairs = Pairs.create(); engine.broadphase = engine.broadphase.controller.create(engine.broadphase); @@ -189058,8 +191037,8 @@ var Body = __webpack_require__(62); continue; // apply gravity - body.force.y += body.mass * gravity.y * gravityScale; - body.force.x += body.mass * gravity.x * gravityScale; + body.force.x += (body.mass * gravity.x * gravityScale) * body.gravityScale.x; + body.force.y += (body.mass * gravity.y * gravityScale) * body.gravityScale.y; } }; @@ -189255,34 +191234,44 @@ var Body = __webpack_require__(62); /***/ }), -/* 1375 */ +/* 1386 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bodies = __webpack_require__(135); +var Bodies = __webpack_require__(109); var Body = __webpack_require__(62); var Class = __webpack_require__(0); var Common = __webpack_require__(37); -var Composite = __webpack_require__(215); -var Engine = __webpack_require__(1374); +var Composite = __webpack_require__(145); +var Engine = __webpack_require__(1385); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(1270); +var Events = __webpack_require__(1284); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); var MatterBody = __webpack_require__(62); -var MatterEvents = __webpack_require__(235); -var MatterTileBody = __webpack_require__(1271); -var MatterWorld = __webpack_require__(1276); +var MatterEvents = __webpack_require__(237); +var MatterTileBody = __webpack_require__(1285); +var MatterWorld = __webpack_require__(1288); var Vector = __webpack_require__(101); /** * @classdesc - * [description] + * The Matter World class is responsible for managing one single instance of a Matter Physics World for Phaser. + * + * Access this via `this.matter.world` from within a Scene. + * + * This class creates a Matter JS World Composite along with the Matter JS Engine during instantiation. It also + * handles delta timing, bounds, body and constraint creation and debug drawing. + * + * If you wish to access the Matter JS World object directly, see the `localWorld` property. + * If you wish to access the Matter Engine directly, see the `engine` property. + * + * This class is an Event Emitter and will proxy _all_ Matter JS events, as they are received. * * @class World * @extends Phaser.Events.EventEmitter @@ -189336,6 +191325,10 @@ var World = new Class({ { this.setGravity(gravity.x, gravity.y, gravity.scale); } + else if (gravity === false) + { + this.setGravity(0, 0, 0); + } /** * An object containing the 4 wall bodies that bound the physics world. @@ -189346,30 +191339,6 @@ var World = new Class({ */ this.walls = { left: null, right: null, top: null, bottom: null }; - if (GetFastValue(config, 'setBounds', false)) - { - var boundsConfig = config['setBounds']; - - if (typeof boundsConfig === 'boolean') - { - this.setBounds(); - } - else - { - var x = GetFastValue(boundsConfig, 'x', 0); - var y = GetFastValue(boundsConfig, 'y', 0); - var width = GetFastValue(boundsConfig, 'width', scene.sys.scale.width); - var height = GetFastValue(boundsConfig, 'height', scene.sys.scale.height); - var thickness = GetFastValue(boundsConfig, 'thickness', 64); - var left = GetFastValue(boundsConfig, 'left', true); - var right = GetFastValue(boundsConfig, 'right', true); - var top = GetFastValue(boundsConfig, 'top', true); - var bottom = GetFastValue(boundsConfig, 'bottom', true); - - this.setBounds(x, y, width, height, thickness, left, right, top, bottom); - } - } - /** * A flag that toggles if the world is enabled or not. * @@ -189384,7 +191353,7 @@ var World = new Class({ * The correction argument is an optional Number that specifies the time correction factor to apply to the update. * This can help improve the accuracy of the simulation in cases where delta is changing between updates. * The value of correction is defined as delta / lastDelta, i.e. the percentage change of delta over the last step. - * Therefore the value is always 1 (no correction) when delta constant (or when no correction is desired, which is the default). + * Therefore the value is always 1 (no correction) when delta is constant (or when no correction is desired, which is the default). * See the paper on Time Corrected Verlet for more information. * * @name Phaser.Physics.Matter.World#correction @@ -189424,6 +191393,47 @@ var World = new Class({ */ this.getDelta = GetValue(config, 'getDelta', this.update60Hz); + var runnerConfig = GetFastValue(config, 'runner', {}); + + var hasFPS = GetFastValue(runnerConfig, 'fps', false); + + var fps = GetFastValue(runnerConfig, 'fps', 60); + + var delta = GetFastValue(runnerConfig, 'delta', 1000 / fps); + var deltaMin = GetFastValue(runnerConfig, 'deltaMin', 1000 / fps); + var deltaMax = GetFastValue(runnerConfig, 'deltaMax', 1000 / (fps * 0.5)); + + if (!hasFPS) + { + fps = 1000 / delta; + } + + /** + * The Matter JS Runner Configuration object. + * + * This object is populated via the Matter Configuration object's `runner` property and is + * updated constantly during the game step. + * + * @name Phaser.Physics.Matter.World#runner + * @type {Phaser.Types.Physics.Matter.MatterRunnerConfig} + * @since 3.22.0 + */ + this.runner = { + fps: fps, + correction: GetFastValue(runnerConfig, 'correction', 1), + deltaSampleSize: GetFastValue(runnerConfig, 'deltaSampleSize', 60), + counterTimestamp: 0, + frameCounter: 0, + deltaHistory: [], + timePrev: null, + timeScalePrev: 1, + frameRequestId: null, + isFixed: GetFastValue(runnerConfig, 'isFixed', false), + delta: delta, + deltaMin: deltaMin, + deltaMax: deltaMax + }; + /** * Automatically call Engine.update every time the game steps. * If you disable this then you are responsible for calling `World.step` directly from your game. @@ -189436,6 +191446,8 @@ var World = new Class({ */ this.autoUpdate = GetValue(config, 'autoUpdate', true); + var debugConfig = GetValue(config, 'debug', false); + /** * A flag that controls if the debug graphics will be drawn to or not. * @@ -189444,7 +191456,7 @@ var World = new Class({ * @default false * @since 3.0.0 */ - this.drawDebug = GetValue(config, 'debug', false); + this.drawDebug = (typeof(debugConfig) === 'object') ? true : debugConfig; /** * An instance of the Graphics object the debug bodies are drawn to, if enabled. @@ -189456,27 +191468,85 @@ var World = new Class({ this.debugGraphic; /** - * The default configuration values. + * The debug configuration object. + * + * The values stored in this object are read from the Matter World Config `debug` property. + * + * When a new Body or Constraint is _added to the World_, they are given the values stored in this object, + * unless they have their own `render` object set that will override them. + * + * Note that while you can modify the values of properties in this object at run-time, it will not change + * any of the Matter objects _already added_. It will only impact objects newly added to the world, or one + * that is removed and then re-added at a later time. * - * @name Phaser.Physics.Matter.World#defaults - * @type {object} - * @since 3.0.0 + * @name Phaser.Physics.Matter.World#debugConfig + * @type {Phaser.Types.Physics.Matter.MatterDebugConfig} + * @since 3.22.0 */ - this.defaults = { - debugShowBody: GetFastValue(config, 'debugShowBody', true), - debugShowStaticBody: GetFastValue(config, 'debugShowStaticBody', true), - debugShowVelocity: GetFastValue(config, 'debugShowVelocity', true), - bodyDebugColor: GetFastValue(config, 'debugBodyColor', 0xff00ff), - bodyDebugFillColor: GetFastValue(config, 'debugBodyFillColor', 0xe3a7e3), - staticBodyDebugColor: GetFastValue(config, 'debugStaticBodyColor', 0x0000ff), - velocityDebugColor: GetFastValue(config, 'debugVelocityColor', 0x00ff00), - debugShowJoint: GetFastValue(config, 'debugShowJoint', true), - jointDebugColor: GetFastValue(config, 'debugJointColor', 0x000000), - debugWireframes: GetFastValue(config, 'debugWireframes', true), - debugShowInternalEdges: GetFastValue(config, 'debugShowInternalEdges', false), - debugShowConvexHulls: GetFastValue(config, 'debugShowConvexHulls', false), - debugConvexHullColor: GetFastValue(config, 'debugConvexHullColor', 0xaaaaaa), - debugShowSleeping: GetFastValue(config, 'debugShowSleeping', false) + this.debugConfig = { + showAxes: GetFastValue(debugConfig, 'showAxes', false), + showAngleIndicator: GetFastValue(debugConfig, 'showAngleIndicator', false), + angleColor: GetFastValue(debugConfig, 'angleColor', 0xe81153), + + showBroadphase: GetFastValue(debugConfig, 'showBroadphase', false), + broadphaseColor: GetFastValue(debugConfig, 'broadphaseColor', 0xffb400), + + showBounds: GetFastValue(debugConfig, 'showBounds', false), + boundsColor: GetFastValue(debugConfig, 'boundsColor', 0xffffff), + + showVelocity: GetFastValue(debugConfig, 'showVelocity', false), + velocityColor: GetFastValue(debugConfig, 'velocityColor', 0x00aeef), + + showCollisions: GetFastValue(debugConfig, 'showCollisions', false), + collisionColor: GetFastValue(debugConfig, 'collisionColor', 0xf5950c), + + showSeparations: GetFastValue(debugConfig, 'showSeparations', false), + separationColor: GetFastValue(debugConfig, 'separationColor', 0xffa500), + + showBody: GetFastValue(debugConfig, 'showBody', true), + showStaticBody: GetFastValue(debugConfig, 'showStaticBody', true), + showInternalEdges: GetFastValue(debugConfig, 'showInternalEdges', false), + + renderFill: GetFastValue(debugConfig, 'renderFill', false), + renderLine: GetFastValue(debugConfig, 'renderLine', true), + + fillColor: GetFastValue(debugConfig, 'fillColor', 0x106909), + fillOpacity: GetFastValue(debugConfig, 'fillOpacity', 1), + lineColor: GetFastValue(debugConfig, 'lineColor', 0x28de19), + lineOpacity: GetFastValue(debugConfig, 'lineOpacity', 1), + lineThickness: GetFastValue(debugConfig, 'lineThickness', 1), + + staticFillColor: GetFastValue(debugConfig, 'staticFillColor', 0x0d177b), + staticLineColor: GetFastValue(debugConfig, 'staticLineColor', 0x1327e4), + + showSleeping: GetFastValue(debugConfig, 'showSleeping', false), + staticBodySleepOpacity: GetFastValue(debugConfig, 'staticBodySleepOpacity', 0.7), + sleepFillColor: GetFastValue(debugConfig, 'sleepFillColor', 0x464646), + sleepLineColor: GetFastValue(debugConfig, 'sleepLineColor', 0x999a99), + + showSensors: GetFastValue(debugConfig, 'showSensors', true), + sensorFillColor: GetFastValue(debugConfig, 'sensorFillColor', 0x0d177b), + sensorLineColor: GetFastValue(debugConfig, 'sensorLineColor', 0x1327e4), + + showPositions: GetFastValue(debugConfig, 'showPositions', true), + positionSize: GetFastValue(debugConfig, 'positionSize', 4), + positionColor: GetFastValue(debugConfig, 'positionColor', 0xe042da), + + showJoint: GetFastValue(debugConfig, 'showJoint', true), + jointColor: GetFastValue(debugConfig, 'jointColor', 0xe0e042), + jointLineOpacity: GetFastValue(debugConfig, 'jointLineOpacity', 1), + jointLineThickness: GetFastValue(debugConfig, 'jointLineThickness', 2), + + pinSize: GetFastValue(debugConfig, 'pinSize', 4), + pinColor: GetFastValue(debugConfig, 'pinColor', 0x42e0e0), + + springColor: GetFastValue(debugConfig, 'springColor', 0xe042e0), + + anchorColor: GetFastValue(debugConfig, 'anchorColor', 0xefefef), + anchorSize: GetFastValue(debugConfig, 'anchorSize', 4), + + showConvexHulls: GetFastValue(debugConfig, 'showConvexHulls', false), + hullColor: GetFastValue(debugConfig, 'hullColor', 0xd703d0) }; if (this.drawDebug) @@ -189485,10 +191555,284 @@ var World = new Class({ } this.setEventsProxy(); + + // Create the walls + + if (GetFastValue(config, 'setBounds', false)) + { + var boundsConfig = config['setBounds']; + + if (typeof boundsConfig === 'boolean') + { + this.setBounds(); + } + else + { + var x = GetFastValue(boundsConfig, 'x', 0); + var y = GetFastValue(boundsConfig, 'y', 0); + var width = GetFastValue(boundsConfig, 'width', scene.sys.scale.width); + var height = GetFastValue(boundsConfig, 'height', scene.sys.scale.height); + var thickness = GetFastValue(boundsConfig, 'thickness', 64); + var left = GetFastValue(boundsConfig, 'left', true); + var right = GetFastValue(boundsConfig, 'right', true); + var top = GetFastValue(boundsConfig, 'top', true); + var bottom = GetFastValue(boundsConfig, 'bottom', true); + + this.setBounds(x, y, width, height, thickness, left, right, top, bottom); + } + } }, /** - * [description] + * Sets the debug render style for the children of the given Matter Composite. + * + * Composites themselves do not render, but they can contain bodies, constraints and other composites that may do. + * So the children of this composite are passed to the `setBodyRenderStyle`, `setCompositeRenderStyle` and + * `setConstraintRenderStyle` methods accordingly. + * + * @method Phaser.Physics.Matter.World#setCompositeRenderStyle + * @since 3.22.0 + * + * @param {MatterJS.CompositeType} composite - The Matter Composite to set the render style on. + * + * @return {this} This Matter World instance for method chaining. + */ + setCompositeRenderStyle: function (composite) + { + var bodies = composite.bodies; + var constraints = composite.constraints; + var composites = composite.composites; + + var i; + var obj; + var render; + + for (i = 0; i < bodies.length; i++) + { + obj = bodies[i]; + render = obj.render; + + this.setBodyRenderStyle(obj, render.lineColor, render.lineOpacity, render.lineThickness, render.fillColor, render.fillOpacity); + } + + for (i = 0; i < constraints.length; i++) + { + obj = constraints[i]; + render = obj.render; + + this.setConstraintRenderStyle(obj, render.lineColor, render.lineOpacity, render.lineThickness, render.pinSize, render.anchorColor, render.anchorSize); + } + + for (i = 0; i < composites.length; i++) + { + obj = composites[i]; + + this.setCompositeRenderStyle(obj); + } + + return this; + }, + + /** + * Sets the debug render style for the given Matter Body. + * + * If you are using this on a Phaser Game Object, such as a Matter Sprite, then pass in the body property + * to this method, not the Game Object itself. + * + * If you wish to skip a parameter, so it retains its current value, pass `false` for it. + * + * If you wish to reset the Body render colors to the defaults found in the World Debug Config, then call + * this method with just the `body` parameter provided and no others. + * + * @method Phaser.Physics.Matter.World#setBodyRenderStyle + * @since 3.22.0 + * + * @param {MatterJS.BodyType} body - The Matter Body to set the render style on. + * @param {number} [lineColor] - The line color. If `null` it will use the World Debug Config value. + * @param {number} [lineOpacity] - The line opacity, between 0 and 1. If `null` it will use the World Debug Config value. + * @param {number} [lineThickness] - The line thickness. If `null` it will use the World Debug Config value. + * @param {number} [fillColor] - The fill color. If `null` it will use the World Debug Config value. + * @param {number} [fillOpacity] - The fill opacity, between 0 and 1. If `null` it will use the World Debug Config value. + * + * @return {this} This Matter World instance for method chaining. + */ + setBodyRenderStyle: function (body, lineColor, lineOpacity, lineThickness, fillColor, fillOpacity) + { + var render = body.render; + var config = this.debugConfig; + + if (!render) + { + return this; + } + + if (lineColor === undefined || lineColor === null) + { + lineColor = (body.isStatic) ? config.staticLineColor : config.lineColor; + } + + if (lineOpacity === undefined || lineOpacity === null) + { + lineOpacity = config.lineOpacity; + } + + if (lineThickness === undefined || lineThickness === null) + { + lineThickness = config.lineThickness; + } + + if (fillColor === undefined || fillColor === null) + { + fillColor = (body.isStatic) ? config.staticFillColor : config.fillColor; + } + + if (fillOpacity === undefined || fillOpacity === null) + { + fillOpacity = config.fillOpacity; + } + + if (lineColor !== false) + { + render.lineColor = lineColor; + } + + if (lineOpacity !== false) + { + render.lineOpacity = lineOpacity; + } + + if (lineThickness !== false) + { + render.lineThickness = lineThickness; + } + + if (fillColor !== false) + { + render.fillColor = fillColor; + } + + if (fillOpacity !== false) + { + render.fillOpacity = fillOpacity; + } + + return this; + }, + + /** + * Sets the debug render style for the given Matter Constraint. + * + * If you are using this on a Phaser Game Object, then pass in the body property + * to this method, not the Game Object itself. + * + * If you wish to skip a parameter, so it retains its current value, pass `false` for it. + * + * If you wish to reset the Constraint render colors to the defaults found in the World Debug Config, then call + * this method with just the `constraint` parameter provided and no others. + * + * @method Phaser.Physics.Matter.World#setConstraintRenderStyle + * @since 3.22.0 + * + * @param {MatterJS.ConstraintType} constraint - The Matter Constraint to set the render style on. + * @param {number} [lineColor] - The line color. If `null` it will use the World Debug Config value. + * @param {number} [lineOpacity] - The line opacity, between 0 and 1. If `null` it will use the World Debug Config value. + * @param {number} [lineThickness] - The line thickness. If `null` it will use the World Debug Config value. + * @param {number} [pinSize] - If this constraint is a pin, this sets the size of the pin circle. If `null` it will use the World Debug Config value. + * @param {number} [anchorColor] - The color used when rendering this constraints anchors. If `null` it will use the World Debug Config value. + * @param {number} [anchorSize] - The size of the anchor circle, if this constraint has anchors. If `null` it will use the World Debug Config value. + * + * @return {this} This Matter World instance for method chaining. + */ + setConstraintRenderStyle: function (constraint, lineColor, lineOpacity, lineThickness, pinSize, anchorColor, anchorSize) + { + var render = constraint.render; + var config = this.debugConfig; + + if (!render) + { + return this; + } + + // Reset them + if (lineColor === undefined || lineColor === null) + { + var type = render.type; + + if (type === 'line') + { + lineColor = config.jointColor; + } + else if (type === 'pin') + { + lineColor = config.pinColor; + } + else if (type === 'spring') + { + lineColor = config.springColor; + } + } + + if (lineOpacity === undefined || lineOpacity === null) + { + lineOpacity = config.jointLineOpacity; + } + + if (lineThickness === undefined || lineThickness === null) + { + lineThickness = config.jointLineThickness; + } + + if (pinSize === undefined || pinSize === null) + { + pinSize = config.pinSize; + } + + if (anchorColor === undefined || anchorColor === null) + { + anchorColor = config.anchorColor; + } + + if (anchorSize === undefined || anchorSize === null) + { + anchorSize = config.anchorSize; + } + + if (lineColor !== false) + { + render.lineColor = lineColor; + } + + if (lineOpacity !== false) + { + render.lineOpacity = lineOpacity; + } + + if (lineThickness !== false) + { + render.lineThickness = lineThickness; + } + + if (pinSize !== false) + { + render.pinSize = pinSize; + } + + if (anchorColor !== false) + { + render.anchorColor = anchorColor; + } + + if (anchorSize !== false) + { + render.anchorSize = anchorSize; + } + + return this; + }, + + /** + * This internal method acts as a proxy between all of the Matter JS events and then re-emits them + * via this class. * * @method Phaser.Physics.Matter.World#setEventsProxy * @since 3.0.0 @@ -189497,6 +191841,61 @@ var World = new Class({ { var _this = this; var engine = this.engine; + var world = this.localWorld; + + // Inject debug styles + + if (this.drawDebug) + { + MatterEvents.on(world, 'compositeModified', function (composite) + { + _this.setCompositeRenderStyle(composite); + }); + + MatterEvents.on(world, 'beforeAdd', function (event) + { + var objects = [].concat(event.object); + + for (var i = 0; i < objects.length; i++) + { + var obj = objects[i]; + var render = obj.render; + + if (obj.type === 'body') + { + _this.setBodyRenderStyle(obj, render.lineColor, render.lineOpacity, render.lineThickness, render.fillColor, render.fillOpacity); + } + else if (obj.type === 'composite') + { + _this.setCompositeRenderStyle(obj); + } + else if (obj.type === 'constraint') + { + _this.setConstraintRenderStyle(obj, render.lineColor, render.lineOpacity, render.lineThickness, render.pinSize, render.anchorColor, render.anchorSize); + } + } + }); + } + + MatterEvents.on(world, 'beforeAdd', function (event) + { + _this.emit(Events.BEFORE_ADD, event); + }); + + MatterEvents.on(world, 'afterAdd', function (event) + { + _this.emit(Events.AFTER_ADD, event); + }); + + MatterEvents.on(world, 'beforeRemove', function (event) + { + _this.emit(Events.BEFORE_REMOVE, event); + }); + + MatterEvents.on(world, 'afterRemove', function (event) + { + _this.emit(Events.AFTER_REMOVE, event); + }); MatterEvents.on(engine, 'beforeUpdate', function (event) { @@ -189569,7 +191968,7 @@ var World = new Class({ * @param {number} [y=0] - The y coordinate of the top-left corner of the bounds. * @param {number} [width] - The width of the bounds. * @param {number} [height] - The height of the bounds. - * @param {number} [thickness=128] - The thickness of each wall, in pixels. + * @param {number} [thickness=64] - The thickness of each wall, in pixels. * @param {boolean} [left=true] - If true will create the left bounds wall. * @param {boolean} [right=true] - If true will create the right bounds wall. * @param {boolean} [top=true] - If true will create the top bounds wall. @@ -189583,7 +191982,7 @@ var World = new Class({ if (y === undefined) { y = 0; } if (width === undefined) { width = this.scene.sys.scale.width; } if (height === undefined) { height = this.scene.sys.scale.height; } - if (thickness === undefined) { thickness = 128; } + if (thickness === undefined) { thickness = 64; } if (left === undefined) { left = true; } if (right === undefined) { right = true; } if (top === undefined) { top = true; } @@ -189597,19 +191996,19 @@ var World = new Class({ return this; }, - // position = 'left', 'right', 'top' or 'bottom' /** - * [description] + * Updates the 4 rectangle bodies that were created, if `setBounds` was set in the Matter config, to use + * the new positions and sizes. This method is usually only called internally via the `setBounds` method. * * @method Phaser.Physics.Matter.World#updateWall * @since 3.0.0 * - * @param {boolean} add - [description] - * @param {string} position - [description] - * @param {number} x - [description] - * @param {number} y - [description] - * @param {number} width - [description] - * @param {number} height - [description] + * @param {boolean} add - `true` if the walls are being added or updated, `false` to remove them from the world. + * @param {string} [position] - Either `left`, `right`, `top` or `bottom`. Only optional if `add` is `false`. + * @param {number} [x] - The horizontal position to place the walls at. Only optional if `add` is `false`. + * @param {number} [y] - The vertical position to place the walls at. Only optional if `add` is `false`. + * @param {number} [width] - The width of the walls, in pixels. Only optional if `add` is `false`. + * @param {number} [height] - The height of the walls, in pixels. Only optional if `add` is `false`. */ updateWall: function (add, position, x, y, width, height) { @@ -189640,12 +192039,19 @@ var World = new Class({ }, /** - * [description] + * Creates a Phaser.GameObjects.Graphics object that is used to render all of the debug bodies and joints to. + * + * This method is called automatically by the constructor, if debugging has been enabled. + * + * The created Graphics object is automatically added to the Scene at 0x0 and given a depth of `Number.MAX_VALUE`, + * so it renders above all else in the Scene. + * + * The Graphics object is assigned to the `debugGraphic` property of this class and `drawDebug` is enabled. * * @method Phaser.Physics.Matter.World#createDebugGraphic * @since 3.0.0 * - * @return {Phaser.GameObjects.Graphics} [description] + * @return {Phaser.GameObjects.Graphics} The newly created Graphics object. */ createDebugGraphic: function () { @@ -189661,12 +192067,12 @@ var World = new Class({ }, /** - * Sets the world's gravity and gravity scale to 0. + * Sets the world gravity and gravity scale to 0. * * @method Phaser.Physics.Matter.World#disableGravity * @since 3.0.0 * - * @return {Phaser.Physics.Matter.World} This Matter World object. + * @return {this} This Matter World object. */ disableGravity: function () { @@ -189678,16 +192084,18 @@ var World = new Class({ }, /** - * Sets the world's gravity + * Sets the worlds gravity to the values given. + * + * Gravity effects all bodies in the world, unless they have the `ignoreGravity` flag set. * * @method Phaser.Physics.Matter.World#setGravity * @since 3.0.0 * * @param {number} [x=0] - The world gravity x component. * @param {number} [y=1] - The world gravity y component. - * @param {number} [scale] - [description] + * @param {number} [scale=0.001] - The gravity scale factor. * - * @return {Phaser.Physics.Matter.World} This Matter World object. + * @return {this} This Matter World object. */ setGravity: function (x, y, scale) { @@ -189717,7 +192125,7 @@ var World = new Class({ * @param {number} height - The height of the body. * @param {object} options - Optional Matter configuration object. * - * @return {MatterJS.Body} The Matter.js body that was created. + * @return {MatterJS.BodyType} The Matter.js body that was created. */ create: function (x, y, width, height, options) { @@ -189729,14 +192137,18 @@ var World = new Class({ }, /** - * Adds an object to the world. + * Adds a Matter JS object, or array of objects, to the world. + * + * The objects should be valid Matter JS entities, such as a Body, Composite or Constraint. + * + * Triggers `beforeAdd` and `afterAdd` events. * * @method Phaser.Physics.Matter.World#add * @since 3.0.0 * - * @param {(object|object[])} object - Can be single or an array, and can be a body, composite or constraint + * @param {(object|object[])} object - Can be single object, or an array, and can be a body, composite or constraint. * - * @return {Phaser.Physics.Matter.World} This Matter World object. + * @return {this} This Matter World object. */ add: function (object) { @@ -189746,35 +192158,51 @@ var World = new Class({ }, /** - * [description] + * Removes a Matter JS object, or array of objects, from the world. + * + * The objects should be valid Matter JS entities, such as a Body, Composite or Constraint. + * + * Triggers `beforeRemove` and `afterRemove` events. * * @method Phaser.Physics.Matter.World#remove * @since 3.0.0 * - * @param {object} object - The object to be removed from the world. - * @param {boolean} deep - [description] + * @param {(object|object[])} object - Can be single object, or an array, and can be a body, composite or constraint. + * @param {boolean} [deep=false] - Optionally search the objects children and recursively remove those as well. * - * @return {Phaser.Physics.Matter.World} This Matter World object. + * @return {this} This Matter World object. */ remove: function (object, deep) { - var body = (object.body) ? object.body : object; + if (!Array.isArray(object)) + { + object = [ object ]; + } - Composite.remove(this.localWorld, body, deep); + for (var i = 0; i < object.length; i++) + { + var entity = object[i]; + + var body = (entity.body) ? entity.body : entity; + + Composite.remove(this.localWorld, body, deep); + } return this; }, /** - * [description] + * Removes a Matter JS constraint, or array of constraints, from the world. + * + * Triggers `beforeRemove` and `afterRemove` events. * * @method Phaser.Physics.Matter.World#removeConstraint * @since 3.0.0 * - * @param {MatterJS.Constraint} constraint - [description] - * @param {boolean} deep - [description] + * @param {(MatterJS.ConstraintType|MatterJS.ConstraintType[])} constraint - A Matter JS Constraint, or an array of constraints, to be removed. + * @param {boolean} [deep=false] - Optionally search the objects children and recursively remove those as well. * - * @return {Phaser.Physics.Matter.World} This Matter World object. + * @return {this} This Matter World object. */ removeConstraint: function (constraint, deep) { @@ -189784,17 +192212,18 @@ var World = new Class({ }, /** - * Adds MatterTileBody instances for all the colliding tiles within the given tilemap layer. Set - * the appropriate tiles in your layer to collide before calling this method! + * Adds `MatterTileBody` instances for all the colliding tiles within the given tilemap layer. + * + * Set the appropriate tiles in your layer to collide before calling this method! * * @method Phaser.Physics.Matter.World#convertTilemapLayer * @since 3.0.0 * * @param {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} tilemapLayer - * An array of tiles. - * @param {object} [options] - Options to be passed to the MatterTileBody constructor. {@ee Phaser.Physics.Matter.TileBody} + * @param {object} [options] - Options to be passed to the MatterTileBody constructor. {@see Phaser.Physics.Matter.TileBody} * - * @return {Phaser.Physics.Matter.World} This Matter World object. + * @return {this} This Matter World object. */ convertTilemapLayer: function (tilemapLayer, options) { @@ -189807,7 +192236,7 @@ var World = new Class({ }, /** - * Adds MatterTileBody instances for the given tiles. This adds bodies regardless of whether the + * Adds `MatterTileBody` instances for the given tiles. This adds bodies regardless of whether the * tiles are set to collide or not. * * @method Phaser.Physics.Matter.World#convertTiles @@ -189816,7 +192245,7 @@ var World = new Class({ * @param {Phaser.Tilemaps.Tile[]} tiles - An array of tiles. * @param {object} [options] - Options to be passed to the MatterTileBody constructor. {@see Phaser.Physics.Matter.TileBody} * - * @return {Phaser.Physics.Matter.World} This Matter World object. + * @return {this} This Matter World object. */ convertTiles: function (tiles, options) { @@ -189834,14 +192263,15 @@ var World = new Class({ }, /** - * [description] + * Returns the next unique group index for which bodies will collide. + * If `isNonColliding` is `true`, returns the next unique group index for which bodies will not collide. * * @method Phaser.Physics.Matter.World#nextGroup * @since 3.0.0 * - * @param {boolean} isNonColliding - [description] + * @param {boolean} [isNonColliding=false] - If `true`, returns the next unique group index for which bodies will _not_ collide. * - * @return {number} [description] + * @return {number} Unique category bitfield */ nextGroup: function (isNonColliding) { @@ -189849,12 +192279,13 @@ var World = new Class({ }, /** - * [description] + * Returns the next unique category bitfield (starting after the initial default category 0x0001). + * There are 32 available. * * @method Phaser.Physics.Matter.World#nextCategory * @since 3.0.0 * - * @return {number} Returns the next unique category bitfield. + * @return {number} Unique category bitfield */ nextCategory: function () { @@ -189862,13 +192293,15 @@ var World = new Class({ }, /** - * [description] + * Pauses this Matter World instance and sets `enabled` to `false`. + * + * A paused world will not run any simulations for the duration it is paused. * * @method Phaser.Physics.Matter.World#pause * @fires Phaser.Physics.Matter.Events#PAUSE * @since 3.0.0 * - * @return {Phaser.Physics.Matter.World} This Matter World object. + * @return {this} This Matter World object. */ pause: function () { @@ -189880,13 +192313,13 @@ var World = new Class({ }, /** - * [description] + * Resumes this Matter World instance from a paused state and sets `enabled` to `true`. * * @method Phaser.Physics.Matter.World#resume * @fires Phaser.Physics.Matter.Events#RESUME * @since 3.0.0 * - * @return {Phaser.Physics.Matter.World} This Matter World object. + * @return {this} This Matter World object. */ resume: function () { @@ -189898,7 +192331,18 @@ var World = new Class({ }, /** - * [description] + * The internal update method. This is called automatically by the parent Scene. + * + * Moves the simulation forward in time by delta ms. Uses `World.correction` value as an optional number that + * specifies the time correction factor to apply to the update. This can help improve the accuracy of the + * simulation in cases where delta is changing between updates. The value of correction is defined as `delta / lastDelta`, + * i.e. the percentage change of delta over the last step. Therefore the value is always 1 (no correction) when + * delta is constant (or when no correction is desired, which is the default). + * See the paper on Time Corrected Verlet for more information. + * + * Triggers `beforeUpdate` and `afterUpdate` events. Triggers `collisionStart`, `collisionActive` and `collisionEnd` events. + * + * If the World is paused, `update` is still run, but exits early and does not update the Matter Engine. * * @method Phaser.Physics.Matter.World#update * @since 3.0.0 @@ -189908,10 +192352,69 @@ var World = new Class({ */ update: function (time, delta) { - if (this.enabled && this.autoUpdate) + if (!this.enabled || !this.autoUpdate) { - Engine.update(this.engine, this.getDelta(time, delta), this.correction); + return; } + + var engine = this.engine; + var runner = this.runner; + + var timing = engine.timing; + var correction = this.correction; + + if (runner.isFixed) + { + // fixed timestep + delta = this.getDelta(time, delta); + } + else + { + // dynamic timestep based on wall clock between calls + delta = (time - runner.timePrev) || runner.delta; + runner.timePrev = time; + + // optimistically filter delta over a few frames, to improve stability + runner.deltaHistory.push(delta); + runner.deltaHistory = runner.deltaHistory.slice(-runner.deltaSampleSize); + delta = Math.min.apply(null, runner.deltaHistory); + + // limit delta + delta = delta < runner.deltaMin ? runner.deltaMin : delta; + delta = delta > runner.deltaMax ? runner.deltaMax : delta; + + // correction for delta + correction = delta / runner.delta; + + // update engine timing object + runner.delta = delta; + } + + // time correction for time scaling + if (runner.timeScalePrev !== 0) + { + correction *= timing.timeScale / runner.timeScalePrev; + } + + if (timing.timeScale === 0) + { + correction = 0; + } + + runner.timeScalePrev = timing.timeScale; + runner.correction = correction; + + // fps counter + runner.frameCounter += 1; + + if (time - runner.counterTimestamp >= 1000) + { + runner.fps = runner.frameCounter * ((time - runner.counterTimestamp) / 1000); + runner.counterTimestamp = time; + runner.frameCounter = 0; + } + + Engine.update(engine, delta, correction); }, /** @@ -189938,8 +192441,8 @@ var World = new Class({ * @method Phaser.Physics.Matter.World#step * @since 3.4.0 * - * @param {number} [delta=16.666] - [description] - * @param {number} [correction=1] - [description] + * @param {number} [delta=16.666] - The delta value. + * @param {number} [correction=1] - Optional delta correction value. */ step: function (delta, correction) { @@ -189972,8 +192475,66 @@ var World = new Class({ return 1000 / 30; }, + /** + * Returns `true` if the given body can be found within the World. + * + * @method Phaser.Physics.Matter.World#has + * @since 3.22.0 + * + * @param {(MatterJS.Body|Phaser.GameObjects.GameObject)} body - The Matter Body, or Game Object, to search for within the world. + * + * @return {MatterJS.BodyType[]} An array of all the Matter JS Bodies in this World. + */ + has: function (body) + { + var src = (body.hasOwnProperty('body')) ? body.body : body; + + return (Composite.get(this.localWorld, src.id, src.type) !== null); + }, + + /** + * Returns all the bodies in the Matter World, including all bodies in children, recursively. + * + * @method Phaser.Physics.Matter.World#getAllBodies + * @since 3.22.0 + * + * @return {MatterJS.BodyType[]} An array of all the Matter JS Bodies in this World. + */ + getAllBodies: function () + { + return Composite.allBodies(this.localWorld); + }, + + /** + * Returns all the constraints in the Matter World, including all constraints in children, recursively. + * + * @method Phaser.Physics.Matter.World#getAllConstraints + * @since 3.22.0 + * + * @return {MatterJS.ConstraintType[]} An array of all the Matter JS Constraints in this World. + */ + getAllConstraints: function () + { + return Composite.allConstraints(this.localWorld); + }, + + /** + * Returns all the composites in the Matter World, including all composites in children, recursively. + * + * @method Phaser.Physics.Matter.World#getAllComposites + * @since 3.22.0 + * + * @return {MatterJS.CompositeType[]} An array of all the Matter JS Composites in this World. + */ + getAllComposites: function () + { + return Composite.allComposites(this.localWorld); + }, + /** * Handles the rendering of bodies and debug information to the debug Graphics object, if enabled. + * + * This method is called automatically by the Scene after all processing has taken place. * * @method Phaser.Physics.Matter.World#postUpdate * @private @@ -189986,130 +192547,451 @@ var World = new Class({ return; } - this.debugGraphic.clear(); + var config = this.debugConfig; + var engine = this.engine; + var graphics = this.debugGraphic; var bodies = Composite.allBodies(this.localWorld); - if (this.defaults.debugWireframes) - { - if (this.defaults.debugShowConvexHulls) - { - this.renderConvexHulls(bodies); - } + this.debugGraphic.clear(); - this.renderWireframes(bodies); + if (config.showBroadphase && engine.broadphase.controller) + { + this.renderGrid(engine.broadphase, graphics, config.broadphaseColor, 0.5); } - else + + if (config.showBounds) + { + this.renderBodyBounds(bodies, graphics, config.boundsColor, 0.5); + } + + if (config.showBody || config.showStaticBody) { this.renderBodies(bodies); } - if (this.defaults.debugShowJoint) + if (config.showJoint) { this.renderJoints(); } + + if (config.showAxes || config.showAngleIndicator) + { + this.renderBodyAxes(bodies, graphics, config.showAxes, config.angleColor, 0.5); + } + + if (config.showVelocity) + { + this.renderBodyVelocity(bodies, graphics, config.velocityColor, 1, 2); + } + + if (config.showSeparations) + { + this.renderSeparations(engine.pairs.list, graphics, config.separationColor); + } + + if (config.showCollisions) + { + this.renderCollisions(engine.pairs.list, graphics, config.collisionColor); + } }, /** - * Renders the debug convex hulls from the given array of bodies. - * - * @method Phaser.Physics.Matter.World#renderConvexHulls - * @private - * @since 3.14.0 + * Renders the Engine Broadphase Controller Grid to the given Graphics instance. * - * @param {array} bodies - An array of bodies from the localWorld. + * The debug renderer calls this method if the `showBroadphase` config value is set. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render the Grid to your own Graphics instance. + * + * @method Phaser.Physics.Matter.World#renderGrid + * @since 3.22.0 + * + * @param {MatterJS.Grid} grid - The Matter Grid to be rendered. + * @param {Phaser.GameObjects.Graphics} graphics - The Graphics object to render to. + * @param {number} lineColor - The line color. + * @param {number} lineOpacity - The line opacity, between 0 and 1. + * + * @return {this} This Matter World instance for method chaining. */ - renderConvexHulls: function (bodies) + renderGrid: function (grid, graphics, lineColor, lineOpacity) { - var graphics = this.debugGraphic; + graphics.lineStyle(1, lineColor, lineOpacity); - graphics.lineStyle(1, this.defaults.debugConvexHullColor); + var bucketKeys = Common.keys(grid.buckets); - graphics.beginPath(); - - for (var i = 0; i < bodies.length; i++) + for (var i = 0; i < bucketKeys.length; i++) { - var body = bodies[i]; + var bucketId = bucketKeys[i]; - if (!body.render.visible || body.parts.length === 1) + if (grid.buckets[bucketId].length < 2) { continue; } - graphics.moveTo(body.vertices[0].x, body.vertices[0].y); + var region = bucketId.split(/C|R/); - for (var j = 1; j < body.vertices.length; j++) - { - graphics.lineTo(body.vertices[j].x, body.vertices[j].y); - } - - graphics.lineTo(body.vertices[0].x, body.vertices[0].y); + graphics.strokeRect( + parseInt(region[1], 10) * grid.bucketWidth, + parseInt(region[2], 10) * grid.bucketHeight, + grid.bucketWidth, + grid.bucketHeight + ); } - graphics.strokePath(); + return this; }, /** - * Renders the wireframes of the given array of bodies. + * Renders the list of Pair separations to the given Graphics instance. + * + * The debug renderer calls this method if the `showSeparations` config value is set. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render the Grid to your own Graphics instance. + * + * @method Phaser.Physics.Matter.World#renderSeparations + * @since 3.22.0 + * + * @param {MatterJS.Pair[]} pairs - An array of Matter Pairs to be rendered. + * @param {Phaser.GameObjects.Graphics} graphics - The Graphics object to render to. + * @param {number} lineColor - The line color. + * + * @return {this} This Matter World instance for method chaining. + */ + renderSeparations: function (pairs, graphics, lineColor) + { + graphics.lineStyle(1, lineColor, 1); + + for (var i = 0; i < pairs.length; i++) + { + var pair = pairs[i]; + + if (!pair.isActive) + { + continue; + } + + var collision = pair.collision; + var bodyA = collision.bodyA; + var bodyB = collision.bodyB; + var posA = bodyA.position; + var posB = bodyB.position; + var penetration = collision.penetration; + + var k = (!bodyA.isStatic && !bodyB.isStatic) ? 4 : 1; + + if (bodyB.isStatic) + { + k = 0; + } + + graphics.lineBetween( + posB.x, + posB.y, + posB.x - (penetration.x * k), + posB.y - (penetration.y * k) + ); + + k = (!bodyA.isStatic && !bodyB.isStatic) ? 4 : 1; + + if (bodyA.isStatic) + { + k = 0; + } + + graphics.lineBetween( + posA.x, + posA.y, + posA.x - (penetration.x * k), + posA.y - (penetration.y * k) + ); + } + + return this; + }, + + /** + * Renders the list of collision points and normals to the given Graphics instance. + * + * The debug renderer calls this method if the `showCollisions` config value is set. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render the Grid to your own Graphics instance. + * + * @method Phaser.Physics.Matter.World#renderCollisions + * @since 3.22.0 + * + * @param {MatterJS.Pair[]} pairs - An array of Matter Pairs to be rendered. + * @param {Phaser.GameObjects.Graphics} graphics - The Graphics object to render to. + * @param {number} lineColor - The line color. + * + * @return {this} This Matter World instance for method chaining. + */ + renderCollisions: function (pairs, graphics, lineColor) + { + graphics.lineStyle(1, lineColor, 0.5); + graphics.fillStyle(lineColor, 1); + + var i; + var pair; + + // Collision Positions + + for (i = 0; i < pairs.length; i++) + { + pair = pairs[i]; + + if (!pair.isActive) + { + continue; + } + + for (var j = 0; j < pair.activeContacts.length; j++) + { + var contact = pair.activeContacts[j]; + var vertex = contact.vertex; + + graphics.fillRect(vertex.x - 2, vertex.y - 2, 5, 5); + } + } + + // Collision Normals + + for (i = 0; i < pairs.length; i++) + { + pair = pairs[i]; + + if (!pair.isActive) + { + continue; + } + + var collision = pair.collision; + var contacts = pair.activeContacts; + + if (contacts.length > 0) + { + var normalPosX = contacts[0].vertex.x; + var normalPosY = contacts[0].vertex.y; + + if (contacts.length === 2) + { + normalPosX = (contacts[0].vertex.x + contacts[1].vertex.x) / 2; + normalPosY = (contacts[0].vertex.y + contacts[1].vertex.y) / 2; + } + + if (collision.bodyB === collision.supports[0].body || collision.bodyA.isStatic) + { + graphics.lineBetween( + normalPosX - collision.normal.x * 8, + normalPosY - collision.normal.y * 8, + normalPosX, + normalPosY + ); + } + else + { + graphics.lineBetween( + normalPosX + collision.normal.x * 8, + normalPosY + collision.normal.y * 8, + normalPosX, + normalPosY + ); + } + } + } + + return this; + }, + + /** + * Renders the bounds of an array of Bodies to the given Graphics instance. + * + * If the body is a compound body, it will render the bounds for the parent compound. + * + * The debug renderer calls this method if the `showBounds` config value is set. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render bounds to your own Graphics instance. * - * @method Phaser.Physics.Matter.World#renderWireframes - * @private - * @since 3.14.0 + * @method Phaser.Physics.Matter.World#renderBodyBounds + * @since 3.22.0 * * @param {array} bodies - An array of bodies from the localWorld. + * @param {Phaser.GameObjects.Graphics} graphics - The Graphics object to render to. + * @param {number} lineColor - The line color. + * @param {number} lineOpacity - The line opacity, between 0 and 1. */ - renderWireframes: function (bodies) + renderBodyBounds: function (bodies, graphics, lineColor, lineOpacity) { - var graphics = this.debugGraphic; - var showInternalEdges = this.defaults.debugShowInternalEdges; - - graphics.lineStyle(1, this.defaults.bodyDebugColor); - - graphics.beginPath(); + graphics.lineStyle(1, lineColor, lineOpacity); for (var i = 0; i < bodies.length; i++) { var body = bodies[i]; + // 1) Don't show invisible bodies if (!body.render.visible) { continue; } - for (var k = (body.parts.length > 1) ? 1 : 0; k < body.parts.length; k++) + var bounds = body.bounds; + + if (bounds) { - var part = body.parts[k]; + graphics.strokeRect( + bounds.min.x, + bounds.min.y, + bounds.max.x - bounds.min.x, + bounds.max.y - bounds.min.y + ); + } + else + { + var parts = body.parts; - var vertLength = part.vertices.length; - - graphics.moveTo(part.vertices[0].x, part.vertices[0].y); - - for (var j = 1; j < vertLength; j++) + for (var j = parts.length > 1 ? 1 : 0; j < parts.length; j++) { - if (!part.vertices[j - 1].isInternal || showInternalEdges) - { - graphics.lineTo(part.vertices[j].x, part.vertices[j].y); - } - else - { - graphics.moveTo(part.vertices[j].x, part.vertices[j].y); - } - - if (part.vertices[j].isInternal && !showInternalEdges) - { - graphics.moveTo(part.vertices[(j + 1) % vertLength].x, part.vertices[(j + 1) % vertLength].y); - } + var part = parts[j]; + + graphics.strokeRect( + part.bounds.min.x, + part.bounds.min.y, + part.bounds.max.x - part.bounds.min.x, + part.bounds.max.y - part.bounds.min.y + ); } - - graphics.lineTo(part.vertices[0].x, part.vertices[0].y); } } - graphics.strokePath(); + return this; }, /** - * Renders the array of bodies. + * Renders either all axes, or a single axis indicator, for an array of Bodies, to the given Graphics instance. + * + * The debug renderer calls this method if the `showAxes` or `showAngleIndicator` config values are set. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render bounds to your own Graphics instance. + * + * @method Phaser.Physics.Matter.World#renderBodyAxes + * @since 3.22.0 + * + * @param {array} bodies - An array of bodies from the localWorld. + * @param {Phaser.GameObjects.Graphics} graphics - The Graphics object to render to. + * @param {boolean} showAxes - If `true` it will render all body axes. If `false` it will render a single axis indicator. + * @param {number} lineColor - The line color. + * @param {number} lineOpacity - The line opacity, between 0 and 1. + */ + renderBodyAxes: function (bodies, graphics, showAxes, lineColor, lineOpacity) + { + graphics.lineStyle(1, lineColor, lineOpacity); + + for (var i = 0; i < bodies.length; i++) + { + var body = bodies[i]; + var parts = body.parts; + + // 1) Don't show invisible bodies + if (!body.render.visible) + { + continue; + } + + var part; + var j; + var k; + + if (showAxes) + { + for (j = parts.length > 1 ? 1 : 0; j < parts.length; j++) + { + part = parts[j]; + + for (k = 0; k < part.axes.length; k++) + { + var axis = part.axes[k]; + + graphics.lineBetween( + part.position.x, + part.position.y, + part.position.x + axis.x * 20, + part.position.y + axis.y * 20 + ); + } + } + } + else + { + for (j = parts.length > 1 ? 1 : 0; j < parts.length; j++) + { + part = parts[j]; + + for (k = 0; k < part.axes.length; k++) + { + graphics.lineBetween( + part.position.x, + part.position.y, + (part.vertices[0].x + part.vertices[part.vertices.length - 1].x) / 2, + (part.vertices[0].y + part.vertices[part.vertices.length - 1].y) / 2 + ); + } + } + } + } + + return this; + }, + + /** + * Renders a velocity indicator for an array of Bodies, to the given Graphics instance. + * + * The debug renderer calls this method if the `showVelocity` config value is set. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render bounds to your own Graphics instance. + * + * @method Phaser.Physics.Matter.World#renderBodyVelocity + * @since 3.22.0 + * + * @param {array} bodies - An array of bodies from the localWorld. + * @param {Phaser.GameObjects.Graphics} graphics - The Graphics object to render to. + * @param {number} lineColor - The line color. + * @param {number} lineOpacity - The line opacity, between 0 and 1. + * @param {number} lineThickness - The line thickness. + */ + renderBodyVelocity: function (bodies, graphics, lineColor, lineOpacity, lineThickness) + { + graphics.lineStyle(lineThickness, lineColor, lineOpacity); + + for (var i = 0; i < bodies.length; i++) + { + var body = bodies[i]; + + // 1) Don't show invisible bodies + if (!body.render.visible) + { + continue; + } + + graphics.lineBetween( + body.position.x, + body.position.y, + body.position.x + (body.position.x - body.positionPrev.x) * 2, + body.position.y + (body.position.y - body.positionPrev.y) * 2 + ); + } + + return this; + }, + + /** + * Renders the given array of Bodies to the debug graphics instance. + * + * Called automatically by the `postUpdate` method. * * @method Phaser.Physics.Matter.World#renderBodies * @private @@ -190121,94 +193003,272 @@ var World = new Class({ { var graphics = this.debugGraphic; - var showInternalEdges = this.defaults.debugShowInternalEdges || !this.defaults.debugWireframes; - var showSleeping = this.defaults.debugShowSleeping; - var wireframes = this.defaults.debugWireframes; + var config = this.debugConfig; - var body; - var part; - var i; - var k; + var showBody = config.showBody; + var showStaticBody = config.showStaticBody; + var showSleeping = config.showSleeping; + var showInternalEdges = config.showInternalEdges; + var showConvexHulls = config.showConvexHulls; - for (i = 0; i < bodies.length; i++) + var renderFill = config.renderFill; + var renderLine = config.renderLine; + + var staticBodySleepOpacity = config.staticBodySleepOpacity; + var sleepFillColor = config.sleepFillColor; + var sleepLineColor = config.sleepLineColor; + + var hullColor = config.hullColor; + + for (var i = 0; i < bodies.length; i++) { - body = bodies[i]; + var body = bodies[i]; + // 1) Don't show invisible bodies if (!body.render.visible) { continue; } - // Handle compound parts - for (k = body.parts.length > 1 ? 1 : 0; k < body.parts.length; k++) + // 2) Don't show static bodies, OR + // 3) Don't show dynamic bodies + if ((!showStaticBody && body.isStatic) || (!showBody && !body.isStatic)) { - part = body.parts[k]; + continue; + } - if (!part.render.visible) - { - continue; - } + var lineColor = body.render.lineColor; + var lineOpacity = body.render.lineOpacity; + var lineThickness = body.render.lineThickness; + var fillColor = body.render.fillColor; + var fillOpacity = body.render.fillOpacity; - if (showSleeping && body.isSleeping) + if (showSleeping && body.isSleeping) + { + if (body.isStatic) { - graphics.lineStyle(1, this.defaults.bodyDebugColor, 0.5 * part.render.opacity); - graphics.fillStyle(this.defaults.bodyDebugColor, 0.5 * part.render.opacity); + lineOpacity *= staticBodySleepOpacity; + fillOpacity *= staticBodySleepOpacity; } else { - graphics.lineStyle(1, this.defaults.bodyDebugColor, part.render.opacity); - graphics.fillStyle(this.defaults.bodyDebugColor, part.render.opacity); + lineColor = sleepLineColor; + fillColor = sleepFillColor; } + } - // Part polygon - if (part.circleRadius) - { - graphics.beginPath(); - graphics.arc(part.position.x, part.position.y, part.circleRadius, 0, 2 * Math.PI); - } - else - { - graphics.beginPath(); - graphics.moveTo(part.vertices[0].x, part.vertices[0].y); + if (!renderFill) + { + fillColor = null; + } - var vertLength = part.vertices.length; + if (!renderLine) + { + lineColor = null; + } - for (var j = 1; j < vertLength; j++) - { - if (!part.vertices[j - 1].isInternal || showInternalEdges) - { - graphics.lineTo(part.vertices[j].x, part.vertices[j].y); - } - else - { - graphics.moveTo(part.vertices[j].x, part.vertices[j].y); - } + this.renderBody(body, graphics, showInternalEdges, lineColor, lineOpacity, lineThickness, fillColor, fillOpacity); - if (part.vertices[j].isInternal && !showInternalEdges) - { - graphics.moveTo(part.vertices[(j + 1) % part.vertices.length].x, part.vertices[(j + 1) % part.vertices.length].y); - } - } - - graphics.lineTo(part.vertices[0].x, part.vertices[0].y); + var partsLength = body.parts.length; - graphics.closePath(); - } - - if (!wireframes) - { - graphics.fillPath(); - } - else - { - graphics.strokePath(); - } + if (showConvexHulls && partsLength > 1) + { + this.renderConvexHull(body, graphics, hullColor, lineThickness); } } }, /** - * Renders world constraints. + * Renders a single Matter Body to the given Phaser Graphics Game Object. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render a Body to your own Graphics instance. + * + * If you don't wish to render a line around the body, set the `lineColor` parameter to `null`. + * Equally, if you don't wish to render a fill, set the `fillColor` parameter to `null`. + * + * @method Phaser.Physics.Matter.World#renderBody + * @since 3.22.0 + * + * @param {MatterJS.BodyType} body - The Matter Body to be rendered. + * @param {Phaser.GameObjects.Graphics} graphics - The Graphics object to render to. + * @param {boolean} showInternalEdges - Render internal edges of the polygon? + * @param {number} [lineColor] - The line color. + * @param {number} [lineOpacity] - The line opacity, between 0 and 1. + * @param {number} [lineThickness=1] - The line thickness. + * @param {number} [fillColor] - The fill color. + * @param {number} [fillOpacity] - The fill opacity, between 0 and 1. + * + * @return {this} This Matter World instance for method chaining. + */ + renderBody: function (body, graphics, showInternalEdges, lineColor, lineOpacity, lineThickness, fillColor, fillOpacity) + { + if (lineColor === undefined) { lineColor = null; } + if (lineOpacity === undefined) { lineOpacity = null; } + if (lineThickness === undefined) { lineThickness = 1; } + if (fillColor === undefined) { fillColor = null; } + if (fillOpacity === undefined) { fillOpacity = null; } + + var config = this.debugConfig; + + var sensorFillColor = config.sensorFillColor; + var sensorLineColor = config.sensorLineColor; + + // Handle compound parts + var parts = body.parts; + var partsLength = parts.length; + + for (var k = (partsLength > 1) ? 1 : 0; k < partsLength; k++) + { + var part = parts[k]; + var render = part.render; + var opacity = render.opacity; + + if (!render.visible || opacity === 0 || (part.isSensor && !config.showSensors)) + { + continue; + } + + // Part polygon + var circleRadius = part.circleRadius; + + graphics.beginPath(); + + if (part.isSensor) + { + if (fillColor !== null) + { + graphics.fillStyle(sensorFillColor, fillOpacity * opacity); + } + + if (lineColor !== null) + { + graphics.lineStyle(lineThickness, sensorLineColor, lineOpacity * opacity); + } + } + else + { + if (fillColor !== null) + { + graphics.fillStyle(fillColor, fillOpacity * opacity); + } + + if (lineColor !== null) + { + graphics.lineStyle(lineThickness, lineColor, lineOpacity * opacity); + } + } + + if (circleRadius) + { + graphics.arc(part.position.x, part.position.y, circleRadius, 0, 2 * Math.PI); + } + else + { + var vertices = part.vertices; + var vertLength = vertices.length; + + graphics.moveTo(vertices[0].x, vertices[0].y); + + for (var j = 1; j < vertLength; j++) + { + var vert = vertices[j]; + + if (!vertices[j - 1].isInternal || showInternalEdges) + { + graphics.lineTo(vert.x, vert.y); + } + else + { + graphics.moveTo(vert.x, vert.y); + } + + if (j < vertLength && vert.isInternal && !showInternalEdges) + { + var nextIndex = (j + 1) % vertLength; + + graphics.moveTo(vertices[nextIndex].x, vertices[nextIndex].y); + } + } + + graphics.closePath(); + } + + if (fillColor !== null) + { + graphics.fillPath(); + } + + if (lineColor !== null) + { + graphics.strokePath(); + } + } + + if (config.showPositions && !body.isStatic) + { + var px = body.position.x; + var py = body.position.y; + var hs = Math.ceil(config.positionSize / 2); + + graphics.fillStyle(config.positionColor, 1); + graphics.fillRect(px - hs, py - hs, config.positionSize, config.positionSize); + } + + return this; + }, + + /** + * Renders the Convex Hull for a single Matter Body to the given Phaser Graphics Game Object. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render a Body hull to your own Graphics instance. + * + * @method Phaser.Physics.Matter.World#renderConvexHull + * @since 3.22.0 + * + * @param {MatterJS.BodyType} body - The Matter Body to be rendered. + * @param {Phaser.GameObjects.Graphics} graphics - The Graphics object to render to. + * @param {number} hullColor - The color used to render the hull. + * @param {number} [lineThickness=1] - The hull line thickness. + * + * @return {this} This Matter World instance for method chaining. + */ + renderConvexHull: function (body, graphics, hullColor, lineThickness) + { + if (lineThickness === undefined) { lineThickness = 1; } + + var parts = body.parts; + var partsLength = parts.length; + + // Render Convex Hulls + if (partsLength > 1) + { + var verts = body.vertices; + + graphics.lineStyle(lineThickness, hullColor); + + graphics.beginPath(); + + graphics.moveTo(verts[0].x, verts[0].y); + + for (var v = 1; v < verts.length; v++) + { + graphics.lineTo(verts[v].x, verts[v].y); + } + + graphics.lineTo(verts[0].x, verts[0].y); + + graphics.strokePath(); + } + + return this; + }, + + /** + * Renders all of the constraints in the world (unless they are specifically set to invisible). + * + * Called automatically by the `postUpdate` method. * * @method Phaser.Physics.Matter.World#renderJoints * @private @@ -190218,123 +193278,118 @@ var World = new Class({ { var graphics = this.debugGraphic; - graphics.lineStyle(2, this.defaults.jointDebugColor); - // Render constraints var constraints = Composite.allConstraints(this.localWorld); for (var i = 0; i < constraints.length; i++) { - var constraint = constraints[i]; + var config = constraints[i].render; - if (!constraint.render.visible || !constraint.pointA || !constraint.pointB) - { - continue; - } + var lineColor = config.lineColor; + var lineOpacity = config.lineOpacity; + var lineThickness = config.lineThickness; + var pinSize = config.pinSize; + var anchorColor = config.anchorColor; + var anchorSize = config.anchorSize; - if (constraint.render.lineWidth) - { - graphics.lineStyle(constraint.render.lineWidth, Common.colorToNumber(constraint.render.strokeStyle)); - } - - var bodyA = constraint.bodyA; - var bodyB = constraint.bodyB; - var start; - var end; - - if (bodyA) - { - start = Vector.add(bodyA.position, constraint.pointA); - } - else - { - start = constraint.pointA; - } - - if (constraint.render.type === 'pin') - { - graphics.beginPath(); - graphics.arc(start.x, start.y, 3, 0, 2 * Math.PI); - graphics.closePath(); - } - else - { - if (bodyB) - { - end = Vector.add(bodyB.position, constraint.pointB); - } - else - { - end = constraint.pointB; - } - - graphics.beginPath(); - graphics.moveTo(start.x, start.y); - - if (constraint.render.type === 'spring') - { - var delta = Vector.sub(end, start); - var normal = Vector.perp(Vector.normalise(delta)); - var coils = Math.ceil(Common.clamp(constraint.length / 5, 12, 20)); - var offset; - - for (var j = 1; j < coils; j += 1) - { - offset = (j % 2 === 0) ? 1 : -1; - - graphics.lineTo( - start.x + delta.x * (j / coils) + normal.x * offset * 4, - start.y + delta.y * (j / coils) + normal.y * offset * 4 - ); - } - } - - graphics.lineTo(end.x, end.y); - } - - if (constraint.render.lineWidth) - { - graphics.strokePath(); - } - - if (constraint.render.anchors) - { - graphics.fillStyle(Common.colorToNumber(constraint.render.strokeStyle)); - graphics.beginPath(); - graphics.arc(start.x, start.y, 6, 0, 2 * Math.PI); - graphics.arc(end.x, end.y, 6, 0, 2 * Math.PI); - graphics.closePath(); - graphics.fillPath(); - } + this.renderConstraint(constraints[i], graphics, lineColor, lineOpacity, lineThickness, pinSize, anchorColor, anchorSize); } }, /** - * [description] - * - * @method Phaser.Physics.Matter.World#fromPath - * @since 3.0.0 - * - * @param {string} path - [description] - * @param {array} points - [description] - * - * @return {array} [description] + * Renders a single Matter Constraint, such as a Pin or a Spring, to the given Phaser Graphics Game Object. + * + * This method is used internally by the Matter Debug Renderer, but is also exposed publically should + * you wish to render a Constraint to your own Graphics instance. + * + * @method Phaser.Physics.Matter.World#renderConstraint + * @since 3.22.0 + * + * @param {MatterJS.ConstraintType} constraint - The Matter Constraint to render. + * @param {Phaser.GameObjects.Graphics} graphics - The Graphics object to render to. + * @param {number} lineColor - The line color. + * @param {number} lineOpacity - The line opacity, between 0 and 1. + * @param {number} lineThickness - The line thickness. + * @param {number} pinSize - If this constraint is a pin, this sets the size of the pin circle. + * @param {number} anchorColor - The color used when rendering this constraints anchors. Set to `null` to not render anchors. + * @param {number} anchorSize - The size of the anchor circle, if this constraint has anchors and is rendering them. + * + * @return {this} This Matter World instance for method chaining. */ - fromPath: function (path, points) + renderConstraint: function (constraint, graphics, lineColor, lineOpacity, lineThickness, pinSize, anchorColor, anchorSize) { - if (points === undefined) { points = []; } + var render = constraint.render; - // var pathPattern = /L?\s*([-\d.e]+)[\s,]*([-\d.e]+)*/ig; - - // eslint-disable-next-line no-useless-escape - var pathPattern = /L?\s*([\-\d\.e]+)[\s,]*([\-\d\.e]+)*/ig; - - path.replace(pathPattern, function (match, x, y) + if (!render.visible || !constraint.pointA || !constraint.pointB) { - points.push({ x: parseFloat(x), y: parseFloat(y) }); - }); + return this; + } - return points; + graphics.lineStyle(lineThickness, lineColor, lineOpacity); + + var bodyA = constraint.bodyA; + var bodyB = constraint.bodyB; + var start; + var end; + + if (bodyA) + { + start = Vector.add(bodyA.position, constraint.pointA); + } + else + { + start = constraint.pointA; + } + + if (render.type === 'pin') + { + graphics.strokeCircle(start.x, start.y, pinSize); + } + else + { + if (bodyB) + { + end = Vector.add(bodyB.position, constraint.pointB); + } + else + { + end = constraint.pointB; + } + + graphics.beginPath(); + graphics.moveTo(start.x, start.y); + + if (render.type === 'spring') + { + var delta = Vector.sub(end, start); + var normal = Vector.perp(Vector.normalise(delta)); + var coils = Math.ceil(Common.clamp(constraint.length / 5, 12, 20)); + var offset; + + for (var j = 1; j < coils; j += 1) + { + offset = (j % 2 === 0) ? 1 : -1; + + graphics.lineTo( + start.x + delta.x * (j / coils) + normal.x * offset * 4, + start.y + delta.y * (j / coils) + normal.y * offset * 4 + ); + } + } + + graphics.lineTo(end.x, end.y); + } + + graphics.strokePath(); + + if (render.anchors && anchorSize > 0) + { + graphics.fillStyle(anchorColor); + graphics.fillCircle(start.x, start.y, anchorSize); + graphics.fillCircle(end.x, end.y, anchorSize); + } + + return this; }, /** @@ -190400,16 +193455,16 @@ module.exports = World; /***/ }), -/* 1376 */ +/* 1387 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -__webpack_require__(495); +__webpack_require__(512); var CONST = __webpack_require__(29); var Extend = __webpack_require__(17); @@ -190420,38 +193475,38 @@ var Extend = __webpack_require__(17); var Phaser = { - Actions: __webpack_require__(237), - Animations: __webpack_require__(613), + Actions: __webpack_require__(238), + Animations: __webpack_require__(632), BlendModes: __webpack_require__(52), - Cache: __webpack_require__(614), - Cameras: __webpack_require__(617), - Core: __webpack_require__(700), + Cache: __webpack_require__(633), + Cameras: __webpack_require__(636), + Core: __webpack_require__(719), Class: __webpack_require__(0), - Create: __webpack_require__(758), - Curves: __webpack_require__(764), - Data: __webpack_require__(767), - Display: __webpack_require__(769), - DOM: __webpack_require__(798), - Events: __webpack_require__(799), - Game: __webpack_require__(801), - GameObjects: __webpack_require__(894), - Geom: __webpack_require__(408), - Input: __webpack_require__(1176), - Loader: __webpack_require__(1210), - Math: __webpack_require__(166), - Physics: __webpack_require__(1377), - Plugins: __webpack_require__(1277), - Renderer: __webpack_require__(1434), - Scale: __webpack_require__(1279), - ScaleModes: __webpack_require__(230), - Scene: __webpack_require__(354), - Scenes: __webpack_require__(1280), - Structs: __webpack_require__(1282), - Textures: __webpack_require__(1283), - Tilemaps: __webpack_require__(1285), - Time: __webpack_require__(1326), - Tweens: __webpack_require__(1328), - Utils: __webpack_require__(1346) + Create: __webpack_require__(781), + Curves: __webpack_require__(787), + Data: __webpack_require__(790), + Display: __webpack_require__(792), + DOM: __webpack_require__(809), + Events: __webpack_require__(810), + Game: __webpack_require__(812), + GameObjects: __webpack_require__(905), + Geom: __webpack_require__(422), + Input: __webpack_require__(1187), + Loader: __webpack_require__(1221), + Math: __webpack_require__(168), + Physics: __webpack_require__(1388), + Plugins: __webpack_require__(1292), + Renderer: __webpack_require__(1448), + Scale: __webpack_require__(1294), + ScaleModes: __webpack_require__(231), + Scene: __webpack_require__(368), + Scenes: __webpack_require__(1295), + Structs: __webpack_require__(1297), + Textures: __webpack_require__(1298), + Tilemaps: __webpack_require__(1300), + Time: __webpack_require__(1341), + Tweens: __webpack_require__(1343), + Utils: __webpack_require__(1360) }; @@ -190459,7 +193514,7 @@ var Phaser = { if (true) { - Phaser.Sound = __webpack_require__(1356); + Phaser.Sound = __webpack_require__(1370); } if (false) @@ -190491,15 +193546,15 @@ global.Phaser = Phaser; * -- Dick Brandon */ -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(483))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(511))) /***/ }), -/* 1377 */ +/* 1388 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -190513,20 +193568,20 @@ global.Phaser = Phaser; module.exports = { - Arcade: __webpack_require__(1236), - Impact: __webpack_require__(1378), - Matter: __webpack_require__(1401) + Arcade: __webpack_require__(1247), + Impact: __webpack_require__(1389), + Matter: __webpack_require__(1412) }; /***/ }), -/* 1378 */ +/* 1389 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -190547,32 +193602,32 @@ module.exports = { */ module.exports = { - Body: __webpack_require__(1357), - Events: __webpack_require__(1267), - COLLIDES: __webpack_require__(451), - CollisionMap: __webpack_require__(1358), - Factory: __webpack_require__(1359), - Image: __webpack_require__(1361), - ImpactBody: __webpack_require__(1360), - ImpactPhysics: __webpack_require__(1397), - Sprite: __webpack_require__(1362), - TYPE: __webpack_require__(452), - World: __webpack_require__(1363) + Body: __webpack_require__(1371), + Events: __webpack_require__(1278), + COLLIDES: __webpack_require__(465), + CollisionMap: __webpack_require__(1372), + Factory: __webpack_require__(1373), + Image: __webpack_require__(1375), + ImpactBody: __webpack_require__(1374), + ImpactPhysics: __webpack_require__(1408), + Sprite: __webpack_require__(1376), + TYPE: __webpack_require__(466), + World: __webpack_require__(1377) }; /***/ }), -/* 1379 */ +/* 1390 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(23); +var Clamp = __webpack_require__(22); /** * [description] @@ -190619,12 +193674,12 @@ module.exports = GetVelocity; /***/ }), -/* 1380 */ +/* 1391 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -190714,12 +193769,12 @@ module.exports = UpdateMotion; /***/ }), -/* 1381 */ +/* 1392 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -190741,12 +193796,12 @@ module.exports = 'collide'; /***/ }), -/* 1382 */ +/* 1393 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -190764,12 +193819,12 @@ module.exports = 'pause'; /***/ }), -/* 1383 */ +/* 1394 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -190787,12 +193842,12 @@ module.exports = 'resume'; /***/ }), -/* 1384 */ +/* 1395 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -190858,12 +193913,12 @@ module.exports = { /***/ }), -/* 1385 */ +/* 1396 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -190935,12 +193990,12 @@ module.exports = Acceleration; /***/ }), -/* 1386 */ +/* 1397 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -191009,16 +194064,16 @@ module.exports = BodyScale; /***/ }), -/* 1387 */ +/* 1398 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TYPE = __webpack_require__(452); +var TYPE = __webpack_require__(466); /** * The Impact Body Type component. @@ -191093,12 +194148,12 @@ module.exports = BodyType; /***/ }), -/* 1388 */ +/* 1399 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -191173,16 +194228,16 @@ module.exports = Bounce; /***/ }), -/* 1389 */ +/* 1400 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TYPE = __webpack_require__(452); +var TYPE = __webpack_require__(466); /** * The Impact Check Against component. @@ -191295,16 +194350,16 @@ module.exports = CheckAgainst; /***/ }), -/* 1390 */ +/* 1401 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var COLLIDES = __webpack_require__(451); +var COLLIDES = __webpack_require__(465); /** * @callback CollideCallback @@ -191451,12 +194506,12 @@ module.exports = Collides; /***/ }), -/* 1391 */ +/* 1402 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -191576,12 +194631,12 @@ module.exports = Debug; /***/ }), -/* 1392 */ +/* 1403 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -191653,12 +194708,12 @@ module.exports = Friction; /***/ }), -/* 1393 */ +/* 1404 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -191715,12 +194770,12 @@ module.exports = Gravity; /***/ }), -/* 1394 */ +/* 1405 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -191765,12 +194820,12 @@ module.exports = Offset; /***/ }), -/* 1395 */ +/* 1406 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -191841,12 +194896,12 @@ module.exports = SetGameObject; /***/ }), -/* 1396 */ +/* 1407 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -191941,22 +194996,22 @@ module.exports = Velocity; /***/ }), -/* 1397 */ +/* 1408 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Factory = __webpack_require__(1359); +var Factory = __webpack_require__(1373); var GetFastValue = __webpack_require__(2); -var Merge = __webpack_require__(106); -var PluginCache = __webpack_require__(21); -var SceneEvents = __webpack_require__(22); -var World = __webpack_require__(1363); +var Merge = __webpack_require__(107); +var PluginCache = __webpack_require__(23); +var SceneEvents = __webpack_require__(19); +var World = __webpack_require__(1377); /** * @classdesc @@ -192158,19 +195213,19 @@ module.exports = ImpactPhysics; /***/ }), -/* 1398 */ +/* 1409 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var COLLIDES = __webpack_require__(451); -var Events = __webpack_require__(1267); -var SeparateX = __webpack_require__(1399); -var SeparateY = __webpack_require__(1400); +var COLLIDES = __webpack_require__(465); +var Events = __webpack_require__(1278); +var SeparateX = __webpack_require__(1410); +var SeparateY = __webpack_require__(1411); /** * Impact Physics Solver @@ -192234,12 +195289,12 @@ module.exports = Solver; /***/ }), -/* 1399 */ +/* 1410 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192290,12 +195345,12 @@ module.exports = SeparateX; /***/ }), -/* 1400 */ +/* 1411 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192375,12 +195430,12 @@ module.exports = SeparateY; /***/ }), -/* 1401 */ +/* 1412 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192390,106 +195445,32 @@ module.exports = SeparateY; module.exports = { - Factory: __webpack_require__(1364), - Image: __webpack_require__(1368), - Matter: __webpack_require__(1274), - MatterPhysics: __webpack_require__(1431), - PolyDecomp: __webpack_require__(1365), - Sprite: __webpack_require__(1369), - TileBody: __webpack_require__(1271), - PhysicsEditorParser: __webpack_require__(1367), - World: __webpack_require__(1375) + BodyBounds: __webpack_require__(1378), + Factory: __webpack_require__(1379), + Image: __webpack_require__(1381), + Matter: __webpack_require__(1286), + MatterPhysics: __webpack_require__(1444), + PolyDecomp: __webpack_require__(1380), + Sprite: __webpack_require__(1382), + TileBody: __webpack_require__(1285), + PhysicsEditorParser: __webpack_require__(1282), + PhysicsJSONParser: __webpack_require__(1283), + World: __webpack_require__(1386) }; -/** - * @namespace MatterJS - */ - -/** - * @classdesc - * The `Matter.Body` module contains methods for creating and manipulating body models. - * A `Matter.Body` is a rigid body that can be simulated by a `Matter.Engine`. - * Factories for commonly used body configurations (such as rectangles, circles and other polygons) can be found in the module `Matter.Bodies`. - * - * @class MatterJS.Body - * @since 3.0.0 - */ - -/** - * @classdesc - * The `Matter.Bodies` module contains factory methods for creating rigid body models - * with commonly used body configurations (such as rectangles, circles and other polygons). - * - * @class MatterJS.Bodies - * @since 3.18.0 - */ - -/** - * @classdesc - * The `Matter.Composite` module contains methods for creating and manipulating composite bodies. - * A composite body is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`, therefore composites form a tree structure. - * It is important to use the functions in this module to modify composites, rather than directly modifying their properties. - * Note that the `Matter.World` object is also a type of `Matter.Composite` and as such all composite methods here can also operate on a `Matter.World`. - * - * @class MatterJS.Composite - * @since 3.0.0 - */ - -/** - * @classdesc - * The `Matter.World` module contains methods for creating and manipulating the world composite. - * A `Matter.World` is a `Matter.Composite` body, which is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`. - * A `Matter.World` has a few additional properties including `gravity` and `bounds`. - * It is important to use the functions in the `Matter.Composite` module to modify the world composite, rather than directly modifying its properties. - * There are also a few methods here that alias those in `Matter.Composite` for easier readability. - * - * @class MatterJS.World - * @extends MatterJS.Composite - * @since 3.0.0 - */ - -/** - * @classdesc - * The `Matter.Constraint` module contains methods for creating and manipulating constraints. - * Constraints are used for specifying that a fixed distance must be maintained between two bodies (or a body and a fixed world-space position). - * The stiffness of constraints can be modified to create springs or elastic. - * - * @class MatterJS.Constraint - * @since 3.0.0 - */ - -/** - * @classdesc - * The `Matter.Engine` module contains methods for creating and manipulating engines. - * An engine is a controller that manages updating the simulation of the world. - * - * @class MatterJS.Engine - * @since 3.0.0 - */ - -/** - * @classdesc - * The `Matter.Vertices` module contains methods for creating and manipulating sets of vertices. - * A set of vertices is an array of `Matter.Vector` with additional indexing properties inserted by `Vertices.create`. - * A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull). - * - * @class MatterJS.Vertices - * @since 3.0.0 - */ - /***/ }), -/* 1402 */ +/* 1413 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Components = __webpack_require__(493); +var Components = __webpack_require__(508); var GetFastValue = __webpack_require__(2); var Vector2 = __webpack_require__(3); @@ -192509,20 +195490,26 @@ function hasGetterOrSetter (def) } /** - * [description] + * A Matter Game Object is a generic object that allows you to combine any Phaser Game Object, + * including those you have extended or created yourself, with all of the Matter Components. + * + * This enables you to use component methods such as `setVelocity` or `isSensor` directly from + * this Game Object. * * @function Phaser.Physics.Matter.MatterGameObject * @since 3.3.0 * * @param {Phaser.Physics.Matter.World} world - The Matter world to add the body to. * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will have the Matter body applied to it. - * @param {(object|MatterJS.Body)} options - A Matter Body configuration object, or an instance of a Matter Body. + * @param {(Phaser.Types.Physics.Matter.MatterBodyConfig|MatterJS.Body)} [options] - A Matter Body configuration object, or an instance of a Matter Body. + * @param {boolean} [addToWorld=true] - Should the newly created body be immediately added to the World? * * @return {Phaser.GameObjects.GameObject} The Game Object that was created with the Matter body. */ -var MatterGameObject = function (world, gameObject, options) +var MatterGameObject = function (world, gameObject, options, addToWorld) { if (options === undefined) { options = {}; } + if (addToWorld === undefined) { addToWorld = true; } var x = gameObject.x; var y = gameObject.y; @@ -192577,7 +195564,7 @@ var MatterGameObject = function (world, gameObject, options) if (options.hasOwnProperty('type') && options.type === 'body') { - gameObject.setExistingBody(options, true); + gameObject.setExistingBody(options, addToWorld); } else { @@ -192587,6 +195574,8 @@ var MatterGameObject = function (world, gameObject, options) { shape = 'rectangle'; } + + options.addToWorld = addToWorld; gameObject.setBody(shape, options); } @@ -192598,12 +195587,12 @@ module.exports = MatterGameObject; /***/ }), -/* 1403 */ +/* 1414 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192638,12 +195627,12 @@ module.exports = Bounce; /***/ }), -/* 1404 */ +/* 1415 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192656,7 +195645,9 @@ module.exports = Bounce; var Collision = { /** - * Sets the collision category of this Game Object's Matter Body. This number must be a power of two between 2^0 (= 1) and 2^31. Two bodies with different collision groups (see {@link #setCollisionGroup}) will only collide if their collision categories are included in their collision masks (see {@link #setCollidesWith}). + * Sets the collision category of this Game Object's Matter Body. This number must be a power of two between 2^0 (= 1) and 2^31. + * Two bodies with different collision groups (see {@link #setCollisionGroup}) will only collide if their collision + * categories are included in their collision masks (see {@link #setCollidesWith}). * * @method Phaser.Physics.Matter.Components.Collision#setCollisionCategory * @since 3.0.0 @@ -192673,7 +195664,10 @@ var Collision = { }, /** - * Sets the collision group of this Game Object's Matter Body. If this is zero or two Matter Bodies have different values, they will collide according to the usual rules (see {@link #setCollisionCategory} and {@link #setCollisionGroup}). If two Matter Bodies have the same positive value, they will always collide; if they have the same negative value, they will never collide. + * Sets the collision group of this Game Object's Matter Body. If this is zero or two Matter Bodies have different values, + * they will collide according to the usual rules (see {@link #setCollisionCategory} and {@link #setCollisionGroup}). + * If two Matter Bodies have the same positive value, they will always collide; if they have the same negative value, + * they will never collide. * * @method Phaser.Physics.Matter.Components.Collision#setCollisionGroup * @since 3.0.0 @@ -192690,7 +195684,9 @@ var Collision = { }, /** - * Sets the collision mask for this Game Object's Matter Body. Two Matter Bodies with different collision groups will only collide if each one includes the other's category in its mask based on a bitwise AND, i.e. `(categoryA & maskB) !== 0` and `(categoryB & maskA) !== 0` are both true. + * Sets the collision mask for this Game Object's Matter Body. Two Matter Bodies with different collision groups will only + * collide if each one includes the other's category in its mask based on a bitwise AND, i.e. `(categoryA & maskB) !== 0` + * and `(categoryB & maskA) !== 0` are both true. * * @method Phaser.Physics.Matter.Components.Collision#setCollidesWith * @since 3.0.0 @@ -192717,6 +195713,97 @@ var Collision = { this.body.collisionFilter.mask = flags; + return this; + }, + + /** + * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object. + * + * This does not change the bodies collision category, group or filter. Those must be set in addition + * to the callback. + * + * @method Phaser.Physics.Matter.Components.Collision#setOnCollide + * @since 3.22.0 + * + * @param {function} callback - The callback to invoke when this body starts colliding with another. + * + * @return {Phaser.GameObjects.GameObject} This Game Object. + */ + setOnCollide: function (callback) + { + this.body.onCollideCallback = callback; + + return this; + }, + + /** + * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object. + * + * This does not change the bodies collision category, group or filter. Those must be set in addition + * to the callback. + * + * @method Phaser.Physics.Matter.Components.Collision#setOnCollideEnd + * @since 3.22.0 + * + * @param {function} callback - The callback to invoke when this body stops colliding with another. + * + * @return {Phaser.GameObjects.GameObject} This Game Object. + */ + setOnCollideEnd: function (callback) + { + this.body.onCollideEndCallback = callback; + + return this; + }, + + /** + * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object. + * + * This does not change the bodies collision category, group or filter. Those must be set in addition + * to the callback. + * + * @method Phaser.Physics.Matter.Components.Collision#setOnCollideActive + * @since 3.22.0 + * + * @param {function} callback - The callback to invoke for the duration of this body colliding with another. + * + * @return {Phaser.GameObjects.GameObject} This Game Object. + */ + setOnCollideActive: function (callback) + { + this.body.onCollideActiveCallback = callback; + + return this; + }, + + /** + * The callback is sent a reference to the other body, along with a `Phaser.Types.Physics.Matter.MatterCollisionData` object. + * + * This does not change the bodies collision category, group or filter. Those must be set in addition + * to the callback. + * + * @method Phaser.Physics.Matter.Components.Collision#setOnCollideWith + * @since 3.22.0 + * + * @param {(MatterJS.Body|MatterJS.Body[])} body - The body, or an array of bodies, to test for collisions with. + * @param {function} callback - The callback to invoke when this body collides with the given body or bodies. + * + * @return {Phaser.GameObjects.GameObject} This Game Object. + */ + setOnCollideWith: function (body, callback) + { + if (!Array.isArray(body)) + { + body = [ body ]; + } + + for (var i = 0; i < body.length; i++) + { + var src = (body[i].hasOwnProperty('body')) ? body[i].body : body[i]; + + this.body.setOnCollideWith(src, callback); + } + return this; } @@ -192726,12 +195813,12 @@ module.exports = Collision; /***/ }), -/* 1405 */ +/* 1416 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192786,6 +195873,8 @@ var Force = { /** * Apply thrust to the forward position of the body. + * + * Use very small values, such as 0.1, depending on the mass and required speed. * * @method Phaser.Physics.Matter.Components.Force#thrust * @since 3.0.0 @@ -192807,6 +195896,8 @@ var Force = { /** * Apply thrust to the left position of the body. + * + * Use very small values, such as 0.1, depending on the mass and required speed. * * @method Phaser.Physics.Matter.Components.Force#thrustLeft * @since 3.0.0 @@ -192828,6 +195919,8 @@ var Force = { /** * Apply thrust to the right position of the body. + * + * Use very small values, such as 0.1, depending on the mass and required speed. * * @method Phaser.Physics.Matter.Components.Force#thrustRight * @since 3.0.0 @@ -192849,6 +195942,8 @@ var Force = { /** * Apply thrust to the back position of the body. + * + * Use very small values, such as 0.1, depending on the mass and required speed. * * @method Phaser.Physics.Matter.Components.Force#thrustBack * @since 3.0.0 @@ -192874,12 +195969,12 @@ module.exports = Force; /***/ }), -/* 1406 */ +/* 1417 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192921,7 +196016,9 @@ var Friction = { }, /** - * Sets a new air resistance for this Game Object's Matter Body. A value of 0 means the Body will never slow as it moves through space. The higher the value, the faster a Body slows when moving through space. + * Sets a new air resistance for this Game Object's Matter Body. + * A value of 0 means the Body will never slow as it moves through space. + * The higher the value, the faster a Body slows when moving through space. * * @method Phaser.Physics.Matter.Components.Friction#setFrictionAir * @since 3.0.0 @@ -192938,7 +196035,9 @@ var Friction = { }, /** - * Sets a new static friction for this Game Object's Matter Body. A value of 0 means the Body will never "stick" when it is nearly stationary. The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary. + * Sets a new static friction for this Game Object's Matter Body. + * A value of 0 means the Body will never "stick" when it is nearly stationary. + * The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary. * * @method Phaser.Physics.Matter.Components.Friction#setFrictionStatic * @since 3.0.0 @@ -192960,12 +196059,12 @@ module.exports = Friction; /***/ }), -/* 1407 */ +/* 1418 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -193000,12 +196099,12 @@ module.exports = Gravity; /***/ }), -/* 1408 */ +/* 1419 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -193056,6 +196155,10 @@ var Mass = { /** * The body's center of mass. + * + * Calling this creates a new `Vector2 each time to avoid mutation. + * + * If you only need to read the value and won't change it, you can get it from `GameObject.body.centerOfMass`. * * @name Phaser.Physics.Matter.Components.Mass#centerOfMass * @type {Phaser.Math.Vector2} @@ -193068,7 +196171,7 @@ var Mass = { get: function () { - return new Vector2(this.body.render.sprite.xOffset * this.width, this.body.render.sprite.yOffset * this.height); + return new Vector2(this.body.centerOfMass.x, this.body.centerOfMass.y); } } @@ -193078,19 +196181,19 @@ module.exports = Mass; /***/ }), -/* 1409 */ +/* 1420 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Body = __webpack_require__(62); /** - * [description] + * Provides methods used for getting and setting the static state of a physics body. * * @namespace Phaser.Physics.Matter.Components.Static * @since 3.0.0 @@ -193098,12 +196201,12 @@ var Body = __webpack_require__(62); var Static = { /** - * [description] + * Changes the physics body to be either static `true` or dynamic `false`. * * @method Phaser.Physics.Matter.Components.Static#setStatic * @since 3.0.0 * - * @param {boolean} value - [description] + * @param {boolean} value - `true` to set the body as being static, or `false` to make it dynamic. * * @return {Phaser.GameObjects.GameObject} This Game Object. */ @@ -193115,12 +196218,12 @@ var Static = { }, /** - * [description] + * Returns `true` if the body is static, otherwise `false` for a dynamic body. * * @method Phaser.Physics.Matter.Components.Static#isStatic * @since 3.0.0 * - * @return {boolean} [description] + * @return {boolean} `true` if the body is static, otherwise `false`. */ isStatic: function () { @@ -193133,17 +196236,17 @@ module.exports = Static; /***/ }), -/* 1410 */ +/* 1421 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * [description] + * Enables a Matter-enabled Game Object to be a sensor. Should be used as a mixin and not directly. * * @namespace Phaser.Physics.Matter.Components.Sensor * @since 3.0.0 @@ -193151,12 +196254,13 @@ module.exports = Static; var Sensor = { /** - * [description] + * Set the body belonging to this Game Object to be a sensor. + * Sensors trigger collision events, but don't react with colliding body physically. * * @method Phaser.Physics.Matter.Components.Sensor#setSensor * @since 3.0.0 * - * @param {boolean} value - [description] + * @param {boolean} value - `true` to set the body as a sensor, or `false` to disable it. * * @return {Phaser.GameObjects.GameObject} This Game Object. */ @@ -193168,12 +196272,12 @@ var Sensor = { }, /** - * [description] + * Is the body belonging to this Game Object a sensor or not? * * @method Phaser.Physics.Matter.Components.Sensor#isSensor * @since 3.0.0 * - * @return {boolean} [description] + * @return {boolean} `true` if the body is a sensor, otherwise `false`. */ isSensor: function () { @@ -193186,40 +196290,43 @@ module.exports = Sensor; /***/ }), -/* 1411 */ +/* 1422 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bodies = __webpack_require__(135); +var Bodies = __webpack_require__(109); var Body = __webpack_require__(62); +var FuzzyEquals = __webpack_require__(144); var GetFastValue = __webpack_require__(2); -var PhysicsEditorParser = __webpack_require__(1367); +var PhysicsEditorParser = __webpack_require__(1282); +var PhysicsJSONParser = __webpack_require__(1283); var Vertices = __webpack_require__(86); /** - * [description] + * Enables a Matter-enabled Game Object to set its Body. Should be used as a mixin and not directly. * * @namespace Phaser.Physics.Matter.Components.SetBody * @since 3.0.0 */ var SetBody = { - // Calling any of these methods resets previous properties you may have set on the body, including plugins, mass, etc - /** * Set the body on a Game Object to a rectangle. + * + * Calling this methods resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. * * @method Phaser.Physics.Matter.Components.SetBody#setRectangle * @since 3.0.0 * * @param {number} width - Width of the rectangle. * @param {number} height - Height of the rectangle. - * @param {object} options - [description] + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * * @return {Phaser.GameObjects.GameObject} This Game Object. */ @@ -193229,13 +196336,16 @@ var SetBody = { }, /** - * [description] + * Set the body on a Game Object to a circle. + * + * Calling this methods resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. * * @method Phaser.Physics.Matter.Components.SetBody#setCircle * @since 3.0.0 * - * @param {number} radius - [description] - * @param {object} options - [description] + * @param {number} radius - The radius of the circle. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * * @return {Phaser.GameObjects.GameObject} This Game Object. */ @@ -193246,13 +196356,16 @@ var SetBody = { /** * Set the body on the Game Object to a polygon shape. + * + * Calling this methods resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. * * @method Phaser.Physics.Matter.Components.SetBody#setPolygon * @since 3.0.0 * - * @param {number} radius - The radius of the polygon. - * @param {number} sides - The amount of sides creating the polygon. - * @param {object} options - A matterjs config object. + * @param {number} sides - The number of sides the polygon will have. + * @param {number} radius - The "radius" of the polygon, i.e. the distance from its center to any vertex. This is also the radius of its circumcircle. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * * @return {Phaser.GameObjects.GameObject} This Game Object. */ @@ -193262,15 +196375,18 @@ var SetBody = { }, /** - * Creates a new matterjs trapezoid body. + * Set the body on the Game Object to a trapezoid shape. + * + * Calling this methods resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. * * @method Phaser.Physics.Matter.Components.SetBody#setTrapezoid * @since 3.0.0 * - * @param {number} width - The width of the trapezoid. - * @param {number} height - The height of the trapezoid. - * @param {number} slope - The angle of slope for the trapezoid. - * @param {object} options - A matterjs config object for the body. + * @param {number} width - The width of the trapezoid Body. + * @param {number} height - The height of the trapezoid Body. + * @param {number} slope - The slope of the trapezoid. 0 creates a rectangle, while 1 creates a triangle. Positive values make the top side shorter, while negative values make the bottom side shorter. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * * @return {Phaser.GameObjects.GameObject} This Game Object. */ @@ -193280,26 +196396,25 @@ var SetBody = { }, /** - * [description] + * Set this Game Object to use the given existing Matter Body. + * + * The body is first removed from the world before being added to this Game Object. * * @method Phaser.Physics.Matter.Components.SetBody#setExistingBody * @since 3.0.0 * - * @param {MatterJS.Body} body - [description] - * @param {boolean} [addToWorld=true] - [description] + * @param {MatterJS.BodyType} body - The Body this Game Object should use. + * @param {boolean} [addToWorld=true] - Should the body be immediately added to the World? * * @return {Phaser.GameObjects.GameObject} This Game Object. */ setExistingBody: function (body, addToWorld) { - if (addToWorld === undefined) - { - addToWorld = true; - } + if (addToWorld === undefined) { addToWorld = true; } if (this.body) { - this.world.remove(this.body); + this.world.remove(this.body, true); } this.body = body; @@ -193313,31 +196428,56 @@ var SetBody = { body.destroy = function destroy () { - _this.world.remove(_this.body); + _this.world.remove(_this.body, true); _this.body.gameObject = null; }; if (addToWorld) { + if (this.world.has(body)) + { + // Because it could be part of another Composite + this.world.remove(body, true); + } + this.world.add(body); } if (this._originComponent) { - this.setOrigin(body.render.sprite.xOffset, body.render.sprite.yOffset); + var rx = body.render.sprite.xOffset; + var ry = body.render.sprite.yOffset; + + var comx = body.centerOfMass.x; + var comy = body.centerOfMass.y; + + if (FuzzyEquals(comx, 0.5) && FuzzyEquals(comy, 0.5)) + { + this.setOrigin(rx + 0.5, ry + 0.5); + } + else + { + var cx = body.centerOffset.x; + var cy = body.centerOffset.y; + + this.setOrigin(rx + (cx / this.displayWidth), ry + (cy / this.displayHeight)); + } } return this; }, /** - * [description] + * Set this Game Object to create and use a new Body based on the configuration object given. + * + * Calling this method resets previous properties you may have set on the body, including + * plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed. * * @method Phaser.Physics.Matter.Components.SetBody#setBody * @since 3.0.0 * - * @param {object} config - [description] - * @param {object} options - [description] + * @param {(string|Phaser.Types.Physics.Matter.MatterSetBodyConfig)} config - Either a string, such as `circle`, or a Matter Set Body Configuration object. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. * * @return {Phaser.GameObjects.GameObject} This Game Object. */ @@ -193418,7 +196558,11 @@ var SetBody = { break; case 'fromPhysicsEditor': - body = PhysicsEditorParser.parseBody(bodyX, bodyY, bodyWidth, bodyHeight, config); + body = PhysicsEditorParser.parseBody(bodyX, bodyY, config, options); + break; + + case 'fromPhysicsTracer': + body = PhysicsJSONParser.parseBody(bodyX, bodyY, config, options); break; } @@ -193436,20 +196580,21 @@ module.exports = SetBody; /***/ }), -/* 1412 */ +/* 1423 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Events = __webpack_require__(1270); -var MatterEvents = __webpack_require__(235); +var Events = __webpack_require__(1284); +var Sleeping = __webpack_require__(236); +var MatterEvents = __webpack_require__(237); /** - * [description] + * Enables a Matter-enabled Game Object to be able to go to sleep. Should be used as a mixin and not directly. * * @namespace Phaser.Physics.Matter.Components.Sleep * @since 3.0.0 @@ -193457,14 +196602,40 @@ var MatterEvents = __webpack_require__(235); var Sleep = { /** - * [description] + * Sets this Body to sleep. + * + * @method Phaser.Physics.Matter.Components.Sleep#setToSleep + * @since 3.22.0 + * + * @return {this} This Game Object. + */ + setToSleep: function () + { + Sleeping.set(this.body, true); + }, + + /** + * Wakes this Body if asleep. + * + * @method Phaser.Physics.Matter.Components.Sleep#setAwake + * @since 3.22.0 + * + * @return {this} This Game Object. + */ + setAwake: function () + { + Sleeping.set(this.body, false); + }, + + /** + * Sets the number of updates in which this body must have near-zero velocity before it is set as sleeping (if sleeping is enabled by the engine). * * @method Phaser.Physics.Matter.Components.Sleep#setSleepThreshold * @since 3.0.0 * - * @param {number} [value=60] - [description] + * @param {number} [value=60] - A `Number` that defines the number of updates in which this body must have near-zero velocity before it is set as sleeping. * - * @return {Phaser.GameObjects.GameObject} This Game Object. + * @return {this} This Game Object. */ setSleepThreshold: function (value) { @@ -193476,15 +196647,20 @@ var Sleep = { }, /** - * [description] + * Enable sleep and wake events for this body. + * + * By default when a body goes to sleep, or wakes up, it will not emit any events. + * + * The events are emitted by the Matter World instance and can be listened to via + * the `SLEEP_START` and `SLEEP_END` events. * * @method Phaser.Physics.Matter.Components.Sleep#setSleepEvents * @since 3.0.0 * - * @param {boolean} start - [description] - * @param {boolean} end - [description] + * @param {boolean} start - `true` if you want the sleep start event to be emitted for this body. + * @param {boolean} end - `true` if you want the sleep end event to be emitted for this body. * - * @return {Phaser.GameObjects.GameObject} This Game Object. + * @return {this} This Game Object. */ setSleepEvents: function (start, end) { @@ -193495,14 +196671,14 @@ var Sleep = { }, /** - * [description] + * Enables or disables the Sleep Start event for this body. * * @method Phaser.Physics.Matter.Components.Sleep#setSleepStartEvent * @since 3.0.0 * - * @param {boolean} value - [description] + * @param {boolean} value - `true` to enable the sleep event, or `false` to disable it. * - * @return {Phaser.GameObjects.GameObject} This Game Object. + * @return {this} This Game Object. */ setSleepStartEvent: function (value) { @@ -193524,14 +196700,14 @@ var Sleep = { }, /** - * [description] + * Enables or disables the Sleep End event for this body. * * @method Phaser.Physics.Matter.Components.Sleep#setSleepEndEvent * @since 3.0.0 * - * @param {boolean} value - [description] + * @param {boolean} value - `true` to enable the sleep event, or `false` to disable it. * - * @return {Phaser.GameObjects.GameObject} This Game Object. + * @return {this} This Game Object. */ setSleepEndEvent: function (value) { @@ -193558,12 +196734,80 @@ module.exports = Sleep; /***/ }), -/* 1413 */ +/* 1424 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @typedef {object} Phaser.Physics.Matter.Events.AfterAddEvent + * + * @property {any[]} object - An array of the object(s) that have been added. May be a single body, constraint, composite or a mixture of these. + * @property {any} source - The source object of the event. + * @property {string} name - The name of the event. + */ + +/** + * The Matter Physics After Add Event. + * + * This event is dispatched by a Matter Physics World instance at the end of the process when a new Body + * or Constraint has just been added to the world. + * + * Listen to it from a Scene using: `this.matter.world.on('afteradd', listener)`. + * + * @event Phaser.Physics.Matter.Events#AFTER_ADD + * @since 3.22.0 + * + * @param {Phaser.Physics.Matter.Events.AfterAddEvent} event - The Add Event object. + */ +module.exports = 'afteradd'; + + +/***/ }), +/* 1425 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @typedef {object} Phaser.Physics.Matter.Events.AfterRemoveEvent + * + * @property {any[]} object - An array of the object(s) that were removed. May be a single body, constraint, composite or a mixture of these. + * @property {any} source - The source object of the event. + * @property {string} name - The name of the event. + */ + +/** + * The Matter Physics After Remove Event. + * + * This event is dispatched by a Matter Physics World instance at the end of the process when a + * Body or Constraint was removed from the world. + * + * Listen to it from a Scene using: `this.matter.world.on('afterremove', listener)`. + * + * @event Phaser.Physics.Matter.Events#AFTER_REMOVE + * @since 3.22.0 + * + * @param {Phaser.Physics.Matter.Events.AfterRemoveEvent} event - The Remove Event object. + */ +module.exports = 'afterremove'; + + +/***/ }), +/* 1426 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -193591,12 +196835,80 @@ module.exports = 'afterupdate'; /***/ }), -/* 1414 */ +/* 1427 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @typedef {object} Phaser.Physics.Matter.Events.BeforeAddEvent + * + * @property {any[]} object - An array of the object(s) to be added. May be a single body, constraint, composite or a mixture of these. + * @property {any} source - The source object of the event. + * @property {string} name - The name of the event. + */ + +/** + * The Matter Physics Before Add Event. + * + * This event is dispatched by a Matter Physics World instance at the start of the process when a new Body + * or Constraint is being added to the world. + * + * Listen to it from a Scene using: `this.matter.world.on('beforeadd', listener)`. + * + * @event Phaser.Physics.Matter.Events#BEFORE_ADD + * @since 3.22.0 + * + * @param {Phaser.Physics.Matter.Events.BeforeAddEvent} event - The Add Event object. + */ +module.exports = 'beforeadd'; + + +/***/ }), +/* 1428 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @typedef {object} Phaser.Physics.Matter.Events.BeforeRemoveEvent + * + * @property {any[]} object - An array of the object(s) to be removed. May be a single body, constraint, composite or a mixture of these. + * @property {any} source - The source object of the event. + * @property {string} name - The name of the event. + */ + +/** + * The Matter Physics Before Remove Event. + * + * This event is dispatched by a Matter Physics World instance at the start of the process when a + * Body or Constraint is being removed from the world. + * + * Listen to it from a Scene using: `this.matter.world.on('beforeremove', listener)`. + * + * @event Phaser.Physics.Matter.Events#BEFORE_REMOVE + * @since 3.22.0 + * + * @param {Phaser.Physics.Matter.Events.BeforeRemoveEvent} event - The Remove Event object. + */ +module.exports = 'beforeremove'; + + +/***/ }), +/* 1429 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -193624,19 +196936,19 @@ module.exports = 'beforeupdate'; /***/ }), -/* 1415 */ +/* 1430 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * @typedef {object} Phaser.Physics.Matter.Events.CollisionActiveEvent * - * @property {array} pairs - A list of all affected pairs in the collision. + * @property {Phaser.Types.Physics.Matter.MatterCollisionData[]} pairs - A list of all affected pairs in the collision. * @property {number} timestamp - The Matter Engine `timing.timestamp` value for the event. * @property {any} source - The source object of the event. * @property {string} name - The name of the event. @@ -193654,26 +196966,26 @@ module.exports = 'beforeupdate'; * @since 3.0.0 * * @param {Phaser.Physics.Matter.Events.CollisionActiveEvent} event - The Collision Event object. - * @param {MatterJS.Body} bodyA - The first body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. - * @param {MatterJS.Body} bodyB - The second body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. + * @param {MatterJS.BodyType} bodyA - The first body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. + * @param {MatterJS.BodyType} bodyB - The second body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. */ module.exports = 'collisionactive'; /***/ }), -/* 1416 */ +/* 1431 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * @typedef {object} Phaser.Physics.Matter.Events.CollisionEndEvent * - * @property {array} pairs - A list of all affected pairs in the collision. + * @property {Phaser.Types.Physics.Matter.MatterCollisionData[]} pairs - A list of all affected pairs in the collision. * @property {number} timestamp - The Matter Engine `timing.timestamp` value for the event. * @property {any} source - The source object of the event. * @property {string} name - The name of the event. @@ -193691,26 +197003,26 @@ module.exports = 'collisionactive'; * @since 3.0.0 * * @param {Phaser.Physics.Matter.Events.CollisionEndEvent} event - The Collision Event object. - * @param {MatterJS.Body} bodyA - The first body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. - * @param {MatterJS.Body} bodyB - The second body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. + * @param {MatterJS.BodyType} bodyA - The first body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. + * @param {MatterJS.BodyType} bodyB - The second body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. */ module.exports = 'collisionend'; /***/ }), -/* 1417 */ +/* 1432 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * @typedef {object} Phaser.Physics.Matter.Events.CollisionStartEvent * - * @property {array} pairs - A list of all affected pairs in the collision. + * @property {Phaser.Types.Physics.Matter.MatterCollisionData[]} pairs - A list of all affected pairs in the collision. * @property {number} timestamp - The Matter Engine `timing.timestamp` value for the event. * @property {any} source - The source object of the event. * @property {string} name - The name of the event. @@ -193728,19 +197040,19 @@ module.exports = 'collisionend'; * @since 3.0.0 * * @param {Phaser.Physics.Matter.Events.CollisionStartEvent} event - The Collision Event object. - * @param {MatterJS.Body} bodyA - The first body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. - * @param {MatterJS.Body} bodyB - The second body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. + * @param {MatterJS.BodyType} bodyA - The first body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. + * @param {MatterJS.BodyType} bodyB - The second body of the first colliding pair. The `event.pairs` array may contain more colliding bodies. */ module.exports = 'collisionstart'; /***/ }), -/* 1418 */ +/* 1433 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -193755,19 +197067,19 @@ module.exports = 'collisionstart'; * @event Phaser.Physics.Matter.Events#DRAG_END * @since 3.16.2 * - * @param {MatterJS.Body} body - The Body that has stopped being dragged. This is a Matter Body, not a Phaser Game Object. + * @param {MatterJS.BodyType} body - The Body that has stopped being dragged. This is a Matter Body, not a Phaser Game Object. * @param {Phaser.Physics.Matter.PointerConstraint} constraint - The Pointer Constraint that was dragging the body. */ module.exports = 'dragend'; /***/ }), -/* 1419 */ +/* 1434 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -193782,19 +197094,19 @@ module.exports = 'dragend'; * @event Phaser.Physics.Matter.Events#DRAG * @since 3.16.2 * - * @param {MatterJS.Body} body - The Body that is being dragged. This is a Matter Body, not a Phaser Game Object. + * @param {MatterJS.BodyType} body - The Body that is being dragged. This is a Matter Body, not a Phaser Game Object. * @param {Phaser.Physics.Matter.PointerConstraint} constraint - The Pointer Constraint that is dragging the body. */ module.exports = 'drag'; /***/ }), -/* 1420 */ +/* 1435 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -193809,20 +197121,20 @@ module.exports = 'drag'; * @event Phaser.Physics.Matter.Events#DRAG_START * @since 3.16.2 * - * @param {MatterJS.Body} body - The Body that has started being dragged. This is a Matter Body, not a Phaser Game Object. - * @param {MatterJS.Body} part - The part of the body that was clicked on. + * @param {MatterJS.BodyType} body - The Body that has started being dragged. This is a Matter Body, not a Phaser Game Object. + * @param {MatterJS.BodyType} part - The part of the body that was clicked on. * @param {Phaser.Physics.Matter.PointerConstraint} constraint - The Pointer Constraint that is dragging the body. */ module.exports = 'dragstart'; /***/ }), -/* 1421 */ +/* 1436 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -193840,12 +197152,12 @@ module.exports = 'pause'; /***/ }), -/* 1422 */ +/* 1437 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -193863,12 +197175,12 @@ module.exports = 'resume'; /***/ }), -/* 1423 */ +/* 1438 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -193890,18 +197202,18 @@ module.exports = 'resume'; * @since 3.0.0 * * @param {Phaser.Physics.Matter.Events.SleepEndEvent} event - The Sleep Event object. - * @param {MatterJS.Body} body - The body that has stopped sleeping. + * @param {MatterJS.BodyType} body - The body that has stopped sleeping. */ module.exports = 'sleepend'; /***/ }), -/* 1424 */ +/* 1439 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -193923,25 +197235,25 @@ module.exports = 'sleepend'; * @since 3.0.0 * * @param {Phaser.Physics.Matter.Events.SleepStartEvent} event - The Sleep Event object. - * @param {MatterJS.Body} body - The body that has gone to sleep. + * @param {MatterJS.BodyType} body - The body that has gone to sleep. */ module.exports = 'sleepstart'; /***/ }), -/* 1425 */ +/* 1440 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Body = __webpack_require__(62); var MATH_CONST = __webpack_require__(13); -var WrapAngle = __webpack_require__(231); -var WrapAngleDegrees = __webpack_require__(232); +var WrapAngle = __webpack_require__(232); +var WrapAngleDegrees = __webpack_require__(233); // global bitmask flag for GameObject.renderMask (used by Scale) var _FLAG = 4; // 0100 @@ -194078,7 +197390,8 @@ var Transform = { }, /** - * Use `angle` to set or get rotation of the physics body associated to this GameObject. Unlike rotation, when using set the value can be in degrees, which will be converted to radians internally. + * Use `angle` to set or get rotation of the physics body associated to this GameObject. + * Unlike rotation, when using set the value can be in degrees, which will be converted to radians internally. * * @name Phaser.Physics.Matter.Components.Transform#angle * @type {number} @@ -194099,7 +197412,8 @@ var Transform = { }, /** - * Use `rotation` to set or get the rotation of the physics body associated with this GameObject. The value when set must be in radians. + * Use `rotation` to set or get the rotation of the physics body associated with this GameObject. + * The value when set must be in radians. * * @name Phaser.Physics.Matter.Components.Transform#rotation * @type {number} @@ -194122,7 +197436,9 @@ var Transform = { }, /** - * Sets the position of the physics body along x and y axes. Both the parameters to this function are optional and if not passed any they default to 0. + * Sets the position of the physics body along x and y axes. + * Both the parameters to this function are optional and if not passed any they default to 0. + * Velocity, angle, force etc. are unchanged. * * @method Phaser.Physics.Matter.Components.Transform#setPosition * @since 3.0.0 @@ -194145,12 +197461,13 @@ var Transform = { }, /** - * [description] + * Immediately sets the angle of the Body. + * Angular velocity, position, force etc. are unchanged. * * @method Phaser.Physics.Matter.Components.Transform#setRotation * @since 3.0.0 * - * @param {number} [radians=0] - [description] + * @param {number} [radians=0] - The angle of the body, in radians. * * @return {this} This Game Object. */ @@ -194166,7 +197483,8 @@ var Transform = { }, /** - * [description] + * Setting fixed rotation sets the Body inertia to Infinity, which stops it + * from being able to rotate when forces are applied to it. * * @method Phaser.Physics.Matter.Components.Transform#setFixedRotation * @since 3.0.0 @@ -194181,12 +197499,13 @@ var Transform = { }, /** - * [description] + * Immediately sets the angle of the Body. + * Angular velocity, position, force etc. are unchanged. * * @method Phaser.Physics.Matter.Components.Transform#setAngle * @since 3.0.0 * - * @param {number} [degrees=0] - [description] + * @param {number} [degrees=0] - The angle to set, in degrees. * * @return {this} This Game Object. */ @@ -194237,19 +197556,19 @@ module.exports = Transform; /***/ }), -/* 1426 */ +/* 1441 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Body = __webpack_require__(62); /** - * [description] + * Contains methods for changing the velocity of a Matter Body. Should be used as a mixin and not called directly. * * @namespace Phaser.Physics.Matter.Components.Velocity * @since 3.0.0 @@ -194257,12 +197576,13 @@ var Body = __webpack_require__(62); var Velocity = { /** - * [description] + * Sets the angular velocity of the body instantly. + * Position, angle, force etc. are unchanged. * * @method Phaser.Physics.Matter.Components.Velocity#setAngularVelocity * @since 3.0.0 * - * @param {number} value - [description] + * @param {number} value - The angular velocity. * * @return {Phaser.GameObjects.GameObject} This Game Object. */ @@ -194337,24 +197657,24 @@ module.exports = Velocity; /***/ }), -/* 1427 */ +/* 1442 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Bounds = __webpack_require__(102); var Class = __webpack_require__(0); -var Composite = __webpack_require__(215); -var Constraint = __webpack_require__(236); -var Detector = __webpack_require__(1272); -var Events = __webpack_require__(1270); -var InputEvents = __webpack_require__(53); -var Merge = __webpack_require__(106); -var Sleeping = __webpack_require__(453); +var Composite = __webpack_require__(145); +var Constraint = __webpack_require__(216); +var Detector = __webpack_require__(509); +var Events = __webpack_require__(1284); +var InputEvents = __webpack_require__(54); +var Merge = __webpack_require__(107); +var Sleeping = __webpack_require__(236); var Vector2 = __webpack_require__(3); var Vertices = __webpack_require__(86); @@ -194391,7 +197711,6 @@ var PointerConstraint = new Class({ label: 'Pointer Constraint', pointA: { x: 0, y: 0 }, pointB: { x: 0, y: 0 }, - damping: 0, length: 0.01, stiffness: 0.1, angularStiffness: 1, @@ -194468,7 +197787,7 @@ var PointerConstraint = new Class({ * The body that is currently being dragged, if any. * * @name Phaser.Physics.Matter.PointerConstraint#body - * @type {?MatterJS.Body} + * @type {?MatterJS.BodyType} * @since 3.16.2 */ this.body = null; @@ -194477,7 +197796,7 @@ var PointerConstraint = new Class({ * The part of the body that was clicked on to start the drag. * * @name Phaser.Physics.Matter.PointerConstraint#part - * @type {?MatterJS.Body} + * @type {?MatterJS.BodyType} * @since 3.16.2 */ this.part = null; @@ -194486,7 +197805,7 @@ var PointerConstraint = new Class({ * The native Matter Constraint that is used to attach to bodies. * * @name Phaser.Physics.Matter.PointerConstraint#constraint - * @type {object} + * @type {MatterJS.ConstraintType} * @since 3.0.0 */ this.constraint = Constraint.create(Merge(options, defaults)); @@ -194494,17 +197813,17 @@ var PointerConstraint = new Class({ this.world.on(Events.BEFORE_UPDATE, this.update, this); scene.sys.input.on(InputEvents.POINTER_DOWN, this.onDown, this); + scene.sys.input.on(InputEvents.POINTER_UP, this.onUp, this); }, /** * A Pointer has been pressed down onto the Scene. * - * If this Constraint doesn't have an active Pointer then a hit test is - * run against all active bodies in the world. If one is found it is bound - * to this constraint and the drag begins. + * If this Constraint doesn't have an active Pointer then a hit test is set to + * run against all active bodies in the world during the _next_ call to `update`. + * If a body is found, it is bound to this constraint and the drag begins. * * @method Phaser.Physics.Matter.PointerConstraint#onDown - * @fires Phaser.Physics.Matter.Events#DRAG_START * @since 3.0.0 * * @param {Phaser.Input.Pointer} pointer - A reference to the Pointer that was pressed. @@ -194513,12 +197832,24 @@ var PointerConstraint = new Class({ { if (!this.pointer) { - if (this.getBody(pointer)) - { - this.pointer = pointer; + this.pointer = pointer; + this.camera = pointer.camera; + } + }, - this.camera = pointer.camera; - } + /** + * A Pointer has been released from the Scene. If it was the one this constraint was using, it's cleared. + * + * @method Phaser.Physics.Matter.PointerConstraint#onUp + * @since 3.22.0 + * + * @param {Phaser.Input.Pointer} pointer - A reference to the Pointer that was pressed. + */ + onUp: function (pointer) + { + if (pointer === this.pointer) + { + this.pointer = null; } }, @@ -194528,6 +197859,7 @@ var PointerConstraint = new Class({ * body. * * @method Phaser.Physics.Matter.PointerConstraint#getBody + * @fires Phaser.Physics.Matter.Events#DRAG_START * @since 3.16.2 * * @return {boolean} `true` if a body was found and set, otherwise `false`. @@ -194537,7 +197869,7 @@ var PointerConstraint = new Class({ var pos = this.position; var constraint = this.constraint; - pointer.camera.getWorldPoint(pointer.x, pointer.y, pos); + this.camera.getWorldPoint(pointer.x, pointer.y, pos); var bodies = Composite.allBodies(this.world.localWorld); @@ -194551,7 +197883,7 @@ var PointerConstraint = new Class({ { if (this.hitTestBody(body, pos)) { - this.world.emit(Events.DRAG_START, this.body, this.part, this); + this.world.emit(Events.DRAG_START, body, this.part, this); return true; } @@ -194569,7 +197901,7 @@ var PointerConstraint = new Class({ * @method Phaser.Physics.Matter.PointerConstraint#hitTestBody * @since 3.16.2 * - * @param {MatterJS.Body} body - The Matter Body to check. + * @param {MatterJS.BodyType} body - The Matter Body to check. * @param {Phaser.Math.Vector2} position - A translated hit test position. * * @return {boolean} `true` if a part of the body was hit, otherwise `false`. @@ -194577,23 +197909,20 @@ var PointerConstraint = new Class({ hitTestBody: function (body, position) { var constraint = this.constraint; + var partsLength = body.parts.length; - var start = (body.parts.length > 1) ? 1 : 0; + var start = (partsLength > 1) ? 1 : 0; - for (var i = start; i < body.parts.length; i++) + for (var i = start; i < partsLength; i++) { var part = body.parts[i]; if (Vertices.contains(part.vertices, position)) { + constraint.pointA = position; + constraint.pointB = { x: position.x - body.position.x, y: position.y - body.position.y }; + constraint.bodyB = body; - - constraint.pointA.x = position.x; - constraint.pointA.y = position.y; - - constraint.pointB.x = position.x - body.position.x; - constraint.pointB.y = position.y - body.position.y; - constraint.angleB = body.angle; Sleeping.set(body, false); @@ -194617,33 +197946,47 @@ var PointerConstraint = new Class({ */ update: function () { - var body = this.body; var pointer = this.pointer; + var body = this.body; - if (!this.active || !pointer || !body) + if (!this.active || !pointer) { + if (body) + { + this.stopDrag(); + } + return; } - if (pointer.isDown) + if (!pointer.isDown && body) { + this.stopDrag(); + + return; + } + else if (pointer.isDown) + { + if (!body && !this.getBody(pointer)) + { + return; + } + + body = this.body; + var pos = this.position; var constraint = this.constraint; this.camera.getWorldPoint(pointer.x, pointer.y, pos); - - Sleeping.set(body, false); - + + // Drag update constraint.pointA.x = pos.x; constraint.pointA.y = pos.y; - + + Sleeping.set(body, false); + this.world.emit(Events.DRAG, body, this); } - else - { - // Pointer has been released since the last world step - this.stopDrag(); - } }, /** @@ -194662,15 +198005,16 @@ var PointerConstraint = new Class({ var body = this.body; var constraint = this.constraint; + constraint.bodyB = null; + constraint.pointB = null; + + this.pointer = null; + this.body = null; + this.part = null; + if (body) { this.world.emit(Events.DRAG_END, body, this); - - this.pointer = null; - this.body = null; - this.part = null; - - constraint.bodyB = null; } }, @@ -194692,6 +198036,7 @@ var PointerConstraint = new Class({ this.world.off(Events.BEFORE_UPDATE, this.update); this.scene.sys.input.off(InputEvents.POINTER_DOWN, this.onDown, this); + this.scene.sys.input.off(InputEvents.POINTER_UP, this.onUp, this); } }); @@ -194700,143 +198045,7 @@ module.exports = PointerConstraint; /***/ }), -/* 1428 */ -/***/ (function(module, exports, __webpack_require__) { - -/** -* The `Matter.Query` module contains methods for performing collision queries. -* -* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). -* -* @class Query -*/ - -var Query = {}; - -module.exports = Query; - -var Vector = __webpack_require__(101); -var SAT = __webpack_require__(1273); -var Bounds = __webpack_require__(102); -var Bodies = __webpack_require__(135); -var Vertices = __webpack_require__(86); - -(function() { - - /** - * Returns a list of collisions between `body` and `bodies`. - * @method collides - * @param {body} body - * @param {body[]} bodies - * @return {object[]} Collisions - */ - Query.collides = function(body, bodies) { - var collisions = []; - - for (var i = 0; i < bodies.length; i++) { - var bodyA = bodies[i]; - - if (Bounds.overlaps(bodyA.bounds, body.bounds)) { - for (var j = bodyA.parts.length === 1 ? 0 : 1; j < bodyA.parts.length; j++) { - var part = bodyA.parts[j]; - - if (Bounds.overlaps(part.bounds, body.bounds)) { - var collision = SAT.collides(part, body); - - if (collision.collided) { - collisions.push(collision); - break; - } - } - } - } - } - - return collisions; - }; - - /** - * Casts a ray segment against a set of bodies and returns all collisions, ray width is optional. Intersection points are not provided. - * @method ray - * @param {body[]} bodies - * @param {vector} startPoint - * @param {vector} endPoint - * @param {number} [rayWidth] - * @return {object[]} Collisions - */ - Query.ray = function(bodies, startPoint, endPoint, rayWidth) { - rayWidth = rayWidth || 1e-100; - - var rayAngle = Vector.angle(startPoint, endPoint), - rayLength = Vector.magnitude(Vector.sub(startPoint, endPoint)), - rayX = (endPoint.x + startPoint.x) * 0.5, - rayY = (endPoint.y + startPoint.y) * 0.5, - ray = Bodies.rectangle(rayX, rayY, rayLength, rayWidth, { angle: rayAngle }), - collisions = Query.collides(ray, bodies); - - for (var i = 0; i < collisions.length; i += 1) { - var collision = collisions[i]; - collision.body = collision.bodyB = collision.bodyA; - } - - return collisions; - }; - - /** - * Returns all bodies whose bounds are inside (or outside if set) the given set of bounds, from the given set of bodies. - * @method region - * @param {body[]} bodies - * @param {bounds} bounds - * @param {bool} [outside=false] - * @return {body[]} The bodies matching the query - */ - Query.region = function(bodies, bounds, outside) { - var result = []; - - for (var i = 0; i < bodies.length; i++) { - var body = bodies[i], - overlaps = Bounds.overlaps(body.bounds, bounds); - if ((overlaps && !outside) || (!overlaps && outside)) - result.push(body); - } - - return result; - }; - - /** - * Returns all bodies whose vertices contain the given point, from the given set of bodies. - * @method point - * @param {body[]} bodies - * @param {vector} point - * @return {body[]} The bodies matching the query - */ - Query.point = function(bodies, point) { - var result = []; - - for (var i = 0; i < bodies.length; i++) { - var body = bodies[i]; - - if (Bounds.contains(body.bounds, point)) { - for (var j = body.parts.length === 1 ? 0 : 1; j < body.parts.length; j++) { - var part = body.parts[j]; - - if (Bounds.contains(part.bounds, point) - && Vertices.contains(part.vertices, point)) { - result.push(body); - break; - } - } - } - } - - return result; - }; - -})(); - - -/***/ }), -/* 1429 */ +/* 1443 */ /***/ (function(module, exports, __webpack_require__) { // @if DEBUG @@ -194849,7 +198058,7 @@ var Metrics = {}; module.exports = Metrics; -var Composite = __webpack_require__(215); +var Composite = __webpack_require__(145); var Common = __webpack_require__(37); (function() { @@ -194935,272 +198144,105 @@ var Common = __webpack_require__(37); /***/ }), -/* 1430 */ -/***/ (function(module, exports, __webpack_require__) { - -/** -* The `Matter.Svg` module contains methods for converting SVG images into an array of vector points. -* -* To use this module you also need the SVGPathSeg polyfill: https://github.com/progers/pathseg -* -* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples). -* -* @class Svg -*/ - -var Svg = {}; - -module.exports = Svg; - -var Bounds = __webpack_require__(102); -var Common = __webpack_require__(37); - -(function() { - - /** - * Converts an SVG path into an array of vector points. - * If the input path forms a concave shape, you must decompose the result into convex parts before use. - * See `Bodies.fromVertices` which provides support for this. - * Note that this function is not guaranteed to support complex paths (such as those with holes). - * You must load the `pathseg.js` polyfill on newer browsers. - * @method pathToVertices - * @param {SVGPathElement} path - * @param {Number} [sampleLength=15] - * @return {Vector[]} points - */ - Svg.pathToVertices = function(path, sampleLength) { - if (typeof window !== 'undefined' && !('SVGPathSeg' in window)) { - Common.warn('Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.'); - } - - // https://github.com/wout/svg.topoly.js/blob/master/svg.topoly.js - var i, il, total, point, segment, segments, - segmentsQueue, lastSegment, - lastPoint, segmentIndex, points = [], - lx, ly, length = 0, x = 0, y = 0; - - sampleLength = sampleLength || 15; - - var addPoint = function(px, py, pathSegType) { - // all odd-numbered path types are relative except PATHSEG_CLOSEPATH (1) - var isRelative = pathSegType % 2 === 1 && pathSegType > 1; - - // when the last point doesn't equal the current point add the current point - if (!lastPoint || px != lastPoint.x || py != lastPoint.y) { - if (lastPoint && isRelative) { - lx = lastPoint.x; - ly = lastPoint.y; - } else { - lx = 0; - ly = 0; - } - - var point = { - x: lx + px, - y: ly + py - }; - - // set last point - if (isRelative || !lastPoint) { - lastPoint = point; - } - - points.push(point); - - x = lx + px; - y = ly + py; - } - }; - - var addSegmentPoint = function(segment) { - var segType = segment.pathSegTypeAsLetter.toUpperCase(); - - // skip path ends - if (segType === 'Z') - return; - - // map segment to x and y - switch (segType) { - - case 'M': - case 'L': - case 'T': - case 'C': - case 'S': - case 'Q': - x = segment.x; - y = segment.y; - break; - case 'H': - x = segment.x; - break; - case 'V': - y = segment.y; - break; - } - - addPoint(x, y, segment.pathSegType); - }; - - // ensure path is absolute - Svg._svgPathToAbsolute(path); - - // get total length - total = path.getTotalLength(); - - // queue segments - segments = []; - for (i = 0; i < path.pathSegList.numberOfItems; i += 1) - segments.push(path.pathSegList.getItem(i)); - - segmentsQueue = segments.concat(); - - // sample through path - while (length < total) { - // get segment at position - segmentIndex = path.getPathSegAtLength(length); - segment = segments[segmentIndex]; - - // new segment - if (segment != lastSegment) { - while (segmentsQueue.length && segmentsQueue[0] != segment) - addSegmentPoint(segmentsQueue.shift()); - - lastSegment = segment; - } - - // add points in between when curving - // TODO: adaptive sampling - switch (segment.pathSegTypeAsLetter.toUpperCase()) { - - case 'C': - case 'T': - case 'S': - case 'Q': - case 'A': - point = path.getPointAtLength(length); - addPoint(point.x, point.y, 0); - break; - - } - - // increment by sample value - length += sampleLength; - } - - // add remaining segments not passed by sampling - for (i = 0, il = segmentsQueue.length; i < il; ++i) - addSegmentPoint(segmentsQueue[i]); - - return points; - }; - - Svg._svgPathToAbsolute = function(path) { - // http://phrogz.net/convert-svg-path-to-all-absolute-commands - // Copyright (c) Gavin Kistner - // http://phrogz.net/js/_ReuseLicense.txt - // Modifications: tidy formatting and naming - var x0, y0, x1, y1, x2, y2, segs = path.pathSegList, - x = 0, y = 0, len = segs.numberOfItems; - - for (var i = 0; i < len; ++i) { - var seg = segs.getItem(i), - segType = seg.pathSegTypeAsLetter; - - if (/[MLHVCSQTA]/.test(segType)) { - if ('x' in seg) x = seg.x; - if ('y' in seg) y = seg.y; - } else { - if ('x1' in seg) x1 = x + seg.x1; - if ('x2' in seg) x2 = x + seg.x2; - if ('y1' in seg) y1 = y + seg.y1; - if ('y2' in seg) y2 = y + seg.y2; - if ('x' in seg) x += seg.x; - if ('y' in seg) y += seg.y; - - switch (segType) { - - case 'm': - segs.replaceItem(path.createSVGPathSegMovetoAbs(x, y), i); - break; - case 'l': - segs.replaceItem(path.createSVGPathSegLinetoAbs(x, y), i); - break; - case 'h': - segs.replaceItem(path.createSVGPathSegLinetoHorizontalAbs(x), i); - break; - case 'v': - segs.replaceItem(path.createSVGPathSegLinetoVerticalAbs(y), i); - break; - case 'c': - segs.replaceItem(path.createSVGPathSegCurvetoCubicAbs(x, y, x1, y1, x2, y2), i); - break; - case 's': - segs.replaceItem(path.createSVGPathSegCurvetoCubicSmoothAbs(x, y, x2, y2), i); - break; - case 'q': - segs.replaceItem(path.createSVGPathSegCurvetoQuadraticAbs(x, y, x1, y1), i); - break; - case 't': - segs.replaceItem(path.createSVGPathSegCurvetoQuadraticSmoothAbs(x, y), i); - break; - case 'a': - segs.replaceItem(path.createSVGPathSegArcAbs(x, y, seg.r1, seg.r2, seg.angle, seg.largeArcFlag, seg.sweepFlag), i); - break; - case 'z': - case 'Z': - x = x0; - y = y0; - break; - - } - } - - if (segType == 'M' || segType == 'm') { - x0 = x; - y0 = y; - } - } - }; - -})(); - -/***/ }), -/* 1431 */ +/* 1444 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var ALIGN_CONST = __webpack_require__(106); +var Axes = __webpack_require__(507); +var Bodies = __webpack_require__(109); var Body = __webpack_require__(62); -var Bodies = __webpack_require__(135); +var BodyBounds = __webpack_require__(1378); +var Bounds = __webpack_require__(102); var Class = __webpack_require__(0); -var Factory = __webpack_require__(1364); +var Composite = __webpack_require__(145); +var Composites = __webpack_require__(1280); +var Constraint = __webpack_require__(216); +var Detector = __webpack_require__(509); +var DistanceBetween = __webpack_require__(53); +var Factory = __webpack_require__(1379); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); -var MatterAttractors = __webpack_require__(1432); -var MatterLib = __webpack_require__(1370); -var MatterWrap = __webpack_require__(1433); -var Merge = __webpack_require__(106); -var Plugin = __webpack_require__(1275); -var PluginCache = __webpack_require__(21); -var SceneEvents = __webpack_require__(22); -var World = __webpack_require__(1375); +var Grid = __webpack_require__(1289); +var MatterAttractors = __webpack_require__(1445); +var MatterCollisionEvents = __webpack_require__(1446); +var MatterLib = __webpack_require__(1383); +var MatterWrap = __webpack_require__(1447); +var Merge = __webpack_require__(107); +var Pair = __webpack_require__(467); +var Pairs = __webpack_require__(1290); +var Plugin = __webpack_require__(1287); +var PluginCache = __webpack_require__(23); +var Query = __webpack_require__(1384); +var Resolver = __webpack_require__(1291); +var SAT = __webpack_require__(510); +var SceneEvents = __webpack_require__(19); +var Svg = __webpack_require__(1281); +var Vector = __webpack_require__(101); var Vertices = __webpack_require__(86); +var World = __webpack_require__(1386); /** * @classdesc - * [description] + * The Phaser Matter plugin provides the ability to use the Matter JS Physics Engine within your Phaser games. + * + * Unlike Arcade Physics, the other physics system provided with Phaser, Matter JS is a full-body physics system. + * It features: + * + * * Rigid bodies + * * Compound bodies + * * Composite bodies + * * Concave and convex hulls + * * Physical properties (mass, area, density etc.) + * * Restitution (elastic and inelastic collisions) + * * Collisions (broad-phase, mid-phase and narrow-phase) + * * Stable stacking and resting + * * Conservation of momentum + * * Friction and resistance + * * Constraints + * * Gravity + * * Sleeping and static bodies + * * Rounded corners (chamfering) + * * Views (translate, zoom) + * * Collision queries (raycasting, region tests) + * * Time scaling (slow-mo, speed-up) + * + * Configuration of Matter is handled via the Matter World Config object, which can be passed in either the + * Phaser Game Config, or Phaser Scene Config. Here is a basic example: + * + * ```js + * physics: { + * default: 'matter', + * matter: { + * enableSleeping: true, + * gravity: { + * y: 0 + * }, + * debug: { + * showBody: true, + * showStaticBody: true + * } + * } + * } + * ``` + * + * This class acts as an interface between a Phaser Scene and a single instance of the Matter Engine. + * + * Use it to access the most common Matter features and helper functions. + * + * You can find details, documentation and examples on the Matter JS website: https://brm.io/matter-js/ * * @class MatterPhysics * @memberof Phaser.Physics.Matter * @constructor * @since 3.0.0 * - * @param {Phaser.Scene} scene - [description] + * @param {Phaser.Scene} scene - The Phaser Scene that owns this Matter Physics instance. */ var MatterPhysics = new Class({ @@ -195209,7 +198251,7 @@ var MatterPhysics = new Class({ function MatterPhysics (scene) { /** - * [description] + * The Phaser Scene that owns this Matter Physics instance * * @name Phaser.Physics.Matter.MatterPhysics#scene * @type {Phaser.Scene} @@ -195218,7 +198260,7 @@ var MatterPhysics = new Class({ this.scene = scene; /** - * [description] + * A reference to the Scene Systems that belong to the Scene owning this Matter Physics instance. * * @name Phaser.Physics.Matter.MatterPhysics#systems * @type {Phaser.Scenes.Systems} @@ -195227,16 +198269,17 @@ var MatterPhysics = new Class({ this.systems = scene.sys; /** - * [description] + * The parsed Matter Configuration object. * * @name Phaser.Physics.Matter.MatterPhysics#config - * @type {object} + * @type {Phaser.Types.Physics.Matter.MatterWorldConfig} * @since 3.0.0 */ this.config = this.getConfig(); /** - * [description] + * An instance of the Matter World class. This class is responsible for the updating of the + * Matter Physics world, as well as handling debug drawing functions. * * @name Phaser.Physics.Matter.MatterPhysics#world * @type {Phaser.Physics.Matter.World} @@ -195245,7 +198288,12 @@ var MatterPhysics = new Class({ this.world; /** - * [description] + * An instance of the Matter Factory. This class provides lots of functions for creating a + * wide variety of physics objects and adds them automatically to the Matter World. + * + * You can use this class to cut-down on the amount of code required in your game, however, + * use of the Factory is entirely optional and should be seen as a development aid. It's + * perfectly possible to create and add components to the Matter world without using it. * * @name Phaser.Physics.Matter.MatterPhysics#add * @type {Phaser.Physics.Matter.Factory} @@ -195254,48 +198302,273 @@ var MatterPhysics = new Class({ this.add; /** - * A reference to the `Matter.Vertices` module which contains methods for creating and manipulating sets of vertices. - * A set of vertices is an array of `Matter.Vector` with additional indexing properties inserted by `Vertices.create`. - * A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull). + * An instance of the Body Bounds class. This class contains functions used for getting the + * world position from various points around the bounds of a physics body. * - * @name Phaser.Physics.Matter.MatterPhysics#verts - * @type {MatterJS.Vertices} - * @since 3.14.0 + * @name Phaser.Physics.Matter.MatterPhysics#bodyBounds + * @type {Phaser.Physics.Matter.BodyBounds} + * @since 3.22.0 */ - this.verts = Vertices; + this.bodyBounds; + + // Body /** - * A reference to the `Matter.Body` module which contains methods for creating and manipulating body models. + * A reference to the `Matter.Body` module. + * + * The `Matter.Body` module contains methods for creating and manipulating body models. + * A `Matter.Body` is a rigid body that can be simulated by a `Matter.Engine`. + * Factories for commonly used body configurations (such as rectangles, circles and other polygons) can be found in the `Bodies` module. * * @name Phaser.Physics.Matter.MatterPhysics#body - * @type {MatterJS.Body} + * @type {MatterJS.BodyFactory} * @since 3.18.0 */ this.body = Body; /** - * A reference to the `Matter.Bodies` module which contains methods for creating bodies. + * A reference to the `Matter.Composite` module. + * + * The `Matter.Composite` module contains methods for creating and manipulating composite bodies. + * A composite body is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`, therefore composites form a tree structure. + * It is important to use the functions in this module to modify composites, rather than directly modifying their properties. + * Note that the `Matter.World` object is also a type of `Matter.Composite` and as such all composite methods here can also operate on a `Matter.World`. + * + * @name Phaser.Physics.Matter.MatterPhysics#composite + * @type {MatterJS.CompositeFactory} + * @since 3.22.0 + */ + this.composite = Composite; + + // Collision: + + /** + * A reference to the `Matter.Detector` module. + * + * The `Matter.Detector` module contains methods for detecting collisions given a set of pairs. + * + * @name Phaser.Physics.Matter.MatterPhysics#detector + * @type {MatterJS.DetectorFactory} + * @since 3.22.0 + */ + this.detector = Detector; + + /** + * A reference to the `Matter.Grid` module. + * + * The `Matter.Grid` module contains methods for creating and manipulating collision broadphase grid structures. + * + * @name Phaser.Physics.Matter.MatterPhysics#grid + * @type {MatterJS.GridFactory} + * @since 3.22.0 + */ + this.grid = Grid; + + /** + * A reference to the `Matter.Pair` module. + * + * The `Matter.Pair` module contains methods for creating and manipulating collision pairs. + * + * @name Phaser.Physics.Matter.MatterPhysics#pair + * @type {MatterJS.PairFactory} + * @since 3.22.0 + */ + this.pair = Pair; + + /** + * A reference to the `Matter.Pairs` module. + * + * The `Matter.Pairs` module contains methods for creating and manipulating collision pair sets. + * + * @name Phaser.Physics.Matter.MatterPhysics#pairs + * @type {MatterJS.PairsFactory} + * @since 3.22.0 + */ + this.pairs = Pairs; + + /** + * A reference to the `Matter.Query` module. + * + * The `Matter.Query` module contains methods for performing collision queries. + * + * @name Phaser.Physics.Matter.MatterPhysics#query + * @type {MatterJS.QueryFactory} + * @since 3.22.0 + */ + this.query = Query; + + /** + * A reference to the `Matter.Resolver` module. + * + * The `Matter.Resolver` module contains methods for resolving collision pairs. + * + * @name Phaser.Physics.Matter.MatterPhysics#resolver + * @type {MatterJS.ResolverFactory} + * @since 3.22.0 + */ + this.resolver = Resolver; + + /** + * A reference to the `Matter.SAT` module. + * + * The `Matter.SAT` module contains methods for detecting collisions using the Separating Axis Theorem. + * + * @name Phaser.Physics.Matter.MatterPhysics#sat + * @type {MatterJS.SATFactory} + * @since 3.22.0 + */ + this.sat = SAT; + + // Constraint + + /** + * A reference to the `Matter.Constraint` module. + * + * The `Matter.Constraint` module contains methods for creating and manipulating constraints. + * Constraints are used for specifying that a fixed distance must be maintained between two bodies (or a body and a fixed world-space position). + * The stiffness of constraints can be modified to create springs or elastic. + * + * @name Phaser.Physics.Matter.MatterPhysics#constraint + * @type {MatterJS.ConstraintFactory} + * @since 3.22.0 + */ + this.constraint = Constraint; + + // Factory + + /** + * A reference to the `Matter.Bodies` module. + * + * The `Matter.Bodies` module contains factory methods for creating rigid bodies + * with commonly used body configurations (such as rectangles, circles and other polygons). * * @name Phaser.Physics.Matter.MatterPhysics#bodies - * @type {MatterJS.Bodies} + * @type {MatterJS.BodiesFactory} * @since 3.18.0 */ this.bodies = Bodies; + /** + * A reference to the `Matter.Composites` module. + * + * The `Matter.Composites` module contains factory methods for creating composite bodies + * with commonly used configurations (such as stacks and chains). + * + * @name Phaser.Physics.Matter.MatterPhysics#composites + * @type {MatterJS.CompositesFactory} + * @since 3.22.0 + */ + this.composites = Composites; + + // Geometry + + /** + * A reference to the `Matter.Axes` module. + * + * The `Matter.Axes` module contains methods for creating and manipulating sets of axes. + * + * @name Phaser.Physics.Matter.MatterPhysics#axes + * @type {MatterJS.AxesFactory} + * @since 3.22.0 + */ + this.axes = Axes; + + /** + * A reference to the `Matter.Bounds` module. + * + * The `Matter.Bounds` module contains methods for creating and manipulating axis-aligned bounding boxes (AABB). + * + * @name Phaser.Physics.Matter.MatterPhysics#bounds + * @type {MatterJS.BoundsFactory} + * @since 3.22.0 + */ + this.bounds = Bounds; + + /** + * A reference to the `Matter.Svg` module. + * + * The `Matter.Svg` module contains methods for converting SVG images into an array of vector points. + * + * To use this module you also need the SVGPathSeg polyfill: https://github.com/progers/pathseg + * + * @name Phaser.Physics.Matter.MatterPhysics#svg + * @type {MatterJS.SvgFactory} + * @since 3.22.0 + */ + this.svg = Svg; + + /** + * A reference to the `Matter.Vector` module. + * + * The `Matter.Vector` module contains methods for creating and manipulating vectors. + * Vectors are the basis of all the geometry related operations in the engine. + * A `Matter.Vector` object is of the form `{ x: 0, y: 0 }`. + * + * @name Phaser.Physics.Matter.MatterPhysics#vector + * @type {MatterJS.VectorFactory} + * @since 3.22.0 + */ + this.vector = Vector; + + /** + * A reference to the `Matter.Vertices` module. + * + * The `Matter.Vertices` module contains methods for creating and manipulating sets of vertices. + * A set of vertices is an array of `Matter.Vector` with additional indexing properties inserted by `Vertices.create`. + * A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull). + * + * @name Phaser.Physics.Matter.MatterPhysics#vertices + * @type {MatterJS.VerticesFactory} + * @since 3.22.0 + */ + this.vertices = Vertices; + + /** + * A reference to the `Matter.Vertices` module. + * + * The `Matter.Vertices` module contains methods for creating and manipulating sets of vertices. + * A set of vertices is an array of `Matter.Vector` with additional indexing properties inserted by `Vertices.create`. + * A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull). + * + * @name Phaser.Physics.Matter.MatterPhysics#verts + * @type {MatterJS.VerticesFactory} + * @since 3.14.0 + */ + this.verts = Vertices; + + /** + * An internal temp vector used for velocity and force calculations. + * + * @name Phaser.Physics.Matter.MatterPhysics#_tempVec2 + * @type {MatterJS.Vector} + * @private + * @since 3.22.0 + */ + this._tempVec2 = Vector.create(); + // Matter plugins + if (GetValue(this.config, 'plugins.collisionevents', true)) + { + this.enableCollisionEventsPlugin(); + } + if (GetValue(this.config, 'plugins.attractors', false)) { - Plugin.register(MatterAttractors); - Plugin.use(MatterLib, MatterAttractors); + this.enableAttractorPlugin(); } if (GetValue(this.config, 'plugins.wrap', false)) { - Plugin.register(MatterWrap); - Plugin.use(MatterLib, MatterWrap); + this.enableWrapPlugin(); } + Resolver._restingThresh = GetValue(this.config, 'restingThresh', 4); + Resolver._restingThreshTangent = GetValue(this.config, 'restingThreshTangent', 6); + Resolver._positionDampen = GetValue(this.config, 'positionDampen', 0.9); + Resolver._positionWarming = GetValue(this.config, 'positionWarming', 0.8); + Resolver._frictionNormalMultiplier = GetValue(this.config, 'frictionNormalMultiplier', 5); + scene.sys.events.once(SceneEvents.BOOT, this.boot, this); scene.sys.events.on(SceneEvents.START, this.start, this); }, @@ -195312,6 +198585,7 @@ var MatterPhysics = new Class({ { this.world = new World(this.scene, this.config); this.add = new Factory(this.world); + this.bodyBounds = new BodyBounds(); this.systems.events.once(SceneEvents.DESTROY, this.destroy, this); }, @@ -195341,12 +198615,12 @@ var MatterPhysics = new Class({ }, /** - * [description] + * This internal method is called when this class starts and retrieves the final Matter World Config. * * @method Phaser.Physics.Matter.MatterPhysics#getConfig * @since 3.0.0 * - * @return {object} [description] + * @return {Phaser.Types.Physics.Matter.MatterWorldConfig} The Matter World Config. */ getConfig: function () { @@ -195362,12 +198636,20 @@ var MatterPhysics = new Class({ }, /** - * [description] + * Enables the Matter Attractors Plugin. + * + * The attractors plugin that makes it easy to apply continual forces on bodies. + * It's possible to simulate effects such as wind, gravity and magnetism. + * + * https://github.com/liabru/matter-attractors + * + * This method is called automatically if `plugins.attractors` is set in the Matter World Config. + * However, you can also call it directly from within your game. * * @method Phaser.Physics.Matter.MatterPhysics#enableAttractorPlugin * @since 3.0.0 * - * @return {Phaser.Physics.Matter.MatterPhysics} This Matter Physics instance. + * @return {this} This Matter Physics instance. */ enableAttractorPlugin: function () { @@ -195378,12 +198660,21 @@ var MatterPhysics = new Class({ }, /** - * [description] + * Enables the Matter Wrap Plugin. + * + * The coordinate wrapping plugin that automatically wraps the position of bodies such that they always stay + * within the given bounds. Upon crossing a boundary the body will appear on the opposite side of the bounds, + * while maintaining its velocity. + * + * https://github.com/liabru/matter-wrap + * + * This method is called automatically if `plugins.wrap` is set in the Matter World Config. + * However, you can also call it directly from within your game. * * @method Phaser.Physics.Matter.MatterPhysics#enableWrapPlugin * @since 3.0.0 * - * @return {Phaser.Physics.Matter.MatterPhysics} This Matter Physics instance. + * @return {this} This Matter Physics instance. */ enableWrapPlugin: function () { @@ -195394,9 +198685,51 @@ var MatterPhysics = new Class({ }, /** - * [description] + * Enables the Matter Collision Events Plugin. + * + * Note that this plugin is enabled by default. So you should only ever need to call this + * method if you have specifically disabled the plugin in your Matter World Config. + * You can disable it by setting `plugins.collisionevents: false` in your Matter World Config. + * + * This plugin triggers three new events on Matter.Body: + * + * 1. `onCollide` + * 2. `onCollideEnd` + * 3. `onCollideActive` + * + * These events correspond to the Matter.js events `collisionStart`, `collisionActive` and `collisionEnd`, respectively. + * You can listen to these events via Matter.Events or they will also be emitted from the Matter World. + * + * This plugin also extends Matter.Body with three convenience functions: + * + * `Matter.Body.setOnCollide(callback)` + * `Matter.Body.setOnCollideEnd(callback)` + * `Matter.Body.setOnCollideActive(callback)` + * + * You can register event callbacks by providing a function of type (pair: Matter.Pair) => void + * + * https://github.com/dxu/matter-collision-events + * + * @method Phaser.Physics.Matter.MatterPhysics#enableCollisionEventsPlugin + * @since 3.22.0 + * + * @return {this} This Matter Physics instance. + */ + enableCollisionEventsPlugin: function () + { + Plugin.register(MatterCollisionEvents); + Plugin.use(MatterLib, MatterCollisionEvents); + + return this; + }, + + /** + * Pauses the Matter World instance and sets `enabled` to `false`. + * + * A paused world will not run any simulations for the duration it is paused. * * @method Phaser.Physics.Matter.MatterPhysics#pause + * @fires Phaser.Physics.Matter.Events#PAUSE * @since 3.0.0 * * @return {Phaser.Physics.Matter.World} The Matter World object. @@ -195407,7 +198740,7 @@ var MatterPhysics = new Class({ }, /** - * [description] + * Resumes this Matter World instance from a paused state and sets `enabled` to `true`. * * @method Phaser.Physics.Matter.MatterPhysics#resume * @since 3.0.0 @@ -195426,7 +198759,7 @@ var MatterPhysics = new Class({ * @method Phaser.Physics.Matter.MatterPhysics#set60Hz * @since 3.4.0 * - * @return {Phaser.Physics.Matter.MatterPhysics} This Matter Physics instance. + * @return {this} This Matter Physics instance. */ set60Hz: function () { @@ -195443,7 +198776,7 @@ var MatterPhysics = new Class({ * @method Phaser.Physics.Matter.MatterPhysics#set30Hz * @since 3.4.0 * - * @return {Phaser.Physics.Matter.MatterPhysics} This Matter Physics instance. + * @return {this} This Matter Physics instance. */ set30Hz: function () { @@ -195477,14 +198810,749 @@ var MatterPhysics = new Class({ * @method Phaser.Physics.Matter.MatterPhysics#step * @since 3.4.0 * - * @param {number} [delta=16.666] - [description] - * @param {number} [correction=1] - [description] + * @param {number} [delta=16.666] - The delta value. + * @param {number} [correction=1] - Optional delta correction value. */ step: function (delta, correction) { this.world.step(delta, correction); }, + /** + * Checks if the vertices of the given body, or an array of bodies, contains the given point, or not. + * + * You can pass in either a single body, or an array of bodies to be checked. This method will + * return `true` if _any_ of the bodies in the array contain the point. See the `intersectPoint` method if you need + * to get a list of intersecting bodies. + * + * The point should be transformed into the Matter World coordinate system in advance. This happens by + * default with Input Pointers, but if you wish to use points from another system you may need to + * transform them before passing them. + * + * @method Phaser.Physics.Matter.MatterPhysics#containsPoint + * @since 3.22.0 + * + * @param {(Phaser.Types.Physics.Matter.MatterBody|Phaser.Types.Physics.Matter.MatterBody[])} body - The body, or an array of bodies, to check against the point. + * @param {number} x - The horizontal coordinate of the point. + * @param {number} y - The vertical coordinate of the point. + * + * @return {boolean} `true` if the point is within one of the bodies given, otherwise `false`. + */ + containsPoint: function (body, x, y) + { + body = this.getMatterBodies(body); + + var position = Vector.create(x, y); + + var result = Query.point(body, position); + + return (result.length > 0) ? true : false; + }, + + /** + * Checks the given coordinates to see if any vertices of the given bodies contain it. + * + * If no bodies are provided it will search all bodies in the Matter World, including within Composites. + * + * The coordinates should be transformed into the Matter World coordinate system in advance. This happens by + * default with Input Pointers, but if you wish to use coordinates from another system you may need to + * transform them before passing them. + * + * @method Phaser.Physics.Matter.MatterPhysics#intersectPoint + * @since 3.22.0 + * + * @param {number} x - The horizontal coordinate of the point. + * @param {number} y - The vertical coordinate of the point. + * @param {Phaser.Types.Physics.Matter.MatterBody[]} [bodies] - An array of bodies to check. If not provided it will search all bodies in the world. + * + * @return {Phaser.Types.Physics.Matter.MatterBody[]} An array of bodies which contain the given point. + */ + intersectPoint: function (x, y, bodies) + { + bodies = this.getMatterBodies(bodies); + + var position = Vector.create(x, y); + + var output = []; + + var result = Query.point(bodies, position); + + result.forEach(function (body) + { + if (output.indexOf(body) === -1) + { + output.push(body); + } + }); + + return output; + }, + + /** + * Checks the given rectangular area to see if any vertices of the given bodies intersect with it. + * Or, if the `outside` parameter is set to `true`, it checks to see which bodies do not + * intersect with it. + * + * If no bodies are provided it will search all bodies in the Matter World, including within Composites. + * + * @method Phaser.Physics.Matter.MatterPhysics#intersectRect + * @since 3.22.0 + * + * @param {number} x - The horizontal coordinate of the top-left of the area. + * @param {number} y - The vertical coordinate of the top-left of the area. + * @param {number} width - The width of the area. + * @param {number} height - The height of the area. + * @param {boolean} [outside=false] - If `false` it checks for vertices inside the area, if `true` it checks for vertices outside the area. + * @param {Phaser.Types.Physics.Matter.MatterBody[]} [bodies] - An array of bodies to check. If not provided it will search all bodies in the world. + * + * @return {Phaser.Types.Physics.Matter.MatterBody[]} An array of bodies that intersect with the given area. + */ + intersectRect: function (x, y, width, height, outside, bodies) + { + if (outside === undefined) { outside = false; } + + bodies = this.getMatterBodies(bodies); + + var bounds = { + min: { x: x, y: y }, + max: { x: x + width, y: y + height } + }; + + var output = []; + + var result = Query.region(bodies, bounds, outside); + + result.forEach(function (body) + { + if (output.indexOf(body) === -1) + { + output.push(body); + } + }); + + return output; + }, + + /** + * Checks the given ray segment to see if any vertices of the given bodies intersect with it. + * + * If no bodies are provided it will search all bodies in the Matter World. + * + * The width of the ray can be specified via the `rayWidth` parameter. + * + * @method Phaser.Physics.Matter.MatterPhysics#intersectRay + * @since 3.22.0 + * + * @param {number} x1 - The horizontal coordinate of the start of the ray segment. + * @param {number} y1 - The vertical coordinate of the start of the ray segment. + * @param {number} x2 - The horizontal coordinate of the end of the ray segment. + * @param {number} y2 - The vertical coordinate of the end of the ray segment. + * @param {number} [rayWidth=1] - The width of the ray segment. + * @param {Phaser.Types.Physics.Matter.MatterBody[]} [bodies] - An array of bodies to check. If not provided it will search all bodies in the world. + * + * @return {Phaser.Types.Physics.Matter.MatterBody[]} An array of bodies whos vertices intersect with the ray segment. + */ + intersectRay: function (x1, y1, x2, y2, rayWidth, bodies) + { + if (rayWidth === undefined) { rayWidth = 1; } + + bodies = this.getMatterBodies(bodies); + + var result = []; + var collisions = Query.ray(bodies, Vector.create(x1, y1), Vector.create(x2, y2), rayWidth); + + for (var i = 0; i < collisions.length; i++) + { + result.push(collisions[i].body); + } + + return result; + }, + + /** + * Checks the given Matter Body to see if it intersects with any of the given bodies. + * + * If no bodies are provided it will check against all bodies in the Matter World. + * + * @method Phaser.Physics.Matter.MatterPhysics#intersectBody + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The target body. + * @param {Phaser.Types.Physics.Matter.MatterBody[]} [bodies] - An array of bodies to check the target body against. If not provided it will search all bodies in the world. + * + * @return {Phaser.Types.Physics.Matter.MatterBody[]} An array of bodies whos vertices intersect with target body. + */ + intersectBody: function (body, bodies) + { + bodies = this.getMatterBodies(bodies); + + var result = []; + var collisions = Query.collides(body, bodies); + + for (var i = 0; i < collisions.length; i++) + { + var pair = collisions[i]; + + if (pair.bodyA === body) + { + result.push(pair.bodyB); + } + else + { + result.push(pair.bodyA); + } + } + + return result; + }, + + /** + * Checks to see if the target body, or an array of target bodies, intersects with any of the given bodies. + * + * If intersection occurs this method will return `true` and, if provided, invoke the callbacks. + * + * If no bodies are provided for the second parameter the target will check again all bodies in the Matter World. + * + * Note that bodies can only overlap if they are in non-colliding collision groups or categories. + * + * If you provide a `processCallback` then the two bodies that overlap are sent to it. This callback + * must return a boolean and is used to allow you to perform additional processing tests before a final + * outcome is decided. If it returns `true` then the bodies are finally passed to the `overlapCallback`, if set. + * + * If you provide an `overlapCallback` then the matching pairs of overlapping bodies will be sent to it. + * + * Both callbacks have the following signature: `function (bodyA, bodyB, collisionInfo)` where `bodyA` is always + * the target body. The `collisionInfo` object contains additional data, such as the angle and depth of penetration. + * + * @method Phaser.Physics.Matter.MatterPhysics#overlap + * @since 3.22.0 + * + * @param {(Phaser.Types.Physics.Matter.MatterBody|Phaser.Types.Physics.Matter.MatterBody[])} target - The target body, or array of target bodies, to check. + * @param {Phaser.Types.Physics.Matter.MatterBody[]} [bodies] - The second body, or array of bodies, to check. If falsey it will check against all bodies in the world. + * @param {ArcadePhysicsCallback} [overlapCallback] - An optional callback function that is called if the bodies overlap. + * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two bodies if they overlap. If this is set then `overlapCallback` will only be invoked if this callback returns `true`. + * @param {*} [callbackContext] - The context, or scope, in which to run the callbacks. + * + * @return {boolean} `true` if the target body intersects with _any_ of the bodies given, otherwise `false`. + */ + overlap: function (target, bodies, overlapCallback, processCallback, callbackContext) + { + if (overlapCallback === undefined) { overlapCallback = null; } + if (processCallback === undefined) { processCallback = null; } + if (callbackContext === undefined) { callbackContext = overlapCallback; } + + if (!Array.isArray(target)) + { + target = [ target ]; + } + + target = this.getMatterBodies(target); + bodies = this.getMatterBodies(bodies); + + var match = false; + + for (var i = 0; i < target.length; i++) + { + var entry = target[i]; + + var collisions = Query.collides(entry, bodies); + + for (var c = 0; c < collisions.length; c++) + { + var info = collisions[c]; + var bodyB = (info.bodyA.id === entry.id) ? info.bodyB : info.bodyA; + + if (!processCallback || processCallback.call(callbackContext, entry, bodyB, info)) + { + match = true; + + if (overlapCallback) + { + overlapCallback.call(callbackContext, entry, bodyB, info); + } + else if (!processCallback) + { + // If there are no callbacks we don't need to test every body, just exit when the first is found + return true; + } + } + } + } + + return match; + }, + + /** + * Sets the collision filter category of all given Matter Bodies to the given value. + * + * This number must be a power of two between 2^0 (= 1) and 2^31. + * + * Bodies with different collision groups (see {@link #setCollisionGroup}) will only collide if their collision + * categories are included in their collision masks (see {@link #setCollidesWith}). + * + * @method Phaser.Physics.Matter.MatterPhysics#setCollisionCategory + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody[]} bodies - An array of bodies to update. If falsey it will use all bodies in the world. + * @param {number} value - Unique category bitfield. + * + * @return {this} This Matter Physics instance. + */ + setCollisionCategory: function (bodies, value) + { + bodies = this.getMatterBodies(bodies); + + bodies.forEach(function (body) + { + body.collisionFilter.category = value; + }); + + return this; + }, + + /** + * Sets the collision filter group of all given Matter Bodies to the given value. + * + * If the group value is zero, or if two Matter Bodies have different group values, + * they will collide according to the usual collision filter rules (see {@link #setCollisionCategory} and {@link #setCollisionGroup}). + * + * If two Matter Bodies have the same positive group value, they will always collide; + * if they have the same negative group value they will never collide. + * + * @method Phaser.Physics.Matter.MatterPhysics#setCollisionGroup + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody[]} bodies - An array of bodies to update. If falsey it will use all bodies in the world. + * @param {number} value - Unique group index. + * + * @return {this} This Matter Physics instance. + */ + setCollisionGroup: function (bodies, value) + { + bodies = this.getMatterBodies(bodies); + + bodies.forEach(function (body) + { + body.collisionFilter.group = value; + }); + + return this; + }, + + /** + * Sets the collision filter mask of all given Matter Bodies to the given value. + * + * Two Matter Bodies with different collision groups will only collide if each one includes the others + * category in its mask based on a bitwise AND operation: `(categoryA & maskB) !== 0` and + * `(categoryB & maskA) !== 0` are both true. + * + * @method Phaser.Physics.Matter.MatterPhysics#setCollidesWith + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody[]} bodies - An array of bodies to update. If falsey it will use all bodies in the world. + * @param {(number|number[])} categories - A unique category bitfield, or an array of them. + * + * @return {this} This Matter Physics instance. + */ + setCollidesWith: function (bodies, categories) + { + bodies = this.getMatterBodies(bodies); + + var flags = 0; + + if (!Array.isArray(categories)) + { + flags = categories; + } + else + { + for (var i = 0; i < categories.length; i++) + { + flags |= categories[i]; + } + } + + bodies.forEach(function (body) + { + body.collisionFilter.mask = flags; + }); + + return this; + }, + + /** + * Takes an array and returns a new array made from all of the Matter Bodies found in the original array. + * + * For example, passing in Matter Game Objects, such as a bunch of Matter Sprites, to this method, would + * return an array containing all of their native Matter Body objects. + * + * If the `bodies` argument is falsey, it will return all bodies in the world. + * + * @method Phaser.Physics.Matter.MatterPhysics#getMatterBodies + * @since 3.22.0 + * + * @param {array} [bodies] - An array of objects to extract the bodies from. If falsey, it will return all bodies in the world. + * + * @return {MatterJS.BodyType[]} An array of native Matter Body objects. + */ + getMatterBodies: function (bodies) + { + if (!bodies) + { + return this.world.getAllBodies(); + } + + if (!Array.isArray(bodies)) + { + bodies = [ bodies ]; + } + + var output = []; + + for (var i = 0; i < bodies.length; i++) + { + var body = (bodies[i].hasOwnProperty('body')) ? bodies[i].body : bodies[i]; + + output.push(body); + } + + return output; + }, + + /** + * Sets both the horizontal and vertical linear velocity of the physics bodies. + * + * @method Phaser.Physics.Matter.MatterPhysics#setVelocity + * @since 3.22.0 + * + * @param {(Phaser.Types.Physics.Matter.MatterBody|Phaser.Types.Physics.Matter.MatterBody[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param {number} x - The horizontal linear velocity value. + * @param {number} y - The vertical linear velocity value. + * + * @return {this} This Matter Physics instance. + */ + setVelocity: function (bodies, x, y) + { + bodies = this.getMatterBodies(bodies); + + var vec2 = this._tempVec2; + + vec2.x = x; + vec2.y = y; + + bodies.forEach(function (body) + { + Body.setVelocity(body, vec2); + }); + + return this; + }, + + /** + * Sets just the horizontal linear velocity of the physics bodies. + * The vertical velocity of the body is unchanged. + * + * @method Phaser.Physics.Matter.MatterPhysics#setVelocityX + * @since 3.22.0 + * + * @param {(Phaser.Types.Physics.Matter.MatterBody|Phaser.Types.Physics.Matter.MatterBody[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param {number} x - The horizontal linear velocity value. + * + * @return {this} This Matter Physics instance. + */ + setVelocityX: function (bodies, x) + { + bodies = this.getMatterBodies(bodies); + + var vec2 = this._tempVec2; + + vec2.x = x; + + bodies.forEach(function (body) + { + vec2.y = body.velocity.y; + Body.setVelocity(body, vec2); + }); + + return this; + }, + + /** + * Sets just the vertical linear velocity of the physics bodies. + * The horizontal velocity of the body is unchanged. + * + * @method Phaser.Physics.Matter.MatterPhysics#setVelocityY + * @since 3.22.0 + * + * @param {(Phaser.Types.Physics.Matter.MatterBody|Phaser.Types.Physics.Matter.MatterBody[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param {number} y - The vertical linear velocity value. + * + * @return {this} This Matter Physics instance. + */ + setVelocityY: function (bodies, y) + { + bodies = this.getMatterBodies(bodies); + + var vec2 = this._tempVec2; + + vec2.y = y; + + bodies.forEach(function (body) + { + vec2.x = body.velocity.x; + Body.setVelocity(body, vec2); + }); + + return this; + }, + + /** + * Sets the angular velocity of the bodies instantly. + * Position, angle, force etc. are unchanged. + * + * @method Phaser.Physics.Matter.MatterPhysics#setAngularVelocity + * @since 3.22.0 + * + * @param {(Phaser.Types.Physics.Matter.MatterBody|Phaser.Types.Physics.Matter.MatterBody[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param {number} value - The angular velocity. + * + * @return {this} This Matter Physics instance. + */ + setAngularVelocity: function (bodies, value) + { + bodies = this.getMatterBodies(bodies); + + bodies.forEach(function (body) + { + Body.setAngularVelocity(body, value); + }); + + return this; + }, + + /** + * Applies a force to a body, at the bodies current position, including resulting torque. + * + * @method Phaser.Physics.Matter.MatterPhysics#applyForce + * @since 3.22.0 + * + * @param {(Phaser.Types.Physics.Matter.MatterBody|Phaser.Types.Physics.Matter.MatterBody[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param {Phaser.Types.Math.Vector2Like} force - A Vector that specifies the force to apply. + * + * @return {this} This Matter Physics instance. + */ + applyForce: function (bodies, force) + { + bodies = this.getMatterBodies(bodies); + + var vec2 = this._tempVec2; + + bodies.forEach(function (body) + { + vec2.x = body.position.x; + vec2.y = body.position.y; + + Body.applyForce(body, vec2, force); + }); + + return this; + }, + + /** + * Applies a force to a body, from the given world position, including resulting torque. + * If no angle is given, the current body angle is used. + * + * Use very small speed values, such as 0.1, depending on the mass and required velocity. + * + * @method Phaser.Physics.Matter.MatterPhysics#applyForceFromPosition + * @since 3.22.0 + * + * @param {(Phaser.Types.Physics.Matter.MatterBody|Phaser.Types.Physics.Matter.MatterBody[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param {Phaser.Types.Math.Vector2Like} position - A Vector that specifies the world-space position to apply the force at. + * @param {number} speed - A speed value to be applied to a directional force. + * @param {number} [angle] - The angle, in radians, to apply the force from. Leave undefined to use the current body angle. + * + * @return {this} This Matter Physics instance. + */ + applyForceFromPosition: function (bodies, position, speed, angle) + { + bodies = this.getMatterBodies(bodies); + + var vec2 = this._tempVec2; + + bodies.forEach(function (body) + { + if (angle === undefined) + { + angle = body.angle; + } + + vec2.x = speed * Math.cos(angle); + vec2.y = speed * Math.sin(angle); + + Body.applyForce(body, position, vec2); + }); + + return this; + }, + + /** + * Apply a force to a body based on the given angle and speed. + * If no angle is given, the current body angle is used. + * + * Use very small speed values, such as 0.1, depending on the mass and required velocity. + * + * @method Phaser.Physics.Matter.MatterPhysics#applyForceFromAngle + * @since 3.22.0 + * + * @param {(Phaser.Types.Physics.Matter.MatterBody|Phaser.Types.Physics.Matter.MatterBody[])} bodies - Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. + * @param {number} speed - A speed value to be applied to a directional force. + * @param {number} [angle] - The angle, in radians, to apply the force from. Leave undefined to use the current body angle. + * + * @return {this} This Matter Physics instance. + */ + applyForceFromAngle: function (bodies, speed, angle) + { + bodies = this.getMatterBodies(bodies); + + var vec2 = this._tempVec2; + + bodies.forEach(function (body) + { + if (angle === undefined) + { + angle = body.angle; + } + + vec2.x = speed * Math.cos(angle); + vec2.y = speed * Math.sin(angle); + + Body.applyForce(body, { x: body.position.x, y: body.position.y }, vec2); + }); + + return this; + }, + + /** + * Returns the length of the given constraint, which is the distance between the two points. + * + * @method Phaser.Physics.Matter.MatterPhysics#getConstraintLength + * @since 3.22.0 + * + * @param {MatterJS.ConstraintType} constraint - The constraint to get the length from. + * + * @return {number} The length of the constraint. + */ + getConstraintLength: function (constraint) + { + var aX = constraint.pointA.x; + var aY = constraint.pointA.y; + var bX = constraint.pointB.x; + var bY = constraint.pointB.y; + + if (constraint.bodyA) + { + aX += constraint.bodyA.position.x; + aY += constraint.bodyA.position.y; + } + + if (constraint.bodyB) + { + bX += constraint.bodyB.position.x; + bY += constraint.bodyB.position.y; + } + + return DistanceBetween(aX, aY, bX, bY); + }, + + /** + * Aligns a Body, or Matter Game Object, against the given coordinates. + * + * The alignment takes place using the body bounds, which take into consideration things + * like body scale and rotation. + * + * Although a Body has a `position` property, it is based on the center of mass for the body, + * not a dimension based center. This makes aligning bodies difficult, especially if they have + * rotated or scaled. This method will derive the correct position based on the body bounds and + * its center of mass offset, in order to align the body with the given coordinate. + * + * For example, if you wanted to align a body so it sat in the bottom-center of the + * Scene, and the world was 800 x 600 in size: + * + * ```javascript + * this.matter.alignBody(body, 400, 600, Phaser.Display.Align.BOTTOM_CENTER); + * ``` + * + * You pass in 400 for the x coordinate, because that is the center of the world, and 600 for + * the y coordinate, as that is the base of the world. + * + * @method Phaser.Physics.Matter.MatterPhysics#alignBody + * @since 3.22.0 + * + * @param {Phaser.Types.Physics.Matter.MatterBody} body - The Body to align. + * @param {number} x - The horizontal position to align the body to. + * @param {number} y - The vertical position to align the body to. + * @param {integer} align - One of the `Phaser.Display.Align` constants, such as `Phaser.Display.Align.TOP_LEFT`. + * + * @return {this} This Matter Physics instance. + */ + alignBody: function (body, x, y, align) + { + body = (body.hasOwnProperty('body')) ? body.body : body; + + var pos; + + switch (align) + { + case ALIGN_CONST.TOP_LEFT: + case ALIGN_CONST.LEFT_TOP: + pos = this.bodyBounds.getTopLeft(body, x, y); + break; + + case ALIGN_CONST.TOP_CENTER: + pos = this.bodyBounds.getTopCenter(body, x, y); + break; + + case ALIGN_CONST.TOP_RIGHT: + case ALIGN_CONST.RIGHT_TOP: + pos = this.bodyBounds.getTopRight(body, x, y); + break; + + case ALIGN_CONST.LEFT_CENTER: + pos = this.bodyBounds.getLeftCenter(body, x, y); + break; + + case ALIGN_CONST.CENTER: + pos = this.bodyBounds.getCenter(body, x, y); + break; + + case ALIGN_CONST.RIGHT_CENTER: + pos = this.bodyBounds.getRightCenter(body, x, y); + break; + + case ALIGN_CONST.LEFT_BOTTOM: + case ALIGN_CONST.BOTTOM_LEFT: + pos = this.bodyBounds.getBottomLeft(body, x, y); + break; + + case ALIGN_CONST.BOTTOM_CENTER: + pos = this.bodyBounds.getBottomCenter(body, x, y); + break; + + case ALIGN_CONST.BOTTOM_RIGHT: + case ALIGN_CONST.RIGHT_BOTTOM: + pos = this.bodyBounds.getBottomRight(body, x, y); + break; + } + + if (pos) + { + Body.setPosition(body, pos); + } + + return this; + }, + /** * The Scene that owns this plugin is shutting down. * We need to kill and reset all internal properties as well as stop listening to Scene events. @@ -195545,10 +199613,10 @@ module.exports = MatterPhysics; /***/ }), -/* 1432 */ +/* 1445 */ /***/ (function(module, exports, __webpack_require__) { -var Matter = __webpack_require__(1274); +var Matter = __webpack_require__(1286); /** * An attractors plugin for matter.js. @@ -195559,7 +199627,7 @@ var MatterAttractors = { // plugin meta name: 'matter-attractors', // PLUGIN_NAME version: '0.1.7', // PLUGIN_VERSION - for: 'matter-js@^0.13.1', + for: 'matter-js@^0.14.2', silent: true, // no console log please // installs the plugin where `base` is `Matter` @@ -195687,10 +199755,143 @@ module.exports = MatterAttractors; /***/ }), -/* 1433 */ +/* 1446 */ +/***/ (function(module, exports) { + +/** + * @author @dxu https://github.com/dxu/matter-collision-events + * @author Richard Davey + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var MatterCollisionEvents = { + + name: 'matter-collision-events', + version: '0.1.6', + for: 'matter-js@^0.14.2', + silent: true, + + install: function (matter) + { + matter.after('Engine.create', function () + { + matter.Events.on(this, 'collisionStart', function (event) + { + event.pairs.map(function (pair) + { + var bodyA = pair.bodyA; + var bodyB = pair.bodyB; + + if (bodyA.gameObject) + { + bodyA.gameObject.emit('collide', bodyA, bodyB, pair); + } + + if (bodyB.gameObject) + { + bodyB.gameObject.emit('collide', bodyB, bodyA, pair); + } + + matter.Events.trigger(bodyA, 'onCollide', { pair: pair }); + matter.Events.trigger(bodyB, 'onCollide', { pair: pair }); + + if (bodyA.onCollideCallback) + { + bodyA.onCollideCallback(pair); + } + + if (bodyB.onCollideCallback) + { + bodyB.onCollideCallback(pair); + } + + if (bodyA.onCollideWith[bodyB.id]) + { + bodyA.onCollideWith[bodyB.id](bodyB, pair); + } + + if (bodyB.onCollideWith[bodyA.id]) + { + bodyB.onCollideWith[bodyA.id](bodyA, pair); + } + }); + }); + + matter.Events.on(this, 'collisionActive', function (event) + { + event.pairs.map(function (pair) + { + var bodyA = pair.bodyA; + var bodyB = pair.bodyB; + + if (bodyA.gameObject) + { + bodyA.gameObject.emit('collideActive', bodyA, bodyB, pair); + } + + if (bodyB.gameObject) + { + bodyB.gameObject.emit('collideActive', bodyB, bodyA, pair); + } + + matter.Events.trigger(bodyA, 'onCollideActive', { pair: pair }); + matter.Events.trigger(bodyB, 'onCollideActive', { pair: pair }); + + if (bodyA.onCollideActiveCallback) + { + bodyA.onCollideActiveCallback(pair); + } + + if (bodyB.onCollideActiveCallback) + { + bodyB.onCollideActiveCallback(pair); + } + }); + }); + + matter.Events.on(this, 'collisionEnd', function (event) + { + event.pairs.map(function (pair) + { + var bodyA = pair.bodyA; + var bodyB = pair.bodyB; + + if (bodyA.gameObject) + { + bodyA.gameObject.emit('collideEnd', bodyA, bodyB, pair); + } + + if (bodyB.gameObject) + { + bodyB.gameObject.emit('collideEnd', bodyB, bodyA, pair); + } + + matter.Events.trigger(bodyA, 'onCollideEnd', { pair: pair }); + matter.Events.trigger(bodyB, 'onCollideEnd', { pair: pair }); + + if (bodyA.onCollideEndCallback) + { + bodyA.onCollideEndCallback(pair); + } + + if (bodyB.onCollideEndCallback) + { + bodyB.onCollideEndCallback(pair); + } + }); + }); + }); + } +}; + +module.exports = MatterCollisionEvents; + + +/***/ }), +/* 1447 */ /***/ (function(module, exports, __webpack_require__) { -var Matter = __webpack_require__(1274); +var Matter = __webpack_require__(1286); /** * A coordinate wrapping plugin for matter.js. @@ -195701,7 +199902,7 @@ var MatterWrap = { // plugin meta name: 'matter-wrap', // PLUGIN_NAME version: '0.1.4', // PLUGIN_VERSION - for: 'matter-js@^0.13.1', + for: 'matter-js@^0.14.2', silent: true, // no console log please // installs the plugin where `base` is `Matter` @@ -195869,12 +200070,12 @@ module.exports = MatterWrap; */ /***/ }), -/* 1434 */ +/* 1448 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195888,20 +200089,20 @@ module.exports = MatterWrap; module.exports = { - Canvas: __webpack_require__(1435), - Snapshot: __webpack_require__(1436), - WebGL: __webpack_require__(1437) + Canvas: __webpack_require__(1449), + Snapshot: __webpack_require__(1450), + WebGL: __webpack_require__(1451) }; /***/ }), -/* 1435 */ +/* 1449 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195911,20 +200112,20 @@ module.exports = { module.exports = { - CanvasRenderer: __webpack_require__(485), - GetBlendModes: __webpack_require__(487), + CanvasRenderer: __webpack_require__(499), + GetBlendModes: __webpack_require__(501), SetTransform: __webpack_require__(27) }; /***/ }), -/* 1436 */ +/* 1450 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195934,19 +200135,19 @@ module.exports = { module.exports = { - Canvas: __webpack_require__(486), - WebGL: __webpack_require__(489) + Canvas: __webpack_require__(500), + WebGL: __webpack_require__(503) }; /***/ }), -/* 1437 */ +/* 1451 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195957,9 +200158,9 @@ module.exports = { module.exports = { Utils: __webpack_require__(10), - WebGLPipeline: __webpack_require__(233), - WebGLRenderer: __webpack_require__(488), - Pipelines: __webpack_require__(1438), + WebGLPipeline: __webpack_require__(234), + WebGLRenderer: __webpack_require__(502), + Pipelines: __webpack_require__(1452), // Constants BYTE: 0, @@ -195972,12 +200173,12 @@ module.exports = { /***/ }), -/* 1438 */ +/* 1452 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195987,10 +200188,10 @@ module.exports = { module.exports = { - BitmapMaskPipeline: __webpack_require__(490), - ForwardDiffuseLightPipeline: __webpack_require__(491), - TextureTintPipeline: __webpack_require__(234), - ModelViewProjection: __webpack_require__(492) + BitmapMaskPipeline: __webpack_require__(504), + ForwardDiffuseLightPipeline: __webpack_require__(505), + TextureTintPipeline: __webpack_require__(235), + ModelViewProjection: __webpack_require__(506) }; diff --git a/dist/phaser.min.js b/dist/phaser.min.js index 4c9faebfd..efff29f22 100644 --- a/dist/phaser.min.js +++ b/dist/phaser.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Phaser",[],e):"object"==typeof exports?exports.Phaser=e():t.Phaser=e()}(window,function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=1376)}([function(t,e){function i(t,e,i){var n=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&n.value&&"object"==typeof n.value&&(n=n.value),!(!n||!function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(n))&&(void 0===n.enumerable&&(n.enumerable=!0),void 0===n.configurable&&(n.configurable=!0),n)}function n(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function s(t,e,s,r){for(var a in e)if(e.hasOwnProperty(a)){var h=i(e,a,s);if(!1!==h){if(n((r||t).prototype,a)){if(o.ignoreFinals)continue;throw new Error("cannot override final property '"+a+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,a,h)}else t.prototype[a]=e[a]}}function r(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this}});n.ZERO=new n,n.RIGHT=new n(1,0),n.LEFT=new n(-1,0),n.UP=new n(0,-1),n.DOWN=new n(0,1),n.ONE=new n(1,1),t.exports=n},function(t,e,i){var n=i(0),s=i(46),r=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=s.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=r},function(t,e,i){var n=i(0),s=i(21),r=i(22),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.displayList,this.updateList,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){this.systems.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},s.register("GameObjectFactory",o,"add"),t.exports=o},function(t,e){t.exports=function(t,e,i){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return t[e];if(-1!==e.indexOf(".")){for(var n=e.split("."),s=t,r=i,o=0;o>>0},getTintAppendFloatAlpha:function(t,e){return((255&(255*e|0))<<24|t)>>>0},getTintAppendFloatAlphaAndSwap:function(t,e){return((255&(255*e|0))<<24|(255&(0|t))<<16|(255&(t>>8|0))<<8|255&(t>>16|0))>>>0},getFloatsFromUintRGB:function(t){return[(255&(t>>16|0))/255,(255&(t>>8|0))/255,(255&(0|t))/255]},getComponentCount:function(t,e){for(var i=0,n=0;n=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},function(t,e,i){t.exports={Alpha:i(252),Animation:i(484),BlendMode:i(255),ComputedSize:i(527),Crop:i(528),Depth:i(256),Flip:i(529),GetBounds:i(530),Mask:i(260),Origin:i(547),PathFollower:i(548),Pipeline:i(151),ScrollFactor:i(263),Size:i(549),Texture:i(550),TextureCrop:i(551),Tint:i(552),ToJSON:i(264),Transform:i(265),TransformMatrix:i(32),Visible:i(266)}},function(t,e){var i={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=i},function(t,e,i){var n=i(0),s=i(264),r=i(111),o=i(9),a=i(90),h=new n({Extends:o,initialize:function(t,e){o.call(this),this.scene=t,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new r(this)),this},setData:function(t,e){return this.data||(this.data=new r(this)),this.data.set(t,e),this},getData:function(t){return this.data||(this.data=new r(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.input&&(this.input.enabled=!1),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},update:function(){},toJSON:function(){return s(this)},willRender:function(t){return!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return i.unshift(this.scene.sys.displayList.getIndex(t)),i},destroy:function(t){if(void 0===t&&(t=!1),this.scene&&!this.ignoreDestroy){this.preDestroy&&this.preDestroy.call(this),this.emit(a.DESTROY,this);var e=this.scene.sys;t||(e.displayList.remove(this),e.updateList.remove(this)),this.input&&(e.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),t||e.queueDepthSort(),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0,this.removeAllListeners()}}});h.RENDER_MASK=15,t.exports=h},function(t,e,i){var n=i(166),s=i(6);t.exports=function(t,e,i){var r=s(t,e,null);if(null===r)return i;if(Array.isArray(r))return n.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return n.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return n.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},function(t,e,i){var n=i(0),s=i(21),r=i(22),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.displayList,this.updateList,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},s.register("GameObjectCreator",o,"make"),t.exports=o},function(t,e,i){var n=i(7),s=function(){var t,e,i,r,o,a,h=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof h&&(c=h,h=arguments[1]||{},l=2),u===l&&(h=this,--l);l=400&&t.status<=599&&(n=!1),this.resetXHR(),this.loader.nextFile(this,n)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(r.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=s.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=s.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){this.state=s.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.cache.add(this.key,this.data),this.pendingDestroy()},pendingDestroy:function(t){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(r.FILE_COMPLETE,e,i,t),this.loader.emit(r.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this)},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var n=new FileReader;n.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+n.result.split(",")[1]},n.onerror=t.onerror,n.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},function(t,e){var i={},n={},s={register:function(t,e,n,s){void 0===s&&(s=!1),i[t]={plugin:e,mapping:n,custom:s}},registerCustom:function(t,e,i,s){n[t]={plugin:e,mapping:i,data:s}},hasCore:function(t){return i.hasOwnProperty(t)},hasCustom:function(t){return n.hasOwnProperty(t)},getCore:function(t){return i[t]},getCustom:function(t){return n[t]},getCustomClass:function(t){return n.hasOwnProperty(t)?n[t].plugin:null},remove:function(t){i.hasOwnProperty(t)&&delete i[t]},removeCustom:function(t){n.hasOwnProperty(t)&&delete n[t]},destroyCorePlugins:function(){for(var t in i)i.hasOwnProperty(t)&&delete i[t]},destroyCustomPlugins:function(){for(var t in n)n.hasOwnProperty(t)&&delete n[t]}};t.exports=s},function(t,e,i){t.exports={BOOT:i(681),CREATE:i(682),DESTROY:i(683),PAUSE:i(684),POST_UPDATE:i(685),PRE_UPDATE:i(686),READY:i(687),RENDER:i(688),RESUME:i(689),SHUTDOWN:i(690),SLEEP:i(691),START:i(692),TRANSITION_COMPLETE:i(693),TRANSITION_INIT:i(694),TRANSITION_OUT:i(695),TRANSITION_START:i(696),TRANSITION_WAKE:i(697),UPDATE:i(698),WAKE:i(699)}},function(t,e){t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=o.width),void 0===s&&(s=o.height);var a=n(r,"isNotEmpty",!1),h=n(r,"isColliding",!1),l=n(r,"hasInterestingFace",!1);t<0&&(i+=t,t=0),e<0&&(s+=e,e=0),t+i>o.width&&(i=Math.max(o.width-t,0)),e+s>o.height&&(s=Math.max(o.height-e,0));for(var u=[],c=e;c=0;o--)t[o][e]=i+a*n,a++;return t}},function(t,e,i){var n,s,r,o=i(29),a=i(162),h=[],l=!1;t.exports={create2D:function(t,e,i){return n(t,e,i,o.CANVAS)},create:n=function(t,e,i,n,r){var u;void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=o.CANVAS),void 0===r&&(r=!1);var c=s(n);return null===c?(c={parent:t,canvas:document.createElement("canvas"),type:n},n===o.CANVAS&&h.push(c),u=c.canvas):(c.parent=t,u=c.canvas),r&&(c.parent=u),u.width=e,u.height=i,l&&n===o.CANVAS&&a.disable(u.getContext("2d")),u},createWebGL:function(t,e,i){return n(t,e,i,o.WEBGL)},disableSmoothing:function(){l=!0},enableSmoothing:function(){l=!1},first:s=function(t){if(void 0===t&&(t=o.CANVAS),t===o.WEBGL)return null;for(var e=0;e0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):n||r?s.TAU-(r>0?Math.acos(-n/this.scaleY):-Math.acos(n/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),n=this.matrix,s=n[0],r=n[1],o=n[2],a=n[3];return n[0]=s*i+o*e,n[1]=r*i+a*e,n[2]=s*-e+o*i,n[3]=r*-e+a*i,this},multiply:function(t,e){var i=this.matrix,n=t.matrix,s=i[0],r=i[1],o=i[2],a=i[3],h=i[4],l=i[5],u=n[0],c=n[1],d=n[2],f=n[3],p=n[4],g=n[5],v=void 0===e?this:e;return v.a=u*s+c*o,v.b=u*r+c*a,v.c=d*s+f*o,v.d=d*r+f*a,v.e=p*s+g*o+h,v.f=p*r+g*a+l,v},multiplyWithOffset:function(t,e,i){var n=this.matrix,s=t.matrix,r=n[0],o=n[1],a=n[2],h=n[3],l=e*r+i*a+n[4],u=e*o+i*h+n[5],c=s[0],d=s[1],f=s[2],p=s[3],g=s[4],v=s[5];return n[0]=c*r+d*a,n[1]=c*o+d*h,n[2]=f*r+p*a,n[3]=f*o+p*h,n[4]=g*r+v*a+l,n[5]=g*o+v*h+u,this},transform:function(t,e,i,n,s,r){var o=this.matrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],d=o[5];return o[0]=t*a+e*l,o[1]=t*h+e*u,o[2]=i*a+n*l,o[3]=i*h+n*u,o[4]=s*a+r*l+c,o[5]=s*h+r*u+d,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var n=this.matrix,s=n[0],r=n[1],o=n[2],a=n[3],h=n[4],l=n[5];return i.x=t*s+e*o+h,i.y=t*r+e*a+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=e*s-i*n;return t[0]=s/a,t[1]=-i/a,t[2]=-n/a,t[3]=e/a,t[4]=(n*o-s*r)/a,t[5]=-(e*o-i*r)/a,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){var e=this.matrix;return t.setTransform(e[0],e[1],e[2],e[3],e[4],e[5]),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,i,n,s,r){var o=this.matrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=n,o[4]=s,o[5]=r,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],n=e[1],s=e[2],r=e[3],o=i*r-n*s;if(t.translateX=e[4],t.translateY=e[5],i||n){var a=Math.sqrt(i*i+n*n);t.rotation=n>0?Math.acos(i/a):-Math.acos(i/a),t.scaleX=a,t.scaleY=o/a}else if(s||r){var h=Math.sqrt(s*s+r*r);t.rotation=.5*Math.PI-(r>0?Math.acos(-s/h):-Math.acos(s/h)),t.scaleX=o/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,i,n,s){var r=this.matrix,o=Math.sin(i),a=Math.cos(i);return r[4]=t,r[5]=e,r[0]=a*n,r[1]=o*n,r[2]=-o*s,r[3]=a*s,this},applyInverse:function(t,e,i){void 0===i&&(i=new r);var n=this.matrix,s=n[0],o=n[1],a=n[2],h=n[3],l=n[4],u=n[5],c=1/(s*h+a*-o);return i.x=h*c*t+-a*c*e+(u*a-l*h)*c,i.y=s*c*e+-o*c*t+(-u*s+l*o)*c,i},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.decomposedMatrix=null}});t.exports=o},function(t,e,i){var n=i(0),s=i(160),r=i(278),o=i(161),a=i(279),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(t,e,i,n)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(t,e,i,n,s){return void 0===n&&(n=255),void 0===s&&(s=!0),this._locked=!0,this.red=t,this.green=e,this.blue=i,this.alpha=n,this._locked=!1,this.update(s)},setGLTo:function(t,e,i,n){return void 0===n&&(n=1),this._locked=!0,this.redGL=t,this.greenGL=e,this.blueGL=i,this.alphaGL=n,this._locked=!1,this.update(!0)},setFromRGB:function(t){return this._locked=!0,this.red=t.r,this.green=t.g,this.blue=t.b,t.hasOwnProperty("a")&&(this.alpha=t.a),this._locked=!1,this.update(!0)},setFromHSV:function(t,e,i){return o(t,e,i,this)},update:function(t){if(void 0===t&&(t=!1),this._locked)return this;var e=this.r,i=this.g,n=this.b,o=this.a;return this._color=s(e,i,n),this._color32=r(e,i,n,o),this._rgba="rgba("+e+","+i+","+n+","+o/255+")",t&&a(e,i,n,this),this},updateHSV:function(){var t=this.r,e=this.g,i=this.b;return a(t,e,i,this),this},clone:function(){return new h(this.r,this.g,this.b,this.a)},gray:function(t){return this.setTo(t,t,t)},random:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t)),n=Math.floor(t+Math.random()*(e-t)),s=Math.floor(t+Math.random()*(e-t));return this.setTo(i,n,s)},randomGray:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t));return this.setTo(i,i,i)},saturate:function(t){return this.s+=t/100,this},desaturate:function(t){return this.s-=t/100,this},lighten:function(t){return this.v+=t/100,this},darken:function(t){return this.v-=t/100,this},brighten:function(t){var e=this.r,i=this.g,n=this.b;return e=Math.max(0,Math.min(255,e-Math.round(-t/100*255))),i=Math.max(0,Math.min(255,i-Math.round(-t/100*255))),n=Math.max(0,Math.min(255,n-Math.round(-t/100*255))),this.setTo(e,i,n)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(t){this.gl[0]=Math.min(Math.abs(t),1),this.r=Math.floor(255*this.gl[0]),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(t){this.gl[1]=Math.min(Math.abs(t),1),this.g=Math.floor(255*this.gl[1]),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(t){this.gl[2]=Math.min(Math.abs(t),1),this.b=Math.floor(255*this.gl[2]),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(t){this.gl[3]=Math.min(Math.abs(t),1),this.a=Math.floor(255*this.gl[3]),this.update()}},red:{get:function(){return this.r},set:function(t){t=Math.floor(Math.abs(t)),this.r=Math.min(t,255),this.gl[0]=t/255,this.update(!0)}},green:{get:function(){return this.g},set:function(t){t=Math.floor(Math.abs(t)),this.g=Math.min(t,255),this.gl[1]=t/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(t){t=Math.floor(Math.abs(t)),this.b=Math.min(t,255),this.gl[2]=t/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(t){t=Math.floor(Math.abs(t)),this.a=Math.min(t,255),this.gl[3]=t/255,this.update()}},h:{get:function(){return this._h},set:function(t){this._h=t,o(t,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(t){this._s=t,o(this._h,t,this._v,this)}},v:{get:function(){return this._v},set:function(t){this._v=t,o(this._h,this._s,t,this)}}});t.exports=h},function(t,e){t.exports=function(t,e,i,n,s,r){var o;void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=1);var a=0,h=t.length;if(1===r)for(o=s;o=0;o--)t[o][e]+=i+a*n,a++;return t}},function(t,e,i){var n=i(13);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.fillColor,r=n||e.fillAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.fillStyle="rgba("+o+","+a+","+h+","+r+")"}},function(t,e,i){(function(e){var i={};t.exports=i,function(){i._nextId=0,i._seed=0,i._nowStartTime=+new Date,i.extend=function(t,e){var n,s;"boolean"==typeof e?(n=2,s=e):(n=1,s=!0);for(var r=n;r0;e--){var n=Math.floor(i.random()*(e+1)),s=t[e];t[e]=t[n],t[n]=s}return t},i.choose=function(t){return t[Math.floor(i.random()*t.length)]},i.isElement=function(t){return"undefined"!=typeof HTMLElement?t instanceof HTMLElement:!!(t&&t.nodeType&&t.nodeName)},i.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},i.isFunction=function(t){return"function"==typeof t},i.isPlainObject=function(t){return"object"==typeof t&&t.constructor===Object},i.isString=function(t){return"[object String]"===toString.call(t)},i.clamp=function(t,e,i){return ti?i:t},i.sign=function(t){return t<0?-1:1},i.now=function(){if(window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return new Date-i._nowStartTime},i.random=function(e,i){return e=void 0!==e?e:0,i=void 0!==i?i:1,e+t()*(i-e)};var t=function(){return i._seed=(9301*i._seed+49297)%233280,i._seed/233280};i.colorToNumber=function(t){return 3==(t=t.replace("#","")).length&&(t=t.charAt(0)+t.charAt(0)+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2)),parseInt(t,16)},i.logLevel=1,i.log=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.info=function(){console&&i.logLevel>0&&i.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.warn=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.nextId=function(){return i._nextId++},i.indexOf=function(t,e){if(t.indexOf)return t.indexOf(e);for(var i=0;i=e&&t.y<=i&&t.y+t.height>=i}},function(t,e,i){t.exports={DESTROY:i(622),FADE_IN_COMPLETE:i(623),FADE_IN_START:i(624),FADE_OUT_COMPLETE:i(625),FADE_OUT_START:i(626),FLASH_COMPLETE:i(627),FLASH_START:i(628),PAN_COMPLETE:i(629),PAN_START:i(630),POST_RENDER:i(631),PRE_RENDER:i(632),SHAKE_COMPLETE:i(633),SHAKE_START:i(634),ZOOM_COMPLETE:i(635),ZOOM_START:i(636)}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.strokeColor,r=n||e.strokeAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.strokeStyle="rgba("+o+","+a+","+h+","+r+")",t.lineWidth=e.lineWidth}},function(t,e){t.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},function(t,e,i){var n=i(137),s=i(24);t.exports=function(t,e,i,r,o){for(var a=null,h=null,l=null,u=null,c=s(t,e,i,r,null,o),d=0;d0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e,i){var n=i(0),s=i(258),r=i(148),o=i(46),a=i(149),h=i(3),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=o.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(t){return void 0===t&&(t=new h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=l},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return Math.sqrt(s*s+r*r)}},function(t,e,i){t.exports={COMPLETE:i(871),DECODED:i(872),DECODED_ALL:i(873),DESTROY:i(874),DETUNE:i(875),GLOBAL_DETUNE:i(876),GLOBAL_MUTE:i(877),GLOBAL_RATE:i(878),GLOBAL_VOLUME:i(879),LOOP:i(880),LOOPED:i(881),MUTE:i(882),PAUSE_ALL:i(883),PAUSE:i(884),PLAY:i(885),RATE:i(886),RESUME_ALL:i(887),RESUME:i(888),SEEK:i(889),STOP_ALL:i(890),STOP:i(891),UNLOCKED:i(892),VOLUME:i(893)}},function(t,e,i){var n=i(0),s=i(19),r=i(20),o=i(8),a=i(2),h=i(6),l=i(7),u=new n({Extends:r,initialize:function(t,e,i,n,o){var u="json";if(l(e)){var c=e;e=a(c,"key"),i=a(c,"url"),n=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"dataKey",o)}var d={type:"json",cache:t.cacheManager.json,extension:u,responseType:"text",key:e,url:i,xhrSettings:n,config:o};r.call(this,t,d),l(i)&&(this.data=o?h(i,o):i,this.state=s.FILE_POPULATED)},onProcess:function(){if(this.state!==s.FILE_POPULATED){this.state=s.FILE_PROCESSING;var t=JSON.parse(this.xhrLoader.responseText),e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});o.register("json",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s0&&(o.angle+=t.angularVelocity,r.rotateAbout(o.position,i,t.position,o.position))}},n.setVelocity=function(t,e){t.positionPrev.x=t.position.x-e.x,t.positionPrev.y=t.position.y-e.y,t.velocity.x=e.x,t.velocity.y=e.y,t.speed=r.magnitude(t.velocity)},n.setAngularVelocity=function(t,e){t.anglePrev=t.angle-e,t.angularVelocity=e,t.angularSpeed=Math.abs(t.angularVelocity)},n.translate=function(t,e){n.setPosition(t,r.add(t.position,e))},n.rotate=function(t,e,i){if(i){var s=Math.cos(e),r=Math.sin(e),o=t.position.x-i.x,a=t.position.y-i.y;n.setPosition(t,{x:i.x+(o*s-a*r),y:i.y+(o*r+a*s)}),n.setAngle(t,t.angle+e)}else n.setAngle(t,t.angle+e)},n.scale=function(t,e,i,r){var o=0,a=0;r=r||t.position;for(var u=0;u0&&(o+=c.area,a+=c.inertia),c.position.x=r.x+(c.position.x-r.x)*e,c.position.y=r.y+(c.position.y-r.y)*i,h.update(c.bounds,c.vertices,t.velocity)}t.parts.length>1&&(t.area=o,t.isStatic||(n.setMass(t,t.density*o),n.setInertia(t,a))),t.circleRadius&&(e===i?t.circleRadius*=e:t.circleRadius=null)},n.update=function(t,e,i,n){var o=Math.pow(e*i*t.timeScale,2),a=1-t.frictionAir*i*t.timeScale,u=t.position.x-t.positionPrev.x,c=t.position.y-t.positionPrev.y;t.velocity.x=u*a*n+t.force.x/t.mass*o,t.velocity.y=c*a*n+t.force.y/t.mass*o,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.position.x+=t.velocity.x,t.position.y+=t.velocity.y,t.angularVelocity=(t.angle-t.anglePrev)*a*n+t.torque/t.inertia*o,t.anglePrev=t.angle,t.angle+=t.angularVelocity,t.speed=r.magnitude(t.velocity),t.angularSpeed=Math.abs(t.angularVelocity);for(var d=0;d0&&(f.position.x+=t.velocity.x,f.position.y+=t.velocity.y),0!==t.angularVelocity&&(s.rotate(f.vertices,t.angularVelocity,t.position),l.rotate(f.axes,t.angularVelocity),d>0&&r.rotateAbout(f.position,t.angularVelocity,t.position,f.position)),h.update(f.bounds,f.vertices,t.velocity)}},n.applyForce=function(t,e,i){t.force.x+=i.x,t.force.y+=i.y;var n=e.x-t.position.x,s=e.y-t.position.y;t.torque+=n*i.y-s*i.x},n._totalProperties=function(t){for(var e={mass:0,area:0,inertia:0,centre:{x:0,y:0}},i=1===t.parts.length?0:1;i80*i){n=h=t[0],a=l=t[1];for(var T=i;Th&&(h=u),f>l&&(l=f);g=0!==(g=Math.max(h-n,l-a))?1/g:0}return o(y,x,i,n,a,g),x}function s(t,e,i,n,s){var r,o;if(s===A(t,e,i,n)>0)for(r=e;r=e;r-=n)o=b(r,t[r],t[r+1],o);return o&&y(o,o.next)&&(E(o),o=o.next),o}function r(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!y(n,n.next)&&0!==m(n.prev,n,n.next))n=n.next;else{if(E(n),(n=e=n.prev)===n.next)break;i=!0}}while(i||n!==e);return e}function o(t,e,i,n,s,c,d){if(t){!d&&c&&function(t,e,i,n){var s=t;do{null===s.z&&(s.z=f(s.x,s.y,e,i,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,i,n,s,r,o,a,h,l=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||h>0&&n;)0!==a&&(0===h||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,h--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,l*=2}while(o>1)}(s)}(t,n,s,c);for(var p,g,v=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,n,s,c):a(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),E(t),t=g.next,v=g.next;else if((t=g)===v){d?1===d?o(t=l(t,e,i),e,i,n,s,c,2):2===d&&u(t,e,i,n,s,c):o(r(t),e,i,n,s,c,1);break}}}function a(t){var e=t.prev,i=t,n=t.next;if(m(e,i,n)>=0)return!1;for(var s=t.next.next;s!==t.prev;){if(g(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&m(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function h(t,e,i,n){var s=t.prev,r=t,o=t.next;if(m(s,r,o)>=0)return!1;for(var a=s.xr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,u=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=f(a,h,e,i,n),d=f(l,u,e,i,n),p=t.prevZ,v=t.nextZ;p&&p.z>=c&&v&&v.z<=d;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&m(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,v!==t.prev&&v!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&m(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;v&&v.z<=d;){if(v!==t.prev&&v!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function l(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!y(s,r)&&x(s,n,n.next,r)&&T(s,r)&&T(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),E(n),E(n.next),n=t=r),n=n.next}while(n!==t);return n}function u(t,e,i,n,s,a){var h=t;do{for(var l=h.next.next;l!==h.prev;){if(h.i!==l.i&&v(h,l)){var u=w(h,l);return h=r(h,h.next),u=r(u,u.next),o(h,e,i,n,s,a),void o(u,e,i,n,s,a)}l=l.next}h=h.next}while(h!==t)}function c(t,e){return t.x-e.x}function d(t,e){if(e=function(t,e){var i,n=e,s=t.x,r=t.y,o=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&a>o){if(o=a,a===s){if(r===n.y)return n;if(r===n.next.y)return n.next}i=n.x=n.x&&n.x>=u&&s!==n.x&&g(ri.x)&&T(n,t)&&(i=n,d=h),n=n.next;return i}(t,e)){var i=w(e,t);r(i,i.next)}}function f(t,e,i,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*s)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*s)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{e.x=0&&(t-o)*(n-a)-(i-o)*(e-a)>=0&&(i-o)*(r-a)-(s-o)*(n-a)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&x(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&T(t,e)&&T(e,t)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(t,e)}function m(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function y(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,i,n){return!!(y(t,e)&&y(i,n)||y(t,n)&&y(i,e))||m(t,e,i)>0!=m(t,e,n)>0&&m(i,n,t)>0!=m(i,n,e)>0}function T(t,e){return m(t.prev,t,t.next)<0?m(t,e,t.next)>=0&&m(t,t.prev,e)>=0:m(t,e,t.prev)<0||m(t,t.next,e)<0}function w(t,e){var i=new S(t.i,t.x,t.y),n=new S(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function b(t,e,i,n){var s=new S(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function E(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function S(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(t,e,i,n){for(var s=0,r=e,o=i-n;r0&&(n+=t[s-1].length,i.holes.push(n))}return i}},function(t,e){t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},function(t,e){t.exports=function(t,e,i,n){var s=t.length;if(e<0||e>s||e>=i||i>s||e+i>s){if(n)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},function(t,e,i){var n=i(0),s=i(12),r=i(14),o=i(949),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Size,s.TextureCrop,s.Tint,s.Transform,s.Visible,o],initialize:function(t,e,i,n,o){r.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new s.Animation(this),this.setTexture(n,o),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e,i){return this.anims.play(t,e,i),this},toJSON:function(){return s.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=a},function(t,e,i){var n=i(10);t.exports=function(t,e,i,s,r){var o=t.strokeTint,a=n.getTintAppendFloatAlphaAndSwap(e.strokeColor,e.strokeAlpha*i);o.TL=a,o.TR=a,o.BL=a,o.BR=a;var h=e.pathData,l=h.length-1,u=e.lineWidth,c=u/2,d=h[0]-s,f=h[1]-r;e.closePath||(l-=2);for(var p=2;p=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=u},function(t,e,i){var n=i(0),s=i(19),r=i(20),o=i(8),a=i(2),h=i(7),l=new n({Extends:r,initialize:function t(e,i,n,s,o){var l,u="png";if(h(i)){var c=i;i=a(c,"key"),n=a(c,"url"),l=a(c,"normalMap"),s=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"frameConfig")}Array.isArray(n)&&(l=n[1],n=n[0]);var d={type:"image",cache:e.textureManager,extension:u,responseType:"blob",key:i,url:n,xhrSettings:s,config:o};if(r.call(this,e,d),l){var f=new t(e,this.key,l,s,o);f.type="normalMap",this.setLink(f),e.addFile(f)}},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){r.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(t.data),t.onProcessError()},r.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===s.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});o.register("image",function(t,e,i){if(Array.isArray(t))for(var n=0;nthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=t.properties,this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(t){var e=this.tilemapLayer;return e?e.tileToWorldX(this.x,t):this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return void 0===e&&(e=new r),e.x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-e.y,e},getCenterX:function(t){return(this.getLeft(t)+this.getRight(t))/2},getCenterY:function(t){return(this.getTop(t)+this.getBottom(t))/2},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){(void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){(void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight,this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.layer.tilemapLayer;if(t){var e=t.gidMap[this.index];if(e)return e}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=o},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,n=t[e],s=e;si&&(e=i/2);var n=Math.max(1,Math.round(i/e));return s(this.getSpacedPoints(n),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],n=this.getPoint(0,this._tmpVec2A),s=0;i.push(0);for(var r=1;r<=t;r++)s+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(n),i.push(s),n.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var n=0;n<=t;n++)i.push(this.getPoint(n/t));return i},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++){var n=this.getUtoTmapping(i/t,null,t);e.push(this.getPoint(n))}return e},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=t-1e-4,n=t+1e-4;return i<0&&(i=0),n>1&&(n=1),this.getPoint(i,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var n,s=this.getLengths(i),r=0,o=s.length;n=e?Math.min(e,s[o-1]):t*s[o-1];for(var a,h=0,l=o-1;h<=l;)if((a=s[r=Math.floor(h+(l-h)/2)]-n)<0)h=r+1;else{if(!(a>0)){l=r;break}l=r-1}if(s[r=l]===n)return r/(o-1);var u=s[r];return(r+(n-u)/(s[r+1]-u))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},function(t,e,i){t.exports={ADD:i(850),COMPLETE:i(851),FILE_COMPLETE:i(852),FILE_KEY_COMPLETE:i(853),FILE_LOAD_ERROR:i(854),FILE_LOAD:i(855),FILE_PROGRESS:i(856),POST_PROCESS:i(857),PROGRESS:i(858),START:i(859)}},function(t,e,i){var n=i(164),s=i(178);t.exports=function(t,e){var i=n.Power0;if("string"==typeof t)if(n.hasOwnProperty(t))i=n[t];else{var r="";t.indexOf(".")&&("in"===(r=t.substr(t.indexOf(".")+1)).toLowerCase()?r="easeIn":"out"===r.toLowerCase()?r="easeOut":"inout"===r.toLowerCase()&&(r="easeInOut")),t=s(t.substr(0,t.indexOf(".")+1)+r),n.hasOwnProperty(t)&&(i=n[t])}else"function"==typeof t?i=t:Array.isArray(t)&&t.length;if(!e)return i;var o=e.slice(0);return o.unshift(0),function(t){return o[0]=t,i.apply(this,o)}}},function(t,e){t.exports=function(t,e,i){var n=t.x3-t.x1,s=t.y3-t.y1,r=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,h=i-t.y1,l=n*n+s*s,u=n*r+s*o,c=n*a+s*h,d=r*r+o*o,f=r*a+o*h,p=l*d-u*u,g=0===p?0:1/p,v=(d*c-u*f)*g,m=(l*f-u*c)*g;return v>=0&&m>=0&&v+m<1}},function(t,e,i){var n=i(4);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.x1,r=t.y1,o=t.x2,a=t.y2,h=e.x1,l=e.y1,u=e.x2,c=e.y2,d=(u-h)*(r-l)-(c-l)*(s-h),f=(o-s)*(r-l)-(a-r)*(s-h),p=(c-l)*(o-s)-(u-h)*(a-r);if(0===p)return!1;var g=d/p,v=f/p;return g>=0&&g<=1&&v>=0&&v<=1&&(i.x=s+g*(o-s),i.y=r+g*(a-r),!0)}},function(t,e){t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},function(t,e,i){var n={};t.exports=n;var s=i(101),r=i(37);n.create=function(t,e){for(var i=[],n=0;n0)return!1}return!0},n.scale=function(t,e,i,r){if(1===e&&1===i)return t;var o,a;r=r||n.centre(t);for(var h=0;h=0?h-1:t.length-1],u=t[h],c=t[(h+1)%t.length],d=e[h0&&(r|=2),3===r)return!1;return 0!==r||null},n.hull=function(t){var e,i,n=[],r=[];for((t=t.slice(0)).sort(function(t,e){var i=t.x-e.x;return 0!==i?i:t.y-e.y}),i=0;i=2&&s.cross3(r[r.length-2],r[r.length-1],e)<=0;)r.pop();r.push(e)}for(i=t.length-1;i>=0;i-=1){for(e=t[i];n.length>=2&&s.cross3(n[n.length-2],n[n.length-1],e)<=0;)n.pop();n.push(e)}return n.pop(),r.pop(),n.concat(r)}},function(t,e,i){var n=i(23);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e){t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},function(t,e){t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},function(t,e,i){t.exports={DESTROY:i(557),VIDEO_COMPLETE:i(558),VIDEO_CREATED:i(559),VIDEO_ERROR:i(560),VIDEO_LOOP:i(561),VIDEO_PLAY:i(562),VIDEO_SEEKED:i(563),VIDEO_SEEKING:i(564),VIDEO_STOP:i(565),VIDEO_TIMEOUT:i(566),VIDEO_UNLOCKED:i(567)}},function(t,e,i){var n=i(0),s=i(12),r=i(35),o=i(9),a=i(48),h=i(11),l=i(32),u=i(159),c=i(3),d=new n({Extends:o,Mixins:[s.Alpha,s.Visible],initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),o.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.resolution=1,this.roundPixels=!1,this.useBounds=!1,this.worldView=new h,this.dirty=!0,this._x=t,this._y=e,this._cx=0,this._cy=0,this._cw=0,this._ch=0,this._width=i,this._height=n,this._bounds=new h,this._scrollX=0,this._scrollY=0,this._zoom=1,this._rotation=0,this.matrix=new l,this.transparent=!0,this.backgroundColor=u("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new c(i/2,n/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this},getScroll:function(t,e,i){void 0===i&&(i=new c);var n=.5*this.width,s=.5*this.height;return i.x=t-n,i.y=e-s,this.useBounds&&(i.x=this.clampX(i.x),i.y=this.clampY(i.y)),i},centerOnX:function(t){var e=.5*this.width;return this.midPoint.x=t,this.scrollX=t-e,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(t){var e=.5*this.height;return this.midPoint.y=t,this.scrollY=t-e,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(t,e){return this.centerOnX(t),this.centerOnY(e),this},centerToBounds:function(){if(this.useBounds){var t=this._bounds,e=.5*this.width,i=.5*this.height;this.midPoint.set(t.centerX,t.centerY),this.scrollX=t.centerX-e,this.scrollY=t.centerY-i}return this},centerToSize:function(){return this.scrollX=.5*this.width,this.scrollY=.5*this.height,this},cull:function(t){if(this.disableCull)return t;var e=this.matrix.matrix,i=e[0],n=e[1],s=e[2],r=e[3],o=i*r-n*s;if(!o)return t;var a=e[4],h=e[5],l=this.scrollX,u=this.scrollY,c=this.width,d=this.height,f=this.culledObjects,p=t.length;o=1/o,f.length=0;for(var g=0;gC&&wA&&b<_&&f.push(v)}else f.push(v)}return f},getWorldPoint:function(t,e,i){void 0===i&&(i=new c);var n=this.matrix.matrix,s=n[0],r=n[1],o=n[2],a=n[3],h=n[4],l=n[5],u=s*a-r*o;if(!u)return i.x=t,i.y=e,i;var d=a*(u=1/u),f=-r*u,p=-o*u,g=s*u,v=(o*l-a*h)*u,m=(r*h-s*l)*u,y=Math.cos(this.rotation),x=Math.sin(this.rotation),T=this.zoom,w=this.resolution,b=this.scrollX,E=this.scrollY,S=t+(b*y-E*x)*T,A=e+(b*x+E*y)*T;return i.x=(S*d+A*p)*w+v,i.y=(S*f+A*g)*w+m,i},ignore:function(t){var e=this.id;Array.isArray(t)||(t=[t]);for(var i=0;is&&(t=s),t},clampY:function(t){var e=this._bounds,i=this.displayHeight,n=e.y+(i-this.height)/2,s=Math.max(n,n+e.height-i);return ts&&(t=s),t},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=r(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=u(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n,s){return void 0===s&&(s=!1),this._bounds.setTo(t,e,i,n),this.dirty=!0,this.useBounds=!0,s?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(t){void 0===t&&(t=new h);var e=this._bounds;return t.setTo(e.x,e.y,e.width,e.height),t},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t){this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=t;var e=t.sys;this.sceneManager=e.game.scene,this.scaleManager=e.scale,this.cameraManager=e.cameras;var i=this.scaleManager.resolution;return this.resolution=i,this._cx=this._x*i,this._cy=this._y*i,this._cw=this._width*i,this._ch=this._height*i,this.updateSystem(),this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setZoom:function(t){return void 0===t&&(t=1),0===t&&(t=.001),this.zoom=t,this},setMask:function(t,e){return void 0===e&&(e=!0),this.mask=t,this._maskCamera=e?this.cameraManager.default:this,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},update:function(){},updateSystem:function(){if(this.scaleManager){var t=0!==this._x||0!==this._y||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,e=this.sceneManager;t&&!this._customViewport?e.customViewports++:!t&&this._customViewport&&e.customViewports--,this.dirty=!0,this._customViewport=t}},destroy:function(){this.emit(a.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(t){this._x=t,this._cx=t*this.resolution,this.updateSystem()}},y:{get:function(){return this._y},set:function(t){this._y=t,this._cy=t*this.resolution,this.updateSystem()}},width:{get:function(){return this._width},set:function(t){this._width=t,this._cw=t*this.resolution,this.updateSystem()}},height:{get:function(){return this._height},set:function(t){this._height=t,this._ch=t*this.resolution,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(t){this._scrollX=t,this.dirty=!0}},scrollY:{get:function(){return this._scrollY},set:function(t){this._scrollY=t,this.dirty=!0}},zoom:{get:function(){return this._zoom},set:function(t){this._zoom=t,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoom}},displayHeight:{get:function(){return this.height/this.zoom}}});t.exports=d},function(t,e,i){t.exports={ENTER_FULLSCREEN:i(675),FULLSCREEN_FAILED:i(676),FULLSCREEN_UNSUPPORTED:i(677),LEAVE_FULLSCREEN:i(678),ORIENTATION_CHANGE:i(679),RESIZE:i(680)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),n?(i+t)/e:i+t)}},function(t,e,i){var n=i(0),s=i(23),r=i(17),o=new n({initialize:function(t,e,i,n,s,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0}},this.setSize(r,o,n,s)},setSize:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=0),this.cutX=i,this.cutY=n,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var s=this.data,r=s.cut;r.x=i,r.y=n,r.w=t,r.h=e,r.r=i+t,r.b=n+e,s.sourceSize.w=t,s.sourceSize.h=e,s.spriteSourceSize.w=t,s.spriteSourceSize.h=e,s.radius=.5*Math.sqrt(t*t+e*e);var o=s.drawImage;return o.x=i,o.y=n,o.width=t,o.height=e,this.updateUVs()},setTrim:function(t,e,i,n,s,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=n,a.w=s,a.h=r,a.r=i+s,a.b=n+r,this.x=i,this.y=n,this.width=s,this.height=r,this.halfWidth=.5*s,this.halfHeight=.5*r,this.centerX=Math.floor(s/2),this.centerY=Math.floor(r/2),this.updateUVs()},setCropUVs:function(t,e,i,n,r,o,a){var h=this.cutX,l=this.cutY,u=this.cutWidth,c=this.cutHeight,d=this.realWidth,f=this.realHeight,p=h+(e=s(e,0,d)),g=l+(i=s(i,0,f)),v=n=s(n,0,d-e),m=r=s(r,0,f-i),y=this.data;if(y.trim){var x=y.spriteSourceSize,T=e+(n=s(n,0,u-e)),w=i+(r=s(r,0,c-i));if(!(x.rT||x.y>w)){var b=Math.max(x.x,e),E=Math.max(x.y,i),S=Math.min(x.r,T)-b,A=Math.min(x.b,w)-E;v=S,m=A,p=o?h+(u-(b-x.x)-S):h+(b-x.x),g=a?l+(c-(E-x.y)-A):l+(E-x.y),e=b,i=E,n=S,r=A}else p=0,g=0,v=0,m=0}else o&&(p=h+(u-e-n)),a&&(g=l+(c-i-r));var _=this.source.width,C=this.source.height;return t.u0=Math.max(0,p/_),t.v0=Math.max(0,g/C),t.u1=Math.min(1,(p+v)/_),t.v1=Math.min(1,(g+m)/C),t.x=e,t.y=i,t.cx=p,t.cy=g,t.cw=v,t.ch=m,t.width=n,t.height=r,t.flipX=o,t.flipY=a,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=n;var r=this.source.width,o=this.source.height;return this.u0=t/r,this.v0=e/o,this.u1=(t+i)/r,this.v1=(e+n)/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new o(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=r(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=o},function(t,e,i){var n=i(0),s=i(96),r=i(376),o=i(377),a=i(46),h=i(152),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=a.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=l},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var n=i(237),s=i(0),r=i(90),o=i(2),a=i(6),h=i(7),l=i(370),u=i(107),c=i(69),d=new s({initialize:function(t,e,i){i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?h(e[0])&&(i=e,e=null):h(e)&&(i=e,e=null),this.scene=t,this.children=new u(e),this.isParent=!0,this.type="Group",this.classType=o(i,"classType",c),this.name=o(i,"name",""),this.active=o(i,"active",!0),this.maxSize=o(i,"maxSize",-1),this.defaultKey=o(i,"defaultKey",null),this.defaultFrame=o(i,"defaultFrame",null),this.runChildUpdate=o(i,"runChildUpdate",!1),this.createCallback=o(i,"createCallback",null),this.removeCallback=o(i,"removeCallback",null),this.createMultipleCallback=o(i,"createMultipleCallback",null),i&&this.createMultiple(i)},create:function(t,e,i,n,s,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(o),o.preUpdate&&this.scene.sys.updateList.add(o),o.visible=s,o.setActive(r),this.add(o),o},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i=0;u--)if((l=d[u]).active===i){if(++c===e)break}else l=null;return l?("number"==typeof s&&(l.x=s),"number"==typeof r&&(l.y=r),l):n?this.create(s,r,o,a,h):null},get:function(t,e,i,n,s){return this.getFirst(!1,!0,t,e,i,n,s)},getFirstAlive:function(t,e,i,n,s,r){return this.getFirst(!0,t,e,i,n,s,r)},getFirstDead:function(t,e,i,n,s,r){return this.getFirst(!1,t,e,i,n,s,r)},playAnimation:function(t,e){return n.PlayAnimation(this.children.entries,t,e),this},isFull:function(){return-1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;it.max.x&&(t.max.x=s.x),s.xt.max.y&&(t.max.y=s.y),s.y0?t.max.x+=i.x:t.min.x+=i.x,i.y>0?t.max.y+=i.y:t.min.y+=i.y)},i.contains=function(t,e){return e.x>=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},i.overlaps=function(t,e){return t.min.x<=e.max.x&&t.max.x>=e.min.x&&t.max.y>=e.min.y&&t.min.y<=e.max.y},i.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},i.shift=function(t,e){var i=t.max.x-t.min.x,n=t.max.y-t.min.y;t.min.x=e.x,t.max.x=e.x+i,t.min.y=e.y,t.max.y=e.y+n}},function(t,e){t.exports=function(t,e,i){return t>=0&&t=0&&e-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t-1},union:function(t){var e=new n;return t.entries.forEach(function(t){e.set(t)}),this.entries.forEach(function(t){e.set(t)}),e},intersect:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)&&e.set(i)}),e},difference:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)||e.set(i)}),e},size:{get:function(){return this.entries.length},set:function(t){return t0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e,i){(function(e){var i={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){var t=navigator.userAgent;/Windows/.test(t)?i.windows=!0:/Mac OS/.test(t)&&!/like Mac OS/.test(t)?i.macOS=!0:/Android/.test(t)?i.android=!0:/Linux/.test(t)?i.linux=!0:/iP[ao]d|iPhone/i.test(t)?(i.iOS=!0,navigator.appVersion.match(/OS (\d+)/),i.iOSVersion=parseInt(RegExp.$1,10),i.iPhone=-1!==t.toLowerCase().indexOf("iphone"),i.iPad=-1!==t.toLowerCase().indexOf("ipad")):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?i.kindle=!0:/CrOS/.test(t)&&(i.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(i.android=!1,i.iOS=!1,i.macOS=!1,i.windows=!0,i.windowsPhone=!0);var n=/Silk/.test(t);return(i.windows||i.macOS||i.linux&&!n||i.chromeOS)&&(i.desktop=!0),(i.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(i.desktop=!1),navigator.standalone&&(i.webApp=!0),void 0!==window.cordova&&(i.cordova=!0),void 0!==e&&e.versions&&e.versions.node&&(i.node=!0),i.node&&"object"==typeof e.versions&&(i.nodeWebkit=!!e.versions["node-webkit"],i.electron=!!e.versions.electron),void 0!==window.ejecta&&(i.ejecta=!0),/Crosswalk/.test(t)&&(i.crosswalk=!0),i.pixelRatio=window.devicePixelRatio||1,i}()}).call(this,i(701))},function(t,e,i){var n,s=i(114),r={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0};t.exports=(n=navigator.userAgent,/Edge\/\d+/.test(n)?r.edge=!0:/Chrome\/(\d+)/.test(n)&&!s.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(n)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(n)&&s.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(n)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(n)?r.opera=!0:/Safari/.test(n)&&!s.windowsPhone?r.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(n)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(n)&&(r.silk=!0),r)},function(t,e){t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e,i){t.exports={ADD:i(748),ERROR:i(749),LOAD:i(750),READY:i(751),REMOVE:i(752)}},function(t,e){t.exports=function(t,e){var i;if(e)"string"==typeof e?i=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(i=e);else if(t.parentElement)return t;return i||(i=document.body),i.appendChild(t),t}},function(t,e,i){var n=i(79);t.exports=function(t,e,i,s){var r;if(void 0===s&&(s=t),!Array.isArray(e))return-1!==(r=t.indexOf(e))?(n(t,r),i&&i.call(s,e),e):null;for(var o=e.length-1;o>=0;){var a=e[o];-1!==(r=t.indexOf(a))?(n(t,r),i&&i.call(s,a)):e.pop(),o--}return e}},function(t,e){t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175}},function(t,e){t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},function(t,e,i){var n=i(0),s=i(67),r=i(9),o=i(59),a=i(18),h=i(1),l=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.jsonCache=t.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,t.events.on(a.BLUR,function(){this.pauseOnBlur&&this.onBlur()},this),t.events.on(a.FOCUS,function(){this.pauseOnBlur&&this.onFocus()},this),t.events.on(a.PRE_STEP,this.update,this),t.events.once(a.DESTROY,this.destroy,this)},add:h,addAudioSprite:function(t,e){void 0===e&&(e={});var i=this.add(t,e);for(var n in i.spritemap=this.jsonCache.get(t).spritemap,i.spritemap)if(i.spritemap.hasOwnProperty(n)){var r=s(e),o=i.spritemap[n];r.loop=!!o.hasOwnProperty("loop")&&o.loop,i.addMarker({name:n,start:o.start,duration:o.end-o.start,config:r})}return i},play:function(t,e){var i=this.add(t);return i.once(o.COMPLETE,i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var n=this.addAudioSprite(t);return n.once(o.COMPLETE,n.destroy,n),n.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var n=this.sounds[i];n.key===t&&(n.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound(function(t){t.pause()}),this.emit(o.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit(o.RESUME_ALL,this)},stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit(o.STOP_ALL,this)},unlock:h,onBlur:h,onFocus:h,update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(o.UNLOCKED,this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach(function(i){i.update(t,e)})},destroy:function(){this.removeAllListeners(),this.forEachActiveSound(function(t){t.destroy()}),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach(function(n,s){n&&!n.pendingRemove&&t.call(e||i,n,s,i.sounds)})},setRate:function(t){return this.rate=t,this},rate:{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound(function(t){t.calculateRate()}),this.emit(o.GLOBAL_RATE,this,t)}},setDetune:function(t){return this.detune=t,this},detune:{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound(function(t){t.calculateRate()}),this.emit(o.GLOBAL_DETUNE,this,t)}}});t.exports=l},function(t,e,i){var n=i(0),s=i(9),r=i(59),o=i(17),a=i(1),h=new n({Extends:s,initialize:function(t,e,i){s.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},this.currentConfig=this.config,this.config=o(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(console.error("addMarker "+t.name+" already exists in Sound"),!1):(t=o(!0,{name:"",start:0,duration:this.totalDuration-(t.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0}},t),this.markers[t.name]=t,!0))},updateMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(this.markers[t.name]=o(!0,this.markers[t.name],t),!0):(console.warn("Audio Marker: "+t.name+" missing in Sound: "+this.key),!1))},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):null},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return!1;if(t){if(!this.markers[t])return console.warn("Marker: "+t+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=o(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:a,calculateRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e},destroy:function(){this.pendingRemove||(this.emit(r.DESTROY,this),this.pendingRemove=!0,this.manager=null,this.key="",this.removeAllListeners(),this.isPlaying=!1,this.isPaused=!1,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});t.exports=h},function(t,e,i){var n=i(180),s=i(0),r=i(1),o=i(126),a=new s({initialize:function(t){this.parent=t,this.list=[],this.position=0,this.addCallback=r,this.removeCallback=r,this._sortKey=""},add:function(t,e){return e?n.Add(this.list,t):n.Add(this.list,t,0,this.addCallback,this)},addAt:function(t,e,i){return i?n.AddAt(this.list,t,e):n.AddAt(this.list,t,e,0,this.addCallback,this)},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(t,e){return t?(void 0===e&&(e=function(e,i){return e[t]-i[t]}),o.inplace(this.list,e),this):this},getByName:function(t){return n.GetFirst(this.list,"name",t)},getRandom:function(t,e){return n.GetRandom(this.list,t,e)},getFirst:function(t,e,i,s){return n.GetFirst(this.list,t,e,i,s)},getAll:function(t,e,i,s){return n.GetAll(this.list,t,e,i,s)},count:function(t,e){return n.CountAllMatching(this.list,t,e)},swap:function(t,e){n.Swap(this.list,t,e)},moveTo:function(t,e){return n.MoveTo(this.list,t,e)},remove:function(t,e){return e?n.Remove(this.list,t):n.Remove(this.list,t,this.removeCallback,this)},removeAt:function(t,e){return e?n.RemoveAt(this.list,t):n.RemoveAt(this.list,t,this.removeCallback,this)},removeBetween:function(t,e,i){return i?n.RemoveBetween(this.list,t,e):n.RemoveBetween(this.list,t,e,this.removeCallback,this)},removeAll:function(t){for(var e=this.list.length;e--;)this.remove(this.list[e],t);return this},bringToTop:function(t){return n.BringToTop(this.list,t)},sendToBack:function(t){return n.SendToBack(this.list,t)},moveUp:function(t){return n.MoveUp(this.list,t),t},moveDown:function(t){return n.MoveDown(this.list,t),t},reverse:function(){return this.list.reverse(),this},shuffle:function(){return n.Shuffle(this.list),this},replace:function(t,e){return n.Replace(this.list,t,e)},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e,i,s){return n.SetAll(this.list,t,e,i,s),this},each:function(t,e){for(var i=[null],n=2;n0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});t.exports=a},function(t,e,i){var n=i(181),s=i(368);t.exports=function(t,e){if(void 0===e&&(e=90),!n(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=s(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=s(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;il&&(r=l),o>l&&(o=l),a=s,h=r;;)if(a0&&o.length0&&a.lengthe.right||t.y>e.bottom)}},function(t,e,i){var n=i(6),s={},r={register:function(t,e,i,n,r){s[t]={plugin:e,mapping:i,settingsKey:n,configKey:r}},getPlugin:function(t){return s[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,r=e.game.config;for(var o in s){var a=s[o].plugin,h=s[o].mapping,l=s[o].settingsKey,u=s[o].configKey;n(i,l,r[u])&&(t[h]=new a(t))}},remove:function(t){s.hasOwnProperty(t)&&delete s[t]}};t.exports=r},function(t,e,i){t.exports={ANY_KEY_DOWN:i(1192),ANY_KEY_UP:i(1193),COMBO_MATCH:i(1194),DOWN:i(1195),KEY_DOWN:i(1196),KEY_UP:i(1197),UP:i(1198)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e){t.exports=function(t,e,i,n,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),{responseType:t,async:e,user:i,password:n,timeout:s,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0}}},function(t,e,i){var n=i(0),s=i(213),r=i(69),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.body=null}});t.exports=o},function(t,e,i){var n={};t.exports=n;var s=i(86),r=i(37),o=i(62),a=i(102),h=i(101),l=i(1365);n.rectangle=function(t,e,i,n,a){a=a||{};var h={label:"Rectangle Body",position:{x:t,y:e},vertices:s.fromPath("L 0 0 L "+i+" 0 L "+i+" "+n+" L 0 "+n)};if(a.chamfer){var l=a.chamfer;h.vertices=s.chamfer(h.vertices,l.radius,l.quality,l.qualityMin,l.qualityMax),delete a.chamfer}return o.create(r.extend({},h,a))},n.trapezoid=function(t,e,i,n,a,h){h=h||{};var l,u=i*(a*=.5),c=u+(1-2*a)*i,d=c+u;l=a<.5?"L 0 0 L "+u+" "+-n+" L "+c+" "+-n+" L "+d+" 0":"L 0 0 L "+c+" "+-n+" L "+d+" 0";var f={label:"Trapezoid Body",position:{x:t,y:e},vertices:s.fromPath(l)};if(h.chamfer){var p=h.chamfer;f.vertices=s.chamfer(f.vertices,p.radius,p.quality,p.qualityMin,p.qualityMax),delete h.chamfer}return o.create(r.extend({},f,h))},n.circle=function(t,e,i,s,o){s=s||{};var a={label:"Circle Body",circleRadius:i};o=o||25;var h=Math.ceil(Math.max(10,Math.min(o,i)));return h%2==1&&(h+=1),n.polygon(t,e,h,i,r.extend({},a,s))},n.polygon=function(t,e,i,a,h){if(h=h||{},i<3)return n.circle(t,e,a,h);for(var l=2*Math.PI/i,u="",c=.5*l,d=0;d0&&s.area(S)1?(f=o.create(r.extend({parts:p.slice(0)},n)),o.setPosition(f,{x:t,y:e}),f):p[0]}},function(t,e,i){t.exports={CalculateFacesAt:i(216),CalculateFacesWithin:i(51),Copy:i(1286),CreateFromTiles:i(1287),CullTiles:i(1288),Fill:i(1289),FilterTiles:i(1290),FindByIndex:i(1291),FindTile:i(1292),ForEachTile:i(1293),GetTileAt:i(137),GetTileAtWorldXY:i(1294),GetTilesWithin:i(24),GetTilesWithinShape:i(1295),GetTilesWithinWorldXY:i(1296),HasTileAt:i(456),HasTileAtWorldXY:i(1297),IsInLayerBounds:i(103),PutTileAt:i(217),PutTileAtWorldXY:i(1298),PutTilesAt:i(1299),Randomize:i(1300),RemoveTileAt:i(457),RemoveTileAtWorldXY:i(1301),RenderDebug:i(1302),ReplaceByIndex:i(455),SetCollision:i(1303),SetCollisionBetween:i(1304),SetCollisionByExclusion:i(1305),SetCollisionByProperty:i(1306),SetCollisionFromCollisionGroup:i(1307),SetTileIndexCallback:i(1308),SetTileLocationCallback:i(1309),Shuffle:i(1310),SwapByIndex:i(1311),TileToWorldX:i(138),TileToWorldXY:i(1312),TileToWorldY:i(139),WeightedRandomize:i(1313),WorldToTileX:i(63),WorldToTileXY:i(1314),WorldToTileY:i(64)}},function(t,e,i){var n=i(103);t.exports=function(t,e,i,s){if(void 0===i&&(i=!1),n(t,e,s)){var r=s.data[e][t]||null;return null===r?null:-1===r.index?i?r:null:r}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o,a){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o={}),void 0===a&&(a={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=n,this.tileMargin=s,this.tileSpacing=r,this.tileProperties=o,this.tileData=a,this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){var e=this.getTileData(t);return e&&e.objectgroup?e.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t1?2-s:s,o=r*Math.cos(i),a=r*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},function(t,e,i){var n=i(23),s=i(0),r=i(9),o=i(109),a=i(253),h=i(254),l=i(6),u=new s({Extends:r,initialize:function(t,e,i){r.call(this),this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,l(i,"frames",[]),l(i,"defaultTextureKey",null)),this.frameRate=l(i,"frameRate",null),this.duration=l(i,"duration",null),null===this.duration&&null===this.frameRate?(this.frameRate=24,this.duration=this.frameRate/this.frames.length*1e3):this.duration&&null===this.frameRate?this.frameRate=this.frames.length/(this.duration/1e3):this.duration=this.frames.length/this.frameRate*1e3,this.msPerFrame=1e3/this.frameRate,this.skipMissedFrames=l(i,"skipMissedFrames",!0),this.delay=l(i,"delay",0),this.repeat=l(i,"repeat",0),this.repeatDelay=l(i,"repeatDelay",0),this.yoyo=l(i,"yoyo",!1),this.showOnStart=l(i,"showOnStart",!1),this.hideOnComplete=l(i,"hideOnComplete",!1),this.paused=!1,this.manager.on(o.PAUSE_ALL,this.pause,this),this.manager.on(o.RESUME_ALL,this.resume,this)},addFrame:function(t){return this.addFrameAt(this.frames.length,t)},addFrameAt:function(t,e){var i=this.getFrames(this.manager.textureManager,e);if(i.length>0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var n=this.frames.slice(0,t),s=this.frames.slice(t);this.frames=n.concat(i,s)}this.updateFrameSequence()}return this},checkFrame:function(t){return t>=0&&t0){s.isLast=!0,s.nextFrame=a[0],a[0].prevFrame=s;var v=1/(a.length-1);for(r=0;r=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo);var i=this.frames[e];0!==e||t.forward||(i=this.getLastFrame()),t.updateFrame(i)},getFrameByProgress:function(t){return t=n(t,0,1),a(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t._yoyo?this.handleYoyoFrame(t,!1):t.repeatCounter>0?t._reverse&&t.forward?t.forward=!1:this.repeatAnimation(t):this.completeAnimation(t):this.updateAndGetNextTick(t,e.nextFrame)},handleYoyoFrame:function(t,e){if(e||(e=!1),t._reverse===!e&&t.repeatCounter>0)return t.forward=e,void this.repeatAnimation(t);if(t._reverse===e||0!==t.repeatCounter){t.forward=e;var i=e?t.currentFrame.nextFrame:t.currentFrame.prevFrame;this.updateAndGetNextTick(t,i)}else this.completeAnimation(t)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t._yoyo?this.handleYoyoFrame(t,!0):t.repeatCounter>0?t._reverse&&!t.forward?(t.currentFrame=this.getLastFrame(),this.repeatAnimation(t)):(t.forward=!0,this.repeatAnimation(t)):this.completeAnimation(t):this.updateAndGetNextTick(t,e.prevFrame)},updateAndGetNextTick:function(t,e){t.updateFrame(e),this.getNextTick(t)},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){if(2===t._pendingStop)return this.completeAnimation(t);if(t._repeatDelay>0&&!1===t.pendingRepeat)t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t._repeatDelay;else if(t.repeatCounter--,t.updateFrame(t.currentFrame[t.forward?"nextFrame":"prevFrame"]),t.isPlaying){this.getNextTick(t),t.pendingRepeat=!1;var e=t.currentFrame,i=t.parent;this.emit(o.ANIMATION_REPEAT,this,e),i.emit(o.SPRITE_ANIMATION_KEY_REPEAT+this.key,this,e,t.repeatCounter,i),i.emit(o.SPRITE_ANIMATION_REPEAT,this,e,t.repeatCounter,i)}},setFrame:function(t){t.forward?this.nextFrame(t):this.previousFrame(t)},toJSON:function(){var t={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(e){t.frames.push(e.toJSON())}),t},updateFrameSequence:function(){for(var t,e=this.frames.length,i=1/(e-1),n=0;n1?(t.isLast=!0,t.prevFrame=this.frames[e-2],t.nextFrame=this.frames[0]):e>1&&(t.prevFrame=this.frames[n-1],t.nextFrame=this.frames[n+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.removeAllListeners(),this.manager.off(o.PAUSE_ALL,this.pause,this),this.manager.off(o.RESUME_ALL,this.resume,this),this.manager.remove(this.key);for(var t=0;t=1)return i.x=t.x,i.y=t.y,i;var r=n(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},function(t,e,i){var n=i(56),s=i(4);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=n(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,l=t.y2,u=0;u=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(s*a+o*h),e}},function(t,e){t.exports=function(t,e,i,n,s){var r=n+Math.atan2(t.y-i,t.x-e);return t.x=e+s*Math.cos(r),t.y=i+s*Math.sin(r),t}},function(t,e){t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},function(t,e){t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},function(t,e,i){var n=new(i(0))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(s-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(277),s=i(280),r=i(282),o=i(283);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?o(t):n(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var n=i(160);t.exports=function(t,e,i,s){void 0===e&&(e=1),void 0===i&&(i=1);var r=Math.floor(6*t),o=6*t-r,a=Math.floor(i*(1-e)*255),h=Math.floor(i*(1-o*e)*255),l=Math.floor(i*(1-(1-o)*e)*255),u=i=Math.floor(i*=255),c=i,d=i,f=r%6;return 0===f?(c=l,d=a):1===f?(u=h,d=a):2===f?(u=a,d=l):3===f?(u=a,c=h):4===f?(u=l,c=a):5===f&&(c=a,d=h),s?s.setTo?s.setTo(u,c,d,s.alpha,!1):(s.r=u,s.g=c,s.b=d,s.color=n(u,c,d),s):{r:u,g:c,b:d,color:n(u,c,d)}}},function(t,e){var i,n="";t.exports={disable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!1),t},enable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!0),t},getPrefix:i=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z;return this.x=i*o-n*r,this.y=n*s-e*o,this.z=e*r-i*s,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=e*s[0]+i*s[3]+n*s[6],this.y=e*s[1]+i*s[4]+n*s[7],this.z=e*s[2]+i*s[5]+n*s[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12],this.y=s[1]*e+s[5]*i+s[9]*n+s[13],this.z=s[2]*e+s[6]*i+s[10]*n+s[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=e*s[0]+i*s[4]+n*s[8]+s[12],o=e*s[1]+i*s[5]+n*s[9]+s[13],a=e*s[2]+i*s[6]+n*s[10]+s[14],h=e*s[3]+i*s[7]+n*s[11]+s[15];return this.x=r/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},project:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=s[0],o=s[1],a=s[2],h=s[3],l=s[4],u=s[5],c=s[6],d=s[7],f=s[8],p=s[9],g=s[10],v=s[11],m=s[12],y=s[13],x=s[14],T=1/(e*h+i*d+n*v+s[15]);return this.x=(e*r+i*l+n*f+m)*T,this.y=(e*o+i*u+n*p+y)*T,this.z=(e*a+i*c+n*g+x)*T,this},unproject:function(t,e){var i=t.x,n=t.y,s=t.z,r=t.w,o=this.x-i,a=r-this.y-1-n,h=this.z;return this.x=2*o/s-1,this.y=2*a/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});n.ZERO=new n,n.RIGHT=new n(1,0,0),n.LEFT=new n(-1,0,0),n.UP=new n(0,-1,0),n.DOWN=new n(0,1,0),n.FORWARD=new n(0,0,1),n.BACK=new n(0,0,-1),n.ONE=new n(1,1,1),t.exports=n},function(t,e,i){t.exports={Global:["game","anims","cache","plugins","registry","scale","sound","textures"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},function(t,e,i){var n=i(11),s=i(13);t.exports=function(t,e){if(void 0===e&&(e=new n),0===t.length)return e;for(var i,r,o,a=Number.MAX_VALUE,h=Number.MAX_VALUE,l=s.MIN_SAFE_INTEGER,u=s.MIN_SAFE_INTEGER,c=0;c0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t,e){return t?this.resume(e):this.pause(e)},start:function(t){t&&(this.settings.data=t),this.settings.status=s.START,this.settings.active=!0,this.settings.visible=!0,this.events.emit(o.START,this),this.events.emit(o.READY,this,t)},shutdown:function(t){this.events.off(o.TRANSITION_INIT),this.events.off(o.TRANSITION_START),this.events.off(o.TRANSITION_COMPLETE),this.events.off(o.TRANSITION_OUT),this.settings.status=s.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit(o.SHUTDOWN,this,t)},destroy:function(){this.settings.status=s.DESTROYED,this.settings.active=!1,this.settings.visible=!1,this.events.emit(o.DESTROY,this),this.events.removeAllListeners();for(var t=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],e=0;e0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});t.exports=u},function(t,e,i){var n=i(180),s=i(52),r=i(0),o=i(12),a=i(90),h=i(14),l=i(11),u=i(936),c=i(372),d=i(3),f=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Depth,o.Mask,o.Transform,o.Visible,u],initialize:function(t,e,i,n){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new o.TransformMatrix,this.tempTransformMatrix=new o.TransformMatrix,this._displayList=t.sys.displayList,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.setPosition(e,i),this.clearAlpha(),this.setBlendMode(s.SKIP_CHECK),n&&this.add(n)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.list.length>0)for(var e=this.list,i=new l,n=0;n-1},setAll:function(t,e,i,s){return n.SetAll(this.list,t,e,i,s),this},each:function(t,e){var i,n=[null],s=this.list.slice(),r=s.length;for(i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null}});t.exports=f},function(t,e,i){var n=i(127),s=i(0),r=i(941),o=new s({Extends:n,Mixins:[r],initialize:function(t,e,i,s,r,o,a){n.call(this,t,e,i,s,r,o,a),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this}});t.exports=o},function(t,e,i){var n=i(91),s=i(0),r=i(189),o=i(252),a=i(255),h=i(256),l=i(260),u=i(151),c=i(265),d=i(266),f=i(263),p=i(32),g=i(95),v=i(14),m=i(2),y=i(6),x=i(13),T=i(947),w=new s({Extends:v,Mixins:[o,a,h,l,u,c,d,f,T],initialize:function(t,e){var i=y(e,"x",0),n=y(e,"y",0);v.call(this,t,"Graphics"),this.setPosition(i,n),this.initPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this._tempMatrix1=new p,this._tempMatrix2=new p,this._tempMatrix3=new p,this.setDefaultStyles(e)},setDefaultStyles:function(t){return y(t,"lineStyle",null)&&(this.defaultStrokeWidth=y(t,"lineStyle.width",1),this.defaultStrokeColor=y(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=y(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),y(t,"fillStyle",null)&&(this.defaultFillColor=y(t,"fillStyle.color",16777215),this.defaultFillAlpha=y(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(r.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(r.FILL_STYLE,t,e),this},fillGradientStyle:function(t,e,i,n,s){return void 0===s&&(s=1),this.commandBuffer.push(r.GRADIENT_FILL_STYLE,s,t,e,i,n),this},lineGradientStyle:function(t,e,i,n,s,o){return void 0===o&&(o=1),this.commandBuffer.push(r.GRADIENT_LINE_STYLE,t,o,e,i,n,s),this},setTexture:function(t,e,i){if(void 0===i&&(i=0),void 0===t)this.commandBuffer.push(r.CLEAR_TEXTURE);else{var n=this.scene.sys.textures.getFrame(t,e);n&&(2===i&&(i=3),this.commandBuffer.push(r.SET_TEXTURE,n,i))}return this},beginPath:function(){return this.commandBuffer.push(r.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(r.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(r.FILL_PATH),this},fill:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(r.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,x.PI2),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,x.PI2),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,n){return this.commandBuffer.push(r.FILL_RECT,t,e,i,n),this},strokeRect:function(t,e,i,n){var s=this._lineWidth/2,r=t-s,o=t+s;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+n),this.strokePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+n),this.strokePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(o+i,e),this.strokePath(),this.beginPath(),this.moveTo(r,e+n),this.lineTo(o+i,e+n),this.strokePath(),this},fillRoundedRect:function(t,e,i,n,s){void 0===s&&(s=20);var r=s,o=s,a=s,h=s;return"number"!=typeof s&&(r=m(s,"tl",20),o=m(s,"tr",20),a=m(s,"bl",20),h=m(s,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-x.TAU,0),this.lineTo(t+i,e+n-h),this.arc(t+i-h,e+n-h,h,0,x.TAU),this.lineTo(t+a,e+n),this.arc(t+a,e+n-a,a,x.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-x.TAU),this.fillPath(),this},strokeRoundedRect:function(t,e,i,n,s){void 0===s&&(s=20);var r=s,o=s,a=s,h=s;return"number"!=typeof s&&(r=m(s,"tl",20),o=m(s,"tr",20),a=m(s,"bl",20),h=m(s,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-x.TAU,0),this.lineTo(t+i,e+n-h),this.arc(t+i-h,e+n-h,h,0,x.TAU),this.lineTo(t+a,e+n),this.arc(t+a,e+n-a,a,x.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-x.TAU),this.strokePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,n,s,o),this},strokeTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,n,s,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,n){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,n),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(r.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(r.MOVE_TO,t,e),this},strokePoints:function(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===n&&(n=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var s=1;s-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var n,s,r=this.scene.sys,o=r.game.renderer;if(void 0===e&&(e=r.scale.width),void 0===i&&(i=r.scale.height),w.TargetCamera.setScene(this.scene),w.TargetCamera.setViewport(0,0,e,i),w.TargetCamera.scrollX=this.x,w.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var a=(n=r.textures.get(t)).getSourceImage();a instanceof HTMLCanvasElement&&(s=a.getContext("2d"))}else s=(n=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(s=t.getContext("2d"));return s&&(this.renderCanvas(o,this,0,w.TargetCamera,null,s,!1),n&&n.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});w.TargetCamera=new n,t.exports=w},function(t,e){t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,SET_TEXTURE:19,CLEAR_TEXTURE:20,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},function(t,e,i){var n=i(4);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.width/2,r=t.height/2;return i.x=t.x+s*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},function(t,e,i){var n=i(0),s=i(12),r=i(14),o=i(380),a=i(124),h=i(382),l=i(957),u=new n({Extends:r,Mixins:[s.Depth,s.Mask,s.Pipeline,s.Transform,s.Visible,l],initialize:function(t,e,i,n){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline(),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var s=0;s0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;ss.width&&(t=s.width-this.frame.cutX),this.frame.cutY+e>s.height&&(e=s.height-this.frame.cutY),this.frame.setSize(t,e,this.frame.cutX,this.frame.cutY)}this.updateDisplayOrigin();var r=this.input;return r&&!r.customHitArea&&(r.hitArea.width=t,r.hitArea.height=e),this},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this},saveTexture:function(t){return this.textureManager.renameTexture(this.texture.key,t),this._saved=!0,this.texture},fill:function(t,e,i,n,s,r){void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.frame.cutWidth),void 0===r&&(r=this.frame.cutHeight);var o=255&(t>>16|0),a=255&(t>>8|0),h=255&(0|t),l=this.gl,u=this.frame;if(this.camera.preRender(1,1),l){var c=this.camera._cx,f=this.camera._cy,p=this.camera._cw,g=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(c,f,p,g,g);var v=this.pipeline;v.projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),v.drawFillRect(i,n,s,r,d.getTintFromFloats(o/255,a/255,h/255,1),e),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),v.projOrtho(0,v.width,v.height,0,-1e3,1e3)}else this.renderer.setContext(this.context),this.context.fillStyle="rgba("+o+","+a+","+h+","+e+")",this.context.fillRect(i+u.cutX,n+u.cutY,s,r),this.renderer.setContext();return this.dirty=!0,this},clear:function(){if(this.dirty){var t=this.gl;if(t){var e=this.renderer;e.setFramebuffer(this.framebuffer,!0),this.frame.cutWidth===this.canvas.width&&this.frame.cutHeight===this.canvas.height||t.scissor(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),e.setFramebuffer(null,!0)}else{var i=this.context;i.save(),i.setTransform(1,0,0,1,0,0),i.clearRect(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),i.restore()}this.dirty=!1}return this},erase:function(t,e,i){this._eraseMode=!0;var s=this.renderer.currentBlendMode;return this.renderer.setBlendMode(n.ERASE),this.draw(t,e,i,1,16777215),this.renderer.setBlendMode(s),this._eraseMode=!1,this},draw:function(t,e,i,n,s){void 0===n&&(n=this.globalAlpha),s=void 0===s?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(s>>16)+(65280&s)+((255&s)<<16),Array.isArray(t)||(t=[t]);var r=this.gl;if(this.camera.preRender(1,1),r){var o=this.camera._cx,a=this.camera._cy,h=this.camera._cw,l=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(o,a,h,l,l);var u=this.pipeline;u.projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),this.batchList(t,e,i,n,s),u.flush(),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),u.projOrtho(0,u.width,u.height,0,-1e3,1e3)}else this.renderer.setContext(this.context),this.batchList(t,e,i,n,s),this.renderer.setContext();return this.dirty=!0,this},drawFrame:function(t,e,i,n,s,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.globalAlpha),r=void 0===r?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(r>>16)+(65280&r)+((255&r)<<16);var o=this.gl,a=this.textureManager.getFrame(t,e);if(a){if(this.camera.preRender(1,1),o){var h=this.camera._cx,l=this.camera._cy,u=this.camera._cw,c=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(h,l,u,c,c);var d=this.pipeline;d.projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),d.batchTextureFrame(a,i+this.frame.cutX,n+this.frame.cutY,r,s,this.camera.matrix,null),d.flush(),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),d.projOrtho(0,d.width,d.height,0,-1e3,1e3)}else this.batchTextureFrame(a,i+this.frame.cutX,n+this.frame.cutY,s,r);this.dirty=!0}return this},batchList:function(t,e,i,n,s){for(var r=0;rl){if(0===c){for(var g=f;g.length&&(g=g.slice(0,-1),!((p=e.measureText(g).width)<=l)););if(!g.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var v=d.substr(g.length);u[c]=v,h+=g}var m=u[c].length?c:c+1,y=u.slice(m).join(" ").replace(/[ \n]*$/gi,"");s[o+1]=y+" "+(s[o+1]||""),r=s.length;break}h+=f,l-=p}n+=h.replace(/[ \n]*$/gi,"")+"\n"}}return n=n.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var n="",s=t.split(this.splitRegExp),r=0;ro?(h>0&&(n+="\n"),n+=a[h]+" ",o=i-l):(o-=l,n+=a[h],h0&&(d+=h.lineSpacing*g),i.rtl)c=f-c;else if("right"===i.align)c+=o-h.lineWidths[g];else if("center"===i.align)c+=(o-h.lineWidths[g])/2;else if("justify"===i.align){if(h.lineWidths[g]/h.width>=.85){var v=h.width-h.lineWidths[g],m=e.measureText(" ").width,y=a[g].trim(),x=y.split(" ");v+=(a[g].length-y.length)*m;for(var T=Math.floor(v/m),w=0;T>0;)x[w]+=" ",w=(w+1)%(x.length-1||1),--T;a[g]=x.join(" ")}}this.autoRound&&(c=Math.round(c),d=Math.round(d)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(a[g],c,d)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(a[g],c,d))}e.restore(),this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(t,this.frame.source.glTexture,!0),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0;var b=this.input;return b&&!b.customHitArea&&(b.hitArea.width=this.width,b.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(t){this.setText(t)}},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this._text,style:this.style.toJSON(),padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&c(this.canvas),s.remove(this.canvas),this.texture.destroy()}});t.exports=p},function(t,e,i){var n=i(26),s=i(0),r=i(12),o=i(18),a=i(14),h=i(310),l=i(162),u=i(973),c=i(3),d=new s({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Tint,r.Transform,r.Visible,u],initialize:function(t,e,i,s,r,l,u){var d=t.sys.game.renderer;a.call(this,t,"TileSprite");var f=t.sys.textures.get(l),p=f.get(u);s&&r?(s=Math.floor(s),r=Math.floor(r)):(s=p.width,r=p.height),this._tilePosition=new c,this._tileScale=new c(1,1),this.dirty=!1,this.renderer=d,this.canvas=n.create(this,s,r),this.context=this.canvas.getContext("2d"),this.displayTexture=f,this.displayFrame=p,this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.potWidth=h(p.width),this.potHeight=h(p.height),this.fillCanvas=n.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d"),this.fillPattern=null,this.setPosition(e,i),this.setSize(s,r),this.setFrame(u),this.setOriginFromFrame(),this.initPipeline(),t.sys.game.events.on(o.CONTEXT_RESTORED,function(t){var e=t.gl;this.dirty=!0,this.fillPattern=null,this.fillPattern=t.createTexture2D(0,e.LINEAR,e.LINEAR,e.REPEAT,e.REPEAT,e.RGBA,this.fillCanvas,this.potWidth,this.potHeight)},this)},setTexture:function(t,e){return this.displayTexture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){var e=this.displayTexture.get(t);return this.potWidth=h(e.width),this.potHeight=h(e.height),this.canvas.width=0,e.cutWidth&&e.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.displayFrame=e,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(t,e){return void 0!==t&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},setTileScale:function(t,e){return void 0===t&&(t=this.tileScaleX),void 0===e&&(e=t),this.tileScaleX=t,this.tileScaleY=e,this},updateTileTexture:function(){if(this.dirty&&this.renderer){var t=this.displayFrame;if(t.source.isRenderTexture||t.source.isGLTexture)return console.warn("TileSprites can only use Image or Canvas based textures"),void(this.dirty=!1);var e=this.fillContext,i=this.fillCanvas,n=this.potWidth,s=this.potHeight;this.renderer.gl||(n=t.cutWidth,s=t.cutHeight),e.clearRect(0,0,n,s),i.width=n,i.height=s,e.drawImage(t.source.image,t.cutX,t.cutY,t.cutWidth,t.cutHeight,0,0,n,s),this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(i,this.fillPattern):this.fillPattern=e.createPattern(i,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var t=this.canvas;if(t.width===this.width&&t.height===this.height||(t.width=this.width,t.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl)this.dirty=!1;else{var e=this.context;this.scene.sys.game.config.antialias||l.disable(e);var i=this._tileScale.x,n=this._tileScale.y,s=this._tilePosition.x,r=this._tilePosition.y;e.clearRect(0,0,this.width,this.height),e.save(),e.scale(i,n),e.translate(-s,-r),e.fillStyle=this.fillPattern,e.fillRect(s,r,this.width/i,this.height/n),e.restore(),this.dirty=!1}},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),n.remove(this.canvas),n.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null,this.texture.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(t){this._tilePosition.x=t,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(t){this._tilePosition.y=t,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(t){this._tileScale.x=t,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(t){this._tileScale.y=t,this.dirty=!0}}});t.exports=d},function(t,e,i){var n=i(0),s=i(23),r=i(12),o=i(90),a=i(18),h=i(14),l=i(59),u=i(193),c=i(976),d=i(13),f=new n({Extends:h,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,c],initialize:function(t,e,i,n){h.call(this,t,"Video"),this.video=null,this.videoTexture=null,this.videoTextureSource=null,this.snapshotTexture=null,this.flipY=!1,this._key=u(),this.touchLocked=!0,this.playWhenUnlocked=!1,this.retryLimit=20,this.retry=0,this.retryInterval=500,this._retryID=null,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={play:this.playHandler.bind(this),error:this.loadErrorHandler.bind(this),end:this.completeHandler.bind(this),time:this.timeUpdateHandler.bind(this),seeking:this.seekingHandler.bind(this),seeked:this.seekedHandler.bind(this)},this._crop=this.resetCropObject(),this.markers={},this._markerIn=-1,this._markerOut=d.MAX_SAFE_INTEGER,this._lastUpdate=0,this._cacheKey="",this._isSeeking=!1,this.removeVideoElementOnDestroy=!1,this.setPosition(e,i),this.initPipeline(),n&&this.changeSource(n,!1);var s=t.sys.game.events;s.on(a.PAUSE,this.globalPause,this),s.on(a.RESUME,this.globalResume,this);var r=t.sys.sound;r&&r.on(l.GLOBAL_MUTE,this.globalMute,this)},play:function(t,e,i){if(this.touchLocked&&this.playWhenUnlocked||this.isPlaying())return this;var n=this.video;if(!n)return console.warn("Video not loaded"),this;void 0===t&&(t=n.loop);var s=this.scene.sys.sound;s&&s.mute&&this.setMute(!0),isNaN(e)||(this._markerIn=e),!isNaN(i)&&i>e&&(this._markerOut=i),n.loop=t;var r=this._callbacks,o=n.play();return void 0!==o?o.then(this.playPromiseSuccessHandler.bind(this)).catch(this.playPromiseErrorHandler.bind(this)):(n.addEventListener("playing",r.play,!0),n.readyState<2&&(this.retry=this.retryLimit,this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval))),n.addEventListener("ended",r.end,!0),n.addEventListener("timeupdate",r.time,!0),n.addEventListener("seeking",r.seeking,!0),n.addEventListener("seeked",r.seeked,!0),this},changeSource:function(t,e,i,n,s){void 0===e&&(e=!0),this.video&&this.stop();var r=this.scene.sys.cache.video.get(t);return r?(this.video=r,this._cacheKey=t,this._codePaused=r.paused,this._codeMuted=r.muted,this.videoTexture?(this.scene.sys.textures.remove(this._key),this.videoTexture=this.scene.sys.textures.create(this._key,r,r.videoWidth,r.videoHeight),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,r.videoWidth,r.videoHeight),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,r.videoWidth,r.videoHeight)):this.updateTexture(),r.currentTime=0,this._lastUpdate=0,e&&this.play(i,n,s)):this.video=null,this},addMarker:function(t,e,i){return!isNaN(e)&&e>=0&&!isNaN(i)&&(this.markers[t]=[e,i]),this},playMarker:function(t,e){var i=this.markers[t];return i&&this.play(e,i[0],i[1]),this},removeMarker:function(t){return delete this.markers[t],this},snapshot:function(t,e){return void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.snapshotArea(0,0,this.width,this.height,t,e)},snapshotArea:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=this.height),void 0===s&&(s=i),void 0===r&&(r=n);var o=this.video,a=this.snapshotTexture;return a?(a.setSize(s,r),o&&a.context.drawImage(o,t,e,i,n,0,0,s,r)):(a=this.scene.sys.textures.createCanvas(u(),s,r),this.snapshotTexture=a,o&&a.context.drawImage(o,t,e,i,n,0,0,s,r)),a.update()},saveSnapshotTexture:function(t){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,t):this.snapshotTexture=this.scene.sys.textures.createCanvas(t,this.width,this.height),this.snapshotTexture},loadURL:function(t,e,i){void 0===e&&(e="loadeddata"),void 0===i&&(i=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var n=document.createElement("video");return n.controls=!1,i&&(n.muted=!0,n.defaultMuted=!0,n.setAttribute("autoplay","autoplay")),n.setAttribute("playsinline","playsinline"),n.setAttribute("preload","auto"),n.addEventListener("error",this._callbacks.error,!0),n.src=t,n.load(),this.video=n,this},playPromiseSuccessHandler:function(){this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn)},playPromiseErrorHandler:function(t){this.scene.sys.input.once("pointerdown",this.unlockHandler,this),this.touchLocked=!0,this.playWhenUnlocked=!0,this.emit(o.VIDEO_ERROR,this,t)},playHandler:function(){this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this.video.removeEventListener("playing",this._callbacks.play,!0)},loadErrorHandler:function(t){this.stop(),this.emit(o.VIDEO_ERROR,this,t)},unlockHandler:function(){this.touchLocked=!1,this.playWhenUnlocked=!1,this.emit(o.VIDEO_UNLOCKED,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn),this.video.play(),this.emit(o.VIDEO_PLAY,this)},completeHandler:function(){this.emit(o.VIDEO_COMPLETE,this)},timeUpdateHandler:function(){this.video&&this.video.currentTime=this._markerOut&&(t.loop?(t.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=e,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),this.stop())))}},checkVideoProgress:function(){this.video.readyState>=2?this.updateTexture():(this.retry--,this.retry>0?this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval):this.emit(o.VIDEO_TIMEOUT,this))},updateTexture:function(){var t=this.video,e=t.videoWidth,i=t.videoHeight;if(this.videoTexture){var n=this.videoTextureSource;n.source!==t&&(n.source=t,n.width=e,n.height=i),n.update()}else this.videoTexture=this.scene.sys.textures.create(this._key,t,e,i),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,e,i),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,e,i)},getVideoKey:function(){return this._cacheKey},seekTo:function(t){var e=this.video;if(e){var i=e.duration;if(i!==1/0&&!isNaN(i)){var n=i*t;this.setCurrentTime(n)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(t){var e=this.video;if(e){if("string"==typeof t){var i=t[0],n=parseFloat(t.substr(1));"+"===i?t=e.currentTime+n:"-"===i&&(t=e.currentTime-n)}e.currentTime=t,this._lastUpdate=t}return this},isSeeking:function(){return this._isSeeking},seekingHandler:function(){this._isSeeking=!0,this.emit(o.VIDEO_SEEKING,this)},seekedHandler:function(){this._isSeeking=!1,this.emit(o.VIDEO_SEEKED,this),this.video&&this.updateTexture()},getProgress:function(){var t=this.video;if(t){var e=t.currentTime,i=t.duration;if(i!==1/0&&!isNaN(i))return e/i}return 0},getDuration:function(){return this.video?this.video.duration:0},setMute:function(t){void 0===t&&(t=!0),this._codeMuted=t;var e=this.video;return e&&(e.muted=!!this._systemMuted||t),this},isMuted:function(){return this._codeMuted},globalMute:function(t,e){this._systemMuted=e;var i=this.video;i&&(i.muted=!!this._codeMuted||e)},globalPause:function(){this._systemPaused=!0,this.video&&this.video.pause()},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&this.video.play()},setPaused:function(t){void 0===t&&(t=!0);var e=this.video;return this._codePaused=t,e&&(t?e.paused||e.pause():t||e.paused&&!this._systemPaused&&e.play()),this},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(t){return void 0===t&&(t=1),this.video&&(this.video.volume=s(t,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(t){return this.video&&(this.video.playbackRate=t),this},getLoop:function(){return!!this.video&&this.video.loop},setLoop:function(t){return void 0===t&&(t=!0),this.video&&(this.video.loop=t),this},isPlaying:function(){return!!this.video&&!(this.video.paused||this.video.ended)},isPaused:function(){return this.video&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(t,e){return void 0===e&&(e=!1),this.videoTexture&&this.scene.sys.textures.renameTexture(this._key,t),this._key=t,this.flipY=e,this.videoTextureSource&&this.videoTextureSource.setFlipY(e),this.videoTexture},stop:function(){var t=this.video;if(t){var e=this._callbacks;for(var i in e)t.removeEventListener(i,e[i],!0);t.pause()}return this._retryID&&window.clearTimeout(this._retryID),this.emit(o.VIDEO_STOP,this),this},removeVideoElement:function(){var t=this.video;if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("autoplay"),t.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(),this.removeVideoElementOnDestroy&&this.removeVideoElement();var t=this.scene.sys.game.events;t.off(a.PAUSE,this.globalPause,this),t.off(a.RESUME,this.globalResume,this);var e=this.scene.sys.sound;e&&e.off(l.GLOBAL_MUTE,this.globalMute,this),this._retryID&&window.clearTimeout(this._retryID)}});t.exports=f},function(t,e,i){var n=i(0),s=i(198),r=i(397),o=i(46),a=new n({initialize:function(t){this.type=o.POLYGON,this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return s(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],"string"==typeof t&&(t=t.split(" ")),!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,n=0;no||r>a)return!1;if(s<=i||r<=n)return!0;var h=s-i,l=r-n;return h*h+l*l<=t.radius*t.radius}},function(t,e,i){var n=i(4),s=i(204);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r,o,a=t.x1,h=t.y1,l=t.x2,u=t.y2,c=e.x,d=e.y,f=e.radius,p=l-a,g=u-h,v=a-c,m=h-d,y=p*p+g*g,x=2*(p*v+g*m),T=x*x-4*y*(v*v+m*m-f*f);if(0===T){var w=-x/(2*y);r=a+w*p,o=h+w*g,w>=0&&w<=1&&i.push(new n(r,o))}else if(T>0){var b=(-x-Math.sqrt(T))/(2*y);r=a+b*p,o=h+b*g,b>=0&&b<=1&&i.push(new n(r,o));var E=(-x+Math.sqrt(T))/(2*y);r=a+E*p,o=h+E*g,E>=0&&E<=1&&i.push(new n(r,o))}}return i}},function(t,e,i){var n=i(54),s=new(i(4));t.exports=function(t,e,i){if(void 0===i&&(i=s),n(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(n(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,l=r*r+o*o,u=r,c=o;if(l>0){var d=(a*r+h*o)/l;u*=d,c*=d}return i.x=t.x1+u,i.y=t.y1+c,u*u+c*c<=l&&u*r+c*o>=0&&n(e,i.x,i.y)}},function(t,e,i){var n=i(4),s=i(84),r=i(410);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e))for(var o=e.getLineA(),a=e.getLineB(),h=e.getLineC(),l=e.getLineD(),u=[new n,new n,new n,new n],c=[s(o,t,u[0]),s(a,t,u[1]),s(h,t,u[2]),s(l,t,u[3])],d=0;d<4;d++)c[d]&&i.push(u[d]);return i}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=[]);for(var s,r,o,a,h,l,u=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,f=t.y2-t.y1,p=u*u+c*c,g=u*d+c*f,v=d*d+f*f,m=p*v-g*g,y=0===m?0:1/m,x=t.x1,T=t.y1,w=0;w=0&&r>=0&&s+r<1&&(n.push({x:e[w].x,y:e[w].y}),i)));w++);return n}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,t}},function(t,e){t.exports=function(t){return 0===t.height?NaN:t.width/t.height}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,o=t.x3-e,a=t.y3-i,t.x3=o*s-a*r+e,t.y3=o*r+a*s+i,t}},function(t,e,i){t.exports={BUTTON_DOWN:i(1178),BUTTON_UP:i(1179),CONNECTED:i(1180),DISCONNECTED:i(1181),GAMEPAD_BUTTON_DOWN:i(1182),GAMEPAD_BUTTON_UP:i(1183)}},function(t,e,i){var n=i(17),s=i(133);t.exports=function(t,e){var i=void 0===t?s():n({},t);if(e)for(var r in e)void 0!==e[r]&&(i[r]=e[r]);return i}},function(t,e,i){var n=i(0),s=i(19),r=i(20),o=i(8),a=i(2),h=i(7),l=i(344),u=new n({Extends:r,initialize:function(t,e,i,n){var s="xml";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),s=a(o,"extension",s)}var l={type:"xml",cache:t.cacheManager.xml,extension:s,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,l)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=l(this.xhrLoader.responseText),this.data?this.onProcessComplete():(console.warn("Invalid XMLFile: "+this.key),this.onProcessError())}});o.register("xml",function(t,e,i){if(Array.isArray(t))for(var n=0;n0&&(s.totalDuration+=s.t2*s.repeat),s.totalDuration>t&&(t=s.totalDuration),s.delay0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay,this.startDelay=e},init:function(){if(this.paused&&!this.parentIsTimeline)return this.state=h.PENDING_ADD,this._pausedState=h.INIT,!1;for(var t=this.data,e=this.totalTargets,i=0;i0?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=h.LOOP_DELAY):(this.state=h.ACTIVE,this.dispatchTweenEvent(r.TWEEN_LOOP,this.callbacks.onLoop))):this.completeDelay>0?(this.state=h.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=h.PENDING_REMOVE,this.dispatchTweenEvent(r.TWEEN_COMPLETE,this.callbacks.onComplete))},pause:function(){return this.state===h.PAUSED?this:(this.paused=!0,this._pausedState=this.state,this.state=h.PAUSED,this)},play:function(t){void 0===t&&(t=!1);var e=this.state;return e!==h.INIT||this.parentIsTimeline?e===h.ACTIVE||e===h.PENDING_ADD&&this._pausedState===h.PENDING_ADD?this:this.parentIsTimeline||e!==h.PENDING_REMOVE&&e!==h.REMOVED?(this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?this.state=h.ACTIVE:(this.countdown=this.calculatedOffset,this.state=h.OFFSET_DELAY)):this.paused?(this.paused=!1,this.makeActive()):(this.resetTweenData(t),this.state=h.ACTIVE,this.makeActive()),this):(this.seek(0),this.parent.makeActive(this),this):(this.resetTweenData(!1),this.state=h.ACTIVE,this)},resetTweenData:function(t){for(var e=this.data,i=this.totalData,n=this.totalTargets,s=0;s0&&(r.elapsed=r.delay,r.state=h.DELAY),r.getActiveValue&&(o[a]=r.getActiveValue(r.target,r.key,r.start))}},resume:function(){return this.state===h.PAUSED?(this.paused=!1,this.state=this._pausedState):this.play(),this},seek:function(t,e){if(void 0===e&&(e=16.6),this.totalDuration>=36e5)return console.warn("Tween.seek duration too long"),this;this.state===h.REMOVED&&this.makeActive(),this.elapsed=0,this.progress=0,this.totalElapsed=0,this.totalProgress=0;for(var i=this.data,n=this.totalTargets,s=0;s0&&(r.elapsed=r.delay,r.state=h.DELAY)}this.calcDuration();var c=!1;this.state===h.PAUSED&&(c=!0,this.state=h.ACTIVE),this.isSeeking=!0;do{this.update(0,e)}while(this.totalProgress0?(e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY(),e.start=e.getStartValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.end=e.getEndValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,h.REPEAT_DELAY):(this.dispatchTweenDataEvent(r.TWEEN_REPEAT,t.callbacks.onRepeat,e),h.PLAYING_FORWARD)):h.COMPLETE},setStateFromStart:function(t,e,i){return e.repeatCounter>0?(e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY(),e.end=e.getEndValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,h.REPEAT_DELAY):(this.dispatchTweenDataEvent(r.TWEEN_REPEAT,t.callbacks.onRepeat,e),h.PLAYING_FORWARD)):h.COMPLETE},updateTweenData:function(t,e,i){var n=e.target;switch(e.state){case h.PLAYING_FORWARD:case h.PLAYING_BACKWARD:if(!n){e.state=h.COMPLETE;break}var s=e.elapsed,o=e.duration,a=0;(s+=i)>o&&(a=s-o,s=o);var l=e.state===h.PLAYING_FORWARD,u=s/o;if(e.elapsed=s,e.progress=u,1===u)l?(e.current=e.end,n[e.key]=e.end,e.hold>0?(e.elapsed=e.hold-a,e.state=h.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,a)):(e.current=e.start,n[e.key]=e.start,e.state=this.setStateFromStart(t,e,a));else{var c=l?e.ease(u):e.ease(1-u);e.current=e.start+(e.end-e.start)*c,n[e.key]=e.current}this.dispatchTweenDataEvent(r.TWEEN_UPDATE,t.callbacks.onUpdate,e);break;case h.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=h.PENDING_RENDER);break;case h.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=h.PLAYING_FORWARD,this.dispatchTweenDataEvent(r.TWEEN_REPEAT,t.callbacks.onRepeat,e));break;case h.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case h.PENDING_RENDER:n?(e.start=e.getStartValue(n,e.key,n[e.key],e.index,t.totalTargets,t),e.end=e.getEndValue(n,e.key,e.start,e.index,t.totalTargets,t),e.current=e.start,n[e.key]=e.start,e.state=h.PLAYING_FORWARD):e.state=h.COMPLETE}return e.state!==h.COMPLETE}});u.TYPES=["onActive","onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],a.register("tween",function(t){return this.scene.sys.tweens.add(t)}),o.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=u},function(t,e,i){t.exports={TIMELINE_COMPLETE:i(1331),TIMELINE_LOOP:i(1332),TIMELINE_PAUSE:i(1333),TIMELINE_RESUME:i(1334),TIMELINE_START:i(1335),TIMELINE_UPDATE:i(1336),TWEEN_ACTIVE:i(1337),TWEEN_COMPLETE:i(1338),TWEEN_LOOP:i(1339),TWEEN_REPEAT:i(1340),TWEEN_START:i(1341),TWEEN_UPDATE:i(1342),TWEEN_YOYO:i(1343)}},function(t,e){t.exports=function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p){return{target:t,index:e,key:i,getActiveValue:r,getEndValue:n,getStartValue:s,ease:o,duration:0,totalDuration:0,delay:0,yoyo:l,hold:0,repeat:0,repeatDelay:0,flipX:f,flipY:p,progress:0,elapsed:0,repeatCounter:0,start:0,current:0,end:0,t1:0,t2:0,gen:{delay:a,duration:h,hold:u,repeat:c,repeatDelay:d},state:0}}},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},function(t,e,i){var n=i(57);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e,i){var n=i(57);t.exports=function(t){return n(t,-180,180)}},function(t,e,i){var n=i(0),s=i(10),r=new n({initialize:function(t){this.name="WebGLPipeline",this.game=t.game,this.view=t.game.canvas,this.resolution=1,this.width=0,this.height=0,this.gl=t.gl,this.vertexCount=0,this.vertexCapacity=t.vertexCapacity,this.renderer=t.renderer,this.vertexData=t.vertices?t.vertices:new ArrayBuffer(t.vertexCapacity*t.vertexSize),this.vertexBuffer=this.renderer.createVertexBuffer(t.vertices?t.vertices:this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=this.renderer.createProgram(t.vertShader,t.fragShader),this.attributes=t.attributes,this.vertexSize=t.vertexSize,this.topology=t.topology,this.bytes=new Uint8Array(this.vertexData),this.vertexComponentCount=s.getComponentCount(t.attributes,this.gl),this.flushLocked=!1,this.active=!1},boot:function(){},addAttribute:function(t,e,i,n,r){return this.attributes.push({name:t,size:e,type:this.renderer.glFormats[i],normalized:n,offset:r}),this.vertexComponentCount=s.getComponentCount(this.attributes,this.gl),this},shouldFlush:function(){return this.vertexCount>=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this.resolution=i,this},bind:function(){var t=this.gl,e=this.vertexBuffer,i=this.attributes,n=this.program,s=this.renderer,r=this.vertexSize;s.setProgram(n),s.setVertexBuffer(e);for(var o=0;o=0?(t.enableVertexAttribArray(h),t.vertexAttribPointer(h,a.size,a.type,a.normalized,r,a.offset)):-1!==h&&t.disableVertexAttribArray(h)}return this},onBind:function(){return this},onPreRender:function(){return this},onRender:function(){return this},onPostRender:function(){return this},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.vertexCount,i=this.topology,n=this.vertexSize;if(0!==e)return t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,e*n)),t.drawArrays(i,0,e),this.vertexCount=0,this.flushLocked=!1,this;this.flushLocked=!1},destroy:function(){var t=this.gl;return t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),delete this.program,delete this.vertexBuffer,delete this.gl,this},setFloat1:function(t,e){return this.renderer.setFloat1(this.program,t,e),this},setFloat2:function(t,e,i){return this.renderer.setFloat2(this.program,t,e,i),this},setFloat3:function(t,e,i,n){return this.renderer.setFloat3(this.program,t,e,i,n),this},setFloat4:function(t,e,i,n,s){return this.renderer.setFloat4(this.program,t,e,i,n,s),this},setFloat1v:function(t,e){return this.renderer.setFloat1v(this.program,t,e),this},setFloat2v:function(t,e){return this.renderer.setFloat2v(this.program,t,e),this},setFloat3v:function(t,e){return this.renderer.setFloat3v(this.program,t,e),this},setFloat4v:function(t,e){return this.renderer.setFloat4v(this.program,t,e),this},setInt1:function(t,e){return this.renderer.setInt1(this.program,t,e),this},setInt2:function(t,e,i){return this.renderer.setInt2(this.program,t,e,i),this},setInt3:function(t,e,i,n){return this.renderer.setInt3(this.program,t,e,i,n),this},setInt4:function(t,e,i,n,s){return this.renderer.setInt4(this.program,t,e,i,n,s),this},setMatrix2:function(t,e,i){return this.renderer.setMatrix2(this.program,t,e,i),this},setMatrix3:function(t,e,i){return this.renderer.setMatrix3(this.program,t,e,i),this},setMatrix4:function(t,e,i){return this.renderer.setMatrix4(this.program,t,e,i),this}});t.exports=r},function(t,e,i){var n=i(0),s=i(66),r=i(2),o=i(492),a=i(756),h=i(757),l=i(32),u=i(10),c=i(233),d=new n({Extends:c,Mixins:[o],initialize:function(t){var e=t.renderer.config;c.call(this,{game:t.game,renderer:t.renderer,gl:t.renderer.gl,topology:r(t,"topology",t.renderer.gl.TRIANGLES),vertShader:r(t,"vertShader",h),fragShader:r(t,"fragShader",a),vertexCapacity:r(t,"vertexCapacity",6*e.batchSize),vertexSize:r(t,"vertexSize",5*Float32Array.BYTES_PER_ELEMENT+4*Uint8Array.BYTES_PER_ELEMENT),attributes:[{name:"inPosition",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:0},{name:"inTexCoord",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:2*Float32Array.BYTES_PER_ELEMENT},{name:"inTintEffect",size:1,type:t.renderer.gl.FLOAT,normalized:!1,offset:4*Float32Array.BYTES_PER_ELEMENT},{name:"inTint",size:4,type:t.renderer.gl.UNSIGNED_BYTE,normalized:!0,offset:5*Float32Array.BYTES_PER_ELEMENT}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.vertexViewU32=new Uint32Array(this.vertexData),this.maxQuads=e.batchSize,this.batches=[],this._tempMatrix1=new l,this._tempMatrix2=new l,this._tempMatrix3=new l,this._tempMatrix4=new l,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.tintEffect=2,this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[],this.mvpInit()},onBind:function(){return c.prototype.onBind.call(this),this.mvpUpdate(),this},resize:function(t,e,i){return c.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},setTexture2D:function(t,e){return void 0===t&&(t=this.renderer.blankTexture.glTexture),void 0===e&&(e=0),this.requireTextureBatch(t,e)&&this.pushBatch(t,e),this},requireTextureBatch:function(t,e){var i=this.batches,n=i.length;return!(n>0)||!((e>0?i[n-1].textures[e-1]:i[n-1].texture)===t)},pushBatch:function(t,e){if(0===e)this.batches.push({first:this.vertexCount,texture:t,textures:[]});else{var i=[];i[e-1]=t,this.batches.push({first:this.vertexCount,texture:null,textures:i})}},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t,e,i,n=this.gl,s=this.vertexCount,r=this.topology,o=this.vertexSize,a=this.renderer,h=this.batches,l=h.length,u=0,c=null;if(0===l||0===s)return this.flushLocked=!1,this;n.bufferSubData(n.ARRAY_BUFFER,0,this.bytes.subarray(0,s*o));for(var d=0;d0){for(e=0;e0){for(e=0;e0&&(a.setTexture2D(c.texture,0,!1),n.drawArrays(r,c.first,u)),this.vertexCount=0,h.length=0,this.flushLocked=!1,this},batchSprite:function(t,e,i){this.renderer.setPipeline(this);var n=this._tempMatrix1,s=this._tempMatrix2,r=this._tempMatrix3,o=t.frame,a=o.glTexture,h=o.u0,l=o.v0,c=o.u1,d=o.v1,f=o.x,p=o.y,g=o.cutWidth,v=o.cutHeight,m=o.customPivot,y=t.displayOriginX,x=t.displayOriginY,T=-y+f,w=-x+p;if(t.isCropped){var b=t._crop;b.flipX===t.flipX&&b.flipY===t.flipY||o.updateCropUVs(b,t.flipX,t.flipY),h=b.u0,l=b.v0,c=b.u1,d=b.v1,g=b.width,v=b.height,T=-y+(f=b.x),w=-x+(p=b.y)}var E=1,S=1;t.flipX&&(m||(T+=-o.realWidth+2*y),E=-1),(t.flipY||o.source.isGLTexture&&!a.flipY)&&(m||(w+=-o.realHeight+2*x),S=-1),s.applyITRS(t.x,t.y,t.rotation,t.scaleX*E,t.scaleY*S),n.copyFrom(e.matrix),i?(n.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),s.e=t.x,s.f=t.y,n.multiply(s,r)):(s.e-=e.scrollX*t.scrollFactorX,s.f-=e.scrollY*t.scrollFactorY,n.multiply(s,r));var A=T+g,_=w+v,C=r.getX(T,w),M=r.getY(T,w),P=r.getX(T,_),O=r.getY(T,_),R=r.getX(A,_),L=r.getY(A,_),D=r.getX(A,w),k=r.getY(A,w),F=u.getTintAppendFloatAlpha(t._tintTL,e.alpha*t._alphaTL),I=u.getTintAppendFloatAlpha(t._tintTR,e.alpha*t._alphaTR),B=u.getTintAppendFloatAlpha(t._tintBL,e.alpha*t._alphaBL),N=u.getTintAppendFloatAlpha(t._tintBR,e.alpha*t._alphaBR);e.roundPixels&&(C=Math.round(C),M=Math.round(M),P=Math.round(P),O=Math.round(O),R=Math.round(R),L=Math.round(L),D=Math.round(D),k=Math.round(k)),this.setTexture2D(a,0);var Y=t._isTinted&&t.tintFill;this.batchQuad(C,M,P,O,R,L,D,k,h,l,c,d,F,I,B,N,Y,a,0)},batchQuad:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,m,y){var x=!1;this.vertexCount+6>this.vertexCapacity&&(this.flush(),x=!0,this.setTexture2D(m,y));var T=this.vertexViewF32,w=this.vertexViewU32,b=this.vertexCount*this.vertexComponentCount-1;return T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=v,w[++b]=d,T[++b]=i,T[++b]=n,T[++b]=h,T[++b]=c,T[++b]=v,w[++b]=p,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=v,w[++b]=g,T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=v,w[++b]=d,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=v,w[++b]=g,T[++b]=o,T[++b]=a,T[++b]=u,T[++b]=l,T[++b]=v,w[++b]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g){var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),this.setTexture2D(p,g),v=!0);var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=f,y[++x]=u,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=l,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=l,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},batchTexture:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,m,y,x,T,w,b,E,S,A,_,C,M,P,O){this.renderer.setPipeline(this,t);var R=this._tempMatrix1,L=this._tempMatrix2,D=this._tempMatrix3,k=m/i+_,F=y/n+C,I=(m+x)/i+_,B=(y+T)/n+C,N=o,Y=a,X=-g,z=-v;if(t.isCropped){var U=t._crop;N=U.width,Y=U.height,o=U.width,a=U.height;var G=m=U.x,W=y=U.y;c&&(G=x-U.x-U.width),d&&!e.isRenderTexture&&(W=T-U.y-U.height),k=G/i+_,F=W/n+C,I=(G+U.width)/i+_,B=(W+U.height)/n+C,X=-g+m,z=-v+y}d^=!O&&e.isRenderTexture?1:0,c&&(N*=-1,X+=o),d&&(Y*=-1,z+=a);var V=X+N,H=z+Y;L.applyITRS(s,r,u,h,l),R.copyFrom(M.matrix),P?(R.multiplyWithOffset(P,-M.scrollX*f,-M.scrollY*p),L.e=s,L.f=r,R.multiply(L,D)):(L.e-=M.scrollX*f,L.f-=M.scrollY*p,R.multiply(L,D));var j=D.getX(X,z),q=D.getY(X,z),K=D.getX(X,H),J=D.getY(X,H),Z=D.getX(V,H),Q=D.getY(V,H),$=D.getX(V,z),tt=D.getY(V,z);M.roundPixels&&(j=Math.round(j),q=Math.round(q),K=Math.round(K),J=Math.round(J),Z=Math.round(Z),Q=Math.round(Q),$=Math.round($),tt=Math.round(tt)),this.setTexture2D(e,0),this.batchQuad(j,q,K,J,Z,Q,$,tt,k,F,I,B,w,b,E,S,A,e,0)},batchTextureFrame:function(t,e,i,n,s,r,o){this.renderer.setPipeline(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2,l=e+t.width,c=i+t.height;o?a.multiply(o,h):h=a;var d=h.getX(e,i),f=h.getY(e,i),p=h.getX(e,c),g=h.getY(e,c),v=h.getX(l,c),m=h.getY(l,c),y=h.getX(l,i),x=h.getY(l,i);this.setTexture2D(t.glTexture,0),n=u.getTintAppendFloatAlpha(n,s),this.batchQuad(d,f,p,g,v,m,y,x,t.u0,t.v0,t.u1,t.v1,n,n,n,n,0,t.glTexture,0)},drawFillRect:function(t,e,i,n,s,r){var o=t+i,a=e+n;this.setTexture2D();var h=u.getTintAppendFloatAlphaAndSwap(s,r);this.batchQuad(t,e,t,a,o,a,o,e,0,0,1,1,h,h,h,h,2)},batchFillRect:function(t,e,i,n,s,r){this.renderer.setPipeline(this);var o=this._tempMatrix3;r&&r.multiply(s,o);var a=t+i,h=e+n,l=o.getX(t,e),u=o.getY(t,e),c=o.getX(t,h),d=o.getY(t,h),f=o.getX(a,h),p=o.getY(a,h),g=o.getX(a,e),v=o.getY(a,e),m=this.currentFrame,y=m.u0,x=m.v0,T=m.u1,w=m.v1;this.batchQuad(l,u,c,d,f,p,g,v,y,x,T,w,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.fillTint.BR,this.tintEffect)},batchFillTriangle:function(t,e,i,n,s,r,o,a){this.renderer.setPipeline(this);var h=this._tempMatrix3;a&&a.multiply(o,h);var l=h.getX(t,e),u=h.getY(t,e),c=h.getX(i,n),d=h.getY(i,n),f=h.getX(s,r),p=h.getY(s,r),g=this.currentFrame,v=g.u0,m=g.v0,y=g.u1,x=g.v1;this.batchTri(l,u,c,d,f,p,v,m,y,x,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.tintEffect)},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h){var l=this.tempTriangle;l[0].x=t,l[0].y=e,l[0].width=o,l[1].x=i,l[1].y=n,l[1].width=o,l[2].x=s,l[2].y=r,l[2].width=o,l[3].x=t,l[3].y=e,l[3].width=o,this.batchStrokePath(l,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.setPipeline(this);var n=this._tempMatrix3;i&&i.multiply(e,n);for(var r,o,a=t.length,h=this.polygonCache,l=this.fillTint.TL,u=this.fillTint.TR,c=this.fillTint.BL,d=this.tintEffect,f=0;f0&&H[4]?this.batchQuad(D,k,P,O,H[0],H[1],H[2],H[3],U,G,W,V,B,N,Y,X,I):(j[0]=D,j[1]=k,j[2]=P,j[3]=O,j[4]=1),h&&j[4]?this.batchQuad(C,M,R,L,j[0],j[1],j[2],j[3],U,G,W,V,B,N,Y,X,I):(H[0]=C,H[1]=M,H[2]=R,H[3]=L,H[4]=1)}}});t.exports=d},function(t,e,i){var n={};t.exports=n;var s=i(37);n.on=function(t,e,i){for(var n,s=e.split(" "),r=0;r0){i||(i={}),n=e.split(" ");for(var l=0;l0?1:.7),e.damping=e.damping||0,e.angularStiffness=e.angularStiffness||0,e.angleA=e.bodyA?e.bodyA.angle:e.angleA,e.angleB=e.bodyB?e.bodyB.angle:e.angleB,e.plugin={};var o={visible:!0,lineWidth:2,strokeStyle:"#ffffff",type:"line",anchors:!0};return 0===e.length&&e.stiffness>.1?(o.type="pin",o.anchors=!1):e.stiffness<.9&&(o.type="spring"),e.render=l.extend(o,e.render),e},n.preSolveAll=function(t){for(var e=0;e0&&(c.position.x+=l.x,c.position.y+=l.y),0!==l.angle&&(s.rotate(c.vertices,l.angle,i.position),h.rotate(c.axes,l.angle),u>0&&r.rotateAbout(c.position,l.angle,i.position,c.position)),a.update(c.bounds,c.vertices,i.velocity)}l.angle*=n._warming,l.x*=n._warming,l.y*=n._warming}}}},function(t,e,i){t.exports={Angle:i(504),Call:i(505),GetFirst:i(506),GetLast:i(507),GridAlign:i(508),IncAlpha:i(568),IncX:i(569),IncXY:i(570),IncY:i(571),PlaceOnCircle:i(572),PlaceOnEllipse:i(573),PlaceOnLine:i(574),PlaceOnRectangle:i(575),PlaceOnTriangle:i(576),PlayAnimation:i(577),PropertyValueInc:i(34),PropertyValueSet:i(25),RandomCircle:i(578),RandomEllipse:i(579),RandomLine:i(580),RandomRectangle:i(581),RandomTriangle:i(582),Rotate:i(583),RotateAround:i(584),RotateAroundDistance:i(585),ScaleX:i(586),ScaleXY:i(587),ScaleY:i(588),SetAlpha:i(589),SetBlendMode:i(590),SetDepth:i(591),SetHitArea:i(592),SetOrigin:i(593),SetRotation:i(594),SetScale:i(595),SetScaleX:i(596),SetScaleY:i(597),SetScrollFactor:i(598),SetScrollFactorX:i(599),SetScrollFactorY:i(600),SetTint:i(601),SetVisible:i(602),SetX:i(603),SetXY:i(604),SetY:i(605),ShiftPosition:i(606),Shuffle:i(607),SmootherStep:i(608),SmoothStep:i(609),Spread:i(610),ToggleVisible:i(611),WrapInRectangle:i(612)}},function(t,e,i){var n=i(143),s=[];s[n.BOTTOM_CENTER]=i(239),s[n.BOTTOM_LEFT]=i(240),s[n.BOTTOM_RIGHT]=i(241),s[n.CENTER]=i(242),s[n.LEFT_CENTER]=i(244),s[n.RIGHT_CENTER]=i(245),s[n.TOP_CENTER]=i(246),s[n.TOP_LEFT]=i(247),s[n.TOP_RIGHT]=i(248);t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e,i){var n=i(38),s=i(75),r=i(39),o=i(76);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(38),s=i(40),r=i(39),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(38),s=i(42),r=i(39),o=i(43);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(243),s=i(75),r=i(78);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)+i,r(e)+o),t}},function(t,e,i){var n=i(76),s=i(77);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var n=i(78),s=i(40),r=i(77),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(78),s=i(42),r=i(77),o=i(43);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(75),s=i(44),r=i(76),o=i(45);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(40),s=i(44),r=i(41),o=i(45);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)-a),t}},function(t,e,i){var n=i(42),s=i(44),r=i(43),o=i(45);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(144),s=i(87),r=i(13),o=i(4);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=s(e,0,r.PI2);return n(t,a,i)}},function(t,e,i){var n=i(251),s=i(144),r=i(87),o=i(13);t.exports=function(t,e,i,a){void 0===a&&(a=[]),e||(e=n(t)/i);for(var h=0;he.length&&(r=e.length),i?(n=e[r-1][i],(s=e[r][i])-t<=t-n?e[r]:e[r-1]):(n=e[r-1],(s=e[r])-t<=t-n?s:n)}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=n,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0}});t.exports=n},function(t,e,i){var n=i(52),s={_blendMode:n.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=n[t]),(t|=0)>=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e,i){var n=i(147),s=i(110);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=s(t)/i);for(var o=0;o=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n-h&&(c-=h,n+=l),fd.right&&(f=u(f,f+(g-d.right),this.lerp.x)),vd.bottom&&(p=u(p,p+(v-d.bottom),this.lerp.y))):(f=u(f,g-h,this.lerp.x),p=u(p,v-l,this.lerp.y))}this.useBounds&&(f=this.clampX(f),p=this.clampY(p)),this.roundPixels&&(h=Math.round(h),l=Math.round(l)),this.scrollX=f,this.scrollY=p;var m=f+n,y=p+s;this.midPoint.set(m,y);var x=e/o,T=i/o;this.worldView.setTo(m-x/2,y-T/2,x,T),a.applyITRS(this.x+h,this.y+l,this.rotation,o,o),a.translate(-h,-l),this.shakeEffect.preRender()},setLerp:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.lerp.set(t,e),this},setFollowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.followOffset.set(t,e),this},startFollow:function(t,e,i,n,s,r){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===s&&(s=0),void 0===r&&(r=s),this._follow=t,this.roundPixels=e,i=o(i,0,1),n=o(n,0,1),this.lerp.set(i,n),this.followOffset.set(s,r);var a=this.width/2,h=this.height/2,l=t.x-s,u=t.y-r;return this.midPoint.set(l,u),this.scrollX=l-a,this.scrollY=u-h,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.visible&&(this.panEffect.update(t,e),this.zoomEffect.update(t,e),this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e))},destroy:function(){this.clearRenderToTexture(),this.resetFX(),n.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=f},function(t,e,i){var n=i(33);t.exports=function(t){var e=new n;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var s=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16);e.setTo(s,r,o)}return e}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e){t.exports=function(t,e,i,n){void 0===n&&(n={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var s=Math.min(t,e,i),r=Math.max(t,e,i),o=r-s,a=0,h=0===r?0:o/r,l=r;return r!==s&&(r===t?a=(e-i)/o+(e16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},function(t,e,i){var n=i(33);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var n=i(33);t.exports=function(t){var e=new n,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var s=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(s,r,o,255*a)}return e}},function(t,e,i){t.exports={Fade:i(637),Flash:i(638),Pan:i(639),Shake:i(672),Zoom:i(673)}},function(t,e,i){t.exports={In:i(640),Out:i(641),InOut:i(642)}},function(t,e,i){t.exports={In:i(643),Out:i(644),InOut:i(645)}},function(t,e,i){t.exports={In:i(646),Out:i(647),InOut:i(648)}},function(t,e,i){t.exports={In:i(649),Out:i(650),InOut:i(651)}},function(t,e,i){t.exports={In:i(652),Out:i(653),InOut:i(654)}},function(t,e,i){t.exports={In:i(655),Out:i(656),InOut:i(657)}},function(t,e,i){t.exports=i(658)},function(t,e,i){t.exports={In:i(659),Out:i(660),InOut:i(661)}},function(t,e,i){t.exports={In:i(662),Out:i(663),InOut:i(664)}},function(t,e,i){t.exports={In:i(665),Out:i(666),InOut:i(667)}},function(t,e,i){t.exports={In:i(668),Out:i(669),InOut:i(670)}},function(t,e,i){t.exports=i(671)},function(t,e,i){var n=i(0),s=i(29),r=i(298),o=i(2),a=i(6),h=i(7),l=i(166),u=i(1),c=i(172),d=i(159),f=new n({initialize:function(t){void 0===t&&(t={});this.width=a(t,"width",1024),this.height=a(t,"height",768),this.zoom=a(t,"zoom",1),this.resolution=a(t,"resolution",1),this.parent=a(t,"parent",void 0),this.scaleMode=a(t,"scaleMode",0),this.expandParent=a(t,"expandParent",!0),this.autoRound=a(t,"autoRound",!1),this.autoCenter=a(t,"autoCenter",0),this.resizeInterval=a(t,"resizeInterval",500),this.fullscreenTarget=a(t,"fullscreenTarget",null),this.minWidth=a(t,"minWidth",0),this.maxWidth=a(t,"maxWidth",0),this.minHeight=a(t,"minHeight",0),this.maxHeight=a(t,"maxHeight",0);var e=a(t,"scale",null);e&&(this.width=a(e,"width",this.width),this.height=a(e,"height",this.height),this.zoom=a(e,"zoom",this.zoom),this.resolution=a(e,"resolution",this.resolution),this.parent=a(e,"parent",this.parent),this.scaleMode=a(e,"mode",this.scaleMode),this.expandParent=a(e,"expandParent",this.expandParent),this.autoRound=a(e,"autoRound",this.autoRound),this.autoCenter=a(e,"autoCenter",this.autoCenter),this.resizeInterval=a(e,"resizeInterval",this.resizeInterval),this.fullscreenTarget=a(e,"fullscreenTarget",this.fullscreenTarget),this.minWidth=a(e,"min.width",this.minWidth),this.maxWidth=a(e,"max.width",this.maxWidth),this.minHeight=a(e,"min.height",this.minHeight),this.maxHeight=a(e,"max.height",this.maxHeight)),this.renderType=a(t,"type",s.AUTO),this.canvas=a(t,"canvas",null),this.context=a(t,"context",null),this.canvasStyle=a(t,"canvasStyle",null),this.customEnvironment=a(t,"customEnvironment",!1),this.sceneConfig=a(t,"scene",null),this.seed=a(t,"seed",[(Date.now()*Math.random()).toString()]),l.RND=new l.RandomDataGenerator(this.seed),this.gameTitle=a(t,"title",""),this.gameURL=a(t,"url","https://phaser.io"),this.gameVersion=a(t,"version",""),this.autoFocus=a(t,"autoFocus",!0),this.domCreateContainer=a(t,"dom.createContainer",!1),this.domBehindCanvas=a(t,"dom.behindCanvas",!1),this.inputKeyboard=a(t,"input.keyboard",!0),this.inputKeyboardEventTarget=a(t,"input.keyboard.target",window),this.inputKeyboardCapture=a(t,"input.keyboard.capture",[]),this.inputMouse=a(t,"input.mouse",!0),this.inputMouseEventTarget=a(t,"input.mouse.target",null),this.inputMouseCapture=a(t,"input.mouse.capture",!0),this.inputTouch=a(t,"input.touch",r.input.touch),this.inputTouchEventTarget=a(t,"input.touch.target",null),this.inputTouchCapture=a(t,"input.touch.capture",!0),this.inputActivePointers=a(t,"input.activePointers",1),this.inputSmoothFactor=a(t,"input.smoothFactor",0),this.inputWindowEvents=a(t,"input.windowEvents",!0),this.inputGamepad=a(t,"input.gamepad",!1),this.inputGamepadEventTarget=a(t,"input.gamepad.target",window),this.disableContextMenu=a(t,"disableContextMenu",!1),this.audio=a(t,"audio"),this.hideBanner=!1===a(t,"banner",null),this.hidePhaser=a(t,"banner.hidePhaser",!1),this.bannerTextColor=a(t,"banner.text","#ffffff"),this.bannerBackgroundColor=a(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=a(t,"fps",null);var i=a(t,"render",t);this.antialias=a(i,"antialias",!0),this.antialiasGL=a(i,"antialiasGL",!0),this.mipmapFilter=a(i,"mipmapFilter","LINEAR"),this.desynchronized=a(i,"desynchronized",!1),this.roundPixels=a(i,"roundPixels",!1),this.pixelArt=a(i,"pixelArt",1!==this.zoom),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=a(i,"transparent",!1),this.clearBeforeRender=a(i,"clearBeforeRender",!0),this.premultipliedAlpha=a(i,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=a(i,"failIfMajorPerformanceCaveat",!1),this.powerPreference=a(i,"powerPreference","default"),this.batchSize=a(i,"batchSize",2e3),this.maxLights=a(i,"maxLights",10);var n=a(t,"backgroundColor",0);this.backgroundColor=d(n),0===n&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=a(t,"callbacks.preBoot",u),this.postBoot=a(t,"callbacks.postBoot",u),this.physics=a(t,"physics",{}),this.defaultPhysicsSystem=a(this.physics,"default",!1),this.loaderBaseURL=a(t,"loader.baseURL",""),this.loaderPath=a(t,"loader.path",""),this.loaderMaxParallelDownloads=a(t,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=a(t,"loader.crossOrigin",void 0),this.loaderResponseType=a(t,"loader.responseType",""),this.loaderAsync=a(t,"loader.async",!0),this.loaderUser=a(t,"loader.user",""),this.loaderPassword=a(t,"loader.password",""),this.loaderTimeout=a(t,"loader.timeout",0),this.installGlobalPlugins=[],this.installScenePlugins=[];var f=a(t,"plugins",null),p=c.DefaultScene;f&&(Array.isArray(f)?this.defaultPlugins=f:h(f)&&(this.installGlobalPlugins=o(f,"global",[]),this.installScenePlugins=o(f,"scene",[]),Array.isArray(f.default)?p=f.default:Array.isArray(f.defaultMerge)&&(p=p.concat(f.defaultMerge)))),this.defaultPlugins=p;var g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=a(t,"images.default",g+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=a(t,"images.missing",g+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),window&&(window.FORCE_WEBGL?this.renderType=s.WEBGL:window.FORCE_CANVAS&&(this.renderType=s.CANVAS))}});t.exports=f},function(t,e,i){t.exports={os:i(114),browser:i(115),features:i(165),input:i(702),audio:i(703),video:i(704),fullscreen:i(705),canvasFeatures:i(299)}},function(t,e,i){var n,s,r,o=i(26),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create(t,6,1).getContext("2d");if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return s*s+r*r}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t0?Math.ceil(t):Math.floor(t)}},function(t,e,i){var n=i(3);t.exports=function(t,e,i,s,r,o,a,h){void 0===h&&(h=new n);var l=Math.sin(r),u=Math.cos(r),c=u*o,d=l*o,f=-l*a,p=u*a,g=1/(c*p+f*-d);return h.x=p*g*t+-f*g*e+(s*f-i*p)*g,h.y=c*g*e+-d*g*t+(-s*c+i*d)*g,h}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},clone:function(){return new n(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return e*e+i*i+n*n+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12]*s,this.y=r[1]*e+r[5]*i+r[9]*n+r[13]*s,this.z=r[2]*e+r[6]*i+r[10]*n+r[14]*s,this.w=r[3]*e+r[7]*i+r[11]*n+r[15]*s,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*r-o*h,c=-l*s+o*a,d=h*s-r*a,f=e*u+i*c+n*d;return f?(f=1/f,t[0]=u*f,t[1]=(-l*i+n*h)*f,t[2]=(o*i-n*r)*f,t[3]=c*f,t[4]=(l*e-n*a)*f,t[5]=(-o*e+n*s)*f,t[6]=d*f,t[7]=(-h*e+i*a)*f,t[8]=(r*e-i*s)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=r*l-o*h,t[1]=n*h-i*l,t[2]=i*o-n*r,t[3]=o*a-s*l,t[4]=e*l-n*a,t[5]=n*s-e*o,t[6]=s*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*s,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*(l*r-o*h)+i*(-l*s+o*a)+n*(h*s-r*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],m=c[5],y=c[6],x=c[7],T=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*n+f*o+p*l,e[2]=d*s+f*a+p*u,e[3]=g*i+v*r+m*h,e[4]=g*n+v*o+m*l,e[5]=g*s+v*a+m*u,e[6]=y*i+x*r+T*h,e[7]=y*n+x*o+T*l,e[8]=y*s+x*a+T*u,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*r,e[1]=l*n+h*o,e[2]=l*s+h*a,e[3]=l*r-h*i,e[4]=l*o-h*n,e[5]=l*a-h*s,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,o=i+i,a=n+n,h=e*r,l=e*o,u=e*a,c=i*o,d=i*a,f=n*a,p=s*r,g=s*o,v=s*a,m=this.val;return m[0]=1-(c+f),m[3]=l+v,m[6]=u-g,m[1]=l-v,m[4]=1-(h+f),m[7]=d+p,m[2]=u+g,m[5]=d-p,m[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],v=e[13],m=e[14],y=e[15],x=n*h-s*a,T=n*l-r*a,w=n*u-o*a,b=s*l-r*h,E=s*u-o*h,S=r*u-o*l,A=c*v-d*g,_=c*m-f*g,C=c*y-p*g,M=d*m-f*v,P=d*y-p*v,O=f*y-p*m,R=x*O-T*P+w*M+b*C-E*_+S*A;return R?(R=1/R,i[0]=(h*O-l*P+u*M)*R,i[1]=(l*C-a*O-u*_)*R,i[2]=(a*P-h*C+u*A)*R,i[3]=(r*P-s*O-o*M)*R,i[4]=(n*O-r*C+o*_)*R,i[5]=(s*C-n*P-o*A)*R,i[6]=(v*S-m*E+y*b)*R,i[7]=(m*w-g*S-y*T)*R,i[8]=(g*E-v*w+y*x)*R,this):null}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this},zero:function(){var t=this.val;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=0,this},xyz:function(t,e,i){this.identity();var n=this.val;return n[12]=t,n[13]=e,n[14]=i,this},scaling:function(t,e,i){this.zero();var n=this.val;return n[0]=t,n[5]=e,n[10]=i,n[15]=1,this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[3],s=t[6],r=t[7],o=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=s,t[11]=t[14],t[12]=n,t[13]=r,t[14]=o,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15],m=e*o-i*r,y=e*a-n*r,x=e*h-s*r,T=i*a-n*o,w=i*h-s*o,b=n*h-s*a,E=l*p-u*f,S=l*g-c*f,A=l*v-d*f,_=u*g-c*p,C=u*v-d*p,M=c*v-d*g,P=m*M-y*C+x*_+T*A-w*S+b*E;return P?(P=1/P,t[0]=(o*M-a*C+h*_)*P,t[1]=(n*C-i*M-s*_)*P,t[2]=(p*b-g*w+v*T)*P,t[3]=(c*w-u*b-d*T)*P,t[4]=(a*A-r*M-h*S)*P,t[5]=(e*M-n*A+s*S)*P,t[6]=(g*x-f*b-v*y)*P,t[7]=(l*b-c*x+d*y)*P,t[8]=(r*C-o*A+h*E)*P,t[9]=(i*A-e*C-s*E)*P,t[10]=(f*w-p*x+v*m)*P,t[11]=(u*x-l*w-d*m)*P,t[12]=(o*S-r*_-a*E)*P,t[13]=(e*_-i*S+n*E)*P,t[14]=(p*y-f*T-g*m)*P,t[15]=(l*T-u*y+c*m)*P,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return t[0]=o*(c*v-d*g)-u*(a*v-h*g)+p*(a*d-h*c),t[1]=-(i*(c*v-d*g)-u*(n*v-s*g)+p*(n*d-s*c)),t[2]=i*(a*v-h*g)-o*(n*v-s*g)+p*(n*h-s*a),t[3]=-(i*(a*d-h*c)-o*(n*d-s*c)+u*(n*h-s*a)),t[4]=-(r*(c*v-d*g)-l*(a*v-h*g)+f*(a*d-h*c)),t[5]=e*(c*v-d*g)-l*(n*v-s*g)+f*(n*d-s*c),t[6]=-(e*(a*v-h*g)-r*(n*v-s*g)+f*(n*h-s*a)),t[7]=e*(a*d-h*c)-r*(n*d-s*c)+l*(n*h-s*a),t[8]=r*(u*v-d*p)-l*(o*v-h*p)+f*(o*d-h*u),t[9]=-(e*(u*v-d*p)-l*(i*v-s*p)+f*(i*d-s*u)),t[10]=e*(o*v-h*p)-r*(i*v-s*p)+f*(i*h-s*o),t[11]=-(e*(o*d-h*u)-r*(i*d-s*u)+l*(i*h-s*o)),t[12]=-(r*(u*g-c*p)-l*(o*g-a*p)+f*(o*c-a*u)),t[13]=e*(u*g-c*p)-l*(i*g-n*p)+f*(i*c-n*u),t[14]=-(e*(o*g-a*p)-r*(i*g-n*p)+f*(i*a-n*o)),t[15]=e*(o*c-a*u)-r*(i*c-n*u)+l*(i*a-n*o),this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return(e*o-i*r)*(c*v-d*g)-(e*a-n*r)*(u*v-d*p)+(e*h-s*r)*(u*g-c*p)+(i*a-n*o)*(l*v-d*f)-(i*h-s*o)*(l*g-c*f)+(n*h-s*a)*(l*p-u*f)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=e[9],d=e[10],f=e[11],p=e[12],g=e[13],v=e[14],m=e[15],y=t.val,x=y[0],T=y[1],w=y[2],b=y[3];return e[0]=x*i+T*o+w*u+b*p,e[1]=x*n+T*a+w*c+b*g,e[2]=x*s+T*h+w*d+b*v,e[3]=x*r+T*l+w*f+b*m,x=y[4],T=y[5],w=y[6],b=y[7],e[4]=x*i+T*o+w*u+b*p,e[5]=x*n+T*a+w*c+b*g,e[6]=x*s+T*h+w*d+b*v,e[7]=x*r+T*l+w*f+b*m,x=y[8],T=y[9],w=y[10],b=y[11],e[8]=x*i+T*o+w*u+b*p,e[9]=x*n+T*a+w*c+b*g,e[10]=x*s+T*h+w*d+b*v,e[11]=x*r+T*l+w*f+b*m,x=y[12],T=y[13],w=y[14],b=y[15],e[12]=x*i+T*o+w*u+b*p,e[13]=x*n+T*a+w*c+b*g,e[14]=x*s+T*h+w*d+b*v,e[15]=x*r+T*l+w*f+b*m,this},multiplyLocal:function(t){var e=[],i=this.val,n=t.val;return e[0]=i[0]*n[0]+i[1]*n[4]+i[2]*n[8]+i[3]*n[12],e[1]=i[0]*n[1]+i[1]*n[5]+i[2]*n[9]+i[3]*n[13],e[2]=i[0]*n[2]+i[1]*n[6]+i[2]*n[10]+i[3]*n[14],e[3]=i[0]*n[3]+i[1]*n[7]+i[2]*n[11]+i[3]*n[15],e[4]=i[4]*n[0]+i[5]*n[4]+i[6]*n[8]+i[7]*n[12],e[5]=i[4]*n[1]+i[5]*n[5]+i[6]*n[9]+i[7]*n[13],e[6]=i[4]*n[2]+i[5]*n[6]+i[6]*n[10]+i[7]*n[14],e[7]=i[4]*n[3]+i[5]*n[7]+i[6]*n[11]+i[7]*n[15],e[8]=i[8]*n[0]+i[9]*n[4]+i[10]*n[8]+i[11]*n[12],e[9]=i[8]*n[1]+i[9]*n[5]+i[10]*n[9]+i[11]*n[13],e[10]=i[8]*n[2]+i[9]*n[6]+i[10]*n[10]+i[11]*n[14],e[11]=i[8]*n[3]+i[9]*n[7]+i[10]*n[11]+i[11]*n[15],e[12]=i[12]*n[0]+i[13]*n[4]+i[14]*n[8]+i[15]*n[12],e[13]=i[12]*n[1]+i[13]*n[5]+i[14]*n[9]+i[15]*n[13],e[14]=i[12]*n[2]+i[13]*n[6]+i[14]*n[10]+i[15]*n[14],e[15]=i[12]*n[3]+i[13]*n[7]+i[14]*n[11]+i[15]*n[15],this.fromArray(e)},translate:function(t){var e=t.x,i=t.y,n=t.z,s=this.val;return s[12]=s[0]*e+s[4]*i+s[8]*n+s[12],s[13]=s[1]*e+s[5]*i+s[9]*n+s[13],s[14]=s[2]*e+s[6]*i+s[10]*n+s[14],s[15]=s[3]*e+s[7]*i+s[11]*n+s[15],this},translateXYZ:function(t,e,i){var n=this.val;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this},scale:function(t){var e=t.x,i=t.y,n=t.z,s=this.val;return s[0]=s[0]*e,s[1]=s[1]*e,s[2]=s[2]*e,s[3]=s[3]*e,s[4]=s[4]*i,s[5]=s[5]*i,s[6]=s[6]*i,s[7]=s[7]*i,s[8]=s[8]*n,s[9]=s[9]*n,s[10]=s[10]*n,s[11]=s[11]*n,this},scaleXYZ:function(t,e,i){var n=this.val;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),s=1-i,r=t.x,o=t.y,a=t.z,h=s*r,l=s*o;return this.fromArray([h*r+i,h*o-n*a,h*a+n*o,0,h*o+n*a,l*o+i,l*a-n*r,0,h*a-n*o,l*a+n*r,s*a*a+i,0,0,0,0,1]),this},rotate:function(t,e){var i=this.val,n=e.x,s=e.y,r=e.z,o=Math.sqrt(n*n+s*s+r*r);if(Math.abs(o)<1e-6)return null;n*=o=1/o,s*=o,r*=o;var a=Math.sin(t),h=Math.cos(t),l=1-h,u=i[0],c=i[1],d=i[2],f=i[3],p=i[4],g=i[5],v=i[6],m=i[7],y=i[8],x=i[9],T=i[10],w=i[11],b=n*n*l+h,E=s*n*l+r*a,S=r*n*l-s*a,A=n*s*l-r*a,_=s*s*l+h,C=r*s*l+n*a,M=n*r*l+s*a,P=s*r*l-n*a,O=r*r*l+h;return i[0]=u*b+p*E+y*S,i[1]=c*b+g*E+x*S,i[2]=d*b+v*E+T*S,i[3]=f*b+m*E+w*S,i[4]=u*A+p*_+y*C,i[5]=c*A+g*_+x*C,i[6]=d*A+v*_+T*C,i[7]=f*A+m*_+w*C,i[8]=u*M+p*P+y*O,i[9]=c*M+g*P+x*O,i[10]=d*M+v*P+T*O,i[11]=f*M+m*P+w*O,this},rotateX:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this},rotateY:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this},rotateZ:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this},fromRotationTranslation:function(t,e){var i=this.val,n=t.x,s=t.y,r=t.z,o=t.w,a=n+n,h=s+s,l=r+r,u=n*a,c=n*h,d=n*l,f=s*h,p=s*l,g=r*l,v=o*a,m=o*h,y=o*l;return i[0]=1-(f+g),i[1]=c+y,i[2]=d-m,i[3]=0,i[4]=c-y,i[5]=1-(u+g),i[6]=p+v,i[7]=0,i[8]=d+m,i[9]=p-v,i[10]=1-(u+f),i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this},fromQuat:function(t){var e=this.val,i=t.x,n=t.y,s=t.z,r=t.w,o=i+i,a=n+n,h=s+s,l=i*o,u=i*a,c=i*h,d=n*a,f=n*h,p=s*h,g=r*o,v=r*a,m=r*h;return e[0]=1-(d+p),e[1]=u+m,e[2]=c-v,e[3]=0,e[4]=u-m,e[5]=1-(l+p),e[6]=f+g,e[7]=0,e[8]=c+v,e[9]=f-g,e[10]=1-(l+d),e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},frustum:function(t,e,i,n,s,r){var o=this.val,a=1/(e-t),h=1/(n-i),l=1/(s-r);return o[0]=2*s*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=2*s*h,o[6]=0,o[7]=0,o[8]=(e+t)*a,o[9]=(n+i)*h,o[10]=(r+s)*l,o[11]=-1,o[12]=0,o[13]=0,o[14]=r*s*2*l,o[15]=0,this},perspective:function(t,e,i,n){var s=this.val,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this},perspectiveLH:function(t,e,i,n){var s=this.val;return s[0]=2*i/t,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=2*i/e,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=-n/(i-n),s[11]=1,s[12]=0,s[13]=0,s[14]=i*n/(i-n),s[15]=0,this},ortho:function(t,e,i,n,s,r){var o=this.val,a=t-e,h=i-n,l=s-r;return a=0===a?a:1/a,h=0===h?h:1/h,l=0===l?l:1/l,o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*l,o[15]=1,this},lookAt:function(t,e,i){var n=this.val,s=t.x,r=t.y,o=t.z,a=i.x,h=i.y,l=i.z,u=e.x,c=e.y,d=e.z;if(Math.abs(s-u)<1e-6&&Math.abs(r-c)<1e-6&&Math.abs(o-d)<1e-6)return this.identity();var f=s-u,p=r-c,g=o-d,v=1/Math.sqrt(f*f+p*p+g*g),m=h*(g*=v)-l*(p*=v),y=l*(f*=v)-a*g,x=a*p-h*f;(v=Math.sqrt(m*m+y*y+x*x))?(m*=v=1/v,y*=v,x*=v):(m=0,y=0,x=0);var T=p*x-g*y,w=g*m-f*x,b=f*y-p*m;return(v=Math.sqrt(T*T+w*w+b*b))?(T*=v=1/v,w*=v,b*=v):(T=0,w=0,b=0),n[0]=m,n[1]=T,n[2]=f,n[3]=0,n[4]=y,n[5]=w,n[6]=p,n[7]=0,n[8]=x,n[9]=b,n[10]=g,n[11]=0,n[12]=-(m*s+y*r+x*o),n[13]=-(T*s+w*r+b*o),n[14]=-(f*s+p*r+g*o),n[15]=1,this},yawPitchRoll:function(t,e,i){this.zero(),s.zero(),r.zero();var n=this.val,o=s.val,a=r.val,h=Math.sin(i),l=Math.cos(i);return n[10]=1,n[15]=1,n[0]=l,n[1]=h,n[4]=-h,n[5]=l,h=Math.sin(e),l=Math.cos(e),o[0]=1,o[15]=1,o[5]=l,o[10]=l,o[9]=-h,o[6]=h,h=Math.sin(t),l=Math.cos(t),a[5]=1,a[15]=1,a[0]=l,a[2]=-h,a[8]=h,a[10]=l,this.multiplyLocal(s),this.multiplyLocal(r),this},setWorldMatrix:function(t,e,i,n,o){return this.yawPitchRoll(t.y,t.x,t.z),s.scaling(i.x,i.y,i.z),r.xyz(e.x,e.y,e.z),this.multiplyLocal(s),this.multiplyLocal(r),void 0!==n&&this.multiplyLocal(n),void 0!==o&&this.multiplyLocal(o),this}}),s=new n,r=new n;t.exports=n},function(t,e,i){var n=i(0),s=i(171),r=i(317),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new s(1,0,0),l=new s(0,1,0),u=new s,c=new r,d=new n({initialize:function(t,e,i,n){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(u.copy(h).cross(t).length()<1e-6&&u.copy(l).cross(t),u.normalize(),this.setAxisAngle(u,Math.PI)):i>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(u.copy(t).cross(e),this.x=u.x,this.y=u.y,this.z=u.z,this.w=1+i,this.normalize())},setAxes:function(t,e,i){var n=c.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.x=i*t.x,this.y=i*t.y,this.z=i*t.z,this.w=Math.cos(e),this},multiply:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.x=e*h+s*r+i*a-n*o,this.y=i*h+s*o+n*r-e*a,this.z=n*h+s*a+e*o-i*r,this.w=s*h-e*r-i*o-n*a,this},slerp:function(t,e){var i=this.x,n=this.y,s=this.z,r=this.w,o=t.x,a=t.y,h=t.z,l=t.w,u=i*o+n*a+s*h+r*l;u<0&&(u=-u,o=-o,a=-a,h=-h,l=-l);var c=1-e,d=e;if(1-u>1e-6){var f=Math.acos(u),p=Math.sin(f);c=Math.sin((1-e)*f)/p,d=Math.sin(e*f)/p}return this.x=c*i+d*o,this.y=c*n+d*a,this.z=c*s+d*h,this.w=c*r+d*l,this},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n,r=s?1/s:0;return this.x=-t*r,this.y=-e*r,this.z=-i*r,this.w=n*r,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+s*r,this.y=i*o+n*r,this.z=n*o-i*r,this.w=s*o-e*r,this},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o-n*r,this.y=i*o+s*r,this.z=n*o+e*r,this.w=s*o-i*r,this},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+i*r,this.y=i*o-e*r,this.z=n*o+s*r,this.w=s*o-n*r,this},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this.x=(i[7]-i[5])*e,this.y=(i[2]-i[6])*e,this.z=(i[3]-i[1])*e;else{var s=0;i[4]>i[0]&&(s=1),i[8]>i[3*s+s]&&(s=2);var r=o[s],h=o[r];e=Math.sqrt(i[3*s+s]-i[3*r+r]-i[3*h+h]+1),a[s]=.5*e,e=.5/e,a[r]=(i[3*r+s]+i[3*s+r])*e,a[h]=(i[3*h+s]+i[3*s+h])*e,this.x=a[0],this.y=a[1],this.z=a[2],this.w=(i[3*h+r]-i[3*r+h])*e}return this}});t.exports=d},function(t,e,i){var n=i(321),s=i(26),r=i(29),o=i(165);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===r.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==r.HEADLESS)if(e.renderType===r.CANVAS||e.renderType!==r.CANVAS&&!o.webGL){if(!o.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");e.renderType=r.CANVAS}else e.renderType=r.WEBGL;e.antialias||s.disableSmoothing();var a,h,l=t.scale.baseSize,u=l.width,c=l.height;e.canvas?(t.canvas=e.canvas,t.canvas.width=u,t.canvas.height=c):t.canvas=s.create(t,u,c,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||n.setCrisp(t.canvas),e.renderType!==r.HEADLESS&&(a=i(485),h=i(488),e.renderType===r.WEBGL?t.renderer=new h(t):(t.renderer=new a(t),t.context=t.renderer.gameContext))}},function(t,e){t.exports={setCrisp:function(t){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach(function(e){t.style["image-rendering"]=e}),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},function(t,e,i){var n=i(29);t.exports=function(t){var e=t.config;if(!e.hideBanner){var i="WebGL";e.renderType===n.CANVAS?i="Canvas":e.renderType===n.HEADLESS&&(i="Headless");var s,r=e.audio,o=t.device.audio;if(s=!o.webAudio||r&&r.disableWebAudio?r&&r.noAudio||!o.webAudio&&!o.audioData?"No Audio":"HTML5 Audio":"Web Audio",t.device.browser.ie)window.console&&console.log("Phaser v"+n.VERSION+" / https://phaser.io");else{var a,h="",l=[h];Array.isArray(e.bannerBackgroundColor)?(e.bannerBackgroundColor.forEach(function(t){h=h.concat("%c "),l.push("background: "+t),a=t}),l[l.length-1]="color: "+e.bannerTextColor+"; background: "+a):(h=h.concat("%c "),l.push("color: "+e.bannerTextColor+"; background: "+e.bannerBackgroundColor)),l.push("background: #fff"),e.gameTitle&&(h=h.concat(e.gameTitle),e.gameVersion&&(h=h.concat(" v"+e.gameVersion)),e.hidePhaser||(h=h.concat(" / "))),e.hidePhaser||(h=h.concat("Phaser v"+n.VERSION+" ("+i+" | "+s+")")),h=h.concat(" %c "+e.gameURL),l[0]=h,console.log.apply(console,l)}}}},function(t,e,i){var n=i(0),s=i(6),r=i(1),o=i(324),a=new n({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=s(e,"min",5),this.targetFps=s(e,"target",60),this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=r,this.forceSetTimeOut=s(e,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=s(e,"deltaHistory",10),this.panicMax=s(e,"panicMax",120),this.rawDelta=0,this.now=0},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var t=window.performance.now();this.time=t,this.lastTime=t,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0;for(var e=0;e0||!this.inFocus)&&(this._coolDown--,r=Math.min(r,this._target)),r>this._min&&(r=n[i],r=Math.min(r,this._min)),n[i]=r,this.deltaIndex++,this.deltaIndex>s&&(this.deltaIndex=0);for(var o=0,a=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t,this.frame++},tick:function(){this.step()},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running?this.sleep():t&&(this.startTime+=-this.lastTime+(this.lastTime+window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step()},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0,this.target=0;var t=this;this.step=function e(){var i=window.performance.now();t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.requestAnimationFrame(e)},this.stepTimeout=function e(){var i=Date.now(),n=Math.min(Math.max(2*t.target+t.tick-i,0),t.target);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,n)}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.target=i,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=s}});t.exports=r},function(t,e,i){var n=i(18);t.exports=function(t){var e,i=t.events;void 0!==document.hidden?e="visibilitychange":["webkit","moz","ms"].forEach(function(t){void 0!==document[t+"Hidden"]&&(document.hidden=function(){return document[t+"Hidden"]},e=t+"visibilitychange")});e&&document.addEventListener(e,function(t){document.hidden||"pause"===t.type?i.emit(n.HIDDEN):i.emit(n.VISIBLE)},!1),window.onblur=function(){i.emit(n.BLUR)},window.onfocus=function(){i.emit(n.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},function(t,e,i){var n=i(327),s=i(26),r=i(6);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",n),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),l=r(t,"resizeCanvas",!0),u=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),f=Math.floor(Math.abs(e[0].length*a)),p=Math.floor(Math.abs(e.length*h));i||(i=s.create2D(this,f,p),l=!1,u=!1),l&&(i.width=f,i.height=p);var g=i.getContext("2d");u&&g.clearRect(0,0,f,p),c&&c(i,g);for(var v=0;vi;)n-=i;ni.length-2?i.length-1:r+1],c=i[r>i.length-3?i.length-1:r+2];return e.set(n(a,h.x,l.x,u.x,c.x),n(a,h.y,l.y,u.y,c.y))},toJSON:function(){for(var t=[],e=0;e1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}},function(t,e,i){var n=i(114);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?n.cordova?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},function(t,e,i){var n=i(174);t.exports=function(t,e){var i=window.screen,s=!!i&&(i.orientation||i.mozOrientation||i.msOrientation);if(s&&"string"==typeof s.type)return s.type;if("string"==typeof s)return s;if(i)return i.height>i.width?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE;if("number"==typeof window.orientation)return 0===window.orientation||180===window.orientation?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return n.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return n.ORIENTATION.LANDSCAPE}return e>t?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE}},function(t,e){t.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},function(t,e){t.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},function(t,e){t.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5}},function(t,e){t.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},function(t,e){t.exports=function(t){var e;return""!==t&&("string"==typeof t?e=document.getElementById(t):t&&1===t.nodeType&&(e=t)),e||(e=document.body),e}},function(t,e){t.exports=function(t){var e="";try{window.DOMParser?e=(new DOMParser).parseFromString(t,"text/xml"):(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},function(t,e,i){var n=i(0),s=i(176),r=i(9),o=i(53),a=i(18),h=i(346),l=i(347),u=i(348),c=i(349),d=i(32),f=i(315),p=new n({initialize:function(t,e){this.game=t,this.scaleManager,this.canvas,this.config=e,this.enabled=!0,this.events=new r,this.isOver=!0,this.defaultCursor="",this.keyboard=e.inputKeyboard?new h(this):null,this.mouse=e.inputMouse?new l(this):null,this.touch=e.inputTouch?new c(this):null,this.pointers=[],this.pointersTotal=e.inputActivePointers,e.inputTouch&&1===this.pointersTotal&&(this.pointersTotal=2);for(var i=0;i<=this.pointersTotal;i++){var n=new u(this,i);n.smoothFactor=e.inputSmoothFactor,this.pointers.push(n)}this.mousePointer=e.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new d,this._tempMatrix2=new d,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],t.events.once(a.BOOT,this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.scaleManager=this.game.scale,this.events.emit(o.MANAGER_BOOT),this.game.events.on(a.PRE_RENDER,this.preRender,this),this.game.events.once(a.DESTROY,this.destroy,this)},setCanvasOver:function(t){this.isOver=!0,this.events.emit(o.GAME_OVER,t)},setCanvasOut:function(t){this.isOver=!1,this.events.emit(o.GAME_OUT,t)},preRender:function(){var t=this.game.loop.now,e=this.game.loop.delta,i=this.game.scene.getScenes(!0,!0);this.time=t,this.events.emit(o.MANAGER_UPDATE);for(var n=0;n10&&(t=10-this.pointersTotal);for(var i=0;i-1&&e.preventDefault()}},this.onKeyUp=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.useQueue||t.manager.events.emit(o.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}};var e=this.target;e&&(e.addEventListener("keydown",this.onKeyDown,!1),e.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var t=this.target;t.removeEventListener("keydown",this.onKeyDown,!1),t.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},removeCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(r.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});t.exports=l},function(t,e,i){var n=i(0),s=i(165),r=i(53),o=i(0),a=new n({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=o,this.onMouseDown=o,this.onMouseUp=o,this.onMouseDownWindow=o,this.onMouseUpWindow=o,this.onMouseOver=o,this.onMouseOut=o,this.onMouseWheel=o,this.pointerLockChange=o,t.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.capture=t.inputMouseCapture,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return document.body.addEventListener("contextmenu",function(t){return t.preventDefault(),!1}),this},requestPointerLock:function(){if(s.pointerLock){var t=this.target;t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock()}},releasePointerLock:function(){s.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t=this,e=this.manager.canvas,i=window&&window.focus&&this.manager.game.config.autoFocus;this.onMouseMove=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onMouseMove(e),t.capture&&e.preventDefault())},this.onMouseDown=function(n){i&&window.focus(),!n.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onMouseDown(n),t.capture&&n.target===e&&n.preventDefault())},this.onMouseDownWindow=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&i.target!==e&&t.manager.onMouseDown(i)},this.onMouseUp=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onMouseUp(i),t.capture&&i.target===e&&i.preventDefault())},this.onMouseUpWindow=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&i.target!==e&&t.manager.onMouseUp(i)},this.onMouseOver=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.setCanvasOver(e)},this.onMouseOut=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.setCanvasOut(e)},this.onMouseWheel=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.onMouseWheel(e)};var n=this.target;if(n){var r={passive:!0},o={passive:!1};n.addEventListener("mousemove",this.onMouseMove,this.capture?o:r),n.addEventListener("mousedown",this.onMouseDown,this.capture?o:r),n.addEventListener("mouseup",this.onMouseUp,this.capture?o:r),n.addEventListener("mouseover",this.onMouseOver,this.capture?o:r),n.addEventListener("mouseout",this.onMouseOut,this.capture?o:r),n.addEventListener("wheel",this.onMouseWheel,this.capture?o:r),window&&this.manager.game.config.inputWindowEvents&&(window.addEventListener("mousedown",this.onMouseDownWindow,o),window.addEventListener("mouseup",this.onMouseUpWindow,o)),s.pointerLock&&(this.pointerLockChange=function(e){var i=t.target;t.locked=document.pointerLockElement===i||document.mozPointerLockElement===i||document.webkitPointerLockElement===i,t.manager.onPointerLockChange(e)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("mouseover",this.onMouseOver),t.removeEventListener("mouseout",this.onMouseOut),window&&(window.removeEventListener("mousedown",this.onMouseDownWindow),window.removeEventListener("mouseup",this.onMouseUpWindow)),s.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=a},function(t,e,i){var n=i(300),s=i(0),r=i(58),o=i(167),a=i(309),h=i(3),l=new s({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new h,this.prevPosition=new h,this.midPoint=new h(-1,-1),this.velocity=new h,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=0===e,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(t){var e=this.x,i=this.y;1!==t.resolution&&(e+=t._x,i+=t._y);var n=t.getWorldPoint(e,i);return this.worldX=n.x,this.worldY=n.y,this},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},updateMotion:function(){var t=this.position.x,e=this.position.y,i=this.midPoint.x,s=this.midPoint.y;if(t!==i||e!==s){var r=a(this.motionFactor,i,t),h=a(this.motionFactor,s,e);o(r,t,.1)&&(r=t),o(h,e,.1)&&(h=e),this.midPoint.set(r,h);var l=t-r,u=e-h;this.velocity.set(l,u),this.angle=n(r,h,t,e),this.distance=Math.sqrt(l*l+u*u)}},up:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=t.timeStamp),this.isDown=!1,this.wasTouch=!1},down:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=t.timeStamp),this.isDown=!0,this.wasTouch=!1},move:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.locked&&(this.movementX=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.movementY=t.movementY||t.mozMovementY||t.webkitMovementY||0),this.moveTime=t.timeStamp,this.wasTouch=!1},wheel:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.deltaX=t.deltaX,this.deltaY=t.deltaY,this.deltaZ=t.deltaZ,this.wasTouch=!1},touchstart:function(t,e){t.pointerId&&(this.pointerId=t.pointerId),this.identifier=t.identifier,this.target=t.target,this.active=!0,this.buttons=1,this.event=e,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(t,e){this.event=e,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.moveTime=e.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return!!(1&this.buttons)},rightButtonDown:function(){return!!(2&this.buttons)},middleButtonDown:function(){return!!(4&this.buttons)},backButtonDown:function(){return!!(8&this.buttons)},forwardButtonDown:function(){return!!(16&this.buttons)},leftButtonReleased:function(){return 0===this.button&&!this.isDown},rightButtonReleased:function(){return 2===this.button&&!this.isDown},middleButtonReleased:function(){return 1===this.button&&!this.isDown},backButtonReleased:function(){return 3===this.button&&!this.isDown},forwardButtonReleased:function(){return 4===this.button&&!this.isDown},getDistance:function(){return this.isDown?r(this.downX,this.downY,this.x,this.y):r(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?n(this.downX,this.downY,this.x,this.y):n(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(t,e){void 0===t&&(t=10),void 0===e&&(e=[]);for(var i=this.prevPosition.x,n=this.prevPosition.y,s=this.position.x,r=this.position.y,o=0;o0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),t.events.on(a.PRE_STEP,this.step,this),this.startListeners()},parseConfig:function(t){this.getParent(t),this.getParentBounds();var e=t.width,i=t.height,s=t.scaleMode,r=t.resolution,o=t.zoom,a=t.autoRound;if("string"==typeof e){var h=this.parentSize.width;0===h&&(h=window.innerWidth);var l=parseInt(e,10)/100;e=Math.floor(h*l)}if("string"==typeof i){var c=this.parentSize.height;0===c&&(c=window.innerHeight);var d=parseInt(i,10)/100;i=Math.floor(c*d)}this.resolution=1,this.scaleMode=s,this.autoRound=a,this.autoCenter=t.autoCenter,this.resizeInterval=t.resizeInterval,a&&(e=Math.floor(e),i=Math.floor(i)),this.gameSize.setSize(e,i),o===n.ZOOM.MAX_ZOOM&&(o=this.getMaxZoom()),this.zoom=o,1!==o&&(this._resetZoom=!0),this.baseSize.setSize(e*r,i*r),a&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),t.minWidth>0&&this.displaySize.setMin(t.minWidth*o,t.minHeight*o),t.maxWidth>0&&this.displaySize.setMax(t.maxWidth*o,t.maxHeight*o),this.displaySize.setSize(e,i),this.orientation=u(e,i)},getParent:function(t){var e=t.parent;if(null!==e){if(this.parent=l(e),this.parentIsWindow=this.parent===document.body,t.expandParent&&t.scaleMode!==n.SCALE_MODE.NONE){var i=this.parent.getBoundingClientRect();(this.parentIsWindow||0===i.height)&&(document.documentElement.style.height="100%",document.body.style.height="100%",i=this.parent.getBoundingClientRect(),this.parentIsWindow||0!==i.height||(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}t.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=l(t.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var t=this.parentSize,e=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(e.height=h(!0));var i=this.resolution,n=e.width*i,s=e.height*i;return(t.width!==n||t.height!==s)&&(t.setSize(n,s),!0)},lockOrientation:function(t){var e=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return!!e&&e(t)},setParentSize:function(t,e){return this.parentSize.setSize(t,e),this.refresh()},setGameSize:function(t,e){var i=this.autoRound,n=this.resolution;i&&(t=Math.floor(t),e=Math.floor(e));var s=this.width,r=this.height;return this.gameSize.resize(t,e),this.baseSize.resize(t*n,e*n),i&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(t,e),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(s,r)},resize:function(t,e){var i=this.zoom,n=this.resolution,s=this.autoRound;s&&(t=Math.floor(t),e=Math.floor(e));var r=this.width,o=this.height;this.gameSize.resize(t,e),this.baseSize.resize(t*n,e*n),s&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(t*i*n,e*i*n),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var a=this.canvas.style,h=t*i,l=e*i;return s&&(h=Math.floor(h),l=Math.floor(l)),h===t&&l===e||(a.width=h+"px",a.height=l+"px"),this.refresh(r,o)},setZoom:function(t){return this.zoom=t,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},refresh:function(t,e){void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var i=this.game.domContainer;if(i){this.baseSize.setCSS(i);var n=this.canvas.style,s=i.style;s.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",s.marginLeft=n.marginLeft,s.marginTop=n.marginTop}return this.emit(o.RESIZE,this.gameSize,this.baseSize,this.displaySize,this.resolution,t,e),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var t=u(this.width,this.height);t!==this.orientation&&(this.orientation=t,this.emit(o.ORIENTATION_CHANGE,t))}},updateScale:function(){var t,e,i=this.canvas.style,s=this.gameSize.width,r=this.gameSize.height,o=this.zoom,a=this.autoRound;this.scaleMode===n.SCALE_MODE.NONE?(this.displaySize.setSize(s*o*1,r*o*1),t=this.displaySize.width/1,e=this.displaySize.height/1,a&&(t=Math.floor(t),e=Math.floor(e)),this._resetZoom&&(i.width=t+"px",i.height=e+"px",this._resetZoom=!1)):this.scaleMode===n.SCALE_MODE.RESIZE?(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(1*this.displaySize.width,1*this.displaySize.height),t=this.displaySize.width/1,e=this.displaySize.height/1,a&&(t=Math.floor(t),e=Math.floor(e)),this.canvas.width=t,this.canvas.height=e):(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),t=this.displaySize.width/1,e=this.displaySize.height/1,a&&(t=Math.floor(t),e=Math.floor(e)),i.width=t+"px",i.height=e+"px"),this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var t=p(this.parentSize.width,this.gameSize.width,0,!0),e=p(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(t,e),1)},updateCenter:function(){var t=this.autoCenter;if(t!==n.CENTER.NO_CENTER){var e=this.canvas,i=e.style,s=e.getBoundingClientRect(),r=s.width,o=s.height,a=Math.floor((this.parentSize.width-r)/2),h=Math.floor((this.parentSize.height-o)/2);t===n.CENTER.CENTER_HORIZONTALLY?h=0:t===n.CENTER.CENTER_VERTICALLY&&(a=0),i.marginLeft=a+"px",i.marginTop=h+"px"}},updateBounds:function(){var t=this.canvasBounds,e=this.canvas.getBoundingClientRect();t.x=e.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),t.y=e.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),t.width=e.width,t.height=e.height},transformX:function(t){return(t-this.canvasBounds.left)*this.displayScale.x},transformY:function(t){return(t-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(t){void 0===t&&(t={navigationUI:"hide"});var e=this.fullscreen;if(e.available){if(!e.active){var i,n=this.getFullscreenTarget();this._requestedFullscreenChange=!0,(i=e.keyboard?n[e.request](Element.ALLOW_KEYBOARD_INPUT):n[e.request](t))?i.then(this.fullscreenSuccessHandler.bind(this)).catch(this.fullscreenErrorHandler.bind(this)):e.active?this.fullscreenSuccessHandler():this.fullscreenErrorHandler()}}else this.emit(o.FULLSCREEN_UNSUPPORTED)},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(o.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(t){this.removeFullscreenTarget(),this.emit(o.FULLSCREEN_FAILED,t)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var t=document.createElement("div");t.style.margin="0",t.style.padding="0",t.style.width="100%",t.style.height="100%",this.fullscreenTarget=t,this._createdFullscreenTarget=!0}this._createdFullscreenTarget&&(this.canvas.parentNode.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas));return this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var t=this.fullscreenTarget;if(t&&t.parentNode){var e=t.parentNode;e.insertBefore(this.canvas,t),e.removeChild(t)}}},stopFullscreen:function(){var t=this.fullscreen;if(!t.available)return this.emit(o.FULLSCREEN_UNSUPPORTED),!1;t.active&&(this._requestedFullscreenChange=!0,document[t.cancel]()),this.removeFullscreenTarget(),this.getParentBounds(),this.emit(o.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(t){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(t)},startListeners:function(){var t=this,e=this.listeners;if(e.orientationChange=function(){t._checkOrientation=!0,t.dirty=!0},e.windowResize=function(){t.dirty=!0},window.addEventListener("orientationchange",e.orientationChange,!1),window.addEventListener("resize",e.windowResize,!1),this.fullscreen.available){e.fullScreenChange=function(e){return t.onFullScreenChange(e)},e.fullScreenError=function(e){return t.onFullScreenError(e)};["webkit","moz",""].forEach(function(t){document.addEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.addEventListener(t+"fullscreenerror",e.fullScreenError,!1)}),document.addEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.addEventListener("MSFullscreenError",e.fullScreenError,!1)}},onFullScreenChange:function(){this._requestedFullscreenChange||this.stopFullscreen(),this._requestedFullscreenChange=!1},onFullScreenError:function(){this.removeFullscreenTarget()},step:function(t,e){this.parent&&(this._lastCheck+=e,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var t=this.listeners;window.removeEventListener("orientationchange",t.orientationChange,!1),window.removeEventListener("resize",t.windowResize,!1);["webkit","moz",""].forEach(function(e){document.removeEventListener(e+"fullscreenchange",t.fullScreenChange,!1),document.removeEventListener(e+"fullscreenerror",t.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",t.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",t.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===n.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===n.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=v},function(t,e,i){var n=i(23),s=i(0),r=i(93),o=i(3),a=new s({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=null),this._width=t,this._height=e,this._parent=n,this.aspectMode=i,this.aspectRatio=0===e?1:t/e,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new o},setAspectMode:function(t){return void 0===t&&(t=0),this.aspectMode=t,this.setSize(this._width,this._height)},setSnap:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.snapTo.set(t,e),this.setSize(this._width,this._height)},setParent:function(t){return this._parent=t,this.setSize(this._width,this._height)},setMin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.minWidth=n(t,0,this.maxWidth),this.minHeight=n(e,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(t,e){return void 0===t&&(t=Number.MAX_VALUE),void 0===e&&(e=t),this.maxWidth=n(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=n(e,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(t,e){switch(void 0===t&&(t=0),void 0===e&&(e=t),this.aspectMode){case a.NONE:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case a.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case a.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(r(e,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case a.FIT:this.constrain(t,e,!0);break;case a.ENVELOP:this.constrain(t,e,!1)}return this},setAspectRatio:function(t){return this.aspectRatio=t,this.setSize(this._width,this._height)},resize:function(t,e){return this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minWidth,this.maxWidth),e&&this._parent&&t>this._parent.width&&(t=Math.max(this.minWidth,this._parent.width)),t},getNewHeight:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minHeight,this.maxHeight),e&&this._parent&&t>this._parent.height&&(t=Math.max(this.minHeight,this._parent.height)),t},constrain:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=!0),t=this.getNewWidth(t),e=this.getNewHeight(e);var n=this.snapTo,s=0===e?1:t/e;return i&&this.aspectRatio>s||!i&&this.aspectRatio0&&(t=(e=r(e,n.y))*this.aspectRatio)):(i&&this.aspectRatios)&&(t=(e=r(e,n.y))*this.aspectRatio,n.x>0&&(e=(t=r(t,n.x))*(1/this.aspectRatio))),this._width=t,this._height=e,this},fitTo:function(t,e){return this.constrain(t,e,!0)},envelop:function(t,e){return this.constrain(t,e,!1)},setWidth:function(t){return this.setSize(t,this._height)},setHeight:function(t){return this.setSize(this._width,t)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(t){t&&t.style&&(t.style.width=this._width+"px",t.style.height=this._height+"px")},copy:function(t){return t.setAspectMode(this.aspectMode),t.aspectRatio=this.aspectRatio,t.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(t){this.setSize(t,this._height)}},height:{get:function(){return this._height},set:function(t){this.setSize(this._width,t)}}});a.NONE=0,a.WIDTH_CONTROLS_HEIGHT=1,a.HEIGHT_CONTROLS_WIDTH=2,a.FIT=3,a.ENVELOP=4,t.exports=a},function(t,e,i){var n=i(0),s=i(121),r=i(22),o=i(18),a=i(6),h=i(81),l=i(1),u=i(354),c=i(177),d=new n({initialize:function(t,e){if(this.game=t,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,e){Array.isArray(e)||(e=[e]);for(var i=0;i-1&&(delete this.keys[n],this.scenes.splice(i,1),this._start.indexOf(n)>-1&&(i=this._start.indexOf(n),this._start.splice(i,1)),e.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,n=i.settings;t.init&&(t.init.call(t,n.data),n.status=s.INIT,n.isTransition&&i.events.emit(r.TRANSITION_INIT,n.transitionFrom,n.transitionDuration)),i.load&&(e=i.load).reset(),e&&t.preload?(t.preload.call(t),0===e.list.size?this.create(t):(n.status=s.LOADING,e.once(h.COMPLETE,this.loadComplete,this),e.start())):this.create(t)},loadComplete:function(t){var e=t.scene;this.game.sound&&this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(e)},payloadComplete:function(t){this.bootScene(t.scene)},update:function(t,e){this.processQueue(),this.isProcessing=!0;for(var i=this.scenes.length-1;i>=0;i--){var n=this.scenes[i].sys;n.settings.status>s.START&&n.settings.status<=s.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e=s.LOADING&&i.settings.status0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,n=this.getScene(t),s=this.getAt(i);this.scenes[e]=s,this.scenes[i]=n}}return this},moveUp:function(t){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e=r.x&&t=r.y&&e=r.x&&t=r.y&&e-1){var o=this.context.getImageData(t,e,1,1);o.data[0]=i,o.data[1]=n,o.data[2]=s,o.data[3]=r,this.context.putImageData(o,t,e)}return this},putData:function(t,e,i,n,s,r,o){return void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=t.width),void 0===o&&(o=t.height),this.context.putImageData(t,e,i,n,s,r,o),this},getData:function(t,e,i,n){return t=s(Math.floor(t),0,this.width-1),e=s(Math.floor(e),0,this.height-1),i=s(i,1,this.width-t),n=s(n,1,this.height-e),this.context.getImageData(t,e,i,n)},getPixel:function(t,e,i){i||(i=new r);var n=this.getIndex(t,e);if(n>-1){var s=this.data,o=s[n+0],a=s[n+1],h=s[n+2],l=s[n+3];i.setTo(o,a,h,l)}return i},getPixels:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=i),t=Math.abs(Math.round(t)),e=Math.abs(Math.round(e));for(var o=s(t,0,this.width),a=s(t+i,0,this.width),h=s(e,0,this.height),l=s(e+n,0,this.height),u=new r,c=[],d=h;d0)&&(!!n.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(r.PAUSE,this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!n.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit(r.RESUME,this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!n.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit(r.STOP,this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t0)this.startTime=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s=n)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit(r.COMPLETE,this);this.previousTime=s}},destroy:function(){n.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=this.currentConfig.volume*this.manager.volume)},calculateRate:function(){n.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.updateMute(),this.emit(r.MUTE,this,t))}},setMute:function(t){return this.mute=t,this},volume:{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.updateVolume(),this.emit(r.VOLUME,this,t))}},setVolume:function(t){return this.volume=t,this},rate:{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,r.RATE,t)||(this.calculateRate(),this.emit(r.RATE,this,t))}},setRate:function(t){return this.rate=t,this},detune:{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,r.DETUNE,t)||(this.calculateRate(),this.emit(r.DETUNE,this,t))}},setDetune:function(t){return this.detune=t,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit(r.SEEK,this,t))}},setSeek:function(t){return this.seek=t,this},loop:{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit(r.LOOP,this,t))}},setLoop:function(t){return this.loop=t,this}});t.exports=o},function(t,e,i){var n=i(122),s=i(0),r=i(9),o=i(364),a=i(1),h=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return n.prototype.remove.call(this,t)},removeByKey:function(t){return n.prototype.removeByKey.call(this,t)},pauseAll:a,resumeAll:a,stopAll:a,update:a,setRate:a,setDetune:a,setMute:a,setVolume:a,forEachActiveSound:function(t,e){n.prototype.forEachActiveSound.call(this,t,e)},destroy:function(){n.prototype.destroy.call(this)}});t.exports=h},function(t,e,i){var n=i(123),s=i(0),r=i(9),o=i(17),a=new s({Extends:r,initialize:function(t,e,i){void 0===i&&(i={}),r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!1},updateMarker:function(t){return!1},removeMarker:function(t){return null},play:function(t,e){return!1},pause:function(){return!1},resume:function(){return!1},stop:function(){return!1},destroy:function(){this.manager.remove(this),n.prototype.destroy.call(this)}});t.exports=a},function(t,e,i){var n=i(366),s=i(122),r=i(0),o=i(59),a=i(367),h=new r({Extends:s,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&("ontouchstart"in window||"onclick"in window),s.call(this,t),this.locked&&this.unlock()},createAudioContext:function(t){var e=t.config.audio;return e&&e.context?(e.context.resume(),e.context):new AudioContext},setAudioContext:function(t){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=t,this.masterMuteNode=t.createGain(),this.masterVolumeNode=t.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(t.destination),this.destination=this.masterMuteNode,this},add:function(t,e){var i=new a(this,t,e);return this.sounds.push(i),i},decodeAudio:function(t,e){var i;i=Array.isArray(t)?t:[{key:t,data:e}];for(var s=this.game.cache.audio,r=i.length,a=0;a>4,u[h++]=(15&i)<<4|s>>2,u[h++]=(3&s)<<6|63&r;return l}},function(t,e,i){var n=i(123),s=i(0),r=i(59),o=new s({Extends:n,initialize:function(t,e,i){void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),this.audioBuffer?(this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,n.call(this,t,e,i)):console.warn("Audio cache entry missing: "+e)},play:function(t,e){return!!n.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime-1;r--)n[s][r]=t[r][s]}return n}},function(t,e){function i(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function n(t,e){return te?1:0}var s=function(t,e,r,o,a){for(void 0===r&&(r=0),void 0===o&&(o=t.length-1),void 0===a&&(a=n);o>r;){if(o-r>600){var h=o-r+1,l=e-r+1,u=Math.log(h),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),f=Math.max(r,Math.floor(e-l*c/h+d)),p=Math.min(o,Math.floor(e+(h-l)*c/h+d));s(t,e,f,p,a)}var g=t[e],v=r,m=o;for(i(t,r,e),a(t[o],g)>0&&i(t,r,o);v0;)m--}0===a(t[r],g)?i(t,r,m):i(t,++m,o),m<=e&&(r=m+1),e<=m&&(o=m-1)}};t.exports=s},function(t,e,i){var n=i(6),s=i(112),r=function(t,e,i){for(var n=[],s=0;s0?s.delayedPlay(d,r,o):s.load(r)}return t}},function(t,e,i){var n=i(11);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=Math.min(t.x,e.x),r=Math.min(t.y,e.y),o=Math.max(t.right,e.right)-s,a=Math.max(t.bottom,e.bottom)-r;return i.setTo(s,r,o,a)}},function(t,e,i){var n=i(0),s=i(12),r=i(939),o=i(14),a=i(7),h=i(175),l=i(316),u=new n({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.ScrollFactor,s.Transform,s.Visible,r],initialize:function(t,e,i,n,s,r){o.call(this,t,"DOMElement"),this.parent=t.sys.game.domContainer,this.cache=t.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new l,this.rotate3dAngle="deg",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(e,i),"string"==typeof n?"#"===n[0]?this.setElement(n.substr(1),s,r):this.createElement(n,s,r):n&&this.setElement(n,s,r)},setSkew:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.skewX=t,this.skewY=e,this},setPerspective:function(t){return this.parent.style.perspective=t+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(t){this.parent.style.perspective=t+"px"}},addListener:function(t){if(this.node){t=t.split(" ");for(var e=0;e>>16,y=(65280&p)>>>8,x=255&p,c.strokeStyle="rgba("+m+","+y+","+x+","+d+")",c.lineWidth=v,T+=3;break;case n.FILL_STYLE:g=l[T+1],f=l[T+2],m=(16711680&g)>>>16,y=(65280&g)>>>8,x=255&g,c.fillStyle="rgba("+m+","+y+","+x+","+f+")",T+=2;break;case n.BEGIN_PATH:c.beginPath();break;case n.CLOSE_PATH:c.closePath();break;case n.FILL_PATH:h||c.fill();break;case n.STROKE_PATH:h||c.stroke();break;case n.FILL_RECT:h?c.rect(l[T+1],l[T+2],l[T+3],l[T+4]):c.fillRect(l[T+1],l[T+2],l[T+3],l[T+4]),T+=4;break;case n.FILL_TRIANGLE:c.beginPath(),c.moveTo(l[T+1],l[T+2]),c.lineTo(l[T+3],l[T+4]),c.lineTo(l[T+5],l[T+6]),c.closePath(),h||c.fill(),T+=6;break;case n.STROKE_TRIANGLE:c.beginPath(),c.moveTo(l[T+1],l[T+2]),c.lineTo(l[T+3],l[T+4]),c.lineTo(l[T+5],l[T+6]),c.closePath(),h||c.stroke(),T+=6;break;case n.LINE_TO:c.lineTo(l[T+1],l[T+2]),T+=2;break;case n.MOVE_TO:c.moveTo(l[T+1],l[T+2]),T+=2;break;case n.LINE_FX_TO:c.lineTo(l[T+1],l[T+2]),T+=5;break;case n.MOVE_FX_TO:c.moveTo(l[T+1],l[T+2]),T+=5;break;case n.SAVE:c.save();break;case n.RESTORE:c.restore();break;case n.TRANSLATE:c.translate(l[T+1],l[T+2]),T+=2;break;case n.SCALE:c.scale(l[T+1],l[T+2]),T+=2;break;case n.ROTATE:c.rotate(l[T+1]),T+=1;break;case n.GRADIENT_FILL_STYLE:T+=5;break;case n.GRADIENT_LINE_STYLE:T+=6;break;case n.SET_TEXTURE:T+=2}c.restore()}}},function(t,e,i){var n=i(0),s=i(2),r=new n({initialize:function(t,e,i,n,r){if("object"==typeof t){var o=t;t=s(o,"x",0),e=s(o,"y",0),i=s(o,"power",0),n=s(o,"epsilon",100),r=s(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i=this.x-t.x,n=this.y-t.y,s=i*i+n*n;if(0!==s){var r=Math.sqrt(s);s0},resetPosition:function(){this.x=0,this.y=0},fire:function(t,e){var i=this.emitter;this.frame=i.getFrame(),i.emitZone&&i.emitZone.getPoint(this),void 0===t?(i.follow&&(this.x+=i.follow.x+i.followOffset.x),this.x+=i.x.onEmit(this,"x")):this.x+=t,void 0===e?(i.follow&&(this.y+=i.follow.y+i.followOffset.y),this.y+=i.y.onEmit(this,"y")):this.y+=e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var n=i.speedX.onEmit(this,"speedX"),o=i.speedY?i.speedY.onEmit(this,"speedY"):n;if(i.radial){var a=s(i.angle.onEmit(this,"angle"));this.velocityX=Math.cos(a)*Math.abs(n),this.velocityY=Math.sin(a)*Math.abs(o)}else if(i.moveTo){var h=i.moveToX.onEmit(this,"moveToX"),l=i.moveToY?i.moveToY.onEmit(this,"moveToY"):h,u=Math.atan2(l-this.y,h-this.x),c=r(this.x,this.y,h,l)/(this.life/1e3);this.velocityX=Math.cos(u)*c,this.velocityY=Math.sin(u)*c}else this.velocityX=n,this.velocityY=o;i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY?i.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=s(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint")},computeVelocity:function(t,e,i,n){var s=this.velocityX,r=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,l=this.maxVelocityY;s+=t.gravityX*i,r+=t.gravityY*i,o&&(s+=o*i),a&&(r+=a*i),s>h?s=h:s<-h&&(s=-h),r>l?r=l:r<-l&&(r=-l),this.velocityX=s,this.velocityY=r;for(var u=0;ue.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(this.delayCurrent>0)return this.delayCurrent-=t,!1;var n=this.emitter,r=1-this.lifeCurrent/this.life;return this.lifeT=r,this.computeVelocity(n,t,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,n.bounds&&this.checkBounds(n),n.deathZone&&n.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=n.scaleX.onUpdate(this,"scaleX",r,this.scaleX),n.scaleY?this.scaleY=n.scaleY.onUpdate(this,"scaleY",r,this.scaleY):this.scaleY=this.scaleX,this.angle=n.rotate.onUpdate(this,"rotate",r,this.angle),this.rotation=s(this.angle),this.alpha=n.alpha.onUpdate(this,"alpha",r,this.alpha),this.tint=n.tint.onUpdate(this,"tint",r,this.tint),this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=o},function(t,e,i){var n=i(52),s=i(0),r=i(12),o=i(383),a=i(384),h=i(956),l=i(2),u=i(182),c=i(385),d=i(99),f=i(381),p=i(386),g=i(11),v=i(126),m=i(3),y=i(57),x=new s({Mixins:[r.BlendMode,r.Mask,r.ScrollFactor,r.Visible],initialize:function(t,e){this.manager=t,this.texture=t.texture,this.frames=[t.defaultFrame],this.defaultFrame=t.defaultFrame,this.configFastMap=["active","blendMode","collideBottom","collideLeft","collideRight","collideTop","deathCallback","deathCallbackScope","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxParticles","name","on","particleBringToTop","particleClass","radial","timeScale","trackVisible","visible"],this.configOpMap=["accelerationX","accelerationY","angle","alpha","bounce","delay","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],this.name="",this.particleClass=f,this.x=new h(e,"x",0,!0),this.y=new h(e,"y",0,!0),this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.accelerationX=new h(e,"accelerationX",0,!0),this.accelerationY=new h(e,"accelerationY",0,!0),this.maxVelocityX=new h(e,"maxVelocityX",1e4,!0),this.maxVelocityY=new h(e,"maxVelocityY",1e4,!0),this.speedX=new h(e,"speedX",0,!0),this.speedY=new h(e,"speedY",0,!0),this.moveTo=!1,this.moveToX=new h(e,"moveToX",0,!0),this.moveToY=new h(e,"moveToY",0,!0),this.bounce=new h(e,"bounce",0,!0),this.scaleX=new h(e,"scaleX",1),this.scaleY=new h(e,"scaleY",1),this.tint=new h(e,"tint",4294967295),this.alpha=new h(e,"alpha",1),this.lifespan=new h(e,"lifespan",1e3,!0),this.angle=new h(e,"angle",{min:0,max:360},!0),this.rotate=new h(e,"rotate",0),this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.quantity=new h(e,"quantity",1,!0),this.delay=new h(e,"delay",0,!0),this.frequency=0,this.on=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZone=null,this.deathZone=null,this.bounds=null,this.collideLeft=!0,this.collideRight=!0,this.collideTop=!0,this.collideBottom=!0,this.active=!0,this.visible=!0,this.blendMode=n.NORMAL,this.follow=null,this.followOffset=new m,this.trackVisible=!1,this.currentFrame=0,this.randomFrame=!0,this.frameQuantity=1,this.dead=[],this.alive=[],this._counter=0,this._frameCounter=0,e&&this.fromJSON(e)},fromJSON:function(t){if(!t)return this;var e=0,i="";for(e=0;e0&&this.getParticleCount()===this.maxParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,n=i.length,s=0;s0){var u=this.deathCallback,c=this.deathCallbackScope;for(o=h-1;o>=0;o--){var d=a[o];s.splice(d.index,1),r.push(d.particle),u&&u.call(c,d.particle),d.particle.resetPosition()}}this.on&&(0===this.frequency?this.emitParticle():this.frequency>0&&(this._counter-=e,this._counter<=0&&(this.emitParticle(),this._counter=this.frequency-Math.abs(this._counter))))},depthSortCallback:function(t,e){return t.y-e.y}});t.exports=x},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=this.source.contains(t.x,t.y);return e&&this.killOnEnter||!e&&!this.killOnEnter}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s){void 0===n&&(n=!1),void 0===s&&(s=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=s,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=n},function(t,e){t.exports=function(t,e){for(var i=0;i0&&(s=-h.PI2+s%h.PI2):s>h.PI2?s=h.PI2:s<0&&(s=h.PI2+s%h.PI2);for(var u,c=[a+Math.cos(n)*i,l+Math.sin(n)*i];e<1;)u=s*e+n,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),e+=t;return u=s+n,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),c.push(a+Math.cos(n)*i,l+Math.sin(n)*i),this.pathIndexes=o(c),this.pathData=c,this}});t.exports=u},function(t,e,i){var n=i(0),s=i(982),r=i(66),o=i(11),a=i(30),h=new n({Extends:a,Mixins:[s],initialize:function(t,e,i,n,s,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",n),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==s&&this.setFillStyle(s,r),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){var t=this._curveBounds,e=this._smoothness;this.geom.getBounds(t,e),this.setSize(t.width,t.height),this.updateDisplayOrigin();for(var i=[],n=this.geom.getPoints(e),s=0;sc+v)){var m=g.getPoint((u-c)/v);o.push(m);break}c+=v}return o}},function(t,e,i){var n=i(56),s=i(55);t.exports=function(t){for(var e=t.points,i=0,r=0;r0&&r.push(i([0,0],n[0])),e=0;e1&&r.push(i([0,0],n[n.length-1])),t.setTo(r)}},function(t,e,i){var n=i(0),s=i(11),r=i(30),o=i(1003),a=new n({Extends:r,Mixins:[o],initialize:function(t,e,i,n,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===o&&(o=128),r.call(this,t,"Rectangle",new s(0,0,n,o)),this.setPosition(e,i),this.setSize(n,o),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),e.getLineD(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=a},function(t,e,i){var n=i(1006),s=i(0),r=i(66),o=i(30),a=new s({Extends:o,Mixins:[n],initialize:function(t,e,i,n,s,r,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=5),void 0===s&&(s=32),void 0===r&&(r=64),o.call(this,t,"Star",null),this._points=n,this._innerRadius=s,this._outerRadius=r,this.setPosition(e,i),this.setSize(2*r,2*r),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},setPoints:function(t){return this._points=t,this.updateData()},setInnerRadius:function(t){return this._innerRadius=t,this.updateData()},setOuterRadius:function(t){return this._outerRadius=t,this.updateData()},points:{get:function(){return this._points},set:function(t){this._points=t,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(t){this._innerRadius=t,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(t){this._outerRadius=t,this.updateData()}},updateData:function(){var t=[],e=this._points,i=this._innerRadius,n=this._outerRadius,s=Math.PI/2*3,o=Math.PI/e,a=n,h=n;t.push(a,h+-n);for(var l=0;l=1)return i.x=r.x1,i.y=r.y1,i;var h=s(r),l=s(o),u=s(a),c=(h+l+u)*e,d=0;return ch+l?(d=(c-=h+l)/u,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/l,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},function(t,e,i){var n=i(56),s=i(4);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),l=n(o),u=n(a),c=n(h),d=l+u+c;e||(e=d/i);for(var f=0;fl+u?(g=(p-=l+u)/c,v.x=h.x1+(h.x2-h.x1)*g,v.y=h.y1+(h.y2-h.y1)*g):(g=(p-=l)/u,v.x=a.x1+(a.x2-a.x1)*g,v.y=a.y1+(a.y2-a.y1)*g),r.push(v)}return r}},function(t,e){t.exports=function(t,e,i){if(!t||"number"==typeof t)return!1;if(t.hasOwnProperty(e))return t[e]=i,!0;if(-1!==e.indexOf(".")){for(var n=e.split("."),s=t,r=t,o=0;o0?(h=this.lightPool.pop()).set(t,e,i,a[0],a[1],a[2],o):h=new s(t,e,i,a[0],a[1],a[2],o),this.lights.push(h),h},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&(this.lightPool.push(t),this.lights.splice(e,1)),this},shutdown:function(){for(;this.lights.length>0;)this.lightPool.push(this.lights.pop());this.ambientColor={r:.1,g:.1,b:.1},this.culledLights.length=0,this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=o},function(t,e,i){var n=i(46),s=i(17),r={Circle:i(1067),Ellipse:i(1077),Intersects:i(409),Line:i(1096),Point:i(1117),Polygon:i(1131),Rectangle:i(422),Triangle:i(1161)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={CircleToCircle:i(201),CircleToRectangle:i(202),GetCircleToCircle:i(1087),GetCircleToRectangle:i(1088),GetLineToCircle:i(203),GetLineToRectangle:i(205),GetRectangleIntersection:i(1089),GetRectangleToRectangle:i(1090),GetRectangleToTriangle:i(1091),GetTriangleToCircle:i(1092),GetTriangleToLine:i(414),GetTriangleToTriangle:i(1093),LineToCircle:i(204),LineToLine:i(84),LineToRectangle:i(410),PointToLine:i(418),PointToLineSegment:i(1094),RectangleToRectangle:i(129),RectangleToTriangle:i(411),RectangleToValues:i(1095),TriangleToCircle:i(413),TriangleToLine:i(415),TriangleToTriangle:i(416)}},function(t,e){t.exports=function(t,e){var i=t.x1,n=t.y1,s=t.x2,r=t.y2,o=e.x,a=e.y,h=e.right,l=e.bottom,u=0;if(i>=o&&i<=h&&n>=a&&n<=l||s>=o&&s<=h&&r>=a&&r<=l)return!0;if(i=o){if((u=n+(r-n)*(o-i)/(s-i))>a&&u<=l)return!0}else if(i>h&&s<=h&&(u=n+(r-n)*(h-i)/(s-i))>=a&&u<=l)return!0;if(n=a){if((u=i+(s-i)*(a-n)/(r-n))>=o&&u<=h)return!0}else if(n>l&&r<=l&&(u=i+(s-i)*(l-n)/(r-n))>=o&&u<=h)return!0;return!1}},function(t,e,i){var n=i(84),s=i(47),r=i(206),o=i(412);t.exports=function(t,e){if(e.left>t.right||e.rightt.bottom||e.bottom0}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},function(t,e,i){var n=i(204),s=i(83);t.exports=function(t,e){return!(t.left>e.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottom0||(c=s(e),(d=n(t,c,!0)).length>0)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},function(t,e){t.exports=function(t,e,i){void 0===i&&(i=1);var n=e.x1,s=e.y1,r=e.x2,o=e.y2,a=t.x,h=t.y,l=(r-n)*(r-n)+(o-s)*(o-s);if(0===l)return!1;var u=((a-n)*(r-n)+(h-s)*(o-s))/l;if(u<0)return Math.sqrt((n-a)*(n-a)+(s-h)*(s-h))<=i;if(u>=0&&u<=1){var c=((s-h)*(r-n)-(n-a)*(o-s))/l;return Math.abs(c)*Math.sqrt(l)<=i}return Math.sqrt((r-a)*(r-a)+(o-h)*(o-h))<=i}},function(t,e,i){var n=i(13),s=i(57),r=i(85);t.exports=function(t){var e=r(t)-n.TAU;return s(e,-Math.PI,Math.PI)}},function(t,e){t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},function(t,e){t.exports=function(t){return t.x*t.x+t.y*t.y}},function(t,e,i){var n=i(11);n.Area=i(1136),n.Ceil=i(1137),n.CeilAll=i(1138),n.CenterOn=i(163),n.Clone=i(1139),n.Contains=i(47),n.ContainsPoint=i(1140),n.ContainsRect=i(423),n.CopyFrom=i(1141),n.Decompose=i(412),n.Equals=i(1142),n.FitInside=i(1143),n.FitOutside=i(1144),n.Floor=i(1145),n.FloorAll=i(1146),n.FromPoints=i(173),n.GetAspectRatio=i(208),n.GetCenter=i(1147),n.GetPoint=i(147),n.GetPoints=i(257),n.GetSize=i(1148),n.Inflate=i(1149),n.Intersection=i(1150),n.MarchingAnts=i(268),n.MergePoints=i(1151),n.MergeRect=i(1152),n.MergeXY=i(1153),n.Offset=i(1154),n.OffsetPoint=i(1155),n.Overlaps=i(1156),n.Perimeter=i(110),n.PerimeterPoint=i(1157),n.Random=i(150),n.RandomOutside=i(1158),n.SameDimensions=i(1159),n.Scale=i(1160),n.Union=i(372),t.exports=n},function(t,e){t.exports=function(t,e){return!(e.width*e.height>t.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(s.BUTTON_DOWN,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(s.BUTTON_UP,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},function(t,e,i){var n=i(428),s=i(429),r=i(0),o=i(9),a=i(3),h=new r({Extends:o,initialize:function(t,e){o.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],r=0;r=2&&(this.leftStick.set(r[0].getValue(),r[1].getValue()),s>=4&&this.rightStick.set(r[2].getValue(),r[3].getValue()))},destroy:function(){var t;for(this.removeAllListeners(),this.manager=null,this.pad=null,t=0;t=r;for(i=0;i=r;)this._elapsed-=r,this.step(s)}},step:function(t){var e,i,n=this.bodies.entries,s=n.length;for(e=0;e0){var l=this.tree,u=this.staticTree;for(n=(i=h.entries).length,t=0;t-1&&p>g&&(t.velocity.normalize().scale(g),p=g),t.speed=p},separate:function(t,e,i,n,s){if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,s);if(t.isCircle!==e.isCircle){var r=t.isCircle?e:t,o=t.isCircle?t:e,a={x:r.x,y:r.y,right:r.right,bottom:r.bottom},h=o.center;if((h.ya.bottom)&&(h.xa.right))return this.separateCircle(t,e,s)}var l=!1,c=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)r.right&&(s=h(o.x,o.y,r.right,r.y)-o.radius):o.y>r.bottom&&(o.xr.right&&(s=h(o.x,o.y,r.right,r.bottom)-o.radius)),s*=-1}else s=t.halfWidth+e.halfWidth-h(t.center.x,t.center.y,e.center.x,e.center.y);if(i||0===s||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==s&&(t.onOverlap||e.onOverlap)&&this.emit(u.OVERLAP,t.gameObject,e.gameObject,t,e),0!==s;var a=t.center.x-e.center.x,l=t.center.y-e.center.y,c=Math.sqrt(Math.pow(a,2)+Math.pow(l,2)),d=(e.center.x-t.center.x)/c||0,f=(e.center.y-t.center.y)/c||0,v=2*(t.velocity.x*d+t.velocity.y*f-e.velocity.x*d-e.velocity.y*f)/(t.mass+e.mass);t.immovable||(t.velocity.x=t.velocity.x-v*t.mass*d,t.velocity.y=t.velocity.y-v*t.mass*f),e.immovable||(e.velocity.x=e.velocity.x+v*e.mass*d,e.velocity.y=e.velocity.y+v*e.mass*f);var m=e.velocity.x-t.velocity.x,y=e.velocity.y-t.velocity.y,x=Math.atan2(y,m),T=this._frameTime;return t.immovable||e.immovable||(s/=2),t.immovable||(t.x+=t.velocity.x*T-s*Math.cos(x),t.y+=t.velocity.y*T-s*Math.sin(x)),e.immovable||(e.x+=e.velocity.x*T+s*Math.cos(x),e.y+=e.velocity.y*T+s*Math.sin(x)),t.velocity.x*=t.bounce.x,t.velocity.y*=t.bounce.y,e.velocity.x*=e.bounce.x,e.velocity.y*=e.bounce.y,(t.onCollide||e.onCollide)&&this.emit(u.COLLIDE,t.gameObject,e.gameObject,t,e),!0},intersects:function(t,e){return t!==e&&(t.isCircle||e.isCircle?t.isCircle?e.isCircle?h(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):this.circleBodyIntersects(e,t):!(t.right<=e.position.x||t.bottom<=e.position.y||t.position.x>=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=s(t.center.x,e.left,e.right),n=s(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o,a;t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var h=Array.isArray(t),l=Array.isArray(e);if(this._total=0,h||l)if(!h&&l)for(o=0;o0},collideHandler:function(t,e,i,n,s,r){if(void 0===e&&t.isParent)return this.collideGroupVsGroup(t,t,i,n,s,r);if(!t||!e)return!1;if(t.body){if(e.body)return this.collideSpriteVsSprite(t,e,i,n,s,r);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,n,s,r)}else if(t.isParent){if(e.body)return this.collideSpriteVsGroup(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,n,s,r)}else if(t.isTilemap){if(e.body)return this.collideSpriteVsTilemapLayer(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,n,s,r)}},collideSpriteVsSprite:function(t,e,i,n,s,r){return!(!t.body||!e.body)&&(this.separate(t.body,e.body,n,s,r)&&(i&&i.call(s,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,n,s,r){var o,h,l,u=t.body;if(0!==e.length&&u&&u.enable)if(this.useTree){var c=this.treeMinMax;c.minX=u.left,c.minY=u.top,c.maxX=u.right,c.maxY=u.bottom;var d=e.physicsType===a.DYNAMIC_BODY?this.tree.search(c):this.staticTree.search(c);for(h=d.length,o=0;oc.baseTileWidth){var d=(c.tileWidth-c.baseTileWidth)*e.scaleX;a-=d,l+=d}c.tileHeight>c.baseTileHeight&&(u+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var f=e.getTilesWithinWorldXY(a,h,l,u);return 0!==f.length&&this.collideSpriteVsTilesHandler(t,f,i,n,s,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,n,s,r,o){for(var a,h,l=t.body,c={left:0,right:0,top:0,bottom:0},d=!1,f=0;f0&&t>i&&(t=i)),0!==n&&0!==e&&(e<0&&e<-n?e=-n:e>0&&e>n&&(e=n)),this.gameObject.x+=t,this.gameObject.y+=e}t<0?this.facing=s.FACING_LEFT:t>0&&(this.facing=s.FACING_RIGHT),e<0?this.facing=s.FACING_UP:e>0&&(this.facing=s.FACING_DOWN),this.allowRotation&&(this.gameObject.angle+=this.deltaZ())},setBoundsRectangle:function(t){return this.customBoundsRectangle=t||this.world.bounds,this},checkWorldBounds:function(){var t=this.position,e=this.customBoundsRectangle,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,s=this.worldBounce?-this.worldBounce.y:-this.bounce.y,r=!1;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,this.blocked.right=!0,r=!0),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,this.blocked.down=!0,r=!0),r&&(this.blocked.none=!1),r},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this.updateCenter(),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;if(!t&&n.frame&&(t=n.frame.realWidth),!e&&n.frame&&(e=n.frame.realHeight),this.sourceWidth=t,this.sourceHeight=e,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),i&&n.getCenter){var s=n.displayWidth/2,r=n.displayHeight/2;this.offset.set(s-this.halfWidth,r-this.halfHeight)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i.setPosition(t,e),i.getTopLeft?i.getTopLeft(this.position):this.position.set(t,e),this.prev.copy(this.position),this.prevFrame.copy(this.position),this.rotation=i.angle,this.preRotation=i.angle,this.updateBounds(),this.updateCenter()},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?this.radius>0&&t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom&&(this.center.x-t)*(this.center.x-t)+(this.center.y-e)*(this.center.y-e)<=this.radius*this.radius:h(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.width/2):(this.checkCollision.up&&t.lineBetween(e.x,e.y,e.x+this.width,e.y),this.checkCollision.right&&t.lineBetween(e.x+this.width,e.y,e.x+this.width,e.y+this.height),this.checkCollision.down&&t.lineBetween(e.x,e.y+this.height,e.x+this.width,e.y+this.height),this.checkCollision.left&&t.lineBetween(e.x,e.y,e.x,e.y+this.height))),this.debugShowVelocity&&(t.lineStyle(t.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,n,i+this.velocity.x/2,n+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t,e,i){void 0===t&&(t=!0),this.collideWorldBounds=t;var n=void 0!==e,s=void 0!==i;return(n||s)&&(this.worldBounce||(this.worldBounce=new l),n&&(this.worldBounce.x=e),s&&(this.worldBounce.y=i)),this},setVelocity:function(t,e){return this.velocity.set(t,e),t=this.velocity.x,e=this.velocity.y,this.speed=Math.sqrt(t*t+e*e),this},setVelocityX:function(t){this.velocity.x=t;var e=t,i=this.velocity.y;return this.speed=Math.sqrt(e*e+i*i),this},setVelocityY:function(t){this.velocity.y=t;var e=this.velocity.x,i=t;return this.speed=Math.sqrt(e*e+i*i),this},setMaxVelocity:function(t,e){return this.maxVelocity.set(t,e),this},setMaxSpeed:function(t){return this.maxSpeed=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setAllowDrag:function(t){return void 0===t&&(t=!0),this.allowDrag=t,this},setAllowGravity:function(t){return void 0===t&&(t=!0),this.allowGravity=t,this},setAllowRotation:function(t){return void 0===t&&(t=!0),this.allowRotation=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return void 0===t&&(t=!0),this.immovable=t,this},setEnable:function(t){return void 0===t&&(t=!0),this.enable=t,this},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=u},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=n,this.collideCallback=s,this.processCallback=r,this.callbackContext=o},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=n},function(t,e,i){var n=i(50);t.exports=function(t,e,i,s){var r=0,o=t.deltaAbsX()+e.deltaAbsX()+s;return 0===t._dx&&0===e._dx?(t.embedded=!0,e.embedded=!0):t._dx>e._dx?(r=t.right-e.x)>o&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?r=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.right=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.left=!0)):t._dxo&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?r=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.left=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.right=!0))),t.overlapX=r,e.overlapX=r,r}},function(t,e,i){var n=i(50);t.exports=function(t,e,i,s){var r=0,o=t.deltaAbsY()+e.deltaAbsY()+s;return 0===t._dy&&0===e._dy?(t.embedded=!0,e.embedded=!0):t._dy>e._dy?(r=t.bottom-e.y)>o&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?r=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.down=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.up=!0)):t._dyo&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?r=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.up=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.down=!0))),t.overlapY=r,e.overlapY=r,r}},function(t,e,i){var n=i(369);function s(t){if(!(this instanceof s))return new s(t,[".left",".top",".right",".bottom"]);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}function r(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,i,s,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=s||(o=e+Math.ceil((i-e)/s/2)*s,n(t,o,e,i,r),a.push(e,o,o,i))}s.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!p(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;s=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),a=g(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,s,r,o,h,l,u,d,f,p,g,v,m,y;for(l=u=1/0,n=e;n<=i-e;n++)s=a(t,0,n,this.toBBox),r=a(t,n,i,this.toBBox),f=s,p=r,void 0,void 0,void 0,void 0,g=Math.max(f.minX,p.minX),v=Math.max(f.minY,p.minY),m=Math.min(f.maxX,p.maxX),y=Math.min(f.maxY,p.maxY),o=Math.max(0,m-g)*Math.max(0,y-v),h=c(s)+c(r),o=e;s--)r=t.children[s],h(u,t.leaf?o(r):r),c+=d(u);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)h(e[n],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},compareMinX:function(t,e){return t.left-e.left},compareMinY:function(t,e){return t.top-e.top},toBBox:function(t){return{minX:t.left,minY:t.top,maxX:t.right,maxY:t.bottom}}},t.exports=s},function(t,e){t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},function(t,e,i){var n=i(54),s=i(0),r=i(50),o=i(47),a=i(3),h=new s({initialize:function(t,e){var i=e.width?e.width:64,n=e.height?e.height:64;this.world=t,this.gameObject=e,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(e.x-e.displayOriginX,e.y-e.displayOriginY),this.width=i,this.height=n,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new a(e.x+this.halfWidth,e.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY,this._dx=0,this._dy=0},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(t,e){return void 0===e&&(e=t),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(t,e),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;if(!t&&n.frame&&(t=n.frame.realWidth),!e&&n.frame&&(e=n.frame.realHeight),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),i&&n.getCenter){var s=n.displayWidth/2,r=n.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(s-this.halfWidth,r-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.setPosition(t,e),i.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):o(this,t,e)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?t.strokeCircle(i,n,this.width/2):t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=h},function(t,e){t.exports={NEVER:0,LITE:1,PASSIVE:2,ACTIVE:4,FIXED:8}},function(t,e){t.exports={NONE:0,A:1,B:2,BOTH:3}},function(t,e,i){var n={};t.exports=n;var s=i(235);n._motionWakeThreshold=.18,n._motionSleepThreshold=.08,n._minBias=.9,n.update=function(t,e){for(var i=e*e*e,s=0;s0&&r.motion=r.sleepThreshold&&n.set(r,!0)):r.sleepCounter>0&&(r.sleepCounter-=1)}else n.set(r,!1)}},n.afterCollisions=function(t,e){for(var i=e*e*e,s=0;sn._motionWakeThreshold*i&&n.set(l,!1)}}}},n.set=function(t,e){var i=t.isSleeping;e?(t.isSleeping=!0,t.sleepCounter=t.sleepThreshold,t.positionImpulse.x=0,t.positionImpulse.y=0,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.anglePrev=t.angle,t.speed=0,t.angularSpeed=0,t.motion=0,i||s.trigger(t,"sleepStart")):(t.isSleeping=!1,t.sleepCounter=0,i&&s.trigger(t,"sleepEnd"))}},function(t,e,i){var n=new(i(0))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=n},function(t,e,i){var n=i(24);t.exports=function(t,e,i,s,r,o,a){for(var h=n(i,s,r,o,null,a),l=0;l-1}return!1}},function(t,e,i){var n=i(74),s=i(103),r=i(216);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!1),void 0===o&&(o=!0),!s(t,e,a))return null;var h=a.data[e][t];return h?(a.data[e][t]=i?null:new n(a,-1,t,e,h.width,h.height),o&&h&&h.collides&&r(t,e,a),h):null}},function(t,e,i){var n=i(31),s=i(219),r=i(459),o=i(460),a=i(471);t.exports=function(t,e,i,h,l,u){var c;switch(e){case n.ARRAY_2D:c=s(t,i,h,l,u);break;case n.CSV:c=r(t,i,h,l,u);break;case n.TILED_JSON:c=o(t,i,u);break;case n.WELTMEISTER:c=a(t,i,u);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},function(t,e,i){var n=i(31),s=i(219);t.exports=function(t,e,i,r,o){var a=e.trim().split("\n").map(function(t){return t.split(",")}),h=s(t,a,i,r,o);return h.format=n.CSV,h}},function(t,e,i){var n=i(31),s=i(105),r=i(461),o=i(463),a=i(464),h=i(467),l=i(469),u=i(470);t.exports=function(t,e,i){if("orthogonal"!==e.orientation)return console.warn("Only orthogonal map types are supported in this version of Phaser"),null;var c=new s({width:e.width,height:e.height,name:t,tileWidth:e.tilewidth,tileHeight:e.tileheight,orientation:e.orientation,format:n.TILED_JSON,version:e.version,properties:e.properties,renderOrder:e.renderorder,infinite:e.infinite});c.layers=r(e,i),c.images=o(e);var d=a(e);return c.tilesets=d.tilesets,c.imageCollections=d.imageCollections,c.objects=h(e),c.tiles=l(c),u(c),c}},function(t,e,i){var n=i(462),s=i(2),r=i(104),o=i(220),a=i(74),h=i(221);t.exports=function(t,e){for(var i=s(t,"infinite",!1),l=[],u=[],c=h(t);c.i0;)if(c.i>=c.layers.length){if(u.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}c=u.pop()}else{var d=c.layers[c.i];if(c.i++,"tilelayer"===d.type)if(d.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+d.name+"'");else{if(d.encoding&&"base64"===d.encoding){if(d.chunks)for(var f=0;f0?((v=new a(p,g.gid,O,R,t.tilewidth,t.tileheight)).rotation=g.rotation,v.flipX=g.flipped,y[R][O]=v):(m=e?null:new a(p,-1,O,R,t.tilewidth,t.tileheight),y[R][O]=m),++x===S.width&&(C++,x=0)}}else{p=new r({name:c.name+d.name,x:c.x+s(d,"offsetx",0)+d.x,y:c.y+s(d,"offsety",0)+d.y,width:d.width,height:d.height,tileWidth:t.tilewidth,tileHeight:t.tileheight,alpha:c.opacity*d.opacity,visible:c.visible&&d.visible,properties:s(d,"properties",{})});for(var L=[],D=0,k=d.data.length;D0?((v=new a(p,g.gid,x,y.length,t.tilewidth,t.tileheight)).rotation=g.rotation,v.flipX=g.flipped,L.push(v)):(m=e?null:new a(p,-1,x,y.length,t.tilewidth,t.tileheight),L.push(m)),++x===d.width&&(y.push(L),x=0,L=[])}p.data=y,l.push(p)}else if("group"===d.type){var F=h(t,d,c);u.push(c),c=F}}return l}},function(t,e){t.exports=function(t){for(var e=window.atob(t),i=e.length,n=new Array(i/4),s=0;s>>0;return n}},function(t,e,i){var n=i(2),s=i(221);t.exports=function(t){for(var e=[],i=[],r=s(t);r.i0;)if(r.i>=r.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=i.pop()}else{var o=r.layers[r.i];if(r.i++,"imagelayer"===o.type){var a=n(o,"offsetx",0)+n(o,"startx",0),h=n(o,"offsety",0)+n(o,"starty",0);e.push({name:r.name+o.name,image:o.image,x:r.x+a+o.x,y:r.y+h+o.y,alpha:r.opacity*o.opacity,visible:r.visible&&o.visible,properties:n(o,"properties",{})})}else if("group"===o.type){var l=s(t,o,r);i.push(r),r=l}}return e}},function(t,e,i){var n=i(140),s=i(465),r=i(222);t.exports=function(t){for(var e,i=[],o=[],a=null,h=0;h1){if(Array.isArray(l.tiles)){for(var c={},d={},f=0;f=this.firstgid&&t0;)if(a.i>=a.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}a=i.pop()}else{var h=a.layers[a.i];if(a.i++,h.opacity*=a.opacity,h.visible=a.visible&&h.visible,"objectgroup"===h.type){h.name=a.name+h.name;for(var l=a.x+n(h,"startx",0)+n(h,"offsetx",0),u=a.y+n(h,"starty",0)+n(h,"offsety",0),c=[],d=0;da&&(a=e.layer[l].width),e.layer[l].height>h&&(h=e.layer[l].height);var u=new s({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:n.WELTMEISTER});return u.layers=r(e,i),u.tilesets=o(e),u}},function(t,e,i){var n=i(104),s=i(74);t.exports=function(t,e){for(var i=[],r=0;r-1?new s(a,f,c,u,o.tilesize,o.tilesize):e?null:new s(a,-1,c,u,o.tilesize,o.tilesize),h.push(d)}l.push(h),h=[]}a.data=l,i.push(a)}return i}},function(t,e,i){var n=i(140);t.exports=function(t){for(var e=[],i=[],s=0;s-1&&(this.renderOrder=t),this},addTilesetImage:function(t,e,i,n,s,r,o){if(void 0===t)return null;if(void 0!==e&&null!==e||(e=t),!this.scene.sys.textures.exists(e))return console.warn("Invalid Tileset Image: "+e),null;var h=this.scene.sys.textures.get(e),l=this.getTilesetIndex(t);if(null===l&&this.format===a.TILED_JSON)return console.warn("No data found for Tileset: "+t),null;var u=this.tilesets[l];return u?(u.setTileSize(i,n),u.setSpacing(s,r),u.setImage(h),u):(void 0===i&&(i=this.tileWidth),void 0===n&&(n=this.tileHeight),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o=0),(u=new p(t,o,i,n,s,r)).setImage(h),this.tilesets.push(u),u)},convertLayerToStatic:function(t){if(null===(t=this.getLayer(t)))return null;var e=t.tilemapLayer;if(!(e&&e instanceof r))return null;var i=new c(e.scene,e.tilemap,e.layerIndex,e.tileset,e.x,e.y);return this.scene.sys.displayList.add(i),e.destroy(),i},copy:function(t,e,i,n,s,r,o,a){return a=this.getLayer(a),this._isStaticCall(a,"copy")?this:null!==a?(f.Copy(t,e,i,n,s,r,o,a),this):null},createBlankDynamicLayer:function(t,e,i,n,s,o,a,l){if(void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.width),void 0===o&&(o=this.height),void 0===a&&(a=this.tileWidth),void 0===l&&(l=this.tileHeight),null!==this.getLayerIndex(t))return console.warn("Invalid Tilemap Layer ID: "+t),null;for(var u,c=new h({name:t,tileWidth:a,tileHeight:l,width:s,height:o}),f=0;f-1&&this.putTileAt(e,r.x,r.y,i,r.tilemapLayer)}return n},removeTileAt:function(t,e,i,n,s){return s=this.getLayer(s),this._isStaticCall(s,"removeTileAt")?null:null===s?null:f.RemoveTileAt(t,e,i,n,s)},removeTileAtWorldXY:function(t,e,i,n,s,r){return r=this.getLayer(r),this._isStaticCall(r,"removeTileAtWorldXY")?null:null===r?null:f.RemoveTileAtWorldXY(t,e,i,n,s,r)},renderDebug:function(t,e,i){return null===(i=this.getLayer(i))?null:(f.RenderDebug(t,e,i),this)},renderDebugFull:function(t,e){for(var i=this.layers,n=0;n=0&&t<4&&(this._renderOrder=t),this},calculateFacesAt:function(t,e){return a.CalculateFacesAt(t,e,this.layer),this},calculateFacesWithin:function(t,e,i,n){return a.CalculateFacesWithin(t,e,i,n,this.layer),this},createFromTiles:function(t,e,i,n,s){return a.CreateFromTiles(t,e,i,n,s,this.layer)},cull:function(t){return this.cullCallback(this.layer,t,this.culledTiles,this._renderOrder)},copy:function(t,e,i,n,s,r,o){return a.Copy(t,e,i,n,s,r,o,this.layer),this},destroy:function(t){void 0===t&&(t=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),t&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],o.prototype.destroy.call(this))},fill:function(t,e,i,n,s,r){return a.Fill(t,e,i,n,s,r,this.layer),this},filterTiles:function(t,e,i,n,s,r,o){return a.FilterTiles(t,e,i,n,s,r,o,this.layer)},findByIndex:function(t,e,i){return a.FindByIndex(t,e,i,this.layer)},findTile:function(t,e,i,n,s,r,o){return a.FindTile(t,e,i,n,s,r,o,this.layer)},forEachTile:function(t,e,i,n,s,r,o){return a.ForEachTile(t,e,i,n,s,r,o,this.layer),this},getTileAt:function(t,e,i){return a.GetTileAt(t,e,i,this.layer)},getTileAtWorldXY:function(t,e,i,n){return a.GetTileAtWorldXY(t,e,i,n,this.layer)},getTilesWithin:function(t,e,i,n,s){return a.GetTilesWithin(t,e,i,n,s,this.layer)},getTilesWithinShape:function(t,e,i){return a.GetTilesWithinShape(t,e,i,this.layer)},getTilesWithinWorldXY:function(t,e,i,n,s,r){return a.GetTilesWithinWorldXY(t,e,i,n,s,r,this.layer)},hasTileAt:function(t,e){return a.HasTileAt(t,e,this.layer)},hasTileAtWorldXY:function(t,e,i){return a.HasTileAtWorldXY(t,e,i,this.layer)},putTileAt:function(t,e,i,n){return a.PutTileAt(t,e,i,n,this.layer)},putTileAtWorldXY:function(t,e,i,n,s){return a.PutTileAtWorldXY(t,e,i,n,s,this.layer)},putTilesAt:function(t,e,i,n){return a.PutTilesAt(t,e,i,n,this.layer),this},randomize:function(t,e,i,n,s){return a.Randomize(t,e,i,n,s,this.layer),this},removeTileAt:function(t,e,i,n){return a.RemoveTileAt(t,e,i,n,this.layer)},removeTileAtWorldXY:function(t,e,i,n,s){return a.RemoveTileAtWorldXY(t,e,i,n,s,this.layer)},renderDebug:function(t,e){return a.RenderDebug(t,e,this.layer),this},replaceByIndex:function(t,e,i,n,s,r){return a.ReplaceByIndex(t,e,i,n,s,r,this.layer),this},setSkipCull:function(t){return void 0===t&&(t=!0),this.skipCull=t,this},setCullPadding:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=1),this.cullPaddingX=t,this.cullPaddingY=e,this},setCollision:function(t,e,i,n){return a.SetCollision(t,e,i,this.layer,n),this},setCollisionBetween:function(t,e,i,n){return a.SetCollisionBetween(t,e,i,n,this.layer),this},setCollisionByProperty:function(t,e,i){return a.SetCollisionByProperty(t,e,i,this.layer),this},setCollisionByExclusion:function(t,e,i){return a.SetCollisionByExclusion(t,e,i,this.layer),this},setCollisionFromCollisionGroup:function(t,e){return a.SetCollisionFromCollisionGroup(t,e,this.layer),this},setTileIndexCallback:function(t,e,i){return a.SetTileIndexCallback(t,e,i,this.layer),this},setTileLocationCallback:function(t,e,i,n,s,r){return a.SetTileLocationCallback(t,e,i,n,s,r,this.layer),this},shuffle:function(t,e,i,n){return a.Shuffle(t,e,i,n,this.layer),this},swapByIndex:function(t,e,i,n,s,r){return a.SwapByIndex(t,e,i,n,s,r,this.layer),this},tileToWorldX:function(t,e){return a.TileToWorldX(t,e,this.layer)},tileToWorldY:function(t,e){return a.TileToWorldY(t,e,this.layer)},tileToWorldXY:function(t,e,i,n){return a.TileToWorldXY(t,e,i,n,this.layer)},weightedRandomize:function(t,e,i,n,s){return a.WeightedRandomize(t,e,i,n,s,this.layer),this},worldToTileX:function(t,e,i){return a.WorldToTileX(t,e,i,this.layer)},worldToTileY:function(t,e,i){return a.WorldToTileY(t,e,i,this.layer)},worldToTileXY:function(t,e,i,n,s){return a.WorldToTileXY(t,e,i,n,s,this.layer)}});t.exports=h},function(t,e,i){var n=i(0),s=i(12),r=i(18),o=i(14),a=i(1321),h=i(136),l=i(32),u=i(10),c=new n({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.ComputedSize,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.Transform,s.Visible,s.ScrollFactor,a],initialize:function(t,e,i,n,s,a){o.call(this,t,"StaticTilemapLayer"),this.isTilemap=!0,this.tilemap=e,this.layerIndex=i,this.layer=e.layers[i],this.layer.tilemapLayer=this,this.tileset=[],this.culledTiles=[],this.skipCull=!1,this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=h.CullTiles,this.renderer=t.sys.game.renderer,this.vertexBuffer=[],this.bufferData=[],this.vertexViewF32=[],this.vertexViewU32=[],this.dirty=[],this.vertexCount=[],this._renderOrder=0,this._tempMatrix=new l,this.gidMap=[],this.setTilesets(n),this.setAlpha(this.layer.alpha),this.setPosition(s,a),this.setOrigin(),this.setSize(e.tileWidth*this.layer.width,e.tileHeight*this.layer.height),this.updateVBOData(),this.initPipeline("TextureTintPipeline"),t.sys.game.events.on(r.CONTEXT_RESTORED,function(){this.updateVBOData()},this)},setTilesets:function(t){var e=[],i=[],n=this.tilemap;Array.isArray(t)||(t=[t]);for(var s=0;sv||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(1===p)for(o=0;o=0;a--)!(r=f[o][a])||r.indexv||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(2===p)for(o=u-1;o>=0;o--)for(a=0;av||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(3===p)for(o=u-1;o>=0;o--)for(a=l-1;a>=0;a--)!(r=f[o][a])||r.indexv||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));this.dirty[e]=!1,null===m?(m=i.createVertexBuffer(y,n.STATIC_DRAW),this.vertexBuffer[e]=m):(i.setVertexBuffer(m),n.bufferSubData(n.ARRAY_BUFFER,0,y))}return this},batchTile:function(t,e,i,n,s,r,o){var a=i.getTileTextureCoordinates(e.index);if(!a)return t;var h=i.tileWidth,l=i.tileHeight,c=h/2,d=l/2,f=a.x/n,p=a.y/s,g=(a.x+h)/n,v=(a.y+l)/s,m=this._tempMatrix,y=-c,x=-d;e.flipX&&(h*=-1,y+=i.tileWidth),e.flipY&&(l*=-1,x+=i.tileHeight);var T=y+h,w=x+l;m.applyITRS(c+e.pixelX,d+e.pixelY,e.rotation,1,1);var b=u.getTintAppendFloatAlpha(16777215,r.alpha*this.alpha*e.alpha),E=m.getX(y,x),S=m.getY(y,x),A=m.getX(y,w),_=m.getY(y,w),C=m.getX(T,w),M=m.getY(T,w),P=m.getX(T,x),O=m.getY(T,x);r.roundPixels&&(E=Math.round(E),S=Math.round(S),A=Math.round(A),_=Math.round(_),C=Math.round(C),M=Math.round(M),P=Math.round(P),O=Math.round(O));var R=this.vertexViewF32[o],L=this.vertexViewU32[o];return R[++t]=E,R[++t]=S,R[++t]=f,R[++t]=p,R[++t]=0,L[++t]=b,R[++t]=A,R[++t]=_,R[++t]=f,R[++t]=v,R[++t]=0,L[++t]=b,R[++t]=C,R[++t]=M,R[++t]=g,R[++t]=v,R[++t]=0,L[++t]=b,R[++t]=E,R[++t]=S,R[++t]=f,R[++t]=p,R[++t]=0,L[++t]=b,R[++t]=C,R[++t]=M,R[++t]=g,R[++t]=v,R[++t]=0,L[++t]=b,R[++t]=P,R[++t]=O,R[++t]=g,R[++t]=p,R[++t]=0,L[++t]=b,this.vertexCount[o]+=6,t},setRenderOrder:function(t){if("string"==typeof t&&(t=["right-down","left-down","right-up","left-up"].indexOf(t)),t>=0&&t<4){this._renderOrder=t;for(var e=0;e0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=r},function(t,e,i){var n=i(1330);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substr(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===n.indexOf(e)&&"_"!==e.substr(0,1)&&i.push({key:e,value:t[e]});return i}},function(t,e,i){var n=i(6);t.exports=function(t){var e=n(t,"tweens",null);return null===e?[]:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},function(t,e,i){var n=i(226),s=i(15),r=i(88),o=i(82),a=i(141),h=i(6),l=i(225),u=i(227),c=i(229);t.exports=function(t,e,i){void 0===i&&(i=n);var d=h(e,"from",0),f=h(e,"to",1),p=[{value:d}],g=a(e,"delay",i.delay),v=a(e,"duration",i.duration),m=h(e,"easeParams",i.easeParams),y=o(h(e,"ease",i.ease),m),x=a(e,"hold",i.hold),T=a(e,"repeat",i.repeat),w=a(e,"repeatDelay",i.repeatDelay),b=r(e,"yoyo",i.yoyo),E=[],S=l("value",f),A=c(p[0],0,"value",S.getEnd,S.getStart,S.getActive,y,g,v,b,x,T,w,!1,!1);A.start=d,A.current=d,A.to=f,E.push(A);var _=new u(t,E,p);_.offset=s(e,"offset",null),_.completeDelay=s(e,"completeDelay",0),_.loop=Math.round(s(e,"loop",0)),_.loopDelay=Math.round(s(e,"loopDelay",0)),_.paused=r(e,"paused",!1),_.useFrames=r(e,"useFrames",!1);for(var C=h(e,"callbackScope",_),M=[_,null],P=u.TYPES,O=0;O0?Math.floor(v/p.length):h(e,"duration",g.duration),g.delay=h(e,"delay",g.delay),g.easeParams=c(e,"easeParams",g.easeParams),g.ease=a(c(e,"ease",g.ease),g.easeParams),g.hold=h(e,"hold",g.hold),g.repeat=h(e,"repeat",g.repeat),g.repeatDelay=h(e,"repeatDelay",g.repeatDelay),g.yoyo=o(e,"yoyo",g.yoyo),g.flipX=o(e,"flipX",g.flipX),g.flipY=o(e,"flipY",g.flipY);for(var m=0;m0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){return this.calcDuration(),this.progress=0,this.totalProgress=0,!this.paused||(this.state=a.PAUSED,!1)},resetTweens:function(t){for(var e=0;e0?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=a.LOOP_DELAY):(this.state=a.ACTIVE,this.dispatchTimelineEvent(r.TIMELINE_LOOP,this.callbacks.onLoop))):this.completeDelay>0?(this.state=a.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=a.PENDING_REMOVE,this.dispatchTimelineEvent(r.TIMELINE_COMPLETE,this.callbacks.onComplete))},update:function(t,e){if(this.state!==a.PAUSED){switch(this.useFrames&&(e=1*this.manager.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case a.ACTIVE:for(var i=this.totalData,n=0;n=this.nextTick&&this.currentAnim.setFrame(this)}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.isCropped&&e.frame.updateCropUVs(e._crop,e.flipX,e.flipY),e.setSizeToFrame(),t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin(),e},updateFrame:function(t){var e=this.setCurrentFrame(t);if(this.isPlaying){t.setAlpha&&(e.alpha=t.alpha);var i=this.currentAnim;e.emit(r.SPRITE_ANIMATION_KEY_UPDATE+i.key,i,t,e),e.emit(r.SPRITE_ANIMATION_UPDATE,i,t,e),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this)}},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off(r.REMOVE_ANIMATION,this.remove,this),this.animationManager=null,this.parent=null,this.currentAnim=null,this.currentFrame=null}});t.exports=o},function(t,e,i){var n=i(486),s=i(48),r=i(0),o=i(29),a=i(487),h=i(92),l=i(32),u=new r({initialize:function(t){this.game=t,this.type=o.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.config={clearBeforeRender:t.config.clearBeforeRender,backgroundColor:t.config.backgroundColor,resolution:t.config.resolution,antialias:t.config.antialias,roundPixels:t.config.roundPixels},this.gameCanvas=t.canvas;var e={alpha:t.config.transparent,desynchronized:t.config.desynchronized};this.gameContext=this.game.config.context?this.game.config.context:this.gameCanvas.getContext("2d",e),this.currentContext=this.gameContext,this.antialias=t.config.antialias,this.blendModes=a(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new l,this._tempMatrix2=new l,this._tempMatrix3=new l,this._tempMatrix4=new l,this.init()},init:function(){this.game.scale.on(h.RESIZE,this.onResize,this);var t=this.game.scale.baseSize;this.resize(t.width,t.height)},onResize:function(t,e){e.width===this.width&&e.height===this.height||this.resize(e.width,e.height)},resize:function(t,e){this.width=t,this.height=e},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(t){return this.currentContext.globalCompositeOperation=t,this},setContext:function(t){return this.currentContext=t||this.gameContext,this},setAlpha:function(t){return this.currentContext.globalAlpha=t,this},preRender:function(){var t=this.gameContext,e=this.config,i=this.width,n=this.height;t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),e.clearBeforeRender&&t.clearRect(0,0,i,n),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,n)),t.save(),this.drawCount=0},render:function(t,e,i,n){var r=e.list,o=r.length,a=n._cx,h=n._cy,l=n._cw,u=n._ch,c=n.renderToTexture?n.context:t.sys.context;c.save(),this.game.scene.customViewports&&(c.beginPath(),c.rect(a,h,l,u),c.clip()),this.currentContext=c;var d=n.mask;d&&d.preRenderCanvas(this,null,n._maskCamera),n.transparent||(c.fillStyle=n.backgroundColor.rgba,c.fillRect(a,h,l,u)),c.globalAlpha=n.alpha,c.globalCompositeOperation="source-over",this.drawCount+=r.length,n.renderToTexture&&n.emit(s.PRE_RENDER,n),n.matrix.copyToContext(c);for(var f=0;f=0?y=-(y+d):y<0&&(y=Math.abs(y)-d)),t.flipY&&(x>=0?x=-(x+f):x<0&&(x=Math.abs(x)-f))}var w=1,b=1;t.flipX&&(p||(y+=-e.realWidth+2*v),w=-1),t.flipY&&(p||(x+=-e.realHeight+2*m),b=-1),a.applyITRS(t.x,t.y,t.rotation,t.scaleX*w,t.scaleY*b),o.copyFrom(i.matrix),n?(o.multiplyWithOffset(n,-i.scrollX*t.scrollFactorX,-i.scrollY*t.scrollFactorY),a.e=t.x,a.f=t.y,o.multiply(a,h)):(a.e-=i.scrollX*t.scrollFactorX,a.f-=i.scrollY*t.scrollFactorY,o.multiply(a,h)),r.save(),h.setToContext(r),r.globalCompositeOperation=this.blendModes[t.blendMode],r.globalAlpha=s,r.imageSmoothingEnabled=!(!this.antialias||e.source.scaleMode),r.drawImage(e.source.image,u,c,d,f,y,x,d/g,f/g),r.restore()}},destroy:function(){this.gameCanvas=null,this.gameContext=null,this.game=null}});t.exports=u},function(t,e,i){var n=i(26),s=i(33),r=i(2);t.exports=function(t,e){var i=r(e,"callback"),o=r(e,"type","image/png"),a=r(e,"encoder",.92),h=Math.abs(Math.round(r(e,"x",0))),l=Math.abs(Math.round(r(e,"y",0))),u=r(e,"width",t.width),c=r(e,"height",t.height);if(r(e,"getPixel",!1)){var d=t.getContext("2d").getImageData(h,l,1,1).data;i.call(null,new s(d[0],d[1],d[2],d[3]/255))}else if(0!==h||0!==l||u!==t.width||c!==t.height){var f=n.createWebGL(this,u,c);f.getContext("2d").drawImage(t,h,l,u,c,0,0,u,c);var p=new Image;p.onerror=function(){i.call(null),n.remove(f)},p.onload=function(){i.call(null,p),n.remove(f)},p.src=f.toDataURL(o,a)}else{var g=new Image;g.onerror=function(){i.call(null)},g.onload=function(){i.call(null,g)},g.src=t.toDataURL(o,a)}}},function(t,e,i){var n=i(52),s=i(299);t.exports=function(){var t=[],e=s.supportNewBlendModes,i="source-over";return t[n.NORMAL]=i,t[n.ADD]="lighter",t[n.MULTIPLY]=e?"multiply":i,t[n.SCREEN]=e?"screen":i,t[n.OVERLAY]=e?"overlay":i,t[n.DARKEN]=e?"darken":i,t[n.LIGHTEN]=e?"lighten":i,t[n.COLOR_DODGE]=e?"color-dodge":i,t[n.COLOR_BURN]=e?"color-burn":i,t[n.HARD_LIGHT]=e?"hard-light":i,t[n.SOFT_LIGHT]=e?"soft-light":i,t[n.DIFFERENCE]=e?"difference":i,t[n.EXCLUSION]=e?"exclusion":i,t[n.HUE]=e?"hue":i,t[n.SATURATION]=e?"saturation":i,t[n.COLOR]=e?"color":i,t[n.LUMINOSITY]=e?"luminosity":i,t[n.ERASE]="destination-out",t[n.SOURCE_IN]="source-in",t[n.SOURCE_OUT]="source-out",t[n.SOURCE_ATOP]="source-atop",t[n.DESTINATION_OVER]="destination-over",t[n.DESTINATION_IN]="destination-in",t[n.DESTINATION_OUT]="destination-out",t[n.DESTINATION_ATOP]="destination-atop",t[n.LIGHTER]="lighter",t[n.COPY]="copy",t[n.XOR]="xor",t}},function(t,e,i){var n=i(91),s=i(48),r=i(0),o=i(29),a=i(18),h=i(116),l=i(1),u=i(92),c=i(79),d=i(117),f=i(32),p=i(10),g=i(489),v=i(490),m=i(491),y=i(234),x=new r({initialize:function(t){var e=t.config,i={alpha:e.transparent,desynchronized:e.desynchronized,depth:!1,antialias:e.antialiasGL,premultipliedAlpha:e.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:e.failIfMajorPerformanceCaveat,powerPreference:e.powerPreference};this.config={clearBeforeRender:e.clearBeforeRender,antialias:e.antialias,backgroundColor:e.backgroundColor,contextCreation:i,resolution:e.resolution,roundPixels:e.roundPixels,maxTextures:e.maxTextures,maxTextureSize:e.maxTextureSize,batchSize:e.batchSize,maxLights:e.maxLights,mipmapFilter:e.mipmapFilter},this.game=t,this.type=o.WEBGL,this.width=0,this.height=0,this.canvas=t.canvas,this.blendModes=[],this.nativeTextures=[],this.contextLost=!1,this.pipelines=null,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92,isFramebuffer:!1,bufferWidth:0,bufferHeight:0},this.currentActiveTextureUnit=0,this.currentTextures=new Array(16),this.currentFramebuffer=null,this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=l,this.contextRestoredHandler=l,this.gl=null,this.supportedExtensions=null,this.extensions={},this.glFormats=[],this.compression={ETC1:!1,PVRTC:!1,S3TC:!1},this.drawingBufferHeight=0,this.blankTexture=null,this.defaultCamera=new n(0,0,0,0),this._tempMatrix1=new f,this._tempMatrix2=new f,this._tempMatrix3=new f,this._tempMatrix4=new f,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.mipmapFilter=null,this.init(this.config)},init:function(t){var e,i=this.game,n=this.canvas,s=t.backgroundColor;if(!(e=i.config.context?i.config.context:n.getContext("webgl",t.contextCreation)||n.getContext("experimental-webgl",t.contextCreation))||e.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=e;var r=this;this.contextLostHandler=function(t){r.contextLost=!0,r.game.events.emit(a.CONTEXT_LOST,r),t.preventDefault()},this.contextRestoredHandler=function(){r.contextLost=!1,r.init(r.config),r.game.events.emit(a.CONTEXT_RESTORED,r)},n.addEventListener("webglcontextlost",this.contextLostHandler,!1),n.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),i.context=e;for(var h=0;h<=27;h++)this.blendModes.push({func:[e.ONE,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_ADD});this.blendModes[1].func=[e.ONE,e.DST_ALPHA],this.blendModes[2].func=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[e.ONE,e.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[e.ZERO,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_REVERSE_SUBTRACT},this.glFormats[0]=e.BYTE,this.glFormats[1]=e.SHORT,this.glFormats[2]=e.UNSIGNED_BYTE,this.glFormats[3]=e.UNSIGNED_SHORT,this.glFormats[4]=e.FLOAT,this.glFuncMap={mat2:{func:e.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:e.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:e.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:e.uniform1f,length:1},"1fv":{func:e.uniform1fv,length:1},"1i":{func:e.uniform1i,length:1},"1iv":{func:e.uniform1iv,length:1},"2f":{func:e.uniform2f,length:2},"2fv":{func:e.uniform2fv,length:1},"2i":{func:e.uniform2i,length:2},"2iv":{func:e.uniform2iv,length:1},"3f":{func:e.uniform3f,length:3},"3fv":{func:e.uniform3fv,length:1},"3i":{func:e.uniform3i,length:3},"3iv":{func:e.uniform3iv,length:1},"4f":{func:e.uniform4f,length:4},"4fv":{func:e.uniform4fv,length:1},"4i":{func:e.uniform4i,length:4},"4iv":{func:e.uniform4iv,length:1}};var l=e.getSupportedExtensions();t.maxTextures||(t.maxTextures=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),t.maxTextureSize||(t.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE));var u="WEBGL_compressed_texture_",c="WEBKIT_"+u;this.compression.ETC1=e.getExtension(u+"etc1")||e.getExtension(c+"etc1"),this.compression.PVRTC=e.getExtension(u+"pvrtc")||e.getExtension(c+"pvrtc"),this.compression.S3TC=e.getExtension(u+"s3tc")||e.getExtension(c+"s3tc"),this.supportedExtensions=l,e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),e.enable(e.BLEND),e.clearColor(s.redGL,s.greenGL,s.blueGL,s.alphaGL),this.mipmapFilter=e[t.mipmapFilter];for(var f=0;f0&&n>0;if(o&&a){var h=o[0],l=o[1],u=o[2],c=o[3];a=h!==t||l!==e||u!==i||c!==n}a&&(this.flush(),r.scissor(t,s-e-n,i,n))},popScissor:function(){var t=this.scissorStack;t.pop();var e=t[t.length-1];e&&this.setScissor(e[0],e[1],e[2],e[3]),this.currentScissor=e},setPipeline:function(t,e){return this.currentPipeline===t&&this.currentPipeline.vertexBuffer===this.currentVertexBuffer&&this.currentPipeline.program===this.currentProgram||(this.flush(),this.currentPipeline=t,this.currentPipeline.bind()),this.currentPipeline.onBind(e),this.currentPipeline},hasActiveStencilMask:function(){var t=this.currentMask.mask,e=this.currentCameraMask.mask;return t&&t.isStencil||e&&e.isStencil},rebindPipeline:function(t){var e=this.gl;e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),this.hasActiveStencilMask()?e.clear(e.DEPTH_BUFFER_BIT):(e.disable(e.STENCIL_TEST),e.clear(e.DEPTH_BUFFER_BIT|e.STENCIL_BUFFER_BIT)),e.viewport(0,0,this.width,this.height),this.setBlendMode(0,!0),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.blankTexture.glTexture),this.currentActiveTextureUnit=0,this.currentTextures[0]=this.blankTexture.glTexture,this.currentPipeline=t,this.currentPipeline.bind(),this.currentPipeline.onBind()},clearPipeline:function(){this.flush(),this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.setBlendMode(0,!0)},setBlendMode:function(t,e){void 0===e&&(e=!1);var i=this.gl,n=this.blendModes[t];return!!(e||t!==o.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t)&&(this.flush(),i.enable(i.BLEND),i.blendEquation(n.equation),n.func.length>2?i.blendFuncSeparate(n.func[0],n.func[1],n.func[2],n.func[3]):i.blendFunc(n.func[0],n.func[1]),this.currentBlendMode=t,!0)},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return t>17&&this.blendModes[t]&&this.blendModes.splice(t,1),this},setBlankTexture:function(t){void 0===t&&(t=!1),!t&&0===this.currentActiveTextureUnit&&this.currentTextures[0]||this.setTexture2D(this.blankTexture.glTexture,0)},setTexture2D:function(t,e,i){void 0===i&&(i=!0);var n=this.gl;return t!==this.currentTextures[e]&&(i&&this.flush(),this.currentActiveTextureUnit!==e&&(n.activeTexture(n.TEXTURE0+e),this.currentActiveTextureUnit=e),n.bindTexture(n.TEXTURE_2D,t),this.currentTextures[e]=t),this},setFramebuffer:function(t,e){void 0===e&&(e=!1);var i=this.gl,n=this.width,s=this.height;return t!==this.currentFramebuffer&&(t&&t.renderTexture?(n=t.renderTexture.width,s=t.renderTexture.height):this.flush(),i.bindFramebuffer(i.FRAMEBUFFER,t),i.viewport(0,0,n,s),e&&(t?(this.drawingBufferHeight=s,this.pushScissor(0,0,n,s)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=t),this},setProgram:function(t){var e=this.gl;return t!==this.currentProgram&&(this.flush(),e.useProgram(t),this.currentProgram=t),this},setVertexBuffer:function(t){var e=this.gl;return t!==this.currentVertexBuffer&&(this.flush(),e.bindBuffer(e.ARRAY_BUFFER,t),this.currentVertexBuffer=t),this},setIndexBuffer:function(t){var e=this.gl;return t!==this.currentIndexBuffer&&(this.flush(),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.currentIndexBuffer=t),this},createTextureFromSource:function(t,e,i,n){var s=this.gl,r=s.NEAREST,a=s.NEAREST,l=s.CLAMP_TO_EDGE;e=t?t.width:e,i=t?t.height:i;var u=h(e,i);return u&&(l=s.REPEAT),n===o.ScaleModes.LINEAR&&this.config.antialias&&(r=u?this.mipmapFilter:s.LINEAR,a=s.LINEAR),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,r,a,l,l,s.RGBA,t):this.createTexture2D(0,r,a,l,l,s.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,s,r,o,a,l,u,c,d){u=void 0===u||null===u||u,void 0===c&&(c=!1),void 0===d&&(d=!1);var f=this.gl,p=f.createTexture();return this.setTexture2D(p,0),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,e),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,i),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_S,s),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_T,n),f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,d),null===o||void 0===o?f.texImage2D(f.TEXTURE_2D,t,r,a,l,0,r,f.UNSIGNED_BYTE,null):(c||(a=o.width,l=o.height),f.texImage2D(f.TEXTURE_2D,t,r,r,f.UNSIGNED_BYTE,o)),h(a,l)&&f.generateMipmap(f.TEXTURE_2D),this.setTexture2D(null,0),p.isAlphaPremultiplied=u,p.isRenderTexture=!1,p.width=a,p.height=l,this.nativeTextures.push(p),p},createFramebuffer:function(t,e,i,n){var s,r=this.gl,o=r.createFramebuffer();if(this.setFramebuffer(o),n){var a=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,a),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,a)}if(i.isRenderTexture=!0,i.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0),(s=r.checkFramebufferStatus(r.FRAMEBUFFER))!==r.FRAMEBUFFER_COMPLETE){throw new Error("Framebuffer incomplete. Framebuffer status: "+{36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"}[s])}return o.renderTexture=i,this.setFramebuffer(null),o},createProgram:function(t,e){var i=this.gl,n=i.createProgram(),s=i.createShader(i.VERTEX_SHADER),r=i.createShader(i.FRAGMENT_SHADER);if(i.shaderSource(s,t),i.shaderSource(r,e),i.compileShader(s),i.compileShader(r),!i.getShaderParameter(s,i.COMPILE_STATUS))throw new Error("Failed to compile Vertex Shader:\n"+i.getShaderInfoLog(s));if(!i.getShaderParameter(r,i.COMPILE_STATUS))throw new Error("Failed to compile Fragment Shader:\n"+i.getShaderInfoLog(r));if(i.attachShader(n,s),i.attachShader(n,r),i.linkProgram(n),!i.getProgramParameter(n,i.LINK_STATUS))throw new Error("Failed to link program:\n"+i.getProgramInfoLog(n));return n},createVertexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setVertexBuffer(n),i.bufferData(i.ARRAY_BUFFER,t,e),this.setVertexBuffer(null),n},createIndexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setIndexBuffer(n),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t,e),this.setIndexBuffer(null),n},deleteTexture:function(t){var e=this.nativeTextures.indexOf(t);return-1!==e&&c(this.nativeTextures,e),this.gl.deleteTexture(t),this.currentTextures[0]!==t||this.game.pendingDestroy||this.setBlankTexture(!0),this},deleteFramebuffer:function(t){return this.gl.deleteFramebuffer(t),this},deleteProgram:function(t){return this.gl.deleteProgram(t),this},deleteBuffer:function(t){return this.gl.deleteBuffer(t),this},preRenderCamera:function(t){var e=t._cx,i=t._cy,n=t._cw,r=t._ch,o=this.pipelines.TextureTintPipeline,a=t.backgroundColor;if(t.renderToTexture){this.flush(),this.pushScissor(e,i,n,-r),this.setFramebuffer(t.framebuffer);var h=this.gl;h.clearColor(0,0,0,0),h.clear(h.COLOR_BUFFER_BIT),o.projOrtho(e,n+e,i,r+i,-1e3,1e3),t.mask&&(this.currentCameraMask.mask=t.mask,this.currentCameraMask.camera=t._maskCamera,t.mask.preRenderWebGL(this,t,t._maskCamera)),a.alphaGL>0&&o.drawFillRect(e,i,n+e,r+i,p.getTintFromFloats(a.redGL,a.greenGL,a.blueGL,1),a.alphaGL),t.emit(s.PRE_RENDER,t)}else this.pushScissor(e,i,n,r),t.mask&&(this.currentCameraMask.mask=t.mask,this.currentCameraMask.camera=t._maskCamera,t.mask.preRenderWebGL(this,t,t._maskCamera)),a.alphaGL>0&&o.drawFillRect(e,i,n,r,p.getTintFromFloats(a.redGL,a.greenGL,a.blueGL,1),a.alphaGL)},getCurrentStencilMask:function(){var t=null,e=this.maskStack,i=this.currentCameraMask;return e.length>0?t=e[e.length-1]:i.mask&&i.mask.isStencil&&(t=i),t},postRenderCamera:function(t){var e=this.pipelines.TextureTintPipeline;if(t.flashEffect.postRenderWebGL(e,p.getTintFromFloats),t.fadeEffect.postRenderWebGL(e,p.getTintFromFloats),t.dirty=!1,this.popScissor(),t.renderToTexture){e.flush(),this.setFramebuffer(null),t.emit(s.POST_RENDER,t),e.projOrtho(0,e.width,e.height,0,-1e3,1e3);var i=p.getTintAppendFloatAlpha;(t.pipeline?t.pipeline:e).batchTexture(t,t.glTexture,t.width,t.height,t.x,t.y,t.width,t.height,t.zoom,t.zoom,t.rotation,t.flipX,!t.flipY,1,1,0,0,0,0,t.width,t.height,i(t._tintTL,t._alphaTL),i(t._tintTR,t._alphaTR),i(t._tintBL,t._alphaBL),i(t._tintBR,t._alphaBR),t._isTinted&&t.tintFill,0,0,this.defaultCamera,null),this.setBlankTexture(!0)}t.mask&&(this.currentCameraMask.mask=null,t.mask.postRenderWebGL(this,t._maskCamera))},preRender:function(){if(!this.contextLost){var t=this.gl,e=this.pipelines;if(t.bindFramebuffer(t.FRAMEBUFFER,null),this.config.clearBeforeRender){var i=this.config.backgroundColor;t.clearColor(i.redGL,i.greenGL,i.blueGL,i.alphaGL),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT)}for(var n in t.enable(t.SCISSOR_TEST),e)e[n].onPreRender();this.currentScissor=[0,0,this.width,this.height],this.scissorStack=[this.currentScissor],this.game.scene.customViewports&&t.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.setPipeline(this.pipelines.TextureTintPipeline)}},render:function(t,e,i,n){if(!this.contextLost){var s=e.list,r=s.length,a=this.pipelines;for(var h in a)a[h].onRender(t,n);if(this.preRenderCamera(n),0===r)return this.setBlendMode(o.BlendModes.NORMAL),void this.postRenderCamera(n);this.currentType="";for(var l=this.currentMask,u=0;u0&&r>0&&(this.setTexture2D(e,0),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,i),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.width=s,e.height=r,this.setTexture2D(null,0)),e},createVideoTexture:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=this.gl,s=n.NEAREST,r=n.NEAREST,o=t.videoWidth,a=t.videoHeight,l=n.CLAMP_TO_EDGE,u=h(o,a);return!e&&u&&(l=n.REPEAT),this.config.antialias&&(s=u?this.mipmapFilter:n.LINEAR,r=n.LINEAR),this.createTexture2D(0,s,r,l,l,n.RGBA,t,o,a,!0,!0,i)},updateVideoTexture:function(t,e,i){void 0===i&&(i=!1);var n=this.gl,s=t.videoWidth,r=t.videoHeight;return s>0&&r>0&&(this.setTexture2D(e,0),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,i),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.width=s,e.height=r,this.setTexture2D(null,0)),e},setTextureFilter:function(t,e){var i=this.gl,n=[i.LINEAR,i.NEAREST][e];return this.setTexture2D(t,0),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,n),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,n),this.setTexture2D(null,0),this},setFloat1:function(t,e,i){return this.setProgram(t),this.gl.uniform1f(this.gl.getUniformLocation(t,e),i),this},setFloat2:function(t,e,i,n){return this.setProgram(t),this.gl.uniform2f(this.gl.getUniformLocation(t,e),i,n),this},setFloat3:function(t,e,i,n,s){return this.setProgram(t),this.gl.uniform3f(this.gl.getUniformLocation(t,e),i,n,s),this},setFloat4:function(t,e,i,n,s,r){return this.setProgram(t),this.gl.uniform4f(this.gl.getUniformLocation(t,e),i,n,s,r),this},setFloat1v:function(t,e,i){return this.setProgram(t),this.gl.uniform1fv(this.gl.getUniformLocation(t,e),i),this},setFloat2v:function(t,e,i){return this.setProgram(t),this.gl.uniform2fv(this.gl.getUniformLocation(t,e),i),this},setFloat3v:function(t,e,i){return this.setProgram(t),this.gl.uniform3fv(this.gl.getUniformLocation(t,e),i),this},setFloat4v:function(t,e,i){return this.setProgram(t),this.gl.uniform4fv(this.gl.getUniformLocation(t,e),i),this},setInt1:function(t,e,i){return this.setProgram(t),this.gl.uniform1i(this.gl.getUniformLocation(t,e),i),this},setInt2:function(t,e,i,n){return this.setProgram(t),this.gl.uniform2i(this.gl.getUniformLocation(t,e),i,n),this},setInt3:function(t,e,i,n,s){return this.setProgram(t),this.gl.uniform3i(this.gl.getUniformLocation(t,e),i,n,s),this},setInt4:function(t,e,i,n,s,r){return this.setProgram(t),this.gl.uniform4i(this.gl.getUniformLocation(t,e),i,n,s,r),this},setMatrix2:function(t,e,i,n){return this.setProgram(t),this.gl.uniformMatrix2fv(this.gl.getUniformLocation(t,e),i,n),this},setMatrix3:function(t,e,i,n){return this.setProgram(t),this.gl.uniformMatrix3fv(this.gl.getUniformLocation(t,e),i,n),this},setMatrix4:function(t,e,i,n){return this.setProgram(t),this.gl.uniformMatrix4fv(this.gl.getUniformLocation(t,e),i,n),this},getMaxTextures:function(){return this.config.maxTextures},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){for(var t=0;t0&&this.flush();var e=this.inverseRotationMatrix;if(t){var i=-t,n=Math.cos(i),s=Math.sin(i);e[1]=s,e[3]=-s,e[0]=e[4]=n}else e[0]=e[4]=1,e[1]=e[3]=0;this.renderer.setMatrix3(this.program,"uInverseRotationMatrix",!1,e),this.currentNormalMapRotation=t}},batchSprite:function(t,e,i){if(this.active){var n=t.texture.dataSource[t.frame.sourceIndex];n&&(this.renderer.setPipeline(this),this.setTexture2D(n.glTexture,1),this.setNormalMapRotation(t.rotation),r.prototype.batchSprite.call(this,t,e,i))}}});a.LIGHT_COUNT=o,t.exports=a},function(t,e){var i={modelMatrixDirty:!1,viewMatrixDirty:!1,projectionMatrixDirty:!1,modelMatrix:null,viewMatrix:null,projectionMatrix:null,mvpInit:function(){return this.modelMatrixDirty=!0,this.viewMatrixDirty=!0,this.projectionMatrixDirty=!0,this.modelMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this},mvpUpdate:function(){var t=this.program;return this.modelMatrixDirty&&(this.renderer.setMatrix4(t,"uModelMatrix",!1,this.modelMatrix),this.modelMatrixDirty=!1),this.viewMatrixDirty&&(this.renderer.setMatrix4(t,"uViewMatrix",!1,this.viewMatrix),this.viewMatrixDirty=!1),this.projectionMatrixDirty&&(this.renderer.setMatrix4(t,"uProjectionMatrix",!1,this.projectionMatrix),this.projectionMatrixDirty=!1),this},modelIdentity:function(){var t=this.modelMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.modelMatrixDirty=!0,this},modelScale:function(t,e,i){var n=this.modelMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.modelMatrixDirty=!0,this},modelTranslate:function(t,e,i){var n=this.modelMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.modelMatrixDirty=!0,this},modelRotateX:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this.modelMatrixDirty=!0,this},modelRotateY:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this.modelMatrixDirty=!0,this},modelRotateZ:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this.modelMatrixDirty=!0,this},viewIdentity:function(){var t=this.viewMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.viewMatrixDirty=!0,this},viewScale:function(t,e,i){var n=this.viewMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.viewMatrixDirty=!0,this},viewTranslate:function(t,e,i){var n=this.viewMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.viewMatrixDirty=!0,this},viewRotateX:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this.viewMatrixDirty=!0,this},viewRotateY:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this.viewMatrixDirty=!0,this},viewRotateZ:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this.viewMatrixDirty=!0,this},viewLoad2D:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=0,e[4]=t[2],e[5]=t[3],e[6]=0,e[7]=0,e[8]=t[4],e[9]=t[5],e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this.viewMatrixDirty=!0,this},viewLoad:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this.viewMatrixDirty=!0,this},projIdentity:function(){var t=this.projectionMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.projectionMatrixDirty=!0,this},projOrtho:function(t,e,i,n,s,r){var o=this.projectionMatrix,a=1/(t-e),h=1/(i-n),l=1/(s-r);return o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*l,o[15]=1,this.projectionMatrixDirty=!0,this},projPersp:function(t,e,i,n){var s=this.projectionMatrix,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this.projectionMatrixDirty=!0,this}};t.exports=i},function(t,e,i){t.exports={Bounce:i(1403),Collision:i(1404),Force:i(1405),Friction:i(1406),Gravity:i(1407),Mass:i(1408),Static:i(1409),Sensor:i(1410),SetBody:i(1411),Sleep:i(1412),Transform:i(1425),Velocity:i(1426)}},function(t,e){var i={};t.exports=i,i.create=function(t,e){var n=t.bodyA,s=t.bodyB,r={id:i.id(n,s),bodyA:n,bodyB:s,activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:n.isSensor||s.isSensor,timeCreated:e,timeUpdated:e,collision:null,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return i.update(r,t,e),r},i.update=function(t,e,n){if(t.collision=e,e.collided){var s=e.supports,r=t.activeContacts,o=e.parentA,a=e.parentB;t.inverseMass=o.inverseMass+a.inverseMass,t.friction=Math.min(o.friction,a.friction),t.frictionStatic=Math.max(o.frictionStatic,a.frictionStatic),t.restitution=Math.max(o.restitution,a.restitution),t.slop=Math.max(o.slop,a.slop);for(var h=0;h>>0;if("function"!=typeof t)throw new TypeError;for(var n=arguments.length>=2?arguments[1]:void 0,s=0;s>16)+(65280&t)+((255&t)<<16)},n={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,_isTinted:!1,tintFill:!1,clearTint:function(){return this.setTint(16777215),this._isTinted=!1,this},setTint:function(t,e,n,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,n=t,s=t),this._tintTL=i(t),this._tintTR=i(e),this._tintBL=i(n),this._tintBR=i(s),this._isTinted=!0,this.tintFill=!1,this},setTintFill:function(t,e,i,n){return this.setTint(t,e,i,n),this.tintFill=!0,this},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=i(t),this._isTinted=!0}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=i(t),this._isTinted=!0}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=i(t),this._isTinted=!0}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=i(t),this._isTinted=!0}},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){return this._isTinted}}};t.exports=n},function(t,e){t.exports="changedata"},function(t,e){t.exports="changedata-"},function(t,e){t.exports="removedata"},function(t,e){t.exports="setdata"},function(t,e){t.exports="destroy"},function(t,e){t.exports="complete"},function(t,e){t.exports="created"},function(t,e){t.exports="error"},function(t,e){t.exports="loop"},function(t,e){t.exports="play"},function(t,e){t.exports="seeked"},function(t,e){t.exports="seeking"},function(t,e){t.exports="stop"},function(t,e){t.exports="timeout"},function(t,e){t.exports="unlocked"},function(t,e,i){var n=i(34);t.exports=function(t,e,i,s,r){return n(t,"alpha",e,i,s,r)}},function(t,e,i){var n=i(34);t.exports=function(t,e,i,s,r){return n(t,"x",e,i,s,r)}},function(t,e,i){var n=i(34);t.exports=function(t,e,i,s,r,o,a){return void 0!==i&&null!==i||(i=e),n(t,"x",e,s,o,a),n(t,"y",i,r,o,a)}},function(t,e,i){var n=i(34);t.exports=function(t,e,i,s,r){return n(t,"y",e,i,s,r)}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=6.28);for(var s=i,r=(n-i)/t.length,o=0;o0?s(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a1)if(0===s){var d=t.length-1;for(o=t[d].x,a=t[d].y,h=d-1;h>=0;h--)l=(c=t[h]).x,u=c.y,c.x=o,c.y=a,o=l,a=u;t[d].x=e,t[d].y=i}else{for(o=t[0].x,a=t[0].y,h=1;h0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<.001&&(e.zoom=.001))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){t.exports={Camera:i(276),BaseCamera:i(91),CameraManager:i(674),Effects:i(284),Events:i(48)}},function(t,e){t.exports="cameradestroy"},function(t,e){t.exports="camerafadeincomplete"},function(t,e){t.exports="camerafadeinstart"},function(t,e){t.exports="camerafadeoutcomplete"},function(t,e){t.exports="camerafadeoutstart"},function(t,e){t.exports="cameraflashcomplete"},function(t,e){t.exports="cameraflashstart"},function(t,e){t.exports="camerapancomplete"},function(t,e){t.exports="camerapanstart"},function(t,e){t.exports="postrender"},function(t,e){t.exports="prerender"},function(t,e){t.exports="camerashakecomplete"},function(t,e){t.exports="camerashakestart"},function(t,e){t.exports="camerazoomcomplete"},function(t,e){t.exports="camerazoomstart"},function(t,e,i){var n=i(23),s=i(0),r=i(48),o=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,o,a,h){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===o&&(o=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene),!o&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=t,this.progress=0,this.red=i,this.green=n,this.blue=s,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h;var l=t?r.FADE_OUT_START:r.FADE_IN_START;return this.camera.emit(l,this.camera,this,e,i,n,s),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed=1?1:1/e*(1+(e*t|0))}},function(t,e,i){var n=i(23),s=i(0),r=i(48),o=i(3),a=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.intensity=new o,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s){return void 0===t&&(t=100),void 0===e&&(e=.05),void 0===i&&(i=!1),void 0===n&&(n=null),void 0===s&&(s=this.camera.scene),!i&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=t,this.progress=0,"number"==typeof e?this.intensity.set(e):this.intensity.set(e.x,e.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=n,this._onUpdateScope=s,this.camera.emit(r.SHAKE_START,this.camera,this,t,e),this.camera)},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(t,e){if(this.isRunning)if(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed0&&(o.preRender(1),t.render(n,e,i,o))}},resetAll:function(){for(var t=0;t1)for(var i=1;i=1)&&(s.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(s.mspointer=!0),navigator.getGamepads&&(s.gamepads=!0),"onwheel"in window||n.ie&&"WheelEvent"in window?s.wheelEvent="wheel":"onmousewheel"in window?s.wheelEvent="mousewheel":n.firefox&&"MouseScrollEvent"in window&&(s.wheelEvent="DOMMouseScroll"),s)},function(t,e,i){var n=i(115),s={audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){s.audioData=!!window.Audio,s.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e&&(t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(s.ogg=!0),(t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||t.canPlayType("audio/opus;").replace(/^no$/,""))&&(s.opus=!0),t.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(s.mp3=!0),t.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")&&(s.wav=!0),(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/aac;").replace(/^no$/,""))&&(s.m4a=!0),t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(s.webm=!0),""!==t.canPlayType('audio/mp4;codecs="ec-3"')))if(n.edge)s.dolby=!0;else if(n.safari&&n.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var i=parseInt(RegExp.$1,10),r=parseInt(RegExp.$2,10);(10===i&&r>=11||i>10)&&(s.dolby=!0)}}catch(t){}return s}()},function(t,e){var i={h264:!1,hls:!1,mp4:!1,ogg:!1,vp9:!1,webm:!1};t.exports=function(){var t=document.createElement("video"),e=!!t.canPlayType;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(i.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.h264=!0,i.mp4=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(i.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(i.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.hls=!0))}catch(t){}return i}()},function(t,e){var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){var t,e="Fullscreen",n="FullScreen",s=["request"+e,"request"+n,"webkitRequest"+e,"webkitRequest"+n,"msRequest"+e,"msRequest"+n,"mozRequest"+n,"mozRequest"+e];for(t=0;tMath.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){var n=i(301);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(13);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e?t:(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e1?t[i]-(n(s-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(s-r,t[r?r-1:0],t[r],t[i1?n(t[i],t[i-1],i-s):n(t[r],t[r+1>i?i:r+1],s-r)}},function(t,e,i){var n=i(155);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){t.exports={GetNext:i(310),IsSize:i(116),IsValue:i(726)}},function(t,e){t.exports=function(t){return t>0&&0==(t&t-1)}},function(t,e,i){t.exports={Ceil:i(311),Floor:i(93),To:i(728)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),n?(i+t)/e:i+t)}},function(t,e,i){var n=new(i(0))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var n=0;n>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e0;e--){var i=Math.floor(this.frac()*(e+1)),n=t[i];t[i]=t[e],t[e]=n}return t}});t.exports=n},function(t,e){t.exports=function(t){for(var e=0,i=0;i1?void 0!==n?(s=(n-t)/(n-i))<0&&(s=0):s=1:s<0&&(s=0),s}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,s=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*s,t.y=Math.sin(i)*s,t.z=n*e,t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var s=[],r=[],o=0;o0&&t<=e*i&&(r=t>e-1?t-(o=Math.floor(t/e))*e:t,s.set(r,o)),s}},function(t,e){t.exports=function(t,e,i){return Math.abs(t-e)<=i}},function(t,e,i){var n=i(171),s=i(318),r=i(319),o=new s,a=new r,h=new n;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},function(t,e){t.exports="addtexture"},function(t,e){t.exports="onerror"},function(t,e){t.exports="onload"},function(t,e){t.exports="ready"},function(t,e){t.exports="removetexture"},function(t,e){t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","","void main()","{"," vec2 uv = gl_FragCoord.xy / uResolution;"," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);"," float alpha = mainColor.a;",""," if (!uInvertMaskAlpha)"," {"," alpha *= (maskColor.a);"," }"," else"," {"," alpha *= (1.0 - maskColor.a);"," }",""," gl_FragColor = vec4(mainColor.rgb * alpha, alpha);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","","precision mediump float;","","attribute vec2 inPosition;","","void main()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_FORWARD_DIFFUSE_FS","","precision mediump float;","","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","","const int kMaxLights = %LIGHT_COUNT%;","","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","","varying vec2 outTexCoord;","varying vec4 outTint;","","void main()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);"," vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.rgb * outTint.a, outTint.a);"," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;",""," for (int index = 0; index < kMaxLights; ++index)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }",""," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);"," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_TEXTURE_TINT_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.rgb * outTint.a, outTint.a);"," vec4 color = texture;",""," if (outTintEffect == 0.0)"," {"," // Multiply texture tint"," color = texture * texel;"," }"," else if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.rgb * outTint.a, texture.a);"," color.a = texture.a * texel.a;"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_TEXTURE_TINT_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform mat4 uModelMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}","",""].join("\n")},function(t,e,i){t.exports={GenerateTexture:i(326),Palettes:i(759)}},function(t,e,i){t.exports={ARNE16:i(327),C64:i(760),CGA:i(761),JMP:i(762),MSX:i(763)}},function(t,e){t.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},function(t,e){t.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},function(t,e){t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},function(t,e){t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},function(t,e,i){t.exports={Path:i(765),CubicBezier:i(328),Curve:i(80),Ellipse:i(329),Line:i(330),QuadraticBezier:i(331),Spline:i(332)}},function(t,e,i){var n=i(0),s=i(328),r=i(329),o=i(5),a=i(330),h=i(766),l=i(331),u=i(11),c=i(332),d=i(3),f=i(13),p=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.name="",this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new d,this._tmpVec2A=new d,this._tmpVec2B=new d,"object"==typeof t?this.fromJSON(t):this.startPoint.set(t,e)},add:function(t){return this.curves.push(t),this},circleTo:function(t,e,i){return void 0===e&&(e=!1),this.ellipseTo(t,t,0,360,e,i)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);return t.equals(e)||this.curves.push(new a(e,t)),this},cubicBezierTo:function(t,e,i,n,r,o){var a,h,l,u=this.getEndPoint();return t instanceof d?(a=t,h=e,l=i):(a=new d(i,n),h=new d(r,o),l=new d(t,e)),this.add(new s(u,a,h,l))},quadraticBezierTo:function(t,e,i,n){var s,r,o=this.getEndPoint();return t instanceof d?(s=t,r=e):(s=new d(i,n),r=new d(t,e)),this.add(new l(o,s,r))},draw:function(t,e){for(var i=0;i0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new d);for(var i=t*this.getLength(),n=this.getCurveLengths(),s=0;s=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new d),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new d),t.copy(this.startPoint)},lineTo:function(t,e){t instanceof d?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new a([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new c(t))},moveTo:function(t,e){return t instanceof d?this.add(new h(t.x,t.y)):this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},function(t,e,i){var n=i(33),s=i(336);t.exports=function(t,e,i){var r=i,o=i,a=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,l=2*i-h;r=s(l,h,t+1/3),o=s(l,h,t),a=s(l,h,t-1/3)}return(new n).setGLTo(r,o,a,1)}},function(t,e,i){var n=i(161);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],s=0;s<=359;s++)i.push(n(s/359,t,e));return i}},function(t,e,i){var n=i(113),s=function(t,e,i,s,r,o,a,h){void 0===a&&(a=100),void 0===h&&(h=0);var l=h/a;return{r:n(t,s,l),g:n(e,r,l),b:n(i,o,l)}};t.exports={RGBWithRGB:s,ColorWithRGB:function(t,e,i,n,r,o){return void 0===r&&(r=100),void 0===o&&(o=0),s(t.r,t.g,t.b,e,i,n,r,o)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),s(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(169),s=i(33);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e,i){var n=i(335);t.exports=function(t,e,i,s,r){return void 0===s&&(s=255),void 0===r&&(r="#"),"#"===r?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1):"0x"+n(s)+n(t)+n(e)+n(i)}},function(t,e,i){t.exports={BitmapMask:i(261),GeometryMask:i(262)}},function(t,e,i){var n={AddToDOM:i(118),DOMContentLoaded:i(337),GetScreenOrientation:i(338),GetTarget:i(343),ParseXML:i(344),RemoveFromDOM:i(175),RequestAnimationFrame:i(324)};t.exports=n},function(t,e,i){t.exports={EventEmitter:i(800)}},function(t,e,i){var n=i(0),s=i(9),r=i(21),o=new n({Extends:s,initialize:function(){s.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},function(t,e,i){var n=i(118),s=i(272),r=i(275),o=i(26),a=i(0),h=i(297),l=i(802),u=i(320),c=i(111),d=i(322),f=i(298),p=i(337),g=i(9),v=i(18),m=i(345),y=i(21),x=i(350),T=i(351),w=i(353),b=i(117),E=i(356),S=i(323),A=i(325),_=i(360),C=new a({initialize:function(t){this.config=new h(t),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new g,this.anims=new s(this),this.textures=new E(this),this.cache=new r(this),this.registry=new c(this),this.input=new m(this,this.config),this.scene=new w(this,this.config.sceneConfig),this.device=f,this.scale=new T(this,this.config),this.sound=null,this.sound=_.create(this),this.loop=new S(this,this.config.fps),this.plugins=new x(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,p(this.boot.bind(this))},boot:function(){y.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),u(this),l(this),d(this),n(this.canvas,this.config.parent),this.textures.once(b.READY,this.texturesReady,this),this.events.emit(v.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(v.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),A(this);var t=this.events;t.on(v.HIDDEN,this.onHidden,this),t.on(v.VISIBLE,this.onVisible,this),t.on(v.BLUR,this.onBlur,this),t.on(v.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e);var n=this.renderer;n.preRender(),i.emit(v.PRE_RENDER,n,t,e),this.scene.render(n),n.postRender(),i.emit(v.POST_RENDER,n,t,e)},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e),i.emit(v.PRE_RENDER),i.emit(v.POST_RENDER)},onHidden:function(){this.loop.pause(),this.events.emit(v.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(v.RESUME)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.events.emit(v.DESTROY),this.events.removeAllListeners(),this.scene.destroy(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=C},function(t,e,i){var n=i(118);t.exports=function(t){var e=t.config;if(e.parent&&e.domCreateContainer){var i=document.createElement("div");i.style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: none;","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=i,n(i,e.parent)}}},function(t,e){t.exports="boot"},function(t,e){t.exports="destroy"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameout"},function(t,e){t.exports="gameover"},function(t,e){t.exports="gameobjectdown"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameobjectmove"},function(t,e){t.exports="gameobjectout"},function(t,e){t.exports="gameobjectover"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="wheel"},function(t,e){t.exports="gameobjectup"},function(t,e){t.exports="gameobjectwheel"},function(t,e){t.exports="boot"},function(t,e){t.exports="process"},function(t,e){t.exports="update"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointerdownoutside"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="pointerupoutside"},function(t,e){t.exports="wheel"},function(t,e){t.exports="pointerlockchange"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="start"},function(t,e){t.exports="update"},function(t,e){t.exports=function(t){if(!t)return window.innerHeight;var e=Math.abs(window.orientation),i={w:0,h:0},n=document.createElement("div");return n.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(n),i.w=90===e?n.offsetHeight:window.innerWidth,i.h=90===e?window.innerWidth:n.offsetHeight,document.documentElement.removeChild(n),n=null,90!==Math.abs(window.orientation)?i.h:i.w}},function(t,e){t.exports="addfile"},function(t,e){t.exports="complete"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="load"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="progress"},function(t,e){t.exports="start"},function(t,e,i){var n=i(2),s=i(178);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=n(t.settings,"physics",!1);if(e||i){var r=[];if(e&&r.push(s(e+"Physics")),i)for(var o in i)o=s(o.concat("Physics")),-1===r.indexOf(o)&&r.push(o);return r}}},function(t,e,i){var n=i(2);t.exports=function(t){var e=t.plugins.getDefaultScenePlugins(),i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e,i){t.exports={game:"game",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"}},function(t,e){t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var s,r=i.getElementsByTagName("SubTexture"),o=0;og||c<-g)&&(c=0),c<0&&(c=g+c),-1!==d&&(g=c+(d+1));for(var v=f,m=f,y=0,x=0,T=0;Tr&&(y=w-r),b>o&&(x=b-o),t.add(T,e,i+v,s+m,h-y,l-x),(v+=h+p)+h>r&&(v=f,m+=l+p)}return t}},function(t,e,i){var n=i(2);t.exports=function(t,e,i){var s=n(i,"frameWidth",null),r=n(i,"frameHeight",s);if(!s)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o=t.source[0];t.add("__BASE",0,0,0,o.width,o.height);var a,h=n(i,"startFrame",0),l=n(i,"endFrame",-1),u=n(i,"margin",0),c=n(i,"spacing",0),d=e.cutX,f=e.cutY,p=e.cutWidth,g=e.cutHeight,v=e.realWidth,m=e.realHeight,y=Math.floor((v-u+c)/(s+c)),x=Math.floor((m-u+c)/(r+c)),T=y*x,w=e.x,b=s-w,E=s-(v-p-w),S=e.y,A=r-S,_=r-(m-g-S);(h>T||h<-T)&&(h=0),h<0&&(h=T+h),-1!==l&&(T=h+(l+1));for(var C=u,M=u,P=0,O=e.sourceIndex,R=0;R0){var r=i-t.length;if(r<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),n&&n.call(s,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.splice(o,1),o--;if(0===(o=e.length))return null;i>0&&o>r&&(e.splice(r),o=r);for(var a=0;a0){var o=n-t.length;if(o<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),s&&s.call(r,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.pop(),a--;if(0===(a=e.length))return null;n>0&&a>o&&(e.splice(o),a=o);for(var h=a-1;h>=0;h--){var l=e[h];t.splice(i,0,l),s&&s.call(r,l)}return e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i0){var n=t[i-1],s=t.indexOf(n);t[i]=n,t[s]=e}return t}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e);if(-1===n||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&it.length-1)throw new Error("Index out of bounds");var r=n(t,e);return i&&i.call(s,r),r}},function(t,e,i){var n=i(68);t.exports=function(t,e,i,s,r){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===r&&(r=t),n(t,e,i)){var o=i-e,a=t.splice(e,o);if(s)for(var h=0;h0&&(t.splice(i,1),t.unshift(e)),e}},function(t,e,i){var n=i(68);t.exports=function(t,e,i,s,r){if(void 0===s&&(s=0),void 0===r&&(r=t.length),n(t,s,r))for(var o=s;o0&&i.maxWidth!==l){for(n=0;nl||U-N>l?(Y.push(X.i-1),X.cr?(Y.push(X.i+X.word.length),N=0,B=null):B=X):X.cr&&(Y.push(X.i+X.word.length),N=0,B=null)}for(n=Y.length-1;n>=0;n--)s=a,r=Y[n],o="\n",a=s.substr(0,r)+o+s.substr(r+1);i.maxWidth=l,i.wrappedText=a,h=a.length,k=[],F=null}for(n=0;nb&&(c=b),d>E&&(d=E);var W=b+w.xAdvance,V=E+v;fR&&(R=D),DR&&(R=D),D0&&(a=(o=z.wrappedText).length);var U=e._bounds.lines;1===N?X=(U.longest-U.lengths[0])/2:2===N&&(X=U.longest-U.lengths[0]);for(var G=s.roundPixels,W=0;W0&&(a=(o=L.wrappedText).length);var D=e._bounds.lines;1===P?R=(D.longest-D.lengths[0])/2:2===P&&(R=D.longest-D.lengths[0]),h.translate(-e.displayOriginX,-e.displayOriginY);for(var k=s.roundPixels,F=0;F0!=t>0,this._alpha=t}}});t.exports=r},function(t,e,i){var n=i(1),s=i(1);n=i(937),s=i(938),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){var r=e.list;if(0!==r.length){var o=e.localTransform;s?(o.loadIdentity(),o.multiply(s),o.translate(e.x,e.y),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY)):o.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);for(var h=e.alphaTopLeft,l=e.alphaTopRight,u=e.alphaBottomLeft,c=e.alphaBottomRight,d=e.scrollFactorX,f=e.scrollFactorY,p=r,g=r.length,v=0;v0||e.cropHeight>0;l&&(h.flush(),t.pushScissor(e.x,e.y,e.cropWidth*e.scaleX,e.cropHeight*e.scaleY));var u=h._tempMatrix1,c=h._tempMatrix2,d=h._tempMatrix3,f=h._tempMatrix4;c.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),u.copyFrom(s.matrix),r?(u.multiplyWithOffset(r,-s.scrollX*e.scrollFactorX,-s.scrollY*e.scrollFactorY),c.e=e.x,c.f=e.y,u.multiply(c,d)):(c.e-=s.scrollX*e.scrollFactorX,c.f-=s.scrollY*e.scrollFactorY,u.multiply(c,d));var p=e.frame,g=p.glTexture,v=p.cutX,m=p.cutY,y=g.width,x=g.height,T=e._isTinted&&e.tintFill,w=n.getTintAppendFloatAlpha(e._tintTL,s.alpha*e._alphaTL),b=n.getTintAppendFloatAlpha(e._tintTR,s.alpha*e._alphaTR),E=n.getTintAppendFloatAlpha(e._tintBL,s.alpha*e._alphaBL),S=n.getTintAppendFloatAlpha(e._tintBR,s.alpha*e._alphaBR);h.setTexture2D(g,0);var A,_,C=0,M=0,P=0,O=0,R=e.letterSpacing,L=0,D=0,k=0,F=0,I=e.scrollX,B=e.scrollY,N=e.fontData,Y=N.chars,X=N.lineHeight,z=e.fontSize/N.size,U=0,G=e._align,W=0,V=0;e.getTextBounds(!1);var H=e._bounds.lines;1===G?V=(H.longest-H.lengths[0])/2:2===G&&(V=H.longest-H.lengths[0]);for(var j=s.roundPixels,q=e.displayCallback,K=e.callbackData,J=0;J0&&e.cropHeight>0&&(h.beginPath(),h.rect(0,0,e.cropWidth,e.cropHeight),h.clip());for(var N=0;N0&&(Y=Y%b-b):Y>b?Y=b:Y<0&&(Y=b+Y%b),null===_&&(_=new o(F+Math.cos(N)*B,I+Math.sin(N)*B,v),E.push(_),k+=.01);k<1+z;)w=Y*k+N,x=F+Math.cos(w)*B,T=I+Math.sin(w)*B,_.points.push(new r(x,T,v)),k+=.01;w=Y+N,x=F+Math.cos(w)*B,T=I+Math.sin(w)*B,_.points.push(new r(x,T,v));break;case n.FILL_RECT:u.setTexture2D(M),u.batchFillRect(p[++P],p[++P],p[++P],p[++P],f,c);break;case n.FILL_TRIANGLE:u.setTexture2D(M),u.batchFillTriangle(p[++P],p[++P],p[++P],p[++P],p[++P],p[++P],f,c);break;case n.STROKE_TRIANGLE:u.setTexture2D(M),u.batchStrokeTriangle(p[++P],p[++P],p[++P],p[++P],p[++P],p[++P],v,f,c);break;case n.LINE_TO:null!==_?_.points.push(new r(p[++P],p[++P],v)):(_=new o(p[++P],p[++P],v),E.push(_));break;case n.MOVE_TO:_=new o(p[++P],p[++P],v),E.push(_);break;case n.SAVE:a.push(f.copyToArray());break;case n.RESTORE:f.copyFromArray(a.pop());break;case n.TRANSLATE:F=p[++P],I=p[++P],f.translate(F,I);break;case n.SCALE:F=p[++P],I=p[++P],f.scale(F,I);break;case n.ROTATE:f.rotate(p[++P]);break;case n.SET_TEXTURE:var U=p[++P],G=p[++P];u.currentFrame=U,u.setTexture2D(U.glTexture,0),u.tintEffect=G,M=U.glTexture;break;case n.CLEAR_TEXTURE:u.currentFrame=t.blankTexture,u.tintEffect=2,M=t.blankTexture.glTexture}}}},function(t,e,i){var n=i(1),s=i(1);n=i(950),s=i(951),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){this.pipeline.batchSprite(e,n,s)}},function(t,e){t.exports=function(t,e,i,n,s){t.batchSprite(e,e.frame,n,s)}},function(t,e,i){var n=i(1),s=i(1);n=i(953),s=i(954),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){this.pipeline.batchSprite(e,n,s)}},function(t,e){t.exports=function(t,e,i,n,s){t.batchSprite(e,e.frame,n,s)}},function(t,e,i){t.exports={GravityWell:i(380),Particle:i(381),ParticleEmitter:i(382),ParticleEmitterManager:i(191),Zones:i(960)}},function(t,e,i){var n=i(0),s=i(312),r=i(82),o=i(2),a=i(57),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return this.propertyValue},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if("number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&(this.has(t,"random")||this.hasBoth(t,"start","end")||this.hasBoth(t,"min","max"))){this.start=this.has(t,"start")?t.start:t.min,this.end=this.has(t,"end")?t.end:t.max;var i=this.hasBoth(t,"min","max")||!!t.random;if(i){var n=t.random;Array.isArray(n)&&(this.start=n[0],this.end=n[1]),this.onEmit=this.randomRangedValueEmit}if(this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var s=this.has(t,"ease")?t.ease:"Linear";this.ease=r(s),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i){var n=t.data[e];return(n.max-n.min)*this.ease(i)+n.min}});t.exports=h},function(t,e,i){var n=i(1),s=i(1);n=i(958),s=i(959),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(10);t.exports=function(t,e,i,s,r){var o=e.emitters.list,a=o.length;if(0!==a){var h=this.pipeline,l=h._tempMatrix1.copyFrom(s.matrix),u=h._tempMatrix2,c=h._tempMatrix3,d=h._tempMatrix4.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);l.multiply(d),t.setPipeline(h);var f=s.roundPixels,p=e.defaultFrame.glTexture,g=n.getTintAppendFloatAlphaAndSwap;h.setTexture2D(p,0);for(var v=0;v?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:"ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",TEXT_SET7:"AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:"ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789"}},function(t,e,i){var n=i(6);t.exports=function(t,e){var i=e.width,s=e.height,r=Math.floor(i/2),o=Math.floor(s/2),a=n(e,"chars","");if(""!==a){var h=n(e,"image",""),l=n(e,"offset.x",0),u=n(e,"offset.y",0),c=n(e,"spacing.x",0),d=n(e,"spacing.y",0),f=n(e,"lineSpacing",0),p=n(e,"charsPerRow",null);null===p&&(p=t.sys.textures.getFrame(h).width/i)>a.length&&(p=a.length);for(var g=l,v=u,m={retroFont:!0,font:h,size:i,lineHeight:s+f,chars:{}},y=0,x=0;x0&&r.maxLines1&&(d+=f*(h-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:f,lineHeight:c}}},function(t,e,i){var n=i(1),s=i(1);n=i(969),s=i(970),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(10);t.exports=function(t,e,i,s,r){if(0!==e.width&&0!==e.height){var o=e.frame,a=o.width,h=o.height,l=n.getTintAppendFloatAlpha;this.pipeline.batchTexture(e,o.glTexture,a,h,e.x,e.y,a/e.style.resolution,h/e.style.resolution,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,a,h,l(e._tintTL,s.alpha*e._alphaTL),l(e._tintTR,s.alpha*e._alphaTR),l(e._tintBL,s.alpha*e._alphaBL),l(e._tintBR,s.alpha*e._alphaBR),e._isTinted&&e.tintFill,0,0,s,r)}}},function(t,e){t.exports=function(t,e,i,n,s){0!==e.width&&0!==e.height&&t.batchSprite(e,e.frame,n,s)}},function(t,e,i){var n=i(0),s=i(15),r=i(6),o=i(972),a={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},h=new n({initialize:function(t,e){this.parent=t,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this._font,this.setStyle(e,!1,!0);var i=r(e,"metrics",!1);this.metrics=i?{ascent:r(i,"ascent",0),descent:r(i,"descent",0),fontSize:r(i,"fontSize",0)}:o(this)},setStyle:function(t,e,i){for(var n in void 0===e&&(e=!0),void 0===i&&(i=!1),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px"),a){var o=i?a[n][1]:this[n];this[n]="wordWrapCallback"===n||"wordWrapCallbackScope"===n?r(t,a[n][0],o):s(t,a[n][0],o)}var h=r(t,"font",null);null!==h&&this.setFont(h,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var l=r(t,"fill",null);return null!==l&&(this.color=l),e?this.update(!0):this.parent},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow:function(t,e){e?(t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur):(t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor=0,t.shadowBlur=0)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=o(this)),this.parent.updateText()},setFont:function(t,e){void 0===e&&(e=!0);var i=t,n="",s="";if("string"!=typeof t)i=r(t,"fontFamily","Courier"),n=r(t,"fontSize","16px"),s=r(t,"fontStyle","");else{var o=t.split(" "),a=0;s=o.length>2?o[a++]:"",n=o[a++]||"16px",i=o[a++]||"Courier"}return i===this.fontFamily&&n===this.fontSize&&s===this.fontStyle||(this.fontFamily=i,this.fontSize=n,this.fontStyle=s,e&&this.update(!0)),this.parent},setFontFamily:function(t){return this.fontFamily!==t&&(this.fontFamily=t,this.update(!0)),this.parent},setFontStyle:function(t){return this.fontStyle!==t&&(this.fontStyle=t,this.update(!0)),this.parent},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize!==t&&(this.fontSize=t,this.update(!0)),this.parent},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.parent.width=t),e&&(this.parent.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setResolution:function(t){return this.resolution=t,this.update(!1)},setStroke:function(t,e){return void 0===e&&(e=this.strokeThickness),void 0===t&&0!==this.strokeThickness?(this.strokeThickness=0,this.update(!0)):this.stroke===t&&this.strokeThickness===e||(this.stroke=t,this.strokeThickness=e,this.update(!0)),this.parent},setShadow:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===n&&(n=0),void 0===s&&(s=!1),void 0===r&&(r=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=n,this.shadowStroke=s,this.shadowFill=r,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},function(t,e,i){var n=i(26);t.exports=function(t){var e=n.create(this),i=e.getContext("2d");t.syncFont(e,i);var s=Math.ceil(i.measureText(t.testString).width*t.baselineX),r=s,o=2*r;r=r*t.baselineY|0,e.width=s,e.height=o,i.fillStyle="#f00",i.fillRect(0,0,s,o),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,r);var a={ascent:0,descent:0,fontSize:0};if(!i.getImageData(0,0,s,o))return a.ascent=r,a.descent=r+6,a.fontSize=a.ascent+a.descent,n.remove(e),a;var h,l,u=i.getImageData(0,0,s,o).data,c=u.length,d=4*s,f=0,p=!1;for(h=0;hr;h--){for(l=0;l0)for(u=o.fillTint,c=n.getTintAppendFloatAlphaAndSwap(e.fillColor,e.fillAlpha*d),u.TL=c,u.TR=c,u.BL=c,u.BR=c,C=0;C0)for(u=o.fillTint,c=n.getTintAppendFloatAlphaAndSwap(e.altFillColor,e.altFillAlpha*d),u.TL=c,u.TR=c,u.BL=c,u.BR=c,C=0;C0){var R=o.strokeTint,L=n.getTintAppendFloatAlphaAndSwap(e.outlineFillColor,e.outlineFillAlpha*d);for(R.TL=L,R.TR=L,R.BL=L,R.BR=L,_=1;_0)for(n(h,e),_=0;_0)for(n(h,e,e.altFillColor,e.altFillAlpha*c),_=0;_0){for(s(h,e,e.outlineFillColor,e.outlineFillAlpha*c),A=1;Ao.vertexCapacity&&o.flush(),o.setTexture2D(u,0);for(var m=o.vertexViewF32,y=o.vertexViewU32,x=o.vertexCount*o.vertexComponentCount-1,T=0,w=e.tintFill,b=0;b0?Math.PI*t.radius*t.radius:0}},function(t,e,i){var n=i(65);t.exports=function(t){return new n(t.x,t.y,t.radius)}},function(t,e,i){var n=i(54);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(54);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},function(t,e,i){var n=i(11);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(95);n.Area=i(1078),n.Circumference=i(378),n.CircumferencePoint=i(190),n.Clone=i(1079),n.Contains=i(96),n.ContainsPoint=i(1080),n.ContainsRect=i(1081),n.CopyFrom=i(1082),n.Equals=i(1083),n.GetBounds=i(1084),n.GetPoint=i(376),n.GetPoints=i(377),n.Offset=i(1085),n.OffsetPoint=i(1086),n.Random=i(152),t.exports=n},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},function(t,e,i){var n=i(95);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(96);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(96);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e,i){var n=i(11);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(4),s=i(201);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r,o,a,h,l=t.x,u=t.y,c=t.radius,d=e.x,f=e.y,p=e.radius;if(u===f)0==(a=(o=-2*f)*o-4*(r=1)*(d*d+(h=(p*p-c*c-d*d+l*l)/(2*(l-d)))*h-2*d*h+f*f-p*p))?i.push(new n(h,-o/(2*r))):a>0&&(i.push(new n(h,(-o+Math.sqrt(a))/(2*r))),i.push(new n(h,(-o-Math.sqrt(a))/(2*r))));else{var g=(l-d)/(u-f),v=(p*p-c*c-d*d+l*l-f*f+u*u)/(2*(u-f));0==(a=(o=2*u*g-2*v*g-2*l)*o-4*(r=g*g+1)*(l*l+u*u+v*v-c*c-2*u*v))?(h=-o/(2*r),i.push(new n(h,v-h*g))):a>0&&(h=(-o+Math.sqrt(a))/(2*r),i.push(new n(h,v-h*g)),h=(-o-Math.sqrt(a))/(2*r),i.push(new n(h,v-h*g)))}}return i}},function(t,e,i){var n=i(203),s=i(202);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC(),h=e.getLineD();n(r,t,i),n(o,t,i),n(a,t,i),n(h,t,i)}return i}},function(t,e,i){var n=i(11),s=i(129);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},function(t,e,i){var n=i(205),s=i(129);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=t.getLineA(),o=t.getLineB(),a=t.getLineC(),h=t.getLineD();n(r,e,i),n(o,e,i),n(a,e,i),n(h,e,i)}return i}},function(t,e,i){var n=i(411),s=i(205);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC();s(r,t,i),s(o,t,i),s(a,t,i)}return i}},function(t,e,i){var n=i(203),s=i(413);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=t.getLineA(),o=t.getLineB(),a=t.getLineC();n(r,e,i),n(o,e,i),n(a,e,i)}return i}},function(t,e,i){var n=i(416),s=i(414);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC();s(t,r,i),s(t,o,i),s(t,a,i)}return i}},function(t,e,i){var n=i(418);t.exports=function(t,e){if(!n(t,e))return!1;var i=Math.min(e.x1,e.x2),s=Math.max(e.x1,e.x2),r=Math.min(e.y1,e.y2),o=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=s&&t.y>=r&&t.y<=o}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===r&&(r=0),!(e>t.right+r||it.bottom+r||si&&(i=h.x),h.xr&&(r=h.y),h.yn(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.centerX,e.y=t.centerY,e}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var n=i(163);t.exports=function(t,e,i){var s=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),n(t,s,r)}},function(t,e,i){var n=i(11),s=i(129);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)?(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y):i.setEmpty(),i}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var n=i(4),s=i(35);t.exports=function(t,e,i){void 0===i&&(i=new n),e=s(e);var r=Math.sin(e),o=Math.cos(e),a=o>0?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r)-1&&(s.splice(a,1),this.clear(o,!0))}t.length=0,this._pendingRemoval.length=0,this._list=s.concat(e.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.isActive()},updatePoll:function(t,e){if(!this.isActive())return!1;if(this.pluginEvents.emit(d.UPDATE,t,e),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var i,n=this.manager,s=n.pointers,r=n.pointersTotal;for(i=0;i0){if(this._pollTimer-=e,!(this._pollTimer<0))return!1;this._pollTimer=this.pollRate}var a=!1;for(i=0;i0&&(a=!0)}return a},update:function(t,e){if(!this.isActive())return!1;for(var i=e.length,n=!1,s=0;s0&&(n=!0)}return this._updatedThisFrame=!0,n},clear:function(t,e){void 0===e&&(e=!1);var i=t.input;if(i){e||this.queueForRemoval(t),i.gameObject=void 0,i.target=void 0,i.hitArea=void 0,i.hitAreaCallback=void 0,i.callbackContext=void 0,this.manager.resetCursor(i),t.input=null;var n=this._draggable.indexOf(t);return n>-1&&this._draggable.splice(n,1),(n=this._drag[0].indexOf(t))>-1&&this._drag[0].splice(n,1),(n=this._over[0].indexOf(t))>-1&&this._over[0].splice(n,1),t}},disable:function(t){t.input.enabled=!1},enable:function(t,e,i,n){return void 0===n&&(n=!1),t.input?t.input.enabled=!0:this.setHitArea(t,e,i),t.input&&n&&!t.input.dropZone&&(t.input.dropZone=n),this},hitTestPointer:function(t){for(var e=this.cameras.getCamerasBelowPointer(t),i=0;i0)return t.camera=n,s}return t.camera=e[0],[]},processDownEvents:function(t){var e=0,i=this._temp,n=this._eventData,s=this._eventContainer;n.cancelled=!1;for(var r=!1,o=0;o0&&l(t.x,t.y,t.downX,t.downY)>=s?i=!0:n>0&&e>=t.downTime+n&&(i=!0),i)return this.setDragState(t,3),this.processDragStartList(t)},processDragStartList:function(t){if(3!==this.getDragState(t))return 0;for(var e=this._drag[t.id],i=0;i1&&(this.sortGameObjects(i),this.topOnly&&i.splice(1)),this._drag[t.id]=i,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?(this.setDragState(t,3),this.processDragStartList(t)):(this.setDragState(t,2),0))},processDragMoveEvent:function(t){if(2===this.getDragState(t)&&this.processDragThresholdEvent(t,this.manager.game.loop.now),4!==this.getDragState(t))return 0;for(var e=this._tempZones,i=this._drag[t.id],n=0;n0?(o.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,o,h),a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h)):(o.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,o,h),e[0]?(a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h)):a.target=null)}else!h&&e[0]&&(a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h));if(o.parentContainer){var u=t.x-a.dragStartXGlobal,c=t.y-a.dragStartYGlobal,f=o.getParentRotation(),p=u*Math.cos(f)+c*Math.sin(f),g=c*Math.cos(f)-u*Math.sin(f);p*=1/o.parentContainer.scaleX,g*=1/o.parentContainer.scaleY,s=p+a.dragStartX,r=g+a.dragStartY}else s=t.x-a.dragX,r=t.y-a.dragY;o.emit(d.GAMEOBJECT_DRAG,t,s,r),this.emit(d.DRAG,t,o,s,r)}return i.length},processDragUpEvent:function(t){for(var e=this._drag[t.id],i=0;i0){var r=this.manager,o=this._eventData,a=this._eventContainer;o.cancelled=!1;for(var h=!1,l=0;l0){var s=this.manager,r=this._eventData,o=this._eventContainer;r.cancelled=!1;var a=!1;this.sortGameObjects(e);for(var h=0;h0){for(this.sortGameObjects(s),e=0;e0){for(this.sortGameObjects(r),e=0;e-1&&this._draggable.splice(s,1)}return this},makePixelPerfect:function(t){void 0===t&&(t=1);var e=this.systems.textures;return h(e,t)},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);var n=!1,s=!1,r=!1,o=!1,h=!1,l=!0;if(m(e)){var u=e;e=p(u,"hitArea",null),i=p(u,"hitAreaCallback",null),n=p(u,"draggable",!1),s=p(u,"dropZone",!1),r=p(u,"cursor",!1),o=p(u,"useHandCursor",!1),h=p(u,"pixelPerfect",!1);var c=p(u,"alphaTolerance",1);h&&(e={},i=this.makePixelPerfect(c)),e&&i||(this.setHitAreaFromTexture(t),l=!1)}else"function"!=typeof e||i||(i=e,e={});for(var d=0;d=e}}},function(t,e,i){t.exports={Events:i(131),KeyboardManager:i(346),KeyboardPlugin:i(1199),Key:i(431),KeyCodes:i(120),KeyCombo:i(432),JustDown:i(1204),JustUp:i(1205),DownDuration:i(1206),UpDuration:i(1207)}},function(t,e){t.exports="keydown"},function(t,e){t.exports="keyup"},function(t,e){t.exports="keycombomatch"},function(t,e){t.exports="down"},function(t,e){t.exports="keydown-"},function(t,e){t.exports="keyup-"},function(t,e){t.exports="up"},function(t,e,i){var n=i(0),s=i(9),r=i(131),o=i(18),a=i(6),h=i(53),l=i(130),u=i(431),c=i(120),d=i(432),f=i(1203),p=i(93),g=new n({Extends:s,initialize:function(t){s.call(this),this.game=t.systems.game,this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.manager=t.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],t.pluginEvents.once(h.BOOT,this.boot,this),t.pluginEvents.on(h.START,this.start,this)},boot:function(){var t=this.settings.input;this.enabled=a(t,"keyboard",!0);var e=a(t,"keyboard.capture",null);e&&this.addCaptures(e),this.sceneInputPlugin.pluginEvents.once(h.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.useQueue?this.sceneInputPlugin.pluginEvents.on(h.UPDATE,this.update,this):this.sceneInputPlugin.manager.events.on(h.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(h.SHUTDOWN,this.shutdown,this),this.game.events.on(o.BLUR,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},addCapture:function(t){return this.manager.addCapture(t),this},removeCapture:function(t){return this.manager.removeCapture(t),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:c.UP,down:c.DOWN,left:c.LEFT,right:c.RIGHT,space:c.SPACE,shift:c.SHIFT})},addKeys:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!1);var n={};if("string"==typeof t){t=t.split(",");for(var s=0;s-1?n[s]=t:n[t.keyCode]=t,e&&this.addCapture(t.keyCode),t.setEmitOnRepeat(i),t}return"string"==typeof t&&(t=c[t.toUpperCase()]),n[t]||(n[t]=new u(this,t),e&&this.addCapture(t),n[t].setEmitOnRepeat(i)),n[t]},removeKey:function(t,e){void 0===e&&(e=!1);var i,n=this.keys;if(t instanceof u){var s=n.indexOf(t);s>-1&&(i=this.keys[s],this.keys[s]=void 0)}else"string"==typeof t&&(t=c[t.toUpperCase()]);return n[t]&&(i=n[t],n[t]=void 0),i&&(i.plugin=null,e&&i.destroy()),this},createCombo:function(t,e){return new d(this,t,e)},checkDown:function(t,e){if(this.enabled&&t.isDown){var i=p(this.time-t.timeDown,e);if(i>t._tick)return t._tick=i,!0}return!1},update:function(){var t=this.manager.queue,e=t.length;if(this.isActive()&&0!==e)for(var i=this.keys,n=0;n0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(s=!0,i=n(t,e))}else s=!0,i=n(t,e);return!s&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},function(t,e){t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},function(t,e){t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},function(t,e,i){var n=i(120),s={};for(var r in n)s[n[r]]=r;t.exports=s},function(t,e){t.exports=function(t){return!!t._justDown&&(t._justDown=!1,!0)}},function(t,e){t.exports=function(t){return!!t._justUp&&(t._justUp=!1,!0)}},function(t,e){t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeDown;return t.isDown&&i'),i.push(''),i.push(''),i.push(this.xhrLoader.responseText),i.push(""),i.push(""),i.push("");var n=[i.join("\n")],o=this;try{var a=new window.Blob(n,{type:"image/svg+xml;charset=utf-8"})}catch(t){return o.state=s.FILE_ERRORED,void o.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(o.data),o.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(o.data),o.onProcessError()},r.createObjectURL(this.data,a,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});o.register("htmlTexture",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r0},isLoading:function(){return this.state===s.LOADER_LOADING||this.state===s.LOADER_PROCESSING},isReady:function(){return this.state===s.LOADER_IDLE||this.state===s.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(a.START,this),0===this.list.size?this.loadComplete():(this.state=s.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(c.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(a.PROGRESS,this.progress)},update:function(){this.state===s.LOADER_LOADING&&this.list.size>0&&this.inflight.sizei&&(n=l,i=c)}}return n},moveTo:function(t,e,i,n,s){void 0===n&&(n=60),void 0===s&&(s=0);var o=Math.atan2(i-t.y,e-t.x);return s>0&&(n=r(t.x,t.y,e,i)/(s/1e3)),t.body.velocity.setToPolar(o,n),o},moveToObject:function(t,e,i,n){return this.moveTo(t,e.x,e.y,i,n)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new p),i.setToPolar(s(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new p),i.setToPolar(t,e)},overlapRect:function(t,e,i,n,s,r){return c(this.world,t,e,i,n,s,r)},overlapCirc:function(t,e,i,n,s){return u(this.world,t,e,i,n,s)},shutdown:function(){if(this.world){var t=this.systems.events;t.off(f.UPDATE,this.world.update,this.world),t.off(f.POST_UPDATE,this.world.postUpdate,this.world),t.off(f.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null}},destroy:function(){this.shutdown(),this.scene.sys.events.off(f.START,this.start,this),this.scene=null,this.systems=null}});d.register("ArcadePhysics",v,"arcadePhysics"),t.exports=v},function(t,e){t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},function(t,e){t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},function(t,e){t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,e,i){return this.body.setCollideWorldBounds(t,e,i),this}}},function(t,e){t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},function(t,e){t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this},setDamping:function(t){return this.body.useDamping=t,this}}},function(t,e){var i={enableBody:function(t,e,i,n,s){return t&&this.body.reset(e,i),n&&(this.body.gameObject.active=!0),s&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};t.exports=i},function(t,e){t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},function(t,e){t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},function(t,e){var i={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}};t.exports=i},function(t,e){t.exports={setMass:function(t){return this.body.mass=t,this}}},function(t,e){t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},function(t,e){t.exports={setVelocity:function(t,e){return this.body.setVelocity(t,e),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,e){return this.body.maxVelocity.set(t,e),this}}},function(t,e,i){var n=i(442),s=i(65),r=i(201),o=i(202);t.exports=function(t,e,i,a,h,l){var u=n(t,e-a,i-a,2*a,2*a,h,l);if(0===u.length)return u;for(var c=new s(e,i,a),d=new s,f=[],p=0;pe.deltaAbsY()?y=-1:e.deltaAbsX()0&&u&&t.checkCollision.right&&h&&t.right>i&&(a=t.right-i)>r&&(a=0),0!==a&&(t.customSeparateX?t.overlapX=a:n(t,a)),a}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):e>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=e,0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},function(t,e,i){var n=i(1264);t.exports=function(t,e,i,s,r,o){var a=0,h=e.faceTop,l=e.faceBottom,u=e.collideUp,c=e.collideDown;return o||(h=!0,l=!0,u=!0,c=!0),t.deltaY()<0&&c&&t.checkCollision.up?l&&t.y0&&u&&t.checkCollision.down&&h&&t.bottom>i&&(a=t.bottom-i)>r&&(a=0),0!==a&&(t.customSeparateY?t.overlapY=a:n(t,a)),a}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):e>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=e,0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},function(t,e,i){var n=i(446);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.x,a=e.velocity.x;if(t.immovable||e.immovable)t.immovable?(e.x+=r,e.velocity.x=o-a*e.bounce.x,t.moves&&(e.y+=(t.y-t.prev.y)*t.friction.y)):(t.x-=r,t.velocity.x=a-o*t.bounce.x,e.moves&&(t.y+=(e.y-e.prev.y)*e.friction.y));else{r*=.5,t.x-=r,e.x+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),l=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),u=.5*(h+l);h-=u,l-=u,t.velocity.x=u+h*t.bounce.x,e.velocity.x=u+l*e.bounce.x}return!0}},function(t,e,i){var n=i(447);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateY||e.customSeparateY)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.y,a=e.velocity.y;if(t.immovable||e.immovable)t.immovable?(e.y+=r,e.velocity.y=o-a*e.bounce.y,t.moves&&(e.x+=(t.x-t.prev.x)*t.friction.x)):(t.y-=r,t.velocity.y=a-o*t.bounce.y,e.moves&&(t.x+=(e.x-e.prev.x)*e.friction.x));else{r*=.5,t.y-=r,e.y+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),l=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),u=.5*(h+l);h-=u,l-=u,t.velocity.y=u+h*t.bounce.y,e.velocity.y=u+l*e.bounce.y}return!0}},function(t,e,i){t.exports={COLLIDE:i(1381),PAUSE:i(1382),RESUME:i(1383)}},function(t,e,i){t.exports={Acceleration:i(1385),BodyScale:i(1386),BodyType:i(1387),Bounce:i(1388),CheckAgainst:i(1389),Collides:i(1390),Debug:i(1391),Friction:i(1392),Gravity:i(1393),Offset:i(1394),SetGameObject:i(1395),Velocity:i(1396)}},function(t,e,i){var n={};t.exports=n;var s=i(101),r=i(37);n.fromVertices=function(t){for(var e={},i=0;i0?this.setFromTileCollision(i):this.setFromTileRectangle(i)}},setFromTileRectangle:function(t){void 0===t&&(t={}),h(t,"isStatic")||(t.isStatic=!0),h(t,"addToWorld")||(t.addToWorld=!0);var e=this.tile.getBounds(),i=e.x+e.width/2,s=e.y+e.height/2,r=n.rectangle(i,s,e.width,e.height,t);return this.setBody(r,t.addToWorld),this},setFromTileCollision:function(t){void 0===t&&(t={}),h(t,"isStatic")||(t.isStatic=!0),h(t,"addToWorld")||(t.addToWorld=!0);for(var e=this.tile.tilemapLayer.scaleX,i=this.tile.tilemapLayer.scaleY,r=this.tile.getLeft(),o=this.tile.getTop(),u=this.tile.getCollisionGroup(),c=a(u,"objects",[]),d=[],f=0;f1&&(t.parts=d,this.setBody(s.create(t),t.addToWorld)),this},setBody:function(t,e){return void 0===e&&(e=!0),this.body&&this.removeBody(),this.body=t,this.body.gameObject=this,e&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0}});t.exports=u},function(t,e,i){var n={};t.exports=n;var s=i(1273),r=i(494),o=i(102);n.collisions=function(t,e){for(var i=[],a=e.pairs.table,h=e.metrics,l=0;l1?1:0;d1?1:0;p0:0!=(t.mask&e.category)&&0!=(e.mask&t.category)}},function(t,e,i){var n={};t.exports=n;var s=i(86),r=i(101);n.collides=function(t,e,i){var o,a,h,l,u=!1;if(i){var c=t.parent,d=e.parent,f=c.speed*c.speed+c.angularSpeed*c.angularSpeed+d.speed*d.speed+d.angularSpeed*d.angularSpeed;u=i&&i.collided&&f<.2,l=i}else l={collided:!1,bodyA:t,bodyB:e};if(i&&u){var p=l.axisBody,g=p===t?e:t,v=[p.axes[i.axisNumber]];if(h=n._overlapAxes(p.vertices,g.vertices,v),l.reused=!0,h.overlap<=0)return l.collided=!1,l}else{if((o=n._overlapAxes(t.vertices,e.vertices,t.axes)).overlap<=0)return l.collided=!1,l;if((a=n._overlapAxes(e.vertices,t.vertices,e.axes)).overlap<=0)return l.collided=!1,l;o.overlaps?s=a:a=0?o.index-1:u.length-1],l.x=s.x-c.x,l.y=s.y-c.y,h=-r.dot(i,l),a=s,s=u[(o.index+1)%u.length],l.x=s.x-c.x,l.y=s.y-c.y,(n=-r.dot(i,l))r?(s.warn("Plugin.register:",n.toString(e),"was upgraded to",n.toString(t)),n._registry[t.name]=t):i-1},n.isFor=function(t,e){var i=t.for&&n.dependencyParse(t.for);return!t.for||e.name===i.name&&n.versionSatisfies(e.version,i.range)},n.use=function(t,e){if(t.uses=(t.uses||[]).concat(e||[]),0!==t.uses.length){for(var i=n.dependencies(t),r=s.topologicalSort(i),o=[],a=0;a0&&!h.silent&&s.info(o.join(" "))}else s.warn("Plugin.use:",n.toString(t),"does not specify any dependencies to install.")},n.dependencies=function(t,e){var i=n.dependencyParse(t),r=i.name;if(!(r in(e=e||{}))){t=n.resolve(t)||t,e[r]=s.map(t.uses||[],function(e){n.isPlugin(e)&&n.register(e);var r=n.dependencyParse(e),o=n.resolve(e);return o&&!n.versionSatisfies(o.version,r.range)?(s.warn("Plugin.dependencies:",n.toString(o),"does not satisfy",n.toString(r),"used by",n.toString(i)+"."),o._warned=!0,t._warned=!0):o||(s.warn("Plugin.dependencies:",n.toString(e),"used by",n.toString(i),"could not be resolved."),t._warned=!0),r.name});for(var o=0;o=s[2];if("^"===i.operator)return s[0]>0?o[0]===s[0]&&r.number>=i.number:s[1]>0?o[1]===s[1]&&o[2]>=s[2]:o[2]===s[2]}return t===e||"*"===t}},function(t,e,i){var n={};t.exports=n;var s=i(215),r=(i(236),i(37));n.create=function(t){var e=s.create(),i={label:"World",gravity:{x:0,y:1,scale:.001},bounds:{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}};return r.extend(e,i,t)}},function(t,e,i){t.exports={BasePlugin:i(454),DefaultPlugins:i(172),PluginCache:i(21),PluginManager:i(350),ScenePlugin:i(1278)}},function(t,e,i){var n=i(454),s=i(0),r=i(22),o=new s({Extends:n,initialize:function(t,e){n.call(this,e),this.scene=t,this.systems=t.sys,t.sys.events.once(r.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=o},function(t,e,i){var n=i(17),s=i(174),r={Center:i(339),Events:i(92),Orientation:i(340),ScaleManager:i(351),ScaleModes:i(341),Zoom:i(342)};r=n(!1,r=n(!1,r=n(!1,r=n(!1,r,s.CENTER),s.ORIENTATION),s.SCALE_MODE),s.ZOOM),t.exports=r},function(t,e,i){var n=i(121),s=i(17),r={Events:i(22),SceneManager:i(353),ScenePlugin:i(1281),Settings:i(355),Systems:i(177)};r=s(!1,r,n),t.exports=r},function(t,e,i){var n=i(23),s=i(0),r=i(22),o=i(2),a=i(21),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene,this.transitionProgress=0,this._elapsed=0,this._target=null,this._duration=0,this._onUpdate,this._onUpdateScope,this._willSleep=!1,this._willRemove=!1,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.pluginStart,this)},boot:function(){this.systems.events.once(r.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},start:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t,e),this},restart:function(t){var e=this.key;return this.manager.queueOp("stop",e),this.manager.queueOp("start",e,t),this},transition:function(t){void 0===t&&(t={});var e=o(t,"target",!1),i=this.manager.getScene(e);if(!e||!this.checkValidTransition(i))return!1;var n=o(t,"duration",1e3);this._elapsed=0,this._target=i,this._duration=n,this._willSleep=o(t,"sleep",!1),this._willRemove=o(t,"remove",!1);var s=o(t,"onUpdate",null);s&&(this._onUpdate=s,this._onUpdateScope=o(t,"onUpdateScope",this.scene));var a=o(t,"allowInput",!1);this.settings.transitionAllowInput=a;var h=i.sys.settings;return h.isTransition=!0,h.transitionFrom=this.scene,h.transitionDuration=n,h.transitionAllowInput=a,o(t,"moveAbove",!1)?this.manager.moveAbove(this.key,e):o(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,e),i.sys.isSleeping()?i.sys.wake():this.manager.start(e,o(t,"data")),this.systems.events.emit(r.TRANSITION_OUT,i,n),this.systems.events.on(r.UPDATE,this.step,this),!0},checkValidTransition:function(t){return!(!t||t.sys.isActive()||t.sys.isTransitioning()||t===this.scene||this.systems.isTransitioning())},step:function(t,e){this._elapsed+=e,this.transitionProgress=n(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;this.systems.events.off(r.UPDATE,this.step,this),t.events.emit(r.TRANSITION_COMPLETE,this.scene),e.isTransition=!1,e.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(t,e,i,n){return this.manager.add(t,e,i,n)},launch:function(t,e){return t&&t!==this.key&&this.manager.queueOp("start",t,e),this},run:function(t,e){return t&&t!==this.key&&this.manager.queueOp("run",t,e),this},pause:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("pause",t,e),this},resume:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("resume",t,e),this},sleep:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("sleep",t,e),this},wake:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("wake",t,e),this},switch:function(t){return t!==this.key&&this.manager.queueOp("switch",this.key,t),this},stop:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t,e),this},setActive:function(t,e,i){void 0===e&&(e=this.key);var n=this.manager.getScene(e);return n&&n.sys.setActive(t,i),this},setVisible:function(t,e){void 0===e&&(e=this.key);var i=this.manager.getScene(e);return i&&i.sys.setVisible(t),this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isPaused:function(t){return void 0===t&&(t=this.key),this.manager.isPaused(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.swapPosition(t,e),this},moveAbove:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveAbove(t,e),this},moveBelow:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveBelow(t,e),this},remove:function(t){return void 0===t&&(t=this.key),this.manager.remove(t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(r.SHUTDOWN,this.shutdown,this),t.off(r.POST_UPDATE,this.step,this),t.off(r.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});a.register("ScenePlugin",h,"scenePlugin"),t.exports=h},function(t,e,i){t.exports={List:i(124),Map:i(157),ProcessQueue:i(183),RTree:i(448),Set:i(107),Size:i(352)}},function(t,e,i){var n=i(17),s=i(1284),r={CanvasTexture:i(357),Events:i(117),FilterMode:s,Frame:i(94),Parsers:i(359),Texture:i(179),TextureManager:i(356),TextureSource:i(358)};r=n(!1,r,s),t.exports=r},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(136),Parsers:i(1315),Formats:i(31),ImageCollection:i(465),ParseToTilemap:i(223),Tile:i(74),Tilemap:i(474),TilemapCreator:i(1324),TilemapFactory:i(1325),Tileset:i(140),LayerData:i(104),MapData:i(105),ObjectLayer:i(468),DynamicTilemapLayer:i(475),StaticTilemapLayer:i(476)}},function(t,e,i){var n=i(24),s=i(51);t.exports=function(t,e,i,r,o,a,h,l){t<0&&(t=0),e<0&&(e=0),void 0===h&&(h=!0);for(var u=n(t,e,i,r,null,l),c=o-t,d=a-e,f=0;f=0&&p=0&&g=v;o--)(h=c[a][o])&&-1!==h.index&&h.visible&&0!==h.alpha&&i.push(h);else if(2===r)for(a=x;a>=y;a--)for(o=v;c[a]&&o=y;a--)for(o=m;c[a]&&o>=v;o--)(h=c[a][o])&&-1!==h.index&&h.visible&&0!==h.alpha&&i.push(h);return u.tilesDrawn=i.length,u.tilesTotal=d*f,i}},function(t,e,i){var n=i(24),s=i(51),r=i(73);t.exports=function(t,e,i,o,a,h,l){for(var u=-1!==l.collideIndexes.indexOf(t),c=n(e,i,o,a,null,l),d=0;d=0;r--)for(s=n.width-1;s>=0;s--)if((o=n.data[r][s])&&o.index===t){if(a===e)return o;a+=1}}else for(r=0;re)){for(var l=t;l<=e;l++)r(l,i,a);if(h)for(var u=0;u=t&&d.index<=e&&n(d,i)}o&&s(0,0,a.width,a.height,a)}}},function(t,e,i){var n=i(73),s=i(51),r=i(218);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a0&&n(a,t)}}e&&s(0,0,i.width,i.height,i)}},function(t,e){t.exports=function(t,e,i,n){if("number"==typeof t)n.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var s=0,r=t.length;s1||e.scaleY>1)&&(u.imageSmoothingEnabled=!1);for(var f=0;f0&&(t.currentPipeline&&t.currentPipeline.vertexCount>0&&t.flush(),r.vertexBuffer=e.vertexBuffer[a],t.setPipeline(r),t.setTexture2D(s[a].glTexture,0),t.gl.drawArrays(r.topology,0,e.vertexCount[a]));r.vertexBuffer=o,r.viewIdentity(),r.modelIdentity()}},function(t,e){t.exports=function(t,e,i,n,s){e.cull(n);var r=e.culledTiles,o=r.length;if(0!==o){var a=t._tempMatrix1,h=t._tempMatrix2,l=t._tempMatrix3;h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),a.copyFrom(n.matrix);var u=t.currentContext,c=e.gidMap;u.save(),s?(a.multiplyWithOffset(s,-n.scrollX*e.scrollFactorX,-n.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y,a.multiply(h,l),l.copyToContext(u)):(h.e-=n.scrollX*e.scrollFactorX,h.f-=n.scrollY*e.scrollFactorY,h.copyToContext(u));var d=n.alpha*e.alpha;(!t.antialias||e.scaleX>1||e.scaleY>1)&&(u.imageSmoothingEnabled=!1);for(var f=0;f-1&&this._active.splice(s,1),n.destroy()}for(i=0;i=n.delay)){var s=n.elapsed-n.delay;n.elapsed=n.delay,!n.hasDispatched&&n.callback&&(n.hasDispatched=!0,n.callback.apply(n.callbackScope,n.args)),n.repeatCount>0?(n.repeatCount--,n.elapsed=s,n.hasDispatched=!1):this._pendingRemoval.push(n)}}}},shutdown:function(){var t;for(t=0;t-1&&(e.state=u.REMOVED,s.splice(r,1)):(e.state=u.REMOVED,n.splice(r,1))}for(i.length=0,i=this._add,t=0;tS&&(S=C),E[A][_]=C}}}var M=o?n(o):null;return a?function(t,e,n,s){var r,o=0,a=s%m,h=Math.floor(s/m);if(a>=0&&a=0&&h>2],r+=i[(3&n[o])<<4|n[o+1]>>4],r+=i[(15&n[o+1])<<2|n[o+2]>>6],r+=i[63&n[o+2]];return s%3==2?r=r.substring(0,r.length-1)+"=":s%3==1&&(r=r.substring(0,r.length-2)+"=="),r}},function(t,e,i){t.exports={Clone:i(67),Extend:i(17),GetAdvancedValue:i(15),GetFastValue:i(2),GetMinMaxValue:i(1350),GetValue:i(6),HasAll:i(1351),HasAny:i(385),HasValue:i(99),IsPlainObject:i(7),Merge:i(106),MergeRight:i(1352),Pick:i(466),SetValue:i(405)}},function(t,e,i){var n=i(6),s=i(23);t.exports=function(t,e,i,r,o){void 0===o&&(o=i);var a=n(t,e,o);return s(a,i,r)}},function(t,e){t.exports=function(t,e){for(var i=0;i=t.pos.x+t.size.x||this.pos.x+this.size.x<=t.pos.x||this.pos.y>=t.pos.y+t.size.y||this.pos.y+this.size.y<=t.pos.y)},resetSize:function(t,e,i,n){return this.pos.x=t,this.pos.y=e,this.size.x=i,this.size.y=n,this},toJSON:function(){return{name:this.name,size:{x:this.size.x,y:this.size.y},pos:{x:this.pos.x,y:this.pos.y},vel:{x:this.vel.x,y:this.vel.y},accel:{x:this.accel.x,y:this.accel.y},friction:{x:this.friction.x,y:this.friction.y},maxVel:{x:this.maxVel.x,y:this.maxVel.y},gravityFactor:this.gravityFactor,bounciness:this.bounciness,minBounceVelocity:this.minBounceVelocity,type:this.type,checkAgainst:this.checkAgainst,collides:this.collides}},fromJSON:function(){},check:function(){},collideWith:function(t,e){this.parent&&this.parent._collideCallback&&this.parent._collideCallback.call(this.parent._callbackScope,this,t,e)},handleMovementTrace:function(){return!0},destroy:function(){this.world.remove(this),this.enabled=!1,this.world=null,this.gameObject=null,this.parent=null}});t.exports=h},function(t,e,i){var n=i(0),s=i(1384),r=new n({initialize:function(t,e){void 0===t&&(t=32),this.tilesize=t,this.data=Array.isArray(e)?e:[],this.width=Array.isArray(e)?e[0].length:0,this.height=Array.isArray(e)?e.length:0,this.lastSlope=55,this.tiledef=s},trace:function(t,e,i,n,s,r){var o={collision:{x:!1,y:!1,slope:!1},pos:{x:t+i,y:e+n},tile:{x:0,y:0}};if(!this.data)return o;var a=Math.ceil(Math.max(Math.abs(i),Math.abs(n))/this.tilesize);if(a>1)for(var h=i/a,l=n/a,u=0;u0?r:0,m=n<0?f:0,y=Math.max(Math.floor(i/f),0),x=Math.min(Math.ceil((i+o)/f),g);u=Math.floor((t.pos.x+v)/f);var T=Math.floor((e+v)/f);if((l>0||u===T||T<0||T>=p)&&(T=-1),u>=0&&u1&&d<=this.lastSlope&&this.checkDef(t,d,e,i,a,h,r,o,T,c));c++)if(1===(d=this.data[c][u])||d>this.lastSlope||d>1&&this.checkDef(t,d,e,i,a,h,r,o,u,c)){if(d>1&&d<=this.lastSlope&&t.collision.slope)break;t.collision.x=!0,t.tile.x=d,t.pos.x=u*f-v+m,e=t.pos.x,a=0;break}}if(s){var w=s>0?o:0,b=s<0?f:0,E=Math.max(Math.floor(t.pos.x/f),0),S=Math.min(Math.ceil((t.pos.x+r)/f),p);c=Math.floor((t.pos.y+w)/f);var A=Math.floor((i+w)/f);if((l>0||c===A||A<0||A>=g)&&(A=-1),c>=0&&c1&&d<=this.lastSlope&&this.checkDef(t,d,e,i,a,h,r,o,u,A));u++)if(1===(d=this.data[c][u])||d>this.lastSlope||d>1&&this.checkDef(t,d,e,i,a,h,r,o,u,c)){if(d>1&&d<=this.lastSlope&&t.collision.slope)break;t.collision.y=!0,t.tile.y=d,t.pos.y=c*f-w+b;break}}},checkDef:function(t,e,i,n,s,r,o,a,h,l){var u=this.tiledef[e];if(!u)return!1;var c=this.tilesize,d=(h+u[0])*c,f=(l+u[1])*c,p=(u[2]-u[0])*c,g=(u[3]-u[1])*c,v=u[4],m=i+s+(g<0?o:0)-d,y=n+r+(p>0?a:0)-f;if(p*y-g*m>0){if(s*-g+r*p<0)return v;var x=Math.sqrt(p*p+g*g),T=g/x,w=-p/x,b=m*T+y*w,E=T*b,S=w*b;return E*E+S*S>=s*s+r*r?v||p*(y-r)-g*(m-s)<.5:(t.pos.x=i+s-E,t.pos.y=n+r-S,t.collision.slope={x:p,y:g,nx:T,ny:w},!0)}return!1}});t.exports=r},function(t,e,i){var n=i(0),s=i(1360),r=i(1361),o=i(1362),a=new n({initialize:function(t){this.world=t,this.sys=t.scene.sys},body:function(t,e,i,n){return new s(this.world,t,e,i,n)},existing:function(t){var e=t.x-t.frame.centerX,i=t.y-t.frame.centerY,n=t.width,s=t.height;return t.body=this.world.create(e,i,n,s),t.body.parent=t,t.body.gameObject=t,t},image:function(t,e,i,n){var s=new r(this.world,t,e,i,n);return this.sys.displayList.add(s),s},sprite:function(t,e,i,n){var s=new o(this.world,t,e,i,n);return this.sys.displayList.add(s),this.sys.updateList.add(s),s},destroy:function(){this.world=null,this.sys=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(1268),r=new n({Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){this.body=t.create(e,i,n,s),this.body.parent=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=r},function(t,e,i){var n=i(0),s=i(1268),r=i(98),o=new n({Extends:r,Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t.scene,e,i,n,s),this.body=t.create(e-this.frame.centerX,i-this.frame.centerY,this.width,this.height),this.body.parent=this,this.body.gameObject=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=o},function(t,e,i){var n=i(0),s=i(1268),r=i(69),o=new n({Extends:r,Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t.scene,e,i,n,s),this.body=t.create(e-this.frame.centerX,i-this.frame.centerY,this.width,this.height),this.body.parent=this,this.body.gameObject=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=o},function(t,e,i){var n=i(1357),s=i(0),r=i(451),o=i(1358),a=i(9),h=i(1267),l=i(2),u=i(99),c=i(107),d=i(1398),f=i(31),p=i(452),g=new s({Extends:a,initialize:function(t,e){a.call(this),this.scene=t,this.bodies=new c,this.gravity=l(e,"gravity",0),this.cellSize=l(e,"cellSize",64),this.collisionMap=new o,this.timeScale=l(e,"timeScale",1),this.maxStep=l(e,"maxStep",.05),this.enabled=!0,this.drawDebug=l(e,"debug",!1),this.debugGraphic;var i=l(e,"maxVelocity",100);if(this.defaults={debugShowBody:l(e,"debugShowBody",!0),debugShowVelocity:l(e,"debugShowVelocity",!0),bodyDebugColor:l(e,"debugBodyColor",16711935),velocityDebugColor:l(e,"debugVelocityColor",65280),maxVelocityX:l(e,"maxVelocityX",i),maxVelocityY:l(e,"maxVelocityY",i),minBounceVelocity:l(e,"minBounceVelocity",40),gravityFactor:l(e,"gravityFactor",1),bounciness:l(e,"bounciness",0)},this.walls={left:null,right:null,top:null,bottom:null},this.delta=0,this._lastId=0,l(e,"setBounds",!1)){var n=e.setBounds;if("boolean"==typeof n)this.setBounds();else{var s=l(n,"x",0),r=l(n,"y",0),h=l(n,"width",t.sys.scale.width),u=l(n,"height",t.sys.scale.height),d=l(n,"thickness",64),f=l(n,"left",!0),p=l(n,"right",!0),g=l(n,"top",!0),v=l(n,"bottom",!0);this.setBounds(s,r,h,u,d,f,p,g,v)}}this.drawDebug&&this.createDebugGraphic()},setCollisionMap:function(t,e){if("string"==typeof t){var i=this.scene.cache.tilemap.get(t);if(!i||i.format!==f.WELTMEISTER)return console.warn("The specified key does not correspond to a Weltmeister tilemap: "+t),null;for(var n,s=i.data.layer,r=0;rr.ACTIVE&&d(this,t,e))},setCollidesNever:function(t){for(var e=0;e=0&&h<=1&&l>=0&&l<=1}function s(t,e,i){return(e[0]-t[0])*(i[1]-t[1])-(i[0]-t[0])*(e[1]-t[1])}function r(t,e,i){return s(t,e,i)>0}function o(t,e,i){return s(t,e,i)>=0}function a(t,e,i){return s(t,e,i)<0}function h(t,e,i){return s(t,e,i)<=0}t.exports={decomp:function(t){var e=function t(e){var i=[],n=[],s=[],r=[];var o=Number.MAX_VALUE;for(var a=0;a0?function t(e,i){if(0===i.length)return[e];if(i instanceof Array&&i.length&&i[0]instanceof Array&&2===i[0].length&&i[0][0]instanceof Array){for(var n=[e],s=0;su)return console.warn("quickDecomp: max level ("+u+") reached."),i;for(var L=0;LA&&(A+=e.length),S=Number.MAX_VALUE,A<_)return i;for(var D=_;D<=A;++D)o(f(O,L-1),f(O,L),f(O,D))&&h(f(O,L+1),f(O,L),f(O,D))&&(E=d(f(O,L),f(O,D)))3&&n>=0;--n)c(f(t,n-1),f(t,n),f(t,n+1),e)&&(t.splice(n%t.length,1),i++);return i},removeDuplicatePoints:function(t,e){for(var i=t.length-1;i>=1;--i)for(var n=t[i],s=i-1;s>=0;--s)E(n,t[s],e)&&t.splice(i,1)},makeCCW:function(t){for(var e=0,i=t,n=1;ni[e][0])&&(e=n);return!r(f(t,e-1),f(t,e),f(t,e+1))&&(function(t){for(var e=[],i=t.length,n=0;n!==i;n++)e.push(t.pop());for(var n=0;n!==i;n++)t[n]=e[n]}(t),!0)}};var l=[],u=[];function c(t,e,i,n){if(n){var r=l,o=u;r[0]=e[0]-t[0],r[1]=e[1]-t[1],o[0]=i[0]-e[0],o[1]=i[1]-e[1];var a=r[0]*o[0]+r[1]*o[1],h=Math.sqrt(r[0]*r[0]+r[1]*r[1]),c=Math.sqrt(o[0]*o[0]+o[1]*o[1]);return Math.acos(a/(h*c))g&&(g=y),a.translate(m,{x:.5*x,y:.5*y}),c=m.bounds.max.x+r,s.addBody(u,m),l=m,f+=1}else c+=r}d+=g+o,c=t}return u},n.chain=function(t,e,i,n,a,h){for(var l=t.bodies,u=1;u0)for(l=0;l0&&(d=f[l-1+(h-1)*e],s.addConstraint(t,r.create(o.extend({bodyA:d,bodyB:c},a)))),n&&ld||o<(l=d-l)||o>i-1-l))return 1===c&&a.translate(u,{x:(o+(i%2==1?1:-1))*f,y:0}),h(t+(u?o*f:0)+o*r,n,o,l,u,c)})},n.newtonsCradle=function(t,e,i,n,o){for(var a=s.create({label:"Newtons Cradle"}),l=0;lu.bounds.max.x||p.bounds.max.yu.bounds.max.y)){var g=n._getRegion(t,p);if(!p.region||g.id!==p.region.id||s){f.broadphaseTests+=1,p.region&&!s||(p.region=g);var v=n._regionUnion(g,p.region);for(o=v.startCol;o<=v.endCol;o++)for(a=v.startRow;a<=v.endRow;a++){h=c[l=n._getBucketId(o,a)];var m=o>=g.startCol&&o<=g.endCol&&a>=g.startRow&&a<=g.endRow,y=o>=p.region.startCol&&o<=p.region.endCol&&a>=p.region.startRow&&a<=p.region.endRow;!m&&y&&y&&h&&n._bucketRemoveBody(t,h,p),(p.region===g||m&&!y||s)&&(h||(h=n._createBucket(c,l)),n._bucketAddBody(t,h,p))}p.region=g,d=!0}}}d&&(t.pairsList=n._createActivePairsList(t))},n.clear=function(t){t.buckets={},t.pairs={},t.pairsList=[]},n._regionUnion=function(t,e){var i=Math.min(t.startCol,e.startCol),s=Math.max(t.endCol,e.endCol),r=Math.min(t.startRow,e.startRow),o=Math.max(t.endRow,e.endRow);return n._createRegion(i,s,r,o)},n._getRegion=function(t,e){var i=e.bounds,s=Math.floor(i.min.x/t.bucketWidth),r=Math.floor(i.max.x/t.bucketWidth),o=Math.floor(i.min.y/t.bucketHeight),a=Math.floor(i.max.y/t.bucketHeight);return n._createRegion(s,r,o,a)},n._createRegion=function(t,e,i,n){return{id:t+","+e+","+i+","+n,startCol:t,endCol:e,startRow:i,endRow:n}},n._getBucketId=function(t,e){return"C"+t+"R"+e},n._createBucket=function(t,e){return t[e]=[]},n._bucketAddBody=function(t,e,i){for(var n=0;n0?n.push(i):delete t.pairs[e[s]];return n}},function(t,e,i){var n={};t.exports=n;var s=i(494),r=i(37);n._pairMaxIdleLife=1e3,n.create=function(t){return r.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},t)},n.update=function(t,e,i){var n,r,o,a,h=t.list,l=t.table,u=t.collisionStart,c=t.collisionEnd,d=t.collisionActive;for(u.length=0,c.length=0,d.length=0,a=0;an._pairMaxIdleLife&&l.push(o);for(o=0;of.friction*f.frictionStatic*k*i&&(I=R,F=o.clamp(f.friction*L*i,-I,I));var B=r.cross(S,m),N=r.cross(A,m),Y=T/(g.inverseMass+v.inverseMass+g.inverseInertia*B*B+v.inverseInertia*N*N);if(D*=Y,F*=Y,P<0&&P*P>n._restingThresh*i)b.normalImpulse=0;else{var X=b.normalImpulse;b.normalImpulse=Math.min(b.normalImpulse+D,0),D=b.normalImpulse-X}if(O*O>n._restingThreshTangent*i)b.tangentImpulse=0;else{var z=b.tangentImpulse;b.tangentImpulse=o.clamp(b.tangentImpulse+F,-I,I),F=b.tangentImpulse-z}s.x=m.x*D+y.x*F,s.y=m.y*D+y.y*F,g.isStatic||g.isSleeping||(g.positionPrev.x+=s.x*g.inverseMass,g.positionPrev.y+=s.y*g.inverseMass,g.anglePrev+=r.cross(S,s)*g.inverseInertia),v.isStatic||v.isSleeping||(v.positionPrev.x-=s.x*v.inverseMass,v.positionPrev.y-=s.y*v.inverseMass,v.anglePrev-=r.cross(A,s)*v.inverseInertia)}}}}},function(t,e,i){var n={};t.exports=n;var s=i(1276),r=i(453),o=i(1373),a=i(1372),h=i(1429),l=i(1371),u=i(235),c=i(215),d=i(236),f=i(37),p=i(62);n.create=function(t,e){e=f.isElement(t)?e:t,t=f.isElement(t)?t:null,e=e||{},(t||e.render)&&f.warn("Engine.create: engine.render is deprecated (see docs)");var i={positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},timing:{timestamp:0,timeScale:1},broadphase:{controller:l}},n=f.extend(i,e);if(t||n.render){var r={element:t,controller:Render};n.render=f.extend(r,n.render)}return n.render&&n.render.controller&&(n.render=n.render.controller.create(n.render)),n.render&&(n.render.engine=n),n.world=e.world||s.create(n.world),n.pairs=a.create(),n.broadphase=n.broadphase.controller.create(n.broadphase),n.metrics=n.metrics||{extended:!1},n.metrics=h.create(n.metrics),n},n.update=function(t,e,i){e=e||1e3/60,i=i||1;var s,l=t.world,f=t.timing,p=t.broadphase,g=[];f.timestamp+=e*f.timeScale;var v={timestamp:f.timestamp};u.trigger(t,"beforeUpdate",v);var m=c.allBodies(l),y=c.allConstraints(l);for(h.reset(t.metrics),t.enableSleeping&&r.update(m,f.timeScale),n._bodiesApplyGravity(m,l.gravity),n._bodiesUpdate(m,e,f.timeScale,i,l.bounds),d.preSolveAll(m),s=0;s0&&u.trigger(t,"collisionStart",{pairs:T.collisionStart}),o.preSolvePosition(T.list),s=0;s0&&u.trigger(t,"collisionActive",{pairs:T.collisionActive}),T.collisionEnd.length>0&&u.trigger(t,"collisionEnd",{pairs:T.collisionEnd}),h.update(t.metrics,t),n._bodiesClearForces(m),u.trigger(t,"afterUpdate",v),t},n.merge=function(t,e){if(f.extend(t,e),e.world){t.world=e.world,n.clear(t);for(var i=c.allBodies(t.world),s=0;s0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit(u.COLLISION_START,e,i,n)}),p.on(e,"collisionActive",function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit(u.COLLISION_ACTIVE,e,i,n)}),p.on(e,"collisionEnd",function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit(u.COLLISION_END,e,i,n)})},setBounds:function(t,e,i,n,s,r,o,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),void 0===s&&(s=128),void 0===r&&(r=!0),void 0===o&&(o=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),this.updateWall(r,"left",t-s,e-s,s,n+2*s),this.updateWall(o,"right",t+i,e-s,s,n+2*s),this.updateWall(a,"top",t,e-s,i,s),this.updateWall(h,"bottom",t,e+n,i,s),this},updateWall:function(t,e,i,n,s,r){var o=this.walls[e];t?(o&&v.remove(this.localWorld,o),i+=s/2,n+=r/2,this.walls[e]=this.create(i,n,s,r,{isStatic:!0,friction:0,frictionStatic:0})):(o&&v.remove(this.localWorld,o),this.walls[e]=null)},createDebugGraphic:function(){var t=this.scene.sys.add.graphics({x:0,y:0});return t.setDepth(Number.MAX_VALUE),this.debugGraphic=t,this.drawDebug=!0,t},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=1),this.localWorld.gravity.x=t,this.localWorld.gravity.y=e,void 0!==i&&(this.localWorld.gravity.scale=i),this},create:function(t,e,i,s,r){var o=n.rectangle(t,e,i,s,r);return v.add(this.localWorld,o),o},add:function(t){return v.add(this.localWorld,t),this},remove:function(t,e){var i=t.body?t.body:t;return a.remove(this.localWorld,i,e),this},removeConstraint:function(t,e){return a.remove(this.localWorld,t,e),this},convertTilemapLayer:function(t,e){var i=t.layer,n=t.getTilesWithin(0,0,i.width,i.height,{isColliding:!0});return this.convertTiles(n,e),this},convertTiles:function(t,e){if(0===t.length)return this;for(var i=0;i1?1:0;r1?1:0;s0?e-o:e+o<0?e+o:0}return n(e,-r,r)}},function(t,e){t.exports=function(t,e){if(t.standing=!1,e.collision.y&&(t.bounciness>0&&Math.abs(t.vel.y)>t.minBounceVelocity?t.vel.y*=-t.bounciness:(t.vel.y>0&&(t.standing=!0),t.vel.y=0)),e.collision.x&&(t.bounciness>0&&Math.abs(t.vel.x)>t.minBounceVelocity?t.vel.x*=-t.bounciness:t.vel.x=0),e.collision.slope){var i=e.collision.slope;if(t.bounciness>0){var n=t.vel.x*i.nx+t.vel.y*i.ny;t.vel.x=(t.vel.x-i.nx*n*2)*t.bounciness,t.vel.y=(t.vel.y-i.ny*n*2)*t.bounciness}else{var s=i.x*i.x+i.y*i.y,r=(t.vel.x*i.x+t.vel.y*i.y)/s;t.vel.x=i.x*r,t.vel.y=i.y*r;var o=Math.atan2(i.x,i.y);o>t.slopeStanding.min&&oi.last.x&&e.last.xi.last.y&&e.last.y0))r=t.collisionMap.trace(e.pos.x,e.pos.y,0,-(e.pos.y+e.size.y-i.pos.y),e.size.x,e.size.y),e.pos.y=r.pos.y,e.bounciness>0&&e.vel.y>e.minBounceVelocity?e.vel.y*=-e.bounciness:(e.standing=!0,e.vel.y=0);else{var l=(e.vel.y-i.vel.y)/2;e.vel.y=-l,i.vel.y=l,s=i.vel.x*t.delta,r=t.collisionMap.trace(e.pos.x,e.pos.y,s,-o/2,e.size.x,e.size.y),e.pos.y=r.pos.y;var u=t.collisionMap.trace(i.pos.x,i.pos.y,0,o/2,i.size.x,i.size.y);i.pos.y=u.pos.y}}},function(t,e,i){t.exports={Factory:i(1364),Image:i(1368),Matter:i(1274),MatterPhysics:i(1431),PolyDecomp:i(1365),Sprite:i(1369),TileBody:i(1271),PhysicsEditorParser:i(1367),World:i(1375)}},function(t,e,i){var n=i(493),s=i(2),r=i(3);t.exports=function(t,e,i){void 0===i&&(i={});var o=e.x,a=e.y;if(e.body={temp:!0,position:{x:o,y:a}},[n.Bounce,n.Collision,n.Force,n.Friction,n.Gravity,n.Mass,n.Sensor,n.SetBody,n.Sleep,n.Static,n.Transform,n.Velocity].forEach(function(t){for(var i in t)(n=t[i]).get&&"function"==typeof n.get||n.set&&"function"==typeof n.set?Object.defineProperty(e,i,{get:t[i].get,set:t[i].set}):Object.defineProperty(e,i,{value:t[i]});var n}),e.world=t,e._tempVec2=new r(o,a),i.hasOwnProperty("type")&&"body"===i.type)e.setExistingBody(i,!0);else{var h=s(i,"shape",null);h||(h="rectangle"),e.setBody(h,i)}return e}},function(t,e){t.exports={setBounce:function(t){return this.body.restitution=t,this}}},function(t,e){var i={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var e=0;if(Array.isArray(t))for(var i=0;i1?1:0;n1;if(!d||t!=d.x||e!=d.y){d&&n?(f=d.x,p=d.y):(f=0,p=0);var s={x:f+t,y:p+e};!n&&d||(d=s),g.push(s),m=f+t,y=p+e}},T=function(t){var e=t.pathSegTypeAsLetter.toUpperCase();if("Z"!==e){switch(e){case"M":case"L":case"T":case"C":case"S":case"Q":m=t.x,y=t.y;break;case"H":m=t.x;break;case"V":y=t.y}x(m,y,t.pathSegType)}};for(n._svgPathToAbsolute(t),o=t.getTotalLength(),l=[],i=0;i0)for(var a=s+1;ae.max.x?i=e.min.x-t.max.x:t.max.xe.max.y?n=e.min.y-t.max.y:t.max.y0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this}});n.ZERO=new n,n.RIGHT=new n(1,0),n.LEFT=new n(-1,0),n.UP=new n(0,-1),n.DOWN=new n(0,1),n.ONE=new n(1,1),t.exports=n},function(t,e,i){var n=i(0),s=i(46),r=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=s.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=r},function(t,e,i){var n=i(0),s=i(23),r=i(19),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.displayList,this.updateList,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){this.systems.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},s.register("GameObjectFactory",o,"add"),t.exports=o},function(t,e){t.exports=function(t,e,i){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return t[e];if(-1!==e.indexOf(".")){for(var n=e.split("."),s=t,r=i,o=0;o>>0},getTintAppendFloatAlpha:function(t,e){return((255&(255*e|0))<<24|t)>>>0},getTintAppendFloatAlphaAndSwap:function(t,e){return((255&(255*e|0))<<24|(255&(0|t))<<16|(255&(t>>8|0))<<8|255&(t>>16|0))>>>0},getFloatsFromUintRGB:function(t){return[(255&(t>>16|0))/255,(255&(t>>8|0))/255,(255&(0|t))/255]},getComponentCount:function(t,e){for(var i=0,n=0;n=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},function(t,e,i){t.exports={Alpha:i(527),AlphaSingle:i(266),Animation:i(498),BlendMode:i(269),ComputedSize:i(546),Crop:i(547),Depth:i(270),Flip:i(548),GetBounds:i(549),Mask:i(274),Origin:i(566),PathFollower:i(567),Pipeline:i(153),ScrollFactor:i(277),Size:i(568),Texture:i(569),TextureCrop:i(570),Tint:i(571),ToJSON:i(278),Transform:i(279),TransformMatrix:i(32),Visible:i(280)}},function(t,e){var i={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=i},function(t,e,i){var n=i(0),s=i(278),r=i(113),o=i(9),a=i(90),h=new n({Extends:o,initialize:function(t,e){o.call(this),this.scene=t,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new r(this)),this},setData:function(t,e){return this.data||(this.data=new r(this)),this.data.set(t,e),this},getData:function(t){return this.data||(this.data=new r(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.input&&(this.input.enabled=!1),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},update:function(){},toJSON:function(){return s(this)},willRender:function(t){return!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return i.unshift(this.scene.sys.displayList.getIndex(t)),i},destroy:function(t){if(void 0===t&&(t=!1),this.scene&&!this.ignoreDestroy){this.preDestroy&&this.preDestroy.call(this),this.emit(a.DESTROY,this);var e=this.scene.sys;t||(e.displayList.remove(this),e.updateList.remove(this)),this.input&&(e.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),t||e.queueDepthSort(),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0,this.removeAllListeners()}}});h.RENDER_MASK=15,t.exports=h},function(t,e,i){var n=i(168),s=i(6);t.exports=function(t,e,i){var r=s(t,e,null);if(null===r)return i;if(Array.isArray(r))return n.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return n.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return n.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},function(t,e,i){var n=i(0),s=i(23),r=i(19),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.displayList,this.updateList,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},s.register("GameObjectCreator",o,"make"),t.exports=o},function(t,e,i){var n=i(7),s=function(){var t,e,i,r,o,a,h=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof h&&(c=h,h=arguments[1]||{},l=2),u===l&&(h=this,--l);l=400&&t.status<=599&&(n=!1),this.resetXHR(),this.loader.nextFile(this,n)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(r.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=s.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=s.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){this.state=s.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.cache.add(this.key,this.data),this.pendingDestroy()},pendingDestroy:function(t){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(r.FILE_COMPLETE,e,i,t),this.loader.emit(r.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this)},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var n=new FileReader;n.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+n.result.split(",")[1]},n.onerror=t.onerror,n.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},function(t,e){t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},function(t,e){var i={},n={},s={register:function(t,e,n,s){void 0===s&&(s=!1),i[t]={plugin:e,mapping:n,custom:s}},registerCustom:function(t,e,i,s){n[t]={plugin:e,mapping:i,data:s}},hasCore:function(t){return i.hasOwnProperty(t)},hasCustom:function(t){return n.hasOwnProperty(t)},getCore:function(t){return i[t]},getCustom:function(t){return n[t]},getCustomClass:function(t){return n.hasOwnProperty(t)?n[t].plugin:null},remove:function(t){i.hasOwnProperty(t)&&delete i[t]},removeCustom:function(t){n.hasOwnProperty(t)&&delete n[t]},destroyCorePlugins:function(){for(var t in i)i.hasOwnProperty(t)&&delete i[t]},destroyCustomPlugins:function(){for(var t in n)n.hasOwnProperty(t)&&delete n[t]}};t.exports=s},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=o.width),void 0===s&&(s=o.height);var a=n(r,"isNotEmpty",!1),h=n(r,"isColliding",!1),l=n(r,"hasInterestingFace",!1);t<0&&(i+=t,t=0),e<0&&(s+=e,e=0),t+i>o.width&&(i=Math.max(o.width-t,0)),e+s>o.height&&(s=Math.max(o.height-e,0));for(var u=[],c=e;c=0;o--)t[o][e]=i+a*n,a++;return t}},function(t,e,i){var n,s,r,o=i(29),a=i(164),h=[],l=!1;t.exports={create2D:function(t,e,i){return n(t,e,i,o.CANVAS)},create:n=function(t,e,i,n,r){var u;void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=o.CANVAS),void 0===r&&(r=!1);var c=s(n);return null===c?(c={parent:t,canvas:document.createElement("canvas"),type:n},n===o.CANVAS&&h.push(c),u=c.canvas):(c.parent=t,u=c.canvas),r&&(c.parent=u),u.width=e,u.height=i,l&&n===o.CANVAS&&a.disable(u.getContext("2d")),u},createWebGL:function(t,e,i){return n(t,e,i,o.WEBGL)},disableSmoothing:function(){l=!0},enableSmoothing:function(){l=!1},first:s=function(t){if(void 0===t&&(t=o.CANVAS),t===o.WEBGL)return null;for(var e=0;e0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):n||r?s.TAU-(r>0?Math.acos(-n/this.scaleY):-Math.acos(n/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),n=this.matrix,s=n[0],r=n[1],o=n[2],a=n[3];return n[0]=s*i+o*e,n[1]=r*i+a*e,n[2]=s*-e+o*i,n[3]=r*-e+a*i,this},multiply:function(t,e){var i=this.matrix,n=t.matrix,s=i[0],r=i[1],o=i[2],a=i[3],h=i[4],l=i[5],u=n[0],c=n[1],d=n[2],f=n[3],p=n[4],g=n[5],v=void 0===e?this:e;return v.a=u*s+c*o,v.b=u*r+c*a,v.c=d*s+f*o,v.d=d*r+f*a,v.e=p*s+g*o+h,v.f=p*r+g*a+l,v},multiplyWithOffset:function(t,e,i){var n=this.matrix,s=t.matrix,r=n[0],o=n[1],a=n[2],h=n[3],l=e*r+i*a+n[4],u=e*o+i*h+n[5],c=s[0],d=s[1],f=s[2],p=s[3],g=s[4],v=s[5];return n[0]=c*r+d*a,n[1]=c*o+d*h,n[2]=f*r+p*a,n[3]=f*o+p*h,n[4]=g*r+v*a+l,n[5]=g*o+v*h+u,this},transform:function(t,e,i,n,s,r){var o=this.matrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],d=o[5];return o[0]=t*a+e*l,o[1]=t*h+e*u,o[2]=i*a+n*l,o[3]=i*h+n*u,o[4]=s*a+r*l+c,o[5]=s*h+r*u+d,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var n=this.matrix,s=n[0],r=n[1],o=n[2],a=n[3],h=n[4],l=n[5];return i.x=t*s+e*o+h,i.y=t*r+e*a+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=e*s-i*n;return t[0]=s/a,t[1]=-i/a,t[2]=-n/a,t[3]=e/a,t[4]=(n*o-s*r)/a,t[5]=-(e*o-i*r)/a,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){var e=this.matrix;return t.setTransform(e[0],e[1],e[2],e[3],e[4],e[5]),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,i,n,s,r){var o=this.matrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=n,o[4]=s,o[5]=r,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],n=e[1],s=e[2],r=e[3],o=i*r-n*s;if(t.translateX=e[4],t.translateY=e[5],i||n){var a=Math.sqrt(i*i+n*n);t.rotation=n>0?Math.acos(i/a):-Math.acos(i/a),t.scaleX=a,t.scaleY=o/a}else if(s||r){var h=Math.sqrt(s*s+r*r);t.rotation=.5*Math.PI-(r>0?Math.acos(-s/h):-Math.acos(s/h)),t.scaleX=o/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,i,n,s){var r=this.matrix,o=Math.sin(i),a=Math.cos(i);return r[4]=t,r[5]=e,r[0]=a*n,r[1]=o*n,r[2]=-o*s,r[3]=a*s,this},applyInverse:function(t,e,i){void 0===i&&(i=new r);var n=this.matrix,s=n[0],o=n[1],a=n[2],h=n[3],l=n[4],u=n[5],c=1/(s*h+a*-o);return i.x=h*c*t+-a*c*e+(u*a-l*h)*c,i.y=s*c*e+-o*c*t+(-u*s+l*o)*c,i},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.decomposedMatrix=null}});t.exports=o},function(t,e,i){var n=i(0),s=i(162),r=i(292),o=i(163),a=i(293),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(t,e,i,n)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(t,e,i,n,s){return void 0===n&&(n=255),void 0===s&&(s=!0),this._locked=!0,this.red=t,this.green=e,this.blue=i,this.alpha=n,this._locked=!1,this.update(s)},setGLTo:function(t,e,i,n){return void 0===n&&(n=1),this._locked=!0,this.redGL=t,this.greenGL=e,this.blueGL=i,this.alphaGL=n,this._locked=!1,this.update(!0)},setFromRGB:function(t){return this._locked=!0,this.red=t.r,this.green=t.g,this.blue=t.b,t.hasOwnProperty("a")&&(this.alpha=t.a),this._locked=!1,this.update(!0)},setFromHSV:function(t,e,i){return o(t,e,i,this)},update:function(t){if(void 0===t&&(t=!1),this._locked)return this;var e=this.r,i=this.g,n=this.b,o=this.a;return this._color=s(e,i,n),this._color32=r(e,i,n,o),this._rgba="rgba("+e+","+i+","+n+","+o/255+")",t&&a(e,i,n,this),this},updateHSV:function(){var t=this.r,e=this.g,i=this.b;return a(t,e,i,this),this},clone:function(){return new h(this.r,this.g,this.b,this.a)},gray:function(t){return this.setTo(t,t,t)},random:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t)),n=Math.floor(t+Math.random()*(e-t)),s=Math.floor(t+Math.random()*(e-t));return this.setTo(i,n,s)},randomGray:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t));return this.setTo(i,i,i)},saturate:function(t){return this.s+=t/100,this},desaturate:function(t){return this.s-=t/100,this},lighten:function(t){return this.v+=t/100,this},darken:function(t){return this.v-=t/100,this},brighten:function(t){var e=this.r,i=this.g,n=this.b;return e=Math.max(0,Math.min(255,e-Math.round(-t/100*255))),i=Math.max(0,Math.min(255,i-Math.round(-t/100*255))),n=Math.max(0,Math.min(255,n-Math.round(-t/100*255))),this.setTo(e,i,n)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(t){this.gl[0]=Math.min(Math.abs(t),1),this.r=Math.floor(255*this.gl[0]),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(t){this.gl[1]=Math.min(Math.abs(t),1),this.g=Math.floor(255*this.gl[1]),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(t){this.gl[2]=Math.min(Math.abs(t),1),this.b=Math.floor(255*this.gl[2]),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(t){this.gl[3]=Math.min(Math.abs(t),1),this.a=Math.floor(255*this.gl[3]),this.update()}},red:{get:function(){return this.r},set:function(t){t=Math.floor(Math.abs(t)),this.r=Math.min(t,255),this.gl[0]=t/255,this.update(!0)}},green:{get:function(){return this.g},set:function(t){t=Math.floor(Math.abs(t)),this.g=Math.min(t,255),this.gl[1]=t/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(t){t=Math.floor(Math.abs(t)),this.b=Math.min(t,255),this.gl[2]=t/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(t){t=Math.floor(Math.abs(t)),this.a=Math.min(t,255),this.gl[3]=t/255,this.update()}},h:{get:function(){return this._h},set:function(t){this._h=t,o(t,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(t){this._s=t,o(this._h,t,this._v,this)}},v:{get:function(){return this._v},set:function(t){this._v=t,o(this._h,this._s,t,this)}}});t.exports=h},function(t,e){t.exports=function(t,e,i,n,s,r){var o;void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=1);var a=0,h=t.length;if(1===r)for(o=s;o=0;o--)t[o][e]+=i+a*n,a++;return t}},function(t,e,i){var n=i(13);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.fillColor,r=n||e.fillAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.fillStyle="rgba("+o+","+a+","+h+","+r+")"}},function(t,e){var i={};t.exports=i,function(){i._nextId=0,i._seed=0,i._nowStartTime=+new Date,i.extend=function(t,e){var n,s;"boolean"==typeof e?(n=2,s=e):(n=1,s=!0);for(var r=n;r0;e--){var n=Math.floor(i.random()*(e+1)),s=t[e];t[e]=t[n],t[n]=s}return t},i.choose=function(t){return t[Math.floor(i.random()*t.length)]},i.isElement=function(t){return"undefined"!=typeof HTMLElement?t instanceof HTMLElement:!!(t&&t.nodeType&&t.nodeName)},i.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},i.isFunction=function(t){return"function"==typeof t},i.isPlainObject=function(t){return"object"==typeof t&&t.constructor===Object},i.isString=function(t){return"[object String]"===toString.call(t)},i.clamp=function(t,e,i){return ti?i:t},i.sign=function(t){return t<0?-1:1},i.now=function(){if("undefined"!=typeof window&&window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return new Date-i._nowStartTime},i.random=function(e,i){return e=void 0!==e?e:0,i=void 0!==i?i:1,e+t()*(i-e)};var t=function(){return i._seed=(9301*i._seed+49297)%233280,i._seed/233280};i.colorToNumber=function(t){return 3==(t=t.replace("#","")).length&&(t=t.charAt(0)+t.charAt(0)+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2)),parseInt(t,16)},i.logLevel=1,i.log=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.info=function(){console&&i.logLevel>0&&i.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.warn=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.nextId=function(){return i._nextId++},i.indexOf=function(t,e){if(t.indexOf)return t.indexOf(e);for(var i=0;i=e&&t.y<=i&&t.y+t.height>=i}},function(t,e,i){t.exports={DESTROY:i(641),FADE_IN_COMPLETE:i(642),FADE_IN_START:i(643),FADE_OUT_COMPLETE:i(644),FADE_OUT_START:i(645),FLASH_COMPLETE:i(646),FLASH_START:i(647),PAN_COMPLETE:i(648),PAN_START:i(649),POST_RENDER:i(650),PRE_RENDER:i(651),SHAKE_COMPLETE:i(652),SHAKE_START:i(653),ZOOM_COMPLETE:i(654),ZOOM_START:i(655)}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.strokeColor,r=n||e.strokeAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.strokeStyle="rgba("+o+","+a+","+h+","+r+")",t.lineWidth=e.lineWidth}},function(t,e){t.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},function(t,e,i){var n=i(138),s=i(24);t.exports=function(t,e,i,r,o){for(var a=null,h=null,l=null,u=null,c=s(t,e,i,r,null,o),d=0;d0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e,i){var n=i(0),s=i(272),r=i(150),o=i(46),a=i(151),h=i(3),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=o.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(t){return void 0===t&&(t=new h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=l},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e,i){t.exports={COMPLETE:i(882),DECODED:i(883),DECODED_ALL:i(884),DESTROY:i(885),DETUNE:i(886),GLOBAL_DETUNE:i(887),GLOBAL_MUTE:i(888),GLOBAL_RATE:i(889),GLOBAL_VOLUME:i(890),LOOP:i(891),LOOPED:i(892),MUTE:i(893),PAUSE_ALL:i(894),PAUSE:i(895),PLAY:i(896),RATE:i(897),RESUME_ALL:i(898),RESUME:i(899),SEEK:i(900),STOP_ALL:i(901),STOP:i(902),UNLOCKED:i(903),VOLUME:i(904)}},function(t,e,i){var n=i(0),s=i(20),r=i(21),o=i(8),a=i(2),h=i(6),l=i(7),u=new n({Extends:r,initialize:function(t,e,i,n,o){var u="json";if(l(e)){var c=e;e=a(c,"key"),i=a(c,"url"),n=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"dataKey",o)}var d={type:"json",cache:t.cacheManager.json,extension:u,responseType:"text",key:e,url:i,xhrSettings:n,config:o};r.call(this,t,d),l(i)&&(this.data=o?h(i,o):i,this.state=s.FILE_POPULATED)},onProcess:function(){if(this.state!==s.FILE_POPULATED){this.state=s.FILE_PROCESSING;var t=JSON.parse(this.xhrLoader.responseText),e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});o.register("json",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s0&&r.rotateAbout(o.position,i,t.position,o.position)}},n.setVelocity=function(t,e){t.positionPrev.x=t.position.x-e.x,t.positionPrev.y=t.position.y-e.y,t.velocity.x=e.x,t.velocity.y=e.y,t.speed=r.magnitude(t.velocity)},n.setAngularVelocity=function(t,e){t.anglePrev=t.angle-e,t.angularVelocity=e,t.angularSpeed=Math.abs(t.angularVelocity)},n.translate=function(t,e){n.setPosition(t,r.add(t.position,e))},n.rotate=function(t,e,i){if(i){var s=Math.cos(e),r=Math.sin(e),o=t.position.x-i.x,a=t.position.y-i.y;n.setPosition(t,{x:i.x+(o*s-a*r),y:i.y+(o*r+a*s)}),n.setAngle(t,t.angle+e)}else n.setAngle(t,t.angle+e)},n.scale=function(t,e,i,r){var o=0,a=0;r=r||t.position;for(var u=0;u0&&(o+=c.area,a+=c.inertia),c.position.x=r.x+(c.position.x-r.x)*e,c.position.y=r.y+(c.position.y-r.y)*i,h.update(c.bounds,c.vertices,t.velocity)}t.parts.length>1&&(t.area=o,t.isStatic||(n.setMass(t,t.density*o),n.setInertia(t,a))),t.circleRadius&&(e===i?t.circleRadius*=e:t.circleRadius=null)},n.update=function(t,e,i,n){var o=Math.pow(e*i*t.timeScale,2),a=1-t.frictionAir*i*t.timeScale,u=t.position.x-t.positionPrev.x,c=t.position.y-t.positionPrev.y;t.velocity.x=u*a*n+t.force.x/t.mass*o,t.velocity.y=c*a*n+t.force.y/t.mass*o,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.position.x+=t.velocity.x,t.position.y+=t.velocity.y,t.angularVelocity=(t.angle-t.anglePrev)*a*n+t.torque/t.inertia*o,t.anglePrev=t.angle,t.angle+=t.angularVelocity,t.speed=r.magnitude(t.velocity),t.angularSpeed=Math.abs(t.angularVelocity);for(var d=0;d0&&(f.position.x+=t.velocity.x,f.position.y+=t.velocity.y),0!==t.angularVelocity&&(s.rotate(f.vertices,t.angularVelocity,t.position),l.rotate(f.axes,t.angularVelocity),d>0&&r.rotateAbout(f.position,t.angularVelocity,t.position,f.position)),h.update(f.bounds,f.vertices,t.velocity)}},n.applyForce=function(t,e,i){t.force.x+=i.x,t.force.y+=i.y;var n=e.x-t.position.x,s=e.y-t.position.y;t.torque+=n*i.y-s*i.x},n._totalProperties=function(t){for(var e={mass:0,area:0,inertia:0,centre:{x:0,y:0}},i=1===t.parts.length?0:1;i80*i){n=h=t[0],a=l=t[1];for(var T=i;Th&&(h=u),f>l&&(l=f);g=0!==(g=Math.max(h-n,l-a))?1/g:0}return o(y,x,i,n,a,g),x}function s(t,e,i,n,s){var r,o;if(s===A(t,e,i,n)>0)for(r=e;r=e;r-=n)o=b(r,t[r],t[r+1],o);return o&&y(o,o.next)&&(E(o),o=o.next),o}function r(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!y(n,n.next)&&0!==m(n.prev,n,n.next))n=n.next;else{if(E(n),(n=e=n.prev)===n.next)break;i=!0}}while(i||n!==e);return e}function o(t,e,i,n,s,c,d){if(t){!d&&c&&function(t,e,i,n){var s=t;do{null===s.z&&(s.z=f(s.x,s.y,e,i,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,i,n,s,r,o,a,h,l=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||h>0&&n;)0!==a&&(0===h||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,h--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,l*=2}while(o>1)}(s)}(t,n,s,c);for(var p,g,v=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,n,s,c):a(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),E(t),t=g.next,v=g.next;else if((t=g)===v){d?1===d?o(t=l(t,e,i),e,i,n,s,c,2):2===d&&u(t,e,i,n,s,c):o(r(t),e,i,n,s,c,1);break}}}function a(t){var e=t.prev,i=t,n=t.next;if(m(e,i,n)>=0)return!1;for(var s=t.next.next;s!==t.prev;){if(g(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&m(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function h(t,e,i,n){var s=t.prev,r=t,o=t.next;if(m(s,r,o)>=0)return!1;for(var a=s.xr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,u=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=f(a,h,e,i,n),d=f(l,u,e,i,n),p=t.prevZ,v=t.nextZ;p&&p.z>=c&&v&&v.z<=d;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&m(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,v!==t.prev&&v!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&m(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;v&&v.z<=d;){if(v!==t.prev&&v!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function l(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!y(s,r)&&x(s,n,n.next,r)&&T(s,r)&&T(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),E(n),E(n.next),n=t=r),n=n.next}while(n!==t);return n}function u(t,e,i,n,s,a){var h=t;do{for(var l=h.next.next;l!==h.prev;){if(h.i!==l.i&&v(h,l)){var u=w(h,l);return h=r(h,h.next),u=r(u,u.next),o(h,e,i,n,s,a),void o(u,e,i,n,s,a)}l=l.next}h=h.next}while(h!==t)}function c(t,e){return t.x-e.x}function d(t,e){if(e=function(t,e){var i,n=e,s=t.x,r=t.y,o=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&a>o){if(o=a,a===s){if(r===n.y)return n;if(r===n.next.y)return n.next}i=n.x=n.x&&n.x>=u&&s!==n.x&&g(ri.x)&&T(n,t)&&(i=n,d=h),n=n.next;return i}(t,e)){var i=w(e,t);r(i,i.next)}}function f(t,e,i,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*s)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*s)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{e.x=0&&(t-o)*(n-a)-(i-o)*(e-a)>=0&&(i-o)*(r-a)-(s-o)*(n-a)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&x(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&T(t,e)&&T(e,t)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(t,e)}function m(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function y(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,i,n){return!!(y(t,e)&&y(i,n)||y(t,n)&&y(i,e))||m(t,e,i)>0!=m(t,e,n)>0&&m(i,n,t)>0!=m(i,n,e)>0}function T(t,e){return m(t.prev,t,t.next)<0?m(t,e,t.next)>=0&&m(t,t.prev,e)>=0:m(t,e,t.prev)<0||m(t,t.next,e)<0}function w(t,e){var i=new S(t.i,t.x,t.y),n=new S(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function b(t,e,i,n){var s=new S(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function E(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function S(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(t,e,i,n){for(var s=0,r=e,o=i-n;r0&&(n+=t[s-1].length,i.holes.push(n))}return i}},function(t,e){t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},function(t,e){t.exports=function(t,e,i,n){var s=t.length;if(e<0||e>s||e>=i||i>s||e+i>s){if(n)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},function(t,e,i){var n=i(0),s=i(12),r=i(14),o=i(960),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Size,s.TextureCrop,s.Tint,s.Transform,s.Visible,o],initialize:function(t,e,i,n,o){r.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new s.Animation(this),this.setTexture(n,o),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e,i){return this.anims.play(t,e,i),this},toJSON:function(){return s.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=a},function(t,e,i){var n=i(10);t.exports=function(t,e,i,s,r){var o=t.strokeTint,a=n.getTintAppendFloatAlphaAndSwap(e.strokeColor,e.strokeAlpha*i);o.TL=a,o.TR=a,o.BL=a,o.BR=a;var h=e.pathData,l=h.length-1,u=e.lineWidth,c=u/2,d=h[0]-s,f=h[1]-r;e.closePath||(l-=2);for(var p=2;p=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=u},function(t,e,i){var n=i(0),s=i(20),r=i(21),o=i(8),a=i(2),h=i(7),l=new n({Extends:r,initialize:function t(e,i,n,s,o){var l,u="png";if(h(i)){var c=i;i=a(c,"key"),n=a(c,"url"),l=a(c,"normalMap"),s=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"frameConfig")}Array.isArray(n)&&(l=n[1],n=n[0]);var d={type:"image",cache:e.textureManager,extension:u,responseType:"blob",key:i,url:n,xhrSettings:s,config:o};if(r.call(this,e,d),l){var f=new t(e,this.key,l,s,o);f.type="normalMap",this.setLink(f),e.addFile(f)}},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){r.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(t.data),t.onProcessError()},r.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===s.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});o.register("image",function(t,e,i){if(Array.isArray(t))for(var n=0;nthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=t.properties,this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(t){var e=this.tilemapLayer;return e?e.tileToWorldX(this.x,t):this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return void 0===e&&(e=new r),e.x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-e.y,e},getCenterX:function(t){return(this.getLeft(t)+this.getRight(t))/2},getCenterY:function(t){return(this.getTop(t)+this.getBottom(t))/2},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){(void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){(void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight,this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.layer.tilemapLayer;if(t){var e=t.gidMap[this.index];if(e)return e}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=o},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e){t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,n=t[e],s=e;si&&(e=i/2);var n=Math.max(1,Math.round(i/e));return s(this.getSpacedPoints(n),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],n=this.getPoint(0,this._tmpVec2A),s=0;i.push(0);for(var r=1;r<=t;r++)s+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(n),i.push(s),n.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var n=0;n<=t;n++)i.push(this.getPoint(n/t));return i},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var n=0;n<=t;n++){var s=this.getUtoTmapping(n/t,null,t);i.push(this.getPoint(s))}return i},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=t-1e-4,n=t+1e-4;return i<0&&(i=0),n>1&&(n=1),this.getPoint(i,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var n,s=this.getLengths(i),r=0,o=s.length;n=e?Math.min(e,s[o-1]):t*s[o-1];for(var a,h=0,l=o-1;h<=l;)if((a=s[r=Math.floor(h+(l-h)/2)]-n)<0)h=r+1;else{if(!(a>0)){l=r;break}l=r-1}if(s[r=l]===n)return r/(o-1);var u=s[r];return(r+(n-u)/(s[r+1]-u))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},function(t,e,i){t.exports={ADD:i(861),COMPLETE:i(862),FILE_COMPLETE:i(863),FILE_KEY_COMPLETE:i(864),FILE_LOAD_ERROR:i(865),FILE_LOAD:i(866),FILE_PROGRESS:i(867),POST_PROCESS:i(868),PROGRESS:i(869),START:i(870)}},function(t,e,i){var n=i(166),s=i(179);t.exports=function(t,e){var i=n.Power0;if("string"==typeof t)if(n.hasOwnProperty(t))i=n[t];else{var r="";t.indexOf(".")&&("in"===(r=t.substr(t.indexOf(".")+1)).toLowerCase()?r="easeIn":"out"===r.toLowerCase()?r="easeOut":"inout"===r.toLowerCase()&&(r="easeInOut")),t=s(t.substr(0,t.indexOf(".")+1)+r),n.hasOwnProperty(t)&&(i=n[t])}else"function"==typeof t?i=t:Array.isArray(t)&&t.length;if(!e)return i;var o=e.slice(0);return o.unshift(0),function(t){return o[0]=t,i.apply(this,o)}}},function(t,e){t.exports=function(t,e,i){var n=t.x3-t.x1,s=t.y3-t.y1,r=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,h=i-t.y1,l=n*n+s*s,u=n*r+s*o,c=n*a+s*h,d=r*r+o*o,f=r*a+o*h,p=l*d-u*u,g=0===p?0:1/p,v=(d*c-u*f)*g,m=(l*f-u*c)*g;return v>=0&&m>=0&&v+m<1}},function(t,e,i){var n=i(4);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.x1,r=t.y1,o=t.x2,a=t.y2,h=e.x1,l=e.y1,u=e.x2,c=e.y2,d=(u-h)*(r-l)-(c-l)*(s-h),f=(o-s)*(r-l)-(a-r)*(s-h),p=(c-l)*(o-s)-(u-h)*(a-r);if(0===p)return!1;var g=d/p,v=f/p;return g>=0&&g<=1&&v>=0&&v<=1&&(i.x=s+g*(o-s),i.y=r+g*(a-r),!0)}},function(t,e){t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},function(t,e,i){var n={};t.exports=n;var s=i(101),r=i(37);n.create=function(t,e){for(var i=[],n=0;n0)return!1}return!0},n.scale=function(t,e,i,r){if(1===e&&1===i)return t;var o,a;r=r||n.centre(t);for(var h=0;h=0?h-1:t.length-1],u=t[h],c=t[(h+1)%t.length],d=e[h0&&(r|=2),3===r)return!1;return 0!==r||null},n.hull=function(t){var e,i,n=[],r=[];for((t=t.slice(0)).sort(function(t,e){var i=t.x-e.x;return 0!==i?i:t.y-e.y}),i=0;i=2&&s.cross3(r[r.length-2],r[r.length-1],e)<=0;)r.pop();r.push(e)}for(i=t.length-1;i>=0;i-=1){for(e=t[i];n.length>=2&&s.cross3(n[n.length-2],n[n.length-1],e)<=0;)n.pop();n.push(e)}return n.pop(),r.pop(),n.concat(r)}},function(t,e,i){var n=i(22);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e){t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},function(t,e){t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},function(t,e,i){t.exports={DESTROY:i(576),VIDEO_COMPLETE:i(577),VIDEO_CREATED:i(578),VIDEO_ERROR:i(579),VIDEO_LOOP:i(580),VIDEO_PLAY:i(581),VIDEO_SEEKED:i(582),VIDEO_SEEKING:i(583),VIDEO_STOP:i(584),VIDEO_TIMEOUT:i(585),VIDEO_UNLOCKED:i(586)}},function(t,e,i){var n=i(0),s=i(12),r=i(35),o=i(9),a=i(48),h=i(11),l=i(32),u=i(161),c=i(3),d=new n({Extends:o,Mixins:[s.Alpha,s.Visible],initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),o.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.resolution=1,this.roundPixels=!1,this.useBounds=!1,this.worldView=new h,this.dirty=!0,this._x=t,this._y=e,this._cx=0,this._cy=0,this._cw=0,this._ch=0,this._width=i,this._height=n,this._bounds=new h,this._scrollX=0,this._scrollY=0,this._zoom=1,this._rotation=0,this.matrix=new l,this.transparent=!0,this.backgroundColor=u("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new c(i/2,n/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this},getScroll:function(t,e,i){void 0===i&&(i=new c);var n=.5*this.width,s=.5*this.height;return i.x=t-n,i.y=e-s,this.useBounds&&(i.x=this.clampX(i.x),i.y=this.clampY(i.y)),i},centerOnX:function(t){var e=.5*this.width;return this.midPoint.x=t,this.scrollX=t-e,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(t){var e=.5*this.height;return this.midPoint.y=t,this.scrollY=t-e,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(t,e){return this.centerOnX(t),this.centerOnY(e),this},centerToBounds:function(){if(this.useBounds){var t=this._bounds,e=.5*this.width,i=.5*this.height;this.midPoint.set(t.centerX,t.centerY),this.scrollX=t.centerX-e,this.scrollY=t.centerY-i}return this},centerToSize:function(){return this.scrollX=.5*this.width,this.scrollY=.5*this.height,this},cull:function(t){if(this.disableCull)return t;var e=this.matrix.matrix,i=e[0],n=e[1],s=e[2],r=e[3],o=i*r-n*s;if(!o)return t;var a=e[4],h=e[5],l=this.scrollX,u=this.scrollY,c=this.width,d=this.height,f=this.culledObjects,p=t.length;o=1/o,f.length=0;for(var g=0;gC&&wA&&b<_&&f.push(v)}else f.push(v)}return f},getWorldPoint:function(t,e,i){void 0===i&&(i=new c);var n=this.matrix.matrix,s=n[0],r=n[1],o=n[2],a=n[3],h=n[4],l=n[5],u=s*a-r*o;if(!u)return i.x=t,i.y=e,i;var d=a*(u=1/u),f=-r*u,p=-o*u,g=s*u,v=(o*l-a*h)*u,m=(r*h-s*l)*u,y=Math.cos(this.rotation),x=Math.sin(this.rotation),T=this.zoom,w=this.resolution,b=this.scrollX,E=this.scrollY,S=t+(b*y-E*x)*T,A=e+(b*x+E*y)*T;return i.x=(S*d+A*p)*w+v,i.y=(S*f+A*g)*w+m,i},ignore:function(t){var e=this.id;Array.isArray(t)||(t=[t]);for(var i=0;is&&(t=s),t},clampY:function(t){var e=this._bounds,i=this.displayHeight,n=e.y+(i-this.height)/2,s=Math.max(n,n+e.height-i);return ts&&(t=s),t},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=r(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=u(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n,s){return void 0===s&&(s=!1),this._bounds.setTo(t,e,i,n),this.dirty=!0,this.useBounds=!0,s?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(t){void 0===t&&(t=new h);var e=this._bounds;return t.setTo(e.x,e.y,e.width,e.height),t},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t){this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=t;var e=t.sys;this.sceneManager=e.game.scene,this.scaleManager=e.scale,this.cameraManager=e.cameras;var i=this.scaleManager.resolution;return this.resolution=i,this._cx=this._x*i,this._cy=this._y*i,this._cw=this._width*i,this._ch=this._height*i,this.updateSystem(),this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setZoom:function(t){return void 0===t&&(t=1),0===t&&(t=.001),this.zoom=t,this},setMask:function(t,e){return void 0===e&&(e=!0),this.mask=t,this._maskCamera=e?this.cameraManager.default:this,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},update:function(){},updateSystem:function(){if(this.scaleManager){var t=0!==this._x||0!==this._y||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,e=this.sceneManager;t&&!this._customViewport?e.customViewports++:!t&&this._customViewport&&e.customViewports--,this.dirty=!0,this._customViewport=t}},destroy:function(){this.emit(a.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(t){this._x=t,this._cx=t*this.resolution,this.updateSystem()}},y:{get:function(){return this._y},set:function(t){this._y=t,this._cy=t*this.resolution,this.updateSystem()}},width:{get:function(){return this._width},set:function(t){this._width=t,this._cw=t*this.resolution,this.updateSystem()}},height:{get:function(){return this._height},set:function(t){this._height=t,this._ch=t*this.resolution,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(t){this._scrollX=t,this.dirty=!0}},scrollY:{get:function(){return this._scrollY},set:function(t){this._scrollY=t,this.dirty=!0}},zoom:{get:function(){return this._zoom},set:function(t){this._zoom=t,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoom}},displayHeight:{get:function(){return this.height/this.zoom}}});t.exports=d},function(t,e,i){t.exports={ENTER_FULLSCREEN:i(694),FULLSCREEN_FAILED:i(695),FULLSCREEN_UNSUPPORTED:i(696),LEAVE_FULLSCREEN:i(697),ORIENTATION_CHANGE:i(698),RESIZE:i(699)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),n?(i+t)/e:i+t)}},function(t,e,i){var n=i(0),s=i(22),r=i(17),o=new n({initialize:function(t,e,i,n,s,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0}},this.setSize(r,o,n,s)},setSize:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=0),this.cutX=i,this.cutY=n,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var s=this.data,r=s.cut;r.x=i,r.y=n,r.w=t,r.h=e,r.r=i+t,r.b=n+e,s.sourceSize.w=t,s.sourceSize.h=e,s.spriteSourceSize.w=t,s.spriteSourceSize.h=e,s.radius=.5*Math.sqrt(t*t+e*e);var o=s.drawImage;return o.x=i,o.y=n,o.width=t,o.height=e,this.updateUVs()},setTrim:function(t,e,i,n,s,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=n,a.w=s,a.h=r,a.r=i+s,a.b=n+r,this.x=i,this.y=n,this.width=s,this.height=r,this.halfWidth=.5*s,this.halfHeight=.5*r,this.centerX=Math.floor(s/2),this.centerY=Math.floor(r/2),this.updateUVs()},setCropUVs:function(t,e,i,n,r,o,a){var h=this.cutX,l=this.cutY,u=this.cutWidth,c=this.cutHeight,d=this.realWidth,f=this.realHeight,p=h+(e=s(e,0,d)),g=l+(i=s(i,0,f)),v=n=s(n,0,d-e),m=r=s(r,0,f-i),y=this.data;if(y.trim){var x=y.spriteSourceSize,T=e+(n=s(n,0,u-e)),w=i+(r=s(r,0,c-i));if(!(x.rT||x.y>w)){var b=Math.max(x.x,e),E=Math.max(x.y,i),S=Math.min(x.r,T)-b,A=Math.min(x.b,w)-E;v=S,m=A,p=o?h+(u-(b-x.x)-S):h+(b-x.x),g=a?l+(c-(E-x.y)-A):l+(E-x.y),e=b,i=E,n=S,r=A}else p=0,g=0,v=0,m=0}else o&&(p=h+(u-e-n)),a&&(g=l+(c-i-r));var _=this.source.width,C=this.source.height;return t.u0=Math.max(0,p/_),t.v0=Math.max(0,g/C),t.u1=Math.min(1,(p+v)/_),t.v1=Math.min(1,(g+m)/C),t.x=e,t.y=i,t.cx=p,t.cy=g,t.cw=v,t.ch=m,t.width=n,t.height=r,t.flipX=o,t.flipY=a,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=n;var r=this.source.width,o=this.source.height;return this.u0=t/r,this.v0=e/o,this.u1=(t+i)/r,this.v1=(e+n)/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new o(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=r(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=o},function(t,e,i){var n=i(0),s=i(96),r=i(390),o=i(391),a=i(46),h=i(154),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=a.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=l},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var n=i(238),s=i(0),r=i(90),o=i(2),a=i(6),h=i(7),l=i(384),u=i(108),c=i(69),d=new s({initialize:function(t,e,i){i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?h(e[0])&&(i=e,e=null):h(e)&&(i=e,e=null),this.scene=t,this.children=new u(e),this.isParent=!0,this.type="Group",this.classType=o(i,"classType",c),this.name=o(i,"name",""),this.active=o(i,"active",!0),this.maxSize=o(i,"maxSize",-1),this.defaultKey=o(i,"defaultKey",null),this.defaultFrame=o(i,"defaultFrame",null),this.runChildUpdate=o(i,"runChildUpdate",!1),this.createCallback=o(i,"createCallback",null),this.removeCallback=o(i,"removeCallback",null),this.createMultipleCallback=o(i,"createMultipleCallback",null),this.internalCreateCallback=o(i,"internalCreateCallback",null),this.internalRemoveCallback=o(i,"internalRemoveCallback",null),i&&this.createMultiple(i)},create:function(t,e,i,n,s,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(o),o.preUpdate&&this.scene.sys.updateList.add(o),o.visible=s,o.setActive(r),this.add(o),o},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i=0;u--)if((l=d[u]).active===i){if(++c===e)break}else l=null;return l?("number"==typeof s&&(l.x=s),"number"==typeof r&&(l.y=r),l):n?this.create(s,r,o,a,h):null},get:function(t,e,i,n,s){return this.getFirst(!1,!0,t,e,i,n,s)},getFirstAlive:function(t,e,i,n,s,r){return this.getFirst(!0,t,e,i,n,s,r)},getFirstDead:function(t,e,i,n,s,r){return this.getFirst(!1,t,e,i,n,s,r)},playAnimation:function(t,e){return n.PlayAnimation(this.children.entries,t,e),this},isFull:function(){return-1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;it.max.x&&(t.max.x=s.x),s.xt.max.y&&(t.max.y=s.y),s.y0?t.max.x+=i.x:t.min.x+=i.x,i.y>0?t.max.y+=i.y:t.min.y+=i.y)},i.contains=function(t,e){return e.x>=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},i.overlaps=function(t,e){return t.min.x<=e.max.x&&t.max.x>=e.min.x&&t.max.y>=e.min.y&&t.min.y<=e.max.y},i.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},i.shift=function(t,e){var i=t.max.x-t.min.x,n=t.max.y-t.min.y;t.min.x=e.x,t.max.x=e.x+i,t.min.y=e.y,t.max.y=e.y+n}},function(t,e){t.exports=function(t,e,i){return t>=0&&t=0&&e-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t-1},union:function(t){var e=new n;return t.entries.forEach(function(t){e.set(t)}),this.entries.forEach(function(t){e.set(t)}),e},intersect:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)&&e.set(i)}),e},difference:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)||e.set(i)}),e},size:{get:function(){return this.entries.length},set:function(t){return t0&&s.area(T)1?(d=o.create(r.extend({parts:f.slice(0)},a)),o.setPosition(d,{x:t,y:e}),d):f[0]},n.flagCoincidentParts=function(t,e){void 0===e&&(e=5);for(var i=0;i0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e,i){(function(e){var i={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){var t=navigator.userAgent;/Windows/.test(t)?i.windows=!0:/Mac OS/.test(t)&&!/like Mac OS/.test(t)?i.macOS=!0:/Android/.test(t)?i.android=!0:/Linux/.test(t)?i.linux=!0:/iP[ao]d|iPhone/i.test(t)?(i.iOS=!0,navigator.appVersion.match(/OS (\d+)/),i.iOSVersion=parseInt(RegExp.$1,10),i.iPhone=-1!==t.toLowerCase().indexOf("iphone"),i.iPad=-1!==t.toLowerCase().indexOf("ipad")):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?i.kindle=!0:/CrOS/.test(t)&&(i.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(i.android=!1,i.iOS=!1,i.macOS=!1,i.windows=!0,i.windowsPhone=!0);var n=/Silk/.test(t);return(i.windows||i.macOS||i.linux&&!n||i.chromeOS)&&(i.desktop=!0),(i.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(i.desktop=!1),navigator.standalone&&(i.webApp=!0),void 0!==window.cordova&&(i.cordova=!0),void 0!==e&&e.versions&&e.versions.node&&(i.node=!0),i.node&&"object"==typeof e.versions&&(i.nodeWebkit=!!e.versions["node-webkit"],i.electron=!!e.versions.electron),void 0!==window.ejecta&&(i.ejecta=!0),/Crosswalk/.test(t)&&(i.crosswalk=!0),i.pixelRatio=window.devicePixelRatio||1,i}()}).call(this,i(720))},function(t,e,i){var n,s=i(116),r={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0};t.exports=(n=navigator.userAgent,/Edge\/\d+/.test(n)?r.edge=!0:/Chrome\/(\d+)/.test(n)&&!s.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(n)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(n)&&s.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(n)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(n)?r.opera=!0:/Safari/.test(n)&&!s.windowsPhone?r.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(n)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(n)&&(r.silk=!0),r)},function(t,e){t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e,i){t.exports={ADD:i(771),ERROR:i(772),LOAD:i(773),READY:i(774),REMOVE:i(775)}},function(t,e){t.exports=function(t,e){var i;if(e)"string"==typeof e?i=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(i=e);else if(t.parentElement)return t;return i||(i=document.body),i.appendChild(t),t}},function(t,e,i){var n=i(79);t.exports=function(t,e,i,s){var r;if(void 0===s&&(s=t),!Array.isArray(e))return-1!==(r=t.indexOf(e))?(n(t,r),i&&i.call(s,e),e):null;for(var o=e.length-1;o>=0;){var a=e[o];-1!==(r=t.indexOf(a))?(n(t,r),i&&i.call(s,a)):e.pop(),o--}return e}},function(t,e){t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175}},function(t,e){t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},function(t,e,i){var n=i(0),s=i(67),r=i(9),o=i(59),a=i(18),h=i(1),l=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.jsonCache=t.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,t.events.on(a.BLUR,function(){this.pauseOnBlur&&this.onBlur()},this),t.events.on(a.FOCUS,function(){this.pauseOnBlur&&this.onFocus()},this),t.events.on(a.PRE_STEP,this.update,this),t.events.once(a.DESTROY,this.destroy,this)},add:h,addAudioSprite:function(t,e){void 0===e&&(e={});var i=this.add(t,e);for(var n in i.spritemap=this.jsonCache.get(t).spritemap,i.spritemap)if(i.spritemap.hasOwnProperty(n)){var r=s(e),o=i.spritemap[n];r.loop=!!o.hasOwnProperty("loop")&&o.loop,i.addMarker({name:n,start:o.start,duration:o.end-o.start,config:r})}return i},play:function(t,e){var i=this.add(t);return i.once(o.COMPLETE,i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var n=this.addAudioSprite(t);return n.once(o.COMPLETE,n.destroy,n),n.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var n=this.sounds[i];n.key===t&&(n.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound(function(t){t.pause()}),this.emit(o.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit(o.RESUME_ALL,this)},stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit(o.STOP_ALL,this)},unlock:h,onBlur:h,onFocus:h,update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(o.UNLOCKED,this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach(function(i){i.update(t,e)})},destroy:function(){this.removeAllListeners(),this.forEachActiveSound(function(t){t.destroy()}),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach(function(n,s){n&&!n.pendingRemove&&t.call(e||i,n,s,i.sounds)})},setRate:function(t){return this.rate=t,this},rate:{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound(function(t){t.calculateRate()}),this.emit(o.GLOBAL_RATE,this,t)}},setDetune:function(t){return this.detune=t,this},detune:{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound(function(t){t.calculateRate()}),this.emit(o.GLOBAL_DETUNE,this,t)}}});t.exports=l},function(t,e,i){var n=i(0),s=i(9),r=i(59),o=i(17),a=i(1),h=new n({Extends:s,initialize:function(t,e,i){s.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},this.currentConfig=this.config,this.config=o(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(console.error("addMarker "+t.name+" already exists in Sound"),!1):(t=o(!0,{name:"",start:0,duration:this.totalDuration-(t.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0}},t),this.markers[t.name]=t,!0))},updateMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(this.markers[t.name]=o(!0,this.markers[t.name],t),!0):(console.warn("Audio Marker: "+t.name+" missing in Sound: "+this.key),!1))},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):null},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return!1;if(t){if(!this.markers[t])return console.warn("Marker: "+t+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=o(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:a,calculateRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e},destroy:function(){this.pendingRemove||(this.emit(r.DESTROY,this),this.pendingRemove=!0,this.manager=null,this.key="",this.removeAllListeners(),this.isPlaying=!1,this.isPaused=!1,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});t.exports=h},function(t,e,i){var n=i(181),s=i(0),r=i(1),o=i(128),a=new s({initialize:function(t){this.parent=t,this.list=[],this.position=0,this.addCallback=r,this.removeCallback=r,this._sortKey=""},add:function(t,e){return e?n.Add(this.list,t):n.Add(this.list,t,0,this.addCallback,this)},addAt:function(t,e,i){return i?n.AddAt(this.list,t,e):n.AddAt(this.list,t,e,0,this.addCallback,this)},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(t,e){return t?(void 0===e&&(e=function(e,i){return e[t]-i[t]}),o.inplace(this.list,e),this):this},getByName:function(t){return n.GetFirst(this.list,"name",t)},getRandom:function(t,e){return n.GetRandom(this.list,t,e)},getFirst:function(t,e,i,s){return n.GetFirst(this.list,t,e,i,s)},getAll:function(t,e,i,s){return n.GetAll(this.list,t,e,i,s)},count:function(t,e){return n.CountAllMatching(this.list,t,e)},swap:function(t,e){n.Swap(this.list,t,e)},moveTo:function(t,e){return n.MoveTo(this.list,t,e)},remove:function(t,e){return e?n.Remove(this.list,t):n.Remove(this.list,t,this.removeCallback,this)},removeAt:function(t,e){return e?n.RemoveAt(this.list,t):n.RemoveAt(this.list,t,this.removeCallback,this)},removeBetween:function(t,e,i){return i?n.RemoveBetween(this.list,t,e):n.RemoveBetween(this.list,t,e,this.removeCallback,this)},removeAll:function(t){for(var e=this.list.length;e--;)this.remove(this.list[e],t);return this},bringToTop:function(t){return n.BringToTop(this.list,t)},sendToBack:function(t){return n.SendToBack(this.list,t)},moveUp:function(t){return n.MoveUp(this.list,t),t},moveDown:function(t){return n.MoveDown(this.list,t),t},reverse:function(){return this.list.reverse(),this},shuffle:function(){return n.Shuffle(this.list),this},replace:function(t,e){return n.Replace(this.list,t,e)},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e,i,s){return n.SetAll(this.list,t,e,i,s),this},each:function(t,e){for(var i=[null],n=2;n0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});t.exports=a},function(t,e,i){var n=i(182),s=i(382);t.exports=function(t,e){if(void 0===e&&(e=90),!n(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=s(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=s(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;il&&(r=l),o>l&&(o=l),a=s,h=r;;)if(a0&&o.length0&&a.lengthe.right||t.y>e.bottom)}},function(t,e,i){var n=i(6),s={},r={register:function(t,e,i,n,r){s[t]={plugin:e,mapping:i,settingsKey:n,configKey:r}},getPlugin:function(t){return s[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,r=e.game.config;for(var o in s){var a=s[o].plugin,h=s[o].mapping,l=s[o].settingsKey,u=s[o].configKey;n(i,l,r[u])&&(t[h]=new a(t))}},remove:function(t){s.hasOwnProperty(t)&&delete s[t]}};t.exports=r},function(t,e,i){t.exports={ANY_KEY_DOWN:i(1203),ANY_KEY_UP:i(1204),COMBO_MATCH:i(1205),DOWN:i(1206),KEY_DOWN:i(1207),KEY_UP:i(1208),UP:i(1209)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e){t.exports=function(t,e,i,n,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),{responseType:t,async:e,user:i,password:n,timeout:s,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0}}},function(t,e,i){var n=i(0),s=i(214),r=i(69),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.body=null}});t.exports=o},function(t,e,i){t.exports={CalculateFacesAt:i(217),CalculateFacesWithin:i(51),Copy:i(1301),CreateFromTiles:i(1302),CullTiles:i(1303),Fill:i(1304),FilterTiles:i(1305),FindByIndex:i(1306),FindTile:i(1307),ForEachTile:i(1308),GetTileAt:i(138),GetTileAtWorldXY:i(1309),GetTilesWithin:i(24),GetTilesWithinShape:i(1310),GetTilesWithinWorldXY:i(1311),HasTileAt:i(470),HasTileAtWorldXY:i(1312),IsInLayerBounds:i(103),PutTileAt:i(218),PutTileAtWorldXY:i(1313),PutTilesAt:i(1314),Randomize:i(1315),RemoveTileAt:i(471),RemoveTileAtWorldXY:i(1316),RenderDebug:i(1317),ReplaceByIndex:i(469),SetCollision:i(1318),SetCollisionBetween:i(1319),SetCollisionByExclusion:i(1320),SetCollisionByProperty:i(1321),SetCollisionFromCollisionGroup:i(1322),SetTileIndexCallback:i(1323),SetTileLocationCallback:i(1324),Shuffle:i(1325),SwapByIndex:i(1326),TileToWorldX:i(139),TileToWorldXY:i(1327),TileToWorldY:i(140),WeightedRandomize:i(1328),WorldToTileX:i(63),WorldToTileXY:i(1329),WorldToTileY:i(64)}},function(t,e,i){var n=i(103);t.exports=function(t,e,i,s){if(void 0===i&&(i=!1),n(t,e,s)){var r=s.data[e][t]||null;return null===r?null:-1===r.index?i?r:null:r}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o,a){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o={}),void 0===a&&(a={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=n,this.tileMargin=s,this.tileSpacing=r,this.tileProperties=o,this.tileData=a,this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){var e=this.getTileData(t);return e&&e.objectgroup?e.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t1?2-s:s,o=r*Math.cos(i),a=r*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},function(t,e,i){var n=i(22),s=i(0),r=i(9),o=i(111),a=i(267),h=i(268),l=i(6),u=new s({Extends:r,initialize:function(t,e,i){r.call(this),this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,l(i,"frames",[]),l(i,"defaultTextureKey",null)),this.frameRate=l(i,"frameRate",null),this.duration=l(i,"duration",null),null===this.duration&&null===this.frameRate?(this.frameRate=24,this.duration=this.frameRate/this.frames.length*1e3):this.duration&&null===this.frameRate?this.frameRate=this.frames.length/(this.duration/1e3):this.duration=this.frames.length/this.frameRate*1e3,this.msPerFrame=1e3/this.frameRate,this.skipMissedFrames=l(i,"skipMissedFrames",!0),this.delay=l(i,"delay",0),this.repeat=l(i,"repeat",0),this.repeatDelay=l(i,"repeatDelay",0),this.yoyo=l(i,"yoyo",!1),this.showOnStart=l(i,"showOnStart",!1),this.hideOnComplete=l(i,"hideOnComplete",!1),this.paused=!1,this.manager.on(o.PAUSE_ALL,this.pause,this),this.manager.on(o.RESUME_ALL,this.resume,this)},addFrame:function(t){return this.addFrameAt(this.frames.length,t)},addFrameAt:function(t,e){var i=this.getFrames(this.manager.textureManager,e);if(i.length>0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var n=this.frames.slice(0,t),s=this.frames.slice(t);this.frames=n.concat(i,s)}this.updateFrameSequence()}return this},checkFrame:function(t){return t>=0&&t0){s.isLast=!0,s.nextFrame=a[0],a[0].prevFrame=s;var v=1/(a.length-1);for(r=0;r=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo);var i=this.frames[e];0!==e||t.forward||(i=this.getLastFrame()),t.updateFrame(i)},getFrameByProgress:function(t){return t=n(t,0,1),a(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t._yoyo?this.handleYoyoFrame(t,!1):t.repeatCounter>0?t._reverse&&t.forward?t.forward=!1:this.repeatAnimation(t):this.completeAnimation(t):this.updateAndGetNextTick(t,e.nextFrame)},handleYoyoFrame:function(t,e){if(e||(e=!1),t._reverse===!e&&t.repeatCounter>0)return t.forward=e,void this.repeatAnimation(t);if(t._reverse===e||0!==t.repeatCounter){t.forward=e;var i=e?t.currentFrame.nextFrame:t.currentFrame.prevFrame;this.updateAndGetNextTick(t,i)}else this.completeAnimation(t)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t._yoyo?this.handleYoyoFrame(t,!0):t.repeatCounter>0?t._reverse&&!t.forward?(t.currentFrame=this.getLastFrame(),this.repeatAnimation(t)):(t.forward=!0,this.repeatAnimation(t)):this.completeAnimation(t):this.updateAndGetNextTick(t,e.prevFrame)},updateAndGetNextTick:function(t,e){t.updateFrame(e),this.getNextTick(t)},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){if(2===t._pendingStop)return this.completeAnimation(t);if(t._repeatDelay>0&&!1===t.pendingRepeat)t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t._repeatDelay;else if(t.repeatCounter--,t.updateFrame(t.currentFrame[t.forward?"nextFrame":"prevFrame"]),t.isPlaying){this.getNextTick(t),t.pendingRepeat=!1;var e=t.currentFrame,i=t.parent;this.emit(o.ANIMATION_REPEAT,this,e),i.emit(o.SPRITE_ANIMATION_KEY_REPEAT+this.key,this,e,t.repeatCounter,i),i.emit(o.SPRITE_ANIMATION_REPEAT,this,e,t.repeatCounter,i)}},setFrame:function(t){t.forward?this.nextFrame(t):this.previousFrame(t)},toJSON:function(){var t={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(e){t.frames.push(e.toJSON())}),t},updateFrameSequence:function(){for(var t,e=this.frames.length,i=1/(e-1),n=0;n1?(t.isLast=!0,t.prevFrame=this.frames[e-2],t.nextFrame=this.frames[0]):e>1&&(t.prevFrame=this.frames[n-1],t.nextFrame=this.frames[n+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.removeAllListeners(),this.manager.off(o.PAUSE_ALL,this.pause,this),this.manager.off(o.RESUME_ALL,this.resume,this),this.manager.remove(this.key);for(var t=0;t=1)return i.x=t.x,i.y=t.y,i;var r=n(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},function(t,e,i){var n=i(57),s=i(4);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=n(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,l=t.y2,u=0;u=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(s*a+o*h),e}},function(t,e){t.exports=function(t,e,i,n,s){var r=n+Math.atan2(t.y-i,t.x-e);return t.x=e+s*Math.cos(r),t.y=i+s*Math.sin(r),t}},function(t,e){t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},function(t,e){t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},function(t,e,i){var n=new(i(0))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(s-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(291),s=i(294),r=i(296),o=i(297);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?o(t):n(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var n=i(162);t.exports=function(t,e,i,s){void 0===e&&(e=1),void 0===i&&(i=1);var r=Math.floor(6*t),o=6*t-r,a=Math.floor(i*(1-e)*255),h=Math.floor(i*(1-o*e)*255),l=Math.floor(i*(1-(1-o)*e)*255),u=i=Math.floor(i*=255),c=i,d=i,f=r%6;return 0===f?(c=l,d=a):1===f?(u=h,d=a):2===f?(u=a,d=l):3===f?(u=a,c=h):4===f?(u=l,c=a):5===f&&(c=a,d=h),s?s.setTo?s.setTo(u,c,d,s.alpha,!1):(s.r=u,s.g=c,s.b=d,s.color=n(u,c,d),s):{r:u,g:c,b:d,color:n(u,c,d)}}},function(t,e){var i,n="";t.exports={disable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!1),t},enable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!0),t},getPrefix:i=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z;return this.x=i*o-n*r,this.y=n*s-e*o,this.z=e*r-i*s,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=e*s[0]+i*s[3]+n*s[6],this.y=e*s[1]+i*s[4]+n*s[7],this.z=e*s[2]+i*s[5]+n*s[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12],this.y=s[1]*e+s[5]*i+s[9]*n+s[13],this.z=s[2]*e+s[6]*i+s[10]*n+s[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=e*s[0]+i*s[4]+n*s[8]+s[12],o=e*s[1]+i*s[5]+n*s[9]+s[13],a=e*s[2]+i*s[6]+n*s[10]+s[14],h=e*s[3]+i*s[7]+n*s[11]+s[15];return this.x=r/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},project:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=s[0],o=s[1],a=s[2],h=s[3],l=s[4],u=s[5],c=s[6],d=s[7],f=s[8],p=s[9],g=s[10],v=s[11],m=s[12],y=s[13],x=s[14],T=1/(e*h+i*d+n*v+s[15]);return this.x=(e*r+i*l+n*f+m)*T,this.y=(e*o+i*u+n*p+y)*T,this.z=(e*a+i*c+n*g+x)*T,this},unproject:function(t,e){var i=t.x,n=t.y,s=t.z,r=t.w,o=this.x-i,a=r-this.y-1-n,h=this.z;return this.x=2*o/s-1,this.y=2*a/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});n.ZERO=new n,n.RIGHT=new n(1,0,0),n.LEFT=new n(-1,0,0),n.UP=new n(0,-1,0),n.DOWN=new n(0,1,0),n.FORWARD=new n(0,0,1),n.BACK=new n(0,0,-1),n.ONE=new n(1,1,1),t.exports=n},function(t,e,i){t.exports={Global:["game","anims","cache","plugins","registry","scale","sound","textures"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},function(t,e,i){var n=i(11),s=i(13);t.exports=function(t,e){if(void 0===e&&(e=new n),0===t.length)return e;for(var i,r,o,a=Number.MAX_VALUE,h=Number.MAX_VALUE,l=s.MIN_SAFE_INTEGER,u=s.MIN_SAFE_INTEGER,c=0;c0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t,e){return t?this.resume(e):this.pause(e)},start:function(t){t&&(this.settings.data=t),this.settings.status=s.START,this.settings.active=!0,this.settings.visible=!0,this.events.emit(o.START,this),this.events.emit(o.READY,this,t)},shutdown:function(t){this.events.off(o.TRANSITION_INIT),this.events.off(o.TRANSITION_START),this.events.off(o.TRANSITION_COMPLETE),this.events.off(o.TRANSITION_OUT),this.settings.status=s.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit(o.SHUTDOWN,this,t)},destroy:function(){this.settings.status=s.DESTROYED,this.settings.active=!1,this.settings.visible=!1,this.events.emit(o.DESTROY,this),this.events.removeAllListeners();for(var t=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],e=0;e0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});t.exports=u},function(t,e,i){var n=i(181),s=i(52),r=i(0),o=i(12),a=i(90),h=i(14),l=i(11),u=i(947),c=i(386),d=i(3),f=new r({Extends:h,Mixins:[o.AlphaSingle,o.BlendMode,o.ComputedSize,o.Depth,o.Mask,o.Transform,o.Visible,u],initialize:function(t,e,i,n){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new o.TransformMatrix,this.tempTransformMatrix=new o.TransformMatrix,this._displayList=t.sys.displayList,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.setPosition(e,i),this.clearAlpha(),this.setBlendMode(s.SKIP_CHECK),n&&this.add(n)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.list.length>0)for(var e=this.list,i=new l,n=0;n-1},setAll:function(t,e,i,s){return n.SetAll(this.list,t,e,i,s),this},each:function(t,e){var i,n=[null],s=this.list.slice(),r=s.length;for(i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null}});t.exports=f},function(t,e,i){var n=i(129),s=i(0),r=i(952),o=new s({Extends:n,Mixins:[r],initialize:function(t,e,i,s,r,o,a){n.call(this,t,e,i,s,r,o,a),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this}});t.exports=o},function(t,e,i){var n=i(91),s=i(0),r=i(190),o=i(266),a=i(269),h=i(270),l=i(274),u=i(153),c=i(279),d=i(280),f=i(277),p=i(32),g=i(95),v=i(14),m=i(2),y=i(6),x=i(13),T=i(958),w=new s({Extends:v,Mixins:[o,a,h,l,u,c,d,f,T],initialize:function(t,e){var i=y(e,"x",0),n=y(e,"y",0);v.call(this,t,"Graphics"),this.setPosition(i,n),this.initPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this._tempMatrix1=new p,this._tempMatrix2=new p,this._tempMatrix3=new p,this.setDefaultStyles(e)},setDefaultStyles:function(t){return y(t,"lineStyle",null)&&(this.defaultStrokeWidth=y(t,"lineStyle.width",1),this.defaultStrokeColor=y(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=y(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),y(t,"fillStyle",null)&&(this.defaultFillColor=y(t,"fillStyle.color",16777215),this.defaultFillAlpha=y(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(r.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(r.FILL_STYLE,t,e),this},fillGradientStyle:function(t,e,i,n,s){return void 0===s&&(s=1),this.commandBuffer.push(r.GRADIENT_FILL_STYLE,s,t,e,i,n),this},lineGradientStyle:function(t,e,i,n,s,o){return void 0===o&&(o=1),this.commandBuffer.push(r.GRADIENT_LINE_STYLE,t,o,e,i,n,s),this},setTexture:function(t,e,i){if(void 0===i&&(i=0),void 0===t)this.commandBuffer.push(r.CLEAR_TEXTURE);else{var n=this.scene.sys.textures.getFrame(t,e);n&&(2===i&&(i=3),this.commandBuffer.push(r.SET_TEXTURE,n,i))}return this},beginPath:function(){return this.commandBuffer.push(r.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(r.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(r.FILL_PATH),this},fill:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(r.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,x.PI2),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,x.PI2),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,n){return this.commandBuffer.push(r.FILL_RECT,t,e,i,n),this},strokeRect:function(t,e,i,n){var s=this._lineWidth/2,r=t-s,o=t+s;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+n),this.strokePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+n),this.strokePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(o+i,e),this.strokePath(),this.beginPath(),this.moveTo(r,e+n),this.lineTo(o+i,e+n),this.strokePath(),this},fillRoundedRect:function(t,e,i,n,s){void 0===s&&(s=20);var r=s,o=s,a=s,h=s;return"number"!=typeof s&&(r=m(s,"tl",20),o=m(s,"tr",20),a=m(s,"bl",20),h=m(s,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-x.TAU,0),this.lineTo(t+i,e+n-h),this.arc(t+i-h,e+n-h,h,0,x.TAU),this.lineTo(t+a,e+n),this.arc(t+a,e+n-a,a,x.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-x.TAU),this.fillPath(),this},strokeRoundedRect:function(t,e,i,n,s){void 0===s&&(s=20);var r=s,o=s,a=s,h=s;return"number"!=typeof s&&(r=m(s,"tl",20),o=m(s,"tr",20),a=m(s,"bl",20),h=m(s,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-x.TAU,0),this.lineTo(t+i,e+n-h),this.arc(t+i-h,e+n-h,h,0,x.TAU),this.lineTo(t+a,e+n),this.arc(t+a,e+n-a,a,x.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-x.TAU),this.strokePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,n,s,o),this},strokeTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,n,s,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,n){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,n),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(r.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(r.MOVE_TO,t,e),this},strokePoints:function(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===n&&(n=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var s=1;s-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var n,s,r=this.scene.sys,o=r.game.renderer;if(void 0===e&&(e=r.scale.width),void 0===i&&(i=r.scale.height),w.TargetCamera.setScene(this.scene),w.TargetCamera.setViewport(0,0,e,i),w.TargetCamera.scrollX=this.x,w.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var a=(n=r.textures.get(t)).getSourceImage();a instanceof HTMLCanvasElement&&(s=a.getContext("2d"))}else s=(n=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(s=t.getContext("2d"));return s&&(this.renderCanvas(o,this,0,w.TargetCamera,null,s,!1),n&&n.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});w.TargetCamera=new n,t.exports=w},function(t,e){t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,SET_TEXTURE:19,CLEAR_TEXTURE:20,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},function(t,e,i){var n=i(4);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.width/2,r=t.height/2;return i.x=t.x+s*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},function(t,e,i){var n=i(0),s=i(12),r=i(14),o=i(394),a=i(126),h=i(396),l=i(968),u=new n({Extends:r,Mixins:[s.Depth,s.Mask,s.Pipeline,s.Transform,s.Visible,l],initialize:function(t,e,i,n){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline(),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var s=0;s0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},removeEmitter:function(t){return this.emitters.remove(t,!0)},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;ss.width&&(t=s.width-this.frame.cutX),this.frame.cutY+e>s.height&&(e=s.height-this.frame.cutY),this.frame.setSize(t,e,this.frame.cutX,this.frame.cutY)}this.updateDisplayOrigin();var r=this.input;return r&&!r.customHitArea&&(r.hitArea.width=t,r.hitArea.height=e),this},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this},saveTexture:function(t){return this.textureManager.renameTexture(this.texture.key,t),this._saved=!0,this.texture},fill:function(t,e,i,n,s,r){void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.frame.cutWidth),void 0===r&&(r=this.frame.cutHeight);var o=255&(t>>16|0),a=255&(t>>8|0),h=255&(0|t),l=this.gl,u=this.frame;if(this.camera.preRender(1,1),l){var c=this.camera._cx,f=this.camera._cy,p=this.camera._cw,g=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(c,f,p,g,g);var v=this.pipeline;v.projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),v.drawFillRect(i,n,s,r,d.getTintFromFloats(o/255,a/255,h/255,1),e),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),v.projOrtho(0,v.width,v.height,0,-1e3,1e3)}else this.renderer.setContext(this.context),this.context.fillStyle="rgba("+o+","+a+","+h+","+e+")",this.context.fillRect(i+u.cutX,n+u.cutY,s,r),this.renderer.setContext();return this.dirty=!0,this},clear:function(){if(this.dirty){var t=this.gl;if(t){var e=this.renderer;e.setFramebuffer(this.framebuffer,!0),this.frame.cutWidth===this.canvas.width&&this.frame.cutHeight===this.canvas.height||t.scissor(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),e.setFramebuffer(null,!0)}else{var i=this.context;i.save(),i.setTransform(1,0,0,1,0,0),i.clearRect(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),i.restore()}this.dirty=!1}return this},erase:function(t,e,i){this._eraseMode=!0;var s=this.renderer.currentBlendMode;return this.renderer.setBlendMode(n.ERASE),this.draw(t,e,i,1,16777215),this.renderer.setBlendMode(s),this._eraseMode=!1,this},draw:function(t,e,i,n,s){void 0===n&&(n=this.globalAlpha),s=void 0===s?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(s>>16)+(65280&s)+((255&s)<<16),Array.isArray(t)||(t=[t]);var r=this.gl;if(this.camera.preRender(1,1),r){var o=this.camera._cx,a=this.camera._cy,h=this.camera._cw,l=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(o,a,h,l,l);var u=this.pipeline;u.projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),this.batchList(t,e,i,n,s),u.flush(),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),u.projOrtho(0,u.width,u.height,0,-1e3,1e3)}else this.renderer.setContext(this.context),this.batchList(t,e,i,n,s),this.renderer.setContext();return this.dirty=!0,this},drawFrame:function(t,e,i,n,s,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.globalAlpha),r=void 0===r?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(r>>16)+(65280&r)+((255&r)<<16);var o=this.gl,a=this.textureManager.getFrame(t,e);if(a){if(this.camera.preRender(1,1),o){var h=this.camera._cx,l=this.camera._cy,u=this.camera._cw,c=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(h,l,u,c,c);var d=this.pipeline;d.projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),d.batchTextureFrame(a,i+this.frame.cutX,n+this.frame.cutY,r,s,this.camera.matrix,null),d.flush(),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),d.projOrtho(0,d.width,d.height,0,-1e3,1e3)}else this.batchTextureFrame(a,i+this.frame.cutX,n+this.frame.cutY,s,r);this.dirty=!0}return this},batchList:function(t,e,i,n,s){for(var r=0;rl){if(0===c){for(var g=f;g.length&&(g=g.slice(0,-1),!((p=e.measureText(g).width)<=l)););if(!g.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var v=d.substr(g.length);u[c]=v,h+=g}var m=u[c].length?c:c+1,y=u.slice(m).join(" ").replace(/[ \n]*$/gi,"");s[o+1]=y+" "+(s[o+1]||""),r=s.length;break}h+=f,l-=p}n+=h.replace(/[ \n]*$/gi,"")+"\n"}}return n=n.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var n="",s=t.split(this.splitRegExp),r=s.length-1,o=e.measureText(" ").width,a=0;a<=r;a++){for(var h=i,l=s[a].split(" "),u=l.length-1,c=0;c<=u;c++){var d=l[c],f=e.measureText(d).width,p=f+o;p>h&&c>0&&(n+="\n",h=i),n+=d,c0&&(d+=h.lineSpacing*g),i.rtl)c=f-c;else if("right"===i.align)c+=o-h.lineWidths[g];else if("center"===i.align)c+=(o-h.lineWidths[g])/2;else if("justify"===i.align){if(h.lineWidths[g]/h.width>=.85){var v=h.width-h.lineWidths[g],m=e.measureText(" ").width,y=a[g].trim(),x=y.split(" ");v+=(a[g].length-y.length)*m;for(var T=Math.floor(v/m),w=0;T>0;)x[w]+=" ",w=(w+1)%(x.length-1||1),--T;a[g]=x.join(" ")}}this.autoRound&&(c=Math.round(c),d=Math.round(d)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(a[g],c,d)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(a[g],c,d))}e.restore(),this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(t,this.frame.source.glTexture,!0),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0;var b=this.input;return b&&!b.customHitArea&&(b.hitArea.width=this.width,b.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(t){this.setText(t)}},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this._text,style:this.style.toJSON(),padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&c(this.canvas),s.remove(this.canvas),this.texture.destroy()}});t.exports=p},function(t,e,i){var n=i(26),s=i(0),r=i(12),o=i(18),a=i(14),h=i(324),l=i(164),u=i(984),c=i(3),d=new s({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Tint,r.Transform,r.Visible,u],initialize:function(t,e,i,s,r,l,u){var d=t.sys.game.renderer;a.call(this,t,"TileSprite");var f=t.sys.textures.get(l),p=f.get(u);s&&r?(s=Math.floor(s),r=Math.floor(r)):(s=p.width,r=p.height),this._tilePosition=new c,this._tileScale=new c(1,1),this.dirty=!1,this.renderer=d,this.canvas=n.create(this,s,r),this.context=this.canvas.getContext("2d"),this.displayTexture=f,this.displayFrame=p,this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.potWidth=h(p.width),this.potHeight=h(p.height),this.fillCanvas=n.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d"),this.fillPattern=null,this.setPosition(e,i),this.setSize(s,r),this.setFrame(u),this.setOriginFromFrame(),this.initPipeline(),t.sys.game.events.on(o.CONTEXT_RESTORED,function(t){var e=t.gl;this.dirty=!0,this.fillPattern=null,this.fillPattern=t.createTexture2D(0,e.LINEAR,e.LINEAR,e.REPEAT,e.REPEAT,e.RGBA,this.fillCanvas,this.potWidth,this.potHeight)},this)},setTexture:function(t,e){return this.displayTexture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){var e=this.displayTexture.get(t);return this.potWidth=h(e.width),this.potHeight=h(e.height),this.canvas.width=0,e.cutWidth&&e.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.displayFrame=e,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(t,e){return void 0!==t&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},setTileScale:function(t,e){return void 0===t&&(t=this.tileScaleX),void 0===e&&(e=t),this.tileScaleX=t,this.tileScaleY=e,this},updateTileTexture:function(){if(this.dirty&&this.renderer){var t=this.displayFrame;if(t.source.isRenderTexture||t.source.isGLTexture)return console.warn("TileSprites can only use Image or Canvas based textures"),void(this.dirty=!1);var e=this.fillContext,i=this.fillCanvas,n=this.potWidth,s=this.potHeight;this.renderer.gl||(n=t.cutWidth,s=t.cutHeight),e.clearRect(0,0,n,s),i.width=n,i.height=s,e.drawImage(t.source.image,t.cutX,t.cutY,t.cutWidth,t.cutHeight,0,0,n,s),this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(i,this.fillPattern):this.fillPattern=e.createPattern(i,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var t=this.canvas;if(t.width===this.width&&t.height===this.height||(t.width=this.width,t.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl)this.dirty=!1;else{var e=this.context;this.scene.sys.game.config.antialias||l.disable(e);var i=this._tileScale.x,n=this._tileScale.y,s=this._tilePosition.x,r=this._tilePosition.y;e.clearRect(0,0,this.width,this.height),e.save(),e.scale(i,n),e.translate(-s,-r),e.fillStyle=this.fillPattern,e.fillRect(s,r,this.width/i,this.height/n),e.restore(),this.dirty=!1}},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),n.remove(this.canvas),n.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null,this.texture.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(t){this._tilePosition.x=t,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(t){this._tilePosition.y=t,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(t){this._tileScale.x=t,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(t){this._tileScale.y=t,this.dirty=!0}}});t.exports=d},function(t,e,i){var n=i(0),s=i(22),r=i(12),o=i(90),a=i(18),h=i(14),l=i(59),u=i(194),c=i(987),d=i(13),f=new n({Extends:h,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,c],initialize:function(t,e,i,n){h.call(this,t,"Video"),this.video=null,this.videoTexture=null,this.videoTextureSource=null,this.snapshotTexture=null,this.flipY=!1,this._key=u(),this.touchLocked=!0,this.playWhenUnlocked=!1,this.retryLimit=20,this.retry=0,this.retryInterval=500,this._retryID=null,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={play:this.playHandler.bind(this),error:this.loadErrorHandler.bind(this),end:this.completeHandler.bind(this),time:this.timeUpdateHandler.bind(this),seeking:this.seekingHandler.bind(this),seeked:this.seekedHandler.bind(this)},this._crop=this.resetCropObject(),this.markers={},this._markerIn=-1,this._markerOut=d.MAX_SAFE_INTEGER,this._lastUpdate=0,this._cacheKey="",this._isSeeking=!1,this.removeVideoElementOnDestroy=!1,this.setPosition(e,i),this.initPipeline(),n&&this.changeSource(n,!1);var s=t.sys.game.events;s.on(a.PAUSE,this.globalPause,this),s.on(a.RESUME,this.globalResume,this);var r=t.sys.sound;r&&r.on(l.GLOBAL_MUTE,this.globalMute,this)},play:function(t,e,i){if(this.touchLocked&&this.playWhenUnlocked||this.isPlaying())return this;var n=this.video;if(!n)return console.warn("Video not loaded"),this;void 0===t&&(t=n.loop);var s=this.scene.sys.sound;s&&s.mute&&this.setMute(!0),isNaN(e)||(this._markerIn=e),!isNaN(i)&&i>e&&(this._markerOut=i),n.loop=t;var r=this._callbacks,o=n.play();return void 0!==o?o.then(this.playPromiseSuccessHandler.bind(this)).catch(this.playPromiseErrorHandler.bind(this)):(n.addEventListener("playing",r.play,!0),n.readyState<2&&(this.retry=this.retryLimit,this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval))),n.addEventListener("ended",r.end,!0),n.addEventListener("timeupdate",r.time,!0),n.addEventListener("seeking",r.seeking,!0),n.addEventListener("seeked",r.seeked,!0),this},changeSource:function(t,e,i,n,s){void 0===e&&(e=!0),this.video&&this.stop();var r=this.scene.sys.cache.video.get(t);return r?(this.video=r,this._cacheKey=t,this._codePaused=r.paused,this._codeMuted=r.muted,this.videoTexture?(this.scene.sys.textures.remove(this._key),this.videoTexture=this.scene.sys.textures.create(this._key,r,r.videoWidth,r.videoHeight),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,r.videoWidth,r.videoHeight),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,r.videoWidth,r.videoHeight)):this.updateTexture(),r.currentTime=0,this._lastUpdate=0,e&&this.play(i,n,s)):this.video=null,this},addMarker:function(t,e,i){return!isNaN(e)&&e>=0&&!isNaN(i)&&(this.markers[t]=[e,i]),this},playMarker:function(t,e){var i=this.markers[t];return i&&this.play(e,i[0],i[1]),this},removeMarker:function(t){return delete this.markers[t],this},snapshot:function(t,e){return void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.snapshotArea(0,0,this.width,this.height,t,e)},snapshotArea:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=this.height),void 0===s&&(s=i),void 0===r&&(r=n);var o=this.video,a=this.snapshotTexture;return a?(a.setSize(s,r),o&&a.context.drawImage(o,t,e,i,n,0,0,s,r)):(a=this.scene.sys.textures.createCanvas(u(),s,r),this.snapshotTexture=a,o&&a.context.drawImage(o,t,e,i,n,0,0,s,r)),a.update()},saveSnapshotTexture:function(t){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,t):this.snapshotTexture=this.scene.sys.textures.createCanvas(t,this.width,this.height),this.snapshotTexture},loadURL:function(t,e,i){void 0===e&&(e="loadeddata"),void 0===i&&(i=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var n=document.createElement("video");return n.controls=!1,i&&(n.muted=!0,n.defaultMuted=!0,n.setAttribute("autoplay","autoplay")),n.setAttribute("playsinline","playsinline"),n.setAttribute("preload","auto"),n.addEventListener("error",this._callbacks.error,!0),n.src=t,n.load(),this.video=n,this},playPromiseSuccessHandler:function(){this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn)},playPromiseErrorHandler:function(t){this.scene.sys.input.once("pointerdown",this.unlockHandler,this),this.touchLocked=!0,this.playWhenUnlocked=!0,this.emit(o.VIDEO_ERROR,this,t)},playHandler:function(){this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this.video.removeEventListener("playing",this._callbacks.play,!0)},loadErrorHandler:function(t){this.stop(),this.emit(o.VIDEO_ERROR,this,t)},unlockHandler:function(){this.touchLocked=!1,this.playWhenUnlocked=!1,this.emit(o.VIDEO_UNLOCKED,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn),this.video.play(),this.emit(o.VIDEO_PLAY,this)},completeHandler:function(){this.emit(o.VIDEO_COMPLETE,this)},timeUpdateHandler:function(){this.video&&this.video.currentTime=this._markerOut&&(t.loop?(t.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=e,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),this.stop())))}},checkVideoProgress:function(){this.video.readyState>=2?this.updateTexture():(this.retry--,this.retry>0?this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval):this.emit(o.VIDEO_TIMEOUT,this))},updateTexture:function(){var t=this.video,e=t.videoWidth,i=t.videoHeight;if(this.videoTexture){var n=this.videoTextureSource;n.source!==t&&(n.source=t,n.width=e,n.height=i),n.update()}else this.videoTexture=this.scene.sys.textures.create(this._key,t,e,i),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,e,i),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,e,i)},getVideoKey:function(){return this._cacheKey},seekTo:function(t){var e=this.video;if(e){var i=e.duration;if(i!==1/0&&!isNaN(i)){var n=i*t;this.setCurrentTime(n)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(t){var e=this.video;if(e){if("string"==typeof t){var i=t[0],n=parseFloat(t.substr(1));"+"===i?t=e.currentTime+n:"-"===i&&(t=e.currentTime-n)}e.currentTime=t,this._lastUpdate=t}return this},isSeeking:function(){return this._isSeeking},seekingHandler:function(){this._isSeeking=!0,this.emit(o.VIDEO_SEEKING,this)},seekedHandler:function(){this._isSeeking=!1,this.emit(o.VIDEO_SEEKED,this),this.video&&this.updateTexture()},getProgress:function(){var t=this.video;if(t){var e=t.currentTime,i=t.duration;if(i!==1/0&&!isNaN(i))return e/i}return 0},getDuration:function(){return this.video?this.video.duration:0},setMute:function(t){void 0===t&&(t=!0),this._codeMuted=t;var e=this.video;return e&&(e.muted=!!this._systemMuted||t),this},isMuted:function(){return this._codeMuted},globalMute:function(t,e){this._systemMuted=e;var i=this.video;i&&(i.muted=!!this._codeMuted||e)},globalPause:function(){this._systemPaused=!0,this.video&&this.video.pause()},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&this.video.play()},setPaused:function(t){void 0===t&&(t=!0);var e=this.video;return this._codePaused=t,e&&(t?e.paused||e.pause():t||e.paused&&!this._systemPaused&&e.play()),this},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(t){return void 0===t&&(t=1),this.video&&(this.video.volume=s(t,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(t){return this.video&&(this.video.playbackRate=t),this},getLoop:function(){return!!this.video&&this.video.loop},setLoop:function(t){return void 0===t&&(t=!0),this.video&&(this.video.loop=t),this},isPlaying:function(){return!!this.video&&!(this.video.paused||this.video.ended)},isPaused:function(){return this.video&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(t,e){return void 0===e&&(e=!1),this.videoTexture&&this.scene.sys.textures.renameTexture(this._key,t),this._key=t,this.flipY=e,this.videoTextureSource&&this.videoTextureSource.setFlipY(e),this.videoTexture},stop:function(){var t=this.video;if(t){var e=this._callbacks;for(var i in e)t.removeEventListener(i,e[i],!0);t.pause()}return this._retryID&&window.clearTimeout(this._retryID),this.emit(o.VIDEO_STOP,this),this},removeVideoElement:function(){var t=this.video;if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("autoplay"),t.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(),this.removeVideoElementOnDestroy&&this.removeVideoElement();var t=this.scene.sys.game.events;t.off(a.PAUSE,this.globalPause,this),t.off(a.RESUME,this.globalResume,this);var e=this.scene.sys.sound;e&&e.off(l.GLOBAL_MUTE,this.globalMute,this),this._retryID&&window.clearTimeout(this._retryID)}});t.exports=f},function(t,e,i){var n=i(0),s=i(199),r=i(411),o=i(46),a=new n({initialize:function(t){this.type=o.POLYGON,this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return s(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],"string"==typeof t&&(t=t.split(" ")),!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,n=0;no||r>a)return!1;if(s<=i||r<=n)return!0;var h=s-i,l=r-n;return h*h+l*l<=t.radius*t.radius}},function(t,e,i){var n=i(4),s=i(205);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r,o,a=t.x1,h=t.y1,l=t.x2,u=t.y2,c=e.x,d=e.y,f=e.radius,p=l-a,g=u-h,v=a-c,m=h-d,y=p*p+g*g,x=2*(p*v+g*m),T=x*x-4*y*(v*v+m*m-f*f);if(0===T){var w=-x/(2*y);r=a+w*p,o=h+w*g,w>=0&&w<=1&&i.push(new n(r,o))}else if(T>0){var b=(-x-Math.sqrt(T))/(2*y);r=a+b*p,o=h+b*g,b>=0&&b<=1&&i.push(new n(r,o));var E=(-x+Math.sqrt(T))/(2*y);r=a+E*p,o=h+E*g,E>=0&&E<=1&&i.push(new n(r,o))}}return i}},function(t,e,i){var n=i(55),s=new(i(4));t.exports=function(t,e,i){if(void 0===i&&(i=s),n(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(n(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,l=r*r+o*o,u=r,c=o;if(l>0){var d=(a*r+h*o)/l;u*=d,c*=d}return i.x=t.x1+u,i.y=t.y1+c,u*u+c*c<=l&&u*r+c*o>=0&&n(e,i.x,i.y)}},function(t,e,i){var n=i(4),s=i(84),r=i(424);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e))for(var o=e.getLineA(),a=e.getLineB(),h=e.getLineC(),l=e.getLineD(),u=[new n,new n,new n,new n],c=[s(o,t,u[0]),s(a,t,u[1]),s(h,t,u[2]),s(l,t,u[3])],d=0;d<4;d++)c[d]&&i.push(u[d]);return i}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=[]);for(var s,r,o,a,h,l,u=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,f=t.y2-t.y1,p=u*u+c*c,g=u*d+c*f,v=d*d+f*f,m=p*v-g*g,y=0===m?0:1/m,x=t.x1,T=t.y1,w=0;w=0&&r>=0&&s+r<1&&(n.push({x:e[w].x,y:e[w].y}),i)));w++);return n}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,t}},function(t,e){t.exports=function(t){return 0===t.height?NaN:t.width/t.height}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,o=t.x3-e,a=t.y3-i,t.x3=o*s-a*r+e,t.y3=o*r+a*s+i,t}},function(t,e,i){t.exports={BUTTON_DOWN:i(1189),BUTTON_UP:i(1190),CONNECTED:i(1191),DISCONNECTED:i(1192),GAMEPAD_BUTTON_DOWN:i(1193),GAMEPAD_BUTTON_UP:i(1194)}},function(t,e,i){var n=i(17),s=i(135);t.exports=function(t,e){var i=void 0===t?s():n({},t);if(e)for(var r in e)void 0!==e[r]&&(i[r]=e[r]);return i}},function(t,e,i){var n=i(0),s=i(20),r=i(21),o=i(8),a=i(2),h=i(7),l=i(358),u=new n({Extends:r,initialize:function(t,e,i,n){var s="xml";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),s=a(o,"extension",s)}var l={type:"xml",cache:t.cacheManager.xml,extension:s,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,l)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=l(this.xhrLoader.responseText),this.data?this.onProcessComplete():(console.warn("Invalid XMLFile: "+this.key),this.onProcessError())}});o.register("xml",function(t,e,i){if(Array.isArray(t))for(var n=0;n0?1:.7),e.damping=e.damping||0,e.angularStiffness=e.angularStiffness||0,e.angleA=e.bodyA?e.bodyA.angle:e.angleA,e.angleB=e.bodyB?e.bodyB.angle:e.angleB,e.plugin={};var o={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return 0===e.length&&e.stiffness>.1?(o.type="pin",o.anchors=!1):e.stiffness<.9&&(o.type="spring"),e.render=l.extend(o,e.render),e},n.preSolveAll=function(t){for(var e=0;e0&&(c.position.x+=l.x,c.position.y+=l.y),0!==l.angle&&(s.rotate(c.vertices,l.angle,i.position),h.rotate(c.axes,l.angle),u>0&&r.rotateAbout(c.position,l.angle,i.position,c.position)),a.update(c.bounds,c.vertices,i.velocity)}l.angle*=n._warming,l.x*=n._warming,l.y*=n._warming}}},n.pointAWorld=function(t){return{x:(t.bodyA?t.bodyA.position.x:0)+t.pointA.x,y:(t.bodyA?t.bodyA.position.y:0)+t.pointA.y}},n.pointBWorld=function(t){return{x:(t.bodyB?t.bodyB.position.x:0)+t.pointB.x,y:(t.bodyB?t.bodyB.position.y:0)+t.pointB.y}}},function(t,e,i){var n=i(138);t.exports=function(t,e,i){var s=n(t,e,!0,i),r=n(t,e-1,!0,i),o=n(t,e+1,!0,i),a=n(t-1,e,!0,i),h=n(t+1,e,!0,i),l=s&&s.collides;return l&&(s.faceTop=!0,s.faceBottom=!0,s.faceLeft=!0,s.faceRight=!0),r&&r.collides&&(l&&(s.faceTop=!1),r.faceBottom=!l),o&&o.collides&&(l&&(s.faceBottom=!1),o.faceTop=!l),a&&a.collides&&(l&&(s.faceLeft=!1),a.faceRight=!l),h&&h.collides&&(l&&(s.faceRight=!1),h.faceLeft=!l),s&&!s.collides&&s.resetFaces(),s}},function(t,e,i){var n=i(74),s=i(103),r=i(217),o=i(73);t.exports=function(t,e,i,a,h){if(!s(e,i,h))return null;void 0===a&&(a=!0);var l=h.data[i][e],u=l&&l.collides;if(t instanceof n)null===h.data[i][e]&&(h.data[i][e]=new n(h,t.index,e,i,t.width,t.height)),h.data[i][e].copy(t);else{var c=t;null===h.data[i][e]?h.data[i][e]=new n(h,c,e,i,h.tileWidth,h.tileHeight):h.data[i][e].index=c}var d=h.data[i][e],f=-1!==h.collideIndexes.indexOf(d.index);return o(d,f),a&&u!==d.collides&&r(e,i,h),d}},function(t,e){t.exports=function(t,e,i){var n=i.collideIndexes.indexOf(t);e&&-1===n?i.collideIndexes.push(t):e||-1===n||i.collideIndexes.splice(n,1)}},function(t,e,i){var n=i(31),s=i(104),r=i(105),o=i(74);t.exports=function(t,e,i,a,h){for(var l=new s({tileWidth:i,tileHeight:a}),u=new r({name:t,tileWidth:i,tileHeight:a,format:n.ARRAY_2D,layers:[l]}),c=[],d=e.length,f=0,p=0;p0&&(s.totalDuration+=s.t2*s.repeat),s.totalDuration>t&&(t=s.totalDuration),s.delay0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay,this.startDelay=e},init:function(){if(this.paused&&!this.parentIsTimeline)return this.state=h.PENDING_ADD,this._pausedState=h.INIT,!1;for(var t=this.data,e=this.totalTargets,i=0;i0?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=h.LOOP_DELAY):(this.state=h.ACTIVE,this.dispatchTweenEvent(r.TWEEN_LOOP,this.callbacks.onLoop))):this.completeDelay>0?(this.state=h.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=h.PENDING_REMOVE,this.dispatchTweenEvent(r.TWEEN_COMPLETE,this.callbacks.onComplete))},pause:function(){return this.state===h.PAUSED?this:(this.paused=!0,this._pausedState=this.state,this.state=h.PAUSED,this)},play:function(t){void 0===t&&(t=!1);var e=this.state;return e!==h.INIT||this.parentIsTimeline?e===h.ACTIVE||e===h.PENDING_ADD&&this._pausedState===h.PENDING_ADD?this:this.parentIsTimeline||e!==h.PENDING_REMOVE&&e!==h.REMOVED?(this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?this.state=h.ACTIVE:(this.countdown=this.calculatedOffset,this.state=h.OFFSET_DELAY)):this.paused?(this.paused=!1,this.makeActive()):(this.resetTweenData(t),this.state=h.ACTIVE,this.makeActive()),this):(this.seek(0),this.parent.makeActive(this),this):(this.resetTweenData(!1),this.state=h.ACTIVE,this)},resetTweenData:function(t){for(var e=this.data,i=this.totalData,n=this.totalTargets,s=0;s0&&(r.elapsed=r.delay,r.state=h.DELAY),r.getActiveValue&&(o[a]=r.getActiveValue(r.target,r.key,r.start))}},resume:function(){return this.state===h.PAUSED?(this.paused=!1,this.state=this._pausedState):this.play(),this},seek:function(t,e){if(void 0===e&&(e=16.6),this.totalDuration>=36e5)return console.warn("Tween.seek duration too long"),this;this.state===h.REMOVED&&this.makeActive(),this.elapsed=0,this.progress=0,this.totalElapsed=0,this.totalProgress=0;for(var i=this.data,n=this.totalTargets,s=0;s0&&(r.elapsed=r.delay,r.state=h.DELAY)}this.calcDuration();var c=!1;this.state===h.PAUSED&&(c=!0,this.state=h.ACTIVE),this.isSeeking=!0;do{this.update(0,e)}while(this.totalProgress0?(e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY(),e.start=e.getStartValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.end=e.getEndValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,h.REPEAT_DELAY):(this.dispatchTweenDataEvent(r.TWEEN_REPEAT,t.callbacks.onRepeat,e),h.PLAYING_FORWARD)):h.COMPLETE},setStateFromStart:function(t,e,i){return e.repeatCounter>0?(e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY(),e.end=e.getEndValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,h.REPEAT_DELAY):(this.dispatchTweenDataEvent(r.TWEEN_REPEAT,t.callbacks.onRepeat,e),h.PLAYING_FORWARD)):h.COMPLETE},updateTweenData:function(t,e,i){var n=e.target;switch(e.state){case h.PLAYING_FORWARD:case h.PLAYING_BACKWARD:if(!n){e.state=h.COMPLETE;break}var s=e.elapsed,o=e.duration,a=0;(s+=i)>o&&(a=s-o,s=o);var l=e.state===h.PLAYING_FORWARD,u=s/o;if(e.elapsed=s,e.progress=u,e.previous=e.current,1===u)l?(e.current=e.end,n[e.key]=e.end,e.hold>0?(e.elapsed=e.hold-a,e.state=h.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,a)):(e.current=e.start,n[e.key]=e.start,e.state=this.setStateFromStart(t,e,a));else{var c=l?e.ease(u):e.ease(1-u);e.current=e.start+(e.end-e.start)*c,n[e.key]=e.current}this.dispatchTweenDataEvent(r.TWEEN_UPDATE,t.callbacks.onUpdate,e);break;case h.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=h.PENDING_RENDER);break;case h.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=h.PLAYING_FORWARD,this.dispatchTweenDataEvent(r.TWEEN_REPEAT,t.callbacks.onRepeat,e));break;case h.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case h.PENDING_RENDER:n?(e.start=e.getStartValue(n,e.key,n[e.key],e.index,t.totalTargets,t),e.end=e.getEndValue(n,e.key,e.start,e.index,t.totalTargets,t),e.current=e.start,n[e.key]=e.start,e.state=h.PLAYING_FORWARD):e.state=h.COMPLETE}return e.state!==h.COMPLETE}});u.TYPES=["onActive","onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],a.register("tween",function(t){return this.scene.sys.tweens.add(t)}),o.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=u},function(t,e,i){t.exports={TIMELINE_COMPLETE:i(1346),TIMELINE_LOOP:i(1347),TIMELINE_PAUSE:i(1348),TIMELINE_RESUME:i(1349),TIMELINE_START:i(1350),TIMELINE_UPDATE:i(1351),TWEEN_ACTIVE:i(1352),TWEEN_COMPLETE:i(1353),TWEEN_LOOP:i(1354),TWEEN_REPEAT:i(1355),TWEEN_START:i(1356),TWEEN_UPDATE:i(1357),TWEEN_YOYO:i(1358)}},function(t,e){t.exports=function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p){return{target:t,index:e,key:i,getActiveValue:r,getEndValue:n,getStartValue:s,ease:o,duration:0,totalDuration:0,delay:0,yoyo:l,hold:0,repeat:0,repeatDelay:0,flipX:f,flipY:p,progress:0,elapsed:0,repeatCounter:0,start:0,previous:0,current:0,end:0,t1:0,t2:0,gen:{delay:a,duration:h,hold:u,repeat:c,repeatDelay:d},state:0}}},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},function(t,e,i){var n=i(58);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e,i){var n=i(58);t.exports=function(t){return n(t,-180,180)}},function(t,e,i){var n=i(0),s=i(10),r=new n({initialize:function(t){this.name="WebGLPipeline",this.game=t.game,this.view=t.game.canvas,this.resolution=1,this.width=0,this.height=0,this.gl=t.gl,this.vertexCount=0,this.vertexCapacity=t.vertexCapacity,this.renderer=t.renderer,this.vertexData=t.vertices?t.vertices:new ArrayBuffer(t.vertexCapacity*t.vertexSize),this.vertexBuffer=this.renderer.createVertexBuffer(t.vertices?t.vertices:this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=this.renderer.createProgram(t.vertShader,t.fragShader),this.attributes=t.attributes,this.vertexSize=t.vertexSize,this.topology=t.topology,this.bytes=new Uint8Array(this.vertexData),this.vertexComponentCount=s.getComponentCount(t.attributes,this.gl),this.flushLocked=!1,this.active=!1},boot:function(){},addAttribute:function(t,e,i,n,r){return this.attributes.push({name:t,size:e,type:this.renderer.glFormats[i],normalized:n,offset:r}),this.vertexComponentCount=s.getComponentCount(this.attributes,this.gl),this},shouldFlush:function(){return this.vertexCount>=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this.resolution=i,this},bind:function(){var t=this.gl,e=this.vertexBuffer,i=this.attributes,n=this.program,s=this.renderer,r=this.vertexSize;s.setProgram(n),s.setVertexBuffer(e);for(var o=0;o=0?(t.enableVertexAttribArray(h),t.vertexAttribPointer(h,a.size,a.type,a.normalized,r,a.offset)):-1!==h&&t.disableVertexAttribArray(h)}return this},onBind:function(){return this},onPreRender:function(){return this},onRender:function(){return this},onPostRender:function(){return this},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.vertexCount,i=this.topology,n=this.vertexSize;if(0!==e)return t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,e*n)),t.drawArrays(i,0,e),this.vertexCount=0,this.flushLocked=!1,this;this.flushLocked=!1},destroy:function(){var t=this.gl;return t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),delete this.program,delete this.vertexBuffer,delete this.gl,this},setFloat1:function(t,e){return this.renderer.setFloat1(this.program,t,e),this},setFloat2:function(t,e,i){return this.renderer.setFloat2(this.program,t,e,i),this},setFloat3:function(t,e,i,n){return this.renderer.setFloat3(this.program,t,e,i,n),this},setFloat4:function(t,e,i,n,s){return this.renderer.setFloat4(this.program,t,e,i,n,s),this},setFloat1v:function(t,e){return this.renderer.setFloat1v(this.program,t,e),this},setFloat2v:function(t,e){return this.renderer.setFloat2v(this.program,t,e),this},setFloat3v:function(t,e){return this.renderer.setFloat3v(this.program,t,e),this},setFloat4v:function(t,e){return this.renderer.setFloat4v(this.program,t,e),this},setInt1:function(t,e){return this.renderer.setInt1(this.program,t,e),this},setInt2:function(t,e,i){return this.renderer.setInt2(this.program,t,e,i),this},setInt3:function(t,e,i,n){return this.renderer.setInt3(this.program,t,e,i,n),this},setInt4:function(t,e,i,n,s){return this.renderer.setInt4(this.program,t,e,i,n,s),this},setMatrix2:function(t,e,i){return this.renderer.setMatrix2(this.program,t,e,i),this},setMatrix3:function(t,e,i){return this.renderer.setMatrix3(this.program,t,e,i),this},setMatrix4:function(t,e,i){return this.renderer.setMatrix4(this.program,t,e,i),this}});t.exports=r},function(t,e,i){var n=i(0),s=i(66),r=i(2),o=i(506),a=i(779),h=i(780),l=i(32),u=i(10),c=i(234),d=new n({Extends:c,Mixins:[o],initialize:function(t){var e=t.renderer.config;c.call(this,{game:t.game,renderer:t.renderer,gl:t.renderer.gl,topology:r(t,"topology",t.renderer.gl.TRIANGLES),vertShader:r(t,"vertShader",h),fragShader:r(t,"fragShader",a),vertexCapacity:r(t,"vertexCapacity",6*e.batchSize),vertexSize:r(t,"vertexSize",5*Float32Array.BYTES_PER_ELEMENT+4*Uint8Array.BYTES_PER_ELEMENT),attributes:[{name:"inPosition",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:0},{name:"inTexCoord",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:2*Float32Array.BYTES_PER_ELEMENT},{name:"inTintEffect",size:1,type:t.renderer.gl.FLOAT,normalized:!1,offset:4*Float32Array.BYTES_PER_ELEMENT},{name:"inTint",size:4,type:t.renderer.gl.UNSIGNED_BYTE,normalized:!0,offset:5*Float32Array.BYTES_PER_ELEMENT}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.vertexViewU32=new Uint32Array(this.vertexData),this.maxQuads=e.batchSize,this.batches=[],this._tempMatrix1=new l,this._tempMatrix2=new l,this._tempMatrix3=new l,this._tempMatrix4=new l,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.tintEffect=2,this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[],this.mvpInit()},onBind:function(){return c.prototype.onBind.call(this),this.mvpUpdate(),this},resize:function(t,e,i){return c.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},setTexture2D:function(t,e){return void 0===t&&(t=this.renderer.blankTexture.glTexture),void 0===e&&(e=0),this.requireTextureBatch(t,e)&&this.pushBatch(t,e),this},requireTextureBatch:function(t,e){var i=this.batches,n=i.length;return!(n>0)||!((e>0?i[n-1].textures[e-1]:i[n-1].texture)===t)},pushBatch:function(t,e){if(0===e)this.batches.push({first:this.vertexCount,texture:t,textures:[]});else{var i=[];i[e-1]=t,this.batches.push({first:this.vertexCount,texture:null,textures:i})}},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t,e,i,n=this.gl,s=this.vertexCount,r=this.topology,o=this.vertexSize,a=this.renderer,h=this.batches,l=h.length,u=0,c=null;if(0===l||0===s)return this.flushLocked=!1,this;n.bufferSubData(n.ARRAY_BUFFER,0,this.bytes.subarray(0,s*o));for(var d=0;d0){for(e=0;e0){for(e=0;e0&&(a.setTexture2D(c.texture,0,!1),n.drawArrays(r,c.first,u)),this.vertexCount=0,h.length=0,this.flushLocked=!1,this},batchSprite:function(t,e,i){this.renderer.setPipeline(this);var n=this._tempMatrix1,s=this._tempMatrix2,r=this._tempMatrix3,o=t.frame,a=o.glTexture,h=o.u0,l=o.v0,c=o.u1,d=o.v1,f=o.x,p=o.y,g=o.cutWidth,v=o.cutHeight,m=o.customPivot,y=t.displayOriginX,x=t.displayOriginY,T=-y+f,w=-x+p;if(t.isCropped){var b=t._crop;b.flipX===t.flipX&&b.flipY===t.flipY||o.updateCropUVs(b,t.flipX,t.flipY),h=b.u0,l=b.v0,c=b.u1,d=b.v1,g=b.width,v=b.height,T=-y+(f=b.x),w=-x+(p=b.y)}var E=1,S=1;t.flipX&&(m||(T+=-o.realWidth+2*y),E=-1),(t.flipY||o.source.isGLTexture&&!a.flipY)&&(m||(w+=-o.realHeight+2*x),S=-1),s.applyITRS(t.x,t.y,t.rotation,t.scaleX*E,t.scaleY*S),n.copyFrom(e.matrix),i?(n.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),s.e=t.x,s.f=t.y,n.multiply(s,r)):(s.e-=e.scrollX*t.scrollFactorX,s.f-=e.scrollY*t.scrollFactorY,n.multiply(s,r));var A=T+g,_=w+v,C=r.getX(T,w),M=r.getY(T,w),O=r.getX(T,_),P=r.getY(T,_),R=r.getX(A,_),L=r.getY(A,_),k=r.getX(A,w),D=r.getY(A,w),F=u.getTintAppendFloatAlpha(t._tintTL,e.alpha*t._alphaTL),I=u.getTintAppendFloatAlpha(t._tintTR,e.alpha*t._alphaTR),B=u.getTintAppendFloatAlpha(t._tintBL,e.alpha*t._alphaBL),N=u.getTintAppendFloatAlpha(t._tintBR,e.alpha*t._alphaBR);e.roundPixels&&(C=Math.round(C),M=Math.round(M),O=Math.round(O),P=Math.round(P),R=Math.round(R),L=Math.round(L),k=Math.round(k),D=Math.round(D)),this.setTexture2D(a,0);var Y=t._isTinted&&t.tintFill;this.batchQuad(C,M,O,P,R,L,k,D,h,l,c,d,F,I,B,N,Y,a,0)},batchQuad:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,m,y){var x=!1;this.vertexCount+6>this.vertexCapacity&&(this.flush(),x=!0,this.setTexture2D(m,y));var T=this.vertexViewF32,w=this.vertexViewU32,b=this.vertexCount*this.vertexComponentCount-1;return T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=v,w[++b]=d,T[++b]=i,T[++b]=n,T[++b]=h,T[++b]=c,T[++b]=v,w[++b]=p,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=v,w[++b]=g,T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=v,w[++b]=d,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=v,w[++b]=g,T[++b]=o,T[++b]=a,T[++b]=u,T[++b]=l,T[++b]=v,w[++b]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g){var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),this.setTexture2D(p,g),v=!0);var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=f,y[++x]=u,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=l,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=l,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},batchTexture:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,m,y,x,T,w,b,E,S,A,_,C,M,O,P){this.renderer.setPipeline(this,t);var R=this._tempMatrix1,L=this._tempMatrix2,k=this._tempMatrix3,D=m/i+_,F=y/n+C,I=(m+x)/i+_,B=(y+T)/n+C,N=o,Y=a,X=-g,z=-v;if(t.isCropped){var U=t._crop;N=U.width,Y=U.height,o=U.width,a=U.height;var G=m=U.x,W=y=U.y;c&&(G=x-U.x-U.width),d&&!e.isRenderTexture&&(W=T-U.y-U.height),D=G/i+_,F=W/n+C,I=(G+U.width)/i+_,B=(W+U.height)/n+C,X=-g+m,z=-v+y}d^=!P&&e.isRenderTexture?1:0,c&&(N*=-1,X+=o),d&&(Y*=-1,z+=a);var V=X+N,H=z+Y;L.applyITRS(s,r,u,h,l),R.copyFrom(M.matrix),O?(R.multiplyWithOffset(O,-M.scrollX*f,-M.scrollY*p),L.e=s,L.f=r,R.multiply(L,k)):(L.e-=M.scrollX*f,L.f-=M.scrollY*p,R.multiply(L,k));var j=k.getX(X,z),q=k.getY(X,z),K=k.getX(X,H),J=k.getY(X,H),Z=k.getX(V,H),Q=k.getY(V,H),$=k.getX(V,z),tt=k.getY(V,z);M.roundPixels&&(j=Math.round(j),q=Math.round(q),K=Math.round(K),J=Math.round(J),Z=Math.round(Z),Q=Math.round(Q),$=Math.round($),tt=Math.round(tt)),this.setTexture2D(e,0),this.batchQuad(j,q,K,J,Z,Q,$,tt,D,F,I,B,w,b,E,S,A,e,0)},batchTextureFrame:function(t,e,i,n,s,r,o){this.renderer.setPipeline(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2,l=e+t.width,c=i+t.height;o?a.multiply(o,h):h=a;var d=h.getX(e,i),f=h.getY(e,i),p=h.getX(e,c),g=h.getY(e,c),v=h.getX(l,c),m=h.getY(l,c),y=h.getX(l,i),x=h.getY(l,i);this.setTexture2D(t.glTexture,0),n=u.getTintAppendFloatAlpha(n,s),this.batchQuad(d,f,p,g,v,m,y,x,t.u0,t.v0,t.u1,t.v1,n,n,n,n,0,t.glTexture,0)},drawFillRect:function(t,e,i,n,s,r){var o=t+i,a=e+n;this.setTexture2D();var h=u.getTintAppendFloatAlphaAndSwap(s,r);this.batchQuad(t,e,t,a,o,a,o,e,0,0,1,1,h,h,h,h,2)},batchFillRect:function(t,e,i,n,s,r){this.renderer.setPipeline(this);var o=this._tempMatrix3;r&&r.multiply(s,o);var a=t+i,h=e+n,l=o.getX(t,e),u=o.getY(t,e),c=o.getX(t,h),d=o.getY(t,h),f=o.getX(a,h),p=o.getY(a,h),g=o.getX(a,e),v=o.getY(a,e),m=this.currentFrame,y=m.u0,x=m.v0,T=m.u1,w=m.v1;this.batchQuad(l,u,c,d,f,p,g,v,y,x,T,w,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.fillTint.BR,this.tintEffect)},batchFillTriangle:function(t,e,i,n,s,r,o,a){this.renderer.setPipeline(this);var h=this._tempMatrix3;a&&a.multiply(o,h);var l=h.getX(t,e),u=h.getY(t,e),c=h.getX(i,n),d=h.getY(i,n),f=h.getX(s,r),p=h.getY(s,r),g=this.currentFrame,v=g.u0,m=g.v0,y=g.u1,x=g.v1;this.batchTri(l,u,c,d,f,p,v,m,y,x,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.tintEffect)},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h){var l=this.tempTriangle;l[0].x=t,l[0].y=e,l[0].width=o,l[1].x=i,l[1].y=n,l[1].width=o,l[2].x=s,l[2].y=r,l[2].width=o,l[3].x=t,l[3].y=e,l[3].width=o,this.batchStrokePath(l,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.setPipeline(this);var n=this._tempMatrix3;i&&i.multiply(e,n);for(var r,o,a=t.length,h=this.polygonCache,l=this.fillTint.TL,u=this.fillTint.TR,c=this.fillTint.BL,d=this.tintEffect,f=0;f0&&H[4]?this.batchQuad(k,D,O,P,H[0],H[1],H[2],H[3],U,G,W,V,B,N,Y,X,I):(j[0]=k,j[1]=D,j[2]=O,j[3]=P,j[4]=1),h&&j[4]?this.batchQuad(C,M,R,L,j[0],j[1],j[2],j[3],U,G,W,V,B,N,Y,X,I):(H[0]=C,H[1]=M,H[2]=R,H[3]=L,H[4]=1)}}});t.exports=d},function(t,e,i){var n={};t.exports=n;var s=i(237);n._motionWakeThreshold=.18,n._motionSleepThreshold=.08,n._minBias=.9,n.update=function(t,e){for(var i=e*e*e,s=0;s0&&r.motion=r.sleepThreshold&&n.set(r,!0)):r.sleepCounter>0&&(r.sleepCounter-=1)}else n.set(r,!1)}},n.afterCollisions=function(t,e){for(var i=e*e*e,s=0;sn._motionWakeThreshold*i&&n.set(l,!1)}}}},n.set=function(t,e){var i=t.isSleeping;e?(t.isSleeping=!0,t.sleepCounter=t.sleepThreshold,t.positionImpulse.x=0,t.positionImpulse.y=0,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.anglePrev=t.angle,t.speed=0,t.angularSpeed=0,t.motion=0,i||s.trigger(t,"sleepStart")):(t.isSleeping=!1,t.sleepCounter=0,i&&s.trigger(t,"sleepEnd"))}},function(t,e,i){var n={};t.exports=n;var s=i(37);n.on=function(t,e,i){for(var n,s=e.split(" "),r=0;r0){i||(i={}),n=e.split(" ");for(var l=0;le.length&&(r=e.length),i?(n=e[r-1][i],(s=e[r][i])-t<=t-n?e[r]:e[r-1]):(n=e[r-1],(s=e[r])-t<=t-n?s:n)}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=n,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0}});t.exports=n},function(t,e,i){var n=i(52),s={_blendMode:n.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=n[t]),(t|=0)>=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e,i){var n=i(149),s=i(112);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=s(t)/i);for(var o=0;o=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n-h&&(c-=h,n+=l),fd.right&&(f=u(f,f+(g-d.right),this.lerp.x)),vd.bottom&&(p=u(p,p+(v-d.bottom),this.lerp.y))):(f=u(f,g-h,this.lerp.x),p=u(p,v-l,this.lerp.y))}this.useBounds&&(f=this.clampX(f),p=this.clampY(p)),this.roundPixels&&(h=Math.round(h),l=Math.round(l)),this.scrollX=f,this.scrollY=p;var m=f+n,y=p+s;this.midPoint.set(m,y);var x=e/o,T=i/o;this.worldView.setTo(m-x/2,y-T/2,x,T),a.applyITRS(this.x+h,this.y+l,this.rotation,o,o),a.translate(-h,-l),this.shakeEffect.preRender()},setLerp:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.lerp.set(t,e),this},setFollowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.followOffset.set(t,e),this},startFollow:function(t,e,i,n,s,r){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===s&&(s=0),void 0===r&&(r=s),this._follow=t,this.roundPixels=e,i=o(i,0,1),n=o(n,0,1),this.lerp.set(i,n),this.followOffset.set(s,r);var a=this.width/2,h=this.height/2,l=t.x-s,u=t.y-r;return this.midPoint.set(l,u),this.scrollX=l-a,this.scrollY=u-h,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.visible&&(this.panEffect.update(t,e),this.zoomEffect.update(t,e),this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e))},destroy:function(){this.clearRenderToTexture(),this.resetFX(),n.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=f},function(t,e,i){var n=i(33);t.exports=function(t){var e=new n;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var s=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16);e.setTo(s,r,o)}return e}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e){t.exports=function(t,e,i,n){void 0===n&&(n={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var s=Math.min(t,e,i),r=Math.max(t,e,i),o=r-s,a=0,h=0===r?0:o/r,l=r;return r!==s&&(r===t?a=(e-i)/o+(e16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},function(t,e,i){var n=i(33);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var n=i(33);t.exports=function(t){var e=new n,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var s=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(s,r,o,255*a)}return e}},function(t,e,i){t.exports={Fade:i(656),Flash:i(657),Pan:i(658),Shake:i(691),Zoom:i(692)}},function(t,e,i){t.exports={In:i(659),Out:i(660),InOut:i(661)}},function(t,e,i){t.exports={In:i(662),Out:i(663),InOut:i(664)}},function(t,e,i){t.exports={In:i(665),Out:i(666),InOut:i(667)}},function(t,e,i){t.exports={In:i(668),Out:i(669),InOut:i(670)}},function(t,e,i){t.exports={In:i(671),Out:i(672),InOut:i(673)}},function(t,e,i){t.exports={In:i(674),Out:i(675),InOut:i(676)}},function(t,e,i){t.exports=i(677)},function(t,e,i){t.exports={In:i(678),Out:i(679),InOut:i(680)}},function(t,e,i){t.exports={In:i(681),Out:i(682),InOut:i(683)}},function(t,e,i){t.exports={In:i(684),Out:i(685),InOut:i(686)}},function(t,e,i){t.exports={In:i(687),Out:i(688),InOut:i(689)}},function(t,e,i){t.exports=i(690)},function(t,e,i){var n=i(0),s=i(29),r=i(312),o=i(2),a=i(6),h=i(7),l=i(168),u=i(1),c=i(173),d=i(161),f=new n({initialize:function(t){void 0===t&&(t={});this.width=a(t,"width",1024),this.height=a(t,"height",768),this.zoom=a(t,"zoom",1),this.resolution=a(t,"resolution",1),this.parent=a(t,"parent",void 0),this.scaleMode=a(t,"scaleMode",0),this.expandParent=a(t,"expandParent",!0),this.autoRound=a(t,"autoRound",!1),this.autoCenter=a(t,"autoCenter",0),this.resizeInterval=a(t,"resizeInterval",500),this.fullscreenTarget=a(t,"fullscreenTarget",null),this.minWidth=a(t,"minWidth",0),this.maxWidth=a(t,"maxWidth",0),this.minHeight=a(t,"minHeight",0),this.maxHeight=a(t,"maxHeight",0);var e=a(t,"scale",null);e&&(this.width=a(e,"width",this.width),this.height=a(e,"height",this.height),this.zoom=a(e,"zoom",this.zoom),this.resolution=a(e,"resolution",this.resolution),this.parent=a(e,"parent",this.parent),this.scaleMode=a(e,"mode",this.scaleMode),this.expandParent=a(e,"expandParent",this.expandParent),this.autoRound=a(e,"autoRound",this.autoRound),this.autoCenter=a(e,"autoCenter",this.autoCenter),this.resizeInterval=a(e,"resizeInterval",this.resizeInterval),this.fullscreenTarget=a(e,"fullscreenTarget",this.fullscreenTarget),this.minWidth=a(e,"min.width",this.minWidth),this.maxWidth=a(e,"max.width",this.maxWidth),this.minHeight=a(e,"min.height",this.minHeight),this.maxHeight=a(e,"max.height",this.maxHeight)),this.renderType=a(t,"type",s.AUTO),this.canvas=a(t,"canvas",null),this.context=a(t,"context",null),this.canvasStyle=a(t,"canvasStyle",null),this.customEnvironment=a(t,"customEnvironment",!1),this.sceneConfig=a(t,"scene",null),this.seed=a(t,"seed",[(Date.now()*Math.random()).toString()]),l.RND=new l.RandomDataGenerator(this.seed),this.gameTitle=a(t,"title",""),this.gameURL=a(t,"url","https://phaser.io"),this.gameVersion=a(t,"version",""),this.autoFocus=a(t,"autoFocus",!0),this.domCreateContainer=a(t,"dom.createContainer",!1),this.domBehindCanvas=a(t,"dom.behindCanvas",!1),this.inputKeyboard=a(t,"input.keyboard",!0),this.inputKeyboardEventTarget=a(t,"input.keyboard.target",window),this.inputKeyboardCapture=a(t,"input.keyboard.capture",[]),this.inputMouse=a(t,"input.mouse",!0),this.inputMouseEventTarget=a(t,"input.mouse.target",null),this.inputMouseCapture=a(t,"input.mouse.capture",!0),this.inputTouch=a(t,"input.touch",r.input.touch),this.inputTouchEventTarget=a(t,"input.touch.target",null),this.inputTouchCapture=a(t,"input.touch.capture",!0),this.inputActivePointers=a(t,"input.activePointers",1),this.inputSmoothFactor=a(t,"input.smoothFactor",0),this.inputWindowEvents=a(t,"input.windowEvents",!0),this.inputGamepad=a(t,"input.gamepad",!1),this.inputGamepadEventTarget=a(t,"input.gamepad.target",window),this.disableContextMenu=a(t,"disableContextMenu",!1),this.audio=a(t,"audio"),this.hideBanner=!1===a(t,"banner",null),this.hidePhaser=a(t,"banner.hidePhaser",!1),this.bannerTextColor=a(t,"banner.text","#ffffff"),this.bannerBackgroundColor=a(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=a(t,"fps",null);var i=a(t,"render",t);this.antialias=a(i,"antialias",!0),this.antialiasGL=a(i,"antialiasGL",!0),this.mipmapFilter=a(i,"mipmapFilter","LINEAR"),this.desynchronized=a(i,"desynchronized",!1),this.roundPixels=a(i,"roundPixels",!1),this.pixelArt=a(i,"pixelArt",1!==this.zoom),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=a(i,"transparent",!1),this.clearBeforeRender=a(i,"clearBeforeRender",!0),this.premultipliedAlpha=a(i,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=a(i,"failIfMajorPerformanceCaveat",!1),this.powerPreference=a(i,"powerPreference","default"),this.batchSize=a(i,"batchSize",2e3),this.maxLights=a(i,"maxLights",10);var n=a(t,"backgroundColor",0);this.backgroundColor=d(n),0===n&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=a(t,"callbacks.preBoot",u),this.postBoot=a(t,"callbacks.postBoot",u),this.physics=a(t,"physics",{}),this.defaultPhysicsSystem=a(this.physics,"default",!1),this.loaderBaseURL=a(t,"loader.baseURL",""),this.loaderPath=a(t,"loader.path",""),this.loaderMaxParallelDownloads=a(t,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=a(t,"loader.crossOrigin",void 0),this.loaderResponseType=a(t,"loader.responseType",""),this.loaderAsync=a(t,"loader.async",!0),this.loaderUser=a(t,"loader.user",""),this.loaderPassword=a(t,"loader.password",""),this.loaderTimeout=a(t,"loader.timeout",0),this.installGlobalPlugins=[],this.installScenePlugins=[];var f=a(t,"plugins",null),p=c.DefaultScene;f&&(Array.isArray(f)?this.defaultPlugins=f:h(f)&&(this.installGlobalPlugins=o(f,"global",[]),this.installScenePlugins=o(f,"scene",[]),Array.isArray(f.default)?p=f.default:Array.isArray(f.defaultMerge)&&(p=p.concat(f.defaultMerge)))),this.defaultPlugins=p;var g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=a(t,"images.default",g+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=a(t,"images.missing",g+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),window&&(window.FORCE_WEBGL?this.renderType=s.WEBGL:window.FORCE_CANVAS&&(this.renderType=s.CANVAS))}});t.exports=f},function(t,e,i){t.exports={os:i(116),browser:i(117),features:i(167),input:i(721),audio:i(722),video:i(723),fullscreen:i(724),canvasFeatures:i(313)}},function(t,e,i){var n,s,r,o=i(26),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create(t,6,1).getContext("2d");if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return s*s+r*r}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t0?Math.ceil(t):Math.floor(t)}},function(t,e,i){var n=i(3);t.exports=function(t,e,i,s,r,o,a,h){void 0===h&&(h=new n);var l=Math.sin(r),u=Math.cos(r),c=u*o,d=l*o,f=-l*a,p=u*a,g=1/(c*p+f*-d);return h.x=p*g*t+-f*g*e+(s*f-i*p)*g,h.y=c*g*e+-d*g*t+(-s*c+i*d)*g,h}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},clone:function(){return new n(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return e*e+i*i+n*n+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12]*s,this.y=r[1]*e+r[5]*i+r[9]*n+r[13]*s,this.z=r[2]*e+r[6]*i+r[10]*n+r[14]*s,this.w=r[3]*e+r[7]*i+r[11]*n+r[15]*s,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*r-o*h,c=-l*s+o*a,d=h*s-r*a,f=e*u+i*c+n*d;return f?(f=1/f,t[0]=u*f,t[1]=(-l*i+n*h)*f,t[2]=(o*i-n*r)*f,t[3]=c*f,t[4]=(l*e-n*a)*f,t[5]=(-o*e+n*s)*f,t[6]=d*f,t[7]=(-h*e+i*a)*f,t[8]=(r*e-i*s)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=r*l-o*h,t[1]=n*h-i*l,t[2]=i*o-n*r,t[3]=o*a-s*l,t[4]=e*l-n*a,t[5]=n*s-e*o,t[6]=s*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*s,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*(l*r-o*h)+i*(-l*s+o*a)+n*(h*s-r*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],m=c[5],y=c[6],x=c[7],T=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*n+f*o+p*l,e[2]=d*s+f*a+p*u,e[3]=g*i+v*r+m*h,e[4]=g*n+v*o+m*l,e[5]=g*s+v*a+m*u,e[6]=y*i+x*r+T*h,e[7]=y*n+x*o+T*l,e[8]=y*s+x*a+T*u,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*r,e[1]=l*n+h*o,e[2]=l*s+h*a,e[3]=l*r-h*i,e[4]=l*o-h*n,e[5]=l*a-h*s,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,o=i+i,a=n+n,h=e*r,l=e*o,u=e*a,c=i*o,d=i*a,f=n*a,p=s*r,g=s*o,v=s*a,m=this.val;return m[0]=1-(c+f),m[3]=l+v,m[6]=u-g,m[1]=l-v,m[4]=1-(h+f),m[7]=d+p,m[2]=u+g,m[5]=d-p,m[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],v=e[13],m=e[14],y=e[15],x=n*h-s*a,T=n*l-r*a,w=n*u-o*a,b=s*l-r*h,E=s*u-o*h,S=r*u-o*l,A=c*v-d*g,_=c*m-f*g,C=c*y-p*g,M=d*m-f*v,O=d*y-p*v,P=f*y-p*m,R=x*P-T*O+w*M+b*C-E*_+S*A;return R?(R=1/R,i[0]=(h*P-l*O+u*M)*R,i[1]=(l*C-a*P-u*_)*R,i[2]=(a*O-h*C+u*A)*R,i[3]=(r*O-s*P-o*M)*R,i[4]=(n*P-r*C+o*_)*R,i[5]=(s*C-n*O-o*A)*R,i[6]=(v*S-m*E+y*b)*R,i[7]=(m*w-g*S-y*T)*R,i[8]=(g*E-v*w+y*x)*R,this):null}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this},zero:function(){var t=this.val;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=0,this},xyz:function(t,e,i){this.identity();var n=this.val;return n[12]=t,n[13]=e,n[14]=i,this},scaling:function(t,e,i){this.zero();var n=this.val;return n[0]=t,n[5]=e,n[10]=i,n[15]=1,this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[3],s=t[6],r=t[7],o=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=s,t[11]=t[14],t[12]=n,t[13]=r,t[14]=o,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15],m=e*o-i*r,y=e*a-n*r,x=e*h-s*r,T=i*a-n*o,w=i*h-s*o,b=n*h-s*a,E=l*p-u*f,S=l*g-c*f,A=l*v-d*f,_=u*g-c*p,C=u*v-d*p,M=c*v-d*g,O=m*M-y*C+x*_+T*A-w*S+b*E;return O?(O=1/O,t[0]=(o*M-a*C+h*_)*O,t[1]=(n*C-i*M-s*_)*O,t[2]=(p*b-g*w+v*T)*O,t[3]=(c*w-u*b-d*T)*O,t[4]=(a*A-r*M-h*S)*O,t[5]=(e*M-n*A+s*S)*O,t[6]=(g*x-f*b-v*y)*O,t[7]=(l*b-c*x+d*y)*O,t[8]=(r*C-o*A+h*E)*O,t[9]=(i*A-e*C-s*E)*O,t[10]=(f*w-p*x+v*m)*O,t[11]=(u*x-l*w-d*m)*O,t[12]=(o*S-r*_-a*E)*O,t[13]=(e*_-i*S+n*E)*O,t[14]=(p*y-f*T-g*m)*O,t[15]=(l*T-u*y+c*m)*O,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return t[0]=o*(c*v-d*g)-u*(a*v-h*g)+p*(a*d-h*c),t[1]=-(i*(c*v-d*g)-u*(n*v-s*g)+p*(n*d-s*c)),t[2]=i*(a*v-h*g)-o*(n*v-s*g)+p*(n*h-s*a),t[3]=-(i*(a*d-h*c)-o*(n*d-s*c)+u*(n*h-s*a)),t[4]=-(r*(c*v-d*g)-l*(a*v-h*g)+f*(a*d-h*c)),t[5]=e*(c*v-d*g)-l*(n*v-s*g)+f*(n*d-s*c),t[6]=-(e*(a*v-h*g)-r*(n*v-s*g)+f*(n*h-s*a)),t[7]=e*(a*d-h*c)-r*(n*d-s*c)+l*(n*h-s*a),t[8]=r*(u*v-d*p)-l*(o*v-h*p)+f*(o*d-h*u),t[9]=-(e*(u*v-d*p)-l*(i*v-s*p)+f*(i*d-s*u)),t[10]=e*(o*v-h*p)-r*(i*v-s*p)+f*(i*h-s*o),t[11]=-(e*(o*d-h*u)-r*(i*d-s*u)+l*(i*h-s*o)),t[12]=-(r*(u*g-c*p)-l*(o*g-a*p)+f*(o*c-a*u)),t[13]=e*(u*g-c*p)-l*(i*g-n*p)+f*(i*c-n*u),t[14]=-(e*(o*g-a*p)-r*(i*g-n*p)+f*(i*a-n*o)),t[15]=e*(o*c-a*u)-r*(i*c-n*u)+l*(i*a-n*o),this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return(e*o-i*r)*(c*v-d*g)-(e*a-n*r)*(u*v-d*p)+(e*h-s*r)*(u*g-c*p)+(i*a-n*o)*(l*v-d*f)-(i*h-s*o)*(l*g-c*f)+(n*h-s*a)*(l*p-u*f)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=e[9],d=e[10],f=e[11],p=e[12],g=e[13],v=e[14],m=e[15],y=t.val,x=y[0],T=y[1],w=y[2],b=y[3];return e[0]=x*i+T*o+w*u+b*p,e[1]=x*n+T*a+w*c+b*g,e[2]=x*s+T*h+w*d+b*v,e[3]=x*r+T*l+w*f+b*m,x=y[4],T=y[5],w=y[6],b=y[7],e[4]=x*i+T*o+w*u+b*p,e[5]=x*n+T*a+w*c+b*g,e[6]=x*s+T*h+w*d+b*v,e[7]=x*r+T*l+w*f+b*m,x=y[8],T=y[9],w=y[10],b=y[11],e[8]=x*i+T*o+w*u+b*p,e[9]=x*n+T*a+w*c+b*g,e[10]=x*s+T*h+w*d+b*v,e[11]=x*r+T*l+w*f+b*m,x=y[12],T=y[13],w=y[14],b=y[15],e[12]=x*i+T*o+w*u+b*p,e[13]=x*n+T*a+w*c+b*g,e[14]=x*s+T*h+w*d+b*v,e[15]=x*r+T*l+w*f+b*m,this},multiplyLocal:function(t){var e=[],i=this.val,n=t.val;return e[0]=i[0]*n[0]+i[1]*n[4]+i[2]*n[8]+i[3]*n[12],e[1]=i[0]*n[1]+i[1]*n[5]+i[2]*n[9]+i[3]*n[13],e[2]=i[0]*n[2]+i[1]*n[6]+i[2]*n[10]+i[3]*n[14],e[3]=i[0]*n[3]+i[1]*n[7]+i[2]*n[11]+i[3]*n[15],e[4]=i[4]*n[0]+i[5]*n[4]+i[6]*n[8]+i[7]*n[12],e[5]=i[4]*n[1]+i[5]*n[5]+i[6]*n[9]+i[7]*n[13],e[6]=i[4]*n[2]+i[5]*n[6]+i[6]*n[10]+i[7]*n[14],e[7]=i[4]*n[3]+i[5]*n[7]+i[6]*n[11]+i[7]*n[15],e[8]=i[8]*n[0]+i[9]*n[4]+i[10]*n[8]+i[11]*n[12],e[9]=i[8]*n[1]+i[9]*n[5]+i[10]*n[9]+i[11]*n[13],e[10]=i[8]*n[2]+i[9]*n[6]+i[10]*n[10]+i[11]*n[14],e[11]=i[8]*n[3]+i[9]*n[7]+i[10]*n[11]+i[11]*n[15],e[12]=i[12]*n[0]+i[13]*n[4]+i[14]*n[8]+i[15]*n[12],e[13]=i[12]*n[1]+i[13]*n[5]+i[14]*n[9]+i[15]*n[13],e[14]=i[12]*n[2]+i[13]*n[6]+i[14]*n[10]+i[15]*n[14],e[15]=i[12]*n[3]+i[13]*n[7]+i[14]*n[11]+i[15]*n[15],this.fromArray(e)},translate:function(t){var e=t.x,i=t.y,n=t.z,s=this.val;return s[12]=s[0]*e+s[4]*i+s[8]*n+s[12],s[13]=s[1]*e+s[5]*i+s[9]*n+s[13],s[14]=s[2]*e+s[6]*i+s[10]*n+s[14],s[15]=s[3]*e+s[7]*i+s[11]*n+s[15],this},translateXYZ:function(t,e,i){var n=this.val;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this},scale:function(t){var e=t.x,i=t.y,n=t.z,s=this.val;return s[0]=s[0]*e,s[1]=s[1]*e,s[2]=s[2]*e,s[3]=s[3]*e,s[4]=s[4]*i,s[5]=s[5]*i,s[6]=s[6]*i,s[7]=s[7]*i,s[8]=s[8]*n,s[9]=s[9]*n,s[10]=s[10]*n,s[11]=s[11]*n,this},scaleXYZ:function(t,e,i){var n=this.val;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),s=1-i,r=t.x,o=t.y,a=t.z,h=s*r,l=s*o;return this.fromArray([h*r+i,h*o-n*a,h*a+n*o,0,h*o+n*a,l*o+i,l*a-n*r,0,h*a-n*o,l*a+n*r,s*a*a+i,0,0,0,0,1]),this},rotate:function(t,e){var i=this.val,n=e.x,s=e.y,r=e.z,o=Math.sqrt(n*n+s*s+r*r);if(Math.abs(o)<1e-6)return null;n*=o=1/o,s*=o,r*=o;var a=Math.sin(t),h=Math.cos(t),l=1-h,u=i[0],c=i[1],d=i[2],f=i[3],p=i[4],g=i[5],v=i[6],m=i[7],y=i[8],x=i[9],T=i[10],w=i[11],b=n*n*l+h,E=s*n*l+r*a,S=r*n*l-s*a,A=n*s*l-r*a,_=s*s*l+h,C=r*s*l+n*a,M=n*r*l+s*a,O=s*r*l-n*a,P=r*r*l+h;return i[0]=u*b+p*E+y*S,i[1]=c*b+g*E+x*S,i[2]=d*b+v*E+T*S,i[3]=f*b+m*E+w*S,i[4]=u*A+p*_+y*C,i[5]=c*A+g*_+x*C,i[6]=d*A+v*_+T*C,i[7]=f*A+m*_+w*C,i[8]=u*M+p*O+y*P,i[9]=c*M+g*O+x*P,i[10]=d*M+v*O+T*P,i[11]=f*M+m*O+w*P,this},rotateX:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this},rotateY:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this},rotateZ:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this},fromRotationTranslation:function(t,e){var i=this.val,n=t.x,s=t.y,r=t.z,o=t.w,a=n+n,h=s+s,l=r+r,u=n*a,c=n*h,d=n*l,f=s*h,p=s*l,g=r*l,v=o*a,m=o*h,y=o*l;return i[0]=1-(f+g),i[1]=c+y,i[2]=d-m,i[3]=0,i[4]=c-y,i[5]=1-(u+g),i[6]=p+v,i[7]=0,i[8]=d+m,i[9]=p-v,i[10]=1-(u+f),i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this},fromQuat:function(t){var e=this.val,i=t.x,n=t.y,s=t.z,r=t.w,o=i+i,a=n+n,h=s+s,l=i*o,u=i*a,c=i*h,d=n*a,f=n*h,p=s*h,g=r*o,v=r*a,m=r*h;return e[0]=1-(d+p),e[1]=u+m,e[2]=c-v,e[3]=0,e[4]=u-m,e[5]=1-(l+p),e[6]=f+g,e[7]=0,e[8]=c+v,e[9]=f-g,e[10]=1-(l+d),e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},frustum:function(t,e,i,n,s,r){var o=this.val,a=1/(e-t),h=1/(n-i),l=1/(s-r);return o[0]=2*s*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=2*s*h,o[6]=0,o[7]=0,o[8]=(e+t)*a,o[9]=(n+i)*h,o[10]=(r+s)*l,o[11]=-1,o[12]=0,o[13]=0,o[14]=r*s*2*l,o[15]=0,this},perspective:function(t,e,i,n){var s=this.val,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this},perspectiveLH:function(t,e,i,n){var s=this.val;return s[0]=2*i/t,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=2*i/e,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=-n/(i-n),s[11]=1,s[12]=0,s[13]=0,s[14]=i*n/(i-n),s[15]=0,this},ortho:function(t,e,i,n,s,r){var o=this.val,a=t-e,h=i-n,l=s-r;return a=0===a?a:1/a,h=0===h?h:1/h,l=0===l?l:1/l,o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*l,o[15]=1,this},lookAt:function(t,e,i){var n=this.val,s=t.x,r=t.y,o=t.z,a=i.x,h=i.y,l=i.z,u=e.x,c=e.y,d=e.z;if(Math.abs(s-u)<1e-6&&Math.abs(r-c)<1e-6&&Math.abs(o-d)<1e-6)return this.identity();var f=s-u,p=r-c,g=o-d,v=1/Math.sqrt(f*f+p*p+g*g),m=h*(g*=v)-l*(p*=v),y=l*(f*=v)-a*g,x=a*p-h*f;(v=Math.sqrt(m*m+y*y+x*x))?(m*=v=1/v,y*=v,x*=v):(m=0,y=0,x=0);var T=p*x-g*y,w=g*m-f*x,b=f*y-p*m;return(v=Math.sqrt(T*T+w*w+b*b))?(T*=v=1/v,w*=v,b*=v):(T=0,w=0,b=0),n[0]=m,n[1]=T,n[2]=f,n[3]=0,n[4]=y,n[5]=w,n[6]=p,n[7]=0,n[8]=x,n[9]=b,n[10]=g,n[11]=0,n[12]=-(m*s+y*r+x*o),n[13]=-(T*s+w*r+b*o),n[14]=-(f*s+p*r+g*o),n[15]=1,this},yawPitchRoll:function(t,e,i){this.zero(),s.zero(),r.zero();var n=this.val,o=s.val,a=r.val,h=Math.sin(i),l=Math.cos(i);return n[10]=1,n[15]=1,n[0]=l,n[1]=h,n[4]=-h,n[5]=l,h=Math.sin(e),l=Math.cos(e),o[0]=1,o[15]=1,o[5]=l,o[10]=l,o[9]=-h,o[6]=h,h=Math.sin(t),l=Math.cos(t),a[5]=1,a[15]=1,a[0]=l,a[2]=-h,a[8]=h,a[10]=l,this.multiplyLocal(s),this.multiplyLocal(r),this},setWorldMatrix:function(t,e,i,n,o){return this.yawPitchRoll(t.y,t.x,t.z),s.scaling(i.x,i.y,i.z),r.xyz(e.x,e.y,e.z),this.multiplyLocal(s),this.multiplyLocal(r),void 0!==n&&this.multiplyLocal(n),void 0!==o&&this.multiplyLocal(o),this}}),s=new n,r=new n;t.exports=n},function(t,e,i){var n=i(0),s=i(172),r=i(331),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new s(1,0,0),l=new s(0,1,0),u=new s,c=new r,d=new n({initialize:function(t,e,i,n){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(u.copy(h).cross(t).length()<1e-6&&u.copy(l).cross(t),u.normalize(),this.setAxisAngle(u,Math.PI)):i>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(u.copy(t).cross(e),this.x=u.x,this.y=u.y,this.z=u.z,this.w=1+i,this.normalize())},setAxes:function(t,e,i){var n=c.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.x=i*t.x,this.y=i*t.y,this.z=i*t.z,this.w=Math.cos(e),this},multiply:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.x=e*h+s*r+i*a-n*o,this.y=i*h+s*o+n*r-e*a,this.z=n*h+s*a+e*o-i*r,this.w=s*h-e*r-i*o-n*a,this},slerp:function(t,e){var i=this.x,n=this.y,s=this.z,r=this.w,o=t.x,a=t.y,h=t.z,l=t.w,u=i*o+n*a+s*h+r*l;u<0&&(u=-u,o=-o,a=-a,h=-h,l=-l);var c=1-e,d=e;if(1-u>1e-6){var f=Math.acos(u),p=Math.sin(f);c=Math.sin((1-e)*f)/p,d=Math.sin(e*f)/p}return this.x=c*i+d*o,this.y=c*n+d*a,this.z=c*s+d*h,this.w=c*r+d*l,this},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n,r=s?1/s:0;return this.x=-t*r,this.y=-e*r,this.z=-i*r,this.w=n*r,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+s*r,this.y=i*o+n*r,this.z=n*o-i*r,this.w=s*o-e*r,this},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o-n*r,this.y=i*o+s*r,this.z=n*o+e*r,this.w=s*o-i*r,this},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+i*r,this.y=i*o-e*r,this.z=n*o+s*r,this.w=s*o-n*r,this},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this.x=(i[7]-i[5])*e,this.y=(i[2]-i[6])*e,this.z=(i[3]-i[1])*e;else{var s=0;i[4]>i[0]&&(s=1),i[8]>i[3*s+s]&&(s=2);var r=o[s],h=o[r];e=Math.sqrt(i[3*s+s]-i[3*r+r]-i[3*h+h]+1),a[s]=.5*e,e=.5/e,a[r]=(i[3*r+s]+i[3*s+r])*e,a[h]=(i[3*h+s]+i[3*s+h])*e,this.x=a[0],this.y=a[1],this.z=a[2],this.w=(i[3*h+r]-i[3*r+h])*e}return this}});t.exports=d},function(t,e,i){var n=i(335),s=i(26),r=i(29),o=i(167);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===r.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==r.HEADLESS)if(e.renderType===r.CANVAS||e.renderType!==r.CANVAS&&!o.webGL){if(!o.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");e.renderType=r.CANVAS}else e.renderType=r.WEBGL;e.antialias||s.disableSmoothing();var a,h,l=t.scale.baseSize,u=l.width,c=l.height;e.canvas?(t.canvas=e.canvas,t.canvas.width=u,t.canvas.height=c):t.canvas=s.create(t,u,c,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||n.setCrisp(t.canvas),e.renderType!==r.HEADLESS&&(a=i(499),h=i(502),e.renderType===r.WEBGL?t.renderer=new h(t):(t.renderer=new a(t),t.context=t.renderer.gameContext))}},function(t,e){t.exports={setCrisp:function(t){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach(function(e){t.style["image-rendering"]=e}),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},function(t,e,i){var n=i(29);t.exports=function(t){var e=t.config;if(!e.hideBanner){var i="WebGL";e.renderType===n.CANVAS?i="Canvas":e.renderType===n.HEADLESS&&(i="Headless");var s,r=e.audio,o=t.device.audio;if(s=!o.webAudio||r&&r.disableWebAudio?r&&r.noAudio||!o.webAudio&&!o.audioData?"No Audio":"HTML5 Audio":"Web Audio",t.device.browser.ie)window.console&&console.log("Phaser v"+n.VERSION+" / https://phaser.io");else{var a,h="",l=[h];Array.isArray(e.bannerBackgroundColor)?(e.bannerBackgroundColor.forEach(function(t){h=h.concat("%c "),l.push("background: "+t),a=t}),l[l.length-1]="color: "+e.bannerTextColor+"; background: "+a):(h=h.concat("%c "),l.push("color: "+e.bannerTextColor+"; background: "+e.bannerBackgroundColor)),l.push("background: #fff"),e.gameTitle&&(h=h.concat(e.gameTitle),e.gameVersion&&(h=h.concat(" v"+e.gameVersion)),e.hidePhaser||(h=h.concat(" / "))),e.hidePhaser||(h=h.concat("Phaser v"+n.VERSION+" ("+i+" | "+s+")")),h=h.concat(" %c "+e.gameURL),l[0]=h,console.log.apply(console,l)}}}},function(t,e,i){var n=i(0),s=i(6),r=i(1),o=i(338),a=new n({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=s(e,"min",5),this.targetFps=s(e,"target",60),this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=r,this.forceSetTimeOut=s(e,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=s(e,"deltaHistory",10),this.panicMax=s(e,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=s(e,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var t=window.performance.now();this.time=t,this.lastTime=t,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0;for(var e=0;e0||!this.inFocus)&&(this._coolDown--,r=Math.min(r,this._target)),r>this._min&&(r=n[i],r=Math.min(r,this._min)),n[i]=r,this.deltaIndex++,this.deltaIndex>s&&(this.deltaIndex=0),o=0;for(var a=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t,this.frame++},tick:function(){this.step()},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running?this.sleep():t&&(this.startTime+=-this.lastTime+(this.lastTime+window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step()},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0,this.target=0;var t=this;this.step=function e(){var i=window.performance.now();t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.requestAnimationFrame(e)},this.stepTimeout=function e(){var i=Date.now(),n=Math.min(Math.max(2*t.target+t.tick-i,0),t.target);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,n)}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.target=i,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=s}});t.exports=r},function(t,e,i){var n=i(18);t.exports=function(t){var e,i=t.events;void 0!==document.hidden?e="visibilitychange":["webkit","moz","ms"].forEach(function(t){void 0!==document[t+"Hidden"]&&(document.hidden=function(){return document[t+"Hidden"]},e=t+"visibilitychange")});e&&document.addEventListener(e,function(t){document.hidden||"pause"===t.type?i.emit(n.HIDDEN):i.emit(n.VISIBLE)},!1),window.onblur=function(){i.emit(n.BLUR)},window.onfocus=function(){i.emit(n.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},function(t,e,i){var n=i(341),s=i(26),r=i(6);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",n),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),l=r(t,"resizeCanvas",!0),u=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),f=Math.floor(Math.abs(e[0].length*a)),p=Math.floor(Math.abs(e.length*h));i||(i=s.create2D(this,f,p),l=!1,u=!1),l&&(i.width=f,i.height=p);var g=i.getContext("2d");u&&g.clearRect(0,0,f,p),c&&c(i,g);for(var v=0;vi;)n-=i;ni.length-2?i.length-1:r+1],c=i[r>i.length-3?i.length-1:r+2];return e.set(n(a,h.x,l.x,u.x,c.x),n(a,h.y,l.y,u.y,c.y))},toJSON:function(){for(var t=[],e=0;e1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}},function(t,e,i){var n=i(116);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?n.cordova?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},function(t,e,i){var n=i(175);t.exports=function(t,e){var i=window.screen,s=!!i&&(i.orientation||i.mozOrientation||i.msOrientation);if(s&&"string"==typeof s.type)return s.type;if("string"==typeof s)return s;if(i)return i.height>i.width?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE;if("number"==typeof window.orientation)return 0===window.orientation||180===window.orientation?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return n.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return n.ORIENTATION.LANDSCAPE}return e>t?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE}},function(t,e){t.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},function(t,e){t.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},function(t,e){t.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5}},function(t,e){t.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},function(t,e){t.exports=function(t){var e;return""!==t&&("string"==typeof t?e=document.getElementById(t):t&&1===t.nodeType&&(e=t)),e||(e=document.body),e}},function(t,e){t.exports=function(t){var e="";try{window.DOMParser?e=(new DOMParser).parseFromString(t,"text/xml"):(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},function(t,e,i){var n=i(0),s=i(177),r=i(9),o=i(54),a=i(18),h=i(360),l=i(361),u=i(362),c=i(363),d=i(32),f=i(329),p=new n({initialize:function(t,e){this.game=t,this.scaleManager,this.canvas,this.config=e,this.enabled=!0,this.events=new r,this.isOver=!0,this.defaultCursor="",this.keyboard=e.inputKeyboard?new h(this):null,this.mouse=e.inputMouse?new l(this):null,this.touch=e.inputTouch?new c(this):null,this.pointers=[],this.pointersTotal=e.inputActivePointers,e.inputTouch&&1===this.pointersTotal&&(this.pointersTotal=2);for(var i=0;i<=this.pointersTotal;i++){var n=new u(this,i);n.smoothFactor=e.inputSmoothFactor,this.pointers.push(n)}this.mousePointer=e.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new d,this._tempMatrix2=new d,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],t.events.once(a.BOOT,this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.scaleManager=this.game.scale,this.events.emit(o.MANAGER_BOOT),this.game.events.on(a.PRE_RENDER,this.preRender,this),this.game.events.once(a.DESTROY,this.destroy,this)},setCanvasOver:function(t){this.isOver=!0,this.events.emit(o.GAME_OVER,t)},setCanvasOut:function(t){this.isOver=!1,this.events.emit(o.GAME_OUT,t)},preRender:function(){var t=this.game.loop.now,e=this.game.loop.delta,i=this.game.scene.getScenes(!0,!0);this.time=t,this.events.emit(o.MANAGER_UPDATE);for(var n=0;n10&&(t=10-this.pointersTotal);for(var i=0;i-1&&e.preventDefault()}},this.onKeyUp=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.useQueue||t.manager.events.emit(o.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}};var e=this.target;e&&(e.addEventListener("keydown",this.onKeyDown,!1),e.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var t=this.target;t.removeEventListener("keydown",this.onKeyDown,!1),t.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},removeCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(r.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});t.exports=l},function(t,e,i){var n=i(0),s=i(167),r=i(54),o=i(0),a=new n({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=o,this.onMouseDown=o,this.onMouseUp=o,this.onMouseDownWindow=o,this.onMouseUpWindow=o,this.onMouseOver=o,this.onMouseOut=o,this.onMouseWheel=o,this.pointerLockChange=o,t.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.capture=t.inputMouseCapture,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return document.body.addEventListener("contextmenu",function(t){return t.preventDefault(),!1}),this},requestPointerLock:function(){if(s.pointerLock){var t=this.target;t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock()}},releasePointerLock:function(){s.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t=this,e=this.manager.canvas,i=window&&window.focus&&this.manager.game.config.autoFocus;this.onMouseMove=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onMouseMove(e),t.capture&&e.preventDefault())},this.onMouseDown=function(n){i&&window.focus(),!n.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onMouseDown(n),t.capture&&n.target===e&&n.preventDefault())},this.onMouseDownWindow=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&i.target!==e&&t.manager.onMouseDown(i)},this.onMouseUp=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onMouseUp(i),t.capture&&i.target===e&&i.preventDefault())},this.onMouseUpWindow=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&i.target!==e&&t.manager.onMouseUp(i)},this.onMouseOver=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.setCanvasOver(e)},this.onMouseOut=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.setCanvasOut(e)},this.onMouseWheel=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.onMouseWheel(e)};var n=this.target;if(n){var r={passive:!0},o={passive:!1};n.addEventListener("mousemove",this.onMouseMove,this.capture?o:r),n.addEventListener("mousedown",this.onMouseDown,this.capture?o:r),n.addEventListener("mouseup",this.onMouseUp,this.capture?o:r),n.addEventListener("mouseover",this.onMouseOver,this.capture?o:r),n.addEventListener("mouseout",this.onMouseOut,this.capture?o:r),n.addEventListener("wheel",this.onMouseWheel,this.capture?o:r),window&&this.manager.game.config.inputWindowEvents&&(window.addEventListener("mousedown",this.onMouseDownWindow,o),window.addEventListener("mouseup",this.onMouseUpWindow,o)),s.pointerLock&&(this.pointerLockChange=function(e){var i=t.target;t.locked=document.pointerLockElement===i||document.mozPointerLockElement===i||document.webkitPointerLockElement===i,t.manager.onPointerLockChange(e)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("mouseover",this.onMouseOver),t.removeEventListener("mouseout",this.onMouseOut),window&&(window.removeEventListener("mousedown",this.onMouseDownWindow),window.removeEventListener("mouseup",this.onMouseUpWindow)),s.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=a},function(t,e,i){var n=i(314),s=i(0),r=i(53),o=i(144),a=i(323),h=i(3),l=new s({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new h,this.prevPosition=new h,this.midPoint=new h(-1,-1),this.velocity=new h,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=0===e,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(t){var e=this.x,i=this.y;1!==t.resolution&&(e+=t._x,i+=t._y);var n=t.getWorldPoint(e,i);return this.worldX=n.x,this.worldY=n.y,this},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},updateMotion:function(){var t=this.position.x,e=this.position.y,i=this.midPoint.x,s=this.midPoint.y;if(t!==i||e!==s){var r=a(this.motionFactor,i,t),h=a(this.motionFactor,s,e);o(r,t,.1)&&(r=t),o(h,e,.1)&&(h=e),this.midPoint.set(r,h);var l=t-r,u=e-h;this.velocity.set(l,u),this.angle=n(r,h,t,e),this.distance=Math.sqrt(l*l+u*u)}},up:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=t.timeStamp),this.isDown=!1,this.wasTouch=!1},down:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=t.timeStamp),this.isDown=!0,this.wasTouch=!1},move:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.locked&&(this.movementX=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.movementY=t.movementY||t.mozMovementY||t.webkitMovementY||0),this.moveTime=t.timeStamp,this.wasTouch=!1},wheel:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.deltaX=t.deltaX,this.deltaY=t.deltaY,this.deltaZ=t.deltaZ,this.wasTouch=!1},touchstart:function(t,e){t.pointerId&&(this.pointerId=t.pointerId),this.identifier=t.identifier,this.target=t.target,this.active=!0,this.buttons=1,this.event=e,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(t,e){this.event=e,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.moveTime=e.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return!!(1&this.buttons)},rightButtonDown:function(){return!!(2&this.buttons)},middleButtonDown:function(){return!!(4&this.buttons)},backButtonDown:function(){return!!(8&this.buttons)},forwardButtonDown:function(){return!!(16&this.buttons)},leftButtonReleased:function(){return 0===this.button&&!this.isDown},rightButtonReleased:function(){return 2===this.button&&!this.isDown},middleButtonReleased:function(){return 1===this.button&&!this.isDown},backButtonReleased:function(){return 3===this.button&&!this.isDown},forwardButtonReleased:function(){return 4===this.button&&!this.isDown},getDistance:function(){return this.isDown?r(this.downX,this.downY,this.x,this.y):r(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?n(this.downX,this.downY,this.x,this.y):n(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(t,e){void 0===t&&(t=10),void 0===e&&(e=[]);for(var i=this.prevPosition.x,n=this.prevPosition.y,s=this.position.x,r=this.position.y,o=0;o0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),t.events.on(a.PRE_STEP,this.step,this),t.events.once(a.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(t){this.getParent(t),this.getParentBounds();var e=t.width,i=t.height,s=t.scaleMode,r=t.resolution,o=t.zoom,a=t.autoRound;if("string"==typeof e){var h=this.parentSize.width;0===h&&(h=window.innerWidth);var l=parseInt(e,10)/100;e=Math.floor(h*l)}if("string"==typeof i){var c=this.parentSize.height;0===c&&(c=window.innerHeight);var d=parseInt(i,10)/100;i=Math.floor(c*d)}this.resolution=1,this.scaleMode=s,this.autoRound=a,this.autoCenter=t.autoCenter,this.resizeInterval=t.resizeInterval,a&&(e=Math.floor(e),i=Math.floor(i)),this.gameSize.setSize(e,i),o===n.ZOOM.MAX_ZOOM&&(o=this.getMaxZoom()),this.zoom=o,1!==o&&(this._resetZoom=!0),this.baseSize.setSize(e*r,i*r),a&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),t.minWidth>0&&this.displaySize.setMin(t.minWidth*o,t.minHeight*o),t.maxWidth>0&&this.displaySize.setMax(t.maxWidth*o,t.maxHeight*o),this.displaySize.setSize(e,i),this.orientation=u(e,i)},getParent:function(t){var e=t.parent;if(null!==e){if(this.parent=l(e),this.parentIsWindow=this.parent===document.body,t.expandParent&&t.scaleMode!==n.SCALE_MODE.NONE){var i=this.parent.getBoundingClientRect();(this.parentIsWindow||0===i.height)&&(document.documentElement.style.height="100%",document.body.style.height="100%",i=this.parent.getBoundingClientRect(),this.parentIsWindow||0!==i.height||(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}t.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=l(t.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var t=this.parentSize,e=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(e.height=h(!0));var i=this.resolution,n=e.width*i,s=e.height*i;return(t.width!==n||t.height!==s)&&(t.setSize(n,s),!0)},lockOrientation:function(t){var e=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return!!e&&e(t)},setParentSize:function(t,e){return this.parentSize.setSize(t,e),this.refresh()},setGameSize:function(t,e){var i=this.autoRound,n=this.resolution;i&&(t=Math.floor(t),e=Math.floor(e));var s=this.width,r=this.height;return this.gameSize.resize(t,e),this.baseSize.resize(t*n,e*n),i&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(t,e),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(s,r)},resize:function(t,e){var i=this.zoom,n=this.resolution,s=this.autoRound;s&&(t=Math.floor(t),e=Math.floor(e));var r=this.width,o=this.height;this.gameSize.resize(t,e),this.baseSize.resize(t*n,e*n),s&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(t*i*n,e*i*n),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var a=this.canvas.style,h=t*i,l=e*i;return s&&(h=Math.floor(h),l=Math.floor(l)),h===t&&l===e||(a.width=h+"px",a.height=l+"px"),this.refresh(r,o)},setZoom:function(t){return this.zoom=t,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},refresh:function(t,e){void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var i=this.game.domContainer;if(i){this.baseSize.setCSS(i);var n=this.canvas.style,s=i.style;s.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",s.marginLeft=n.marginLeft,s.marginTop=n.marginTop}return this.emit(o.RESIZE,this.gameSize,this.baseSize,this.displaySize,this.resolution,t,e),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var t=u(this.width,this.height);t!==this.orientation&&(this.orientation=t,this.emit(o.ORIENTATION_CHANGE,t))}},updateScale:function(){var t,e,i=this.canvas.style,s=this.gameSize.width,r=this.gameSize.height,o=this.zoom,a=this.autoRound;this.scaleMode===n.SCALE_MODE.NONE?(this.displaySize.setSize(s*o*1,r*o*1),t=this.displaySize.width/1,e=this.displaySize.height/1,a&&(t=Math.floor(t),e=Math.floor(e)),this._resetZoom&&(i.width=t+"px",i.height=e+"px",this._resetZoom=!1)):this.scaleMode===n.SCALE_MODE.RESIZE?(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(1*this.displaySize.width,1*this.displaySize.height),t=this.displaySize.width/1,e=this.displaySize.height/1,a&&(t=Math.floor(t),e=Math.floor(e)),this.canvas.width=t,this.canvas.height=e):(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),t=this.displaySize.width/1,e=this.displaySize.height/1,a&&(t=Math.floor(t),e=Math.floor(e)),i.width=t+"px",i.height=e+"px"),this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var t=p(this.parentSize.width,this.gameSize.width,0,!0),e=p(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(t,e),1)},updateCenter:function(){var t=this.autoCenter;if(t!==n.CENTER.NO_CENTER){var e=this.canvas,i=e.style,s=e.getBoundingClientRect(),r=s.width,o=s.height,a=Math.floor((this.parentSize.width-r)/2),h=Math.floor((this.parentSize.height-o)/2);t===n.CENTER.CENTER_HORIZONTALLY?h=0:t===n.CENTER.CENTER_VERTICALLY&&(a=0),i.marginLeft=a+"px",i.marginTop=h+"px"}},updateBounds:function(){var t=this.canvasBounds,e=this.canvas.getBoundingClientRect();t.x=e.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),t.y=e.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),t.width=e.width,t.height=e.height},transformX:function(t){return(t-this.canvasBounds.left)*this.displayScale.x},transformY:function(t){return(t-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(t){void 0===t&&(t={navigationUI:"hide"});var e=this.fullscreen;if(e.available){if(!e.active){var i,n=this.getFullscreenTarget();(i=e.keyboard?n[e.request](Element.ALLOW_KEYBOARD_INPUT):n[e.request](t))?i.then(this.fullscreenSuccessHandler.bind(this)).catch(this.fullscreenErrorHandler.bind(this)):e.active?this.fullscreenSuccessHandler():this.fullscreenErrorHandler()}}else this.emit(o.FULLSCREEN_UNSUPPORTED)},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(o.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(t){this.removeFullscreenTarget(),this.emit(o.FULLSCREEN_FAILED,t)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var t=document.createElement("div");t.style.margin="0",t.style.padding="0",t.style.width="100%",t.style.height="100%",this.fullscreenTarget=t,this._createdFullscreenTarget=!0}this._createdFullscreenTarget&&(this.canvas.parentNode.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas));return this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var t=this.fullscreenTarget;if(t&&t.parentNode){var e=t.parentNode;e.insertBefore(this.canvas,t),e.removeChild(t)}}},stopFullscreen:function(){var t=this.fullscreen;if(!t.available)return this.emit(o.FULLSCREEN_UNSUPPORTED),!1;t.active&&document[t.cancel](),this.removeFullscreenTarget(),this.getParentBounds(),this.emit(o.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(t){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(t)},startListeners:function(){var t=this,e=this.listeners;if(e.orientationChange=function(){t._checkOrientation=!0,t.dirty=!0},e.windowResize=function(){t.dirty=!0},window.addEventListener("orientationchange",e.orientationChange,!1),window.addEventListener("resize",e.windowResize,!1),this.fullscreen.available){e.fullScreenChange=function(e){return t.onFullScreenChange(e)},e.fullScreenError=function(e){return t.onFullScreenError(e)};["webkit","moz",""].forEach(function(t){document.addEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.addEventListener(t+"fullscreenerror",e.fullScreenError,!1)}),document.addEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.addEventListener("MSFullscreenError",e.fullScreenError,!1)}},onFullScreenChange:function(){document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||this.stopFullscreen()},onFullScreenError:function(){this.removeFullscreenTarget()},step:function(t,e){this.parent&&(this._lastCheck+=e,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var t=this.listeners;window.removeEventListener("orientationchange",t.orientationChange,!1),window.removeEventListener("resize",t.windowResize,!1);["webkit","moz",""].forEach(function(e){document.removeEventListener(e+"fullscreenchange",t.fullScreenChange,!1),document.removeEventListener(e+"fullscreenerror",t.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",t.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",t.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===n.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===n.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=v},function(t,e,i){var n=i(22),s=i(0),r=i(93),o=i(3),a=new s({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=null),this._width=t,this._height=e,this._parent=n,this.aspectMode=i,this.aspectRatio=0===e?1:t/e,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new o},setAspectMode:function(t){return void 0===t&&(t=0),this.aspectMode=t,this.setSize(this._width,this._height)},setSnap:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.snapTo.set(t,e),this.setSize(this._width,this._height)},setParent:function(t){return this._parent=t,this.setSize(this._width,this._height)},setMin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.minWidth=n(t,0,this.maxWidth),this.minHeight=n(e,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(t,e){return void 0===t&&(t=Number.MAX_VALUE),void 0===e&&(e=t),this.maxWidth=n(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=n(e,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(t,e){switch(void 0===t&&(t=0),void 0===e&&(e=t),this.aspectMode){case a.NONE:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case a.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case a.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(r(e,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case a.FIT:this.constrain(t,e,!0);break;case a.ENVELOP:this.constrain(t,e,!1)}return this},setAspectRatio:function(t){return this.aspectRatio=t,this.setSize(this._width,this._height)},resize:function(t,e){return this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minWidth,this.maxWidth),e&&this._parent&&t>this._parent.width&&(t=Math.max(this.minWidth,this._parent.width)),t},getNewHeight:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minHeight,this.maxHeight),e&&this._parent&&t>this._parent.height&&(t=Math.max(this.minHeight,this._parent.height)),t},constrain:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=!0),t=this.getNewWidth(t),e=this.getNewHeight(e);var n=this.snapTo,s=0===e?1:t/e;return i&&this.aspectRatio>s||!i&&this.aspectRatio0&&(t=(e=r(e,n.y))*this.aspectRatio)):(i&&this.aspectRatios)&&(t=(e=r(e,n.y))*this.aspectRatio,n.x>0&&(e=(t=r(t,n.x))*(1/this.aspectRatio))),this._width=t,this._height=e,this},fitTo:function(t,e){return this.constrain(t,e,!0)},envelop:function(t,e){return this.constrain(t,e,!1)},setWidth:function(t){return this.setSize(t,this._height)},setHeight:function(t){return this.setSize(this._width,t)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(t){t&&t.style&&(t.style.width=this._width+"px",t.style.height=this._height+"px")},copy:function(t){return t.setAspectMode(this.aspectMode),t.aspectRatio=this.aspectRatio,t.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(t){this.setSize(t,this._height)}},height:{get:function(){return this._height},set:function(t){this.setSize(this._width,t)}}});a.NONE=0,a.WIDTH_CONTROLS_HEIGHT=1,a.HEIGHT_CONTROLS_WIDTH=2,a.FIT=3,a.ENVELOP=4,t.exports=a},function(t,e,i){var n=i(0),s=i(123),r=i(19),o=i(18),a=i(6),h=i(81),l=i(1),u=i(368),c=i(178),d=new n({initialize:function(t,e){if(this.game=t,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,e){Array.isArray(e)||(e=[e]);for(var i=0;i-1&&(delete this.keys[n],this.scenes.splice(i,1),this._start.indexOf(n)>-1&&(i=this._start.indexOf(n),this._start.splice(i,1)),e.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,n=i.settings;t.init&&(t.init.call(t,n.data),n.status=s.INIT,n.isTransition&&i.events.emit(r.TRANSITION_INIT,n.transitionFrom,n.transitionDuration)),i.load&&(e=i.load).reset(),e&&t.preload?(t.preload.call(t),0===e.list.size?this.create(t):(n.status=s.LOADING,e.once(h.COMPLETE,this.loadComplete,this),e.start())):this.create(t)},loadComplete:function(t){var e=t.scene;this.game.sound&&this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(e)},payloadComplete:function(t){this.bootScene(t.scene)},update:function(t,e){this.processQueue(),this.isProcessing=!0;for(var i=this.scenes.length-1;i>=0;i--){var n=this.scenes[i].sys;n.settings.status>s.START&&n.settings.status<=s.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e=s.LOADING&&i.settings.status0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,n=this.getScene(t),s=this.getAt(i);this.scenes[e]=s,this.scenes[i]=n}}return this},moveUp:function(t){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e=r.x&&t=r.y&&e=r.x&&t=r.y&&e-1){var o=this.context.getImageData(t,e,1,1);o.data[0]=i,o.data[1]=n,o.data[2]=s,o.data[3]=r,this.context.putImageData(o,t,e)}return this},putData:function(t,e,i,n,s,r,o){return void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=t.width),void 0===o&&(o=t.height),this.context.putImageData(t,e,i,n,s,r,o),this},getData:function(t,e,i,n){return t=s(Math.floor(t),0,this.width-1),e=s(Math.floor(e),0,this.height-1),i=s(i,1,this.width-t),n=s(n,1,this.height-e),this.context.getImageData(t,e,i,n)},getPixel:function(t,e,i){i||(i=new r);var n=this.getIndex(t,e);if(n>-1){var s=this.data,o=s[n+0],a=s[n+1],h=s[n+2],l=s[n+3];i.setTo(o,a,h,l)}return i},getPixels:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=i),t=Math.abs(Math.round(t)),e=Math.abs(Math.round(e));for(var o=s(t,0,this.width),a=s(t+i,0,this.width),h=s(e,0,this.height),l=s(e+n,0,this.height),u=new r,c=[],d=h;d0)&&(!!n.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(r.PAUSE,this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!n.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit(r.RESUME,this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!n.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit(r.STOP,this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t0)this.startTime=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s=n)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit(r.COMPLETE,this);this.previousTime=s}},destroy:function(){n.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=this.currentConfig.volume*this.manager.volume)},calculateRate:function(){n.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.updateMute(),this.emit(r.MUTE,this,t))}},setMute:function(t){return this.mute=t,this},volume:{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.updateVolume(),this.emit(r.VOLUME,this,t))}},setVolume:function(t){return this.volume=t,this},rate:{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,r.RATE,t)||(this.calculateRate(),this.emit(r.RATE,this,t))}},setRate:function(t){return this.rate=t,this},detune:{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,r.DETUNE,t)||(this.calculateRate(),this.emit(r.DETUNE,this,t))}},setDetune:function(t){return this.detune=t,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit(r.SEEK,this,t))}},setSeek:function(t){return this.seek=t,this},loop:{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit(r.LOOP,this,t))}},setLoop:function(t){return this.loop=t,this}});t.exports=o},function(t,e,i){var n=i(124),s=i(0),r=i(9),o=i(378),a=i(1),h=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return n.prototype.remove.call(this,t)},removeByKey:function(t){return n.prototype.removeByKey.call(this,t)},pauseAll:a,resumeAll:a,stopAll:a,update:a,setRate:a,setDetune:a,setMute:a,setVolume:a,forEachActiveSound:function(t,e){n.prototype.forEachActiveSound.call(this,t,e)},destroy:function(){n.prototype.destroy.call(this)}});t.exports=h},function(t,e,i){var n=i(125),s=i(0),r=i(9),o=i(17),a=new s({Extends:r,initialize:function(t,e,i){void 0===i&&(i={}),r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!1},updateMarker:function(t){return!1},removeMarker:function(t){return null},play:function(t,e){return!1},pause:function(){return!1},resume:function(){return!1},stop:function(){return!1},destroy:function(){this.manager.remove(this),n.prototype.destroy.call(this)}});t.exports=a},function(t,e,i){var n=i(380),s=i(124),r=i(0),o=i(59),a=i(381),h=new r({Extends:s,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&("ontouchstart"in window||"onclick"in window),s.call(this,t),this.locked&&this.unlock()},createAudioContext:function(t){var e=t.config.audio;return e&&e.context?(e.context.resume(),e.context):new AudioContext},setAudioContext:function(t){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=t,this.masterMuteNode=t.createGain(),this.masterVolumeNode=t.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(t.destination),this.destination=this.masterMuteNode,this},add:function(t,e){var i=new a(this,t,e);return this.sounds.push(i),i},decodeAudio:function(t,e){var i;i=Array.isArray(t)?t:[{key:t,data:e}];for(var s=this.game.cache.audio,r=i.length,a=0;a>4,u[h++]=(15&i)<<4|s>>2,u[h++]=(3&s)<<6|63&r;return l}},function(t,e,i){var n=i(125),s=i(0),r=i(59),o=new s({Extends:n,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('There is no audio asset with key "'+e+'" in the audio cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,n.call(this,t,e,i)},play:function(t,e){return!!n.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime-1;r--)n[s][r]=t[r][s]}return n}},function(t,e){function i(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function n(t,e){return te?1:0}var s=function(t,e,r,o,a){for(void 0===r&&(r=0),void 0===o&&(o=t.length-1),void 0===a&&(a=n);o>r;){if(o-r>600){var h=o-r+1,l=e-r+1,u=Math.log(h),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),f=Math.max(r,Math.floor(e-l*c/h+d)),p=Math.min(o,Math.floor(e+(h-l)*c/h+d));s(t,e,f,p,a)}var g=t[e],v=r,m=o;for(i(t,r,e),a(t[o],g)>0&&i(t,r,o);v0;)m--}0===a(t[r],g)?i(t,r,m):i(t,++m,o),m<=e&&(r=m+1),e<=m&&(o=m-1)}};t.exports=s},function(t,e,i){var n=i(6),s=i(114),r=function(t,e,i){for(var n=[],s=0;s0?s.delayedPlay(d,r,o):s.load(r)}return t}},function(t,e,i){var n=i(11);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=Math.min(t.x,e.x),r=Math.min(t.y,e.y),o=Math.max(t.right,e.right)-s,a=Math.max(t.bottom,e.bottom)-r;return i.setTo(s,r,o,a)}},function(t,e,i){var n=i(0),s=i(12),r=i(950),o=i(14),a=i(7),h=i(176),l=i(19),u=i(330),c=new n({Extends:o,Mixins:[s.AlphaSingle,s.BlendMode,s.Depth,s.Origin,s.ScrollFactor,s.Transform,s.Visible,r],initialize:function(t,e,i,n,s,r){o.call(this,t,"DOMElement"),this.parent=t.sys.game.domContainer,this.cache=t.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new u,this.rotate3dAngle="deg",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(e,i),"string"==typeof n?"#"===n[0]?this.setElement(n.substr(1),s,r):this.createElement(n,s,r):n&&this.setElement(n,s,r),t.sys.events.on(l.SLEEP,this.handleSceneEvent,this),t.sys.events.on(l.WAKE,this.handleSceneEvent,this)},handleSceneEvent:function(t){var e=this.node,i=e.style;e&&(i.display=t.settings.visible?"block":"none")},setSkew:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.skewX=t,this.skewY=e,this},setPerspective:function(t){return this.parent.style.perspective=t+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(t){this.parent.style.perspective=t+"px"}},addListener:function(t){if(this.node){t=t.split(" ");for(var e=0;e>>16,y=(65280&p)>>>8,x=255&p,c.strokeStyle="rgba("+m+","+y+","+x+","+d+")",c.lineWidth=v,T+=3;break;case n.FILL_STYLE:g=l[T+1],f=l[T+2],m=(16711680&g)>>>16,y=(65280&g)>>>8,x=255&g,c.fillStyle="rgba("+m+","+y+","+x+","+f+")",T+=2;break;case n.BEGIN_PATH:c.beginPath();break;case n.CLOSE_PATH:c.closePath();break;case n.FILL_PATH:h||c.fill();break;case n.STROKE_PATH:h||c.stroke();break;case n.FILL_RECT:h?c.rect(l[T+1],l[T+2],l[T+3],l[T+4]):c.fillRect(l[T+1],l[T+2],l[T+3],l[T+4]),T+=4;break;case n.FILL_TRIANGLE:c.beginPath(),c.moveTo(l[T+1],l[T+2]),c.lineTo(l[T+3],l[T+4]),c.lineTo(l[T+5],l[T+6]),c.closePath(),h||c.fill(),T+=6;break;case n.STROKE_TRIANGLE:c.beginPath(),c.moveTo(l[T+1],l[T+2]),c.lineTo(l[T+3],l[T+4]),c.lineTo(l[T+5],l[T+6]),c.closePath(),h||c.stroke(),T+=6;break;case n.LINE_TO:c.lineTo(l[T+1],l[T+2]),T+=2;break;case n.MOVE_TO:c.moveTo(l[T+1],l[T+2]),T+=2;break;case n.LINE_FX_TO:c.lineTo(l[T+1],l[T+2]),T+=5;break;case n.MOVE_FX_TO:c.moveTo(l[T+1],l[T+2]),T+=5;break;case n.SAVE:c.save();break;case n.RESTORE:c.restore();break;case n.TRANSLATE:c.translate(l[T+1],l[T+2]),T+=2;break;case n.SCALE:c.scale(l[T+1],l[T+2]),T+=2;break;case n.ROTATE:c.rotate(l[T+1]),T+=1;break;case n.GRADIENT_FILL_STYLE:T+=5;break;case n.GRADIENT_LINE_STYLE:T+=6;break;case n.SET_TEXTURE:T+=2}c.restore()}}},function(t,e,i){var n=i(0),s=i(2),r=new n({initialize:function(t,e,i,n,r){if("object"==typeof t){var o=t;t=s(o,"x",0),e=s(o,"y",0),i=s(o,"power",0),n=s(o,"epsilon",100),r=s(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i=this.x-t.x,n=this.y-t.y,s=i*i+n*n;if(0!==s){var r=Math.sqrt(s);s0},resetPosition:function(){this.x=0,this.y=0},fire:function(t,e){var i=this.emitter;this.frame=i.getFrame(),i.emitZone&&i.emitZone.getPoint(this),void 0===t?(i.follow&&(this.x+=i.follow.x+i.followOffset.x),this.x+=i.x.onEmit(this,"x")):this.x+=t,void 0===e?(i.follow&&(this.y+=i.follow.y+i.followOffset.y),this.y+=i.y.onEmit(this,"y")):this.y+=e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var n=i.speedX.onEmit(this,"speedX"),o=i.speedY?i.speedY.onEmit(this,"speedY"):n;if(i.radial){var a=s(i.angle.onEmit(this,"angle"));this.velocityX=Math.cos(a)*Math.abs(n),this.velocityY=Math.sin(a)*Math.abs(o)}else if(i.moveTo){var h=i.moveToX.onEmit(this,"moveToX"),l=i.moveToY?i.moveToY.onEmit(this,"moveToY"):h,u=Math.atan2(l-this.y,h-this.x),c=r(this.x,this.y,h,l)/(this.life/1e3);this.velocityX=Math.cos(u)*c,this.velocityY=Math.sin(u)*c}else this.velocityX=n,this.velocityY=o;i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY?i.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=s(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint")},computeVelocity:function(t,e,i,n){var s=this.velocityX,r=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,l=this.maxVelocityY;s+=t.gravityX*i,r+=t.gravityY*i,o&&(s+=o*i),a&&(r+=a*i),s>h?s=h:s<-h&&(s=-h),r>l?r=l:r<-l&&(r=-l),this.velocityX=s,this.velocityY=r;for(var u=0;ue.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(this.delayCurrent>0)return this.delayCurrent-=t,!1;var n=this.emitter,r=1-this.lifeCurrent/this.life;return this.lifeT=r,this.computeVelocity(n,t,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,n.bounds&&this.checkBounds(n),n.deathZone&&n.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=n.scaleX.onUpdate(this,"scaleX",r,this.scaleX),n.scaleY?this.scaleY=n.scaleY.onUpdate(this,"scaleY",r,this.scaleY):this.scaleY=this.scaleX,this.angle=n.rotate.onUpdate(this,"rotate",r,this.angle),this.rotation=s(this.angle),this.alpha=n.alpha.onUpdate(this,"alpha",r,this.alpha),this.tint=n.tint.onUpdate(this,"tint",r,this.tint),this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=o},function(t,e,i){var n=i(52),s=i(0),r=i(12),o=i(397),a=i(398),h=i(967),l=i(2),u=i(183),c=i(399),d=i(99),f=i(395),p=i(400),g=i(11),v=i(128),m=i(3),y=i(58),x=new s({Mixins:[r.BlendMode,r.Mask,r.ScrollFactor,r.Visible],initialize:function(t,e){this.manager=t,this.texture=t.texture,this.frames=[t.defaultFrame],this.defaultFrame=t.defaultFrame,this.configFastMap=["active","blendMode","collideBottom","collideLeft","collideRight","collideTop","deathCallback","deathCallbackScope","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxParticles","name","on","particleBringToTop","particleClass","radial","timeScale","trackVisible","visible"],this.configOpMap=["accelerationX","accelerationY","angle","alpha","bounce","delay","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],this.name="",this.particleClass=f,this.x=new h(e,"x",0,!0),this.y=new h(e,"y",0,!0),this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.accelerationX=new h(e,"accelerationX",0,!0),this.accelerationY=new h(e,"accelerationY",0,!0),this.maxVelocityX=new h(e,"maxVelocityX",1e4,!0),this.maxVelocityY=new h(e,"maxVelocityY",1e4,!0),this.speedX=new h(e,"speedX",0,!0),this.speedY=new h(e,"speedY",0,!0),this.moveTo=!1,this.moveToX=new h(e,"moveToX",0,!0),this.moveToY=new h(e,"moveToY",0,!0),this.bounce=new h(e,"bounce",0,!0),this.scaleX=new h(e,"scaleX",1),this.scaleY=new h(e,"scaleY",1),this.tint=new h(e,"tint",4294967295),this.alpha=new h(e,"alpha",1),this.lifespan=new h(e,"lifespan",1e3,!0),this.angle=new h(e,"angle",{min:0,max:360},!0),this.rotate=new h(e,"rotate",0),this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.quantity=new h(e,"quantity",1,!0),this.delay=new h(e,"delay",0,!0),this.frequency=0,this.on=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZone=null,this.deathZone=null,this.bounds=null,this.collideLeft=!0,this.collideRight=!0,this.collideTop=!0,this.collideBottom=!0,this.active=!0,this.visible=!0,this.blendMode=n.NORMAL,this.follow=null,this.followOffset=new m,this.trackVisible=!1,this.currentFrame=0,this.randomFrame=!0,this.frameQuantity=1,this.dead=[],this.alive=[],this._counter=0,this._frameCounter=0,e&&this.fromJSON(e)},fromJSON:function(t){if(!t)return this;var e=0,i="";for(e=0;e0&&this.getParticleCount()===this.maxParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,n=i.length,s=0;s0){var u=this.deathCallback,c=this.deathCallbackScope;for(o=h-1;o>=0;o--){var d=a[o];s.splice(d.index,1),r.push(d.particle),u&&u.call(c,d.particle),d.particle.resetPosition()}}this.on&&(0===this.frequency?this.emitParticle():this.frequency>0&&(this._counter-=e,this._counter<=0&&(this.emitParticle(),this._counter=this.frequency-Math.abs(this._counter))))},depthSortCallback:function(t,e){return t.y-e.y}});t.exports=x},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=this.source.contains(t.x,t.y);return e&&this.killOnEnter||!e&&!this.killOnEnter}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s){void 0===n&&(n=!1),void 0===s&&(s=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=s,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=n},function(t,e){t.exports=function(t,e){for(var i=0;i0&&(s=-h.PI2+s%h.PI2):s>h.PI2?s=h.PI2:s<0&&(s=h.PI2+s%h.PI2);for(var u,c=[a+Math.cos(n)*i,l+Math.sin(n)*i];e<1;)u=s*e+n,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),e+=t;return u=s+n,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),c.push(a+Math.cos(n)*i,l+Math.sin(n)*i),this.pathIndexes=o(c),this.pathData=c,this}});t.exports=u},function(t,e,i){var n=i(0),s=i(993),r=i(66),o=i(11),a=i(30),h=new n({Extends:a,Mixins:[s],initialize:function(t,e,i,n,s,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",n),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==s&&this.setFillStyle(s,r),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){var t=this._curveBounds,e=this._smoothness;this.geom.getBounds(t,e),this.setSize(t.width,t.height),this.updateDisplayOrigin();for(var i=[],n=this.geom.getPoints(e),s=0;sc+v)){var m=g.getPoint((u-c)/v);o.push(m);break}c+=v}return o}},function(t,e,i){var n=i(57),s=i(56);t.exports=function(t){for(var e=t.points,i=0,r=0;r0&&r.push(i([0,0],n[0])),e=0;e1&&r.push(i([0,0],n[n.length-1])),t.setTo(r)}},function(t,e,i){var n=i(0),s=i(11),r=i(30),o=i(1014),a=new n({Extends:r,Mixins:[o],initialize:function(t,e,i,n,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===o&&(o=128),r.call(this,t,"Rectangle",new s(0,0,n,o)),this.setPosition(e,i),this.setSize(n,o),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),e.getLineD(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=a},function(t,e,i){var n=i(1017),s=i(0),r=i(66),o=i(30),a=new s({Extends:o,Mixins:[n],initialize:function(t,e,i,n,s,r,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=5),void 0===s&&(s=32),void 0===r&&(r=64),o.call(this,t,"Star",null),this._points=n,this._innerRadius=s,this._outerRadius=r,this.setPosition(e,i),this.setSize(2*r,2*r),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},setPoints:function(t){return this._points=t,this.updateData()},setInnerRadius:function(t){return this._innerRadius=t,this.updateData()},setOuterRadius:function(t){return this._outerRadius=t,this.updateData()},points:{get:function(){return this._points},set:function(t){this._points=t,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(t){this._innerRadius=t,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(t){this._outerRadius=t,this.updateData()}},updateData:function(){var t=[],e=this._points,i=this._innerRadius,n=this._outerRadius,s=Math.PI/2*3,o=Math.PI/e,a=n,h=n;t.push(a,h+-n);for(var l=0;l=1)return i.x=r.x1,i.y=r.y1,i;var h=s(r),l=s(o),u=s(a),c=(h+l+u)*e,d=0;return ch+l?(d=(c-=h+l)/u,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/l,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},function(t,e,i){var n=i(57),s=i(4);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),l=n(o),u=n(a),c=n(h),d=l+u+c;e||(e=d/i);for(var f=0;fl+u?(g=(p-=l+u)/c,v.x=h.x1+(h.x2-h.x1)*g,v.y=h.y1+(h.y2-h.y1)*g):(g=(p-=l)/u,v.x=a.x1+(a.x2-a.x1)*g,v.y=a.y1+(a.y2-a.y1)*g),r.push(v)}return r}},function(t,e){t.exports=function(t,e,i){if(!t||"number"==typeof t)return!1;if(t.hasOwnProperty(e))return t[e]=i,!0;if(-1!==e.indexOf(".")){for(var n=e.split("."),s=t,r=t,o=0;o0?(h=this.lightPool.pop()).set(t,e,i,a[0],a[1],a[2],o):h=new s(t,e,i,a[0],a[1],a[2],o),this.lights.push(h),h},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&(this.lightPool.push(t),this.lights.splice(e,1)),this},shutdown:function(){for(;this.lights.length>0;)this.lightPool.push(this.lights.pop());this.ambientColor={r:.1,g:.1,b:.1},this.culledLights.length=0,this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=o},function(t,e,i){var n=i(46),s=i(17),r={Circle:i(1078),Ellipse:i(1088),Intersects:i(423),Line:i(1107),Point:i(1128),Polygon:i(1142),Rectangle:i(436),Triangle:i(1172)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={CircleToCircle:i(202),CircleToRectangle:i(203),GetCircleToCircle:i(1098),GetCircleToRectangle:i(1099),GetLineToCircle:i(204),GetLineToRectangle:i(206),GetRectangleIntersection:i(1100),GetRectangleToRectangle:i(1101),GetRectangleToTriangle:i(1102),GetTriangleToCircle:i(1103),GetTriangleToLine:i(428),GetTriangleToTriangle:i(1104),LineToCircle:i(205),LineToLine:i(84),LineToRectangle:i(424),PointToLine:i(432),PointToLineSegment:i(1105),RectangleToRectangle:i(131),RectangleToTriangle:i(425),RectangleToValues:i(1106),TriangleToCircle:i(427),TriangleToLine:i(429),TriangleToTriangle:i(430)}},function(t,e){t.exports=function(t,e){var i=t.x1,n=t.y1,s=t.x2,r=t.y2,o=e.x,a=e.y,h=e.right,l=e.bottom,u=0;if(i>=o&&i<=h&&n>=a&&n<=l||s>=o&&s<=h&&r>=a&&r<=l)return!0;if(i=o){if((u=n+(r-n)*(o-i)/(s-i))>a&&u<=l)return!0}else if(i>h&&s<=h&&(u=n+(r-n)*(h-i)/(s-i))>=a&&u<=l)return!0;if(n=a){if((u=i+(s-i)*(a-n)/(r-n))>=o&&u<=h)return!0}else if(n>l&&r<=l&&(u=i+(s-i)*(l-n)/(r-n))>=o&&u<=h)return!0;return!1}},function(t,e,i){var n=i(84),s=i(47),r=i(207),o=i(426);t.exports=function(t,e){if(e.left>t.right||e.rightt.bottom||e.bottom0}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},function(t,e,i){var n=i(205),s=i(83);t.exports=function(t,e){return!(t.left>e.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottom0||(c=s(e),(d=n(t,c,!0)).length>0)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},function(t,e){t.exports=function(t,e,i){void 0===i&&(i=1);var n=e.x1,s=e.y1,r=e.x2,o=e.y2,a=t.x,h=t.y,l=(r-n)*(r-n)+(o-s)*(o-s);if(0===l)return!1;var u=((a-n)*(r-n)+(h-s)*(o-s))/l;if(u<0)return Math.sqrt((n-a)*(n-a)+(s-h)*(s-h))<=i;if(u>=0&&u<=1){var c=((s-h)*(r-n)-(n-a)*(o-s))/l;return Math.abs(c)*Math.sqrt(l)<=i}return Math.sqrt((r-a)*(r-a)+(o-h)*(o-h))<=i}},function(t,e,i){var n=i(13),s=i(58),r=i(85);t.exports=function(t){var e=r(t)-n.TAU;return s(e,-Math.PI,Math.PI)}},function(t,e){t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},function(t,e){t.exports=function(t){return t.x*t.x+t.y*t.y}},function(t,e,i){var n=i(11);n.Area=i(1147),n.Ceil=i(1148),n.CeilAll=i(1149),n.CenterOn=i(165),n.Clone=i(1150),n.Contains=i(47),n.ContainsPoint=i(1151),n.ContainsRect=i(437),n.CopyFrom=i(1152),n.Decompose=i(426),n.Equals=i(1153),n.FitInside=i(1154),n.FitOutside=i(1155),n.Floor=i(1156),n.FloorAll=i(1157),n.FromPoints=i(174),n.GetAspectRatio=i(209),n.GetCenter=i(1158),n.GetPoint=i(149),n.GetPoints=i(271),n.GetSize=i(1159),n.Inflate=i(1160),n.Intersection=i(1161),n.MarchingAnts=i(282),n.MergePoints=i(1162),n.MergeRect=i(1163),n.MergeXY=i(1164),n.Offset=i(1165),n.OffsetPoint=i(1166),n.Overlaps=i(1167),n.Perimeter=i(112),n.PerimeterPoint=i(1168),n.Random=i(152),n.RandomOutside=i(1169),n.SameDimensions=i(1170),n.Scale=i(1171),n.Union=i(386),t.exports=n},function(t,e){t.exports=function(t,e){return!(e.width*e.height>t.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(s.BUTTON_DOWN,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(s.BUTTON_UP,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},function(t,e,i){var n=i(442),s=i(443),r=i(0),o=i(9),a=i(3),h=new r({Extends:o,initialize:function(t,e){o.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],r=0;r=2&&(this.leftStick.set(r[0].getValue(),r[1].getValue()),s>=4&&this.rightStick.set(r[2].getValue(),r[3].getValue()))},destroy:function(){var t;for(this.removeAllListeners(),this.manager=null,this.pad=null,t=0;t=r;for(i=0;i=r;)this._elapsed-=r,this.step(s)}},step:function(t){var e,i,n=this.bodies.entries,s=n.length;for(e=0;e0){var l=this.tree,u=this.staticTree;for(n=(i=h.entries).length,t=0;t-1&&p>g&&(t.velocity.normalize().scale(g),p=g),t.speed=p},separate:function(t,e,i,n,s){if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,s);if(t.isCircle!==e.isCircle){var r=t.isCircle?e:t,o=t.isCircle?t:e,a={x:r.x,y:r.y,right:r.right,bottom:r.bottom},h=o.center;if((h.ya.bottom)&&(h.xa.right))return this.separateCircle(t,e,s)}var l=!1,c=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)r.right&&(s=h(o.x,o.y,r.right,r.y)-o.radius):o.y>r.bottom&&(o.xr.right&&(s=h(o.x,o.y,r.right,r.bottom)-o.radius)),s*=-1}else s=t.halfWidth+e.halfWidth-h(t.center.x,t.center.y,e.center.x,e.center.y);if(i||0===s||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==s&&(t.onOverlap||e.onOverlap)&&this.emit(u.OVERLAP,t.gameObject,e.gameObject,t,e),0!==s;var a=t.center.x-e.center.x,l=t.center.y-e.center.y,c=Math.sqrt(Math.pow(a,2)+Math.pow(l,2)),d=(e.center.x-t.center.x)/c||0,f=(e.center.y-t.center.y)/c||0,v=2*(t.velocity.x*d+t.velocity.y*f-e.velocity.x*d-e.velocity.y*f)/(t.mass+e.mass);t.immovable||(t.velocity.x=t.velocity.x-v*t.mass*d,t.velocity.y=t.velocity.y-v*t.mass*f),e.immovable||(e.velocity.x=e.velocity.x+v*e.mass*d,e.velocity.y=e.velocity.y+v*e.mass*f);var m=e.velocity.x-t.velocity.x,y=e.velocity.y-t.velocity.y,x=Math.atan2(y,m),T=this._frameTime;return t.immovable||e.immovable||(s/=2),t.immovable||(t.x+=t.velocity.x*T-s*Math.cos(x),t.y+=t.velocity.y*T-s*Math.sin(x)),e.immovable||(e.x+=e.velocity.x*T+s*Math.cos(x),e.y+=e.velocity.y*T+s*Math.sin(x)),t.velocity.x*=t.bounce.x,t.velocity.y*=t.bounce.y,e.velocity.x*=e.bounce.x,e.velocity.y*=e.bounce.y,(t.onCollide||e.onCollide)&&this.emit(u.COLLIDE,t.gameObject,e.gameObject,t,e),!0},intersects:function(t,e){return t!==e&&(t.isCircle||e.isCircle?t.isCircle?e.isCircle?h(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):this.circleBodyIntersects(e,t):!(t.right<=e.position.x||t.bottom<=e.position.y||t.position.x>=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=s(t.center.x,e.left,e.right),n=s(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o,a;t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var h=Array.isArray(t),l=Array.isArray(e);if(this._total=0,h||l)if(!h&&l)for(o=0;o0},collideHandler:function(t,e,i,n,s,r){if(void 0===e&&t.isParent)return this.collideGroupVsGroup(t,t,i,n,s,r);if(!t||!e)return!1;if(t.body){if(e.body)return this.collideSpriteVsSprite(t,e,i,n,s,r);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,n,s,r)}else if(t.isParent){if(e.body)return this.collideSpriteVsGroup(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,n,s,r)}else if(t.isTilemap){if(e.body)return this.collideSpriteVsTilemapLayer(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,n,s,r)}},collideSpriteVsSprite:function(t,e,i,n,s,r){return!(!t.body||!e.body)&&(this.separate(t.body,e.body,n,s,r)&&(i&&i.call(s,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,n,s,r){var o,h,l,u=t.body;if(0!==e.length&&u&&u.enable)if(this.useTree){var c=this.treeMinMax;c.minX=u.left,c.minY=u.top,c.maxX=u.right,c.maxY=u.bottom;var d=e.physicsType===a.DYNAMIC_BODY?this.tree.search(c):this.staticTree.search(c);for(h=d.length,o=0;oc.baseTileWidth){var d=(c.tileWidth-c.baseTileWidth)*e.scaleX;a-=d,l+=d}c.tileHeight>c.baseTileHeight&&(u+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var f=e.getTilesWithinWorldXY(a,h,l,u);return 0!==f.length&&this.collideSpriteVsTilesHandler(t,f,i,n,s,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,n,s,r,o){for(var a,h,l=t.body,c={left:0,right:0,top:0,bottom:0},d=!1,f=0;f0&&t>i&&(t=i)),0!==n&&0!==e&&(e<0&&e<-n?e=-n:e>0&&e>n&&(e=n)),this.gameObject.x+=t,this.gameObject.y+=e}t<0?this.facing=s.FACING_LEFT:t>0&&(this.facing=s.FACING_RIGHT),e<0?this.facing=s.FACING_UP:e>0&&(this.facing=s.FACING_DOWN),this.allowRotation&&(this.gameObject.angle+=this.deltaZ()),this._tx=t,this._ty=e},setBoundsRectangle:function(t){return this.customBoundsRectangle=t||this.world.bounds,this},checkWorldBounds:function(){var t=this.position,e=this.customBoundsRectangle,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,s=this.worldBounce?-this.worldBounce.y:-this.bounce.y,r=!1;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,this.blocked.right=!0,r=!0),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,this.blocked.down=!0,r=!0),r&&(this.blocked.none=!1),r},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this.updateCenter(),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;if(!t&&n.frame&&(t=n.frame.realWidth),!e&&n.frame&&(e=n.frame.realHeight),this.sourceWidth=t,this.sourceHeight=e,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),i&&n.getCenter){var s=n.displayWidth/2,r=n.displayHeight/2;this.offset.set(s-this.halfWidth,r-this.halfHeight)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i.setPosition(t,e),i.getTopLeft?i.getTopLeft(this.position):this.position.set(t,e),this.prev.copy(this.position),this.prevFrame.copy(this.position),this.rotation=i.angle,this.preRotation=i.angle,this.updateBounds(),this.updateCenter()},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?this.radius>0&&t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom&&(this.center.x-t)*(this.center.x-t)+(this.center.y-e)*(this.center.y-e)<=this.radius*this.radius:h(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.width/2):(this.checkCollision.up&&t.lineBetween(e.x,e.y,e.x+this.width,e.y),this.checkCollision.right&&t.lineBetween(e.x+this.width,e.y,e.x+this.width,e.y+this.height),this.checkCollision.down&&t.lineBetween(e.x,e.y+this.height,e.x+this.width,e.y+this.height),this.checkCollision.left&&t.lineBetween(e.x,e.y,e.x,e.y+this.height))),this.debugShowVelocity&&(t.lineStyle(t.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,n,i+this.velocity.x/2,n+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t,e,i){void 0===t&&(t=!0),this.collideWorldBounds=t;var n=void 0!==e,s=void 0!==i;return(n||s)&&(this.worldBounce||(this.worldBounce=new l),n&&(this.worldBounce.x=e),s&&(this.worldBounce.y=i)),this},setVelocity:function(t,e){return this.velocity.set(t,e),t=this.velocity.x,e=this.velocity.y,this.speed=Math.sqrt(t*t+e*e),this},setVelocityX:function(t){this.velocity.x=t;var e=t,i=this.velocity.y;return this.speed=Math.sqrt(e*e+i*i),this},setVelocityY:function(t){this.velocity.y=t;var e=this.velocity.x,i=t;return this.speed=Math.sqrt(e*e+i*i),this},setMaxVelocity:function(t,e){return this.maxVelocity.set(t,e),this},setMaxSpeed:function(t){return this.maxSpeed=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setAllowDrag:function(t){return void 0===t&&(t=!0),this.allowDrag=t,this},setAllowGravity:function(t){return void 0===t&&(t=!0),this.allowGravity=t,this},setAllowRotation:function(t){return void 0===t&&(t=!0),this.allowRotation=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return void 0===t&&(t=!0),this.immovable=t,this},setEnable:function(t){return void 0===t&&(t=!0),this.enable=t,this},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=u},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=n,this.collideCallback=s,this.processCallback=r,this.callbackContext=o},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=n},function(t,e,i){var n=i(50);t.exports=function(t,e,i,s){var r=0,o=t.deltaAbsX()+e.deltaAbsX()+s;return 0===t._dx&&0===e._dx?(t.embedded=!0,e.embedded=!0):t._dx>e._dx?(r=t.right-e.x)>o&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?r=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.right=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.left=!0)):t._dxo&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?r=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.left=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.right=!0))),t.overlapX=r,e.overlapX=r,r}},function(t,e,i){var n=i(50);t.exports=function(t,e,i,s){var r=0,o=t.deltaAbsY()+e.deltaAbsY()+s;return 0===t._dy&&0===e._dy?(t.embedded=!0,e.embedded=!0):t._dy>e._dy?(r=t.bottom-e.y)>o&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?r=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.down=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.up=!0)):t._dyo&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?r=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.up=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.down=!0))),t.overlapY=r,e.overlapY=r,r}},function(t,e,i){var n=i(383);function s(t){if(!(this instanceof s))return new s(t,[".left",".top",".right",".bottom"]);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}function r(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,i,s,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=s||(o=e+Math.ceil((i-e)/s/2)*s,n(t,o,e,i,r),a.push(e,o,o,i))}s.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!p(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;s=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),a=g(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,s,r,o,h,l,u,d,f,p,g,v,m,y;for(l=u=1/0,n=e;n<=i-e;n++)s=a(t,0,n,this.toBBox),r=a(t,n,i,this.toBBox),f=s,p=r,void 0,void 0,void 0,void 0,g=Math.max(f.minX,p.minX),v=Math.max(f.minY,p.minY),m=Math.min(f.maxX,p.maxX),y=Math.min(f.maxY,p.maxY),o=Math.max(0,m-g)*Math.max(0,y-v),h=c(s)+c(r),o=e;s--)r=t.children[s],h(u,t.leaf?o(r):r),c+=d(u);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)h(e[n],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},compareMinX:function(t,e){return t.left-e.left},compareMinY:function(t,e){return t.top-e.top},toBBox:function(t){return{minX:t.left,minY:t.top,maxX:t.right,maxY:t.bottom}}},t.exports=s},function(t,e){t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},function(t,e,i){var n=i(55),s=i(0),r=i(50),o=i(47),a=i(3),h=new s({initialize:function(t,e){var i=e.width?e.width:64,n=e.height?e.height:64;this.world=t,this.gameObject=e,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(e.x-e.displayOriginX,e.y-e.displayOriginY),this.width=i,this.height=n,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new a(e.x+this.halfWidth,e.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY,this._dx=0,this._dy=0},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(t,e){return void 0===e&&(e=t),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(t,e),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;if(!t&&n.frame&&(t=n.frame.realWidth),!e&&n.frame&&(e=n.frame.realHeight),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),i&&n.getCenter){var s=n.displayWidth/2,r=n.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(s-this.halfWidth,r-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.setPosition(t,e),i.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):o(this,t,e)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?t.strokeCircle(i,n,this.width/2):t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=h},function(t,e){t.exports={NEVER:0,LITE:1,PASSIVE:2,ACTIVE:4,FIXED:8}},function(t,e){t.exports={NONE:0,A:1,B:2,BOTH:3}},function(t,e){var i={};t.exports=i,i.create=function(t,e){var n=t.bodyA,s=t.bodyB,r={id:i.id(n,s),bodyA:n,bodyB:s,activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:n.isSensor||s.isSensor,timeCreated:e,timeUpdated:e,collision:null,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return i.update(r,t,e),r},i.update=function(t,e,n){if(t.collision=e,e.collided){var s=e.supports,r=t.activeContacts,o=e.parentA,a=e.parentB;t.inverseMass=o.inverseMass+a.inverseMass,t.friction=Math.min(o.friction,a.friction),t.frictionStatic=Math.max(o.frictionStatic,a.frictionStatic),t.restitution=Math.max(o.restitution,a.restitution),t.slop=Math.max(o.slop,a.slop);for(var h=0;h-1}return!1}},function(t,e,i){var n=i(74),s=i(103),r=i(217);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!1),void 0===o&&(o=!0),!s(t,e,a))return null;var h=a.data[e][t];return h?(a.data[e][t]=i?null:new n(a,-1,t,e,h.width,h.height),o&&h&&h.collides&&r(t,e,a),h):null}},function(t,e,i){var n=i(31),s=i(220),r=i(473),o=i(474),a=i(485);t.exports=function(t,e,i,h,l,u){var c;switch(e){case n.ARRAY_2D:c=s(t,i,h,l,u);break;case n.CSV:c=r(t,i,h,l,u);break;case n.TILED_JSON:c=o(t,i,u);break;case n.WELTMEISTER:c=a(t,i,u);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},function(t,e,i){var n=i(31),s=i(220);t.exports=function(t,e,i,r,o){var a=e.trim().split("\n").map(function(t){return t.split(",")}),h=s(t,a,i,r,o);return h.format=n.CSV,h}},function(t,e,i){var n=i(31),s=i(105),r=i(475),o=i(477),a=i(478),h=i(481),l=i(483),u=i(484);t.exports=function(t,e,i){if("orthogonal"!==e.orientation)return console.warn("Only orthogonal map types are supported in this version of Phaser"),null;var c=new s({width:e.width,height:e.height,name:t,tileWidth:e.tilewidth,tileHeight:e.tileheight,orientation:e.orientation,format:n.TILED_JSON,version:e.version,properties:e.properties,renderOrder:e.renderorder,infinite:e.infinite});c.layers=r(e,i),c.images=o(e);var d=a(e);return c.tilesets=d.tilesets,c.imageCollections=d.imageCollections,c.objects=h(e),c.tiles=l(c),u(c),c}},function(t,e,i){var n=i(476),s=i(2),r=i(104),o=i(221),a=i(74),h=i(222);t.exports=function(t,e){for(var i=s(t,"infinite",!1),l=[],u=[],c=h(t);c.i0;)if(c.i>=c.layers.length){if(u.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}c=u.pop()}else{var d=c.layers[c.i];if(c.i++,"tilelayer"===d.type)if(d.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+d.name+"'");else{if(d.encoding&&"base64"===d.encoding){if(d.chunks)for(var f=0;f0?((v=new a(p,g.gid,P,R,t.tilewidth,t.tileheight)).rotation=g.rotation,v.flipX=g.flipped,y[R][P]=v):(m=e?null:new a(p,-1,P,R,t.tilewidth,t.tileheight),y[R][P]=m),++x===S.width&&(C++,x=0)}}else{p=new r({name:c.name+d.name,x:c.x+s(d,"offsetx",0)+d.x,y:c.y+s(d,"offsety",0)+d.y,width:d.width,height:d.height,tileWidth:t.tilewidth,tileHeight:t.tileheight,alpha:c.opacity*d.opacity,visible:c.visible&&d.visible,properties:s(d,"properties",{})});for(var L=[],k=0,D=d.data.length;k0?((v=new a(p,g.gid,x,y.length,t.tilewidth,t.tileheight)).rotation=g.rotation,v.flipX=g.flipped,L.push(v)):(m=e?null:new a(p,-1,x,y.length,t.tilewidth,t.tileheight),L.push(m)),++x===d.width&&(y.push(L),x=0,L=[])}p.data=y,l.push(p)}else if("group"===d.type){var F=h(t,d,c);u.push(c),c=F}}return l}},function(t,e){t.exports=function(t){for(var e=window.atob(t),i=e.length,n=new Array(i/4),s=0;s>>0;return n}},function(t,e,i){var n=i(2),s=i(222);t.exports=function(t){for(var e=[],i=[],r=s(t);r.i0;)if(r.i>=r.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=i.pop()}else{var o=r.layers[r.i];if(r.i++,"imagelayer"===o.type){var a=n(o,"offsetx",0)+n(o,"startx",0),h=n(o,"offsety",0)+n(o,"starty",0);e.push({name:r.name+o.name,image:o.image,x:r.x+a+o.x,y:r.y+h+o.y,alpha:r.opacity*o.opacity,visible:r.visible&&o.visible,properties:n(o,"properties",{})})}else if("group"===o.type){var l=s(t,o,r);i.push(r),r=l}}return e}},function(t,e,i){var n=i(141),s=i(479),r=i(223);t.exports=function(t){for(var e,i=[],o=[],a=null,h=0;h1){if(Array.isArray(l.tiles)){for(var c={},d={},f=0;f=this.firstgid&&t0;)if(a.i>=a.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}a=i.pop()}else{var h=a.layers[a.i];if(a.i++,h.opacity*=a.opacity,h.visible=a.visible&&h.visible,"objectgroup"===h.type){h.name=a.name+h.name;for(var l=a.x+n(h,"startx",0)+n(h,"offsetx",0),u=a.y+n(h,"starty",0)+n(h,"offsety",0),c=[],d=0;da&&(a=e.layer[l].width),e.layer[l].height>h&&(h=e.layer[l].height);var u=new s({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:n.WELTMEISTER});return u.layers=r(e,i),u.tilesets=o(e),u}},function(t,e,i){var n=i(104),s=i(74);t.exports=function(t,e){for(var i=[],r=0;r-1?new s(a,f,c,u,o.tilesize,o.tilesize):e?null:new s(a,-1,c,u,o.tilesize,o.tilesize),h.push(d)}l.push(h),h=[]}a.data=l,i.push(a)}return i}},function(t,e,i){var n=i(141);t.exports=function(t){for(var e=[],i=[],s=0;s-1&&(this.renderOrder=t),this},addTilesetImage:function(t,e,i,n,s,r,o){if(void 0===t)return null;if(void 0!==e&&null!==e||(e=t),!this.scene.sys.textures.exists(e))return console.warn("Invalid Tileset Image: "+e),null;var h=this.scene.sys.textures.get(e),l=this.getTilesetIndex(t);if(null===l&&this.format===a.TILED_JSON)return console.warn("No data found for Tileset: "+t),null;var u=this.tilesets[l];return u?(u.setTileSize(i,n),u.setSpacing(s,r),u.setImage(h),u):(void 0===i&&(i=this.tileWidth),void 0===n&&(n=this.tileHeight),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o=0),(u=new p(t,o,i,n,s,r)).setImage(h),this.tilesets.push(u),u)},convertLayerToStatic:function(t){if(null===(t=this.getLayer(t)))return null;var e=t.tilemapLayer;if(!(e&&e instanceof r))return null;var i=new c(e.scene,e.tilemap,e.layerIndex,e.tileset,e.x,e.y);return this.scene.sys.displayList.add(i),e.destroy(),i},copy:function(t,e,i,n,s,r,o,a){return a=this.getLayer(a),this._isStaticCall(a,"copy")?this:null!==a?(f.Copy(t,e,i,n,s,r,o,a),this):null},createBlankDynamicLayer:function(t,e,i,n,s,o,a,l){if(void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.width),void 0===o&&(o=this.height),void 0===a&&(a=this.tileWidth),void 0===l&&(l=this.tileHeight),null!==this.getLayerIndex(t))return console.warn("Invalid Tilemap Layer ID: "+t),null;for(var u,c=new h({name:t,tileWidth:a,tileHeight:l,width:s,height:o}),f=0;f-1&&this.putTileAt(e,r.x,r.y,i,r.tilemapLayer)}return n},removeTileAt:function(t,e,i,n,s){return s=this.getLayer(s),this._isStaticCall(s,"removeTileAt")?null:null===s?null:f.RemoveTileAt(t,e,i,n,s)},removeTileAtWorldXY:function(t,e,i,n,s,r){return r=this.getLayer(r),this._isStaticCall(r,"removeTileAtWorldXY")?null:null===r?null:f.RemoveTileAtWorldXY(t,e,i,n,s,r)},renderDebug:function(t,e,i){return null===(i=this.getLayer(i))?null:(f.RenderDebug(t,e,i),this)},renderDebugFull:function(t,e){for(var i=this.layers,n=0;n=0&&t<4&&(this._renderOrder=t),this},calculateFacesAt:function(t,e){return a.CalculateFacesAt(t,e,this.layer),this},calculateFacesWithin:function(t,e,i,n){return a.CalculateFacesWithin(t,e,i,n,this.layer),this},createFromTiles:function(t,e,i,n,s){return a.CreateFromTiles(t,e,i,n,s,this.layer)},cull:function(t){return this.cullCallback(this.layer,t,this.culledTiles,this._renderOrder)},copy:function(t,e,i,n,s,r,o){return a.Copy(t,e,i,n,s,r,o,this.layer),this},destroy:function(t){void 0===t&&(t=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),t&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],o.prototype.destroy.call(this))},fill:function(t,e,i,n,s,r){return a.Fill(t,e,i,n,s,r,this.layer),this},filterTiles:function(t,e,i,n,s,r,o){return a.FilterTiles(t,e,i,n,s,r,o,this.layer)},findByIndex:function(t,e,i){return a.FindByIndex(t,e,i,this.layer)},findTile:function(t,e,i,n,s,r,o){return a.FindTile(t,e,i,n,s,r,o,this.layer)},forEachTile:function(t,e,i,n,s,r,o){return a.ForEachTile(t,e,i,n,s,r,o,this.layer),this},getTileAt:function(t,e,i){return a.GetTileAt(t,e,i,this.layer)},getTileAtWorldXY:function(t,e,i,n){return a.GetTileAtWorldXY(t,e,i,n,this.layer)},getTilesWithin:function(t,e,i,n,s){return a.GetTilesWithin(t,e,i,n,s,this.layer)},getTilesWithinShape:function(t,e,i){return a.GetTilesWithinShape(t,e,i,this.layer)},getTilesWithinWorldXY:function(t,e,i,n,s,r){return a.GetTilesWithinWorldXY(t,e,i,n,s,r,this.layer)},hasTileAt:function(t,e){return a.HasTileAt(t,e,this.layer)},hasTileAtWorldXY:function(t,e,i){return a.HasTileAtWorldXY(t,e,i,this.layer)},putTileAt:function(t,e,i,n){return a.PutTileAt(t,e,i,n,this.layer)},putTileAtWorldXY:function(t,e,i,n,s){return a.PutTileAtWorldXY(t,e,i,n,s,this.layer)},putTilesAt:function(t,e,i,n){return a.PutTilesAt(t,e,i,n,this.layer),this},randomize:function(t,e,i,n,s){return a.Randomize(t,e,i,n,s,this.layer),this},removeTileAt:function(t,e,i,n){return a.RemoveTileAt(t,e,i,n,this.layer)},removeTileAtWorldXY:function(t,e,i,n,s){return a.RemoveTileAtWorldXY(t,e,i,n,s,this.layer)},renderDebug:function(t,e){return a.RenderDebug(t,e,this.layer),this},replaceByIndex:function(t,e,i,n,s,r){return a.ReplaceByIndex(t,e,i,n,s,r,this.layer),this},setSkipCull:function(t){return void 0===t&&(t=!0),this.skipCull=t,this},setCullPadding:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=1),this.cullPaddingX=t,this.cullPaddingY=e,this},setCollision:function(t,e,i,n){return a.SetCollision(t,e,i,this.layer,n),this},setCollisionBetween:function(t,e,i,n){return a.SetCollisionBetween(t,e,i,n,this.layer),this},setCollisionByProperty:function(t,e,i){return a.SetCollisionByProperty(t,e,i,this.layer),this},setCollisionByExclusion:function(t,e,i){return a.SetCollisionByExclusion(t,e,i,this.layer),this},setCollisionFromCollisionGroup:function(t,e){return a.SetCollisionFromCollisionGroup(t,e,this.layer),this},setTileIndexCallback:function(t,e,i){return a.SetTileIndexCallback(t,e,i,this.layer),this},setTileLocationCallback:function(t,e,i,n,s,r){return a.SetTileLocationCallback(t,e,i,n,s,r,this.layer),this},shuffle:function(t,e,i,n){return a.Shuffle(t,e,i,n,this.layer),this},swapByIndex:function(t,e,i,n,s,r){return a.SwapByIndex(t,e,i,n,s,r,this.layer),this},tileToWorldX:function(t,e){return a.TileToWorldX(t,e,this.layer)},tileToWorldY:function(t,e){return a.TileToWorldY(t,e,this.layer)},tileToWorldXY:function(t,e,i,n){return a.TileToWorldXY(t,e,i,n,this.layer)},weightedRandomize:function(t,e,i,n,s){return a.WeightedRandomize(t,e,i,n,s,this.layer),this},worldToTileX:function(t,e,i){return a.WorldToTileX(t,e,i,this.layer)},worldToTileY:function(t,e,i){return a.WorldToTileY(t,e,i,this.layer)},worldToTileXY:function(t,e,i,n,s){return a.WorldToTileXY(t,e,i,n,s,this.layer)}});t.exports=h},function(t,e,i){var n=i(0),s=i(12),r=i(18),o=i(14),a=i(1336),h=i(137),l=i(32),u=i(10),c=new n({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.ComputedSize,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.Transform,s.Visible,s.ScrollFactor,a],initialize:function(t,e,i,n,s,a){o.call(this,t,"StaticTilemapLayer"),this.isTilemap=!0,this.tilemap=e,this.layerIndex=i,this.layer=e.layers[i],this.layer.tilemapLayer=this,this.tileset=[],this.culledTiles=[],this.skipCull=!1,this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=h.CullTiles,this.renderer=t.sys.game.renderer,this.vertexBuffer=[],this.bufferData=[],this.vertexViewF32=[],this.vertexViewU32=[],this.dirty=[],this.vertexCount=[],this._renderOrder=0,this._tempMatrix=new l,this.gidMap=[],this.setTilesets(n),this.setAlpha(this.layer.alpha),this.setPosition(s,a),this.setOrigin(),this.setSize(e.tileWidth*this.layer.width,e.tileHeight*this.layer.height),this.updateVBOData(),this.initPipeline("TextureTintPipeline"),t.sys.game.events.on(r.CONTEXT_RESTORED,function(){this.updateVBOData()},this)},setTilesets:function(t){var e=[],i=[],n=this.tilemap;Array.isArray(t)||(t=[t]);for(var s=0;sv||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(1===p)for(o=0;o=0;a--)!(r=f[o][a])||r.indexv||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(2===p)for(o=u-1;o>=0;o--)for(a=0;av||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(3===p)for(o=u-1;o>=0;o--)for(a=l-1;a>=0;a--)!(r=f[o][a])||r.indexv||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));this.dirty[e]=!1,null===m?(m=i.createVertexBuffer(y,n.STATIC_DRAW),this.vertexBuffer[e]=m):(i.setVertexBuffer(m),n.bufferSubData(n.ARRAY_BUFFER,0,y))}return this},batchTile:function(t,e,i,n,s,r,o){var a=i.getTileTextureCoordinates(e.index);if(!a)return t;var h=i.tileWidth,l=i.tileHeight,c=h/2,d=l/2,f=a.x/n,p=a.y/s,g=(a.x+h)/n,v=(a.y+l)/s,m=this._tempMatrix,y=-c,x=-d;e.flipX&&(h*=-1,y+=i.tileWidth),e.flipY&&(l*=-1,x+=i.tileHeight);var T=y+h,w=x+l;m.applyITRS(c+e.pixelX,d+e.pixelY,e.rotation,1,1);var b=u.getTintAppendFloatAlpha(16777215,r.alpha*this.alpha*e.alpha),E=m.getX(y,x),S=m.getY(y,x),A=m.getX(y,w),_=m.getY(y,w),C=m.getX(T,w),M=m.getY(T,w),O=m.getX(T,x),P=m.getY(T,x);r.roundPixels&&(E=Math.round(E),S=Math.round(S),A=Math.round(A),_=Math.round(_),C=Math.round(C),M=Math.round(M),O=Math.round(O),P=Math.round(P));var R=this.vertexViewF32[o],L=this.vertexViewU32[o];return R[++t]=E,R[++t]=S,R[++t]=f,R[++t]=p,R[++t]=0,L[++t]=b,R[++t]=A,R[++t]=_,R[++t]=f,R[++t]=v,R[++t]=0,L[++t]=b,R[++t]=C,R[++t]=M,R[++t]=g,R[++t]=v,R[++t]=0,L[++t]=b,R[++t]=E,R[++t]=S,R[++t]=f,R[++t]=p,R[++t]=0,L[++t]=b,R[++t]=C,R[++t]=M,R[++t]=g,R[++t]=v,R[++t]=0,L[++t]=b,R[++t]=O,R[++t]=P,R[++t]=g,R[++t]=p,R[++t]=0,L[++t]=b,this.vertexCount[o]+=6,t},setRenderOrder:function(t){if("string"==typeof t&&(t=["right-down","left-down","right-up","left-up"].indexOf(t)),t>=0&&t<4){this._renderOrder=t;for(var e=0;e0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=r},function(t,e,i){var n=i(1345);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substr(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===n.indexOf(e)&&"_"!==e.substr(0,1)&&i.push({key:e,value:t[e]});return i}},function(t,e,i){var n=i(6);t.exports=function(t){var e=n(t,"tweens",null);return null===e?[]:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},function(t,e,i){var n=i(227),s=i(15),r=i(88),o=i(82),a=i(142),h=i(6),l=i(226),u=i(228),c=i(230);t.exports=function(t,e,i){void 0===i&&(i=n);var d=h(e,"from",0),f=h(e,"to",1),p=[{value:d}],g=a(e,"delay",i.delay),v=a(e,"duration",i.duration),m=h(e,"easeParams",i.easeParams),y=o(h(e,"ease",i.ease),m),x=a(e,"hold",i.hold),T=a(e,"repeat",i.repeat),w=a(e,"repeatDelay",i.repeatDelay),b=r(e,"yoyo",i.yoyo),E=[],S=l("value",f),A=c(p[0],0,"value",S.getEnd,S.getStart,S.getActive,y,g,v,b,x,T,w,!1,!1);A.start=d,A.current=d,A.to=f,E.push(A);var _=new u(t,E,p);_.offset=s(e,"offset",null),_.completeDelay=s(e,"completeDelay",0),_.loop=Math.round(s(e,"loop",0)),_.loopDelay=Math.round(s(e,"loopDelay",0)),_.paused=r(e,"paused",!1),_.useFrames=r(e,"useFrames",!1);for(var C=h(e,"callbackScope",_),M=[_,null],O=u.TYPES,P=0;PS&&(S=C),E[A][_]=C}}}var M=o?n(o):null;return a?function(t,e,n,s){var r,o=0,a=s%m,h=Math.floor(s/m);if(a>=0&&a=0&&h0?Math.floor(v/p.length):h(e,"duration",g.duration),g.delay=h(e,"delay",g.delay),g.easeParams=c(e,"easeParams",g.easeParams),g.ease=a(c(e,"ease",g.ease),g.easeParams),g.hold=h(e,"hold",g.hold),g.repeat=h(e,"repeat",g.repeat),g.repeatDelay=h(e,"repeatDelay",g.repeatDelay),g.yoyo=o(e,"yoyo",g.yoyo),g.flipX=o(e,"flipX",g.flipX),g.flipY=o(e,"flipY",g.flipY);for(var m=0;m0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){return this.calcDuration(),this.progress=0,this.totalProgress=0,!this.paused||(this.state=a.PAUSED,!1)},resetTweens:function(t){for(var e=0;e0?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=a.LOOP_DELAY):(this.state=a.ACTIVE,this.dispatchTimelineEvent(r.TIMELINE_LOOP,this.callbacks.onLoop))):this.completeDelay>0?(this.state=a.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=a.PENDING_REMOVE,this.dispatchTimelineEvent(r.TIMELINE_COMPLETE,this.callbacks.onComplete))},update:function(t,e){if(this.state!==a.PAUSED){switch(this.useFrames&&(e=1*this.manager.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case a.ACTIVE:for(var i=this.totalData,n=0;n=this.nextTick&&this.currentAnim.setFrame(this)}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.isCropped&&e.frame.updateCropUVs(e._crop,e.flipX,e.flipY),e.setSizeToFrame(),t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin(),e},updateFrame:function(t){var e=this.setCurrentFrame(t);if(this.isPlaying){t.setAlpha&&(e.alpha=t.alpha);var i=this.currentAnim;e.emit(r.SPRITE_ANIMATION_KEY_UPDATE+i.key,i,t,e),e.emit(r.SPRITE_ANIMATION_UPDATE,i,t,e),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this)}},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off(r.REMOVE_ANIMATION,this.remove,this),this.animationManager=null,this.parent=null,this.currentAnim=null,this.currentFrame=null}});t.exports=o},function(t,e,i){var n=i(500),s=i(48),r=i(0),o=i(29),a=i(501),h=i(92),l=i(32),u=new r({initialize:function(t){this.game=t,this.type=o.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.config={clearBeforeRender:t.config.clearBeforeRender,backgroundColor:t.config.backgroundColor,resolution:t.config.resolution,antialias:t.config.antialias,roundPixels:t.config.roundPixels},this.gameCanvas=t.canvas;var e={alpha:t.config.transparent,desynchronized:t.config.desynchronized};this.gameContext=this.game.config.context?this.game.config.context:this.gameCanvas.getContext("2d",e),this.currentContext=this.gameContext,this.antialias=t.config.antialias,this.blendModes=a(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new l,this._tempMatrix2=new l,this._tempMatrix3=new l,this._tempMatrix4=new l,this.init()},init:function(){this.game.scale.on(h.RESIZE,this.onResize,this);var t=this.game.scale.baseSize;this.resize(t.width,t.height)},onResize:function(t,e){e.width===this.width&&e.height===this.height||this.resize(e.width,e.height)},resize:function(t,e){this.width=t,this.height=e},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(t){return this.currentContext.globalCompositeOperation=t,this},setContext:function(t){return this.currentContext=t||this.gameContext,this},setAlpha:function(t){return this.currentContext.globalAlpha=t,this},preRender:function(){var t=this.gameContext,e=this.config,i=this.width,n=this.height;t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),e.clearBeforeRender&&t.clearRect(0,0,i,n),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,n)),t.save(),this.drawCount=0},render:function(t,e,i,n){var r=e.list,o=r.length,a=n._cx,h=n._cy,l=n._cw,u=n._ch,c=n.renderToTexture?n.context:t.sys.context;c.save(),this.game.scene.customViewports&&(c.beginPath(),c.rect(a,h,l,u),c.clip()),this.currentContext=c;var d=n.mask;d&&d.preRenderCanvas(this,null,n._maskCamera),n.transparent||(c.fillStyle=n.backgroundColor.rgba,c.fillRect(a,h,l,u)),c.globalAlpha=n.alpha,c.globalCompositeOperation="source-over",this.drawCount+=r.length,n.renderToTexture&&n.emit(s.PRE_RENDER,n),n.matrix.copyToContext(c);for(var f=0;f=0?y=-(y+d):y<0&&(y=Math.abs(y)-d)),t.flipY&&(x>=0?x=-(x+f):x<0&&(x=Math.abs(x)-f))}var w=1,b=1;t.flipX&&(p||(y+=-e.realWidth+2*v),w=-1),t.flipY&&(p||(x+=-e.realHeight+2*m),b=-1),a.applyITRS(t.x,t.y,t.rotation,t.scaleX*w,t.scaleY*b),o.copyFrom(i.matrix),n?(o.multiplyWithOffset(n,-i.scrollX*t.scrollFactorX,-i.scrollY*t.scrollFactorY),a.e=t.x,a.f=t.y,o.multiply(a,h)):(a.e-=i.scrollX*t.scrollFactorX,a.f-=i.scrollY*t.scrollFactorY,o.multiply(a,h)),r.save(),h.setToContext(r),r.globalCompositeOperation=this.blendModes[t.blendMode],r.globalAlpha=s,r.imageSmoothingEnabled=!(!this.antialias||e.source.scaleMode),r.drawImage(e.source.image,u,c,d,f,y,x,d/g,f/g),r.restore()}},destroy:function(){this.gameCanvas=null,this.gameContext=null,this.game=null}});t.exports=u},function(t,e,i){var n=i(26),s=i(33),r=i(2);t.exports=function(t,e){var i=r(e,"callback"),o=r(e,"type","image/png"),a=r(e,"encoder",.92),h=Math.abs(Math.round(r(e,"x",0))),l=Math.abs(Math.round(r(e,"y",0))),u=r(e,"width",t.width),c=r(e,"height",t.height);if(r(e,"getPixel",!1)){var d=t.getContext("2d").getImageData(h,l,1,1).data;i.call(null,new s(d[0],d[1],d[2],d[3]/255))}else if(0!==h||0!==l||u!==t.width||c!==t.height){var f=n.createWebGL(this,u,c);f.getContext("2d").drawImage(t,h,l,u,c,0,0,u,c);var p=new Image;p.onerror=function(){i.call(null),n.remove(f)},p.onload=function(){i.call(null,p),n.remove(f)},p.src=f.toDataURL(o,a)}else{var g=new Image;g.onerror=function(){i.call(null)},g.onload=function(){i.call(null,g)},g.src=t.toDataURL(o,a)}}},function(t,e,i){var n=i(52),s=i(313);t.exports=function(){var t=[],e=s.supportNewBlendModes,i="source-over";return t[n.NORMAL]=i,t[n.ADD]="lighter",t[n.MULTIPLY]=e?"multiply":i,t[n.SCREEN]=e?"screen":i,t[n.OVERLAY]=e?"overlay":i,t[n.DARKEN]=e?"darken":i,t[n.LIGHTEN]=e?"lighten":i,t[n.COLOR_DODGE]=e?"color-dodge":i,t[n.COLOR_BURN]=e?"color-burn":i,t[n.HARD_LIGHT]=e?"hard-light":i,t[n.SOFT_LIGHT]=e?"soft-light":i,t[n.DIFFERENCE]=e?"difference":i,t[n.EXCLUSION]=e?"exclusion":i,t[n.HUE]=e?"hue":i,t[n.SATURATION]=e?"saturation":i,t[n.COLOR]=e?"color":i,t[n.LUMINOSITY]=e?"luminosity":i,t[n.ERASE]="destination-out",t[n.SOURCE_IN]="source-in",t[n.SOURCE_OUT]="source-out",t[n.SOURCE_ATOP]="source-atop",t[n.DESTINATION_OVER]="destination-over",t[n.DESTINATION_IN]="destination-in",t[n.DESTINATION_OUT]="destination-out",t[n.DESTINATION_ATOP]="destination-atop",t[n.LIGHTER]="lighter",t[n.COPY]="copy",t[n.XOR]="xor",t}},function(t,e,i){var n=i(91),s=i(48),r=i(0),o=i(29),a=i(18),h=i(118),l=i(1),u=i(92),c=i(79),d=i(119),f=i(32),p=i(10),g=i(503),v=i(504),m=i(505),y=i(235),x=new r({initialize:function(t){var e=t.config,i={alpha:e.transparent,desynchronized:e.desynchronized,depth:!1,antialias:e.antialiasGL,premultipliedAlpha:e.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:e.failIfMajorPerformanceCaveat,powerPreference:e.powerPreference};this.config={clearBeforeRender:e.clearBeforeRender,antialias:e.antialias,backgroundColor:e.backgroundColor,contextCreation:i,resolution:e.resolution,roundPixels:e.roundPixels,maxTextures:e.maxTextures,maxTextureSize:e.maxTextureSize,batchSize:e.batchSize,maxLights:e.maxLights,mipmapFilter:e.mipmapFilter},this.game=t,this.type=o.WEBGL,this.width=0,this.height=0,this.canvas=t.canvas,this.blendModes=[],this.nativeTextures=[],this.contextLost=!1,this.pipelines=null,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92,isFramebuffer:!1,bufferWidth:0,bufferHeight:0},this.currentActiveTextureUnit=0,this.currentTextures=new Array(16),this.currentFramebuffer=null,this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=l,this.contextRestoredHandler=l,this.gl=null,this.supportedExtensions=null,this.extensions={},this.glFormats=[],this.compression={ETC1:!1,PVRTC:!1,S3TC:!1},this.drawingBufferHeight=0,this.blankTexture=null,this.defaultCamera=new n(0,0,0,0),this._tempMatrix1=new f,this._tempMatrix2=new f,this._tempMatrix3=new f,this._tempMatrix4=new f,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.mipmapFilter=null,this.init(this.config)},init:function(t){var e,i=this.game,n=this.canvas,s=t.backgroundColor;if(!(e=i.config.context?i.config.context:n.getContext("webgl",t.contextCreation)||n.getContext("experimental-webgl",t.contextCreation))||e.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=e;var r=this;this.contextLostHandler=function(t){r.contextLost=!0,r.game.events.emit(a.CONTEXT_LOST,r),t.preventDefault()},this.contextRestoredHandler=function(){r.contextLost=!1,r.init(r.config),r.game.events.emit(a.CONTEXT_RESTORED,r)},n.addEventListener("webglcontextlost",this.contextLostHandler,!1),n.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),i.context=e;for(var h=0;h<=27;h++)this.blendModes.push({func:[e.ONE,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_ADD});this.blendModes[1].func=[e.ONE,e.DST_ALPHA],this.blendModes[2].func=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[e.ONE,e.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[e.ZERO,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_REVERSE_SUBTRACT},this.glFormats[0]=e.BYTE,this.glFormats[1]=e.SHORT,this.glFormats[2]=e.UNSIGNED_BYTE,this.glFormats[3]=e.UNSIGNED_SHORT,this.glFormats[4]=e.FLOAT,this.glFuncMap={mat2:{func:e.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:e.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:e.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:e.uniform1f,length:1},"1fv":{func:e.uniform1fv,length:1},"1i":{func:e.uniform1i,length:1},"1iv":{func:e.uniform1iv,length:1},"2f":{func:e.uniform2f,length:2},"2fv":{func:e.uniform2fv,length:1},"2i":{func:e.uniform2i,length:2},"2iv":{func:e.uniform2iv,length:1},"3f":{func:e.uniform3f,length:3},"3fv":{func:e.uniform3fv,length:1},"3i":{func:e.uniform3i,length:3},"3iv":{func:e.uniform3iv,length:1},"4f":{func:e.uniform4f,length:4},"4fv":{func:e.uniform4fv,length:1},"4i":{func:e.uniform4i,length:4},"4iv":{func:e.uniform4iv,length:1}};var l=e.getSupportedExtensions();t.maxTextures||(t.maxTextures=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),t.maxTextureSize||(t.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE));var u="WEBGL_compressed_texture_",c="WEBKIT_"+u;this.compression.ETC1=e.getExtension(u+"etc1")||e.getExtension(c+"etc1"),this.compression.PVRTC=e.getExtension(u+"pvrtc")||e.getExtension(c+"pvrtc"),this.compression.S3TC=e.getExtension(u+"s3tc")||e.getExtension(c+"s3tc"),this.supportedExtensions=l,e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),e.enable(e.BLEND),e.clearColor(s.redGL,s.greenGL,s.blueGL,s.alphaGL),this.mipmapFilter=e[t.mipmapFilter];for(var f=0;f0&&n>0;if(o&&a){var h=o[0],l=o[1],u=o[2],c=o[3];a=h!==t||l!==e||u!==i||c!==n}a&&(this.flush(),r.scissor(t,s-e-n,i,n))},popScissor:function(){var t=this.scissorStack;t.pop();var e=t[t.length-1];e&&this.setScissor(e[0],e[1],e[2],e[3]),this.currentScissor=e},setPipeline:function(t,e){return this.currentPipeline===t&&this.currentPipeline.vertexBuffer===this.currentVertexBuffer&&this.currentPipeline.program===this.currentProgram||(this.flush(),this.currentPipeline=t,this.currentPipeline.bind()),this.currentPipeline.onBind(e),this.currentPipeline},hasActiveStencilMask:function(){var t=this.currentMask.mask,e=this.currentCameraMask.mask;return t&&t.isStencil||e&&e.isStencil},rebindPipeline:function(t){var e=this.gl;e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),this.hasActiveStencilMask()?e.clear(e.DEPTH_BUFFER_BIT):(e.disable(e.STENCIL_TEST),e.clear(e.DEPTH_BUFFER_BIT|e.STENCIL_BUFFER_BIT)),e.viewport(0,0,this.width,this.height),this.setBlendMode(0,!0),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.blankTexture.glTexture),this.currentActiveTextureUnit=0,this.currentTextures[0]=this.blankTexture.glTexture,this.currentPipeline=t,this.currentPipeline.bind(),this.currentPipeline.onBind()},clearPipeline:function(){this.flush(),this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.setBlendMode(0,!0)},setBlendMode:function(t,e){void 0===e&&(e=!1);var i=this.gl,n=this.blendModes[t];return!!(e||t!==o.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t)&&(this.flush(),i.enable(i.BLEND),i.blendEquation(n.equation),n.func.length>2?i.blendFuncSeparate(n.func[0],n.func[1],n.func[2],n.func[3]):i.blendFunc(n.func[0],n.func[1]),this.currentBlendMode=t,!0)},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return t>17&&this.blendModes[t]&&this.blendModes.splice(t,1),this},setBlankTexture:function(t){void 0===t&&(t=!1),!t&&0===this.currentActiveTextureUnit&&this.currentTextures[0]||this.setTexture2D(this.blankTexture.glTexture,0)},setTexture2D:function(t,e,i){void 0===i&&(i=!0);var n=this.gl;return t!==this.currentTextures[e]&&(i&&this.flush(),this.currentActiveTextureUnit!==e&&(n.activeTexture(n.TEXTURE0+e),this.currentActiveTextureUnit=e),n.bindTexture(n.TEXTURE_2D,t),this.currentTextures[e]=t),this},setFramebuffer:function(t,e){void 0===e&&(e=!1);var i=this.gl,n=this.width,s=this.height;return t!==this.currentFramebuffer&&(t&&t.renderTexture?(n=t.renderTexture.width,s=t.renderTexture.height):this.flush(),i.bindFramebuffer(i.FRAMEBUFFER,t),i.viewport(0,0,n,s),e&&(t?(this.drawingBufferHeight=s,this.pushScissor(0,0,n,s)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=t),this},setProgram:function(t){var e=this.gl;return t!==this.currentProgram&&(this.flush(),e.useProgram(t),this.currentProgram=t),this},setVertexBuffer:function(t){var e=this.gl;return t!==this.currentVertexBuffer&&(this.flush(),e.bindBuffer(e.ARRAY_BUFFER,t),this.currentVertexBuffer=t),this},setIndexBuffer:function(t){var e=this.gl;return t!==this.currentIndexBuffer&&(this.flush(),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.currentIndexBuffer=t),this},createTextureFromSource:function(t,e,i,n){var s=this.gl,r=s.NEAREST,a=s.NEAREST,l=s.CLAMP_TO_EDGE;e=t?t.width:e,i=t?t.height:i;var u=h(e,i);return u&&(l=s.REPEAT),n===o.ScaleModes.LINEAR&&this.config.antialias&&(r=u?this.mipmapFilter:s.LINEAR,a=s.LINEAR),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,r,a,l,l,s.RGBA,t):this.createTexture2D(0,r,a,l,l,s.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,s,r,o,a,l,u,c,d){u=void 0===u||null===u||u,void 0===c&&(c=!1),void 0===d&&(d=!1);var f=this.gl,p=f.createTexture();return this.setTexture2D(p,0),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,e),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,i),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_S,s),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_T,n),f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,d),null===o||void 0===o?f.texImage2D(f.TEXTURE_2D,t,r,a,l,0,r,f.UNSIGNED_BYTE,null):(c||(a=o.width,l=o.height),f.texImage2D(f.TEXTURE_2D,t,r,r,f.UNSIGNED_BYTE,o)),h(a,l)&&f.generateMipmap(f.TEXTURE_2D),this.setTexture2D(null,0),p.isAlphaPremultiplied=u,p.isRenderTexture=!1,p.width=a,p.height=l,this.nativeTextures.push(p),p},createFramebuffer:function(t,e,i,n){var s,r=this.gl,o=r.createFramebuffer();if(this.setFramebuffer(o),n){var a=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,a),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,a)}if(i.isRenderTexture=!0,i.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0),(s=r.checkFramebufferStatus(r.FRAMEBUFFER))!==r.FRAMEBUFFER_COMPLETE){throw new Error("Framebuffer incomplete. Framebuffer status: "+{36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"}[s])}return o.renderTexture=i,this.setFramebuffer(null),o},createProgram:function(t,e){var i=this.gl,n=i.createProgram(),s=i.createShader(i.VERTEX_SHADER),r=i.createShader(i.FRAGMENT_SHADER);if(i.shaderSource(s,t),i.shaderSource(r,e),i.compileShader(s),i.compileShader(r),!i.getShaderParameter(s,i.COMPILE_STATUS))throw new Error("Failed to compile Vertex Shader:\n"+i.getShaderInfoLog(s));if(!i.getShaderParameter(r,i.COMPILE_STATUS))throw new Error("Failed to compile Fragment Shader:\n"+i.getShaderInfoLog(r));if(i.attachShader(n,s),i.attachShader(n,r),i.linkProgram(n),!i.getProgramParameter(n,i.LINK_STATUS))throw new Error("Failed to link program:\n"+i.getProgramInfoLog(n));return n},createVertexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setVertexBuffer(n),i.bufferData(i.ARRAY_BUFFER,t,e),this.setVertexBuffer(null),n},createIndexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setIndexBuffer(n),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t,e),this.setIndexBuffer(null),n},deleteTexture:function(t){var e=this.nativeTextures.indexOf(t);return-1!==e&&c(this.nativeTextures,e),this.gl.deleteTexture(t),this.currentTextures[0]!==t||this.game.pendingDestroy||this.setBlankTexture(!0),this},deleteFramebuffer:function(t){return this.gl.deleteFramebuffer(t),this},deleteProgram:function(t){return this.gl.deleteProgram(t),this},deleteBuffer:function(t){return this.gl.deleteBuffer(t),this},preRenderCamera:function(t){var e=t._cx,i=t._cy,n=t._cw,r=t._ch,o=this.pipelines.TextureTintPipeline,a=t.backgroundColor;if(t.renderToTexture){this.flush(),this.pushScissor(e,i,n,-r),this.setFramebuffer(t.framebuffer);var h=this.gl;h.clearColor(0,0,0,0),h.clear(h.COLOR_BUFFER_BIT),o.projOrtho(e,n+e,i,r+i,-1e3,1e3),t.mask&&(this.currentCameraMask.mask=t.mask,this.currentCameraMask.camera=t._maskCamera,t.mask.preRenderWebGL(this,t,t._maskCamera)),a.alphaGL>0&&o.drawFillRect(e,i,n+e,r+i,p.getTintFromFloats(a.redGL,a.greenGL,a.blueGL,1),a.alphaGL),t.emit(s.PRE_RENDER,t)}else this.pushScissor(e,i,n,r),t.mask&&(this.currentCameraMask.mask=t.mask,this.currentCameraMask.camera=t._maskCamera,t.mask.preRenderWebGL(this,t,t._maskCamera)),a.alphaGL>0&&o.drawFillRect(e,i,n,r,p.getTintFromFloats(a.redGL,a.greenGL,a.blueGL,1),a.alphaGL)},getCurrentStencilMask:function(){var t=null,e=this.maskStack,i=this.currentCameraMask;return e.length>0?t=e[e.length-1]:i.mask&&i.mask.isStencil&&(t=i),t},postRenderCamera:function(t){var e=this.pipelines.TextureTintPipeline;if(t.flashEffect.postRenderWebGL(e,p.getTintFromFloats),t.fadeEffect.postRenderWebGL(e,p.getTintFromFloats),t.dirty=!1,this.popScissor(),t.renderToTexture){e.flush(),this.setFramebuffer(null),t.emit(s.POST_RENDER,t),e.projOrtho(0,e.width,e.height,0,-1e3,1e3);var i=p.getTintAppendFloatAlpha;(t.pipeline?t.pipeline:e).batchTexture(t,t.glTexture,t.width,t.height,t.x,t.y,t.width,t.height,t.zoom,t.zoom,t.rotation,t.flipX,!t.flipY,1,1,0,0,0,0,t.width,t.height,i(t._tintTL,t._alphaTL),i(t._tintTR,t._alphaTR),i(t._tintBL,t._alphaBL),i(t._tintBR,t._alphaBR),t._isTinted&&t.tintFill,0,0,this.defaultCamera,null),this.setBlankTexture(!0)}t.mask&&(this.currentCameraMask.mask=null,t.mask.postRenderWebGL(this,t._maskCamera))},preRender:function(){if(!this.contextLost){var t=this.gl,e=this.pipelines;if(t.bindFramebuffer(t.FRAMEBUFFER,null),this.config.clearBeforeRender){var i=this.config.backgroundColor;t.clearColor(i.redGL,i.greenGL,i.blueGL,i.alphaGL),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT)}for(var n in t.enable(t.SCISSOR_TEST),e)e[n].onPreRender();this.currentScissor=[0,0,this.width,this.height],this.scissorStack=[this.currentScissor],this.game.scene.customViewports&&t.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.setPipeline(this.pipelines.TextureTintPipeline)}},render:function(t,e,i,n){if(!this.contextLost){var s=e.list,r=s.length,a=this.pipelines;for(var h in a)a[h].onRender(t,n);if(this.preRenderCamera(n),0===r)return this.setBlendMode(o.BlendModes.NORMAL),void this.postRenderCamera(n);this.currentType="";for(var l=this.currentMask,u=0;u0&&r>0&&(this.setTexture2D(e,0),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,i),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.width=s,e.height=r,this.setTexture2D(null,0)),e},createVideoTexture:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=this.gl,s=n.NEAREST,r=n.NEAREST,o=t.videoWidth,a=t.videoHeight,l=n.CLAMP_TO_EDGE,u=h(o,a);return!e&&u&&(l=n.REPEAT),this.config.antialias&&(s=u?this.mipmapFilter:n.LINEAR,r=n.LINEAR),this.createTexture2D(0,s,r,l,l,n.RGBA,t,o,a,!0,!0,i)},updateVideoTexture:function(t,e,i){void 0===i&&(i=!1);var n=this.gl,s=t.videoWidth,r=t.videoHeight;return s>0&&r>0&&(this.setTexture2D(e,0),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,i),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.width=s,e.height=r,this.setTexture2D(null,0)),e},setTextureFilter:function(t,e){var i=this.gl,n=[i.LINEAR,i.NEAREST][e];return this.setTexture2D(t,0),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,n),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,n),this.setTexture2D(null,0),this},setFloat1:function(t,e,i){return this.setProgram(t),this.gl.uniform1f(this.gl.getUniformLocation(t,e),i),this},setFloat2:function(t,e,i,n){return this.setProgram(t),this.gl.uniform2f(this.gl.getUniformLocation(t,e),i,n),this},setFloat3:function(t,e,i,n,s){return this.setProgram(t),this.gl.uniform3f(this.gl.getUniformLocation(t,e),i,n,s),this},setFloat4:function(t,e,i,n,s,r){return this.setProgram(t),this.gl.uniform4f(this.gl.getUniformLocation(t,e),i,n,s,r),this},setFloat1v:function(t,e,i){return this.setProgram(t),this.gl.uniform1fv(this.gl.getUniformLocation(t,e),i),this},setFloat2v:function(t,e,i){return this.setProgram(t),this.gl.uniform2fv(this.gl.getUniformLocation(t,e),i),this},setFloat3v:function(t,e,i){return this.setProgram(t),this.gl.uniform3fv(this.gl.getUniformLocation(t,e),i),this},setFloat4v:function(t,e,i){return this.setProgram(t),this.gl.uniform4fv(this.gl.getUniformLocation(t,e),i),this},setInt1:function(t,e,i){return this.setProgram(t),this.gl.uniform1i(this.gl.getUniformLocation(t,e),i),this},setInt2:function(t,e,i,n){return this.setProgram(t),this.gl.uniform2i(this.gl.getUniformLocation(t,e),i,n),this},setInt3:function(t,e,i,n,s){return this.setProgram(t),this.gl.uniform3i(this.gl.getUniformLocation(t,e),i,n,s),this},setInt4:function(t,e,i,n,s,r){return this.setProgram(t),this.gl.uniform4i(this.gl.getUniformLocation(t,e),i,n,s,r),this},setMatrix2:function(t,e,i,n){return this.setProgram(t),this.gl.uniformMatrix2fv(this.gl.getUniformLocation(t,e),i,n),this},setMatrix3:function(t,e,i,n){return this.setProgram(t),this.gl.uniformMatrix3fv(this.gl.getUniformLocation(t,e),i,n),this},setMatrix4:function(t,e,i,n){return this.setProgram(t),this.gl.uniformMatrix4fv(this.gl.getUniformLocation(t,e),i,n),this},getMaxTextures:function(){return this.config.maxTextures},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){for(var t=0;t0&&this.flush();var e=this.inverseRotationMatrix;if(t){var i=-t,n=Math.cos(i),s=Math.sin(i);e[1]=s,e[3]=-s,e[0]=e[4]=n}else e[0]=e[4]=1,e[1]=e[3]=0;this.renderer.setMatrix3(this.program,"uInverseRotationMatrix",!1,e),this.currentNormalMapRotation=t}},batchSprite:function(t,e,i){if(this.active){var n=t.texture.dataSource[t.frame.sourceIndex];n&&(this.renderer.setPipeline(this),this.setTexture2D(n.glTexture,1),this.setNormalMapRotation(t.rotation),r.prototype.batchSprite.call(this,t,e,i))}}});a.LIGHT_COUNT=o,t.exports=a},function(t,e){var i={modelMatrixDirty:!1,viewMatrixDirty:!1,projectionMatrixDirty:!1,modelMatrix:null,viewMatrix:null,projectionMatrix:null,mvpInit:function(){return this.modelMatrixDirty=!0,this.viewMatrixDirty=!0,this.projectionMatrixDirty=!0,this.modelMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this},mvpUpdate:function(){var t=this.program;return this.modelMatrixDirty&&(this.renderer.setMatrix4(t,"uModelMatrix",!1,this.modelMatrix),this.modelMatrixDirty=!1),this.viewMatrixDirty&&(this.renderer.setMatrix4(t,"uViewMatrix",!1,this.viewMatrix),this.viewMatrixDirty=!1),this.projectionMatrixDirty&&(this.renderer.setMatrix4(t,"uProjectionMatrix",!1,this.projectionMatrix),this.projectionMatrixDirty=!1),this},modelIdentity:function(){var t=this.modelMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.modelMatrixDirty=!0,this},modelScale:function(t,e,i){var n=this.modelMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.modelMatrixDirty=!0,this},modelTranslate:function(t,e,i){var n=this.modelMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.modelMatrixDirty=!0,this},modelRotateX:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this.modelMatrixDirty=!0,this},modelRotateY:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this.modelMatrixDirty=!0,this},modelRotateZ:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this.modelMatrixDirty=!0,this},viewIdentity:function(){var t=this.viewMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.viewMatrixDirty=!0,this},viewScale:function(t,e,i){var n=this.viewMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.viewMatrixDirty=!0,this},viewTranslate:function(t,e,i){var n=this.viewMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.viewMatrixDirty=!0,this},viewRotateX:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this.viewMatrixDirty=!0,this},viewRotateY:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this.viewMatrixDirty=!0,this},viewRotateZ:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this.viewMatrixDirty=!0,this},viewLoad2D:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=0,e[4]=t[2],e[5]=t[3],e[6]=0,e[7]=0,e[8]=t[4],e[9]=t[5],e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this.viewMatrixDirty=!0,this},viewLoad:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this.viewMatrixDirty=!0,this},projIdentity:function(){var t=this.projectionMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.projectionMatrixDirty=!0,this},projOrtho:function(t,e,i,n,s,r){var o=this.projectionMatrix,a=1/(t-e),h=1/(i-n),l=1/(s-r);return o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*l,o[15]=1,this.projectionMatrixDirty=!0,this},projPersp:function(t,e,i,n){var s=this.projectionMatrix,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this.projectionMatrixDirty=!0,this}};t.exports=i},function(t,e,i){var n={};t.exports=n;var s=i(101),r=i(37);n.fromVertices=function(t){for(var e={},i=0;i1?1:0;d1?1:0;p0:0!=(t.mask&e.category)&&0!=(e.mask&t.category)}},function(t,e,i){var n={};t.exports=n;var s=i(86),r=i(101);n.collides=function(t,e,i){var o,a,h,l,u=!1;if(i){var c=t.parent,d=e.parent,f=c.speed*c.speed+c.angularSpeed*c.angularSpeed+d.speed*d.speed+d.angularSpeed*d.angularSpeed;u=i&&i.collided&&f<.2,l=i}else l={collided:!1,bodyA:t,bodyB:e};if(i&&u){var p=l.axisBody,g=p===t?e:t,v=[p.axes[i.axisNumber]];if(h=n._overlapAxes(p.vertices,g.vertices,v),l.reused=!0,h.overlap<=0)return l.collided=!1,l}else{if((o=n._overlapAxes(t.vertices,e.vertices,t.axes)).overlap<=0)return l.collided=!1,l;if((a=n._overlapAxes(e.vertices,t.vertices,e.axes)).overlap<=0)return l.collided=!1,l;o.overlaps?s=a:a=0?o.index-1:u.length-1],l.x=s.x-c.x,l.y=s.y-c.y,h=-r.dot(i,l),a=s,s=u[(o.index+1)%u.length],l.x=s.x-c.x,l.y=s.y-c.y,(n=-r.dot(i,l))>>0;if("function"!=typeof t)throw new TypeError;for(var n=arguments.length>=2?arguments[1]:void 0,s=0;s>16)+(65280&t)+((255&t)<<16)},n={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,_isTinted:!1,tintFill:!1,clearTint:function(){return this.setTint(16777215),this._isTinted=!1,this},setTint:function(t,e,n,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,n=t,s=t),this._tintTL=i(t),this._tintTR=i(e),this._tintBL=i(n),this._tintBR=i(s),this._isTinted=!0,this.tintFill=!1,this},setTintFill:function(t,e,i,n){return this.setTint(t,e,i,n),this.tintFill=!0,this},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=i(t),this._isTinted=!0}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=i(t),this._isTinted=!0}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=i(t),this._isTinted=!0}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=i(t),this._isTinted=!0}},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){return this._isTinted}}};t.exports=n},function(t,e){t.exports="changedata"},function(t,e){t.exports="changedata-"},function(t,e){t.exports="removedata"},function(t,e){t.exports="setdata"},function(t,e){t.exports="destroy"},function(t,e){t.exports="complete"},function(t,e){t.exports="created"},function(t,e){t.exports="error"},function(t,e){t.exports="loop"},function(t,e){t.exports="play"},function(t,e){t.exports="seeked"},function(t,e){t.exports="seeking"},function(t,e){t.exports="stop"},function(t,e){t.exports="timeout"},function(t,e){t.exports="unlocked"},function(t,e,i){var n=i(34);t.exports=function(t,e,i,s,r){return n(t,"alpha",e,i,s,r)}},function(t,e,i){var n=i(34);t.exports=function(t,e,i,s,r){return n(t,"x",e,i,s,r)}},function(t,e,i){var n=i(34);t.exports=function(t,e,i,s,r,o,a){return void 0!==i&&null!==i||(i=e),n(t,"x",e,s,o,a),n(t,"y",i,r,o,a)}},function(t,e,i){var n=i(34);t.exports=function(t,e,i,s,r){return n(t,"y",e,i,s,r)}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=6.28);for(var s=i,r=(n-i)/t.length,o=0;o0?s(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a1)if(0===s){var d=t.length-1;for(o=t[d].x,a=t[d].y,h=d-1;h>=0;h--)l=(c=t[h]).x,u=c.y,c.x=o,c.y=a,o=l,a=u;t[d].x=e,t[d].y=i}else{for(o=t[0].x,a=t[0].y,h=1;h0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<.001&&(e.zoom=.001))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){t.exports={Camera:i(290),BaseCamera:i(91),CameraManager:i(693),Effects:i(298),Events:i(48)}},function(t,e){t.exports="cameradestroy"},function(t,e){t.exports="camerafadeincomplete"},function(t,e){t.exports="camerafadeinstart"},function(t,e){t.exports="camerafadeoutcomplete"},function(t,e){t.exports="camerafadeoutstart"},function(t,e){t.exports="cameraflashcomplete"},function(t,e){t.exports="cameraflashstart"},function(t,e){t.exports="camerapancomplete"},function(t,e){t.exports="camerapanstart"},function(t,e){t.exports="postrender"},function(t,e){t.exports="prerender"},function(t,e){t.exports="camerashakecomplete"},function(t,e){t.exports="camerashakestart"},function(t,e){t.exports="camerazoomcomplete"},function(t,e){t.exports="camerazoomstart"},function(t,e,i){var n=i(22),s=i(0),r=i(48),o=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,o,a,h){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===o&&(o=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene),!o&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=t,this.progress=0,this.red=i,this.green=n,this.blue=s,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h;var l=t?r.FADE_OUT_START:r.FADE_IN_START;return this.camera.emit(l,this.camera,this,e,i,n,s),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed=1?1:1/e*(1+(e*t|0))}},function(t,e,i){var n=i(22),s=i(0),r=i(48),o=i(3),a=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.intensity=new o,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s){return void 0===t&&(t=100),void 0===e&&(e=.05),void 0===i&&(i=!1),void 0===n&&(n=null),void 0===s&&(s=this.camera.scene),!i&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=t,this.progress=0,"number"==typeof e?this.intensity.set(e):this.intensity.set(e.x,e.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=n,this._onUpdateScope=s,this.camera.emit(r.SHAKE_START,this.camera,this,t,e),this.camera)},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(t,e){if(this.isRunning)if(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed0&&(o.preRender(1),t.render(n,e,i,o))}},resetAll:function(){for(var t=0;t1)for(var i=1;i=1)&&(s.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(s.mspointer=!0),navigator.getGamepads&&(s.gamepads=!0),"onwheel"in window||n.ie&&"WheelEvent"in window?s.wheelEvent="wheel":"onmousewheel"in window?s.wheelEvent="mousewheel":n.firefox&&"MouseScrollEvent"in window&&(s.wheelEvent="DOMMouseScroll"),s)},function(t,e,i){var n=i(117),s={audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){s.audioData=!!window.Audio,s.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e&&(t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(s.ogg=!0),(t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||t.canPlayType("audio/opus;").replace(/^no$/,""))&&(s.opus=!0),t.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(s.mp3=!0),t.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")&&(s.wav=!0),(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/aac;").replace(/^no$/,""))&&(s.m4a=!0),t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(s.webm=!0),""!==t.canPlayType('audio/mp4;codecs="ec-3"')))if(n.edge)s.dolby=!0;else if(n.safari&&n.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var i=parseInt(RegExp.$1,10),r=parseInt(RegExp.$2,10);(10===i&&r>=11||i>10)&&(s.dolby=!0)}}catch(t){}return s}()},function(t,e){var i={h264:!1,hls:!1,mp4:!1,ogg:!1,vp9:!1,webm:!1};t.exports=function(){var t=document.createElement("video"),e=!!t.canPlayType;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(i.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.h264=!0,i.mp4=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(i.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(i.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.hls=!0))}catch(t){}return i}()},function(t,e){var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){var t,e="Fullscreen",n="FullScreen",s=["request"+e,"request"+n,"webkitRequest"+e,"webkitRequest"+n,"msRequest"+e,"msRequest"+n,"mozRequest"+n,"mozRequest"+e];for(t=0;tMath.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){var n=i(315);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(13);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e?t:(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e1?t[i]-(n(s-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(s-r,t[r?r-1:0],t[r],t[i1?n(t[i],t[i-1],i-s):n(t[r],t[r+1>i?i:r+1],s-r)}},function(t,e,i){var n=i(157);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){t.exports={GetNext:i(324),IsSize:i(118),IsValue:i(749)}},function(t,e){t.exports=function(t){return t>0&&0==(t&t-1)}},function(t,e,i){t.exports={Ceil:i(325),Floor:i(93),To:i(751)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),n?(i+t)/e:i+t)}},function(t,e,i){var n=new(i(0))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var n=0;n>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e0;e--){var i=Math.floor(this.frac()*(e+1)),n=t[i];t[i]=t[e],t[e]=n}return t}});t.exports=n},function(t,e){t.exports=function(t){for(var e=0,i=0;i1?void 0!==n?(s=(n-t)/(n-i))<0&&(s=0):s=1:s<0&&(s=0),s}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,s=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*s,t.y=Math.sin(i)*s,t.z=n*e,t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var s=[],r=[],o=0;o0&&t<=e*i&&(r=t>e-1?t-(o=Math.floor(t/e))*e:t,s.set(r,o)),s}},function(t,e){t.exports=function(t,e,i){return Math.abs(t-e)<=i}},function(t,e,i){var n=i(172),s=i(332),r=i(333),o=new s,a=new r,h=new n;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},function(t,e){t.exports="addtexture"},function(t,e){t.exports="onerror"},function(t,e){t.exports="onload"},function(t,e){t.exports="ready"},function(t,e){t.exports="removetexture"},function(t,e){t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","","void main()","{"," vec2 uv = gl_FragCoord.xy / uResolution;"," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);"," float alpha = mainColor.a;",""," if (!uInvertMaskAlpha)"," {"," alpha *= (maskColor.a);"," }"," else"," {"," alpha *= (1.0 - maskColor.a);"," }",""," gl_FragColor = vec4(mainColor.rgb * alpha, alpha);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","","precision mediump float;","","attribute vec2 inPosition;","","void main()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_FORWARD_DIFFUSE_FS","","precision mediump float;","","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","","const int kMaxLights = %LIGHT_COUNT%;","","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","","varying vec2 outTexCoord;","varying vec4 outTint;","","void main()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);"," vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.rgb * outTint.a, outTint.a);"," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;",""," for (int index = 0; index < kMaxLights; ++index)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }",""," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);"," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_TEXTURE_TINT_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.rgb * outTint.a, outTint.a);"," vec4 color = texture;",""," if (outTintEffect == 0.0)"," {"," // Multiply texture tint"," color = texture * texel;"," }"," else if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.rgb * outTint.a, texture.a);"," color.a = texture.a * texel.a;"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_TEXTURE_TINT_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform mat4 uModelMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}","",""].join("\n")},function(t,e,i){t.exports={GenerateTexture:i(340),Palettes:i(782)}},function(t,e,i){t.exports={ARNE16:i(341),C64:i(783),CGA:i(784),JMP:i(785),MSX:i(786)}},function(t,e){t.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},function(t,e){t.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},function(t,e){t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},function(t,e){t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},function(t,e,i){t.exports={Path:i(788),CubicBezier:i(342),Curve:i(80),Ellipse:i(343),Line:i(344),QuadraticBezier:i(345),Spline:i(346)}},function(t,e,i){var n=i(0),s=i(342),r=i(343),o=i(5),a=i(344),h=i(789),l=i(345),u=i(11),c=i(346),d=i(3),f=i(13),p=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.name="",this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new d,this._tmpVec2A=new d,this._tmpVec2B=new d,"object"==typeof t?this.fromJSON(t):this.startPoint.set(t,e)},add:function(t){return this.curves.push(t),this},circleTo:function(t,e,i){return void 0===e&&(e=!1),this.ellipseTo(t,t,0,360,e,i)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);return t.equals(e)||this.curves.push(new a(e,t)),this},cubicBezierTo:function(t,e,i,n,r,o){var a,h,l,u=this.getEndPoint();return t instanceof d?(a=t,h=e,l=i):(a=new d(i,n),h=new d(r,o),l=new d(t,e)),this.add(new s(u,a,h,l))},quadraticBezierTo:function(t,e,i,n){var s,r,o=this.getEndPoint();return t instanceof d?(s=t,r=e):(s=new d(i,n),r=new d(t,e)),this.add(new l(o,s,r))},draw:function(t,e){for(var i=0;i0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new d);for(var i=t*this.getLength(),n=this.getCurveLengths(),s=0;s=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new d),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new d),t.copy(this.startPoint)},lineTo:function(t,e){t instanceof d?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new a([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new c(t))},moveTo:function(t,e){return t instanceof d?this.add(new h(t.x,t.y)):this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},function(t,e,i){var n=i(33),s=i(350);t.exports=function(t,e,i){var r=i,o=i,a=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,l=2*i-h;r=s(l,h,t+1/3),o=s(l,h,t),a=s(l,h,t-1/3)}return(new n).setGLTo(r,o,a,1)}},function(t,e,i){var n=i(163);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],s=0;s<=359;s++)i.push(n(s/359,t,e));return i}},function(t,e,i){var n=i(115),s=function(t,e,i,s,r,o,a,h){void 0===a&&(a=100),void 0===h&&(h=0);var l=h/a;return{r:n(t,s,l),g:n(e,r,l),b:n(i,o,l)}};t.exports={RGBWithRGB:s,ColorWithRGB:function(t,e,i,n,r,o){return void 0===r&&(r=100),void 0===o&&(o=0),s(t.r,t.g,t.b,e,i,n,r,o)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),s(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(170),s=i(33);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e,i){var n=i(349);t.exports=function(t,e,i,s,r){return void 0===s&&(s=255),void 0===r&&(r="#"),"#"===r?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1):"0x"+n(s)+n(t)+n(e)+n(i)}},function(t,e,i){t.exports={BitmapMask:i(275),GeometryMask:i(276)}},function(t,e,i){var n={AddToDOM:i(120),DOMContentLoaded:i(351),GetScreenOrientation:i(352),GetTarget:i(357),ParseXML:i(358),RemoveFromDOM:i(176),RequestAnimationFrame:i(338)};t.exports=n},function(t,e,i){t.exports={EventEmitter:i(811)}},function(t,e,i){var n=i(0),s=i(9),r=i(23),o=new n({Extends:s,initialize:function(){s.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},function(t,e,i){var n=i(120),s=i(286),r=i(289),o=i(26),a=i(0),h=i(311),l=i(813),u=i(334),c=i(113),d=i(336),f=i(312),p=i(351),g=i(9),v=i(18),m=i(359),y=i(23),x=i(364),T=i(365),w=i(367),b=i(119),E=i(370),S=i(337),A=i(339),_=i(374),C=new a({initialize:function(t){this.config=new h(t),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new g,this.anims=new s(this),this.textures=new E(this),this.cache=new r(this),this.registry=new c(this),this.input=new m(this,this.config),this.scene=new w(this,this.config.sceneConfig),this.device=f,this.scale=new T(this,this.config),this.sound=null,this.sound=_.create(this),this.loop=new S(this,this.config.fps),this.plugins=new x(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,p(this.boot.bind(this))},boot:function(){y.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),u(this),l(this),d(this),n(this.canvas,this.config.parent),this.textures.once(b.READY,this.texturesReady,this),this.events.emit(v.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(v.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),A(this);var t=this.events;t.on(v.HIDDEN,this.onHidden,this),t.on(v.VISIBLE,this.onVisible,this),t.on(v.BLUR,this.onBlur,this),t.on(v.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e);var n=this.renderer;n.preRender(),i.emit(v.PRE_RENDER,n,t,e),this.scene.render(n),n.postRender(),i.emit(v.POST_RENDER,n,t,e)},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e),i.emit(v.PRE_RENDER),i.emit(v.POST_RENDER)},onHidden:function(){this.loop.pause(),this.events.emit(v.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(v.RESUME)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.scene.destroy(),this.events.emit(v.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=C},function(t,e,i){var n=i(120);t.exports=function(t){var e=t.config;if(e.parent&&e.domCreateContainer){var i=document.createElement("div");i.style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: none;","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=i,n(i,e.parent)}}},function(t,e){t.exports="boot"},function(t,e){t.exports="destroy"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameout"},function(t,e){t.exports="gameover"},function(t,e){t.exports="gameobjectdown"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameobjectmove"},function(t,e){t.exports="gameobjectout"},function(t,e){t.exports="gameobjectover"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="wheel"},function(t,e){t.exports="gameobjectup"},function(t,e){t.exports="gameobjectwheel"},function(t,e){t.exports="boot"},function(t,e){t.exports="process"},function(t,e){t.exports="update"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointerdownoutside"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="pointerupoutside"},function(t,e){t.exports="wheel"},function(t,e){t.exports="pointerlockchange"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="start"},function(t,e){t.exports="update"},function(t,e){t.exports=function(t){if(!t)return window.innerHeight;var e=Math.abs(window.orientation),i={w:0,h:0},n=document.createElement("div");return n.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(n),i.w=90===e?n.offsetHeight:window.innerWidth,i.h=90===e?window.innerWidth:n.offsetHeight,document.documentElement.removeChild(n),n=null,90!==Math.abs(window.orientation)?i.h:i.w}},function(t,e){t.exports="addfile"},function(t,e){t.exports="complete"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="load"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="progress"},function(t,e){t.exports="start"},function(t,e,i){var n=i(2),s=i(179);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=n(t.settings,"physics",!1);if(e||i){var r=[];if(e&&r.push(s(e+"Physics")),i)for(var o in i)o=s(o.concat("Physics")),-1===r.indexOf(o)&&r.push(o);return r}}},function(t,e,i){var n=i(2);t.exports=function(t){var e=t.plugins.getDefaultScenePlugins(),i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e,i){t.exports={game:"game",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"}},function(t,e){t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var s,r=i.getElementsByTagName("SubTexture"),o=0;og||c<-g)&&(c=0),c<0&&(c=g+c),-1!==d&&(g=c+(d+1));for(var v=f,m=f,y=0,x=0,T=0;Tr&&(y=w-r),b>o&&(x=b-o),t.add(T,e,i+v,s+m,h-y,l-x),(v+=h+p)+h>r&&(v=f,m+=l+p)}return t}},function(t,e,i){var n=i(2);t.exports=function(t,e,i){var s=n(i,"frameWidth",null),r=n(i,"frameHeight",s);if(!s)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o=t.source[0];t.add("__BASE",0,0,0,o.width,o.height);var a,h=n(i,"startFrame",0),l=n(i,"endFrame",-1),u=n(i,"margin",0),c=n(i,"spacing",0),d=e.cutX,f=e.cutY,p=e.cutWidth,g=e.cutHeight,v=e.realWidth,m=e.realHeight,y=Math.floor((v-u+c)/(s+c)),x=Math.floor((m-u+c)/(r+c)),T=y*x,w=e.x,b=s-w,E=s-(v-p-w),S=e.y,A=r-S,_=r-(m-g-S);(h>T||h<-T)&&(h=0),h<0&&(h=T+h),-1!==l&&(T=h+(l+1));for(var C=u,M=u,O=0,P=e.sourceIndex,R=0;R0){var r=i-t.length;if(r<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),n&&n.call(s,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.splice(o,1),o--;if(0===(o=e.length))return null;i>0&&o>r&&(e.splice(r),o=r);for(var a=0;a0){var o=n-t.length;if(o<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),s&&s.call(r,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.pop(),a--;if(0===(a=e.length))return null;n>0&&a>o&&(e.splice(o),a=o);for(var h=a-1;h>=0;h--){var l=e[h];t.splice(i,0,l),s&&s.call(r,l)}return e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i0){var n=t[i-1],s=t.indexOf(n);t[i]=n,t[s]=e}return t}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e);if(-1===n||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&it.length-1)throw new Error("Index out of bounds");var r=n(t,e);return i&&i.call(s,r),r}},function(t,e,i){var n=i(68);t.exports=function(t,e,i,s,r){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===r&&(r=t),n(t,e,i)){var o=i-e,a=t.splice(e,o);if(s)for(var h=0;h0&&(t.splice(i,1),t.unshift(e)),e}},function(t,e,i){var n=i(68);t.exports=function(t,e,i,s,r){if(void 0===s&&(s=0),void 0===r&&(r=t.length),n(t,s,r))for(var o=s;o0){for(n=0;nl||U-N>l?(Y.push(X.i-1),X.cr?(Y.push(X.i+X.word.length),N=0,B=null):B=X):X.cr&&(Y.push(X.i+X.word.length),N=0,B=null)}for(n=Y.length-1;n>=0;n--)s=a,r=Y[n],o="\n",a=s.substr(0,r)+o+s.substr(r+1);i.wrappedText=a,h=a.length,D=[],F=null}for(n=0;nb&&(c=b),d>E&&(d=E);var W=b+w.xAdvance,V=E+v;fR&&(R=k),kR&&(R=k),k0&&(a=(o=z.wrappedText).length);var U=e._bounds.lines;1===N?X=(U.longest-U.lengths[0])/2:2===N&&(X=U.longest-U.lengths[0]);for(var G=s.roundPixels,W=0;W0&&(a=(o=L.wrappedText).length);var k=e._bounds.lines;1===O?R=(k.longest-k.lengths[0])/2:2===O&&(R=k.longest-k.lengths[0]),h.translate(-e.displayOriginX,-e.displayOriginY);for(var D=s.roundPixels,F=0;F0!=t>0,this._alpha=t}}});t.exports=r},function(t,e,i){var n=i(1),s=i(1);n=i(948),s=i(949),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){var r=e.list;if(0!==r.length){var o=e.localTransform;s?(o.loadIdentity(),o.multiply(s),o.translate(e.x,e.y),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY)):o.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);for(var h=e.alpha,l=e.scrollFactorX,u=e.scrollFactorY,c=r,d=r.length,f=0;f0||e.cropHeight>0;l&&(h.flush(),t.pushScissor(e.x,e.y,e.cropWidth*e.scaleX,e.cropHeight*e.scaleY));var u=h._tempMatrix1,c=h._tempMatrix2,d=h._tempMatrix3,f=h._tempMatrix4;c.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),u.copyFrom(s.matrix),r?(u.multiplyWithOffset(r,-s.scrollX*e.scrollFactorX,-s.scrollY*e.scrollFactorY),c.e=e.x,c.f=e.y,u.multiply(c,d)):(c.e-=s.scrollX*e.scrollFactorX,c.f-=s.scrollY*e.scrollFactorY,u.multiply(c,d));var p=e.frame,g=p.glTexture,v=p.cutX,m=p.cutY,y=g.width,x=g.height,T=e._isTinted&&e.tintFill,w=n.getTintAppendFloatAlpha(e._tintTL,s.alpha*e._alphaTL),b=n.getTintAppendFloatAlpha(e._tintTR,s.alpha*e._alphaTR),E=n.getTintAppendFloatAlpha(e._tintBL,s.alpha*e._alphaBL),S=n.getTintAppendFloatAlpha(e._tintBR,s.alpha*e._alphaBR);h.setTexture2D(g,0);var A,_,C=0,M=0,O=0,P=0,R=e.letterSpacing,L=0,k=0,D=0,F=0,I=e.scrollX,B=e.scrollY,N=e.fontData,Y=N.chars,X=N.lineHeight,z=e.fontSize/N.size,U=0,G=e._align,W=0,V=0;e.getTextBounds(!1);var H=e._bounds.lines;1===G?V=(H.longest-H.lengths[0])/2:2===G&&(V=H.longest-H.lengths[0]);for(var j=s.roundPixels,q=e.displayCallback,K=e.callbackData,J=0;J0&&e.cropHeight>0&&(h.beginPath(),h.rect(0,0,e.cropWidth,e.cropHeight),h.clip());for(var N=0;N0&&(Y=Y%b-b):Y>b?Y=b:Y<0&&(Y=b+Y%b),null===_&&(_=new o(F+Math.cos(N)*B,I+Math.sin(N)*B,v),E.push(_),D+=.01);D<1+z;)w=Y*D+N,x=F+Math.cos(w)*B,T=I+Math.sin(w)*B,_.points.push(new r(x,T,v)),D+=.01;w=Y+N,x=F+Math.cos(w)*B,T=I+Math.sin(w)*B,_.points.push(new r(x,T,v));break;case n.FILL_RECT:u.setTexture2D(M),u.batchFillRect(p[++O],p[++O],p[++O],p[++O],f,c);break;case n.FILL_TRIANGLE:u.setTexture2D(M),u.batchFillTriangle(p[++O],p[++O],p[++O],p[++O],p[++O],p[++O],f,c);break;case n.STROKE_TRIANGLE:u.setTexture2D(M),u.batchStrokeTriangle(p[++O],p[++O],p[++O],p[++O],p[++O],p[++O],v,f,c);break;case n.LINE_TO:null!==_?_.points.push(new r(p[++O],p[++O],v)):(_=new o(p[++O],p[++O],v),E.push(_));break;case n.MOVE_TO:_=new o(p[++O],p[++O],v),E.push(_);break;case n.SAVE:a.push(f.copyToArray());break;case n.RESTORE:f.copyFromArray(a.pop());break;case n.TRANSLATE:F=p[++O],I=p[++O],f.translate(F,I);break;case n.SCALE:F=p[++O],I=p[++O],f.scale(F,I);break;case n.ROTATE:f.rotate(p[++O]);break;case n.SET_TEXTURE:var U=p[++O],G=p[++O];u.currentFrame=U,u.setTexture2D(U.glTexture,0),u.tintEffect=G,M=U.glTexture;break;case n.CLEAR_TEXTURE:u.currentFrame=t.blankTexture,u.tintEffect=2,M=t.blankTexture.glTexture}}}},function(t,e,i){var n=i(1),s=i(1);n=i(961),s=i(962),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){this.pipeline.batchSprite(e,n,s)}},function(t,e){t.exports=function(t,e,i,n,s){t.batchSprite(e,e.frame,n,s)}},function(t,e,i){var n=i(1),s=i(1);n=i(964),s=i(965),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){this.pipeline.batchSprite(e,n,s)}},function(t,e){t.exports=function(t,e,i,n,s){t.batchSprite(e,e.frame,n,s)}},function(t,e,i){t.exports={GravityWell:i(394),Particle:i(395),ParticleEmitter:i(396),ParticleEmitterManager:i(192),Zones:i(971)}},function(t,e,i){var n=i(0),s=i(326),r=i(82),o=i(2),a=i(58),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return this.propertyValue},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if("number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&(this.has(t,"random")||this.hasBoth(t,"start","end")||this.hasBoth(t,"min","max"))){this.start=this.has(t,"start")?t.start:t.min,this.end=this.has(t,"end")?t.end:t.max;var i=this.hasBoth(t,"min","max")||!!t.random;if(i){var n=t.random;Array.isArray(n)&&(this.start=n[0],this.end=n[1]),this.onEmit=this.randomRangedValueEmit}if(this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var s=this.has(t,"ease")?t.ease:"Linear";this.ease=r(s),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i){var n=t.data[e];return(n.max-n.min)*this.ease(i)+n.min}});t.exports=h},function(t,e,i){var n=i(1),s=i(1);n=i(969),s=i(970),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(10);t.exports=function(t,e,i,s,r){var o=e.emitters.list,a=o.length;if(0!==a){var h=this.pipeline,l=h._tempMatrix1.copyFrom(s.matrix),u=h._tempMatrix2,c=h._tempMatrix3,d=h._tempMatrix4.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);l.multiply(d),t.setPipeline(h);var f=s.roundPixels,p=e.defaultFrame.glTexture,g=n.getTintAppendFloatAlphaAndSwap;h.setTexture2D(p,0);for(var v=0;v?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:"ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",TEXT_SET7:"AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:"ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789"}},function(t,e,i){var n=i(6);t.exports=function(t,e){var i=e.width,s=e.height,r=Math.floor(i/2),o=Math.floor(s/2),a=n(e,"chars","");if(""!==a){var h=n(e,"image",""),l=n(e,"offset.x",0),u=n(e,"offset.y",0),c=n(e,"spacing.x",0),d=n(e,"spacing.y",0),f=n(e,"lineSpacing",0),p=n(e,"charsPerRow",null);null===p&&(p=t.sys.textures.getFrame(h).width/i)>a.length&&(p=a.length);for(var g=l,v=u,m={retroFont:!0,font:h,size:i,lineHeight:s+f,chars:{}},y=0,x=0;x0&&r.maxLines1&&(d+=f*(h-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:f,lineHeight:c}}},function(t,e,i){var n=i(1),s=i(1);n=i(980),s=i(981),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(10);t.exports=function(t,e,i,s,r){if(0!==e.width&&0!==e.height){var o=e.frame,a=o.width,h=o.height,l=n.getTintAppendFloatAlpha;this.pipeline.batchTexture(e,o.glTexture,a,h,e.x,e.y,a/e.style.resolution,h/e.style.resolution,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,a,h,l(e._tintTL,s.alpha*e._alphaTL),l(e._tintTR,s.alpha*e._alphaTR),l(e._tintBL,s.alpha*e._alphaBL),l(e._tintBR,s.alpha*e._alphaBR),e._isTinted&&e.tintFill,0,0,s,r)}}},function(t,e){t.exports=function(t,e,i,n,s){0!==e.width&&0!==e.height&&t.batchSprite(e,e.frame,n,s)}},function(t,e,i){var n=i(0),s=i(15),r=i(6),o=i(983),a={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},h=new n({initialize:function(t,e){this.parent=t,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this._font,this.setStyle(e,!1,!0);var i=r(e,"metrics",!1);this.metrics=i?{ascent:r(i,"ascent",0),descent:r(i,"descent",0),fontSize:r(i,"fontSize",0)}:o(this)},setStyle:function(t,e,i){for(var n in void 0===e&&(e=!0),void 0===i&&(i=!1),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px"),a){var o=i?a[n][1]:this[n];this[n]="wordWrapCallback"===n||"wordWrapCallbackScope"===n?r(t,a[n][0],o):s(t,a[n][0],o)}var h=r(t,"font",null);null!==h&&this.setFont(h,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var l=r(t,"fill",null);return null!==l&&(this.color=l),e?this.update(!0):this.parent},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow:function(t,e){e?(t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur):(t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor=0,t.shadowBlur=0)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=o(this)),this.parent.updateText()},setFont:function(t,e){void 0===e&&(e=!0);var i=t,n="",s="";if("string"!=typeof t)i=r(t,"fontFamily","Courier"),n=r(t,"fontSize","16px"),s=r(t,"fontStyle","");else{var o=t.split(" "),a=0;s=o.length>2?o[a++]:"",n=o[a++]||"16px",i=o[a++]||"Courier"}return i===this.fontFamily&&n===this.fontSize&&s===this.fontStyle||(this.fontFamily=i,this.fontSize=n,this.fontStyle=s,e&&this.update(!0)),this.parent},setFontFamily:function(t){return this.fontFamily!==t&&(this.fontFamily=t,this.update(!0)),this.parent},setFontStyle:function(t){return this.fontStyle!==t&&(this.fontStyle=t,this.update(!0)),this.parent},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize!==t&&(this.fontSize=t,this.update(!0)),this.parent},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.parent.width=t),e&&(this.parent.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setResolution:function(t){return this.resolution=t,this.update(!1)},setStroke:function(t,e){return void 0===e&&(e=this.strokeThickness),void 0===t&&0!==this.strokeThickness?(this.strokeThickness=0,this.update(!0)):this.stroke===t&&this.strokeThickness===e||(this.stroke=t,this.strokeThickness=e,this.update(!0)),this.parent},setShadow:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===n&&(n=0),void 0===s&&(s=!1),void 0===r&&(r=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=n,this.shadowStroke=s,this.shadowFill=r,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},function(t,e,i){var n=i(26);t.exports=function(t){var e=n.create(this),i=e.getContext("2d");t.syncFont(e,i);var s=Math.ceil(i.measureText(t.testString).width*t.baselineX),r=s,o=2*r;r=r*t.baselineY|0,e.width=s,e.height=o,i.fillStyle="#f00",i.fillRect(0,0,s,o),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,r);var a={ascent:0,descent:0,fontSize:0};if(!i.getImageData(0,0,s,o))return a.ascent=r,a.descent=r+6,a.fontSize=a.ascent+a.descent,n.remove(e),a;var h,l,u=i.getImageData(0,0,s,o).data,c=u.length,d=4*s,f=0,p=!1;for(h=0;hr;h--){for(l=0;l0)for(u=o.fillTint,c=n.getTintAppendFloatAlphaAndSwap(e.fillColor,e.fillAlpha*d),u.TL=c,u.TR=c,u.BL=c,u.BR=c,C=0;C0)for(u=o.fillTint,c=n.getTintAppendFloatAlphaAndSwap(e.altFillColor,e.altFillAlpha*d),u.TL=c,u.TR=c,u.BL=c,u.BR=c,C=0;C0){var R=o.strokeTint,L=n.getTintAppendFloatAlphaAndSwap(e.outlineFillColor,e.outlineFillAlpha*d);for(R.TL=L,R.TR=L,R.BL=L,R.BR=L,_=1;_0)for(n(h,e),_=0;_0)for(n(h,e,e.altFillColor,e.altFillAlpha*c),_=0;_0){for(s(h,e,e.outlineFillColor,e.outlineFillAlpha*c),A=1;Ao.vertexCapacity&&o.flush(),o.setTexture2D(u,0);for(var m=o.vertexViewF32,y=o.vertexViewU32,x=o.vertexCount*o.vertexComponentCount-1,T=0,w=e.tintFill,b=0;b0?Math.PI*t.radius*t.radius:0}},function(t,e,i){var n=i(65);t.exports=function(t){return new n(t.x,t.y,t.radius)}},function(t,e,i){var n=i(55);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(55);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},function(t,e,i){var n=i(11);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(95);n.Area=i(1089),n.Circumference=i(392),n.CircumferencePoint=i(191),n.Clone=i(1090),n.Contains=i(96),n.ContainsPoint=i(1091),n.ContainsRect=i(1092),n.CopyFrom=i(1093),n.Equals=i(1094),n.GetBounds=i(1095),n.GetPoint=i(390),n.GetPoints=i(391),n.Offset=i(1096),n.OffsetPoint=i(1097),n.Random=i(154),t.exports=n},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},function(t,e,i){var n=i(95);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(96);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(96);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e,i){var n=i(11);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(4),s=i(202);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r,o,a,h,l=t.x,u=t.y,c=t.radius,d=e.x,f=e.y,p=e.radius;if(u===f)0==(a=(o=-2*f)*o-4*(r=1)*(d*d+(h=(p*p-c*c-d*d+l*l)/(2*(l-d)))*h-2*d*h+f*f-p*p))?i.push(new n(h,-o/(2*r))):a>0&&(i.push(new n(h,(-o+Math.sqrt(a))/(2*r))),i.push(new n(h,(-o-Math.sqrt(a))/(2*r))));else{var g=(l-d)/(u-f),v=(p*p-c*c-d*d+l*l-f*f+u*u)/(2*(u-f));0==(a=(o=2*u*g-2*v*g-2*l)*o-4*(r=g*g+1)*(l*l+u*u+v*v-c*c-2*u*v))?(h=-o/(2*r),i.push(new n(h,v-h*g))):a>0&&(h=(-o+Math.sqrt(a))/(2*r),i.push(new n(h,v-h*g)),h=(-o-Math.sqrt(a))/(2*r),i.push(new n(h,v-h*g)))}}return i}},function(t,e,i){var n=i(204),s=i(203);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC(),h=e.getLineD();n(r,t,i),n(o,t,i),n(a,t,i),n(h,t,i)}return i}},function(t,e,i){var n=i(11),s=i(131);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},function(t,e,i){var n=i(206),s=i(131);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=t.getLineA(),o=t.getLineB(),a=t.getLineC(),h=t.getLineD();n(r,e,i),n(o,e,i),n(a,e,i),n(h,e,i)}return i}},function(t,e,i){var n=i(425),s=i(206);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC();s(r,t,i),s(o,t,i),s(a,t,i)}return i}},function(t,e,i){var n=i(204),s=i(427);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=t.getLineA(),o=t.getLineB(),a=t.getLineC();n(r,e,i),n(o,e,i),n(a,e,i)}return i}},function(t,e,i){var n=i(430),s=i(428);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC();s(t,r,i),s(t,o,i),s(t,a,i)}return i}},function(t,e,i){var n=i(432);t.exports=function(t,e){if(!n(t,e))return!1;var i=Math.min(e.x1,e.x2),s=Math.max(e.x1,e.x2),r=Math.min(e.y1,e.y2),o=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=s&&t.y>=r&&t.y<=o}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===r&&(r=0),!(e>t.right+r||it.bottom+r||si&&(i=h.x),h.xr&&(r=h.y),h.yn(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.centerX,e.y=t.centerY,e}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var n=i(165);t.exports=function(t,e,i){var s=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),n(t,s,r)}},function(t,e,i){var n=i(11),s=i(131);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)?(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y):i.setEmpty(),i}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var n=i(4),s=i(35);t.exports=function(t,e,i){void 0===i&&(i=new n),e=s(e);var r=Math.sin(e),o=Math.cos(e),a=o>0?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r)-1&&(s.splice(a,1),this.clear(o,!0))}t.length=0,this._pendingRemoval.length=0,this._list=s.concat(e.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.isActive()},updatePoll:function(t,e){if(!this.isActive())return!1;if(this.pluginEvents.emit(d.UPDATE,t,e),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var i,n=this.manager,s=n.pointers,r=n.pointersTotal;for(i=0;i0){if(this._pollTimer-=e,!(this._pollTimer<0))return!1;this._pollTimer=this.pollRate}var a=!1;for(i=0;i0&&(a=!0)}return a},update:function(t,e){if(!this.isActive())return!1;for(var i=e.length,n=!1,s=0;s0&&(n=!0)}return this._updatedThisFrame=!0,n},clear:function(t,e){void 0===e&&(e=!1);var i=t.input;if(i){e||this.queueForRemoval(t),i.gameObject=void 0,i.target=void 0,i.hitArea=void 0,i.hitAreaCallback=void 0,i.callbackContext=void 0,this.manager.resetCursor(i),t.input=null;var n=this._draggable.indexOf(t);return n>-1&&this._draggable.splice(n,1),(n=this._drag[0].indexOf(t))>-1&&this._drag[0].splice(n,1),(n=this._over[0].indexOf(t))>-1&&this._over[0].splice(n,1),t}},disable:function(t){t.input.enabled=!1},enable:function(t,e,i,n){return void 0===n&&(n=!1),t.input?t.input.enabled=!0:this.setHitArea(t,e,i),t.input&&n&&!t.input.dropZone&&(t.input.dropZone=n),this},hitTestPointer:function(t){for(var e=this.cameras.getCamerasBelowPointer(t),i=0;i0)return t.camera=n,s}return t.camera=e[0],[]},processDownEvents:function(t){var e=0,i=this._temp,n=this._eventData,s=this._eventContainer;n.cancelled=!1;for(var r=!1,o=0;o0&&l(t.x,t.y,t.downX,t.downY)>=s?i=!0:n>0&&e>=t.downTime+n&&(i=!0),i)return this.setDragState(t,3),this.processDragStartList(t)},processDragStartList:function(t){if(3!==this.getDragState(t))return 0;for(var e=this._drag[t.id],i=0;i1&&(this.sortGameObjects(i),this.topOnly&&i.splice(1)),this._drag[t.id]=i,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?(this.setDragState(t,3),this.processDragStartList(t)):(this.setDragState(t,2),0))},processDragMoveEvent:function(t){if(2===this.getDragState(t)&&this.processDragThresholdEvent(t,this.manager.game.loop.now),4!==this.getDragState(t))return 0;for(var e=this._tempZones,i=this._drag[t.id],n=0;n0?(o.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,o,h),a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h)):(o.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,o,h),e[0]?(a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h)):a.target=null)}else!h&&e[0]&&(a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h));if(o.parentContainer){var u=t.x-a.dragStartXGlobal,c=t.y-a.dragStartYGlobal,f=o.getParentRotation(),p=u*Math.cos(f)+c*Math.sin(f),g=c*Math.cos(f)-u*Math.sin(f);p*=1/o.parentContainer.scaleX,g*=1/o.parentContainer.scaleY,s=p+a.dragStartX,r=g+a.dragStartY}else s=t.x-a.dragX,r=t.y-a.dragY;o.emit(d.GAMEOBJECT_DRAG,t,s,r),this.emit(d.DRAG,t,o,s,r)}return i.length},processDragUpEvent:function(t){for(var e=this._drag[t.id],i=0;i0){var r=this.manager,o=this._eventData,a=this._eventContainer;o.cancelled=!1;for(var h=!1,l=0;l0){var s=this.manager,r=this._eventData,o=this._eventContainer;r.cancelled=!1;var a=!1;this.sortGameObjects(e);for(var h=0;h0){for(this.sortGameObjects(s),e=0;e0){for(this.sortGameObjects(r),e=0;e-1&&this._draggable.splice(s,1)}return this},makePixelPerfect:function(t){void 0===t&&(t=1);var e=this.systems.textures;return h(e,t)},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);var n=!1,s=!1,r=!1,o=!1,h=!1,l=!0;if(m(e)){var u=e;e=p(u,"hitArea",null),i=p(u,"hitAreaCallback",null),n=p(u,"draggable",!1),s=p(u,"dropZone",!1),r=p(u,"cursor",!1),o=p(u,"useHandCursor",!1),h=p(u,"pixelPerfect",!1);var c=p(u,"alphaTolerance",1);h&&(e={},i=this.makePixelPerfect(c)),e&&i||(this.setHitAreaFromTexture(t),l=!1)}else"function"!=typeof e||i||(i=e,e={});for(var d=0;d=e}}},function(t,e,i){t.exports={Events:i(133),KeyboardManager:i(360),KeyboardPlugin:i(1210),Key:i(445),KeyCodes:i(122),KeyCombo:i(446),JustDown:i(1215),JustUp:i(1216),DownDuration:i(1217),UpDuration:i(1218)}},function(t,e){t.exports="keydown"},function(t,e){t.exports="keyup"},function(t,e){t.exports="keycombomatch"},function(t,e){t.exports="down"},function(t,e){t.exports="keydown-"},function(t,e){t.exports="keyup-"},function(t,e){t.exports="up"},function(t,e,i){var n=i(0),s=i(9),r=i(133),o=i(18),a=i(6),h=i(54),l=i(132),u=i(445),c=i(122),d=i(446),f=i(1214),p=i(93),g=new n({Extends:s,initialize:function(t){s.call(this),this.game=t.systems.game,this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.manager=t.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],t.pluginEvents.once(h.BOOT,this.boot,this),t.pluginEvents.on(h.START,this.start,this)},boot:function(){var t=this.settings.input;this.enabled=a(t,"keyboard",!0);var e=a(t,"keyboard.capture",null);e&&this.addCaptures(e),this.sceneInputPlugin.pluginEvents.once(h.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.useQueue?this.sceneInputPlugin.pluginEvents.on(h.UPDATE,this.update,this):this.sceneInputPlugin.manager.events.on(h.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(h.SHUTDOWN,this.shutdown,this),this.game.events.on(o.BLUR,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},addCapture:function(t){return this.manager.addCapture(t),this},removeCapture:function(t){return this.manager.removeCapture(t),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:c.UP,down:c.DOWN,left:c.LEFT,right:c.RIGHT,space:c.SPACE,shift:c.SHIFT})},addKeys:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!1);var n={};if("string"==typeof t){t=t.split(",");for(var s=0;s-1?n[s]=t:n[t.keyCode]=t,e&&this.addCapture(t.keyCode),t.setEmitOnRepeat(i),t}return"string"==typeof t&&(t=c[t.toUpperCase()]),n[t]||(n[t]=new u(this,t),e&&this.addCapture(t),n[t].setEmitOnRepeat(i)),n[t]},removeKey:function(t,e){void 0===e&&(e=!1);var i,n=this.keys;if(t instanceof u){var s=n.indexOf(t);s>-1&&(i=this.keys[s],this.keys[s]=void 0)}else"string"==typeof t&&(t=c[t.toUpperCase()]);return n[t]&&(i=n[t],n[t]=void 0),i&&(i.plugin=null,e&&i.destroy()),this},createCombo:function(t,e){return new d(this,t,e)},checkDown:function(t,e){if(this.enabled&&t.isDown){var i=p(this.time-t.timeDown,e);if(i>t._tick)return t._tick=i,!0}return!1},update:function(){var t=this.manager.queue,e=t.length;if(this.isActive()&&0!==e)for(var i=this.keys,n=0;n0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(s=!0,i=n(t,e))}else s=!0,i=n(t,e);return!s&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},function(t,e){t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},function(t,e){t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},function(t,e,i){var n=i(122),s={};for(var r in n)s[n[r]]=r;t.exports=s},function(t,e){t.exports=function(t){return!!t._justDown&&(t._justDown=!1,!0)}},function(t,e){t.exports=function(t){return!!t._justUp&&(t._justUp=!1,!0)}},function(t,e){t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeDown;return t.isDown&&i'),i.push(''),i.push(''),i.push(this.xhrLoader.responseText),i.push(""),i.push(""),i.push("");var n=[i.join("\n")],o=this;try{var a=new window.Blob(n,{type:"image/svg+xml;charset=utf-8"})}catch(t){return o.state=s.FILE_ERRORED,void o.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(o.data),o.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(o.data),o.onProcessError()},r.createObjectURL(this.data,a,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});o.register("htmlTexture",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r0},isLoading:function(){return this.state===s.LOADER_LOADING||this.state===s.LOADER_PROCESSING},isReady:function(){return this.state===s.LOADER_IDLE||this.state===s.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(a.START,this),0===this.list.size?this.loadComplete():(this.state=s.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(c.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(a.PROGRESS,this.progress)},update:function(){this.state===s.LOADER_LOADING&&this.list.size>0&&this.inflight.sizei&&(n=l,i=c)}}return n},moveTo:function(t,e,i,n,s){void 0===n&&(n=60),void 0===s&&(s=0);var o=Math.atan2(i-t.y,e-t.x);return s>0&&(n=r(t.x,t.y,e,i)/(s/1e3)),t.body.velocity.setToPolar(o,n),o},moveToObject:function(t,e,i,n){return this.moveTo(t,e.x,e.y,i,n)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new p),i.setToPolar(s(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new p),i.setToPolar(t,e)},overlapRect:function(t,e,i,n,s,r){return c(this.world,t,e,i,n,s,r)},overlapCirc:function(t,e,i,n,s){return u(this.world,t,e,i,n,s)},shutdown:function(){if(this.world){var t=this.systems.events;t.off(f.UPDATE,this.world.update,this.world),t.off(f.POST_UPDATE,this.world.postUpdate,this.world),t.off(f.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null}},destroy:function(){this.shutdown(),this.scene.sys.events.off(f.START,this.start,this),this.scene=null,this.systems=null}});d.register("ArcadePhysics",v,"arcadePhysics"),t.exports=v},function(t,e){t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},function(t,e){t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},function(t,e){t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,e,i){return this.body.setCollideWorldBounds(t,e,i),this}}},function(t,e){t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},function(t,e){t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this},setDamping:function(t){return this.body.useDamping=t,this}}},function(t,e){var i={enableBody:function(t,e,i,n,s){return t&&this.body.reset(e,i),n&&(this.body.gameObject.active=!0),s&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};t.exports=i},function(t,e){t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},function(t,e){t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},function(t,e){var i={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}};t.exports=i},function(t,e){t.exports={setMass:function(t){return this.body.mass=t,this}}},function(t,e){t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},function(t,e){t.exports={setVelocity:function(t,e){return this.body.setVelocity(t,e),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,e){return this.body.maxVelocity.set(t,e),this}}},function(t,e,i){var n=i(456),s=i(65),r=i(202),o=i(203);t.exports=function(t,e,i,a,h,l){var u=n(t,e-a,i-a,2*a,2*a,h,l);if(0===u.length)return u;for(var c=new s(e,i,a),d=new s,f=[],p=0;pe.deltaAbsY()?y=-1:e.deltaAbsX()0&&u&&t.checkCollision.right&&h&&t.right>i&&(a=t.right-i)>r&&(a=0),0!==a&&(t.customSeparateX?t.overlapX=a:n(t,a)),a}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):e>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=e,0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},function(t,e,i){var n=i(1275);t.exports=function(t,e,i,s,r,o){var a=0,h=e.faceTop,l=e.faceBottom,u=e.collideUp,c=e.collideDown;return o||(h=!0,l=!0,u=!0,c=!0),t.deltaY()<0&&c&&t.checkCollision.up?l&&t.y0&&u&&t.checkCollision.down&&h&&t.bottom>i&&(a=t.bottom-i)>r&&(a=0),0!==a&&(t.customSeparateY?t.overlapY=a:n(t,a)),a}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):e>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=e,0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},function(t,e,i){var n=i(460);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.x,a=e.velocity.x;if(t.immovable||e.immovable)t.immovable?(e.x+=r,e.velocity.x=o-a*e.bounce.x,t.moves&&(e.y+=(t.y-t.prev.y)*t.friction.y)):(t.x-=r,t.velocity.x=a-o*t.bounce.x,e.moves&&(t.y+=(e.y-e.prev.y)*e.friction.y));else{r*=.5,t.x-=r,e.x+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),l=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),u=.5*(h+l);h-=u,l-=u,t.velocity.x=u+h*t.bounce.x,e.velocity.x=u+l*e.bounce.x}return!0}},function(t,e,i){var n=i(461);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateY||e.customSeparateY)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.y,a=e.velocity.y;if(t.immovable||e.immovable)t.immovable?(e.y+=r,e.velocity.y=o-a*e.bounce.y,t.moves&&(e.x+=(t.x-t.prev.x)*t.friction.x)):(t.y-=r,t.velocity.y=a-o*t.bounce.y,e.moves&&(t.x+=(e.x-e.prev.x)*e.friction.x));else{r*=.5,t.y-=r,e.y+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),l=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),u=.5*(h+l);h-=u,l-=u,t.velocity.y=u+h*t.bounce.y,e.velocity.y=u+l*e.bounce.y}return!0}},function(t,e,i){t.exports={COLLIDE:i(1392),PAUSE:i(1393),RESUME:i(1394)}},function(t,e,i){t.exports={Acceleration:i(1396),BodyScale:i(1397),BodyType:i(1398),Bounce:i(1399),CheckAgainst:i(1400),Collides:i(1401),Debug:i(1402),Friction:i(1403),Gravity:i(1404),Offset:i(1405),SetGameObject:i(1406),Velocity:i(1407)}},function(t,e,i){var n={};t.exports=n;var s=i(145),r=i(216),o=i(37),a=i(62),h=i(109);n.stack=function(t,e,i,n,r,o,h){for(var l,u=s.create({label:"Stack"}),c=t,d=e,f=0,p=0;pg&&(g=y),a.translate(m,{x:.5*x,y:.5*y}),c=m.bounds.max.x+r,s.addBody(u,m),l=m,f+=1}else c+=r}d+=g+o,c=t}return u},n.chain=function(t,e,i,n,a,h){for(var l=t.bodies,u=1;u0)for(l=0;l0&&(d=f[l-1+(h-1)*e],s.addConstraint(t,r.create(o.extend({bodyA:d,bodyB:c},a)))),n&&ld||o<(l=d-l)||o>i-1-l))return 1===c&&a.translate(u,{x:(o+(i%2==1?1:-1))*f,y:0}),h(t+(u?o*f:0)+o*r,n,o,l,u,c)})},n.newtonsCradle=function(t,e,i,n,o){for(var a=s.create({label:"Newtons Cradle"}),l=0;l1;if(!d||t!=d.x||e!=d.y){d&&n?(f=d.x,p=d.y):(f=0,p=0);var s={x:f+t,y:p+e};!n&&d||(d=s),g.push(s),m=f+t,y=p+e}},T=function(t){var e=t.pathSegTypeAsLetter.toUpperCase();if("Z"!==e){switch(e){case"M":case"L":case"T":case"C":case"S":case"Q":m=t.x,y=t.y;break;case"H":m=t.x;break;case"V":y=t.y}x(m,y,t.pathSegType)}};for(n._svgPathToAbsolute(t),o=t.getTotalLength(),l=[],i=0;i0?this.setFromTileCollision(i):this.setFromTileRectangle(i)}},setFromTileRectangle:function(t){void 0===t&&(t={}),h(t,"isStatic")||(t.isStatic=!0),h(t,"addToWorld")||(t.addToWorld=!0);var e=this.tile.getBounds(),i=e.x+e.width/2,s=e.y+e.height/2,r=n.rectangle(i,s,e.width,e.height,t);return this.setBody(r,t.addToWorld),this},setFromTileCollision:function(t){void 0===t&&(t={}),h(t,"isStatic")||(t.isStatic=!0),h(t,"addToWorld")||(t.addToWorld=!0);for(var e=this.tile.tilemapLayer.scaleX,i=this.tile.tilemapLayer.scaleY,r=this.tile.getLeft(),o=this.tile.getTop(),u=this.tile.getCollisionGroup(),c=a(u,"objects",[]),d=[],f=0;f1&&(t.parts=d,this.setBody(s.create(t),t.addToWorld)),this},setBody:function(t,e){return void 0===e&&(e=!0),this.body&&this.removeBody(),this.body=t,this.body.gameObject=this,e&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0}});t.exports=u},function(t,e,i){var n=i(1383);n.Body=i(62),n.Composite=i(145),n.World=i(1288),n.Detector=i(509),n.Grid=i(1289),n.Pairs=i(1290),n.Pair=i(467),n.Query=i(1384),n.Resolver=i(1291),n.SAT=i(510),n.Constraint=i(216),n.Common=i(37),n.Engine=i(1385),n.Events=i(237),n.Sleeping=i(236),n.Plugin=i(1287),n.Bodies=i(109),n.Composites=i(1280),n.Axes=i(507),n.Bounds=i(102),n.Svg=i(1281),n.Vector=i(101),n.Vertices=i(86),n.World.add=n.Composite.add,n.World.remove=n.Composite.remove,n.World.addComposite=n.Composite.addComposite,n.World.addBody=n.Composite.addBody,n.World.addConstraint=n.Composite.addConstraint,n.World.clear=n.Composite.clear,t.exports=n},function(t,e,i){var n={};t.exports=n;var s=i(37);n._registry={},n.register=function(t){if(n.isPlugin(t)||s.warn("Plugin.register:",n.toString(t),"does not implement all required fields."),t.name in n._registry){var e=n._registry[t.name],i=n.versionParse(t.version).number,r=n.versionParse(e.version).number;i>r?(s.warn("Plugin.register:",n.toString(e),"was upgraded to",n.toString(t)),n._registry[t.name]=t):i-1},n.isFor=function(t,e){var i=t.for&&n.dependencyParse(t.for);return!t.for||e.name===i.name&&n.versionSatisfies(e.version,i.range)},n.use=function(t,e){if(t.uses=(t.uses||[]).concat(e||[]),0!==t.uses.length){for(var i=n.dependencies(t),r=s.topologicalSort(i),o=[],a=0;a0&&!h.silent&&s.info(o.join(" "))}else s.warn("Plugin.use:",n.toString(t),"does not specify any dependencies to install.")},n.dependencies=function(t,e){var i=n.dependencyParse(t),r=i.name;if(!(r in(e=e||{}))){t=n.resolve(t)||t,e[r]=s.map(t.uses||[],function(e){n.isPlugin(e)&&n.register(e);var r=n.dependencyParse(e),o=n.resolve(e);return o&&!n.versionSatisfies(o.version,r.range)?(s.warn("Plugin.dependencies:",n.toString(o),"does not satisfy",n.toString(r),"used by",n.toString(i)+"."),o._warned=!0,t._warned=!0):o||(s.warn("Plugin.dependencies:",n.toString(e),"used by",n.toString(i),"could not be resolved."),t._warned=!0),r.name});for(var o=0;o=s[2];if("^"===i.operator)return s[0]>0?o[0]===s[0]&&r.number>=i.number:s[1]>0?o[1]===s[1]&&o[2]>=s[2]:o[2]===s[2]}return t===e||"*"===t}},function(t,e,i){var n={};t.exports=n;var s=i(145),r=(i(216),i(37));n.create=function(t){var e=s.create(),i={label:"World",gravity:{x:0,y:1,scale:.001},bounds:{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}};return r.extend(e,i,t)}},function(t,e,i){var n={};t.exports=n;var s=i(467),r=i(509),o=i(37);n.create=function(t){var e={controller:n,detector:r.collisions,buckets:{},pairs:{},pairsList:[],bucketWidth:48,bucketHeight:48};return o.extend(e,t)},n.update=function(t,e,i,s){var r,o,a,h,l,u=i.world,c=t.buckets,d=!1,f=i.metrics;for(f.broadphaseTests=0,r=0;ru.bounds.max.x||p.bounds.max.yu.bounds.max.y)){var g=n._getRegion(t,p);if(!p.region||g.id!==p.region.id||s){f.broadphaseTests+=1,p.region&&!s||(p.region=g);var v=n._regionUnion(g,p.region);for(o=v.startCol;o<=v.endCol;o++)for(a=v.startRow;a<=v.endRow;a++){h=c[l=n._getBucketId(o,a)];var m=o>=g.startCol&&o<=g.endCol&&a>=g.startRow&&a<=g.endRow,y=o>=p.region.startCol&&o<=p.region.endCol&&a>=p.region.startRow&&a<=p.region.endRow;!m&&y&&y&&h&&n._bucketRemoveBody(t,h,p),(p.region===g||m&&!y||s)&&(h||(h=n._createBucket(c,l)),n._bucketAddBody(t,h,p))}p.region=g,d=!0}}}d&&(t.pairsList=n._createActivePairsList(t))},n.clear=function(t){t.buckets={},t.pairs={},t.pairsList=[]},n._regionUnion=function(t,e){var i=Math.min(t.startCol,e.startCol),s=Math.max(t.endCol,e.endCol),r=Math.min(t.startRow,e.startRow),o=Math.max(t.endRow,e.endRow);return n._createRegion(i,s,r,o)},n._getRegion=function(t,e){var i=e.bounds,s=Math.floor(i.min.x/t.bucketWidth),r=Math.floor(i.max.x/t.bucketWidth),o=Math.floor(i.min.y/t.bucketHeight),a=Math.floor(i.max.y/t.bucketHeight);return n._createRegion(s,r,o,a)},n._createRegion=function(t,e,i,n){return{id:t+","+e+","+i+","+n,startCol:t,endCol:e,startRow:i,endRow:n}},n._getBucketId=function(t,e){return"C"+t+"R"+e},n._createBucket=function(t,e){return t[e]=[]},n._bucketAddBody=function(t,e,i){for(var n=0;n0?n.push(i):delete t.pairs[e[s]];return n}},function(t,e,i){var n={};t.exports=n;var s=i(467),r=i(37);n._pairMaxIdleLife=1e3,n.create=function(t){return r.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},t)},n.update=function(t,e,i){var n,r,o,a,h=t.list,l=t.table,u=t.collisionStart,c=t.collisionEnd,d=t.collisionActive;for(u.length=0,c.length=0,d.length=0,a=0;an._pairMaxIdleLife&&l.push(o);for(o=0;of.friction*f.frictionStatic*D*i&&(I=R,F=o.clamp(f.friction*L*i,-I,I));var B=r.cross(S,m),N=r.cross(A,m),Y=T/(g.inverseMass+v.inverseMass+g.inverseInertia*B*B+v.inverseInertia*N*N);if(k*=Y,F*=Y,O<0&&O*O>n._restingThresh*i)b.normalImpulse=0;else{var X=b.normalImpulse;b.normalImpulse=Math.min(b.normalImpulse+k,0),k=b.normalImpulse-X}if(P*P>n._restingThreshTangent*i)b.tangentImpulse=0;else{var z=b.tangentImpulse;b.tangentImpulse=o.clamp(b.tangentImpulse+F,-I,I),F=b.tangentImpulse-z}s.x=m.x*k+y.x*F,s.y=m.y*k+y.y*F,g.isStatic||g.isSleeping||(g.positionPrev.x+=s.x*g.inverseMass,g.positionPrev.y+=s.y*g.inverseMass,g.anglePrev+=r.cross(S,s)*g.inverseInertia),v.isStatic||v.isSleeping||(v.positionPrev.x-=s.x*v.inverseMass,v.positionPrev.y-=s.y*v.inverseMass,v.anglePrev-=r.cross(A,s)*v.inverseInertia)}}}}},function(t,e,i){t.exports={BasePlugin:i(468),DefaultPlugins:i(173),PluginCache:i(23),PluginManager:i(364),ScenePlugin:i(1293)}},function(t,e,i){var n=i(468),s=i(0),r=i(19),o=new s({Extends:n,initialize:function(t,e){n.call(this,e),this.scene=t,this.systems=t.sys,t.sys.events.once(r.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=o},function(t,e,i){var n=i(17),s=i(175),r={Center:i(353),Events:i(92),Orientation:i(354),ScaleManager:i(365),ScaleModes:i(355),Zoom:i(356)};r=n(!1,r=n(!1,r=n(!1,r=n(!1,r,s.CENTER),s.ORIENTATION),s.SCALE_MODE),s.ZOOM),t.exports=r},function(t,e,i){var n=i(123),s=i(17),r={Events:i(19),SceneManager:i(367),ScenePlugin:i(1296),Settings:i(369),Systems:i(178)};r=s(!1,r,n),t.exports=r},function(t,e,i){var n=i(22),s=i(0),r=i(19),o=i(2),a=i(23),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene,this.transitionProgress=0,this._elapsed=0,this._target=null,this._duration=0,this._onUpdate,this._onUpdateScope,this._willSleep=!1,this._willRemove=!1,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.pluginStart,this)},boot:function(){this.systems.events.once(r.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},start:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t,e),this},restart:function(t){var e=this.key;return this.manager.queueOp("stop",e),this.manager.queueOp("start",e,t),this},transition:function(t){void 0===t&&(t={});var e=o(t,"target",!1),i=this.manager.getScene(e);if(!e||!this.checkValidTransition(i))return!1;var n=o(t,"duration",1e3);this._elapsed=0,this._target=i,this._duration=n,this._willSleep=o(t,"sleep",!1),this._willRemove=o(t,"remove",!1);var s=o(t,"onUpdate",null);s&&(this._onUpdate=s,this._onUpdateScope=o(t,"onUpdateScope",this.scene));var a=o(t,"allowInput",!1);this.settings.transitionAllowInput=a;var h=i.sys.settings;return h.isTransition=!0,h.transitionFrom=this.scene,h.transitionDuration=n,h.transitionAllowInput=a,o(t,"moveAbove",!1)?this.manager.moveAbove(this.key,e):o(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,e),i.sys.isSleeping()?i.sys.wake():this.manager.start(e,o(t,"data")),this.systems.events.emit(r.TRANSITION_OUT,i,n),this.systems.events.on(r.UPDATE,this.step,this),!0},checkValidTransition:function(t){return!(!t||t.sys.isActive()||t.sys.isTransitioning()||t===this.scene||this.systems.isTransitioning())},step:function(t,e){this._elapsed+=e,this.transitionProgress=n(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;this.systems.events.off(r.UPDATE,this.step,this),t.events.emit(r.TRANSITION_COMPLETE,this.scene),e.isTransition=!1,e.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(t,e,i,n){return this.manager.add(t,e,i,n)},launch:function(t,e){return t&&t!==this.key&&this.manager.queueOp("start",t,e),this},run:function(t,e){return t&&t!==this.key&&this.manager.queueOp("run",t,e),this},pause:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("pause",t,e),this},resume:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("resume",t,e),this},sleep:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("sleep",t,e),this},wake:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("wake",t,e),this},switch:function(t){return t!==this.key&&this.manager.queueOp("switch",this.key,t),this},stop:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t,e),this},setActive:function(t,e,i){void 0===e&&(e=this.key);var n=this.manager.getScene(e);return n&&n.sys.setActive(t,i),this},setVisible:function(t,e){void 0===e&&(e=this.key);var i=this.manager.getScene(e);return i&&i.sys.setVisible(t),this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isPaused:function(t){return void 0===t&&(t=this.key),this.manager.isPaused(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.swapPosition(t,e),this},moveAbove:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveAbove(t,e),this},moveBelow:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveBelow(t,e),this},remove:function(t){return void 0===t&&(t=this.key),this.manager.remove(t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(r.SHUTDOWN,this.shutdown,this),t.off(r.POST_UPDATE,this.step,this),t.off(r.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});a.register("ScenePlugin",h,"scenePlugin"),t.exports=h},function(t,e,i){t.exports={List:i(126),Map:i(159),ProcessQueue:i(184),RTree:i(462),Set:i(108),Size:i(366)}},function(t,e,i){var n=i(17),s=i(1299),r={CanvasTexture:i(371),Events:i(119),FilterMode:s,Frame:i(94),Parsers:i(373),Texture:i(180),TextureManager:i(370),TextureSource:i(372)};r=n(!1,r,s),t.exports=r},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(137),Parsers:i(1330),Formats:i(31),ImageCollection:i(479),ParseToTilemap:i(224),Tile:i(74),Tilemap:i(488),TilemapCreator:i(1339),TilemapFactory:i(1340),Tileset:i(141),LayerData:i(104),MapData:i(105),ObjectLayer:i(482),DynamicTilemapLayer:i(489),StaticTilemapLayer:i(490)}},function(t,e,i){var n=i(24),s=i(51);t.exports=function(t,e,i,r,o,a,h,l){t<0&&(t=0),e<0&&(e=0),void 0===h&&(h=!0);for(var u=n(t,e,i,r,null,l),c=o-t,d=a-e,f=0;f=0&&p=0&&g=v;o--)(h=c[a][o])&&-1!==h.index&&h.visible&&0!==h.alpha&&i.push(h);else if(2===r)for(a=x;a>=y;a--)for(o=v;c[a]&&o=y;a--)for(o=m;c[a]&&o>=v;o--)(h=c[a][o])&&-1!==h.index&&h.visible&&0!==h.alpha&&i.push(h);return u.tilesDrawn=i.length,u.tilesTotal=d*f,i}},function(t,e,i){var n=i(24),s=i(51),r=i(73);t.exports=function(t,e,i,o,a,h,l){for(var u=-1!==l.collideIndexes.indexOf(t),c=n(e,i,o,a,null,l),d=0;d=0;r--)for(s=n.width-1;s>=0;s--)if((o=n.data[r][s])&&o.index===t){if(a===e)return o;a+=1}}else for(r=0;re)){for(var l=t;l<=e;l++)r(l,i,a);if(h)for(var u=0;u=t&&d.index<=e&&n(d,i)}o&&s(0,0,a.width,a.height,a)}}},function(t,e,i){var n=i(73),s=i(51),r=i(219);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a0&&n(a,t)}}e&&s(0,0,i.width,i.height,i)}},function(t,e){t.exports=function(t,e,i,n){if("number"==typeof t)n.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var s=0,r=t.length;s1||e.scaleY>1)&&(u.imageSmoothingEnabled=!1);for(var f=0;f0&&(t.currentPipeline&&t.currentPipeline.vertexCount>0&&t.flush(),r.vertexBuffer=e.vertexBuffer[a],t.setPipeline(r),t.setTexture2D(s[a].glTexture,0),t.gl.drawArrays(r.topology,0,e.vertexCount[a]));r.vertexBuffer=o,r.viewIdentity(),r.modelIdentity()}},function(t,e){t.exports=function(t,e,i,n,s){e.cull(n);var r=e.culledTiles,o=r.length;if(0!==o){var a=t._tempMatrix1,h=t._tempMatrix2,l=t._tempMatrix3;h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),a.copyFrom(n.matrix);var u=t.currentContext,c=e.gidMap;u.save(),s?(a.multiplyWithOffset(s,-n.scrollX*e.scrollFactorX,-n.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y,a.multiply(h,l),l.copyToContext(u)):(h.e-=n.scrollX*e.scrollFactorX,h.f-=n.scrollY*e.scrollFactorY,h.copyToContext(u));var d=n.alpha*e.alpha;(!t.antialias||e.scaleX>1||e.scaleY>1)&&(u.imageSmoothingEnabled=!1);for(var f=0;f-1&&this._active.splice(s,1),n.destroy()}for(i=0;i=n.delay)){var s=n.elapsed-n.delay;n.elapsed=n.delay,!n.hasDispatched&&n.callback&&(n.hasDispatched=!0,n.callback.apply(n.callbackScope,n.args)),n.repeatCount>0?(n.repeatCount--,n.elapsed=s,n.hasDispatched=!1):this._pendingRemoval.push(n)}}}},shutdown:function(){var t;for(t=0;t-1&&(e.state=u.REMOVED,s.splice(r,1)):(e.state=u.REMOVED,n.splice(r,1))}for(i.length=0,i=this._add,t=0;t>2],r+=i[(3&n[o])<<4|n[o+1]>>4],r+=i[(15&n[o+1])<<2|n[o+2]>>6],r+=i[63&n[o+2]];return s%3==2?r=r.substring(0,r.length-1)+"=":s%3==1&&(r=r.substring(0,r.length-2)+"=="),r}},function(t,e,i){t.exports={Clone:i(67),Extend:i(17),GetAdvancedValue:i(15),GetFastValue:i(2),GetMinMaxValue:i(1364),GetValue:i(6),HasAll:i(1365),HasAny:i(399),HasValue:i(99),IsPlainObject:i(7),Merge:i(107),MergeRight:i(1366),Pick:i(480),SetValue:i(419)}},function(t,e,i){var n=i(6),s=i(22);t.exports=function(t,e,i,r,o){void 0===o&&(o=i);var a=n(t,e,o);return s(a,i,r)}},function(t,e){t.exports=function(t,e){for(var i=0;i=t.pos.x+t.size.x||this.pos.x+this.size.x<=t.pos.x||this.pos.y>=t.pos.y+t.size.y||this.pos.y+this.size.y<=t.pos.y)},resetSize:function(t,e,i,n){return this.pos.x=t,this.pos.y=e,this.size.x=i,this.size.y=n,this},toJSON:function(){return{name:this.name,size:{x:this.size.x,y:this.size.y},pos:{x:this.pos.x,y:this.pos.y},vel:{x:this.vel.x,y:this.vel.y},accel:{x:this.accel.x,y:this.accel.y},friction:{x:this.friction.x,y:this.friction.y},maxVel:{x:this.maxVel.x,y:this.maxVel.y},gravityFactor:this.gravityFactor,bounciness:this.bounciness,minBounceVelocity:this.minBounceVelocity,type:this.type,checkAgainst:this.checkAgainst,collides:this.collides}},fromJSON:function(){},check:function(){},collideWith:function(t,e){this.parent&&this.parent._collideCallback&&this.parent._collideCallback.call(this.parent._callbackScope,this,t,e)},handleMovementTrace:function(){return!0},destroy:function(){this.world.remove(this),this.enabled=!1,this.world=null,this.gameObject=null,this.parent=null}});t.exports=h},function(t,e,i){var n=i(0),s=i(1395),r=new n({initialize:function(t,e){void 0===t&&(t=32),this.tilesize=t,this.data=Array.isArray(e)?e:[],this.width=Array.isArray(e)?e[0].length:0,this.height=Array.isArray(e)?e.length:0,this.lastSlope=55,this.tiledef=s},trace:function(t,e,i,n,s,r){var o={collision:{x:!1,y:!1,slope:!1},pos:{x:t+i,y:e+n},tile:{x:0,y:0}};if(!this.data)return o;var a=Math.ceil(Math.max(Math.abs(i),Math.abs(n))/this.tilesize);if(a>1)for(var h=i/a,l=n/a,u=0;u0?r:0,m=n<0?f:0,y=Math.max(Math.floor(i/f),0),x=Math.min(Math.ceil((i+o)/f),g);u=Math.floor((t.pos.x+v)/f);var T=Math.floor((e+v)/f);if((l>0||u===T||T<0||T>=p)&&(T=-1),u>=0&&u1&&d<=this.lastSlope&&this.checkDef(t,d,e,i,a,h,r,o,T,c));c++)if(1===(d=this.data[c][u])||d>this.lastSlope||d>1&&this.checkDef(t,d,e,i,a,h,r,o,u,c)){if(d>1&&d<=this.lastSlope&&t.collision.slope)break;t.collision.x=!0,t.tile.x=d,t.pos.x=u*f-v+m,e=t.pos.x,a=0;break}}if(s){var w=s>0?o:0,b=s<0?f:0,E=Math.max(Math.floor(t.pos.x/f),0),S=Math.min(Math.ceil((t.pos.x+r)/f),p);c=Math.floor((t.pos.y+w)/f);var A=Math.floor((i+w)/f);if((l>0||c===A||A<0||A>=g)&&(A=-1),c>=0&&c1&&d<=this.lastSlope&&this.checkDef(t,d,e,i,a,h,r,o,u,A));u++)if(1===(d=this.data[c][u])||d>this.lastSlope||d>1&&this.checkDef(t,d,e,i,a,h,r,o,u,c)){if(d>1&&d<=this.lastSlope&&t.collision.slope)break;t.collision.y=!0,t.tile.y=d,t.pos.y=c*f-w+b;break}}},checkDef:function(t,e,i,n,s,r,o,a,h,l){var u=this.tiledef[e];if(!u)return!1;var c=this.tilesize,d=(h+u[0])*c,f=(l+u[1])*c,p=(u[2]-u[0])*c,g=(u[3]-u[1])*c,v=u[4],m=i+s+(g<0?o:0)-d,y=n+r+(p>0?a:0)-f;if(p*y-g*m>0){if(s*-g+r*p<0)return v;var x=Math.sqrt(p*p+g*g),T=g/x,w=-p/x,b=m*T+y*w,E=T*b,S=w*b;return E*E+S*S>=s*s+r*r?v||p*(y-r)-g*(m-s)<.5:(t.pos.x=i+s-E,t.pos.y=n+r-S,t.collision.slope={x:p,y:g,nx:T,ny:w},!0)}return!1}});t.exports=r},function(t,e,i){var n=i(0),s=i(1374),r=i(1375),o=i(1376),a=new n({initialize:function(t){this.world=t,this.sys=t.scene.sys},body:function(t,e,i,n){return new s(this.world,t,e,i,n)},existing:function(t){var e=t.x-t.frame.centerX,i=t.y-t.frame.centerY,n=t.width,s=t.height;return t.body=this.world.create(e,i,n,s),t.body.parent=t,t.body.gameObject=t,t},image:function(t,e,i,n){var s=new r(this.world,t,e,i,n);return this.sys.displayList.add(s),s},sprite:function(t,e,i,n){var s=new o(this.world,t,e,i,n);return this.sys.displayList.add(s),this.sys.updateList.add(s),s},destroy:function(){this.world=null,this.sys=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(1279),r=new n({Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){this.body=t.create(e,i,n,s),this.body.parent=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=r},function(t,e,i){var n=i(0),s=i(1279),r=i(98),o=new n({Extends:r,Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t.scene,e,i,n,s),this.body=t.create(e-this.frame.centerX,i-this.frame.centerY,this.width,this.height),this.body.parent=this,this.body.gameObject=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=o},function(t,e,i){var n=i(0),s=i(1279),r=i(69),o=new n({Extends:r,Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t.scene,e,i,n,s),this.body=t.create(e-this.frame.centerX,i-this.frame.centerY,this.width,this.height),this.body.parent=this,this.body.gameObject=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=o},function(t,e,i){var n=i(1371),s=i(0),r=i(465),o=i(1372),a=i(9),h=i(1278),l=i(2),u=i(99),c=i(108),d=i(1409),f=i(31),p=i(466),g=new s({Extends:a,initialize:function(t,e){a.call(this),this.scene=t,this.bodies=new c,this.gravity=l(e,"gravity",0),this.cellSize=l(e,"cellSize",64),this.collisionMap=new o,this.timeScale=l(e,"timeScale",1),this.maxStep=l(e,"maxStep",.05),this.enabled=!0,this.drawDebug=l(e,"debug",!1),this.debugGraphic;var i=l(e,"maxVelocity",100);if(this.defaults={debugShowBody:l(e,"debugShowBody",!0),debugShowVelocity:l(e,"debugShowVelocity",!0),bodyDebugColor:l(e,"debugBodyColor",16711935),velocityDebugColor:l(e,"debugVelocityColor",65280),maxVelocityX:l(e,"maxVelocityX",i),maxVelocityY:l(e,"maxVelocityY",i),minBounceVelocity:l(e,"minBounceVelocity",40),gravityFactor:l(e,"gravityFactor",1),bounciness:l(e,"bounciness",0)},this.walls={left:null,right:null,top:null,bottom:null},this.delta=0,this._lastId=0,l(e,"setBounds",!1)){var n=e.setBounds;if("boolean"==typeof n)this.setBounds();else{var s=l(n,"x",0),r=l(n,"y",0),h=l(n,"width",t.sys.scale.width),u=l(n,"height",t.sys.scale.height),d=l(n,"thickness",64),f=l(n,"left",!0),p=l(n,"right",!0),g=l(n,"top",!0),v=l(n,"bottom",!0);this.setBounds(s,r,h,u,d,f,p,g,v)}}this.drawDebug&&this.createDebugGraphic()},setCollisionMap:function(t,e){if("string"==typeof t){var i=this.scene.cache.tilemap.get(t);if(!i||i.format!==f.WELTMEISTER)return console.warn("The specified key does not correspond to a Weltmeister tilemap: "+t),null;for(var n,s=i.data.layer,r=0;rr.ACTIVE&&d(this,t,e))},setCollidesNever:function(t){for(var e=0;e=0&&h<=1&&l>=0&&l<=1}function s(t,e,i){return(e[0]-t[0])*(i[1]-t[1])-(i[0]-t[0])*(e[1]-t[1])}function r(t,e,i){return s(t,e,i)>0}function o(t,e,i){return s(t,e,i)>=0}function a(t,e,i){return s(t,e,i)<0}function h(t,e,i){return s(t,e,i)<=0}t.exports={decomp:function(t){var e=function t(e){var i=[],n=[],s=[],r=[];var o=Number.MAX_VALUE;for(var a=0;a0?function t(e,i){if(0===i.length)return[e];if(i instanceof Array&&i.length&&i[0]instanceof Array&&2===i[0].length&&i[0][0]instanceof Array){for(var n=[e],s=0;su)return console.warn("quickDecomp: max level ("+u+") reached."),i;for(var L=0;LA&&(A+=e.length),S=Number.MAX_VALUE,A<_)return i;for(var k=_;k<=A;++k)o(f(P,L-1),f(P,L),f(P,k))&&h(f(P,L+1),f(P,L),f(P,k))&&(E=d(f(P,L),f(P,k)))3&&n>=0;--n)c(f(t,n-1),f(t,n),f(t,n+1),e)&&(t.splice(n%t.length,1),i++);return i},removeDuplicatePoints:function(t,e){for(var i=t.length-1;i>=1;--i)for(var n=t[i],s=i-1;s>=0;--s)E(n,t[s],e)&&t.splice(i,1)},makeCCW:function(t){for(var e=0,i=t,n=1;ni[e][0])&&(e=n);return!r(f(t,e-1),f(t,e),f(t,e+1))&&(function(t){for(var e=[],i=t.length,n=0;n!==i;n++)e.push(t.pop());for(var n=0;n!==i;n++)t[n]=e[n]}(t),!0)}};var l=[],u=[];function c(t,e,i,n){if(n){var r=l,o=u;r[0]=e[0]-t[0],r[1]=e[1]-t[1],o[0]=i[0]-e[0],o[1]=i[1]-e[1];var a=r[0]*o[0]+r[1]*o[1],h=Math.sqrt(r[0]*r[0]+r[1]*r[1]),c=Math.sqrt(o[0]*o[0]+o[1]*o[1]);return Math.acos(a/(h*c))0&&u.trigger(t,"collisionStart",{pairs:T.collisionStart}),o.preSolvePosition(T.list),s=0;s0&&u.trigger(t,"collisionActive",{pairs:T.collisionActive}),T.collisionEnd.length>0&&u.trigger(t,"collisionEnd",{pairs:T.collisionEnd}),h.update(t.metrics,t),n._bodiesClearForces(m),u.trigger(t,"afterUpdate",v),t},n.merge=function(t,e){if(f.extend(t,e),e.world){t.world=e.world,n.clear(t);for(var i=c.allBodies(t.world),s=0;s0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit(u.COLLISION_START,e,i,n)}),p.on(e,"collisionActive",function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit(u.COLLISION_ACTIVE,e,i,n)}),p.on(e,"collisionEnd",function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit(u.COLLISION_END,e,i,n)})},setBounds:function(t,e,i,n,s,r,o,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),void 0===s&&(s=64),void 0===r&&(r=!0),void 0===o&&(o=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),this.updateWall(r,"left",t-s,e-s,s,n+2*s),this.updateWall(o,"right",t+i,e-s,s,n+2*s),this.updateWall(a,"top",t,e-s,i,s),this.updateWall(h,"bottom",t,e+n,i,s),this},updateWall:function(t,e,i,n,s,r){var o=this.walls[e];t?(o&&v.remove(this.localWorld,o),i+=s/2,n+=r/2,this.walls[e]=this.create(i,n,s,r,{isStatic:!0,friction:0,frictionStatic:0})):(o&&v.remove(this.localWorld,o),this.walls[e]=null)},createDebugGraphic:function(){var t=this.scene.sys.add.graphics({x:0,y:0});return t.setDepth(Number.MAX_VALUE),this.debugGraphic=t,this.drawDebug=!0,t},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=1),this.localWorld.gravity.x=t,this.localWorld.gravity.y=e,void 0!==i&&(this.localWorld.gravity.scale=i),this},create:function(t,e,i,s,r){var o=n.rectangle(t,e,i,s,r);return v.add(this.localWorld,o),o},add:function(t){return v.add(this.localWorld,t),this},remove:function(t,e){Array.isArray(t)||(t=[t]);for(var i=0;in.deltaMax?n.deltaMax:e)/n.delta,n.delta=e),0!==n.timeScalePrev&&(r*=s.timeScale/n.timeScalePrev),0===s.timeScale&&(r=0),n.timeScalePrev=s.timeScale,n.correction=r,n.frameCounter+=1,t-n.counterTimestamp>=1e3&&(n.fps=n.frameCounter*((t-n.counterTimestamp)/1e3),n.counterTimestamp=t,n.frameCounter=0),h.update(i,e,r)}},step:function(t,e){h.update(this.engine,t,e)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(t){var e=t.hasOwnProperty("body")?t.body:t;return null!==a.get(this.localWorld,e.id,e.type)},getAllBodies:function(){return a.allBodies(this.localWorld)},getAllConstraints:function(){return a.allConstraints(this.localWorld)},getAllComposites:function(){return a.allComposites(this.localWorld)},postUpdate:function(){if(this.drawDebug){var t=this.debugConfig,e=this.engine,i=this.debugGraphic,n=a.allBodies(this.localWorld);this.debugGraphic.clear(),t.showBroadphase&&e.broadphase.controller&&this.renderGrid(e.broadphase,i,t.broadphaseColor,.5),t.showBounds&&this.renderBodyBounds(n,i,t.boundsColor,.5),(t.showBody||t.showStaticBody)&&this.renderBodies(n),t.showJoint&&this.renderJoints(),(t.showAxes||t.showAngleIndicator)&&this.renderBodyAxes(n,i,t.showAxes,t.angleColor,.5),t.showVelocity&&this.renderBodyVelocity(n,i,t.velocityColor,1,2),t.showSeparations&&this.renderSeparations(e.pairs.list,i,t.separationColor),t.showCollisions&&this.renderCollisions(e.pairs.list,i,t.collisionColor)}},renderGrid:function(t,e,i,n){e.lineStyle(1,i,n);for(var s=o.keys(t.buckets),r=0;r0){var l=h[0].vertex.x,u=h[0].vertex.y;2===h.length&&(l=(h[0].vertex.x+h[1].vertex.x)/2,u=(h[0].vertex.y+h[1].vertex.y)/2),a.bodyB===a.supports[0].body||a.bodyA.isStatic?e.lineBetween(l-8*a.normal.x,u-8*a.normal.y,l,u):e.lineBetween(l+8*a.normal.x,u+8*a.normal.y,l,u)}}return this},renderBodyBounds:function(t,e,i,n){e.lineStyle(1,i,n);for(var s=0;s1?1:0;h1?1:0;a1?1:0;a1&&this.renderConvexHull(g,e,f,y)}}},renderBody:function(t,e,i,n,s,r,o,a){void 0===n&&(n=null),void 0===s&&(s=null),void 0===r&&(r=1),void 0===o&&(o=null),void 0===a&&(a=null);for(var h=this.debugConfig,l=h.sensorFillColor,u=h.sensorLineColor,c=t.parts,d=c.length,f=d>1?1:0;f1){var s=t.vertices;e.lineStyle(n,i),e.beginPath(),e.moveTo(s[0].x,s[0].y);for(var r=1;r0&&(e.fillStyle(a),e.fillCircle(u.x,u.y,h),e.fillCircle(c.x,c.y,h)),this},resetCollisionIDs:function(){return s._nextCollidingGroupId=1,s._nextNonCollidingGroupId=-1,s._nextCategory=1,this},shutdown:function(){p.off(this.engine),this.removeAllListeners(),v.clear(this.localWorld,!1),h.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});t.exports=y},function(t,e,i){(function(e){i(512);var n=i(29),s=i(17),r={Actions:i(238),Animations:i(632),BlendModes:i(52),Cache:i(633),Cameras:i(636),Core:i(719),Class:i(0),Create:i(781),Curves:i(787),Data:i(790),Display:i(792),DOM:i(809),Events:i(810),Game:i(812),GameObjects:i(905),Geom:i(422),Input:i(1187),Loader:i(1221),Math:i(168),Physics:i(1388),Plugins:i(1292),Renderer:i(1448),Scale:i(1294),ScaleModes:i(231),Scene:i(368),Scenes:i(1295),Structs:i(1297),Textures:i(1298),Tilemaps:i(1300),Time:i(1341),Tweens:i(1343),Utils:i(1360)};r.Sound=i(1370),r=s(!1,r,n),t.exports=r,e.Phaser=r}).call(this,i(511))},function(t,e,i){t.exports={Arcade:i(1247),Impact:i(1389),Matter:i(1412)}},function(t,e,i){t.exports={Body:i(1371),Events:i(1278),COLLIDES:i(465),CollisionMap:i(1372),Factory:i(1373),Image:i(1375),ImpactBody:i(1374),ImpactPhysics:i(1408),Sprite:i(1376),TYPE:i(466),World:i(1377)}},function(t,e,i){var n=i(22);t.exports=function(t,e,i,s,r){if(i)return n(e+i*t,-r,r);if(s){var o=s*t;return e-o>0?e-o:e+o<0?e+o:0}return n(e,-r,r)}},function(t,e){t.exports=function(t,e){if(t.standing=!1,e.collision.y&&(t.bounciness>0&&Math.abs(t.vel.y)>t.minBounceVelocity?t.vel.y*=-t.bounciness:(t.vel.y>0&&(t.standing=!0),t.vel.y=0)),e.collision.x&&(t.bounciness>0&&Math.abs(t.vel.x)>t.minBounceVelocity?t.vel.x*=-t.bounciness:t.vel.x=0),e.collision.slope){var i=e.collision.slope;if(t.bounciness>0){var n=t.vel.x*i.nx+t.vel.y*i.ny;t.vel.x=(t.vel.x-i.nx*n*2)*t.bounciness,t.vel.y=(t.vel.y-i.ny*n*2)*t.bounciness}else{var s=i.x*i.x+i.y*i.y,r=(t.vel.x*i.x+t.vel.y*i.y)/s;t.vel.x=i.x*r,t.vel.y=i.y*r;var o=Math.atan2(i.x,i.y);o>t.slopeStanding.min&&oi.last.x&&e.last.xi.last.y&&e.last.y0))r=t.collisionMap.trace(e.pos.x,e.pos.y,0,-(e.pos.y+e.size.y-i.pos.y),e.size.x,e.size.y),e.pos.y=r.pos.y,e.bounciness>0&&e.vel.y>e.minBounceVelocity?e.vel.y*=-e.bounciness:(e.standing=!0,e.vel.y=0);else{var l=(e.vel.y-i.vel.y)/2;e.vel.y=-l,i.vel.y=l,s=i.vel.x*t.delta,r=t.collisionMap.trace(e.pos.x,e.pos.y,s,-o/2,e.size.x,e.size.y),e.pos.y=r.pos.y;var u=t.collisionMap.trace(i.pos.x,i.pos.y,0,o/2,i.size.x,i.size.y);i.pos.y=u.pos.y}}},function(t,e,i){t.exports={BodyBounds:i(1378),Factory:i(1379),Image:i(1381),Matter:i(1286),MatterPhysics:i(1444),PolyDecomp:i(1380),Sprite:i(1382),TileBody:i(1285),PhysicsEditorParser:i(1282),PhysicsJSONParser:i(1283),World:i(1386)}},function(t,e,i){var n=i(508),s=i(2),r=i(3);t.exports=function(t,e,i,o){void 0===i&&(i={}),void 0===o&&(o=!0);var a=e.x,h=e.y;if(e.body={temp:!0,position:{x:a,y:h}},[n.Bounce,n.Collision,n.Force,n.Friction,n.Gravity,n.Mass,n.Sensor,n.SetBody,n.Sleep,n.Static,n.Transform,n.Velocity].forEach(function(t){for(var i in t)(n=t[i]).get&&"function"==typeof n.get||n.set&&"function"==typeof n.set?Object.defineProperty(e,i,{get:t[i].get,set:t[i].set}):Object.defineProperty(e,i,{value:t[i]});var n}),e.world=t,e._tempVec2=new r(a,h),i.hasOwnProperty("type")&&"body"===i.type)e.setExistingBody(i,o);else{var l=s(i,"shape",null);l||(l="rectangle"),i.addToWorld=o,e.setBody(l,i)}return e}},function(t,e){t.exports={setBounce:function(t){return this.body.restitution=t,this}}},function(t,e){var i={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var e=0;if(Array.isArray(t))for(var i=0;i1?1:0;s0},intersectPoint:function(t,e,i){i=this.getMatterBodies(i);var n=k.create(t,e),s=[];return M.point(i,n).forEach(function(t){-1===s.indexOf(t)&&s.push(t)}),s},intersectRect:function(t,e,i,n,s,r){void 0===s&&(s=!1),r=this.getMatterBodies(r);var o={min:{x:t,y:e},max:{x:t+i,y:e+n}},a=[];return M.region(r,o,s).forEach(function(t){-1===a.indexOf(t)&&a.push(t)}),a},intersectRay:function(t,e,i,n,s,r){void 0===s&&(s=1),r=this.getMatterBodies(r);for(var o=[],a=M.ray(r,k.create(t,e),k.create(i,n),s),h=0;h0)for(var a=s+1;ae.max.x?i=e.min.x-t.max.x:t.max.xe.max.y?n=e.min.y-t.max.y:t.max.y Date: Wed, 15 Jan 2020 13:06:58 +0000 Subject: [PATCH 182/189] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 499a001ed..a3597c5c0 100644 --- a/README.md +++ b/README.md @@ -109,13 +109,13 @@ npm install phaser [Phaser is on jsDelivr](https://www.jsdelivr.com/projects/phaser) which is a "super-fast CDN for developers". Include the following in your html: ```html - + ``` or the minified version: ```html - + ``` ### API Documentation From f4c011496c68645f9ad90b53de4426b143b5a7a3 Mon Sep 17 00:00:00 2001 From: samme Date: Thu, 16 Jan 2020 14:44:26 -0800 Subject: [PATCH 183/189] Fix PathFollower always at end of path --- src/gameobjects/components/PathFollower.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gameobjects/components/PathFollower.js b/src/gameobjects/components/PathFollower.js index f54f34541..33c5b3822 100644 --- a/src/gameobjects/components/PathFollower.js +++ b/src/gameobjects/components/PathFollower.js @@ -346,7 +346,7 @@ var PathFollower = { var tweenData = tween.data[0]; var pathVector = this.pathVector; - if (tweenData.state !== TWEEN_CONST.COMPLETE) + if (tweenData.state === TWEEN_CONST.COMPLETE) { this.path.getPoint(1, pathVector); From e4e265c8576f01cb361c65e9df960c1d6f9440ef Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 17 Jan 2020 11:02:39 +0000 Subject: [PATCH 184/189] Preparing for 3.23 dev --- CHANGELOG.md | 16 ++++++++++++++++ package.json | 4 ++-- src/const.js | 2 +- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82d34bc22..c1f9b6a62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Change Log +## Version 3.23 - Ginro - in development + +### New Features + +### Updates + +### Bug Fixes + +* The conditional checking if the `PathFollower` was at the end of the path or not was incorrect (thanks @samme) + +### Examples, Documentation and TypeScript + +My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs: + + + ## Version 3.22 - Kohaku - January 15th 2020 ### Matter Physics diff --git a/package.json b/package.json index 71ecce5b1..6348dccf5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "phaser", - "version": "3.22.0", - "release": "Kohaku", + "version": "3.23.0-beta1", + "release": "Ginro", "description": "A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers.", "author": "Richard Davey (http://www.photonstorm.com)", "homepage": "http://phaser.io", diff --git a/src/const.js b/src/const.js index b5092eb38..109c85f68 100644 --- a/src/const.js +++ b/src/const.js @@ -20,7 +20,7 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.22.0', + VERSION: '3.23.0-beta1', BlendModes: require('./renderer/BlendModes'), From 162b07bd6bc0c6476184d3c1a5169a54e493d9e6 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 17 Jan 2020 17:38:06 +0000 Subject: [PATCH 185/189] Added new Rope Game Object --- src/gameobjects/index.js | 3 + src/gameobjects/rope/Rope.js | 589 +++++++++++++++++++++ src/gameobjects/rope/RopeCanvasRenderer.js | 23 + src/gameobjects/rope/RopeCreator.js | 48 ++ src/gameobjects/rope/RopeFactory.js | 43 ++ src/gameobjects/rope/RopeRender.js | 25 + src/gameobjects/rope/RopeWebGLRenderer.js | 118 +++++ 7 files changed, 849 insertions(+) create mode 100644 src/gameobjects/rope/Rope.js create mode 100644 src/gameobjects/rope/RopeCanvasRenderer.js create mode 100644 src/gameobjects/rope/RopeCreator.js create mode 100644 src/gameobjects/rope/RopeFactory.js create mode 100644 src/gameobjects/rope/RopeRender.js create mode 100644 src/gameobjects/rope/RopeWebGLRenderer.js diff --git a/src/gameobjects/index.js b/src/gameobjects/index.js index f87e9488a..cd6c90019 100644 --- a/src/gameobjects/index.js +++ b/src/gameobjects/index.js @@ -35,6 +35,7 @@ var GameObjects = { PathFollower: require('./pathfollower/PathFollower'), RenderTexture: require('./rendertexture/RenderTexture'), RetroFont: require('./bitmaptext/RetroFont'), + Rope: require('./rope/Rope'), Sprite: require('./sprite/Sprite'), Text: require('./text/static/Text'), TileSprite: require('./tilesprite/TileSprite'), @@ -70,6 +71,7 @@ var GameObjects = { Particles: require('./particles/ParticleManagerFactory'), PathFollower: require('./pathfollower/PathFollowerFactory'), RenderTexture: require('./rendertexture/RenderTextureFactory'), + Rope: require('./rope/RopeFactory'), Sprite: require('./sprite/SpriteFactory'), StaticBitmapText: require('./bitmaptext/static/BitmapTextFactory'), Text: require('./text/static/TextFactory'), @@ -100,6 +102,7 @@ var GameObjects = { Image: require('./image/ImageCreator'), Particles: require('./particles/ParticleManagerCreator'), RenderTexture: require('./rendertexture/RenderTextureCreator'), + Rope: require('./rope/RopeCreator'), Sprite: require('./sprite/SpriteCreator'), StaticBitmapText: require('./bitmaptext/static/BitmapTextCreator'), Text: require('./text/static/TextCreator'), diff --git a/src/gameobjects/rope/Rope.js b/src/gameobjects/rope/Rope.js new file mode 100644 index 000000000..4b5efdb42 --- /dev/null +++ b/src/gameobjects/rope/Rope.js @@ -0,0 +1,589 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = require('../../utils/Class'); +var Components = require('../components'); +var GameObject = require('../GameObject'); +var RopeRender = require('./RopeRender'); +var NOOP = require('../../utils/NOOP'); +var Vector2 = require('../../math/Vector2'); + +/** + * @classdesc + * A Rope Game Object. + * + * @class Rope + * @extends Phaser.GameObjects.GameObject + * @memberof Phaser.GameObjects + * @constructor + * @webglOnly + * @since 3.23.0 + * + * @extends Phaser.GameObjects.Components.BlendMode + * @extends Phaser.GameObjects.Components.Depth + * @extends Phaser.GameObjects.Components.Mask + * @extends Phaser.GameObjects.Components.Pipeline + * @extends Phaser.GameObjects.Components.Size + * @extends Phaser.GameObjects.Components.Texture + * @extends Phaser.GameObjects.Components.Transform + * @extends Phaser.GameObjects.Components.Visible + * @extends Phaser.GameObjects.Components.ScrollFactor + * + * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. + * @param {number} x - The horizontal position of this Game Object in the world. + * @param {number} y - The vertical position of this Game Object in the world. + * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param {(string|integer|null)} [frame] - An optional frame from the Texture this Game Object is rendering with. + * @param {Phaser.Types.Math.Vector2Like[]} [points] - An array containing the vertices data for this Rope. If none is provided a simple quad is created. See `setPoints` to set this post-creation. + * @param {number[]} [colors] - An optional array containing the color data for this Rope. You should provide one color value per pair of vertices. + * @param {number[]} [alphas] - An optional array containing the alpha data for this Rope. You should provide one alpha value per pair of vertices. + */ +var Rope = new Class({ + + Extends: GameObject, + + Mixins: [ + Components.BlendMode, + Components.Depth, + Components.Mask, + Components.Pipeline, + Components.Size, + Components.Texture, + Components.Transform, + Components.Visible, + Components.ScrollFactor, + RopeRender + ], + + initialize: + + function Rope (scene, x, y, texture, frame, points, colors, alphas) + { + if (points === undefined) + { + points = [ { x: 0, y: 0 } ]; + } + + GameObject.call(this, scene, 'Rope'); + + /** + * An array containing the points data for this Rope. + * + * Each point should be given as a Vector2Like object (i.e. a Vector2, Geom.Point or object with public x/y properties). + * + * The point coordinates are given in local space, where 0 x 0 is the start of the Rope strip. + * + * You can modify the contents of this array directly in real-time to create interesting effects. + * If you do so, be sure to call `setDirty` _after_ modifying this array, so that the vertices data is + * updated before the next render. Alternatively, you can use the `setPoints` method instead. + * + * Should you need to change the _size_ of this array, then you should always use the `setPoints` method. + * + * @name Phaser.GameObjects.Rope#points + * @type {Phaser.Math.Types.Vector2Like[]} + * @since 3.23.0 + */ + this.points = points; + + /** + * An array containing the vertices data for this Rope. + * + * This data is calculated automatically in the `updateVertices` method, based on the points provided. + * + * @name Phaser.GameObjects.Rope#vertices + * @type {Float32Array} + * @since 3.23.0 + */ + this.vertices; + + /** + * An array containing the uv data for this Rope. + * + * This data is calculated automatically in the `setPoints` method, based on the points provided. + * + * @name Phaser.GameObjects.Rope#uv + * @type {Float32Array} + * @since 3.23.0 + */ + this.uv; + + /** + * An array containing the color data for this Rope. + * + * Colors should be given as numeric RGB values, such as 0xff0000. + * You should provide _two_ color values for every point in the Rope, one for the top and one for the bottom of each quad. + * + * You can modify the contents of this array directly in real-time, however, should you need to change the _size_ + * of the array, then you should use the `setColors` method instead. + * + * @name Phaser.GameObjects.Rope#colors + * @type {Uint32Array} + * @since 3.23.0 + */ + this.colors; + + /** + * An array containing the alpha data for this Rope. + * + * Alphas should be given as float values, such as 0.5. + * You should provide _two_ alpha values for every point in the Rope, one for the top and one for the bottom of each quad. + * + * You can modify the contents of this array directly in real-time, however, should you need to change the _size_ + * of the array, then you should use the `setAlphas` method instead. + * + * @name Phaser.GameObjects.Rope#alphas + * @type {Float32Array} + * @since 3.23.0 + */ + this.alphas; + + /** + * Fill or additive mode used when blending the color values? + * + * @name Phaser.GameObjects.Rope#tintFill + * @type {boolean} + * @default false + * @since 3.23.0 + */ + this.tintFill = false; + + /** + * If the Rope is marked as `dirty` it will automatically recalculate its vertices + * the next time it renders. You can also force this by calling `updateVertices`. + * + * @name Phaser.GameObjects.Rope#dirty + * @type {boolean} + * @since 3.23.0 + */ + this.dirty = false; + + /** + * Internal Vector2 used for vertices updates. + * + * @name Phaser.GameObjects.Rope#_perp + * @type {Phaser.Math.Vector2} + * @private + * @since 3.23.0 + */ + this._perp = new Vector2(); + + this.setTexture(texture, frame); + this.setPosition(x, y); + this.setSizeToFrame(); + this.initPipeline('TextureTintStripPipeline'); + + this.resizeArrays(points.length); + + this.setPoints(points, colors, alphas); + + this.updateVertices(); + }, + + /** + * This method is left intentionally empty and does not do anything. + * It is retained to allow a Rope to be added to a Container. + * You should modify the alphas array values instead. See `setAlphas`. + * + * @method Phaser.GameObjects.Rope#setAlpha + * @since 3.23.0 + */ + setAlpha: NOOP, + + /** + * Flags this Rope as being dirty. A dirty rope will recalculate all of its vertices data + * the _next_ time it renders. You should set this rope as dirty if you update the points + * array directly. + * + * @method Phaser.GameObjects.Rope#setDirty + * @since 3.23.0 + * + * @return {this} This Game Object instance. + */ + setDirty: function () + { + this.dirty = true; + + return this; + }, + + /** + * Set the alpha values used by the Rope during rendering. + * + * You can provide the values in a number of ways: + * + * 1) One single numeric value: `setAlphas(0.5)` - This will set a single alpha for the whole Rope. + * 2) Two numeric value: `setAlphas(1, 0.5)` - This will set a 'top' and 'bottom' alpha value across the whole Rope. + * 3) An array of values: `setAlphas([ 1, 0.5, 0.2 ])` + * + * If you provide an array of values and the array has exactly the same number of values as `points` in the Rope, it + * will use each alpha value per rope segment. + * + * If the provided array has a different number of values than `points` then it will use the values in order, from + * the first Rope segment and on, until it runs out of values. This allows you to control the alpha values at all + * vertices in the Rope. + * + * Note this method is called `setAlphas` (plural) and not `setAlpha`, which is a NOOP. + * + * @method Phaser.GameObjects.Rope#setAlphas + * @since 3.23.0 + * + * @param {(number|number[])} [alphas] - Either a single alpha value, or an array of values. If nothing is provided alpha is reset to 1. + * @param {number} [bottomAlpha] - An optional bottom alpha value. See the method description for details. + * + * @return {this} This Game Object instance. + */ + setAlphas: function (alphas, bottomAlpha) + { + var total = this.points.length; + + if (total < 1) + { + return this; + } + + var currentAlphas = this.alphas; + + if (alphas === undefined) + { + alphas = [ 1 ]; + } + else if (!Array.isArray(alphas) && bottomAlpha === undefined) + { + alphas = [ alphas ]; + } + + var i; + var index = 0; + + if (bottomAlpha !== undefined) + { + // Top / Bottom alpha pair + for (i = 0; i < total; i++) + { + index = i * 2; + + currentAlphas[index] = alphas; + currentAlphas[index + 1] = bottomAlpha; + } + } + else if (alphas.length === total) + { + // If there are exactly the same number of alphas as points, we'll combine the alphas + for (i = 0; i < total; i++) + { + index = i * 2; + + currentAlphas[index] = alphas[i]; + currentAlphas[index + 1] = alphas[i]; + } + } + else + { + var prevAlpha = alphas[0]; + + for (i = 0; i < total; i++) + { + index = i * 2; + + if (alphas.length > index) + { + prevAlpha = alphas[index]; + } + + currentAlphas[index] = prevAlpha; + + if (alphas.length > index + 1) + { + prevAlpha = alphas[index + 1]; + } + + currentAlphas[index + 1] = prevAlpha; + } + } + + return this; + + }, + + /** + * Set the color values used by the Rope during rendering. + * + * Colors are used to control the level of tint applied across the Rope texture. + * + * You can provide the values in a number of ways: + * + * 1) One single numeric value: `setColors(0xff0000)` - This will set a single color tint for the whole Rope. + * 3) An array of values: `setColors([ 0xff0000, 0x00ff00, 0x0000ff ])` + * + * If you provide an array of values and the array has exactly the same number of values as `points` in the Rope, it + * will use each color per rope segment. + * + * If the provided array has a different number of values than `points` then it will use the values in order, from + * the first Rope segment and on, until it runs out of values. This allows you to control the color values at all + * vertices in the Rope. + * + * @method Phaser.GameObjects.Rope#setColors + * @since 3.23.0 + * + * @param {(number|number[])} [colors] - Either a single color value, or an array of values. If nothing is provided color is reset to 0xffffff. + * + * @return {this} This Game Object instance. + */ + setColors: function (colors) + { + var total = this.points.length; + + if (total < 1) + { + return this; + } + + var currentColors = this.colors; + + if (colors === undefined) + { + colors = [ 0xffffff ]; + } + else if (!Array.isArray(colors)) + { + colors = [ colors ]; + } + + var i; + var index = 0; + + if (colors.length === total) + { + // If there are exactly the same number of colors as points, we'll combine the colors + for (i = 0; i < total; i++) + { + index = i * 2; + + currentColors[index] = colors[i]; + currentColors[index + 1] = colors[i]; + } + } + else + { + var prevColor = colors[0]; + + for (i = 0; i < total; i++) + { + index = i * 2; + + if (colors.length > index) + { + prevColor = colors[index]; + } + + currentColors[index] = prevColor; + + if (colors.length > index + 1) + { + prevColor = colors[index + 1]; + } + + currentColors[index + 1] = prevColor; + } + } + + return this; + }, + + /** + * Sets the points used by this Rope. + * + * The points should be provided as an array of Vector2, or vector2-like objects (i.e. those with public x/y properties). + * + * Each point corresponds to one segment of the Rope. The more points in the array, the more segments the rope has. + * + * Point coordinates are given in local-space, not world-space, and are directly related to the size of the texture + * this Rope object is using. + * + * For example, a Rope using a 512 px wide texture, split into 4 segments (128px each) would use the following points: + * + * ```javascript + * rope.setPoints([ + * { x: 0, y: 0 }, + * { x: 128, y: 0 }, + * { x: 256, y: 0 }, + * { x: 384, y: 0 } + * ]); + * ``` + * + * Note that calling this method with a different number of points than the Rope has currently will + * _reset_ the color and alpha values, unless you provide them as arguments to this method. + * + * See also `Rope.split`. + * + * @method Phaser.GameObjects.Rope#setPoints + * @since 3.23.0 + * + * @param {Phaser.Math.Types.Vector2Like[]} [points] - An array of points to split the Rope into. + * @param {(number|number[])} [colors] - Either a single color value, or an array of values. + * @param {(number|number[])} [alphas] - Either a single alpha value, or an array of values. + * + * @return {this} This Game Object instance. + */ + setPoints: function (points, colors, alphas) + { + var total = points.length; + + if (total < 1) + { + return this; + } + + var currentUVs = this.uv; + + if (this.points.length !== total) + { + this.resizeArrays(total); + } + + var index = 0; + var amount = 0; + + for (var i = 0; i < total; i++) + { + index = i * 4; + amount = i / (total - 1); + + currentUVs[index] = amount; + currentUVs[index + 1] = 0; + currentUVs[index + 2] = amount; + currentUVs[index + 3] = 1; + } + + this.points = points; + + if (colors !== undefined) + { + this.setColors(colors); + } + + if (alphas !== undefined) + { + this.setAlphas(alphas); + } + + return this; + }, + + /** + * Resizes all of the internal arrays: `vertices`, `uv`, `colors` and `alphas` to the new + * given Rope segment total. + * + * @method Phaser.GameObjects.Rope#resizeArrays + * @since 3.23.0 + * + * @param {integer} newSize - The amount of segments to split the Rope in to. + * + * @return {this} This Game Object instance. + */ + resizeArrays: function (newSize) + { + var colors = this.colors; + var alphas = this.alphas; + + this.vertices = new Float32Array(newSize * 4); + this.uv = new Float32Array(newSize * 4); + + colors = new Uint32Array(newSize * 2); + alphas = new Float32Array(newSize * 2); + + for (var i = 0; i < newSize * 2; i++) + { + colors[i] = 0xffffff; + alphas[i] = 1; + } + + this.colors = colors; + this.alphas = alphas; + + // updateVertices during next render + this.dirty = true; + + return this; + }, + + /** + * Updates the vertices based on the Rope points. + * + * This method is called automatically during rendering if `Rope.dirty` is `true`, which is set + * by the `setPoints` and `setDirty` methods. You should flag the Rope as being dirty if you modify + * the Rope points directly. + * + * @method Phaser.GameObjects.Rope#updateVertices + * @since 3.23.0 + * + * @return {this} This Game Object instance. + */ + updateVertices: function () + { + var perp = this._perp; + var points = this.points; + var vertices = this.vertices; + + var total = points.length; + + this.dirty = false; + + if (total < 1) + { + return; + } + + var lastPoint = points[0]; + var nextPoint; + + for (var i = 0; i < total; i++) + { + var point = points[i]; + var index = i * 4; + + if (i < total - 1) + { + nextPoint = points[i + 1]; + } + else + { + nextPoint = point; + } + + perp.x = nextPoint.y - lastPoint.y; + perp.y = -(nextPoint.x - lastPoint.x); + + var ratio = (1 - (i / (total - 1))) * 10; + + if (ratio > 1) + { + ratio = 1; + } + + var perpLength = perp.length(); + var num = this.frame.halfHeight; + + perp.x /= perpLength; + perp.y /= perpLength; + + perp.x *= num; + perp.y *= num; + + vertices[index] = point.x + perp.x; + vertices[index + 1] = point.y + perp.y; + vertices[index + 2] = point.x - perp.x; + vertices[index + 3] = point.y - perp.y; + + lastPoint = point; + } + + return this; + } + +}); + +module.exports = Rope; diff --git a/src/gameobjects/rope/RopeCanvasRenderer.js b/src/gameobjects/rope/RopeCanvasRenderer.js new file mode 100644 index 000000000..39273895b --- /dev/null +++ b/src/gameobjects/rope/RopeCanvasRenderer.js @@ -0,0 +1,23 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * This is a stub function for Rope.Render. There is no Canvas renderer for Rope objects. + * + * @method Phaser.GameObjects.Rope#renderCanvas + * @since 3.0.0 + * @private + * + * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. + * @param {Phaser.GameObjects.Rope} src - The Game Object being rendered in this call. + * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. + */ +var RopeCanvasRenderer = function () +{ +}; + +module.exports = RopeCanvasRenderer; diff --git a/src/gameobjects/rope/RopeCreator.js b/src/gameobjects/rope/RopeCreator.js new file mode 100644 index 000000000..bdf13d2e3 --- /dev/null +++ b/src/gameobjects/rope/RopeCreator.js @@ -0,0 +1,48 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var BuildGameObject = require('../BuildGameObject'); +var GameObjectCreator = require('../GameObjectCreator'); +var GetAdvancedValue = require('../../utils/object/GetAdvancedValue'); +var GetValue = require('../../utils/object/GetValue'); +var Rope = require('./Rope'); + +/** + * Creates a new Rope Game Object and returns it. + * + * Note: This method will only be available if the Rope Game Object and WebGL support have been built into Phaser. + * + * @method Phaser.GameObjects.GameObjectCreator#rope + * @since 3.23.0 + * + * @param {object} config - The configuration object this Game Object will use to create itself. + * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + * + * @return {Phaser.GameObjects.Rope} The Game Object that was created. + */ +GameObjectCreator.register('rope', function (config, addToScene) +{ + if (config === undefined) { config = {}; } + + var key = GetAdvancedValue(config, 'key', null); + var frame = GetAdvancedValue(config, 'frame', null); + var points = GetValue(config, 'points', undefined); + var colors = GetValue(config, 'colors', undefined); + var alphas = GetValue(config, 'alphas', undefined); + + var rope = new Rope(this.scene, 0, 0, key, frame, points, colors, alphas); + + if (addToScene !== undefined) + { + config.add = addToScene; + } + + BuildGameObject(this.scene, rope, config); + + return rope; +}); + +// When registering a factory function 'this' refers to the GameObjectCreator context. diff --git a/src/gameobjects/rope/RopeFactory.js b/src/gameobjects/rope/RopeFactory.js new file mode 100644 index 000000000..c15910d93 --- /dev/null +++ b/src/gameobjects/rope/RopeFactory.js @@ -0,0 +1,43 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Rope = require('./Rope'); +var GameObjectFactory = require('../GameObjectFactory'); + +/** + * Creates a new Rope Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Rope Game Object and WebGL support have been built into Phaser. + * + * @method Phaser.GameObjects.GameObjectFactory#mesh + * @webglOnly + * @since 3.23.0 + * + * @param {number} x - The horizontal position of this Game Object in the world. + * @param {number} y - The vertical position of this Game Object in the world. + * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. + * @param {Phaser.Types.Math.Vector2Like[]} [points] - An array containing the vertices data for this Rope. If none is provided a simple quad is created. See `setPoints` to set this post-creation. + * @param {number[]} [colors] - An optional array containing the color data for this Rope. You should provide one color value per pair of vertices. + * @param {number[]} [alphas] - An optional array containing the alpha data for this Rope. You should provide one alpha value per pair of vertices. + * + * @return {Phaser.GameObjects.Rope} The Game Object that was created. + */ +if (typeof WEBGL_RENDERER) +{ + GameObjectFactory.register('rope', function (x, y, texture, frame, points, colors, alphas) + { + return this.displayList.add(new Rope(this.scene, x, y, texture, frame, points, colors, alphas)); + }); +} + +// When registering a factory function 'this' refers to the GameObjectFactory context. +// +// There are several properties available to use: +// +// this.scene - a reference to the Scene that owns the GameObjectFactory +// this.displayList - a reference to the Display List the Scene owns +// this.updateList - a reference to the Update List the Scene owns diff --git a/src/gameobjects/rope/RopeRender.js b/src/gameobjects/rope/RopeRender.js new file mode 100644 index 000000000..b2ea4a41c --- /dev/null +++ b/src/gameobjects/rope/RopeRender.js @@ -0,0 +1,25 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var renderWebGL = require('../../utils/NOOP'); +var renderCanvas = require('../../utils/NOOP'); + +if (typeof WEBGL_RENDERER) +{ + renderWebGL = require('./RopeWebGLRenderer'); +} + +if (typeof CANVAS_RENDERER) +{ + renderCanvas = require('./RopeCanvasRenderer'); +} + +module.exports = { + + renderWebGL: renderWebGL, + renderCanvas: renderCanvas + +}; diff --git a/src/gameobjects/rope/RopeWebGLRenderer.js b/src/gameobjects/rope/RopeWebGLRenderer.js new file mode 100644 index 000000000..9132110d7 --- /dev/null +++ b/src/gameobjects/rope/RopeWebGLRenderer.js @@ -0,0 +1,118 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Utils = require('../../renderer/webgl/Utils'); + +/** + * Renders this Game Object with the WebGL Renderer to the given Camera. + * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera. + * This method should not be called directly. It is a utility function of the Render module. + * + * @method Phaser.GameObjects.Rope#renderWebGL + * @since 3.23.0 + * @private + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. + * @param {Phaser.GameObjects.Rope} src - The Game Object being rendered in this call. + * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. + * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested + */ +var RopeWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +{ + var pipeline = this.pipeline; + + renderer.setPipeline(pipeline, src); + + var camMatrix = pipeline._tempMatrix1; + var spriteMatrix = pipeline._tempMatrix2; + var calcMatrix = pipeline._tempMatrix3; + + spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); + + camMatrix.copyFrom(camera.matrix); + + if (parentMatrix) + { + // Multiply the camera by the parent matrix + camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); + + // Undo the camera scroll + spriteMatrix.e = src.x; + spriteMatrix.f = src.y; + + // Multiply by the Sprite matrix, store result in calcMatrix + camMatrix.multiply(spriteMatrix, calcMatrix); + } + else + { + spriteMatrix.e -= camera.scrollX * src.scrollFactorX; + spriteMatrix.f -= camera.scrollY * src.scrollFactorY; + + // Multiply by the Sprite matrix, store result in calcMatrix + camMatrix.multiply(spriteMatrix, calcMatrix); + } + + var frame = src.frame; + var texture = frame.glTexture; + + var vertices = src.vertices; + var uvs = src.uv; + var colors = src.colors; + var alphas = src.alphas; + + var meshVerticesLength = vertices.length; + var vertexCount = Math.floor(meshVerticesLength * 0.5); + + if (pipeline.vertexCount + vertexCount > pipeline.vertexCapacity) + { + pipeline.flush(); + } + + pipeline.setTexture2D(texture, 0); + + var vertexViewF32 = pipeline.vertexViewF32; + var vertexViewU32 = pipeline.vertexViewU32; + + var vertexOffset = (pipeline.vertexCount * pipeline.vertexComponentCount) - 1; + + var colorIndex = 0; + + var tintEffect = src.tintFill; + + if (src.dirty) + { + src.updateVertices(); + } + + for (var i = 0; i < meshVerticesLength; i += 2) + { + var x = vertices[i + 0]; + var y = vertices[i + 1]; + + var tx = x * calcMatrix.a + y * calcMatrix.c + calcMatrix.e; + var ty = x * calcMatrix.b + y * calcMatrix.d + calcMatrix.f; + + if (camera.roundPixels) + { + tx = Math.round(tx); + ty = Math.round(ty); + } + + vertexViewF32[++vertexOffset] = tx; + vertexViewF32[++vertexOffset] = ty; + vertexViewF32[++vertexOffset] = uvs[i + 0]; + vertexViewF32[++vertexOffset] = uvs[i + 1]; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = Utils.getTintAppendFloatAlphaAndSwap(colors[colorIndex], camera.alpha * alphas[colorIndex]); + + colorIndex++; + } + + pipeline.vertexCount += vertexCount; +}; + +module.exports = RopeWebGLRenderer; From 0af1303ba26d398bb8e452f66e118ff916ccc949 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 17 Jan 2020 17:38:24 +0000 Subject: [PATCH 186/189] Added TextureTintStrip pipeline --- src/renderer/webgl/WebGLRenderer.js | 2 ++ src/renderer/webgl/pipelines/index.js | 1 + 2 files changed, 3 insertions(+) diff --git a/src/renderer/webgl/WebGLRenderer.js b/src/renderer/webgl/WebGLRenderer.js index cdd00152b..63afb65f4 100644 --- a/src/renderer/webgl/WebGLRenderer.js +++ b/src/renderer/webgl/WebGLRenderer.js @@ -23,6 +23,7 @@ var WebGLSnapshot = require('../snapshot/WebGLSnapshot'); var BitmapMaskPipeline = require('./pipelines/BitmapMaskPipeline'); var ForwardDiffuseLightPipeline = require('./pipelines/ForwardDiffuseLightPipeline'); var TextureTintPipeline = require('./pipelines/TextureTintPipeline'); +var TextureTintStripPipeline = require('./pipelines/TextureTintStripPipeline'); /** * @callback WebGLContextCallback @@ -711,6 +712,7 @@ var WebGLRenderer = new Class({ this.pipelines = {}; this.addPipeline('TextureTintPipeline', new TextureTintPipeline({ game: game, renderer: this })); + this.addPipeline('TextureTintStripPipeline', new TextureTintStripPipeline({ game: game, renderer: this })); this.addPipeline('BitmapMaskPipeline', new BitmapMaskPipeline({ game: game, renderer: this })); this.addPipeline('Light2D', new ForwardDiffuseLightPipeline({ game: game, renderer: this, maxLights: config.maxLights })); diff --git a/src/renderer/webgl/pipelines/index.js b/src/renderer/webgl/pipelines/index.js index 70bfe0b29..10bd15cb3 100644 --- a/src/renderer/webgl/pipelines/index.js +++ b/src/renderer/webgl/pipelines/index.js @@ -13,6 +13,7 @@ module.exports = { BitmapMaskPipeline: require('./BitmapMaskPipeline'), ForwardDiffuseLightPipeline: require('./ForwardDiffuseLightPipeline'), TextureTintPipeline: require('./TextureTintPipeline'), + TextureTintStripPipeline: require('./TextureTintStripPipeline'), ModelViewProjection: require('./components/ModelViewProjection') }; From 18120cb0d5d050c9bc241d9e4c2b485b606a14fa Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 17 Jan 2020 17:58:41 +0000 Subject: [PATCH 187/189] New Strip pipeline --- .../pipelines/TextureTintStripPipeline.js | 404 ++++++++++++++++++ 1 file changed, 404 insertions(+) create mode 100644 src/renderer/webgl/pipelines/TextureTintStripPipeline.js diff --git a/src/renderer/webgl/pipelines/TextureTintStripPipeline.js b/src/renderer/webgl/pipelines/TextureTintStripPipeline.js new file mode 100644 index 000000000..fe2f2febc --- /dev/null +++ b/src/renderer/webgl/pipelines/TextureTintStripPipeline.js @@ -0,0 +1,404 @@ +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = require('../../../utils/Class'); +var GetFastValue = require('../../../utils/object/GetFastValue'); +var ModelViewProjection = require('./components/ModelViewProjection'); +var ShaderSourceFS = require('../shaders/TextureTint-frag.js'); +var ShaderSourceVS = require('../shaders/TextureTint-vert.js'); +var TransformMatrix = require('../../../gameobjects/components/TransformMatrix'); +var WebGLPipeline = require('../WebGLPipeline'); + +/** + * @classdesc + * TextureTintStripPipeline implements the rendering infrastructure + * for displaying textured objects + * The config properties are: + * - game: Current game instance. + * - renderer: Current WebGL renderer. + * - vertShader: Source for vertex shader as a string. + * - fragShader: Source for fragment shader as a string. + * - vertexCapacity: The amount of vertices that shall be allocated + * - vertexSize: The size of a single vertex in bytes. + * + * @class TextureTintStripPipeline + * @extends Phaser.Renderer.WebGL.WebGLPipeline + * @memberof Phaser.Renderer.WebGL.Pipelines + * @constructor + * @since 3.23.0 + * + * @param {object} config - The configuration options for this Texture Tint Pipeline, as described above. + */ +var TextureTintStripPipeline = new Class({ + + Extends: WebGLPipeline, + + Mixins: [ + ModelViewProjection + ], + + initialize: + + function TextureTintStripPipeline (config) + { + var rendererConfig = config.renderer.config; + + // Vertex Size = attribute size added together (2 + 2 + 1 + 4) + + WebGLPipeline.call(this, { + game: config.game, + renderer: config.renderer, + gl: config.renderer.gl, + topology: config.renderer.gl.TRIANGLE_STRIP, + vertShader: GetFastValue(config, 'vertShader', ShaderSourceVS), + fragShader: GetFastValue(config, 'fragShader', ShaderSourceFS), + vertexCapacity: GetFastValue(config, 'vertexCapacity', 6 * rendererConfig.batchSize), + vertexSize: GetFastValue(config, 'vertexSize', Float32Array.BYTES_PER_ELEMENT * 5 + Uint8Array.BYTES_PER_ELEMENT * 4), + attributes: [ + { + name: 'inPosition', + size: 2, + type: config.renderer.gl.FLOAT, + normalized: false, + offset: 0 + }, + { + name: 'inTexCoord', + size: 2, + type: config.renderer.gl.FLOAT, + normalized: false, + offset: Float32Array.BYTES_PER_ELEMENT * 2 + }, + { + name: 'inTintEffect', + size: 1, + type: config.renderer.gl.FLOAT, + normalized: false, + offset: Float32Array.BYTES_PER_ELEMENT * 4 + }, + { + name: 'inTint', + size: 4, + type: config.renderer.gl.UNSIGNED_BYTE, + normalized: true, + offset: Float32Array.BYTES_PER_ELEMENT * 5 + } + ] + }); + + /** + * Float32 view of the array buffer containing the pipeline's vertices. + * + * @name Phaser.Renderer.WebGL.Pipelines.TextureTintStripPipeline#vertexViewF32 + * @type {Float32Array} + * @since 3.23.0 + */ + this.vertexViewF32 = new Float32Array(this.vertexData); + + /** + * Uint32 view of the array buffer containing the pipeline's vertices. + * + * @name Phaser.Renderer.WebGL.Pipelines.TextureTintStripPipeline#vertexViewU32 + * @type {Uint32Array} + * @since 3.23.0 + */ + this.vertexViewU32 = new Uint32Array(this.vertexData); + + /** + * Size of the batch. + * + * @name Phaser.Renderer.WebGL.Pipelines.TextureTintStripPipeline#maxQuads + * @type {integer} + * @since 3.23.0 + */ + this.maxQuads = rendererConfig.batchSize; + + /** + * Collection of batch information + * + * @name Phaser.Renderer.WebGL.Pipelines.TextureTintStripPipeline#batches + * @type {array} + * @since 3.23.0 + */ + this.batches = []; + + /** + * A temporary Transform Matrix, re-used internally during batching. + * + * @name Phaser.Renderer.WebGL.Pipelines.TextureTintStripPipeline#_tempMatrix1 + * @private + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @since 3.23.0 + */ + this._tempMatrix1 = new TransformMatrix(); + + /** + * A temporary Transform Matrix, re-used internally during batching. + * + * @name Phaser.Renderer.WebGL.Pipelines.TextureTintStripPipeline#_tempMatrix2 + * @private + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @since 3.23.0 + */ + this._tempMatrix2 = new TransformMatrix(); + + /** + * A temporary Transform Matrix, re-used internally during batching. + * + * @name Phaser.Renderer.WebGL.Pipelines.TextureTintStripPipeline#_tempMatrix3 + * @private + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @since 3.23.0 + */ + this._tempMatrix3 = new TransformMatrix(); + + this.mvpInit(); + }, + + /** + * Called every time the pipeline needs to be used. + * It binds all necessary resources. + * + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintStripPipeline#onBind + * @since 3.23.0 + * + * @return {this} This WebGLPipeline instance. + */ + onBind: function () + { + WebGLPipeline.prototype.onBind.call(this); + + this.mvpUpdate(); + + return this; + }, + + /** + * Resizes this pipeline and updates the projection. + * + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintStripPipeline#resize + * @since 3.23.0 + * + * @param {number} width - The new width. + * @param {number} height - The new height. + * @param {number} resolution - The resolution. + * + * @return {this} This WebGLPipeline instance. + */ + resize: function (width, height, resolution) + { + WebGLPipeline.prototype.resize.call(this, width, height, resolution); + + this.projOrtho(0, this.width, this.height, 0, -1000.0, 1000.0); + + return this; + }, + + /** + * Assigns a texture to the current batch. If a different texture is already set it creates a new batch object. + * + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintStripPipeline#setTexture2D + * @since 3.23.0 + * + * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch. If not given uses blankTexture. + * @param {integer} [unit=0] - Texture unit to which the texture needs to be bound. + * + * @return {Phaser.Renderer.WebGL.Pipelines.TextureTintStripPipeline} This pipeline instance. + */ + setTexture2D: function (texture, unit) + { + if (texture === undefined) { texture = this.renderer.blankTexture.glTexture; } + if (unit === undefined) { unit = 0; } + + if (this.requireTextureBatch(texture, unit)) + { + this.pushBatch(texture, unit); + } + + return this; + }, + + /** + * Checks if the current batch has the same texture and texture unit, or if we need to create a new batch. + * + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintStripPipeline#requireTextureBatch + * @since 3.23.0 + * + * @param {WebGLTexture} texture - WebGLTexture that will be assigned to the current batch. If not given uses blankTexture. + * @param {integer} unit - Texture unit to which the texture needs to be bound. + * + * @return {boolean} `true` if the pipeline needs to create a new batch, otherwise `false`. + */ + requireTextureBatch: function (texture, unit) + { + var batches = this.batches; + var batchLength = batches.length; + + if (batchLength > 0) + { + // If Texture Unit specified, we get the texture from the textures array, otherwise we use the texture property + var currentTexture = (unit > 0) ? batches[batchLength - 1].textures[unit - 1] : batches[batchLength - 1].texture; + + return !(currentTexture === texture); + } + + return true; + }, + + /** + * Creates a new batch object and pushes it to a batch array. + * The batch object contains information relevant to the current + * vertex batch like the offset in the vertex buffer, vertex count and + * the textures used by that batch. + * + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintStripPipeline#pushBatch + * @since 3.23.0 + * + * @param {WebGLTexture} texture - Optional WebGLTexture that will be assigned to the created batch. + * @param {integer} unit - Texture unit to which the texture needs to be bound. + */ + pushBatch: function (texture, unit) + { + if (unit === 0) + { + this.batches.push({ + first: this.vertexCount, + texture: texture, + textures: [] + }); + } + else + { + var textures = []; + + textures[unit - 1] = texture; + + this.batches.push({ + first: this.vertexCount, + texture: null, + textures: textures + }); + } + }, + + /** + * Uploads the vertex data and emits a draw call for the current batch of vertices. + * + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintStripPipeline#flush + * @since 3.23.0 + * + * @return {this} This WebGLPipeline instance. + */ + flush: function () + { + if (this.flushLocked) + { + return this; + } + + this.flushLocked = true; + + var gl = this.gl; + var vertexCount = this.vertexCount; + var topology = this.topology; + var vertexSize = this.vertexSize; + var renderer = this.renderer; + + var batches = this.batches; + var batchCount = batches.length; + var batchVertexCount = 0; + var batch = null; + var batchNext; + var textureIndex; + var nTexture; + + if (batchCount === 0 || vertexCount === 0) + { + this.flushLocked = false; + + return this; + } + + gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); + + // Process the TEXTURE BATCHES + + for (var index = 0; index < batchCount - 1; index++) + { + batch = batches[index]; + batchNext = batches[index + 1]; + + // Multi-texture check (for non-zero texture units) + if (batch.textures.length > 0) + { + for (textureIndex = 0; textureIndex < batch.textures.length; ++textureIndex) + { + nTexture = batch.textures[textureIndex]; + + if (nTexture) + { + renderer.setTexture2D(nTexture, 1 + textureIndex, false); + } + } + + gl.activeTexture(gl.TEXTURE0); + } + + batchVertexCount = batchNext.first - batch.first; + + // Bail out if texture property is null (i.e. if a texture unit > 0) + if (batch.texture === null || batchVertexCount <= 0) + { + continue; + } + + renderer.setTexture2D(batch.texture, 0, false); + + gl.drawArrays(topology, batch.first, batchVertexCount); + } + + // Left over data + batch = batches[batchCount - 1]; + + // Multi-texture check (for non-zero texture units) + + if (batch.textures.length > 0) + { + for (textureIndex = 0; textureIndex < batch.textures.length; ++textureIndex) + { + nTexture = batch.textures[textureIndex]; + + if (nTexture) + { + renderer.setTexture2D(nTexture, 1 + textureIndex, false); + } + } + + gl.activeTexture(gl.TEXTURE0); + } + + batchVertexCount = vertexCount - batch.first; + + if (batch.texture && batchVertexCount > 0) + { + renderer.setTexture2D(batch.texture, 0, false); + + gl.drawArrays(topology, batch.first, batchVertexCount); + } + + this.vertexCount = 0; + + batches.length = 0; + + this.flushLocked = false; + + return this; + } + +}); + +module.exports = TextureTintStripPipeline; From d5473a4840a1751aff545fb3b9f6f88016366cd4 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 17 Jan 2020 17:58:50 +0000 Subject: [PATCH 188/189] Added setTintFill method --- src/gameobjects/rope/Rope.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/gameobjects/rope/Rope.js b/src/gameobjects/rope/Rope.js index 4b5efdb42..6d77a95f5 100644 --- a/src/gameobjects/rope/Rope.js +++ b/src/gameobjects/rope/Rope.js @@ -209,6 +209,30 @@ var Rope = new Class({ return this; }, + /** + * Swap this Game Object from using a fill-tint to an additive tint. + * + * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture + * with those in the tint. You can use this for effects such as making a player flash 'white' + * if hit by something. See the `setColors` method for details of tinting the vertices. + * + * @method Phaser.GameObjects.Rope#setTintFill + * @webglOnly + * @since 3.23.0 + * + * @param {boolean} [value=false] - Use tint fill (`true`) or an additive tint (`false`) + * + * @return {this} This Game Object instance. + */ + setTintFill: function (value) + { + if (value === undefined) { value = false; } + + this.tintFill = value; + + return this; + }, + /** * Set the alpha values used by the Rope during rendering. * From 57a022db53a3ae3c12b43a5ed26b1f5d5e67c359 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 17 Jan 2020 19:04:16 +0000 Subject: [PATCH 189/189] Always flush, because tri-strip --- src/gameobjects/rope/RopeWebGLRenderer.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/gameobjects/rope/RopeWebGLRenderer.js b/src/gameobjects/rope/RopeWebGLRenderer.js index 9132110d7..daadcf230 100644 --- a/src/gameobjects/rope/RopeWebGLRenderer.js +++ b/src/gameobjects/rope/RopeWebGLRenderer.js @@ -23,7 +23,7 @@ var Utils = require('../../renderer/webgl/Utils'); */ var RopeWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = src.pipeline; renderer.setPipeline(pipeline, src); @@ -67,10 +67,8 @@ var RopeWebGLRenderer = function (renderer, src, interpolationPercentage, camera var meshVerticesLength = vertices.length; var vertexCount = Math.floor(meshVerticesLength * 0.5); - if (pipeline.vertexCount + vertexCount > pipeline.vertexCapacity) - { - pipeline.flush(); - } + // Because it's a triangle strip + pipeline.flush(); pipeline.setTexture2D(texture, 0);